cedar-model-typescript-library 1.0.17 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- var e={5846(e,t,r){t.JsonReaderBehavior=t.C=void 0;const n=r(7639);t.C={STRICT:"strict",FEBRUARY_2024:"february-2024"};class a extends n.ReaderWriterBehavior{value;constructor(e,t){super(t),this.value=e}getValue(){return this.value}static STRICT=new a(t.C.STRICT,!1);static FEBRUARY_2024=new a(t.C.FEBRUARY_2024,!0)}t.JsonReaderBehavior=a},2022(e,t,r){t.JsonWriterBehavior=t.C=void 0;const n=r(7639);t.C={STRICT:"strict",FEBRUARY_2024:"february-2024"};class a extends n.ReaderWriterBehavior{value;_outputPages;_usePropertiesAtLanguage;_includeSkosNotationForLinksAndControlled;constructor(e,t,r,n,a){super(a),this.value=e,this._outputPages=t,this._usePropertiesAtLanguage=r,this._includeSkosNotationForLinksAndControlled=n}getValue(){return this.value}static STRICT=new a(t.C.STRICT,!1,!0,!0,!1);static FEBRUARY_2024=new a(t.C.FEBRUARY_2024,!0,!1,!1,!0);outputPages(){return this._outputPages}usePropertiesAtLanguage(){return this._usePropertiesAtLanguage}includeSkosNotationForLinksAndControlled(){return this._includeSkosNotationForLinksAndControlled}}t.JsonWriterBehavior=a},7639(e,t){t.ReaderWriterBehavior=void 0,t.ReaderWriterBehavior=class{_useWarningForKnownIssues;constructor(e){this._useWarningForKnownIssues=e}useWarningForKnownIssues(){return this._useWarningForKnownIssues}}},1395(e,t,r){t.YamlReaderBehavior=t.L=void 0;const n=r(7639);t.L={STRICT:"strict"};class a extends n.ReaderWriterBehavior{value;constructor(e,t){super(t),this.value=e}getValue(){return this.value}static STRICT=new a(t.L.STRICT,!1)}t.YamlReaderBehavior=a},9411(e,t,r){t.YamlWriterBehavior=t.D=void 0;const n=r(7639);t.D={STRICT:"strict"};class a extends n.ReaderWriterBehavior{value;constructor(e,t){super(t),this.value=e}getValue(){return this.value}static STRICT=new a(t.D.STRICT,!1)}t.YamlWriterBehavior=a},6568(e,t,r){t.CedarBuilders=void 0;const n=r(766),a=r(1762),i=r(4925),s=r(7889),o=r(1259),l=r(345),d=r(2875),c=r(8084),u=r(3675),m=r(9497),p=r(1667),h=r(2052),f=r(4675),y=r(9916),T=r(3138),C=r(2703),E=r(9521),g=r(5795),I=r(7674),A=r(9105),b=r(1513),R=r(7328),S=r(2376),v=r(3914),_=r(7162),N=r(3474),w=r(9062),L=r(6610);t.CedarBuilders=class{static templateBuilder(){return new n.TemplateBuilder}static templateElementBuilder(){return new a.TemplateElementBuilder}static templateInstanceBuilder(){return new i.TemplateInstanceBuilder}static textFieldBuilder(){return s.TextFieldBuilderImpl.create()}static textAreaBuilder(){return o.TextAreaBuilderImpl.create()}static temporalFieldBuilder(){return l.TemporalFieldBuilderImpl.create()}static phoneNumberFieldBuilder(){return c.PhoneNumberFieldBuilderImpl.create()}static numericFieldBuilder(){return u.NumericFieldBuilderImpl.create()}static emailFieldBuilder(){return p.EmailFieldBuilderImpl.create()}static attributeValueFieldBuilder(){return h.AttributeValueFieldBuilderImpl.create()}static youtubeFieldBuilder(){return I.StaticYoutubeFieldBuilderImpl.create()}static sectionBreakFieldBuilder(){return g.StaticSectionBreakFieldBuilderImpl.create()}static richTextFieldBuilder(){return E.StaticRichTextFieldBuilderImpl.create()}static pageBreakFieldBuilder(){return C.StaticPageBreakFieldBuilderImpl.create()}static imageFieldBuilder(){return T.StaticImageFieldBuilderImpl.create()}static linkFieldBuilder(){return m.LinkFieldBuilderImpl.create()}static extRorFieldBuilder(){return R.ExtRorFieldBuilderImpl.create()}static extOrcidFieldBuilder(){return S.ExtOrcidFieldBuilderImpl.create()}static extPfasFieldBuilder(){return v.ExtPfasFieldBuilderImpl.create()}static extPubmedFieldBuilder(){return _.ExtPubmedFieldBuilderImpl.create()}static extRridFieldBuilder(){return N.ExtRridFieldBuilderImpl.create()}static extNihGrantIdFieldBuilder(){return w.ExtNihGrantIdFieldBuilderImpl.create()}static extDoiFieldBuilder(){return L.ExtDoiFieldBuilderImpl.create()}static singleChoiceListFieldBuilder(){return A.SingleChoiceListFieldBuilderImpl.create()}static multipleChoiceListFieldBuilder(){return b.MultipleChoiceListFieldBuilderImpl.create()}static radioFieldBuilder(){return d.RadioFieldBuilderImpl.create()}static checkboxFieldBuilder(){return f.CheckboxFieldBuilderImpl.create()}static controlledTermFieldBuilder(){return y.ControlledTermFieldBuilderImpl.create()}}},1998(e,t,r){t.CedarReaders=void 0;const n=r(2103),a=r(8639);t.CedarReaders=class{static json(){return n.CedarJsonReaders}static yaml(){return a.CedarYamlReaders}}},8446(e,t,r){t.IriSyntax=void 0;const n=r(8748);t.IriSyntax=class{constructor(){}static isValid(e){if(""===e)return!1;try{return n.ReaderUtil.assertIdentifier(e,"value"),!0}catch{return!1}}}},8748(e,t,r){t.ReaderUtil=void 0;const n=r(9517),a=r(8802);t.ReaderUtil=class{static assertIdentifierCharacters(e,t){if(null!==e){if(Array.from(e).some(e=>e.charCodeAt(0)<=32||e.charCodeAt(0)>=127&&e.charCodeAt(0)<=159||/\p{Z}/u.test(e)))throw new Error(`Invalid URI at "${t}": unescaped space or control character.`);if(e.indexOf("#")!==e.lastIndexOf("#"))throw new Error(`Invalid URI at "${t}": more than one fragment delimiter.`);if(e.split(/[/?#]/,1)[0].includes(":")&&!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e))throw new Error(`Invalid URI at "${t}": malformed scheme.`)}}static assertFieldIri(e,t){if(null===e)return;if(""===e)throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);if("string"!=typeof e)throw new Error(`Invalid URI/IRI at "${t}": expected string.`);let r=!1,n=!1;for(const a of e){const e=a.codePointAt(0);if("#"===a?(n=!0,r=!1):"?"!==a||n||(r=!0),e<128){if(e<=32||127===e||'<>"{}|\\^`'.includes(a))throw new Error(`Invalid URI/IRI at "${t}": unescaped space, control or forbidden character.`)}else if(!(e>=160&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65519||e>=65536&&e<=917501&&(65535&e)<=65533||e>=921600&&e<=983037||r&&(e>=57344&&e<=63743||e>=983040&&e<=1048573||e>=1048576&&e<=1114109)))throw new Error(`Invalid URI/IRI at "${t}": forbidden Unicode character.`)}if(/%(?![0-9a-fA-F]{2})/.test(e))throw new Error(`Invalid URI/IRI at "${t}": malformed percent escape.`);const a=Array.from(e,e=>e.codePointAt(0)>=128?encodeURIComponent(e):e).join("");this.assertIdentifierCharacters(a,t)}static assertIri(e,t){if(null!==e&&""!==e){if("string"!=typeof e)throw new Error(`Invalid URI at "${t}": expected a string.`);this.assertFieldIri(e,t),this.assertIdentifierCharacters(e,t)}}static getIri(e,t){const r=this.getString(e,t);return this.assertIri(r,t),r}static assertIdentifier(e,t){if(null!==e){if("string"!=typeof e)throw new Error(`Invalid URI at "${t}": expected a string.`);if(""===e)throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);if(this.assertIri(e,t),!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e))throw new Error(`Invalid URI at "${t}": an identifier must be an absolute IRI.`)}}static getIdentifier(e,t){const r=this.getString(e,t);return this.assertIdentifier(r,t),r}static getArtifactIdentifier(e,t,r){return r?this.getIri(e,t):this.getIdentifier(e,t)}static getString(e,t){return Object.hasOwn(e,t)?e[t]:null}static getSingleType(e,t){if(!Object.hasOwn(e,t))return null;const r=e[t];if(!Array.isArray(r))return r;if(r.length>1)throw new Error(`A field value can have at most one ${t}.`);return 1===r.length?r[0]:null}static getStringOrEmpty(e,t){return Object.hasOwn(e,t)?e[t]:""}static getBoolean(e,t){return!!Object.hasOwn(e,t)&&e[t]}static getBooleanOrNullOrUndefined(e,t){return Object.hasOwn(e,t)?null===e[t]?null:e[t]:void 0}static getBooleanOrNull(e,t){return Object.hasOwn(e,t)?null===e[t]?null:e[t]:null}static getNumber(e,t){return Object.hasOwn(e,t)?e[t]:null}static getNumericDefault(e,t){if(!Object.hasOwn(e,t)||null===e[t]||void 0===e[t])return null;const r=e[t];if("number"==typeof r){if(Number.isFinite(r))return r;throw new Error(`Numeric default at "${t}" must be finite.`)}if("string"==typeof r){const e=r.trim();if(""===e)return null;if(!/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/.test(e))throw new Error(`Numeric default at "${t}" is not a valid number: "${r}".`);const n=Number(e);if(Number.isFinite(n))return n;throw new Error(`Numeric default at "${t}" must be finite.`)}throw new Error(`Numeric default at "${t}" must be a number or numeric string.`)}static getNumberOrZero(e,t){return Object.hasOwn(e,t)?e[t]:0}static getNumberOrNull(e,t){return Object.hasOwn(e,t)?e[t]:null}static getNode(e,t){return Object.hasOwn(e,t)?e[t]:n.JsonNode.getEmpty()}static getNodeOrNull(e,t){return Object.hasOwn(e,t)?e[t]:null}static getStringList(e,t){return Object.hasOwn(e,t)&&Array.isArray(e[t])?e[t]:[]}static getFilteredStringList(e,t){return Object.hasOwn(e,t)&&Array.isArray(e[t])?e[t].filter(e=>""!==e.trim()):[]}static getStringMap(e,t){if(Object.hasOwn(e,t)&&"object"==typeof e[t]&&!Array.isArray(e[t])&&null!==e[t]){const r=e[t],n=Object.entries(r),a=new Map;for(const[e,t]of n)a.set(e,t);return a}return new Map}static deepClone(e){return this.deepUnfreeze(e)}static deepUnfreeze(e){if(null===e||"object"!=typeof e&&"function"!=typeof e)return e;const t=Array.isArray(e)?e.slice():{...e};return Object.getOwnPropertyNames(t).forEach(e=>{t[e]=this.deepUnfreeze(t[e])}),t}static deepFreeze(e){return Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const r=e[t];null===r||"object"!=typeof r&&"function"!=typeof r||Object.isFrozen(r)||this.deepFreeze(r)}),e}static getNodeList(e,t){return Object.hasOwn(e,t)&&Array.isArray(e[t])?e[t]:n.JsonNode.getEmptyList()}static getURI(e,t){const r=this.getStringOrEmpty(e,t);return this.assertIri(r,t),new a.Iri(r)}static getIdentifierURI(e,t){const r=this.getStringOrEmpty(e,t);return this.assertIdentifier(null===r?"":r,t),new a.Iri(r)}static deleteNodeKey(e,t){Object.hasOwn(e,t)&&delete e[t]}}},797(e,t,r){t.applySchemaReaderDefaults=function(e,t,r,s){if(!r.equal(new n.JsonPath))return;const o="json"===s?"bibo:status":"status";null==t["json"===s?"pav:version":"version"]&&(e.pav_version=a.PavVersion.DEFAULT),null==t[o]&&(e.bibo_status=i.BiboStatus.DRAFT)};const n=r(3188),a=r(1027),i=r(3910)},2103(e,t,r){t.CedarJsonReaders=void 0;const n=r(2763),a=r(8748),i=r(2733),s=r(5291),o=r(7909),l=r(5846),d=r(9232),c=r(4381);class u{behavior;constructor(e){this.behavior=e}static getStrict(){return new u(l.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new u(l.JsonReaderBehavior.FEBRUARY_2024)}static detectArtifactType(e){let t;if(t="string"==typeof e?JSON.parse(e):e,t&&t["@type"]){const e=a.ReaderUtil.getString(t,i.JsonSchema.atType);return n.CedarArtifactType.forValue(e)}return n.CedarArtifactType.NULL}getReaderForArtifactType(e){switch(e){case n.CedarArtifactType.TEMPLATE:return s.JsonTemplateReader.getStrict();case n.CedarArtifactType.TEMPLATE_ELEMENT:return o.JsonTemplateElementReader.getStrict();case n.CedarArtifactType.TEMPLATE_FIELD:case n.CedarArtifactType.STATIC_TEMPLATE_FIELD:return c.JsonTemplateFieldReader.getStrict();case n.CedarArtifactType.TEMPLATE_INSTANCE:return d.JsonTemplateInstanceReader.getStrict();default:throw new Error(`No JSON reader available for CedarArtifactType: ${e}`)}}getTemplateReader(){return s.JsonTemplateReader.getForBehavior(this.behavior)}getTemplateElementReader(){return o.JsonTemplateElementReader.getForBehavior(this.behavior)}getTemplateFieldReader(){return c.JsonTemplateFieldReader.getForBehavior(this.behavior)}getTemplateInstanceReader(){return d.JsonTemplateInstanceReader.getForBehavior(this.behavior)}}t.CedarJsonReaders=u},7993(e,t,r){t.JsonAbstractArtifactReader=void 0;const n=r(8534),a=r(8748),i=r(2733),s=r(2234),o=r(9857),l=r(2763),d=r(5226),c=r(936),u=r(2787),m=r(3549);class p{static refuseEmptyIdentifier(e,t=i.JsonSchema.atId){const r=a.ReaderUtil.getString(e,t);if(null!==r&&"string"!=typeof r)throw new Error(`Invalid URI at "${t}": expected a string.`);if(null!==r&&""===r.trim())throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);a.ReaderUtil.assertIri(r,t)}behavior;knownArtifactType=l.CedarArtifactType.NULL;get lenient(){return this.behavior.useWarningForKnownIssues()}constructor(e){this.behavior=e}readNonReportableAttributes(e,t){p.refuseEmptyIdentifier(t),e.at_id=n.CedarArtifactId.forValue(a.ReaderUtil.getString(t,i.JsonSchema.atId)),e.schema_name=a.ReaderUtil.getString(t,i.JsonSchema.schemaName),e.schema_description=a.ReaderUtil.getStringOrEmpty(t,i.JsonSchema.schemaDescription),e.pav_createdBy=s.CedarUser.forValue(a.ReaderUtil.getString(t,i.JsonSchema.pavCreatedBy)),e.pav_createdOn=o.IsoDate.forValue(a.ReaderUtil.getString(t,i.JsonSchema.pavCreatedOn)),e.oslc_modifiedBy=s.CedarUser.forValue(a.ReaderUtil.getString(t,i.JsonSchema.oslcModifiedBy)),e.pav_lastUpdatedOn=o.IsoDate.forValue(a.ReaderUtil.getString(t,i.JsonSchema.pavLastUpdatedOn))}readAnnotations(e,t){const r=new d.Annotations,n=a.ReaderUtil.getNodeOrNull(t,c.CedarModel.annotations);null!==n&&Object.keys(n).forEach(e=>{const t=n[e];if(null===t||"object"!=typeof t||Array.isArray(t))throw new Error(`Value of annotation must be an object at /_annotations/${e}`);const s=a.ReaderUtil.getNode(n,e),o=a.ReaderUtil.getString(s,i.JsonSchema.atId);if(null!==o)r.add(new u.AnnotationAtId(e,o));else{const t=a.ReaderUtil.getString(s,i.JsonSchema.atValue);if(null===t)throw new Error(`Value of annotation must contain an @id or @value at /_annotations/${e}`);r.add(new m.AnnotationAtValue(e,t))}}),r.getSize()>0&&(e.annotations=r)}}t.JsonAbstractArtifactReader=p},3326(e,t,r){t.JsonAbstractInstanceArtifactReader=void 0;const n=r(8534),a=r(8748),i=r(2733),s=r(7993);class o extends s.JsonAbstractArtifactReader{constructor(e){super(e)}readNonReportableAttributes(e,t){a.ReaderUtil.getArtifactIdentifier(t,i.JsonSchema.atId,this.lenient),super.readNonReportableAttributes(e,t),e.schema_isBasedOn=n.CedarArtifactId.forValue(a.ReaderUtil.getArtifactIdentifier(t,i.JsonSchema.schemaIsBasedOn,this.lenient)),e.pav_derivedFrom=n.CedarArtifactId.forValue(a.ReaderUtil.getArtifactIdentifier(t,i.JsonSchema.pavDerivedFrom,this.lenient))}}t.JsonAbstractInstanceArtifactReader=o},978(e,t,r){t.JsonAbstractSchemaArtifactReader=void 0;const n=r(4443),a=r(8333),i=r(8534),s=r(8748),o=r(2733),l=r(5747),d=r(8557),c=r(1027),u=r(3910),m=r(7993);class p extends m.JsonAbstractArtifactReader{constructor(e){super(e)}readNonReportableAttributes(e,t){e.extensions=n.SchemaExtensions.fromJson(t),super.readNonReportableAttributes(e,t),e.title=null===e.schema_name?null:(0,a.internalNameFor)(e.schema_name,this.artifactTypeWord()),e.description=s.ReaderUtil.getString(t,l.TemplateProperty.description),e.schema_schemaVersion=d.SchemaVersion.forValue(s.ReaderUtil.getString(t,o.JsonSchema.schemaVersion)),e.pav_version=c.PavVersion.forValue(s.ReaderUtil.getString(t,o.JsonSchema.pavVersion)),e.bibo_status=u.BiboStatus.forJsonValue(s.ReaderUtil.getString(t,o.JsonSchema.biboStatus)),e.pav_derivedFrom=i.CedarArtifactId.forValue(s.ReaderUtil.getArtifactIdentifier(t,o.JsonSchema.pavDerivedFrom,this.lenient)),e.pav_previousVersion=i.CedarArtifactId.forValue(this.lenient?s.ReaderUtil.getString(t,o.JsonSchema.pavPreviousVersion):s.ReaderUtil.getIdentifier(t,o.JsonSchema.pavPreviousVersion)),e.schema_identifier=s.ReaderUtil.getString(t,o.JsonSchema.schemaIdentifier)}}t.JsonAbstractSchemaArtifactReader=p},8518(e,t){t.JsonArtifactReaderResult=void 0,t.JsonArtifactReaderResult=class{_artifact;_parsingResult;_artifactSourceObject;constructor(e,t,r){this._artifact=e,this._parsingResult=t,this._artifactSourceObject=r}get artifact(){return this._artifact}get parsingResult(){return this._parsingResult}get artifactSourceObject(){return this._artifactSourceObject}}},5510(e,t,r){t.JsonContainerArtifactReader=void 0;const n=r(5588),a=r(978),i=r(1492),s=r(455),o=r(2763),l=r(8748),d=r(2733),c=r(936),u=r(9034),m=r(2888),p=r(9760),h=r(3056),f=r(5793),y=r(2475),T=r(6968),C=r(3812),E=r(3608),g=r(3239),I=r(9519),A=r(7752),b=r(8220),R=new Set([o.CedarArtifactType.TEMPLATE.getValue(),o.CedarArtifactType.TEMPLATE_ELEMENT.getValue(),o.CedarArtifactType.TEMPLATE_FIELD.getValue(),o.CedarArtifactType.STATIC_TEMPLATE_FIELD.getValue()]);class S extends a.JsonAbstractSchemaArtifactReader{artifactTypeWord(){return this.knownArtifactType===o.CedarArtifactType.TEMPLATE?"template":"element"}fieldReader;constructor(e){super(e),this.fieldReader=b.JsonTemplateFieldReaderInternal.getForBehavior(e)}readAndStoreCandidateChildInfo(e,t,r,n,a){const i=o.CedarArtifactType.forValue(l.ReaderUtil.getString(e,d.JsonSchema.atType));if(i!==o.CedarArtifactType.NULL){const r=new s.ChildDeploymentInfo(t);r.atType=i;const a=l.ReaderUtil.getNode(e,c.CedarModel.ui);return r.uiInputType=u.UiInputType.forValue(l.ReaderUtil.getString(a,c.CedarModel.inputType)),r.hidden=l.ReaderUtil.getBoolean(a,c.CedarModel.Ui.hidden),n.add(r),r}return this.reportBlueprintDifference(r,new m.ComparisonError("jtr09",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,a.add(t,d.JsonSchema.atType))),null}readReportableAttributes(e,t,r,n){h.JsonObjectComparator.comparePrimitive(r,this.knownArtifactType.getValue(),l.ReaderUtil.getString(t,d.JsonSchema.atType),n.add(d.JsonSchema.atType));const a=l.ReaderUtil.getNode(t,d.JsonSchema.atContext),i=T.JsonContainerArtifactContent.CONTEXT_VERBATIM;h.JsonObjectComparator.compareBothWays(r,i,a,n.add(d.JsonSchema.atContext),this.behavior,[d.JsonSchema.atLanguage,...Object.keys(e.extensions.prefixes)]),h.JsonObjectComparator.comparePrimitive(r,f.JavascriptType.OBJECT.getValue(),l.ReaderUtil.getString(t,c.CedarModel.type),n.add(c.CedarModel.type)),h.JsonObjectComparator.comparePrimitive(r,y.ArtifactSchema.CURRENT.getValue(),l.ReaderUtil.getString(t,c.CedarModel.schema),n.add(c.CedarModel.schema)),e.language=A.Language.forValue(l.ReaderUtil.getString(a,d.JsonSchema.atLanguage))}parseChildren(e,t,r,n,a){for(const i of e.children){let e=l.ReaderUtil.getNode(t,i.name),c=a.add(d.JsonSchema.properties,i.name);if(i.isMultiInAnyWay()&&(e=l.ReaderUtil.getNode(e,d.JsonSchema.items),c=c.add(d.JsonSchema.items)),i.atType===o.CedarArtifactType.STATIC_TEMPLATE_FIELD){const t=this.fieldReader.readFromObjectInternal(e,i,c),a=t.field.createDeploymentBuilder(i.name).withLabel(i.label).withDescription(i.description);a.withHidden(i.hidden);const s=a.build();r.addChild(t.field,s),n.merge(t.parsingResult)}else if(i.atType===o.CedarArtifactType.TEMPLATE_FIELD){const t=this.fieldReader.readFromObjectInternal(e,i,c),a=t.field.createDeploymentBuilder(i.name),o=i;a.withIri(o.iri).withLabel(i.label).withDescription(i.description),i instanceof I.AbstractFieldChildDeploymentInfo&&a.withHidden(i.hidden).withRequiredValue(i.requiredValue).withRecommendedValue(i.recommendedValue).withContinuePreviousLine(i.continuePreviousLine).withValueRecommendationEnabled(i.valueRecommendationEnabled),a instanceof E.ChildDeploymentInfoBuilder&&i instanceof s.ChildDeploymentInfo?a.withMultiInstance(i.multiInstance).withMinItems(i.minItems).withMaxItems(i.maxItems):a instanceof g.ChildDeploymentInfoAlwaysMultipleBuilder&&a.withMinItems(o.minItems).withMaxItems(o.maxItems);const l=a.build();r.addChild(t.field,l),n.merge(t.parsingResult)}else if(i.atType===o.CedarArtifactType.TEMPLATE_ELEMENT){const t=this.getElementReader().readFromObject(e,c),a=t.element.createDeploymentBuilder(i.name).withLabel(i.label).withDescription(i.description);i instanceof C.AbstractDynamicChildDeploymentInfo&&a.withIri(i.iri),i instanceof s.ChildDeploymentInfo&&a.withMultiInstance(i.multiInstance).withMinItems(i.minItems).withMaxItems(i.maxItems),r.addChild(t.element,a.build()),n.merge(t.parsingResult)}}}validatePropertiesVsOrder(e,t,r,n){for(const a of e.children)t.includes(a.name)||this.reportBlueprintDifference(r,new m.ComparisonError("jtr08",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n.add(c.CedarModel.ui,c.CedarModel.order),a.name,null))}finalizeChildInfo(e,t,r,n){const a=new i.ContainerArtifactChildrenInfo;for(const i of e){const e=t.get(i);null!=e?a.add(e):this.reportBlueprintDifference(r,new m.ComparisonError("jtr07",p.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,n.add(c.CedarModel.ui,c.CedarModel.order),null,i))}return a}getCandidateChildrenInfo(e,t,r,a){const s=new i.ContainerArtifactChildrenInfo;return Object.keys(e).forEach(i=>{if(n.ReservedNames.isReservedName(i)){const t=l.ReaderUtil.getNode(e,i),r="array"===l.ReaderUtil.getString(t,d.JsonSchema.type)?l.ReaderUtil.getNode(t,d.JsonSchema.items):t,n=r?.[d.JsonSchema.atType];if((Array.isArray(n)?n:[n]).some(e=>R.has(e)))throw new Error(`Child schema uses a reserved instance property name at ${a.add(d.JsonSchema.properties,i).toString()}`)}if(!t.has(i)){const t=l.ReaderUtil.getNode(e,i);if("object"==typeof t&&null!==t){let e=t;const n=l.ReaderUtil.getString(t,d.JsonSchema.type);if("object"==n)this.readAndStoreCandidateChildInfo(e,i,r,s,a.add(d.JsonSchema.properties,i));else if("array"==n){e=l.ReaderUtil.getNode(t,d.JsonSchema.items);const n=this.readAndStoreCandidateChildInfo(e,i,r,s,a.add(d.JsonSchema.properties,i,d.JsonSchema.items));null!==n&&(n.multiInstance=!0,n.minItems=l.ReaderUtil.getNumber(t,c.CedarModel.minItems),n.maxItems=l.ReaderUtil.getNumber(t,c.CedarModel.maxItems))}}}}),s}generateAndValidateRequiredMap(e,t,r,n){const a=e.reduce((e,t)=>(e.set(t,!0),e),new Map);for(const e of t)a.has(e)||this.reportBlueprintDifference(r,new m.ComparisonError("jtr01",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n.add(d.JsonSchema.required),e));return a}checkRequiredBothWays(e,t,r,n,a,i){const s=e.getChildrenNamesForRequired();for(const e of s)t.has(e)||this.reportBlueprintDifference(a,new m.ComparisonError("jtr02",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,i.add(d.JsonSchema.required),e));for(const t of r)n.has(t)||e.has(t)||this.reportBlueprintDifference(a,new m.ComparisonError("jtr03",p.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,i.add(d.JsonSchema.required),t))}extractUIPreferredLabelsAndDescriptions(e,t,r,n){const a=l.ReaderUtil.getStringMap(e,c.CedarModel.propertyLabels);if(null!==a)for(const e of t.children)a.has(e.name)&&(e.label=a.get(e.name)??null);const i=l.ReaderUtil.getStringMap(e,c.CedarModel.propertyDescriptions);if(null!==i)for(const e of t.children)i.has(e.name)&&(e.description=i.get(e.name)??null)}reportBlueprintDifference(e,t){this.behavior.useWarningForKnownIssues()&&h.JsonObjectComparator.isKnownProductionVariation(t.errorPath)?e.addBlueprintComparisonWarning(t):e.addBlueprintComparisonError(t)}extractIRIMappings(e,t,r,n){const a=l.ReaderUtil.getNode(e,d.JsonSchema.atContext),i=l.ReaderUtil.getNode(a,d.JsonSchema.properties);for(const e of t.children)if(this.includeInIRIMapping(e)){if(null===i||!Object.hasOwn(i,e.name))continue;const t=l.ReaderUtil.getNode(i,e.name),a=l.ReaderUtil.getStringList(t,d.JsonSchema.enum);null===a||1!=a.length?this.reportBlueprintDifference(r,new m.ComparisonError("jtr06",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n.add(d.JsonSchema.properties,d.JsonSchema.atContext,d.JsonSchema.properties,e.name,d.JsonSchema.enum,0))):e instanceof C.AbstractDynamicChildDeploymentInfo&&(l.ReaderUtil.assertIdentifier(a[0],d.JsonSchema.enum),e.iri=a[0])}}readInstanceTypeSpecification(e,t,r){const n=l.ReaderUtil.getNode(t,d.JsonSchema.properties);if(null!==n){const t=l.ReaderUtil.getNode(n,d.JsonSchema.atType);if(null!==t){const r=l.ReaderUtil.getNodeList(t,d.JsonSchema.oneOf);null!==r&&r.forEach(t=>{const r=l.ReaderUtil.getStringList(t,d.JsonSchema.enum);if(Object.hasOwn(t,d.JsonSchema.enum)){if(!Array.isArray(t[d.JsonSchema.enum])||0===r.length)throw new Error("Instance types must be a nonempty array of IRIs");e.instanceTypeSpecifications=r}})}}}}t.JsonContainerArtifactReader=S},7909(e,t,r){t.JsonTemplateElementReader=void 0;const n=r(797),a=r(936),i=r(2733),s=r(2763),o=r(5747),l=r(8748),d=r(3056),c=r(4036),u=r(3188),m=r(5846),p=r(9932),h=r(4948),f=r(7661),y=r(5510),T=r(1501);class C extends y.JsonContainerArtifactReader{knownArtifactType=s.CedarArtifactType.TEMPLATE_ELEMENT;constructor(e){super(e)}static getStrict(){return new C(m.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new C(m.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new C(e)}getElementReader(){return this}includeInIRIMapping(e){return e.atType!==s.CedarArtifactType.STATIC_TEMPLATE_FIELD}readFromString(e){let t;try{t=JSON.parse(e)}catch{t={}}return this.readFromObject(t,new u.JsonPath)}readFromObject(e,t=new u.JsonPath){const r=new c.JsonArtifactParsingResult,a=f.TemplateElement.buildEmptyWithNullValues();return null===t.getLastComponent()&&l.ReaderUtil.getArtifactIdentifier(e,i.JsonSchema.atId,this.lenient),this.readNonReportableAttributes(a,e),(0,n.applySchemaReaderDefaults)(a,e,t,"json"),this.readReportableAttributes(a,e,r,t),this.readAnnotations(a,e),this.readInstanceTypeSpecification(a,e,r),this.readAndValidateChildrenInfo(a,e,r,t),new h.JsonTemplateElementReaderResult(a,r,e)}readNonReportableAttributes(e,t){e.skos_prefLabel=l.ReaderUtil.getString(t,a.CedarModel.skosPrefLabel),e.skos_altLabel=l.ReaderUtil.getFilteredStringList(t,a.CedarModel.skosAltLabel);const r=l.ReaderUtil.getNode(t,a.CedarModel.ui);null!==r&&(e.header=l.ReaderUtil.getString(r,a.CedarModel.header),e.footer=l.ReaderUtil.getString(r,a.CedarModel.footer)),super.readNonReportableAttributes(e,t)}readAndValidateChildrenInfo(e,t,r,n){const s=l.ReaderUtil.getStringList(t,i.JsonSchema.required),o=l.ReaderUtil.getNode(t,i.JsonSchema.properties),d=this.generateAndValidateRequiredMap(s,T.JsonTemplateElementContent.REQUIRED_PARTIAL,r,n),c=this.getCandidateChildrenInfo(o,T.JsonTemplateElementContent.PROPERTIES_PARTIAL_KEY_MAP,r,n);this.checkRequiredBothWays(c,d,s,T.JsonTemplateElementContent.REQUIRED_PARTIAL_KEY_MAP,r,n);const u=l.ReaderUtil.getNode(t,a.CedarModel.ui);this.extractUIPreferredLabelsAndDescriptions(u,c,r,n),this.extractIRIMappings(o,c,r,n);const m=l.ReaderUtil.getStringList(u,a.CedarModel.order),p=this.finalizeChildInfo(m,c,r,n);this.validatePropertiesVsOrder(c,m,r,n),this.validateProperties(p,o,e,r,n),this.parseChildren(p,o,e,r,n)}validateProperties(e,t,r,n,a){const s=l.ReaderUtil.deepClone(T.JsonTemplateElementContent.PROPERTIES_PARTIAL);e.hasAttributeValue()&&(s[i.JsonSchema.atContext][o.TemplateProperty.additionalProperties]=p.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE);const c=s[i.JsonSchema.atContext],u=l.ReaderUtil.getNodeList(c,i.JsonSchema.required);null!=u&&0==u.length&&l.ReaderUtil.deleteNodeKey(c,i.JsonSchema.required),T.JsonTemplateElementContent.acceptEitherIdTyping(s,t),d.JsonObjectComparator.compareToLeft(n,s,t,a.add(i.JsonSchema.properties),this.behavior)}}t.JsonTemplateElementReader=C},4948(e,t,r){t.JsonTemplateElementReaderResult=void 0;const n=r(8518);class a extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get element(){return this._artifact}get elementSourceObject(){return this._artifactSourceObject}}t.JsonTemplateElementReaderResult=a},4381(e,t,r){t.JsonTemplateFieldReader=void 0;const n=r(797),a=r(9517),i=r(4036),s=r(3188),o=r(8748),l=r(2733),d=r(5747),c=r(3056),u=r(2763),m=r(5793),p=r(936),h=r(2475),f=r(9932),y=r(9241),T=r(5933),C=r(6511),E=r(9148),g=r(6291),I=r(8596),A=r(7095),b=r(9251),R=r(9315),S=r(2691),v=r(1769),_=r(9683),N=r(1468),w=r(9053),L=r(9034),F=r(19),V=r(2419),O=r(9366),D=r(4869),M=r(8728),B=r(5846),U=r(6396),Y=r(855),x=r(978),J=r(455),P=r(7752),k=r(8244),W=r(4956),K=r(6854),j=r(3028),$=r(7004),X=r(1886),G=r(8583),q=r(6591),H=r(6731);class z extends x.JsonAbstractSchemaArtifactReader{artifactTypeWord(){return"field"}constructor(e){super(e)}static getStrict(){return new z(B.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new z(B.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new z(e)}static dynamicTypeReaderMap=new Map([[D.CedarFieldType.TEXT,new y.JsonFieldReaderTextField],[D.CedarFieldType.TEXTAREA,new _.JsonFieldReaderTextArea],[D.CedarFieldType.CONTROLLED_TERM,new M.JsonFieldReaderControlledTerm],[D.CedarFieldType.LINK,new A.JsonFieldReaderLink],[D.CedarFieldType.EXT_ROR,new k.JsonFieldReaderExtRor],[D.CedarFieldType.EXT_ORCID,new W.JsonFieldReaderExtOrcid],[D.CedarFieldType.EXT_PFAS,new K.JsonFieldReaderExtPfas],[D.CedarFieldType.EXT_PUBMED,new j.JsonFieldReaderExtPubmed],[D.CedarFieldType.EXT_RRID,new $.JsonFieldReaderExtRrid],[D.CedarFieldType.EXT_NIH_GRANT_ID,new X.JsonFieldReaderExtNihGrantId],[D.CedarFieldType.EXT_DOI,new G.JsonFieldReaderExtDoi],[D.CedarFieldType.TEMPORAL,new R.JsonFieldReaderTemporal],[D.CedarFieldType.EMAIL,new S.JsonFieldReaderEmail],[D.CedarFieldType.NUMERIC,new v.JsonFieldReaderNumeric],[D.CedarFieldType.PHONE_NUMBER,new N.JsonFieldReaderPhoneNumber],[D.CedarFieldType.RADIO,new w.JsonFieldReaderRadio],[D.CedarFieldType.CHECKBOX,new F.JsonFieldReaderCheckbox],[D.CedarFieldType.SINGLE_SELECT_LIST,new V.JsonFieldReaderList],[D.CedarFieldType.MULTIPLE_SELECT_LIST,new V.JsonFieldReaderList],[D.CedarFieldType.ATTRIBUTE_VALUE,new O.JsonFieldReaderAttributeValue],[D.CedarFieldType.STATIC_PAGE_BREAK,new T.JsonFieldReaderPageBreak],[D.CedarFieldType.STATIC_SECTION_BREAK,new C.JsonFieldReaderSectionBreak],[D.CedarFieldType.STATIC_IMAGE,new E.JsonFieldReaderImage],[D.CedarFieldType.STATIC_RICH_TEXT,new g.JsonFieldReaderRichText],[D.CedarFieldType.STATIC_YOUTUBE,new I.JsonFieldReaderYoutube]]);readFromString(e){let t;try{t=JSON.parse(e)}catch{t={}}return this.readFromObject(t)}readFromObject(e){const t=o.ReaderUtil.getNode(e,l.JsonSchema.items);"array"===e.type&&"attribute-value"===o.ReaderUtil.getNode(t,p.CedarModel.ui)[p.CedarModel.inputType]&&(e=t);const r=J.ChildDeploymentInfo.standalone(),n=new s.JsonPath;return this.readFromObjectInternal(e,r,n)}readFromObjectInternal(e,t,r){const a=new i.JsonArtifactParsingResult,s=z.readFieldSpecificAttributes(e,t,a,r);if(t instanceof J.ChildDeploymentInfo&&t.isStandalone()&&(s instanceof q.TextFieldImpl||s instanceof H.ControlledTermFieldImpl)&&(s.valueRecommendationEnabled=t.valueRecommendationEnabled),t instanceof J.ChildDeploymentInfo&&t.isStandalone()){const r=o.ReaderUtil.getNode(e,p.CedarModel.ui);s.hidden=o.ReaderUtil.getBoolean(r,p.CedarModel.Ui.hidden),s.continuePreviousLine=t.continuePreviousLine,s.cedarFieldType.recordsRequirement&&(s.requiredValue=t.requiredValue,s.recommendedValue=t.recommendedValue)}return t instanceof J.ChildDeploymentInfo&&t.isStandalone()&&o.ReaderUtil.getArtifactIdentifier(e,l.JsonSchema.atId,this.lenient),this.readNonReportableAttributes(s,e),(0,n.applySchemaReaderDefaults)(s,e,r,"json"),this.readReportableAttributes(s,e,a,r),this.readAnnotations(s,e),new U.JsonTemplateFieldReaderResult(s,a,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t),e.skos_prefLabel=o.ReaderUtil.getString(t,p.CedarModel.skosPrefLabel),e.skos_altLabel=o.ReaderUtil.getFilteredStringList(t,p.CedarModel.skosAltLabel)}readReportableAttributes(e,t,r,n){const i=o.ReaderUtil.getNode(t,l.JsonSchema.atContext);let s=a.JsonNode.getEmpty();e.cedarArtifactType==u.CedarArtifactType.TEMPLATE_FIELD?s=f.JsonTemplateFieldContentDynamic.CONTEXT_VERBATIM:e.cedarArtifactType==u.CedarArtifactType.STATIC_TEMPLATE_FIELD&&(s=b.JsonTemplateFieldContentStatic.CONTEXT_VERBATIM),c.JsonObjectComparator.compareBothWays(r,s,i,n.add(l.JsonSchema.atContext),this.behavior,[l.JsonSchema.atLanguage,...Object.keys(e.extensions.prefixes)]),e.cedarFieldType===D.CedarFieldType.ATTRIBUTE_VALUE?c.JsonObjectComparator.comparePrimitive(r,m.JavascriptType.STRING.getValue(),o.ReaderUtil.getString(t,p.CedarModel.type),n.add(p.CedarModel.type)):c.JsonObjectComparator.comparePrimitive(r,m.JavascriptType.OBJECT.getValue(),o.ReaderUtil.getString(t,p.CedarModel.type),n.add(p.CedarModel.type)),c.JsonObjectComparator.comparePrimitive(r,!1,o.ReaderUtil.getBoolean(t,d.TemplateProperty.additionalProperties),n.add(d.TemplateProperty.additionalProperties)),c.JsonObjectComparator.comparePrimitive(r,h.ArtifactSchema.CURRENT.getValue(),o.ReaderUtil.getString(t,p.CedarModel.schema),n.add(p.CedarModel.schema)),e.language=P.Language.forValue(o.ReaderUtil.getString(i,l.JsonSchema.atLanguage))}static readFieldSpecificAttributes(e,t,r,n){const a=u.CedarArtifactType.forValue(o.ReaderUtil.getString(e,l.JsonSchema.atType)),i=o.ReaderUtil.getNode(e,p.CedarModel.ui),s=o.ReaderUtil.getString(i,p.CedarModel.inputType),d=L.UiInputType.forValue(s),c=this.getCedarFieldType(e,d);if(c===D.CedarFieldType.NULL)throw new Error(`Unknown uiInputType type: "${s}"`);if((a==u.CedarArtifactType.TEMPLATE_FIELD||a==u.CedarArtifactType.STATIC_TEMPLATE_FIELD)&&null!=d){const a=this.dynamicTypeReaderMap.get(c);if(!a)throw new Error(`\n No reader defined for dynamic input type "${c.getValue()}"`);return a.read(e,t,r,n)}return Y.UnknownTemplateField.build()}static fieldHasValueConstraint(e){const t=o.ReaderUtil.getNode(e,p.CedarModel.valueConstraints);return o.ReaderUtil.getNodeList(t,p.CedarModel.ontologies).length>0||(o.ReaderUtil.getNodeList(t,p.CedarModel.branches).length>0||(o.ReaderUtil.getNodeList(t,p.CedarModel.classes).length>0||o.ReaderUtil.getNodeList(t,p.CedarModel.valueSets).length>0))}static getCedarFieldType(e,t){let r=D.CedarFieldType.forUiInputType(t);if(r===D.CedarFieldType.TEXT||r===D.CedarFieldType.CONTROLLED_TERM){const t=o.ReaderUtil.getNode(e,l.JsonSchema.properties);r=Object.prototype.hasOwnProperty.call(t,l.JsonSchema.atId)&&!Object.prototype.hasOwnProperty.call(t,l.JsonSchema.atValue)||this.fieldHasValueConstraint(e)?D.CedarFieldType.CONTROLLED_TERM:D.CedarFieldType.TEXT}return r}}t.JsonTemplateFieldReader=z},8220(e,t,r){t.JsonTemplateFieldReaderInternal=void 0;const n=r(3188),a=r(4381),i=r(455);class s extends a.JsonTemplateFieldReader{constructor(e){super(e)}static getForBehavior(e){return new s(e)}readFromObjectInternal(e,t,r){return t=t||i.ChildDeploymentInfo.standalone(),r=r||new n.JsonPath,super.readFromObjectInternal(e,t,r)}}t.JsonTemplateFieldReaderInternal=s},6396(e,t,r){t.JsonTemplateFieldReaderResult=void 0;const n=r(8518);class a extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get field(){return this._artifact}get fieldSourceObject(){return this._artifactSourceObject}}t.JsonTemplateFieldReaderResult=a},4385(e,t,r){t.JsonTemplateFieldTypeSpecificReader=void 0;const n=r(855),a=r(8748),i=r(936);t.JsonTemplateFieldTypeSpecificReader=class{read(e,t,r,a){return n.UnknownTemplateField.build()}readRequiredAndHidden(e,t){const r=a.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);null!=r&&(t.requiredValue=a.ReaderUtil.getBoolean(r,i.CedarModel.requiredValue),t.recommendedValue=a.ReaderUtil.getBoolean(r,i.CedarModel.ValueConstraints.recommendedValue));const n=a.ReaderUtil.getNode(e,i.CedarModel.ui);n&&(t.hidden=a.ReaderUtil.getBoolean(n,i.CedarModel.Ui.hidden),t.continuePreviousLine=a.ReaderUtil.getBoolean(n,i.CedarModel.Ui.continuePreviousLine),t.valueRecommendationEnabled=a.ReaderUtil.getBoolean(n,i.CedarModel.Ui.valueRecommendationEnabled))}}},9232(e,t,r){t.JsonTemplateInstanceReader=void 0;const n=r(1625),a=r(9167),i=r(2763),s=r(4036),o=r(2888),l=r(9760),d=r(3188),c=r(5846),u=r(3326),m=r(2272),p=r(6537),h=r(8748),f=r(2733),y=r(7723),T=r(5222),C=r(7571),E=r(7548),g=r(8193),I=r(4877),A=r(4465),b=r(3644),R=r(9327),S=r(936),v=r(350),_=r(4033);class N extends u.JsonAbstractInstanceArtifactReader{knownArtifactType=i.CedarArtifactType.TEMPLATE_INSTANCE;knownKeys={[f.JsonSchema.atId]:!0,[f.JsonSchema.atType]:!0,[f.JsonSchema.pavDerivedFrom]:!0,[f.JsonSchema.schemaIdentifier]:!0,[f.JsonSchema.oslcModifiedBy]:!0,[f.JsonSchema.pavLastUpdatedOn]:!0,[f.JsonSchema.pavCreatedBy]:!0,[f.JsonSchema.pavCreatedOn]:!0,[f.JsonSchema.schemaDescription]:!0,[f.JsonSchema.schemaName]:!0,[f.JsonSchema.schemaIsBasedOn]:!0,[f.JsonSchema.atContext]:!0,[S.CedarModel.annotations]:!0};constructor(e){super(e)}static getStrict(){return new N(c.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new N(c.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new N(e)}readFromString(e){let t;try{t=JSON.parse(e)}catch{t={}}return this.readFromObject(t,new d.JsonPath)}readFromObject(e,t){const r=new s.JsonArtifactParsingResult,n=m.TemplateInstance.buildEmptyWithNullValues();this.readNonReportableAttributes(n,e),n.descriptionWasAbsent=null===h.ReaderUtil.getString(e,f.JsonSchema.schemaDescription),n.schema_description=n.schema_description??"";const a=t??new d.JsonPath;return this.readInstanceData(e,n,a,r),N.reportEnvelope(e,a,r),new p.JsonTemplateInstanceReaderResult(n,r,e)}static ENVELOPE_KEYS=[f.JsonSchema.atContext,f.JsonSchema.atId,f.JsonSchema.schemaIsBasedOn,f.JsonSchema.pavCreatedOn,f.JsonSchema.pavCreatedBy,f.JsonSchema.oslcModifiedBy,f.JsonSchema.pavLastUpdatedOn];static reportEnvelope(e,t,r){for(const n of N.ENVELOPE_KEYS){if(!Object.hasOwn(e,n)){r.addBlueprintComparisonWarning(new o.ComparisonError("JsonTemplateInstanceReader",l.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,t.add(n),n));continue}const a=h.ReaderUtil.getNode(e,n);(null==a||n===f.JsonSchema.atContext&&0===Object.keys(a).length)&&r.addBlueprintComparisonWarning(new o.ComparisonError("JsonTemplateInstanceReader",l.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,t.add(n),n,null))}}readInstanceData(e,t,r,n){t.dataContainer=this.readInstanceContainer(e,r,n),this.readAnnotations(t,e)}readInstanceContainer(e,t,r){return this.parseContainer(e,t,r,"template")}isKnownKey(e){return Object.hasOwn(this.knownKeys,e)}parseContainer(e,t,r,n="element"){const a=new y.InstanceDataContainer;Object.keys(e).forEach(n=>{if(!this.isKnownKey(n)){const i=h.ReaderUtil.getNode(e,n);if(Array.isArray(i)){const e=[];a.setValue(n,e);const s=i.some(e=>null!==e&&"object"==typeof e&&Object.hasOwn(e,f.JsonSchema.atContext));i.forEach((a,i)=>{if(s){if(null===a||"object"!=typeof a||Array.isArray(a)||Object.hasOwn(a,f.JsonSchema.atValue))throw new Error(`Cannot mix fields and element instances in array "${n}" at index ${i}`);e[i]=this.parseContainer(a,t.add(n,i),r)}else e[i]=this.parseNode(a,t.add(n,i),r)})}else a.setValue(n,this.parseNode(i,t.add(n),r))}});for(const e of _.AttributeValueNamePolicy.findConflicts(a,n,!0).filter(e=>0===e.path.length))r.addBlueprintComparisonError(new o.ComparisonError("JsonTemplateInstanceReader",l.ComparisonErrorType.VALUE_MISMATCH,t.add(..._.AttributeValueNamePolicy.locationOf(e)),"a unique, non-reserved attribute-value name",e.name));this.packAttributeValues(a);const i=Object.hasOwn(e,f.JsonSchema.atContext)?h.ReaderUtil.getNode(e,f.JsonSchema.atContext):null;if(null!=i){const e=i;Object.keys(a.values).forEach(t=>{const r=h.ReaderUtil.getString(e,t);null!==r&&a.setIri(t,r)}),Object.keys(a.values).forEach(t=>{const r=a.values[t];r instanceof R.InstanceDataAttributeValueField&&Object.keys(r.values).forEach(t=>{const r=h.ReaderUtil.getString(e,t);null!==r&&a.setIri(t,r)})}),Object.keys(e).forEach(t=>{if(Object.hasOwn(v.JsonTemplateInstanceContent.CONTEXT_VERBATIM,t))return;const r=h.ReaderUtil.getString(e,t);null!==r&&a.setIri(t,r)})}if(Object.hasOwn(e,f.JsonSchema.atId)){const n=h.ReaderUtil.getString(e,f.JsonSchema.atId);if(null!==n){if("string"!=typeof n)throw new Error(`Invalid URI at "${f.JsonSchema.atId}": expected a string.`);""===n.trim()?(this.behavior.useWarningForKnownIssues()||N.refuseEmptyIdentifier(e),r.addBlueprintComparisonWarning(new o.ComparisonError("JsonTemplateInstanceReader",l.ComparisonErrorType.VALUE_MISMATCH,t.add(f.JsonSchema.atId),"an absolute IRI or null while the occurrence awaits server assignment",n))):this.lenient?h.ReaderUtil.assertIri(n,f.JsonSchema.atId):h.ReaderUtil.assertIdentifier(n,f.JsonSchema.atId),a.id=n}}return a}static VALUE_ATOM_KEYS=new Set([f.JsonSchema.atValue,f.JsonSchema.atLanguage,f.JsonSchema.atId,f.JsonSchema.rdfsLabel,f.JsonSchema.atType,S.CedarModel.skosNotation,S.CedarModel.skosPrefLabel]);static isValueNode(e){if(null==e)return!1;if("string"==typeof e)return!0;if(Object.hasOwn(e,f.JsonSchema.atValue))return!0;if(Object.hasOwn(e,f.JsonSchema.atContext))return!1;const t=Object.keys(e);return t.length>0&&t.every(e=>N.VALUE_ATOM_KEYS.has(e))}static readValueNode(e){return null==e?new A.InstanceDataEmptyNode:"string"==typeof e?new b.InstanceDataAttributeValueFieldName(e):N.isValueNode(e)?N.parseDataAtom(e):new A.InstanceDataEmptyNode}parseNode(e,t,r){if(null==e)return new A.InstanceDataEmptyNode;if("string"==typeof e)return new b.InstanceDataAttributeValueFieldName(e);if(N.isValueNode(e)){const n=N.parseDataAtom(e);return N.reportNullIri(n,t,r),n}return 0===Object.keys(e).length?new A.InstanceDataEmptyNode:this.parseContainer(e,t,r)}static reportNullIri(e,t,r){(e instanceof C.InstanceDataLinkAtom||e instanceof g.InstanceDataControlledAtom)&&null===e.id&&r.addBlueprintComparisonError(new o.ComparisonError("JsonTemplateInstanceReader",l.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,t.add(f.JsonSchema.atId),"an IRI",null))}static parseDataAtom(e){if(Object.hasOwn(e,f.JsonSchema.atId)&&Object.hasOwn(e,f.JsonSchema.atValue))throw new Error("A field cannot contain both @id and @value.");const t=this.parseDataAtomWithoutNotation(e);return"language"in t&&(t.language=h.ReaderUtil.getString(e,f.JsonSchema.atLanguage)),"preferredLabel"in t&&(t.preferredLabel=h.ReaderUtil.getString(e,S.CedarModel.skosPrefLabel)),!("notation"in t)||t instanceof n.InstanceDataNotationAtom||(t.notation=h.ReaderUtil.getString(e,f.JsonSchema.skosNotation)),t}static parseDataAtomWithoutNotation(e){if(Object.hasOwn(e,f.JsonSchema.atValue)){const t=h.ReaderUtil.getString(e,f.JsonSchema.atValue),r=h.ReaderUtil.getSingleType(e,f.JsonSchema.atType);return null===r?new T.InstanceDataStringAtom(t,h.ReaderUtil.getString(e,f.JsonSchema.rdfsLabel)):new I.InstanceDataTypedAtom(t,r,h.ReaderUtil.getString(e,f.JsonSchema.rdfsLabel))}if(Object.hasOwn(e,f.JsonSchema.atId)){h.ReaderUtil.assertFieldIri(h.ReaderUtil.getString(e,f.JsonSchema.atId),f.JsonSchema.atId);const t=h.ReaderUtil.getString(e,f.JsonSchema.atId),r=h.ReaderUtil.getString(e,f.JsonSchema.rdfsLabel);return null===r?C.InstanceDataLinkAtom.fromParsedNode(t,h.ReaderUtil.getSingleType(e,f.JsonSchema.atType)):g.InstanceDataControlledAtom.fromParsedNode(t,r,h.ReaderUtil.getSingleType(e,f.JsonSchema.atType))}const t=h.ReaderUtil.getString(e,f.JsonSchema.rdfsLabel);if(null!==t)return new a.InstanceDataLabelAtom(t,h.ReaderUtil.getSingleType(e,f.JsonSchema.atType));const r=h.ReaderUtil.getString(e,f.JsonSchema.skosNotation);return null!==r?new n.InstanceDataNotationAtom(r,h.ReaderUtil.getSingleType(e,f.JsonSchema.atType)):new E.InstanceDataEmptyAtom(e)}packAttributeValues(e){const t=e.values,r=[];Object.keys(t).forEach(e=>{const n=t[e];if(Array.isArray(n)){let a=!1;if(n.forEach((e,t)=>{e instanceof b.InstanceDataAttributeValueFieldName||(a=!0)}),n.length>0&&!a){const a=new R.InstanceDataAttributeValueField(e);r.push(a),n.forEach((e,r)=>{const n=e.name;if(null!==n&&Object.hasOwn(t,n)){const e=t[n];a.addValue(n,e)}})}}}),r.forEach((e,r)=>{const n=e.name;null!==n&&(t[n]=e,Object.keys(e.values).forEach(e=>{Object.hasOwn(t,e)&&delete t[e]}))}),e.values=t}}t.JsonTemplateInstanceReader=N},6537(e,t,r){t.JsonTemplateInstanceReaderResult=void 0;const n=r(8518);class a extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get instance(){return this._artifact}get instanceSourceObject(){return this._artifactSourceObject}}t.JsonTemplateInstanceReaderResult=a},5291(e,t,r){t.JsonTemplateReader=void 0;const n=r(797),a=r(936),i=r(2733),s=r(2763),o=r(5747),l=r(8748),d=r(6551),c=r(3056),u=r(4036),m=r(7954),p=r(3188),h=r(5846),f=r(9932),y=r(7909),T=r(5510),C=r(3281);class E extends T.JsonContainerArtifactReader{elementReader;knownArtifactType=s.CedarArtifactType.TEMPLATE;constructor(e){super(e),this.elementReader=y.JsonTemplateElementReader.getForBehavior(e)}static getStrict(){return new E(h.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new E(h.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new E(e)}getElementReader(){return this.elementReader}includeInIRIMapping(e){return e.atType!==s.CedarArtifactType.STATIC_TEMPLATE_FIELD}readFromString(e){let t;try{t=JSON.parse(e)}catch{t={}}return this.readFromObject(t)}readFromObject(e,t=new p.JsonPath){const r=new u.JsonArtifactParsingResult,a=C.Template.buildEmptyWithNullValues();return l.ReaderUtil.getArtifactIdentifier(e,i.JsonSchema.atId,this.lenient),this.readNonReportableAttributes(a,e),(0,n.applySchemaReaderDefaults)(a,e,t,"json"),this.readReportableAttributes(a,e,r,t),this.readAnnotations(a,e),this.readInstanceTypeSpecification(a,e,r),this.readAndValidateChildrenInfo(a,e,r,t),new m.JsonTemplateReaderResult(a,r,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t);const r=l.ReaderUtil.getNode(t,a.CedarModel.ui);null!==r&&(e.header=l.ReaderUtil.getString(r,a.CedarModel.header),e.footer=l.ReaderUtil.getString(r,a.CedarModel.footer))}readAndValidateChildrenInfo(e,t,r,n){const s=l.ReaderUtil.getStringList(t,i.JsonSchema.required),o=l.ReaderUtil.getNode(t,i.JsonSchema.properties),c=this.generateAndValidateRequiredMap(s,d.JsonTemplateContent.REQUIRED_PARTIAL,r,n),u=this.getCandidateChildrenInfo(o,d.JsonTemplateContent.PROPERTIES_PARTIAL_KEY_MAP,r,n);this.checkRequiredBothWays(u,c,s,d.JsonTemplateContent.REQUIRED_PARTIAL_KEY_MAP,r,n);const m=l.ReaderUtil.getNode(t,a.CedarModel.ui);this.extractUIPreferredLabelsAndDescriptions(m,u,r,n),this.extractIRIMappings(o,u,r,n);const p=l.ReaderUtil.getStringList(m,a.CedarModel.order),h=this.finalizeChildInfo(p,u,r,n);this.validatePropertiesVsOrder(u,p,r,n),this.validateProperties(h,o,e,r,n),this.parseChildren(h,o,e,r,n)}validateProperties(e,t,r,n,s){let u=l.ReaderUtil.deepClone(d.JsonTemplateContent.PROPERTIES_PARTIAL);e.hasAttributeValue()&&(u=l.ReaderUtil.deepClone(d.JsonTemplateContent.PROPERTIES_PARTIAL),u[i.JsonSchema.atContext][o.TemplateProperty.additionalProperties]=f.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE),a.CedarModel.annotations in t||delete u[a.CedarModel.annotations];const m=l.ReaderUtil.getNode(l.ReaderUtil.getNode(t,i.JsonSchema.atContext),i.JsonSchema.properties);a.CedarModel.annotations in m||delete l.ReaderUtil.getNode(l.ReaderUtil.getNode(u,i.JsonSchema.atContext),i.JsonSchema.properties)[a.CedarModel.annotations],c.JsonObjectComparator.compareToLeft(n,u,t,s.add(i.JsonSchema.properties),this.behavior)}}t.JsonTemplateReader=E},7954(e,t,r){t.JsonTemplateReaderResult=void 0;const n=r(8518);class a extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get template(){return this._artifact}get templateSourceObject(){return this._artifactSourceObject}}t.JsonTemplateReaderResult=a},8639(e,t,r){t.CedarYamlReaders=void 0;const n=r(2763),a=r(1395),i=r(5677),s=r(8239),o=r(2999),l=r(9946);class d{behavior;isCompact;constructor(e,t=!1){this.behavior=e,this.isCompact=t}static getStrict(){return new d(a.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new d(a.YamlReaderBehavior.STRICT,!0)}getTemplateReader(){return i.YamlTemplateReader.getForBehavior(this.behavior,this.isCompact)}getTemplateElementReader(){return s.YamlTemplateElementReader.getForBehavior(this.behavior,this.isCompact)}getTemplateFieldReader(){return o.YamlTemplateFieldReader.getForBehavior(this.behavior,this.isCompact)}getTemplateInstanceReader(){return l.YamlTemplateInstanceReader.getForBehavior(this.behavior)}getReaderForArtifactType(e){switch(e){case n.CedarArtifactType.TEMPLATE:return i.YamlTemplateReader.getForBehavior(this.behavior,this.isCompact);case n.CedarArtifactType.TEMPLATE_ELEMENT:return s.YamlTemplateElementReader.getForBehavior(this.behavior,this.isCompact);case n.CedarArtifactType.TEMPLATE_FIELD:case n.CedarArtifactType.STATIC_TEMPLATE_FIELD:return o.YamlTemplateFieldReader.getForBehavior(this.behavior,this.isCompact);case n.CedarArtifactType.TEMPLATE_INSTANCE:return l.YamlTemplateInstanceReader.getForBehavior(this.behavior);default:throw new Error(`No YAML reader available for CedarArtifactType: ${e}`)}}}t.CedarYamlReaders=d},6575(e,t,r){t.YamlAbstractArtifactReader=void 0;const n=r(4443),a=r(8333),i=r(8534),s=r(2234),o=r(9857),l=r(8557),d=r(1027),c=r(3910),u=r(2763),m=r(5226),p=r(2787),h=r(3549),f=r(8748),y=r(2099),T=r(7752);class C{behavior;knownArtifactType=u.CedarArtifactType.NULL;isCompact;constructor(e,t=!1){this.behavior=e,this.isCompact=t}artifactTypeWord(){return this.knownArtifactType===u.CedarArtifactType.TEMPLATE?"template":this.knownArtifactType===u.CedarArtifactType.TEMPLATE_ELEMENT?"element":"field"}readNonReportableAttributes(e,t){if(e.extensions=n.SchemaExtensions.fromYaml(t),C.refuseEmptyIdentifier(t),e.at_id=i.CedarArtifactId.forValue(f.ReaderUtil.getString(t,y.YamlKeys.id)),e.schema_name=f.ReaderUtil.getString(t,y.YamlKeys.name),e.schema_description=f.ReaderUtil.getStringOrEmpty(t,y.YamlKeys.description),null!==e.schema_name){const t=this.artifactTypeWord();e.title=(0,a.internalNameFor)(e.schema_name,t),e.description=`${e.schema_name} ${t} schema generated by the CEDAR Artifact Library`}e.pav_createdBy=s.CedarUser.forValue(f.ReaderUtil.getString(t,y.YamlKeys.createdBy)),e.pav_createdOn=o.IsoDate.forValue(f.ReaderUtil.getString(t,y.YamlKeys.createdOn)),e.oslc_modifiedBy=s.CedarUser.forValue(f.ReaderUtil.getString(t,y.YamlKeys.modifiedBy)),e.pav_lastUpdatedOn=o.IsoDate.forValue(f.ReaderUtil.getString(t,y.YamlKeys.modifiedOn));const r=f.ReaderUtil.getString(t,y.YamlKeys.modelVersion);if(null===r&&!this.isCompact)throw new Error(`No ${y.YamlKeys.modelVersion} present. A document without one is the compact form, which a reader has to be asked for.`);e.schema_schemaVersion=l.SchemaVersion.forValue(r),e.pav_version=d.PavVersion.forValue(f.ReaderUtil.getString(t,y.YamlKeys.version)),e.bibo_status=c.BiboStatus.forYamlValue(f.ReaderUtil.getString(t,y.YamlKeys.status)),e.pav_derivedFrom=i.CedarArtifactId.forValue(f.ReaderUtil.getArtifactIdentifier(t,y.YamlKeys.derivedFrom,this.behavior.useWarningForKnownIssues())),e.pav_previousVersion=i.CedarArtifactId.forValue(f.ReaderUtil.getIdentifier(t,y.YamlKeys.previousVersion)),e.schema_identifier=f.ReaderUtil.getString(t,y.YamlKeys.identifier),e.language=T.Language.forValue(f.ReaderUtil.getString(t,y.YamlKeys.language))}static refuseEmptyIdentifier(e,t=y.YamlKeys.id){const r=f.ReaderUtil.getString(e,t);if(null!==r&&"string"!=typeof r)throw new Error(`Invalid URI at "${t}": expected a string.`);if(null!==r&&""===r.trim())throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);f.ReaderUtil.assertIri(r,t)}readAnnotations(e,t,r,n){const a=new m.Annotations,i=f.ReaderUtil.getNode(t,y.YamlKeys.annotations);Object.keys(i).forEach(e=>{const t=i[e];if(null===t||"object"!=typeof t||Array.isArray(t))throw new Error(`Expected map value for annotation at /annotations/${e}`);const r=f.ReaderUtil.getNode(i,e),n=f.ReaderUtil.getString(r,y.YamlKeys.id),s=f.ReaderUtil.getString(r,y.YamlKeys.value);if(null!==e)if(null!==n)a.add(new p.AnnotationAtId(e,n));else{if(null===s)throw new Error(`Annotation must have either a value or id at /annotations/${e}`);a.add(new h.AnnotationAtValue(e,s))}}),a.getSize()>0&&(e.annotations=a)}}t.YamlAbstractArtifactReader=C},6532(e,t){t.YamlArtifactReaderResult=void 0,t.YamlArtifactReaderResult=class{_artifact;_parsingResult;_artifactSourceObject;constructor(e,t,r){this._artifact=e,this._parsingResult=t,this._artifactSourceObject=r}get artifact(){return this._artifact}get parsingResult(){return this._parsingResult}get artifactSourceObject(){return this._artifactSourceObject}}},9300(e,t,r){t.YamlContainerArtifactReader=void 0;const n=r(5588),a=r(6575),i=r(2999),s=r(455),o=r(2763),l=r(8748),d=r(2099),c=r(699),u=r(9499),m=r(4869),p=r(3239),h=r(8290),f=r(3608),y=r(513);class T extends a.YamlAbstractArtifactReader{fieldReader;constructor(e,t=!1){super(e,t),this.fieldReader=i.YamlTemplateFieldReader.getForBehavior(e,t)}readAndValidateChildrenInfo(e,t,r,a){l.ReaderUtil.getNodeList(t,d.YamlKeys.children).forEach(t=>{const r=l.ReaderUtil.getString(t,d.YamlKeys.type),i=l.ReaderUtil.getString(t,d.YamlKeys.key),C=u.YamlArtifactType.forValue(r);if(null===i)throw new Error(`A child without a ${d.YamlKeys.key} at ${a.add(d.YamlKeys.children).toString()}`);{if("string"!=typeof i)throw new Error(`Child key must be a string at ${a.add(d.YamlKeys.children,d.YamlKeys.key).toString()}`);if(n.ReservedNames.isReservedName(i))throw new Error(`Child schema uses a reserved instance property name at ${a.add(d.YamlKeys.children,i).toString()}`);const u=new s.ChildDeploymentInfo(i);u.atType=o.CedarArtifactType.forYamlArtifactType(C);const E=l.ReaderUtil.getNode(t,d.YamlKeys.configuration);if(u.label=l.ReaderUtil.getString(E,d.YamlKeys.overrideLabel),u.description=l.ReaderUtil.getString(E,d.YamlKeys.overrideDescription),u.multiInstance=l.ReaderUtil.getBoolean(E,d.YamlKeys.multiple),u.multiInstance&&(u.minItems=l.ReaderUtil.getNumber(E,d.YamlKeys.minItems)??y.AbstractChildDeploymentInfo.defaultMinItems,u.maxItems=l.ReaderUtil.getNumber(E,d.YamlKeys.maxItems)),u.requiredValue=l.ReaderUtil.getBoolean(E,d.YamlKeys.required),u.recommendedValue=l.ReaderUtil.getBoolean(E,d.YamlKeys.recommended),u.hidden=l.ReaderUtil.getBoolean(E,d.YamlKeys.hidden),u.valueRecommendationEnabled=l.ReaderUtil.getBoolean(E,d.YamlKeys.valueRecommendation),u.iri=l.ReaderUtil.getIdentifier(E,d.YamlKeys.propertyIri),C.isField()){const r=m.CedarFieldType.forYamlArtifactType(C);u.uiInputType=r.getUiInputType();const n=this.fieldReader.readFromObject(t,u,a.add(d.YamlKeys.children,i));(0,c.isSizedStaticField)(n.field)&&(n.field.width=l.ReaderUtil.getNumber(E,d.YamlKeys.width),n.field.height=l.ReaderUtil.getNumber(E,d.YamlKeys.height)),u.label=T.entryFor(u.label,n.field.schema_name),u.description=T.entryFor(u.description,n.field.schema_description);const s=n.field.createDeploymentBuilder(u.name).withLabel(u.label).withDescription(u.description);if(s instanceof h.ChildDeploymentInfoStaticBuilder&&s.withHidden(u.hidden),u.atType===o.CedarArtifactType.TEMPLATE_FIELD){const e=s;e.withHidden(u.hidden).withIri(u.iri).withContinuePreviousLine(l.ReaderUtil.getBoolean(E,d.YamlKeys.continuePreviousLine)).withRecommendedValue(u.recommendedValue).withRequiredValue(u.requiredValue).withValueRecommendationEnabled(u.valueRecommendationEnabled),e instanceof f.ChildDeploymentInfoBuilder&&e.withMultiInstance(u.multiInstance).withMinItems(u.minItems).withMaxItems(u.maxItems)}s instanceof p.ChildDeploymentInfoAlwaysMultipleBuilder&&s.withMinItems(l.ReaderUtil.getNumber(E,d.YamlKeys.minItems)).withMaxItems(l.ReaderUtil.getNumber(E,d.YamlKeys.maxItems));const y=s.build();e.addChild(n.field,y)}else{if(!C.isElement())throw new Error(`Unknown child type "${r}" at ${a.add(d.YamlKeys.children,i).toString()}`);{const r=this.getElementReader().readFromObject(t,u,a.add(d.YamlKeys.children,i)),n=r.element.createDeploymentBuilder(i).withLabel(T.entryFor(u.label,r.element.schema_name)).withDescription(T.entryFor(u.description,r.element.schema_description)).withIri(u.iri).withMultiInstance(u.multiInstance).withMinItems(u.minItems).withMaxItems(u.maxItems).build();e.addChild(r.element,n)}}}})}static entryFor(e,t){return null!==e?e:t}}t.YamlContainerArtifactReader=T},8239(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.YamlTemplateElementReader=void 0;const a=r(797),i=r(2763),s=r(3188),o=r(1395),l=r(7661),d=r(455),c=n(r(3198)),u=r(9300),m=r(4646),p=r(1591),h=r(8748),f=r(2099);class y extends u.YamlContainerArtifactReader{knownArtifactType=i.CedarArtifactType.TEMPLATE_ELEMENT;constructor(e,t=!1){super(e,t)}static getStrict(){return new y(o.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new y(o.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new y(e,t)}getElementReader(){return this}readFromString(e){let t;try{t=c.default.parse(e)}catch{t={}}return this.readFromObject(t,d.ChildDeploymentInfo.empty(),new s.JsonPath)}readFromObject(e,t,r){const n=new p.YamlArtifactParsingResult,i=l.TemplateElement.buildEmptyWithNullValues();return null===r.getLastComponent()&&h.ReaderUtil.getIdentifier(e,f.YamlKeys.id),this.readNonReportableAttributes(i,e),(0,a.applySchemaReaderDefaults)(i,e,r,"yaml"),this.readAnnotations(i,e,n,r),super.readAndValidateChildrenInfo(i,e,n,r),new m.YamlTemplateElementReaderResult(i,n,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t);const r=t[f.YamlKeys.instanceType];if(null!=r&&"string"!=typeof r&&(!Array.isArray(r)||0===r.length))throw new Error("Instance types must be an IRI or a nonempty array of IRIs");e.instanceTypeSpecifications=Array.isArray(r)?r:"string"==typeof r?[r]:[],e.skos_prefLabel=h.ReaderUtil.getString(t,f.YamlKeys.prefLabel),e.skos_altLabel=h.ReaderUtil.getFilteredStringList(t,f.YamlKeys.altLabels),e.header=h.ReaderUtil.getString(t,f.YamlKeys.header),e.footer=h.ReaderUtil.getString(t,f.YamlKeys.footer)}}t.YamlTemplateElementReader=y},4646(e,t){t.YamlTemplateElementReaderResult=void 0,t.YamlTemplateElementReaderResult=class{_element;_parsingResult;_elementSourceObject;constructor(e,t,r){this._element=e,this._parsingResult=t,this._elementSourceObject=r}get element(){return this._element}get parsingResult(){return this._parsingResult}get elementSourceObject(){return this._elementSourceObject}}},2999(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.YamlTemplateFieldReader=void 0;const a=r(797),i=r(3188),s=r(8748),o=r(2763),l=r(3054),d=r(1790),c=r(455),u=r(6575),m=r(1395),p=n(r(3198)),h=r(2099),f=r(9499),y=r(1268),T=r(3168),C=r(384),E=r(1872),g=r(529),I=r(4568),A=r(8568),b=r(3980),R=r(7941),S=r(1404),v=r(7089),_=r(4329),N=r(7268),w=r(2709),L=r(7124),F=r(4284),V=r(9299),O=r(1591),D=r(6651),M=r(7123),B=r(5075),U=r(7709),Y=r(6089),x=r(8543),J=r(5907),P=r(6731),k=r(6591);class W extends u.YamlAbstractArtifactReader{knownArtifactType=o.CedarArtifactType.TEMPLATE_FIELD;constructor(e,t=!1){super(e,t)}static getStrict(){return new W(m.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new W(m.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new W(e,t)}static readerMap=new Map([[f.YamlArtifactType.TEXTFIELD,new y.YamlFieldReaderTextField],[f.YamlArtifactType.TEXTAREA,new T.YamlFieldReaderTextArea],[f.YamlArtifactType.CONTROLLED_TERM,new V.YamlFieldReaderControlledTerm],[f.YamlArtifactType.LINK,new A.YamlFieldReaderLink],[f.YamlArtifactType.EXT_ROR,new D.YamlFieldReaderExtRor],[f.YamlArtifactType.EXT_ORCID,new M.YamlFieldReaderExtOrcid],[f.YamlArtifactType.EXT_PFAS,new B.YamlFieldReaderExtPfas],[f.YamlArtifactType.EXT_PUBMED,new U.YamlFieldReaderExtPubmed],[f.YamlArtifactType.EXT_RRID,new Y.YamlFieldReaderExtRrid],[f.YamlArtifactType.EXT_NIH_GRANT_ID,new x.YamlFieldReaderExtNihGrantId],[f.YamlArtifactType.EXT_DOI,new J.YamlFieldReaderExtDoi],[f.YamlArtifactType.TEMPORAL,new C.YamlFieldReaderTemporal],[f.YamlArtifactType.EMAIL,new l.YamlFieldReaderEmail],[f.YamlArtifactType.NUMERIC,new E.YamlFieldReaderNumeric],[f.YamlArtifactType.PHONE_NUMBER,new _.YamlFieldReaderPhoneNumber],[f.YamlArtifactType.RADIO,new F.YamlFieldReaderRadio],[f.YamlArtifactType.CHECKBOX,new N.YamlFieldReaderCheckbox],[f.YamlArtifactType.SINGLE_SELECT_LIST,new w.YamlFieldReaderSingleSelectList],[f.YamlArtifactType.MULTI_SELECT_LIST,new L.YamlFieldReaderMultiSelectList],[f.YamlArtifactType.ATTRIBUTE_VALUE,new g.YamlFieldReaderAttributeValue],[f.YamlArtifactType.PAGE_BREAK,new I.YamlFieldReaderPageBreak],[f.YamlArtifactType.SECTION_BREAK,new b.YamlFieldReaderSectionBreak],[f.YamlArtifactType.IMAGE,new R.YamlFieldReaderImage],[f.YamlArtifactType.RICH_TEXT,new S.YamlFieldReaderRichText],[f.YamlArtifactType.YOUTUBE,new v.YamlFieldReaderYoutube]]);readFromString(e){let t;try{t=p.default.parse(e)}catch{t={}}return this.readFromObject(t,c.ChildDeploymentInfo.empty(),new i.JsonPath)}readFromObject(e,t,r){const n=new O.YamlArtifactParsingResult,i=W.readFieldSpecificAttributes(e,t,n,r);return null===r.getLastComponent()&&s.ReaderUtil.getIdentifier(e,h.YamlKeys.id),this.readNonReportableAttributes(i,e),(0,a.applySchemaReaderDefaults)(i,e,r,"yaml"),this.readAnnotations(i,e,n,r),new d.YamlTemplateFieldReaderResult(i,n,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t),e.skos_prefLabel=s.ReaderUtil.getString(t,h.YamlKeys.prefLabel),e.skos_altLabel=s.ReaderUtil.getFilteredStringList(t,h.YamlKeys.altLabels),(e instanceof P.ControlledTermFieldImpl||e instanceof k.TextFieldImpl)&&(e.valueRecommendationEnabled=s.ReaderUtil.getBoolean(t,h.YamlKeys.valueRecommendation));const r=s.ReaderUtil.getNode(t,h.YamlKeys.configuration);e.hidden=W.readFlag(r,t,h.YamlKeys.hidden),e.requiredValue=W.readFlag(r,t,h.YamlKeys.required),e.recommendedValue=W.readFlag(r,t,h.YamlKeys.recommended),e.continuePreviousLine=W.readFlag(r,t,h.YamlKeys.continuePreviousLine)}static readFlag(e,t,r){return s.ReaderUtil.getBoolean(e,r)||s.ReaderUtil.getBoolean(t,r)}static readFieldSpecificAttributes(e,t,r,n){const a=f.YamlArtifactType.forValue(s.ReaderUtil.getString(e,h.YamlKeys.type));if(a.isField()){const i=this.readerMap.get(a);if(!i)throw new Error(`No reader defined for dynamic input type "${a.getValue()}"`);const s=i.read(e,t,r,n);let l=o.CedarArtifactType.NULL;return a.isStaticField()?l=o.CedarArtifactType.STATIC_TEMPLATE_FIELD:a.isDynamicField()&&(l=o.CedarArtifactType.TEMPLATE_FIELD),s.cedarArtifactType=l,s}throw new Error(`Unknown field type "${s.ReaderUtil.getString(e,h.YamlKeys.type)}" at ${n.toString()}`)}}t.YamlTemplateFieldReader=W},1790(e,t){t.YamlTemplateFieldReaderResult=void 0,t.YamlTemplateFieldReaderResult=class{_field;_parsingResult;_fieldSourceObject;constructor(e,t,r){this._field=e,this._parsingResult=t,this._fieldSourceObject=r}get field(){return this._field}get parsingResult(){return this._parsingResult}get fieldSourceObject(){return this._fieldSourceObject}}},5675(e,t,r){t.YamlTemplateFieldTypeSpecificReader=void 0;const n=r(855),a=r(8748),i=r(2099),s=r(4081),o=r(6145);t.YamlTemplateFieldTypeSpecificReader=class{read(e,t,r,a){return n.UnknownTemplateField.build()}static readAndStoreListValueConstraints(e,t){t.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(e,i.YamlKeys.default);const r=a.ReaderUtil.getNodeList(e,i.YamlKeys.values);null!==r&&r.forEach(e=>{const r=a.ReaderUtil.getString(e,i.YamlKeys.label),n=a.ReaderUtil.getBoolean(e,i.YamlKeys.selected),o=Object.hasOwn(e,i.YamlKeys.selected);if(null!=r){const e=new s.ListOption(r,n,o);t.valueConstraints.literals.push(e)}})}}},9946(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.YamlTemplateInstanceReader=void 0;const a=r(5588),i=r(1625),s=r(9167),o=n(r(3198)),l=r(8534),d=r(1395),c=r(6575),u=r(2234),m=r(9857),p=r(1591),h=r(2099),f=r(8748),y=r(2272),T=r(147),C=r(7723),E=r(5222),g=r(4877),I=r(7571),A=r(8193),b=r(4465),R=r(9327),S=r(4033),v=r(2888),_=r(6109),N=r(3188);class w extends c.YamlAbstractArtifactReader{constructor(e,t=!1){super(e,t)}static getStrict(){return new w(d.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new w(d.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new w(e,t)}readFromString(e){let t;try{t=o.default.parse(e)}catch{t={}}return this.readFromObject(t)}readFromObject(e){const t=new p.YamlArtifactParsingResult,r=y.TemplateInstance.buildEmptyWithNullValues(),n=e??{};r.schema_name=f.ReaderUtil.getString(n,h.YamlKeys.name),r.schema_description=f.ReaderUtil.getString(n,h.YamlKeys.description)??"",r.descriptionWasAbsent=null===f.ReaderUtil.getString(n,h.YamlKeys.description),r.at_id=l.CedarArtifactId.forValue(f.ReaderUtil.getIdentifier(n,h.YamlKeys.id));const a=this.behavior.useWarningForKnownIssues();r.schema_isBasedOn=l.CedarArtifactId.forValue(f.ReaderUtil.getArtifactIdentifier(n,h.YamlKeys.isBasedOn,a)),r.pav_derivedFrom=l.CedarArtifactId.forValue(f.ReaderUtil.getArtifactIdentifier(n,h.YamlKeys.derivedFrom,a)),r.pav_createdBy=u.CedarUser.forValue(f.ReaderUtil.getString(n,h.YamlKeys.createdBy)),r.pav_createdOn=m.IsoDate.forValue(f.ReaderUtil.getString(n,h.YamlKeys.createdOn)),r.oslc_modifiedBy=u.CedarUser.forValue(f.ReaderUtil.getString(n,h.YamlKeys.modifiedBy)),r.pav_lastUpdatedOn=m.IsoDate.forValue(f.ReaderUtil.getString(n,h.YamlKeys.modifiedOn)),this.readAnnotations(r,n,t,new N.JsonPath),r.dataContainer=this.parseContainer(n,!0);for(const e of S.AttributeValueNamePolicy.findConflicts(r.dataContainer,"template",!0))t.addBlueprintComparisonError(new v.ComparisonError("YamlTemplateInstanceReader",_.YamlComparisonErrorType.VALUE_MISMATCH,new N.JsonPath(...S.AttributeValueNamePolicy.locationOf(e)),"a unique, non-reserved attribute-value name",e.name));return new T.YamlTemplateInstanceReaderResult(r,t,n)}static RESERVED_KEYS=a.ReservedNames.TEMPLATE_INSTANCE_YAML_KEYS;static ELEMENT_RESERVED_KEYS=a.ReservedNames.NESTED_ELEMENT_INSTANCE_YAML_KEYS;parseContainer(e,t=!1){const r=new C.InstanceDataContainer,n=f.ReaderUtil.getNode(e,h.YamlKeys.children);null!==n&&Object.keys(n).forEach(e=>{const t=f.ReaderUtil.getNode(n,e)??n[e];if(Array.isArray(t)){const n=[];r.setValue(e,n),t.forEach((e,t)=>{n[t]=this.parseNode(e)})}else r.setValue(e,this.parseNode(t))}),Object.keys(e).forEach(n=>{if((t?w.RESERVED_KEYS:w.ELEMENT_RESERVED_KEYS).has(n))return;const a=e[n];if(null===a||"object"!=typeof a||Array.isArray(a))return;const i=new R.InstanceDataAttributeValueField(n);Object.keys(a).forEach(e=>{const t=a[e];i.addValue(e,new E.InstanceDataStringAtom(this.parseAttributeValue(t)))}),r.setValue(n,i)});const a=f.ReaderUtil.getIdentifier(e,h.YamlKeys.id);return null!==a&&(r.id=a),r}parseAttributeValue(e){if("string"==typeof e)return e;if(null!==e&&"object"==typeof e&&!Array.isArray(e)){const t=e[h.YamlKeys.value];return"string"==typeof t?t:null}return null}parseNode(e){const t=this.parseNodeWithoutNotation(e);return null!==e&&"object"==typeof e&&"language"in t&&(t.language=f.ReaderUtil.getString(e,h.YamlKeys.language)),null!==e&&"object"==typeof e&&"preferredLabel"in t&&(t.preferredLabel=f.ReaderUtil.getString(e,h.YamlKeys.prefLabel)),null===e||"object"!=typeof e||!("notation"in t)||t instanceof i.InstanceDataNotationAtom||(t.notation=f.ReaderUtil.getString(e,h.YamlKeys.notation)),t}parseNodeWithoutNotation(e){if(null==e)return new b.InstanceDataEmptyNode;if("string"==typeof e)return new E.InstanceDataStringAtom(e);if(Object.hasOwn(e,h.YamlKeys.children)||"element-instance"===f.ReaderUtil.getString(e,h.YamlKeys.type))return this.parseContainer(e);if(Object.hasOwn(e,h.YamlKeys.id)&&Object.hasOwn(e,h.YamlKeys.value))throw new Error("A field cannot contain both id and value.");if(Array.isArray(e[h.YamlKeys.datatype]))throw new Error("A field value can have at most one datatype.");if(Object.hasOwn(e,h.YamlKeys.value)){const t=f.ReaderUtil.getString(e,h.YamlKeys.value),r=f.ReaderUtil.getString(e,h.YamlKeys.datatype),n=f.ReaderUtil.getString(e,h.YamlKeys.label);return null===r?new E.InstanceDataStringAtom(t,n):new g.InstanceDataTypedAtom(t,r,n)}if(Object.hasOwn(e,h.YamlKeys.id)){f.ReaderUtil.assertFieldIri(f.ReaderUtil.getString(e,h.YamlKeys.id),h.YamlKeys.id);const t=f.ReaderUtil.getString(e,h.YamlKeys.id),r=f.ReaderUtil.getString(e,h.YamlKeys.label),n=f.ReaderUtil.getString(e,h.YamlKeys.datatype);return null===r?I.InstanceDataLinkAtom.fromParsedNode(t,n):A.InstanceDataControlledAtom.fromParsedNode(t,r,n)}const t=f.ReaderUtil.getString(e,h.YamlKeys.label);if(null!==t)return new s.InstanceDataLabelAtom(t,f.ReaderUtil.getString(e,h.YamlKeys.datatype));const r=f.ReaderUtil.getString(e,h.YamlKeys.notation);return null!==r?new i.InstanceDataNotationAtom(r,f.ReaderUtil.getString(e,h.YamlKeys.datatype)):new b.InstanceDataEmptyNode}}t.YamlTemplateInstanceReader=w},147(e,t,r){t.YamlTemplateInstanceReaderResult=void 0;const n=r(6532);class a extends n.YamlArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get instance(){return this._artifact}get instanceSourceObject(){return this._artifactSourceObject}}t.YamlTemplateInstanceReaderResult=a},5677(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.YamlTemplateReader=void 0;const a=r(797),i=r(2763),s=r(8748),o=r(7868),l=r(3188),d=r(1395),c=r(8239),u=r(3281),m=n(r(3198)),p=r(9300),h=r(2099),f=r(1591);class y extends p.YamlContainerArtifactReader{elementReader;knownArtifactType=i.CedarArtifactType.TEMPLATE;constructor(e,t=!1){super(e,t),this.elementReader=c.YamlTemplateElementReader.getForBehavior(e,t)}static getStrict(){return new y(d.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new y(d.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new y(e,t)}getElementReader(){return this.elementReader}readFromString(e){let t;try{t=m.default.parse(e)}catch{t={}}return this.readFromObject(t)}readFromObject(e,t=new l.JsonPath){const r=new f.YamlArtifactParsingResult,n=u.Template.buildEmptyWithNullValues();return s.ReaderUtil.getIdentifier(e,h.YamlKeys.id),this.readNonReportableAttributes(n,e),(0,a.applySchemaReaderDefaults)(n,e,t,"yaml"),this.readAnnotations(n,e,r,t),this.readInstanceTypeSpecification(n,e,r),this.readAndValidateChildrenInfo(n,e,r,t),new o.YamlTemplateReaderResult(n,r,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t),e.header=s.ReaderUtil.getString(t,h.YamlKeys.header),e.footer=s.ReaderUtil.getString(t,h.YamlKeys.footer)}readInstanceTypeSpecification(e,t,r){const n=t[h.YamlKeys.instanceType];if(null!=n&&"string"!=typeof n&&(!Array.isArray(n)||0===n.length))throw new Error("Instance types must be an IRI or a nonempty array of IRIs");e.instanceTypeSpecifications=Array.isArray(n)?n:"string"==typeof n?[n]:[]}}t.YamlTemplateReader=y},7868(e,t){t.YamlTemplateReaderResult=void 0,t.YamlTemplateReaderResult=class{_template;_parsingResult;_templateSourceObject;constructor(e,t,r){this._template=e,this._parsingResult=t,this._templateSourceObject=r}get template(){return this._template}get parsingResult(){return this._parsingResult}get templateSourceObject(){return this._templateSourceObject}}},1888(e,t,r){t.RoundTrip=void 0;const n=r(6396),a=r(2748),i=r(4036),s=r(3056),o=r(455),l=r(3188),d=r(7954),c=r(7519),u=r(4948),m=r(6645),p=r(2022);t.RoundTrip=class{static compare(e,t){if(e instanceof n.JsonTemplateFieldReaderResult&&t instanceof a.JsonTemplateFieldWriterInternal)return this.compareField(e,t);if(e instanceof u.JsonTemplateElementReaderResult&&t instanceof m.JsonTemplateElementWriter)return this.compareElement(e,t);if(e instanceof d.JsonTemplateReaderResult&&t instanceof c.JsonTemplateWriter)return this.compareTemplate(e,t);if("string"==typeof e&&"string"==typeof t)return this.compareString(e,t);throw new Error("Invalid argument types for compare method")}static compareField(e,t){const r=new i.JsonArtifactParsingResult;return s.JsonObjectComparator.compareBothWays(r,e.fieldSourceObject,t.getAsJsonNode(e.field,o.ChildDeploymentInfo.empty()),new l.JsonPath,t.getBehavior()),r}static compareElement(e,t){const r=new i.JsonArtifactParsingResult;return s.JsonObjectComparator.compareBothWays(r,e.elementSourceObject,t.getAsJsonNode(e.element),new l.JsonPath,t.getBehavior()),r}static compareTemplate(e,t){const r=new i.JsonArtifactParsingResult;return s.JsonObjectComparator.compareBothWays(r,e.templateSourceObject,t.getAsJsonNode(e.template),new l.JsonPath,t.getBehavior()),r}static compareString(e,t){const r=JSON.parse(e),n=JSON.parse(t),a=new i.JsonArtifactParsingResult;return s.JsonObjectComparator.compareBothWays(a,r,n,new l.JsonPath,p.JsonWriterBehavior.STRICT),a}}},2112(e,t){t.AbstractArtifactWriter=void 0,t.AbstractArtifactWriter=class{constructor(){}}},8810(e,t,r){t.CedarWriters=void 0;const n=r(9607),a=r(5359);t.CedarWriters=class{static json(){return n.CedarJsonWriters}static yaml(){return a.CedarYamlWriters}}},5692(e,t,r){t.WriterUtil=void 0;const n=r(8878),a=r(3812);t.WriterUtil=class{static getMultiMinMax(e,t){let r=null,i=null,s=!1;return e.isMultiInstanceByDefinition()?t instanceof n.ChildDeploymentInfoAlwaysMultiple&&(s=!0,r=t.minItems,i=t.maxItems):e.isSingleInstanceByDefinition()?s=!1:(s=t.isMultiInAnyWay(),s&&t instanceof a.AbstractDynamicChildDeploymentInfo&&(r=t.minItems,i=t.maxItems)),{isMultiInstance:s,minItems:r,maxItems:i}}}},9607(e,t,r){t.CedarJsonWriters=void 0;const n=r(2022),a=r(4872),i=r(7519),s=r(4869),o=r(7501),l=r(3691),d=r(4841),c=r(5459),u=r(8970),m=r(2347),p=r(41),h=r(6029),f=r(6766),y=r(9309),T=r(8663),C=r(7335),E=r(275),g=r(6876),I=r(9031),A=r(9129),b=r(1442),R=r(8280),S=r(8354),v=r(5996),_=r(2418),N=r(9222),w=r(9184),L=r(7054),F=r(2395),V=r(2813),O=r(6645),D=r(2981),M=r(7432),B=r(8014),U=r(3281),Y=r(7661),x=r(6320),J=r(7584),P=r(8096),k=r(6122),W=r(3312),K=r(4780),j=r(5250),$=r(7412);class X{behavior;jsonDynamicFieldWriters;jsonStaticFieldWriters;jsonValueConstraintsWriters;jsonAtomicWriter;jsonAnnotationsWriter;jsonTemplateWriter;jsonTemplateElementWriter;jsonTemplateInstanceWriter;constructor(e){this.behavior=e,this.jsonAtomicWriter=new a.JsonAtomicWriter(e),this.jsonAnnotationsWriter=new D.JsonAnnotationsWriter(e),this.jsonTemplateWriter=i.JsonTemplateWriter.getFor(e,this),this.jsonTemplateElementWriter=O.JsonTemplateElementWriter.getFor(e,this),this.jsonTemplateInstanceWriter=x.JsonTemplateInstanceWriter.getFor(e,this),this.jsonDynamicFieldWriters=new Map([[s.CedarFieldType.TEXT,new o.JsonFieldWriterTextField(e,this)],[s.CedarFieldType.TEXTAREA,new E.JsonFieldWriterTextArea(e,this)],[s.CedarFieldType.CONTROLLED_TERM,new R.JsonFieldWriterControlledTerm(e,this)],[s.CedarFieldType.PHONE_NUMBER,new g.JsonFieldWriterPhoneNumber(e,this)],[s.CedarFieldType.EMAIL,new I.JsonFieldWriterEmail(e,this)],[s.CedarFieldType.LINK,new l.JsonFieldWriterLink(e,this)],[s.CedarFieldType.EXT_ROR,new J.JsonFieldWriterExtRor(e,this)],[s.CedarFieldType.EXT_ORCID,new P.JsonFieldWriterExtOrcid(e,this)],[s.CedarFieldType.EXT_PFAS,new k.JsonFieldWriterExtPfas(e,this)],[s.CedarFieldType.EXT_PUBMED,new W.JsonFieldWriterExtPubmed(e,this)],[s.CedarFieldType.EXT_RRID,new K.JsonFieldWriterExtRrid(e,this)],[s.CedarFieldType.EXT_NIH_GRANT_ID,new j.JsonFieldWriterExtNihGrantId(e,this)],[s.CedarFieldType.EXT_DOI,new $.JsonFieldWriterExtDoi(e,this)],[s.CedarFieldType.NUMERIC,new d.JsonFieldWriterNumeric(e,this)],[s.CedarFieldType.TEMPORAL,new c.JsonFieldWriterTemporal(e,this)],[s.CedarFieldType.RADIO,new y.JsonFieldWriterRadio(e,this)],[s.CedarFieldType.CHECKBOX,new T.JsonFieldWriterCheckbox(e,this)],[s.CedarFieldType.SINGLE_SELECT_LIST,new C.JsonFieldWriterList(e,this)],[s.CedarFieldType.MULTIPLE_SELECT_LIST,new C.JsonFieldWriterList(e,this)],[s.CedarFieldType.ATTRIBUTE_VALUE,new b.JsonFieldWriterAttributeValue(e,this)]]),this.jsonStaticFieldWriters=new Map([[s.CedarFieldType.STATIC_PAGE_BREAK,new m.JsonFieldWriterStaticPageBreak(e,this)],[s.CedarFieldType.STATIC_SECTION_BREAK,new p.JsonFieldWriterStaticSectionsBreak(e,this)],[s.CedarFieldType.STATIC_IMAGE,new u.JsonFieldWriterStaticImage(e,this)],[s.CedarFieldType.STATIC_RICH_TEXT,new h.JsonFieldWriterStaticRichText(e,this)],[s.CedarFieldType.STATIC_YOUTUBE,new f.JsonFieldWriterStaticYoutube(e,this)]]),this.jsonValueConstraintsWriters=new Map([[S.ControlledTermOntology.className,new v.JsonValueConstraintsOntologyWriter(e,this)],[_.ControlledTermClass.className,new N.JsonValueConstraintsClassWriter(e,this)],[w.ControlledTermBranch.className,new L.JsonValueConstraintsBranchWriter(e,this)],[F.ControlledTermValueSet.className,new V.JsonValueConstraintsValueSetWriter(e,this)],[M.ControlledTermAction.className,new B.JsonValueConstraintsActionWriter(e,this)]])}static getStrict(){return new X(n.JsonWriterBehavior.STRICT)}static getFebruary2024(){return new X(n.JsonWriterBehavior.FEBRUARY_2024)}static getFor(e){return new X(e)}getTemplateWriter(){return this.jsonTemplateWriter}getTemplateElementWriter(){return this.jsonTemplateElementWriter}getTemplateInstanceWriter(){return this.jsonTemplateInstanceWriter}getAtomicWriter(){return this.jsonAtomicWriter}getFieldWriterForType(e){let t;if(t=e.isStaticField?this.jsonStaticFieldWriters.get(e):this.jsonDynamicFieldWriters.get(e),t)return t;throw new Error(`No JSON writer found for field type: ${e.getValue()}`)}getWriterForValueConstraint(e){const t=e.className,r=this.jsonValueConstraintsWriters.get(t);if(r)return r;throw new Error(`No JSON writer found for class type: ${t}`)}getFieldWriterForField(e){return this.getFieldWriterForType(e.cedarFieldType)}getAnnotationsWriter(){return this.jsonAnnotationsWriter}getWriterForArtifact(e){if(e instanceof U.Template)return i.JsonTemplateWriter.getFor(this.behavior,this);if(e instanceof Y.TemplateElement)return O.JsonTemplateElementWriter.getFor(this.behavior,this);if(e instanceof A.TemplateField)return this.getFieldWriterForType(e.cedarFieldType);throw new Error(`No JSON reader available for CedarArtifact: ${e}`)}}t.CedarJsonWriters=X},3161(e,t,r){t.JsonAbstractArtifactWriter=void 0;const n=r(2112),a=r(9517),i=r(2733),s=r(3910),o=r(1027),l=r(936),d=r(8534);class c extends n.AbstractArtifactWriter{behavior;writers;atomicWriter;annotationsWriter;constructor(e,t){super(),this.behavior=e,this.writers=t,this.atomicWriter=t.getAtomicWriter(),this.annotationsWriter=t.getAnnotationsWriter()}getBehavior(){return this.behavior}macroSchemaNameAndDescription(e){return{[i.JsonSchema.schemaName]:e.schema_name,[i.JsonSchema.schemaDescription]:e.schema_description}}macroProvenance(e,t){return{[i.JsonSchema.pavCreatedOn]:t.write(e.pav_createdOn),[i.JsonSchema.pavCreatedBy]:t.write(e.pav_createdBy),[i.JsonSchema.pavLastUpdatedOn]:t.write(e.pav_lastUpdatedOn),[i.JsonSchema.oslcModifiedBy]:t.write(e.oslc_modifiedBy)}}macroStatusAndVersion(e,t){const r=a.JsonNode.getEmpty();return e.pav_version!==o.PavVersion.NULL&&(r[i.JsonSchema.pavVersion]=t.write(e.pav_version)),e.bibo_status!==s.BiboStatus.NULL&&(r[i.JsonSchema.biboStatus]=t.write(e.bibo_status)),r}macroSkos(e){const t=a.JsonNode.getEmpty();return null!==e.skos_prefLabel&&(t[l.CedarModel.skosPrefLabel]=e.skos_prefLabel),null!==e.skos_altLabel&&e.skos_altLabel.length>0&&(t[l.CedarModel.skosAltLabel]=e.skos_altLabel),t}macroDerivedFrom(e){const t=a.JsonNode.getEmpty();return e.pav_derivedFrom!==d.CedarArtifactId.NULL&&(t[i.JsonSchema.pavDerivedFrom]=this.atomicWriter.write(e.pav_derivedFrom)),t}macroIsBasedOn(e){const t=a.JsonNode.getEmpty();return e.schema_isBasedOn!==d.CedarArtifactId.NULL&&(t[i.JsonSchema.schemaIsBasedOn]=this.atomicWriter.write(e.schema_isBasedOn)),t}macroPreviousVersion(e){const t=a.JsonNode.getEmpty();return e.pav_previousVersion!==d.CedarArtifactId.NULL&&(t[i.JsonSchema.pavPreviousVersion]=this.atomicWriter.write(e.pav_previousVersion)),t}macroSchemaIdentifier(e){const t=a.JsonNode.getEmpty();return null!==e.schema_identifier&&(t[i.JsonSchema.schemaIdentifier]=e.schema_identifier),t}macroAnnotations(e){return this.annotationsWriter.write(e.annotations)}}t.JsonAbstractArtifactWriter=c},8872(e,t,r){t.JsonAbstractContainerArtifactWriter=void 0;const n=r(8198),a=r(3161),i=r(6968),s=r(9517),o=r(9129),l=r(2733),d=r(936),c=r(5692),u=r(513),m=r(8748);class p extends a.JsonAbstractArtifactWriter{macroContext(e){return i.JsonContainerArtifactContent.CONTEXT_VERBATIM}getChildMapAsJson(e){const t=s.JsonNode.getEmpty();return e.getChildrenInfo().getChildrenNames().forEach(r=>{const a=e.getChild(r);if(null!=a){let i=s.JsonNode.getEmpty();const m=e.getChildrenInfo().get(r);if(null!==m&&(i=a instanceof o.TemplateField?this.writers.getFieldWriterForType(a.cedarFieldType).getAsJsonNode(a,m):this.writers.getTemplateElementWriter().getAsJsonNode(a)),null!==m){const{isMultiInstance:e,minItems:o,maxItems:p}=c.WriterUtil.getMultiMinMax(a,m);let h=o;const f=p;if(e){null===h&&(h=u.AbstractChildDeploymentInfo.defaultMinItems);const e=s.JsonNode.getEmpty();e[d.CedarModel.minItems]=h,null!==f&&f!==n.UNBOUNDED_MAX_ITEMS&&(e[d.CedarModel.maxItems]=f),i={[l.JsonSchema.type]:"array",...e,[l.JsonSchema.items]:i}}t[r]=i}}}),t}expandInstanceTypeSpecification(e,t){if(e.instanceTypeSpecifications.length>0){const r=m.ReaderUtil.getNode(t,l.JsonSchema.atType);m.ReaderUtil.getNodeList(r,l.JsonSchema.oneOf).forEach(t=>{const r=m.ReaderUtil.getString(t,l.JsonSchema.type);"string"==r?t[l.JsonSchema.enum]=[...e.instanceTypeSpecifications]:"array"==r&&(m.ReaderUtil.getNode(t,l.JsonSchema.items)[l.JsonSchema.enum]=[...e.instanceTypeSpecifications])})}}}t.JsonAbstractContainerArtifactWriter=p},2981(e,t,r){t.JsonAnnotationsWriter=void 0;const n=r(9517),a=r(936),i=r(2787),s=r(2733),o=r(3549);t.JsonAnnotationsWriter=class{behavior;constructor(e){this.behavior=e}write(e){const t=n.JsonNode.getEmpty();if(null!==e&&e.getSize()>0){const r=n.JsonNode.getEmpty();e.getAnnotationNames().forEach(t=>{const n=e.get(t);n instanceof i.AnnotationAtId?r[t]={[s.JsonSchema.atId]:n.getAtId()}:n instanceof o.AnnotationAtValue&&(r[t]={[s.JsonSchema.atValue]:n.getAtValue()})}),t[a.CedarModel.annotations]=r}return t}}},4872(e,t,r){t.JsonAtomicWriter=void 0;const n=r(8534),a=r(2763),i=r(5793),s=r(9857),o=r(2234),l=r(3910),d=r(1027),c=r(2475),u=r(8557),m=r(3447),p=r(8588),h=r(7974),f=r(3764),y=r(9034),T=r(3746),C=r(9932),E=r(8802),g=r(4531),I=r(7752);t.JsonAtomicWriter=class{behavior;constructor(e){this.behavior=e}write(e){if(null==e)return null;if(e instanceof n.CedarArtifactId)return this.writeCedarArtifactId(e);if(e instanceof a.CedarArtifactType)return this.writeCedarArtifactType(e);if(e instanceof i.JavascriptType)return this.writeJavascriptType(e);if(e instanceof s.IsoDate)return this.writeCedarDate(e);if(e instanceof o.CedarUser)return this.writeCedarUser(e);if(e instanceof l.BiboStatus)return this.writeBiboStatusJson(e);if(e instanceof d.PavVersion)return this.writePavVersion(e);if(e instanceof c.ArtifactSchema)return this.writeCedarSchema(e);if(e instanceof u.SchemaVersion)return this.writeSchemaVersion(e);if(e instanceof m.NumberType)return this.writeNumberType(e);if(e instanceof p.TemporalType)return this.writeTemporalType(e);if(e instanceof h.TemporalGranularity)return this.writeTemporalGranularity(e);if(e instanceof f.TimeFormat)return this.writeTimeFormat(e);if(e instanceof y.UiInputType)return this.writeUiInputType(e);if(e instanceof T.AdditionalProperties)return this.writeAdditionalProperties(e);if(e instanceof E.Iri)return this.writeURI(e);if(e instanceof g.BioportalTermType)return this.writeBioportalTermTypeJson(e);if(e instanceof I.Language)return this.writeLanguage(e);throw new Error("Unsupported type")}writeCedarArtifactId(e){return e.getValue()}writeCedarArtifactType(e){return e.getValue()}writeJavascriptType(e){return e.getValue()}writeCedarDate(e){return e.getValue()}writeCedarUser(e){return e.getValue()}writeBiboStatusJson(e){return e.getJsonValue()}writePavVersion(e){return e.getValue()}writeCedarSchema(e){return e.getValue()}writeSchemaVersion(e){return null!==e.getValue()?e.getValue():u.SchemaVersion.CURRENT.getValue()}writeNumberType(e){return e.getValue()}writeTemporalType(e){return e.getValue()}writeTemporalGranularity(e){return e.getValue()}writeTimeFormat(e){return e.getValue()}writeUiInputType(e){return e.getValue()}writeAdditionalProperties(e){return e!==T.AdditionalProperties.FALSE&&(e===T.AdditionalProperties.ALLOW_ATTRIBUTE_VALUE?C.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_OUTSIDE:null)}writeURI(e){return e.getValue()}writeBioportalTermTypeJson(e){return e.getJsonValue()}writeLanguage(e){return e.getValue()}}},6645(e,t,r){t.JsonTemplateElementWriter=void 0;const n=r(8972),a=r(8557),i=r(8748),s=r(2733),o=r(936),l=r(2763),d=r(5793),c=r(5747),u=r(2475),m=r(9932),p=r(1501),h=r(8872),f=r(7752);class y extends h.JsonAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new y(e,t)}buildProperties(e){const t=i.ReaderUtil.deepClone(p.JsonTemplateElementContent.PROPERTIES_PARTIAL);e.language!==f.Language.NULL&&(t[s.JsonSchema.atContext][s.JsonSchema.atLanguage]=this.atomicWriter.write(e.language));const r=e.getChildrenInfo().getIRIMap();t[s.JsonSchema.atContext][s.JsonSchema.properties]={...t[s.JsonSchema.atContext][s.JsonSchema.properties],...r};const n=e.getChildrenInfo().getChildNamesWithIri();n.length>0?t[s.JsonSchema.atContext][s.JsonSchema.required]=[...t[s.JsonSchema.atContext][s.JsonSchema.required],...n]:i.ReaderUtil.deleteNodeKey(t[s.JsonSchema.atContext],s.JsonSchema.required),e.getChildrenInfo().hasAttributeValue()&&(t[s.JsonSchema.atContext][c.TemplateProperty.additionalProperties]=m.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE);const a={...t,...this.getChildMapAsJson(e)};return this.expandInstanceTypeSpecification(e,a),a}getAsJsonString(e,t=2){return(0,n.stringifySchema)(this.getAsJsonNode(e),t)}getAsJsonNode(e){const t=this.buildProperties(e),r={[o.CedarModel.order]:e.getChildrenInfo().getChildrenNames(),[o.CedarModel.propertyLabels]:e.getChildrenInfo().getPropertyLabelMap(e),[o.CedarModel.propertyDescriptions]:e.getChildrenInfo().getPropertyDescriptionMap(e)};return null!==e.header&&(r[o.CedarModel.header]=e.header),null!==e.footer&&(r[o.CedarModel.footer]=e.footer),e.extensions.applyJson({[s.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[s.JsonSchema.atType]:this.atomicWriter.write(l.CedarArtifactType.TEMPLATE_ELEMENT),[s.JsonSchema.atContext]:this.macroContext(e),[o.CedarModel.type]:this.atomicWriter.write(d.JavascriptType.OBJECT),[c.TemplateProperty.title]:e.title,[c.TemplateProperty.description]:e.description,[o.CedarModel.ui]:r,[s.JsonSchema.properties]:t,[s.JsonSchema.required]:[...p.JsonTemplateElementContent.REQUIRED_PARTIAL,...e.getChildrenInfo().getChildrenNamesForRequired()],...this.macroAnnotations(e),...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroSkos(e),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[s.JsonSchema.schemaVersion]:this.atomicWriter.write(a.SchemaVersion.CURRENT),[c.TemplateProperty.additionalProperties]:this.atomicWriter.write(e.getAdditionalProperties()),...this.macroSchemaIdentifier(e),[o.CedarModel.schema]:this.atomicWriter.write(u.ArtifactSchema.CURRENT)})}}t.JsonTemplateElementWriter=y},2748(e,t,r){t.JsonTemplateFieldWriterInternal=void 0;const n=r(8972),a=r(8557),i=r(9517),s=r(936),o=r(2733),l=r(9932),d=r(5793),c=r(5747),u=r(2475),m=r(3161),p=r(3746),h=r(455),f=r(3812),y=r(9519),T=r(6731),C=r(6591),E=r(7752),g=r(8748);class I extends m.JsonAbstractArtifactWriter{constructor(e,t){super(e,t)}expandPropertiesNode(e){e[o.JsonSchema.properties]=l.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_LITERAL,this.behavior.usePropertiesAtLanguage()||(e[o.JsonSchema.properties]=l.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE)}expandRequiredNode(e){e[o.JsonSchema.required]=[o.JsonSchema.atValue]}expandUINode(e,t,r){r instanceof f.AbstractDynamicChildDeploymentInfo&&(r.hidden&&(e[s.CedarModel.Ui.hidden]=r.hidden),r instanceof y.AbstractFieldChildDeploymentInfo&&(r.continuePreviousLine&&(e[s.CedarModel.Ui.continuePreviousLine]=r.continuePreviousLine),r.valueRecommendationEnabled&&t.supportsValueRecommendation()&&(e[s.CedarModel.Ui.valueRecommendationEnabled]=r.valueRecommendationEnabled))),void 0===e[s.CedarModel.Ui.hidden]&&t.hidden&&(e[s.CedarModel.Ui.hidden]=!0),void 0===e[s.CedarModel.Ui.continuePreviousLine]&&t.continuePreviousLine&&(e[s.CedarModel.Ui.continuePreviousLine]=!0),void 0===e[s.CedarModel.Ui.valueRecommendationEnabled]&&(t instanceof T.ControlledTermFieldImpl||t instanceof C.TextFieldImpl)&&t.valueRecommendationEnabled&&(e[s.CedarModel.Ui.valueRecommendationEnabled]=!0)}buildUIObject(e,t){const r={[s.CedarModel.inputType]:this.atomicWriter.write(e.cedarFieldType.getUiInputType())},n={[s.CedarModel.ui]:r};return this.expandUINode(r,e,t),n}expandTypeNode(e,t){}expandValueConstraintsNode(e,t,r){r instanceof f.AbstractDynamicChildDeploymentInfo&&(e[s.CedarModel.requiredValue]=r.requiredValue),!e[s.CedarModel.requiredValue]&&t.requiredValue&&(e[s.CedarModel.requiredValue]=!0),r instanceof f.AbstractDynamicChildDeploymentInfo&&r.recommendedValue&&(e[s.CedarModel.ValueConstraints.recommendedValue]=r.recommendedValue),!e[s.CedarModel.ValueConstraints.recommendedValue]&&t.recommendedValue&&(e[s.CedarModel.ValueConstraints.recommendedValue]=!0)}buildValueConstraintsObject(e,t){const r=i.JsonNode.getEmpty(),n={[s.CedarModel.valueConstraints]:r};return this.expandValueConstraintsNode(r,e,t),n}expandLiterals(e,t){const r=i.JsonNode.getEmptyList();e.valueConstraints.literals.forEach(e=>{const t=i.JsonNode.getEmpty();t[s.CedarModel.label]=e.label,(e.statesSelectedByDefault||e.selectedByDefault)&&(t[s.CedarModel.selectedByDefault]=e.selectedByDefault),r.push(t)}),r.length>0&&(t[s.CedarModel.literals]=r)}getAsJsonString(e,t=2){return(0,n.stringifySchema)(this.getAsJsonNode(e,h.ChildDeploymentInfo.standalone()),t)}getAsJsonNode(e,t=h.ChildDeploymentInfo.standalone()){const r=i.JsonNode.getEmpty();this.expandPropertiesNode(r);const n=i.JsonNode.getEmpty();this.expandRequiredNode(n);const l=this.buildUIObject(e,t),m=this.buildValueConstraintsObject(e,t),f={[s.CedarModel.type]:this.atomicWriter.write(d.JavascriptType.OBJECT)};return this.expandTypeNode(f,e),e.extensions.applyJson({[o.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[o.JsonSchema.atType]:this.atomicWriter.write(e.cedarArtifactType),[o.JsonSchema.atContext]:this.macroContext(e),...f,[c.TemplateProperty.title]:e.title,[c.TemplateProperty.description]:e.description,...l,...m,...r,...n,...this.macroAnnotations(e),...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroSkos(e),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[o.JsonSchema.schemaVersion]:this.atomicWriter.write(a.SchemaVersion.CURRENT),[c.TemplateProperty.additionalProperties]:this.atomicWriter.write(p.AdditionalProperties.FALSE),...this.macroSchemaIdentifier(e),[s.CedarModel.schema]:this.atomicWriter.write(u.ArtifactSchema.CURRENT)})}macroContext(e){const t=g.ReaderUtil.deepClone(l.JsonTemplateFieldContentDynamic.CONTEXT_VERBATIM);return e.language!==E.Language.NULL&&(t[o.JsonSchema.atLanguage]=this.atomicWriter.write(e.language)),t}}t.JsonTemplateFieldWriterInternal=I},6320(e,t,r){t.JsonTemplateInstanceWriter=void 0;const n=r(9868),a=r(1625),i=r(9167),s=r(8748),o=r(2733),l=r(936),d=r(9517),c=r(3161),u=r(350),m=r(7723),p=r(5222),h=r(4877),f=r(9327),y=r(3644),T=r(8193),C=r(7571),E=r(7548),g=r(4465),I=r(4033);class A extends c.JsonAbstractArtifactWriter{constructor(e,t){super(e,t)}macroContext(e){return u.JsonTemplateInstanceContent.CONTEXT_VERBATIM}static getFor(e,t){return new A(e,t)}buildContext(e){const t=s.ReaderUtil.deepClone(u.JsonTemplateInstanceContent.CONTEXT_VERBATIM);return Object.keys(e.dataContainer.iris).forEach(r=>{t[r]=e.dataContainer.iris[r]}),{...t}}getDataTree(e){const t=d.JsonNode.getEmpty();return this.serializeDataLevelInto(e.dataContainer,t,!0),t}serializeDataLevelInto(e,t,r=!1){r||(t[o.JsonSchema.atId]=""===e.id?null:e.id),Object.keys(e.values).forEach(r=>{const n=e.values[r];if(Array.isArray(n)){const e=d.JsonNode.getEmptyList();t[r]=e,n.forEach((t,r)=>{if(t instanceof y.InstanceDataAttributeValueFieldName){const r=t.name;return void(r.trim().length>0&&e.push(r))}const n=this.serializeCommonType(t);null!==n&&e.push(n)})}else{const e=this.serializeCommonType(n);if(null!==e&&(t[r]=e),n instanceof f.InstanceDataAttributeValueField){const e=[];Object.keys(n.values).forEach(t=>{e.push(t)}),t[r]=e}}}),this.serializeAttributeValueFields(e,t);const n=d.JsonNode.getEmpty();Object.keys(e.iris).forEach(t=>{n[t]=e.iris[t]}),t[o.JsonSchema.atContext]=n}static writeValueNode(e){const t=this.writeValueNodeWithoutNotation(e);return null!==t&&"language"in e&&null!==e.language&&(t[o.JsonSchema.atLanguage]=e.language),null!==t&&"notation"in e&&null!==e.notation&&(t[o.JsonSchema.skosNotation]=e.notation),null!==t&&"preferredLabel"in e&&null!==e.preferredLabel&&(t[l.CedarModel.skosPrefLabel]=e.preferredLabel),t}static writeValueNodeWithoutNotation(e){return e instanceof a.InstanceDataNotationAtom?null===e.type?d.JsonNode.getEmpty():{[o.JsonSchema.atType]:e.type}:e instanceof p.InstanceDataStringAtom?{[o.JsonSchema.atValue]:e.value,...null===e.label?{}:{[o.JsonSchema.rdfsLabel]:e.label}}:e instanceof h.InstanceDataTypedAtom?{[o.JsonSchema.atValue]:e.value,...null===e.label?{}:{[o.JsonSchema.rdfsLabel]:e.label},[o.JsonSchema.atType]:e.type}:e instanceof i.InstanceDataLabelAtom?{[o.JsonSchema.rdfsLabel]:e.label,...null===e.type?{}:{[o.JsonSchema.atType]:e.type}}:e instanceof T.InstanceDataControlledAtom?{[o.JsonSchema.atId]:e.id,[o.JsonSchema.rdfsLabel]:e.label,...null===e.type?{}:{[o.JsonSchema.atType]:e.type}}:e instanceof C.InstanceDataLinkAtom?{[o.JsonSchema.atId]:e.id,...null===e.type?{}:{[o.JsonSchema.atType]:e.type}}:e instanceof E.InstanceDataEmptyAtom||e instanceof g.InstanceDataEmptyNode?d.JsonNode.getEmpty():null}serializeCommonType(e){if(e instanceof m.InstanceDataContainer){const t=d.JsonNode.getEmpty();return this.serializeDataLevelInto(e,t),t}return A.writeValueNode(e)}serializeAtomString(e){return{[o.JsonSchema.atValue]:e.value,...null===e.label?{}:{[o.JsonSchema.rdfsLabel]:e.label}}}serializeAttributeValueFields(e,t){Object.keys(e.values).forEach(r=>{const n=e.values[r];n instanceof f.InstanceDataAttributeValueField&&Object.keys(n.values).forEach(e=>{const r=n.values[e];r instanceof p.InstanceDataStringAtom&&(t[e]=this.serializeAtomString(r))})})}getAsJsonString(e,t=2){return(0,n.stringifyInstance)(this.getAsJsonNode(e),e.dataContainer,t)}getAsJsonNode(e){I.AttributeValueNamePolicy.assertValid(e.dataContainer);const t=this.buildContext(e),r=this.macroSchemaNameAndDescription(e);return e.descriptionWasAbsent&&""===e.schema_description&&delete r[o.JsonSchema.schemaDescription],{[o.JsonSchema.atId]:this.atomicWriter.write(e.at_id),...r,...this.getDataTree(e),...this.macroAnnotations(e),[o.JsonSchema.atContext]:t,...this.macroIsBasedOn(e),[o.JsonSchema.schemaDescription]:e.schema_description,...this.macroProvenance(e,this.atomicWriter),...this.macroDerivedFrom(e)}}}t.JsonTemplateInstanceWriter=A},7519(e,t,r){t.JsonTemplateWriter=void 0;const n=r(8972),a=r(8557),i=r(8748),s=r(6551),o=r(2733),l=r(936),d=r(2763),c=r(5793),u=r(5747),m=r(2475),p=r(9932),h=r(8872),f=r(7752);class y extends h.JsonAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new y(e,t)}buildProperties(e){const t=i.ReaderUtil.deepClone(s.JsonTemplateContent.PROPERTIES_PARTIAL);e.language!==f.Language.NULL&&(t[o.JsonSchema.atContext][o.JsonSchema.atLanguage]=this.atomicWriter.write(e.language));const r=e.getChildrenInfo().getIRIMap();t[o.JsonSchema.atContext][o.JsonSchema.properties]={...t[o.JsonSchema.atContext][o.JsonSchema.properties],...r};const n=e.getChildrenInfo().getChildNamesWithIri();t[o.JsonSchema.atContext][o.JsonSchema.required]=[...t[o.JsonSchema.atContext][o.JsonSchema.required],...n],e.getChildrenInfo().hasAttributeValue()&&(t[o.JsonSchema.atContext][u.TemplateProperty.additionalProperties]=p.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE);const a={...t,...this.getChildMapAsJson(e)};return this.expandInstanceTypeSpecification(e,a),a}getAsJsonString(e,t=2){return(0,n.stringifySchema)(this.getAsJsonNode(e),t)}getAsJsonNode(e){const t=this.buildProperties(e),r={[l.CedarModel.order]:e.getChildrenInfo().getChildrenNames(),[l.CedarModel.propertyLabels]:e.getChildrenInfo().getPropertyLabelMap(e),[l.CedarModel.propertyDescriptions]:e.getChildrenInfo().getPropertyDescriptionMap(e)};return this.behavior.outputPages()&&(r[l.CedarModel.pages]=[]),null!==e.header&&(r[l.CedarModel.header]=e.header),null!==e.footer&&(r[l.CedarModel.footer]=e.footer),e.extensions.applyJson({[o.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[o.JsonSchema.atType]:this.atomicWriter.write(d.CedarArtifactType.TEMPLATE),[o.JsonSchema.atContext]:this.macroContext(e),[l.CedarModel.type]:this.atomicWriter.write(c.JavascriptType.OBJECT),[u.TemplateProperty.title]:e.title,[u.TemplateProperty.description]:e.description,[l.CedarModel.ui]:r,[o.JsonSchema.properties]:t,[o.JsonSchema.required]:[...s.JsonTemplateContent.REQUIRED_PARTIAL,...e.getChildrenInfo().getChildrenNamesForRequired()],[u.TemplateProperty.additionalProperties]:this.atomicWriter.write(e.getAdditionalProperties()),...this.macroAnnotations(e),...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[o.JsonSchema.schemaVersion]:this.atomicWriter.write(a.SchemaVersion.CURRENT),...this.macroSchemaIdentifier(e),[l.CedarModel.schema]:this.atomicWriter.write(m.ArtifactSchema.CURRENT)})}}t.JsonTemplateWriter=y},9868(e,t,r){t.stringifyInstance=function(e,t,r){return JSON.stringify(function e(t,r){const i={...t},s=new Map;for(const[o,l]of Object.entries(r.values))l instanceof a.InstanceDataAttributeValueField?s.set(o,t[o]):l instanceof n.InstanceDataContainer?i[o]=e(t[o],l):Array.isArray(l)&&Array.isArray(t[o])&&(i[o]=t[o].map((t,r)=>l[r]instanceof n.InstanceDataContainer?e(t,l[r]):t));const o=Object.keys(r.values),l=new Set([...o,...[...s.values()].flat()]),d=Object.keys(i).filter(e=>!l.has(e)),c=o.flatMap(e=>[e,...s.get(e)??[]]).filter(e=>Object.hasOwn(i,e)),u=d.findIndex(e=>"_annotations"===e||"@context"===e);return d.splice(u<0?d.length:u,0,...c),new Proxy(i,{ownKeys:()=>d})}(e,t),null,r)};const n=r(7723),a=r(9327)},8972(e,t,r){t.stringifySchema=function(e,t){return JSON.stringify(function e(t){if(Array.isArray(t))return t.map(e);if(!i(t))return t;const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,e(r)])),n=r._ui,s=i(n)?n.order:void 0;if(Array.isArray(s)&&s.every(e=>"string"==typeof e)&&i(n)&&i(r.properties)){const e=new Set(s),t=r.properties;r.properties=a(t,[...Object.keys(t).filter(t=>!e.has(t)),...s]);const o=t["@context"];i(o)&&i(o.properties)&&(o.properties=a(o.properties,[...Object.keys(o.properties).filter(t=>!e.has(t)),...s]));for(const e of["propertyLabels","propertyDescriptions"]){const t=n[e];i(t)&&(n[e]=a(t,s))}}return r}(e),null,t).replace(/"(?:\\.|[^"\\])*"|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,e=>e.startsWith('"')?e:(0,n.javaPlainDecimal)(Number(e)))};const n=r(7120);function a(e,t){const r=[...new Set([...t.filter(t=>Object.hasOwn(e,t)),...Object.keys(e)])];return new Proxy(e,{ownKeys:()=>r})}function i(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}},5359(e,t,r){t.CedarYamlWriters=void 0;const n=r(4869),a=r(1933),i=r(8354),s=r(2418),o=r(9184),l=r(2395),d=r(7432),c=r(6116),u=r(2342),m=r(2287),p=r(836),h=r(7436),f=r(7594),y=r(1784),T=r(6082),C=r(4935),E=r(6314),g=r(1903),I=r(5251),A=r(1521),b=r(1038),R=r(3292),S=r(9821),v=r(4500),_=r(3080),N=r(8136),w=r(9535),L=r(1181),F=r(765),V=r(3671),O=r(9532),D=r(4647),M=r(9411),B=r(9326),U=r(491),Y=r(4355),x=r(5587),J=r(6557),P=r(4077),k=r(3711),W=r(6967);class K{behavior;yamlDynamicFieldWriters;yamlStaticFieldWriters;yamlValueConstraintsWriters;yamlAtomicWriter;yamlAnnotationsWriter;yamlTemplateWriter;yamlTemplateElementWriter;yamlTemplateInstanceWriter;constructor(e){this.behavior=e,this.yamlAtomicWriter=new u.YamlAtomicWriter(e),this.yamlAnnotationsWriter=new m.YamlAnnotationsWriter(e),this.yamlTemplateWriter=a.YamlTemplateWriter.getFor(e,this),this.yamlTemplateElementWriter=I.YamlTemplateElementWriter.getFor(e,this),this.yamlTemplateInstanceWriter=B.YamlTemplateInstanceWriter.getFor(e,this),this.yamlDynamicFieldWriters=new Map([[n.CedarFieldType.TEXT,new c.YamlFieldWriterTextField(e,this)],[n.CedarFieldType.TEXTAREA,new p.YamlFieldWriterTextArea(e,this)],[n.CedarFieldType.CONTROLLED_TERM,new w.YamlFieldWriterControlledTerm(e,this)],[n.CedarFieldType.PHONE_NUMBER,new S.YamlFieldWriterPhoneNumber(e,this)],[n.CedarFieldType.EMAIL,new b.YamlFieldWriterEmail(e,this)],[n.CedarFieldType.LINK,new y.YamlFieldWriterLink(e,this)],[n.CedarFieldType.EXT_ROR,new U.YamlFieldWriterExtRor(e,this)],[n.CedarFieldType.EXT_ORCID,new Y.YamlFieldWriterExtOrcid(e,this)],[n.CedarFieldType.EXT_PFAS,new x.YamlFieldWriterExtPfas(e,this)],[n.CedarFieldType.EXT_PUBMED,new J.YamlFieldWriterExtPubmed(e,this)],[n.CedarFieldType.EXT_RRID,new P.YamlFieldWriterExtRrid(e,this)],[n.CedarFieldType.EXT_NIH_GRANT_ID,new k.YamlFieldWriterExtNihGrantId(e,this)],[n.CedarFieldType.EXT_DOI,new W.YamlFieldWriterExtDoi(e,this)],[n.CedarFieldType.NUMERIC,new R.YamlFieldWriterNumeric(e,this)],[n.CedarFieldType.TEMPORAL,new h.YamlFieldWriterTemporal(e,this)],[n.CedarFieldType.RADIO,new N.YamlFieldWriterRadio(e,this)],[n.CedarFieldType.CHECKBOX,new v.YamlFieldWriterCheckbox(e,this)],[n.CedarFieldType.SINGLE_SELECT_LIST,new _.YamlFieldWriterList(e,this)],[n.CedarFieldType.MULTIPLE_SELECT_LIST,new _.YamlFieldWriterList(e,this)],[n.CedarFieldType.ATTRIBUTE_VALUE,new A.YamlFieldWriterAttributeValue(e,this)]]),this.yamlStaticFieldWriters=new Map([[n.CedarFieldType.STATIC_PAGE_BREAK,new f.YamlFieldWriterStaticPageBreak(e,this)],[n.CedarFieldType.STATIC_SECTION_BREAK,new T.YAMLFieldWriterStaticSectionsBreak(e,this)],[n.CedarFieldType.STATIC_IMAGE,new C.YamlFieldWriterStaticImage(e,this)],[n.CedarFieldType.STATIC_RICH_TEXT,new E.YamlFieldWriterStaticRichText(e,this)],[n.CedarFieldType.STATIC_YOUTUBE,new g.YamlFieldWriterStaticYoutube(e,this)]]),this.yamlValueConstraintsWriters=new Map([[i.ControlledTermOntology.className,new L.YamlValueConstraintsOntologyWriter(e,this)],[s.ControlledTermClass.className,new F.YamlValueConstraintsClassWriter(e,this)],[o.ControlledTermBranch.className,new V.YamlValueConstraintsBranchWriter(e,this)],[l.ControlledTermValueSet.className,new O.YamlValueConstraintsValueSetWriter(e,this)],[d.ControlledTermAction.className,new D.YamlValueConstraintsActionWriter(e,this)]])}static getStrict(){return new K(M.YamlWriterBehavior.STRICT)}static getFor(e){return new K(e)}getFieldWriterForType(e){let t;if(t=e.isStaticField?this.yamlStaticFieldWriters.get(e):this.yamlDynamicFieldWriters.get(e),t)return t;throw new Error(`No YAML writer found for field type: ${e.getValue()}`)}getFieldWriterForField(e){return this.getFieldWriterForType(e.cedarFieldType)}getAtomicWriter(){return this.yamlAtomicWriter}getAnnotationsWriter(){return this.yamlAnnotationsWriter}getTemplateWriter(){return this.yamlTemplateWriter}getTemplateElementWriter(){return this.yamlTemplateElementWriter}getTemplateInstanceWriter(){return this.yamlTemplateInstanceWriter}getWriterForValueConstraint(e){const t=e.className,r=this.yamlValueConstraintsWriters.get(t);if(r)return r;throw new Error(`No YAML writer found for class type: ${t}`)}}t.CedarYamlWriters=K},7120(e,t){t.javaPlainDecimal=function(e){if(!Number.isFinite(e))throw new RangeError("Expected a finite number");if(0===e)return"0";if(Number.isSafeInteger(e))return String(e);const t=e<0?"-":"",r=Math.abs(e),n=new DataView(new ArrayBuffer(8));n.setFloat64(0,r);const a=n.getBigUint64(0),i=Number(a>>52n&2047n),s=a&(1n<<52n)-1n|(i?1n<<52n:0n),o=i?i-1075:-1074,l=s.toString(2).length,d=o+l-1;let c=s,u=1n;if(o>=0?c<<=BigInt(o):u<<=BigInt(-o),d<=62&&c%u===0n){let e=c/u;const r=d>l?(1n<<BigInt(d-l-1)).toString().length-1:0,n=10n**BigInt(r);return e=(e+n/2n)/n*n,t+String(e)}let m=Math.floor(.289529654*(Number(s)/2**(l-1)-1.5)+.176091259+.301029995663981*d),p=c,h=u;m>=0?h*=10n**BigInt(m):p*=10n**BigInt(-m);const f=o-1-(0n==(s&s-1n)?1:0);let y=1n,T=1n;function C(e,t){for(;t;)[e,t]=[t,e%t];return e}f>=0?y<<=BigInt(f):T<<=BigInt(-f),m>=0?T*=10n**BigInt(m):y*=10n**BigInt(-m);let E=h/C(h,T)*T;function g(e){let t=0;for(;0n==(1n&e);)e>>=1n,t++;return t}function I(e){return 0===e?0:e<27?(5n**BigInt(e)).toString(2).length:3*e}p*=E/h,y*=E/T,h=E,E=C(C(p,h),y),p/=E,h/=E,y/=E;const A=l-g(s)+g(p)+I(Math.max(0,-m)),b=g(h)+1+I(Math.max(0,m)+1),R=A<32&&b<32?32:A<64&&b<64?64:0,S=e=>R?BigInt.asIntN(R,e):e,v=10n*h;let _=0n,N=0,w=!0;for(;;){const e=p/h;p=p%h*10n,y=S(10n*y);let t=y<=0n||p<y,r=y<=0n||(R?S(p+y)>v:p+y>=v);if(w&&0n===e&&!r?m--:(_=10n*_+e,N++),w&&(m<-3||m>=8)&&(t=!1,r=!1),w=!1,t||r){const e=S(S(2n*p)-v);r&&(!t||e>0n||0n===e&&_%2n==1n)&&_++;break}}let L=String(_);const F=m-N+1;if(F>=0)return t+L+"0".repeat(F);const V=L.length+F;return L=V>0?L.slice(0,V)+"."+L.slice(V):"0."+"0".repeat(-V)+L,t+L.replace(/\.?0+$/,"")}},6574(e,t,r){var n,a=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}: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}),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),s=0;s<r.length;s++)"default"!==r[s]&&a(t,e,r[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleYamlSerializer=void 0;const o=r(7120),l=s(r(3198)),d=r(1100),c={blockQuote:"literal",doubleQuotedMinMultiLineLength:1e9,lineWidth:0,minContentWidth:0,defaultStringType:"QUOTE_DOUBLE",defaultKeyType:"PLAIN",doubleQuotedAsJSON:!0},u=new Map([[0,"0"],[7,"a"],[8,"b"],[9,"t"],[10,"n"],[11,"v"],[12,"f"],[13,"r"],[27,"e"],[34,'"'],[92,"\\"],[133,"N"],[160,"_"],[8232,"L"],[8233,"P"]]);function m(e){let t='"';for(const r of e){const e=r.codePointAt(0),n=u.get(e);t+=void 0!==n?"\\"+n:e<32||e>=127&&e<=159?"\\x"+e.toString(16).padStart(2,"0"):e>=55296&&e<=57343||65534===e||65535===e?"\\u"+e.toString(16).padStart(4,"0"):r}return t+'"'}t.SimpleYamlSerializer=class{static serialize(e){const t=new WeakMap,r=new l.default.Document(e,{customTags:e=>e.map(e=>"string"!=typeof e&&void 0===e.collection&&"tag:yaml.org,2002:str"===e.tag?{...e,stringify(r,n,a,i){const s=t.get(r);if(void 0!==s)return s;const o=e.stringify(r,n,a,i);return o.startsWith('"')?m(String(r.value)):o}}:"string"==typeof e||void 0!==e.collection||"tag:yaml.org,2002:float"!==e.tag&&"tag:yaml.org,2002:int"!==e.tag?e:{...e,stringify:(t,r,n,a)=>"number"==typeof t.value&&Number.isFinite(t.value)?(0,o.javaPlainDecimal)(t.value):e.stringify(t,r,n,a)})});return(0,l.visit)(r,{Scalar(e,r,n){if("key"===e&&"string"==typeof r.value){const e=(0,d.yamlKeyNeedsQuoting)(r.value);r.type=e?l.Scalar.QUOTE_DOUBLE:l.Scalar.PLAIN,r.value.length>=128&&(t.set(r,e?m(r.value):r.value),r.type=l.Scalar.BLOCK_LITERAL)}else if("value"===e&&"string"==typeof r.value){const e=n.at(-1);(0,l.isPair)(e)&&(0,l.isScalar)(e.key)&&"string"==typeof e.key.value&&(0,d.mayWriteYamlValuePlain)(e.key.value,r.value)&&(r.type=l.Scalar.PLAIN)}}}),r.toString(c).trim()+"\n"}}},211(e,t,r){t.YamlAbstractArtifactWriter=void 0;const n=r(2112),a=r(8333),i=r(9517),s=r(2099),o=r(3910),l=r(1027),d=r(9129),c=r(8534),u=r(2234),m=r(9857),p=r(7661),h=r(9499),f=r(3281),y=r(6731),T=r(6591),C=r(7752),E=r(8557),g=r(2272);class I extends n.AbstractArtifactWriter{behavior;writers;atomicWriter;annotationsWriter;constructor(e,t){super(),this.behavior=e,this.writers=t,this.atomicWriter=t.getAtomicWriter(),this.annotationsWriter=t.getAnnotationsWriter()}macroNameAndDescription(e){const t=i.JsonNode.getEmpty();return e instanceof a.AbstractSchemaArtifact&&e.language!==C.Language.NULL&&(t[s.YamlKeys.language]=this.atomicWriter.write(e.language)),t[s.YamlKeys.name]=e.schema_name,""!==e.schema_description&&(t[s.YamlKeys.description]=e.schema_description),t}macroStatusAndVersion(e,t){const r=i.JsonNode.getEmpty();return t||(e.bibo_status!==o.BiboStatus.NULL&&(r[s.YamlKeys.status]=this.atomicWriter.write(e.bibo_status)),e.pav_version!==l.PavVersion.NULL&&(r[s.YamlKeys.version]=this.atomicWriter.write(e.pav_version)),r[s.YamlKeys.modelVersion]=this.atomicWriter.write(E.SchemaVersion.CURRENT)),r}macroInstanceType(e){const t=i.JsonNode.getEmpty();return e.instanceTypeSpecifications.length>0&&(t[s.YamlKeys.instanceType]=1===e.instanceTypeSpecifications.length?e.instanceTypeSpecifications[0]:[...e.instanceTypeSpecifications]),t}macroSkos(e){const t=i.JsonNode.getEmpty();return null!==e.skos_prefLabel&&(t[s.YamlKeys.prefLabel]=e.skos_prefLabel),null!==e.skos_altLabel&&e.skos_altLabel.length>0&&(t[s.YamlKeys.altLabels]=e.skos_altLabel),t}macroStandaloneFieldFlags(e){const t=i.JsonNode.getEmpty();return e.hidden&&(t[s.YamlKeys.hidden]=!0),e.continuePreviousLine&&(t[s.YamlKeys.continuePreviousLine]=!0),t}macroStandaloneFieldConfiguration(e){const t=i.JsonNode.getEmpty();return e.cedarFieldType.recordsRequirement&&(e.requiredValue&&(t[s.YamlKeys.required]=!0),e.recommendedValue&&(t[s.YamlKeys.recommended]=!0)),i.JsonNode.hasEntries(t)?{[s.YamlKeys.configuration]:t}:{}}macroValueRecommendation(e){const t=i.JsonNode.getEmpty();return(e instanceof y.ControlledTermFieldImpl||e instanceof T.TextFieldImpl)&&e.valueRecommendationEnabled&&(t[s.YamlKeys.valueRecommendation]=e.valueRecommendationEnabled),t}macroProvenance(e,t){const r=i.JsonNode.getEmpty();return t||(e.pav_createdOn!==m.IsoDate.NULL&&(r[s.YamlKeys.createdOn]=this.atomicWriter.write(e.pav_createdOn)),e.pav_createdBy!==u.CedarUser.NULL&&(r[s.YamlKeys.createdBy]=this.atomicWriter.write(e.pav_createdBy)),e.pav_lastUpdatedOn!==m.IsoDate.NULL&&(r[s.YamlKeys.modifiedOn]=this.atomicWriter.write(e.pav_lastUpdatedOn)),e.oslc_modifiedBy!==u.CedarUser.NULL&&(r[s.YamlKeys.modifiedBy]=this.atomicWriter.write(e.oslc_modifiedBy))),r}macroSchemaIdentifier(e){const t=i.JsonNode.getEmpty();return null!==e.schema_identifier&&(t[s.YamlKeys.identifier]=e.schema_identifier),t}macroType(e){const t=i.JsonNode.getEmpty();return t[s.YamlKeys.type]=this.getYamlType(e),t}macroId(e,t=!1,r=!0){const n=i.JsonNode.getEmpty();return e.at_id===c.CedarArtifactId.NULL||t&&!r||(n[s.YamlKeys.id]=this.atomicWriter.write(e.at_id)),n}macroDerivedFrom(e,t){const r=i.JsonNode.getEmpty();return t||e.pav_derivedFrom!==c.CedarArtifactId.NULL&&(r[s.YamlKeys.derivedFrom]=this.atomicWriter.write(e.pav_derivedFrom)),r}macroIsBasedOn(e){const t=i.JsonNode.getEmpty();return e.schema_isBasedOn!==c.CedarArtifactId.NULL&&(t[s.YamlKeys.isBasedOn]=this.atomicWriter.write(e.schema_isBasedOn)),t}macroPreviousVersion(e,t){const r=i.JsonNode.getEmpty();return t||e.pav_previousVersion!==c.CedarArtifactId.NULL&&(r[s.YamlKeys.previousVersion]=this.atomicWriter.write(e.pav_previousVersion)),r}macroAnnotations(e){return this.annotationsWriter.write(e.annotations)}getYamlType(e){return e instanceof f.Template?h.YamlArtifactType.TEMPLATE.getValue():e instanceof p.TemplateElement?h.YamlArtifactType.ELEMENT.getValue():e instanceof d.TemplateField?e.cedarFieldType.getYamlType().getValue():e instanceof g.TemplateInstance?h.YamlArtifactType.TEMPLATE_INSTANCE.getValue():void 0}}t.YamlAbstractArtifactWriter=I},5386(e,t,r){t.YamlAbstractContainerArtifactWriter=void 0;const n=r(8198),a=r(8878),i=r(9517),s=r(9129),o=r(211),l=r(2099),d=r(3812),c=r(9519),u=r(5692),m=r(699),p=r(513);class h extends o.YamlAbstractArtifactWriter{getChildListAsJSON(e,t){const r=i.JsonNode.getEmptyList();return e.getChildrenInfo().getChildrenNames().forEach(n=>{const a=e.getChild(n);if(null!=a){let o=i.JsonNode.getEmpty();const d=e.getChildrenInfo().get(n);if(null!==d){o[l.YamlKeys.key]=n,o=a instanceof s.TemplateField?{...o,...this.writers.getFieldWriterForType(a.cedarFieldType).getYamlAsJsonNode(a,d,t,!1)}:{...o,...this.writers.getTemplateElementWriter().getYamlAsJsonNode(a,t,!1)};const e=this.getDeploymentInfo(a,d,t);i.JsonNode.hasEntries(e)&&(o[l.YamlKeys.configuration]=e),r.push(o)}}}),r}getDeploymentInfo(e,t,r){const o=i.JsonNode.getEmpty();if(t instanceof d.AbstractDynamicChildDeploymentInfo){const n=!(e instanceof s.TemplateField)||e.cedarFieldType.recordsRequirement;t.requiredValue&&n&&(o[l.YamlKeys.required]=!0),t.hidden&&(o[l.YamlKeys.hidden]=!0),t.recommendedValue&&n&&(o[l.YamlKeys.recommended]=!0),null!==t.iri&&(r||(o[l.YamlKeys.propertyIri]=t.iri))}t instanceof d.AbstractDynamicChildDeploymentInfo||!t.hidden||(o[l.YamlKeys.hidden]=!0),null!==t.label&&t.label!==e?.schema_name&&(o[l.YamlKeys.overrideLabel]=t.label),null!==t.description&&t.description!==e?.schema_description&&(o[l.YamlKeys.overrideDescription]=t.description),t instanceof c.AbstractFieldChildDeploymentInfo&&(t.continuePreviousLine&&(o[l.YamlKeys.continuePreviousLine]=!0),t.valueRecommendationEnabled&&e instanceof s.TemplateField&&e.supportsValueRecommendation()&&(o[l.YamlKeys.valueRecommendation]=!0));const{isMultiInstance:h,minItems:f,maxItems:y}=u.WriterUtil.getMultiMinMax(e,t);let T=f;const C=y;return h&&(null===T&&(T=p.AbstractChildDeploymentInfo.defaultMinItems),e?.isMultiInstanceByDefinition()||e?.isSingleInstanceByDefinition()?t instanceof a.ChildDeploymentInfoAlwaysMultiple&&(null!==t.declaredMinItems&&t.declaredMinItems!==t.defaultMinItems&&(o[l.YamlKeys.minItems]=T),null!==t.declaredMaxItems&&C!==n.UNBOUNDED_MAX_ITEMS&&(o[l.YamlKeys.maxItems]=C)):(o[l.YamlKeys.multiple]=!0,T!==p.AbstractChildDeploymentInfo.defaultMinItems&&(o[l.YamlKeys.minItems]=T),null!==C&&C!==n.UNBOUNDED_MAX_ITEMS&&(o[l.YamlKeys.maxItems]=C))),(0,m.isSizedStaticField)(e)&&(null!==e.width&&(o[l.YamlKeys.width]=e.width),null!==e.height&&(o[l.YamlKeys.height]=e.height)),o}}t.YamlAbstractContainerArtifactWriter=h},2287(e,t,r){t.YamlAnnotationsWriter=void 0;const n=r(9517),a=r(2787),i=r(3549),s=r(2099);t.YamlAnnotationsWriter=class{behavior;constructor(e){this.behavior=e}write(e){const t=n.JsonNode.getEmpty(),r=n.JsonNode.getEmpty();return null!==e&&e.getSize()>0&&(e.getAnnotationNames().forEach(t=>{const n=e.get(t);if(n instanceof a.AnnotationAtId){const e={[s.YamlKeys.id]:n.getAtId()};r[t]=e}else if(n instanceof i.AnnotationAtValue){const e={[s.YamlKeys.value]:n.getAtValue()};r[t]=e}}),t[s.YamlKeys.annotations]=r),t}}},2342(e,t,r){t.YamlAtomicWriter=void 0;const n=r(2022),a=r(4872),i=r(4531),s=r(3910);class o extends a.JsonAtomicWriter{constructor(e){super(n.JsonWriterBehavior.STRICT)}writeCedarArtifactType(e){return e.getYamlValue()}write(e){return null==e?null:e instanceof s.BiboStatus?this.writeBiboStatusYaml(e):e instanceof i.BioportalTermType?this.writeBioportalTermTypeYaml(e):super.write(e)}writeBiboStatusYaml(e){return e.getYamlValue()}writeBioportalTermTypeYaml(e){return e.getYamlValue()}}t.YamlAtomicWriter=o},1100(e,t,r){t.mayWriteYamlValuePlain=function(e,t){return(f.get(e)?.has(t)??(("version"===e||"modelVersion"===e)&&h.test(t)))&&(r=t,!(u.some(e=>e.test(r))||function(e){for(const t of e){const e=t.codePointAt(0)??0;if(9===e||13===e||e<=31&&10!==e||e>=127&&e<=160||5760===e||e>=8192&&e<=8202||8232===e||8233===e||8239===e||8287===e||12288===e||65279===e||e>=55296&&e<=57343||65534===e||65535===e)return!0}return e.startsWith(" ")||e.endsWith(" ")||e.includes(" \n")||0===e.length}(r)));var r},t.yamlKeyNeedsQuoting=function(e){return!/^[A-Za-z_](?:[A-Za-z0-9_ -]*[A-Za-z0-9_-])?$(?![\s\S])/.test(e)||/^(y|yes|n|no|true|false|on|off|null)$/i.test(e)};const n=r(8349),a=r(4531),i=r(3910),s=r(3447),o=r(7974),l=r(8588),d=r(3764),c=r(9499),u=[/^\d{4}-\d{1,2}-\d{1,2}(?:$|[Tt ])/,/^(y|Y|n|N|yes|Yes|YES|no|No|NO|on|On|ON|off|Off|OFF|true|True|TRUE|false|False|FALSE)$/,/^(null|Null|NULL|~|<<|=)$/,/^[-+]?[0-9][0-9_]*$/,/^[-+]?0[xX][0-9a-fA-F_]+$/,/^[-+]?0[bB][01_]+$/,/^[-+]?0[oO]?[0-7_]+$/,/^[-+]?[0-9_]*\.?[0-9_]+([eE][-+]?[0-9]+)?$/,/^[-+]?\.(inf|Inf|INF|nan|NaN|NAN)$/,/^[-+]?[0-9][0-9_]*(:[0-5]?[0-9])+(\.[0-9_]*)?$/];const m=new Set([...Object.values(c.YamlArtifactTypeValues),"element-instance",n.YamlValues.Controlled.class,a.BioportalTermTypeYamlValues.VALUE,n.YamlValues.Controlled.ontology,n.YamlValues.Controlled.branch,n.YamlValues.Controlled.valueSet]),p=new Set(["xsd:string","xsd:anyUri",...Object.values(l.TemporalTypeValues),...Object.values(s.NumberTypeValues),n.YamlValues.iri]),h=/^\d+\.\d+\.\d+$/,f=new Map([["type",m],["status",new Set(Object.values(i.BiboStatusYamlValues))],["datatype",p],["action",new Set(["move","delete"])],["granularity",new Set(Object.values(o.TemporalGranularityValues))],["termType",new Set(Object.values(a.BioportalTermTypeYamlValues))],["inputTimeFormat",new Set(Object.values(d.TimeFormatValues))]]);new Set([...f.keys(),"version","modelVersion"])},5251(e,t,r){t.YamlTemplateElementWriter=void 0;const n=r(9517),a=r(6574),i=r(2099),s=r(5386);class o extends s.YamlAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new o(e,t)}getYamlAsJsonNode(e,t=!1,r=!0){const a=n.JsonNode.getEmpty();null!==e.header&&(a[i.YamlKeys.header]=e.header),null!==e.footer&&(a[i.YamlKeys.footer]=e.footer);const s={...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,t,r),...this.macroStatusAndVersion(e,t),...this.macroInstanceType(e),...a,...this.macroPreviousVersion(e,t),...this.macroDerivedFrom(e,t),...this.macroProvenance(e,t),...this.macroSkos(e),...this.macroAnnotations(e)},o=this.getChildListAsJSON(e,t);return o.length>0&&(s[i.YamlKeys.children]=o),e.extensions.applyYaml(s)}getAsYamlString(e,t=!1){return a.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,t))}}t.YamlTemplateElementWriter=o},5430(e,t,r){t.YamlTemplateFieldWriterInternal=void 0;const n=r(9517),a=r(936),i=r(455),s=r(2099),o=r(211),l=r(6574);class d extends o.YamlAbstractArtifactWriter{constructor(e,t){super(e,t)}getAsYamlString(e,t=!1){return l.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,i.ChildDeploymentInfo.empty(),t))}getYamlAsJsonNode(e,t=i.ChildDeploymentInfo.empty(),r=!1,n=!0){const a=this.buildUIObject(e,t),s=this.buildValueConstraintsObject(e,t);return e.extensions.applyYaml({...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,r,n),...this.macroStatusAndVersion(e,r),...this.macroSkos(e),...a,...s,...this.macroPreviousVersion(e,r),...this.macroDerivedFrom(e,r),...this.macroProvenance(e,r),...this.macroAnnotations(e),...n?this.macroStandaloneFieldFlags(e):{},...this.macroValueRecommendation(e),...n?this.macroStandaloneFieldConfiguration(e):{}})}expandUINodeForYAML(e){return n.JsonNode.getEmpty()}expandValueConstraintsNodeForYAML(e,t,r){}buildValueConstraintsObject(e,t){const r=n.JsonNode.getEmpty();return this.expandValueConstraintsNodeForYAML(r,e,t),r}expandLiterals(e,t){const r=n.JsonNode.getEmptyList();e.valueConstraints.literals.forEach(e=>{const t=n.JsonNode.getEmpty();t[a.CedarModel.label]=e.label,(e.statesSelectedByDefault||e.selectedByDefault)&&(t[s.YamlKeys.selected]=e.selectedByDefault),r.push(t)}),r.length>0&&(t[s.YamlKeys.values]=r)}buildUIObject(e,t){return this.expandUINodeForYAML(e)}}t.YamlTemplateFieldWriterInternal=d},9326(e,t,r){t.YamlTemplateInstanceWriter=void 0;const n=r(5588),a=r(1625),i=r(9167),s=r(9517),o=r(6574),l=r(211),d=r(7723),c=r(9327),u=r(5222),m=r(7571),p=r(4877),h=r(8193),f=r(2099),y=r(4033),T=r(3644),C="element-instance";class E extends l.YamlAbstractArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new E(e,t)}getYamlAsJsonNode(e,t=!1){return y.AttributeValueNamePolicy.assertValid(e.dataContainer),{...this.macroType(e),...this.macroNameAndDescription(e),...this.macroId(e,t,!0),...this.macroIsBasedOn(e),...this.macroDerivedFrom(e,t),...this.macroProvenance(e,t),...this.getDataTree(e,t),...this.macroAnnotations(e)}}getAsYamlString(e,t=!1){return o.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,t))}getDataTree(e,t){const r=s.JsonNode.getEmpty();return this.serializeDataLevelInto(e.dataContainer,r,t,!0),r}serializeDataLevelInto(e,t,r,n=!1){const a=s.JsonNode.getEmpty(),i=this.getUnpackedAttributeValueGroups(e),o=new Set(Array.from(i.values()).flat());Object.keys(e.values).forEach(t=>{if(i.has(t)||o.has(t))return;const n=e.values[t];if(Array.isArray(n)){const e=s.JsonNode.getEmptyList();n.forEach((t,n)=>{const a=this.serializeCommonType(t,r);if(null!==a&&s.JsonNode.hasEntries(a))e.push(a);else if(t instanceof d.InstanceDataContainer){const n={[f.YamlKeys.type]:C};!r&&this.hasId(t.id)&&(n[f.YamlKeys.id]=t.id),e.push(n)}}),e.length>0&&(a[t]=e)}else{const e=this.serializeCommonType(n,r);null!==e&&s.JsonNode.hasEntries(e)&&(a[t]=e)}}),s.JsonNode.hasEntries(a)&&(!this.hasId(e.id)||r&&!n||(t[f.YamlKeys.id]=e.id),t[f.YamlKeys.children]=a);const l=s.JsonNode.getEmpty();this.serializeAttributeValueFields(e,l,i,n),n||!s.JsonNode.hasEntries(t)&&!s.JsonNode.hasEntries(l)||(Object.hasOwn(t,f.YamlKeys.children)||(t[f.YamlKeys.type]=C),!r&&this.hasId(e.id)&&(t[f.YamlKeys.id]=e.id)),Object.assign(t,l)}serializeAttributeValueFields(e,t,r,a){Object.keys(e.values).forEach(i=>{const o=e.values[i];if((o instanceof c.InstanceDataAttributeValueField||r.has(i))&&n.ReservedNames.yamlKeys(a?"template":"element").has(i))throw new Error(`Attribute-value field key "${i}" is reserved for CEDAR YAML metadata.`);if(o instanceof c.InstanceDataAttributeValueField){const e=s.JsonNode.getEmpty();let r=!1;Object.keys(o.values).forEach(t=>{const n=o.values[t];if(n instanceof u.InstanceDataStringAtom){const a=this.serializeAtomString(n);null!==a&&(e[t]=a,r=!0)}}),r&&(t[i]=e)}});for(const[n,a]of r){const r=s.JsonNode.getEmpty();for(const t of a){const n=e.values[t];if(n instanceof u.InstanceDataStringAtom){const e=this.serializeAtomString(n);null!==e&&(r[t]=e)}}s.JsonNode.hasEntries(r)&&(t[n]=r)}}getUnpackedAttributeValueGroups(e){const t=new Map;for(const[r,n]of Object.entries(e.values)){if(!Array.isArray(n))continue;const e=n.filter(e=>e instanceof T.InstanceDataAttributeValueFieldName).map(e=>e.name).filter(e=>e.trim().length>0);e.length>0&&t.set(r,e)}return t}serializeCommonType(e,t){let r=this.serializeCommonTypeWithoutNotation(e,t);if("notation"in e&&null!==e.notation){const t=r??s.JsonNode.getEmpty();t[f.YamlKeys.notation]=e.notation,r=t}if("preferredLabel"in e&&null!==e.preferredLabel){const t=r??s.JsonNode.getEmpty();t[f.YamlKeys.prefLabel]=e.preferredLabel,r=t}return null!==r&&"language"in e&&null!==e.language&&(r[f.YamlKeys.language]=e.language),r}serializeCommonTypeWithoutNotation(e,t){if(e instanceof a.InstanceDataNotationAtom)return null===e.type?s.JsonNode.getEmpty():{[f.YamlKeys.datatype]:e.type};if(e instanceof u.InstanceDataStringAtom)return this.serializeAtomString(e);if(e instanceof p.InstanceDataTypedAtom)return null===e.value&&null===e.label&&null===e.notation&&null===e.preferredLabel?null:{[f.YamlKeys.datatype]:e.type,[f.YamlKeys.value]:e.value,...null===e.label?{}:{[f.YamlKeys.label]:e.label}};if(e instanceof i.InstanceDataLabelAtom)return{...null===e.type?{}:{[f.YamlKeys.datatype]:e.type},[f.YamlKeys.label]:e.label};if(e instanceof h.InstanceDataControlledAtom){const t=s.JsonNode.getEmpty();return null===e.type||!this.hasId(e.id)&&null===e.label&&null===e.notation||(t[f.YamlKeys.datatype]=e.type),this.hasId(e.id)&&(t[f.YamlKeys.id]=e.id),null!==e.label&&(t[f.YamlKeys.label]=e.label),s.JsonNode.hasEntries(t)?t:null}if(e instanceof m.InstanceDataLinkAtom)return this.serializeAtomLink(e);if(e instanceof d.InstanceDataContainer){const r=s.JsonNode.getEmpty();return this.serializeDataLevelInto(e,r,t),r}return null}serializeAtomString(e){return null===e.value&&null===e.label&&null===e.notation&&null===e.preferredLabel?null:{[f.YamlKeys.value]:e.value,...null===e.label?{}:{[f.YamlKeys.label]:e.label}}}serializeAtomLink(e){return this.hasId(e.id)?{...null===e.type?{}:{[f.YamlKeys.datatype]:e.type},[f.YamlKeys.id]:e.id}:null!==e.notation&&null!==e.type?{[f.YamlKeys.datatype]:e.type}:null}hasId(e){return null!==e&&""!==e}}t.YamlTemplateInstanceWriter=E},1933(e,t,r){t.YamlTemplateWriter=void 0;const n=r(9517),a=r(6574),i=r(2099),s=r(5386);class o extends s.YamlAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new o(e,t)}getYamlAsJsonNode(e,t=!1){const r=n.JsonNode.getEmpty();null!==e.header&&(r[i.YamlKeys.header]=e.header),null!==e.footer&&(r[i.YamlKeys.footer]=e.footer);const a={...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,t,!0),...this.macroStatusAndVersion(e,t),...this.macroInstanceType(e),...r,...this.macroPreviousVersion(e,t),...this.macroDerivedFrom(e,t),...this.macroProvenance(e,t),...this.macroAnnotations(e)},s=this.getChildListAsJSON(e,t);return s.length>0&&(a[i.YamlKeys.children]=s),e.extensions.applyYaml(a)}getAsYamlString(e,t=!1){return a.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,t))}}t.YamlTemplateWriter=o},1641(e,t,r){t.AbstractArtifactBuilder=void 0;const n=r(4443),a=r(8333),i=r(2763),s=r(9857),o=r(2234),l=r(1027),d=r(3910),c=r(8534),u=r(8557);class m{at_id=c.CedarArtifactId.NULL;title=null;description=null;schema_schemaVersion=u.SchemaVersion.CURRENT;pav_createdOn=s.IsoDate.NULL;pav_createdBy=o.CedarUser.NULL;pav_lastUpdatedOn=s.IsoDate.NULL;oslc_modifiedBy=o.CedarUser.NULL;extensions=new n.SchemaExtensions;withExtensions(e){return this.extensions=e,this}pav_version=l.PavVersion.DEFAULT;bibo_status=d.BiboStatus.DRAFT;schema_name=null;schema_description="";schema_identifier=null;pav_derivedFrom=c.CedarArtifactId.NULL;withAtId(e){return e instanceof c.CedarArtifactId?this.at_id=e:this.at_id=c.CedarArtifactId.forValue(e),this}withTitle(e){return this.title=e,this}withDescription(e){return this.description=e,this}withSchemaVersion(e){return this.schema_schemaVersion=e,this}withCreatedOn(e){return e instanceof s.IsoDate?this.pav_createdOn=e:this.pav_createdOn=s.IsoDate.forValue(e),this}withCreatedBy(e){return e instanceof o.CedarUser?this.pav_createdBy=e:this.pav_createdBy=o.CedarUser.forValue(e),this}withLastUpdatedOn(e){return e instanceof s.IsoDate?this.pav_lastUpdatedOn=e:this.pav_lastUpdatedOn=s.IsoDate.forValue(e),this}withModifiedBy(e){return e instanceof o.CedarUser?this.oslc_modifiedBy=e:this.oslc_modifiedBy=o.CedarUser.forValue(e),this}withVersion(e){return e instanceof l.PavVersion?this.pav_version=e:this.pav_version=l.PavVersion.forValue(e),this}withStatus(e){return e instanceof d.BiboStatus?this.bibo_status=e:this.bibo_status=d.BiboStatus.forJsonValue(e),this}withSchemaName(e){return this.schema_name=e,this}withSchemaDescription(e){return this.schema_description=e??"",this}withDerivedFrom(e){return this.pav_derivedFrom=e,this}withSchemaIdentifier(e){return this.schema_identifier=e,this}buildInternal(e){if(e.at_id=this.at_id,e.title=this.title,e.description=this.description,e.schema_schemaVersion=this.schema_schemaVersion,e.pav_createdOn=this.pav_createdOn,e.pav_createdBy=this.pav_createdBy,e.pav_lastUpdatedOn=this.pav_lastUpdatedOn,e.oslc_modifiedBy=this.oslc_modifiedBy,e.extensions=this.extensions,e.pav_version=this.pav_version,e.bibo_status=this.bibo_status,e.schema_name=this.schema_name,e.schema_description=this.schema_description,e.schema_identifier=this.schema_identifier,e.pav_derivedFrom=this.pav_derivedFrom,null===e.title&&null!==e.schema_name){const t=m.kindOf(e.cedarArtifactType);null!==t&&(e.title=(0,a.internalNameFor)(e.schema_name,t))}}static kindOf(e){return e===i.CedarArtifactType.TEMPLATE?"template":e===i.CedarArtifactType.TEMPLATE_ELEMENT?"element":e===i.CedarArtifactType.TEMPLATE_FIELD||e===i.CedarArtifactType.STATIC_TEMPLATE_FIELD?"field":null}}t.AbstractArtifactBuilder=m},2674(e,t,r){t.AbstractArtifact=void 0;const n=r(9857),a=r(2234),i=r(8534),s=r(2763);t.AbstractArtifact=class{at_id=i.CedarArtifactId.NULL;pav_createdOn=n.IsoDate.NULL;pav_createdBy=a.CedarUser.NULL;pav_lastUpdatedOn=n.IsoDate.NULL;oslc_modifiedBy=a.CedarUser.NULL;pav_derivedFrom=i.CedarArtifactId.NULL;schema_name=null;schema_description="";cedarArtifactType=s.CedarArtifactType.NULL;annotations=null}},5451(e,t,r){t.AbstractContainerArtifact=void 0;const n=r(8333),a=r(1492),i=r(3746),s=r(2763),o=r(4869),l=r(5588);class d extends n.AbstractSchemaArtifact{childrenInfo=new a.ContainerArtifactChildrenInfo;childMap=new Map;instanceTypes=[];get instanceTypeSpecifications(){return[...this.instanceTypes]}set instanceTypeSpecifications(e){if(!Array.isArray(e)||e.some(e=>"string"!=typeof e||!/^[a-z][a-z0-9+.-]*:\S+$/i.test(e))||new Set(e).size!==e.length)throw new Error("Instance types must be unique absolute IRIs");this.instanceTypes=[...e]}get instanceTypeSpecification(){return this.instanceTypeSpecifications[0]??null}set instanceTypeSpecification(e){this.instanceTypeSpecifications=null===e?[]:[e]}addChild(e,t){d.refuseReservedChildName(this,e,t.name),this.childrenInfo.add(t),this.childMap.set(t.name,e)}static refuseReservedChildName(e,t,r){if(Array.from(r).every(d.isJavaWhitespace))throw new Error("A child key must not be blank.");const n=t.cedarArtifactType===s.CedarArtifactType.TEMPLATE_FIELD&&t.cedarFieldType===o.CedarFieldType.ATTRIBUTE_VALUE,a=e.cedarArtifactType===s.CedarArtifactType.TEMPLATE?"template":"element";if(n?l.ReservedNames.isReservedAttributeValueFieldName(r,a):l.ReservedNames.isReservedName(r))throw new Error(`Child name "${r}" is reserved for CEDAR instance metadata.`)}static isJavaWhitespace(e){const t=e.codePointAt(0);return t>=9&&t<=13||t>=28&&t<=31||/\p{Z}/u.test(e)&&160!==t&&8199!==t&&8239!==t}getChildrenInfo(){return this.childrenInfo}getAdditionalProperties(){return this.childrenInfo.hasAttributeValue()?i.AdditionalProperties.ALLOW_ATTRIBUTE_VALUE:i.AdditionalProperties.FALSE}getChild(e){return this.childMap.get(e)??null}getElement(e){const t=this.getChild(e);return null!==t&&t.cedarArtifactType===s.CedarArtifactType.TEMPLATE_ELEMENT?t:null}getField(e){const t=this.getChild(e);return null!==t&&t.cedarArtifactType===s.CedarArtifactType.TEMPLATE_FIELD?t:null}getChildInfo(e){return this.childrenInfo.get(e)}}t.AbstractContainerArtifact=d},5697(e,t,r){t.AbstractInstanceArtifact=void 0;const n=r(8534),a=r(2674);class i extends a.AbstractArtifact{schema_isBasedOn=n.CedarArtifactId.NULL}t.AbstractInstanceArtifact=i},8333(e,t,r){t.AbstractSchemaArtifact=void 0,t.internalNameFor=function(e,t){return`${e} ${t} schema`};const n=r(4443),a=r(1027),i=r(3910),s=r(8534),o=r(8557),l=r(2674),d=r(7752);class c extends l.AbstractArtifact{extensions=new n.SchemaExtensions;title=null;description=null;schema_schemaVersion=o.SchemaVersion.NULL;pav_version=a.PavVersion.NULL;bibo_status=i.BiboStatus.NULL;schema_identifier=null;pav_previousVersion=s.CedarArtifactId.NULL;language=d.Language.NULL}t.AbstractSchemaArtifact=c},5588(e,t,r){t.ReservedNames=void 0;const n=r(2099);class a{static INSTANCE_PROPERTIES=new Set(["schema:name","schema:description","schema:identifier","schema:isBasedOn","pav:createdOn","pav:createdBy","pav:lastUpdatedOn","pav:derivedFrom","oslc:modifiedBy","_annotations","rdfs:label","skos:notation","skos:prefLabel","skos:altLabel"]);static OBJECT_INTERNALS=new Set(["__proto__","constructor","prototype"]);static TEMPLATE_INSTANCE_YAML_KEYS=new Set([n.YamlKeys.type,n.YamlKeys.name,n.YamlKeys.description,n.YamlKeys.id,n.YamlKeys.isBasedOn,n.YamlKeys.derivedFrom,n.YamlKeys.children,n.YamlKeys.annotations,n.YamlKeys.createdOn,n.YamlKeys.createdBy,n.YamlKeys.modifiedOn,n.YamlKeys.modifiedBy]);static NESTED_ELEMENT_INSTANCE_YAML_KEYS=new Set([n.YamlKeys.type,n.YamlKeys.id,n.YamlKeys.children]);static STANDALONE_ELEMENT_INSTANCE_YAML_KEYS=new Set([n.YamlKeys.type,n.YamlKeys.name,n.YamlKeys.description,n.YamlKeys.id,n.YamlKeys.children,n.YamlKeys.createdOn,n.YamlKeys.createdBy,n.YamlKeys.modifiedOn,n.YamlKeys.modifiedBy]);static requireChildName(e){if(a.isReservedName(e))throw new Error(`Child name "${e}" is reserved for CEDAR instance metadata.`)}constructor(){}static isReservedName(e){return e.startsWith("@")||a.INSTANCE_PROPERTIES.has(e)||a.OBJECT_INTERNALS.has(e)}static isReservedAttributeValueFieldName(e,t){return a.isReservedName(e)||("template"===t?a.TEMPLATE_INSTANCE_YAML_KEYS:a.STANDALONE_ELEMENT_INSTANCE_YAML_KEYS).has(e)}static yamlKeys(e){return"template"===e?a.TEMPLATE_INSTANCE_YAML_KEYS:a.NESTED_ELEMENT_INSTANCE_YAML_KEYS}}t.ReservedNames=a},4443(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaExtensions=void 0;const r=new Set(["xsd","pav","bibo","oslc","schema","skos","rdfs","_annotations"]);function n(e){return/^[A-Za-z_][A-Za-z0-9_-]*$/.test(e)&&!r.has(e)}function a(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function i(e){return Array.isArray(e)?e.map(i):a(e)?Object.fromEntries(Object.keys(e).sort().map(t=>[t,i(e[t])])):e}class s{namespaces;values;constructor(e={},t={}){for(const[t,r]of Object.entries(e))if(!n(t)||"string"!=typeof r||!/^[A-Za-z][A-Za-z0-9+.-]*:[^\s]*$/.test(r))throw new Error(`Invalid schema extension prefix: ${t}`);for(const r of Object.keys(t)){const t=r.indexOf(":");if(t<1||t===r.length-1||!Object.hasOwn(e,r.slice(0,t)))throw new Error(`Unbound schema extension property: ${r}`)}this.namespaces=i(e),this.values=i(t)}get prefixes(){return{...this.namespaces}}get properties(){return i(this.values)}get isEmpty(){return 0===Object.keys(this.namespaces).length&&0===Object.keys(this.values).length}static fromJson(e){const t=a(e["@context"])?e["@context"]:{},r=Object.fromEntries(Object.entries(t).filter(([e,t])=>n(e)&&"string"==typeof t)),i=Object.fromEntries(Object.entries(e).filter(([e])=>{const t=e.indexOf(":");return t>0&&Object.hasOwn(r,e.slice(0,t))}));return new s(r,i)}static fromYaml(e){if(!Object.hasOwn(e,"extensions"))return new s;const t=e.extensions;if(!a(t)||2!==Object.keys(t).length||!a(t.prefixes)||!a(t.properties))throw new Error("extensions requires prefixes and properties objects");return new s(t.prefixes,t.properties)}applyJson(e){return e["@context"]={...e["@context"],...this.prefixes},Object.assign(e,this.properties),e}applyYaml(e){return this.isEmpty||(e.extensions={prefixes:this.prefixes,properties:this.properties}),e}}t.SchemaExtensions=s},2787(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationAtId=void 0,t.AnnotationAtId=class{name;id;constructor(e,t){this.name=e,this.id=t}getName(){return this.name}getAtId(){return this.id}}},3549(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationAtValue=void 0,t.AnnotationAtValue=class{name;value;constructor(e,t){this.name=e,this.value=t}getName(){return this.name}getAtValue(){return this.value}}},5226(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Annotations=void 0,t.Annotations=class{annotations=new Map;add(e){this.annotations.set(e.getName(),e)}getSize(){return this.annotations.size}getAnnotationNames(){return Array.from(this.annotations.keys())}get(e){return this.annotations.has(e)?this.annotations.get(e):null}}},936(e,t){t.CedarModel=void 0,t.CedarModel=class{static ui="_ui";static schema="$schema";static order="order";static inputType="inputType";static type="type";static items="items";static valueConstraints="_valueConstraints";static requiredValue="requiredValue";static defaultValue="defaultValue";static minItems="minItems";static maxItems="maxItems";static minLength="minLength";static maxLength="maxLength";static numberType="numberType";static temporalType="temporalType";static temporalGranularity="temporalGranularity";static timezoneEnabled="timezoneEnabled";static inputTimeFormat="inputTimeFormat";static unitOfMeasure="unitOfMeasure";static minValue="minValue";static maxValue="maxValue";static decimalPlace="decimalPlace";static content="_content";static size="_size";static width="width";static height="height";static regex="regex";static pages="pages";static header="header";static footer="footer";static ontologies="ontologies";static valueSets="valueSets";static classes="classes";static branches="branches";static actions="actions";static multipleChoice="multipleChoice";static literals="literals";static label="label";static selectedByDefault="selectedByDefault";static propertyDescriptions="propertyDescriptions";static propertyLabels="propertyLabels";static skosPrefLabel="skos:prefLabel";static skosAltLabel="skos:altLabel";static skosNotation="skos:notation";static format="format";static enum="enum";static annotations="_annotations";static propertyIriPrefix="https://schema.metadatacenter.org/properties/";static ValueConstraints=class{static acronym="acronym";static name="name";static uri="uri";static numTerms="numTerms";static label="label";static source="source";static type="type";static termType="termType";static prefLabel="prefLabel";static maxDepth="maxDepth";static vsCollection="vsCollection";static termUri="termUri";static sourceUri="sourceUri";static iri="iri";static sourceSystem="sourceSystem";static version="version";static versionId="id";static versionEffectiveDate="effectiveDate";static versionDeclaredVersion="declaredVersion";static action="action";static to="to";static recommendedValue="recommendedValue"};static Ui=class{static hidden="hidden";static continuePreviousLine="continuePreviousLine";static valueRecommendationEnabled="valueRecommendationEnabled"}}},2733(e,t){t.JsonSchema=void 0,t.JsonSchema=class{static skosNotation="skos:notation";static properties="properties";static required="required";static atContext="@context";static atId="@id";static atType="@type";static atValue="@value";static atLanguage="@language";static schemaIsBasedOn="schema:isBasedOn";static schemaName="schema:name";static schemaDescription="schema:description";static schemaVersion="schema:schemaVersion";static schemaIdentifier="schema:identifier";static pavDerivedFrom="pav:derivedFrom";static pavPreviousVersion="pav:previousVersion";static pavCreatedOn="pav:createdOn";static pavCreatedBy="pav:createdBy";static pavLastUpdatedOn="pav:lastUpdatedOn";static oslcModifiedBy="oslc:modifiedBy";static pavVersion="pav:version";static biboStatus="bibo:status";static rdfsLabel="rdfs:label";static termUri="termUri";static enum="enum";static oneOf="oneOf";static type="type";static items="items"}},4216(e,t){t.NonStandardDatatype=void 0,t.NonStandardDatatype=class{static IRI="iri"}},5747(e,t){t.TemplateProperty=void 0,t.TemplateProperty=class{static title="title";static description="description";static additionalProperties="additionalProperties"}},2099(e,t){t.YamlKeys=void 0,t.YamlKeys=class{static notation="notation";static id="id";static type="type";static name="name";static description="description";static modelVersion="modelVersion";static status="status";static version="version";static language="language";static label="label";static prefLabel="prefLabel";static altLabels="altLabels";static datatype="datatype";static valueRecommendation="valueRecommendation";static required="required";static recommended="recommended";static hidden="hidden";static continuePreviousLine="continuePreviousLine";static propertyIri="propertyIri";static overrideLabel="overrideLabel";static overrideDescription="overrideDescription";static default="default";static minLength="minLength";static maxLength="maxLength";static regex="regex";static identifier="identifier";static derivedFrom="derivedFrom";static previousVersion="previousVersion";static createdOn="createdOn";static createdBy="createdBy";static modifiedOn="modifiedOn";static modifiedBy="modifiedBy";static isBasedOn="isBasedOn";static instanceType="instanceType";static annotations="annotations";static value="value";static granularity="granularity";static inputTimeZone="inputTimeZone";static inputTimeFormat="inputTimeFormat";static header="header";static footer="footer";static children="children";static multiple="multiple";static minItems="minItems";static maxItems="maxItems";static content="content";static height="height";static width="width";static key="key";static minValue="minValue";static maxValue="maxValue";static decimalPlaces="decimalPlaces";static unit="unit";static multipleChoice="multipleChoice";static values="values";static selected="selected";static actions="actions";static action="action";static configuration="configuration";static Controlled=class{static sourceSystem="sourceSystem";static sourceAcronym="sourceAcronym";static sourceName="sourceName";static sourceIri="sourceIri";static sourceUri="sourceUri";static termIri="termIri";static termType="termType";static termLabel="termLabel";static termDisplayLabel="termDisplayLabel";static termBaseIri="termBaseIri";static termBaseLabel="termBaseLabel";static termMaxDepth="termMaxDepth";static termCount="termCount";static versionId="id";static versionEffectiveDate="effectiveDate";static versionDeclaredVersion="declaredVersion";static to="to"}}},8349(e,t){t.YamlValues=void 0,t.YamlValues=class{static id="id";static value="value";static iri="iri";static string="string";static Controlled=class{static class="class";static ontology="ontology";static valueSet="valueSet";static branch="branch"}}},513(e,t,r){t.AbstractChildDeploymentInfo=void 0;const n=r(2763),a=r(9034);t.AbstractChildDeploymentInfo=class{static defaultMinItems=1;_name;_atType=n.CedarArtifactType.NULL;_uiInputType=a.UiInputType.NULL;_label=null;_description=null;constructor(e){this._name=e}get name(){return this._name}hasParent(){return""!==this._name}get atType(){return this._atType}set atType(e){this._atType=e}get uiInputType(){return this._uiInputType}set uiInputType(e){this._uiInputType=e}get label(){return this._label}set label(e){this._label=e}get description(){return this._description}set description(e){this._description=e}get hidden(){return!1}}},6910(e,t,r){t.AbstractChildDeploymentInfoBuilder=void 0;const n=r(2763),a=r(9034),i=r(9129);t.AbstractChildDeploymentInfoBuilder=class{child=null;name="";atType=n.CedarArtifactType.NULL;uiInputType=a.UiInputType.NULL;label=null;description=null;constructor(e,t){this.child=e,this.name=t}withLabel(e){return this.label=e,this}withDescription(e){return this.description=e,this}setCommonData(e){e.label=this.label,e.description=this.description,e.atType=this.atType,e.uiInputType=this.uiInputType,null!=this.child&&(e.atType=this.child.cedarArtifactType,this.child instanceof i.TemplateField&&(e.uiInputType=this.child.cedarFieldType.getUiInputType()))}}},3812(e,t,r){t.AbstractDynamicChildDeploymentInfo=void 0;const n=r(513);class a extends n.AbstractChildDeploymentInfo{_iri=null;constructor(e){super(e)}get iri(){return this._iri}set iri(e){this._iri=e}get requiredValue(){return!1}get recommendedValue(){return!1}get minItems(){return null}get maxItems(){return null}}t.AbstractDynamicChildDeploymentInfo=a},4809(e,t,r){t.AbstractDynamicChildDeploymentInfoBuilder=void 0;const n=r(455),a=r(6910);class i extends a.AbstractChildDeploymentInfoBuilder{iri=null;constructor(e,t){super(e,t)}withIri(e){return this.iri=e,this}build(){const e=new n.ChildDeploymentInfo(this.name);return this.setCommonData(e),e}setCommonData(e){super.setCommonData(e),e.iri=this.iri}}t.AbstractDynamicChildDeploymentInfoBuilder=i},9519(e,t,r){t.AbstractFieldChildDeploymentInfo=void 0;const n=r(3812);class a extends n.AbstractDynamicChildDeploymentInfo{_hidden=!1;_requiredValue=!1;_recommendedValue=!1;_continuePreviousLine=!1;_valueRecommendationEnabled=!1;constructor(e){super(e)}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get requiredValue(){return this._requiredValue}set requiredValue(e){this._requiredValue=e}get recommendedValue(){return this._recommendedValue}set recommendedValue(e){this._recommendedValue=e}get continuePreviousLine(){return this._continuePreviousLine}set continuePreviousLine(e){this._continuePreviousLine=e}get valueRecommendationEnabled(){return this._valueRecommendationEnabled}set valueRecommendationEnabled(e){this._valueRecommendationEnabled=e}}t.AbstractFieldChildDeploymentInfo=a},6096(e,t,r){t.AbstractFieldChildDeploymentInfoBuilder=void 0;const n=r(9129),a=r(4809),i=r(9519);class s extends a.AbstractDynamicChildDeploymentInfoBuilder{hidden=!1;requiredValue=!1;recommendedValue=!1;continuePreviousLine=!1;valueRecommendationEnabled=!1;constructor(e,t){super(e,t)}withHidden(e){return this.hidden=e,this}get recordsRequirement(){return!(this.child instanceof n.TemplateField)||this.child.cedarFieldType.recordsRequirement}withRequiredValue(e){return this.recordsRequirement&&(this.requiredValue=e),this}withRecommendedValue(e){return this.recordsRequirement&&(this.recommendedValue=e),this}withContinuePreviousLine(e){return this.continuePreviousLine=e,this}withValueRecommendationEnabled(e){return this.valueRecommendationEnabled=e,this}setCommonData(e){super.setCommonData(e),e instanceof i.AbstractFieldChildDeploymentInfo&&(e.hidden=this.hidden,e.requiredValue=this.requiredValue,e.recommendedValue=this.recommendedValue,e.continuePreviousLine=this.continuePreviousLine,e.valueRecommendationEnabled=this.valueRecommendationEnabled)}}t.AbstractFieldChildDeploymentInfoBuilder=s},455(e,t,r){t.ChildDeploymentInfo=void 0;const n=r(9519);class a extends n.AbstractFieldChildDeploymentInfo{_multiInstance=!1;_minItems=null;_maxItems=null;_standalone=!1;static empty(){return new a("")}static standalone(){const e=new a("");return e._standalone=!0,e}constructor(e){super(e)}get multiInstance(){return this._multiInstance}set multiInstance(e){this._multiInstance=e}get minItems(){return this._minItems}set minItems(e){this._minItems=e}get maxItems(){return this._maxItems}set maxItems(e){this._maxItems=e}isMultiInAnyWay(){return this._multiInstance}isStandalone(){return this._standalone}}t.ChildDeploymentInfo=a},8878(e,t,r){t.ChildDeploymentInfoAlwaysMultiple=void 0;const n=r(9519);class a extends n.AbstractFieldChildDeploymentInfo{_declaredMinItems=null;_declaredMaxItems=null;static empty(){return new a("")}constructor(e){super(e)}isMultiInAnyWay(){return!0}get declaredMinItems(){return this._declaredMinItems}get declaredMaxItems(){return this._declaredMaxItems}set declaredMinItems(e){this._declaredMinItems=e}set declaredMaxItems(e){this._declaredMaxItems=e}get minItems(){return null!==this._declaredMinItems?this._declaredMinItems:this.defaultMinItems}get defaultMinItems(){return 0}get maxItems(){return this._declaredMaxItems}}t.ChildDeploymentInfoAlwaysMultiple=a},3239(e,t,r){t.ChildDeploymentInfoAlwaysMultipleBuilder=void 0;const n=r(8198),a=r(8878),i=r(6096);class s extends i.AbstractFieldChildDeploymentInfoBuilder{declaredMinItems=null;declaredMaxItems=null;constructor(e,t){super(e,t)}withMinItems(e){return this.declaredMinItems=e,this}withMaxItems(e){return this.declaredMaxItems=e,this}build(){(0,n.assertItemBounds)(this.name,this.declaredMinItems,this.declaredMaxItems);const e=new a.ChildDeploymentInfoAlwaysMultiple(this.name);return this.setCommonData(e),e.declaredMinItems=this.declaredMinItems,e.declaredMaxItems=this.declaredMaxItems,e}}t.ChildDeploymentInfoAlwaysMultipleBuilder=s},2266(e,t,r){t.ChildDeploymentInfoAlwaysSingle=void 0;const n=r(9519);class a extends n.AbstractFieldChildDeploymentInfo{static empty(){return new a("")}constructor(e){super(e)}isMultiInAnyWay(){return!1}}t.ChildDeploymentInfoAlwaysSingle=a},587(e,t,r){t.ChildDeploymentInfoAlwaysSingleBuilder=void 0;const n=r(2266),a=r(6096);class i extends a.AbstractFieldChildDeploymentInfoBuilder{constructor(e,t){super(e,t)}build(){const e=new n.ChildDeploymentInfoAlwaysSingle(this.name);return this.setCommonData(e),e}}t.ChildDeploymentInfoAlwaysSingleBuilder=i},3608(e,t,r){t.ChildDeploymentInfoBuilder=void 0;const n=r(8198),a=r(455),i=r(6096);class s extends i.AbstractFieldChildDeploymentInfoBuilder{multiInstance=!1;minItems=null;maxItems=null;constructor(e,t){super(e,t)}withMultiInstance(e){return this.multiInstance=e,this}withMinItems(e){return this.minItems=e,this}withMaxItems(e){return this.maxItems=e,this}build(){(0,n.assertItemBounds)(this.name,this.minItems,this.maxItems);const e=new a.ChildDeploymentInfo(this.name);return this.setCommonData(e),e.multiInstance=this.multiInstance,e.minItems=this.minItems,e.maxItems=this.maxItems,e}}t.ChildDeploymentInfoBuilder=s},4831(e,t,r){t.ChildDeploymentInfoElement=void 0;const n=r(3812);class a extends n.AbstractDynamicChildDeploymentInfo{_multiInstance=!1;_minItems=null;_maxItems=null;static empty(){return new a("")}constructor(e){super(e)}get multiInstance(){return this._multiInstance}set multiInstance(e){this._multiInstance=e}get minItems(){return this._minItems}set minItems(e){this._minItems=e}get maxItems(){return this._maxItems}set maxItems(e){this._maxItems=e}isMultiInAnyWay(){return this._multiInstance}}t.ChildDeploymentInfoElement=a},6976(e,t,r){t.ChildDeploymentInfoElementBuilder=void 0;const n=r(8198),a=r(4809),i=r(4831);class s extends a.AbstractDynamicChildDeploymentInfoBuilder{multiInstance=!1;minItems=null;maxItems=null;constructor(e,t){super(e,t)}withMultiInstance(e){return this.multiInstance=e,this}withMinItems(e){return this.minItems=e,this}withMaxItems(e){return this.maxItems=e,this}build(){(0,n.assertItemBounds)(this.name,this.minItems,this.maxItems);const e=new i.ChildDeploymentInfoElement(this.name);return this.setCommonData(e),e.multiInstance=this.multiInstance,e.minItems=this.minItems,e.maxItems=this.maxItems,e}}t.ChildDeploymentInfoElementBuilder=s},3581(e,t,r){t.ChildDeploymentInfoStatic=void 0;const n=r(513);class a extends n.AbstractChildDeploymentInfo{_hidden=!1;static empty(){return new a("")}constructor(e){super(e)}get hidden(){return this._hidden}set hidden(e){this._hidden=e}isMultiInAnyWay(){return!1}}t.ChildDeploymentInfoStatic=a},8290(e,t,r){t.ChildDeploymentInfoStaticBuilder=void 0;const n=r(6910),a=r(3581);class i extends n.AbstractChildDeploymentInfoBuilder{hidden=!1;constructor(e,t){super(e,t)}withHidden(e){return this.hidden=e,this}build(){const e=new a.ChildDeploymentInfoStatic(this.name);return super.setCommonData(e),e.hidden=this.hidden,e}}t.ChildDeploymentInfoStaticBuilder=i},1492(e,t,r){t.ContainerArtifactChildrenInfo=void 0;const n=r(2763),a=r(2733),i=r(9034),s=r(3812);t.ContainerArtifactChildrenInfo=class{childNameList=[];childMap=new Map;add(e){this.childNameList.push(e.name),this.childMap.set(e.name,e)}get children(){return this.childNameList.map(e=>this.childMap.get(e))}has(e){return this.childMap.has(e)}get(e){return this.childMap.get(e)??null}getChildrenNames(){return Array.from(this.childMap.keys())}getChildrenNamesForRequiredInProperties(){const e=[];for(const[t,r]of this.childMap.entries())r.atType!==n.CedarArtifactType.STATIC_TEMPLATE_FIELD&&r.uiInputType!==i.UiInputType.ATTRIBUTE_VALUE&&e.push(t);return e}getChildrenNamesForRequired(){const e=[];for(const[t,r]of this.childMap.entries())r.atType!==n.CedarArtifactType.STATIC_TEMPLATE_FIELD&&r.uiInputType!==i.UiInputType.ATTRIBUTE_VALUE&&e.push(t);return e}getOnlyElementNamesForPropertiesContextRequired(){const e=[];for(const[t,r]of this.childMap.entries())r.atType===n.CedarArtifactType.TEMPLATE_ELEMENT&&e.push(t);return e}getPropertyLabelMap(e){const t={};return this.childNameList.forEach(e=>{const r=this.getChildInfo(e);null!==r.label&&(t[r.name]=r.label)}),t}getPropertyDescriptionMap(e){const t={};return this.childNameList.forEach(e=>{const r=this.getChildInfo(e);null!==r.description&&(t[r.name]=r.description)}),t}getChildIriMap(){return this.collectChildIris(!1)}collectChildIris(e){const t={};return this.childNameList.forEach(r=>{const a=this.getChildInfo(r);a.atType===n.CedarArtifactType.STATIC_TEMPLATE_FIELD||!e&&a.uiInputType===i.UiInputType.ATTRIBUTE_VALUE||a instanceof s.AbstractDynamicChildDeploymentInfo&&null!==a.iri&&(t[a.name]=a.iri)}),t}getChildNamesWithIri(){const e=this.getChildIriMap();return this.getChildrenNames().filter(t=>Object.prototype.hasOwnProperty.call(e,t))}getIRIMap(){const e={},t=this.collectChildIris(!0);return Object.keys(t).forEach(r=>{e[r]={[a.JsonSchema.enum]:[t[r]]}}),e}hasAttributeValue(){for(const e of this.childMap.values())if(e.uiInputType===i.UiInputType.ATTRIBUTE_VALUE)return!0;return!1}getChildInfo(e){return this.childMap.get(e)}}},8198(e,t){t.UNBOUNDED_MAX_ITEMS=void 0,t.assertItemBounds=function(e,r,n){if(null!==r&&r<0)throw new Error(`minItems must be zero or greater in ${e}`);if(null!==n&&n<0)throw new Error(`maxItems must be zero or greater in ${e}`);if(null!==r&&null!==n&&n!==t.UNBOUNDED_MAX_ITEMS&&r>n)throw new Error(`minItems must be less than or equal to maxItems in ${e}`)},t.UNBOUNDED_MAX_ITEMS=0},7661(e,t,r){t.TemplateElement=void 0;const n=r(3910),a=r(8557),i=r(1027),s=r(5451),o=r(2763),l=r(6976);class d extends s.AbstractContainerArtifact{skos_altLabel=null;skos_prefLabel=null;header=null;footer=null;constructor(){super(),this.cedarArtifactType=o.CedarArtifactType.TEMPLATE_ELEMENT}static buildEmptyWithNullValues(){return new d}static buildEmptyWithDefaultValues(){const e=new d;return e.schema_schemaVersion=a.SchemaVersion.CURRENT,e.bibo_status=n.BiboStatus.DRAFT,e.pav_version=i.PavVersion.DEFAULT,e}isMultiInstanceByDefinition(){return!1}isSingleInstanceByDefinition(){return!1}createDeploymentBuilder(e){return new l.ChildDeploymentInfoElementBuilder(this,e)}}t.TemplateElement=d},1762(e,t,r){t.TemplateElementBuilder=void 0;const n=r(1641),a=r(7661);class i extends n.AbstractArtifactBuilder{children=[];instanceTypeSpecification=null;withInstanceTypeSpecification(e){return this.instanceTypeSpecification=e,this}addChild(e,t){return this.children.push([e,t]),this}build(){const e=a.TemplateElement.buildEmptyWithNullValues();return super.buildInternal(e),e.instanceTypeSpecification=this.instanceTypeSpecification,this.children.forEach(([t,r])=>{e.addChild(t,r)}),e}}t.TemplateElementBuilder=i},7282(e,t){t.ChoiceOptionEntity=void 0,t.ChoiceOptionEntity=class{label;selectedByDefault;statesSelectedByDefault;constructor(e,t,r=!0){if(null==e||""===e)throw new Error("A permitted value requires a label. A choice that names nothing cannot be chosen.");this.label=e,this.selectedByDefault=t,this.statesSelectedByDefault=r}}},6145(e,t,r){t.DefaultValueSerialization=void 0;const n=r(8802),a=r(8748);t.DefaultValueSerialization=class{static literalFromNode(e,t){return a.ReaderUtil.getString(e,t)}static writeLiteral(e,t,r){null!==r&&""!==r&&(e[t]=r)}static iriFromNode(e,t){if(""===a.ReaderUtil.getString(e,t))return null;const r=a.ReaderUtil.getIdentifier(e,t);return null===r?null:new n.Iri(r)}static writeIri(e,t,r){null===r||r.isEmpty()||(e[t]=r.getValue())}}},3557(e,t,r){t.JsonValueConstraintsWriter=void 0;const n=r(3161);class a extends n.JsonAbstractArtifactWriter{}t.JsonValueConstraintsWriter=a},9129(e,t,r){t.TemplateField=void 0;const n=r(4328),a=r(4869),i=r(8333);class s extends i.AbstractSchemaArtifact{skos_altLabel=null;skos_prefLabel=null;hidden=!1;requiredValue=!1;recommendedValue=!1;continuePreviousLine=!1;valueConstraints=new n.ValueConstraints;cedarFieldType=a.CedarFieldType.NULL;isMultiInstanceByDefinition(){return!1}isSingleInstanceByDefinition(){return!1}supportsValueRecommendation(){return!1}}t.TemplateField=s},3350(e,t,r){t.TemplateFieldBuilder=void 0;const n=r(1641);class a extends n.AbstractArtifactBuilder{skos_altLabel=null;skos_prefLabel=null;withAlternateLabels(e){return this.skos_altLabel=e,this}addAlternateLabel(e){return null===this.skos_altLabel&&(this.skos_altLabel=[]),this.skos_altLabel.push(e),this}withPreferredLabel(e){return this.skos_prefLabel=e,this}buildInternal(e){super.buildInternal(e),e.skos_altLabel=this.skos_altLabel,e.skos_prefLabel=this.skos_prefLabel}}t.TemplateFieldBuilder=a},855(e,t,r){t.UnknownTemplateField=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(3608);class o extends n.TemplateField{constructor(){super(),this.cedarFieldType=a.CedarFieldType.NULL,this.cedarArtifactType=i.CedarArtifactType.NULL}static build(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoBuilder(this,e)}}t.UnknownTemplateField=o},4328(e,t){t.ValueConstraints=void 0,t.ValueConstraints=class{constructor(){}}},1902(e,t,r){t.ValueConstraintsIriField=void 0;const n=r(4328);class a extends n.ValueConstraints{defaultValue=null;constructor(){super()}}t.ValueConstraintsIriField=a},7765(e,t,r){t.ValueConstraintsLiteralField=void 0;const n=r(4328);class a extends n.ValueConstraints{defaultValue=null;constructor(){super()}}t.ValueConstraintsLiteralField=a},2500(e,t,r){t.YamlValueConstraintsWriter=void 0;const n=r(211);class a extends n.YamlAbstractArtifactWriter{}t.YamlValueConstraintsWriter=a},2052(e,t,r){t.AttributeValueFieldBuilderImpl=void 0;const n=r(3350),a=r(9571);class i extends n.TemplateFieldBuilder{constructor(){super()}static create(){return new i}build(){const e=a.AttributeValueFieldImpl.buildEmpty();return super.buildInternal(e),e}}t.AttributeValueFieldBuilderImpl=i},9571(e,t,r){t.AttributeValueFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(4328),o=r(3239);class l extends n.TemplateField{constructor(){super(),this.cedarFieldType=a.CedarFieldType.ATTRIBUTE_VALUE,this.valueConstraints=new s.ValueConstraints,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}isMultiInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new o.ChildDeploymentInfoAlwaysMultipleBuilder(this,e)}}t.AttributeValueFieldImpl=l},9366(e,t,r){t.JsonFieldReaderAttributeValue=void 0;const n=r(4385),a=r(9571);class i extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const i=a.AttributeValueFieldImpl.buildEmpty();return this.readRequiredAndHidden(e,t),i}}t.JsonFieldReaderAttributeValue=i},1442(e,t,r){t.JsonFieldWriterAttributeValue=void 0;const n=r(455),a=r(2748),i=r(9517),s=r(936),o=r(5793);class l extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}getAsJsonNode(e,t=n.ChildDeploymentInfo.standalone()){const r=super.getAsJsonNode(e,t);return t instanceof n.ChildDeploymentInfo&&t.isStandalone()?{type:"array",minItems:0,items:r}:r}expandPropertiesNode(e){}expandRequiredNode(e){}expandTypeNode(e,t){e[s.CedarModel.type]=this.atomicWriter.write(o.JavascriptType.STRING)}buildValueConstraintsObject(e){return i.JsonNode.getEmpty()}}t.JsonFieldWriterAttributeValue=l},529(e,t,r){t.YamlFieldReaderAttributeValue=void 0;const n=r(5675),a=r(9571);class i extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){return a.AttributeValueFieldImpl.buildEmpty()}}t.YamlFieldReaderAttributeValue=i},1521(e,t,r){t.YamlFieldWriterAttributeValue=void 0;const n=r(5430);class a extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}}t.YamlFieldWriterAttributeValue=a},4675(e,t,r){t.CheckboxFieldBuilderImpl=void 0;const n=r(3350),a=r(9915),i=r(9282);class s extends n.TemplateFieldBuilder{defaultValue=null;literals=[];constructor(){super()}static create(){return new s}addCheckboxOption(e,t){return this.literals.push(new a.CheckboxOption(e,t??!1,void 0!==t)),this}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.CheckboxFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.literals=this.literals,e}}t.CheckboxFieldBuilderImpl=s},9282(e,t,r){t.CheckboxFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1489),o=r(3239);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.CHECKBOX,this.valueConstraints=new s.ValueConstraintsCheckboxField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}isMultiInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new o.ChildDeploymentInfoAlwaysMultipleBuilder(this,e)}}t.CheckboxFieldImpl=l},9915(e,t,r){t.CheckboxOption=void 0;const n=r(7282);class a extends n.ChoiceOptionEntity{constructor(e,t,r=!0){super(e,t,r)}}t.CheckboxOption=a},19(e,t,r){t.JsonFieldReaderCheckbox=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(9915),o=r(9282),l=r(6145);class d extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const d=o.CheckboxFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=c){d.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(c,a.CedarModel.defaultValue);const e=n.ReaderUtil.getNodeList(c,a.CedarModel.literals);null!==e&&e.forEach(e=>{const t=n.ReaderUtil.getString(e,a.CedarModel.label),r=n.ReaderUtil.getBoolean(e,a.CedarModel.selectedByDefault),i=Object.hasOwn(e,a.CedarModel.selectedByDefault);if(null!=t){const e=new s.CheckboxOption(t,r,i);d.valueConstraints.literals.push(e)}})}return d}}t.JsonFieldReaderCheckbox=d},8663(e,t,r){t.JsonFieldWriterCheckbox=void 0;const n=r(936),a=r(2748),i=r(6145);class s extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),this.expandLiterals(t,e),super.expandValueConstraintsNode(e,t,r),e[n.CedarModel.multipleChoice]=!0}}t.JsonFieldWriterCheckbox=s},1489(e,t,r){t.ValueConstraintsCheckboxField=void 0;const n=r(7765);class a extends n.ValueConstraintsLiteralField{literals=[];constructor(){super()}}t.ValueConstraintsCheckboxField=a},7268(e,t,r){t.YamlFieldReaderCheckbox=void 0;const n=r(8748),a=r(9915),i=r(5675),s=r(2099),o=r(9282),l=r(6145);class d extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const d=o.CheckboxFieldImpl.buildEmpty();d.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(e,s.YamlKeys.default);const c=n.ReaderUtil.getNodeList(e,s.YamlKeys.values);return null!==c&&c.forEach(e=>{const t=n.ReaderUtil.getString(e,s.YamlKeys.label),r=n.ReaderUtil.getBoolean(e,s.YamlKeys.selected),i=Object.hasOwn(e,s.YamlKeys.selected);if(null!=t){const e=new a.CheckboxOption(t,r,i);d.valueConstraints.literals.push(e)}}),d}}t.YamlFieldReaderCheckbox=d},4500(e,t,r){t.YamlFieldWriterCheckbox=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue),this.expandLiterals(t,e)}}t.YamlFieldWriterCheckbox=s},9916(e,t,r){t.ControlledTermFieldBuilderImpl=void 0;const n=r(5376),a=r(3350),i=r(6731);class s extends a.TemplateFieldBuilder{valueConstraints=new n.ValueConstraintsControlledTermField;constructor(){super()}static create(){return new s}withDefaultValue(e){return this.valueConstraints.defaultValue=e,this}addOntology(e){return this.valueConstraints.ontologies.push(e),this}addValueSet(e){return this.valueConstraints.valueSets.push(e),this}addClass(e){return this.valueConstraints.classes.push(e),this}addBranch(e){return this.valueConstraints.branches.push(e),this}addAction(e){return this.valueConstraints.actions.push(e),this}build(){const e=i.ControlledTermFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints=this.valueConstraints,e}}t.ControlledTermFieldBuilderImpl=s},6731(e,t,r){t.ControlledTermFieldImpl=void 0;const n=r(9129),a=r(5376),i=r(4869),s=r(2763),o=r(3608);class l extends n.TemplateField{valueConstraints;valueRecommendationEnabled=!1;constructor(){super(),this.cedarFieldType=i.CedarFieldType.CONTROLLED_TERM,this.valueConstraints=new a.ValueConstraintsControlledTermField,this.cedarArtifactType=s.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}supportsValueRecommendation(){return!0}}t.ControlledTermFieldImpl=l},8728(e,t,r){t.JsonFieldReaderControlledTerm=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(8354),o=r(2418),l=r(9184),d=r(2395),c=r(7295),u=r(2733),m=r(7432),p=r(4531),h=r(6731),f=r(5753);class y extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const s=h.ControlledTermFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const o=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);return null!=o&&(s.valueConstraints.ontologies=this.getOntologies(n.ReaderUtil.getNodeList(o,a.CedarModel.ontologies)),s.valueConstraints.classes=this.getClasses(n.ReaderUtil.getNodeList(o,a.CedarModel.classes)),s.valueConstraints.branches=this.getBranches(n.ReaderUtil.getNodeList(o,a.CedarModel.branches)),s.valueConstraints.valueSets=this.getValueSets(n.ReaderUtil.getNodeList(o,a.CedarModel.valueSets)),s.valueConstraints.defaultValue=this.getDefaultValue(n.ReaderUtil.getNodeOrNull(o,a.CedarModel.defaultValue)),s.valueConstraints.actions=this.getActions(n.ReaderUtil.getNodeList(o,a.CedarModel.actions))),s}getOntologies(e){const t=[];return e.forEach(e=>{const r=new s.ControlledTermOntology(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.acronym),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.name),n.ReaderUtil.getNumberOrNull(e,a.CedarModel.ValueConstraints.numTerms),n.ReaderUtil.getIdentifierURI(e,a.CedarModel.ValueConstraints.uri),...y.readSourceAndVersion(e));t.push(r)}),t}getClasses(e){const t=[];return e.forEach(e=>{const r=new o.ControlledTermClass(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.label),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.source),p.BioportalTermType.forJsonValue(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.type)),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.prefLabel),n.ReaderUtil.getIdentifierURI(e,a.CedarModel.ValueConstraints.uri),...y.readSourceAndVersion(e));t.push(r)}),t}getBranches(e){const t=[];return e.forEach(e=>{const r=new l.ControlledTermBranch(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.source),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.acronym),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.name),n.ReaderUtil.getNumberOrZero(e,a.CedarModel.ValueConstraints.maxDepth),n.ReaderUtil.getIdentifierURI(e,a.CedarModel.ValueConstraints.uri),...y.readSourceAndVersion(e));t.push(r)}),t}getValueSets(e){const t=[];return e.forEach(e=>{const r=new d.ControlledTermValueSet(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.vsCollection),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.name),n.ReaderUtil.getNumberOrNull(e,a.CedarModel.ValueConstraints.numTerms),n.ReaderUtil.getIdentifierURI(e,a.CedarModel.ValueConstraints.uri),...y.readSourceAndVersion(e));t.push(r)}),t}getActions(e){const t=[];return e.forEach(e=>{const r=new m.ControlledTermAction(n.ReaderUtil.getNumber(e,a.CedarModel.ValueConstraints.to),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.action),n.ReaderUtil.getIdentifierURI(e,a.CedarModel.ValueConstraints.termUri),n.ReaderUtil.getURI(e,a.CedarModel.ValueConstraints.sourceUri),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.source),p.BioportalTermType.forJsonValue(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.type)));t.push(r)}),t}static readSourceAndVersion(e){const t=n.ReaderUtil.getURI(e,a.CedarModel.ValueConstraints.iri),r=n.ReaderUtil.getNodeOrNull(e,a.CedarModel.ValueConstraints.version),i=null===r?null:new f.ControlledTermVersion(n.ReaderUtil.getStringOrEmpty(r,a.CedarModel.ValueConstraints.versionId),n.ReaderUtil.getString(r,a.CedarModel.ValueConstraints.versionEffectiveDate),n.ReaderUtil.getString(r,a.CedarModel.ValueConstraints.versionDeclaredVersion));return[t.isEmpty()?null:t,n.ReaderUtil.getString(e,a.CedarModel.ValueConstraints.sourceSystem),i]}getDefaultValue(e){if(null==e)return null;const t=n.ReaderUtil.getString(e,u.JsonSchema.rdfsLabel);return Object.hasOwn(e,u.JsonSchema.termUri)||null!==t?new c.ControlledTermDefaultValue(n.ReaderUtil.getIdentifierURI(e,u.JsonSchema.termUri),t??""):null}}t.JsonFieldReaderControlledTerm=y},8280(e,t,r){t.JsonFieldWriterControlledTerm=void 0;const n=r(9517),a=r(936),i=r(2748),s=r(2733),o=r(9932);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[s.JsonSchema.properties]=o.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[s.JsonSchema.properties]=o.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}expandValueConstraintsNode(e,t,r){const i=n.JsonNode.getEmptyList();t.valueConstraints.ontologies.forEach(e=>{i.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[a.CedarModel.ontologies]=i;const o=n.JsonNode.getEmptyList();t.valueConstraints.valueSets.forEach(e=>{o.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[a.CedarModel.valueSets]=o;const l=n.JsonNode.getEmptyList();t.valueConstraints.classes.forEach(e=>{l.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[a.CedarModel.classes]=l;const d=n.JsonNode.getEmptyList();t.valueConstraints.branches.forEach(e=>{d.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[a.CedarModel.branches]=d;const c=n.JsonNode.getEmptyList();if(t.valueConstraints.actions.forEach(e=>{c.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),c.length>0&&(e[a.CedarModel.actions]=c),null!=t.valueConstraints.defaultValue){const r=n.JsonNode.getEmpty();r[s.JsonSchema.termUri]=this.atomicWriter.write(t.valueConstraints.defaultValue.termUri),r[s.JsonSchema.rdfsLabel]=t.valueConstraints.defaultValue.rdfsLabel,e[a.CedarModel.defaultValue]=r}super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterControlledTerm=l},5376(e,t,r){t.ValueConstraintsControlledTermField=void 0;const n=r(4328);class a extends n.ValueConstraints{defaultValue=null;ontologies=[];valueSets=[];classes=[];branches=[];actions=[];constructor(){super()}}t.ValueConstraintsControlledTermField=a},9299(e,t,r){t.YamlFieldReaderControlledTerm=void 0;const n=r(8748),a=r(7295),i=r(4531),s=r(5675),o=r(2099),l=r(8349),d=r(5491),c=r(3091),u=r(2957),m=r(1556),p=r(7733),h=r(6731),f=r(8802),y=r(5753);class T extends s.YamlTemplateFieldTypeSpecificReader{read(e,t,r,s){const f=h.ControlledTermFieldImpl.buildEmpty();n.ReaderUtil.getNodeList(e,o.YamlKeys.values).forEach(e=>{const t=n.ReaderUtil.getString(e,o.YamlKeys.type);if(t===l.YamlValues.Controlled.ontology){const t=(new d.ControlledTermOntologyBuilder).withAcronym(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withName(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceName)).withUri(this.ontologyUri(e)).withNumTerms(n.ReaderUtil.getNumberOrNull(e,o.YamlKeys.Controlled.termCount));this.readSourceAndVersion(e,t),f.valueConstraints.ontologies.push(t.build())}else if(t===l.YamlValues.Controlled.class){const t=n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termLabel),r=n.ReaderUtil.getString(e,o.YamlKeys.Controlled.termDisplayLabel),a=(new c.ControlledTermClassBuilder).withUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termIri)).withSource(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withLabel(r??t).withPrefLabel(t).withType(i.BioportalTermType.forYamlValue(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termType)));this.readSourceAndVersion(e,a),f.valueConstraints.classes.push(a.build())}else if(t===l.YamlValues.Controlled.branch){const t=(new u.ControlledTermBranchBuilder).withUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termBaseIri)).withSource(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceName)).withName(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termBaseLabel)).withAcronym(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withMaxDepth(n.ReaderUtil.getNumberOrZero(e,o.YamlKeys.Controlled.termMaxDepth));this.readSourceAndVersion(e,t),f.valueConstraints.branches.push(t.build())}else if(t===l.YamlValues.Controlled.valueSet){const t=(new m.ControlledTermValueSetBuilder).withUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termBaseIri)).withNumTerms(n.ReaderUtil.getNumberOrNull(e,o.YamlKeys.Controlled.termCount)).withVsCollection(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withName(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termBaseLabel));this.readSourceAndVersion(e,t),f.valueConstraints.valueSets.push(t.build())}});const y=n.ReaderUtil.getNodeOrNull(e,o.YamlKeys.default);if(null!==y){const e=n.ReaderUtil.getIdentifierURI(y,o.YamlKeys.value),t=n.ReaderUtil.getStringOrEmpty(y,o.YamlKeys.label);f.valueConstraints.defaultValue=new a.ControlledTermDefaultValue(e,t)}return n.ReaderUtil.getNodeList(e,o.YamlKeys.actions).forEach(e=>{const t=(new p.ControlledTermActionBuilder).withAction(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.action)).withSource(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withType(i.BioportalTermType.forYamlValue(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.type))).withTermUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termIri)).withTo(n.ReaderUtil.getNumber(e,o.YamlKeys.Controlled.to)).withSourceUri(n.ReaderUtil.getURI(e,o.YamlKeys.Controlled.sourceIri));f.valueConstraints.actions.push(t.build())}),f}ontologyUri(e){return new f.Iri(`https://data.bioontology.org/ontologies/${n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)}`)}readSourceAndVersion(e,t){const r=n.ReaderUtil.getURI(e,o.YamlKeys.Controlled.sourceIri);r.isEmpty()||t.withIri(r),t.withSourceSystem(n.ReaderUtil.getString(e,o.YamlKeys.Controlled.sourceSystem));const a=n.ReaderUtil.getNodeOrNull(e,o.YamlKeys.version);null!==a&&t.withVersion(new y.ControlledTermVersion(n.ReaderUtil.getStringOrEmpty(a,o.YamlKeys.Controlled.versionId),n.ReaderUtil.getString(a,o.YamlKeys.Controlled.versionEffectiveDate),n.ReaderUtil.getString(a,o.YamlKeys.Controlled.versionDeclaredVersion)))}}t.YamlFieldReaderControlledTerm=T},9535(e,t,r){t.YamlFieldWriterControlledTerm=void 0;const n=r(9517),a=r(5430),i=r(2099),s=r(4216);class o extends a.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return{[i.YamlKeys.datatype]:s.NonStandardDatatype.IRI}}expandValueConstraintsNodeForYAML(e,t,r){if(null!=t.valueConstraints.defaultValue){const r={[i.YamlKeys.value]:this.atomicWriter.write(t.valueConstraints.defaultValue.termUri),[i.YamlKeys.label]:t.valueConstraints.defaultValue.rdfsLabel};e[i.YamlKeys.default]=r}const a=n.JsonNode.getEmptyList();t.valueConstraints.ontologies.forEach(e=>{a.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),t.valueConstraints.classes.forEach(e=>{a.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),t.valueConstraints.branches.forEach(e=>{a.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),t.valueConstraints.valueSets.forEach(e=>{a.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),a.length>0&&(e[i.YamlKeys.values]=a);const s=n.JsonNode.getEmptyList();t.valueConstraints.actions.forEach(e=>{s.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),s.length>0&&(e[i.YamlKeys.actions]=s)}}t.YamlFieldWriterControlledTerm=o},1524(e,t,r){t.AbstractJsonControlledTermValueConstraintWriter=void 0;const n=r(9517),a=r(3557),i=r(936);class s extends a.JsonValueConstraintsWriter{writeSourceAndVersion(e,t){null===t.iri||t.iri.isEmpty()||(e[i.CedarModel.ValueConstraints.iri]=this.atomicWriter.write(t.iri)),null!==t.sourceSystem&&(e[i.CedarModel.ValueConstraints.sourceSystem]=t.sourceSystem);const r=t.version;if(null!==r){const t=n.JsonNode.getEmpty();t[i.CedarModel.ValueConstraints.versionId]=r.id,null!==r.effectiveDate&&(t[i.CedarModel.ValueConstraints.versionEffectiveDate]=r.effectiveDate),null!==r.declaredVersion&&(t[i.CedarModel.ValueConstraints.versionDeclaredVersion]=r.declaredVersion),e[i.CedarModel.ValueConstraints.version]=t}}}t.AbstractJsonControlledTermValueConstraintWriter=s},4339(e,t,r){t.AbstractYamlControlledTermValueConstraintWriter=void 0;const n=r(9517),a=r(2500),i=r(2099);class s extends a.YamlValueConstraintsWriter{writeSourceSystem(e,t){null!==t.sourceSystem&&(e[i.YamlKeys.Controlled.sourceSystem]=t.sourceSystem)}writeSourceIri(e,t){null===t.iri||t.iri.isEmpty()||(e[i.YamlKeys.Controlled.sourceIri]=this.atomicWriter.write(t.iri))}writeVersion(e,t){const r=t.version;if(null===r)return;const a=n.JsonNode.getEmpty();a[i.YamlKeys.Controlled.versionId]=r.id,null!==r.effectiveDate&&(a[i.YamlKeys.Controlled.versionEffectiveDate]=r.effectiveDate),null!==r.declaredVersion&&(a[i.YamlKeys.Controlled.versionDeclaredVersion]=r.declaredVersion),e[i.YamlKeys.version]=a}}t.AbstractYamlControlledTermValueConstraintWriter=s},2369(e,t,r){t.ControlledTermAbstractValueConstraint=void 0;const n=r(4328);class a extends n.ValueConstraints{className="ControlledTermAbstractValueConstraint";_iri;_sourceSystem;_version;constructor(e=null,t=null,r=null){super(),this._iri=e,this._sourceSystem=t,this._version=r}get iri(){return this._iri}get sourceSystem(){return this._sourceSystem}get version(){return this._version}}t.ControlledTermAbstractValueConstraint=a},7295(e,t){t.ControlledTermDefaultValue=void 0,t.ControlledTermDefaultValue=class{_termUri;_rdfsLabel;constructor(e,t){this._termUri=e,this._rdfsLabel=t}get termUri(){return this._termUri}get rdfsLabel(){return this._rdfsLabel}isControlledDefaultValue(){return!1}}},2480(e,t,r){t.ControlledTermDefaultValueBuilder=void 0;const n=r(8802),a=r(7295),i=r(3539);t.ControlledTermDefaultValueBuilder=class{termUri=n.Iri.empty();rdfsLabel="";withTermUri(e){return this.termUri=e,this}withRdfsLabel(e){return this.rdfsLabel=e,this}build(){return i.ValueConstraintRequirements.requireIri(this.termUri,"a term URI","A controlled-term default value"),i.ValueConstraintRequirements.requireText(this.rdfsLabel,"a label","A controlled-term default value"),new a.ControlledTermDefaultValue(this.termUri,this.rdfsLabel)}}},5753(e,t){t.ControlledTermVersion=void 0,t.ControlledTermVersion=class{_id;_effectiveDate;_declaredVersion;constructor(e,t=null,r=null){this._id=e,this._effectiveDate=t,this._declaredVersion=r}get id(){return this._id}get effectiveDate(){return this._effectiveDate}get declaredVersion(){return this._declaredVersion}}},3539(e,t){t.ValueConstraintRequirements=void 0,t.ValueConstraintRequirements=class{static requireText(e,t,r){if(null==e||""===e)throw new Error(`${r} requires ${t}.`)}static requireIri(e,t,r){if(null==e||e.isEmpty())throw new Error(`${r} requires ${t}. A constraint that points at nothing cannot be resolved.`)}static requireTermType(e,t){if(null==e||null===e.getJsonValue())throw new Error(`${t} requires a term type.`)}}},7432(e,t,r){t.ControlledTermAction=void 0;const n=r(2369);class a extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermAction";className="ControlledTermAction";_to=null;_action;_termUri;_sourceUri;_source;_type;constructor(e,t,r,n,a,i){super(),this._to=e,this._action=t,this._termUri=r,this._sourceUri=n,this._source=a,this._type=i}get to(){return this._to}get action(){return this._action}get termUri(){return this._termUri}get sourceUri(){return this._sourceUri}get source(){return this._source}get type(){return this._type}}t.ControlledTermAction=a},7733(e,t,r){t.ControlledTermActionBuilder=void 0;const n=r(8802),a=r(7432),i=r(3539),s=r(4531);t.ControlledTermActionBuilder=class{_to=null;_action="";_termUri=n.Iri.empty();_sourceUri=n.Iri.empty();_source="";_type=s.BioportalTermType.NULL;withTo(e){return this._to=e,this}withAction(e){return this._action=e,this}withTermUri(e){return this._termUri=e,this}withSourceUri(e){return this._sourceUri=e,this}withSource(e){return this._source=e,this}withType(e){return this._type=e,this}build(){return i.ValueConstraintRequirements.requireText(this._action,"an action","A controlled-term action"),i.ValueConstraintRequirements.requireIri(this._termUri,"a term URI","A controlled-term action"),i.ValueConstraintRequirements.requireIri(this._sourceUri,"a source URI","A controlled-term action"),i.ValueConstraintRequirements.requireText(this._source,"a source","A controlled-term action"),i.ValueConstraintRequirements.requireTermType(this._type,"A controlled-term action"),new a.ControlledTermAction(this._to,this._action,this._termUri,this._sourceUri,this._source,this._type)}}},8014(e,t,r){t.JsonValueConstraintsActionWriter=void 0;const n=r(9517),a=r(936),i=r(1524);class s extends i.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.CedarModel.ValueConstraints.termUri]=this.atomicWriter.write(e.termUri),t[a.CedarModel.ValueConstraints.source]=e.source,t[a.CedarModel.ValueConstraints.type]=this.atomicWriter.write(e.type),t[a.CedarModel.ValueConstraints.action]=e.action,t[a.CedarModel.ValueConstraints.sourceUri]=this.atomicWriter.write(e.sourceUri),null!==e.to&&(t[a.CedarModel.ValueConstraints.to]=e.to),t}}t.JsonValueConstraintsActionWriter=s},4647(e,t,r){t.YamlValueConstraintsActionWriter=void 0;const n=r(9517),a=r(4339),i=r(2099);class s extends a.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.YamlKeys.action]=e.action,null!==e.to&&(t[i.YamlKeys.Controlled.to]=e.to),t[i.YamlKeys.Controlled.termIri]=this.atomicWriter.write(e.termUri),t[i.YamlKeys.Controlled.sourceIri]=this.atomicWriter.write(e.sourceUri),t[i.YamlKeys.Controlled.sourceAcronym]=e.source,t[i.YamlKeys.type]=this.atomicWriter.write(e.type),t}}t.YamlValueConstraintsActionWriter=s},9184(e,t,r){t.ControlledTermBranch=void 0;const n=r(2369);class a extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermBranch";className="ControlledTermBranch";_source;_acronym;_name;_uri;_maxDepth=0;constructor(e,t,r,n,a,i=null,s=null,o=null){super(i,s,o),this._source=e,this._acronym=t,this._uri=a,this._name=r,this._maxDepth=n}get source(){return this._source}get acronym(){return this._acronym}get name(){return this._name}get uri(){return this._uri}get maxDepth(){return this._maxDepth}}t.ControlledTermBranch=a},2957(e,t,r){t.ControlledTermBranchBuilder=void 0;const n=r(8802),a=r(9184),i=r(3539);t.ControlledTermBranchBuilder=class{_source="";_acronym="";_name="";_uri=n.Iri.empty();_maxDepth=0;_iri=null;_sourceSystem=null;_version=null;withSource(e){return this._source=e,this}withAcronym(e){return this._acronym=e,this}withName(e){return this._name=e,this}withUri(e){return this._uri=e,this}withMaxDepth(e){return this._maxDepth=e,this}withIri(e){return this._iri=e,this}withSourceSystem(e){return this._sourceSystem=e,this}withVersion(e){return this._version=e,this}build(){return i.ValueConstraintRequirements.requireIri(this._uri,"a URI","A branch constraint"),i.ValueConstraintRequirements.requireText(this._source,"a source","A branch constraint"),i.ValueConstraintRequirements.requireText(this._acronym,"an acronym","A branch constraint"),i.ValueConstraintRequirements.requireText(this._name,"a name","A branch constraint"),new a.ControlledTermBranch(this._source,this._acronym,this._name,this._maxDepth,this._uri,this._iri,this._sourceSystem,this._version)}}},7054(e,t,r){t.JsonValueConstraintsBranchWriter=void 0;const n=r(9517),a=r(936),i=r(1524);class s extends i.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[a.CedarModel.ValueConstraints.source]=e.source,t[a.CedarModel.ValueConstraints.acronym]=e.acronym,t[a.CedarModel.ValueConstraints.name]=e.name,t[a.CedarModel.ValueConstraints.maxDepth]=e.maxDepth,this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsBranchWriter=s},3671(e,t,r){t.YamlValueConstraintsBranchWriter=void 0;const n=r(9517),a=r(4339),i=r(2099),s=r(8349);class o extends a.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.YamlKeys.type]=s.YamlValues.Controlled.branch,this.writeSourceSystem(t,e),t[i.YamlKeys.Controlled.sourceAcronym]=e.acronym,t[i.YamlKeys.Controlled.sourceName]=e.source,this.writeSourceIri(t,e),t[i.YamlKeys.Controlled.termBaseIri]=this.atomicWriter.write(e.uri),t[i.YamlKeys.Controlled.termBaseLabel]=e.name,t[i.YamlKeys.Controlled.termMaxDepth]=e.maxDepth,this.writeVersion(t,e),t}}t.YamlValueConstraintsBranchWriter=o},2418(e,t,r){t.ControlledTermClass=void 0;const n=r(2369);class a extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermClass";className="ControlledTermClass";_label;_source;_type;_prefLabel;_uri;constructor(e,t,r,n,a,i=null,s=null,o=null){super(i,s,o),this._label=e,this._source=t,this._type=r,this._prefLabel=n,this._uri=a}get label(){return this._label}get source(){return this._source}get type(){return this._type}get prefLabel(){return this._prefLabel}get uri(){return this._uri}}t.ControlledTermClass=a},3091(e,t,r){t.ControlledTermClassBuilder=void 0;const n=r(8802),a=r(2418),i=r(3539),s=r(4531);t.ControlledTermClassBuilder=class{_label="";_source="";_type=s.BioportalTermType.NULL;_prefLabel="";_uri=n.Iri.empty();_iri=null;_sourceSystem=null;_version=null;withLabel(e){return this._label=e,this}withSource(e){return this._source=e,this}withType(e){return this._type=e,this}withPrefLabel(e){return this._prefLabel=e,this}withUri(e){return this._uri=e,this}withIri(e){return this._iri=e,this}withSourceSystem(e){return this._sourceSystem=e,this}withVersion(e){return this._version=e,this}build(){return i.ValueConstraintRequirements.requireIri(this._uri,"a URI","A class constraint"),i.ValueConstraintRequirements.requireText(this._label,"a label","A class constraint"),i.ValueConstraintRequirements.requireText(this._prefLabel,"a preferred label","A class constraint"),i.ValueConstraintRequirements.requireText(this._source,"a source","A class constraint"),i.ValueConstraintRequirements.requireTermType(this._type,"A class constraint"),new a.ControlledTermClass(this._label,this._source,this._type,this._prefLabel,this._uri,this._iri,this._sourceSystem,this._version)}}},9222(e,t,r){t.JsonValueConstraintsClassWriter=void 0;const n=r(9517),a=r(936),i=r(1524);class s extends i.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[a.CedarModel.ValueConstraints.source]=e.source,t[a.CedarModel.ValueConstraints.label]=e.label,t[a.CedarModel.ValueConstraints.prefLabel]=e.prefLabel,t[a.CedarModel.ValueConstraints.type]=this.atomicWriter.write(e.type),this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsClassWriter=s},765(e,t,r){t.YamlValueConstraintsClassWriter=void 0;const n=r(9517),a=r(4339),i=r(2099),s=r(8349);class o extends a.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.YamlKeys.type]=s.YamlValues.Controlled.class,this.writeSourceSystem(t,e),t[i.YamlKeys.Controlled.sourceAcronym]=e.source,this.writeSourceIri(t,e),t[i.YamlKeys.Controlled.termIri]=this.atomicWriter.write(e.uri),t[i.YamlKeys.Controlled.termType]=this.atomicWriter.write(e.type),t[i.YamlKeys.Controlled.termLabel]=e.prefLabel,e.label!==e.prefLabel&&(t[i.YamlKeys.Controlled.termDisplayLabel]=e.label),this.writeVersion(t,e),t}}t.YamlValueConstraintsClassWriter=o},8354(e,t,r){t.ControlledTermOntology=void 0;const n=r(2369);class a extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermOntology";className="ControlledTermOntology";_acronym;_name;_uri;_numTerms=0;constructor(e,t,r,n,a=null,i=null,s=null){super(a,i,s),this._acronym=e,this._name=t,this._uri=n,this._numTerms=r}get acronym(){return this._acronym}get name(){return this._name}get uri(){return this._uri}get numTerms(){return this._numTerms}}t.ControlledTermOntology=a},5491(e,t,r){t.ControlledTermOntologyBuilder=void 0;const n=r(8802),a=r(8354),i=r(3539);t.ControlledTermOntologyBuilder=class{acronym="";name="";numTerms=null;uri=n.Iri.empty();iri=null;sourceSystem=null;version=null;withAcronym(e){return this.acronym=e,this}withName(e){return this.name=e,this}withNumTerms(e){return this.numTerms=e,this}withUri(e){return this.uri=e,this}withIri(e){return this.iri=e,this}withSourceSystem(e){return this.sourceSystem=e,this}withVersion(e){return this.version=e,this}build(){return i.ValueConstraintRequirements.requireIri(this.uri,"a URI","An ontology constraint"),i.ValueConstraintRequirements.requireText(this.acronym,"an acronym","An ontology constraint"),i.ValueConstraintRequirements.requireText(this.name,"a name","An ontology constraint"),new a.ControlledTermOntology(this.acronym,this.name,this.numTerms,this.uri,this.iri,this.sourceSystem,this.version)}}},5996(e,t,r){t.JsonValueConstraintsOntologyWriter=void 0;const n=r(9517),a=r(936),i=r(1524);class s extends i.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[a.CedarModel.ValueConstraints.acronym]=e.acronym,t[a.CedarModel.ValueConstraints.name]=e.name,null!==e.numTerms&&(t[a.CedarModel.ValueConstraints.numTerms]=e.numTerms),this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsOntologyWriter=s},1181(e,t,r){t.YamlValueConstraintsOntologyWriter=void 0;const n=r(9517),a=r(4339),i=r(2099),s=r(8349);class o extends a.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.YamlKeys.type]=s.YamlValues.Controlled.ontology,this.writeSourceSystem(t,e),t[i.YamlKeys.Controlled.sourceAcronym]=e.acronym,t[i.YamlKeys.Controlled.sourceName]=e.name,this.writeSourceIri(t,e),null!==e.numTerms&&(t[i.YamlKeys.Controlled.termCount]=e.numTerms),this.writeVersion(t,e),t}}t.YamlValueConstraintsOntologyWriter=o},2395(e,t,r){t.ControlledTermValueSet=void 0;const n=r(2369);class a extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermValueSet";className="ControlledTermValueSet";_vsCollection;_name;_uri;_numTerms=0;constructor(e,t,r,n,a=null,i=null,s=null){super(a,i,s),this._vsCollection=e,this._name=t,this._uri=n,this._numTerms=r}get vsCollection(){return this._vsCollection}get name(){return this._name}get uri(){return this._uri}get numTerms(){return this._numTerms}}t.ControlledTermValueSet=a},1556(e,t,r){t.ControlledTermValueSetBuilder=void 0;const n=r(8802),a=r(2395),i=r(3539);t.ControlledTermValueSetBuilder=class{_vsCollection="";_name="";_uri=n.Iri.empty();_numTerms=null;_iri=null;_sourceSystem=null;_version=null;withVsCollection(e){return this._vsCollection=e,this}withName(e){return this._name=e,this}withUri(e){return this._uri=e,this}withNumTerms(e){return this._numTerms=e,this}withIri(e){return this._iri=e,this}withSourceSystem(e){return this._sourceSystem=e,this}withVersion(e){return this._version=e,this}build(){return i.ValueConstraintRequirements.requireIri(this._uri,"a URI","A value-set constraint"),i.ValueConstraintRequirements.requireText(this._vsCollection,"a value-set collection","A value-set constraint"),i.ValueConstraintRequirements.requireText(this._name,"a name","A value-set constraint"),new a.ControlledTermValueSet(this._vsCollection,this._name,this._numTerms,this._uri,this._iri,this._sourceSystem,this._version)}}},2813(e,t,r){t.JsonValueConstraintsValueSetWriter=void 0;const n=r(9517),a=r(936),i=r(1524);class s extends i.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[a.CedarModel.ValueConstraints.vsCollection]=e.vsCollection,t[a.CedarModel.ValueConstraints.name]=e.name,null!==e.numTerms&&(t[a.CedarModel.ValueConstraints.numTerms]=e.numTerms),this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsValueSetWriter=s},9532(e,t,r){t.YamlValueConstraintsValueSetWriter=void 0;const n=r(9517),a=r(4339),i=r(2099),s=r(8349);class o extends a.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.YamlKeys.type]=s.YamlValues.Controlled.valueSet,this.writeSourceSystem(t,e),t[i.YamlKeys.Controlled.sourceAcronym]=e.vsCollection,this.writeSourceIri(t,e),t[i.YamlKeys.Controlled.termBaseIri]=this.atomicWriter.write(e.uri),t[i.YamlKeys.Controlled.termBaseLabel]=e.name,null!==e.numTerms&&(t[i.YamlKeys.Controlled.termCount]=e.numTerms),this.writeVersion(t,e),t}}t.YamlValueConstraintsValueSetWriter=o},1667(e,t,r){t.EmailFieldBuilderImpl=void 0;const n=r(3350),a=r(4450);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.EmailFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.EmailFieldBuilderImpl=i},4450(e,t,r){t.EmailFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(7765),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EMAIL,this.valueConstraints=new s.ValueConstraintsLiteralField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.EmailFieldImpl=l},2691(e,t,r){t.JsonFieldReaderEmail=void 0;const n=r(4385),a=r(4450),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.EmailFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderEmail=l},9031(e,t,r){t.JsonFieldWriterEmail=void 0;const n=r(2748),a=r(936),i=r(6145);class s extends n.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterEmail=s},3054(e,t,r){t.YamlFieldReaderEmail=void 0;const n=r(5675),a=r(4450),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.EmailFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.literalFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderEmail=o},1038(e,t,r){t.YamlFieldWriterEmail=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterEmail=s},6610(e,t,r){t.ExtDoiFieldBuilderImpl=void 0;const n=r(3350),a=r(997);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtDoiFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtDoiFieldBuilderImpl=i},997(e,t,r){t.ExtDoiFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_DOI,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtDoiFieldImpl=l},8583(e,t,r){t.JsonFieldReaderExtDoi=void 0;const n=r(4385),a=r(997),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtDoiFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtDoi=l},7412(e,t,r){t.JsonFieldWriterExtDoi=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtDoi=l},5907(e,t,r){t.YamlFieldReaderExtDoi=void 0;const n=r(5675),a=r(997),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtDoiFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtDoi=o},6967(e,t,r){t.YamlFieldWriterExtDoi=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtDoi=s},9062(e,t,r){t.ExtNihGrantIdFieldBuilderImpl=void 0;const n=r(3350),a=r(7313);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtNihGrantIdFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtNihGrantIdFieldBuilderImpl=i},7313(e,t,r){t.ExtNihGrantIdFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_NIH_GRANT_ID,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtNihGrantIdFieldImpl=l},1886(e,t,r){t.JsonFieldReaderExtNihGrantId=void 0;const n=r(4385),a=r(7313),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtNihGrantIdFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtNihGrantId=l},5250(e,t,r){t.JsonFieldWriterExtNihGrantId=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtNihGrantId=l},8543(e,t,r){t.YamlFieldReaderExtNihGrantId=void 0;const n=r(5675),a=r(7313),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtNihGrantIdFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtNihGrantId=o},3711(e,t,r){t.YamlFieldWriterExtNihGrantId=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtNihGrantId=s},2376(e,t,r){t.ExtOrcidFieldBuilderImpl=void 0;const n=r(3350),a=r(5967);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtOrcidFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtOrcidFieldBuilderImpl=i},5967(e,t,r){t.ExtOrcidFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_ORCID,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtOrcidFieldImpl=l},4956(e,t,r){t.JsonFieldReaderExtOrcid=void 0;const n=r(4385),a=r(5967),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtOrcidFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtOrcid=l},8096(e,t,r){t.JsonFieldWriterExtOrcid=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtOrcid=l},7123(e,t,r){t.YamlFieldReaderExtOrcid=void 0;const n=r(5675),a=r(5967),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtOrcidFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtOrcid=o},4355(e,t,r){t.YamlFieldWriterExtOrcid=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtOrcid=s},3914(e,t,r){t.ExtPfasFieldBuilderImpl=void 0;const n=r(3350),a=r(6637);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtPfasFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtPfasFieldBuilderImpl=i},6637(e,t,r){t.ExtPfasFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_PFAS,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtPfasFieldImpl=l},6854(e,t,r){t.JsonFieldReaderExtPfas=void 0;const n=r(4385),a=r(6637),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtPfasFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtPfas=l},6122(e,t,r){t.JsonFieldWriterExtPfas=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtPfas=l},5075(e,t,r){t.YamlFieldReaderExtPfas=void 0;const n=r(5675),a=r(6637),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtPfasFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtPfas=o},5587(e,t,r){t.YamlFieldWriterExtPfas=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtPfas=s},7162(e,t,r){t.ExtPubmedFieldBuilderImpl=void 0;const n=r(3350),a=r(2685);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtPubmedFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtPubmedFieldBuilderImpl=i},2685(e,t,r){t.ExtPubmedFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_PUBMED,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtPubmedFieldImpl=l},3028(e,t,r){t.JsonFieldReaderExtPubmed=void 0;const n=r(4385),a=r(2685),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtPubmedFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtPubmed=l},3312(e,t,r){t.JsonFieldWriterExtPubmed=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtPubmed=l},7709(e,t,r){t.YamlFieldReaderExtPubmed=void 0;const n=r(5675),a=r(2685),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtPubmedFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtPubmed=o},6557(e,t,r){t.YamlFieldWriterExtPubmed=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtPubmed=s},7328(e,t,r){t.ExtRorFieldBuilderImpl=void 0;const n=r(3350),a=r(4007);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtRorFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtRorFieldBuilderImpl=i},4007(e,t,r){t.ExtRorFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_ROR,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtRorFieldImpl=l},8244(e,t,r){t.JsonFieldReaderExtRor=void 0;const n=r(4385),a=r(4007),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtRorFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtRor=l},7584(e,t,r){t.JsonFieldWriterExtRor=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtRor=l},6651(e,t,r){t.YamlFieldReaderExtRor=void 0;const n=r(5675),a=r(4007),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtRorFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtRor=o},491(e,t,r){t.YamlFieldWriterExtRor=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtRor=s},3474(e,t,r){t.ExtRridFieldBuilderImpl=void 0;const n=r(3350),a=r(789);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtRridFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtRridFieldBuilderImpl=i},789(e,t,r){t.ExtRridFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_RRID,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtRridFieldImpl=l},7004(e,t,r){t.JsonFieldReaderExtRrid=void 0;const n=r(4385),a=r(789),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtRridFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtRrid=l},4780(e,t,r){t.JsonFieldWriterExtRrid=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtRrid=l},6089(e,t,r){t.YamlFieldReaderExtRrid=void 0;const n=r(5675),a=r(789),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtRridFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtRrid=o},4077(e,t,r){t.YamlFieldWriterExtRrid=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtRrid=s},7095(e,t,r){t.JsonFieldReaderLink=void 0;const n=r(4385),a=r(4084),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.LinkFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderLink=l},3691(e,t,r){t.JsonFieldWriterLink=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterLink=l},9497(e,t,r){t.LinkFieldBuilderImpl=void 0;const n=r(3350),a=r(4084);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.LinkFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.LinkFieldBuilderImpl=i},4084(e,t,r){t.LinkFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.LINK,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.LinkFieldImpl=l},8568(e,t,r){t.YamlFieldReaderLink=void 0;const n=r(5675),a=r(4084),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.LinkFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderLink=o},1784(e,t,r){t.YamlFieldWriterLink=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterLink=s},1513(e,t,r){t.MultipleChoiceListFieldBuilderImpl=void 0;const n=r(9513);class a extends n.ListFieldBuilderImpl{constructor(){super(),this.multipleChoice=!0}static create(){return new a}build(){return super.build()}}t.MultipleChoiceListFieldBuilderImpl=a},4932(e,t,r){t.MultipleChoiceListFieldImpl=void 0;const n=r(5316),a=r(4869),i=r(3239);class s extends n.ListFieldImpl{constructor(){super(),this.multipleChoice=!0,this.cedarFieldType=a.CedarFieldType.MULTIPLE_SELECT_LIST}static buildEmpty(){return new s}isMultiInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new i.ChildDeploymentInfoAlwaysMultipleBuilder(this,e)}}t.MultipleChoiceListFieldImpl=s},7124(e,t,r){t.YamlFieldReaderMultiSelectList=void 0;const n=r(5675),a=r(4932);class i extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const s=a.MultipleChoiceListFieldImpl.buildEmpty();return n.YamlTemplateFieldTypeSpecificReader.readAndStoreListValueConstraints(e,s),s}}t.YamlFieldReaderMultiSelectList=i},9105(e,t,r){t.SingleChoiceListFieldBuilderImpl=void 0;const n=r(9513);class a extends n.ListFieldBuilderImpl{constructor(){super(),this.multipleChoice=!1}static create(){return new a}build(){return super.build()}}t.SingleChoiceListFieldBuilderImpl=a},1676(e,t,r){t.SingleChoiceListFieldImpl=void 0;const n=r(5316),a=r(3608),i=r(4869);class s extends n.ListFieldImpl{constructor(){super(),this.multipleChoice=!1,this.cedarFieldType=i.CedarFieldType.SINGLE_SELECT_LIST}static buildEmpty(){return new s}createDeploymentBuilder(e){return new a.ChildDeploymentInfoBuilder(this,e)}}t.SingleChoiceListFieldImpl=s},2709(e,t,r){t.YamlFieldReaderSingleSelectList=void 0;const n=r(5675),a=r(1676);class i extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const s=a.SingleChoiceListFieldImpl.buildEmpty();return n.YamlTemplateFieldTypeSpecificReader.readAndStoreListValueConstraints(e,s),s}}t.YamlFieldReaderSingleSelectList=i},2419(e,t,r){t.JsonFieldReaderList=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(4081),o=r(4932),l=r(1676),d=r(6145);class c extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){let c=l.SingleChoiceListFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const u=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=u){n.ReaderUtil.getBoolean(u,a.CedarModel.multipleChoice)&&(c=o.MultipleChoiceListFieldImpl.buildEmpty()),c.valueConstraints.defaultValue=d.DefaultValueSerialization.literalFromNode(u,a.CedarModel.defaultValue);const e=n.ReaderUtil.getNodeList(u,a.CedarModel.literals);null!==e&&e.forEach(e=>{const t=n.ReaderUtil.getString(e,a.CedarModel.label),r=n.ReaderUtil.getBoolean(e,a.CedarModel.selectedByDefault),i=Object.hasOwn(e,a.CedarModel.selectedByDefault);if(null!=t){const e=new s.ListOption(t,r,i);c.valueConstraints.literals.push(e)}})}return c}}t.JsonFieldReaderList=c},7335(e,t,r){t.JsonFieldWriterList=void 0;const n=r(936),a=r(2748),i=r(6145);class s extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),this.expandLiterals(t,e),super.expandValueConstraintsNode(e,t,r),e[n.CedarModel.multipleChoice]=t.multipleChoice}}t.JsonFieldWriterList=s},9513(e,t,r){t.ListFieldBuilderImpl=void 0;const n=r(4081),a=r(3350),i=r(4932),s=r(1676);class o extends a.TemplateFieldBuilder{multipleChoice=!1;defaultValue=null;literals=[];constructor(){super()}withDefaultValue(e){return this.defaultValue=e,this}addListOption(e,t){return this.literals.push(new n.ListOption(e,t??!1,void 0!==t)),this}build(){let e;if(e=this.multipleChoice?i.MultipleChoiceListFieldImpl.buildEmpty():s.SingleChoiceListFieldImpl.buildEmpty(),super.buildInternal(e),!this.multipleChoice){let e=-1;for(let t=this.literals.length-1;t>=0;t--)if(this.literals[t].selectedByDefault){e=t;break}-1!==e&&this.literals.forEach((t,r)=>{t.selectedByDefault=r===e,t.statesSelectedByDefault=t.selectedByDefault})}return e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.literals=this.literals,e}}t.ListFieldBuilderImpl=o},5316(e,t,r){t.ListFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1623);class o extends n.TemplateField{valueConstraints;multipleChoice;constructor(){super(),this.cedarFieldType=a.CedarFieldType.NULL,this.valueConstraints=new s.ValueConstraintsListField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.multipleChoice=!1}}t.ListFieldImpl=o},4081(e,t,r){t.ListOption=void 0;const n=r(7282);class a extends n.ChoiceOptionEntity{constructor(e,t,r=!0){super(e,t,r)}}t.ListOption=a},1623(e,t,r){t.ValueConstraintsListField=void 0;const n=r(7765);class a extends n.ValueConstraintsLiteralField{literals=[];constructor(){super()}}t.ValueConstraintsListField=a},3080(e,t,r){t.YamlFieldWriterList=void 0;const n=r(5430),a=r(9499),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){s.DefaultValueSerialization.writeLiteral(e,i.YamlKeys.default,t.valueConstraints.defaultValue),this.expandLiterals(t,e)}getYamlType(e){return e.multipleChoice?a.YamlArtifactType.MULTI_SELECT_LIST.getValue():a.YamlArtifactType.SINGLE_SELECT_LIST.getValue()}}t.YamlFieldWriterList=o},1769(e,t,r){t.JsonFieldReaderNumeric=void 0;const n=r(8748),a=r(936),i=r(3447),s=r(4385),o=r(4074),l=r(6444);class d extends s.JsonTemplateFieldTypeSpecificReader{read(e,t,r,s){const d=o.NumericFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=c){const e=n.ReaderUtil.getString(c,a.CedarModel.numberType);null!==e&&(d.valueConstraints.numberType=i.NumberType.forValue(e)),d.valueConstraints.minValue=n.ReaderUtil.getNumber(c,a.CedarModel.minValue),d.valueConstraints.maxValue=n.ReaderUtil.getNumber(c,a.CedarModel.maxValue),d.valueConstraints.decimalPlaces=n.ReaderUtil.getNumber(c,a.CedarModel.decimalPlace),d.valueConstraints.unitOfMeasure=n.ReaderUtil.getString(c,a.CedarModel.unitOfMeasure),d.valueConstraints.defaultValue=n.ReaderUtil.getNumericDefault(c,a.CedarModel.defaultValue),l.NumericDefaultValueValidator.assertValid(d.valueConstraints.numberType,d.valueConstraints.defaultValue,d.valueConstraints.minValue,d.valueConstraints.maxValue)}return d}}t.JsonFieldReaderNumeric=d},4841(e,t,r){t.JsonFieldWriterNumeric=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6444);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandPropertiesNode(e){e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_LITERAL}expandRequiredNode(e){e[a.JsonSchema.required]=[a.JsonSchema.atValue,a.JsonSchema.atType]}expandValueConstraintsNode(e,t,r){o.NumericDefaultValueValidator.assertValid(t.valueConstraints.numberType,t.valueConstraints.defaultValue,t.valueConstraints.minValue,t.valueConstraints.maxValue),e[s.CedarModel.numberType]=this.atomicWriter.write(t.valueConstraints.numberType),null!=t.valueConstraints.minValue&&(e[s.CedarModel.minValue]=t.valueConstraints.minValue),null!=t.valueConstraints.maxValue&&(e[s.CedarModel.maxValue]=t.valueConstraints.maxValue),null!=t.valueConstraints.decimalPlaces&&(e[s.CedarModel.decimalPlace]=t.valueConstraints.decimalPlaces),null!=t.valueConstraints.unitOfMeasure&&(e[s.CedarModel.unitOfMeasure]=t.valueConstraints.unitOfMeasure),null!=t.valueConstraints.defaultValue&&(e[s.CedarModel.defaultValue]=String(t.valueConstraints.defaultValue)),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterNumeric=l},6444(e,t,r){t.NumericDefaultValueValidator=void 0;const n=r(3447);t.NumericDefaultValueValidator=class{static assertValid(e,t,r=null,a=null){if(null===t)return;if(!Number.isFinite(t))throw new Error("Numeric default must be finite.");const i=e.getValue();if(null===i)throw new Error("Numeric default requires a numeric datatype.");const s={[n.NumberTypeValues.BYTE]:[-128,127],[n.NumberTypeValues.SHORT]:[-32768,32767],[n.NumberTypeValues.INT]:[-2147483648,2147483647],[n.NumberTypeValues.LONG]:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER]}[i];if(void 0!==s){if(!Number.isSafeInteger(t))throw new Error(`Numeric default ${t} must be a safely representable integer for ${i}.`);if(t<s[0]||t>s[1])throw new Error(`Numeric default ${t} is outside the ${i} range.`)}if(i===n.NumberTypeValues.FLOAT){const e=Math.abs(t);if(e>34028234663852886e22||0!==e&&e<1401298464324817e-60)throw new Error(`Numeric default ${t} is outside the ${i} range.`)}if(null!==r&&t<r)throw new Error(`Numeric default ${t} is below minValue ${r}.`);if(null!==a&&t>a)throw new Error(`Numeric default ${t} is above maxValue ${a}.`)}}},3675(e,t,r){t.NumericFieldBuilderImpl=void 0;const n=r(3350),a=r(3447),i=r(4074),s=r(6444);class o extends n.TemplateFieldBuilder{numberType=a.NumberType.DECIMAL;minValue=null;maxValue=null;decimalPlaces=null;unitOfMeasure=null;defaultValue=null;constructor(){super()}static create(){return new o}withNumberType(e){return this.numberType=e,this}withMinValue(e){return this.minValue=e,this}withMaxValue(e){return this.maxValue=e,this}withDecimalPlaces(e){return this.decimalPlaces=e,this}withUnitOfMeasure(e){return this.unitOfMeasure=e,this}withDefaultValue(e){return this.defaultValue=e,this}build(){s.NumericDefaultValueValidator.assertValid(this.numberType,this.defaultValue,this.minValue,this.maxValue);const e=i.NumericFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.numberType=this.numberType,e.valueConstraints.minValue=this.minValue,e.valueConstraints.maxValue=this.maxValue,e.valueConstraints.decimalPlaces=this.decimalPlaces,e.valueConstraints.unitOfMeasure=this.unitOfMeasure,e.valueConstraints.defaultValue=this.defaultValue,e}}t.NumericFieldBuilderImpl=o},4074(e,t,r){t.NumericFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1211),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.NUMERIC,this.valueConstraints=new s.ValueConstraintsNumericField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.NumericFieldImpl=l},1211(e,t,r){t.ValueConstraintsNumericField=void 0;const n=r(4328),a=r(3447);class i extends n.ValueConstraints{numberType=a.NumberType.DECIMAL;minValue=null;maxValue=null;decimalPlaces=null;unitOfMeasure=null;defaultValue=null;constructor(){super()}}t.ValueConstraintsNumericField=i},1872(e,t,r){t.YamlFieldReaderNumeric=void 0;const n=r(8748),a=r(3447),i=r(5675),s=r(2099),o=r(4074),l=r(6444);class d extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const d=o.NumericFieldImpl.buildEmpty(),c=n.ReaderUtil.getString(e,s.YamlKeys.datatype);return null!==c&&(d.valueConstraints.numberType=a.NumberType.forValue(c)),d.valueConstraints.minValue=n.ReaderUtil.getNumber(e,s.YamlKeys.minValue),d.valueConstraints.maxValue=n.ReaderUtil.getNumber(e,s.YamlKeys.maxValue),d.valueConstraints.decimalPlaces=n.ReaderUtil.getNumber(e,s.YamlKeys.decimalPlaces),d.valueConstraints.unitOfMeasure=n.ReaderUtil.getString(e,s.YamlKeys.unit),d.valueConstraints.defaultValue=n.ReaderUtil.getNumericDefault(e,s.YamlKeys.default),l.NumericDefaultValueValidator.assertValid(d.valueConstraints.numberType,d.valueConstraints.defaultValue,d.valueConstraints.minValue,d.valueConstraints.maxValue),d}}t.YamlFieldReaderNumeric=d},3292(e,t,r){t.YamlFieldWriterNumeric=void 0;const n=r(5430),a=r(2099),i=r(6444);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.NumericDefaultValueValidator.assertValid(t.valueConstraints.numberType,t.valueConstraints.defaultValue,t.valueConstraints.minValue,t.valueConstraints.maxValue),e[a.YamlKeys.datatype]=this.atomicWriter.write(t.valueConstraints.numberType),null!=t.valueConstraints.minValue&&(e[a.YamlKeys.minValue]=t.valueConstraints.minValue),null!=t.valueConstraints.maxValue&&(e[a.YamlKeys.maxValue]=t.valueConstraints.maxValue),null!=t.valueConstraints.decimalPlaces&&(e[a.YamlKeys.decimalPlaces]=t.valueConstraints.decimalPlaces),null!=t.valueConstraints.unitOfMeasure&&(e[a.YamlKeys.unit]=t.valueConstraints.unitOfMeasure),null!=t.valueConstraints.defaultValue&&(e[a.YamlKeys.default]=t.valueConstraints.defaultValue)}}t.YamlFieldWriterNumeric=s},1468(e,t,r){t.JsonFieldReaderPhoneNumber=void 0;const n=r(4385),a=r(7459),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.PhoneNumberFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderPhoneNumber=l},6876(e,t,r){t.JsonFieldWriterPhoneNumber=void 0;const n=r(2748),a=r(936),i=r(6145);class s extends n.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterPhoneNumber=s},8084(e,t,r){t.PhoneNumberFieldBuilderImpl=void 0;const n=r(3350),a=r(7459);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.PhoneNumberFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.PhoneNumberFieldBuilderImpl=i},7459(e,t,r){t.PhoneNumberFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(7765),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.PHONE_NUMBER,this.valueConstraints=new s.ValueConstraintsLiteralField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.PhoneNumberFieldImpl=l},4329(e,t,r){t.YamlFieldReaderPhoneNumber=void 0;const n=r(5675),a=r(7459),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.PhoneNumberFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.literalFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderPhoneNumber=o},9821(e,t,r){t.YamlFieldWriterPhoneNumber=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterPhoneNumber=s},9053(e,t,r){t.JsonFieldReaderRadio=void 0;const n=r(8748),a=r(936),i=r(3315),s=r(4385),o=r(8618),l=r(6145);class d extends s.JsonTemplateFieldTypeSpecificReader{read(e,t,r,s){const d=o.RadioFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=c){d.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(c,a.CedarModel.defaultValue);const e=n.ReaderUtil.getNodeList(c,a.CedarModel.literals);null!==e&&e.forEach(e=>{const t=n.ReaderUtil.getString(e,a.CedarModel.label),r=n.ReaderUtil.getBoolean(e,a.CedarModel.selectedByDefault),s=Object.hasOwn(e,a.CedarModel.selectedByDefault);if(null!=t){const e=new i.RadioOption(t,r,s);d.valueConstraints.literals.push(e)}})}return d}}t.JsonFieldReaderRadio=d},9309(e,t,r){t.JsonFieldWriterRadio=void 0;const n=r(936),a=r(2748),i=r(6145);class s extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),this.expandLiterals(t,e),super.expandValueConstraintsNode(e,t,r),e[n.CedarModel.multipleChoice]=!1}}t.JsonFieldWriterRadio=s},2875(e,t,r){t.RadioFieldBuilderImpl=void 0;const n=r(3350),a=r(3315),i=r(8618);class s extends n.TemplateFieldBuilder{defaultValue=null;literals=[];constructor(){super()}static create(){return new s}addRadioOption(e,t){return this.literals.push(new a.RadioOption(e,t??!1,void 0!==t)),this}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.RadioFieldImpl.buildEmpty();super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue;let t=-1;for(let e=this.literals.length-1;e>=0;e--)if(this.literals[e].selectedByDefault){t=e;break}return-1!==t&&this.literals.forEach((e,r)=>{e.selectedByDefault=r===t,e.statesSelectedByDefault=e.selectedByDefault}),e.valueConstraints.literals=this.literals,e}}t.RadioFieldBuilderImpl=s},8618(e,t,r){t.RadioFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(9931),o=r(587);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.RADIO,this.valueConstraints=new s.ValueConstraintsRadioField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}isSingleInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new o.ChildDeploymentInfoAlwaysSingleBuilder(this,e)}}t.RadioFieldImpl=l},3315(e,t,r){t.RadioOption=void 0;const n=r(7282);class a extends n.ChoiceOptionEntity{constructor(e,t,r=!0){super(e,t,r)}}t.RadioOption=a},9931(e,t,r){t.ValueConstraintsRadioField=void 0;const n=r(7765);class a extends n.ValueConstraintsLiteralField{literals=[];constructor(){super()}}t.ValueConstraintsRadioField=a},4284(e,t,r){t.YamlFieldReaderRadio=void 0;const n=r(8748),a=r(3315),i=r(5675),s=r(2099),o=r(8618),l=r(6145);class d extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const d=o.RadioFieldImpl.buildEmpty();d.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(e,s.YamlKeys.default);const c=n.ReaderUtil.getNodeList(e,s.YamlKeys.values);return null!==c&&c.forEach(e=>{const t=n.ReaderUtil.getString(e,s.YamlKeys.label),r=n.ReaderUtil.getBoolean(e,s.YamlKeys.selected),i=Object.hasOwn(e,s.YamlKeys.selected);if(null!=t){const e=new a.RadioOption(t,r,i);d.valueConstraints.literals.push(e)}}),d}}t.YamlFieldReaderRadio=d},8136(e,t,r){t.YamlFieldWriterRadio=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue),this.expandLiterals(t,e)}}t.YamlFieldWriterRadio=s},9315(e,t,r){t.JsonFieldReaderTemporal=void 0;const n=r(8748),a=r(936),i=r(8588),s=r(3764),o=r(7974),l=r(4385),d=r(964),c=r(6342);class u extends l.JsonTemplateFieldTypeSpecificReader{read(e,t,r,l){const u=d.TemporalFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const m=n.ReaderUtil.getNode(e,a.CedarModel.ui);null!=m&&(u.temporalGranularity=o.TemporalGranularity.forValue(n.ReaderUtil.getString(m,a.CedarModel.temporalGranularity)),u.inputTimeFormat=s.TimeFormat.forValue(n.ReaderUtil.getString(m,a.CedarModel.inputTimeFormat)),u.timezoneEnabled=n.ReaderUtil.getBoolean(m,a.CedarModel.timezoneEnabled));const p=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=p){const e=n.ReaderUtil.getString(p,a.CedarModel.temporalType);null!==e&&(u.valueConstraints.temporalType=i.TemporalType.forValue(e)),u.valueConstraints.defaultValue=n.ReaderUtil.getString(p,a.CedarModel.defaultValue),c.TemporalDefaultValueValidator.assertValid(u.valueConstraints.temporalType,u.temporalGranularity,u.valueConstraints.defaultValue)}return u}}t.JsonFieldReaderTemporal=u},5459(e,t,r){t.JsonFieldWriterTemporal=void 0;const n=r(936),a=r(3764),i=r(7974),s=r(2748),o=r(2733),l=r(6342);class d extends s.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUINode(e,t,r){super.expandUINode(e,t,r),t.temporalGranularity!==i.TemporalGranularity.NULL&&(e[n.CedarModel.temporalGranularity]=this.atomicWriter.write(t.temporalGranularity)),i.TemporalGranularity.hasTime(t.temporalGranularity)&&(t.inputTimeFormat!==a.TimeFormat.NULL&&(e[n.CedarModel.inputTimeFormat]=this.atomicWriter.write(t.inputTimeFormat)),e[n.CedarModel.timezoneEnabled]=t.timezoneEnabled)}expandValueConstraintsNode(e,t,r){l.TemporalDefaultValueValidator.assertValid(t.valueConstraints.temporalType,t.temporalGranularity,t.valueConstraints.defaultValue),e[n.CedarModel.temporalType]=this.atomicWriter.write(t.valueConstraints.temporalType),null!=t.valueConstraints.defaultValue&&""!==t.valueConstraints.defaultValue&&(e[n.CedarModel.defaultValue]=t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandRequiredNode(e){e[o.JsonSchema.required]=[o.JsonSchema.atValue,o.JsonSchema.atType]}}t.JsonFieldWriterTemporal=d},6342(e,t,r){t.TemporalDefaultValueValidator=void 0;const n=r(7974),a=r(8588);t.TemporalDefaultValueValidator=class{static zone="(?:Z|[+-](?:(?:0\\d|1[0-3]):[0-5]\\d|14:00))?";static hour="(?:[01]\\d|2[0-3])";static minute="[0-5]\\d";static second="[0-5]\\d";static assertValid(e,t,r){if(null===r||""===r)return;const n=e.getValue();if(null===n)throw new Error("Temporal default requires a temporal datatype.");if(!this.isCompatibleGranularity(e,t))throw new Error(`Temporal datatype ${n} is not compatible with ${t.getValue()} granularity.`);const i=this.datePattern(t,n===a.TemporalType.DATE.getValue()),s=this.timePattern(t);let o;if(o=n===a.TemporalType.DATE.getValue()?i:n===a.TemporalType.TIME.getValue()?s:this.dateTimePattern(t),!o.test(r)||!this.hasValidCalendarDate(r))throw new Error(`Temporal default "${r}" is not valid for ${n}`+(null===t.getValue()?".":` at ${t.getValue()} granularity.`))}static isCompatibleGranularity(e,t){return t===n.TemporalGranularity.NULL||(e===a.TemporalType.DATE?[n.TemporalGranularity.YEAR,n.TemporalGranularity.MONTH,n.TemporalGranularity.DAY].includes(t):e===a.TemporalType.TIME?n.TemporalGranularity.valuesWithTimes().includes(t):[n.TemporalGranularity.DAY,...n.TemporalGranularity.valuesWithTimes()].includes(t))}static datePattern(e,t){return e===n.TemporalGranularity.YEAR?/^\d{4}$/:e===n.TemporalGranularity.MONTH?/^\d{4}-(?:0[1-9]|1[0-2])$/:e!==n.TemporalGranularity.DAY&&t?/^\d{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12]\d|3[01]))?)?$/:/^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$/}static timePattern(e){const t=this.zone,r=this.hour,a=this.minute,i=this.second;return e===n.TemporalGranularity.HOUR?new RegExp(`^${r}${t}$`):e===n.TemporalGranularity.MINUTE?new RegExp(`^${r}:${a}${t}$`):e===n.TemporalGranularity.SECOND?new RegExp(`^${r}:${a}:${i}${t}$`):e===n.TemporalGranularity.DECIMAL_SECOND?new RegExp(`^${r}:${a}:${i}\\.\\d+${t}$`):new RegExp(`^${r}(?::${a}(?::${i}(?:\\.\\d+)?)?)?${t}$`)}static dateTimePattern(e){const t="\\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\\d|3[01])";return e===n.TemporalGranularity.HOUR||e===n.TemporalGranularity.MINUTE||e===n.TemporalGranularity.SECOND||e===n.TemporalGranularity.DECIMAL_SECOND?new RegExp(`^${t}T${this.timePatternSource(e)}$`):e===n.TemporalGranularity.YEAR||e===n.TemporalGranularity.MONTH?/a^/:e===n.TemporalGranularity.DAY?new RegExp(`^${t}$`):new RegExp(`^${t}(?:T${this.timePatternSource(n.TemporalGranularity.NULL)})?$`)}static timePatternSource(e){return this.timePattern(e).source.replace(/^\^|\$$/g,"")}static hasValidCalendarDate(e){const t=/^(\d{4})-(\d{2})-(\d{2})/.exec(e);if(null===t)return!0;const r=Number(t[1]),n=Number(t[2]);return Number(t[3])<=[31,r%4!=0||r%100==0&&r%400!=0?28:29,31,30,31,30,31,31,30,31,30,31][n-1]}}},345(e,t,r){t.TemporalFieldBuilderImpl=void 0;const n=r(3350),a=r(3764),i=r(7974),s=r(8588),o=r(964),l=r(6342);class d extends n.TemplateFieldBuilder{timezoneEnabled=!1;inputTimeFormat=a.TimeFormat.NULL;temporalGranularity=i.TemporalGranularity.NULL;temporalType=s.TemporalType.DATETIME;defaultValue=null;constructor(){super()}static create(){return new d}withTimezoneEnabled(e){return this.timezoneEnabled=e,this}withInputTimeFormat(e){return this.inputTimeFormat=e,this}withTemporalGranularity(e){return this.temporalGranularity=e,this}withTemporalType(e){return this.temporalType=e,this}withDefaultValue(e){return this.defaultValue=e,this}build(){l.TemporalDefaultValueValidator.assertValid(this.temporalType,this.temporalGranularity,this.defaultValue);const e=o.TemporalFieldImpl.buildEmpty();return super.buildInternal(e),e.timezoneEnabled=this.timezoneEnabled,e.inputTimeFormat=this.inputTimeFormat,e.temporalGranularity=this.temporalGranularity,e.valueConstraints.temporalType=this.temporalType,e.valueConstraints.defaultValue=this.defaultValue,e}}t.TemporalFieldBuilderImpl=d},964(e,t,r){t.TemporalFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(3567),o=r(3764),l=r(7974),d=r(3608);class c extends n.TemplateField{valueConstraints;timezoneEnabled=!1;inputTimeFormat=o.TimeFormat.NULL;temporalGranularity=l.TemporalGranularity.NULL;constructor(){super(),this.cedarFieldType=a.CedarFieldType.TEMPORAL,this.valueConstraints=new s.ValueConstraintsTemporalField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new c}createDeploymentBuilder(e){return new d.ChildDeploymentInfoBuilder(this,e)}}t.TemporalFieldImpl=c},3567(e,t,r){t.ValueConstraintsTemporalField=void 0;const n=r(4328),a=r(8588);class i extends n.ValueConstraints{temporalType=a.TemporalType.DATETIME;defaultValue=null;constructor(){super()}}t.ValueConstraintsTemporalField=i},384(e,t,r){t.YamlFieldReaderTemporal=void 0;const n=r(8748),a=r(8588),i=r(3764),s=r(7974),o=r(5675),l=r(2099),d=r(964),c=r(6342);class u extends o.YamlTemplateFieldTypeSpecificReader{read(e,t,r,o){const u=d.TemporalFieldImpl.buildEmpty();u.temporalGranularity=s.TemporalGranularity.forValue(n.ReaderUtil.getString(e,l.YamlKeys.granularity)),u.inputTimeFormat=i.TimeFormat.forValue(n.ReaderUtil.getString(e,l.YamlKeys.inputTimeFormat)),u.timezoneEnabled=n.ReaderUtil.getBoolean(e,l.YamlKeys.inputTimeZone);const m=n.ReaderUtil.getString(e,l.YamlKeys.datatype);return null!==m&&(u.valueConstraints.temporalType=a.TemporalType.forValue(m)),u.valueConstraints.defaultValue=n.ReaderUtil.getString(e,l.YamlKeys.default),c.TemporalDefaultValueValidator.assertValid(u.valueConstraints.temporalType,u.temporalGranularity,u.valueConstraints.defaultValue),u}}t.YamlFieldReaderTemporal=u},7436(e,t,r){t.YamlFieldWriterTemporal=void 0;const n=r(3764),a=r(7974),i=r(5430),s=r(2099),o=r(6342);class l extends i.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){o.TemporalDefaultValueValidator.assertValid(t.valueConstraints.temporalType,t.temporalGranularity,t.valueConstraints.defaultValue),e[s.YamlKeys.datatype]=this.atomicWriter.write(t.valueConstraints.temporalType),t.temporalGranularity!==a.TemporalGranularity.NULL?(e[s.YamlKeys.granularity]=this.atomicWriter.write(t.temporalGranularity),null!=t.valueConstraints.defaultValue&&""!==t.valueConstraints.defaultValue&&(e[s.YamlKeys.default]=t.valueConstraints.defaultValue),t.temporalGranularity!==a.TemporalGranularity.YEAR&&t.temporalGranularity!==a.TemporalGranularity.MONTH&&t.temporalGranularity!==a.TemporalGranularity.DAY&&(t.inputTimeFormat!==n.TimeFormat.NULL&&(e[s.YamlKeys.inputTimeFormat]=this.atomicWriter.write(t.inputTimeFormat)),t.timezoneEnabled&&(e[s.YamlKeys.inputTimeZone]=t.timezoneEnabled))):null!=t.valueConstraints.defaultValue&&""!==t.valueConstraints.defaultValue&&(e[s.YamlKeys.default]=t.valueConstraints.defaultValue)}}t.YamlFieldWriterTemporal=l},9683(e,t,r){t.JsonFieldReaderTextArea=void 0;const n=r(4385),a=r(5450),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.TextAreaImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(d,s.CedarModel.defaultValue),l.valueConstraints.minLength=i.ReaderUtil.getNumber(d,s.CedarModel.minLength),l.valueConstraints.maxLength=i.ReaderUtil.getNumber(d,s.CedarModel.maxLength)),l}}t.JsonFieldReaderTextArea=l},275(e,t,r){t.JsonFieldWriterTextArea=void 0;const n=r(2748),a=r(936),i=r(6145);class s extends n.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.CedarModel.defaultValue,t.valueConstraints.defaultValue),null!==t.valueConstraints.minLength&&(e[a.CedarModel.minLength]=t.valueConstraints.minLength),null!==t.valueConstraints.maxLength&&(e[a.CedarModel.maxLength]=t.valueConstraints.maxLength),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterTextArea=s},1259(e,t,r){t.TextAreaBuilderImpl=void 0;const n=r(3350),a=r(5450);class i extends n.TemplateFieldBuilder{defaultValue=null;minLength=null;maxLength=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}withMinLength(e){return this.minLength=e,this}withMaxLength(e){return this.maxLength=e,this}build(){const e=a.TextAreaImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.minLength=this.minLength,e.valueConstraints.maxLength=this.maxLength,e}}t.TextAreaBuilderImpl=i},5450(e,t,r){t.TextAreaImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(3608),o=r(5923);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.TEXTAREA,this.valueConstraints=new o.ValueConstraintsTextArea,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new s.ChildDeploymentInfoBuilder(this,e)}}t.TextAreaImpl=l},5923(e,t,r){t.ValueConstraintsTextArea=void 0;const n=r(7765);class a extends n.ValueConstraintsLiteralField{minLength=null;maxLength=null;constructor(){super()}}t.ValueConstraintsTextArea=a},3168(e,t,r){t.YamlFieldReaderTextArea=void 0;const n=r(8748),a=r(5675),i=r(5450),s=r(2099),o=r(6145);class l extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const l=i.TextAreaImpl.buildEmpty();return l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(e,s.YamlKeys.default),l.valueConstraints.minLength=n.ReaderUtil.getNumber(e,s.YamlKeys.minLength),l.valueConstraints.maxLength=n.ReaderUtil.getNumber(e,s.YamlKeys.maxLength),l}}t.YamlFieldReaderTextArea=l},836(e,t,r){t.YamlFieldWriterTextArea=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue),null!==t.valueConstraints.minLength&&(e[a.YamlKeys.minLength]=t.valueConstraints.minLength),null!==t.valueConstraints.maxLength&&(e[a.YamlKeys.maxLength]=t.valueConstraints.maxLength)}}t.YamlFieldWriterTextArea=s},9241(e,t,r){t.JsonFieldReaderTextField=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(6591),o=r(6145);class l extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const l=s.TextFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(d,a.CedarModel.defaultValue),l.valueConstraints.minLength=n.ReaderUtil.getNumber(d,a.CedarModel.minLength),l.valueConstraints.maxLength=n.ReaderUtil.getNumber(d,a.CedarModel.maxLength),l.valueConstraints.regex=n.ReaderUtil.getString(d,a.CedarModel.regex)),l}}t.JsonFieldReaderTextField=l},7501(e,t,r){t.JsonFieldWriterTextField=void 0;const n=r(936),a=r(2748),i=r(6145);class s extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){null!==t.valueConstraints.minLength&&(e[n.CedarModel.minLength]=t.valueConstraints.minLength),null!==t.valueConstraints.maxLength&&(e[n.CedarModel.maxLength]=t.valueConstraints.maxLength),i.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r),null!==t.valueConstraints.regex&&(e[n.CedarModel.regex]=t.valueConstraints.regex)}}t.JsonFieldWriterTextField=s},7889(e,t,r){t.TextFieldBuilderImpl=void 0;const n=r(3350),a=r(6591);class i extends n.TemplateFieldBuilder{defaultValue=null;minLength=null;maxLength=null;regex=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}withMinLength(e){return this.minLength=e,this}withMaxLength(e){return this.maxLength=e,this}withRegex(e){return this.regex=e,this}build(){const e=a.TextFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.minLength=this.minLength,e.valueConstraints.maxLength=this.maxLength,e.valueConstraints.regex=this.regex,e}}t.TextFieldBuilderImpl=i},6591(e,t,r){t.TextFieldImpl=void 0;const n=r(9129),a=r(9711),i=r(4869),s=r(2763),o=r(3608);class l extends n.TemplateField{valueConstraints;valueRecommendationEnabled=!1;constructor(){super(),this.cedarFieldType=i.CedarFieldType.TEXT,this.valueConstraints=new a.ValueConstraintsTextField,this.cedarArtifactType=s.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}supportsValueRecommendation(){return!0}}t.TextFieldImpl=l},9711(e,t,r){t.ValueConstraintsTextField=void 0;const n=r(7765);class a extends n.ValueConstraintsLiteralField{minLength=null;maxLength=null;regex=null;constructor(){super()}}t.ValueConstraintsTextField=a},1268(e,t,r){t.YamlFieldReaderTextField=void 0;const n=r(8748),a=r(5675),i=r(2099),s=r(6591),o=r(6145);class l extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const l=s.TextFieldImpl.buildEmpty();return l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(e,i.YamlKeys.default),l.valueConstraints.minLength=n.ReaderUtil.getNumber(e,i.YamlKeys.minLength),l.valueConstraints.maxLength=n.ReaderUtil.getNumber(e,i.YamlKeys.maxLength),l.valueConstraints.regex=n.ReaderUtil.getString(e,i.YamlKeys.regex),l}}t.YamlFieldReaderTextField=l},6116(e,t,r){t.YamlFieldWriterTextField=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue),null!=t.valueConstraints.minLength&&(e[a.YamlKeys.minLength]=t.valueConstraints.minLength),null!=t.valueConstraints.maxLength&&(e[a.YamlKeys.maxLength]=t.valueConstraints.maxLength),null!=t.valueConstraints.regex&&(e[a.YamlKeys.regex]=t.valueConstraints.regex)}}t.YamlFieldWriterTextField=s},8053(e,t,r){t.JsonStaticFieldWriter=void 0;const n=r(7752),a=r(455),i=r(2748),s=r(2733),o=r(9251),l=r(936),d=r(5793),c=r(5747),u=r(3746),m=r(2475);class p extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUiNode(e,t){}buildUIObject(e){const t={[l.CedarModel.inputType]:this.atomicWriter.write(e.cedarFieldType.getUiInputType())};return this.expandUiNode(t,e),l.CedarModel.content in t||(t[l.CedarModel.content]=null),{[l.CedarModel.ui]:t}}getAsJsonNode(e,t=a.ChildDeploymentInfo.empty()){const r=this.buildUIObject(e);return t.hidden&&(r[l.CedarModel.ui][l.CedarModel.Ui.hidden]=!0),e.extensions.applyJson({[s.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[s.JsonSchema.atType]:this.atomicWriter.write(e.cedarArtifactType),[s.JsonSchema.atContext]:this.macroContext(e),[l.CedarModel.type]:this.atomicWriter.write(d.JavascriptType.OBJECT),[c.TemplateProperty.title]:e.title,[c.TemplateProperty.description]:e.description,...r,...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroSkos(e),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroSchemaIdentifier(e),...this.macroAnnotations(e),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[s.JsonSchema.schemaVersion]:this.atomicWriter.write(e.schema_schemaVersion),[c.TemplateProperty.additionalProperties]:this.atomicWriter.write(u.AdditionalProperties.FALSE),[l.CedarModel.schema]:this.atomicWriter.write(m.ArtifactSchema.CURRENT)})}macroContext(e){const t={...o.JsonTemplateFieldContentStatic.CONTEXT_VERBATIM};return e.language!==n.Language.NULL&&(t[s.JsonSchema.atLanguage]=this.atomicWriter.write(e.language)),t}}t.JsonStaticFieldWriter=p},699(e,t){t.isSizedStaticField=function(e){return null!==e&&"width"in e&&"height"in e}},934(e,t,r){t.YamlStaticFieldWriter=void 0;const n=r(9517),a=r(5430),i=r(455);class s extends a.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return super.expandUINodeForYAML(e)}expandSizeForYAML(e){return n.JsonNode.getEmpty()}buildUIObject(e){return this.expandUINodeForYAML(e)}getYamlAsJsonNode(e,t=i.ChildDeploymentInfo.empty(),r=!1,a=!0){return e.extensions.applyYaml({...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,r,a),...this.macroStatusAndVersion(e,r),...this.macroSkos(e),...this.expandUINodeForYAML(e),...t.hasParent()?n.JsonNode.getEmpty():this.expandSizeForYAML(e),...this.macroProvenance(e,r),...this.macroDerivedFrom(e,r),...this.macroPreviousVersion(e,r),...this.macroAnnotations(e)})}}t.YamlStaticFieldWriter=s},9148(e,t,r){t.JsonFieldReaderImage=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(5573);class o extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticImageFieldImpl.buildEmpty(),l=n.ReaderUtil.getNode(e,a.CedarModel.ui);o.content=n.ReaderUtil.getString(l,a.CedarModel.content);const d=n.ReaderUtil.getNode(l,a.CedarModel.size);return o.width=n.ReaderUtil.getNumber(d,a.CedarModel.width),o.height=n.ReaderUtil.getNumber(d,a.CedarModel.height),o}}t.JsonFieldReaderImage=o},8970(e,t,r){t.JsonFieldWriterStaticImage=void 0;const n=r(9517),a=r(936),i=r(8053);class s extends i.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){if(null!==t.content&&(e[a.CedarModel.content]=t.content),null!==t.width||null!==t.height){const r=n.JsonNode.getEmpty();null!==t.width&&(r[a.CedarModel.width]=t.width),null!==t.height&&(r[a.CedarModel.height]=t.height),e[a.CedarModel.size]=r}}}t.JsonFieldWriterStaticImage=s},3138(e,t,r){t.StaticImageFieldBuilderImpl=void 0;const n=r(3350),a=r(5573);class i extends n.TemplateFieldBuilder{content=null;width=null;height=null;constructor(){super()}static create(){return new i}withContent(e){return this.content=e,this}withWidth(e){return this.width=e,this}withHeight(e){return this.height=e,this}build(){const e=a.StaticImageFieldImpl.buildEmpty();return super.buildInternal(e),e.content=this.content,e.width=this.width,e.height=this.height,e}}t.StaticImageFieldBuilderImpl=i},5573(e,t,r){t.StaticImageFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(8290);class o extends n.TemplateField{content=null;width=null;height=null;constructor(){super(),this.cedarFieldType=a.CedarFieldType.STATIC_IMAGE,this.cedarArtifactType=i.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticImageFieldImpl=o},7941(e,t,r){t.YamlFieldReaderImage=void 0;const n=r(8748),a=r(2099),i=r(5675),s=r(5573);class o extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticImageFieldImpl.buildEmpty();return o.content=n.ReaderUtil.getString(e,a.YamlKeys.content),o.width=n.ReaderUtil.getNumber(e,a.YamlKeys.width),o.height=n.ReaderUtil.getNumber(e,a.YamlKeys.height),o}}t.YamlFieldReaderImage=o},4935(e,t,r){t.YamlFieldWriterStaticImage=void 0;const n=r(9517),a=r(934),i=r(2099);class s extends a.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.content&&(t[i.YamlKeys.content]=e.content),t}expandSizeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.width&&(t[i.YamlKeys.width]=e.width),null!==e.height&&(t[i.YamlKeys.height]=e.height),t}}t.YamlFieldWriterStaticImage=s},5933(e,t,r){t.JsonFieldReaderPageBreak=void 0;const n=r(4385),a=r(9046),i=r(936),s=r(8748);class o extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.StaticPageBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(s.ReaderUtil.getNode(e,i.CedarModel.ui),i.CedarModel.content),o}}t.JsonFieldReaderPageBreak=o},2347(e,t,r){t.JsonFieldWriterStaticPageBreak=void 0;const n=r(8053),a=r(936);class i extends n.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){null!==t.content&&(e[a.CedarModel.content]=t.content)}}t.JsonFieldWriterStaticPageBreak=i},2703(e,t,r){t.StaticPageBreakFieldBuilderImpl=void 0;const n=r(3350),a=r(9046);class i extends n.TemplateFieldBuilder{constructor(){super()}static create(){return new i}build(){const e=a.StaticPageBreakFieldImpl.buildEmpty();return super.buildInternal(e),e}}t.StaticPageBreakFieldBuilderImpl=i},9046(e,t,r){t.StaticPageBreakFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(8290);class o extends n.TemplateField{content=null;constructor(){super(),this.cedarFieldType=a.CedarFieldType.STATIC_PAGE_BREAK,this.cedarArtifactType=i.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticPageBreakFieldImpl=o},4568(e,t,r){t.YamlFieldReaderPageBreak=void 0;const n=r(5675),a=r(9046),i=r(2099),s=r(8748);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.StaticPageBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(e,i.YamlKeys.content),o}}t.YamlFieldReaderPageBreak=o},7594(e,t,r){t.YamlFieldWriterStaticPageBreak=void 0;const n=r(934),a=r(2099),i=r(9517);class s extends n.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return null!==e.content?{[a.YamlKeys.content]:e.content}:i.JsonNode.getEmpty()}}t.YamlFieldWriterStaticPageBreak=s},6291(e,t,r){t.JsonFieldReaderRichText=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(5548);class o extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticRichTextFieldImpl.buildEmpty(),l=n.ReaderUtil.getNode(e,a.CedarModel.ui);return o.content=n.ReaderUtil.getString(l,a.CedarModel.content),o}}t.JsonFieldReaderRichText=o},6029(e,t,r){t.JsonFieldWriterStaticRichText=void 0;const n=r(936),a=r(8053);class i extends a.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){null!==t.content&&(e[n.CedarModel.content]=t.content)}}t.JsonFieldWriterStaticRichText=i},9521(e,t,r){t.StaticRichTextFieldBuilderImpl=void 0;const n=r(3350),a=r(5548);class i extends n.TemplateFieldBuilder{content=null;constructor(){super()}static create(){return new i}withContent(e){return this.content=e,this}build(){const e=a.StaticRichTextFieldImpl.buildEmpty();return super.buildInternal(e),e.content=this.content,e}}t.StaticRichTextFieldBuilderImpl=i},5548(e,t,r){t.StaticRichTextFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(8290);class o extends n.TemplateField{content=null;constructor(){super(),this.cedarFieldType=a.CedarFieldType.STATIC_RICH_TEXT,this.cedarArtifactType=i.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticRichTextFieldImpl=o},1404(e,t,r){t.YamlFieldReaderRichText=void 0;const n=r(8748),a=r(5675),i=r(2099),s=r(5548);class o extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const o=s.StaticRichTextFieldImpl.buildEmpty();return o.content=n.ReaderUtil.getString(e,i.YamlKeys.content),o}}t.YamlFieldReaderRichText=o},6314(e,t,r){t.YamlFieldWriterStaticRichText=void 0;const n=r(9517),a=r(934),i=r(2099);class s extends a.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return null!==e.content?{[i.YamlKeys.content]:e.content}:n.JsonNode.getEmpty()}}t.YamlFieldWriterStaticRichText=s},6511(e,t,r){t.JsonFieldReaderSectionBreak=void 0;const n=r(4385),a=r(2546),i=r(936),s=r(8748);class o extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.StaticSectionBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(s.ReaderUtil.getNode(e,i.CedarModel.ui),i.CedarModel.content),o}}t.JsonFieldReaderSectionBreak=o},41(e,t,r){t.JsonFieldWriterStaticSectionsBreak=void 0;const n=r(8053),a=r(936);class i extends n.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){null!==t.content&&(e[a.CedarModel.content]=t.content)}}t.JsonFieldWriterStaticSectionsBreak=i},5795(e,t,r){t.StaticSectionBreakFieldBuilderImpl=void 0;const n=r(3350),a=r(2546);class i extends n.TemplateFieldBuilder{constructor(){super()}static create(){return new i}build(){const e=a.StaticSectionBreakFieldImpl.buildEmpty();return super.buildInternal(e),e}}t.StaticSectionBreakFieldBuilderImpl=i},2546(e,t,r){t.StaticSectionBreakFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(8290);class o extends n.TemplateField{content=null;constructor(){super(),this.cedarFieldType=a.CedarFieldType.STATIC_SECTION_BREAK,this.cedarArtifactType=i.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticSectionBreakFieldImpl=o},3980(e,t,r){t.YamlFieldReaderSectionBreak=void 0;const n=r(5675),a=r(2546),i=r(2099),s=r(8748);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.StaticSectionBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(e,i.YamlKeys.content),o}}t.YamlFieldReaderSectionBreak=o},6082(e,t,r){t.YAMLFieldWriterStaticSectionsBreak=void 0;const n=r(934),a=r(2099),i=r(9517);class s extends n.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return null!==e.content?{[a.YamlKeys.content]:e.content}:i.JsonNode.getEmpty()}}t.YAMLFieldWriterStaticSectionsBreak=s},8596(e,t,r){t.JsonFieldReaderYoutube=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(477);class o extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticYoutubeFieldImpl.buildEmpty(),l=n.ReaderUtil.getNode(e,a.CedarModel.ui);o.videoId=n.ReaderUtil.getString(l,a.CedarModel.content);const d=n.ReaderUtil.getNode(l,a.CedarModel.size);return o.width=n.ReaderUtil.getNumber(d,a.CedarModel.width),o.height=n.ReaderUtil.getNumber(d,a.CedarModel.height),o}}t.JsonFieldReaderYoutube=o},6766(e,t,r){t.JsonFieldWriterStaticYoutube=void 0;const n=r(9517),a=r(936),i=r(8053);class s extends i.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){if(null!==t.videoId&&(e[a.CedarModel.content]=t.videoId),null!==t.width||null!==t.height){const r=n.JsonNode.getEmpty();null!==t.width&&(r[a.CedarModel.width]=t.width),null!==t.height&&(r[a.CedarModel.height]=t.height),e[a.CedarModel.size]=r}}}t.JsonFieldWriterStaticYoutube=s},7674(e,t,r){t.StaticYoutubeFieldBuilderImpl=void 0;const n=r(3350),a=r(477);class i extends n.TemplateFieldBuilder{videoId=null;width=null;height=null;constructor(){super()}static create(){return new i}withVideoId(e){return this.videoId=e,this}withWidth(e){return this.width=e,this}withHeight(e){return this.height=e,this}build(){const e=a.StaticYoutubeFieldImpl.buildEmpty();return super.buildInternal(e),e.videoId=this.videoId,e.width=this.width,e.height=this.height,e}}t.StaticYoutubeFieldBuilderImpl=i},477(e,t,r){t.StaticYoutubeFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(8290);class o extends n.TemplateField{videoId=null;width=null;height=null;constructor(){super(),this.cedarFieldType=a.CedarFieldType.STATIC_YOUTUBE,this.cedarArtifactType=i.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticYoutubeFieldImpl=o},7089(e,t,r){t.YamlFieldReaderYoutube=void 0;const n=r(8748),a=r(5675),i=r(2099),s=r(477);class o extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const o=s.StaticYoutubeFieldImpl.buildEmpty();return o.videoId=n.ReaderUtil.getString(e,i.YamlKeys.content),o.width=n.ReaderUtil.getNumber(e,i.YamlKeys.width),o.height=n.ReaderUtil.getNumber(e,i.YamlKeys.height),o}}t.YamlFieldReaderYoutube=o},1903(e,t,r){t.YamlFieldWriterStaticYoutube=void 0;const n=r(9517),a=r(934),i=r(2099);class s extends a.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.videoId&&(t[i.YamlKeys.content]=e.videoId),t}expandSizeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.width&&(t[i.YamlKeys.width]=e.width),null!==e.height&&(t[i.YamlKeys.height]=e.height),t}}t.YamlFieldWriterStaticYoutube=s},4033(e,t,r){t.AttributeValueNamePolicy=void 0;const n=r(5588),a=r(9327),i=r(3644),s=r(7723);class o{constructor(){}static isReserved(e){return n.ReservedNames.isReservedName(e)}static findConflicts(e,t="template",r=!1){const n=[];return o.scanContainer(e,[],n,t,r),n}static locationOf(e){return"reservedField"===e.kind?[...e.path,e.groupName]:[...e.path,e.groupName,e.name]}static assertValid(e){const t=o.findConflicts(e)[0];if(void 0===t)return;const r=o.locationOf(t).join("/");if("reservedField"===t.kind)throw new Error(`Attribute-value field name "${t.name}" at /${r} is reserved for CEDAR instance metadata`);const n="reserved"===t.kind?"is reserved for instance metadata":"blank"===t.kind?"must not be blank":"sibling"===t.kind?"collides with another child in the same object":`is also used by attribute-value field "${t.conflictingGroupName}"`;throw new Error(`Attribute-value name "${t.name}" at /${r} ${n}`)}static scanContainer(e,t,r,a,i){for(const t of Object.keys(e.values))n.ReservedNames.requireChildName(t);const s=o.attributeValueGroups(e),l=new Set(s.map(e=>e.name)),d=new Set(s.filter(e=>e.unpacked).flatMap(e=>e.attributeNames)),c=new Set(Object.keys(e.values).filter(e=>!l.has(e)&&!d.has(e))),u=new Map;for(const e of s){n.ReservedNames.isReservedAttributeValueFieldName(e.name,a)&&r.push({kind:"reservedField",name:e.name,groupName:e.name,path:t});const s=new Set;for(const n of e.attributeNames){if(""===n.trim()){i&&r.push({kind:"blank",name:n,groupName:e.name,path:t});continue}o.isReserved(n)&&r.push({kind:"reserved",name:n,groupName:e.name,path:t}),(c.has(n)||l.has(n))&&r.push({kind:"sibling",name:n,groupName:e.name,path:t}),s.has(n)?r.push({kind:"duplicate",name:n,groupName:e.name,path:t,conflictingGroupName:e.name}):s.add(n);const a=u.get(n);void 0!==a&&a!==e.name?r.push({kind:"duplicate",name:n,groupName:e.name,path:t,conflictingGroupName:a}):u.set(n,e.name)}}for(const[n,a]of Object.entries(e.values))l.has(n)||d.has(n)||o.scanValue(a,[...t,n],r,i)}static scanValue(e,t,r,n){e instanceof s.InstanceDataContainer?o.scanContainer(e,t,r,"element",n):Array.isArray(e)&&e.forEach((e,a)=>o.scanValue(e,[...t,a],r,n))}static attributeValueGroups(e){const t=[];for(const[r,n]of Object.entries(e.values))if(n instanceof a.InstanceDataAttributeValueField)t.push({name:r,attributeNames:Object.keys(n.values),unpacked:!1});else if(Array.isArray(n)){const e=n.filter(e=>e instanceof i.InstanceDataAttributeValueFieldName).map(e=>e.name);e.length>0&&t.push({name:r,attributeNames:e,unpacked:!0})}return t}}t.AttributeValueNamePolicy=o},9327(e,t,r){t.InstanceDataAttributeValueField=void 0;const n=r(5588);t.InstanceDataAttributeValueField=class{_name;_values=Object.create(null);_iris;constructor(e){this._name=e,this._values=Object.create(null),this._iris=Object.create(null)}addValue(e,t){n.ReservedNames.requireChildName(e),this._values[e]=t}get name(){return this._name}get values(){return this._values}setIri(e,t){this._iris[e]=t}get iris(){return this._iris}}},3644(e,t){t.InstanceDataAttributeValueFieldName=void 0,t.InstanceDataAttributeValueFieldName=class{_name;constructor(e){this._name=e}get name(){return this._name}}},7723(e,t,r){t.InstanceDataContainer=void 0;const n=r(5588);t.InstanceDataContainer=class{_id=null;_values;_iris;constructor(){this._values=Object.create(null),this._iris=Object.create(null)}setValue(e,t){n.ReservedNames.requireChildName(e),this._values[e]=t}hasValue(e){return Object.hasOwn(this._values,e)}removeValue(e){delete this._values[e],delete this._iris[e]}get values(){return this._values}set values(e){for(const t of Object.keys(e))n.ReservedNames.requireChildName(t);this._values=Object.assign(Object.create(null),e)}setIri(e,t){this._iris[e]=t}hasIri(e){return Object.hasOwn(this._iris,e)}removeIri(e){delete this._iris[e]}get iris(){return this._iris}set id(e){this._id=e}get id(){return this._id}}},8193(e,t,r){t.InstanceDataControlledAtom=void 0;const n=r(7571);class a{language=null;preferredLabel=null;notation=null;_id;_type;_label;constructor(e,t,r,a=null){if(r!==n.PARSED_NODE&&((0,n.assertIri)(e,"InstanceDataControlledAtom"),null==t||""===t))throw new Error("InstanceDataControlledAtom requires a label. An IRI on its own is a link, not a controlled term.");this._id=e,this._type=r===n.PARSED_NODE?a:r??null,this._label=t}static fromParsedNode(e,t,r=null){return new a(e,t,n.PARSED_NODE,r)}get type(){return this._type}get id(){return this._id}get label(){return this._label}}t.InstanceDataControlledAtom=a},7548(e,t){t.InstanceDataEmptyAtom=void 0,t.InstanceDataEmptyAtom=class{_discarded;constructor(e=null){this._discarded=e}get discarded(){return this._discarded}hasDiscardedContent(){return null!==this._discarded&&Object.keys(this._discarded).length>0}}},4465(e,t){t.InstanceDataEmptyNode=void 0,t.InstanceDataEmptyNode=class{}},9167(e,t){t.InstanceDataLabelAtom=void 0,t.InstanceDataLabelAtom=class{label;type;language=null;preferredLabel=null;notation=null;constructor(e,t=null){this.label=e,this.type=t}}},7571(e,t){function r(e,t){if(null==e||""===e)throw new Error(`${t} requires an IRI. An IRI-valued field with nothing in it is an empty node, not a null IRI.`)}t.InstanceDataLinkAtom=t.PARSED_NODE=void 0,t.assertIri=r,t.PARSED_NODE=Symbol("parsed node");class n{language=null;preferredLabel=null;notation=null;_id;_type;constructor(e,n,a=null){n!==t.PARSED_NODE&&r(e,"InstanceDataLinkAtom"),this._id=e,this._type=n===t.PARSED_NODE?a:n??null}static fromParsedNode(e,r=null){return new n(e,t.PARSED_NODE,r)}get type(){return this._type}get id(){return this._id}}t.InstanceDataLinkAtom=n},1625(e,t){t.InstanceDataNotationAtom=void 0,t.InstanceDataNotationAtom=class{notation;type;language=null;preferredLabel=null;constructor(e,t=null){this.notation=e,this.type=t}}},5222(e,t){t.InstanceDataStringAtom=void 0,t.InstanceDataStringAtom=class{label;language=null;preferredLabel=null;notation=null;_value;constructor(e,t=null){this.label=t,this._value=e}get value(){return this._value}}},4877(e,t){t.InstanceDataTypedAtom=void 0,t.InstanceDataTypedAtom=class{label;language=null;preferredLabel=null;notation=null;_value;_type;constructor(e,t,r=null){if(this.label=r,null==t||""===t)throw new Error("InstanceDataTypedAtom requires a type. A literal with no declared type is an InstanceDataStringAtom.");this._value=e,this._type=t}get value(){return this._value}get type(){return this._type}}},9961(e,t,r){t.InstanceInflater=void 0;const n=r(9129),a=r(4869),i=r(1211),s=r(3567),o=r(5222),l=r(4877),d=r(7723),c=r(4465),u=r(2763),m=r(7661),p=r(513),h=r(3812);class f{constructor(){}static inflate(e,t,r="lowerBound"){return f.inflateContainer(e.dataContainer,t,r),e}static emptyField(e){return e.valueConstraints instanceof i.ValueConstraintsNumericField?new l.InstanceDataTypedAtom(null,e.valueConstraints.numberType.getValue()??"xsd:decimal"):e.valueConstraints instanceof s.ValueConstraintsTemporalField?new l.InstanceDataTypedAtom(null,e.valueConstraints.temporalType.getValue()??"xsd:dateTime"):[a.CedarFieldType.CONTROLLED_TERM,a.CedarFieldType.LINK,a.CedarFieldType.EXT_ROR,a.CedarFieldType.EXT_ORCID,a.CedarFieldType.EXT_PFAS,a.CedarFieldType.EXT_PUBMED,a.CedarFieldType.EXT_RRID,a.CedarFieldType.EXT_NIH_GRANT_ID,a.CedarFieldType.EXT_DOI].includes(e.cedarFieldType)?new c.InstanceDataEmptyNode:new o.InstanceDataStringAtom(null)}static startingOccurrences(e,t){if(e instanceof n.TemplateField&&e.cedarFieldType===a.CedarFieldType.ATTRIBUTE_VALUE)return[];const r=(t instanceof h.AbstractDynamicChildDeploymentInfo?t.minItems:null)??p.AbstractChildDeploymentInfo.defaultMinItems;return Array.from({length:r},()=>e instanceof m.TemplateElement?new d.InstanceDataContainer:e instanceof n.TemplateField?f.emptyField(e):new c.InstanceDataEmptyNode)}static inflateContainer(e,t,r){const a=t.getChildrenInfo(),i=a.getChildIriMap();Object.keys(i).forEach(t=>e.setIri(t,i[t]));const s={};a.getChildrenNames().forEach(a=>{const i=t.getChild(a);let o=e.values[a];if(void 0===o){if(t.getChildInfo(a)?.atType===u.CedarArtifactType.STATIC_TEMPLATE_FIELD)return;const e=t.getChildInfo(a);o=e?.isMultiInAnyWay()?"empty"===r?[]:f.startingOccurrences(i,e):i instanceof m.TemplateElement?new d.InstanceDataContainer:i instanceof n.TemplateField?f.emptyField(i):new c.InstanceDataEmptyNode}i instanceof m.TemplateElement&&(o instanceof d.InstanceDataContainer?f.inflateContainer(o,i,r):Array.isArray(o)&&o.forEach(e=>{e instanceof d.InstanceDataContainer&&f.inflateContainer(e,i,r)})),s[a]=o}),Object.keys(e.values).forEach(t=>{Object.hasOwn(s,t)||(s[t]=e.values[t])}),e.values=s}}t.InstanceInflater=f},8410(e,t,r){t.InstanceValidator=void 0;const n=r(7723),a=r(7548),i=r(4465),s=r(5222),o=r(4877),l=r(7571),d=r(8193),c=r(3812),u=r(7661),m=r(964),p=r(4074),h=r(4036),f=r(2888),y=r(9760),T=r(3188),C=r(2733),E=r(9034),g=r(9327),I=r(3644),A=r(4033),b=r(2763),R="InstanceValidator";class S{constructor(){}static validate(e,t){const r=new h.JsonArtifactParsingResult;return S.validateContainer(e.dataContainer,t,new T.JsonPath,r),r}static validateContainer(e,t,r,n){const a=t.getChildrenInfo(),i=t.cedarArtifactType===b.CedarArtifactType.TEMPLATE?"template":"element";for(const t of A.AttributeValueNamePolicy.findConflicts(e,i).filter(e=>0===e.path.length))n.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.VALUE_MISMATCH,r.add(...A.AttributeValueNamePolicy.locationOf(t)),"a unique, non-reserved attribute-value name",t.name));for(const[t,i]of S.attributeValueGroups(e))for(const e of i){const i=a.get(e);null!==i&&i.atType!==b.CedarArtifactType.STATIC_TEMPLATE_FIELD&&n.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.VALUE_MISMATCH,r.add(t,e),"a name different from every serializable template child",e))}for(const t of a.getChildrenNamesForRequiredInProperties())Object.hasOwn(e.values,t)||n.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,r.add(t),t));for(const i of a.getChildrenNames()){const s=a.get(i);if(s?.uiInputType===E.UiInputType.ATTRIBUTE_VALUE)continue;const o=e.values[i];void 0!==o&&S.validateChild(i,o,s,t.getChild(i),r.add(i),n)}}static attributeValueGroups(e){const t=[];for(const[r,n]of Object.entries(e.values))if(n instanceof g.InstanceDataAttributeValueField)t.push([r,Object.keys(n.values)]);else if(Array.isArray(n)){const e=n.filter(e=>e instanceof I.InstanceDataAttributeValueFieldName).map(e=>e.name??"").filter(e=>e.length>0);e.length>0&&t.push([r,e])}return t}static validateChild(e,t,r,n,a,i){const s=r?.isMultiInAnyWay()??!1,o=Array.isArray(t)?t:null,l=null!==o;if(s===l)return null!==o?(S.validateCardinality(o,r,a,i),void o.forEach((e,t)=>S.validateItem(e,n,a.add(t),i))):void S.validateItem(t,n,a,i);i.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.VALUE_MISMATCH,a,s?"a list of values":"a single value",l?"a list of values":"a single value"))}static validateCardinality(e,t,r,n){if(!(t instanceof c.AbstractDynamicChildDeploymentInfo))return;const{minItems:a,maxItems:i}=t;null!==a&&e.length<a&&n.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.MISSING_INDEX_IN_REAL_OBJECT,r,a,e.length)),null!==i&&e.length>i&&n.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.UNEXPECTED_INDEX_IN_REAL_OBJECT,r,i,e.length))}static validateItem(e,t,r,a){if(t instanceof u.TemplateElement)return void(e instanceof n.InstanceDataContainer?S.validateContainer(e,t,r,a):S.isEmpty(e)?S.validateContainer(new n.InstanceDataContainer,t,r,a):a.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.VALUE_MISMATCH,r,"an element","a field value")));S.validateIri(e,r,a);const i=S.declaredValueType(t);null!==i&&S.validateTypedValue(e,i,r,a)}static validateIri(e,t,r){(e instanceof l.InstanceDataLinkAtom||e instanceof d.InstanceDataControlledAtom)&&null===e.id&&r.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,t.add(C.JsonSchema.atId),"an IRI",null))}static declaredValueType(e){return e instanceof m.TemporalFieldImpl?e.valueConstraints.temporalType.getValue():e instanceof p.NumericFieldImpl?e.valueConstraints.numberType.getValue():null}static validateTypedValue(e,t,r,n){S.isEmpty(e)||(e instanceof o.InstanceDataTypedAtom?null!==e.value&&e.type!==t&&n.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.VALUE_MISMATCH,r.add(C.JsonSchema.atType),t,e.type??void 0)):e instanceof s.InstanceDataStringAtom&&null!==e.value&&n.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,r.add(C.JsonSchema.atType),t)))}static isEmpty(e){return e instanceof a.InstanceDataEmptyAtom||e instanceof i.InstanceDataEmptyNode||(e instanceof s.InstanceDataStringAtom||e instanceof o.InstanceDataTypedAtom)&&null===e.value}}t.InstanceValidator=S},2272(e,t,r){t.TemplateInstance=void 0;const n=r(2763),a=r(5697),i=r(7723);class s extends a.AbstractInstanceArtifact{dataContainer;descriptionWasAbsent=!1;constructor(){super(),this.cedarArtifactType=n.CedarArtifactType.TEMPLATE_INSTANCE,this.dataContainer=new i.InstanceDataContainer}static buildEmptyWithNullValues(){return new s}}t.TemplateInstance=s},4925(e,t,r){t.TemplateInstanceBuilder=void 0;const n=r(1641),a=r(2272),i=r(7723),s=r(8534);class o extends n.AbstractArtifactBuilder{schema_isBasedOn=s.CedarArtifactId.NULL;dataContainer=new i.InstanceDataContainer;withSchemaIsBasedOn(e){return e instanceof s.CedarArtifactId?this.schema_isBasedOn=e:this.schema_isBasedOn=s.CedarArtifactId.forValue(e),this}withDataValue(e,t){return this.dataContainer.setValue(e,t),this}withDataIri(e,t){return this.dataContainer.setIri(e,t),this}withDataId(e){return this.dataContainer.id=e,this}withDataContainer(e){return this.dataContainer=e,this}build(){const e=a.TemplateInstance.buildEmptyWithNullValues();return e.at_id=this.at_id,e.pav_createdOn=this.pav_createdOn,e.pav_createdBy=this.pav_createdBy,e.pav_lastUpdatedOn=this.pav_lastUpdatedOn,e.oslc_modifiedBy=this.oslc_modifiedBy,e.pav_derivedFrom=this.pav_derivedFrom,e.schema_name=this.schema_name,e.schema_description=this.schema_description,e.schema_isBasedOn=this.schema_isBasedOn,e.dataContainer=this.dataContainer,e}}t.TemplateInstanceBuilder=o},3281(e,t,r){t.Template=void 0;const n=r(3910),a=r(8557),i=r(1027),s=r(5451),o=r(2763);class l extends s.AbstractContainerArtifact{header=null;footer=null;constructor(){super(),this.cedarArtifactType=o.CedarArtifactType.TEMPLATE}static buildEmptyWithNullValues(){return new l}static buildEmptyWithDefaultValues(){const e=new l;return e.schema_schemaVersion=a.SchemaVersion.CURRENT,e.bibo_status=n.BiboStatus.DRAFT,e.pav_version=i.PavVersion.DEFAULT,e}isMultiInstanceByDefinition(){return!1}isSingleInstanceByDefinition(){return!1}createDeploymentBuilder(e){throw new Error("Method not supported.")}}t.Template=l},766(e,t,r){t.TemplateBuilder=void 0;const n=r(3281),a=r(1641);class i extends a.AbstractArtifactBuilder{header=null;footer=null;instanceTypeSpecification=null;children=[];withHeader(e){return this.header=e,this}withFooter(e){return this.footer=e,this}withInstanceTypeSpecification(e){return this.instanceTypeSpecification=e,this}addChild(e,t){return this.children.push([e,t]),this}build(){const e=n.Template.buildEmptyWithNullValues();return super.buildInternal(e),e.header=this.header,e.footer=this.footer,e.instanceTypeSpecification=this.instanceTypeSpecification,this.children.forEach(([t,r])=>{e.addChild(t,r)}),e}}t.TemplateBuilder=i},9517(e,t){t.JsonNode=void 0,t.JsonNode=class{static getEmpty(){return{}}static getEmptyList(){return[]}static hasEntries(e){return Object.keys(e).length>0}}},4531(e,t){t.BioportalTermType=t.BioportalTermTypeYamlValues=t.P=void 0,t.P={ONTOLOGY_CLASS:"OntologyClass",VALUE:"Value"},t.BioportalTermTypeYamlValues={ONTOLOGY_CLASS:"class",VALUE:"value"};class r{jsonValue;yamlValue;constructor(e,t){this.jsonValue=e,this.yamlValue=t}getJsonValue(){return this.jsonValue}getYamlValue(){return this.yamlValue}static ONTOLOGY_CLASS=new r(t.P.ONTOLOGY_CLASS,t.BioportalTermTypeYamlValues.ONTOLOGY_CLASS);static VALUE=new r(t.P.VALUE,t.BioportalTermTypeYamlValues.VALUE);static NULL=new r(null,null);static values(){return[r.ONTOLOGY_CLASS,r.VALUE]}static forJsonValue(e){for(const t of r.values())if(t.getJsonValue()===e)return t;return this.NULL}static forYamlValue(e){for(const t of r.values())if(t.getYamlValue()===e)return t;return this.NULL}}t.BioportalTermType=r},8534(e,t){t.CedarArtifactId=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static NULL=new r(null);static forValue(e){return null===e||""===e?r.NULL:new r(e)}}t.CedarArtifactId=r},2763(e,t){t.CedarArtifactType=t.df=t.KW=void 0,t.KW={TEMPLATE:"https://schema.metadatacenter.org/core/Template",TEMPLATE_ELEMENT:"https://schema.metadatacenter.org/core/TemplateElement",TEMPLATE_FIELD:"https://schema.metadatacenter.org/core/TemplateField",STATIC_TEMPLATE_FIELD:"https://schema.metadatacenter.org/core/StaticTemplateField",TEMPLATE_INSTANCE:"TemplateInstance"},t.df={TEMPLATE:"template",TEMPLATE_ELEMENT:"templateElement",TEMPLATE_FIELD:"templateField",STATIC_TEMPLATE_FIELD:"staticTemplateField",TEMPLATE_INSTANCE:"instance"};class r{value;yamlValue;constructor(e,t){this.value=e,this.yamlValue=t}getValue(){return this.value}getYamlValue(){return this.yamlValue}static TEMPLATE=new r(t.KW.TEMPLATE,t.df.TEMPLATE);static TEMPLATE_ELEMENT=new r(t.KW.TEMPLATE_ELEMENT,t.df.TEMPLATE_ELEMENT);static TEMPLATE_FIELD=new r(t.KW.TEMPLATE_FIELD,t.df.TEMPLATE_FIELD);static STATIC_TEMPLATE_FIELD=new r(t.KW.STATIC_TEMPLATE_FIELD,t.df.STATIC_TEMPLATE_FIELD);static TEMPLATE_INSTANCE=new r(t.KW.TEMPLATE_INSTANCE,t.df.TEMPLATE_INSTANCE);static NULL=new r(null,null);static values(){return[r.TEMPLATE,r.TEMPLATE_ELEMENT,r.TEMPLATE_FIELD,r.STATIC_TEMPLATE_FIELD,r.TEMPLATE_INSTANCE]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}static forYamlArtifactType(e){return e.isTemplate()?r.TEMPLATE:e.isElement()?r.TEMPLATE_ELEMENT:e.isDynamicField()?r.TEMPLATE_FIELD:e.isStaticField()?r.STATIC_TEMPLATE_FIELD:e.isTemplateInstance()?r.TEMPLATE_INSTANCE:r.NULL}}t.CedarArtifactType=r},8421(e,t){t.CedarFieldCategory=t.I=void 0,t.I={STATIC:"STATIC-field",DYNAMIC:"DYNAMIC-field",NONE:"NONE"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static values(){return[r.STATIC,r.DYNAMIC,r.NONE]}static STATIC=new r(t.I.STATIC);static DYNAMIC=new r(t.I.DYNAMIC);static NONE=new r(t.I.NONE);static NULL=new r(null)}t.CedarFieldCategory=r},4869(e,t,r){t.CedarFieldType=t.K=void 0;const n=r(9034),a=r(9499);t.K={TEXTFIELD:"DYNAMIC-textfield",TEXTAREA:"DYNAMIC-textarea",CONTROLLED_TERM:"DYNAMIC-controlled-term",LINK:"DYNAMIC-link",EXT_ROR:"DYNAMIC-ext-ror",EXT_ORCID:"DYNAMIC-ext-orcid",EXT_PFAS:"DYNAMIC-ext-pfas",EXT_PUBMED:"DYNAMIC-ext-pubmed",EXT_RRID:"DYNAMIC-ext-rrid",EXT_NIH_GRANT_ID:"DYNAMIC-ext-nih-grant-id",EXT_DOI:"DYNAMIC-ext-doi",TEMPORAL:"DYNAMIC-temporal",EMAIL:"DYNAMIC-email",NUMERIC:"DYNAMIC-numeric",PHONE_NUMBER:"DYNAMIC-phone-number",RADIO:"DYNAMIC-radio",CHECKBOX:"DYNAMIC-checkbox",SINGLE_SELECT_LIST:"DYNAMIC-single-select-list",MULTIPLE_SELECT_LIST:"DYNAMIC-multiple-select-list",ATTRIBUTE_VALUE:"DYNAMIC-attribute-value",STATIC_PAGE_BREAK:"STATIC-page-break",STATIC_SECTION_BREAK:"STATIC-section-break",STATIC_IMAGE:"STATIC-image",STATIC_RICH_TEXT:"STATIC-rich_text",STATIC_YOUTUBE:"STATIC-youtube"};class i{value;_uiInputType;_yamlType;staticField;constructor(e,t,r,n){this.value=e,this._uiInputType=t,this._yamlType=r,this.staticField=n}getValue(){return this.value}getUiInputType(){return this._uiInputType}getYamlType(){return this._yamlType}get isStaticField(){return this.staticField}get recordsRequirement(){return!this.staticField&&this.value!==t.K.ATTRIBUTE_VALUE}static values(){return[i.TEXT,i.TEXTAREA,i.CONTROLLED_TERM,i.LINK,i.EXT_ROR,i.EXT_ORCID,i.EXT_PFAS,i.EXT_PUBMED,i.EXT_RRID,i.EXT_NIH_GRANT_ID,i.EXT_DOI,i.TEMPORAL,i.EMAIL,i.NUMERIC,i.PHONE_NUMBER,i.RADIO,i.CHECKBOX,i.SINGLE_SELECT_LIST,i.MULTIPLE_SELECT_LIST,i.ATTRIBUTE_VALUE,i.STATIC_PAGE_BREAK,i.STATIC_SECTION_BREAK,i.STATIC_IMAGE,i.STATIC_RICH_TEXT,i.STATIC_YOUTUBE]}static TEXT=new i(t.K.TEXTFIELD,n.UiInputType.TEXTFIELD,a.YamlArtifactType.TEXTFIELD,!1);static TEXTAREA=new i(t.K.TEXTAREA,n.UiInputType.TEXTAREA,a.YamlArtifactType.TEXTAREA,!1);static CONTROLLED_TERM=new i(t.K.CONTROLLED_TERM,n.UiInputType.TEXTFIELD,a.YamlArtifactType.CONTROLLED_TERM,!1);static LINK=new i(t.K.LINK,n.UiInputType.LINK,a.YamlArtifactType.LINK,!1);static EXT_ROR=new i(t.K.EXT_ROR,n.UiInputType.EXT_ROR,a.YamlArtifactType.EXT_ROR,!1);static EXT_ORCID=new i(t.K.EXT_ORCID,n.UiInputType.EXT_ORCID,a.YamlArtifactType.EXT_ORCID,!1);static EXT_PFAS=new i(t.K.EXT_PFAS,n.UiInputType.EXT_PFAS,a.YamlArtifactType.EXT_PFAS,!1);static EXT_PUBMED=new i(t.K.EXT_PUBMED,n.UiInputType.EXT_PUBMED,a.YamlArtifactType.EXT_PUBMED,!1);static EXT_RRID=new i(t.K.EXT_RRID,n.UiInputType.EXT_RRID,a.YamlArtifactType.EXT_RRID,!1);static EXT_NIH_GRANT_ID=new i(t.K.EXT_NIH_GRANT_ID,n.UiInputType.EXT_NIH_GRANT_ID,a.YamlArtifactType.EXT_NIH_GRANT_ID,!1);static EXT_DOI=new i(t.K.EXT_DOI,n.UiInputType.EXT_DOI,a.YamlArtifactType.EXT_DOI,!1);static TEMPORAL=new i(t.K.TEMPORAL,n.UiInputType.TEMPORAL,a.YamlArtifactType.TEMPORAL,!1);static EMAIL=new i(t.K.EMAIL,n.UiInputType.EMAIL,a.YamlArtifactType.EMAIL,!1);static NUMERIC=new i(t.K.NUMERIC,n.UiInputType.NUMERIC,a.YamlArtifactType.NUMERIC,!1);static PHONE_NUMBER=new i(t.K.PHONE_NUMBER,n.UiInputType.PHONE_NUMBER,a.YamlArtifactType.PHONE_NUMBER,!1);static RADIO=new i(t.K.RADIO,n.UiInputType.RADIO,a.YamlArtifactType.RADIO,!1);static CHECKBOX=new i(t.K.CHECKBOX,n.UiInputType.CHECKBOX,a.YamlArtifactType.CHECKBOX,!1);static SINGLE_SELECT_LIST=new i(t.K.SINGLE_SELECT_LIST,n.UiInputType.LIST,a.YamlArtifactType.SINGLE_SELECT_LIST,!1);static MULTIPLE_SELECT_LIST=new i(t.K.MULTIPLE_SELECT_LIST,n.UiInputType.LIST,a.YamlArtifactType.MULTI_SELECT_LIST,!1);static ATTRIBUTE_VALUE=new i(t.K.ATTRIBUTE_VALUE,n.UiInputType.ATTRIBUTE_VALUE,a.YamlArtifactType.ATTRIBUTE_VALUE,!1);static STATIC_PAGE_BREAK=new i(t.K.STATIC_PAGE_BREAK,n.UiInputType.PAGE_BREAK,a.YamlArtifactType.PAGE_BREAK,!0);static STATIC_SECTION_BREAK=new i(t.K.STATIC_SECTION_BREAK,n.UiInputType.SECTION_BREAK,a.YamlArtifactType.SECTION_BREAK,!0);static STATIC_IMAGE=new i(t.K.STATIC_IMAGE,n.UiInputType.IMAGE,a.YamlArtifactType.IMAGE,!0);static STATIC_RICH_TEXT=new i(t.K.STATIC_RICH_TEXT,n.UiInputType.RICH_TEXT,a.YamlArtifactType.RICH_TEXT,!0);static STATIC_YOUTUBE=new i(t.K.STATIC_YOUTUBE,n.UiInputType.YOUTUBE,a.YamlArtifactType.YOUTUBE,!0);static NULL=new i(null,n.UiInputType.NULL,a.YamlArtifactType.NULL,!0);static forUiInputType(e){for(const t of i.values())if(t.getUiInputType()===e)return t;return this.NULL}static forYamlArtifactType(e){for(const t of i.values())if(t.getYamlType()===e)return t;return this.NULL}}t.CedarFieldType=i},2234(e,t){t.CedarUser=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static NULL=new r(null);static forValue(e){return null===e?r.NULL:new r(e)}}t.CedarUser=r},3746(e,t){t.AdditionalProperties=t.P=void 0,t.P={FALSE:"false",ALLOW_ATTRIBUTE_VALUE:"allow-attribute-value"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static FALSE=new r(t.P.FALSE);static ALLOW_ATTRIBUTE_VALUE=new r(t.P.ALLOW_ATTRIBUTE_VALUE);static NULL=new r(null);static values(){return[r.FALSE,r.ALLOW_ATTRIBUTE_VALUE]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.AdditionalProperties=r},2475(e,t){t.ArtifactSchema=t.T=void 0,t.T={CURRENT:"http://json-schema.org/draft-04/schema#"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static CURRENT=new r(t.T.CURRENT);static NULL=new r(null);static forValue(e){return new r(null===e?t.T.CURRENT:e)}}t.ArtifactSchema=r},3910(e,t){t.BiboStatus=t.BiboStatusYamlValues=t.l=void 0,t.l={DRAFT:"bibo:draft",PUBLISHED:"bibo:published"},t.BiboStatusYamlValues={DRAFT:"draft",PUBLISHED:"published"};class r{jsonValue;yamlValue;constructor(e,t){this.jsonValue=e,this.yamlValue=t}getJsonValue(){return this.jsonValue}getYamlValue(){return this.yamlValue}static DRAFT=new r(t.l.DRAFT,t.BiboStatusYamlValues.DRAFT);static PUBLISHED=new r(t.l.PUBLISHED,t.BiboStatusYamlValues.PUBLISHED);static NULL=new r(null,null);static values(){return[r.DRAFT,r.PUBLISHED]}static forJsonValue(e){for(const t of r.values())if(t.getJsonValue()===e)return t;return this.NULL}static forYamlValue(e){for(const t of r.values())if(t.getYamlValue()===e)return t;return this.NULL}}t.BiboStatus=r},8802(e,t){t.Iri=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static empty(){return new r("")}isEmpty(){return""===this.value}}t.Iri=r},9857(e,t){t.IsoDate=void 0;class r{date;timezoneOffset;constructor(e,t){this.date=e,this.timezoneOffset=t}static NULL=new r(null,null);getValue(){if(null!=this.date){if("Z"===this.timezoneOffset)return this.date.toISOString().replace(/\.\d{3}Z$/,"Z");const e=this.timezoneOffset.match(/([+-])(\d{2}):(\d{2})/);if(e){const t="+"===e[1]?1:-1,r=parseInt(e[2],10)*t,n=parseInt(e[3],10)*t,a=this.date.getTime(),i=new Date(a+60*(60*r+n)*1e3),s=i.getUTCFullYear(),o=i.getUTCMonth()+1,l=i.getUTCDate(),d=i.getUTCHours(),c=i.getUTCMinutes(),u=i.getUTCSeconds();return`${s}-${o.toString().padStart(2,"0")}-${l.toString().padStart(2,"0")}T${d.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}${this.timezoneOffset}`}return null}return null}static forValue(e){if(!e)return r.NULL;e=e.replace(/([+-]\d{2})(\d{2})$/,"$1:$2");const t=e.match(/Z|([+-])([01]\d):?([0-5]\d)$/)?.[0]??"Z",n=new Date("Z"!==t||e.endsWith("Z")?e:`${e}Z`);return new r(n,t)}static now(){const e=new Date,t=this.getCurrentGMTOffset();return new r(e,t)}static getCurrentGMTOffset(){const e=(new Date).getTimezoneOffset(),t=Math.abs(e),r=t%60;return`${e>0?"-":"+"}${Math.floor(t/60).toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}}t.IsoDate=r},5793(e,t){t.JavascriptType=t.W=void 0,t.W={ARRAY:"array",OBJECT:"object",STRING:"string"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static ARRAY=new r(t.W.ARRAY);static OBJECT=new r(t.W.OBJECT);static STRING=new r(t.W.STRING);static NULL=new r(null);static values(){return[r.ARRAY,r.OBJECT,r.STRING]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.JavascriptType=r},7752(e,t){t.Language=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static NULL=new r(null);static forValue(e){return null===e||""===e?r.NULL:new r(e)}}t.Language=r},3447(e,t){t.NumberType=t.NumberTypeValues=void 0,t.NumberTypeValues={DECIMAL:"xsd:decimal",INT:"xsd:int",LONG:"xsd:long",BYTE:"xsd:byte",SHORT:"xsd:short",FLOAT:"xsd:float",DOUBLE:"xsd:double"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static DECIMAL=new r(t.NumberTypeValues.DECIMAL);static INT=new r(t.NumberTypeValues.INT);static LONG=new r(t.NumberTypeValues.LONG);static BYTE=new r(t.NumberTypeValues.BYTE);static SHORT=new r(t.NumberTypeValues.SHORT);static FLOAT=new r(t.NumberTypeValues.FLOAT);static DOUBLE=new r(t.NumberTypeValues.DOUBLE);static NULL=new r(null);static values(){return[r.DECIMAL,r.INT,r.LONG,r.BYTE,r.SHORT,r.FLOAT,r.DOUBLE]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.NumberType=r},1027(e,t,r){t.PavVersion=t.o=void 0;const n=r(4506);t.o={DEFAULT:"0.0.1"};class a extends n.SemVer{static DEFAULT=new a(t.o.DEFAULT);static NULL=new a(null);static values(){return[a.DEFAULT,a.NULL]}static forValue(e){for(const t of a.values())if(t.getValue()===e)return t;return new a(e)}}t.PavVersion=a},6389(e,t,r){t.PropertyIri=void 0;const n=r(936);t.PropertyIri=class{static get namespace(){return n.CedarModel.propertyIriPrefix}}},8557(e,t,r){t.SchemaVersion=t.y=void 0;const n=r(4506);t.y={CURRENT:"1.6.0"};class a extends n.SemVer{static CURRENT=new a(t.y.CURRENT);static NULL=new a(null);static values(){return[a.CURRENT]}static forValue(e){for(const t of a.values())if(t.getValue()===e)return t;return new a(e)}}t.SchemaVersion=a},4506(e,t){t.SemVer=void 0,t.SemVer=class{value;constructor(e){this.value=this.validateVersion(e)}getValue(){return this.value}validateVersion(e){if(null===e)return e;const t=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.exec(e);if(null===t||t.slice(1).some(e=>e.length>10||Number(e)>2147483647))throw new Error(`Invalid version "${e}": expected three numbers without leading zeros, separated by periods.`);if("0.0.0"===e)throw new Error('Invalid version "0.0.0": a version is not all zeros.');return e}}},7974(e,t){t.TemporalGranularity=t.TemporalGranularityValues=void 0,t.TemporalGranularityValues={YEAR:"year",MONTH:"month",DAY:"day",HOUR:"hour",MINUTE:"minute",SECOND:"second",DECIMAL_SECOND:"decimalSecond"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static YEAR=new r(t.TemporalGranularityValues.YEAR);static MONTH=new r(t.TemporalGranularityValues.MONTH);static DAY=new r(t.TemporalGranularityValues.DAY);static HOUR=new r(t.TemporalGranularityValues.HOUR);static MINUTE=new r(t.TemporalGranularityValues.MINUTE);static SECOND=new r(t.TemporalGranularityValues.SECOND);static DECIMAL_SECOND=new r(t.TemporalGranularityValues.DECIMAL_SECOND);static NULL=new r(null);static values(){return[r.YEAR,r.MONTH,r.DAY,r.HOUR,r.MINUTE,r.SECOND,r.DECIMAL_SECOND]}static valuesWithTimes(){return[r.HOUR,r.MINUTE,r.SECOND,r.DECIMAL_SECOND]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}static hasTime(e){return this.valuesWithTimes().includes(e)}}t.TemporalGranularity=r},8588(e,t){t.TemporalType=t.TemporalTypeValues=void 0,t.TemporalTypeValues={DATE:"xsd:date",TIME:"xsd:time",DATETIME:"xsd:dateTime"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static DATE=new r(t.TemporalTypeValues.DATE);static TIME=new r(t.TemporalTypeValues.TIME);static DATETIME=new r(t.TemporalTypeValues.DATETIME);static NULL=new r(null);static values(){return[r.DATE,r.TIME,r.DATETIME]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.TemporalType=r},3764(e,t){t.TimeFormat=t.TimeFormatValues=void 0,t.TimeFormatValues={H24:"24h",H12:"12h"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static H24=new r(t.TimeFormatValues.H24);static H12=new r(t.TimeFormatValues.H12);static NULL=new r(null);static values(){return[r.H24,r.H12]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.TimeFormat=r},9034(e,t){t.UiInputType=t.F=void 0,t.F={TEXTFIELD:"textfield",TEXTAREA:"textarea",LINK:"link",EXT_ROR:"ext-ror",EXT_ORCID:"ext-orcid",EXT_PFAS:"ext-pfas",EXT_PUBMED:"ext-pubmed",EXT_RRID:"ext-rrid",EXT_NIH_GRANT_ID:"ext-nih-grant-id",EXT_DOI:"ext-doi",TEMPORAL:"temporal",EMAIL:"email",NUMERIC:"numeric",PHONE_NUMBER:"phone-number",LIST:"list",CHECKBOX:"checkbox",RADIO:"radio",ATTRIBUTE_VALUE:"attribute-value",PAGE_BREAK:"page-break",SECTION_BREAK:"section-break",IMAGE:"image",RICH_TEXT:"richtext",YOUTUBE:"youtube"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static TEXTFIELD=new r(t.F.TEXTFIELD);static TEXTAREA=new r(t.F.TEXTAREA);static LINK=new r(t.F.LINK);static EXT_ROR=new r(t.F.EXT_ROR);static EXT_ORCID=new r(t.F.EXT_ORCID);static EXT_PFAS=new r(t.F.EXT_PFAS);static EXT_PUBMED=new r(t.F.EXT_PUBMED);static EXT_RRID=new r(t.F.EXT_RRID);static EXT_NIH_GRANT_ID=new r(t.F.EXT_NIH_GRANT_ID);static EXT_DOI=new r(t.F.EXT_DOI);static TEMPORAL=new r(t.F.TEMPORAL);static EMAIL=new r(t.F.EMAIL);static NUMERIC=new r(t.F.NUMERIC);static PHONE_NUMBER=new r(t.F.PHONE_NUMBER);static LIST=new r(t.F.LIST);static CHECKBOX=new r(t.F.CHECKBOX);static RADIO=new r(t.F.RADIO);static ATTRIBUTE_VALUE=new r(t.F.ATTRIBUTE_VALUE);static PAGE_BREAK=new r(t.F.PAGE_BREAK);static SECTION_BREAK=new r(t.F.SECTION_BREAK);static IMAGE=new r(t.F.IMAGE);static RICH_TEXT=new r(t.F.RICH_TEXT);static YOUTUBE=new r(t.F.YOUTUBE);static NULL=new r(null);static values(){return[r.TEXTFIELD,r.TEXTAREA,r.LINK,r.EXT_ROR,r.EXT_ORCID,r.EXT_PFAS,r.EXT_PUBMED,r.EXT_RRID,r.EXT_NIH_GRANT_ID,r.EXT_DOI,r.TEMPORAL,r.EMAIL,r.NUMERIC,r.PHONE_NUMBER,r.LIST,r.CHECKBOX,r.RADIO,r.ATTRIBUTE_VALUE,r.PAGE_BREAK,r.SECTION_BREAK,r.IMAGE,r.RICH_TEXT,r.YOUTUBE,r.NULL]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.UiInputType=r},9499(e,t,r){t.YamlArtifactType=t.YamlArtifactTypeValues=void 0;const n=r(8421);t.YamlArtifactTypeValues={TEMPLATE:"template",ELEMENT:"element",TEXTFIELD:"text-field",CONTROLLED_TERM:"controlled-term-field",TEXTAREA:"text-area-field",LINK:"link-field",EXT_ROR:"ext-ror-field",EXT_ORCID:"ext-orcid-field",EXT_PFAS:"ext-pfas-field",EXT_PUBMED:"ext-pubmed-field",EXT_RRID:"ext-rrid-field",EXT_NIH_GRANT_ID:"ext-nih-grant-id-field",EXT_DOI:"ext-doi-field",TEMPORAL:"temporal-field",EMAIL:"email-field",NUMERIC:"numeric-field",PHONE_NUMBER:"phone-number-field",SINGLE_SELECT_LIST:"single-select-list-field",MULTI_SELECT_LIST:"multi-select-list-field",CHECKBOX:"checkbox-field",RADIO:"radio-field",ATTRIBUTE_VALUE:"attribute-value-field",PAGE_BREAK:"static-page-break",SECTION_BREAK:"static-section-break",IMAGE:"static-image",RICH_TEXT:"static-rich-text",YOUTUBE:"static-youtube-video",TEMPLATE_INSTANCE:"instance"};class a{value;category;constructor(e,t){this.value=e,this.category=t}getValue(){return this.value}static TEMPLATE=new a(t.YamlArtifactTypeValues.TEMPLATE,n.CedarFieldCategory.NONE);static ELEMENT=new a(t.YamlArtifactTypeValues.ELEMENT,n.CedarFieldCategory.NONE);static TEXTFIELD=new a(t.YamlArtifactTypeValues.TEXTFIELD,n.CedarFieldCategory.DYNAMIC);static CONTROLLED_TERM=new a(t.YamlArtifactTypeValues.CONTROLLED_TERM,n.CedarFieldCategory.DYNAMIC);static TEXTAREA=new a(t.YamlArtifactTypeValues.TEXTAREA,n.CedarFieldCategory.DYNAMIC);static LINK=new a(t.YamlArtifactTypeValues.LINK,n.CedarFieldCategory.DYNAMIC);static EXT_ROR=new a(t.YamlArtifactTypeValues.EXT_ROR,n.CedarFieldCategory.DYNAMIC);static EXT_ORCID=new a(t.YamlArtifactTypeValues.EXT_ORCID,n.CedarFieldCategory.DYNAMIC);static EXT_PFAS=new a(t.YamlArtifactTypeValues.EXT_PFAS,n.CedarFieldCategory.DYNAMIC);static EXT_PUBMED=new a(t.YamlArtifactTypeValues.EXT_PUBMED,n.CedarFieldCategory.DYNAMIC);static EXT_RRID=new a(t.YamlArtifactTypeValues.EXT_RRID,n.CedarFieldCategory.DYNAMIC);static EXT_NIH_GRANT_ID=new a(t.YamlArtifactTypeValues.EXT_NIH_GRANT_ID,n.CedarFieldCategory.DYNAMIC);static EXT_DOI=new a(t.YamlArtifactTypeValues.EXT_DOI,n.CedarFieldCategory.DYNAMIC);static TEMPORAL=new a(t.YamlArtifactTypeValues.TEMPORAL,n.CedarFieldCategory.DYNAMIC);static EMAIL=new a(t.YamlArtifactTypeValues.EMAIL,n.CedarFieldCategory.DYNAMIC);static NUMERIC=new a(t.YamlArtifactTypeValues.NUMERIC,n.CedarFieldCategory.DYNAMIC);static PHONE_NUMBER=new a(t.YamlArtifactTypeValues.PHONE_NUMBER,n.CedarFieldCategory.DYNAMIC);static SINGLE_SELECT_LIST=new a(t.YamlArtifactTypeValues.SINGLE_SELECT_LIST,n.CedarFieldCategory.DYNAMIC);static MULTI_SELECT_LIST=new a(t.YamlArtifactTypeValues.MULTI_SELECT_LIST,n.CedarFieldCategory.DYNAMIC);static CHECKBOX=new a(t.YamlArtifactTypeValues.CHECKBOX,n.CedarFieldCategory.DYNAMIC);static RADIO=new a(t.YamlArtifactTypeValues.RADIO,n.CedarFieldCategory.DYNAMIC);static ATTRIBUTE_VALUE=new a(t.YamlArtifactTypeValues.ATTRIBUTE_VALUE,n.CedarFieldCategory.DYNAMIC);static PAGE_BREAK=new a(t.YamlArtifactTypeValues.PAGE_BREAK,n.CedarFieldCategory.STATIC);static SECTION_BREAK=new a(t.YamlArtifactTypeValues.SECTION_BREAK,n.CedarFieldCategory.STATIC);static IMAGE=new a(t.YamlArtifactTypeValues.IMAGE,n.CedarFieldCategory.STATIC);static RICH_TEXT=new a(t.YamlArtifactTypeValues.RICH_TEXT,n.CedarFieldCategory.STATIC);static YOUTUBE=new a(t.YamlArtifactTypeValues.YOUTUBE,n.CedarFieldCategory.STATIC);static TEMPLATE_INSTANCE=new a(t.YamlArtifactTypeValues.TEMPLATE_INSTANCE,n.CedarFieldCategory.NONE);static NULL=new a(null,n.CedarFieldCategory.NULL);static values(){return[a.TEMPLATE,a.ELEMENT,a.TEXTFIELD,a.CONTROLLED_TERM,a.TEXTAREA,a.LINK,a.EXT_ROR,a.EXT_ORCID,a.EXT_PFAS,a.EXT_PUBMED,a.EXT_RRID,a.EXT_NIH_GRANT_ID,a.EXT_DOI,a.TEMPORAL,a.EMAIL,a.NUMERIC,a.PHONE_NUMBER,a.SINGLE_SELECT_LIST,a.MULTI_SELECT_LIST,a.CHECKBOX,a.RADIO,a.ATTRIBUTE_VALUE,a.PAGE_BREAK,a.SECTION_BREAK,a.IMAGE,a.RICH_TEXT,a.YOUTUBE,a.TEMPLATE_INSTANCE,a.NULL]}static forValue(e){for(const t of a.values())if(t.getValue()===e)return t;return this.NULL}isTemplate(){return this.value===t.YamlArtifactTypeValues.TEMPLATE}isElement(){return this.value===t.YamlArtifactTypeValues.ELEMENT}isField(){return this.isDynamicField()||this.isStaticField()}isStaticField(){return this.category===n.CedarFieldCategory.STATIC}isDynamicField(){return this.category===n.CedarFieldCategory.DYNAMIC}isTemplateInstance(){return this.value===t.YamlArtifactTypeValues.TEMPLATE_INSTANCE}}t.YamlArtifactType=a},2888(e,t){t.ComparisonError=void 0,t.ComparisonError=class{errorLocation;errorType;errorPath;expectedValue;encounteredValue;stackTopLines;constructor(e,t,r,n,a){this.errorLocation=e,this.errorType=t,this.errorPath=r,this.expectedValue=n,this.encounteredValue=a}}},9760(e,t){t.ComparisonErrorType=t.e=void 0,t.e={MISSING_KEY_IN_REAL_OBJECT:"missingKeyInRealObject",UNEXPECTED_KEY_IN_REAL_OBJECT:"unexpectedKeyInRealObject",VALUE_MISMATCH:"valueMismatch",MISSING_INDEX_IN_REAL_OBJECT:"missingIndexInRealObject",UNEXPECTED_INDEX_IN_REAL_OBJECT:"unexpectedIndexInRealObject",MISSING_VALUE_IN_REAL_OBJECT:"missingValueInRealObject",UNEXPECTED_VALUE_IN_REAL_OBJECT:"unexpectedValueInRealObject"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static MISSING_KEY_IN_REAL_OBJECT=new r(t.e.MISSING_KEY_IN_REAL_OBJECT);static UNEXPECTED_KEY_IN_REAL_OBJECT=new r(t.e.UNEXPECTED_KEY_IN_REAL_OBJECT);static VALUE_MISMATCH=new r(t.e.VALUE_MISMATCH);static MISSING_INDEX_IN_REAL_OBJECT=new r(t.e.MISSING_INDEX_IN_REAL_OBJECT);static UNEXPECTED_INDEX_IN_REAL_OBJECT=new r(t.e.UNEXPECTED_INDEX_IN_REAL_OBJECT);static MISSING_VALUE_IN_REAL_OBJECT=new r(t.e.MISSING_VALUE_IN_REAL_OBJECT);static UNEXPECTED_VALUE_IN_REAL_OBJECT=new r(t.e.UNEXPECTED_VALUE_IN_REAL_OBJECT);static NULL=new r(null);static values(){return[r.MISSING_KEY_IN_REAL_OBJECT,r.UNEXPECTED_KEY_IN_REAL_OBJECT,r.VALUE_MISMATCH,r.MISSING_INDEX_IN_REAL_OBJECT,r.UNEXPECTED_INDEX_IN_REAL_OBJECT,r.MISSING_VALUE_IN_REAL_OBJECT,r.UNEXPECTED_VALUE_IN_REAL_OBJECT]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}toJSON(){return this.value}}t.ComparisonErrorType=r},4325(e,t){t.ComparisonResult=void 0,t.ComparisonResult=class{comparisonErrors=[];comparisonWarnings=[];addComparisonError(e){this.comparisonErrors.push(e)}getComparisonErrors(){return this.comparisonErrors}getComparisonErrorCount(){return this.comparisonErrors.length}addComparisonWarning(e){this.comparisonWarnings.push(e)}getComparisonWarnings(){return this.comparisonWarnings}getComparisonWarningCount(){return this.comparisonWarnings.length}areEqual(){return 0===this.comparisonErrors.length&&0===this.comparisonWarnings.length}merge(e){this.comparisonErrors.push(...e.comparisonErrors),this.comparisonWarnings.push(...e.comparisonWarnings)}}},4036(e,t){t.JsonArtifactParsingResult=void 0,t.JsonArtifactParsingResult=class{blueprintComparisonErrors=[];blueprintComparisonWarnings=[];addBlueprintComparisonError(e){this.blueprintComparisonErrors.push(e)}getBlueprintComparisonErrors(){return this.blueprintComparisonErrors}getBlueprintComparisonErrorCount(){return this.blueprintComparisonErrors.length}addBlueprintComparisonWarning(e){this.blueprintComparisonWarnings.push(e)}getBlueprintComparisonWarnings(){return this.blueprintComparisonWarnings}getBlueprintComparisonWarningCount(){return this.blueprintComparisonWarnings.length}wasSuccessful(){return 0===this.blueprintComparisonErrors.length}adheresToBlueprint(){return 0===this.blueprintComparisonErrors.length&&0===this.blueprintComparisonWarnings.length}merge(e){this.blueprintComparisonErrors.push(...e.blueprintComparisonErrors),this.blueprintComparisonWarnings.push(...e.blueprintComparisonWarnings)}}},3056(e,t,r){t.JsonObjectComparator=void 0;const n=r(2888),a=r(3188),i=r(9760),s=r(5747),o=r(2733),l=r(936);class d{static compareBothWays(e,t,r,s,c,u=[]){!function t(r,s,m){const p=r.getLastComponent()==o.JsonSchema.required;if(Array.isArray(s)&&Array.isArray(m))if(p){const t=new Set(s),a=new Set(m);s.forEach((t,s)=>{const o=r.add(s);a.has(t)||e.addBlueprintComparisonError(new n.ComparisonError("oca01",i.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,o,t))}),m.forEach((a,s)=>{const o=r.add(s);t.has(a)||e.addBlueprintComparisonError(new n.ComparisonError("oca02",i.ComparisonErrorType.UNEXPECTED_VALUE_IN_REAL_OBJECT,o,void 0,a))})}else{const a=Math.max(s.length,m.length);for(let o=0;o<a;o++){const a=r.add(o);o in s?o in m?"object"==typeof s[o]&&null!==s[o]&&"object"==typeof m[o]&&null!==m[o]?t(a,s[o],m[o]):s[o]!==m[o]&&e.addBlueprintComparisonError(new n.ComparisonError("ocl03",i.ComparisonErrorType.VALUE_MISMATCH,a,s[o],m[o])):e.addBlueprintComparisonError(new n.ComparisonError("ocl02",i.ComparisonErrorType.MISSING_INDEX_IN_REAL_OBJECT,a,s[o])):e.addBlueprintComparisonError(new n.ComparisonError("ocl01",i.ComparisonErrorType.UNEXPECTED_INDEX_IN_REAL_OBJECT,a,void 0,m[o]))}}else new Set([...Object.keys(s),...Object.keys(m)]).forEach(p=>{const h=r.add(p);if(p in s)if(p in m){if("object"==typeof s[p]&&null!==s[p]&&"object"==typeof m[p]&&null!==m[p])t(h,s[p],m[p]);else if(s[p]!==m[p]){const t=new n.ComparisonError("oco03",i.ComparisonErrorType.VALUE_MISMATCH,h,s[p],m[p]);c.useWarningForKnownIssues()&&d.isKnownProductionVariation(h)?e.addBlueprintComparisonWarning(t):e.addBlueprintComparisonError(t)}}else c.useWarningForKnownIssues()&&(h.endsIn(l.CedarModel.literals,a.JsonPath.ANY,l.CedarModel.selectedByDefault)||h.endsIn(l.CedarModel.ui,l.CedarModel.pages)||d.isKnownProductionVariation(h))?e.addBlueprintComparisonWarning(new n.ComparisonError("wco02",i.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,h)):e.addBlueprintComparisonError(new n.ComparisonError("oco02",i.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,h));else c.useWarningForKnownIssues()&&(h.endsIn(o.JsonSchema.properties,o.JsonSchema.atLanguage)||d.isKnownProductionVariation(h))?e.addBlueprintComparisonWarning(new n.ComparisonError("wco01",i.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,h)):u.includes(p)||e.addBlueprintComparisonError(new n.ComparisonError("oco01",i.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,h))})}(s,t,r)}static isKnownProductionVariation(e){return e.endsIn(o.JsonSchema.atContext,s.TemplateProperty.additionalProperties)||e.endsIn(o.JsonSchema.atContext,o.JsonSchema.properties,a.JsonPath.ANY,l.CedarModel.enum,a.JsonPath.ANY)||e.endsIn(o.JsonSchema.atContext,o.JsonSchema.required,a.JsonPath.ANY)||e.endsIn(o.JsonSchema.atContext,a.JsonPath.ANY)||e.endsIn(l.CedarModel.ui,l.CedarModel.propertyDescriptions,a.JsonPath.ANY)||e.endsIn(l.CedarModel.ui,l.CedarModel.propertyDescriptions)||e.endsIn(l.CedarModel.ui,l.CedarModel.propertyLabels)||e.endsIn(o.JsonSchema.properties,a.JsonPath.ANY,l.CedarModel.enum,a.JsonPath.ANY)||e.endsIn(o.JsonSchema.required)}static reportToLeft(e,t,r){t.useWarningForKnownIssues()&&d.isKnownProductionVariation(r.errorPath)?e.addBlueprintComparisonWarning(r):e.addBlueprintComparisonError(r)}static compareToLeft(e,t,r,a,s){!function t(r,a,l){const c=r.getLastComponent()==o.JsonSchema.required;if(Array.isArray(a)&&Array.isArray(l))if(c){const t=new Set(l);a.forEach((a,o)=>{const l=r.add(o);t.has(a)||d.reportToLeft(e,s,new n.ComparisonError("ola01",i.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,l,a))})}else a.forEach((o,c)=>{const u=r.add(c);c in l?"object"==typeof o&&null!==o&&"object"==typeof l[c]&&null!==l[c]?t(u,o,l[c]):o!==l[c]&&d.reportToLeft(e,s,new n.ComparisonError("oll02",i.ComparisonErrorType.VALUE_MISMATCH,u,o,l[c])):d.reportToLeft(e,s,new n.ComparisonError("oll01",i.ComparisonErrorType.MISSING_INDEX_IN_REAL_OBJECT,u,a[c]))});else Object.keys(a).forEach(o=>{const c=r.add(o);o in l?"object"==typeof a[o]&&null!==a[o]&&"object"==typeof l[o]&&null!==l[o]?t(c,a[o],l[o]):a[o]!==l[o]&&d.reportToLeft(e,s,new n.ComparisonError("olo02",i.ComparisonErrorType.VALUE_MISMATCH,c,a[o],l[o])):d.reportToLeft(e,s,new n.ComparisonError("olo01",i.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,c))})}(a,t,r)}static comparePrimitive(e,t,r,a){return t!==r&&e.addBlueprintComparisonError(new n.ComparisonError("opp1",i.ComparisonErrorType.VALUE_MISMATCH,a,t,r)),e}}t.JsonObjectComparator=d},1591(e,t){t.YamlArtifactParsingResult=void 0,t.YamlArtifactParsingResult=class{blueprintComparisonErrors=[];blueprintComparisonWarnings=[];addBlueprintComparisonError(e){this.blueprintComparisonErrors.push(e)}getBlueprintComparisonErrors(){return this.blueprintComparisonErrors}getBlueprintComparisonErrorCount(){return this.blueprintComparisonErrors.length}addBlueprintComparisonWarning(e){this.blueprintComparisonWarnings.push(e)}getBlueprintComparisonWarnings(){return this.blueprintComparisonWarnings}getBlueprintComparisonWarningCount(){return this.blueprintComparisonWarnings.length}wasSuccessful(){return 0===this.blueprintComparisonErrors.length}adheresToBlueprint(){return 0===this.blueprintComparisonErrors.length&&0===this.blueprintComparisonWarnings.length}merge(e){this.blueprintComparisonErrors.push(...e.blueprintComparisonErrors),this.blueprintComparisonWarnings.push(...e.blueprintComparisonWarnings)}}},6109(e,t){t.YamlComparisonErrorType=t.H=void 0,t.H={MISSING_KEY_IN_RIGHT_OBJECT:"missingKeyInRightObject",UNEXPECTED_KEY_IN_RIGHT_OBJECT:"unexpectedKeyInRightObject",VALUE_MISMATCH:"valueMismatch",MISSING_INDEX_IN_RIGHT_OBJECT:"missingIndexInRightObject",UNEXPECTED_INDEX_IN_RIGHT_OBJECT:"unexpectedIndexInRightObject",MISSING_VALUE_IN_RIGHT_OBJECT:"missingValueInRightObject",UNEXPECTED_VALUE_IN_RIGHT_OBJECT:"unexpectedValueInRightObject"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static MISSING_KEY_IN_RIGHT_OBJECT=new r(t.H.MISSING_KEY_IN_RIGHT_OBJECT);static UNEXPECTED_KEY_IN_RIGHT_OBJECT=new r(t.H.UNEXPECTED_KEY_IN_RIGHT_OBJECT);static VALUE_MISMATCH=new r(t.H.VALUE_MISMATCH);static MISSING_INDEX_IN_RIGHT_OBJECT=new r(t.H.MISSING_INDEX_IN_RIGHT_OBJECT);static UNEXPECTED_INDEX_IN_RIGHT_OBJECT=new r(t.H.UNEXPECTED_INDEX_IN_RIGHT_OBJECT);static MISSING_VALUE_IN_RIGHT_OBJECT=new r(t.H.MISSING_VALUE_IN_RIGHT_OBJECT);static UNEXPECTED_VALUE_IN_RIGHT_OBJECT=new r(t.H.UNEXPECTED_VALUE_IN_RIGHT_OBJECT);static NULL=new r(null);static values(){return[r.MISSING_KEY_IN_RIGHT_OBJECT,r.UNEXPECTED_KEY_IN_RIGHT_OBJECT,r.VALUE_MISMATCH,r.MISSING_INDEX_IN_RIGHT_OBJECT,r.UNEXPECTED_INDEX_IN_RIGHT_OBJECT,r.MISSING_VALUE_IN_RIGHT_OBJECT,r.UNEXPECTED_VALUE_IN_RIGHT_OBJECT]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}toJSON(){return this.value}}t.YamlComparisonErrorType=r},1885(e,t,r){t.YamlObjectComparator=void 0;const n=r(2888),a=r(3188),i=r(6109),s=r(4325);t.YamlObjectComparator=class{static compare(e,t){const r=new s.ComparisonResult;return this.compareBothWays(r,e,t,new a.JsonPath),r}static compareBothWays(e,t,r,a){!function t(r,a,s){if(Array.isArray(a)&&Array.isArray(s)){const o=Math.max(a.length,s.length);for(let l=0;l<o;l++){const o=r.add(l);l in a?l in s?"object"==typeof a[l]&&null!==a[l]&&"object"==typeof s[l]&&null!==s[l]?t(o,a[l],s[l]):a[l]!==s[l]&&e.addComparisonError(new n.ComparisonError("ocl03",i.YamlComparisonErrorType.VALUE_MISMATCH,o,a[l],s[l])):e.addComparisonError(new n.ComparisonError("ocl02",i.YamlComparisonErrorType.MISSING_INDEX_IN_RIGHT_OBJECT,o,a[l])):e.addComparisonError(new n.ComparisonError("ocl01",i.YamlComparisonErrorType.UNEXPECTED_INDEX_IN_RIGHT_OBJECT,o,void 0,s[l]))}}else new Set([...Object.keys(a),...Object.keys(s)]).forEach(o=>{const l=r.add(o);o in a?o in s?"object"==typeof a[o]&&null!==a[o]&&"object"==typeof s[o]&&null!==s[o]?t(l,a[o],s[o]):a[o]!==s[o]&&e.addComparisonError(new n.ComparisonError("oco03",i.YamlComparisonErrorType.VALUE_MISMATCH,l,a[o],s[o])):e.addComparisonError(new n.ComparisonError("oco02",i.YamlComparisonErrorType.MISSING_KEY_IN_RIGHT_OBJECT,l)):e.addComparisonError(new n.ComparisonError("oco01",i.YamlComparisonErrorType.UNEXPECTED_KEY_IN_RIGHT_OBJECT,l))})}(a,t,r)}}},3188(e,t){t.JsonPath=void 0;class r{path;static ANY="*";constructor(...e){this.path=e}equal(e){return this.path.length===e.path.length&&this.path.every((t,r)=>t===e.path[r])}add(...e){return new r(...this.path,...e)}join(e){return new r(...this.path,...e.path)}toString(){let e="";return this.path.forEach(t=>{e+="number"==typeof t?`/[${t}]`:`/${t}`}),e+"/"}toJSON(){return this.toString()}getLastComponent(){return 0===this.path.length?null:this.path[this.path.length-1]}endsIn(...e){for(let t=1;t<=e.length;t++){if(t>this.path.length)return!1;const n=e[e.length-t];if(this.path[this.path.length-t]!==n&&n!=r.ANY)return!1}return!0}getLastNComponents(e){if(e<=0||0===this.path.length)return new r;const t=Math.max(this.path.length-e,0),n=this.path.slice(t);return new r(...n)}}t.JsonPath=r},6968(e,t,r){t.JsonContainerArtifactContent=void 0;const n=r(8748);class a{static CONTEXT_VERBATIM={xsd:"http://www.w3.org/2001/XMLSchema#",pav:"http://purl.org/pav/",bibo:"http://purl.org/ontology/bibo/",oslc:"http://open-services.net/ns/core#",schema:"http://schema.org/","schema:name":{"@type":"xsd:string"},"schema:description":{"@type":"xsd:string"},"pav:createdOn":{"@type":"xsd:dateTime"},"pav:createdBy":{"@type":"@id"},"pav:lastUpdatedOn":{"@type":"xsd:dateTime"},"oslc:modifiedBy":{"@type":"@id"}};static CONTEXT_VERBATIM_NO_BIBO;static{this.CONTEXT_VERBATIM_NO_BIBO=n.ReaderUtil.deepClone(this.CONTEXT_VERBATIM),n.ReaderUtil.deleteNodeKey(this.CONTEXT_VERBATIM_NO_BIBO,"bibo"),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM_NO_BIBO),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM)}}t.JsonContainerArtifactContent=a},6551(e,t,r){t.JsonTemplateContent=void 0;const n=r(8748);class a{static ANNOTATIONS={type:"object",patternProperties:{"^.+$":{oneOf:[{type:"object",properties:{"@id":{type:"string",format:"uri"}},additionalProperties:!1},{type:"object",properties:{"@value":{type:["string","number","boolean","null"]}},additionalProperties:!1}]}},additionalProperties:!1};static REQUIRED_PARTIAL=["@context","@id","schema:isBasedOn","schema:name","schema:description","pav:createdOn","pav:createdBy","pav:lastUpdatedOn","oslc:modifiedBy"];static PROPERTIES_PARTIAL={"@context":{type:"object",properties:{_annotations:{type:"string",enum:["@nest"]},rdfs:{type:"string",format:"uri",enum:["http://www.w3.org/2000/01/rdf-schema#"]},xsd:{type:"string",format:"uri",enum:["http://www.w3.org/2001/XMLSchema#"]},pav:{type:"string",format:"uri",enum:["http://purl.org/pav/"]},schema:{type:"string",format:"uri",enum:["http://schema.org/"]},oslc:{type:"string",format:"uri",enum:["http://open-services.net/ns/core#"]},skos:{type:"string",format:"uri",enum:["http://www.w3.org/2004/02/skos/core#"]},"rdfs:label":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}},"schema:isBasedOn":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"schema:name":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}},"schema:description":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}},"pav:derivedFrom":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"pav:createdOn":{type:"object",properties:{"@type":{type:"string",enum:["xsd:dateTime"]}}},"pav:createdBy":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"pav:lastUpdatedOn":{type:"object",properties:{"@type":{type:"string",enum:["xsd:dateTime"]}}},"oslc:modifiedBy":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"skos:notation":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}}},required:["xsd","pav","schema","oslc","schema:isBasedOn","schema:name","schema:description","pav:createdOn","pav:createdBy","pav:lastUpdatedOn","oslc:modifiedBy"],additionalProperties:!1},"@id":{type:["string","null"],format:"uri"},"@type":{oneOf:[{type:"string",format:"uri"},{type:"array",minItems:1,items:{type:"string",format:"uri"},uniqueItems:!0}]},"schema:isBasedOn":{type:"string",format:"uri"},"schema:name":{type:"string",minLength:1},"schema:description":{type:"string"},"pav:derivedFrom":{type:"string",format:"uri"},"pav:createdOn":{type:["string","null"],format:"date-time"},"pav:createdBy":{type:["string","null"],format:"uri"},"pav:lastUpdatedOn":{type:["string","null"],format:"date-time"},"oslc:modifiedBy":{type:["string","null"],format:"uri"},_annotations:a.ANNOTATIONS};static REQUIRED_PARTIAL_KEY_MAP;static PROPERTIES_PARTIAL_KEY_LIST=[];static PROPERTIES_PARTIAL_KEY_MAP=new Map;static CONTEXT_VERBATIM_NO_BIBO;static{Object.keys(a.PROPERTIES_PARTIAL).forEach(e=>{this.PROPERTIES_PARTIAL_KEY_LIST.push(e),this.PROPERTIES_PARTIAL_KEY_MAP.set(e,!0)}),this.REQUIRED_PARTIAL_KEY_MAP=this.REQUIRED_PARTIAL.reduce((e,t)=>(e.set(t,!0),e),new Map),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL_KEY_MAP),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL_KEY_LIST),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL_KEY_MAP)}}t.JsonTemplateContent=a},1501(e,t,r){t.JsonTemplateElementContent=void 0;const n=r(8748);class a{static REQUIRED_PARTIAL=["@context","@id"];static PROPERTIES_PARTIAL={"@context":{type:"object",properties:{},required:[],additionalProperties:!1},"@id":{type:["string","null"],format:"uri"},"@type":{oneOf:[{type:"string",format:"uri"},{type:"array",minItems:1,items:{type:"string",format:"uri"},uniqueItems:!0}]}};static LEGACY_ID_TYPING={type:"string",format:"uri"};static acceptEitherIdTyping(e,t){const r=n.ReaderUtil.getNode(t,"@id");null!==r&&JSON.stringify(r)===JSON.stringify(a.LEGACY_ID_TYPING)&&(e["@id"]=n.ReaderUtil.deepClone(a.LEGACY_ID_TYPING))}static REQUIRED_PARTIAL_KEY_MAP;static PROPERTIES_PARTIAL_KEY_MAP=new Map;static CONTEXT_VERBATIM_NO_BIBO;static{Object.keys(a.PROPERTIES_PARTIAL).forEach(e=>{this.PROPERTIES_PARTIAL_KEY_MAP.set(e,!0)}),this.REQUIRED_PARTIAL_KEY_MAP=this.REQUIRED_PARTIAL.reduce((e,t)=>(e.set(t,!0),e),new Map),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL_KEY_MAP),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL_KEY_MAP)}}t.JsonTemplateElementContent=a},9932(e,t,r){t.JsonTemplateFieldContentDynamic=void 0;const n=r(8748),a=r(2733),i=r(936);class s{static CONTEXT_VERBATIM={xsd:"http://www.w3.org/2001/XMLSchema#",pav:"http://purl.org/pav/",bibo:"http://purl.org/ontology/bibo/",oslc:"http://open-services.net/ns/core#",schema:"http://schema.org/",skos:"http://www.w3.org/2004/02/skos/core#","schema:name":{"@type":"xsd:string"},"schema:description":{"@type":"xsd:string"},"skos:prefLabel":{"@type":"xsd:string"},"skos:altLabel":{"@type":"xsd:string"},"pav:createdOn":{"@type":"xsd:dateTime"},"pav:createdBy":{"@type":"@id"},"pav:lastUpdatedOn":{"@type":"xsd:dateTime"},"oslc:modifiedBy":{"@type":"@id"}};static PROPERTIES_VERBATIM_LITERAL={"@type":{type:"string",format:"uri"},"rdfs:label":{type:["string","null"]},"@value":{type:["string","null"]},"@language":{type:["string","null"],minLength:1}};static PROPERTIES_VERBATIM_IRI={"@type":{type:"string",format:"uri"},"@id":{type:"string",format:"uri"},"rdfs:label":{type:["string","null"]},"skos:notation":{type:["string","null"]}};static ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_OUTSIDE={type:"object",properties:{"@value":{type:["string","null"]},"@type":{type:"string",format:"uri"}},required:["@value"],additionalProperties:!1};static ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE={type:"string",format:"uri"};static PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE;static PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION;static CONTEXT_VERBATIM_NO_BIBO;static{n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_LITERAL),this.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE=n.ReaderUtil.deepClone(this.PROPERTIES_VERBATIM_LITERAL),n.ReaderUtil.deleteNodeKey(this.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE,a.JsonSchema.atLanguage),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE),this.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION=n.ReaderUtil.deepClone(this.PROPERTIES_VERBATIM_IRI),n.ReaderUtil.deleteNodeKey(this.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION,i.CedarModel.skosNotation),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION),this.CONTEXT_VERBATIM_NO_BIBO=n.ReaderUtil.deepClone(this.CONTEXT_VERBATIM),n.ReaderUtil.deleteNodeKey(this.CONTEXT_VERBATIM_NO_BIBO,"bibo"),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM_NO_BIBO),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_IRI),n.ReaderUtil.deepFreeze(this.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_OUTSIDE),n.ReaderUtil.deepFreeze(this.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE)}}t.JsonTemplateFieldContentDynamic=s},9251(e,t,r){t.JsonTemplateFieldContentStatic=void 0;const n=r(8748);class a{static CONTEXT_VERBATIM={schema:"http://schema.org/",pav:"http://purl.org/pav/",bibo:"http://purl.org/ontology/bibo/",oslc:"http://open-services.net/ns/core#"};static CONTEXT_VERBATIM_NO_BIBO;static{n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM),this.CONTEXT_VERBATIM_NO_BIBO=n.ReaderUtil.deepClone(this.CONTEXT_VERBATIM),n.ReaderUtil.deleteNodeKey(this.CONTEXT_VERBATIM_NO_BIBO,"bibo"),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM_NO_BIBO)}}t.JsonTemplateFieldContentStatic=a},350(e,t,r){t.JsonTemplateInstanceContent=void 0;const n=r(8748);class a{static CONTEXT_VERBATIM={rdfs:"http://www.w3.org/2000/01/rdf-schema#",xsd:"http://www.w3.org/2001/XMLSchema#",pav:"http://purl.org/pav/",schema:"http://schema.org/",oslc:"http://open-services.net/ns/core#",skos:"http://www.w3.org/2004/02/skos/core#","rdfs:label":{"@type":"xsd:string"},"schema:isBasedOn":{"@type":"@id"},"schema:name":{"@type":"xsd:string"},"schema:description":{"@type":"xsd:string"},"pav:derivedFrom":{"@type":"@id"},"pav:createdOn":{"@type":"xsd:dateTime"},"pav:createdBy":{"@type":"@id"},"pav:lastUpdatedOn":{"@type":"xsd:dateTime"},"oslc:modifiedBy":{"@type":"@id"},"skos:notation":{"@type":"xsd:string"}};static{n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM)}}t.JsonTemplateInstanceContent=a},3198(e,t,r){r.r(t),r.d(t,{Alias:()=>J,CST:()=>n,Composer:()=>er,Document:()=>vt,Lexer:()=>Nr,LineCounter:()=>wr,Pair:()=>Ee,Parser:()=>Ur,Scalar:()=>W,Schema:()=>St,YAMLError:()=>Nt,YAMLMap:()=>Se,YAMLParseError:()=>wt,YAMLSeq:()=>_e,YAMLWarning:()=>Lt,default:()=>a,isAlias:()=>m,isCollection:()=>C,isDocument:()=>p,isMap:()=>h,isNode:()=>E,isPair:()=>f,isScalar:()=>y,isSeq:()=>T,parse:()=>Pr,parseAllDocuments:()=>xr,parseDocument:()=>Jr,stringify:()=>kr,visit:()=>R,visitAsync:()=>v});var n={};r.r(n),r.d(n,{BOM:()=>hr,DOCUMENT:()=>fr,FLOW_END:()=>yr,SCALAR:()=>Tr,createScalarToken:()=>rr,isCollection:()=>Cr,isScalar:()=>Er,prettyToken:()=>gr,resolveAsScalar:()=>tr,setScalarValue:()=>nr,stringify:()=>sr,tokenType:()=>Ir,visit:()=>mr});var a={};r.r(a),r.d(a,{Alias:()=>J,CST:()=>n,Composer:()=>er,Document:()=>vt,Lexer:()=>Nr,LineCounter:()=>wr,Pair:()=>Ee,Parser:()=>Ur,Scalar:()=>W,Schema:()=>St,YAMLError:()=>Nt,YAMLMap:()=>Se,YAMLParseError:()=>wt,YAMLSeq:()=>_e,YAMLWarning:()=>Lt,isAlias:()=>m,isCollection:()=>C,isDocument:()=>p,isMap:()=>h,isNode:()=>E,isPair:()=>f,isScalar:()=>y,isSeq:()=>T,parse:()=>Pr,parseAllDocuments:()=>xr,parseDocument:()=>Jr,stringify:()=>kr,visit:()=>R,visitAsync:()=>v});const i=Symbol.for("yaml.alias"),s=Symbol.for("yaml.document"),o=Symbol.for("yaml.map"),l=Symbol.for("yaml.pair"),d=Symbol.for("yaml.scalar"),c=Symbol.for("yaml.seq"),u=Symbol.for("yaml.node.type"),m=e=>!!e&&"object"==typeof e&&e[u]===i,p=e=>!!e&&"object"==typeof e&&e[u]===s,h=e=>!!e&&"object"==typeof e&&e[u]===o,f=e=>!!e&&"object"==typeof e&&e[u]===l,y=e=>!!e&&"object"==typeof e&&e[u]===d,T=e=>!!e&&"object"==typeof e&&e[u]===c;function C(e){if(e&&"object"==typeof e)switch(e[u]){case o:case c:return!0}return!1}function E(e){if(e&&"object"==typeof e)switch(e[u]){case i:case o:case d:case c:return!0}return!1}const g=e=>(y(e)||C(e))&&!!e.anchor,I=Symbol("break visit"),A=Symbol("skip children"),b=Symbol("remove node");function R(e,t){const r=N(t);p(e)?S(null,e.contents,r,Object.freeze([e]))===b&&(e.contents=null):S(null,e,r,Object.freeze([]))}function S(e,t,r,n){const a=w(e,t,r,n);if(E(a)||f(a))return L(e,n,a),S(e,a,r,n);if("symbol"!=typeof a)if(C(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const a=S(e,t.items[e],r,n);if("number"==typeof a)e=a-1;else{if(a===I)return I;a===b&&(t.items.splice(e,1),e-=1)}}}else if(f(t)){n=Object.freeze(n.concat(t));const e=S("key",t.key,r,n);if(e===I)return I;e===b&&(t.key=null);const a=S("value",t.value,r,n);if(a===I)return I;a===b&&(t.value=null)}return a}async function v(e,t){const r=N(t);p(e)?await _(null,e.contents,r,Object.freeze([e]))===b&&(e.contents=null):await _(null,e,r,Object.freeze([]))}async function _(e,t,r,n){const a=await w(e,t,r,n);if(E(a)||f(a))return L(e,n,a),_(e,a,r,n);if("symbol"!=typeof a)if(C(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const a=await _(e,t.items[e],r,n);if("number"==typeof a)e=a-1;else{if(a===I)return I;a===b&&(t.items.splice(e,1),e-=1)}}}else if(f(t)){n=Object.freeze(n.concat(t));const e=await _("key",t.key,r,n);if(e===I)return I;e===b&&(t.key=null);const a=await _("value",t.value,r,n);if(a===I)return I;a===b&&(t.value=null)}return a}function N(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function w(e,t,r,n){return"function"==typeof r?r(e,t,n):h(t)?r.Map?.(e,t,n):T(t)?r.Seq?.(e,t,n):f(t)?r.Pair?.(e,t,n):y(t)?r.Scalar?.(e,t,n):m(t)?r.Alias?.(e,t,n):void 0}function L(e,t,r){const n=t[t.length-1];if(C(n))n.items[e]=r;else if(f(n))"key"===e?n.key=r:n.value=r;else{if(!p(n)){const e=m(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}n.contents=r}}R.BREAK=I,R.SKIP=A,R.REMOVE=b,v.BREAK=I,v.SKIP=A,v.REMOVE=b;const F={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},V=e=>e.replace(/[!,[\]{}]/g,e=>F[e]);class O{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},O.defaultYaml,e),this.tags=Object.assign({},O.defaultTags,t)}clone(){const e=new O(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new O(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:O.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},O.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:O.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},O.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(2!==r.length&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[e,n]=r;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==r.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=r;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const r=e.slice(2,-1);return"!"===r||"!!"===r?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),r)}const[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);const a=this.tags[r];if(a)try{return a+decodeURIComponent(n)}catch(e){return t(String(e)),null}return"!"===r?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+V(e.substring(r.length));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let n;if(e&&r.length>0&&E(e.contents)){const t={};R(e.contents,(e,r)=>{E(r)&&r.tag&&(t[r.tag]=!0)}),n=Object.keys(t)}else n=[];for(const[a,i]of r)"!!"===a&&"tag:yaml.org,2002:"===i||e&&!n.some(e=>e.startsWith(i))||t.push(`%TAG ${a} ${i}`);return t.join("\n")}}function D(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function M(e){const t=new Set;return R(e,{Value(e,r){r.anchor&&t.add(r.anchor)}}),t}function B(e,t){for(let r=1;;++r){const n=`${e}${r}`;if(!t.has(n))return n}}function U(e,t,r,n){if(n&&"object"==typeof n)if(Array.isArray(n))for(let t=0,r=n.length;t<r;++t){const r=n[t],a=U(e,n,String(t),r);void 0===a?delete n[t]:a!==r&&(n[t]=a)}else if(n instanceof Map)for(const t of Array.from(n.keys())){const r=n.get(t),a=U(e,n,t,r);void 0===a?n.delete(t):a!==r&&n.set(t,a)}else if(n instanceof Set)for(const t of Array.from(n)){const r=U(e,n,t,t);void 0===r?n.delete(t):r!==t&&(n.delete(t),n.add(r))}else for(const[t,r]of Object.entries(n)){const a=U(e,n,t,r);void 0===a?delete n[t]:a!==r&&(n[t]=a)}return e.call(t,r,n)}function Y(e,t,r){if(Array.isArray(e))return e.map((e,t)=>Y(e,String(t),r));if(e&&"function"==typeof e.toJSON){if(!r||!g(e))return e.toJSON(t,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=e=>{n.res=e,delete r.onCreate};const a=e.toJSON(t,r);return r.onCreate&&r.onCreate(a),a}return"bigint"!=typeof e||r?.keep?e:Number(e)}O.defaultYaml={explicit:!1,version:"1.2"},O.defaultTags={"!!":"tag:yaml.org,2002:"};class x{constructor(e){Object.defineProperty(this,u,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:a}={}){if(!p(e))throw new TypeError("A document argument is required");const i={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},s=Y(this,"",i);if("function"==typeof n)for(const{count:e,res:t}of i.anchors.values())n(t,e);return"function"==typeof a?U(a,{"":s},"",s):s}}class J extends x{constructor(e){super(i),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){if(0===t?.maxAliasCount)throw new ReferenceError("Alias resolution is disabled");let r,n;t?.aliasResolveCache?r=t.aliasResolveCache:(r=[],R(e,{Node:(e,t)=>{(m(t)||g(t))&&r.push(t)}}),t&&(t.aliasResolveCache=r));for(const e of r){if(e===this)break;e.anchor===this.source&&(n=e)}if(n&&t){const{anchors:e,doc:r,maxAliasCount:a}=t;let i=e.get(n);if(i||(Y(n,null,t),i=e.get(n)),void 0===i?.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(a>=0&&(i.count+=1,0===i.aliasCount&&(i.aliasCount=P(r,n,e)),i.count*i.aliasCount>a))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return n}toJSON(e,t){if(!t)return{source:this.source};const r=this.resolve(t.doc,t);if(!r){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}return t.anchors.get(r).res}toString(e,t,r){const n=`*${this.source}`;if(e){if(D(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${n} `}return n}}function P(e,t,r){if(m(t)){const n=t.resolve(e),a=r&&n&&r.get(n);return a?a.count*a.aliasCount:0}if(C(t)){let n=0;for(const a of t.items){const t=P(e,a,r);t>n&&(n=t)}return n}if(f(t)){const n=P(e,t.key,r),a=P(e,t.value,r);return Math.max(n,a)}return 1}const k=e=>!e||"function"!=typeof e&&"object"!=typeof e;class W extends x{constructor(e){super(d),this.value=e}toJSON(e,t){return t?.keep?this.value:Y(this.value,e,t)}toString(){return String(this.value)}}function K(e,t,r){if(p(e)&&(e=e.contents),E(e))return e;if(f(e)){const t=r.schema[o].createNode?.(r.schema,null,r);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:n,onAnchor:a,onTagObj:i,schema:s,sourceObjects:l}=r;let d;if(n&&e&&"object"==typeof e){if(d=l.get(e),d)return d.anchor??(d.anchor=a(e)),new J(d.anchor);d={anchor:null,node:null},l.set(e,d)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let u=function(e,t,r){if(t){const e=r.filter(e=>e.tag===t),n=e.find(e=>!e.format)??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find(t=>t.identify?.(e)&&!t.format)}(e,t,s.tags);if(!u){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new W(e);return d&&(d.node=t),t}u=e instanceof Map?s[o]:Symbol.iterator in Object(e)?s[c]:s[o]}i&&(i(u),delete r.onTagObj);const m=u?.createNode?u.createNode(r.schema,e,r):"function"==typeof u?.nodeClass?.from?u.nodeClass.from(r.schema,e,r):new W(e);return t?m.tag=t:u.default||(m.tag=u.tag),d&&(d.node=m),m}function j(e,t,r){let n=r;for(let e=t.length-1;e>=0;--e){const r=t[e];if("number"==typeof r&&Number.isInteger(r)&&r>=0){const e=[];e[r]=n,n=e}else n=new Map([[r,n]])}return K(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}W.BLOCK_FOLDED="BLOCK_FOLDED",W.BLOCK_LITERAL="BLOCK_LITERAL",W.PLAIN="PLAIN",W.QUOTE_DOUBLE="QUOTE_DOUBLE",W.QUOTE_SINGLE="QUOTE_SINGLE";const $=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class X extends x{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>E(t)||f(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if($(e))this.add(t);else{const[r,...n]=e,a=this.get(r,!0);if(C(a))a.addIn(n,t);else{if(void 0!==a||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,j(this.schema,n,t))}}}deleteIn(e){const[t,...r]=e;if(0===r.length)return this.delete(t);const n=this.get(t,!0);if(C(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){const[r,...n]=e,a=this.get(r,!0);return 0===n.length?!t&&y(a)?a.value:a:C(a)?a.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!f(t))return!1;const r=t.value;return null==r||e&&y(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[t,...r]=e;if(0===r.length)return this.has(t);const n=this.get(t,!0);return!!C(n)&&n.hasIn(r)}setIn(e,t){const[r,...n]=e;if(0===n.length)this.set(r,t);else{const e=this.get(r,!0);if(C(e))e.setIn(n,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,j(this.schema,n,t))}}}}const G=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function q(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const H=(e,t,r)=>e.endsWith("\n")?q(r,t):r.includes("\n")?"\n"+q(r,t):(e.endsWith(" ")?"":" ")+r,z="block",Q="quoted";function Z(e,t,r="flow",{indentAtStart:n,lineWidth:a=80,minContentWidth:i=20,onFold:s,onOverflow:o}={}){if(!a||a<0)return e;a<i&&(i=0);const l=Math.max(1+i,1+a-t.length);if(e.length<=l)return e;const d=[],c={};let u,m,p=a-t.length;"number"==typeof n&&(n>a-Math.max(2,i)?d.push(0):p=a-n);let h=!1,f=-1,y=-1,T=-1;r===z&&(f=ee(e,f,t.length),-1!==f&&(p=f+l));for(let n;n=e[f+=1];){if(r===Q&&"\\"===n){switch(y=f,e[f+1]){case"x":f+=3;break;case"u":f+=5;break;case"U":f+=9;break;default:f+=1}T=f}if("\n"===n)r===z&&(f=ee(e,f,t.length)),p=f+t.length+l,u=void 0;else{if(" "===n&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const t=e[f+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(u=f)}if(f>=p)if(u)d.push(u),p=u+l,u=void 0;else if(r===Q){for(;" "===m||"\t"===m;)m=n,n=e[f+=1],h=!0;const t=f>T+1?f-2:y-1;if(c[t])return e;d.push(t),c[t]=!0,p=t+l,u=void 0}else h=!0}m=n}if(h&&o&&o(),0===d.length)return e;s&&s();let C=e.slice(0,d[0]);for(let n=0;n<d.length;++n){const a=d[n],i=d[n+1]||e.length;0===a?C=`\n${t}${e.slice(0,i)}`:(r===Q&&c[a]&&(C+=`${e[a]}\\`),C+=`\n${t}${e.slice(a+1,i)}`)}return C}function ee(e,t,r){let n=t,a=t+1,i=e[a];for(;" "===i||"\t"===i;)if(t<a+r)i=e[++t];else{do{i=e[++t]}while(i&&"\n"!==i);n=t,a=t+1,i=e[a]}return n}const te=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),re=e=>/^(%|---|\.\.\.)/m.test(e);function ne(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=t,a=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(re(e)?" ":"");let s="",o=0;for(let e=0,t=r[e];t;t=r[++e])if(" "===t&&"\\"===r[e+1]&&"n"===r[e+2]&&(s+=r.slice(o,e)+"\\ ",e+=1,o=e,t="\\"),"\\"===t)switch(r[e+1]){case"u":{s+=r.slice(o,e);const t=r.substr(e+2,4);switch(t){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:"00"===t.substr(0,2)?s+="\\x"+t.substr(2):s+=r.substr(e,6)}e+=5,o=e+1}break;case"n":if(n||'"'===r[e+2]||r.length<a)e+=1;else{for(s+=r.slice(o,e)+"\n\n";"\\"===r[e+2]&&"n"===r[e+3]&&'"'!==r[e+4];)s+="\n",e+=2;s+=i," "===r[e+2]&&(s+="\\"),e+=1,o=e+1}break;default:e+=1}return s=o?s+r.slice(o):r,n?s:Z(s,i,"quoted",te(t,!1))}function ae(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return ne(e,t);const r=t.indent||(re(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${r}`)+"'";return t.implicitKey?n:Z(n,r,"flow",te(t,!1))}function ie(e,t){const{singleQuote:r}=t.options;let n;if(!1===r)n=ne;else{const t=e.includes('"'),a=e.includes("'");n=t&&!a?ae:a&&!t?ne:r?ae:ne}return n(e,t)}let se;try{se=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{se=/\n+(?!\n|$)/g}function oe({comment:e,type:t,value:r},n,a,i){const{blockQuote:s,commentString:o,lineWidth:l}=n.options;if(!s||/\n[\t ]+$/.test(r))return ie(r,n);const d=n.indent||(n.forceBlockIndent||re(r)?" ":""),c="literal"===s||"folded"!==s&&t!==W.BLOCK_FOLDED&&(t===W.BLOCK_LITERAL||!function(e,t,r){if(!t||t<0)return!1;const n=t-r,a=e.length;if(a<=n)return!1;for(let t=0,r=0;t<a;++t)if("\n"===e[t]){if(t-r>n)return!0;if(r=t+1,a-r<=n)return!1}return!0}(r,l,d.length));if(!r)return c?"|\n":">\n";let u,m;for(m=r.length;m>0;--m){const e=r[m-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let p=r.substring(m);const h=p.indexOf("\n");-1===h?u="-":r===p||h!==p.length-1?(u="+",i&&i()):u="",p&&(r=r.slice(0,-p.length),"\n"===p[p.length-1]&&(p=p.slice(0,-1)),p=p.replace(se,`$&${d}`));let f,y=!1,T=-1;for(f=0;f<r.length;++f){const e=r[f];if(" "===e)y=!0;else{if("\n"!==e)break;T=f}}let C=r.substring(0,T<f?T+1:f);C&&(r=r.substring(C.length),C=C.replace(/\n+/g,`$&${d}`));let E=(y?d?"2":"1":"")+u;if(e&&(E+=" "+o(e.replace(/ ?[\r\n]+/g," ")),a&&a()),!c){const e=r.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);let a=!1;const i=te(n,!0);"folded"!==s&&t!==W.BLOCK_FOLDED&&(i.onOverflow=()=>{a=!0});const o=Z(`${C}${e}${p}`,d,"block",i);if(!a)return`>${E}\n${d}${o}`}return`|${E}\n${d}${C}${r=r.replace(/\n+/g,`$&${d}`)}${p}`}function le(e,t,r,n){const{implicitKey:a,inFlow:i}=t,s="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:o}=e;o!==W.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(o=W.QUOTE_DOUBLE);const l=e=>{switch(e){case W.BLOCK_FOLDED:case W.BLOCK_LITERAL:return a||i?ie(s.value,t):oe(s,t,r,n);case W.QUOTE_DOUBLE:return ne(s.value,t);case W.QUOTE_SINGLE:return ae(s.value,t);case W.PLAIN:return function(e,t,r,n){const{type:a,value:i}=e,{actualString:s,implicitKey:o,indent:l,indentStep:d,inFlow:c}=t;if(o&&i.includes("\n")||c&&/[[\]{},]/.test(i))return ie(i,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return o||c||!i.includes("\n")?ie(i,t):oe(e,t,r,n);if(!o&&!c&&a!==W.PLAIN&&i.includes("\n"))return oe(e,t,r,n);if(re(i)){if(""===l)return t.forceBlockIndent=!0,oe(e,t,r,n);if(o&&l===d)return ie(i,t)}const u=i.replace(/\n+/g,`$&\n${l}`);if(s){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(u),{compat:r,tags:n}=t.doc.schema;if(n.some(e)||r?.some(e))return ie(i,t)}return o?u:Z(u,l,"flow",te(t,!1))}(s,t,r,n);default:return null}};let d=l(o);if(null===d){const{defaultKeyType:e,defaultStringType:r}=t.options,n=a&&e||r;if(d=l(n),null===d)throw new Error(`Unsupported default string type ${n}`)}return d}function de(e,t){const r=Object.assign({blockQuote:!0,commentString:G,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:n,options:r}}function ce(e,t,r,n){if(f(e))return e.toString(t,r,n);if(m(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let a;const i=E(e)?e:t.doc.createNode(e,{onTagObj:e=>a=e});a??(a=function(e,t){if(t.tag){const r=e.filter(e=>e.tag===t.tag);if(r.length>0)return r.find(e=>e.format===t.format)??r[0]}let r,n;if(y(t)){n=t.value;let a=e.filter(e=>e.identify?.(n));if(a.length>1){const e=a.filter(e=>e.test);e.length>0&&(a=e)}r=a.find(e=>e.format===t.format)??a.find(e=>!e.format)}else n=t,r=e.find(e=>e.nodeClass&&n instanceof e.nodeClass);if(!r)throw new Error(`Tag not resolved for ${n?.constructor?.name??(null===n?"null":typeof n)} value`);return r}(t.doc.schema.tags,i));const s=function(e,t,{anchors:r,doc:n}){if(!n.directives)return"";const a=[],i=(y(e)||C(e))&&e.anchor;i&&D(i)&&(r.add(i),a.push(`&${i}`));const s=e.tag??(t.default?null:t.tag);return s&&a.push(n.directives.tagString(s)),a.join(" ")}(i,a,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);const o="function"==typeof a.stringify?a.stringify(i,t,r,n):y(i)?le(i,t,r,n):i.toString(t,r,n);return s?y(i)||"{"===o[0]||"["===o[0]?`${s} ${o}`:`${s}\n${t.indent}${o}`:o}function ue(e,t){"debug"!==e&&"warn"!==e||console.warn(t)}const me="<<",pe={identify:e=>e===me||"symbol"==typeof e&&e.description===me,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new W(Symbol(me)),{addToJSMap:he}),stringify:()=>me};function he(e,t,r){const n=ye(e,r);if(T(n))for(const r of n.items)fe(e,t,r);else if(Array.isArray(n))for(const r of n)fe(e,t,r);else fe(e,t,n)}function fe(e,t,r){const n=ye(e,r);if(!h(n))throw new Error("Merge sources must be maps or map aliases");const a=n.toJSON(null,e,Map);for(const[e,r]of a)t instanceof Map?t.has(e)||t.set(e,r):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0});return t}function ye(e,t){return e&&m(t)?t.resolve(e.doc,e):t}function Te(e,t,{key:r,value:n}){if(E(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(((e,t)=>(pe.identify(t)||y(t)&&(!t.type||t.type===W.PLAIN)&&pe.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===pe.tag&&e.default))(e,r))he(e,t,n);else{const a=Y(r,"",e);if(t instanceof Map)t.set(a,Y(n,a,e));else if(t instanceof Set)t.add(a);else{const i=function(e,t,r){if(null===t)return"";if("object"!=typeof t)return String(t);if(E(e)&&r?.doc){const t=de(r.doc,{});t.anchors=new Set;for(const e of r.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const n=e.toString(t);if(!r.mapKeyWarned){let e=JSON.stringify(n);e.length>40&&(e=e.substring(0,36)+'..."'),ue(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(t)}(r,a,e),s=Y(n,i,e);i in t?Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[i]=s}}return t}function Ce(e,t,r){const n=K(e,void 0,r),a=K(t,void 0,r);return new Ee(n,a)}class Ee{constructor(e,t=null){Object.defineProperty(this,u,{value:l}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return E(t)&&(t=t.clone(e)),E(r)&&(r=r.clone(e)),new Ee(t,r)}toJSON(e,t){return Te(t,t?.mapAsMap?new Map:{},this)}toString(e,t,r){return e?.doc?function({key:e,value:t},r,n,a){const{allNullValues:i,doc:s,indent:o,indentStep:l,options:{commentString:d,indentSeq:c,simpleKeys:u}}=r;let m=E(e)&&e.comment||null;if(u){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(C(e)||!E(e)&&"object"==typeof e)throw new Error("With simple keys, collection cannot be used as a key value")}let p=!u&&(!e||m&&null==t&&!r.inFlow||C(e)||(y(e)?e.type===W.BLOCK_FOLDED||e.type===W.BLOCK_LITERAL:"object"==typeof e));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(u||!i),indent:o+l});let h,f,g,I=!1,A=!1,b=ce(e,r,()=>I=!0,()=>A=!0);if(!p&&!r.inFlow&&b.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(r.inFlow){if(i||null==t)return I&&n&&n(),""===b?"?":p?`? ${b}`:b}else if(i&&!u||null==t&&p)return b=`? ${b}`,m&&!I?b+=H(b,r.indent,d(m)):A&&a&&a(),b;I&&(m=null),p?(m&&(b+=H(b,r.indent,d(m))),b=`? ${b}\n${o}:`):(b=`${b}:`,m&&(b+=H(b,r.indent,d(m)))),E(t)?(h=!!t.spaceBefore,f=t.commentBefore,g=t.comment):(h=!1,f=null,g=null,t&&"object"==typeof t&&(t=s.createNode(t))),r.implicitKey=!1,p||m||!y(t)||(r.indentAtStart=b.length+1),A=!1,c||!(l.length>=2)||r.inFlow||p||!T(t)||t.flow||t.tag||t.anchor||(r.indent=r.indent.substring(2));let R=!1;const S=ce(t,r,()=>R=!0,()=>A=!0);let v=" ";if(m||h||f)v=h?"\n":"",f&&(v+=`\n${q(d(f),r.indent)}`),""!==S||r.inFlow?v+=`\n${r.indent}`:"\n"===v&&g&&(v="\n\n");else if(!p&&C(t)){const e=S[0],n=S.indexOf("\n"),a=-1!==n,i=r.inFlow??t.flow??0===t.items.length;if(a||!i){let t=!1;if(a&&("&"===e||"!"===e)){let r=S.indexOf(" ");"&"===e&&-1!==r&&r<n&&"!"===S[r+1]&&(r=S.indexOf(" ",r+1)),(-1===r||n<r)&&(t=!0)}t||(v=`\n${r.indent}`)}}else""!==S&&"\n"!==S[0]||(v="");return b+=v+S,r.inFlow?R&&n&&n():g&&!R?b+=H(b,r.indent,d(g)):A&&a&&a(),b}(this,e,t,r):JSON.stringify(this)}}function ge(e,t,r){return(t.inFlow??e.flow?Ae:Ie)(e,t,r)}function Ie({comment:e,items:t},r,{blockItemPrefix:n,flowChars:a,itemIndent:i,onChompKeep:s,onComment:o}){const{indent:l,options:{commentString:d}}=r,c=Object.assign({},r,{indent:i,type:null});let u=!1;const m=[];for(let e=0;e<t.length;++e){const a=t[e];let s=null;if(E(a))!u&&a.spaceBefore&&m.push(""),be(r,m,a.commentBefore,u),a.comment&&(s=a.comment);else if(f(a)){const e=E(a.key)?a.key:null;e&&(!u&&e.spaceBefore&&m.push(""),be(r,m,e.commentBefore,u))}u=!1;let o=ce(a,c,()=>s=null,()=>u=!0);s&&(o+=H(o,i,d(s))),u&&s&&(u=!1),m.push(n+o)}let p;if(0===m.length)p=a.start+a.end;else{p=m[0];for(let e=1;e<m.length;++e){const t=m[e];p+=t?`\n${l}${t}`:"\n"}}return e?(p+="\n"+q(d(e),l),o&&o()):u&&s&&s(),p}function Ae({items:e},t,{flowChars:r,itemIndent:n}){const{indent:a,indentStep:i,flowCollectionPadding:s,options:{commentString:o}}=t;n+=i;const l=Object.assign({},t,{indent:n,inFlow:!0,type:null});let d=!1,c=0;const u=[];for(let r=0;r<e.length;++r){const a=e[r];let i=null;if(E(a))a.spaceBefore&&u.push(""),be(t,u,a.commentBefore,!1),a.comment&&(i=a.comment);else if(f(a)){const e=E(a.key)?a.key:null;e&&(e.spaceBefore&&u.push(""),be(t,u,e.commentBefore,!1),e.comment&&(d=!0));const r=E(a.value)?a.value:null;r?(r.comment&&(i=r.comment),r.commentBefore&&(d=!0)):null==a.value&&e?.comment&&(i=e.comment)}i&&(d=!0);let s=ce(a,l,()=>i=null);d||(d=u.length>c||s.includes("\n")),r<e.length-1?s+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(d||(d=u.reduce((e,t)=>e+t.length+2,2)+(s.length+2)>t.options.lineWidth)),d&&(s+=",")),i&&(s+=H(s,n,o(i))),u.push(s),c=u.length}const{start:m,end:p}=r;if(0===u.length)return m+p;if(!d){const e=u.reduce((e,t)=>e+t.length+2,2);d=t.options.lineWidth>0&&e>t.options.lineWidth}if(d){let e=m;for(const t of u)e+=t?`\n${i}${a}${t}`:"\n";return`${e}\n${a}${p}`}return`${m}${s}${u.join(" ")}${s}${p}`}function be({indent:e,options:{commentString:t}},r,n,a){if(n&&a&&(n=n.replace(/^\n+/,"")),n){const a=q(t(n),e);r.push(a.trimStart())}}function Re(e,t){const r=y(t)?t.value:t;for(const n of e)if(f(n)){if(n.key===t||n.key===r)return n;if(y(n.key)&&n.key.value===r)return n}}class Se extends X{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(o,e),this.items=[]}static from(e,t,r){const{keepUndefined:n,replacer:a}=r,i=new this(e),s=(e,s)=>{if("function"==typeof a)s=a.call(t,e,s);else if(Array.isArray(a)&&!a.includes(e))return;(void 0!==s||n)&&i.items.push(Ce(e,s,r))};if(t instanceof Map)for(const[e,r]of t)s(e,r);else if(t&&"object"==typeof t)for(const e of Object.keys(t))s(e,t[e]);return"function"==typeof e.sortMapEntries&&i.items.sort(e.sortMapEntries),i}add(e,t){let r;r=f(e)?e:e&&"object"==typeof e&&"key"in e?new Ee(e.key,e.value):new Ee(e,e?.value);const n=Re(this.items,r.key),a=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${r.key} already set`);y(n.value)&&k(r.value)?n.value.value=r.value:n.value=r.value}else if(a){const e=this.items.findIndex(e=>a(r,e)<0);-1===e?this.items.push(r):this.items.splice(e,0,r)}else this.items.push(r)}delete(e){const t=Re(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const r=Re(this.items,e),n=r?.value;return(!t&&y(n)?n.value:n)??void 0}has(e){return!!Re(this.items,e)}set(e,t){this.add(new Ee(e,t),!0)}toJSON(e,t,r){const n=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(n);for(const e of this.items)Te(t,n,e);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const e of this.items)if(!f(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ge(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}const ve={collection:"map",default:!0,nodeClass:Se,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(h(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,r)=>Se.from(e,t,r)};class _e extends X{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(c,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Ne(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const r=Ne(e);if("number"!=typeof r)return;const n=this.items[r];return!t&&y(n)?n.value:n}has(e){const t=Ne(e);return"number"==typeof t&&t<this.items.length}set(e,t){const r=Ne(e);if("number"!=typeof r)throw new Error(`Expected a valid index, not ${e}.`);const n=this.items[r];y(n)&&k(t)?n.value=t:this.items[r]=t}toJSON(e,t){const r=[];t?.onCreate&&t.onCreate(r);let n=0;for(const e of this.items)r.push(Y(e,String(n++),t));return r}toString(e,t,r){return e?ge(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){const{replacer:n}=r,a=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let i of t){if("function"==typeof n){const r=t instanceof Set?i:String(e++);i=n.call(t,r,i)}a.items.push(K(i,void 0,r))}}return a}}function Ne(e){let t=y(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}const we={collection:"seq",default:!0,nodeClass:_e,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(T(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,r)=>_e.from(e,t,r)},Le={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,r,n)=>le(e,t=Object.assign({actualString:!0},t),r,n)},Fe={identify:e=>null==e,createNode:()=>new W(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new W(null),stringify:({source:e},t)=>"string"==typeof e&&Fe.test.test(e)?e:t.options.nullStr},Ve={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new W("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},r)=>e&&Ve.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?r.options.trueStr:r.options.falseStr};function Oe({format:e,minFractionDigits:t,tag:r,value:n}){if("bigint"==typeof n)return String(n);const a="number"==typeof n?n:Number(n);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let i=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||"tag:yaml.org,2002:float"===r)&&/^-?\d/.test(i)&&!i.includes("e")){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let r=t-(i.length-e-1);for(;r-- >0;)i+="0"}return i}const De={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Oe},Me={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Oe(e)}},Be={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new W(parseFloat(e)),r=e.indexOf(".");return-1!==r&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-r-1),t},stringify:Oe},Ue=e=>"bigint"==typeof e||Number.isInteger(e),Ye=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function xe(e,t,r){const{value:n}=e;return Ue(n)&&n>=0?r+n.toString(t):Oe(e)}const Je={identify:e=>Ue(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>Ye(e,2,8,r),stringify:e=>xe(e,8,"0o")},Pe={identify:Ue,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>Ye(e,0,10,r),stringify:Oe},ke={identify:e=>Ue(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>Ye(e,2,16,r),stringify:e=>xe(e,16,"0x")},We=[ve,we,Le,Fe,Ve,Je,Pe,ke,De,Me,Be];function Ke(e){return"bigint"==typeof e||Number.isInteger(e)}const je=({value:e})=>JSON.stringify(e),$e=[ve,we].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:je},{identify:e=>null==e,createNode:()=>new W(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:je},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:je},{identify:Ke,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>Ke(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:je}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),Xe={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let e=0;e<t.length;++e)r[e]=t.charCodeAt(e);return r}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},n,a,i){if(!r)return"";const s=r;let o;if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<s.length;++t)e+=String.fromCharCode(s[t]);o=btoa(e)}if(t??(t=W.BLOCK_LITERAL),t!==W.QUOTE_DOUBLE){const e=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),r=Math.ceil(o.length/e),a=new Array(r);for(let t=0,n=0;t<r;++t,n+=e)a[t]=o.substr(n,e);o=a.join(t===W.BLOCK_LITERAL?"\n":" ")}return le({comment:e,type:t,value:o},n,a,i)}};function Ge(e,t){if(T(e))for(let r=0;r<e.items.length;++r){let n=e.items[r];if(!f(n)){if(h(n)){n.items.length>1&&t("Each pair must have its own sequence indicator");const e=n.items[0]||new Ee(new W(null));if(n.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${n.commentBefore}\n${e.key.commentBefore}`:n.commentBefore),n.comment){const t=e.value??e.key;t.comment=t.comment?`${n.comment}\n${t.comment}`:n.comment}n=e}e.items[r]=f(n)?n:new Ee(n)}}else t("Expected a sequence for this tag");return e}function qe(e,t,r){const{replacer:n}=r,a=new _e(e);a.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let s,o;if("function"==typeof n&&(e=n.call(t,String(i++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);s=e[0],o=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);s=t[0],o=e[s]}else s=e;a.items.push(Ce(s,o,r))}return a}const He={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ge,createNode:qe};class ze extends _e{constructor(){super(),this.add=Se.prototype.add.bind(this),this.delete=Se.prototype.delete.bind(this),this.get=Se.prototype.get.bind(this),this.has=Se.prototype.has.bind(this),this.set=Se.prototype.set.bind(this),this.tag=ze.tag}toJSON(e,t){if(!t)return super.toJSON(e);const r=new Map;t?.onCreate&&t.onCreate(r);for(const e of this.items){let n,a;if(f(e)?(n=Y(e.key,"",t),a=Y(e.value,n,t)):n=Y(e,"",t),r.has(n))throw new Error("Ordered maps must not include duplicate keys");r.set(n,a)}return r}static from(e,t,r){const n=qe(e,t,r),a=new this;return a.items=n.items,a}}ze.tag="tag:yaml.org,2002:omap";const Qe={collection:"seq",identify:e=>e instanceof Map,nodeClass:ze,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=Ge(e,t),n=[];for(const{key:e}of r.items)y(e)&&(n.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):n.push(e.value));return Object.assign(new ze,r)},createNode:(e,t,r)=>ze.from(e,t,r)};function Ze({value:e,source:t},r){return t&&(e?et:tt).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}const et={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new W(!0),stringify:Ze},tt={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new W(!1),stringify:Ze},rt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Oe},nt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Oe(e)}},at={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new W(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(-1!==r){const n=e.substring(r+1).replace(/_/g,"");"0"===n[n.length-1]&&(t.minFractionDigits=n.length)}return t},stringify:Oe},it=e=>"bigint"==typeof e||Number.isInteger(e);function st(e,t,r,{intAsBigInt:n}){const a=e[0];if("-"!==a&&"+"!==a||(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===a?BigInt(-1)*t:t}const i=parseInt(e,r);return"-"===a?-1*i:i}function ot(e,t,r){const{value:n}=e;if(it(n)){const e=n.toString(t);return n<0?"-"+r+e.substr(1):r+e}return Oe(e)}const lt={identify:it,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>st(e,2,2,r),stringify:e=>ot(e,2,"0b")},dt={identify:it,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>st(e,1,8,r),stringify:e=>ot(e,8,"0")},ct={identify:it,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>st(e,0,10,r),stringify:Oe},ut={identify:it,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>st(e,2,16,r),stringify:e=>ot(e,16,"0x")};class mt extends Se{constructor(e){super(e),this.tag=mt.tag}add(e){let t;t=f(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new Ee(e.key,null):new Ee(e,null),Re(this.items,t.key)||this.items.push(t)}get(e,t){const r=Re(this.items,e);return!t&&f(r)?y(r.key)?r.key.value:r.key:r}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const r=Re(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new Ee(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){const{replacer:n}=r,a=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof n&&(e=n.call(t,e,e)),a.items.push(Ce(e,null,r));return a}}mt.tag="tag:yaml.org,2002:set";const pt={collection:"map",identify:e=>e instanceof Set,nodeClass:mt,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>mt.from(e,t,r),resolve(e,t){if(h(e)){if(e.hasAllNullValues(!0))return Object.assign(new mt,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function ht(e,t){const r=e[0],n="-"===r||"+"===r?e.substring(1):e,a=e=>t?BigInt(e):Number(e),i=n.replace(/_/g,"").split(":").reduce((e,t)=>e*a(60)+a(t),a(0));return"-"===r?a(-1)*i:i}function ft(e){let{value:t}=e,r=e=>e;if("bigint"==typeof t)r=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Oe(e);let n="";t<0&&(n="-",t*=r(-1));const a=r(60),i=[t%a];return t<60?i.unshift(0):(t=(t-i[0])/a,i.unshift(t%a),t>=60&&(t=(t-i[0])/a,i.unshift(t))),n+i.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const yt={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>ht(e,r),stringify:ft},Tt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>ht(e,!1),stringify:ft},Ct={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(Ct.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,a,i,s,o]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0;let d=Date.UTC(r,n-1,a,i||0,s||0,o||0,l);const c=t[8];if(c&&"Z"!==c){let e=ht(c,!1);Math.abs(e)<30&&(e*=60),d-=6e4*e}return new Date(d)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},Et=[ve,we,Le,Fe,et,tt,lt,dt,ct,ut,rt,nt,at,Xe,pe,Qe,He,pt,yt,Tt,Ct],gt=new Map([["core",We],["failsafe",[ve,we,Le]],["json",$e],["yaml11",Et],["yaml-1.1",Et]]),It={binary:Xe,bool:Ve,float:Be,floatExp:Me,floatNaN:De,floatTime:Tt,int:Pe,intHex:ke,intOct:Je,intTime:yt,map:ve,merge:pe,null:Fe,omap:Qe,pairs:He,seq:we,set:pt,timestamp:Ct},At={"tag:yaml.org,2002:binary":Xe,"tag:yaml.org,2002:merge":pe,"tag:yaml.org,2002:omap":Qe,"tag:yaml.org,2002:pairs":He,"tag:yaml.org,2002:set":pt,"tag:yaml.org,2002:timestamp":Ct};function bt(e,t,r){const n=gt.get(t);if(n&&!e)return r&&!n.includes(pe)?n.concat(pe):n.slice();let a=n;if(!a){if(!Array.isArray(e)){const e=Array.from(gt.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}a=[]}if(Array.isArray(e))for(const t of e)a=a.concat(t);else"function"==typeof e&&(a=e(a.slice()));return r&&(a=a.concat(pe)),a.reduce((e,t)=>{const r="string"==typeof t?It[t]:t;if(!r){const e=JSON.stringify(t),r=Object.keys(It).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${r}`)}return e.includes(r)||e.push(r),e},[])}const Rt=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class St{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:a,sortMapEntries:i,toStringDefaults:s}){this.compat=Array.isArray(e)?bt(e,"compat"):e?bt(null,e):null,this.name="string"==typeof a&&a||"core",this.knownTags=n?At:{},this.tags=bt(t,this.name,r),this.toStringOptions=s??null,Object.defineProperty(this,o,{value:ve}),Object.defineProperty(this,d,{value:Le}),Object.defineProperty(this,c,{value:we}),this.sortMapEntries="function"==typeof i?i:!0===i?Rt:null}clone(){const e=Object.create(St.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class vt{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,u,{value:s});let n=null;"function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t,t=void 0);const a=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=a;let{version:i}=a;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(i=this.directives.yaml.version)):this.directives=new O({version:i}),this.setSchema(i,r),this.contents=void 0===e?null:this.createNode(e,n,r)}clone(){const e=Object.create(vt.prototype,{[u]:{value:s}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=E(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){_t(this.contents)&&this.contents.add(e)}addIn(e,t){_t(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const r=M(this);e.anchor=!t||r.has(t)?B(t||"a",r):t}return new J(e.anchor)}createNode(e,t,r){let n;if("function"==typeof t)e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,r=t.filter(e).map(String);r.length>0&&(t=t.concat(r)),n=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:a,anchorPrefix:i,flow:s,keepUndefined:o,onTagObj:l,tag:d}=r??{},{onAnchor:c,setAnchors:u,sourceObjects:m}=function(e,t){const r=[],n=new Map;let a=null;return{onAnchor:n=>{r.push(n),a??(a=M(e));const i=B(t,a);return a.add(i),i},setAnchors:()=>{for(const e of r){const t=n.get(e);if("object"!=typeof t||!t.anchor||!y(t.node)&&!C(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:n}}(this,i||"a"),p=K(e,d,{aliasDuplicateObjects:a??!0,keepUndefined:o??!1,onAnchor:c,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:m});return s&&C(p)&&(p.flow=!0),u(),p}createPair(e,t,r={}){const n=this.createNode(e,null,r),a=this.createNode(t,null,r);return new Ee(n,a)}delete(e){return!!_t(this.contents)&&this.contents.delete(e)}deleteIn(e){return $(e)?null!=this.contents&&(this.contents=null,!0):!!_t(this.contents)&&this.contents.deleteIn(e)}get(e,t){return C(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return $(e)?!t&&y(this.contents)?this.contents.value:this.contents:C(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!C(this.contents)&&this.contents.has(e)}hasIn(e){return $(e)?void 0!==this.contents:!!C(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=j(this.schema,[e],t):_t(this.contents)&&this.contents.set(e,t)}setIn(e,t){$(e)?this.contents=t:null==this.contents?this.contents=j(this.schema,Array.from(e),t):_t(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let r;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new O({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new O({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!r)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new St(Object.assign(r,t))}}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:a,reviver:i}={}){const s={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===r,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},o=Y(this.contents,t??"",s);if("function"==typeof a)for(const{count:e,res:t}of s.anchors.values())a(t,e);return"function"==typeof i?U(i,{"":o},"",o):o}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){const r=[];let n=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(r.push(t),n=!0):e.directives.docStart&&(n=!0)}n&&r.push("---");const a=de(e,t),{commentString:i}=a.options;if(e.commentBefore){1!==r.length&&r.unshift("");const t=i(e.commentBefore);r.unshift(q(t,""))}let s=!1,o=null;if(e.contents){if(E(e.contents)){if(e.contents.spaceBefore&&n&&r.push(""),e.contents.commentBefore){const t=i(e.contents.commentBefore);r.push(q(t,""))}a.forceBlockIndent=!!e.comment,o=e.contents.comment}const t=o?void 0:()=>s=!0;let l=ce(e.contents,a,()=>o=null,t);o&&(l+=H(l,"",i(o))),"|"!==l[0]&&">"!==l[0]||"---"!==r[r.length-1]?r.push(l):r[r.length-1]=`--- ${l}`}else r.push(ce(e.contents,a));if(e.directives?.docEnd)if(e.comment){const t=i(e.comment);t.includes("\n")?(r.push("..."),r.push(q(t,""))):r.push(`... ${t}`)}else r.push("...");else{let t=e.comment;t&&s&&(t=t.replace(/^\n+/,"")),t&&(s&&!o||""===r[r.length-1]||r.push(""),r.push(q(i(t),"")))}return r.join("\n")+"\n"}(this,e)}}function _t(e){if(C(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Nt extends Error{constructor(e,t,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=t}}class wt extends Nt{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class Lt extends Nt{constructor(e,t,r){super("YAMLWarning",e,t,r)}}const Ft=(e,t)=>r=>{if(-1===r.pos[0])return;r.linePos=r.pos.map(e=>t.linePos(e));const{line:n,col:a}=r.linePos[0];r.message+=` at line ${n}, column ${a}`;let i=a-1,s=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(i>=60&&s.length>80){const e=Math.min(i-39,s.length-79);s="…"+s.substring(e),i-=e-1}if(s.length>80&&(s=s.substring(0,79)+"…"),n>1&&/^ *$/.test(s.substring(0,i))){let r=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);r.length>80&&(r=r.substring(0,79)+"…\n"),s=r+s}if(/[^ ]/.test(s)){let e=1;const t=r.linePos[1];t?.line===n&&t.col>a&&(e=Math.max(1,Math.min(t.col-a,80-i)));const o=" ".repeat(i)+"^".repeat(e);r.message+=`:\n\n${s}\n${o}\n`}};function Vt(e,{flow:t,indicator:r,next:n,offset:a,onError:i,parentIndent:s,startOnNewline:o}){let l=!1,d=o,c=o,u="",m="",p=!1,h=!1,f=null,y=null,T=null,C=null,E=null,g=null,I=null;for(const a of e)switch(h&&("space"!==a.type&&"newline"!==a.type&&"comma"!==a.type&&i(a.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),f&&(d&&"comment"!==a.type&&"newline"!==a.type&&i(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),f=null),a.type){case"space":t||"doc-start"===r&&"flow-collection"===n?.type||!a.source.includes("\t")||(f=a),c=!0;break;case"comment":{c||i(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=a.source.substring(1)||" ";u?u+=m+e:u=e,m="",d=!1;break}case"newline":d?u?u+=a.source:g&&"seq-item-ind"===r||(l=!0):m+=a.source,d=!0,p=!0,(y||T)&&(C=a),c=!0;break;case"anchor":y&&i(a,"MULTIPLE_ANCHORS","A node can have at most one anchor"),a.source.endsWith(":")&&i(a.offset+a.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=a,I??(I=a.offset),d=!1,c=!1,h=!0;break;case"tag":T&&i(a,"MULTIPLE_TAGS","A node can have at most one tag"),T=a,I??(I=a.offset),d=!1,c=!1,h=!0;break;case r:(y||T)&&i(a,"BAD_PROP_ORDER",`Anchors and tags must be after the ${a.source} indicator`),g&&i(a,"UNEXPECTED_TOKEN",`Unexpected ${a.source} in ${t??"collection"}`),g=a,d="seq-item-ind"===r||"explicit-key-ind"===r,c=!1;break;case"comma":if(t){E&&i(a,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),E=a,d=!1,c=!1;break}default:i(a,"UNEXPECTED_TOKEN",`Unexpected ${a.type} token`),d=!1,c=!1}const A=e[e.length-1],b=A?A.offset+A.source.length:a;return h&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&i(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f&&(d&&f.indent<=s||"block-map"===n?.type||"block-seq"===n?.type)&&i(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:E,found:g,spaceBefore:l,comment:u,hasNewline:p,anchor:y,tag:T,newlineAfterProp:C,end:b,start:I??b}}function Ot(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end)for(const t of e.end)if("newline"===t.type)return!0;return!1;case"flow-collection":for(const t of e.items){for(const e of t.start)if("newline"===e.type)return!0;if(t.sep)for(const e of t.sep)if("newline"===e.type)return!0;if(Ot(t.key)||Ot(t.value))return!0}return!1;default:return!0}}function Dt(e,t,r){if("flow-collection"===t?.type){const n=t.end[0];n.indent!==e||"]"!==n.source&&"}"!==n.source||!Ot(t)||r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Mt(e,t,r){const{uniqueKeys:n}=e.options;if(!1===n)return!1;const a="function"==typeof n?n:(e,t)=>e===t||y(e)&&y(t)&&e.value===t.value;return t.some(e=>a(e.key,r))}const Bt="All mapping items must start at the same column";function Ut(e,t,r,n){let a="";if(e){let i=!1,s="";for(const o of e){const{source:e,type:l}=o;switch(l){case"space":i=!0;break;case"comment":{r&&!i&&n(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";a?a+=s+t:a=t,s="";break}case"newline":a&&(s+=e),i=!0;break;default:n(o,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:a,offset:t}}const Yt="Block collections are not allowed within flow collections",xt=e=>e&&("block-map"===e.type||"block-seq"===e.type);function Jt(e,t,r,n,a,i){const s="block-map"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,a,i){const s=new(i?.nodeClass??Se)(r.schema);r.atRoot&&(r.atRoot=!1);let o=n.offset,l=null;for(const i of n.items){const{start:d,key:c,sep:u,value:m}=i,p=Vt(d,{indicator:"explicit-key-ind",next:c??u?.[0],offset:o,onError:a,parentIndent:n.indent,startOnNewline:!0}),h=!p.found;if(h){if(c&&("block-seq"===c.type?a(o,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in c&&c.indent!==n.indent&&a(o,"BAD_INDENT",Bt)),!p.anchor&&!p.tag&&!u){l=p.end,p.comment&&(s.comment?s.comment+="\n"+p.comment:s.comment=p.comment);continue}(p.newlineAfterProp||Ot(c))&&a(c??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else p.found?.indent!==n.indent&&a(o,"BAD_INDENT",Bt);r.atKey=!0;const f=p.end,y=c?e(r,c,p,a):t(r,f,d,null,p,a);r.schema.compat&&Dt(n.indent,c,a),r.atKey=!1,Mt(r,s.items,y)&&a(f,"DUPLICATE_KEY","Map keys must be unique");const T=Vt(u??[],{indicator:"map-value-ind",next:m,offset:y.range[2],onError:a,parentIndent:n.indent,startOnNewline:!c||"block-scalar"===c.type});if(o=T.end,T.found){h&&("block-map"!==m?.type||T.hasNewline||a(o,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&p.start<T.found.offset-1024&&a(y.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const l=m?e(r,m,T,a):t(r,o,u,null,T,a);r.schema.compat&&Dt(n.indent,m,a),o=l.range[2];const d=new Ee(y,l);r.options.keepSourceTokens&&(d.srcToken=i),s.items.push(d)}else{h&&a(y.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),T.comment&&(y.comment?y.comment+="\n"+T.comment:y.comment=T.comment);const e=new Ee(y);r.options.keepSourceTokens&&(e.srcToken=i),s.items.push(e)}}return l&&l<o&&a(l,"IMPOSSIBLE","Map comment with trailing content"),s.range=[n.offset,o,l??o],s}(e,t,r,n,i):"block-seq"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,a,i){const s=new(i?.nodeClass??_e)(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let o=n.offset,l=null;for(const{start:i,value:d}of n.items){const c=Vt(i,{indicator:"seq-item-ind",next:d,offset:o,onError:a,parentIndent:n.indent,startOnNewline:!0});if(!c.found){if(!(c.anchor||c.tag||d)){l=c.end,c.comment&&(s.comment=c.comment);continue}"block-seq"===d?.type?a(c.end,"BAD_INDENT","All sequence items must start at the same column"):a(o,"MISSING_CHAR","Sequence item without - indicator")}const u=d?e(r,d,c,a):t(r,c.end,i,null,c,a);r.schema.compat&&Dt(n.indent,d,a),o=u.range[2],s.items.push(u)}return s.range=[n.offset,o,l??o],s}(e,t,r,n,i):function({composeNode:e,composeEmptyNode:t},r,n,a,i){const s="{"===n.start.source,o=s?"flow map":"flow sequence",l=new(i?.nodeClass??(s?Se:_e))(r.schema);l.flow=!0;const d=r.atRoot;d&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let c=n.offset+n.start.source.length;for(let i=0;i<n.items.length;++i){const d=n.items[i],{start:u,key:m,sep:p,value:h}=d,y=Vt(u,{flow:o,indicator:"explicit-key-ind",next:m??p?.[0],offset:c,onError:a,parentIndent:n.indent,startOnNewline:!1});if(!y.found){if(!(y.anchor||y.tag||p||h)){0===i&&y.comma?a(y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):i<n.items.length-1&&a(y.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),y.comment&&(l.comment?l.comment+="\n"+y.comment:l.comment=y.comment),c=y.end;continue}!s&&r.options.strict&&Ot(m)&&a(m,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===i)y.comma&&a(y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(y.comma||a(y.start,"MISSING_CHAR",`Missing , between ${o} items`),y.comment){let e="";e:for(const t of u)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=l.items[l.items.length-1];f(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,y.comment=y.comment.substring(e.length+1)}}if(s||p||y.found){r.atKey=!0;const i=y.end,f=m?e(r,m,y,a):t(r,i,u,null,y,a);xt(m)&&a(f.range,"BLOCK_IN_FLOW",Yt),r.atKey=!1;const T=Vt(p??[],{flow:o,indicator:"map-value-ind",next:h,offset:f.range[2],onError:a,parentIndent:n.indent,startOnNewline:!1});if(T.found){if(!s&&!y.found&&r.options.strict){if(p)for(const e of p){if(e===T.found)break;if("newline"===e.type){a(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}y.start<T.found.offset-1024&&a(T.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else h&&("source"in h&&":"===h.source?.[0]?a(h,"MISSING_CHAR",`Missing space after : in ${o}`):a(T.start,"MISSING_CHAR",`Missing , or : between ${o} items`));const C=h?e(r,h,T,a):T.found?t(r,T.end,p,null,T,a):null;C?xt(h)&&a(C.range,"BLOCK_IN_FLOW",Yt):T.comment&&(f.comment?f.comment+="\n"+T.comment:f.comment=T.comment);const E=new Ee(f,C);if(r.options.keepSourceTokens&&(E.srcToken=d),s){const e=l;Mt(r,e.items,f)&&a(i,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(E)}else{const e=new Se(r.schema);e.flow=!0,e.items.push(E);const t=(C??f).range;e.range=[f.range[0],t[1],t[2]],l.items.push(e)}c=C?C.range[2]:T.end}else{const n=h?e(r,h,y,a):t(r,y.end,p,null,y,a);l.items.push(n),c=n.range[2],xt(h)&&a(n.range,"BLOCK_IN_FLOW",Yt)}}const u=s?"}":"]",[m,...p]=n.end;let h=c;if(m?.source===u)h=m.offset+m.source.length;else{const e=o[0].toUpperCase()+o.substring(1);a(c,d?"MISSING_CHAR":"BAD_INDENT",d?`${e} must end with a ${u}`:`${e} in block collection must be sufficiently indented and end with a ${u}`),m&&1!==m.source.length&&p.unshift(m)}if(p.length>0){const e=Ut(p,h,r.options.strict,a);e.comment&&(l.comment?l.comment+="\n"+e.comment:l.comment=e.comment),l.range=[n.offset,h,e.offset]}else l.range=[n.offset,h,h];return l}(e,t,r,n,i),o=s.constructor;return"!"===a||a===o.tagName?(s.tag=o.tagName,s):(a&&(s.tag=a),s)}function Pt(e,t,r){const n=t.offset,a=function({offset:e,props:t},r,n){if("block-scalar-header"!==t[0].type)return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:a}=t[0],i=a[0];let s=0,o="",l=-1;for(let t=1;t<a.length;++t){const r=a[t];if(o||"-"!==r&&"+"!==r){const n=Number(r);!s&&n?s=n:-1===l&&(l=e+t)}else o=r}-1!==l&&n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let d=!1,c="",u=a.length;for(let e=1;e<t.length;++e){const a=t[e];switch(a.type){case"space":d=!0;case"newline":u+=a.source.length;break;case"comment":r&&!d&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=a.source.length,c=a.source.substring(1);break;case"error":n(a,"UNEXPECTED_TOKEN",a.message),u+=a.source.length;break;default:{n(a,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${a.type}`);const e=a.source;e&&"string"==typeof e&&(u+=e.length)}}}return{mode:i,indent:s,chomp:o,comment:c,length:u}}(t,e.options.strict,r);if(!a)return{value:"",type:null,comment:"",range:[n,n,n]};const i=">"===a.mode?W.BLOCK_FOLDED:W.BLOCK_LITERAL,s=t.source?function(e){const t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),a=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let e=1;e<t.length;e+=2)a.push([t[e],t[e+1]]);return a}(t.source):[];let o=s.length;for(let e=s.length-1;e>=0;--e){const t=s[e][1];if(""!==t&&"\r"!==t)break;o=e}if(0===o){const e="+"===a.chomp&&s.length>0?"\n".repeat(Math.max(1,s.length-1)):"";let r=n+a.length;return t.source&&(r+=t.source.length),{value:e,type:i,comment:a.comment,range:[n,r,r]}}let l=t.indent+a.indent,d=t.offset+a.length,c=0;for(let t=0;t<o;++t){const[n,i]=s[t];if(""!==i&&"\r"!==i){if(n.length<l){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(d+n.length,"MISSING_CHAR",e)}0===a.indent&&(l=n.length),c=t,0!==l||e.atRoot||r(d,"BAD_INDENT","Block scalar values in collections must be indented");break}0===a.indent&&n.length>l&&(l=n.length),d+=n.length+i.length+1}for(let e=s.length-1;e>=o;--e)s[e][0].length>l&&(o=e+1);let u="",m="",p=!1;for(let e=0;e<c;++e)u+=s[e][0].slice(l)+"\n";for(let e=c;e<o;++e){let[t,n]=s[e];d+=t.length+n.length+1;const o="\r"===n[n.length-1];if(o&&(n=n.slice(0,-1)),n&&t.length<l){const e="Block scalar lines must not be less indented than their "+(a.indent?"explicit indentation indicator":"first line");r(d-n.length-(o?2:1),"BAD_INDENT",e),t=""}i===W.BLOCK_LITERAL?(u+=m+t.slice(l)+n,m="\n"):t.length>l||"\t"===n[0]?(" "===m?m="\n":p||"\n"!==m||(m="\n\n"),u+=m+t.slice(l)+n,m="\n",p=!0):""===n?"\n"===m?u+="\n":m="\n":(u+=m+n,m=" ",p=!1)}switch(a.chomp){case"-":break;case"+":for(let e=o;e<s.length;++e)u+="\n"+s[e][0].slice(l);"\n"!==u[u.length-1]&&(u+="\n");break;default:u+="\n"}const h=n+a.length+t.source.length;return{value:u,type:i,comment:a.comment,range:[n,h,h]}}function kt(e,t,r){const{offset:n,type:a,source:i,end:s}=e;let o,l;const d=(e,t,a)=>r(n+e,t,a);switch(a){case"scalar":o=W.PLAIN,l=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Wt(e)}(i,d);break;case"single-quoted-scalar":o=W.QUOTE_SINGLE,l=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),Wt(e.slice(1,-1)).replace(/''/g,"'")}(i,d);break;case"double-quoted-scalar":o=W.QUOTE_DOUBLE,l=function(e,t){let r="";for(let n=1;n<e.length-1;++n){const a=e[n];if("\r"!==a||"\n"!==e[n+1])if("\n"===a){const{fold:t,offset:a}=Kt(e,n);r+=t,n=a}else if("\\"===a){let a=e[++n];const i=jt[a];if(i)r+=i;else if("\n"===a)for(a=e[n+1];" "===a||"\t"===a;)a=e[1+ ++n];else if("\r"===a&&"\n"===e[n+1])for(a=e[1+ ++n];" "===a||"\t"===a;)a=e[1+ ++n];else if("x"===a||"u"===a||"U"===a){const i="x"===a?2:"u"===a?4:8;r+=$t(e,n+1,i,t),n+=i}else{const a=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),r+=a}}else if(" "===a||"\t"===a){const t=n;let i=e[n+1];for(;" "===i||"\t"===i;)i=e[1+ ++n];"\n"===i||"\r"===i&&"\n"===e[n+2]||(r+=n>t?e.slice(t,n+1):a)}else r+=a}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}(i,d);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[n,n+i.length,n+i.length]}}const c=n+i.length,u=Ut(s,c,t,r);return{value:l,type:o,comment:u.comment,range:[n,c,u.offset]}}function Wt(e){const t=/(.*?)\r?\n/sy;let r,n,a=t.exec(e);if(!a)return e;try{r=new RegExp("(?<![ \t])[ \t]+$"),n=new RegExp("^[ \t]+|(?<![ \t])[ \t]+$","g")}catch{r=/[ \t]+$/,n=/^[ \t]+|[ \t]+$/g}let i=a[1].replace(r,""),s=" ",o=t.lastIndex;for(;a=t.exec(e);){const e=a[1].replace(n,"");""===e?"\n"===s?i+=s:s="\n":(i+=s+e,s=" "),o=t.lastIndex}const l=/[ \t]*(.*)/sy;return l.lastIndex=o,a=l.exec(e),i+s+(a?.[1]??"")}function Kt(e,t){let r="",n=e[t+1];for(;!(" "!==n&&"\t"!==n&&"\n"!==n&&"\r"!==n||"\r"===n&&"\n"!==e[t+2]);)"\n"===n&&(r+="\n"),n=e[(t+=1)+1];return r||(r=" "),{fold:r,offset:t}}const jt={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function $t(e,t,r,n){const a=e.substr(t,r),i=a.length===r&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;try{return String.fromCodePoint(i)}catch{const a=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}function Xt(e,t,r,n){const{value:a,type:i,comment:s,range:o}="block-scalar"===t.type?Pt(e,t,n):kt(t,e.options.strict,n),l=r?e.directives.tagName(r.source,e=>n(r,"TAG_RESOLVE_FAILED",e)):null;let c,u;c=e.options.stringKeys&&e.atKey?e.schema[d]:l?function(e,t,r,n,a){if("!"===r)return e[d];const i=[];for(const t of e.tags)if(!t.collection&&t.tag===r){if(!t.default||!t.test)return t;i.push(t)}for(const e of i)if(e.test?.test(t))return e;const s=e.knownTags[r];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(a(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),e[d])}(e.schema,a,l,r,n):"scalar"===t.type?function({atKey:e,directives:t,schema:r},n,a,i){const s=r.tags.find(t=>(!0===t.default||e&&"key"===t.default)&&t.test?.test(n))||r[d];if(r.compat){const e=r.compat.find(e=>e.default&&e.test?.test(n))??r[d];s.tag!==e.tag&&i(a,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${t.tagString(s.tag)} or ${t.tagString(e.tag)}`,!0)}return s}(e,a,t,n):e.schema[d];try{const i=c.resolve(a,e=>n(r??t,"TAG_RESOLVE_FAILED",e),e.options);u=y(i)?i:new W(i)}catch(e){const i=e instanceof Error?e.message:String(e);n(r??t,"TAG_RESOLVE_FAILED",i),u=new W(a)}return u.range=o,u.source=a,i&&(u.type=i),l&&(u.tag=l),c.format&&(u.format=c.format),s&&(u.comment=s),u}function Gt(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let r=t[n];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++n];"space"===r?.type;)e+=r.source.length,r=t[++n];break}}return e}const qt={composeNode:Ht,composeEmptyNode:zt};function Ht(e,t,r,n){const a=e.atKey,{spaceBefore:i,comment:s,anchor:o,tag:l}=r;let d,c=!0;switch(t.type){case"alias":d=function({options:e},{offset:t,source:r,end:n},a){const i=new J(r.substring(1));""===i.source&&a(t,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&a(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const s=t+r.length,o=Ut(n,s,e.strict,a);return i.range=[t,s,o.offset],o.comment&&(i.comment=o.comment),i}(e,t,n),(o||l)&&n(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":d=Xt(e,t,l,n),o&&(d.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{d=function(e,t,r,n,a){const i=n.tag,s=i?t.directives.tagName(i.source,e=>a(i,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===r.type){const{anchor:e,newlineAfterProp:t}=n,r=e&&i?e.offset>i.offset?e:i:e??i;r&&(!t||t.offset<r.offset)&&a(r,"MISSING_CHAR","Missing newline after block sequence props")}const o="block-map"===r.type?"map":"block-seq"===r.type?"seq":"{"===r.start.source?"map":"seq";if(!i||!s||"!"===s||s===Se.tagName&&"map"===o||s===_e.tagName&&"seq"===o)return Jt(e,t,r,a,s);let l=t.schema.tags.find(e=>e.tag===s&&e.collection===o);if(!l){const n=t.schema.knownTags[s];if(n?.collection!==o)return n?a(i,"BAD_COLLECTION_TYPE",`${n.tag} used for ${o} collection, but expects ${n.collection??"scalar"}`,!0):a(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),Jt(e,t,r,a,s);t.schema.tags.push(Object.assign({},n,{default:!1})),l=n}const d=Jt(e,t,r,a,s,l),c=l.resolve?.(d,e=>a(i,"TAG_RESOLVE_FAILED",e),t.options)??d,u=E(c)?c:new W(c);return u.range=d.range,u.tag=s,l?.format&&(u.format=l.format),u}(qt,e,t,r,n),o&&(d.anchor=o.source.substring(1))}catch(e){n(t,"RESOURCE_EXHAUSTION",e instanceof Error?e.message:String(e))}break;default:n(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),c=!1}return d??(d=zt(e,t.offset,void 0,null,r,n)),o&&""===d.anchor&&n(o,"BAD_ALIAS","Anchor cannot be an empty string"),a&&e.options.stringKeys&&(!y(d)||"string"!=typeof d.value||d.tag&&"tag:yaml.org,2002:str"!==d.tag)&&n(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(d.spaceBefore=!0),s&&("scalar"===t.type&&""===t.source?d.comment=s:d.commentBefore=s),e.options.keepSourceTokens&&c&&(d.srcToken=t),d}function zt(e,t,r,n,{spaceBefore:a,comment:i,anchor:s,tag:o,end:l},d){const c=Xt(e,{type:"scalar",offset:Gt(t,r,n),indent:-1,source:""},o,d);return s&&(c.anchor=s.source.substring(1),""===c.anchor&&d(s,"BAD_ALIAS","Anchor cannot be an empty string")),a&&(c.spaceBefore=!0),i&&(c.comment=i,c.range[2]=l),c}function Qt(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:r}=e;return[t,t+("string"==typeof r?r.length:1)]}function Zt(e){let t="",r=!1,n=!1;for(let a=0;a<e.length;++a){const i=e[a];switch(i[0]){case"#":t+=(""===t?"":n?"\n\n":"\n")+(i.substring(1)||" "),r=!0,n=!1;break;case"%":"#"!==e[a+1]?.[0]&&(a+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:t,afterEmptyLine:n}}class er{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,r,n)=>{const a=Qt(e);n?this.warnings.push(new Lt(a,t,r)):this.errors.push(new wt(a,t,r))},this.directives=new O({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:r,afterEmptyLine:n}=Zt(this.prelude);if(r){const a=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${r}`:r;else if(n||e.directives.docStart||!a)e.commentBefore=r;else if(C(a)&&!a.flow&&a.items.length>0){let e=a.items[0];f(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${r}\n${t}`:r}else{const e=a.commentBefore;a.commentBefore=e?`${r}\n${e}`:r}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Zt(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(const t of e)yield*this.next(t);yield*this.end(t,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,r,n)=>{const a=Qt(e);a[0]+=t,this.onError(a,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=function(e,t,{offset:r,start:n,value:a,end:i},s){const o=Object.assign({_directives:t},e),l=new vt(void 0,o),d={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},c=Vt(n,{indicator:"doc-start",next:a??i?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});c.found&&(l.directives.docStart=!0,!a||"block-map"!==a.type&&"block-seq"!==a.type||c.hasNewline||s(c.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=a?Ht(d,a,c,s):zt(d,c.end,n,null,c,s);const u=l.contents.range[2],m=Ut(i,u,!1,s);return m.comment&&(l.comment=m.comment),l.range=[r,u,m.offset],l}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new wt(Qt(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new wt(Qt(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=Ut(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new wt(Qt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new vt(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}}function tr(e,t=!0,r){if(e){const n=(e,t,n)=>{const a="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!r)throw new wt([a,a+1],t,n);r(a,t,n)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return kt(e,t,n);case"block-scalar":return Pt({options:{strict:t}},e,n)}}return null}function rr(e,t){const{implicitKey:r=!1,indent:n,inFlow:a=!1,offset:i=-1,type:s="PLAIN"}=t,o=le({type:s,value:e},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:n,source:"\n"}];switch(o[0]){case"|":case">":{const e=o.indexOf("\n"),t=o.substring(0,e),r=o.substring(e+1)+"\n",a=[{type:"block-scalar-header",offset:i,indent:n,source:t}];return ar(a,l)||a.push({type:"newline",offset:-1,indent:n,source:"\n"}),{type:"block-scalar",offset:i,indent:n,props:a,source:r}}case'"':return{type:"double-quoted-scalar",offset:i,indent:n,source:o,end:l};case"'":return{type:"single-quoted-scalar",offset:i,indent:n,source:o,end:l};default:return{type:"scalar",offset:i,indent:n,source:o,end:l}}}function nr(e,t,r={}){let{afterKey:n=!1,implicitKey:a=!1,inFlow:i=!1,type:s}=r,o="indent"in e?e.indent:null;if(n&&"number"==typeof o&&(o+=2),!s)switch(e.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");s=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}const l=le({type:s,value:t},{implicitKey:a||null===o,indent:null!==o&&o>0?" ".repeat(o):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":!function(e,t){const r=t.indexOf("\n"),n=t.substring(0,r),a=t.substring(r+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=n,e.source=a}else{const{offset:t}=e,r="indent"in e?e.indent:-1,i=[{type:"block-scalar-header",offset:t,indent:r,source:n}];ar(i,"end"in e?e.end:void 0)||i.push({type:"newline",offset:-1,indent:r,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:r,props:i,source:a})}}(e,l);break;case'"':ir(e,l,"double-quoted-scalar");break;case"'":ir(e,l,"single-quoted-scalar");break;default:ir(e,l,"scalar")}}function ar(e,t){if(t)for(const r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function ir(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,e.source=t;break;case"block-scalar":{const n=e.props.slice(1);let a=t.length;"block-scalar-header"===e.props[0].type&&(a-=e.props[0].source.length);for(const e of n)e.offset+=a;delete e.props,Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{const n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:r,source:t,end:[n]});break}default:{const n="indent"in e?e.indent:-1,a="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:r,indent:n,source:t,end:a})}}}const sr=e=>"type"in e?or(e):lr(e);function or(e){switch(e.type){case"block-scalar":{let t="";for(const r of e.props)t+=or(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(const r of e.items)t+=lr(r);return t}case"flow-collection":{let t=e.start.source;for(const r of e.items)t+=lr(r);for(const r of e.end)t+=r.source;return t}case"document":{let t=lr(e);if(e.end)for(const r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const r of e.end)t+=r.source;return t}}}function lr({start:e,key:t,sep:r,value:n}){let a="";for(const t of e)a+=t.source;if(t&&(a+=or(t)),r)for(const e of r)a+=e.source;return n&&(a+=or(n)),a}const dr=Symbol("break visit"),cr=Symbol("skip children"),ur=Symbol("remove item");function mr(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),pr(Object.freeze([]),e,t)}function pr(e,t,r){let n=r(t,e);if("symbol"==typeof n)return n;for(const a of["key","value"]){const i=t[a];if(i&&"items"in i){for(let t=0;t<i.items.length;++t){const n=pr(Object.freeze(e.concat([[a,t]])),i.items[t],r);if("number"==typeof n)t=n-1;else{if(n===dr)return dr;n===ur&&(i.items.splice(t,1),t-=1)}}"function"==typeof n&&"key"===a&&(n=n(t,e))}}return"function"==typeof n?n(t,e):n}mr.BREAK=dr,mr.SKIP=cr,mr.REMOVE=ur,mr.itemAtPath=(e,t)=>{let r=e;for(const[e,n]of t){const t=r?.[e];if(!t||!("items"in t))return;r=t.items[n]}return r},mr.parentCollection=(e,t)=>{const r=mr.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],a=r?.[n];if(a&&"items"in a)return a;throw new Error("Parent collection not found")};const hr="\ufeff",fr="",yr="",Tr="",Cr=e=>!!e&&"items"in e,Er=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type);function gr(e){switch(e){case hr:return"<BOM>";case fr:return"<DOC>";case yr:return"<FLOW_END>";case Tr:return"<SCALAR>";default:return JSON.stringify(e)}}function Ir(e){switch(e){case hr:return"byte-order-mark";case fr:return"doc-mode";case yr:return"flow-error-end";case Tr:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Ar(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const br=new Set("0123456789ABCDEFabcdef"),Rr=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Sr=new Set(",[]{}"),vr=new Set(" ,[]{}\n\r\t"),_r=e=>!e||vr.has(e);class Nr{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;" "===t;)t=this.buffer[++r+e];if("\r"===t){const t=this.buffer[r+e+1];if("\n"===t||!t&&!this.atEnd)return e+r+1}return"\n"===t||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&Ar(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if(e[0]===hr&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,r=e.indexOf("#");for(;-1!==r;){const n=e[r-1];if(" "===n||"\t"===n){t=r-1;break}r=e.indexOf("#",r+1)}for(;;){const r=e[t-1];if(" "!==r&&"\t"!==r)break;t-=1}const n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield fr,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if(("---"===e||"..."===e)&&Ar(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ar(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&Ar(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(_r),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do{e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=(yield*this.pushSpaces(!0))}while(e+t>0);const n=this.getLine();if(null===n)return this.setNext("flow");if((-1!==r&&r<this.indentNext&&"#"!==n[0]||0===r&&(n.startsWith("---")||n.startsWith("..."))&&Ar(n[3]))&&(r!==this.indentNext-1||1!==this.flowLevel||"]"!==n[0]&&"}"!==n[0]))return this.flowLevel=0,yield yr,yield*this.parseLineStart();let a=0;for(;","===n[a];)a+=(yield*this.pushCount(1)),a+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(a+=(yield*this.pushIndicators()),n[a]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-a),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(_r),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||Ar(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const r=this.buffer.substring(0,t);let n=r.indexOf("\n",this.pos);if(-1!==n){for(;-1!==n;){const e=this.continueScalar(n+1);if(-1===e)break;n=r.indexOf("\n",e)}-1!==n&&(t=n-("\r"===r[n-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>Ar(e)||"#"===e)}*parseBlockScalar(){let e,t=this.pos-1,r=0;e:for(let n=this.pos;e=this.buffer[n];++n)switch(e){case" ":r+=1;break;case"\n":t=n,r=0;break;case"\r":{const e=this.buffer[n+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let n=t+1;for(e=this.buffer[n];" "===e;)e=this.buffer[++n];if("\t"===e){for(;"\t"===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++n];t=n-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,n=this.buffer[e];"\r"===n&&(n=this.buffer[--e]);const a=e;for(;" "===n;)n=this.buffer[--e];if(!("\n"===n&&e>=this.pos&&e+1+r>a))break;t=e}return yield Tr,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,r=this.pos-1,n=this.pos-1;for(;t=this.buffer[++n];)if(":"===t){const t=this.buffer[n+1];if(Ar(t)||e&&Sr.has(t))break;r=n}else if(Ar(t)){let a=this.buffer[n+1];if("\r"===t&&("\n"===a?(n+=1,t="\n",a=this.buffer[n+1]):r=n),"#"===a||e&&Sr.has(a))break;if("\n"===t){const e=this.continueScalar(n+1);if(-1===e)break;n=Math.max(n,e-2)}}else{if(e&&Sr.has(t))break;r=n}return t||this.atEnd?(yield Tr,yield*this.pushToIndex(r+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=(yield*this.pushTag()),e+=(yield*this.pushSpaces(!0));continue e;case"&":e+=(yield*this.pushUntil(_r)),e+=(yield*this.pushSpaces(!0));continue e;case"-":case"?":case":":{const t=this.flowLevel>0,r=this.charAt(1);if(Ar(r)||t&&Sr.has(r)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=(yield*this.pushCount(1)),e+=(yield*this.pushSpaces(!0));continue e}}}break e}return e}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!Ar(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Rr.has(t))t=this.buffer[++e];else{if("%"!==t||!br.has(this.buffer[e+1])||!br.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,r=this.pos-1;do{t=this.buffer[++r]}while(" "===t||e&&"\t"===t);const n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class wr{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){const n=t+r>>1;this.lineStarts[n]<e?t=n+1:r=n}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}function Lr(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function Fr(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function Vr(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Or(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Dr(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function Mr(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function Br(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||Lr(t.start,"explicit-key-ind")||Lr(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,Vr(t.value)?t.value.end?Mr(t.value.end,t.sep):t.value.end=t.sep:Mr(t.start,t.sep),delete t.sep)}class Ur{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Nr,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=Ir(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||"doc-end"===e?.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&Br(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const r=e.items[e.items.length-1];if(r.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!r.sep)return Object.assign(r,{key:t,sep:[]}),void(this.onKeyLine=!r.explicitKey);r.value=t;break}case"block-seq":{const r=e.items[e.items.length-1];r.value?e.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{const r=e.items[e.items.length-1];return void(!r||r.value?e.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&-1===Fr(r.start)&&(0===t.indent||r.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=r.start:e.items.push({start:r.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(-1!==Fr(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=Dr(Or(this.peek(2)));let r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];const n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;"comment"===n?.type?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n))return Mr(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const r=!this.onKeyLine&&this.indent===e.indent,n=r&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let a=[];if(n&&t.sep&&!t.value){const r=[];for(let n=0;n<t.sep.length;++n){const a=t.sep[n];switch(a.type){case"newline":r.push(n);break;case"space":break;case"comment":a.indent>e.indent&&(r.length=0);break;default:r.length=0}}r.length>=2&&(a=t.sep.splice(r[1]))}switch(this.type){case"anchor":case"tag":return void(n||t.value?(a.push(this.sourceToken),e.items.push({start:a}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?n||t.value?(a.push(this.sourceToken),e.items.push({start:a,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Lr(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(Vr(t.key)&&!Lr(t.sep,"newline")){const e=Dr(t.start),r=t.key,n=t.sep;n.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:r,sep:n}]})}else a.length>0?t.sep=t.sep.concat(a,this.sourceToken):t.sep.push(this.sourceToken);else if(Lr(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=Dr(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||n?e.items.push({start:a,key:null,sep:[this.sourceToken]}):Lr(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(n||t.value?(e.items.push({start:a,key:r,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(r):(Object.assign(t,{key:r,sep:[]}),this.onKeyLine=!0))}default:{const n=this.startBlockValue(e);if(n){if("block-seq"===n.type){if(!t.explicitKey&&t.sep&&!Lr(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else r&&e.items.push({start:a});return void this.stack.push(n)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;"comment"===n?.type?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n))return Mr(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||Lr(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while("flow-collection"===e?.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const r=Dr(Or(t));Br(e);const n=e.end.splice(1,e.end.length);n.push(this.sourceToken);const a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=Dr(Or(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=Dr(Or(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type)}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}function Yr(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new wr||null,prettyErrors:t}}function xr(e,t={}){const{lineCounter:r,prettyErrors:n}=Yr(t),a=new Ur(r?.addNewLine),i=new er(t),s=Array.from(i.compose(a.parse(e)));if(n&&r)for(const t of s)t.errors.forEach(Ft(e,r)),t.warnings.forEach(Ft(e,r));return s.length>0?s:Object.assign([],{empty:!0},i.streamInfo())}function Jr(e,t={}){const{lineCounter:r,prettyErrors:n}=Yr(t),a=new Ur(r?.addNewLine),i=new er(t);let s=null;for(const t of i.compose(a.parse(e),!0,e.length))if(s){if("silent"!==s.options.logLevel){s.errors.push(new wt(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else s=t;return n&&r&&(s.errors.forEach(Ft(e,r)),s.warnings.forEach(Ft(e,r))),s}function Pr(e,t,r){let n;"function"==typeof t?n=t:void 0===r&&t&&"object"==typeof t&&(r=t);const a=Jr(e,r);if(!a)return null;if(a.warnings.forEach(e=>ue(a.options.logLevel,e)),a.errors.length>0){if("silent"!==a.options.logLevel)throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:n},r))}function kr(e,t,r){let n=null;if("function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??t??{};if(!e)return}return p(e)&&!n?e.toString(r):new vt(e,n,r).toString(r)}}};const t={};function r(n){const a=t[n];if(void 0!==a)return a.exports;const i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};let n={};(()=>{let e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.InstanceDataLinkAtom=e.InstanceDataTypedAtom=e.InstanceDataNotationAtom=e.InstanceDataLabelAtom=e.InstanceDataStringAtom=e.InstanceDataEmptyAtom=e.InstanceDataEmptyNode=e.ReservedNames=e.AttributeValueNamePolicy=e.InstanceDataAttributeValueFieldName=e.InstanceDataAttributeValueField=e.InstanceDataContainer=e.TemplateInstance=e.TemplateBuilder=e.Template=e.TemplateElementBuilder=e.TemplateElement=e.TemplateField=e.AbstractArtifact=e.AbstractInstanceArtifact=e.CedarFieldType=e.AbstractContainerArtifact=e.AbstractSchemaArtifact=e.YamlTemplateWriter=e.JsonTemplateWriter=e.YamlTemplateElementWriter=e.JsonTemplateElementWriter=e.JsonTemplateInstanceReader=e.InstanceValidator=e.InstanceInflater=e.YamlTemplateInstanceReader=e.YamlTemplateReader=e.JsonTemplateReader=e.YamlTemplateElementReader=e.JsonTemplateElementReader=e.YamlTemplateFieldReader=e.JsonTemplateFieldReader=e.JsonAbstractArtifactWriter=e.JsonAbstractArtifactReader=e.JsonAbstractInstanceArtifactReader=e.JsonAbstractSchemaArtifactReader=e.CedarYamlWriters=e.CedarYamlReaders=e.CedarJsonWriters=e.CedarJsonReaders=e.CedarReaders=e.CedarWriters=e.CedarBuilders=e.YamlTemplateFieldWriter=e.JsonTemplateFieldWriter=void 0,e.Language=e.PavVersion=e.CedarUser=e.CedarArtifactType=e.CedarFieldCategory=e.YamlValues=e.JsonTemplateInstanceWriter=e.JsonTemplateInstanceContent=e.PropertyIri=e.RoundTrip=e.ComparisonError=e.CedarArtifactId=e.BioportalTermType=e.BiboStatus=e.Iri=e.NumberType=e.TemporalType=e.TimeFormat=e.TemporalGranularity=e.JsonPath=e.SchemaVersion=e.IsoDate=e.JsonNode=e.ChildDeploymentInfoStaticBuilder=e.ChildDeploymentInfoStatic=e.ChildDeploymentInfoAlwaysMultipleBuilder=e.ChildDeploymentInfoAlwaysMultiple=e.ChildDeploymentInfoAlwaysSingleBuilder=e.ChildDeploymentInfoAlwaysSingle=e.ChildDeploymentInfoBuilder=e.ChildDeploymentInfo=e.ChildDeploymentInfoElementBuilder=e.ChildDeploymentInfoElement=e.AbstractFieldChildDeploymentInfoBuilder=e.AbstractFieldChildDeploymentInfo=e.AbstractDynamicChildDeploymentInfoBuilder=e.AbstractDynamicChildDeploymentInfo=e.AbstractChildDeploymentInfoBuilder=e.AbstractChildDeploymentInfo=e.ControlledTermVersion=e.ControlledTermActionBuilder=e.ControlledTermValueSetBuilder=e.ControlledTermOntologyBuilder=e.ControlledTermClassBuilder=e.ControlledTermBranchBuilder=e.IriSyntax=e.ControlledTermDefaultValue=e.ControlledTermDefaultValueBuilder=e.TemplateInstanceBuilder=e.InstanceDataControlledAtom=void 0,e.SchemaExtensions=e.AnnotationAtValue=e.AnnotationAtId=e.Annotations=e.YamlObjectComparator=e.JsonObjectComparator=e.ComparisonResult=e.YamlArtifactParsingResult=e.JsonArtifactParsingResult=e.YamlArtifactReaderResult=e.JsonArtifactReaderResult=e.YamlTemplateInstanceReaderResult=e.JsonTemplateInstanceReaderResult=e.YamlTemplateReaderResult=e.JsonTemplateReaderResult=e.YamlTemplateElementReaderResult=e.JsonTemplateElementReaderResult=e.YamlTemplateFieldReaderResult=e.JsonTemplateFieldReaderResult=e.ComparisonErrorType=void 0;const t=r(1625);Object.defineProperty(e,"InstanceDataNotationAtom",{enumerable:!0,get:function(){return t.InstanceDataNotationAtom}});const a=r(8810);Object.defineProperty(e,"CedarWriters",{enumerable:!0,get:function(){return a.CedarWriters}});const i=r(6568);Object.defineProperty(e,"CedarBuilders",{enumerable:!0,get:function(){return i.CedarBuilders}});const s=r(4381);Object.defineProperty(e,"JsonTemplateFieldReader",{enumerable:!0,get:function(){return s.JsonTemplateFieldReader}});const o=r(7909);Object.defineProperty(e,"JsonTemplateElementReader",{enumerable:!0,get:function(){return o.JsonTemplateElementReader}});const l=r(5291);Object.defineProperty(e,"JsonTemplateReader",{enumerable:!0,get:function(){return l.JsonTemplateReader}});const d=r(2748);Object.defineProperty(e,"JsonTemplateFieldWriter",{enumerable:!0,get:function(){return d.JsonTemplateFieldWriterInternal}});const c=r(5430);Object.defineProperty(e,"YamlTemplateFieldWriter",{enumerable:!0,get:function(){return c.YamlTemplateFieldWriterInternal}});const u=r(6645);Object.defineProperty(e,"JsonTemplateElementWriter",{enumerable:!0,get:function(){return u.JsonTemplateElementWriter}});const m=r(7519);Object.defineProperty(e,"JsonTemplateWriter",{enumerable:!0,get:function(){return m.JsonTemplateWriter}});const p=r(5251);Object.defineProperty(e,"YamlTemplateElementWriter",{enumerable:!0,get:function(){return p.YamlTemplateElementWriter}});const h=r(1933);Object.defineProperty(e,"YamlTemplateWriter",{enumerable:!0,get:function(){return h.YamlTemplateWriter}});const f=r(9129);Object.defineProperty(e,"TemplateField",{enumerable:!0,get:function(){return f.TemplateField}});const y=r(7661);Object.defineProperty(e,"TemplateElement",{enumerable:!0,get:function(){return y.TemplateElement}});const T=r(1762);Object.defineProperty(e,"TemplateElementBuilder",{enumerable:!0,get:function(){return T.TemplateElementBuilder}});const C=r(3281);Object.defineProperty(e,"Template",{enumerable:!0,get:function(){return C.Template}});const E=r(766);Object.defineProperty(e,"TemplateBuilder",{enumerable:!0,get:function(){return E.TemplateBuilder}});const g=r(4925);Object.defineProperty(e,"TemplateInstanceBuilder",{enumerable:!0,get:function(){return g.TemplateInstanceBuilder}});const I=r(9517);Object.defineProperty(e,"JsonNode",{enumerable:!0,get:function(){return I.JsonNode}});const A=r(9857);Object.defineProperty(e,"IsoDate",{enumerable:!0,get:function(){return A.IsoDate}});const b=r(8557);Object.defineProperty(e,"SchemaVersion",{enumerable:!0,get:function(){return b.SchemaVersion}});const R=r(3188);Object.defineProperty(e,"JsonPath",{enumerable:!0,get:function(){return R.JsonPath}});const S=r(7974);Object.defineProperty(e,"TemporalGranularity",{enumerable:!0,get:function(){return S.TemporalGranularity}});const v=r(3764);Object.defineProperty(e,"TimeFormat",{enumerable:!0,get:function(){return v.TimeFormat}});const _=r(8588);Object.defineProperty(e,"TemporalType",{enumerable:!0,get:function(){return _.TemporalType}});const N=r(3447);Object.defineProperty(e,"NumberType",{enumerable:!0,get:function(){return N.NumberType}});const w=r(8802);Object.defineProperty(e,"Iri",{enumerable:!0,get:function(){return w.Iri}});const L=r(2957);Object.defineProperty(e,"ControlledTermBranchBuilder",{enumerable:!0,get:function(){return L.ControlledTermBranchBuilder}});const F=r(3091);Object.defineProperty(e,"ControlledTermClassBuilder",{enumerable:!0,get:function(){return F.ControlledTermClassBuilder}});const V=r(5491);Object.defineProperty(e,"ControlledTermOntologyBuilder",{enumerable:!0,get:function(){return V.ControlledTermOntologyBuilder}});const O=r(1556);Object.defineProperty(e,"ControlledTermValueSetBuilder",{enumerable:!0,get:function(){return O.ControlledTermValueSetBuilder}});const D=r(2480);Object.defineProperty(e,"ControlledTermDefaultValueBuilder",{enumerable:!0,get:function(){return D.ControlledTermDefaultValueBuilder}});const M=r(7295);Object.defineProperty(e,"ControlledTermDefaultValue",{enumerable:!0,get:function(){return M.ControlledTermDefaultValue}});const B=r(8446);Object.defineProperty(e,"IriSyntax",{enumerable:!0,get:function(){return B.IriSyntax}});const U=r(5753);Object.defineProperty(e,"ControlledTermVersion",{enumerable:!0,get:function(){return U.ControlledTermVersion}});const Y=r(3910);Object.defineProperty(e,"BiboStatus",{enumerable:!0,get:function(){return Y.BiboStatus}});const x=r(455);Object.defineProperty(e,"ChildDeploymentInfo",{enumerable:!0,get:function(){return x.ChildDeploymentInfo}});const J=r(3608);Object.defineProperty(e,"ChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return J.ChildDeploymentInfoBuilder}});const P=r(8534);Object.defineProperty(e,"CedarArtifactId",{enumerable:!0,get:function(){return P.CedarArtifactId}});const k=r(2888);Object.defineProperty(e,"ComparisonError",{enumerable:!0,get:function(){return k.ComparisonError}});const W=r(1888);Object.defineProperty(e,"RoundTrip",{enumerable:!0,get:function(){return W.RoundTrip}});const K=r(6389);Object.defineProperty(e,"PropertyIri",{enumerable:!0,get:function(){return K.PropertyIri}});const j=r(6320);Object.defineProperty(e,"JsonTemplateInstanceWriter",{enumerable:!0,get:function(){return j.JsonTemplateInstanceWriter}});const $=r(350);Object.defineProperty(e,"JsonTemplateInstanceContent",{enumerable:!0,get:function(){return $.JsonTemplateInstanceContent}});const X=r(7733);Object.defineProperty(e,"ControlledTermActionBuilder",{enumerable:!0,get:function(){return X.ControlledTermActionBuilder}});const G=r(8349);Object.defineProperty(e,"YamlValues",{enumerable:!0,get:function(){return G.YamlValues}});const q=r(4531);Object.defineProperty(e,"BioportalTermType",{enumerable:!0,get:function(){return q.BioportalTermType}});const H=r(8421);Object.defineProperty(e,"CedarFieldCategory",{enumerable:!0,get:function(){return H.CedarFieldCategory}});const z=r(2999);Object.defineProperty(e,"YamlTemplateFieldReader",{enumerable:!0,get:function(){return z.YamlTemplateFieldReader}});const Q=r(8239);Object.defineProperty(e,"YamlTemplateElementReader",{enumerable:!0,get:function(){return Q.YamlTemplateElementReader}});const Z=r(5677);Object.defineProperty(e,"YamlTemplateReader",{enumerable:!0,get:function(){return Z.YamlTemplateReader}});const ee=r(9946);Object.defineProperty(e,"YamlTemplateInstanceReader",{enumerable:!0,get:function(){return ee.YamlTemplateInstanceReader}});const te=r(9961);Object.defineProperty(e,"InstanceInflater",{enumerable:!0,get:function(){return te.InstanceInflater}});const re=r(8410);Object.defineProperty(e,"InstanceValidator",{enumerable:!0,get:function(){return re.InstanceValidator}});const ne=r(2763);Object.defineProperty(e,"CedarArtifactType",{enumerable:!0,get:function(){return ne.CedarArtifactType}});const ae=r(978);Object.defineProperty(e,"JsonAbstractSchemaArtifactReader",{enumerable:!0,get:function(){return ae.JsonAbstractSchemaArtifactReader}});const ie=r(1998);Object.defineProperty(e,"CedarReaders",{enumerable:!0,get:function(){return ie.CedarReaders}});const se=r(8333);Object.defineProperty(e,"AbstractSchemaArtifact",{enumerable:!0,get:function(){return se.AbstractSchemaArtifact}});const oe=r(5451);Object.defineProperty(e,"AbstractContainerArtifact",{enumerable:!0,get:function(){return oe.AbstractContainerArtifact}});const le=r(4869);Object.defineProperty(e,"CedarFieldType",{enumerable:!0,get:function(){return le.CedarFieldType}});const de=r(3161);Object.defineProperty(e,"JsonAbstractArtifactWriter",{enumerable:!0,get:function(){return de.JsonAbstractArtifactWriter}});const ce=r(9760);Object.defineProperty(e,"ComparisonErrorType",{enumerable:!0,get:function(){return ce.ComparisonErrorType}});const ue=r(9607);Object.defineProperty(e,"CedarJsonWriters",{enumerable:!0,get:function(){return ue.CedarJsonWriters}});const me=r(2103);Object.defineProperty(e,"CedarJsonReaders",{enumerable:!0,get:function(){return me.CedarJsonReaders}});const pe=r(5359);Object.defineProperty(e,"CedarYamlWriters",{enumerable:!0,get:function(){return pe.CedarYamlWriters}});const he=r(8639);Object.defineProperty(e,"CedarYamlReaders",{enumerable:!0,get:function(){return he.CedarYamlReaders}});const fe=r(5697);Object.defineProperty(e,"AbstractInstanceArtifact",{enumerable:!0,get:function(){return fe.AbstractInstanceArtifact}});const ye=r(2674);Object.defineProperty(e,"AbstractArtifact",{enumerable:!0,get:function(){return ye.AbstractArtifact}});const Te=r(2272);Object.defineProperty(e,"TemplateInstance",{enumerable:!0,get:function(){return Te.TemplateInstance}});const Ce=r(7723);Object.defineProperty(e,"InstanceDataContainer",{enumerable:!0,get:function(){return Ce.InstanceDataContainer}});const Ee=r(9327);Object.defineProperty(e,"InstanceDataAttributeValueField",{enumerable:!0,get:function(){return Ee.InstanceDataAttributeValueField}});const ge=r(3644);Object.defineProperty(e,"InstanceDataAttributeValueFieldName",{enumerable:!0,get:function(){return ge.InstanceDataAttributeValueFieldName}});const Ie=r(4033);Object.defineProperty(e,"AttributeValueNamePolicy",{enumerable:!0,get:function(){return Ie.AttributeValueNamePolicy}});const Ae=r(5588);Object.defineProperty(e,"ReservedNames",{enumerable:!0,get:function(){return Ae.ReservedNames}});const be=r(4465);Object.defineProperty(e,"InstanceDataEmptyNode",{enumerable:!0,get:function(){return be.InstanceDataEmptyNode}});const Re=r(7548);Object.defineProperty(e,"InstanceDataEmptyAtom",{enumerable:!0,get:function(){return Re.InstanceDataEmptyAtom}});const Se=r(9167);Object.defineProperty(e,"InstanceDataLabelAtom",{enumerable:!0,get:function(){return Se.InstanceDataLabelAtom}});const ve=r(5222);Object.defineProperty(e,"InstanceDataStringAtom",{enumerable:!0,get:function(){return ve.InstanceDataStringAtom}});const _e=r(4877);Object.defineProperty(e,"InstanceDataTypedAtom",{enumerable:!0,get:function(){return _e.InstanceDataTypedAtom}});const Ne=r(7571);Object.defineProperty(e,"InstanceDataLinkAtom",{enumerable:!0,get:function(){return Ne.InstanceDataLinkAtom}});const we=r(8193);Object.defineProperty(e,"InstanceDataControlledAtom",{enumerable:!0,get:function(){return we.InstanceDataControlledAtom}});const Le=r(9232);Object.defineProperty(e,"JsonTemplateInstanceReader",{enumerable:!0,get:function(){return Le.JsonTemplateInstanceReader}});const Fe=r(3326);Object.defineProperty(e,"JsonAbstractInstanceArtifactReader",{enumerable:!0,get:function(){return Fe.JsonAbstractInstanceArtifactReader}});const Ve=r(7993);Object.defineProperty(e,"JsonAbstractArtifactReader",{enumerable:!0,get:function(){return Ve.JsonAbstractArtifactReader}});const Oe=r(7954);Object.defineProperty(e,"JsonTemplateReaderResult",{enumerable:!0,get:function(){return Oe.JsonTemplateReaderResult}});const De=r(2234);Object.defineProperty(e,"CedarUser",{enumerable:!0,get:function(){return De.CedarUser}});const Me=r(8518);Object.defineProperty(e,"JsonArtifactReaderResult",{enumerable:!0,get:function(){return Me.JsonArtifactReaderResult}});const Be=r(4948);Object.defineProperty(e,"JsonTemplateElementReaderResult",{enumerable:!0,get:function(){return Be.JsonTemplateElementReaderResult}});const Ue=r(6396);Object.defineProperty(e,"JsonTemplateFieldReaderResult",{enumerable:!0,get:function(){return Ue.JsonTemplateFieldReaderResult}});const Ye=r(6537);Object.defineProperty(e,"JsonTemplateInstanceReaderResult",{enumerable:!0,get:function(){return Ye.JsonTemplateInstanceReaderResult}});const xe=r(1027);Object.defineProperty(e,"PavVersion",{enumerable:!0,get:function(){return xe.PavVersion}});const Je=r(3581);Object.defineProperty(e,"ChildDeploymentInfoStatic",{enumerable:!0,get:function(){return Je.ChildDeploymentInfoStatic}});const Pe=r(8290);Object.defineProperty(e,"ChildDeploymentInfoStaticBuilder",{enumerable:!0,get:function(){return Pe.ChildDeploymentInfoStaticBuilder}});const ke=r(2266);Object.defineProperty(e,"ChildDeploymentInfoAlwaysSingle",{enumerable:!0,get:function(){return ke.ChildDeploymentInfoAlwaysSingle}});const We=r(587);Object.defineProperty(e,"ChildDeploymentInfoAlwaysSingleBuilder",{enumerable:!0,get:function(){return We.ChildDeploymentInfoAlwaysSingleBuilder}});const Ke=r(8878);Object.defineProperty(e,"ChildDeploymentInfoAlwaysMultiple",{enumerable:!0,get:function(){return Ke.ChildDeploymentInfoAlwaysMultiple}});const je=r(3239);Object.defineProperty(e,"ChildDeploymentInfoAlwaysMultipleBuilder",{enumerable:!0,get:function(){return je.ChildDeploymentInfoAlwaysMultipleBuilder}});const $e=r(513);Object.defineProperty(e,"AbstractChildDeploymentInfo",{enumerable:!0,get:function(){return $e.AbstractChildDeploymentInfo}});const Xe=r(6910);Object.defineProperty(e,"AbstractChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return Xe.AbstractChildDeploymentInfoBuilder}});const Ge=r(4809);Object.defineProperty(e,"AbstractDynamicChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return Ge.AbstractDynamicChildDeploymentInfoBuilder}});const qe=r(3812);Object.defineProperty(e,"AbstractDynamicChildDeploymentInfo",{enumerable:!0,get:function(){return qe.AbstractDynamicChildDeploymentInfo}});const He=r(9519);Object.defineProperty(e,"AbstractFieldChildDeploymentInfo",{enumerable:!0,get:function(){return He.AbstractFieldChildDeploymentInfo}});const ze=r(6096);Object.defineProperty(e,"AbstractFieldChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return ze.AbstractFieldChildDeploymentInfoBuilder}});const Qe=r(4831);Object.defineProperty(e,"ChildDeploymentInfoElement",{enumerable:!0,get:function(){return Qe.ChildDeploymentInfoElement}});const Ze=r(6976);Object.defineProperty(e,"ChildDeploymentInfoElementBuilder",{enumerable:!0,get:function(){return Ze.ChildDeploymentInfoElementBuilder}});const et=r(4036);Object.defineProperty(e,"JsonArtifactParsingResult",{enumerable:!0,get:function(){return et.JsonArtifactParsingResult}});const tt=r(1591);Object.defineProperty(e,"YamlArtifactParsingResult",{enumerable:!0,get:function(){return tt.YamlArtifactParsingResult}});const rt=r(4325);Object.defineProperty(e,"ComparisonResult",{enumerable:!0,get:function(){return rt.ComparisonResult}});const nt=r(1885);Object.defineProperty(e,"YamlObjectComparator",{enumerable:!0,get:function(){return nt.YamlObjectComparator}});const at=r(3056);Object.defineProperty(e,"JsonObjectComparator",{enumerable:!0,get:function(){return at.JsonObjectComparator}});const it=r(7868);Object.defineProperty(e,"YamlTemplateReaderResult",{enumerable:!0,get:function(){return it.YamlTemplateReaderResult}});const st=r(1790);Object.defineProperty(e,"YamlTemplateFieldReaderResult",{enumerable:!0,get:function(){return st.YamlTemplateFieldReaderResult}});const ot=r(4646);Object.defineProperty(e,"YamlTemplateElementReaderResult",{enumerable:!0,get:function(){return ot.YamlTemplateElementReaderResult}});const lt=r(6532);Object.defineProperty(e,"YamlArtifactReaderResult",{enumerable:!0,get:function(){return lt.YamlArtifactReaderResult}});const dt=r(147);Object.defineProperty(e,"YamlTemplateInstanceReaderResult",{enumerable:!0,get:function(){return dt.YamlTemplateInstanceReaderResult}});const ct=r(7752);Object.defineProperty(e,"Language",{enumerable:!0,get:function(){return ct.Language}});var ut=r(5226);Object.defineProperty(e,"Annotations",{enumerable:!0,get:function(){return ut.Annotations}});var mt=r(2787);Object.defineProperty(e,"AnnotationAtId",{enumerable:!0,get:function(){return mt.AnnotationAtId}});var pt=r(3549);Object.defineProperty(e,"AnnotationAtValue",{enumerable:!0,get:function(){return pt.AnnotationAtValue}});var ht=r(4443);Object.defineProperty(e,"SchemaExtensions",{enumerable:!0,get:function(){return ht.SchemaExtensions}})})();const a=n.AbstractArtifact,i=n.AbstractChildDeploymentInfo,s=n.AbstractChildDeploymentInfoBuilder,o=n.AbstractContainerArtifact,l=n.AbstractDynamicChildDeploymentInfo,d=n.AbstractDynamicChildDeploymentInfoBuilder,c=n.AbstractFieldChildDeploymentInfo,u=n.AbstractFieldChildDeploymentInfoBuilder,m=n.AbstractInstanceArtifact,p=n.AbstractSchemaArtifact,h=n.AnnotationAtId,f=n.AnnotationAtValue,y=n.Annotations,T=n.AttributeValueNamePolicy,C=n.BiboStatus,E=n.BioportalTermType,g=n.CedarArtifactId,I=n.CedarArtifactType,A=n.CedarBuilders,b=n.CedarFieldCategory,R=n.CedarFieldType,S=n.CedarJsonReaders,v=n.CedarJsonWriters,_=n.CedarReaders,N=n.CedarUser,w=n.CedarWriters,L=n.CedarYamlReaders,F=n.CedarYamlWriters,V=n.ChildDeploymentInfo,O=n.ChildDeploymentInfoAlwaysMultiple,D=n.ChildDeploymentInfoAlwaysMultipleBuilder,M=n.ChildDeploymentInfoAlwaysSingle,B=n.ChildDeploymentInfoAlwaysSingleBuilder,U=n.ChildDeploymentInfoBuilder,Y=n.ChildDeploymentInfoElement,x=n.ChildDeploymentInfoElementBuilder,J=n.ChildDeploymentInfoStatic,P=n.ChildDeploymentInfoStaticBuilder,k=n.ComparisonError,W=n.ComparisonErrorType,K=n.ComparisonResult,j=n.ControlledTermActionBuilder,$=n.ControlledTermBranchBuilder,X=n.ControlledTermClassBuilder,G=n.ControlledTermDefaultValue,q=n.ControlledTermDefaultValueBuilder,H=n.ControlledTermOntologyBuilder,z=n.ControlledTermValueSetBuilder,Q=n.ControlledTermVersion,Z=n.InstanceDataAttributeValueField,ee=n.InstanceDataAttributeValueFieldName,te=n.InstanceDataContainer,re=n.InstanceDataControlledAtom,ne=n.InstanceDataEmptyAtom,ae=n.InstanceDataEmptyNode,ie=n.InstanceDataLabelAtom,se=n.InstanceDataLinkAtom,oe=n.InstanceDataNotationAtom,le=n.InstanceDataStringAtom,de=n.InstanceDataTypedAtom,ce=n.InstanceInflater,ue=n.InstanceValidator,me=n.Iri,pe=n.IriSyntax,he=n.IsoDate,fe=n.JsonAbstractArtifactReader,ye=n.JsonAbstractArtifactWriter,Te=n.JsonAbstractInstanceArtifactReader,Ce=n.JsonAbstractSchemaArtifactReader,Ee=n.JsonArtifactParsingResult,ge=n.JsonArtifactReaderResult,Ie=n.JsonNode,Ae=n.JsonObjectComparator,be=n.JsonPath,Re=n.JsonTemplateElementReader,Se=n.JsonTemplateElementReaderResult,ve=n.JsonTemplateElementWriter,_e=n.JsonTemplateFieldReader,Ne=n.JsonTemplateFieldReaderResult,we=n.JsonTemplateFieldWriter,Le=n.JsonTemplateInstanceContent,Fe=n.JsonTemplateInstanceReader,Ve=n.JsonTemplateInstanceReaderResult,Oe=n.JsonTemplateInstanceWriter,De=n.JsonTemplateReader,Me=n.JsonTemplateReaderResult,Be=n.JsonTemplateWriter,Ue=n.Language,Ye=n.NumberType,xe=n.PavVersion,Je=n.PropertyIri,Pe=n.ReservedNames,ke=n.RoundTrip,We=n.SchemaExtensions,Ke=n.SchemaVersion,je=n.Template,$e=n.TemplateBuilder,Xe=n.TemplateElement,Ge=n.TemplateElementBuilder,qe=n.TemplateField,He=n.TemplateInstance,ze=n.TemplateInstanceBuilder,Qe=n.TemporalGranularity,Ze=n.TemporalType,et=n.TimeFormat,tt=n.YamlArtifactParsingResult,rt=n.YamlArtifactReaderResult,nt=n.YamlObjectComparator,at=n.YamlTemplateElementReader,it=n.YamlTemplateElementReaderResult,st=n.YamlTemplateElementWriter,ot=n.YamlTemplateFieldReader,lt=n.YamlTemplateFieldReaderResult,dt=n.YamlTemplateFieldWriter,ct=n.YamlTemplateInstanceReader,ut=n.YamlTemplateInstanceReaderResult,mt=n.YamlTemplateReader,pt=n.YamlTemplateReaderResult,ht=n.YamlTemplateWriter,ft=n.YamlValues,yt=n.__esModule;export{a as AbstractArtifact,i as AbstractChildDeploymentInfo,s as AbstractChildDeploymentInfoBuilder,o as AbstractContainerArtifact,l as AbstractDynamicChildDeploymentInfo,d as AbstractDynamicChildDeploymentInfoBuilder,c as AbstractFieldChildDeploymentInfo,u as AbstractFieldChildDeploymentInfoBuilder,m as AbstractInstanceArtifact,p as AbstractSchemaArtifact,h as AnnotationAtId,f as AnnotationAtValue,y as Annotations,T as AttributeValueNamePolicy,C as BiboStatus,E as BioportalTermType,g as CedarArtifactId,I as CedarArtifactType,A as CedarBuilders,b as CedarFieldCategory,R as CedarFieldType,S as CedarJsonReaders,v as CedarJsonWriters,_ as CedarReaders,N as CedarUser,w as CedarWriters,L as CedarYamlReaders,F as CedarYamlWriters,V as ChildDeploymentInfo,O as ChildDeploymentInfoAlwaysMultiple,D as ChildDeploymentInfoAlwaysMultipleBuilder,M as ChildDeploymentInfoAlwaysSingle,B as ChildDeploymentInfoAlwaysSingleBuilder,U as ChildDeploymentInfoBuilder,Y as ChildDeploymentInfoElement,x as ChildDeploymentInfoElementBuilder,J as ChildDeploymentInfoStatic,P as ChildDeploymentInfoStaticBuilder,k as ComparisonError,W as ComparisonErrorType,K as ComparisonResult,j as ControlledTermActionBuilder,$ as ControlledTermBranchBuilder,X as ControlledTermClassBuilder,G as ControlledTermDefaultValue,q as ControlledTermDefaultValueBuilder,H as ControlledTermOntologyBuilder,z as ControlledTermValueSetBuilder,Q as ControlledTermVersion,Z as InstanceDataAttributeValueField,ee as InstanceDataAttributeValueFieldName,te as InstanceDataContainer,re as InstanceDataControlledAtom,ne as InstanceDataEmptyAtom,ae as InstanceDataEmptyNode,ie as InstanceDataLabelAtom,se as InstanceDataLinkAtom,oe as InstanceDataNotationAtom,le as InstanceDataStringAtom,de as InstanceDataTypedAtom,ce as InstanceInflater,ue as InstanceValidator,me as Iri,pe as IriSyntax,he as IsoDate,fe as JsonAbstractArtifactReader,ye as JsonAbstractArtifactWriter,Te as JsonAbstractInstanceArtifactReader,Ce as JsonAbstractSchemaArtifactReader,Ee as JsonArtifactParsingResult,ge as JsonArtifactReaderResult,Ie as JsonNode,Ae as JsonObjectComparator,be as JsonPath,Re as JsonTemplateElementReader,Se as JsonTemplateElementReaderResult,ve as JsonTemplateElementWriter,_e as JsonTemplateFieldReader,Ne as JsonTemplateFieldReaderResult,we as JsonTemplateFieldWriter,Le as JsonTemplateInstanceContent,Fe as JsonTemplateInstanceReader,Ve as JsonTemplateInstanceReaderResult,Oe as JsonTemplateInstanceWriter,De as JsonTemplateReader,Me as JsonTemplateReaderResult,Be as JsonTemplateWriter,Ue as Language,Ye as NumberType,xe as PavVersion,Je as PropertyIri,Pe as ReservedNames,ke as RoundTrip,We as SchemaExtensions,Ke as SchemaVersion,je as Template,$e as TemplateBuilder,Xe as TemplateElement,Ge as TemplateElementBuilder,qe as TemplateField,He as TemplateInstance,ze as TemplateInstanceBuilder,Qe as TemporalGranularity,Ze as TemporalType,et as TimeFormat,tt as YamlArtifactParsingResult,rt as YamlArtifactReaderResult,nt as YamlObjectComparator,at as YamlTemplateElementReader,it as YamlTemplateElementReaderResult,st as YamlTemplateElementWriter,ot as YamlTemplateFieldReader,lt as YamlTemplateFieldReaderResult,dt as YamlTemplateFieldWriter,ct as YamlTemplateInstanceReader,ut as YamlTemplateInstanceReaderResult,mt as YamlTemplateReader,pt as YamlTemplateReaderResult,ht as YamlTemplateWriter,ft as YamlValues,yt as __esModule};export default n;
1
+ var e={5846(e,t,r){t.JsonReaderBehavior=t.C=void 0;const n=r(7639);t.C={STRICT:"strict",FEBRUARY_2024:"february-2024"};class a extends n.ReaderWriterBehavior{value;constructor(e,t){super(t),this.value=e}getValue(){return this.value}static STRICT=new a(t.C.STRICT,!1);static FEBRUARY_2024=new a(t.C.FEBRUARY_2024,!0)}t.JsonReaderBehavior=a},2022(e,t,r){t.JsonWriterBehavior=t.C=void 0;const n=r(7639);t.C={STRICT:"strict",FEBRUARY_2024:"february-2024"};class a extends n.ReaderWriterBehavior{value;_outputPages;_usePropertiesAtLanguage;_includeSkosNotationForLinksAndControlled;constructor(e,t,r,n,a){super(a),this.value=e,this._outputPages=t,this._usePropertiesAtLanguage=r,this._includeSkosNotationForLinksAndControlled=n}getValue(){return this.value}static STRICT=new a(t.C.STRICT,!1,!0,!0,!1);static FEBRUARY_2024=new a(t.C.FEBRUARY_2024,!0,!1,!1,!0);outputPages(){return this._outputPages}usePropertiesAtLanguage(){return this._usePropertiesAtLanguage}includeSkosNotationForLinksAndControlled(){return this._includeSkosNotationForLinksAndControlled}}t.JsonWriterBehavior=a},7639(e,t){t.ReaderWriterBehavior=void 0,t.ReaderWriterBehavior=class{_useWarningForKnownIssues;constructor(e){this._useWarningForKnownIssues=e}useWarningForKnownIssues(){return this._useWarningForKnownIssues}}},1395(e,t,r){t.YamlReaderBehavior=t.L=void 0;const n=r(7639);t.L={STRICT:"strict"};class a extends n.ReaderWriterBehavior{value;constructor(e,t){super(t),this.value=e}getValue(){return this.value}static STRICT=new a(t.L.STRICT,!1)}t.YamlReaderBehavior=a},9411(e,t,r){t.YamlWriterBehavior=t.D=void 0;const n=r(7639);t.D={STRICT:"strict"};class a extends n.ReaderWriterBehavior{value;constructor(e,t){super(t),this.value=e}getValue(){return this.value}static STRICT=new a(t.D.STRICT,!1)}t.YamlWriterBehavior=a},6568(e,t,r){t.CedarBuilders=void 0;const n=r(766),a=r(1762),i=r(4925),s=r(7889),o=r(1259),l=r(345),d=r(2875),c=r(8084),u=r(3675),m=r(9497),p=r(1667),h=r(2052),f=r(4675),y=r(9916),T=r(3138),C=r(2703),E=r(9521),g=r(5795),I=r(7674),A=r(9105),b=r(1513),R=r(7328),S=r(2376),v=r(3914),_=r(7162),N=r(3474),w=r(9062),L=r(6610);t.CedarBuilders=class{static templateBuilder(){return new n.TemplateBuilder}static templateElementBuilder(){return new a.TemplateElementBuilder}static templateInstanceBuilder(){return new i.TemplateInstanceBuilder}static textFieldBuilder(){return s.TextFieldBuilderImpl.create()}static textAreaBuilder(){return o.TextAreaBuilderImpl.create()}static temporalFieldBuilder(){return l.TemporalFieldBuilderImpl.create()}static phoneNumberFieldBuilder(){return c.PhoneNumberFieldBuilderImpl.create()}static numericFieldBuilder(){return u.NumericFieldBuilderImpl.create()}static emailFieldBuilder(){return p.EmailFieldBuilderImpl.create()}static attributeValueFieldBuilder(){return h.AttributeValueFieldBuilderImpl.create()}static youtubeFieldBuilder(){return I.StaticYoutubeFieldBuilderImpl.create()}static sectionBreakFieldBuilder(){return g.StaticSectionBreakFieldBuilderImpl.create()}static richTextFieldBuilder(){return E.StaticRichTextFieldBuilderImpl.create()}static pageBreakFieldBuilder(){return C.StaticPageBreakFieldBuilderImpl.create()}static imageFieldBuilder(){return T.StaticImageFieldBuilderImpl.create()}static linkFieldBuilder(){return m.LinkFieldBuilderImpl.create()}static extRorFieldBuilder(){return R.ExtRorFieldBuilderImpl.create()}static extOrcidFieldBuilder(){return S.ExtOrcidFieldBuilderImpl.create()}static extPfasFieldBuilder(){return v.ExtPfasFieldBuilderImpl.create()}static extPubmedFieldBuilder(){return _.ExtPubmedFieldBuilderImpl.create()}static extRridFieldBuilder(){return N.ExtRridFieldBuilderImpl.create()}static extNihGrantIdFieldBuilder(){return w.ExtNihGrantIdFieldBuilderImpl.create()}static extDoiFieldBuilder(){return L.ExtDoiFieldBuilderImpl.create()}static singleChoiceListFieldBuilder(){return A.SingleChoiceListFieldBuilderImpl.create()}static multipleChoiceListFieldBuilder(){return b.MultipleChoiceListFieldBuilderImpl.create()}static radioFieldBuilder(){return d.RadioFieldBuilderImpl.create()}static checkboxFieldBuilder(){return f.CheckboxFieldBuilderImpl.create()}static controlledTermFieldBuilder(){return y.ControlledTermFieldBuilderImpl.create()}}},1998(e,t,r){t.CedarReaders=void 0;const n=r(2103),a=r(8639);t.CedarReaders=class{static json(){return n.CedarJsonReaders}static yaml(){return a.CedarYamlReaders}}},8446(e,t,r){t.IriSyntax=void 0;const n=r(8748);t.IriSyntax=class{constructor(){}static isValid(e){if(""===e)return!1;try{return n.ReaderUtil.assertIdentifier(e,"value"),!0}catch{return!1}}}},8748(e,t,r){t.ReaderUtil=void 0;const n=r(9517),a=r(8802);t.ReaderUtil=class{static assertIdentifierCharacters(e,t){if(null!==e){if(Array.from(e).some(e=>e.charCodeAt(0)<=32||e.charCodeAt(0)>=127&&e.charCodeAt(0)<=159||/\p{Z}/u.test(e)))throw new Error(`Invalid URI at "${t}": unescaped space or control character.`);if(e.indexOf("#")!==e.lastIndexOf("#"))throw new Error(`Invalid URI at "${t}": more than one fragment delimiter.`);if(e.split(/[/?#]/,1)[0].includes(":")&&!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e))throw new Error(`Invalid URI at "${t}": malformed scheme.`)}}static assertFieldIri(e,t){if(null===e)return;if(""===e)throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);if("string"!=typeof e)throw new Error(`Invalid URI/IRI at "${t}": expected string.`);let r=!1,n=!1;for(const a of e){const e=a.codePointAt(0);if("#"===a?(n=!0,r=!1):"?"!==a||n||(r=!0),e<128){if(e<=32||127===e||'<>"{}|\\^`'.includes(a))throw new Error(`Invalid URI/IRI at "${t}": unescaped space, control or forbidden character.`)}else if(!(e>=160&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65519||e>=65536&&e<=917501&&(65535&e)<=65533||e>=921600&&e<=983037||r&&(e>=57344&&e<=63743||e>=983040&&e<=1048573||e>=1048576&&e<=1114109)))throw new Error(`Invalid URI/IRI at "${t}": forbidden Unicode character.`)}if(/%(?![0-9a-fA-F]{2})/.test(e))throw new Error(`Invalid URI/IRI at "${t}": malformed percent escape.`);const a=Array.from(e,e=>e.codePointAt(0)>=128?encodeURIComponent(e):e).join("");this.assertIdentifierCharacters(a,t)}static assertIri(e,t){if(null!==e&&""!==e){if("string"!=typeof e)throw new Error(`Invalid URI at "${t}": expected a string.`);this.assertFieldIri(e,t),this.assertIdentifierCharacters(e,t)}}static getIri(e,t){const r=this.getString(e,t);return this.assertIri(r,t),r}static assertIdentifier(e,t){if(null!==e){if("string"!=typeof e)throw new Error(`Invalid URI at "${t}": expected a string.`);if(""===e)throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);if(this.assertIri(e,t),!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e))throw new Error(`Invalid URI at "${t}": an identifier must be an absolute IRI.`)}}static getIdentifier(e,t){const r=this.getString(e,t);return this.assertIdentifier(r,t),r}static getArtifactIdentifier(e,t,r){return r?this.getIri(e,t):this.getIdentifier(e,t)}static getString(e,t){return Object.hasOwn(e,t)?e[t]:null}static getSingleType(e,t){if(!Object.hasOwn(e,t))return null;const r=e[t];if(!Array.isArray(r))return r;if(r.length>1)throw new Error(`A field value can have at most one ${t}.`);return 1===r.length?r[0]:null}static getStringOrEmpty(e,t){return Object.hasOwn(e,t)?e[t]:""}static getBoolean(e,t){return!!Object.hasOwn(e,t)&&e[t]}static getBooleanOrNullOrUndefined(e,t){return Object.hasOwn(e,t)?null===e[t]?null:e[t]:void 0}static getBooleanOrNull(e,t){return Object.hasOwn(e,t)?null===e[t]?null:e[t]:null}static getNumber(e,t){return Object.hasOwn(e,t)?e[t]:null}static getNumericDefault(e,t){if(!Object.hasOwn(e,t)||null===e[t]||void 0===e[t])return null;const r=e[t];if("number"==typeof r){if(Number.isFinite(r))return r;throw new Error(`Numeric default at "${t}" must be finite.`)}if("string"==typeof r){const e=r.trim();if(""===e)return null;if(!/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/.test(e))throw new Error(`Numeric default at "${t}" is not a valid number: "${r}".`);const n=Number(e);if(Number.isFinite(n))return n;throw new Error(`Numeric default at "${t}" must be finite.`)}throw new Error(`Numeric default at "${t}" must be a number or numeric string.`)}static getNumberOrZero(e,t){return Object.hasOwn(e,t)?e[t]:0}static getNumberOrNull(e,t){return Object.hasOwn(e,t)?e[t]:null}static getNode(e,t){return Object.hasOwn(e,t)?e[t]:n.JsonNode.getEmpty()}static getNodeOrNull(e,t){return Object.hasOwn(e,t)?e[t]:null}static getStringList(e,t){return Object.hasOwn(e,t)&&Array.isArray(e[t])?e[t]:[]}static getFilteredStringList(e,t){return Object.hasOwn(e,t)&&Array.isArray(e[t])?e[t].filter(e=>""!==e.trim()):[]}static getStringMap(e,t){if(Object.hasOwn(e,t)&&"object"==typeof e[t]&&!Array.isArray(e[t])&&null!==e[t]){const r=e[t],n=Object.entries(r),a=new Map;for(const[e,t]of n)a.set(e,t);return a}return new Map}static deepClone(e){return this.deepUnfreeze(e)}static deepUnfreeze(e){if(null===e||"object"!=typeof e&&"function"!=typeof e)return e;const t=Array.isArray(e)?e.slice():{...e};return Object.getOwnPropertyNames(t).forEach(e=>{t[e]=this.deepUnfreeze(t[e])}),t}static deepFreeze(e){return Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const r=e[t];null===r||"object"!=typeof r&&"function"!=typeof r||Object.isFrozen(r)||this.deepFreeze(r)}),e}static getNodeList(e,t){return Object.hasOwn(e,t)&&Array.isArray(e[t])?e[t]:n.JsonNode.getEmptyList()}static getURI(e,t){const r=this.getStringOrEmpty(e,t);return this.assertIri(r,t),new a.Iri(r)}static getIdentifierURI(e,t){const r=this.getStringOrEmpty(e,t);return this.assertIdentifier(null===r?"":r,t),new a.Iri(r)}static deleteNodeKey(e,t){Object.hasOwn(e,t)&&delete e[t]}}},797(e,t,r){t.applySchemaReaderDefaults=function(e,t,r,s){if(!r.equal(new n.JsonPath))return;const o="json"===s?"bibo:status":"status";null==t["json"===s?"pav:version":"version"]&&(e.pav_version=a.PavVersion.DEFAULT),null==t[o]&&(e.bibo_status=i.BiboStatus.DRAFT)};const n=r(3188),a=r(1027),i=r(3910)},2103(e,t,r){t.CedarJsonReaders=void 0;const n=r(2763),a=r(8748),i=r(2733),s=r(5291),o=r(7909),l=r(5846),d=r(9232),c=r(4381);class u{behavior;constructor(e){this.behavior=e}static getStrict(){return new u(l.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new u(l.JsonReaderBehavior.FEBRUARY_2024)}static detectArtifactType(e){let t;if(t="string"==typeof e?JSON.parse(e):e,t&&t["@type"]){const e=a.ReaderUtil.getString(t,i.JsonSchema.atType);return n.CedarArtifactType.forValue(e)}return n.CedarArtifactType.NULL}getReaderForArtifactType(e){switch(e){case n.CedarArtifactType.TEMPLATE:return s.JsonTemplateReader.getStrict();case n.CedarArtifactType.TEMPLATE_ELEMENT:return o.JsonTemplateElementReader.getStrict();case n.CedarArtifactType.TEMPLATE_FIELD:case n.CedarArtifactType.STATIC_TEMPLATE_FIELD:return c.JsonTemplateFieldReader.getStrict();case n.CedarArtifactType.TEMPLATE_INSTANCE:return d.JsonTemplateInstanceReader.getStrict();default:throw new Error(`No JSON reader available for CedarArtifactType: ${e}`)}}getTemplateReader(){return s.JsonTemplateReader.getForBehavior(this.behavior)}getTemplateElementReader(){return o.JsonTemplateElementReader.getForBehavior(this.behavior)}getTemplateFieldReader(){return c.JsonTemplateFieldReader.getForBehavior(this.behavior)}getTemplateInstanceReader(){return d.JsonTemplateInstanceReader.getForBehavior(this.behavior)}}t.CedarJsonReaders=u},7993(e,t,r){t.JsonAbstractArtifactReader=void 0;const n=r(8534),a=r(8748),i=r(2733),s=r(2234),o=r(9857),l=r(2763),d=r(5226),c=r(936),u=r(2787),m=r(3549);class p{static refuseEmptyIdentifier(e,t=i.JsonSchema.atId){const r=a.ReaderUtil.getString(e,t);if(null!==r&&"string"!=typeof r)throw new Error(`Invalid URI at "${t}": expected a string.`);if(null!==r&&""===r.trim())throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);a.ReaderUtil.assertIri(r,t)}behavior;knownArtifactType=l.CedarArtifactType.NULL;get lenient(){return this.behavior.useWarningForKnownIssues()}constructor(e){this.behavior=e}readNonReportableAttributes(e,t){p.refuseEmptyIdentifier(t),e.at_id=n.CedarArtifactId.forValue(a.ReaderUtil.getString(t,i.JsonSchema.atId)),e.schema_name=a.ReaderUtil.getString(t,i.JsonSchema.schemaName),e.schema_description=a.ReaderUtil.getStringOrEmpty(t,i.JsonSchema.schemaDescription),e.pav_createdBy=s.CedarUser.forValue(a.ReaderUtil.getString(t,i.JsonSchema.pavCreatedBy)),e.pav_createdOn=o.IsoDate.forValue(a.ReaderUtil.getString(t,i.JsonSchema.pavCreatedOn)),e.oslc_modifiedBy=s.CedarUser.forValue(a.ReaderUtil.getString(t,i.JsonSchema.oslcModifiedBy)),e.pav_lastUpdatedOn=o.IsoDate.forValue(a.ReaderUtil.getString(t,i.JsonSchema.pavLastUpdatedOn))}readAnnotations(e,t){const r=new d.Annotations,n=a.ReaderUtil.getNodeOrNull(t,c.CedarModel.annotations);null!==n&&Object.keys(n).forEach(e=>{const t=n[e];if(null===t||"object"!=typeof t||Array.isArray(t))throw new Error(`Value of annotation must be an object at /_annotations/${e}`);const s=a.ReaderUtil.getNode(n,e),o=a.ReaderUtil.getString(s,i.JsonSchema.atId);if(null!==o)r.add(new u.AnnotationAtId(e,o));else{const t=a.ReaderUtil.getString(s,i.JsonSchema.atValue);if(null===t)throw new Error(`Value of annotation must contain an @id or @value at /_annotations/${e}`);r.add(new m.AnnotationAtValue(e,t))}}),r.getSize()>0&&(e.annotations=r)}}t.JsonAbstractArtifactReader=p},3326(e,t,r){t.JsonAbstractInstanceArtifactReader=void 0;const n=r(8534),a=r(8748),i=r(2733),s=r(7993);class o extends s.JsonAbstractArtifactReader{constructor(e){super(e)}readNonReportableAttributes(e,t){a.ReaderUtil.getArtifactIdentifier(t,i.JsonSchema.atId,this.lenient),super.readNonReportableAttributes(e,t),e.schema_isBasedOn=n.CedarArtifactId.forValue(a.ReaderUtil.getArtifactIdentifier(t,i.JsonSchema.schemaIsBasedOn,this.lenient)),e.pav_derivedFrom=n.CedarArtifactId.forValue(a.ReaderUtil.getArtifactIdentifier(t,i.JsonSchema.pavDerivedFrom,this.lenient))}}t.JsonAbstractInstanceArtifactReader=o},978(e,t,r){t.JsonAbstractSchemaArtifactReader=void 0;const n=r(4443),a=r(8333),i=r(8534),s=r(8748),o=r(2733),l=r(5747),d=r(8557),c=r(1027),u=r(3910),m=r(7993);class p extends m.JsonAbstractArtifactReader{constructor(e){super(e)}readNonReportableAttributes(e,t){e.extensions=n.SchemaExtensions.fromJson(t),super.readNonReportableAttributes(e,t),e.title=null===e.schema_name?null:(0,a.internalNameFor)(e.schema_name,this.artifactTypeWord()),e.description=s.ReaderUtil.getString(t,l.TemplateProperty.description),e.schema_schemaVersion=d.SchemaVersion.forValue(s.ReaderUtil.getString(t,o.JsonSchema.schemaVersion)),e.pav_version=c.PavVersion.forValue(s.ReaderUtil.getString(t,o.JsonSchema.pavVersion)),e.bibo_status=u.BiboStatus.forJsonValue(s.ReaderUtil.getString(t,o.JsonSchema.biboStatus)),e.pav_derivedFrom=i.CedarArtifactId.forValue(s.ReaderUtil.getArtifactIdentifier(t,o.JsonSchema.pavDerivedFrom,this.lenient)),e.pav_previousVersion=i.CedarArtifactId.forValue(this.lenient?s.ReaderUtil.getString(t,o.JsonSchema.pavPreviousVersion):s.ReaderUtil.getIdentifier(t,o.JsonSchema.pavPreviousVersion)),e.schema_identifier=s.ReaderUtil.getString(t,o.JsonSchema.schemaIdentifier)}}t.JsonAbstractSchemaArtifactReader=p},8518(e,t){t.JsonArtifactReaderResult=void 0,t.JsonArtifactReaderResult=class{_artifact;_parsingResult;_artifactSourceObject;constructor(e,t,r){this._artifact=e,this._parsingResult=t,this._artifactSourceObject=r}get artifact(){return this._artifact}get parsingResult(){return this._parsingResult}get artifactSourceObject(){return this._artifactSourceObject}}},5510(e,t,r){t.JsonContainerArtifactReader=void 0;const n=r(5588),a=r(978),i=r(1492),s=r(455),o=r(2763),l=r(8748),d=r(2733),c=r(936),u=r(9034),m=r(2888),p=r(9760),h=r(3056),f=r(5793),y=r(2475),T=r(6968),C=r(3812),E=r(3608),g=r(3239),I=r(9519),A=r(7752),b=r(8220),R=new Set([o.CedarArtifactType.TEMPLATE.getValue(),o.CedarArtifactType.TEMPLATE_ELEMENT.getValue(),o.CedarArtifactType.TEMPLATE_FIELD.getValue(),o.CedarArtifactType.STATIC_TEMPLATE_FIELD.getValue()]);class S extends a.JsonAbstractSchemaArtifactReader{artifactTypeWord(){return this.knownArtifactType===o.CedarArtifactType.TEMPLATE?"template":"element"}fieldReader;constructor(e){super(e),this.fieldReader=b.JsonTemplateFieldReaderInternal.getForBehavior(e)}readAndStoreCandidateChildInfo(e,t,r,n,a){const i=o.CedarArtifactType.forValue(l.ReaderUtil.getString(e,d.JsonSchema.atType));if(i!==o.CedarArtifactType.NULL){const r=new s.ChildDeploymentInfo(t);r.atType=i;const a=l.ReaderUtil.getNode(e,c.CedarModel.ui);return r.uiInputType=u.UiInputType.forValue(l.ReaderUtil.getString(a,c.CedarModel.inputType)),r.hidden=l.ReaderUtil.getBoolean(a,c.CedarModel.Ui.hidden),n.add(r),r}return this.reportBlueprintDifference(r,new m.ComparisonError("jtr09",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,a.add(t,d.JsonSchema.atType))),null}readReportableAttributes(e,t,r,n){h.JsonObjectComparator.comparePrimitive(r,this.knownArtifactType.getValue(),l.ReaderUtil.getString(t,d.JsonSchema.atType),n.add(d.JsonSchema.atType));const a=l.ReaderUtil.getNode(t,d.JsonSchema.atContext),i=T.JsonContainerArtifactContent.CONTEXT_VERBATIM;h.JsonObjectComparator.compareBothWays(r,i,a,n.add(d.JsonSchema.atContext),this.behavior,[d.JsonSchema.atLanguage,...Object.keys(e.extensions.prefixes)]),h.JsonObjectComparator.comparePrimitive(r,f.JavascriptType.OBJECT.getValue(),l.ReaderUtil.getString(t,c.CedarModel.type),n.add(c.CedarModel.type)),h.JsonObjectComparator.comparePrimitive(r,y.ArtifactSchema.CURRENT.getValue(),l.ReaderUtil.getString(t,c.CedarModel.schema),n.add(c.CedarModel.schema)),e.language=A.Language.forValue(l.ReaderUtil.getString(a,d.JsonSchema.atLanguage))}parseChildren(e,t,r,n,a){for(const i of e.children){let e=l.ReaderUtil.getNode(t,i.name),c=a.add(d.JsonSchema.properties,i.name);if(i.isMultiInAnyWay()&&(e=l.ReaderUtil.getNode(e,d.JsonSchema.items),c=c.add(d.JsonSchema.items)),i.atType===o.CedarArtifactType.STATIC_TEMPLATE_FIELD){const t=this.fieldReader.readFromObjectInternal(e,i,c),a=t.field.createDeploymentBuilder(i.name).withLabel(i.label).withDescription(i.description);a.withHidden(i.hidden);const s=a.build();r.addChild(t.field,s),n.merge(t.parsingResult)}else if(i.atType===o.CedarArtifactType.TEMPLATE_FIELD){const t=this.fieldReader.readFromObjectInternal(e,i,c),a=t.field.createDeploymentBuilder(i.name),o=i;a.withIri(o.iri).withLabel(i.label).withDescription(i.description),i instanceof I.AbstractFieldChildDeploymentInfo&&a.withHidden(i.hidden).withRequiredValue(i.requiredValue).withRecommendedValue(i.recommendedValue).withContinuePreviousLine(i.continuePreviousLine).withValueRecommendationEnabled(i.valueRecommendationEnabled),a instanceof E.ChildDeploymentInfoBuilder&&i instanceof s.ChildDeploymentInfo?a.withMultiInstance(i.multiInstance).withMinItems(i.minItems).withMaxItems(i.maxItems):a instanceof g.ChildDeploymentInfoAlwaysMultipleBuilder&&a.withMinItems(o.minItems).withMaxItems(o.maxItems);const l=a.build();r.addChild(t.field,l),n.merge(t.parsingResult)}else if(i.atType===o.CedarArtifactType.TEMPLATE_ELEMENT){const t=this.getElementReader().readFromObject(e,c),a=t.element.createDeploymentBuilder(i.name).withLabel(i.label).withDescription(i.description);i instanceof C.AbstractDynamicChildDeploymentInfo&&a.withIri(i.iri),i instanceof s.ChildDeploymentInfo&&a.withMultiInstance(i.multiInstance).withMinItems(i.minItems).withMaxItems(i.maxItems),r.addChild(t.element,a.build()),n.merge(t.parsingResult)}}}validatePropertiesVsOrder(e,t,r,n){for(const a of e.children)t.includes(a.name)||this.reportBlueprintDifference(r,new m.ComparisonError("jtr08",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n.add(c.CedarModel.ui,c.CedarModel.order),a.name,null))}finalizeChildInfo(e,t,r,n){const a=new i.ContainerArtifactChildrenInfo;for(const i of e){const e=t.get(i);null!=e?a.add(e):this.reportBlueprintDifference(r,new m.ComparisonError("jtr07",p.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,n.add(c.CedarModel.ui,c.CedarModel.order),null,i))}return a}getCandidateChildrenInfo(e,t,r,a){const s=new i.ContainerArtifactChildrenInfo;return Object.keys(e).forEach(i=>{if(n.ReservedNames.isReservedName(i)){const t=l.ReaderUtil.getNode(e,i),r="array"===l.ReaderUtil.getString(t,d.JsonSchema.type)?l.ReaderUtil.getNode(t,d.JsonSchema.items):t,n=r?.[d.JsonSchema.atType];if((Array.isArray(n)?n:[n]).some(e=>R.has(e)))throw new Error(`Child schema uses a reserved instance property name at ${a.add(d.JsonSchema.properties,i).toString()}`)}if(!t.has(i)){const t=l.ReaderUtil.getNode(e,i);if("object"==typeof t&&null!==t){let e=t;const n=l.ReaderUtil.getString(t,d.JsonSchema.type);if("object"==n)this.readAndStoreCandidateChildInfo(e,i,r,s,a.add(d.JsonSchema.properties,i));else if("array"==n){e=l.ReaderUtil.getNode(t,d.JsonSchema.items);const n=this.readAndStoreCandidateChildInfo(e,i,r,s,a.add(d.JsonSchema.properties,i,d.JsonSchema.items));null!==n&&(n.multiInstance=!0,n.minItems=l.ReaderUtil.getNumber(t,c.CedarModel.minItems),n.maxItems=l.ReaderUtil.getNumber(t,c.CedarModel.maxItems))}}}}),s}generateAndValidateRequiredMap(e,t,r,n){const a=e.reduce((e,t)=>(e.set(t,!0),e),new Map);for(const e of t)a.has(e)||this.reportBlueprintDifference(r,new m.ComparisonError("jtr01",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n.add(d.JsonSchema.required),e));return a}checkRequiredBothWays(e,t,r,n,a,i){const s=e.getChildrenNamesForRequired();for(const e of s)t.has(e)||this.reportBlueprintDifference(a,new m.ComparisonError("jtr02",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,i.add(d.JsonSchema.required),e));for(const t of r)n.has(t)||e.has(t)||this.reportBlueprintDifference(a,new m.ComparisonError("jtr03",p.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,i.add(d.JsonSchema.required),t))}extractUIPreferredLabelsAndDescriptions(e,t,r,n){const a=l.ReaderUtil.getStringMap(e,c.CedarModel.propertyLabels);if(null!==a)for(const e of t.children)a.has(e.name)&&(e.label=a.get(e.name)??null);const i=l.ReaderUtil.getStringMap(e,c.CedarModel.propertyDescriptions);if(null!==i)for(const e of t.children)i.has(e.name)&&(e.description=i.get(e.name)??null)}reportBlueprintDifference(e,t){this.behavior.useWarningForKnownIssues()&&h.JsonObjectComparator.isKnownProductionVariation(t.errorPath)?e.addBlueprintComparisonWarning(t):e.addBlueprintComparisonError(t)}extractIRIMappings(e,t,r,n){const a=l.ReaderUtil.getNode(e,d.JsonSchema.atContext),i=l.ReaderUtil.getNode(a,d.JsonSchema.properties);for(const e of t.children)if(this.includeInIRIMapping(e)){if(null===i||!Object.hasOwn(i,e.name))continue;const t=l.ReaderUtil.getNode(i,e.name),a=l.ReaderUtil.getStringList(t,d.JsonSchema.enum);null===a||1!=a.length?this.reportBlueprintDifference(r,new m.ComparisonError("jtr06",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n.add(d.JsonSchema.properties,d.JsonSchema.atContext,d.JsonSchema.properties,e.name,d.JsonSchema.enum,0))):e instanceof C.AbstractDynamicChildDeploymentInfo&&(l.ReaderUtil.assertIdentifier(a[0],d.JsonSchema.enum),e.iri=a[0])}}readInstanceTypeSpecification(e,t,r){const n=l.ReaderUtil.getNode(t,d.JsonSchema.properties);if(null!==n){const t=l.ReaderUtil.getNode(n,d.JsonSchema.atType);if(null!==t){const r=l.ReaderUtil.getNodeList(t,d.JsonSchema.oneOf);null!==r&&r.forEach(t=>{const r=l.ReaderUtil.getStringList(t,d.JsonSchema.enum);if(Object.hasOwn(t,d.JsonSchema.enum)){if(!Array.isArray(t[d.JsonSchema.enum])||0===r.length)throw new Error("Instance types must be a nonempty array of IRIs");e.instanceTypeSpecifications=r}})}}}}t.JsonContainerArtifactReader=S},7909(e,t,r){t.JsonTemplateElementReader=void 0;const n=r(797),a=r(936),i=r(2733),s=r(2763),o=r(5747),l=r(8748),d=r(3056),c=r(4036),u=r(3188),m=r(5846),p=r(9932),h=r(4948),f=r(7661),y=r(5510),T=r(1501);class C extends y.JsonContainerArtifactReader{knownArtifactType=s.CedarArtifactType.TEMPLATE_ELEMENT;constructor(e){super(e)}static getStrict(){return new C(m.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new C(m.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new C(e)}getElementReader(){return this}includeInIRIMapping(e){return e.atType!==s.CedarArtifactType.STATIC_TEMPLATE_FIELD}readFromString(e){let t;try{t=JSON.parse(e)}catch{t={}}return this.readFromObject(t,new u.JsonPath)}readFromObject(e,t=new u.JsonPath){const r=new c.JsonArtifactParsingResult,a=f.TemplateElement.buildEmptyWithNullValues();return null===t.getLastComponent()&&l.ReaderUtil.getArtifactIdentifier(e,i.JsonSchema.atId,this.lenient),this.readNonReportableAttributes(a,e),(0,n.applySchemaReaderDefaults)(a,e,t,"json"),this.readReportableAttributes(a,e,r,t),this.readAnnotations(a,e),this.readInstanceTypeSpecification(a,e,r),this.readAndValidateChildrenInfo(a,e,r,t),new h.JsonTemplateElementReaderResult(a,r,e)}readNonReportableAttributes(e,t){e.skos_prefLabel=l.ReaderUtil.getString(t,a.CedarModel.skosPrefLabel),e.skos_altLabel=l.ReaderUtil.getFilteredStringList(t,a.CedarModel.skosAltLabel);const r=l.ReaderUtil.getNode(t,a.CedarModel.ui);null!==r&&(e.header=l.ReaderUtil.getString(r,a.CedarModel.header),e.footer=l.ReaderUtil.getString(r,a.CedarModel.footer)),super.readNonReportableAttributes(e,t)}readAndValidateChildrenInfo(e,t,r,n){const s=l.ReaderUtil.getStringList(t,i.JsonSchema.required),o=l.ReaderUtil.getNode(t,i.JsonSchema.properties),d=this.generateAndValidateRequiredMap(s,T.JsonTemplateElementContent.REQUIRED_PARTIAL,r,n),c=this.getCandidateChildrenInfo(o,T.JsonTemplateElementContent.PROPERTIES_PARTIAL_KEY_MAP,r,n);this.checkRequiredBothWays(c,d,s,T.JsonTemplateElementContent.REQUIRED_PARTIAL_KEY_MAP,r,n);const u=l.ReaderUtil.getNode(t,a.CedarModel.ui);this.extractUIPreferredLabelsAndDescriptions(u,c,r,n),this.extractIRIMappings(o,c,r,n);const m=l.ReaderUtil.getStringList(u,a.CedarModel.order),p=this.finalizeChildInfo(m,c,r,n);this.validatePropertiesVsOrder(c,m,r,n),this.validateProperties(p,o,e,r,n),this.parseChildren(p,o,e,r,n)}validateProperties(e,t,r,n,a){const s=l.ReaderUtil.deepClone(T.JsonTemplateElementContent.PROPERTIES_PARTIAL);e.hasAttributeValue()&&(s[i.JsonSchema.atContext][o.TemplateProperty.additionalProperties]=p.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE);const c=s[i.JsonSchema.atContext],u=l.ReaderUtil.getNodeList(c,i.JsonSchema.required);null!=u&&0==u.length&&l.ReaderUtil.deleteNodeKey(c,i.JsonSchema.required),T.JsonTemplateElementContent.acceptEitherIdTyping(s,t),d.JsonObjectComparator.compareToLeft(n,s,t,a.add(i.JsonSchema.properties),this.behavior)}}t.JsonTemplateElementReader=C},4948(e,t,r){t.JsonTemplateElementReaderResult=void 0;const n=r(8518);class a extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get element(){return this._artifact}get elementSourceObject(){return this._artifactSourceObject}}t.JsonTemplateElementReaderResult=a},4381(e,t,r){t.JsonTemplateFieldReader=void 0;const n=r(797),a=r(9517),i=r(4036),s=r(3188),o=r(8748),l=r(2733),d=r(5747),c=r(3056),u=r(2763),m=r(5793),p=r(936),h=r(2475),f=r(9932),y=r(9241),T=r(5933),C=r(6511),E=r(9148),g=r(6291),I=r(8596),A=r(7095),b=r(9251),R=r(9315),S=r(2691),v=r(1769),_=r(9683),N=r(1468),w=r(9053),L=r(9034),F=r(19),V=r(2419),O=r(9366),D=r(4869),M=r(8728),B=r(5846),U=r(6396),Y=r(855),x=r(978),J=r(455),P=r(7752),k=r(8244),W=r(4956),K=r(6854),j=r(3028),$=r(7004),X=r(1886),G=r(8583),q=r(6591),H=r(6731);class z extends x.JsonAbstractSchemaArtifactReader{artifactTypeWord(){return"field"}constructor(e){super(e)}static getStrict(){return new z(B.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new z(B.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new z(e)}static dynamicTypeReaderMap=new Map([[D.CedarFieldType.TEXT,new y.JsonFieldReaderTextField],[D.CedarFieldType.TEXTAREA,new _.JsonFieldReaderTextArea],[D.CedarFieldType.CONTROLLED_TERM,new M.JsonFieldReaderControlledTerm],[D.CedarFieldType.LINK,new A.JsonFieldReaderLink],[D.CedarFieldType.EXT_ROR,new k.JsonFieldReaderExtRor],[D.CedarFieldType.EXT_ORCID,new W.JsonFieldReaderExtOrcid],[D.CedarFieldType.EXT_PFAS,new K.JsonFieldReaderExtPfas],[D.CedarFieldType.EXT_PUBMED,new j.JsonFieldReaderExtPubmed],[D.CedarFieldType.EXT_RRID,new $.JsonFieldReaderExtRrid],[D.CedarFieldType.EXT_NIH_GRANT_ID,new X.JsonFieldReaderExtNihGrantId],[D.CedarFieldType.EXT_DOI,new G.JsonFieldReaderExtDoi],[D.CedarFieldType.TEMPORAL,new R.JsonFieldReaderTemporal],[D.CedarFieldType.EMAIL,new S.JsonFieldReaderEmail],[D.CedarFieldType.NUMERIC,new v.JsonFieldReaderNumeric],[D.CedarFieldType.PHONE_NUMBER,new N.JsonFieldReaderPhoneNumber],[D.CedarFieldType.RADIO,new w.JsonFieldReaderRadio],[D.CedarFieldType.CHECKBOX,new F.JsonFieldReaderCheckbox],[D.CedarFieldType.SINGLE_SELECT_LIST,new V.JsonFieldReaderList],[D.CedarFieldType.MULTIPLE_SELECT_LIST,new V.JsonFieldReaderList],[D.CedarFieldType.ATTRIBUTE_VALUE,new O.JsonFieldReaderAttributeValue],[D.CedarFieldType.STATIC_PAGE_BREAK,new T.JsonFieldReaderPageBreak],[D.CedarFieldType.STATIC_SECTION_BREAK,new C.JsonFieldReaderSectionBreak],[D.CedarFieldType.STATIC_IMAGE,new E.JsonFieldReaderImage],[D.CedarFieldType.STATIC_RICH_TEXT,new g.JsonFieldReaderRichText],[D.CedarFieldType.STATIC_YOUTUBE,new I.JsonFieldReaderYoutube]]);readFromString(e){let t;try{t=JSON.parse(e)}catch{t={}}return this.readFromObject(t)}readFromObject(e){const t=o.ReaderUtil.getNode(e,l.JsonSchema.items);"array"===e.type&&"attribute-value"===o.ReaderUtil.getNode(t,p.CedarModel.ui)[p.CedarModel.inputType]&&(e=t);const r=J.ChildDeploymentInfo.standalone(),n=new s.JsonPath;return this.readFromObjectInternal(e,r,n)}readFromObjectInternal(e,t,r){const a=new i.JsonArtifactParsingResult,s=z.readFieldSpecificAttributes(e,t,a,r);if(t instanceof J.ChildDeploymentInfo&&t.isStandalone()&&(s instanceof q.TextFieldImpl||s instanceof H.ControlledTermFieldImpl)&&(s.valueRecommendationEnabled=t.valueRecommendationEnabled),t instanceof J.ChildDeploymentInfo&&t.isStandalone()){const r=o.ReaderUtil.getNode(e,p.CedarModel.ui);s.hidden=o.ReaderUtil.getBoolean(r,p.CedarModel.Ui.hidden),s.continuePreviousLine=t.continuePreviousLine,s.cedarFieldType.recordsRequirement&&(s.requiredValue=t.requiredValue,s.recommendedValue=t.recommendedValue)}return t instanceof J.ChildDeploymentInfo&&t.isStandalone()&&o.ReaderUtil.getArtifactIdentifier(e,l.JsonSchema.atId,this.lenient),this.readNonReportableAttributes(s,e),(0,n.applySchemaReaderDefaults)(s,e,r,"json"),this.readReportableAttributes(s,e,a,r),this.readAnnotations(s,e),new U.JsonTemplateFieldReaderResult(s,a,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t),e.skos_prefLabel=o.ReaderUtil.getString(t,p.CedarModel.skosPrefLabel),e.skos_altLabel=o.ReaderUtil.getFilteredStringList(t,p.CedarModel.skosAltLabel)}readReportableAttributes(e,t,r,n){const i=o.ReaderUtil.getNode(t,l.JsonSchema.atContext);let s=a.JsonNode.getEmpty();e.cedarArtifactType==u.CedarArtifactType.TEMPLATE_FIELD?s=f.JsonTemplateFieldContentDynamic.CONTEXT_VERBATIM:e.cedarArtifactType==u.CedarArtifactType.STATIC_TEMPLATE_FIELD&&(s=b.JsonTemplateFieldContentStatic.CONTEXT_VERBATIM),c.JsonObjectComparator.compareBothWays(r,s,i,n.add(l.JsonSchema.atContext),this.behavior,[l.JsonSchema.atLanguage,...Object.keys(e.extensions.prefixes)]),e.cedarFieldType===D.CedarFieldType.ATTRIBUTE_VALUE?c.JsonObjectComparator.comparePrimitive(r,m.JavascriptType.STRING.getValue(),o.ReaderUtil.getString(t,p.CedarModel.type),n.add(p.CedarModel.type)):c.JsonObjectComparator.comparePrimitive(r,m.JavascriptType.OBJECT.getValue(),o.ReaderUtil.getString(t,p.CedarModel.type),n.add(p.CedarModel.type)),c.JsonObjectComparator.comparePrimitive(r,!1,o.ReaderUtil.getBoolean(t,d.TemplateProperty.additionalProperties),n.add(d.TemplateProperty.additionalProperties)),c.JsonObjectComparator.comparePrimitive(r,h.ArtifactSchema.CURRENT.getValue(),o.ReaderUtil.getString(t,p.CedarModel.schema),n.add(p.CedarModel.schema)),e.language=P.Language.forValue(o.ReaderUtil.getString(i,l.JsonSchema.atLanguage))}static readFieldSpecificAttributes(e,t,r,n){const a=u.CedarArtifactType.forValue(o.ReaderUtil.getString(e,l.JsonSchema.atType)),i=o.ReaderUtil.getNode(e,p.CedarModel.ui),s=o.ReaderUtil.getString(i,p.CedarModel.inputType),d=L.UiInputType.forValue(s),c=this.getCedarFieldType(e,d);if(c===D.CedarFieldType.NULL)throw new Error(`Unknown uiInputType type: "${s}"`);if((a==u.CedarArtifactType.TEMPLATE_FIELD||a==u.CedarArtifactType.STATIC_TEMPLATE_FIELD)&&null!=d){const a=this.dynamicTypeReaderMap.get(c);if(!a)throw new Error(`\n No reader defined for dynamic input type "${c.getValue()}"`);return a.read(e,t,r,n)}return Y.UnknownTemplateField.build()}static fieldHasValueConstraint(e){const t=o.ReaderUtil.getNode(e,p.CedarModel.valueConstraints);return o.ReaderUtil.getNodeList(t,p.CedarModel.ontologies).length>0||(o.ReaderUtil.getNodeList(t,p.CedarModel.branches).length>0||(o.ReaderUtil.getNodeList(t,p.CedarModel.classes).length>0||o.ReaderUtil.getNodeList(t,p.CedarModel.valueSets).length>0))}static getCedarFieldType(e,t){let r=D.CedarFieldType.forUiInputType(t);if(r===D.CedarFieldType.TEXT||r===D.CedarFieldType.CONTROLLED_TERM){const t=o.ReaderUtil.getNode(e,l.JsonSchema.properties);r=Object.prototype.hasOwnProperty.call(t,l.JsonSchema.atId)&&!Object.prototype.hasOwnProperty.call(t,l.JsonSchema.atValue)||this.fieldHasValueConstraint(e)?D.CedarFieldType.CONTROLLED_TERM:D.CedarFieldType.TEXT}return r}}t.JsonTemplateFieldReader=z},8220(e,t,r){t.JsonTemplateFieldReaderInternal=void 0;const n=r(3188),a=r(4381),i=r(455);class s extends a.JsonTemplateFieldReader{constructor(e){super(e)}static getForBehavior(e){return new s(e)}readFromObjectInternal(e,t,r){return t=t||i.ChildDeploymentInfo.standalone(),r=r||new n.JsonPath,super.readFromObjectInternal(e,t,r)}}t.JsonTemplateFieldReaderInternal=s},6396(e,t,r){t.JsonTemplateFieldReaderResult=void 0;const n=r(8518);class a extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get field(){return this._artifact}get fieldSourceObject(){return this._artifactSourceObject}}t.JsonTemplateFieldReaderResult=a},4385(e,t,r){t.JsonTemplateFieldTypeSpecificReader=void 0;const n=r(855),a=r(8748),i=r(936);t.JsonTemplateFieldTypeSpecificReader=class{read(e,t,r,a){return n.UnknownTemplateField.build()}readRequiredAndHidden(e,t){const r=a.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);null!=r&&(t.requiredValue=a.ReaderUtil.getBoolean(r,i.CedarModel.requiredValue),t.recommendedValue=a.ReaderUtil.getBoolean(r,i.CedarModel.ValueConstraints.recommendedValue));const n=a.ReaderUtil.getNode(e,i.CedarModel.ui);n&&(t.hidden=a.ReaderUtil.getBoolean(n,i.CedarModel.Ui.hidden),t.continuePreviousLine=a.ReaderUtil.getBoolean(n,i.CedarModel.Ui.continuePreviousLine),t.valueRecommendationEnabled=a.ReaderUtil.getBoolean(n,i.CedarModel.Ui.valueRecommendationEnabled))}}},9232(e,t,r){t.JsonTemplateInstanceReader=void 0;const n=r(1625),a=r(9167),i=r(2763),s=r(4036),o=r(2888),l=r(9760),d=r(3188),c=r(5846),u=r(3326),m=r(2272),p=r(6537),h=r(8748),f=r(2733),y=r(7723),T=r(5222),C=r(7571),E=r(7548),g=r(8193),I=r(4877),A=r(4465),b=r(3644),R=r(9327),S=r(936),v=r(350),_=r(4033);class N extends u.JsonAbstractInstanceArtifactReader{knownArtifactType=i.CedarArtifactType.TEMPLATE_INSTANCE;knownKeys={[f.JsonSchema.atId]:!0,[f.JsonSchema.atType]:!0,[f.JsonSchema.pavDerivedFrom]:!0,[f.JsonSchema.schemaIdentifier]:!0,[f.JsonSchema.oslcModifiedBy]:!0,[f.JsonSchema.pavLastUpdatedOn]:!0,[f.JsonSchema.pavCreatedBy]:!0,[f.JsonSchema.pavCreatedOn]:!0,[f.JsonSchema.schemaDescription]:!0,[f.JsonSchema.schemaName]:!0,[f.JsonSchema.schemaIsBasedOn]:!0,[f.JsonSchema.atContext]:!0,[S.CedarModel.annotations]:!0};constructor(e){super(e)}static getStrict(){return new N(c.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new N(c.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new N(e)}readFromString(e){let t;try{t=JSON.parse(e)}catch{t={}}return this.readFromObject(t,new d.JsonPath)}readFromObject(e,t){const r=new s.JsonArtifactParsingResult,n=m.TemplateInstance.buildEmptyWithNullValues();this.readNonReportableAttributes(n,e),n.descriptionWasAbsent=null===h.ReaderUtil.getString(e,f.JsonSchema.schemaDescription),n.schema_description=n.schema_description??"";const a=t??new d.JsonPath;return this.readInstanceData(e,n,a,r),N.reportEnvelope(e,a,r),new p.JsonTemplateInstanceReaderResult(n,r,e)}static ENVELOPE_KEYS=[f.JsonSchema.atContext,f.JsonSchema.atId,f.JsonSchema.schemaIsBasedOn,f.JsonSchema.pavCreatedOn,f.JsonSchema.pavCreatedBy,f.JsonSchema.oslcModifiedBy,f.JsonSchema.pavLastUpdatedOn];static reportEnvelope(e,t,r){for(const n of N.ENVELOPE_KEYS){if(!Object.hasOwn(e,n)){r.addBlueprintComparisonWarning(new o.ComparisonError("JsonTemplateInstanceReader",l.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,t.add(n),n));continue}const a=h.ReaderUtil.getNode(e,n);(null==a||n===f.JsonSchema.atContext&&0===Object.keys(a).length)&&r.addBlueprintComparisonWarning(new o.ComparisonError("JsonTemplateInstanceReader",l.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,t.add(n),n,null))}}readInstanceData(e,t,r,n){t.dataContainer=this.readInstanceContainer(e,r,n),this.readAnnotations(t,e)}readInstanceContainer(e,t,r){return this.parseContainer(e,t,r,"template")}isKnownKey(e){return Object.hasOwn(this.knownKeys,e)}parseContainer(e,t,r,n="element"){const a=new y.InstanceDataContainer;Object.keys(e).forEach(n=>{if(!this.isKnownKey(n)){const i=h.ReaderUtil.getNode(e,n);if(Array.isArray(i)){const e=[];a.setValue(n,e);const s=i.some(e=>null!==e&&"object"==typeof e&&Object.hasOwn(e,f.JsonSchema.atContext));i.forEach((a,i)=>{if(s){if(null===a||"object"!=typeof a||Array.isArray(a)||Object.hasOwn(a,f.JsonSchema.atValue))throw new Error(`Cannot mix fields and element instances in array "${n}" at index ${i}`);e[i]=this.parseContainer(a,t.add(n,i),r)}else e[i]=this.parseNode(a,t.add(n,i),r)})}else a.setValue(n,this.parseNode(i,t.add(n),r))}});for(const e of _.AttributeValueNamePolicy.findConflicts(a,n,!0).filter(e=>0===e.path.length))r.addBlueprintComparisonError(new o.ComparisonError("JsonTemplateInstanceReader",l.ComparisonErrorType.VALUE_MISMATCH,t.add(..._.AttributeValueNamePolicy.locationOf(e)),"a unique, non-reserved attribute-value name",e.name));this.packAttributeValues(a);const i=Object.hasOwn(e,f.JsonSchema.atContext)?h.ReaderUtil.getNode(e,f.JsonSchema.atContext):null;if(null!=i){const e=i;Object.keys(a.values).forEach(t=>{const r=h.ReaderUtil.getString(e,t);null!==r&&a.setIri(t,r)}),Object.keys(a.values).forEach(t=>{const r=a.values[t];r instanceof R.InstanceDataAttributeValueField&&Object.keys(r.values).forEach(t=>{const r=h.ReaderUtil.getString(e,t);null!==r&&a.setIri(t,r)})}),Object.keys(e).forEach(t=>{if(Object.hasOwn(v.JsonTemplateInstanceContent.CONTEXT_VERBATIM,t))return;const r=h.ReaderUtil.getString(e,t);null!==r&&a.setIri(t,r)})}if(Object.hasOwn(e,f.JsonSchema.atId)){const n=h.ReaderUtil.getString(e,f.JsonSchema.atId);if(null!==n){if("string"!=typeof n)throw new Error(`Invalid URI at "${f.JsonSchema.atId}": expected a string.`);""===n.trim()?(this.behavior.useWarningForKnownIssues()||N.refuseEmptyIdentifier(e),r.addBlueprintComparisonWarning(new o.ComparisonError("JsonTemplateInstanceReader",l.ComparisonErrorType.VALUE_MISMATCH,t.add(f.JsonSchema.atId),"an absolute IRI or null while the occurrence awaits server assignment",n))):this.lenient?h.ReaderUtil.assertIri(n,f.JsonSchema.atId):h.ReaderUtil.assertIdentifier(n,f.JsonSchema.atId),a.id=n}}return a}static VALUE_ATOM_KEYS=new Set([f.JsonSchema.atValue,f.JsonSchema.atLanguage,f.JsonSchema.atId,f.JsonSchema.rdfsLabel,f.JsonSchema.atType,S.CedarModel.skosNotation,S.CedarModel.skosPrefLabel]);static isValueNode(e){if(null==e)return!1;if("string"==typeof e)return!0;if(Object.hasOwn(e,f.JsonSchema.atValue))return!0;if(Object.hasOwn(e,f.JsonSchema.atContext))return!1;const t=Object.keys(e);return t.length>0&&t.every(e=>N.VALUE_ATOM_KEYS.has(e))}static readValueNode(e){return null==e?new A.InstanceDataEmptyNode:"string"==typeof e?new b.InstanceDataAttributeValueFieldName(e):N.isValueNode(e)?N.parseDataAtom(e):new A.InstanceDataEmptyNode}parseNode(e,t,r){if(null==e)return new A.InstanceDataEmptyNode;if("string"==typeof e)return new b.InstanceDataAttributeValueFieldName(e);if(N.isValueNode(e)){const n=N.parseDataAtom(e);return N.reportNullIri(n,t,r),n}return 0===Object.keys(e).length?new A.InstanceDataEmptyNode:this.parseContainer(e,t,r)}static reportNullIri(e,t,r){(e instanceof C.InstanceDataLinkAtom||e instanceof g.InstanceDataControlledAtom)&&null===e.id&&r.addBlueprintComparisonError(new o.ComparisonError("JsonTemplateInstanceReader",l.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,t.add(f.JsonSchema.atId),"an IRI",null))}static parseDataAtom(e){if(Object.hasOwn(e,f.JsonSchema.atId)&&Object.hasOwn(e,f.JsonSchema.atValue))throw new Error("A field cannot contain both @id and @value.");const t=this.parseDataAtomWithoutNotation(e);return"language"in t&&(t.language=h.ReaderUtil.getString(e,f.JsonSchema.atLanguage)),"preferredLabel"in t&&(t.preferredLabel=h.ReaderUtil.getString(e,S.CedarModel.skosPrefLabel)),!("notation"in t)||t instanceof n.InstanceDataNotationAtom||(t.notation=h.ReaderUtil.getString(e,f.JsonSchema.skosNotation)),t}static parseDataAtomWithoutNotation(e){if(Object.hasOwn(e,f.JsonSchema.atValue)){const t=h.ReaderUtil.getString(e,f.JsonSchema.atValue),r=h.ReaderUtil.getSingleType(e,f.JsonSchema.atType);return null===r?new T.InstanceDataStringAtom(t,h.ReaderUtil.getString(e,f.JsonSchema.rdfsLabel)):new I.InstanceDataTypedAtom(t,r,h.ReaderUtil.getString(e,f.JsonSchema.rdfsLabel))}if(Object.hasOwn(e,f.JsonSchema.atId)){h.ReaderUtil.assertFieldIri(h.ReaderUtil.getString(e,f.JsonSchema.atId),f.JsonSchema.atId);const t=h.ReaderUtil.getString(e,f.JsonSchema.atId),r=h.ReaderUtil.getString(e,f.JsonSchema.rdfsLabel);return null===r?C.InstanceDataLinkAtom.fromParsedNode(t,h.ReaderUtil.getSingleType(e,f.JsonSchema.atType)):g.InstanceDataControlledAtom.fromParsedNode(t,r,h.ReaderUtil.getSingleType(e,f.JsonSchema.atType))}const t=h.ReaderUtil.getString(e,f.JsonSchema.rdfsLabel);if(null!==t)return new a.InstanceDataLabelAtom(t,h.ReaderUtil.getSingleType(e,f.JsonSchema.atType));const r=h.ReaderUtil.getString(e,f.JsonSchema.skosNotation);return null!==r?new n.InstanceDataNotationAtom(r,h.ReaderUtil.getSingleType(e,f.JsonSchema.atType)):new E.InstanceDataEmptyAtom(e)}packAttributeValues(e){const t=e.values,r=[];Object.keys(t).forEach(e=>{const n=t[e];if(Array.isArray(n)){let a=!1;if(n.forEach((e,t)=>{e instanceof b.InstanceDataAttributeValueFieldName||(a=!0)}),n.length>0&&!a){const a=new R.InstanceDataAttributeValueField(e);r.push(a),n.forEach((e,r)=>{const n=e.name;if(null!==n&&Object.hasOwn(t,n)){const e=t[n];a.addValue(n,e)}})}}}),r.forEach((e,r)=>{const n=e.name;null!==n&&(t[n]=e,Object.keys(e.values).forEach(e=>{Object.hasOwn(t,e)&&delete t[e]}))}),e.values=t}}t.JsonTemplateInstanceReader=N},6537(e,t,r){t.JsonTemplateInstanceReaderResult=void 0;const n=r(8518);class a extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get instance(){return this._artifact}get instanceSourceObject(){return this._artifactSourceObject}}t.JsonTemplateInstanceReaderResult=a},5291(e,t,r){t.JsonTemplateReader=void 0;const n=r(797),a=r(936),i=r(2733),s=r(2763),o=r(5747),l=r(8748),d=r(6551),c=r(3056),u=r(4036),m=r(7954),p=r(3188),h=r(5846),f=r(9932),y=r(7909),T=r(5510),C=r(3281);class E extends T.JsonContainerArtifactReader{elementReader;knownArtifactType=s.CedarArtifactType.TEMPLATE;constructor(e){super(e),this.elementReader=y.JsonTemplateElementReader.getForBehavior(e)}static getStrict(){return new E(h.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new E(h.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new E(e)}getElementReader(){return this.elementReader}includeInIRIMapping(e){return e.atType!==s.CedarArtifactType.STATIC_TEMPLATE_FIELD}readFromString(e){let t;try{t=JSON.parse(e)}catch{t={}}return this.readFromObject(t)}readFromObject(e,t=new p.JsonPath){const r=new u.JsonArtifactParsingResult,a=C.Template.buildEmptyWithNullValues();return l.ReaderUtil.getArtifactIdentifier(e,i.JsonSchema.atId,this.lenient),this.readNonReportableAttributes(a,e),(0,n.applySchemaReaderDefaults)(a,e,t,"json"),this.readReportableAttributes(a,e,r,t),this.readAnnotations(a,e),this.readInstanceTypeSpecification(a,e,r),this.readAndValidateChildrenInfo(a,e,r,t),new m.JsonTemplateReaderResult(a,r,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t);const r=l.ReaderUtil.getNode(t,a.CedarModel.ui);null!==r&&(e.header=l.ReaderUtil.getString(r,a.CedarModel.header),e.footer=l.ReaderUtil.getString(r,a.CedarModel.footer))}readAndValidateChildrenInfo(e,t,r,n){const s=l.ReaderUtil.getStringList(t,i.JsonSchema.required),o=l.ReaderUtil.getNode(t,i.JsonSchema.properties),c=this.generateAndValidateRequiredMap(s,d.JsonTemplateContent.REQUIRED_PARTIAL,r,n),u=this.getCandidateChildrenInfo(o,d.JsonTemplateContent.PROPERTIES_PARTIAL_KEY_MAP,r,n);this.checkRequiredBothWays(u,c,s,d.JsonTemplateContent.REQUIRED_PARTIAL_KEY_MAP,r,n);const m=l.ReaderUtil.getNode(t,a.CedarModel.ui);this.extractUIPreferredLabelsAndDescriptions(m,u,r,n),this.extractIRIMappings(o,u,r,n);const p=l.ReaderUtil.getStringList(m,a.CedarModel.order),h=this.finalizeChildInfo(p,u,r,n);this.validatePropertiesVsOrder(u,p,r,n),this.validateProperties(h,o,e,r,n),this.parseChildren(h,o,e,r,n)}validateProperties(e,t,r,n,s){let u=l.ReaderUtil.deepClone(d.JsonTemplateContent.PROPERTIES_PARTIAL);e.hasAttributeValue()&&(u=l.ReaderUtil.deepClone(d.JsonTemplateContent.PROPERTIES_PARTIAL),u[i.JsonSchema.atContext][o.TemplateProperty.additionalProperties]=f.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE),a.CedarModel.annotations in t||delete u[a.CedarModel.annotations];const m=l.ReaderUtil.getNode(l.ReaderUtil.getNode(t,i.JsonSchema.atContext),i.JsonSchema.properties);a.CedarModel.annotations in m||delete l.ReaderUtil.getNode(l.ReaderUtil.getNode(u,i.JsonSchema.atContext),i.JsonSchema.properties)[a.CedarModel.annotations],c.JsonObjectComparator.compareToLeft(n,u,t,s.add(i.JsonSchema.properties),this.behavior)}}t.JsonTemplateReader=E},7954(e,t,r){t.JsonTemplateReaderResult=void 0;const n=r(8518);class a extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get template(){return this._artifact}get templateSourceObject(){return this._artifactSourceObject}}t.JsonTemplateReaderResult=a},8639(e,t,r){t.CedarYamlReaders=void 0;const n=r(2763),a=r(1395),i=r(5677),s=r(8239),o=r(2999),l=r(9946);class d{behavior;isCompact;constructor(e,t=!1){this.behavior=e,this.isCompact=t}static getStrict(){return new d(a.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new d(a.YamlReaderBehavior.STRICT,!0)}getTemplateReader(){return i.YamlTemplateReader.getForBehavior(this.behavior,this.isCompact)}getTemplateElementReader(){return s.YamlTemplateElementReader.getForBehavior(this.behavior,this.isCompact)}getTemplateFieldReader(){return o.YamlTemplateFieldReader.getForBehavior(this.behavior,this.isCompact)}getTemplateInstanceReader(){return l.YamlTemplateInstanceReader.getForBehavior(this.behavior)}getReaderForArtifactType(e){switch(e){case n.CedarArtifactType.TEMPLATE:return i.YamlTemplateReader.getForBehavior(this.behavior,this.isCompact);case n.CedarArtifactType.TEMPLATE_ELEMENT:return s.YamlTemplateElementReader.getForBehavior(this.behavior,this.isCompact);case n.CedarArtifactType.TEMPLATE_FIELD:case n.CedarArtifactType.STATIC_TEMPLATE_FIELD:return o.YamlTemplateFieldReader.getForBehavior(this.behavior,this.isCompact);case n.CedarArtifactType.TEMPLATE_INSTANCE:return l.YamlTemplateInstanceReader.getForBehavior(this.behavior);default:throw new Error(`No YAML reader available for CedarArtifactType: ${e}`)}}}t.CedarYamlReaders=d},6575(e,t,r){t.YamlAbstractArtifactReader=void 0;const n=r(4443),a=r(8333),i=r(8534),s=r(2234),o=r(9857),l=r(8557),d=r(1027),c=r(3910),u=r(2763),m=r(5226),p=r(2787),h=r(3549),f=r(8748),y=r(2099),T=r(7752);class C{behavior;knownArtifactType=u.CedarArtifactType.NULL;isCompact;constructor(e,t=!1){this.behavior=e,this.isCompact=t}artifactTypeWord(){return this.knownArtifactType===u.CedarArtifactType.TEMPLATE?"template":this.knownArtifactType===u.CedarArtifactType.TEMPLATE_ELEMENT?"element":"field"}readNonReportableAttributes(e,t){if(e.extensions=n.SchemaExtensions.fromYaml(t),C.refuseEmptyIdentifier(t),e.at_id=i.CedarArtifactId.forValue(f.ReaderUtil.getString(t,y.YamlKeys.id)),e.schema_name=f.ReaderUtil.getString(t,y.YamlKeys.name),e.schema_description=f.ReaderUtil.getStringOrEmpty(t,y.YamlKeys.description),null!==e.schema_name){const t=this.artifactTypeWord();e.title=(0,a.internalNameFor)(e.schema_name,t),e.description=`${e.schema_name} ${t} schema generated by the CEDAR Artifact Library`}e.pav_createdBy=s.CedarUser.forValue(f.ReaderUtil.getString(t,y.YamlKeys.createdBy)),e.pav_createdOn=o.IsoDate.forValue(f.ReaderUtil.getString(t,y.YamlKeys.createdOn)),e.oslc_modifiedBy=s.CedarUser.forValue(f.ReaderUtil.getString(t,y.YamlKeys.modifiedBy)),e.pav_lastUpdatedOn=o.IsoDate.forValue(f.ReaderUtil.getString(t,y.YamlKeys.modifiedOn));const r=f.ReaderUtil.getString(t,y.YamlKeys.modelVersion);if(null===r&&!this.isCompact)throw new Error(`No ${y.YamlKeys.modelVersion} present. A document without one is the compact form, which a reader has to be asked for.`);e.schema_schemaVersion=l.SchemaVersion.forValue(r),e.pav_version=d.PavVersion.forValue(f.ReaderUtil.getString(t,y.YamlKeys.version)),e.bibo_status=c.BiboStatus.forYamlValue(f.ReaderUtil.getString(t,y.YamlKeys.status)),e.pav_derivedFrom=i.CedarArtifactId.forValue(f.ReaderUtil.getArtifactIdentifier(t,y.YamlKeys.derivedFrom,this.behavior.useWarningForKnownIssues())),e.pav_previousVersion=i.CedarArtifactId.forValue(f.ReaderUtil.getIdentifier(t,y.YamlKeys.previousVersion)),e.schema_identifier=f.ReaderUtil.getString(t,y.YamlKeys.identifier),e.language=T.Language.forValue(f.ReaderUtil.getString(t,y.YamlKeys.language))}static refuseEmptyIdentifier(e,t=y.YamlKeys.id){const r=f.ReaderUtil.getString(e,t);if(null!==r&&"string"!=typeof r)throw new Error(`Invalid URI at "${t}": expected a string.`);if(null!==r&&""===r.trim())throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);f.ReaderUtil.assertIri(r,t)}readAnnotations(e,t,r,n){const a=new m.Annotations,i=f.ReaderUtil.getNode(t,y.YamlKeys.annotations);Object.keys(i).forEach(e=>{const t=i[e];if(null===t||"object"!=typeof t||Array.isArray(t))throw new Error(`Expected map value for annotation at /annotations/${e}`);const r=f.ReaderUtil.getNode(i,e),n=f.ReaderUtil.getString(r,y.YamlKeys.id),s=f.ReaderUtil.getString(r,y.YamlKeys.value);if(null!==e)if(null!==n)a.add(new p.AnnotationAtId(e,n));else{if(null===s)throw new Error(`Annotation must have either a value or id at /annotations/${e}`);a.add(new h.AnnotationAtValue(e,s))}}),a.getSize()>0&&(e.annotations=a)}}t.YamlAbstractArtifactReader=C},6532(e,t){t.YamlArtifactReaderResult=void 0,t.YamlArtifactReaderResult=class{_artifact;_parsingResult;_artifactSourceObject;constructor(e,t,r){this._artifact=e,this._parsingResult=t,this._artifactSourceObject=r}get artifact(){return this._artifact}get parsingResult(){return this._parsingResult}get artifactSourceObject(){return this._artifactSourceObject}}},9300(e,t,r){t.YamlContainerArtifactReader=void 0;const n=r(5588),a=r(6575),i=r(2999),s=r(455),o=r(2763),l=r(8748),d=r(2099),c=r(699),u=r(9499),m=r(4869),p=r(3239),h=r(8290),f=r(3608),y=r(513);class T extends a.YamlAbstractArtifactReader{fieldReader;constructor(e,t=!1){super(e,t),this.fieldReader=i.YamlTemplateFieldReader.getForBehavior(e,t)}readAndValidateChildrenInfo(e,t,r,a){l.ReaderUtil.getNodeList(t,d.YamlKeys.children).forEach(t=>{const r=l.ReaderUtil.getString(t,d.YamlKeys.type),i=l.ReaderUtil.getString(t,d.YamlKeys.key),C=u.YamlArtifactType.forValue(r);if(null===i)throw new Error(`A child without a ${d.YamlKeys.key} at ${a.add(d.YamlKeys.children).toString()}`);{if("string"!=typeof i)throw new Error(`Child key must be a string at ${a.add(d.YamlKeys.children,d.YamlKeys.key).toString()}`);if(n.ReservedNames.isReservedName(i))throw new Error(`Child schema uses a reserved instance property name at ${a.add(d.YamlKeys.children,i).toString()}`);const u=new s.ChildDeploymentInfo(i);u.atType=o.CedarArtifactType.forYamlArtifactType(C);const E=l.ReaderUtil.getNode(t,d.YamlKeys.configuration);if(u.label=l.ReaderUtil.getString(E,d.YamlKeys.overrideLabel),u.description=l.ReaderUtil.getString(E,d.YamlKeys.overrideDescription),u.multiInstance=l.ReaderUtil.getBoolean(E,d.YamlKeys.multiple),u.multiInstance&&(u.minItems=l.ReaderUtil.getNumber(E,d.YamlKeys.minItems)??y.AbstractChildDeploymentInfo.defaultMinItems,u.maxItems=l.ReaderUtil.getNumber(E,d.YamlKeys.maxItems)),u.requiredValue=l.ReaderUtil.getBoolean(E,d.YamlKeys.required),u.recommendedValue=l.ReaderUtil.getBoolean(E,d.YamlKeys.recommended),u.hidden=l.ReaderUtil.getBoolean(E,d.YamlKeys.hidden),u.valueRecommendationEnabled=l.ReaderUtil.getBoolean(E,d.YamlKeys.valueRecommendation),u.iri=l.ReaderUtil.getIdentifier(E,d.YamlKeys.propertyIri),C.isField()){const r=m.CedarFieldType.forYamlArtifactType(C);u.uiInputType=r.getUiInputType();const n=this.fieldReader.readFromObject(t,u,a.add(d.YamlKeys.children,i));(0,c.isSizedStaticField)(n.field)&&(n.field.width=l.ReaderUtil.getNumber(E,d.YamlKeys.width),n.field.height=l.ReaderUtil.getNumber(E,d.YamlKeys.height)),u.label=T.entryFor(u.label,n.field.schema_name),u.description=T.entryFor(u.description,n.field.schema_description);const s=n.field.createDeploymentBuilder(u.name).withLabel(u.label).withDescription(u.description);if(s instanceof h.ChildDeploymentInfoStaticBuilder&&s.withHidden(u.hidden),u.atType===o.CedarArtifactType.TEMPLATE_FIELD){const e=s;e.withHidden(u.hidden).withIri(u.iri).withContinuePreviousLine(l.ReaderUtil.getBoolean(E,d.YamlKeys.continuePreviousLine)).withRecommendedValue(u.recommendedValue).withRequiredValue(u.requiredValue).withValueRecommendationEnabled(u.valueRecommendationEnabled),e instanceof f.ChildDeploymentInfoBuilder&&e.withMultiInstance(u.multiInstance).withMinItems(u.minItems).withMaxItems(u.maxItems)}s instanceof p.ChildDeploymentInfoAlwaysMultipleBuilder&&s.withMinItems(l.ReaderUtil.getNumber(E,d.YamlKeys.minItems)).withMaxItems(l.ReaderUtil.getNumber(E,d.YamlKeys.maxItems));const y=s.build();e.addChild(n.field,y)}else{if(!C.isElement())throw new Error(`Unknown child type "${r}" at ${a.add(d.YamlKeys.children,i).toString()}`);{const r=this.getElementReader().readFromObject(t,u,a.add(d.YamlKeys.children,i)),n=r.element.createDeploymentBuilder(i).withLabel(T.entryFor(u.label,r.element.schema_name)).withDescription(T.entryFor(u.description,r.element.schema_description)).withIri(u.iri).withMultiInstance(u.multiInstance).withMinItems(u.minItems).withMaxItems(u.maxItems).build();e.addChild(r.element,n)}}}})}static entryFor(e,t){return null!==e?e:t}}t.YamlContainerArtifactReader=T},8239(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.YamlTemplateElementReader=void 0;const a=r(797),i=r(2763),s=r(3188),o=r(1395),l=r(7661),d=r(455),c=n(r(3198)),u=r(9300),m=r(4646),p=r(1591),h=r(8748),f=r(2099);class y extends u.YamlContainerArtifactReader{knownArtifactType=i.CedarArtifactType.TEMPLATE_ELEMENT;constructor(e,t=!1){super(e,t)}static getStrict(){return new y(o.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new y(o.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new y(e,t)}getElementReader(){return this}readFromString(e){let t;try{t=c.default.parse(e)}catch{t={}}return this.readFromObject(t,d.ChildDeploymentInfo.empty(),new s.JsonPath)}readFromObject(e,t,r){const n=new p.YamlArtifactParsingResult,i=l.TemplateElement.buildEmptyWithNullValues();return null===r.getLastComponent()&&h.ReaderUtil.getIdentifier(e,f.YamlKeys.id),this.readNonReportableAttributes(i,e),(0,a.applySchemaReaderDefaults)(i,e,r,"yaml"),this.readAnnotations(i,e,n,r),super.readAndValidateChildrenInfo(i,e,n,r),new m.YamlTemplateElementReaderResult(i,n,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t);const r=t[f.YamlKeys.instanceType];if(null!=r&&"string"!=typeof r&&(!Array.isArray(r)||0===r.length))throw new Error("Instance types must be an IRI or a nonempty array of IRIs");e.instanceTypeSpecifications=Array.isArray(r)?r:"string"==typeof r?[r]:[],e.skos_prefLabel=h.ReaderUtil.getString(t,f.YamlKeys.prefLabel),e.skos_altLabel=h.ReaderUtil.getFilteredStringList(t,f.YamlKeys.altLabels),e.header=h.ReaderUtil.getString(t,f.YamlKeys.header),e.footer=h.ReaderUtil.getString(t,f.YamlKeys.footer)}}t.YamlTemplateElementReader=y},4646(e,t){t.YamlTemplateElementReaderResult=void 0,t.YamlTemplateElementReaderResult=class{_element;_parsingResult;_elementSourceObject;constructor(e,t,r){this._element=e,this._parsingResult=t,this._elementSourceObject=r}get element(){return this._element}get parsingResult(){return this._parsingResult}get elementSourceObject(){return this._elementSourceObject}}},2999(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.YamlTemplateFieldReader=void 0;const a=r(797),i=r(3188),s=r(8748),o=r(2763),l=r(3054),d=r(1790),c=r(455),u=r(6575),m=r(1395),p=n(r(3198)),h=r(2099),f=r(9499),y=r(1268),T=r(3168),C=r(384),E=r(1872),g=r(529),I=r(4568),A=r(8568),b=r(3980),R=r(7941),S=r(1404),v=r(7089),_=r(4329),N=r(7268),w=r(2709),L=r(7124),F=r(4284),V=r(9299),O=r(1591),D=r(6651),M=r(7123),B=r(5075),U=r(7709),Y=r(6089),x=r(8543),J=r(5907),P=r(6731),k=r(6591);class W extends u.YamlAbstractArtifactReader{knownArtifactType=o.CedarArtifactType.TEMPLATE_FIELD;constructor(e,t=!1){super(e,t)}static getStrict(){return new W(m.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new W(m.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new W(e,t)}static readerMap=new Map([[f.YamlArtifactType.TEXTFIELD,new y.YamlFieldReaderTextField],[f.YamlArtifactType.TEXTAREA,new T.YamlFieldReaderTextArea],[f.YamlArtifactType.CONTROLLED_TERM,new V.YamlFieldReaderControlledTerm],[f.YamlArtifactType.LINK,new A.YamlFieldReaderLink],[f.YamlArtifactType.EXT_ROR,new D.YamlFieldReaderExtRor],[f.YamlArtifactType.EXT_ORCID,new M.YamlFieldReaderExtOrcid],[f.YamlArtifactType.EXT_PFAS,new B.YamlFieldReaderExtPfas],[f.YamlArtifactType.EXT_PUBMED,new U.YamlFieldReaderExtPubmed],[f.YamlArtifactType.EXT_RRID,new Y.YamlFieldReaderExtRrid],[f.YamlArtifactType.EXT_NIH_GRANT_ID,new x.YamlFieldReaderExtNihGrantId],[f.YamlArtifactType.EXT_DOI,new J.YamlFieldReaderExtDoi],[f.YamlArtifactType.TEMPORAL,new C.YamlFieldReaderTemporal],[f.YamlArtifactType.EMAIL,new l.YamlFieldReaderEmail],[f.YamlArtifactType.NUMERIC,new E.YamlFieldReaderNumeric],[f.YamlArtifactType.PHONE_NUMBER,new _.YamlFieldReaderPhoneNumber],[f.YamlArtifactType.RADIO,new F.YamlFieldReaderRadio],[f.YamlArtifactType.CHECKBOX,new N.YamlFieldReaderCheckbox],[f.YamlArtifactType.SINGLE_SELECT_LIST,new w.YamlFieldReaderSingleSelectList],[f.YamlArtifactType.MULTI_SELECT_LIST,new L.YamlFieldReaderMultiSelectList],[f.YamlArtifactType.ATTRIBUTE_VALUE,new g.YamlFieldReaderAttributeValue],[f.YamlArtifactType.PAGE_BREAK,new I.YamlFieldReaderPageBreak],[f.YamlArtifactType.SECTION_BREAK,new b.YamlFieldReaderSectionBreak],[f.YamlArtifactType.IMAGE,new R.YamlFieldReaderImage],[f.YamlArtifactType.RICH_TEXT,new S.YamlFieldReaderRichText],[f.YamlArtifactType.YOUTUBE,new v.YamlFieldReaderYoutube]]);readFromString(e){let t;try{t=p.default.parse(e)}catch{t={}}return this.readFromObject(t,c.ChildDeploymentInfo.empty(),new i.JsonPath)}readFromObject(e,t,r){const n=new O.YamlArtifactParsingResult,i=W.readFieldSpecificAttributes(e,t,n,r);return null===r.getLastComponent()&&s.ReaderUtil.getIdentifier(e,h.YamlKeys.id),this.readNonReportableAttributes(i,e),(0,a.applySchemaReaderDefaults)(i,e,r,"yaml"),this.readAnnotations(i,e,n,r),new d.YamlTemplateFieldReaderResult(i,n,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t),e.skos_prefLabel=s.ReaderUtil.getString(t,h.YamlKeys.prefLabel),e.skos_altLabel=s.ReaderUtil.getFilteredStringList(t,h.YamlKeys.altLabels),(e instanceof P.ControlledTermFieldImpl||e instanceof k.TextFieldImpl)&&(e.valueRecommendationEnabled=s.ReaderUtil.getBoolean(t,h.YamlKeys.valueRecommendation));const r=s.ReaderUtil.getNode(t,h.YamlKeys.configuration);e.hidden=W.readFlag(r,t,h.YamlKeys.hidden),e.requiredValue=W.readFlag(r,t,h.YamlKeys.required),e.recommendedValue=W.readFlag(r,t,h.YamlKeys.recommended),e.continuePreviousLine=W.readFlag(r,t,h.YamlKeys.continuePreviousLine)}static readFlag(e,t,r){return s.ReaderUtil.getBoolean(e,r)||s.ReaderUtil.getBoolean(t,r)}static readFieldSpecificAttributes(e,t,r,n){const a=f.YamlArtifactType.forValue(s.ReaderUtil.getString(e,h.YamlKeys.type));if(a.isField()){const i=this.readerMap.get(a);if(!i)throw new Error(`No reader defined for dynamic input type "${a.getValue()}"`);const s=i.read(e,t,r,n);let l=o.CedarArtifactType.NULL;return a.isStaticField()?l=o.CedarArtifactType.STATIC_TEMPLATE_FIELD:a.isDynamicField()&&(l=o.CedarArtifactType.TEMPLATE_FIELD),s.cedarArtifactType=l,s}throw new Error(`Unknown field type "${s.ReaderUtil.getString(e,h.YamlKeys.type)}" at ${n.toString()}`)}}t.YamlTemplateFieldReader=W},1790(e,t){t.YamlTemplateFieldReaderResult=void 0,t.YamlTemplateFieldReaderResult=class{_field;_parsingResult;_fieldSourceObject;constructor(e,t,r){this._field=e,this._parsingResult=t,this._fieldSourceObject=r}get field(){return this._field}get parsingResult(){return this._parsingResult}get fieldSourceObject(){return this._fieldSourceObject}}},5675(e,t,r){t.YamlTemplateFieldTypeSpecificReader=void 0;const n=r(855),a=r(8748),i=r(2099),s=r(4081),o=r(6145);t.YamlTemplateFieldTypeSpecificReader=class{read(e,t,r,a){return n.UnknownTemplateField.build()}static readAndStoreListValueConstraints(e,t){t.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(e,i.YamlKeys.default);const r=a.ReaderUtil.getNodeList(e,i.YamlKeys.values);null!==r&&r.forEach(e=>{const r=a.ReaderUtil.getString(e,i.YamlKeys.label),n=a.ReaderUtil.getBoolean(e,i.YamlKeys.selected),o=Object.hasOwn(e,i.YamlKeys.selected);if(null!=r){const e=new s.ListOption(r,n,o);t.valueConstraints.literals.push(e)}})}}},9946(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.YamlTemplateInstanceReader=void 0;const a=r(5588),i=r(1625),s=r(9167),o=n(r(3198)),l=r(8534),d=r(1395),c=r(6575),u=r(2234),m=r(9857),p=r(1591),h=r(2099),f=r(8748),y=r(2272),T=r(147),C=r(7723),E=r(5222),g=r(4877),I=r(7571),A=r(8193),b=r(4465),R=r(9327),S=r(4033),v=r(2888),_=r(6109),N=r(3188);class w extends c.YamlAbstractArtifactReader{constructor(e,t=!1){super(e,t)}static getStrict(){return new w(d.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new w(d.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new w(e,t)}readFromString(e){let t;try{t=o.default.parse(e)}catch{t={}}return this.readFromObject(t)}readFromObject(e){const t=new p.YamlArtifactParsingResult,r=y.TemplateInstance.buildEmptyWithNullValues(),n=e??{};r.schema_name=f.ReaderUtil.getString(n,h.YamlKeys.name),r.schema_description=f.ReaderUtil.getString(n,h.YamlKeys.description)??"",r.descriptionWasAbsent=null===f.ReaderUtil.getString(n,h.YamlKeys.description),r.at_id=l.CedarArtifactId.forValue(f.ReaderUtil.getIdentifier(n,h.YamlKeys.id));const a=this.behavior.useWarningForKnownIssues();r.schema_isBasedOn=l.CedarArtifactId.forValue(f.ReaderUtil.getArtifactIdentifier(n,h.YamlKeys.isBasedOn,a)),r.pav_derivedFrom=l.CedarArtifactId.forValue(f.ReaderUtil.getArtifactIdentifier(n,h.YamlKeys.derivedFrom,a)),r.pav_createdBy=u.CedarUser.forValue(f.ReaderUtil.getString(n,h.YamlKeys.createdBy)),r.pav_createdOn=m.IsoDate.forValue(f.ReaderUtil.getString(n,h.YamlKeys.createdOn)),r.oslc_modifiedBy=u.CedarUser.forValue(f.ReaderUtil.getString(n,h.YamlKeys.modifiedBy)),r.pav_lastUpdatedOn=m.IsoDate.forValue(f.ReaderUtil.getString(n,h.YamlKeys.modifiedOn)),this.readAnnotations(r,n,t,new N.JsonPath),r.dataContainer=this.parseContainer(n,!0);for(const e of S.AttributeValueNamePolicy.findConflicts(r.dataContainer,"template",!0))t.addBlueprintComparisonError(new v.ComparisonError("YamlTemplateInstanceReader",_.YamlComparisonErrorType.VALUE_MISMATCH,new N.JsonPath(...S.AttributeValueNamePolicy.locationOf(e)),"a unique, non-reserved attribute-value name",e.name));return new T.YamlTemplateInstanceReaderResult(r,t,n)}static RESERVED_KEYS=a.ReservedNames.TEMPLATE_INSTANCE_YAML_KEYS;static ELEMENT_RESERVED_KEYS=a.ReservedNames.NESTED_ELEMENT_INSTANCE_YAML_KEYS;parseContainer(e,t=!1){const r=new C.InstanceDataContainer,n=f.ReaderUtil.getNode(e,h.YamlKeys.children);null!==n&&Object.keys(n).forEach(e=>{const t=f.ReaderUtil.getNode(n,e)??n[e];if(Array.isArray(t)){const n=[];r.setValue(e,n),t.forEach((e,t)=>{n[t]=this.parseNode(e)})}else r.setValue(e,this.parseNode(t))}),Object.keys(e).forEach(n=>{if((t?w.RESERVED_KEYS:w.ELEMENT_RESERVED_KEYS).has(n))return;const a=e[n];if(null===a||"object"!=typeof a||Array.isArray(a))return;const i=new R.InstanceDataAttributeValueField(n);Object.keys(a).forEach(e=>{const t=a[e];i.addValue(e,new E.InstanceDataStringAtom(this.parseAttributeValue(t)))}),r.setValue(n,i)});const a=f.ReaderUtil.getIdentifier(e,h.YamlKeys.id);return null!==a&&(r.id=a),r}parseAttributeValue(e){if("string"==typeof e)return e;if(null!==e&&"object"==typeof e&&!Array.isArray(e)){const t=e[h.YamlKeys.value];return"string"==typeof t?t:null}return null}parseNode(e){const t=this.parseNodeWithoutNotation(e);return null!==e&&"object"==typeof e&&"language"in t&&(t.language=f.ReaderUtil.getString(e,h.YamlKeys.language)),null!==e&&"object"==typeof e&&"preferredLabel"in t&&(t.preferredLabel=f.ReaderUtil.getString(e,h.YamlKeys.prefLabel)),null===e||"object"!=typeof e||!("notation"in t)||t instanceof i.InstanceDataNotationAtom||(t.notation=f.ReaderUtil.getString(e,h.YamlKeys.notation)),t}parseNodeWithoutNotation(e){if(null==e)return new b.InstanceDataEmptyNode;if("string"==typeof e)return new E.InstanceDataStringAtom(e);if(Object.hasOwn(e,h.YamlKeys.children)||"element-instance"===f.ReaderUtil.getString(e,h.YamlKeys.type))return this.parseContainer(e);if(Object.hasOwn(e,h.YamlKeys.id)&&Object.hasOwn(e,h.YamlKeys.value))throw new Error("A field cannot contain both id and value.");if(Array.isArray(e[h.YamlKeys.datatype]))throw new Error("A field value can have at most one datatype.");if(Object.hasOwn(e,h.YamlKeys.value)){const t=f.ReaderUtil.getString(e,h.YamlKeys.value),r=f.ReaderUtil.getString(e,h.YamlKeys.datatype),n=f.ReaderUtil.getString(e,h.YamlKeys.label);return null===r?new E.InstanceDataStringAtom(t,n):new g.InstanceDataTypedAtom(t,r,n)}if(Object.hasOwn(e,h.YamlKeys.id)){f.ReaderUtil.assertFieldIri(f.ReaderUtil.getString(e,h.YamlKeys.id),h.YamlKeys.id);const t=f.ReaderUtil.getString(e,h.YamlKeys.id),r=f.ReaderUtil.getString(e,h.YamlKeys.label),n=f.ReaderUtil.getString(e,h.YamlKeys.datatype);return null===r?I.InstanceDataLinkAtom.fromParsedNode(t,n):A.InstanceDataControlledAtom.fromParsedNode(t,r,n)}const t=f.ReaderUtil.getString(e,h.YamlKeys.label);if(null!==t)return new s.InstanceDataLabelAtom(t,f.ReaderUtil.getString(e,h.YamlKeys.datatype));const r=f.ReaderUtil.getString(e,h.YamlKeys.notation);return null!==r?new i.InstanceDataNotationAtom(r,f.ReaderUtil.getString(e,h.YamlKeys.datatype)):new b.InstanceDataEmptyNode}}t.YamlTemplateInstanceReader=w},147(e,t,r){t.YamlTemplateInstanceReaderResult=void 0;const n=r(6532);class a extends n.YamlArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get instance(){return this._artifact}get instanceSourceObject(){return this._artifactSourceObject}}t.YamlTemplateInstanceReaderResult=a},5677(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.YamlTemplateReader=void 0;const a=r(797),i=r(2763),s=r(8748),o=r(7868),l=r(3188),d=r(1395),c=r(8239),u=r(3281),m=n(r(3198)),p=r(9300),h=r(2099),f=r(1591);class y extends p.YamlContainerArtifactReader{elementReader;knownArtifactType=i.CedarArtifactType.TEMPLATE;constructor(e,t=!1){super(e,t),this.elementReader=c.YamlTemplateElementReader.getForBehavior(e,t)}static getStrict(){return new y(d.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new y(d.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new y(e,t)}getElementReader(){return this.elementReader}readFromString(e){let t;try{t=m.default.parse(e)}catch{t={}}return this.readFromObject(t)}readFromObject(e,t=new l.JsonPath){const r=new f.YamlArtifactParsingResult,n=u.Template.buildEmptyWithNullValues();return s.ReaderUtil.getIdentifier(e,h.YamlKeys.id),this.readNonReportableAttributes(n,e),(0,a.applySchemaReaderDefaults)(n,e,t,"yaml"),this.readAnnotations(n,e,r,t),this.readInstanceTypeSpecification(n,e,r),this.readAndValidateChildrenInfo(n,e,r,t),new o.YamlTemplateReaderResult(n,r,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t),e.header=s.ReaderUtil.getString(t,h.YamlKeys.header),e.footer=s.ReaderUtil.getString(t,h.YamlKeys.footer)}readInstanceTypeSpecification(e,t,r){const n=t[h.YamlKeys.instanceType];if(null!=n&&"string"!=typeof n&&(!Array.isArray(n)||0===n.length))throw new Error("Instance types must be an IRI or a nonempty array of IRIs");e.instanceTypeSpecifications=Array.isArray(n)?n:"string"==typeof n?[n]:[]}}t.YamlTemplateReader=y},7868(e,t){t.YamlTemplateReaderResult=void 0,t.YamlTemplateReaderResult=class{_template;_parsingResult;_templateSourceObject;constructor(e,t,r){this._template=e,this._parsingResult=t,this._templateSourceObject=r}get template(){return this._template}get parsingResult(){return this._parsingResult}get templateSourceObject(){return this._templateSourceObject}}},1888(e,t,r){t.RoundTrip=void 0;const n=r(6396),a=r(2748),i=r(4036),s=r(3056),o=r(455),l=r(3188),d=r(7954),c=r(7519),u=r(4948),m=r(6645),p=r(2022);t.RoundTrip=class{static compare(e,t){if(e instanceof n.JsonTemplateFieldReaderResult&&t instanceof a.JsonTemplateFieldWriterInternal)return this.compareField(e,t);if(e instanceof u.JsonTemplateElementReaderResult&&t instanceof m.JsonTemplateElementWriter)return this.compareElement(e,t);if(e instanceof d.JsonTemplateReaderResult&&t instanceof c.JsonTemplateWriter)return this.compareTemplate(e,t);if("string"==typeof e&&"string"==typeof t)return this.compareString(e,t);throw new Error("Invalid argument types for compare method")}static compareField(e,t){const r=new i.JsonArtifactParsingResult;return s.JsonObjectComparator.compareBothWays(r,e.fieldSourceObject,t.getAsJsonNode(e.field,o.ChildDeploymentInfo.empty()),new l.JsonPath,t.getBehavior()),r}static compareElement(e,t){const r=new i.JsonArtifactParsingResult;return s.JsonObjectComparator.compareBothWays(r,e.elementSourceObject,t.getAsJsonNode(e.element),new l.JsonPath,t.getBehavior()),r}static compareTemplate(e,t){const r=new i.JsonArtifactParsingResult;return s.JsonObjectComparator.compareBothWays(r,e.templateSourceObject,t.getAsJsonNode(e.template),new l.JsonPath,t.getBehavior()),r}static compareString(e,t){const r=JSON.parse(e),n=JSON.parse(t),a=new i.JsonArtifactParsingResult;return s.JsonObjectComparator.compareBothWays(a,r,n,new l.JsonPath,p.JsonWriterBehavior.STRICT),a}}},2112(e,t){t.AbstractArtifactWriter=void 0,t.AbstractArtifactWriter=class{constructor(){}}},8810(e,t,r){t.CedarWriters=void 0;const n=r(9607),a=r(5359);t.CedarWriters=class{static json(){return n.CedarJsonWriters}static yaml(){return a.CedarYamlWriters}}},5692(e,t,r){t.WriterUtil=void 0;const n=r(8878),a=r(3812);t.WriterUtil=class{static getMultiMinMax(e,t){let r=null,i=null,s=!1;return e.isMultiInstanceByDefinition()?t instanceof n.ChildDeploymentInfoAlwaysMultiple&&(s=!0,r=t.minItems,i=t.maxItems):e.isSingleInstanceByDefinition()?s=!1:(s=t.isMultiInAnyWay(),s&&t instanceof a.AbstractDynamicChildDeploymentInfo&&(r=t.minItems,i=t.maxItems)),{isMultiInstance:s,minItems:r,maxItems:i}}}},9607(e,t,r){t.CedarJsonWriters=void 0;const n=r(2022),a=r(4872),i=r(7519),s=r(4869),o=r(7501),l=r(3691),d=r(4841),c=r(5459),u=r(8970),m=r(2347),p=r(41),h=r(6029),f=r(6766),y=r(9309),T=r(8663),C=r(7335),E=r(275),g=r(6876),I=r(9031),A=r(9129),b=r(1442),R=r(8280),S=r(8354),v=r(5996),_=r(2418),N=r(9222),w=r(9184),L=r(7054),F=r(2395),V=r(2813),O=r(6645),D=r(2981),M=r(7432),B=r(8014),U=r(3281),Y=r(7661),x=r(6320),J=r(7584),P=r(8096),k=r(6122),W=r(3312),K=r(4780),j=r(5250),$=r(7412);class X{behavior;jsonDynamicFieldWriters;jsonStaticFieldWriters;jsonValueConstraintsWriters;jsonAtomicWriter;jsonAnnotationsWriter;jsonTemplateWriter;jsonTemplateElementWriter;jsonTemplateInstanceWriter;constructor(e){this.behavior=e,this.jsonAtomicWriter=new a.JsonAtomicWriter(e),this.jsonAnnotationsWriter=new D.JsonAnnotationsWriter(e),this.jsonTemplateWriter=i.JsonTemplateWriter.getFor(e,this),this.jsonTemplateElementWriter=O.JsonTemplateElementWriter.getFor(e,this),this.jsonTemplateInstanceWriter=x.JsonTemplateInstanceWriter.getFor(e,this),this.jsonDynamicFieldWriters=new Map([[s.CedarFieldType.TEXT,new o.JsonFieldWriterTextField(e,this)],[s.CedarFieldType.TEXTAREA,new E.JsonFieldWriterTextArea(e,this)],[s.CedarFieldType.CONTROLLED_TERM,new R.JsonFieldWriterControlledTerm(e,this)],[s.CedarFieldType.PHONE_NUMBER,new g.JsonFieldWriterPhoneNumber(e,this)],[s.CedarFieldType.EMAIL,new I.JsonFieldWriterEmail(e,this)],[s.CedarFieldType.LINK,new l.JsonFieldWriterLink(e,this)],[s.CedarFieldType.EXT_ROR,new J.JsonFieldWriterExtRor(e,this)],[s.CedarFieldType.EXT_ORCID,new P.JsonFieldWriterExtOrcid(e,this)],[s.CedarFieldType.EXT_PFAS,new k.JsonFieldWriterExtPfas(e,this)],[s.CedarFieldType.EXT_PUBMED,new W.JsonFieldWriterExtPubmed(e,this)],[s.CedarFieldType.EXT_RRID,new K.JsonFieldWriterExtRrid(e,this)],[s.CedarFieldType.EXT_NIH_GRANT_ID,new j.JsonFieldWriterExtNihGrantId(e,this)],[s.CedarFieldType.EXT_DOI,new $.JsonFieldWriterExtDoi(e,this)],[s.CedarFieldType.NUMERIC,new d.JsonFieldWriterNumeric(e,this)],[s.CedarFieldType.TEMPORAL,new c.JsonFieldWriterTemporal(e,this)],[s.CedarFieldType.RADIO,new y.JsonFieldWriterRadio(e,this)],[s.CedarFieldType.CHECKBOX,new T.JsonFieldWriterCheckbox(e,this)],[s.CedarFieldType.SINGLE_SELECT_LIST,new C.JsonFieldWriterList(e,this)],[s.CedarFieldType.MULTIPLE_SELECT_LIST,new C.JsonFieldWriterList(e,this)],[s.CedarFieldType.ATTRIBUTE_VALUE,new b.JsonFieldWriterAttributeValue(e,this)]]),this.jsonStaticFieldWriters=new Map([[s.CedarFieldType.STATIC_PAGE_BREAK,new m.JsonFieldWriterStaticPageBreak(e,this)],[s.CedarFieldType.STATIC_SECTION_BREAK,new p.JsonFieldWriterStaticSectionsBreak(e,this)],[s.CedarFieldType.STATIC_IMAGE,new u.JsonFieldWriterStaticImage(e,this)],[s.CedarFieldType.STATIC_RICH_TEXT,new h.JsonFieldWriterStaticRichText(e,this)],[s.CedarFieldType.STATIC_YOUTUBE,new f.JsonFieldWriterStaticYoutube(e,this)]]),this.jsonValueConstraintsWriters=new Map([[S.ControlledTermOntology.className,new v.JsonValueConstraintsOntologyWriter(e,this)],[_.ControlledTermClass.className,new N.JsonValueConstraintsClassWriter(e,this)],[w.ControlledTermBranch.className,new L.JsonValueConstraintsBranchWriter(e,this)],[F.ControlledTermValueSet.className,new V.JsonValueConstraintsValueSetWriter(e,this)],[M.ControlledTermAction.className,new B.JsonValueConstraintsActionWriter(e,this)]])}static getStrict(){return new X(n.JsonWriterBehavior.STRICT)}static getFebruary2024(){return new X(n.JsonWriterBehavior.FEBRUARY_2024)}static getFor(e){return new X(e)}getTemplateWriter(){return this.jsonTemplateWriter}getTemplateElementWriter(){return this.jsonTemplateElementWriter}getTemplateInstanceWriter(){return this.jsonTemplateInstanceWriter}getAtomicWriter(){return this.jsonAtomicWriter}getFieldWriterForType(e){let t;if(t=e.isStaticField?this.jsonStaticFieldWriters.get(e):this.jsonDynamicFieldWriters.get(e),t)return t;throw new Error(`No JSON writer found for field type: ${e.getValue()}`)}getWriterForValueConstraint(e){const t=e.className,r=this.jsonValueConstraintsWriters.get(t);if(r)return r;throw new Error(`No JSON writer found for class type: ${t}`)}getFieldWriterForField(e){return this.getFieldWriterForType(e.cedarFieldType)}getAnnotationsWriter(){return this.jsonAnnotationsWriter}getWriterForArtifact(e){if(e instanceof U.Template)return i.JsonTemplateWriter.getFor(this.behavior,this);if(e instanceof Y.TemplateElement)return O.JsonTemplateElementWriter.getFor(this.behavior,this);if(e instanceof A.TemplateField)return this.getFieldWriterForType(e.cedarFieldType);throw new Error(`No JSON reader available for CedarArtifact: ${e}`)}}t.CedarJsonWriters=X},3161(e,t,r){t.JsonAbstractArtifactWriter=void 0;const n=r(2112),a=r(9517),i=r(2733),s=r(3910),o=r(1027),l=r(936),d=r(8534);class c extends n.AbstractArtifactWriter{behavior;writers;atomicWriter;annotationsWriter;constructor(e,t){super(),this.behavior=e,this.writers=t,this.atomicWriter=t.getAtomicWriter(),this.annotationsWriter=t.getAnnotationsWriter()}getBehavior(){return this.behavior}macroSchemaNameAndDescription(e){return{[i.JsonSchema.schemaName]:e.schema_name,[i.JsonSchema.schemaDescription]:e.schema_description}}macroProvenance(e,t){return{[i.JsonSchema.pavCreatedOn]:t.write(e.pav_createdOn),[i.JsonSchema.pavCreatedBy]:t.write(e.pav_createdBy),[i.JsonSchema.pavLastUpdatedOn]:t.write(e.pav_lastUpdatedOn),[i.JsonSchema.oslcModifiedBy]:t.write(e.oslc_modifiedBy)}}macroStatusAndVersion(e,t){const r=a.JsonNode.getEmpty();return e.pav_version!==o.PavVersion.NULL&&(r[i.JsonSchema.pavVersion]=t.write(e.pav_version)),e.bibo_status!==s.BiboStatus.NULL&&(r[i.JsonSchema.biboStatus]=t.write(e.bibo_status)),r}macroSkos(e){const t=a.JsonNode.getEmpty();return null!==e.skos_prefLabel&&(t[l.CedarModel.skosPrefLabel]=e.skos_prefLabel),null!==e.skos_altLabel&&e.skos_altLabel.length>0&&(t[l.CedarModel.skosAltLabel]=e.skos_altLabel),t}macroDerivedFrom(e){const t=a.JsonNode.getEmpty();return e.pav_derivedFrom!==d.CedarArtifactId.NULL&&(t[i.JsonSchema.pavDerivedFrom]=this.atomicWriter.write(e.pav_derivedFrom)),t}macroIsBasedOn(e){const t=a.JsonNode.getEmpty();return e.schema_isBasedOn!==d.CedarArtifactId.NULL&&(t[i.JsonSchema.schemaIsBasedOn]=this.atomicWriter.write(e.schema_isBasedOn)),t}macroPreviousVersion(e){const t=a.JsonNode.getEmpty();return e.pav_previousVersion!==d.CedarArtifactId.NULL&&(t[i.JsonSchema.pavPreviousVersion]=this.atomicWriter.write(e.pav_previousVersion)),t}macroSchemaIdentifier(e){const t=a.JsonNode.getEmpty();return null!==e.schema_identifier&&(t[i.JsonSchema.schemaIdentifier]=e.schema_identifier),t}macroAnnotations(e){return this.annotationsWriter.write(e.annotations)}}t.JsonAbstractArtifactWriter=c},8872(e,t,r){t.JsonAbstractContainerArtifactWriter=void 0;const n=r(8198),a=r(3161),i=r(6968),s=r(9517),o=r(9129),l=r(2733),d=r(936),c=r(5692),u=r(513),m=r(8748);class p extends a.JsonAbstractArtifactWriter{macroContext(e){return i.JsonContainerArtifactContent.CONTEXT_VERBATIM}getChildMapAsJson(e){const t=s.JsonNode.getEmpty();return e.getChildrenInfo().getChildrenNames().forEach(r=>{const a=e.getChild(r);if(null!=a){let i=s.JsonNode.getEmpty();const m=e.getChildrenInfo().get(r);if(null!==m&&(i=a instanceof o.TemplateField?this.writers.getFieldWriterForType(a.cedarFieldType).getAsJsonNode(a,m):this.writers.getTemplateElementWriter().getAsJsonNode(a)),null!==m){const{isMultiInstance:e,minItems:o,maxItems:p}=c.WriterUtil.getMultiMinMax(a,m);let h=o;const f=p;if(e){null===h&&(h=u.AbstractChildDeploymentInfo.defaultMinItems);const e=s.JsonNode.getEmpty();e[d.CedarModel.minItems]=h,null!==f&&f!==n.UNBOUNDED_MAX_ITEMS&&(e[d.CedarModel.maxItems]=f),i={[l.JsonSchema.type]:"array",...e,[l.JsonSchema.items]:i}}t[r]=i}}}),t}expandInstanceTypeSpecification(e,t){if(e.instanceTypeSpecifications.length>0){const r=m.ReaderUtil.getNode(t,l.JsonSchema.atType);m.ReaderUtil.getNodeList(r,l.JsonSchema.oneOf).forEach(t=>{const r=m.ReaderUtil.getString(t,l.JsonSchema.type);"string"==r?t[l.JsonSchema.enum]=[...e.instanceTypeSpecifications]:"array"==r&&(m.ReaderUtil.getNode(t,l.JsonSchema.items)[l.JsonSchema.enum]=[...e.instanceTypeSpecifications])})}}}t.JsonAbstractContainerArtifactWriter=p},2981(e,t,r){t.JsonAnnotationsWriter=void 0;const n=r(9517),a=r(936),i=r(2787),s=r(2733),o=r(3549);t.JsonAnnotationsWriter=class{behavior;constructor(e){this.behavior=e}write(e){const t=n.JsonNode.getEmpty();if(null!==e&&e.getSize()>0){const r=n.JsonNode.getEmpty();e.getAnnotationNames().forEach(t=>{const n=e.get(t);n instanceof i.AnnotationAtId?r[t]={[s.JsonSchema.atId]:n.getAtId()}:n instanceof o.AnnotationAtValue&&(r[t]={[s.JsonSchema.atValue]:n.getAtValue()})}),t[a.CedarModel.annotations]=r}return t}}},4872(e,t,r){t.JsonAtomicWriter=void 0;const n=r(8534),a=r(2763),i=r(5793),s=r(9857),o=r(2234),l=r(3910),d=r(1027),c=r(2475),u=r(8557),m=r(3447),p=r(8588),h=r(7974),f=r(3764),y=r(9034),T=r(3746),C=r(9932),E=r(8802),g=r(4531),I=r(7752);t.JsonAtomicWriter=class{behavior;constructor(e){this.behavior=e}write(e){if(null==e)return null;if(e instanceof n.CedarArtifactId)return this.writeCedarArtifactId(e);if(e instanceof a.CedarArtifactType)return this.writeCedarArtifactType(e);if(e instanceof i.JavascriptType)return this.writeJavascriptType(e);if(e instanceof s.IsoDate)return this.writeCedarDate(e);if(e instanceof o.CedarUser)return this.writeCedarUser(e);if(e instanceof l.BiboStatus)return this.writeBiboStatusJson(e);if(e instanceof d.PavVersion)return this.writePavVersion(e);if(e instanceof c.ArtifactSchema)return this.writeCedarSchema(e);if(e instanceof u.SchemaVersion)return this.writeSchemaVersion(e);if(e instanceof m.NumberType)return this.writeNumberType(e);if(e instanceof p.TemporalType)return this.writeTemporalType(e);if(e instanceof h.TemporalGranularity)return this.writeTemporalGranularity(e);if(e instanceof f.TimeFormat)return this.writeTimeFormat(e);if(e instanceof y.UiInputType)return this.writeUiInputType(e);if(e instanceof T.AdditionalProperties)return this.writeAdditionalProperties(e);if(e instanceof E.Iri)return this.writeURI(e);if(e instanceof g.BioportalTermType)return this.writeBioportalTermTypeJson(e);if(e instanceof I.Language)return this.writeLanguage(e);throw new Error("Unsupported type")}writeCedarArtifactId(e){return e.getValue()}writeCedarArtifactType(e){return e.getValue()}writeJavascriptType(e){return e.getValue()}writeCedarDate(e){return e.getValue()}writeCedarUser(e){return e.getValue()}writeBiboStatusJson(e){return e.getJsonValue()}writePavVersion(e){return e.getValue()}writeCedarSchema(e){return e.getValue()}writeSchemaVersion(e){return null!==e.getValue()?e.getValue():u.SchemaVersion.CURRENT.getValue()}writeNumberType(e){return e.getValue()}writeTemporalType(e){return e.getValue()}writeTemporalGranularity(e){return e.getValue()}writeTimeFormat(e){return e.getValue()}writeUiInputType(e){return e.getValue()}writeAdditionalProperties(e){return e!==T.AdditionalProperties.FALSE&&(e===T.AdditionalProperties.ALLOW_ATTRIBUTE_VALUE?C.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_OUTSIDE:null)}writeURI(e){return e.getValue()}writeBioportalTermTypeJson(e){return e.getJsonValue()}writeLanguage(e){return e.getValue()}}},6645(e,t,r){t.JsonTemplateElementWriter=void 0;const n=r(8972),a=r(8557),i=r(8748),s=r(2733),o=r(936),l=r(2763),d=r(5793),c=r(5747),u=r(2475),m=r(9932),p=r(1501),h=r(8872),f=r(7752);class y extends h.JsonAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new y(e,t)}buildProperties(e){const t=i.ReaderUtil.deepClone(p.JsonTemplateElementContent.PROPERTIES_PARTIAL);e.language!==f.Language.NULL&&(t[s.JsonSchema.atContext][s.JsonSchema.atLanguage]=this.atomicWriter.write(e.language));const r=e.getChildrenInfo().getIRIMap();t[s.JsonSchema.atContext][s.JsonSchema.properties]={...t[s.JsonSchema.atContext][s.JsonSchema.properties],...r};const n=e.getChildrenInfo().getChildNamesWithIri();n.length>0?t[s.JsonSchema.atContext][s.JsonSchema.required]=[...t[s.JsonSchema.atContext][s.JsonSchema.required],...n]:i.ReaderUtil.deleteNodeKey(t[s.JsonSchema.atContext],s.JsonSchema.required),e.getChildrenInfo().hasAttributeValue()&&(t[s.JsonSchema.atContext][c.TemplateProperty.additionalProperties]=m.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE);const a={...t,...this.getChildMapAsJson(e)};return this.expandInstanceTypeSpecification(e,a),a}getAsJsonString(e,t=2){return(0,n.stringifySchema)(this.getAsJsonNode(e),t)}getAsJsonNode(e){const t=this.buildProperties(e),r={[o.CedarModel.order]:e.getChildrenInfo().getChildrenNames(),[o.CedarModel.propertyLabels]:e.getChildrenInfo().getPropertyLabelMap(e),[o.CedarModel.propertyDescriptions]:e.getChildrenInfo().getPropertyDescriptionMap(e)};return null!==e.header&&(r[o.CedarModel.header]=e.header),null!==e.footer&&(r[o.CedarModel.footer]=e.footer),e.extensions.applyJson({[s.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[s.JsonSchema.atType]:this.atomicWriter.write(l.CedarArtifactType.TEMPLATE_ELEMENT),[s.JsonSchema.atContext]:this.macroContext(e),[o.CedarModel.type]:this.atomicWriter.write(d.JavascriptType.OBJECT),[c.TemplateProperty.title]:e.title,[c.TemplateProperty.description]:e.description,[o.CedarModel.ui]:r,[s.JsonSchema.properties]:t,[s.JsonSchema.required]:[...p.JsonTemplateElementContent.REQUIRED_PARTIAL,...e.getChildrenInfo().getChildrenNamesForRequired()],...this.macroAnnotations(e),...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroSkos(e),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[s.JsonSchema.schemaVersion]:this.atomicWriter.write(a.SchemaVersion.CURRENT),[c.TemplateProperty.additionalProperties]:this.atomicWriter.write(e.getAdditionalProperties()),...this.macroSchemaIdentifier(e),[o.CedarModel.schema]:this.atomicWriter.write(u.ArtifactSchema.CURRENT)})}}t.JsonTemplateElementWriter=y},2748(e,t,r){t.JsonTemplateFieldWriterInternal=void 0;const n=r(8972),a=r(8557),i=r(9517),s=r(936),o=r(2733),l=r(9932),d=r(5793),c=r(5747),u=r(2475),m=r(3161),p=r(3746),h=r(455),f=r(3812),y=r(9519),T=r(6731),C=r(6591),E=r(7752),g=r(8748);class I extends m.JsonAbstractArtifactWriter{constructor(e,t){super(e,t)}expandPropertiesNode(e){e[o.JsonSchema.properties]=l.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_LITERAL,this.behavior.usePropertiesAtLanguage()||(e[o.JsonSchema.properties]=l.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE)}expandRequiredNode(e){e[o.JsonSchema.required]=[o.JsonSchema.atValue]}expandUINode(e,t,r){r instanceof f.AbstractDynamicChildDeploymentInfo&&(r.hidden&&(e[s.CedarModel.Ui.hidden]=r.hidden),r instanceof y.AbstractFieldChildDeploymentInfo&&(r.continuePreviousLine&&(e[s.CedarModel.Ui.continuePreviousLine]=r.continuePreviousLine),r.valueRecommendationEnabled&&t.supportsValueRecommendation()&&(e[s.CedarModel.Ui.valueRecommendationEnabled]=r.valueRecommendationEnabled))),void 0===e[s.CedarModel.Ui.hidden]&&t.hidden&&(e[s.CedarModel.Ui.hidden]=!0),void 0===e[s.CedarModel.Ui.continuePreviousLine]&&t.continuePreviousLine&&(e[s.CedarModel.Ui.continuePreviousLine]=!0),void 0===e[s.CedarModel.Ui.valueRecommendationEnabled]&&(t instanceof T.ControlledTermFieldImpl||t instanceof C.TextFieldImpl)&&t.valueRecommendationEnabled&&(e[s.CedarModel.Ui.valueRecommendationEnabled]=!0)}buildUIObject(e,t){const r={[s.CedarModel.inputType]:this.atomicWriter.write(e.cedarFieldType.getUiInputType())},n={[s.CedarModel.ui]:r};return this.expandUINode(r,e,t),n}expandTypeNode(e,t){}expandValueConstraintsNode(e,t,r){r instanceof f.AbstractDynamicChildDeploymentInfo&&(e[s.CedarModel.requiredValue]=r.requiredValue),!e[s.CedarModel.requiredValue]&&t.requiredValue&&(e[s.CedarModel.requiredValue]=!0),r instanceof f.AbstractDynamicChildDeploymentInfo&&r.recommendedValue&&(e[s.CedarModel.ValueConstraints.recommendedValue]=r.recommendedValue),!e[s.CedarModel.ValueConstraints.recommendedValue]&&t.recommendedValue&&(e[s.CedarModel.ValueConstraints.recommendedValue]=!0)}buildValueConstraintsObject(e,t){const r=i.JsonNode.getEmpty(),n={[s.CedarModel.valueConstraints]:r};return this.expandValueConstraintsNode(r,e,t),n}expandLiterals(e,t){const r=i.JsonNode.getEmptyList();e.valueConstraints.literals.forEach(e=>{const t=i.JsonNode.getEmpty();t[s.CedarModel.label]=e.label,(e.statesSelectedByDefault||e.selectedByDefault)&&(t[s.CedarModel.selectedByDefault]=e.selectedByDefault),r.push(t)}),r.length>0&&(t[s.CedarModel.literals]=r)}getAsJsonString(e,t=2){return(0,n.stringifySchema)(this.getAsJsonNode(e,h.ChildDeploymentInfo.standalone()),t)}getAsJsonNode(e,t=h.ChildDeploymentInfo.standalone()){const r=i.JsonNode.getEmpty();this.expandPropertiesNode(r);const n=i.JsonNode.getEmpty();this.expandRequiredNode(n);const l=this.buildUIObject(e,t),m=this.buildValueConstraintsObject(e,t),f={[s.CedarModel.type]:this.atomicWriter.write(d.JavascriptType.OBJECT)};return this.expandTypeNode(f,e),e.extensions.applyJson({[o.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[o.JsonSchema.atType]:this.atomicWriter.write(e.cedarArtifactType),[o.JsonSchema.atContext]:this.macroContext(e),...f,[c.TemplateProperty.title]:e.title,[c.TemplateProperty.description]:e.description,...l,...m,...r,...n,...this.macroAnnotations(e),...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroSkos(e),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[o.JsonSchema.schemaVersion]:this.atomicWriter.write(a.SchemaVersion.CURRENT),[c.TemplateProperty.additionalProperties]:this.atomicWriter.write(p.AdditionalProperties.FALSE),...this.macroSchemaIdentifier(e),[s.CedarModel.schema]:this.atomicWriter.write(u.ArtifactSchema.CURRENT)})}macroContext(e){const t=g.ReaderUtil.deepClone(l.JsonTemplateFieldContentDynamic.CONTEXT_VERBATIM);return e.language!==E.Language.NULL&&(t[o.JsonSchema.atLanguage]=this.atomicWriter.write(e.language)),t}}t.JsonTemplateFieldWriterInternal=I},6320(e,t,r){t.JsonTemplateInstanceWriter=void 0;const n=r(9868),a=r(1625),i=r(9167),s=r(8748),o=r(2733),l=r(936),d=r(9517),c=r(3161),u=r(350),m=r(7723),p=r(5222),h=r(4877),f=r(9327),y=r(3644),T=r(8193),C=r(7571),E=r(7548),g=r(4465),I=r(4033);class A extends c.JsonAbstractArtifactWriter{constructor(e,t){super(e,t)}macroContext(e){return u.JsonTemplateInstanceContent.CONTEXT_VERBATIM}static getFor(e,t){return new A(e,t)}buildContext(e){const t=s.ReaderUtil.deepClone(u.JsonTemplateInstanceContent.CONTEXT_VERBATIM);return Object.keys(e.dataContainer.iris).forEach(r=>{t[r]=e.dataContainer.iris[r]}),{...t}}getDataTree(e){const t=d.JsonNode.getEmpty();return this.serializeDataLevelInto(e.dataContainer,t,!0),t}serializeDataLevelInto(e,t,r=!1){r||(t[o.JsonSchema.atId]=""===e.id?null:e.id),Object.keys(e.values).forEach(r=>{const n=e.values[r];if(Array.isArray(n)){const e=d.JsonNode.getEmptyList();t[r]=e,n.forEach((t,r)=>{if(t instanceof y.InstanceDataAttributeValueFieldName){const r=t.name;return void(r.trim().length>0&&e.push(r))}const n=this.serializeCommonType(t);null!==n&&e.push(n)})}else{const e=this.serializeCommonType(n);if(null!==e&&(t[r]=e),n instanceof f.InstanceDataAttributeValueField){const e=[];Object.keys(n.values).forEach(t=>{e.push(t)}),t[r]=e}}}),this.serializeAttributeValueFields(e,t);const n=d.JsonNode.getEmpty();Object.keys(e.iris).forEach(t=>{n[t]=e.iris[t]}),t[o.JsonSchema.atContext]=n}static writeValueNode(e){const t=this.writeValueNodeWithoutNotation(e);return null!==t&&"language"in e&&null!==e.language&&(t[o.JsonSchema.atLanguage]=e.language),null!==t&&"notation"in e&&null!==e.notation&&(t[o.JsonSchema.skosNotation]=e.notation),null!==t&&"preferredLabel"in e&&null!==e.preferredLabel&&(t[l.CedarModel.skosPrefLabel]=e.preferredLabel),t}static writeValueNodeWithoutNotation(e){return e instanceof a.InstanceDataNotationAtom?null===e.type?d.JsonNode.getEmpty():{[o.JsonSchema.atType]:e.type}:e instanceof p.InstanceDataStringAtom?{[o.JsonSchema.atValue]:e.value,...null===e.label?{}:{[o.JsonSchema.rdfsLabel]:e.label}}:e instanceof h.InstanceDataTypedAtom?{[o.JsonSchema.atValue]:e.value,...null===e.label?{}:{[o.JsonSchema.rdfsLabel]:e.label},[o.JsonSchema.atType]:e.type}:e instanceof i.InstanceDataLabelAtom?{[o.JsonSchema.rdfsLabel]:e.label,...null===e.type?{}:{[o.JsonSchema.atType]:e.type}}:e instanceof T.InstanceDataControlledAtom?{[o.JsonSchema.atId]:e.id,[o.JsonSchema.rdfsLabel]:e.label,...null===e.type?{}:{[o.JsonSchema.atType]:e.type}}:e instanceof C.InstanceDataLinkAtom?{[o.JsonSchema.atId]:e.id,...null===e.type?{}:{[o.JsonSchema.atType]:e.type}}:e instanceof E.InstanceDataEmptyAtom||e instanceof g.InstanceDataEmptyNode?d.JsonNode.getEmpty():null}serializeCommonType(e){if(e instanceof m.InstanceDataContainer){const t=d.JsonNode.getEmpty();return this.serializeDataLevelInto(e,t),t}return A.writeValueNode(e)}serializeAtomString(e){return{[o.JsonSchema.atValue]:e.value,...null===e.label?{}:{[o.JsonSchema.rdfsLabel]:e.label}}}serializeAttributeValueFields(e,t){Object.keys(e.values).forEach(r=>{const n=e.values[r];n instanceof f.InstanceDataAttributeValueField&&Object.keys(n.values).forEach(e=>{const r=n.values[e];r instanceof p.InstanceDataStringAtom&&(t[e]=this.serializeAtomString(r))})})}getAsJsonString(e,t=2){return(0,n.stringifyInstance)(this.getAsJsonNode(e),e.dataContainer,t)}getAsJsonNode(e){I.AttributeValueNamePolicy.assertValid(e.dataContainer);const t=this.buildContext(e),r=this.macroSchemaNameAndDescription(e);return e.descriptionWasAbsent&&""===e.schema_description&&delete r[o.JsonSchema.schemaDescription],{[o.JsonSchema.atId]:this.atomicWriter.write(e.at_id),...r,...this.getDataTree(e),...this.macroAnnotations(e),[o.JsonSchema.atContext]:t,...this.macroIsBasedOn(e),[o.JsonSchema.schemaDescription]:e.schema_description,...this.macroProvenance(e,this.atomicWriter),...this.macroDerivedFrom(e)}}}t.JsonTemplateInstanceWriter=A},7519(e,t,r){t.JsonTemplateWriter=void 0;const n=r(8972),a=r(8557),i=r(8748),s=r(6551),o=r(2733),l=r(936),d=r(2763),c=r(5793),u=r(5747),m=r(2475),p=r(9932),h=r(8872),f=r(7752);class y extends h.JsonAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new y(e,t)}buildProperties(e){const t=i.ReaderUtil.deepClone(s.JsonTemplateContent.PROPERTIES_PARTIAL);e.language!==f.Language.NULL&&(t[o.JsonSchema.atContext][o.JsonSchema.atLanguage]=this.atomicWriter.write(e.language));const r=e.getChildrenInfo().getIRIMap();t[o.JsonSchema.atContext][o.JsonSchema.properties]={...t[o.JsonSchema.atContext][o.JsonSchema.properties],...r};const n=e.getChildrenInfo().getChildNamesWithIri();t[o.JsonSchema.atContext][o.JsonSchema.required]=[...t[o.JsonSchema.atContext][o.JsonSchema.required],...n],e.getChildrenInfo().hasAttributeValue()&&(t[o.JsonSchema.atContext][u.TemplateProperty.additionalProperties]=p.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE);const a={...t,...this.getChildMapAsJson(e)};return this.expandInstanceTypeSpecification(e,a),a}getAsJsonString(e,t=2){return(0,n.stringifySchema)(this.getAsJsonNode(e),t)}getAsJsonNode(e){const t=this.buildProperties(e),r={[l.CedarModel.order]:e.getChildrenInfo().getChildrenNames(),[l.CedarModel.propertyLabels]:e.getChildrenInfo().getPropertyLabelMap(e),[l.CedarModel.propertyDescriptions]:e.getChildrenInfo().getPropertyDescriptionMap(e)};return this.behavior.outputPages()&&(r[l.CedarModel.pages]=[]),null!==e.header&&(r[l.CedarModel.header]=e.header),null!==e.footer&&(r[l.CedarModel.footer]=e.footer),e.extensions.applyJson({[o.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[o.JsonSchema.atType]:this.atomicWriter.write(d.CedarArtifactType.TEMPLATE),[o.JsonSchema.atContext]:this.macroContext(e),[l.CedarModel.type]:this.atomicWriter.write(c.JavascriptType.OBJECT),[u.TemplateProperty.title]:e.title,[u.TemplateProperty.description]:e.description,[l.CedarModel.ui]:r,[o.JsonSchema.properties]:t,[o.JsonSchema.required]:[...s.JsonTemplateContent.REQUIRED_PARTIAL,...e.getChildrenInfo().getChildrenNamesForRequired()],[u.TemplateProperty.additionalProperties]:this.atomicWriter.write(e.getAdditionalProperties()),...this.macroAnnotations(e),...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[o.JsonSchema.schemaVersion]:this.atomicWriter.write(a.SchemaVersion.CURRENT),...this.macroSchemaIdentifier(e),[l.CedarModel.schema]:this.atomicWriter.write(m.ArtifactSchema.CURRENT)})}}t.JsonTemplateWriter=y},9868(e,t,r){t.stringifyInstance=function(e,t,r){return JSON.stringify(function e(t,r){const i={...t},s=new Map;for(const[o,l]of Object.entries(r.values))l instanceof a.InstanceDataAttributeValueField?s.set(o,t[o]):l instanceof n.InstanceDataContainer?i[o]=e(t[o],l):Array.isArray(l)&&Array.isArray(t[o])&&(i[o]=t[o].map((t,r)=>l[r]instanceof n.InstanceDataContainer?e(t,l[r]):t));const o=Object.keys(r.values),l=new Set([...o,...[...s.values()].flat()]),d=Object.keys(i).filter(e=>!l.has(e)),c=o.flatMap(e=>[e,...s.get(e)??[]]).filter(e=>Object.hasOwn(i,e)),u=d.findIndex(e=>"_annotations"===e||"@context"===e);return d.splice(u<0?d.length:u,0,...c),new Proxy(i,{ownKeys:()=>d})}(e,t),null,r)};const n=r(7723),a=r(9327)},8972(e,t,r){t.stringifySchema=function(e,t){return JSON.stringify(function e(t){if(Array.isArray(t))return t.map(e);if(!i(t))return t;const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,e(r)])),n=r._ui,s=i(n)?n.order:void 0;if(Array.isArray(s)&&s.every(e=>"string"==typeof e)&&i(n)&&i(r.properties)){const e=new Set(s),t=r.properties;r.properties=a(t,[...Object.keys(t).filter(t=>!e.has(t)),...s]);const o=t["@context"];i(o)&&i(o.properties)&&(o.properties=a(o.properties,[...Object.keys(o.properties).filter(t=>!e.has(t)),...s]));for(const e of["propertyLabels","propertyDescriptions"]){const t=n[e];i(t)&&(n[e]=a(t,s))}}return r}(e),null,t).replace(/"(?:\\.|[^"\\])*"|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,e=>e.startsWith('"')?e:(0,n.javaPlainDecimal)(Number(e)))};const n=r(7120);function a(e,t){const r=[...new Set([...t.filter(t=>Object.hasOwn(e,t)),...Object.keys(e)])];return new Proxy(e,{ownKeys:()=>r})}function i(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}},5359(e,t,r){t.CedarYamlWriters=void 0;const n=r(4869),a=r(1933),i=r(8354),s=r(2418),o=r(9184),l=r(2395),d=r(7432),c=r(6116),u=r(2342),m=r(2287),p=r(836),h=r(7436),f=r(7594),y=r(1784),T=r(6082),C=r(4935),E=r(6314),g=r(1903),I=r(5251),A=r(1521),b=r(1038),R=r(3292),S=r(9821),v=r(4500),_=r(3080),N=r(8136),w=r(9535),L=r(1181),F=r(765),V=r(3671),O=r(9532),D=r(4647),M=r(9411),B=r(9326),U=r(491),Y=r(4355),x=r(5587),J=r(6557),P=r(4077),k=r(3711),W=r(6967);class K{behavior;yamlDynamicFieldWriters;yamlStaticFieldWriters;yamlValueConstraintsWriters;yamlAtomicWriter;yamlAnnotationsWriter;yamlTemplateWriter;yamlTemplateElementWriter;yamlTemplateInstanceWriter;constructor(e){this.behavior=e,this.yamlAtomicWriter=new u.YamlAtomicWriter(e),this.yamlAnnotationsWriter=new m.YamlAnnotationsWriter(e),this.yamlTemplateWriter=a.YamlTemplateWriter.getFor(e,this),this.yamlTemplateElementWriter=I.YamlTemplateElementWriter.getFor(e,this),this.yamlTemplateInstanceWriter=B.YamlTemplateInstanceWriter.getFor(e,this),this.yamlDynamicFieldWriters=new Map([[n.CedarFieldType.TEXT,new c.YamlFieldWriterTextField(e,this)],[n.CedarFieldType.TEXTAREA,new p.YamlFieldWriterTextArea(e,this)],[n.CedarFieldType.CONTROLLED_TERM,new w.YamlFieldWriterControlledTerm(e,this)],[n.CedarFieldType.PHONE_NUMBER,new S.YamlFieldWriterPhoneNumber(e,this)],[n.CedarFieldType.EMAIL,new b.YamlFieldWriterEmail(e,this)],[n.CedarFieldType.LINK,new y.YamlFieldWriterLink(e,this)],[n.CedarFieldType.EXT_ROR,new U.YamlFieldWriterExtRor(e,this)],[n.CedarFieldType.EXT_ORCID,new Y.YamlFieldWriterExtOrcid(e,this)],[n.CedarFieldType.EXT_PFAS,new x.YamlFieldWriterExtPfas(e,this)],[n.CedarFieldType.EXT_PUBMED,new J.YamlFieldWriterExtPubmed(e,this)],[n.CedarFieldType.EXT_RRID,new P.YamlFieldWriterExtRrid(e,this)],[n.CedarFieldType.EXT_NIH_GRANT_ID,new k.YamlFieldWriterExtNihGrantId(e,this)],[n.CedarFieldType.EXT_DOI,new W.YamlFieldWriterExtDoi(e,this)],[n.CedarFieldType.NUMERIC,new R.YamlFieldWriterNumeric(e,this)],[n.CedarFieldType.TEMPORAL,new h.YamlFieldWriterTemporal(e,this)],[n.CedarFieldType.RADIO,new N.YamlFieldWriterRadio(e,this)],[n.CedarFieldType.CHECKBOX,new v.YamlFieldWriterCheckbox(e,this)],[n.CedarFieldType.SINGLE_SELECT_LIST,new _.YamlFieldWriterList(e,this)],[n.CedarFieldType.MULTIPLE_SELECT_LIST,new _.YamlFieldWriterList(e,this)],[n.CedarFieldType.ATTRIBUTE_VALUE,new A.YamlFieldWriterAttributeValue(e,this)]]),this.yamlStaticFieldWriters=new Map([[n.CedarFieldType.STATIC_PAGE_BREAK,new f.YamlFieldWriterStaticPageBreak(e,this)],[n.CedarFieldType.STATIC_SECTION_BREAK,new T.YAMLFieldWriterStaticSectionsBreak(e,this)],[n.CedarFieldType.STATIC_IMAGE,new C.YamlFieldWriterStaticImage(e,this)],[n.CedarFieldType.STATIC_RICH_TEXT,new E.YamlFieldWriterStaticRichText(e,this)],[n.CedarFieldType.STATIC_YOUTUBE,new g.YamlFieldWriterStaticYoutube(e,this)]]),this.yamlValueConstraintsWriters=new Map([[i.ControlledTermOntology.className,new L.YamlValueConstraintsOntologyWriter(e,this)],[s.ControlledTermClass.className,new F.YamlValueConstraintsClassWriter(e,this)],[o.ControlledTermBranch.className,new V.YamlValueConstraintsBranchWriter(e,this)],[l.ControlledTermValueSet.className,new O.YamlValueConstraintsValueSetWriter(e,this)],[d.ControlledTermAction.className,new D.YamlValueConstraintsActionWriter(e,this)]])}static getStrict(){return new K(M.YamlWriterBehavior.STRICT)}static getFor(e){return new K(e)}getFieldWriterForType(e){let t;if(t=e.isStaticField?this.yamlStaticFieldWriters.get(e):this.yamlDynamicFieldWriters.get(e),t)return t;throw new Error(`No YAML writer found for field type: ${e.getValue()}`)}getFieldWriterForField(e){return this.getFieldWriterForType(e.cedarFieldType)}getAtomicWriter(){return this.yamlAtomicWriter}getAnnotationsWriter(){return this.yamlAnnotationsWriter}getTemplateWriter(){return this.yamlTemplateWriter}getTemplateElementWriter(){return this.yamlTemplateElementWriter}getTemplateInstanceWriter(){return this.yamlTemplateInstanceWriter}getWriterForValueConstraint(e){const t=e.className,r=this.yamlValueConstraintsWriters.get(t);if(r)return r;throw new Error(`No YAML writer found for class type: ${t}`)}}t.CedarYamlWriters=K},7120(e,t){t.javaPlainDecimal=function(e){if(!Number.isFinite(e))throw new RangeError("Expected a finite number");if(0===e)return"0";if(Number.isSafeInteger(e))return String(e);const t=e<0?"-":"",r=Math.abs(e),n=new DataView(new ArrayBuffer(8));n.setFloat64(0,r);const a=n.getBigUint64(0),i=Number(a>>52n&2047n),s=a&(1n<<52n)-1n|(i?1n<<52n:0n),o=i?i-1075:-1074,l=s.toString(2).length,d=o+l-1;let c=s,u=1n;if(o>=0?c<<=BigInt(o):u<<=BigInt(-o),d<=62&&c%u===0n){let e=c/u;const r=d>l?(1n<<BigInt(d-l-1)).toString().length-1:0,n=10n**BigInt(r);return e=(e+n/2n)/n*n,t+String(e)}let m=Math.floor(.289529654*(Number(s)/2**(l-1)-1.5)+.176091259+.301029995663981*d),p=c,h=u;m>=0?h*=10n**BigInt(m):p*=10n**BigInt(-m);const f=o-1-(0n==(s&s-1n)?1:0);let y=1n,T=1n;function C(e,t){for(;t;)[e,t]=[t,e%t];return e}f>=0?y<<=BigInt(f):T<<=BigInt(-f),m>=0?T*=10n**BigInt(m):y*=10n**BigInt(-m);let E=h/C(h,T)*T;function g(e){let t=0;for(;0n==(1n&e);)e>>=1n,t++;return t}function I(e){return 0===e?0:e<27?(5n**BigInt(e)).toString(2).length:3*e}p*=E/h,y*=E/T,h=E,E=C(C(p,h),y),p/=E,h/=E,y/=E;const A=l-g(s)+g(p)+I(Math.max(0,-m)),b=g(h)+1+I(Math.max(0,m)+1),R=A<32&&b<32?32:A<64&&b<64?64:0,S=e=>R?BigInt.asIntN(R,e):e,v=10n*h;let _=0n,N=0,w=!0;for(;;){const e=p/h;p=p%h*10n,y=S(10n*y);let t=y<=0n||p<y,r=y<=0n||(R?S(p+y)>v:p+y>=v);if(w&&0n===e&&!r?m--:(_=10n*_+e,N++),w&&(m<-3||m>=8)&&(t=!1,r=!1),w=!1,t||r){const e=S(S(2n*p)-v);r&&(!t||e>0n||0n===e&&_%2n==1n)&&_++;break}}let L=String(_);const F=m-N+1;if(F>=0)return t+L+"0".repeat(F);const V=L.length+F;return L=V>0?L.slice(0,V)+"."+L.slice(V):"0."+"0".repeat(-V)+L,t+L.replace(/\.?0+$/,"")}},6574(e,t,r){var n,a=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}: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}),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),s=0;s<r.length;s++)"default"!==r[s]&&a(t,e,r[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleYamlSerializer=void 0;const o=r(7120),l=s(r(3198)),d=r(1100),c={blockQuote:"literal",doubleQuotedMinMultiLineLength:1e9,lineWidth:0,minContentWidth:0,defaultStringType:"QUOTE_DOUBLE",defaultKeyType:"PLAIN",doubleQuotedAsJSON:!0},u=new Map([[0,"0"],[7,"a"],[8,"b"],[9,"t"],[10,"n"],[11,"v"],[12,"f"],[13,"r"],[27,"e"],[34,'"'],[92,"\\"],[133,"N"],[160,"_"],[8232,"L"],[8233,"P"]]);function m(e){let t='"';for(const r of e){const e=r.codePointAt(0),n=u.get(e);t+=void 0!==n?"\\"+n:e<32||e>=127&&e<=159?"\\x"+e.toString(16).padStart(2,"0"):e>=55296&&e<=57343||65534===e||65535===e?"\\u"+e.toString(16).padStart(4,"0"):r}return t+'"'}t.SimpleYamlSerializer=class{static serialize(e){const t=new WeakMap,r=new l.default.Document(e,{customTags:e=>e.map(e=>"string"!=typeof e&&void 0===e.collection&&"tag:yaml.org,2002:str"===e.tag?{...e,stringify(r,n,a,i){const s=t.get(r);if(void 0!==s)return s;const o=e.stringify(r,n,a,i);return o.startsWith('"')?m(String(r.value)):o}}:"string"==typeof e||void 0!==e.collection||"tag:yaml.org,2002:float"!==e.tag&&"tag:yaml.org,2002:int"!==e.tag?e:{...e,stringify:(t,r,n,a)=>"number"==typeof t.value&&Number.isFinite(t.value)?(0,o.javaPlainDecimal)(t.value):e.stringify(t,r,n,a)})});return(0,l.visit)(r,{Scalar(e,r,n){if("key"===e&&"string"==typeof r.value){const e=(0,d.yamlKeyNeedsQuoting)(r.value);r.type=e?l.Scalar.QUOTE_DOUBLE:l.Scalar.PLAIN,r.value.length>=128&&(t.set(r,e?m(r.value):r.value),r.type=l.Scalar.BLOCK_LITERAL)}else if("value"===e&&"string"==typeof r.value){const e=n.at(-1);(0,l.isPair)(e)&&(0,l.isScalar)(e.key)&&"string"==typeof e.key.value&&(0,d.mayWriteYamlValuePlain)(e.key.value,r.value)&&(r.type=l.Scalar.PLAIN)}}}),r.toString(c).trim()+"\n"}}},211(e,t,r){t.YamlAbstractArtifactWriter=void 0;const n=r(2112),a=r(8333),i=r(9517),s=r(2099),o=r(3910),l=r(1027),d=r(9129),c=r(8534),u=r(2234),m=r(9857),p=r(7661),h=r(9499),f=r(3281),y=r(6731),T=r(6591),C=r(7752),E=r(8557),g=r(2272);class I extends n.AbstractArtifactWriter{behavior;writers;atomicWriter;annotationsWriter;constructor(e,t){super(),this.behavior=e,this.writers=t,this.atomicWriter=t.getAtomicWriter(),this.annotationsWriter=t.getAnnotationsWriter()}macroNameAndDescription(e){const t=i.JsonNode.getEmpty();return e instanceof a.AbstractSchemaArtifact&&e.language!==C.Language.NULL&&(t[s.YamlKeys.language]=this.atomicWriter.write(e.language)),t[s.YamlKeys.name]=e.schema_name,""!==e.schema_description&&(t[s.YamlKeys.description]=e.schema_description),t}macroStatusAndVersion(e,t){const r=i.JsonNode.getEmpty();return t||(e.bibo_status!==o.BiboStatus.NULL&&(r[s.YamlKeys.status]=this.atomicWriter.write(e.bibo_status)),e.pav_version!==l.PavVersion.NULL&&(r[s.YamlKeys.version]=this.atomicWriter.write(e.pav_version)),r[s.YamlKeys.modelVersion]=this.atomicWriter.write(E.SchemaVersion.CURRENT)),r}macroInstanceType(e){const t=i.JsonNode.getEmpty();return e.instanceTypeSpecifications.length>0&&(t[s.YamlKeys.instanceType]=1===e.instanceTypeSpecifications.length?e.instanceTypeSpecifications[0]:[...e.instanceTypeSpecifications]),t}macroSkos(e){const t=i.JsonNode.getEmpty();return null!==e.skos_prefLabel&&(t[s.YamlKeys.prefLabel]=e.skos_prefLabel),null!==e.skos_altLabel&&e.skos_altLabel.length>0&&(t[s.YamlKeys.altLabels]=e.skos_altLabel),t}macroStandaloneFieldFlags(e){const t=i.JsonNode.getEmpty();return e.hidden&&(t[s.YamlKeys.hidden]=!0),e.continuePreviousLine&&(t[s.YamlKeys.continuePreviousLine]=!0),t}macroStandaloneFieldConfiguration(e){const t=i.JsonNode.getEmpty();return e.cedarFieldType.recordsRequirement&&(e.requiredValue&&(t[s.YamlKeys.required]=!0),e.recommendedValue&&(t[s.YamlKeys.recommended]=!0)),i.JsonNode.hasEntries(t)?{[s.YamlKeys.configuration]:t}:{}}macroValueRecommendation(e){const t=i.JsonNode.getEmpty();return(e instanceof y.ControlledTermFieldImpl||e instanceof T.TextFieldImpl)&&e.valueRecommendationEnabled&&(t[s.YamlKeys.valueRecommendation]=e.valueRecommendationEnabled),t}macroProvenance(e,t){const r=i.JsonNode.getEmpty();return t||(e.pav_createdOn!==m.IsoDate.NULL&&(r[s.YamlKeys.createdOn]=this.atomicWriter.write(e.pav_createdOn)),e.pav_createdBy!==u.CedarUser.NULL&&(r[s.YamlKeys.createdBy]=this.atomicWriter.write(e.pav_createdBy)),e.pav_lastUpdatedOn!==m.IsoDate.NULL&&(r[s.YamlKeys.modifiedOn]=this.atomicWriter.write(e.pav_lastUpdatedOn)),e.oslc_modifiedBy!==u.CedarUser.NULL&&(r[s.YamlKeys.modifiedBy]=this.atomicWriter.write(e.oslc_modifiedBy))),r}macroSchemaIdentifier(e){const t=i.JsonNode.getEmpty();return null!==e.schema_identifier&&(t[s.YamlKeys.identifier]=e.schema_identifier),t}macroType(e){const t=i.JsonNode.getEmpty();return t[s.YamlKeys.type]=this.getYamlType(e),t}macroId(e,t=!1,r=!0){const n=i.JsonNode.getEmpty();return e.at_id===c.CedarArtifactId.NULL||t&&!r||(n[s.YamlKeys.id]=this.atomicWriter.write(e.at_id)),n}macroDerivedFrom(e,t){const r=i.JsonNode.getEmpty();return t||e.pav_derivedFrom!==c.CedarArtifactId.NULL&&(r[s.YamlKeys.derivedFrom]=this.atomicWriter.write(e.pav_derivedFrom)),r}macroIsBasedOn(e){const t=i.JsonNode.getEmpty();return e.schema_isBasedOn!==c.CedarArtifactId.NULL&&(t[s.YamlKeys.isBasedOn]=this.atomicWriter.write(e.schema_isBasedOn)),t}macroPreviousVersion(e,t){const r=i.JsonNode.getEmpty();return t||e.pav_previousVersion!==c.CedarArtifactId.NULL&&(r[s.YamlKeys.previousVersion]=this.atomicWriter.write(e.pav_previousVersion)),r}macroAnnotations(e){return this.annotationsWriter.write(e.annotations)}getYamlType(e){return e instanceof f.Template?h.YamlArtifactType.TEMPLATE.getValue():e instanceof p.TemplateElement?h.YamlArtifactType.ELEMENT.getValue():e instanceof d.TemplateField?e.cedarFieldType.getYamlType().getValue():e instanceof g.TemplateInstance?h.YamlArtifactType.TEMPLATE_INSTANCE.getValue():void 0}}t.YamlAbstractArtifactWriter=I},5386(e,t,r){t.YamlAbstractContainerArtifactWriter=void 0;const n=r(8198),a=r(8878),i=r(9517),s=r(9129),o=r(211),l=r(2099),d=r(3812),c=r(9519),u=r(5692),m=r(699),p=r(513);class h extends o.YamlAbstractArtifactWriter{getChildListAsJSON(e,t){const r=i.JsonNode.getEmptyList();return e.getChildrenInfo().getChildrenNames().forEach(n=>{const a=e.getChild(n);if(null!=a){let o=i.JsonNode.getEmpty();const d=e.getChildrenInfo().get(n);if(null!==d){o[l.YamlKeys.key]=n,o=a instanceof s.TemplateField?{...o,...this.writers.getFieldWriterForType(a.cedarFieldType).getYamlAsJsonNode(a,d,t,!1)}:{...o,...this.writers.getTemplateElementWriter().getYamlAsJsonNode(a,t,!1)};const e=this.getDeploymentInfo(a,d,t);i.JsonNode.hasEntries(e)&&(o[l.YamlKeys.configuration]=e),r.push(o)}}}),r}getDeploymentInfo(e,t,r){const o=i.JsonNode.getEmpty();if(t instanceof d.AbstractDynamicChildDeploymentInfo){const n=!(e instanceof s.TemplateField)||e.cedarFieldType.recordsRequirement;t.requiredValue&&n&&(o[l.YamlKeys.required]=!0),t.hidden&&(o[l.YamlKeys.hidden]=!0),t.recommendedValue&&n&&(o[l.YamlKeys.recommended]=!0),null!==t.iri&&(r||(o[l.YamlKeys.propertyIri]=t.iri))}t instanceof d.AbstractDynamicChildDeploymentInfo||!t.hidden||(o[l.YamlKeys.hidden]=!0),null!==t.label&&t.label!==e?.schema_name&&(o[l.YamlKeys.overrideLabel]=t.label),null!==t.description&&t.description!==e?.schema_description&&(o[l.YamlKeys.overrideDescription]=t.description),t instanceof c.AbstractFieldChildDeploymentInfo&&(t.continuePreviousLine&&(o[l.YamlKeys.continuePreviousLine]=!0),t.valueRecommendationEnabled&&e instanceof s.TemplateField&&e.supportsValueRecommendation()&&(o[l.YamlKeys.valueRecommendation]=!0));const{isMultiInstance:h,minItems:f,maxItems:y}=u.WriterUtil.getMultiMinMax(e,t);let T=f;const C=y;return h&&(null===T&&(T=p.AbstractChildDeploymentInfo.defaultMinItems),e?.isMultiInstanceByDefinition()||e?.isSingleInstanceByDefinition()?t instanceof a.ChildDeploymentInfoAlwaysMultiple&&(null!==t.declaredMinItems&&t.declaredMinItems!==t.defaultMinItems&&(o[l.YamlKeys.minItems]=T),null!==t.declaredMaxItems&&C!==n.UNBOUNDED_MAX_ITEMS&&(o[l.YamlKeys.maxItems]=C)):(o[l.YamlKeys.multiple]=!0,T!==p.AbstractChildDeploymentInfo.defaultMinItems&&(o[l.YamlKeys.minItems]=T),null!==C&&C!==n.UNBOUNDED_MAX_ITEMS&&(o[l.YamlKeys.maxItems]=C))),(0,m.isSizedStaticField)(e)&&(null!==e.width&&(o[l.YamlKeys.width]=e.width),null!==e.height&&(o[l.YamlKeys.height]=e.height)),o}}t.YamlAbstractContainerArtifactWriter=h},2287(e,t,r){t.YamlAnnotationsWriter=void 0;const n=r(9517),a=r(2787),i=r(3549),s=r(2099);t.YamlAnnotationsWriter=class{behavior;constructor(e){this.behavior=e}write(e){const t=n.JsonNode.getEmpty(),r=n.JsonNode.getEmpty();return null!==e&&e.getSize()>0&&(e.getAnnotationNames().forEach(t=>{const n=e.get(t);if(n instanceof a.AnnotationAtId){const e={[s.YamlKeys.id]:n.getAtId()};r[t]=e}else if(n instanceof i.AnnotationAtValue){const e={[s.YamlKeys.value]:n.getAtValue()};r[t]=e}}),t[s.YamlKeys.annotations]=r),t}}},2342(e,t,r){t.YamlAtomicWriter=void 0;const n=r(2022),a=r(4872),i=r(4531),s=r(3910);class o extends a.JsonAtomicWriter{constructor(e){super(n.JsonWriterBehavior.STRICT)}writeCedarArtifactType(e){return e.getYamlValue()}write(e){return null==e?null:e instanceof s.BiboStatus?this.writeBiboStatusYaml(e):e instanceof i.BioportalTermType?this.writeBioportalTermTypeYaml(e):super.write(e)}writeBiboStatusYaml(e){return e.getYamlValue()}writeBioportalTermTypeYaml(e){return e.getYamlValue()}}t.YamlAtomicWriter=o},1100(e,t,r){t.mayWriteYamlValuePlain=function(e,t){return(f.get(e)?.has(t)??(("version"===e||"modelVersion"===e)&&h.test(t)))&&(r=t,!(u.some(e=>e.test(r))||function(e){for(const t of e){const e=t.codePointAt(0)??0;if(9===e||13===e||e<=31&&10!==e||e>=127&&e<=160||5760===e||e>=8192&&e<=8202||8232===e||8233===e||8239===e||8287===e||12288===e||65279===e||e>=55296&&e<=57343||65534===e||65535===e)return!0}return e.startsWith(" ")||e.endsWith(" ")||e.includes(" \n")||0===e.length}(r)));var r},t.yamlKeyNeedsQuoting=function(e){return!/^[A-Za-z_](?:[A-Za-z0-9_ -]*[A-Za-z0-9_-])?$(?![\s\S])/.test(e)||/^(y|yes|n|no|true|false|on|off|null)$/i.test(e)};const n=r(8349),a=r(4531),i=r(3910),s=r(3447),o=r(7974),l=r(8588),d=r(3764),c=r(9499),u=[/^\d{4}-\d{1,2}-\d{1,2}(?:$|[Tt ])/,/^(y|Y|n|N|yes|Yes|YES|no|No|NO|on|On|ON|off|Off|OFF|true|True|TRUE|false|False|FALSE)$/,/^(null|Null|NULL|~|<<|=)$/,/^[-+]?[0-9][0-9_]*$/,/^[-+]?0[xX][0-9a-fA-F_]+$/,/^[-+]?0[bB][01_]+$/,/^[-+]?0[oO]?[0-7_]+$/,/^[-+]?[0-9_]*\.?[0-9_]+([eE][-+]?[0-9]+)?$/,/^[-+]?\.(inf|Inf|INF|nan|NaN|NAN)$/,/^[-+]?[0-9][0-9_]*(:[0-5]?[0-9])+(\.[0-9_]*)?$/];const m=new Set([...Object.values(c.YamlArtifactTypeValues),"element-instance",n.YamlValues.Controlled.class,a.BioportalTermTypeYamlValues.VALUE,n.YamlValues.Controlled.ontology,n.YamlValues.Controlled.branch,n.YamlValues.Controlled.valueSet]),p=new Set(["xsd:string","xsd:anyUri",...Object.values(l.TemporalTypeValues),...Object.values(s.NumberTypeValues),n.YamlValues.iri]),h=/^\d+\.\d+\.\d+$/,f=new Map([["type",m],["status",new Set(Object.values(i.BiboStatusYamlValues))],["datatype",p],["action",new Set(["move","delete"])],["granularity",new Set(Object.values(o.TemporalGranularityValues))],["termType",new Set(Object.values(a.BioportalTermTypeYamlValues))],["inputTimeFormat",new Set(Object.values(d.TimeFormatValues))]]);new Set([...f.keys(),"version","modelVersion"])},5251(e,t,r){t.YamlTemplateElementWriter=void 0;const n=r(9517),a=r(6574),i=r(2099),s=r(5386);class o extends s.YamlAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new o(e,t)}getYamlAsJsonNode(e,t=!1,r=!0){const a=n.JsonNode.getEmpty();null!==e.header&&(a[i.YamlKeys.header]=e.header),null!==e.footer&&(a[i.YamlKeys.footer]=e.footer);const s={...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,t,r),...this.macroStatusAndVersion(e,t),...this.macroInstanceType(e),...a,...this.macroPreviousVersion(e,t),...this.macroDerivedFrom(e,t),...this.macroProvenance(e,t),...this.macroSkos(e),...this.macroAnnotations(e)},o=this.getChildListAsJSON(e,t);return o.length>0&&(s[i.YamlKeys.children]=o),e.extensions.applyYaml(s)}getAsYamlString(e,t=!1){return a.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,t))}}t.YamlTemplateElementWriter=o},5430(e,t,r){t.YamlTemplateFieldWriterInternal=void 0;const n=r(9517),a=r(936),i=r(455),s=r(2099),o=r(211),l=r(6574);class d extends o.YamlAbstractArtifactWriter{constructor(e,t){super(e,t)}getAsYamlString(e,t=!1){return l.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,i.ChildDeploymentInfo.empty(),t))}getYamlAsJsonNode(e,t=i.ChildDeploymentInfo.empty(),r=!1,n=!0){const a=this.buildUIObject(e,t),s=this.buildValueConstraintsObject(e,t);return e.extensions.applyYaml({...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,r,n),...this.macroStatusAndVersion(e,r),...this.macroSkos(e),...a,...s,...this.macroPreviousVersion(e,r),...this.macroDerivedFrom(e,r),...this.macroProvenance(e,r),...this.macroAnnotations(e),...n?this.macroStandaloneFieldFlags(e):{},...this.macroValueRecommendation(e),...n?this.macroStandaloneFieldConfiguration(e):{}})}expandUINodeForYAML(e){return n.JsonNode.getEmpty()}expandValueConstraintsNodeForYAML(e,t,r){}buildValueConstraintsObject(e,t){const r=n.JsonNode.getEmpty();return this.expandValueConstraintsNodeForYAML(r,e,t),r}expandLiterals(e,t){const r=n.JsonNode.getEmptyList();e.valueConstraints.literals.forEach(e=>{const t=n.JsonNode.getEmpty();t[a.CedarModel.label]=e.label,(e.statesSelectedByDefault||e.selectedByDefault)&&(t[s.YamlKeys.selected]=e.selectedByDefault),r.push(t)}),r.length>0&&(t[s.YamlKeys.values]=r)}buildUIObject(e,t){return this.expandUINodeForYAML(e)}}t.YamlTemplateFieldWriterInternal=d},9326(e,t,r){t.YamlTemplateInstanceWriter=void 0;const n=r(5588),a=r(1625),i=r(9167),s=r(9517),o=r(6574),l=r(211),d=r(7723),c=r(9327),u=r(5222),m=r(7571),p=r(4877),h=r(8193),f=r(2099),y=r(4033),T=r(3644),C="element-instance";class E extends l.YamlAbstractArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new E(e,t)}getYamlAsJsonNode(e,t=!1){return y.AttributeValueNamePolicy.assertValid(e.dataContainer),{...this.macroType(e),...this.macroNameAndDescription(e),...this.macroId(e,t,!0),...this.macroIsBasedOn(e),...this.macroDerivedFrom(e,t),...this.macroProvenance(e,t),...this.getDataTree(e,t),...this.macroAnnotations(e)}}getAsYamlString(e,t=!1){return o.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,t))}getDataTree(e,t){const r=s.JsonNode.getEmpty();return this.serializeDataLevelInto(e.dataContainer,r,t,!0),r}serializeDataLevelInto(e,t,r,n=!1){const a=s.JsonNode.getEmpty(),i=this.getUnpackedAttributeValueGroups(e),o=new Set(Array.from(i.values()).flat());Object.keys(e.values).forEach(t=>{if(i.has(t)||o.has(t))return;const n=e.values[t];if(Array.isArray(n)){const e=s.JsonNode.getEmptyList();n.forEach((t,n)=>{const a=this.serializeCommonType(t,r);if(null!==a&&s.JsonNode.hasEntries(a))e.push(a);else if(t instanceof d.InstanceDataContainer){const n={[f.YamlKeys.type]:C};!r&&this.hasId(t.id)&&(n[f.YamlKeys.id]=t.id),e.push(n)}}),e.length>0&&(a[t]=e)}else{const e=this.serializeCommonType(n,r);null!==e&&s.JsonNode.hasEntries(e)&&(a[t]=e)}}),s.JsonNode.hasEntries(a)&&(!this.hasId(e.id)||r&&!n||(t[f.YamlKeys.id]=e.id),t[f.YamlKeys.children]=a);const l=s.JsonNode.getEmpty();this.serializeAttributeValueFields(e,l,i,n),n||!s.JsonNode.hasEntries(t)&&!s.JsonNode.hasEntries(l)||(Object.hasOwn(t,f.YamlKeys.children)||(t[f.YamlKeys.type]=C),!r&&this.hasId(e.id)&&(t[f.YamlKeys.id]=e.id)),Object.assign(t,l)}serializeAttributeValueFields(e,t,r,a){Object.keys(e.values).forEach(i=>{const o=e.values[i];if((o instanceof c.InstanceDataAttributeValueField||r.has(i))&&n.ReservedNames.yamlKeys(a?"template":"element").has(i))throw new Error(`Attribute-value field key "${i}" is reserved for CEDAR YAML metadata.`);if(o instanceof c.InstanceDataAttributeValueField){const e=s.JsonNode.getEmpty();let r=!1;Object.keys(o.values).forEach(t=>{const n=o.values[t];if(n instanceof u.InstanceDataStringAtom){const a=this.serializeAtomString(n);null!==a&&(e[t]=a,r=!0)}}),r&&(t[i]=e)}});for(const[n,a]of r){const r=s.JsonNode.getEmpty();for(const t of a){const n=e.values[t];if(n instanceof u.InstanceDataStringAtom){const e=this.serializeAtomString(n);null!==e&&(r[t]=e)}}s.JsonNode.hasEntries(r)&&(t[n]=r)}}getUnpackedAttributeValueGroups(e){const t=new Map;for(const[r,n]of Object.entries(e.values)){if(!Array.isArray(n))continue;const e=n.filter(e=>e instanceof T.InstanceDataAttributeValueFieldName).map(e=>e.name).filter(e=>e.trim().length>0);e.length>0&&t.set(r,e)}return t}serializeCommonType(e,t){let r=this.serializeCommonTypeWithoutNotation(e,t);if("notation"in e&&null!==e.notation){const t=r??s.JsonNode.getEmpty();t[f.YamlKeys.notation]=e.notation,r=t}if("preferredLabel"in e&&null!==e.preferredLabel){const t=r??s.JsonNode.getEmpty();t[f.YamlKeys.prefLabel]=e.preferredLabel,r=t}return null!==r&&"language"in e&&null!==e.language&&(r[f.YamlKeys.language]=e.language),r}serializeCommonTypeWithoutNotation(e,t){if(e instanceof a.InstanceDataNotationAtom)return null===e.type?s.JsonNode.getEmpty():{[f.YamlKeys.datatype]:e.type};if(e instanceof u.InstanceDataStringAtom)return this.serializeAtomString(e);if(e instanceof p.InstanceDataTypedAtom)return null===e.value&&null===e.label&&null===e.notation&&null===e.preferredLabel?null:{[f.YamlKeys.datatype]:e.type,[f.YamlKeys.value]:e.value,...null===e.label?{}:{[f.YamlKeys.label]:e.label}};if(e instanceof i.InstanceDataLabelAtom)return{...null===e.type?{}:{[f.YamlKeys.datatype]:e.type},[f.YamlKeys.label]:e.label};if(e instanceof h.InstanceDataControlledAtom){const t=s.JsonNode.getEmpty();return null===e.type||!this.hasId(e.id)&&null===e.label&&null===e.notation||(t[f.YamlKeys.datatype]=e.type),this.hasId(e.id)&&(t[f.YamlKeys.id]=e.id),null!==e.label&&(t[f.YamlKeys.label]=e.label),s.JsonNode.hasEntries(t)?t:null}if(e instanceof m.InstanceDataLinkAtom)return this.serializeAtomLink(e);if(e instanceof d.InstanceDataContainer){const r=s.JsonNode.getEmpty();return this.serializeDataLevelInto(e,r,t),r}return null}serializeAtomString(e){return null===e.value&&null===e.label&&null===e.notation&&null===e.preferredLabel?null:{[f.YamlKeys.value]:e.value,...null===e.label?{}:{[f.YamlKeys.label]:e.label}}}serializeAtomLink(e){return this.hasId(e.id)?{...null===e.type?{}:{[f.YamlKeys.datatype]:e.type},[f.YamlKeys.id]:e.id}:null!==e.notation&&null!==e.type?{[f.YamlKeys.datatype]:e.type}:null}hasId(e){return null!==e&&""!==e}}t.YamlTemplateInstanceWriter=E},1933(e,t,r){t.YamlTemplateWriter=void 0;const n=r(9517),a=r(6574),i=r(2099),s=r(5386);class o extends s.YamlAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new o(e,t)}getYamlAsJsonNode(e,t=!1){const r=n.JsonNode.getEmpty();null!==e.header&&(r[i.YamlKeys.header]=e.header),null!==e.footer&&(r[i.YamlKeys.footer]=e.footer);const a={...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,t,!0),...this.macroStatusAndVersion(e,t),...this.macroInstanceType(e),...r,...this.macroPreviousVersion(e,t),...this.macroDerivedFrom(e,t),...this.macroProvenance(e,t),...this.macroAnnotations(e)},s=this.getChildListAsJSON(e,t);return s.length>0&&(a[i.YamlKeys.children]=s),e.extensions.applyYaml(a)}getAsYamlString(e,t=!1){return a.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,t))}}t.YamlTemplateWriter=o},1641(e,t,r){t.AbstractArtifactBuilder=void 0;const n=r(4443),a=r(8333),i=r(2763),s=r(9857),o=r(2234),l=r(1027),d=r(3910),c=r(8534),u=r(8557);class m{at_id=c.CedarArtifactId.NULL;title=null;description=null;schema_schemaVersion=u.SchemaVersion.CURRENT;pav_createdOn=s.IsoDate.NULL;pav_createdBy=o.CedarUser.NULL;pav_lastUpdatedOn=s.IsoDate.NULL;oslc_modifiedBy=o.CedarUser.NULL;extensions=new n.SchemaExtensions;withExtensions(e){return this.extensions=e,this}pav_version=l.PavVersion.DEFAULT;bibo_status=d.BiboStatus.DRAFT;schema_name=null;schema_description="";schema_identifier=null;pav_derivedFrom=c.CedarArtifactId.NULL;withAtId(e){return e instanceof c.CedarArtifactId?this.at_id=e:this.at_id=c.CedarArtifactId.forValue(e),this}withTitle(e){return this.title=e,this}withDescription(e){return this.description=e,this}withSchemaVersion(e){return this.schema_schemaVersion=e,this}withCreatedOn(e){return e instanceof s.IsoDate?this.pav_createdOn=e:this.pav_createdOn=s.IsoDate.forValue(e),this}withCreatedBy(e){return e instanceof o.CedarUser?this.pav_createdBy=e:this.pav_createdBy=o.CedarUser.forValue(e),this}withLastUpdatedOn(e){return e instanceof s.IsoDate?this.pav_lastUpdatedOn=e:this.pav_lastUpdatedOn=s.IsoDate.forValue(e),this}withModifiedBy(e){return e instanceof o.CedarUser?this.oslc_modifiedBy=e:this.oslc_modifiedBy=o.CedarUser.forValue(e),this}withVersion(e){return e instanceof l.PavVersion?this.pav_version=e:this.pav_version=l.PavVersion.forValue(e),this}withStatus(e){return e instanceof d.BiboStatus?this.bibo_status=e:this.bibo_status=d.BiboStatus.forJsonValue(e),this}withSchemaName(e){return this.schema_name=e,this}withSchemaDescription(e){return this.schema_description=e??"",this}withDerivedFrom(e){return this.pav_derivedFrom=e,this}withSchemaIdentifier(e){return this.schema_identifier=e,this}buildInternal(e){if(e.at_id=this.at_id,e.title=this.title,e.description=this.description,e.schema_schemaVersion=this.schema_schemaVersion,e.pav_createdOn=this.pav_createdOn,e.pav_createdBy=this.pav_createdBy,e.pav_lastUpdatedOn=this.pav_lastUpdatedOn,e.oslc_modifiedBy=this.oslc_modifiedBy,e.extensions=this.extensions,e.pav_version=this.pav_version,e.bibo_status=this.bibo_status,e.schema_name=this.schema_name,e.schema_description=this.schema_description,e.schema_identifier=this.schema_identifier,e.pav_derivedFrom=this.pav_derivedFrom,null===e.title&&null!==e.schema_name){const t=m.kindOf(e.cedarArtifactType);null!==t&&(e.title=(0,a.internalNameFor)(e.schema_name,t))}}static kindOf(e){return e===i.CedarArtifactType.TEMPLATE?"template":e===i.CedarArtifactType.TEMPLATE_ELEMENT?"element":e===i.CedarArtifactType.TEMPLATE_FIELD||e===i.CedarArtifactType.STATIC_TEMPLATE_FIELD?"field":null}}t.AbstractArtifactBuilder=m},2674(e,t,r){t.AbstractArtifact=void 0;const n=r(9857),a=r(2234),i=r(8534),s=r(2763);t.AbstractArtifact=class{at_id=i.CedarArtifactId.NULL;pav_createdOn=n.IsoDate.NULL;pav_createdBy=a.CedarUser.NULL;pav_lastUpdatedOn=n.IsoDate.NULL;oslc_modifiedBy=a.CedarUser.NULL;pav_derivedFrom=i.CedarArtifactId.NULL;schema_name=null;schema_description="";cedarArtifactType=s.CedarArtifactType.NULL;annotations=null}},5451(e,t,r){t.AbstractContainerArtifact=void 0;const n=r(8333),a=r(1492),i=r(3746),s=r(2763),o=r(4869),l=r(5588);class d extends n.AbstractSchemaArtifact{childrenInfo=new a.ContainerArtifactChildrenInfo;childMap=new Map;instanceTypes=[];get instanceTypeSpecifications(){return[...this.instanceTypes]}set instanceTypeSpecifications(e){if(!Array.isArray(e)||e.some(e=>"string"!=typeof e||!/^[a-z][a-z0-9+.-]*:\S+$/i.test(e))||new Set(e).size!==e.length)throw new Error("Instance types must be unique absolute IRIs");this.instanceTypes=[...e]}get instanceTypeSpecification(){return this.instanceTypeSpecifications[0]??null}set instanceTypeSpecification(e){this.instanceTypeSpecifications=null===e?[]:[e]}addChild(e,t){d.refuseReservedChildName(this,e,t.name),this.childrenInfo.add(t),this.childMap.set(t.name,e)}static refuseReservedChildName(e,t,r){if(Array.from(r).every(d.isJavaWhitespace))throw new Error("A child key must not be blank.");const n=t.cedarArtifactType===s.CedarArtifactType.TEMPLATE_FIELD&&t.cedarFieldType===o.CedarFieldType.ATTRIBUTE_VALUE,a=e.cedarArtifactType===s.CedarArtifactType.TEMPLATE?"template":"element";if(n?l.ReservedNames.isReservedAttributeValueFieldName(r,a):l.ReservedNames.isReservedName(r))throw new Error(`Child name "${r}" is reserved for CEDAR instance metadata.`)}static isJavaWhitespace(e){const t=e.codePointAt(0);return t>=9&&t<=13||t>=28&&t<=31||/\p{Z}/u.test(e)&&160!==t&&8199!==t&&8239!==t}getChildrenInfo(){return this.childrenInfo}getAdditionalProperties(){return this.childrenInfo.hasAttributeValue()?i.AdditionalProperties.ALLOW_ATTRIBUTE_VALUE:i.AdditionalProperties.FALSE}getChild(e){return this.childMap.get(e)??null}getElement(e){const t=this.getChild(e);return null!==t&&t.cedarArtifactType===s.CedarArtifactType.TEMPLATE_ELEMENT?t:null}getField(e){const t=this.getChild(e);return null!==t&&t.cedarArtifactType===s.CedarArtifactType.TEMPLATE_FIELD?t:null}getChildInfo(e){return this.childrenInfo.get(e)}}t.AbstractContainerArtifact=d},5697(e,t,r){t.AbstractInstanceArtifact=void 0;const n=r(8534),a=r(2674);class i extends a.AbstractArtifact{schema_isBasedOn=n.CedarArtifactId.NULL}t.AbstractInstanceArtifact=i},8333(e,t,r){t.AbstractSchemaArtifact=void 0,t.internalNameFor=function(e,t){return`${e} ${t} schema`};const n=r(4443),a=r(1027),i=r(3910),s=r(8534),o=r(8557),l=r(2674),d=r(7752);class c extends l.AbstractArtifact{extensions=new n.SchemaExtensions;title=null;description=null;schema_schemaVersion=o.SchemaVersion.NULL;pav_version=a.PavVersion.NULL;bibo_status=i.BiboStatus.NULL;schema_identifier=null;pav_previousVersion=s.CedarArtifactId.NULL;language=d.Language.NULL}t.AbstractSchemaArtifact=c},5588(e,t,r){t.ReservedNames=void 0;const n=r(2099);class a{static INSTANCE_PROPERTIES=new Set(["schema:name","schema:description","schema:identifier","schema:isBasedOn","pav:createdOn","pav:createdBy","pav:lastUpdatedOn","pav:derivedFrom","oslc:modifiedBy","_annotations","rdfs:label","skos:notation","skos:prefLabel","skos:altLabel"]);static OBJECT_INTERNALS=new Set(["__proto__","constructor","prototype"]);static TEMPLATE_INSTANCE_YAML_KEYS=new Set([n.YamlKeys.type,n.YamlKeys.name,n.YamlKeys.description,n.YamlKeys.id,n.YamlKeys.isBasedOn,n.YamlKeys.derivedFrom,n.YamlKeys.children,n.YamlKeys.annotations,n.YamlKeys.createdOn,n.YamlKeys.createdBy,n.YamlKeys.modifiedOn,n.YamlKeys.modifiedBy]);static NESTED_ELEMENT_INSTANCE_YAML_KEYS=new Set([n.YamlKeys.type,n.YamlKeys.id,n.YamlKeys.children]);static STANDALONE_ELEMENT_INSTANCE_YAML_KEYS=new Set([n.YamlKeys.type,n.YamlKeys.name,n.YamlKeys.description,n.YamlKeys.id,n.YamlKeys.children,n.YamlKeys.createdOn,n.YamlKeys.createdBy,n.YamlKeys.modifiedOn,n.YamlKeys.modifiedBy]);static requireChildName(e){if(a.isReservedName(e))throw new Error(`Child name "${e}" is reserved for CEDAR instance metadata.`)}constructor(){}static isReservedName(e){return e.startsWith("@")||a.INSTANCE_PROPERTIES.has(e)||a.OBJECT_INTERNALS.has(e)}static isReservedAttributeValueFieldName(e,t){return a.isReservedName(e)||("template"===t?a.TEMPLATE_INSTANCE_YAML_KEYS:a.STANDALONE_ELEMENT_INSTANCE_YAML_KEYS).has(e)}static yamlKeys(e){return"template"===e?a.TEMPLATE_INSTANCE_YAML_KEYS:a.NESTED_ELEMENT_INSTANCE_YAML_KEYS}}t.ReservedNames=a},4443(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaExtensions=void 0;const r=new Set(["xsd","pav","bibo","oslc","schema","skos","rdfs","_annotations"]);function n(e){return/^[A-Za-z_][A-Za-z0-9_-]*$/.test(e)&&!r.has(e)}function a(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function i(e){return Array.isArray(e)?e.map(i):a(e)?Object.fromEntries(Object.keys(e).sort().map(t=>[t,i(e[t])])):e}class s{namespaces;values;constructor(e={},t={}){for(const[t,r]of Object.entries(e))if(!n(t)||"string"!=typeof r||!/^[A-Za-z][A-Za-z0-9+.-]*:[^\s]*$/.test(r))throw new Error(`Invalid schema extension prefix: ${t}`);for(const r of Object.keys(t)){const t=r.indexOf(":");if(t<1||t===r.length-1||!Object.hasOwn(e,r.slice(0,t)))throw new Error(`Unbound schema extension property: ${r}`)}this.namespaces=i(e),this.values=i(t)}get prefixes(){return{...this.namespaces}}get properties(){return i(this.values)}get isEmpty(){return 0===Object.keys(this.namespaces).length&&0===Object.keys(this.values).length}static fromJson(e){const t=a(e["@context"])?e["@context"]:{},r=Object.fromEntries(Object.entries(t).filter(([e,t])=>n(e)&&"string"==typeof t)),i=Object.fromEntries(Object.entries(e).filter(([e])=>{const t=e.indexOf(":");return t>0&&Object.hasOwn(r,e.slice(0,t))}));return new s(r,i)}static fromYaml(e){if(!Object.hasOwn(e,"extensions"))return new s;const t=e.extensions;if(!a(t)||2!==Object.keys(t).length||!a(t.prefixes)||!a(t.properties))throw new Error("extensions requires prefixes and properties objects");return new s(t.prefixes,t.properties)}applyJson(e){return e["@context"]={...e["@context"],...this.prefixes},Object.assign(e,this.properties),e}applyYaml(e){return this.isEmpty||(e.extensions={prefixes:this.prefixes,properties:this.properties}),e}}t.SchemaExtensions=s},2787(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationAtId=void 0,t.AnnotationAtId=class{name;id;constructor(e,t){this.name=e,this.id=t}getName(){return this.name}getAtId(){return this.id}}},3549(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationAtValue=void 0,t.AnnotationAtValue=class{name;value;constructor(e,t){this.name=e,this.value=t}getName(){return this.name}getAtValue(){return this.value}}},5226(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Annotations=void 0,t.Annotations=class{annotations=new Map;add(e){this.annotations.set(e.getName(),e)}getSize(){return this.annotations.size}getAnnotationNames(){return Array.from(this.annotations.keys())}get(e){return this.annotations.has(e)?this.annotations.get(e):null}}},936(e,t){t.CedarModel=void 0,t.CedarModel=class{static ui="_ui";static schema="$schema";static order="order";static inputType="inputType";static type="type";static items="items";static valueConstraints="_valueConstraints";static requiredValue="requiredValue";static defaultValue="defaultValue";static minItems="minItems";static maxItems="maxItems";static minLength="minLength";static maxLength="maxLength";static numberType="numberType";static temporalType="temporalType";static temporalGranularity="temporalGranularity";static timezoneEnabled="timezoneEnabled";static inputTimeFormat="inputTimeFormat";static unitOfMeasure="unitOfMeasure";static minValue="minValue";static maxValue="maxValue";static decimalPlace="decimalPlace";static content="_content";static size="_size";static width="width";static height="height";static regex="regex";static pages="pages";static header="header";static footer="footer";static ontologies="ontologies";static valueSets="valueSets";static classes="classes";static branches="branches";static actions="actions";static multipleChoice="multipleChoice";static literals="literals";static label="label";static selectedByDefault="selectedByDefault";static propertyDescriptions="propertyDescriptions";static propertyLabels="propertyLabels";static skosPrefLabel="skos:prefLabel";static skosAltLabel="skos:altLabel";static skosNotation="skos:notation";static format="format";static enum="enum";static annotations="_annotations";static propertyIriPrefix="https://schema.metadatacenter.org/properties/";static ValueConstraints=class{static acronym="acronym";static name="name";static uri="uri";static numTerms="numTerms";static label="label";static source="source";static type="type";static termType="termType";static prefLabel="prefLabel";static maxDepth="maxDepth";static vsCollection="vsCollection";static termUri="termUri";static sourceUri="sourceUri";static iri="iri";static sourceSystem="sourceSystem";static version="version";static versionId="id";static versionEffectiveDate="effectiveDate";static versionDeclaredVersion="declaredVersion";static action="action";static to="to";static recommendedValue="recommendedValue"};static Ui=class{static hidden="hidden";static continuePreviousLine="continuePreviousLine";static valueRecommendationEnabled="valueRecommendationEnabled"}}},2733(e,t){t.JsonSchema=void 0,t.JsonSchema=class{static skosNotation="skos:notation";static properties="properties";static required="required";static atContext="@context";static atId="@id";static atType="@type";static atValue="@value";static atLanguage="@language";static schemaIsBasedOn="schema:isBasedOn";static schemaName="schema:name";static schemaDescription="schema:description";static schemaVersion="schema:schemaVersion";static schemaIdentifier="schema:identifier";static pavDerivedFrom="pav:derivedFrom";static pavPreviousVersion="pav:previousVersion";static pavCreatedOn="pav:createdOn";static pavCreatedBy="pav:createdBy";static pavLastUpdatedOn="pav:lastUpdatedOn";static oslcModifiedBy="oslc:modifiedBy";static pavVersion="pav:version";static biboStatus="bibo:status";static rdfsLabel="rdfs:label";static termUri="termUri";static enum="enum";static oneOf="oneOf";static type="type";static items="items"}},4216(e,t){t.NonStandardDatatype=void 0,t.NonStandardDatatype=class{static IRI="iri"}},5747(e,t){t.TemplateProperty=void 0,t.TemplateProperty=class{static title="title";static description="description";static additionalProperties="additionalProperties"}},2099(e,t){t.YamlKeys=void 0,t.YamlKeys=class{static notation="notation";static id="id";static type="type";static name="name";static description="description";static modelVersion="modelVersion";static status="status";static version="version";static language="language";static label="label";static prefLabel="prefLabel";static altLabels="altLabels";static datatype="datatype";static valueRecommendation="valueRecommendation";static required="required";static recommended="recommended";static hidden="hidden";static continuePreviousLine="continuePreviousLine";static propertyIri="propertyIri";static overrideLabel="overrideLabel";static overrideDescription="overrideDescription";static default="default";static minLength="minLength";static maxLength="maxLength";static regex="regex";static identifier="identifier";static derivedFrom="derivedFrom";static previousVersion="previousVersion";static createdOn="createdOn";static createdBy="createdBy";static modifiedOn="modifiedOn";static modifiedBy="modifiedBy";static isBasedOn="isBasedOn";static instanceType="instanceType";static annotations="annotations";static value="value";static granularity="granularity";static inputTimeZone="inputTimeZone";static inputTimeFormat="inputTimeFormat";static header="header";static footer="footer";static children="children";static multiple="multiple";static minItems="minItems";static maxItems="maxItems";static content="content";static height="height";static width="width";static key="key";static minValue="minValue";static maxValue="maxValue";static decimalPlaces="decimalPlaces";static unit="unit";static multipleChoice="multipleChoice";static values="values";static selected="selected";static actions="actions";static action="action";static configuration="configuration";static Controlled=class{static sourceSystem="sourceSystem";static sourceAcronym="sourceAcronym";static sourceName="sourceName";static sourceIri="sourceIri";static sourceUri="sourceUri";static termIri="termIri";static termType="termType";static termLabel="termLabel";static termDisplayLabel="termDisplayLabel";static termBaseIri="termBaseIri";static termBaseLabel="termBaseLabel";static termMaxDepth="termMaxDepth";static termCount="termCount";static versionId="id";static versionEffectiveDate="effectiveDate";static versionDeclaredVersion="declaredVersion";static to="to"}}},8349(e,t){t.YamlValues=void 0,t.YamlValues=class{static id="id";static value="value";static iri="iri";static string="string";static Controlled=class{static class="class";static ontology="ontology";static valueSet="valueSet";static branch="branch"}}},513(e,t,r){t.AbstractChildDeploymentInfo=void 0;const n=r(2763),a=r(9034);t.AbstractChildDeploymentInfo=class{static defaultMinItems=1;_name;_atType=n.CedarArtifactType.NULL;_uiInputType=a.UiInputType.NULL;_label=null;_description=null;constructor(e){this._name=e}get name(){return this._name}hasParent(){return""!==this._name}get atType(){return this._atType}set atType(e){this._atType=e}get uiInputType(){return this._uiInputType}set uiInputType(e){this._uiInputType=e}get label(){return this._label}set label(e){this._label=e}get description(){return this._description}set description(e){this._description=e}get hidden(){return!1}}},6910(e,t,r){t.AbstractChildDeploymentInfoBuilder=void 0;const n=r(2763),a=r(9034),i=r(9129);t.AbstractChildDeploymentInfoBuilder=class{child=null;name="";atType=n.CedarArtifactType.NULL;uiInputType=a.UiInputType.NULL;label=null;description=null;constructor(e,t){this.child=e,this.name=t}withLabel(e){return this.label=e,this}withDescription(e){return this.description=e,this}setCommonData(e){e.label=this.label,e.description=this.description,e.atType=this.atType,e.uiInputType=this.uiInputType,null!=this.child&&(e.atType=this.child.cedarArtifactType,this.child instanceof i.TemplateField&&(e.uiInputType=this.child.cedarFieldType.getUiInputType()))}}},3812(e,t,r){t.AbstractDynamicChildDeploymentInfo=void 0;const n=r(513);class a extends n.AbstractChildDeploymentInfo{_iri=null;constructor(e){super(e)}get iri(){return this._iri}set iri(e){this._iri=e}get requiredValue(){return!1}get recommendedValue(){return!1}get minItems(){return null}get maxItems(){return null}}t.AbstractDynamicChildDeploymentInfo=a},4809(e,t,r){t.AbstractDynamicChildDeploymentInfoBuilder=void 0;const n=r(455),a=r(6910);class i extends a.AbstractChildDeploymentInfoBuilder{iri=null;constructor(e,t){super(e,t)}withIri(e){return this.iri=e,this}build(){const e=new n.ChildDeploymentInfo(this.name);return this.setCommonData(e),e}setCommonData(e){super.setCommonData(e),e.iri=this.iri}}t.AbstractDynamicChildDeploymentInfoBuilder=i},9519(e,t,r){t.AbstractFieldChildDeploymentInfo=void 0;const n=r(3812);class a extends n.AbstractDynamicChildDeploymentInfo{_hidden=!1;_requiredValue=!1;_recommendedValue=!1;_continuePreviousLine=!1;_valueRecommendationEnabled=!1;constructor(e){super(e)}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get requiredValue(){return this._requiredValue}set requiredValue(e){this._requiredValue=e}get recommendedValue(){return this._recommendedValue}set recommendedValue(e){this._recommendedValue=e}get continuePreviousLine(){return this._continuePreviousLine}set continuePreviousLine(e){this._continuePreviousLine=e}get valueRecommendationEnabled(){return this._valueRecommendationEnabled}set valueRecommendationEnabled(e){this._valueRecommendationEnabled=e}}t.AbstractFieldChildDeploymentInfo=a},6096(e,t,r){t.AbstractFieldChildDeploymentInfoBuilder=void 0;const n=r(9129),a=r(4809),i=r(9519);class s extends a.AbstractDynamicChildDeploymentInfoBuilder{hidden=!1;requiredValue=!1;recommendedValue=!1;continuePreviousLine=!1;valueRecommendationEnabled=!1;constructor(e,t){super(e,t)}withHidden(e){return this.hidden=e,this}get recordsRequirement(){return!(this.child instanceof n.TemplateField)||this.child.cedarFieldType.recordsRequirement}withRequiredValue(e){return this.recordsRequirement&&(this.requiredValue=e),this}withRecommendedValue(e){return this.recordsRequirement&&(this.recommendedValue=e),this}withContinuePreviousLine(e){return this.continuePreviousLine=e,this}withValueRecommendationEnabled(e){return this.valueRecommendationEnabled=e,this}setCommonData(e){super.setCommonData(e),e instanceof i.AbstractFieldChildDeploymentInfo&&(e.hidden=this.hidden,e.requiredValue=this.requiredValue,e.recommendedValue=this.recommendedValue,e.continuePreviousLine=this.continuePreviousLine,e.valueRecommendationEnabled=this.valueRecommendationEnabled)}}t.AbstractFieldChildDeploymentInfoBuilder=s},455(e,t,r){t.ChildDeploymentInfo=void 0;const n=r(9519);class a extends n.AbstractFieldChildDeploymentInfo{_multiInstance=!1;_minItems=null;_maxItems=null;_standalone=!1;static empty(){return new a("")}static standalone(){const e=new a("");return e._standalone=!0,e}constructor(e){super(e)}get multiInstance(){return this._multiInstance}set multiInstance(e){this._multiInstance=e}get minItems(){return this._minItems}set minItems(e){this._minItems=e}get maxItems(){return this._maxItems}set maxItems(e){this._maxItems=e}isMultiInAnyWay(){return this._multiInstance}isStandalone(){return this._standalone}}t.ChildDeploymentInfo=a},8878(e,t,r){t.ChildDeploymentInfoAlwaysMultiple=void 0;const n=r(9519);class a extends n.AbstractFieldChildDeploymentInfo{_declaredMinItems=null;_declaredMaxItems=null;static empty(){return new a("")}constructor(e){super(e)}isMultiInAnyWay(){return!0}get declaredMinItems(){return this._declaredMinItems}get declaredMaxItems(){return this._declaredMaxItems}set declaredMinItems(e){this._declaredMinItems=e}set declaredMaxItems(e){this._declaredMaxItems=e}get minItems(){return null!==this._declaredMinItems?this._declaredMinItems:this.defaultMinItems}get defaultMinItems(){return 0}get maxItems(){return this._declaredMaxItems}}t.ChildDeploymentInfoAlwaysMultiple=a},3239(e,t,r){t.ChildDeploymentInfoAlwaysMultipleBuilder=void 0;const n=r(8198),a=r(8878),i=r(6096),s=r(9129),o=r(4869);class l extends i.AbstractFieldChildDeploymentInfoBuilder{declaredMinItems=null;declaredMaxItems=null;constructor(e,t){super(e,t)}withMinItems(e){return this.declaredMinItems=e,this}withMaxItems(e){return this.declaredMaxItems=e,this}build(){if((0,n.assertItemBounds)(this.name,this.declaredMinItems,this.declaredMaxItems),this.child instanceof s.TemplateField&&this.child.cedarFieldType===o.CedarFieldType.ATTRIBUTE_VALUE&&null!==this.declaredMinItems&&this.declaredMinItems>0)throw new Error(`minItems must be zero in attribute-value field ${this.name}`);const e=new a.ChildDeploymentInfoAlwaysMultiple(this.name);return this.setCommonData(e),e.declaredMinItems=this.declaredMinItems,e.declaredMaxItems=this.declaredMaxItems,e}}t.ChildDeploymentInfoAlwaysMultipleBuilder=l},2266(e,t,r){t.ChildDeploymentInfoAlwaysSingle=void 0;const n=r(9519);class a extends n.AbstractFieldChildDeploymentInfo{static empty(){return new a("")}constructor(e){super(e)}isMultiInAnyWay(){return!1}}t.ChildDeploymentInfoAlwaysSingle=a},587(e,t,r){t.ChildDeploymentInfoAlwaysSingleBuilder=void 0;const n=r(2266),a=r(6096);class i extends a.AbstractFieldChildDeploymentInfoBuilder{constructor(e,t){super(e,t)}build(){const e=new n.ChildDeploymentInfoAlwaysSingle(this.name);return this.setCommonData(e),e}}t.ChildDeploymentInfoAlwaysSingleBuilder=i},3608(e,t,r){t.ChildDeploymentInfoBuilder=void 0;const n=r(8198),a=r(455),i=r(6096);class s extends i.AbstractFieldChildDeploymentInfoBuilder{multiInstance=!1;minItems=null;maxItems=null;constructor(e,t){super(e,t)}withMultiInstance(e){return this.multiInstance=e,this}withMinItems(e){return this.minItems=e,this}withMaxItems(e){return this.maxItems=e,this}build(){(0,n.assertItemBounds)(this.name,this.minItems,this.maxItems);const e=new a.ChildDeploymentInfo(this.name);return this.setCommonData(e),e.multiInstance=this.multiInstance,e.minItems=this.minItems,e.maxItems=this.maxItems,e}}t.ChildDeploymentInfoBuilder=s},4831(e,t,r){t.ChildDeploymentInfoElement=void 0;const n=r(3812);class a extends n.AbstractDynamicChildDeploymentInfo{_multiInstance=!1;_minItems=null;_maxItems=null;static empty(){return new a("")}constructor(e){super(e)}get multiInstance(){return this._multiInstance}set multiInstance(e){this._multiInstance=e}get minItems(){return this._minItems}set minItems(e){this._minItems=e}get maxItems(){return this._maxItems}set maxItems(e){this._maxItems=e}isMultiInAnyWay(){return this._multiInstance}}t.ChildDeploymentInfoElement=a},6976(e,t,r){t.ChildDeploymentInfoElementBuilder=void 0;const n=r(8198),a=r(4809),i=r(4831);class s extends a.AbstractDynamicChildDeploymentInfoBuilder{multiInstance=!1;minItems=null;maxItems=null;constructor(e,t){super(e,t)}withMultiInstance(e){return this.multiInstance=e,this}withMinItems(e){return this.minItems=e,this}withMaxItems(e){return this.maxItems=e,this}build(){(0,n.assertItemBounds)(this.name,this.minItems,this.maxItems);const e=new i.ChildDeploymentInfoElement(this.name);return this.setCommonData(e),e.multiInstance=this.multiInstance,e.minItems=this.minItems,e.maxItems=this.maxItems,e}}t.ChildDeploymentInfoElementBuilder=s},3581(e,t,r){t.ChildDeploymentInfoStatic=void 0;const n=r(513);class a extends n.AbstractChildDeploymentInfo{_hidden=!1;static empty(){return new a("")}constructor(e){super(e)}get hidden(){return this._hidden}set hidden(e){this._hidden=e}isMultiInAnyWay(){return!1}}t.ChildDeploymentInfoStatic=a},8290(e,t,r){t.ChildDeploymentInfoStaticBuilder=void 0;const n=r(6910),a=r(3581);class i extends n.AbstractChildDeploymentInfoBuilder{hidden=!1;constructor(e,t){super(e,t)}withHidden(e){return this.hidden=e,this}build(){const e=new a.ChildDeploymentInfoStatic(this.name);return super.setCommonData(e),e.hidden=this.hidden,e}}t.ChildDeploymentInfoStaticBuilder=i},1492(e,t,r){t.ContainerArtifactChildrenInfo=void 0;const n=r(2763),a=r(2733),i=r(9034),s=r(3812);t.ContainerArtifactChildrenInfo=class{childNameList=[];childMap=new Map;add(e){this.childNameList.push(e.name),this.childMap.set(e.name,e)}get children(){return this.childNameList.map(e=>this.childMap.get(e))}has(e){return this.childMap.has(e)}get(e){return this.childMap.get(e)??null}getChildrenNames(){return Array.from(this.childMap.keys())}getChildrenNamesForRequiredInProperties(){const e=[];for(const[t,r]of this.childMap.entries())r.atType!==n.CedarArtifactType.STATIC_TEMPLATE_FIELD&&r.uiInputType!==i.UiInputType.ATTRIBUTE_VALUE&&e.push(t);return e}getChildrenNamesForRequired(){const e=[];for(const[t,r]of this.childMap.entries())r.atType!==n.CedarArtifactType.STATIC_TEMPLATE_FIELD&&r.uiInputType!==i.UiInputType.ATTRIBUTE_VALUE&&e.push(t);return e}getOnlyElementNamesForPropertiesContextRequired(){const e=[];for(const[t,r]of this.childMap.entries())r.atType===n.CedarArtifactType.TEMPLATE_ELEMENT&&e.push(t);return e}getPropertyLabelMap(e){const t={};return this.childNameList.forEach(e=>{const r=this.getChildInfo(e);null!==r.label&&(t[r.name]=r.label)}),t}getPropertyDescriptionMap(e){const t={};return this.childNameList.forEach(e=>{const r=this.getChildInfo(e);null!==r.description&&(t[r.name]=r.description)}),t}getChildIriMap(){return this.collectChildIris(!1)}collectChildIris(e){const t={};return this.childNameList.forEach(r=>{const a=this.getChildInfo(r);a.atType===n.CedarArtifactType.STATIC_TEMPLATE_FIELD||!e&&a.uiInputType===i.UiInputType.ATTRIBUTE_VALUE||a instanceof s.AbstractDynamicChildDeploymentInfo&&null!==a.iri&&(t[a.name]=a.iri)}),t}getChildNamesWithIri(){const e=this.getChildIriMap();return this.getChildrenNames().filter(t=>Object.prototype.hasOwnProperty.call(e,t))}getIRIMap(){const e={},t=this.collectChildIris(!0);return Object.keys(t).forEach(r=>{e[r]={[a.JsonSchema.enum]:[t[r]]}}),e}hasAttributeValue(){for(const e of this.childMap.values())if(e.uiInputType===i.UiInputType.ATTRIBUTE_VALUE)return!0;return!1}getChildInfo(e){return this.childMap.get(e)}}},8198(e,t){t.UNBOUNDED_MAX_ITEMS=void 0,t.assertItemBounds=function(e,r,n){if(null!==r&&r<0)throw new Error(`minItems must be zero or greater in ${e}`);if(null!==n&&n<0)throw new Error(`maxItems must be zero or greater in ${e}`);if(null!==r&&null!==n&&n!==t.UNBOUNDED_MAX_ITEMS&&r>n)throw new Error(`minItems must be less than or equal to maxItems in ${e}`)},t.UNBOUNDED_MAX_ITEMS=0},7661(e,t,r){t.TemplateElement=void 0;const n=r(3910),a=r(8557),i=r(1027),s=r(5451),o=r(2763),l=r(6976);class d extends s.AbstractContainerArtifact{skos_altLabel=null;skos_prefLabel=null;header=null;footer=null;constructor(){super(),this.cedarArtifactType=o.CedarArtifactType.TEMPLATE_ELEMENT}static buildEmptyWithNullValues(){return new d}static buildEmptyWithDefaultValues(){const e=new d;return e.schema_schemaVersion=a.SchemaVersion.CURRENT,e.bibo_status=n.BiboStatus.DRAFT,e.pav_version=i.PavVersion.DEFAULT,e}isMultiInstanceByDefinition(){return!1}isSingleInstanceByDefinition(){return!1}createDeploymentBuilder(e){return new l.ChildDeploymentInfoElementBuilder(this,e)}}t.TemplateElement=d},1762(e,t,r){t.TemplateElementBuilder=void 0;const n=r(1641),a=r(7661);class i extends n.AbstractArtifactBuilder{children=[];instanceTypeSpecification=null;withInstanceTypeSpecification(e){return this.instanceTypeSpecification=e,this}addChild(e,t){return this.children.push([e,t]),this}build(){const e=a.TemplateElement.buildEmptyWithNullValues();return super.buildInternal(e),e.instanceTypeSpecification=this.instanceTypeSpecification,this.children.forEach(([t,r])=>{e.addChild(t,r)}),e}}t.TemplateElementBuilder=i},7282(e,t){t.ChoiceOptionEntity=void 0,t.ChoiceOptionEntity=class{label;selectedByDefault;statesSelectedByDefault;constructor(e,t,r=!0){if(null==e||""===e)throw new Error("A permitted value requires a label. A choice that names nothing cannot be chosen.");this.label=e,this.selectedByDefault=t,this.statesSelectedByDefault=r}}},6145(e,t,r){t.DefaultValueSerialization=void 0;const n=r(8802),a=r(8748);t.DefaultValueSerialization=class{static literalFromNode(e,t){return a.ReaderUtil.getString(e,t)}static writeLiteral(e,t,r){null!==r&&""!==r&&(e[t]=r)}static iriFromNode(e,t){if(""===a.ReaderUtil.getString(e,t))return null;const r=a.ReaderUtil.getIdentifier(e,t);return null===r?null:new n.Iri(r)}static writeIri(e,t,r){null===r||r.isEmpty()||(e[t]=r.getValue())}}},3557(e,t,r){t.JsonValueConstraintsWriter=void 0;const n=r(3161);class a extends n.JsonAbstractArtifactWriter{}t.JsonValueConstraintsWriter=a},9129(e,t,r){t.TemplateField=void 0;const n=r(4328),a=r(4869),i=r(8333);class s extends i.AbstractSchemaArtifact{skos_altLabel=null;skos_prefLabel=null;hidden=!1;requiredValue=!1;recommendedValue=!1;continuePreviousLine=!1;valueConstraints=new n.ValueConstraints;cedarFieldType=a.CedarFieldType.NULL;isMultiInstanceByDefinition(){return!1}isSingleInstanceByDefinition(){return!1}supportsValueRecommendation(){return!1}}t.TemplateField=s},3350(e,t,r){t.TemplateFieldBuilder=void 0;const n=r(1641);class a extends n.AbstractArtifactBuilder{skos_altLabel=null;skos_prefLabel=null;withAlternateLabels(e){return this.skos_altLabel=e,this}addAlternateLabel(e){return null===this.skos_altLabel&&(this.skos_altLabel=[]),this.skos_altLabel.push(e),this}withPreferredLabel(e){return this.skos_prefLabel=e,this}buildInternal(e){super.buildInternal(e),e.skos_altLabel=this.skos_altLabel,e.skos_prefLabel=this.skos_prefLabel}}t.TemplateFieldBuilder=a},855(e,t,r){t.UnknownTemplateField=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(3608);class o extends n.TemplateField{constructor(){super(),this.cedarFieldType=a.CedarFieldType.NULL,this.cedarArtifactType=i.CedarArtifactType.NULL}static build(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoBuilder(this,e)}}t.UnknownTemplateField=o},4328(e,t){t.ValueConstraints=void 0,t.ValueConstraints=class{constructor(){}}},1902(e,t,r){t.ValueConstraintsIriField=void 0;const n=r(4328);class a extends n.ValueConstraints{defaultValue=null;constructor(){super()}}t.ValueConstraintsIriField=a},7765(e,t,r){t.ValueConstraintsLiteralField=void 0;const n=r(4328);class a extends n.ValueConstraints{defaultValue=null;constructor(){super()}}t.ValueConstraintsLiteralField=a},2500(e,t,r){t.YamlValueConstraintsWriter=void 0;const n=r(211);class a extends n.YamlAbstractArtifactWriter{}t.YamlValueConstraintsWriter=a},2052(e,t,r){t.AttributeValueFieldBuilderImpl=void 0;const n=r(3350),a=r(9571);class i extends n.TemplateFieldBuilder{constructor(){super()}static create(){return new i}build(){const e=a.AttributeValueFieldImpl.buildEmpty();return super.buildInternal(e),e}}t.AttributeValueFieldBuilderImpl=i},9571(e,t,r){t.AttributeValueFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(4328),o=r(3239);class l extends n.TemplateField{constructor(){super(),this.cedarFieldType=a.CedarFieldType.ATTRIBUTE_VALUE,this.valueConstraints=new s.ValueConstraints,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}isMultiInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new o.ChildDeploymentInfoAlwaysMultipleBuilder(this,e)}}t.AttributeValueFieldImpl=l},9366(e,t,r){t.JsonFieldReaderAttributeValue=void 0;const n=r(4385),a=r(9571);class i extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const i=a.AttributeValueFieldImpl.buildEmpty();return this.readRequiredAndHidden(e,t),i}}t.JsonFieldReaderAttributeValue=i},1442(e,t,r){t.JsonFieldWriterAttributeValue=void 0;const n=r(455),a=r(2748),i=r(9517),s=r(936),o=r(5793);class l extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}getAsJsonNode(e,t=n.ChildDeploymentInfo.standalone()){const r=super.getAsJsonNode(e,t);return t instanceof n.ChildDeploymentInfo&&t.isStandalone()?{type:"array",minItems:0,items:r}:r}expandPropertiesNode(e){}expandRequiredNode(e){}expandTypeNode(e,t){e[s.CedarModel.type]=this.atomicWriter.write(o.JavascriptType.STRING)}buildValueConstraintsObject(e){return i.JsonNode.getEmpty()}}t.JsonFieldWriterAttributeValue=l},529(e,t,r){t.YamlFieldReaderAttributeValue=void 0;const n=r(5675),a=r(9571);class i extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){return a.AttributeValueFieldImpl.buildEmpty()}}t.YamlFieldReaderAttributeValue=i},1521(e,t,r){t.YamlFieldWriterAttributeValue=void 0;const n=r(5430);class a extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}}t.YamlFieldWriterAttributeValue=a},4675(e,t,r){t.CheckboxFieldBuilderImpl=void 0;const n=r(3350),a=r(9915),i=r(9282);class s extends n.TemplateFieldBuilder{defaultValue=null;literals=[];constructor(){super()}static create(){return new s}addCheckboxOption(e,t){return this.literals.push(new a.CheckboxOption(e,t??!1,void 0!==t)),this}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.CheckboxFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.literals=this.literals,e}}t.CheckboxFieldBuilderImpl=s},9282(e,t,r){t.CheckboxFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1489),o=r(3239);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.CHECKBOX,this.valueConstraints=new s.ValueConstraintsCheckboxField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}isMultiInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new o.ChildDeploymentInfoAlwaysMultipleBuilder(this,e)}}t.CheckboxFieldImpl=l},9915(e,t,r){t.CheckboxOption=void 0;const n=r(7282);class a extends n.ChoiceOptionEntity{constructor(e,t,r=!0){super(e,t,r)}}t.CheckboxOption=a},19(e,t,r){t.JsonFieldReaderCheckbox=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(9915),o=r(9282),l=r(6145);class d extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const d=o.CheckboxFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=c){d.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(c,a.CedarModel.defaultValue);const e=n.ReaderUtil.getNodeList(c,a.CedarModel.literals);null!==e&&e.forEach(e=>{const t=n.ReaderUtil.getString(e,a.CedarModel.label),r=n.ReaderUtil.getBoolean(e,a.CedarModel.selectedByDefault),i=Object.hasOwn(e,a.CedarModel.selectedByDefault);if(null!=t){const e=new s.CheckboxOption(t,r,i);d.valueConstraints.literals.push(e)}})}return d}}t.JsonFieldReaderCheckbox=d},8663(e,t,r){t.JsonFieldWriterCheckbox=void 0;const n=r(936),a=r(2748),i=r(6145);class s extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),this.expandLiterals(t,e),super.expandValueConstraintsNode(e,t,r),e[n.CedarModel.multipleChoice]=!0}}t.JsonFieldWriterCheckbox=s},1489(e,t,r){t.ValueConstraintsCheckboxField=void 0;const n=r(7765);class a extends n.ValueConstraintsLiteralField{literals=[];constructor(){super()}}t.ValueConstraintsCheckboxField=a},7268(e,t,r){t.YamlFieldReaderCheckbox=void 0;const n=r(8748),a=r(9915),i=r(5675),s=r(2099),o=r(9282),l=r(6145);class d extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const d=o.CheckboxFieldImpl.buildEmpty();d.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(e,s.YamlKeys.default);const c=n.ReaderUtil.getNodeList(e,s.YamlKeys.values);return null!==c&&c.forEach(e=>{const t=n.ReaderUtil.getString(e,s.YamlKeys.label),r=n.ReaderUtil.getBoolean(e,s.YamlKeys.selected),i=Object.hasOwn(e,s.YamlKeys.selected);if(null!=t){const e=new a.CheckboxOption(t,r,i);d.valueConstraints.literals.push(e)}}),d}}t.YamlFieldReaderCheckbox=d},4500(e,t,r){t.YamlFieldWriterCheckbox=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue),this.expandLiterals(t,e)}}t.YamlFieldWriterCheckbox=s},9916(e,t,r){t.ControlledTermFieldBuilderImpl=void 0;const n=r(5376),a=r(3350),i=r(6731);class s extends a.TemplateFieldBuilder{valueConstraints=new n.ValueConstraintsControlledTermField;constructor(){super()}static create(){return new s}withDefaultValue(e){return this.valueConstraints.defaultValue=e,this}addOntology(e){return this.valueConstraints.ontologies.push(e),this}addValueSet(e){return this.valueConstraints.valueSets.push(e),this}addClass(e){return this.valueConstraints.classes.push(e),this}addBranch(e){return this.valueConstraints.branches.push(e),this}addAction(e){return this.valueConstraints.actions.push(e),this}build(){const e=i.ControlledTermFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints=this.valueConstraints,e}}t.ControlledTermFieldBuilderImpl=s},6731(e,t,r){t.ControlledTermFieldImpl=void 0;const n=r(9129),a=r(5376),i=r(4869),s=r(2763),o=r(3608);class l extends n.TemplateField{valueConstraints;valueRecommendationEnabled=!1;constructor(){super(),this.cedarFieldType=i.CedarFieldType.CONTROLLED_TERM,this.valueConstraints=new a.ValueConstraintsControlledTermField,this.cedarArtifactType=s.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}supportsValueRecommendation(){return!0}}t.ControlledTermFieldImpl=l},8728(e,t,r){t.JsonFieldReaderControlledTerm=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(8354),o=r(2418),l=r(9184),d=r(2395),c=r(7295),u=r(2733),m=r(7432),p=r(4531),h=r(6731),f=r(5753);class y extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const s=h.ControlledTermFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const o=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);return null!=o&&(s.valueConstraints.ontologies=this.getOntologies(n.ReaderUtil.getNodeList(o,a.CedarModel.ontologies)),s.valueConstraints.classes=this.getClasses(n.ReaderUtil.getNodeList(o,a.CedarModel.classes)),s.valueConstraints.branches=this.getBranches(n.ReaderUtil.getNodeList(o,a.CedarModel.branches)),s.valueConstraints.valueSets=this.getValueSets(n.ReaderUtil.getNodeList(o,a.CedarModel.valueSets)),s.valueConstraints.defaultValue=this.getDefaultValue(n.ReaderUtil.getNodeOrNull(o,a.CedarModel.defaultValue)),s.valueConstraints.actions=this.getActions(n.ReaderUtil.getNodeList(o,a.CedarModel.actions))),s}getOntologies(e){const t=[];return e.forEach(e=>{const r=new s.ControlledTermOntology(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.acronym),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.name),n.ReaderUtil.getNumberOrNull(e,a.CedarModel.ValueConstraints.numTerms),n.ReaderUtil.getIdentifierURI(e,a.CedarModel.ValueConstraints.uri),...y.readSourceAndVersion(e));t.push(r)}),t}getClasses(e){const t=[];return e.forEach(e=>{const r=new o.ControlledTermClass(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.label),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.source),p.BioportalTermType.forJsonValue(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.type)),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.prefLabel),n.ReaderUtil.getIdentifierURI(e,a.CedarModel.ValueConstraints.uri),...y.readSourceAndVersion(e));t.push(r)}),t}getBranches(e){const t=[];return e.forEach(e=>{const r=new l.ControlledTermBranch(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.source),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.acronym),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.name),n.ReaderUtil.getNumberOrZero(e,a.CedarModel.ValueConstraints.maxDepth),n.ReaderUtil.getIdentifierURI(e,a.CedarModel.ValueConstraints.uri),...y.readSourceAndVersion(e));t.push(r)}),t}getValueSets(e){const t=[];return e.forEach(e=>{const r=new d.ControlledTermValueSet(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.vsCollection),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.name),n.ReaderUtil.getNumberOrNull(e,a.CedarModel.ValueConstraints.numTerms),n.ReaderUtil.getIdentifierURI(e,a.CedarModel.ValueConstraints.uri),...y.readSourceAndVersion(e));t.push(r)}),t}getActions(e){const t=[];return e.forEach(e=>{const r=new m.ControlledTermAction(n.ReaderUtil.getNumber(e,a.CedarModel.ValueConstraints.to),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.action),n.ReaderUtil.getIdentifierURI(e,a.CedarModel.ValueConstraints.termUri),n.ReaderUtil.getURI(e,a.CedarModel.ValueConstraints.sourceUri),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.source),p.BioportalTermType.forJsonValue(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.type)));t.push(r)}),t}static readSourceAndVersion(e){const t=n.ReaderUtil.getURI(e,a.CedarModel.ValueConstraints.iri),r=n.ReaderUtil.getNodeOrNull(e,a.CedarModel.ValueConstraints.version),i=null===r?null:new f.ControlledTermVersion(n.ReaderUtil.getStringOrEmpty(r,a.CedarModel.ValueConstraints.versionId),n.ReaderUtil.getString(r,a.CedarModel.ValueConstraints.versionEffectiveDate),n.ReaderUtil.getString(r,a.CedarModel.ValueConstraints.versionDeclaredVersion));return[t.isEmpty()?null:t,n.ReaderUtil.getString(e,a.CedarModel.ValueConstraints.sourceSystem),i]}getDefaultValue(e){if(null==e)return null;const t=n.ReaderUtil.getString(e,u.JsonSchema.rdfsLabel);return Object.hasOwn(e,u.JsonSchema.termUri)||null!==t?new c.ControlledTermDefaultValue(n.ReaderUtil.getIdentifierURI(e,u.JsonSchema.termUri),t??""):null}}t.JsonFieldReaderControlledTerm=y},8280(e,t,r){t.JsonFieldWriterControlledTerm=void 0;const n=r(9517),a=r(936),i=r(2748),s=r(2733),o=r(9932);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[s.JsonSchema.properties]=o.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[s.JsonSchema.properties]=o.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}expandValueConstraintsNode(e,t,r){const i=n.JsonNode.getEmptyList();t.valueConstraints.ontologies.forEach(e=>{i.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[a.CedarModel.ontologies]=i;const o=n.JsonNode.getEmptyList();t.valueConstraints.valueSets.forEach(e=>{o.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[a.CedarModel.valueSets]=o;const l=n.JsonNode.getEmptyList();t.valueConstraints.classes.forEach(e=>{l.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[a.CedarModel.classes]=l;const d=n.JsonNode.getEmptyList();t.valueConstraints.branches.forEach(e=>{d.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[a.CedarModel.branches]=d;const c=n.JsonNode.getEmptyList();if(t.valueConstraints.actions.forEach(e=>{c.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),c.length>0&&(e[a.CedarModel.actions]=c),null!=t.valueConstraints.defaultValue){const r=n.JsonNode.getEmpty();r[s.JsonSchema.termUri]=this.atomicWriter.write(t.valueConstraints.defaultValue.termUri),r[s.JsonSchema.rdfsLabel]=t.valueConstraints.defaultValue.rdfsLabel,e[a.CedarModel.defaultValue]=r}super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterControlledTerm=l},5376(e,t,r){t.ValueConstraintsControlledTermField=void 0;const n=r(4328);class a extends n.ValueConstraints{defaultValue=null;ontologies=[];valueSets=[];classes=[];branches=[];actions=[];constructor(){super()}}t.ValueConstraintsControlledTermField=a},9299(e,t,r){t.YamlFieldReaderControlledTerm=void 0;const n=r(8748),a=r(7295),i=r(4531),s=r(5675),o=r(2099),l=r(8349),d=r(5491),c=r(3091),u=r(2957),m=r(1556),p=r(7733),h=r(6731),f=r(8802),y=r(5753);class T extends s.YamlTemplateFieldTypeSpecificReader{read(e,t,r,s){const f=h.ControlledTermFieldImpl.buildEmpty();n.ReaderUtil.getNodeList(e,o.YamlKeys.values).forEach(e=>{const t=n.ReaderUtil.getString(e,o.YamlKeys.type);if(t===l.YamlValues.Controlled.ontology){const t=(new d.ControlledTermOntologyBuilder).withAcronym(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withName(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceName)).withUri(this.ontologyUri(e)).withNumTerms(n.ReaderUtil.getNumberOrNull(e,o.YamlKeys.Controlled.termCount));this.readSourceAndVersion(e,t),f.valueConstraints.ontologies.push(t.build())}else if(t===l.YamlValues.Controlled.class){const t=n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termLabel),r=n.ReaderUtil.getString(e,o.YamlKeys.Controlled.termDisplayLabel),a=(new c.ControlledTermClassBuilder).withUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termIri)).withSource(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withLabel(r??t).withPrefLabel(t).withType(i.BioportalTermType.forYamlValue(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termType)));this.readSourceAndVersion(e,a),f.valueConstraints.classes.push(a.build())}else if(t===l.YamlValues.Controlled.branch){const t=(new u.ControlledTermBranchBuilder).withUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termBaseIri)).withSource(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceName)).withName(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termBaseLabel)).withAcronym(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withMaxDepth(n.ReaderUtil.getNumberOrZero(e,o.YamlKeys.Controlled.termMaxDepth));this.readSourceAndVersion(e,t),f.valueConstraints.branches.push(t.build())}else if(t===l.YamlValues.Controlled.valueSet){const t=(new m.ControlledTermValueSetBuilder).withUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termBaseIri)).withNumTerms(n.ReaderUtil.getNumberOrNull(e,o.YamlKeys.Controlled.termCount)).withVsCollection(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withName(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termBaseLabel));this.readSourceAndVersion(e,t),f.valueConstraints.valueSets.push(t.build())}});const y=n.ReaderUtil.getNodeOrNull(e,o.YamlKeys.default);if(null!==y){const e=n.ReaderUtil.getIdentifierURI(y,o.YamlKeys.value),t=n.ReaderUtil.getStringOrEmpty(y,o.YamlKeys.label);f.valueConstraints.defaultValue=new a.ControlledTermDefaultValue(e,t)}return n.ReaderUtil.getNodeList(e,o.YamlKeys.actions).forEach(e=>{const t=(new p.ControlledTermActionBuilder).withAction(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.action)).withSource(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withType(i.BioportalTermType.forYamlValue(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.type))).withTermUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termIri)).withTo(n.ReaderUtil.getNumber(e,o.YamlKeys.Controlled.to)).withSourceUri(n.ReaderUtil.getURI(e,o.YamlKeys.Controlled.sourceIri));f.valueConstraints.actions.push(t.build())}),f}ontologyUri(e){return new f.Iri(`https://data.bioontology.org/ontologies/${n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)}`)}readSourceAndVersion(e,t){const r=n.ReaderUtil.getURI(e,o.YamlKeys.Controlled.sourceIri);r.isEmpty()||t.withIri(r),t.withSourceSystem(n.ReaderUtil.getString(e,o.YamlKeys.Controlled.sourceSystem));const a=n.ReaderUtil.getNodeOrNull(e,o.YamlKeys.version);null!==a&&t.withVersion(new y.ControlledTermVersion(n.ReaderUtil.getStringOrEmpty(a,o.YamlKeys.Controlled.versionId),n.ReaderUtil.getString(a,o.YamlKeys.Controlled.versionEffectiveDate),n.ReaderUtil.getString(a,o.YamlKeys.Controlled.versionDeclaredVersion)))}}t.YamlFieldReaderControlledTerm=T},9535(e,t,r){t.YamlFieldWriterControlledTerm=void 0;const n=r(9517),a=r(5430),i=r(2099),s=r(4216);class o extends a.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return{[i.YamlKeys.datatype]:s.NonStandardDatatype.IRI}}expandValueConstraintsNodeForYAML(e,t,r){if(null!=t.valueConstraints.defaultValue){const r={[i.YamlKeys.value]:this.atomicWriter.write(t.valueConstraints.defaultValue.termUri),[i.YamlKeys.label]:t.valueConstraints.defaultValue.rdfsLabel};e[i.YamlKeys.default]=r}const a=n.JsonNode.getEmptyList();t.valueConstraints.ontologies.forEach(e=>{a.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),t.valueConstraints.classes.forEach(e=>{a.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),t.valueConstraints.branches.forEach(e=>{a.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),t.valueConstraints.valueSets.forEach(e=>{a.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),a.length>0&&(e[i.YamlKeys.values]=a);const s=n.JsonNode.getEmptyList();t.valueConstraints.actions.forEach(e=>{s.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),s.length>0&&(e[i.YamlKeys.actions]=s)}}t.YamlFieldWriterControlledTerm=o},1524(e,t,r){t.AbstractJsonControlledTermValueConstraintWriter=void 0;const n=r(9517),a=r(3557),i=r(936);class s extends a.JsonValueConstraintsWriter{writeSourceAndVersion(e,t){null===t.iri||t.iri.isEmpty()||(e[i.CedarModel.ValueConstraints.iri]=this.atomicWriter.write(t.iri)),null!==t.sourceSystem&&(e[i.CedarModel.ValueConstraints.sourceSystem]=t.sourceSystem);const r=t.version;if(null!==r){const t=n.JsonNode.getEmpty();t[i.CedarModel.ValueConstraints.versionId]=r.id,null!==r.effectiveDate&&(t[i.CedarModel.ValueConstraints.versionEffectiveDate]=r.effectiveDate),null!==r.declaredVersion&&(t[i.CedarModel.ValueConstraints.versionDeclaredVersion]=r.declaredVersion),e[i.CedarModel.ValueConstraints.version]=t}}}t.AbstractJsonControlledTermValueConstraintWriter=s},4339(e,t,r){t.AbstractYamlControlledTermValueConstraintWriter=void 0;const n=r(9517),a=r(2500),i=r(2099);class s extends a.YamlValueConstraintsWriter{writeSourceSystem(e,t){null!==t.sourceSystem&&(e[i.YamlKeys.Controlled.sourceSystem]=t.sourceSystem)}writeSourceIri(e,t){null===t.iri||t.iri.isEmpty()||(e[i.YamlKeys.Controlled.sourceIri]=this.atomicWriter.write(t.iri))}writeVersion(e,t){const r=t.version;if(null===r)return;const a=n.JsonNode.getEmpty();a[i.YamlKeys.Controlled.versionId]=r.id,null!==r.effectiveDate&&(a[i.YamlKeys.Controlled.versionEffectiveDate]=r.effectiveDate),null!==r.declaredVersion&&(a[i.YamlKeys.Controlled.versionDeclaredVersion]=r.declaredVersion),e[i.YamlKeys.version]=a}}t.AbstractYamlControlledTermValueConstraintWriter=s},2369(e,t,r){t.ControlledTermAbstractValueConstraint=void 0;const n=r(4328);class a extends n.ValueConstraints{className="ControlledTermAbstractValueConstraint";_iri;_sourceSystem;_version;constructor(e=null,t=null,r=null){super(),this._iri=e,this._sourceSystem=t,this._version=r}get iri(){return this._iri}get sourceSystem(){return this._sourceSystem}get version(){return this._version}}t.ControlledTermAbstractValueConstraint=a},7295(e,t){t.ControlledTermDefaultValue=void 0,t.ControlledTermDefaultValue=class{_termUri;_rdfsLabel;constructor(e,t){this._termUri=e,this._rdfsLabel=t}get termUri(){return this._termUri}get rdfsLabel(){return this._rdfsLabel}isControlledDefaultValue(){return!1}}},2480(e,t,r){t.ControlledTermDefaultValueBuilder=void 0;const n=r(8802),a=r(7295),i=r(3539);t.ControlledTermDefaultValueBuilder=class{termUri=n.Iri.empty();rdfsLabel="";withTermUri(e){return this.termUri=e,this}withRdfsLabel(e){return this.rdfsLabel=e,this}build(){return i.ValueConstraintRequirements.requireIri(this.termUri,"a term URI","A controlled-term default value"),i.ValueConstraintRequirements.requireText(this.rdfsLabel,"a label","A controlled-term default value"),new a.ControlledTermDefaultValue(this.termUri,this.rdfsLabel)}}},5753(e,t){t.ControlledTermVersion=void 0,t.ControlledTermVersion=class{_id;_effectiveDate;_declaredVersion;constructor(e,t=null,r=null){this._id=e,this._effectiveDate=t,this._declaredVersion=r}get id(){return this._id}get effectiveDate(){return this._effectiveDate}get declaredVersion(){return this._declaredVersion}}},3539(e,t){t.ValueConstraintRequirements=void 0,t.ValueConstraintRequirements=class{static requireText(e,t,r){if(null==e||""===e)throw new Error(`${r} requires ${t}.`)}static requireIri(e,t,r){if(null==e||e.isEmpty())throw new Error(`${r} requires ${t}. A constraint that points at nothing cannot be resolved.`)}static requireTermType(e,t){if(null==e||null===e.getJsonValue())throw new Error(`${t} requires a term type.`)}}},7432(e,t,r){t.ControlledTermAction=void 0;const n=r(2369);class a extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermAction";className="ControlledTermAction";_to=null;_action;_termUri;_sourceUri;_source;_type;constructor(e,t,r,n,a,i){super(),this._to=e,this._action=t,this._termUri=r,this._sourceUri=n,this._source=a,this._type=i}get to(){return this._to}get action(){return this._action}get termUri(){return this._termUri}get sourceUri(){return this._sourceUri}get source(){return this._source}get type(){return this._type}}t.ControlledTermAction=a},7733(e,t,r){t.ControlledTermActionBuilder=void 0;const n=r(8802),a=r(7432),i=r(3539),s=r(4531);t.ControlledTermActionBuilder=class{_to=null;_action="";_termUri=n.Iri.empty();_sourceUri=n.Iri.empty();_source="";_type=s.BioportalTermType.NULL;withTo(e){return this._to=e,this}withAction(e){return this._action=e,this}withTermUri(e){return this._termUri=e,this}withSourceUri(e){return this._sourceUri=e,this}withSource(e){return this._source=e,this}withType(e){return this._type=e,this}build(){return i.ValueConstraintRequirements.requireText(this._action,"an action","A controlled-term action"),i.ValueConstraintRequirements.requireIri(this._termUri,"a term URI","A controlled-term action"),i.ValueConstraintRequirements.requireIri(this._sourceUri,"a source URI","A controlled-term action"),i.ValueConstraintRequirements.requireText(this._source,"a source","A controlled-term action"),i.ValueConstraintRequirements.requireTermType(this._type,"A controlled-term action"),new a.ControlledTermAction(this._to,this._action,this._termUri,this._sourceUri,this._source,this._type)}}},8014(e,t,r){t.JsonValueConstraintsActionWriter=void 0;const n=r(9517),a=r(936),i=r(1524);class s extends i.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.CedarModel.ValueConstraints.termUri]=this.atomicWriter.write(e.termUri),t[a.CedarModel.ValueConstraints.source]=e.source,t[a.CedarModel.ValueConstraints.type]=this.atomicWriter.write(e.type),t[a.CedarModel.ValueConstraints.action]=e.action,t[a.CedarModel.ValueConstraints.sourceUri]=this.atomicWriter.write(e.sourceUri),null!==e.to&&(t[a.CedarModel.ValueConstraints.to]=e.to),t}}t.JsonValueConstraintsActionWriter=s},4647(e,t,r){t.YamlValueConstraintsActionWriter=void 0;const n=r(9517),a=r(4339),i=r(2099);class s extends a.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.YamlKeys.action]=e.action,null!==e.to&&(t[i.YamlKeys.Controlled.to]=e.to),t[i.YamlKeys.Controlled.termIri]=this.atomicWriter.write(e.termUri),t[i.YamlKeys.Controlled.sourceIri]=this.atomicWriter.write(e.sourceUri),t[i.YamlKeys.Controlled.sourceAcronym]=e.source,t[i.YamlKeys.type]=this.atomicWriter.write(e.type),t}}t.YamlValueConstraintsActionWriter=s},9184(e,t,r){t.ControlledTermBranch=void 0;const n=r(2369);class a extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermBranch";className="ControlledTermBranch";_source;_acronym;_name;_uri;_maxDepth=0;constructor(e,t,r,n,a,i=null,s=null,o=null){super(i,s,o),this._source=e,this._acronym=t,this._uri=a,this._name=r,this._maxDepth=n}get source(){return this._source}get acronym(){return this._acronym}get name(){return this._name}get uri(){return this._uri}get maxDepth(){return this._maxDepth}}t.ControlledTermBranch=a},2957(e,t,r){t.ControlledTermBranchBuilder=void 0;const n=r(8802),a=r(9184),i=r(3539);t.ControlledTermBranchBuilder=class{_source="";_acronym="";_name="";_uri=n.Iri.empty();_maxDepth=0;_iri=null;_sourceSystem=null;_version=null;withSource(e){return this._source=e,this}withAcronym(e){return this._acronym=e,this}withName(e){return this._name=e,this}withUri(e){return this._uri=e,this}withMaxDepth(e){return this._maxDepth=e,this}withIri(e){return this._iri=e,this}withSourceSystem(e){return this._sourceSystem=e,this}withVersion(e){return this._version=e,this}build(){return i.ValueConstraintRequirements.requireIri(this._uri,"a URI","A branch constraint"),i.ValueConstraintRequirements.requireText(this._source,"a source","A branch constraint"),i.ValueConstraintRequirements.requireText(this._acronym,"an acronym","A branch constraint"),i.ValueConstraintRequirements.requireText(this._name,"a name","A branch constraint"),new a.ControlledTermBranch(this._source,this._acronym,this._name,this._maxDepth,this._uri,this._iri,this._sourceSystem,this._version)}}},7054(e,t,r){t.JsonValueConstraintsBranchWriter=void 0;const n=r(9517),a=r(936),i=r(1524);class s extends i.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[a.CedarModel.ValueConstraints.source]=e.source,t[a.CedarModel.ValueConstraints.acronym]=e.acronym,t[a.CedarModel.ValueConstraints.name]=e.name,t[a.CedarModel.ValueConstraints.maxDepth]=e.maxDepth,this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsBranchWriter=s},3671(e,t,r){t.YamlValueConstraintsBranchWriter=void 0;const n=r(9517),a=r(4339),i=r(2099),s=r(8349);class o extends a.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.YamlKeys.type]=s.YamlValues.Controlled.branch,this.writeSourceSystem(t,e),t[i.YamlKeys.Controlled.sourceAcronym]=e.acronym,t[i.YamlKeys.Controlled.sourceName]=e.source,this.writeSourceIri(t,e),t[i.YamlKeys.Controlled.termBaseIri]=this.atomicWriter.write(e.uri),t[i.YamlKeys.Controlled.termBaseLabel]=e.name,t[i.YamlKeys.Controlled.termMaxDepth]=e.maxDepth,this.writeVersion(t,e),t}}t.YamlValueConstraintsBranchWriter=o},2418(e,t,r){t.ControlledTermClass=void 0;const n=r(2369);class a extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermClass";className="ControlledTermClass";_label;_source;_type;_prefLabel;_uri;constructor(e,t,r,n,a,i=null,s=null,o=null){super(i,s,o),this._label=e,this._source=t,this._type=r,this._prefLabel=n,this._uri=a}get label(){return this._label}get source(){return this._source}get type(){return this._type}get prefLabel(){return this._prefLabel}get uri(){return this._uri}}t.ControlledTermClass=a},3091(e,t,r){t.ControlledTermClassBuilder=void 0;const n=r(8802),a=r(2418),i=r(3539),s=r(4531);t.ControlledTermClassBuilder=class{_label="";_source="";_type=s.BioportalTermType.NULL;_prefLabel="";_uri=n.Iri.empty();_iri=null;_sourceSystem=null;_version=null;withLabel(e){return this._label=e,this}withSource(e){return this._source=e,this}withType(e){return this._type=e,this}withPrefLabel(e){return this._prefLabel=e,this}withUri(e){return this._uri=e,this}withIri(e){return this._iri=e,this}withSourceSystem(e){return this._sourceSystem=e,this}withVersion(e){return this._version=e,this}build(){return i.ValueConstraintRequirements.requireIri(this._uri,"a URI","A class constraint"),i.ValueConstraintRequirements.requireText(this._label,"a label","A class constraint"),i.ValueConstraintRequirements.requireText(this._prefLabel,"a preferred label","A class constraint"),i.ValueConstraintRequirements.requireText(this._source,"a source","A class constraint"),i.ValueConstraintRequirements.requireTermType(this._type,"A class constraint"),new a.ControlledTermClass(this._label,this._source,this._type,this._prefLabel,this._uri,this._iri,this._sourceSystem,this._version)}}},9222(e,t,r){t.JsonValueConstraintsClassWriter=void 0;const n=r(9517),a=r(936),i=r(1524);class s extends i.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[a.CedarModel.ValueConstraints.source]=e.source,t[a.CedarModel.ValueConstraints.label]=e.label,t[a.CedarModel.ValueConstraints.prefLabel]=e.prefLabel,t[a.CedarModel.ValueConstraints.type]=this.atomicWriter.write(e.type),this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsClassWriter=s},765(e,t,r){t.YamlValueConstraintsClassWriter=void 0;const n=r(9517),a=r(4339),i=r(2099),s=r(8349);class o extends a.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.YamlKeys.type]=s.YamlValues.Controlled.class,this.writeSourceSystem(t,e),t[i.YamlKeys.Controlled.sourceAcronym]=e.source,this.writeSourceIri(t,e),t[i.YamlKeys.Controlled.termIri]=this.atomicWriter.write(e.uri),t[i.YamlKeys.Controlled.termType]=this.atomicWriter.write(e.type),t[i.YamlKeys.Controlled.termLabel]=e.prefLabel,e.label!==e.prefLabel&&(t[i.YamlKeys.Controlled.termDisplayLabel]=e.label),this.writeVersion(t,e),t}}t.YamlValueConstraintsClassWriter=o},8354(e,t,r){t.ControlledTermOntology=void 0;const n=r(2369);class a extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermOntology";className="ControlledTermOntology";_acronym;_name;_uri;_numTerms=0;constructor(e,t,r,n,a=null,i=null,s=null){super(a,i,s),this._acronym=e,this._name=t,this._uri=n,this._numTerms=r}get acronym(){return this._acronym}get name(){return this._name}get uri(){return this._uri}get numTerms(){return this._numTerms}}t.ControlledTermOntology=a},5491(e,t,r){t.ControlledTermOntologyBuilder=void 0;const n=r(8802),a=r(8354),i=r(3539);t.ControlledTermOntologyBuilder=class{acronym="";name="";numTerms=null;uri=n.Iri.empty();iri=null;sourceSystem=null;version=null;withAcronym(e){return this.acronym=e,this}withName(e){return this.name=e,this}withNumTerms(e){return this.numTerms=e,this}withUri(e){return this.uri=e,this}withIri(e){return this.iri=e,this}withSourceSystem(e){return this.sourceSystem=e,this}withVersion(e){return this.version=e,this}build(){return i.ValueConstraintRequirements.requireIri(this.uri,"a URI","An ontology constraint"),i.ValueConstraintRequirements.requireText(this.acronym,"an acronym","An ontology constraint"),i.ValueConstraintRequirements.requireText(this.name,"a name","An ontology constraint"),new a.ControlledTermOntology(this.acronym,this.name,this.numTerms,this.uri,this.iri,this.sourceSystem,this.version)}}},5996(e,t,r){t.JsonValueConstraintsOntologyWriter=void 0;const n=r(9517),a=r(936),i=r(1524);class s extends i.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[a.CedarModel.ValueConstraints.acronym]=e.acronym,t[a.CedarModel.ValueConstraints.name]=e.name,null!==e.numTerms&&(t[a.CedarModel.ValueConstraints.numTerms]=e.numTerms),this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsOntologyWriter=s},1181(e,t,r){t.YamlValueConstraintsOntologyWriter=void 0;const n=r(9517),a=r(4339),i=r(2099),s=r(8349);class o extends a.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.YamlKeys.type]=s.YamlValues.Controlled.ontology,this.writeSourceSystem(t,e),t[i.YamlKeys.Controlled.sourceAcronym]=e.acronym,t[i.YamlKeys.Controlled.sourceName]=e.name,this.writeSourceIri(t,e),null!==e.numTerms&&(t[i.YamlKeys.Controlled.termCount]=e.numTerms),this.writeVersion(t,e),t}}t.YamlValueConstraintsOntologyWriter=o},2395(e,t,r){t.ControlledTermValueSet=void 0;const n=r(2369);class a extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermValueSet";className="ControlledTermValueSet";_vsCollection;_name;_uri;_numTerms=0;constructor(e,t,r,n,a=null,i=null,s=null){super(a,i,s),this._vsCollection=e,this._name=t,this._uri=n,this._numTerms=r}get vsCollection(){return this._vsCollection}get name(){return this._name}get uri(){return this._uri}get numTerms(){return this._numTerms}}t.ControlledTermValueSet=a},1556(e,t,r){t.ControlledTermValueSetBuilder=void 0;const n=r(8802),a=r(2395),i=r(3539);t.ControlledTermValueSetBuilder=class{_vsCollection="";_name="";_uri=n.Iri.empty();_numTerms=null;_iri=null;_sourceSystem=null;_version=null;withVsCollection(e){return this._vsCollection=e,this}withName(e){return this._name=e,this}withUri(e){return this._uri=e,this}withNumTerms(e){return this._numTerms=e,this}withIri(e){return this._iri=e,this}withSourceSystem(e){return this._sourceSystem=e,this}withVersion(e){return this._version=e,this}build(){return i.ValueConstraintRequirements.requireIri(this._uri,"a URI","A value-set constraint"),i.ValueConstraintRequirements.requireText(this._vsCollection,"a value-set collection","A value-set constraint"),i.ValueConstraintRequirements.requireText(this._name,"a name","A value-set constraint"),new a.ControlledTermValueSet(this._vsCollection,this._name,this._numTerms,this._uri,this._iri,this._sourceSystem,this._version)}}},2813(e,t,r){t.JsonValueConstraintsValueSetWriter=void 0;const n=r(9517),a=r(936),i=r(1524);class s extends i.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[a.CedarModel.ValueConstraints.vsCollection]=e.vsCollection,t[a.CedarModel.ValueConstraints.name]=e.name,null!==e.numTerms&&(t[a.CedarModel.ValueConstraints.numTerms]=e.numTerms),this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsValueSetWriter=s},9532(e,t,r){t.YamlValueConstraintsValueSetWriter=void 0;const n=r(9517),a=r(4339),i=r(2099),s=r(8349);class o extends a.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.YamlKeys.type]=s.YamlValues.Controlled.valueSet,this.writeSourceSystem(t,e),t[i.YamlKeys.Controlled.sourceAcronym]=e.vsCollection,this.writeSourceIri(t,e),t[i.YamlKeys.Controlled.termBaseIri]=this.atomicWriter.write(e.uri),t[i.YamlKeys.Controlled.termBaseLabel]=e.name,null!==e.numTerms&&(t[i.YamlKeys.Controlled.termCount]=e.numTerms),this.writeVersion(t,e),t}}t.YamlValueConstraintsValueSetWriter=o},1667(e,t,r){t.EmailFieldBuilderImpl=void 0;const n=r(3350),a=r(4450);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.EmailFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.EmailFieldBuilderImpl=i},4450(e,t,r){t.EmailFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(7765),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EMAIL,this.valueConstraints=new s.ValueConstraintsLiteralField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.EmailFieldImpl=l},2691(e,t,r){t.JsonFieldReaderEmail=void 0;const n=r(4385),a=r(4450),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.EmailFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderEmail=l},9031(e,t,r){t.JsonFieldWriterEmail=void 0;const n=r(2748),a=r(936),i=r(6145);class s extends n.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterEmail=s},3054(e,t,r){t.YamlFieldReaderEmail=void 0;const n=r(5675),a=r(4450),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.EmailFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.literalFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderEmail=o},1038(e,t,r){t.YamlFieldWriterEmail=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterEmail=s},6610(e,t,r){t.ExtDoiFieldBuilderImpl=void 0;const n=r(3350),a=r(997);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtDoiFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtDoiFieldBuilderImpl=i},997(e,t,r){t.ExtDoiFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_DOI,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtDoiFieldImpl=l},8583(e,t,r){t.JsonFieldReaderExtDoi=void 0;const n=r(4385),a=r(997),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtDoiFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtDoi=l},7412(e,t,r){t.JsonFieldWriterExtDoi=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtDoi=l},5907(e,t,r){t.YamlFieldReaderExtDoi=void 0;const n=r(5675),a=r(997),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtDoiFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtDoi=o},6967(e,t,r){t.YamlFieldWriterExtDoi=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtDoi=s},9062(e,t,r){t.ExtNihGrantIdFieldBuilderImpl=void 0;const n=r(3350),a=r(7313);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtNihGrantIdFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtNihGrantIdFieldBuilderImpl=i},7313(e,t,r){t.ExtNihGrantIdFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_NIH_GRANT_ID,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtNihGrantIdFieldImpl=l},1886(e,t,r){t.JsonFieldReaderExtNihGrantId=void 0;const n=r(4385),a=r(7313),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtNihGrantIdFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtNihGrantId=l},5250(e,t,r){t.JsonFieldWriterExtNihGrantId=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtNihGrantId=l},8543(e,t,r){t.YamlFieldReaderExtNihGrantId=void 0;const n=r(5675),a=r(7313),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtNihGrantIdFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtNihGrantId=o},3711(e,t,r){t.YamlFieldWriterExtNihGrantId=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtNihGrantId=s},2376(e,t,r){t.ExtOrcidFieldBuilderImpl=void 0;const n=r(3350),a=r(5967);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtOrcidFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtOrcidFieldBuilderImpl=i},5967(e,t,r){t.ExtOrcidFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_ORCID,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtOrcidFieldImpl=l},4956(e,t,r){t.JsonFieldReaderExtOrcid=void 0;const n=r(4385),a=r(5967),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtOrcidFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtOrcid=l},8096(e,t,r){t.JsonFieldWriterExtOrcid=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtOrcid=l},7123(e,t,r){t.YamlFieldReaderExtOrcid=void 0;const n=r(5675),a=r(5967),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtOrcidFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtOrcid=o},4355(e,t,r){t.YamlFieldWriterExtOrcid=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtOrcid=s},3914(e,t,r){t.ExtPfasFieldBuilderImpl=void 0;const n=r(3350),a=r(6637);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtPfasFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtPfasFieldBuilderImpl=i},6637(e,t,r){t.ExtPfasFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_PFAS,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtPfasFieldImpl=l},6854(e,t,r){t.JsonFieldReaderExtPfas=void 0;const n=r(4385),a=r(6637),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtPfasFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtPfas=l},6122(e,t,r){t.JsonFieldWriterExtPfas=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtPfas=l},5075(e,t,r){t.YamlFieldReaderExtPfas=void 0;const n=r(5675),a=r(6637),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtPfasFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtPfas=o},5587(e,t,r){t.YamlFieldWriterExtPfas=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtPfas=s},7162(e,t,r){t.ExtPubmedFieldBuilderImpl=void 0;const n=r(3350),a=r(2685);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtPubmedFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtPubmedFieldBuilderImpl=i},2685(e,t,r){t.ExtPubmedFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_PUBMED,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtPubmedFieldImpl=l},3028(e,t,r){t.JsonFieldReaderExtPubmed=void 0;const n=r(4385),a=r(2685),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtPubmedFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtPubmed=l},3312(e,t,r){t.JsonFieldWriterExtPubmed=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtPubmed=l},7709(e,t,r){t.YamlFieldReaderExtPubmed=void 0;const n=r(5675),a=r(2685),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtPubmedFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtPubmed=o},6557(e,t,r){t.YamlFieldWriterExtPubmed=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtPubmed=s},7328(e,t,r){t.ExtRorFieldBuilderImpl=void 0;const n=r(3350),a=r(4007);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtRorFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtRorFieldBuilderImpl=i},4007(e,t,r){t.ExtRorFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_ROR,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtRorFieldImpl=l},8244(e,t,r){t.JsonFieldReaderExtRor=void 0;const n=r(4385),a=r(4007),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtRorFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtRor=l},7584(e,t,r){t.JsonFieldWriterExtRor=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtRor=l},6651(e,t,r){t.YamlFieldReaderExtRor=void 0;const n=r(5675),a=r(4007),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtRorFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtRor=o},491(e,t,r){t.YamlFieldWriterExtRor=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtRor=s},3474(e,t,r){t.ExtRridFieldBuilderImpl=void 0;const n=r(3350),a=r(789);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtRridFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtRridFieldBuilderImpl=i},789(e,t,r){t.ExtRridFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_RRID,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtRridFieldImpl=l},7004(e,t,r){t.JsonFieldReaderExtRrid=void 0;const n=r(4385),a=r(789),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtRridFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtRrid=l},4780(e,t,r){t.JsonFieldWriterExtRrid=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtRrid=l},6089(e,t,r){t.YamlFieldReaderExtRrid=void 0;const n=r(5675),a=r(789),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtRridFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtRrid=o},4077(e,t,r){t.YamlFieldWriterExtRrid=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtRrid=s},7095(e,t,r){t.JsonFieldReaderLink=void 0;const n=r(4385),a=r(4084),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.LinkFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderLink=l},3691(e,t,r){t.JsonFieldWriterLink=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterLink=l},9497(e,t,r){t.LinkFieldBuilderImpl=void 0;const n=r(3350),a=r(4084);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.LinkFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.LinkFieldBuilderImpl=i},4084(e,t,r){t.LinkFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.LINK,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.LinkFieldImpl=l},8568(e,t,r){t.YamlFieldReaderLink=void 0;const n=r(5675),a=r(4084),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.LinkFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderLink=o},1784(e,t,r){t.YamlFieldWriterLink=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterLink=s},1513(e,t,r){t.MultipleChoiceListFieldBuilderImpl=void 0;const n=r(9513);class a extends n.ListFieldBuilderImpl{constructor(){super(),this.multipleChoice=!0}static create(){return new a}build(){return super.build()}}t.MultipleChoiceListFieldBuilderImpl=a},4932(e,t,r){t.MultipleChoiceListFieldImpl=void 0;const n=r(5316),a=r(4869),i=r(3239);class s extends n.ListFieldImpl{constructor(){super(),this.multipleChoice=!0,this.cedarFieldType=a.CedarFieldType.MULTIPLE_SELECT_LIST}static buildEmpty(){return new s}isMultiInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new i.ChildDeploymentInfoAlwaysMultipleBuilder(this,e)}}t.MultipleChoiceListFieldImpl=s},7124(e,t,r){t.YamlFieldReaderMultiSelectList=void 0;const n=r(5675),a=r(4932);class i extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const s=a.MultipleChoiceListFieldImpl.buildEmpty();return n.YamlTemplateFieldTypeSpecificReader.readAndStoreListValueConstraints(e,s),s}}t.YamlFieldReaderMultiSelectList=i},9105(e,t,r){t.SingleChoiceListFieldBuilderImpl=void 0;const n=r(9513);class a extends n.ListFieldBuilderImpl{constructor(){super(),this.multipleChoice=!1}static create(){return new a}build(){return super.build()}}t.SingleChoiceListFieldBuilderImpl=a},1676(e,t,r){t.SingleChoiceListFieldImpl=void 0;const n=r(5316),a=r(3608),i=r(4869);class s extends n.ListFieldImpl{constructor(){super(),this.multipleChoice=!1,this.cedarFieldType=i.CedarFieldType.SINGLE_SELECT_LIST}static buildEmpty(){return new s}createDeploymentBuilder(e){return new a.ChildDeploymentInfoBuilder(this,e)}}t.SingleChoiceListFieldImpl=s},2709(e,t,r){t.YamlFieldReaderSingleSelectList=void 0;const n=r(5675),a=r(1676);class i extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const s=a.SingleChoiceListFieldImpl.buildEmpty();return n.YamlTemplateFieldTypeSpecificReader.readAndStoreListValueConstraints(e,s),s}}t.YamlFieldReaderSingleSelectList=i},2419(e,t,r){t.JsonFieldReaderList=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(4081),o=r(4932),l=r(1676),d=r(6145);class c extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){let c=l.SingleChoiceListFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const u=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=u){n.ReaderUtil.getBoolean(u,a.CedarModel.multipleChoice)&&(c=o.MultipleChoiceListFieldImpl.buildEmpty()),c.valueConstraints.defaultValue=d.DefaultValueSerialization.literalFromNode(u,a.CedarModel.defaultValue);const e=n.ReaderUtil.getNodeList(u,a.CedarModel.literals);null!==e&&e.forEach(e=>{const t=n.ReaderUtil.getString(e,a.CedarModel.label),r=n.ReaderUtil.getBoolean(e,a.CedarModel.selectedByDefault),i=Object.hasOwn(e,a.CedarModel.selectedByDefault);if(null!=t){const e=new s.ListOption(t,r,i);c.valueConstraints.literals.push(e)}})}return c}}t.JsonFieldReaderList=c},7335(e,t,r){t.JsonFieldWriterList=void 0;const n=r(936),a=r(2748),i=r(6145);class s extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),this.expandLiterals(t,e),super.expandValueConstraintsNode(e,t,r),e[n.CedarModel.multipleChoice]=t.multipleChoice}}t.JsonFieldWriterList=s},9513(e,t,r){t.ListFieldBuilderImpl=void 0;const n=r(4081),a=r(3350),i=r(4932),s=r(1676);class o extends a.TemplateFieldBuilder{multipleChoice=!1;defaultValue=null;literals=[];constructor(){super()}withDefaultValue(e){return this.defaultValue=e,this}addListOption(e,t){return this.literals.push(new n.ListOption(e,t??!1,void 0!==t)),this}build(){let e;if(e=this.multipleChoice?i.MultipleChoiceListFieldImpl.buildEmpty():s.SingleChoiceListFieldImpl.buildEmpty(),super.buildInternal(e),!this.multipleChoice){let e=-1;for(let t=this.literals.length-1;t>=0;t--)if(this.literals[t].selectedByDefault){e=t;break}-1!==e&&this.literals.forEach((t,r)=>{t.selectedByDefault=r===e,t.statesSelectedByDefault=t.selectedByDefault})}return e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.literals=this.literals,e}}t.ListFieldBuilderImpl=o},5316(e,t,r){t.ListFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1623);class o extends n.TemplateField{valueConstraints;multipleChoice;constructor(){super(),this.cedarFieldType=a.CedarFieldType.NULL,this.valueConstraints=new s.ValueConstraintsListField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.multipleChoice=!1}}t.ListFieldImpl=o},4081(e,t,r){t.ListOption=void 0;const n=r(7282);class a extends n.ChoiceOptionEntity{constructor(e,t,r=!0){super(e,t,r)}}t.ListOption=a},1623(e,t,r){t.ValueConstraintsListField=void 0;const n=r(7765);class a extends n.ValueConstraintsLiteralField{literals=[];constructor(){super()}}t.ValueConstraintsListField=a},3080(e,t,r){t.YamlFieldWriterList=void 0;const n=r(5430),a=r(9499),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){s.DefaultValueSerialization.writeLiteral(e,i.YamlKeys.default,t.valueConstraints.defaultValue),this.expandLiterals(t,e)}getYamlType(e){return e.multipleChoice?a.YamlArtifactType.MULTI_SELECT_LIST.getValue():a.YamlArtifactType.SINGLE_SELECT_LIST.getValue()}}t.YamlFieldWriterList=o},1769(e,t,r){t.JsonFieldReaderNumeric=void 0;const n=r(8748),a=r(936),i=r(3447),s=r(4385),o=r(4074),l=r(6444);class d extends s.JsonTemplateFieldTypeSpecificReader{read(e,t,r,s){const d=o.NumericFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=c){const e=n.ReaderUtil.getString(c,a.CedarModel.numberType);null!==e&&(d.valueConstraints.numberType=i.NumberType.forValue(e)),d.valueConstraints.minValue=n.ReaderUtil.getNumber(c,a.CedarModel.minValue),d.valueConstraints.maxValue=n.ReaderUtil.getNumber(c,a.CedarModel.maxValue),d.valueConstraints.decimalPlaces=n.ReaderUtil.getNumber(c,a.CedarModel.decimalPlace),d.valueConstraints.unitOfMeasure=n.ReaderUtil.getString(c,a.CedarModel.unitOfMeasure),d.valueConstraints.defaultValue=n.ReaderUtil.getNumericDefault(c,a.CedarModel.defaultValue),l.NumericDefaultValueValidator.assertValid(d.valueConstraints.numberType,d.valueConstraints.defaultValue,d.valueConstraints.minValue,d.valueConstraints.maxValue)}return d}}t.JsonFieldReaderNumeric=d},4841(e,t,r){t.JsonFieldWriterNumeric=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6444);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandPropertiesNode(e){e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_LITERAL}expandRequiredNode(e){e[a.JsonSchema.required]=[a.JsonSchema.atValue,a.JsonSchema.atType]}expandValueConstraintsNode(e,t,r){o.NumericDefaultValueValidator.assertValid(t.valueConstraints.numberType,t.valueConstraints.defaultValue,t.valueConstraints.minValue,t.valueConstraints.maxValue),e[s.CedarModel.numberType]=this.atomicWriter.write(t.valueConstraints.numberType),null!=t.valueConstraints.minValue&&(e[s.CedarModel.minValue]=t.valueConstraints.minValue),null!=t.valueConstraints.maxValue&&(e[s.CedarModel.maxValue]=t.valueConstraints.maxValue),null!=t.valueConstraints.decimalPlaces&&(e[s.CedarModel.decimalPlace]=t.valueConstraints.decimalPlaces),null!=t.valueConstraints.unitOfMeasure&&(e[s.CedarModel.unitOfMeasure]=t.valueConstraints.unitOfMeasure),null!=t.valueConstraints.defaultValue&&(e[s.CedarModel.defaultValue]=String(t.valueConstraints.defaultValue)),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterNumeric=l},6444(e,t,r){t.NumericDefaultValueValidator=void 0;const n=r(3447);t.NumericDefaultValueValidator=class{static assertValid(e,t,r=null,a=null){if(null===t)return;if(!Number.isFinite(t))throw new Error("Numeric default must be finite.");const i=e.getValue();if(null===i)throw new Error("Numeric default requires a numeric datatype.");const s={[n.NumberTypeValues.BYTE]:[-128,127],[n.NumberTypeValues.SHORT]:[-32768,32767],[n.NumberTypeValues.INT]:[-2147483648,2147483647],[n.NumberTypeValues.LONG]:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER]}[i];if(void 0!==s){if(!Number.isSafeInteger(t))throw new Error(`Numeric default ${t} must be a safely representable integer for ${i}.`);if(t<s[0]||t>s[1])throw new Error(`Numeric default ${t} is outside the ${i} range.`)}if(i===n.NumberTypeValues.FLOAT){const e=Math.abs(t);if(e>34028234663852886e22||0!==e&&e<1401298464324817e-60)throw new Error(`Numeric default ${t} is outside the ${i} range.`)}if(null!==r&&t<r)throw new Error(`Numeric default ${t} is below minValue ${r}.`);if(null!==a&&t>a)throw new Error(`Numeric default ${t} is above maxValue ${a}.`)}}},3675(e,t,r){t.NumericFieldBuilderImpl=void 0;const n=r(3350),a=r(3447),i=r(4074),s=r(6444);class o extends n.TemplateFieldBuilder{numberType=a.NumberType.DECIMAL;minValue=null;maxValue=null;decimalPlaces=null;unitOfMeasure=null;defaultValue=null;constructor(){super()}static create(){return new o}withNumberType(e){return this.numberType=e,this}withMinValue(e){return this.minValue=e,this}withMaxValue(e){return this.maxValue=e,this}withDecimalPlaces(e){return this.decimalPlaces=e,this}withUnitOfMeasure(e){return this.unitOfMeasure=e,this}withDefaultValue(e){return this.defaultValue=e,this}build(){s.NumericDefaultValueValidator.assertValid(this.numberType,this.defaultValue,this.minValue,this.maxValue);const e=i.NumericFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.numberType=this.numberType,e.valueConstraints.minValue=this.minValue,e.valueConstraints.maxValue=this.maxValue,e.valueConstraints.decimalPlaces=this.decimalPlaces,e.valueConstraints.unitOfMeasure=this.unitOfMeasure,e.valueConstraints.defaultValue=this.defaultValue,e}}t.NumericFieldBuilderImpl=o},4074(e,t,r){t.NumericFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1211),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.NUMERIC,this.valueConstraints=new s.ValueConstraintsNumericField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.NumericFieldImpl=l},1211(e,t,r){t.ValueConstraintsNumericField=void 0;const n=r(4328),a=r(3447);class i extends n.ValueConstraints{numberType=a.NumberType.DECIMAL;minValue=null;maxValue=null;decimalPlaces=null;unitOfMeasure=null;defaultValue=null;constructor(){super()}}t.ValueConstraintsNumericField=i},1872(e,t,r){t.YamlFieldReaderNumeric=void 0;const n=r(8748),a=r(3447),i=r(5675),s=r(2099),o=r(4074),l=r(6444);class d extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const d=o.NumericFieldImpl.buildEmpty(),c=n.ReaderUtil.getString(e,s.YamlKeys.datatype);return null!==c&&(d.valueConstraints.numberType=a.NumberType.forValue(c)),d.valueConstraints.minValue=n.ReaderUtil.getNumber(e,s.YamlKeys.minValue),d.valueConstraints.maxValue=n.ReaderUtil.getNumber(e,s.YamlKeys.maxValue),d.valueConstraints.decimalPlaces=n.ReaderUtil.getNumber(e,s.YamlKeys.decimalPlaces),d.valueConstraints.unitOfMeasure=n.ReaderUtil.getString(e,s.YamlKeys.unit),d.valueConstraints.defaultValue=n.ReaderUtil.getNumericDefault(e,s.YamlKeys.default),l.NumericDefaultValueValidator.assertValid(d.valueConstraints.numberType,d.valueConstraints.defaultValue,d.valueConstraints.minValue,d.valueConstraints.maxValue),d}}t.YamlFieldReaderNumeric=d},3292(e,t,r){t.YamlFieldWriterNumeric=void 0;const n=r(5430),a=r(2099),i=r(6444);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.NumericDefaultValueValidator.assertValid(t.valueConstraints.numberType,t.valueConstraints.defaultValue,t.valueConstraints.minValue,t.valueConstraints.maxValue),e[a.YamlKeys.datatype]=this.atomicWriter.write(t.valueConstraints.numberType),null!=t.valueConstraints.minValue&&(e[a.YamlKeys.minValue]=t.valueConstraints.minValue),null!=t.valueConstraints.maxValue&&(e[a.YamlKeys.maxValue]=t.valueConstraints.maxValue),null!=t.valueConstraints.decimalPlaces&&(e[a.YamlKeys.decimalPlaces]=t.valueConstraints.decimalPlaces),null!=t.valueConstraints.unitOfMeasure&&(e[a.YamlKeys.unit]=t.valueConstraints.unitOfMeasure),null!=t.valueConstraints.defaultValue&&(e[a.YamlKeys.default]=t.valueConstraints.defaultValue)}}t.YamlFieldWriterNumeric=s},1468(e,t,r){t.JsonFieldReaderPhoneNumber=void 0;const n=r(4385),a=r(7459),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.PhoneNumberFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(d,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderPhoneNumber=l},6876(e,t,r){t.JsonFieldWriterPhoneNumber=void 0;const n=r(2748),a=r(936),i=r(6145);class s extends n.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterPhoneNumber=s},8084(e,t,r){t.PhoneNumberFieldBuilderImpl=void 0;const n=r(3350),a=r(7459);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.PhoneNumberFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.PhoneNumberFieldBuilderImpl=i},7459(e,t,r){t.PhoneNumberFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(7765),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.PHONE_NUMBER,this.valueConstraints=new s.ValueConstraintsLiteralField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.PhoneNumberFieldImpl=l},4329(e,t,r){t.YamlFieldReaderPhoneNumber=void 0;const n=r(5675),a=r(7459),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.PhoneNumberFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.literalFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderPhoneNumber=o},9821(e,t,r){t.YamlFieldWriterPhoneNumber=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterPhoneNumber=s},9053(e,t,r){t.JsonFieldReaderRadio=void 0;const n=r(8748),a=r(936),i=r(3315),s=r(4385),o=r(8618),l=r(6145);class d extends s.JsonTemplateFieldTypeSpecificReader{read(e,t,r,s){const d=o.RadioFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=c){d.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(c,a.CedarModel.defaultValue);const e=n.ReaderUtil.getNodeList(c,a.CedarModel.literals);null!==e&&e.forEach(e=>{const t=n.ReaderUtil.getString(e,a.CedarModel.label),r=n.ReaderUtil.getBoolean(e,a.CedarModel.selectedByDefault),s=Object.hasOwn(e,a.CedarModel.selectedByDefault);if(null!=t){const e=new i.RadioOption(t,r,s);d.valueConstraints.literals.push(e)}})}return d}}t.JsonFieldReaderRadio=d},9309(e,t,r){t.JsonFieldWriterRadio=void 0;const n=r(936),a=r(2748),i=r(6145);class s extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),this.expandLiterals(t,e),super.expandValueConstraintsNode(e,t,r),e[n.CedarModel.multipleChoice]=!1}}t.JsonFieldWriterRadio=s},2875(e,t,r){t.RadioFieldBuilderImpl=void 0;const n=r(3350),a=r(3315),i=r(8618);class s extends n.TemplateFieldBuilder{defaultValue=null;literals=[];constructor(){super()}static create(){return new s}addRadioOption(e,t){return this.literals.push(new a.RadioOption(e,t??!1,void 0!==t)),this}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.RadioFieldImpl.buildEmpty();super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue;let t=-1;for(let e=this.literals.length-1;e>=0;e--)if(this.literals[e].selectedByDefault){t=e;break}return-1!==t&&this.literals.forEach((e,r)=>{e.selectedByDefault=r===t,e.statesSelectedByDefault=e.selectedByDefault}),e.valueConstraints.literals=this.literals,e}}t.RadioFieldBuilderImpl=s},8618(e,t,r){t.RadioFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(9931),o=r(587);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.RADIO,this.valueConstraints=new s.ValueConstraintsRadioField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}isSingleInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new o.ChildDeploymentInfoAlwaysSingleBuilder(this,e)}}t.RadioFieldImpl=l},3315(e,t,r){t.RadioOption=void 0;const n=r(7282);class a extends n.ChoiceOptionEntity{constructor(e,t,r=!0){super(e,t,r)}}t.RadioOption=a},9931(e,t,r){t.ValueConstraintsRadioField=void 0;const n=r(7765);class a extends n.ValueConstraintsLiteralField{literals=[];constructor(){super()}}t.ValueConstraintsRadioField=a},4284(e,t,r){t.YamlFieldReaderRadio=void 0;const n=r(8748),a=r(3315),i=r(5675),s=r(2099),o=r(8618),l=r(6145);class d extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const d=o.RadioFieldImpl.buildEmpty();d.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(e,s.YamlKeys.default);const c=n.ReaderUtil.getNodeList(e,s.YamlKeys.values);return null!==c&&c.forEach(e=>{const t=n.ReaderUtil.getString(e,s.YamlKeys.label),r=n.ReaderUtil.getBoolean(e,s.YamlKeys.selected),i=Object.hasOwn(e,s.YamlKeys.selected);if(null!=t){const e=new a.RadioOption(t,r,i);d.valueConstraints.literals.push(e)}}),d}}t.YamlFieldReaderRadio=d},8136(e,t,r){t.YamlFieldWriterRadio=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue),this.expandLiterals(t,e)}}t.YamlFieldWriterRadio=s},9315(e,t,r){t.JsonFieldReaderTemporal=void 0;const n=r(8748),a=r(936),i=r(8588),s=r(3764),o=r(7974),l=r(4385),d=r(964),c=r(6342);class u extends l.JsonTemplateFieldTypeSpecificReader{read(e,t,r,l){const u=d.TemporalFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const m=n.ReaderUtil.getNode(e,a.CedarModel.ui);null!=m&&(u.temporalGranularity=o.TemporalGranularity.forValue(n.ReaderUtil.getString(m,a.CedarModel.temporalGranularity)),u.inputTimeFormat=s.TimeFormat.forValue(n.ReaderUtil.getString(m,a.CedarModel.inputTimeFormat)),u.timezoneEnabled=n.ReaderUtil.getBoolean(m,a.CedarModel.timezoneEnabled));const p=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=p){const e=n.ReaderUtil.getString(p,a.CedarModel.temporalType);null!==e&&(u.valueConstraints.temporalType=i.TemporalType.forValue(e)),u.valueConstraints.defaultValue=n.ReaderUtil.getString(p,a.CedarModel.defaultValue),c.TemporalDefaultValueValidator.assertValid(u.valueConstraints.temporalType,u.temporalGranularity,u.valueConstraints.defaultValue)}return u}}t.JsonFieldReaderTemporal=u},5459(e,t,r){t.JsonFieldWriterTemporal=void 0;const n=r(936),a=r(3764),i=r(7974),s=r(2748),o=r(2733),l=r(6342);class d extends s.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUINode(e,t,r){super.expandUINode(e,t,r),t.temporalGranularity!==i.TemporalGranularity.NULL&&(e[n.CedarModel.temporalGranularity]=this.atomicWriter.write(t.temporalGranularity)),i.TemporalGranularity.hasTime(t.temporalGranularity)&&(t.inputTimeFormat!==a.TimeFormat.NULL&&(e[n.CedarModel.inputTimeFormat]=this.atomicWriter.write(t.inputTimeFormat)),e[n.CedarModel.timezoneEnabled]=t.timezoneEnabled)}expandValueConstraintsNode(e,t,r){l.TemporalDefaultValueValidator.assertValid(t.valueConstraints.temporalType,t.temporalGranularity,t.valueConstraints.defaultValue),e[n.CedarModel.temporalType]=this.atomicWriter.write(t.valueConstraints.temporalType),null!=t.valueConstraints.defaultValue&&""!==t.valueConstraints.defaultValue&&(e[n.CedarModel.defaultValue]=t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandRequiredNode(e){e[o.JsonSchema.required]=[o.JsonSchema.atValue,o.JsonSchema.atType]}}t.JsonFieldWriterTemporal=d},6342(e,t,r){t.TemporalDefaultValueValidator=void 0;const n=r(7974),a=r(8588);t.TemporalDefaultValueValidator=class{static zone="(?:Z|[+-](?:(?:0\\d|1[0-3]):[0-5]\\d|14:00))?";static hour="(?:[01]\\d|2[0-3])";static minute="[0-5]\\d";static second="[0-5]\\d";static assertValid(e,t,r){if(null===r||""===r)return;const n=e.getValue();if(null===n)throw new Error("Temporal default requires a temporal datatype.");if(!this.isCompatibleGranularity(e,t))throw new Error(`Temporal datatype ${n} is not compatible with ${t.getValue()} granularity.`);const i=this.datePattern(t,n===a.TemporalType.DATE.getValue()),s=this.timePattern(t);let o;if(o=n===a.TemporalType.DATE.getValue()?i:n===a.TemporalType.TIME.getValue()?s:this.dateTimePattern(t),!o.test(r)||!this.hasValidCalendarDate(r))throw new Error(`Temporal default "${r}" is not valid for ${n}`+(null===t.getValue()?".":` at ${t.getValue()} granularity.`))}static isCompatibleGranularity(e,t){return t===n.TemporalGranularity.NULL||(e===a.TemporalType.DATE?[n.TemporalGranularity.YEAR,n.TemporalGranularity.MONTH,n.TemporalGranularity.DAY].includes(t):e===a.TemporalType.TIME?n.TemporalGranularity.valuesWithTimes().includes(t):[n.TemporalGranularity.DAY,...n.TemporalGranularity.valuesWithTimes()].includes(t))}static datePattern(e,t){return e===n.TemporalGranularity.YEAR?/^\d{4}$/:e===n.TemporalGranularity.MONTH?/^\d{4}-(?:0[1-9]|1[0-2])$/:e!==n.TemporalGranularity.DAY&&t?/^\d{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12]\d|3[01]))?)?$/:/^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$/}static timePattern(e){const t=this.zone,r=this.hour,a=this.minute,i=this.second;return e===n.TemporalGranularity.HOUR?new RegExp(`^${r}${t}$`):e===n.TemporalGranularity.MINUTE?new RegExp(`^${r}:${a}${t}$`):e===n.TemporalGranularity.SECOND?new RegExp(`^${r}:${a}:${i}${t}$`):e===n.TemporalGranularity.DECIMAL_SECOND?new RegExp(`^${r}:${a}:${i}\\.\\d+${t}$`):new RegExp(`^${r}(?::${a}(?::${i}(?:\\.\\d+)?)?)?${t}$`)}static dateTimePattern(e){const t="\\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\\d|3[01])";return e===n.TemporalGranularity.HOUR||e===n.TemporalGranularity.MINUTE||e===n.TemporalGranularity.SECOND||e===n.TemporalGranularity.DECIMAL_SECOND?new RegExp(`^${t}T${this.timePatternSource(e)}$`):e===n.TemporalGranularity.YEAR||e===n.TemporalGranularity.MONTH?/a^/:e===n.TemporalGranularity.DAY?new RegExp(`^${t}$`):new RegExp(`^${t}(?:T${this.timePatternSource(n.TemporalGranularity.NULL)})?$`)}static timePatternSource(e){return this.timePattern(e).source.replace(/^\^|\$$/g,"")}static hasValidCalendarDate(e){const t=/^(\d{4})-(\d{2})-(\d{2})/.exec(e);if(null===t)return!0;const r=Number(t[1]),n=Number(t[2]);return Number(t[3])<=[31,r%4!=0||r%100==0&&r%400!=0?28:29,31,30,31,30,31,31,30,31,30,31][n-1]}}},345(e,t,r){t.TemporalFieldBuilderImpl=void 0;const n=r(3350),a=r(3764),i=r(7974),s=r(8588),o=r(964),l=r(6342);class d extends n.TemplateFieldBuilder{timezoneEnabled=!1;inputTimeFormat=a.TimeFormat.NULL;temporalGranularity=i.TemporalGranularity.NULL;temporalType=s.TemporalType.DATETIME;defaultValue=null;constructor(){super()}static create(){return new d}withTimezoneEnabled(e){return this.timezoneEnabled=e,this}withInputTimeFormat(e){return this.inputTimeFormat=e,this}withTemporalGranularity(e){return this.temporalGranularity=e,this}withTemporalType(e){return this.temporalType=e,this}withDefaultValue(e){return this.defaultValue=e,this}build(){l.TemporalDefaultValueValidator.assertValid(this.temporalType,this.temporalGranularity,this.defaultValue);const e=o.TemporalFieldImpl.buildEmpty();return super.buildInternal(e),e.timezoneEnabled=this.timezoneEnabled,e.inputTimeFormat=this.inputTimeFormat,e.temporalGranularity=this.temporalGranularity,e.valueConstraints.temporalType=this.temporalType,e.valueConstraints.defaultValue=this.defaultValue,e}}t.TemporalFieldBuilderImpl=d},964(e,t,r){t.TemporalFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(3567),o=r(3764),l=r(7974),d=r(3608);class c extends n.TemplateField{valueConstraints;timezoneEnabled=!1;inputTimeFormat=o.TimeFormat.NULL;temporalGranularity=l.TemporalGranularity.NULL;constructor(){super(),this.cedarFieldType=a.CedarFieldType.TEMPORAL,this.valueConstraints=new s.ValueConstraintsTemporalField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new c}createDeploymentBuilder(e){return new d.ChildDeploymentInfoBuilder(this,e)}}t.TemporalFieldImpl=c},3567(e,t,r){t.ValueConstraintsTemporalField=void 0;const n=r(4328),a=r(8588);class i extends n.ValueConstraints{temporalType=a.TemporalType.DATETIME;defaultValue=null;constructor(){super()}}t.ValueConstraintsTemporalField=i},384(e,t,r){t.YamlFieldReaderTemporal=void 0;const n=r(8748),a=r(8588),i=r(3764),s=r(7974),o=r(5675),l=r(2099),d=r(964),c=r(6342);class u extends o.YamlTemplateFieldTypeSpecificReader{read(e,t,r,o){const u=d.TemporalFieldImpl.buildEmpty();u.temporalGranularity=s.TemporalGranularity.forValue(n.ReaderUtil.getString(e,l.YamlKeys.granularity)),u.inputTimeFormat=i.TimeFormat.forValue(n.ReaderUtil.getString(e,l.YamlKeys.inputTimeFormat)),u.timezoneEnabled=n.ReaderUtil.getBoolean(e,l.YamlKeys.inputTimeZone);const m=n.ReaderUtil.getString(e,l.YamlKeys.datatype);return null!==m&&(u.valueConstraints.temporalType=a.TemporalType.forValue(m)),u.valueConstraints.defaultValue=n.ReaderUtil.getString(e,l.YamlKeys.default),c.TemporalDefaultValueValidator.assertValid(u.valueConstraints.temporalType,u.temporalGranularity,u.valueConstraints.defaultValue),u}}t.YamlFieldReaderTemporal=u},7436(e,t,r){t.YamlFieldWriterTemporal=void 0;const n=r(3764),a=r(7974),i=r(5430),s=r(2099),o=r(6342);class l extends i.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){o.TemporalDefaultValueValidator.assertValid(t.valueConstraints.temporalType,t.temporalGranularity,t.valueConstraints.defaultValue),e[s.YamlKeys.datatype]=this.atomicWriter.write(t.valueConstraints.temporalType),t.temporalGranularity!==a.TemporalGranularity.NULL?(e[s.YamlKeys.granularity]=this.atomicWriter.write(t.temporalGranularity),null!=t.valueConstraints.defaultValue&&""!==t.valueConstraints.defaultValue&&(e[s.YamlKeys.default]=t.valueConstraints.defaultValue),t.temporalGranularity!==a.TemporalGranularity.YEAR&&t.temporalGranularity!==a.TemporalGranularity.MONTH&&t.temporalGranularity!==a.TemporalGranularity.DAY&&(t.inputTimeFormat!==n.TimeFormat.NULL&&(e[s.YamlKeys.inputTimeFormat]=this.atomicWriter.write(t.inputTimeFormat)),t.timezoneEnabled&&(e[s.YamlKeys.inputTimeZone]=t.timezoneEnabled))):null!=t.valueConstraints.defaultValue&&""!==t.valueConstraints.defaultValue&&(e[s.YamlKeys.default]=t.valueConstraints.defaultValue)}}t.YamlFieldWriterTemporal=l},9683(e,t,r){t.JsonFieldReaderTextArea=void 0;const n=r(4385),a=r(5450),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.TextAreaImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(d,s.CedarModel.defaultValue),l.valueConstraints.minLength=i.ReaderUtil.getNumber(d,s.CedarModel.minLength),l.valueConstraints.maxLength=i.ReaderUtil.getNumber(d,s.CedarModel.maxLength)),l}}t.JsonFieldReaderTextArea=l},275(e,t,r){t.JsonFieldWriterTextArea=void 0;const n=r(2748),a=r(936),i=r(6145);class s extends n.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.CedarModel.defaultValue,t.valueConstraints.defaultValue),null!==t.valueConstraints.minLength&&(e[a.CedarModel.minLength]=t.valueConstraints.minLength),null!==t.valueConstraints.maxLength&&(e[a.CedarModel.maxLength]=t.valueConstraints.maxLength),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterTextArea=s},1259(e,t,r){t.TextAreaBuilderImpl=void 0;const n=r(3350),a=r(5450);class i extends n.TemplateFieldBuilder{defaultValue=null;minLength=null;maxLength=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}withMinLength(e){return this.minLength=e,this}withMaxLength(e){return this.maxLength=e,this}build(){const e=a.TextAreaImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.minLength=this.minLength,e.valueConstraints.maxLength=this.maxLength,e}}t.TextAreaBuilderImpl=i},5450(e,t,r){t.TextAreaImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(3608),o=r(5923);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.TEXTAREA,this.valueConstraints=new o.ValueConstraintsTextArea,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new s.ChildDeploymentInfoBuilder(this,e)}}t.TextAreaImpl=l},5923(e,t,r){t.ValueConstraintsTextArea=void 0;const n=r(7765);class a extends n.ValueConstraintsLiteralField{minLength=null;maxLength=null;constructor(){super()}}t.ValueConstraintsTextArea=a},3168(e,t,r){t.YamlFieldReaderTextArea=void 0;const n=r(8748),a=r(5675),i=r(5450),s=r(2099),o=r(6145);class l extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const l=i.TextAreaImpl.buildEmpty();return l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(e,s.YamlKeys.default),l.valueConstraints.minLength=n.ReaderUtil.getNumber(e,s.YamlKeys.minLength),l.valueConstraints.maxLength=n.ReaderUtil.getNumber(e,s.YamlKeys.maxLength),l}}t.YamlFieldReaderTextArea=l},836(e,t,r){t.YamlFieldWriterTextArea=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue),null!==t.valueConstraints.minLength&&(e[a.YamlKeys.minLength]=t.valueConstraints.minLength),null!==t.valueConstraints.maxLength&&(e[a.YamlKeys.maxLength]=t.valueConstraints.maxLength)}}t.YamlFieldWriterTextArea=s},9241(e,t,r){t.JsonFieldReaderTextField=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(6591),o=r(6145);class l extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const l=s.TextFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);return null!=d&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(d,a.CedarModel.defaultValue),l.valueConstraints.minLength=n.ReaderUtil.getNumber(d,a.CedarModel.minLength),l.valueConstraints.maxLength=n.ReaderUtil.getNumber(d,a.CedarModel.maxLength),l.valueConstraints.regex=n.ReaderUtil.getString(d,a.CedarModel.regex)),l}}t.JsonFieldReaderTextField=l},7501(e,t,r){t.JsonFieldWriterTextField=void 0;const n=r(936),a=r(2748),i=r(6145);class s extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){null!==t.valueConstraints.minLength&&(e[n.CedarModel.minLength]=t.valueConstraints.minLength),null!==t.valueConstraints.maxLength&&(e[n.CedarModel.maxLength]=t.valueConstraints.maxLength),i.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r),null!==t.valueConstraints.regex&&(e[n.CedarModel.regex]=t.valueConstraints.regex)}}t.JsonFieldWriterTextField=s},7889(e,t,r){t.TextFieldBuilderImpl=void 0;const n=r(3350),a=r(6591);class i extends n.TemplateFieldBuilder{defaultValue=null;minLength=null;maxLength=null;regex=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}withMinLength(e){return this.minLength=e,this}withMaxLength(e){return this.maxLength=e,this}withRegex(e){return this.regex=e,this}build(){const e=a.TextFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.minLength=this.minLength,e.valueConstraints.maxLength=this.maxLength,e.valueConstraints.regex=this.regex,e}}t.TextFieldBuilderImpl=i},6591(e,t,r){t.TextFieldImpl=void 0;const n=r(9129),a=r(9711),i=r(4869),s=r(2763),o=r(3608);class l extends n.TemplateField{valueConstraints;valueRecommendationEnabled=!1;constructor(){super(),this.cedarFieldType=i.CedarFieldType.TEXT,this.valueConstraints=new a.ValueConstraintsTextField,this.cedarArtifactType=s.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}supportsValueRecommendation(){return!0}}t.TextFieldImpl=l},9711(e,t,r){t.ValueConstraintsTextField=void 0;const n=r(7765);class a extends n.ValueConstraintsLiteralField{minLength=null;maxLength=null;regex=null;constructor(){super()}}t.ValueConstraintsTextField=a},1268(e,t,r){t.YamlFieldReaderTextField=void 0;const n=r(8748),a=r(5675),i=r(2099),s=r(6591),o=r(6145);class l extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const l=s.TextFieldImpl.buildEmpty();return l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(e,i.YamlKeys.default),l.valueConstraints.minLength=n.ReaderUtil.getNumber(e,i.YamlKeys.minLength),l.valueConstraints.maxLength=n.ReaderUtil.getNumber(e,i.YamlKeys.maxLength),l.valueConstraints.regex=n.ReaderUtil.getString(e,i.YamlKeys.regex),l}}t.YamlFieldReaderTextField=l},6116(e,t,r){t.YamlFieldWriterTextField=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue),null!=t.valueConstraints.minLength&&(e[a.YamlKeys.minLength]=t.valueConstraints.minLength),null!=t.valueConstraints.maxLength&&(e[a.YamlKeys.maxLength]=t.valueConstraints.maxLength),null!=t.valueConstraints.regex&&(e[a.YamlKeys.regex]=t.valueConstraints.regex)}}t.YamlFieldWriterTextField=s},8053(e,t,r){t.JsonStaticFieldWriter=void 0;const n=r(7752),a=r(455),i=r(2748),s=r(2733),o=r(9251),l=r(936),d=r(5793),c=r(5747),u=r(3746),m=r(2475);class p extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUiNode(e,t){}buildUIObject(e){const t={[l.CedarModel.inputType]:this.atomicWriter.write(e.cedarFieldType.getUiInputType())};return this.expandUiNode(t,e),l.CedarModel.content in t||(t[l.CedarModel.content]=null),{[l.CedarModel.ui]:t}}getAsJsonNode(e,t=a.ChildDeploymentInfo.empty()){const r=this.buildUIObject(e);return t.hidden&&(r[l.CedarModel.ui][l.CedarModel.Ui.hidden]=!0),e.extensions.applyJson({[s.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[s.JsonSchema.atType]:this.atomicWriter.write(e.cedarArtifactType),[s.JsonSchema.atContext]:this.macroContext(e),[l.CedarModel.type]:this.atomicWriter.write(d.JavascriptType.OBJECT),[c.TemplateProperty.title]:e.title,[c.TemplateProperty.description]:e.description,...r,...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroSkos(e),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroSchemaIdentifier(e),...this.macroAnnotations(e),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[s.JsonSchema.schemaVersion]:this.atomicWriter.write(e.schema_schemaVersion),[c.TemplateProperty.additionalProperties]:this.atomicWriter.write(u.AdditionalProperties.FALSE),[l.CedarModel.schema]:this.atomicWriter.write(m.ArtifactSchema.CURRENT)})}macroContext(e){const t={...o.JsonTemplateFieldContentStatic.CONTEXT_VERBATIM};return e.language!==n.Language.NULL&&(t[s.JsonSchema.atLanguage]=this.atomicWriter.write(e.language)),t}}t.JsonStaticFieldWriter=p},699(e,t){t.isSizedStaticField=function(e){return null!==e&&"width"in e&&"height"in e}},934(e,t,r){t.YamlStaticFieldWriter=void 0;const n=r(9517),a=r(5430),i=r(455);class s extends a.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return super.expandUINodeForYAML(e)}expandSizeForYAML(e){return n.JsonNode.getEmpty()}buildUIObject(e){return this.expandUINodeForYAML(e)}getYamlAsJsonNode(e,t=i.ChildDeploymentInfo.empty(),r=!1,a=!0){return e.extensions.applyYaml({...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,r,a),...this.macroStatusAndVersion(e,r),...this.macroSkos(e),...this.expandUINodeForYAML(e),...t.hasParent()?n.JsonNode.getEmpty():this.expandSizeForYAML(e),...this.macroProvenance(e,r),...this.macroDerivedFrom(e,r),...this.macroPreviousVersion(e,r),...this.macroAnnotations(e)})}}t.YamlStaticFieldWriter=s},9148(e,t,r){t.JsonFieldReaderImage=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(5573);class o extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticImageFieldImpl.buildEmpty(),l=n.ReaderUtil.getNode(e,a.CedarModel.ui);o.content=n.ReaderUtil.getString(l,a.CedarModel.content);const d=n.ReaderUtil.getNode(l,a.CedarModel.size);return o.width=n.ReaderUtil.getNumber(d,a.CedarModel.width),o.height=n.ReaderUtil.getNumber(d,a.CedarModel.height),o}}t.JsonFieldReaderImage=o},8970(e,t,r){t.JsonFieldWriterStaticImage=void 0;const n=r(9517),a=r(936),i=r(8053);class s extends i.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){if(null!==t.content&&(e[a.CedarModel.content]=t.content),null!==t.width||null!==t.height){const r=n.JsonNode.getEmpty();null!==t.width&&(r[a.CedarModel.width]=t.width),null!==t.height&&(r[a.CedarModel.height]=t.height),e[a.CedarModel.size]=r}}}t.JsonFieldWriterStaticImage=s},3138(e,t,r){t.StaticImageFieldBuilderImpl=void 0;const n=r(3350),a=r(5573);class i extends n.TemplateFieldBuilder{content=null;width=null;height=null;constructor(){super()}static create(){return new i}withContent(e){return this.content=e,this}withWidth(e){return this.width=e,this}withHeight(e){return this.height=e,this}build(){const e=a.StaticImageFieldImpl.buildEmpty();return super.buildInternal(e),e.content=this.content,e.width=this.width,e.height=this.height,e}}t.StaticImageFieldBuilderImpl=i},5573(e,t,r){t.StaticImageFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(8290);class o extends n.TemplateField{content=null;width=null;height=null;constructor(){super(),this.cedarFieldType=a.CedarFieldType.STATIC_IMAGE,this.cedarArtifactType=i.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticImageFieldImpl=o},7941(e,t,r){t.YamlFieldReaderImage=void 0;const n=r(8748),a=r(2099),i=r(5675),s=r(5573);class o extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticImageFieldImpl.buildEmpty();return o.content=n.ReaderUtil.getString(e,a.YamlKeys.content),o.width=n.ReaderUtil.getNumber(e,a.YamlKeys.width),o.height=n.ReaderUtil.getNumber(e,a.YamlKeys.height),o}}t.YamlFieldReaderImage=o},4935(e,t,r){t.YamlFieldWriterStaticImage=void 0;const n=r(9517),a=r(934),i=r(2099);class s extends a.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.content&&(t[i.YamlKeys.content]=e.content),t}expandSizeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.width&&(t[i.YamlKeys.width]=e.width),null!==e.height&&(t[i.YamlKeys.height]=e.height),t}}t.YamlFieldWriterStaticImage=s},5933(e,t,r){t.JsonFieldReaderPageBreak=void 0;const n=r(4385),a=r(9046),i=r(936),s=r(8748);class o extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.StaticPageBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(s.ReaderUtil.getNode(e,i.CedarModel.ui),i.CedarModel.content),o}}t.JsonFieldReaderPageBreak=o},2347(e,t,r){t.JsonFieldWriterStaticPageBreak=void 0;const n=r(8053),a=r(936);class i extends n.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){null!==t.content&&(e[a.CedarModel.content]=t.content)}}t.JsonFieldWriterStaticPageBreak=i},2703(e,t,r){t.StaticPageBreakFieldBuilderImpl=void 0;const n=r(3350),a=r(9046);class i extends n.TemplateFieldBuilder{constructor(){super()}static create(){return new i}build(){const e=a.StaticPageBreakFieldImpl.buildEmpty();return super.buildInternal(e),e}}t.StaticPageBreakFieldBuilderImpl=i},9046(e,t,r){t.StaticPageBreakFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(8290);class o extends n.TemplateField{content=null;constructor(){super(),this.cedarFieldType=a.CedarFieldType.STATIC_PAGE_BREAK,this.cedarArtifactType=i.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticPageBreakFieldImpl=o},4568(e,t,r){t.YamlFieldReaderPageBreak=void 0;const n=r(5675),a=r(9046),i=r(2099),s=r(8748);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.StaticPageBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(e,i.YamlKeys.content),o}}t.YamlFieldReaderPageBreak=o},7594(e,t,r){t.YamlFieldWriterStaticPageBreak=void 0;const n=r(934),a=r(2099),i=r(9517);class s extends n.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return null!==e.content?{[a.YamlKeys.content]:e.content}:i.JsonNode.getEmpty()}}t.YamlFieldWriterStaticPageBreak=s},6291(e,t,r){t.JsonFieldReaderRichText=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(5548);class o extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticRichTextFieldImpl.buildEmpty(),l=n.ReaderUtil.getNode(e,a.CedarModel.ui);return o.content=n.ReaderUtil.getString(l,a.CedarModel.content),o}}t.JsonFieldReaderRichText=o},6029(e,t,r){t.JsonFieldWriterStaticRichText=void 0;const n=r(936),a=r(8053);class i extends a.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){null!==t.content&&(e[n.CedarModel.content]=t.content)}}t.JsonFieldWriterStaticRichText=i},9521(e,t,r){t.StaticRichTextFieldBuilderImpl=void 0;const n=r(3350),a=r(5548);class i extends n.TemplateFieldBuilder{content=null;constructor(){super()}static create(){return new i}withContent(e){return this.content=e,this}build(){const e=a.StaticRichTextFieldImpl.buildEmpty();return super.buildInternal(e),e.content=this.content,e}}t.StaticRichTextFieldBuilderImpl=i},5548(e,t,r){t.StaticRichTextFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(8290);class o extends n.TemplateField{content=null;constructor(){super(),this.cedarFieldType=a.CedarFieldType.STATIC_RICH_TEXT,this.cedarArtifactType=i.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticRichTextFieldImpl=o},1404(e,t,r){t.YamlFieldReaderRichText=void 0;const n=r(8748),a=r(5675),i=r(2099),s=r(5548);class o extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const o=s.StaticRichTextFieldImpl.buildEmpty();return o.content=n.ReaderUtil.getString(e,i.YamlKeys.content),o}}t.YamlFieldReaderRichText=o},6314(e,t,r){t.YamlFieldWriterStaticRichText=void 0;const n=r(9517),a=r(934),i=r(2099);class s extends a.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return null!==e.content?{[i.YamlKeys.content]:e.content}:n.JsonNode.getEmpty()}}t.YamlFieldWriterStaticRichText=s},6511(e,t,r){t.JsonFieldReaderSectionBreak=void 0;const n=r(4385),a=r(2546),i=r(936),s=r(8748);class o extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.StaticSectionBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(s.ReaderUtil.getNode(e,i.CedarModel.ui),i.CedarModel.content),o}}t.JsonFieldReaderSectionBreak=o},41(e,t,r){t.JsonFieldWriterStaticSectionsBreak=void 0;const n=r(8053),a=r(936);class i extends n.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){null!==t.content&&(e[a.CedarModel.content]=t.content)}}t.JsonFieldWriterStaticSectionsBreak=i},5795(e,t,r){t.StaticSectionBreakFieldBuilderImpl=void 0;const n=r(3350),a=r(2546);class i extends n.TemplateFieldBuilder{constructor(){super()}static create(){return new i}build(){const e=a.StaticSectionBreakFieldImpl.buildEmpty();return super.buildInternal(e),e}}t.StaticSectionBreakFieldBuilderImpl=i},2546(e,t,r){t.StaticSectionBreakFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(8290);class o extends n.TemplateField{content=null;constructor(){super(),this.cedarFieldType=a.CedarFieldType.STATIC_SECTION_BREAK,this.cedarArtifactType=i.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticSectionBreakFieldImpl=o},3980(e,t,r){t.YamlFieldReaderSectionBreak=void 0;const n=r(5675),a=r(2546),i=r(2099),s=r(8748);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.StaticSectionBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(e,i.YamlKeys.content),o}}t.YamlFieldReaderSectionBreak=o},6082(e,t,r){t.YAMLFieldWriterStaticSectionsBreak=void 0;const n=r(934),a=r(2099),i=r(9517);class s extends n.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return null!==e.content?{[a.YamlKeys.content]:e.content}:i.JsonNode.getEmpty()}}t.YAMLFieldWriterStaticSectionsBreak=s},8596(e,t,r){t.JsonFieldReaderYoutube=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(477);class o extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticYoutubeFieldImpl.buildEmpty(),l=n.ReaderUtil.getNode(e,a.CedarModel.ui);o.videoId=n.ReaderUtil.getString(l,a.CedarModel.content);const d=n.ReaderUtil.getNode(l,a.CedarModel.size);return o.width=n.ReaderUtil.getNumber(d,a.CedarModel.width),o.height=n.ReaderUtil.getNumber(d,a.CedarModel.height),o}}t.JsonFieldReaderYoutube=o},6766(e,t,r){t.JsonFieldWriterStaticYoutube=void 0;const n=r(9517),a=r(936),i=r(8053);class s extends i.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){if(null!==t.videoId&&(e[a.CedarModel.content]=t.videoId),null!==t.width||null!==t.height){const r=n.JsonNode.getEmpty();null!==t.width&&(r[a.CedarModel.width]=t.width),null!==t.height&&(r[a.CedarModel.height]=t.height),e[a.CedarModel.size]=r}}}t.JsonFieldWriterStaticYoutube=s},7674(e,t,r){t.StaticYoutubeFieldBuilderImpl=void 0;const n=r(3350),a=r(477);class i extends n.TemplateFieldBuilder{videoId=null;width=null;height=null;constructor(){super()}static create(){return new i}withVideoId(e){return this.videoId=e,this}withWidth(e){return this.width=e,this}withHeight(e){return this.height=e,this}build(){const e=a.StaticYoutubeFieldImpl.buildEmpty();return super.buildInternal(e),e.videoId=this.videoId,e.width=this.width,e.height=this.height,e}}t.StaticYoutubeFieldBuilderImpl=i},477(e,t,r){t.StaticYoutubeFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(8290);class o extends n.TemplateField{videoId=null;width=null;height=null;constructor(){super(),this.cedarFieldType=a.CedarFieldType.STATIC_YOUTUBE,this.cedarArtifactType=i.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticYoutubeFieldImpl=o},7089(e,t,r){t.YamlFieldReaderYoutube=void 0;const n=r(8748),a=r(5675),i=r(2099),s=r(477);class o extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const o=s.StaticYoutubeFieldImpl.buildEmpty();return o.videoId=n.ReaderUtil.getString(e,i.YamlKeys.content),o.width=n.ReaderUtil.getNumber(e,i.YamlKeys.width),o.height=n.ReaderUtil.getNumber(e,i.YamlKeys.height),o}}t.YamlFieldReaderYoutube=o},1903(e,t,r){t.YamlFieldWriterStaticYoutube=void 0;const n=r(9517),a=r(934),i=r(2099);class s extends a.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.videoId&&(t[i.YamlKeys.content]=e.videoId),t}expandSizeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.width&&(t[i.YamlKeys.width]=e.width),null!==e.height&&(t[i.YamlKeys.height]=e.height),t}}t.YamlFieldWriterStaticYoutube=s},4033(e,t,r){t.AttributeValueNamePolicy=void 0;const n=r(5588),a=r(9327),i=r(3644),s=r(7723);class o{constructor(){}static isReserved(e){return n.ReservedNames.isReservedName(e)}static findConflicts(e,t="template",r=!1){const n=[];return o.scanContainer(e,[],n,t,r),n}static locationOf(e){return"reservedField"===e.kind?[...e.path,e.groupName]:[...e.path,e.groupName,e.name]}static assertValid(e){const t=o.findConflicts(e)[0];if(void 0===t)return;const r=o.locationOf(t).join("/");if("reservedField"===t.kind)throw new Error(`Attribute-value field name "${t.name}" at /${r} is reserved for CEDAR instance metadata`);const n="reserved"===t.kind?"is reserved for instance metadata":"blank"===t.kind?"must not be blank":"sibling"===t.kind?"collides with another child in the same object":`is also used by attribute-value field "${t.conflictingGroupName}"`;throw new Error(`Attribute-value name "${t.name}" at /${r} ${n}`)}static scanContainer(e,t,r,a,i){for(const t of Object.keys(e.values))n.ReservedNames.requireChildName(t);const s=o.attributeValueGroups(e),l=new Set(s.map(e=>e.name)),d=new Set(s.filter(e=>e.unpacked).flatMap(e=>e.attributeNames)),c=new Set(Object.keys(e.values).filter(e=>!l.has(e)&&!d.has(e))),u=new Map;for(const e of s){n.ReservedNames.isReservedAttributeValueFieldName(e.name,a)&&r.push({kind:"reservedField",name:e.name,groupName:e.name,path:t});const s=new Set;for(const n of e.attributeNames){if(""===n.trim()){i&&r.push({kind:"blank",name:n,groupName:e.name,path:t});continue}o.isReserved(n)&&r.push({kind:"reserved",name:n,groupName:e.name,path:t}),(c.has(n)||l.has(n))&&r.push({kind:"sibling",name:n,groupName:e.name,path:t}),s.has(n)?r.push({kind:"duplicate",name:n,groupName:e.name,path:t,conflictingGroupName:e.name}):s.add(n);const a=u.get(n);void 0!==a&&a!==e.name?r.push({kind:"duplicate",name:n,groupName:e.name,path:t,conflictingGroupName:a}):u.set(n,e.name)}}for(const[n,a]of Object.entries(e.values))l.has(n)||d.has(n)||o.scanValue(a,[...t,n],r,i)}static scanValue(e,t,r,n){e instanceof s.InstanceDataContainer?o.scanContainer(e,t,r,"element",n):Array.isArray(e)&&e.forEach((e,a)=>o.scanValue(e,[...t,a],r,n))}static attributeValueGroups(e){const t=[];for(const[r,n]of Object.entries(e.values))if(n instanceof a.InstanceDataAttributeValueField)t.push({name:r,attributeNames:Object.keys(n.values),unpacked:!1});else if(Array.isArray(n)){const e=n.filter(e=>e instanceof i.InstanceDataAttributeValueFieldName).map(e=>e.name);e.length>0&&t.push({name:r,attributeNames:e,unpacked:!0})}return t}}t.AttributeValueNamePolicy=o},9327(e,t,r){t.InstanceDataAttributeValueField=void 0;const n=r(5588);t.InstanceDataAttributeValueField=class{_name;_values=Object.create(null);_iris;constructor(e){this._name=e,this._values=Object.create(null),this._iris=Object.create(null)}addValue(e,t){n.ReservedNames.requireChildName(e),this._values[e]=t}get name(){return this._name}get values(){return this._values}setIri(e,t){this._iris[e]=t}get iris(){return this._iris}}},3644(e,t){t.InstanceDataAttributeValueFieldName=void 0,t.InstanceDataAttributeValueFieldName=class{_name;constructor(e){this._name=e}get name(){return this._name}}},7723(e,t,r){t.InstanceDataContainer=void 0;const n=r(5588);t.InstanceDataContainer=class{_id=null;_values;_iris;constructor(){this._values=Object.create(null),this._iris=Object.create(null)}setValue(e,t){n.ReservedNames.requireChildName(e),this._values[e]=t}hasValue(e){return Object.hasOwn(this._values,e)}removeValue(e){delete this._values[e],delete this._iris[e]}get values(){return this._values}set values(e){for(const t of Object.keys(e))n.ReservedNames.requireChildName(t);this._values=Object.assign(Object.create(null),e)}setIri(e,t){this._iris[e]=t}hasIri(e){return Object.hasOwn(this._iris,e)}removeIri(e){delete this._iris[e]}get iris(){return this._iris}set id(e){this._id=e}get id(){return this._id}}},8193(e,t,r){t.InstanceDataControlledAtom=void 0;const n=r(7571);class a{language=null;preferredLabel=null;notation=null;_id;_type;_label;constructor(e,t,r,a=null){if(r!==n.PARSED_NODE&&((0,n.assertIri)(e,"InstanceDataControlledAtom"),null==t||""===t))throw new Error("InstanceDataControlledAtom requires a label. An IRI on its own is a link, not a controlled term.");this._id=e,this._type=r===n.PARSED_NODE?a:r??null,this._label=t}static fromParsedNode(e,t,r=null){return new a(e,t,n.PARSED_NODE,r)}get type(){return this._type}get id(){return this._id}get label(){return this._label}}t.InstanceDataControlledAtom=a},7548(e,t){t.InstanceDataEmptyAtom=void 0,t.InstanceDataEmptyAtom=class{_discarded;constructor(e=null){this._discarded=e}get discarded(){return this._discarded}hasDiscardedContent(){return null!==this._discarded&&Object.keys(this._discarded).length>0}}},4465(e,t){t.InstanceDataEmptyNode=void 0,t.InstanceDataEmptyNode=class{}},9167(e,t){t.InstanceDataLabelAtom=void 0,t.InstanceDataLabelAtom=class{label;type;language=null;preferredLabel=null;notation=null;constructor(e,t=null){this.label=e,this.type=t}}},7571(e,t){function r(e,t){if(null==e||""===e)throw new Error(`${t} requires an IRI. An IRI-valued field with nothing in it is an empty node, not a null IRI.`)}t.InstanceDataLinkAtom=t.PARSED_NODE=void 0,t.assertIri=r,t.PARSED_NODE=Symbol("parsed node");class n{language=null;preferredLabel=null;notation=null;_id;_type;constructor(e,n,a=null){n!==t.PARSED_NODE&&r(e,"InstanceDataLinkAtom"),this._id=e,this._type=n===t.PARSED_NODE?a:n??null}static fromParsedNode(e,r=null){return new n(e,t.PARSED_NODE,r)}get type(){return this._type}get id(){return this._id}}t.InstanceDataLinkAtom=n},1625(e,t){t.InstanceDataNotationAtom=void 0,t.InstanceDataNotationAtom=class{notation;type;language=null;preferredLabel=null;constructor(e,t=null){this.notation=e,this.type=t}}},5222(e,t){t.InstanceDataStringAtom=void 0,t.InstanceDataStringAtom=class{label;language=null;preferredLabel=null;notation=null;_value;constructor(e,t=null){this.label=t,this._value=e}get value(){return this._value}}},4877(e,t){t.InstanceDataTypedAtom=void 0,t.InstanceDataTypedAtom=class{label;language=null;preferredLabel=null;notation=null;_value;_type;constructor(e,t,r=null){if(this.label=r,null==t||""===t)throw new Error("InstanceDataTypedAtom requires a type. A literal with no declared type is an InstanceDataStringAtom.");this._value=e,this._type=t}get value(){return this._value}get type(){return this._type}}},9961(e,t,r){t.InstanceInflater=void 0;const n=r(9129),a=r(4869),i=r(1211),s=r(3567),o=r(5222),l=r(4877),d=r(7723),c=r(4465),u=r(2763),m=r(7661),p=r(513),h=r(3812);class f{constructor(){}static inflate(e,t,r="lowerBound"){return f.inflateContainer(e.dataContainer,t,r),e}static emptyField(e){return e.valueConstraints instanceof i.ValueConstraintsNumericField?new l.InstanceDataTypedAtom(null,e.valueConstraints.numberType.getValue()??"xsd:decimal"):e.valueConstraints instanceof s.ValueConstraintsTemporalField?new l.InstanceDataTypedAtom(null,e.valueConstraints.temporalType.getValue()??"xsd:dateTime"):[a.CedarFieldType.CONTROLLED_TERM,a.CedarFieldType.LINK,a.CedarFieldType.EXT_ROR,a.CedarFieldType.EXT_ORCID,a.CedarFieldType.EXT_PFAS,a.CedarFieldType.EXT_PUBMED,a.CedarFieldType.EXT_RRID,a.CedarFieldType.EXT_NIH_GRANT_ID,a.CedarFieldType.EXT_DOI].includes(e.cedarFieldType)?new c.InstanceDataEmptyNode:new o.InstanceDataStringAtom(null)}static startingOccurrences(e,t){if(e instanceof n.TemplateField&&e.cedarFieldType===a.CedarFieldType.ATTRIBUTE_VALUE)return[];const r=(t instanceof h.AbstractDynamicChildDeploymentInfo?t.minItems:null)??p.AbstractChildDeploymentInfo.defaultMinItems;return Array.from({length:r},()=>e instanceof m.TemplateElement?new d.InstanceDataContainer:e instanceof n.TemplateField?f.emptyField(e):new c.InstanceDataEmptyNode)}static inflateContainer(e,t,r){const a=t.getChildrenInfo(),i=a.getChildIriMap();Object.keys(i).forEach(t=>e.setIri(t,i[t]));const s={};a.getChildrenNames().forEach(a=>{const i=t.getChild(a);let o=e.values[a];if(void 0===o){if(t.getChildInfo(a)?.atType===u.CedarArtifactType.STATIC_TEMPLATE_FIELD)return;const e=t.getChildInfo(a);o=e?.isMultiInAnyWay()?"empty"===r?[]:f.startingOccurrences(i,e):i instanceof m.TemplateElement?new d.InstanceDataContainer:i instanceof n.TemplateField?f.emptyField(i):new c.InstanceDataEmptyNode}i instanceof m.TemplateElement&&(o instanceof d.InstanceDataContainer?f.inflateContainer(o,i,r):Array.isArray(o)&&o.forEach(e=>{e instanceof d.InstanceDataContainer&&f.inflateContainer(e,i,r)})),s[a]=o}),Object.keys(e.values).forEach(t=>{Object.hasOwn(s,t)||(s[t]=e.values[t])}),e.values=s}}t.InstanceInflater=f},8410(e,t,r){t.InstanceValidator=void 0;const n=r(7723),a=r(7548),i=r(4465),s=r(5222),o=r(4877),l=r(7571),d=r(8193),c=r(3812),u=r(7661),m=r(964),p=r(4074),h=r(4036),f=r(2888),y=r(9760),T=r(3188),C=r(2733),E=r(9034),g=r(9327),I=r(3644),A=r(4033),b=r(2763),R="InstanceValidator";class S{constructor(){}static validate(e,t){const r=new h.JsonArtifactParsingResult;return S.validateContainer(e.dataContainer,t,new T.JsonPath,r),r}static validateContainer(e,t,r,n){const a=t.getChildrenInfo(),i=t.cedarArtifactType===b.CedarArtifactType.TEMPLATE?"template":"element";for(const t of A.AttributeValueNamePolicy.findConflicts(e,i).filter(e=>0===e.path.length))n.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.VALUE_MISMATCH,r.add(...A.AttributeValueNamePolicy.locationOf(t)),"a unique, non-reserved attribute-value name",t.name));for(const[t,i]of S.attributeValueGroups(e))for(const e of i){const i=a.get(e);null!==i&&i.atType!==b.CedarArtifactType.STATIC_TEMPLATE_FIELD&&n.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.VALUE_MISMATCH,r.add(t,e),"a name different from every serializable template child",e))}for(const t of a.getChildrenNamesForRequiredInProperties())Object.hasOwn(e.values,t)||n.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,r.add(t),t));for(const i of a.getChildrenNames()){const s=a.get(i);if(s?.uiInputType===E.UiInputType.ATTRIBUTE_VALUE)continue;const o=e.values[i];void 0!==o&&S.validateChild(i,o,s,t.getChild(i),r.add(i),n)}}static attributeValueGroups(e){const t=[];for(const[r,n]of Object.entries(e.values))if(n instanceof g.InstanceDataAttributeValueField)t.push([r,Object.keys(n.values)]);else if(Array.isArray(n)){const e=n.filter(e=>e instanceof I.InstanceDataAttributeValueFieldName).map(e=>e.name??"").filter(e=>e.length>0);e.length>0&&t.push([r,e])}return t}static validateChild(e,t,r,n,a,i){const s=r?.isMultiInAnyWay()??!1,o=Array.isArray(t)?t:null,l=null!==o;if(s===l)return null!==o?(S.validateCardinality(o,r,a,i),void o.forEach((e,t)=>S.validateItem(e,n,a.add(t),i))):void S.validateItem(t,n,a,i);i.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.VALUE_MISMATCH,a,s?"a list of values":"a single value",l?"a list of values":"a single value"))}static validateCardinality(e,t,r,n){if(!(t instanceof c.AbstractDynamicChildDeploymentInfo))return;const{minItems:a,maxItems:i}=t;null!==a&&e.length<a&&n.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.MISSING_INDEX_IN_REAL_OBJECT,r,a,e.length)),null!==i&&e.length>i&&n.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.UNEXPECTED_INDEX_IN_REAL_OBJECT,r,i,e.length))}static validateItem(e,t,r,a){if(t instanceof u.TemplateElement)return void(e instanceof n.InstanceDataContainer?S.validateContainer(e,t,r,a):S.isEmpty(e)?S.validateContainer(new n.InstanceDataContainer,t,r,a):a.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.VALUE_MISMATCH,r,"an element","a field value")));S.validateIri(e,r,a);const i=S.declaredValueType(t);null!==i&&S.validateTypedValue(e,i,r,a)}static validateIri(e,t,r){(e instanceof l.InstanceDataLinkAtom||e instanceof d.InstanceDataControlledAtom)&&null===e.id&&r.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,t.add(C.JsonSchema.atId),"an IRI",null))}static declaredValueType(e){return e instanceof m.TemporalFieldImpl?e.valueConstraints.temporalType.getValue():e instanceof p.NumericFieldImpl?e.valueConstraints.numberType.getValue():null}static validateTypedValue(e,t,r,n){S.isEmpty(e)||(e instanceof o.InstanceDataTypedAtom?null!==e.value&&e.type!==t&&n.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.VALUE_MISMATCH,r.add(C.JsonSchema.atType),t,e.type??void 0)):e instanceof s.InstanceDataStringAtom&&null!==e.value&&n.addBlueprintComparisonError(new f.ComparisonError(R,y.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,r.add(C.JsonSchema.atType),t)))}static isEmpty(e){return e instanceof a.InstanceDataEmptyAtom||e instanceof i.InstanceDataEmptyNode||(e instanceof s.InstanceDataStringAtom||e instanceof o.InstanceDataTypedAtom)&&null===e.value}}t.InstanceValidator=S},2272(e,t,r){t.TemplateInstance=void 0;const n=r(2763),a=r(5697),i=r(7723);class s extends a.AbstractInstanceArtifact{dataContainer;descriptionWasAbsent=!1;constructor(){super(),this.cedarArtifactType=n.CedarArtifactType.TEMPLATE_INSTANCE,this.dataContainer=new i.InstanceDataContainer}static buildEmptyWithNullValues(){return new s}}t.TemplateInstance=s},4925(e,t,r){t.TemplateInstanceBuilder=void 0;const n=r(1641),a=r(2272),i=r(7723),s=r(8534);class o extends n.AbstractArtifactBuilder{schema_isBasedOn=s.CedarArtifactId.NULL;dataContainer=new i.InstanceDataContainer;withSchemaIsBasedOn(e){return e instanceof s.CedarArtifactId?this.schema_isBasedOn=e:this.schema_isBasedOn=s.CedarArtifactId.forValue(e),this}withDataValue(e,t){return this.dataContainer.setValue(e,t),this}withDataIri(e,t){return this.dataContainer.setIri(e,t),this}withDataId(e){return this.dataContainer.id=e,this}withDataContainer(e){return this.dataContainer=e,this}build(){const e=a.TemplateInstance.buildEmptyWithNullValues();return e.at_id=this.at_id,e.pav_createdOn=this.pav_createdOn,e.pav_createdBy=this.pav_createdBy,e.pav_lastUpdatedOn=this.pav_lastUpdatedOn,e.oslc_modifiedBy=this.oslc_modifiedBy,e.pav_derivedFrom=this.pav_derivedFrom,e.schema_name=this.schema_name,e.schema_description=this.schema_description,e.schema_isBasedOn=this.schema_isBasedOn,e.dataContainer=this.dataContainer,e}}t.TemplateInstanceBuilder=o},3281(e,t,r){t.Template=void 0;const n=r(3910),a=r(8557),i=r(1027),s=r(5451),o=r(2763);class l extends s.AbstractContainerArtifact{header=null;footer=null;constructor(){super(),this.cedarArtifactType=o.CedarArtifactType.TEMPLATE}static buildEmptyWithNullValues(){return new l}static buildEmptyWithDefaultValues(){const e=new l;return e.schema_schemaVersion=a.SchemaVersion.CURRENT,e.bibo_status=n.BiboStatus.DRAFT,e.pav_version=i.PavVersion.DEFAULT,e}isMultiInstanceByDefinition(){return!1}isSingleInstanceByDefinition(){return!1}createDeploymentBuilder(e){throw new Error("Method not supported.")}}t.Template=l},766(e,t,r){t.TemplateBuilder=void 0;const n=r(3281),a=r(1641);class i extends a.AbstractArtifactBuilder{header=null;footer=null;instanceTypeSpecification=null;children=[];withHeader(e){return this.header=e,this}withFooter(e){return this.footer=e,this}withInstanceTypeSpecification(e){return this.instanceTypeSpecification=e,this}addChild(e,t){return this.children.push([e,t]),this}build(){const e=n.Template.buildEmptyWithNullValues();return super.buildInternal(e),e.header=this.header,e.footer=this.footer,e.instanceTypeSpecification=this.instanceTypeSpecification,this.children.forEach(([t,r])=>{e.addChild(t,r)}),e}}t.TemplateBuilder=i},9517(e,t){t.JsonNode=void 0,t.JsonNode=class{static getEmpty(){return{}}static getEmptyList(){return[]}static hasEntries(e){return Object.keys(e).length>0}}},4531(e,t){t.BioportalTermType=t.BioportalTermTypeYamlValues=t.P=void 0,t.P={ONTOLOGY_CLASS:"OntologyClass",VALUE:"Value"},t.BioportalTermTypeYamlValues={ONTOLOGY_CLASS:"class",VALUE:"value"};class r{jsonValue;yamlValue;constructor(e,t){this.jsonValue=e,this.yamlValue=t}getJsonValue(){return this.jsonValue}getYamlValue(){return this.yamlValue}static ONTOLOGY_CLASS=new r(t.P.ONTOLOGY_CLASS,t.BioportalTermTypeYamlValues.ONTOLOGY_CLASS);static VALUE=new r(t.P.VALUE,t.BioportalTermTypeYamlValues.VALUE);static NULL=new r(null,null);static values(){return[r.ONTOLOGY_CLASS,r.VALUE]}static forJsonValue(e){for(const t of r.values())if(t.getJsonValue()===e)return t;return this.NULL}static forYamlValue(e){for(const t of r.values())if(t.getYamlValue()===e)return t;return this.NULL}}t.BioportalTermType=r},8534(e,t){t.CedarArtifactId=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static NULL=new r(null);static forValue(e){return null===e||""===e?r.NULL:new r(e)}}t.CedarArtifactId=r},2763(e,t){t.CedarArtifactType=t.df=t.KW=void 0,t.KW={TEMPLATE:"https://schema.metadatacenter.org/core/Template",TEMPLATE_ELEMENT:"https://schema.metadatacenter.org/core/TemplateElement",TEMPLATE_FIELD:"https://schema.metadatacenter.org/core/TemplateField",STATIC_TEMPLATE_FIELD:"https://schema.metadatacenter.org/core/StaticTemplateField",TEMPLATE_INSTANCE:"TemplateInstance"},t.df={TEMPLATE:"template",TEMPLATE_ELEMENT:"templateElement",TEMPLATE_FIELD:"templateField",STATIC_TEMPLATE_FIELD:"staticTemplateField",TEMPLATE_INSTANCE:"instance"};class r{value;yamlValue;constructor(e,t){this.value=e,this.yamlValue=t}getValue(){return this.value}getYamlValue(){return this.yamlValue}static TEMPLATE=new r(t.KW.TEMPLATE,t.df.TEMPLATE);static TEMPLATE_ELEMENT=new r(t.KW.TEMPLATE_ELEMENT,t.df.TEMPLATE_ELEMENT);static TEMPLATE_FIELD=new r(t.KW.TEMPLATE_FIELD,t.df.TEMPLATE_FIELD);static STATIC_TEMPLATE_FIELD=new r(t.KW.STATIC_TEMPLATE_FIELD,t.df.STATIC_TEMPLATE_FIELD);static TEMPLATE_INSTANCE=new r(t.KW.TEMPLATE_INSTANCE,t.df.TEMPLATE_INSTANCE);static NULL=new r(null,null);static values(){return[r.TEMPLATE,r.TEMPLATE_ELEMENT,r.TEMPLATE_FIELD,r.STATIC_TEMPLATE_FIELD,r.TEMPLATE_INSTANCE]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}static forYamlArtifactType(e){return e.isTemplate()?r.TEMPLATE:e.isElement()?r.TEMPLATE_ELEMENT:e.isDynamicField()?r.TEMPLATE_FIELD:e.isStaticField()?r.STATIC_TEMPLATE_FIELD:e.isTemplateInstance()?r.TEMPLATE_INSTANCE:r.NULL}}t.CedarArtifactType=r},8421(e,t){t.CedarFieldCategory=t.I=void 0,t.I={STATIC:"STATIC-field",DYNAMIC:"DYNAMIC-field",NONE:"NONE"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static values(){return[r.STATIC,r.DYNAMIC,r.NONE]}static STATIC=new r(t.I.STATIC);static DYNAMIC=new r(t.I.DYNAMIC);static NONE=new r(t.I.NONE);static NULL=new r(null)}t.CedarFieldCategory=r},4869(e,t,r){t.CedarFieldType=t.K=void 0;const n=r(9034),a=r(9499);t.K={TEXTFIELD:"DYNAMIC-textfield",TEXTAREA:"DYNAMIC-textarea",CONTROLLED_TERM:"DYNAMIC-controlled-term",LINK:"DYNAMIC-link",EXT_ROR:"DYNAMIC-ext-ror",EXT_ORCID:"DYNAMIC-ext-orcid",EXT_PFAS:"DYNAMIC-ext-pfas",EXT_PUBMED:"DYNAMIC-ext-pubmed",EXT_RRID:"DYNAMIC-ext-rrid",EXT_NIH_GRANT_ID:"DYNAMIC-ext-nih-grant-id",EXT_DOI:"DYNAMIC-ext-doi",TEMPORAL:"DYNAMIC-temporal",EMAIL:"DYNAMIC-email",NUMERIC:"DYNAMIC-numeric",PHONE_NUMBER:"DYNAMIC-phone-number",RADIO:"DYNAMIC-radio",CHECKBOX:"DYNAMIC-checkbox",SINGLE_SELECT_LIST:"DYNAMIC-single-select-list",MULTIPLE_SELECT_LIST:"DYNAMIC-multiple-select-list",ATTRIBUTE_VALUE:"DYNAMIC-attribute-value",STATIC_PAGE_BREAK:"STATIC-page-break",STATIC_SECTION_BREAK:"STATIC-section-break",STATIC_IMAGE:"STATIC-image",STATIC_RICH_TEXT:"STATIC-rich_text",STATIC_YOUTUBE:"STATIC-youtube"};class i{value;_uiInputType;_yamlType;staticField;constructor(e,t,r,n){this.value=e,this._uiInputType=t,this._yamlType=r,this.staticField=n}getValue(){return this.value}getUiInputType(){return this._uiInputType}getYamlType(){return this._yamlType}get isStaticField(){return this.staticField}get recordsRequirement(){return!this.staticField&&this.value!==t.K.ATTRIBUTE_VALUE}static values(){return[i.TEXT,i.TEXTAREA,i.CONTROLLED_TERM,i.LINK,i.EXT_ROR,i.EXT_ORCID,i.EXT_PFAS,i.EXT_PUBMED,i.EXT_RRID,i.EXT_NIH_GRANT_ID,i.EXT_DOI,i.TEMPORAL,i.EMAIL,i.NUMERIC,i.PHONE_NUMBER,i.RADIO,i.CHECKBOX,i.SINGLE_SELECT_LIST,i.MULTIPLE_SELECT_LIST,i.ATTRIBUTE_VALUE,i.STATIC_PAGE_BREAK,i.STATIC_SECTION_BREAK,i.STATIC_IMAGE,i.STATIC_RICH_TEXT,i.STATIC_YOUTUBE]}static TEXT=new i(t.K.TEXTFIELD,n.UiInputType.TEXTFIELD,a.YamlArtifactType.TEXTFIELD,!1);static TEXTAREA=new i(t.K.TEXTAREA,n.UiInputType.TEXTAREA,a.YamlArtifactType.TEXTAREA,!1);static CONTROLLED_TERM=new i(t.K.CONTROLLED_TERM,n.UiInputType.TEXTFIELD,a.YamlArtifactType.CONTROLLED_TERM,!1);static LINK=new i(t.K.LINK,n.UiInputType.LINK,a.YamlArtifactType.LINK,!1);static EXT_ROR=new i(t.K.EXT_ROR,n.UiInputType.EXT_ROR,a.YamlArtifactType.EXT_ROR,!1);static EXT_ORCID=new i(t.K.EXT_ORCID,n.UiInputType.EXT_ORCID,a.YamlArtifactType.EXT_ORCID,!1);static EXT_PFAS=new i(t.K.EXT_PFAS,n.UiInputType.EXT_PFAS,a.YamlArtifactType.EXT_PFAS,!1);static EXT_PUBMED=new i(t.K.EXT_PUBMED,n.UiInputType.EXT_PUBMED,a.YamlArtifactType.EXT_PUBMED,!1);static EXT_RRID=new i(t.K.EXT_RRID,n.UiInputType.EXT_RRID,a.YamlArtifactType.EXT_RRID,!1);static EXT_NIH_GRANT_ID=new i(t.K.EXT_NIH_GRANT_ID,n.UiInputType.EXT_NIH_GRANT_ID,a.YamlArtifactType.EXT_NIH_GRANT_ID,!1);static EXT_DOI=new i(t.K.EXT_DOI,n.UiInputType.EXT_DOI,a.YamlArtifactType.EXT_DOI,!1);static TEMPORAL=new i(t.K.TEMPORAL,n.UiInputType.TEMPORAL,a.YamlArtifactType.TEMPORAL,!1);static EMAIL=new i(t.K.EMAIL,n.UiInputType.EMAIL,a.YamlArtifactType.EMAIL,!1);static NUMERIC=new i(t.K.NUMERIC,n.UiInputType.NUMERIC,a.YamlArtifactType.NUMERIC,!1);static PHONE_NUMBER=new i(t.K.PHONE_NUMBER,n.UiInputType.PHONE_NUMBER,a.YamlArtifactType.PHONE_NUMBER,!1);static RADIO=new i(t.K.RADIO,n.UiInputType.RADIO,a.YamlArtifactType.RADIO,!1);static CHECKBOX=new i(t.K.CHECKBOX,n.UiInputType.CHECKBOX,a.YamlArtifactType.CHECKBOX,!1);static SINGLE_SELECT_LIST=new i(t.K.SINGLE_SELECT_LIST,n.UiInputType.LIST,a.YamlArtifactType.SINGLE_SELECT_LIST,!1);static MULTIPLE_SELECT_LIST=new i(t.K.MULTIPLE_SELECT_LIST,n.UiInputType.LIST,a.YamlArtifactType.MULTI_SELECT_LIST,!1);static ATTRIBUTE_VALUE=new i(t.K.ATTRIBUTE_VALUE,n.UiInputType.ATTRIBUTE_VALUE,a.YamlArtifactType.ATTRIBUTE_VALUE,!1);static STATIC_PAGE_BREAK=new i(t.K.STATIC_PAGE_BREAK,n.UiInputType.PAGE_BREAK,a.YamlArtifactType.PAGE_BREAK,!0);static STATIC_SECTION_BREAK=new i(t.K.STATIC_SECTION_BREAK,n.UiInputType.SECTION_BREAK,a.YamlArtifactType.SECTION_BREAK,!0);static STATIC_IMAGE=new i(t.K.STATIC_IMAGE,n.UiInputType.IMAGE,a.YamlArtifactType.IMAGE,!0);static STATIC_RICH_TEXT=new i(t.K.STATIC_RICH_TEXT,n.UiInputType.RICH_TEXT,a.YamlArtifactType.RICH_TEXT,!0);static STATIC_YOUTUBE=new i(t.K.STATIC_YOUTUBE,n.UiInputType.YOUTUBE,a.YamlArtifactType.YOUTUBE,!0);static NULL=new i(null,n.UiInputType.NULL,a.YamlArtifactType.NULL,!0);static forUiInputType(e){for(const t of i.values())if(t.getUiInputType()===e)return t;return this.NULL}static forYamlArtifactType(e){for(const t of i.values())if(t.getYamlType()===e)return t;return this.NULL}}t.CedarFieldType=i},2234(e,t){t.CedarUser=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static NULL=new r(null);static forValue(e){return null===e?r.NULL:new r(e)}}t.CedarUser=r},3746(e,t){t.AdditionalProperties=t.P=void 0,t.P={FALSE:"false",ALLOW_ATTRIBUTE_VALUE:"allow-attribute-value"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static FALSE=new r(t.P.FALSE);static ALLOW_ATTRIBUTE_VALUE=new r(t.P.ALLOW_ATTRIBUTE_VALUE);static NULL=new r(null);static values(){return[r.FALSE,r.ALLOW_ATTRIBUTE_VALUE]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.AdditionalProperties=r},2475(e,t){t.ArtifactSchema=t.T=void 0,t.T={CURRENT:"http://json-schema.org/draft-04/schema#"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static CURRENT=new r(t.T.CURRENT);static NULL=new r(null);static forValue(e){return new r(null===e?t.T.CURRENT:e)}}t.ArtifactSchema=r},3910(e,t){t.BiboStatus=t.BiboStatusYamlValues=t.l=void 0,t.l={DRAFT:"bibo:draft",PUBLISHED:"bibo:published"},t.BiboStatusYamlValues={DRAFT:"draft",PUBLISHED:"published"};class r{jsonValue;yamlValue;constructor(e,t){this.jsonValue=e,this.yamlValue=t}getJsonValue(){return this.jsonValue}getYamlValue(){return this.yamlValue}static DRAFT=new r(t.l.DRAFT,t.BiboStatusYamlValues.DRAFT);static PUBLISHED=new r(t.l.PUBLISHED,t.BiboStatusYamlValues.PUBLISHED);static NULL=new r(null,null);static values(){return[r.DRAFT,r.PUBLISHED]}static forJsonValue(e){for(const t of r.values())if(t.getJsonValue()===e)return t;return this.NULL}static forYamlValue(e){for(const t of r.values())if(t.getYamlValue()===e)return t;return this.NULL}}t.BiboStatus=r},8802(e,t){t.Iri=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static empty(){return new r("")}isEmpty(){return""===this.value}}t.Iri=r},9857(e,t){t.IsoDate=void 0;class r{date;timezoneOffset;constructor(e,t){this.date=e,this.timezoneOffset=t}static NULL=new r(null,null);getValue(){if(null!=this.date){if("Z"===this.timezoneOffset)return this.date.toISOString().replace(/\.\d{3}Z$/,"Z");const e=this.timezoneOffset.match(/([+-])(\d{2}):(\d{2})/);if(e){const t="+"===e[1]?1:-1,r=parseInt(e[2],10)*t,n=parseInt(e[3],10)*t,a=this.date.getTime(),i=new Date(a+60*(60*r+n)*1e3),s=i.getUTCFullYear(),o=i.getUTCMonth()+1,l=i.getUTCDate(),d=i.getUTCHours(),c=i.getUTCMinutes(),u=i.getUTCSeconds();return`${s}-${o.toString().padStart(2,"0")}-${l.toString().padStart(2,"0")}T${d.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}${this.timezoneOffset}`}return null}return null}static forValue(e){if(!e)return r.NULL;e=e.replace(/([+-]\d{2})(\d{2})$/,"$1:$2");const t=e.match(/Z|([+-])([01]\d):?([0-5]\d)$/)?.[0]??"Z",n=new Date("Z"!==t||e.endsWith("Z")?e:`${e}Z`);return new r(n,t)}static now(){const e=new Date,t=this.getCurrentGMTOffset();return new r(e,t)}static getCurrentGMTOffset(){const e=(new Date).getTimezoneOffset(),t=Math.abs(e),r=t%60;return`${e>0?"-":"+"}${Math.floor(t/60).toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}}t.IsoDate=r},5793(e,t){t.JavascriptType=t.W=void 0,t.W={ARRAY:"array",OBJECT:"object",STRING:"string"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static ARRAY=new r(t.W.ARRAY);static OBJECT=new r(t.W.OBJECT);static STRING=new r(t.W.STRING);static NULL=new r(null);static values(){return[r.ARRAY,r.OBJECT,r.STRING]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.JavascriptType=r},7752(e,t){t.Language=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static NULL=new r(null);static forValue(e){return null===e||""===e?r.NULL:new r(e)}}t.Language=r},3447(e,t){t.NumberType=t.NumberTypeValues=void 0,t.NumberTypeValues={DECIMAL:"xsd:decimal",INT:"xsd:int",LONG:"xsd:long",BYTE:"xsd:byte",SHORT:"xsd:short",FLOAT:"xsd:float",DOUBLE:"xsd:double"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static DECIMAL=new r(t.NumberTypeValues.DECIMAL);static INT=new r(t.NumberTypeValues.INT);static LONG=new r(t.NumberTypeValues.LONG);static BYTE=new r(t.NumberTypeValues.BYTE);static SHORT=new r(t.NumberTypeValues.SHORT);static FLOAT=new r(t.NumberTypeValues.FLOAT);static DOUBLE=new r(t.NumberTypeValues.DOUBLE);static NULL=new r(null);static values(){return[r.DECIMAL,r.INT,r.LONG,r.BYTE,r.SHORT,r.FLOAT,r.DOUBLE]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.NumberType=r},1027(e,t,r){t.PavVersion=t.o=void 0;const n=r(4506);t.o={DEFAULT:"0.0.1"};class a extends n.SemVer{static DEFAULT=new a(t.o.DEFAULT);static NULL=new a(null);static values(){return[a.DEFAULT,a.NULL]}static forValue(e){for(const t of a.values())if(t.getValue()===e)return t;return new a(e)}}t.PavVersion=a},6389(e,t,r){t.PropertyIri=void 0;const n=r(936);t.PropertyIri=class{static get namespace(){return n.CedarModel.propertyIriPrefix}}},8557(e,t,r){t.SchemaVersion=t.y=void 0;const n=r(4506);t.y={CURRENT:"1.6.0"};class a extends n.SemVer{static CURRENT=new a(t.y.CURRENT);static NULL=new a(null);static values(){return[a.CURRENT]}static forValue(e){for(const t of a.values())if(t.getValue()===e)return t;return new a(e)}}t.SchemaVersion=a},4506(e,t){t.SemVer=void 0,t.SemVer=class{value;constructor(e){this.value=this.validateVersion(e)}getValue(){return this.value}validateVersion(e){if(null===e)return e;const t=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.exec(e);if(null===t||t.slice(1).some(e=>e.length>10||Number(e)>2147483647))throw new Error(`Invalid version "${e}": expected three numbers without leading zeros, separated by periods.`);if("0.0.0"===e)throw new Error('Invalid version "0.0.0": a version is not all zeros.');return e}}},7974(e,t){t.TemporalGranularity=t.TemporalGranularityValues=void 0,t.TemporalGranularityValues={YEAR:"year",MONTH:"month",DAY:"day",HOUR:"hour",MINUTE:"minute",SECOND:"second",DECIMAL_SECOND:"decimalSecond"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static YEAR=new r(t.TemporalGranularityValues.YEAR);static MONTH=new r(t.TemporalGranularityValues.MONTH);static DAY=new r(t.TemporalGranularityValues.DAY);static HOUR=new r(t.TemporalGranularityValues.HOUR);static MINUTE=new r(t.TemporalGranularityValues.MINUTE);static SECOND=new r(t.TemporalGranularityValues.SECOND);static DECIMAL_SECOND=new r(t.TemporalGranularityValues.DECIMAL_SECOND);static NULL=new r(null);static values(){return[r.YEAR,r.MONTH,r.DAY,r.HOUR,r.MINUTE,r.SECOND,r.DECIMAL_SECOND]}static valuesWithTimes(){return[r.HOUR,r.MINUTE,r.SECOND,r.DECIMAL_SECOND]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}static hasTime(e){return this.valuesWithTimes().includes(e)}}t.TemporalGranularity=r},8588(e,t){t.TemporalType=t.TemporalTypeValues=void 0,t.TemporalTypeValues={DATE:"xsd:date",TIME:"xsd:time",DATETIME:"xsd:dateTime"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static DATE=new r(t.TemporalTypeValues.DATE);static TIME=new r(t.TemporalTypeValues.TIME);static DATETIME=new r(t.TemporalTypeValues.DATETIME);static NULL=new r(null);static values(){return[r.DATE,r.TIME,r.DATETIME]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.TemporalType=r},3764(e,t){t.TimeFormat=t.TimeFormatValues=void 0,t.TimeFormatValues={H24:"24h",H12:"12h"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static H24=new r(t.TimeFormatValues.H24);static H12=new r(t.TimeFormatValues.H12);static NULL=new r(null);static values(){return[r.H24,r.H12]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.TimeFormat=r},9034(e,t){t.UiInputType=t.F=void 0,t.F={TEXTFIELD:"textfield",TEXTAREA:"textarea",LINK:"link",EXT_ROR:"ext-ror",EXT_ORCID:"ext-orcid",EXT_PFAS:"ext-pfas",EXT_PUBMED:"ext-pubmed",EXT_RRID:"ext-rrid",EXT_NIH_GRANT_ID:"ext-nih-grant-id",EXT_DOI:"ext-doi",TEMPORAL:"temporal",EMAIL:"email",NUMERIC:"numeric",PHONE_NUMBER:"phone-number",LIST:"list",CHECKBOX:"checkbox",RADIO:"radio",ATTRIBUTE_VALUE:"attribute-value",PAGE_BREAK:"page-break",SECTION_BREAK:"section-break",IMAGE:"image",RICH_TEXT:"richtext",YOUTUBE:"youtube"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static TEXTFIELD=new r(t.F.TEXTFIELD);static TEXTAREA=new r(t.F.TEXTAREA);static LINK=new r(t.F.LINK);static EXT_ROR=new r(t.F.EXT_ROR);static EXT_ORCID=new r(t.F.EXT_ORCID);static EXT_PFAS=new r(t.F.EXT_PFAS);static EXT_PUBMED=new r(t.F.EXT_PUBMED);static EXT_RRID=new r(t.F.EXT_RRID);static EXT_NIH_GRANT_ID=new r(t.F.EXT_NIH_GRANT_ID);static EXT_DOI=new r(t.F.EXT_DOI);static TEMPORAL=new r(t.F.TEMPORAL);static EMAIL=new r(t.F.EMAIL);static NUMERIC=new r(t.F.NUMERIC);static PHONE_NUMBER=new r(t.F.PHONE_NUMBER);static LIST=new r(t.F.LIST);static CHECKBOX=new r(t.F.CHECKBOX);static RADIO=new r(t.F.RADIO);static ATTRIBUTE_VALUE=new r(t.F.ATTRIBUTE_VALUE);static PAGE_BREAK=new r(t.F.PAGE_BREAK);static SECTION_BREAK=new r(t.F.SECTION_BREAK);static IMAGE=new r(t.F.IMAGE);static RICH_TEXT=new r(t.F.RICH_TEXT);static YOUTUBE=new r(t.F.YOUTUBE);static NULL=new r(null);static values(){return[r.TEXTFIELD,r.TEXTAREA,r.LINK,r.EXT_ROR,r.EXT_ORCID,r.EXT_PFAS,r.EXT_PUBMED,r.EXT_RRID,r.EXT_NIH_GRANT_ID,r.EXT_DOI,r.TEMPORAL,r.EMAIL,r.NUMERIC,r.PHONE_NUMBER,r.LIST,r.CHECKBOX,r.RADIO,r.ATTRIBUTE_VALUE,r.PAGE_BREAK,r.SECTION_BREAK,r.IMAGE,r.RICH_TEXT,r.YOUTUBE,r.NULL]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.UiInputType=r},9499(e,t,r){t.YamlArtifactType=t.YamlArtifactTypeValues=void 0;const n=r(8421);t.YamlArtifactTypeValues={TEMPLATE:"template",ELEMENT:"element",TEXTFIELD:"text-field",CONTROLLED_TERM:"controlled-term-field",TEXTAREA:"text-area-field",LINK:"link-field",EXT_ROR:"ext-ror-field",EXT_ORCID:"ext-orcid-field",EXT_PFAS:"ext-pfas-field",EXT_PUBMED:"ext-pubmed-field",EXT_RRID:"ext-rrid-field",EXT_NIH_GRANT_ID:"ext-nih-grant-id-field",EXT_DOI:"ext-doi-field",TEMPORAL:"temporal-field",EMAIL:"email-field",NUMERIC:"numeric-field",PHONE_NUMBER:"phone-number-field",SINGLE_SELECT_LIST:"single-select-list-field",MULTI_SELECT_LIST:"multi-select-list-field",CHECKBOX:"checkbox-field",RADIO:"radio-field",ATTRIBUTE_VALUE:"attribute-value-field",PAGE_BREAK:"static-page-break",SECTION_BREAK:"static-section-break",IMAGE:"static-image",RICH_TEXT:"static-rich-text",YOUTUBE:"static-youtube-video",TEMPLATE_INSTANCE:"instance"};class a{value;category;constructor(e,t){this.value=e,this.category=t}getValue(){return this.value}static TEMPLATE=new a(t.YamlArtifactTypeValues.TEMPLATE,n.CedarFieldCategory.NONE);static ELEMENT=new a(t.YamlArtifactTypeValues.ELEMENT,n.CedarFieldCategory.NONE);static TEXTFIELD=new a(t.YamlArtifactTypeValues.TEXTFIELD,n.CedarFieldCategory.DYNAMIC);static CONTROLLED_TERM=new a(t.YamlArtifactTypeValues.CONTROLLED_TERM,n.CedarFieldCategory.DYNAMIC);static TEXTAREA=new a(t.YamlArtifactTypeValues.TEXTAREA,n.CedarFieldCategory.DYNAMIC);static LINK=new a(t.YamlArtifactTypeValues.LINK,n.CedarFieldCategory.DYNAMIC);static EXT_ROR=new a(t.YamlArtifactTypeValues.EXT_ROR,n.CedarFieldCategory.DYNAMIC);static EXT_ORCID=new a(t.YamlArtifactTypeValues.EXT_ORCID,n.CedarFieldCategory.DYNAMIC);static EXT_PFAS=new a(t.YamlArtifactTypeValues.EXT_PFAS,n.CedarFieldCategory.DYNAMIC);static EXT_PUBMED=new a(t.YamlArtifactTypeValues.EXT_PUBMED,n.CedarFieldCategory.DYNAMIC);static EXT_RRID=new a(t.YamlArtifactTypeValues.EXT_RRID,n.CedarFieldCategory.DYNAMIC);static EXT_NIH_GRANT_ID=new a(t.YamlArtifactTypeValues.EXT_NIH_GRANT_ID,n.CedarFieldCategory.DYNAMIC);static EXT_DOI=new a(t.YamlArtifactTypeValues.EXT_DOI,n.CedarFieldCategory.DYNAMIC);static TEMPORAL=new a(t.YamlArtifactTypeValues.TEMPORAL,n.CedarFieldCategory.DYNAMIC);static EMAIL=new a(t.YamlArtifactTypeValues.EMAIL,n.CedarFieldCategory.DYNAMIC);static NUMERIC=new a(t.YamlArtifactTypeValues.NUMERIC,n.CedarFieldCategory.DYNAMIC);static PHONE_NUMBER=new a(t.YamlArtifactTypeValues.PHONE_NUMBER,n.CedarFieldCategory.DYNAMIC);static SINGLE_SELECT_LIST=new a(t.YamlArtifactTypeValues.SINGLE_SELECT_LIST,n.CedarFieldCategory.DYNAMIC);static MULTI_SELECT_LIST=new a(t.YamlArtifactTypeValues.MULTI_SELECT_LIST,n.CedarFieldCategory.DYNAMIC);static CHECKBOX=new a(t.YamlArtifactTypeValues.CHECKBOX,n.CedarFieldCategory.DYNAMIC);static RADIO=new a(t.YamlArtifactTypeValues.RADIO,n.CedarFieldCategory.DYNAMIC);static ATTRIBUTE_VALUE=new a(t.YamlArtifactTypeValues.ATTRIBUTE_VALUE,n.CedarFieldCategory.DYNAMIC);static PAGE_BREAK=new a(t.YamlArtifactTypeValues.PAGE_BREAK,n.CedarFieldCategory.STATIC);static SECTION_BREAK=new a(t.YamlArtifactTypeValues.SECTION_BREAK,n.CedarFieldCategory.STATIC);static IMAGE=new a(t.YamlArtifactTypeValues.IMAGE,n.CedarFieldCategory.STATIC);static RICH_TEXT=new a(t.YamlArtifactTypeValues.RICH_TEXT,n.CedarFieldCategory.STATIC);static YOUTUBE=new a(t.YamlArtifactTypeValues.YOUTUBE,n.CedarFieldCategory.STATIC);static TEMPLATE_INSTANCE=new a(t.YamlArtifactTypeValues.TEMPLATE_INSTANCE,n.CedarFieldCategory.NONE);static NULL=new a(null,n.CedarFieldCategory.NULL);static values(){return[a.TEMPLATE,a.ELEMENT,a.TEXTFIELD,a.CONTROLLED_TERM,a.TEXTAREA,a.LINK,a.EXT_ROR,a.EXT_ORCID,a.EXT_PFAS,a.EXT_PUBMED,a.EXT_RRID,a.EXT_NIH_GRANT_ID,a.EXT_DOI,a.TEMPORAL,a.EMAIL,a.NUMERIC,a.PHONE_NUMBER,a.SINGLE_SELECT_LIST,a.MULTI_SELECT_LIST,a.CHECKBOX,a.RADIO,a.ATTRIBUTE_VALUE,a.PAGE_BREAK,a.SECTION_BREAK,a.IMAGE,a.RICH_TEXT,a.YOUTUBE,a.TEMPLATE_INSTANCE,a.NULL]}static forValue(e){for(const t of a.values())if(t.getValue()===e)return t;return this.NULL}isTemplate(){return this.value===t.YamlArtifactTypeValues.TEMPLATE}isElement(){return this.value===t.YamlArtifactTypeValues.ELEMENT}isField(){return this.isDynamicField()||this.isStaticField()}isStaticField(){return this.category===n.CedarFieldCategory.STATIC}isDynamicField(){return this.category===n.CedarFieldCategory.DYNAMIC}isTemplateInstance(){return this.value===t.YamlArtifactTypeValues.TEMPLATE_INSTANCE}}t.YamlArtifactType=a},2888(e,t){t.ComparisonError=void 0,t.ComparisonError=class{errorLocation;errorType;errorPath;expectedValue;encounteredValue;stackTopLines;constructor(e,t,r,n,a){this.errorLocation=e,this.errorType=t,this.errorPath=r,this.expectedValue=n,this.encounteredValue=a}}},9760(e,t){t.ComparisonErrorType=t.e=void 0,t.e={MISSING_KEY_IN_REAL_OBJECT:"missingKeyInRealObject",UNEXPECTED_KEY_IN_REAL_OBJECT:"unexpectedKeyInRealObject",VALUE_MISMATCH:"valueMismatch",MISSING_INDEX_IN_REAL_OBJECT:"missingIndexInRealObject",UNEXPECTED_INDEX_IN_REAL_OBJECT:"unexpectedIndexInRealObject",MISSING_VALUE_IN_REAL_OBJECT:"missingValueInRealObject",UNEXPECTED_VALUE_IN_REAL_OBJECT:"unexpectedValueInRealObject"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static MISSING_KEY_IN_REAL_OBJECT=new r(t.e.MISSING_KEY_IN_REAL_OBJECT);static UNEXPECTED_KEY_IN_REAL_OBJECT=new r(t.e.UNEXPECTED_KEY_IN_REAL_OBJECT);static VALUE_MISMATCH=new r(t.e.VALUE_MISMATCH);static MISSING_INDEX_IN_REAL_OBJECT=new r(t.e.MISSING_INDEX_IN_REAL_OBJECT);static UNEXPECTED_INDEX_IN_REAL_OBJECT=new r(t.e.UNEXPECTED_INDEX_IN_REAL_OBJECT);static MISSING_VALUE_IN_REAL_OBJECT=new r(t.e.MISSING_VALUE_IN_REAL_OBJECT);static UNEXPECTED_VALUE_IN_REAL_OBJECT=new r(t.e.UNEXPECTED_VALUE_IN_REAL_OBJECT);static NULL=new r(null);static values(){return[r.MISSING_KEY_IN_REAL_OBJECT,r.UNEXPECTED_KEY_IN_REAL_OBJECT,r.VALUE_MISMATCH,r.MISSING_INDEX_IN_REAL_OBJECT,r.UNEXPECTED_INDEX_IN_REAL_OBJECT,r.MISSING_VALUE_IN_REAL_OBJECT,r.UNEXPECTED_VALUE_IN_REAL_OBJECT]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}toJSON(){return this.value}}t.ComparisonErrorType=r},4325(e,t){t.ComparisonResult=void 0,t.ComparisonResult=class{comparisonErrors=[];comparisonWarnings=[];addComparisonError(e){this.comparisonErrors.push(e)}getComparisonErrors(){return this.comparisonErrors}getComparisonErrorCount(){return this.comparisonErrors.length}addComparisonWarning(e){this.comparisonWarnings.push(e)}getComparisonWarnings(){return this.comparisonWarnings}getComparisonWarningCount(){return this.comparisonWarnings.length}areEqual(){return 0===this.comparisonErrors.length&&0===this.comparisonWarnings.length}merge(e){this.comparisonErrors.push(...e.comparisonErrors),this.comparisonWarnings.push(...e.comparisonWarnings)}}},4036(e,t){t.JsonArtifactParsingResult=void 0,t.JsonArtifactParsingResult=class{blueprintComparisonErrors=[];blueprintComparisonWarnings=[];addBlueprintComparisonError(e){this.blueprintComparisonErrors.push(e)}getBlueprintComparisonErrors(){return this.blueprintComparisonErrors}getBlueprintComparisonErrorCount(){return this.blueprintComparisonErrors.length}addBlueprintComparisonWarning(e){this.blueprintComparisonWarnings.push(e)}getBlueprintComparisonWarnings(){return this.blueprintComparisonWarnings}getBlueprintComparisonWarningCount(){return this.blueprintComparisonWarnings.length}wasSuccessful(){return 0===this.blueprintComparisonErrors.length}adheresToBlueprint(){return 0===this.blueprintComparisonErrors.length&&0===this.blueprintComparisonWarnings.length}merge(e){this.blueprintComparisonErrors.push(...e.blueprintComparisonErrors),this.blueprintComparisonWarnings.push(...e.blueprintComparisonWarnings)}}},3056(e,t,r){t.JsonObjectComparator=void 0;const n=r(2888),a=r(3188),i=r(9760),s=r(5747),o=r(2733),l=r(936);class d{static compareBothWays(e,t,r,s,c,u=[]){!function t(r,s,m){const p=r.getLastComponent()==o.JsonSchema.required;if(Array.isArray(s)&&Array.isArray(m))if(p){const t=new Set(s),a=new Set(m);s.forEach((t,s)=>{const o=r.add(s);a.has(t)||e.addBlueprintComparisonError(new n.ComparisonError("oca01",i.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,o,t))}),m.forEach((a,s)=>{const o=r.add(s);t.has(a)||e.addBlueprintComparisonError(new n.ComparisonError("oca02",i.ComparisonErrorType.UNEXPECTED_VALUE_IN_REAL_OBJECT,o,void 0,a))})}else{const a=Math.max(s.length,m.length);for(let o=0;o<a;o++){const a=r.add(o);o in s?o in m?"object"==typeof s[o]&&null!==s[o]&&"object"==typeof m[o]&&null!==m[o]?t(a,s[o],m[o]):s[o]!==m[o]&&e.addBlueprintComparisonError(new n.ComparisonError("ocl03",i.ComparisonErrorType.VALUE_MISMATCH,a,s[o],m[o])):e.addBlueprintComparisonError(new n.ComparisonError("ocl02",i.ComparisonErrorType.MISSING_INDEX_IN_REAL_OBJECT,a,s[o])):e.addBlueprintComparisonError(new n.ComparisonError("ocl01",i.ComparisonErrorType.UNEXPECTED_INDEX_IN_REAL_OBJECT,a,void 0,m[o]))}}else new Set([...Object.keys(s),...Object.keys(m)]).forEach(p=>{const h=r.add(p);if(p in s)if(p in m){if("object"==typeof s[p]&&null!==s[p]&&"object"==typeof m[p]&&null!==m[p])t(h,s[p],m[p]);else if(s[p]!==m[p]){const t=new n.ComparisonError("oco03",i.ComparisonErrorType.VALUE_MISMATCH,h,s[p],m[p]);c.useWarningForKnownIssues()&&d.isKnownProductionVariation(h)?e.addBlueprintComparisonWarning(t):e.addBlueprintComparisonError(t)}}else c.useWarningForKnownIssues()&&(h.endsIn(l.CedarModel.literals,a.JsonPath.ANY,l.CedarModel.selectedByDefault)||h.endsIn(l.CedarModel.ui,l.CedarModel.pages)||d.isKnownProductionVariation(h))?e.addBlueprintComparisonWarning(new n.ComparisonError("wco02",i.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,h)):e.addBlueprintComparisonError(new n.ComparisonError("oco02",i.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,h));else c.useWarningForKnownIssues()&&(h.endsIn(o.JsonSchema.properties,o.JsonSchema.atLanguage)||d.isKnownProductionVariation(h))?e.addBlueprintComparisonWarning(new n.ComparisonError("wco01",i.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,h)):u.includes(p)||e.addBlueprintComparisonError(new n.ComparisonError("oco01",i.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,h))})}(s,t,r)}static isKnownProductionVariation(e){return e.endsIn(o.JsonSchema.atContext,s.TemplateProperty.additionalProperties)||e.endsIn(o.JsonSchema.atContext,o.JsonSchema.properties,a.JsonPath.ANY,l.CedarModel.enum,a.JsonPath.ANY)||e.endsIn(o.JsonSchema.atContext,o.JsonSchema.required,a.JsonPath.ANY)||e.endsIn(o.JsonSchema.atContext,a.JsonPath.ANY)||e.endsIn(l.CedarModel.ui,l.CedarModel.propertyDescriptions,a.JsonPath.ANY)||e.endsIn(l.CedarModel.ui,l.CedarModel.propertyDescriptions)||e.endsIn(l.CedarModel.ui,l.CedarModel.propertyLabels)||e.endsIn(o.JsonSchema.properties,a.JsonPath.ANY,l.CedarModel.enum,a.JsonPath.ANY)||e.endsIn(o.JsonSchema.required)}static reportToLeft(e,t,r){t.useWarningForKnownIssues()&&d.isKnownProductionVariation(r.errorPath)?e.addBlueprintComparisonWarning(r):e.addBlueprintComparisonError(r)}static compareToLeft(e,t,r,a,s){!function t(r,a,l){const c=r.getLastComponent()==o.JsonSchema.required;if(Array.isArray(a)&&Array.isArray(l))if(c){const t=new Set(l);a.forEach((a,o)=>{const l=r.add(o);t.has(a)||d.reportToLeft(e,s,new n.ComparisonError("ola01",i.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,l,a))})}else a.forEach((o,c)=>{const u=r.add(c);c in l?"object"==typeof o&&null!==o&&"object"==typeof l[c]&&null!==l[c]?t(u,o,l[c]):o!==l[c]&&d.reportToLeft(e,s,new n.ComparisonError("oll02",i.ComparisonErrorType.VALUE_MISMATCH,u,o,l[c])):d.reportToLeft(e,s,new n.ComparisonError("oll01",i.ComparisonErrorType.MISSING_INDEX_IN_REAL_OBJECT,u,a[c]))});else Object.keys(a).forEach(o=>{const c=r.add(o);o in l?"object"==typeof a[o]&&null!==a[o]&&"object"==typeof l[o]&&null!==l[o]?t(c,a[o],l[o]):a[o]!==l[o]&&d.reportToLeft(e,s,new n.ComparisonError("olo02",i.ComparisonErrorType.VALUE_MISMATCH,c,a[o],l[o])):d.reportToLeft(e,s,new n.ComparisonError("olo01",i.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,c))})}(a,t,r)}static comparePrimitive(e,t,r,a){return t!==r&&e.addBlueprintComparisonError(new n.ComparisonError("opp1",i.ComparisonErrorType.VALUE_MISMATCH,a,t,r)),e}}t.JsonObjectComparator=d},1591(e,t){t.YamlArtifactParsingResult=void 0,t.YamlArtifactParsingResult=class{blueprintComparisonErrors=[];blueprintComparisonWarnings=[];addBlueprintComparisonError(e){this.blueprintComparisonErrors.push(e)}getBlueprintComparisonErrors(){return this.blueprintComparisonErrors}getBlueprintComparisonErrorCount(){return this.blueprintComparisonErrors.length}addBlueprintComparisonWarning(e){this.blueprintComparisonWarnings.push(e)}getBlueprintComparisonWarnings(){return this.blueprintComparisonWarnings}getBlueprintComparisonWarningCount(){return this.blueprintComparisonWarnings.length}wasSuccessful(){return 0===this.blueprintComparisonErrors.length}adheresToBlueprint(){return 0===this.blueprintComparisonErrors.length&&0===this.blueprintComparisonWarnings.length}merge(e){this.blueprintComparisonErrors.push(...e.blueprintComparisonErrors),this.blueprintComparisonWarnings.push(...e.blueprintComparisonWarnings)}}},6109(e,t){t.YamlComparisonErrorType=t.H=void 0,t.H={MISSING_KEY_IN_RIGHT_OBJECT:"missingKeyInRightObject",UNEXPECTED_KEY_IN_RIGHT_OBJECT:"unexpectedKeyInRightObject",VALUE_MISMATCH:"valueMismatch",MISSING_INDEX_IN_RIGHT_OBJECT:"missingIndexInRightObject",UNEXPECTED_INDEX_IN_RIGHT_OBJECT:"unexpectedIndexInRightObject",MISSING_VALUE_IN_RIGHT_OBJECT:"missingValueInRightObject",UNEXPECTED_VALUE_IN_RIGHT_OBJECT:"unexpectedValueInRightObject"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static MISSING_KEY_IN_RIGHT_OBJECT=new r(t.H.MISSING_KEY_IN_RIGHT_OBJECT);static UNEXPECTED_KEY_IN_RIGHT_OBJECT=new r(t.H.UNEXPECTED_KEY_IN_RIGHT_OBJECT);static VALUE_MISMATCH=new r(t.H.VALUE_MISMATCH);static MISSING_INDEX_IN_RIGHT_OBJECT=new r(t.H.MISSING_INDEX_IN_RIGHT_OBJECT);static UNEXPECTED_INDEX_IN_RIGHT_OBJECT=new r(t.H.UNEXPECTED_INDEX_IN_RIGHT_OBJECT);static MISSING_VALUE_IN_RIGHT_OBJECT=new r(t.H.MISSING_VALUE_IN_RIGHT_OBJECT);static UNEXPECTED_VALUE_IN_RIGHT_OBJECT=new r(t.H.UNEXPECTED_VALUE_IN_RIGHT_OBJECT);static NULL=new r(null);static values(){return[r.MISSING_KEY_IN_RIGHT_OBJECT,r.UNEXPECTED_KEY_IN_RIGHT_OBJECT,r.VALUE_MISMATCH,r.MISSING_INDEX_IN_RIGHT_OBJECT,r.UNEXPECTED_INDEX_IN_RIGHT_OBJECT,r.MISSING_VALUE_IN_RIGHT_OBJECT,r.UNEXPECTED_VALUE_IN_RIGHT_OBJECT]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}toJSON(){return this.value}}t.YamlComparisonErrorType=r},1885(e,t,r){t.YamlObjectComparator=void 0;const n=r(2888),a=r(3188),i=r(6109),s=r(4325);t.YamlObjectComparator=class{static compare(e,t){const r=new s.ComparisonResult;return this.compareBothWays(r,e,t,new a.JsonPath),r}static compareBothWays(e,t,r,a){!function t(r,a,s){if(Array.isArray(a)&&Array.isArray(s)){const o=Math.max(a.length,s.length);for(let l=0;l<o;l++){const o=r.add(l);l in a?l in s?"object"==typeof a[l]&&null!==a[l]&&"object"==typeof s[l]&&null!==s[l]?t(o,a[l],s[l]):a[l]!==s[l]&&e.addComparisonError(new n.ComparisonError("ocl03",i.YamlComparisonErrorType.VALUE_MISMATCH,o,a[l],s[l])):e.addComparisonError(new n.ComparisonError("ocl02",i.YamlComparisonErrorType.MISSING_INDEX_IN_RIGHT_OBJECT,o,a[l])):e.addComparisonError(new n.ComparisonError("ocl01",i.YamlComparisonErrorType.UNEXPECTED_INDEX_IN_RIGHT_OBJECT,o,void 0,s[l]))}}else new Set([...Object.keys(a),...Object.keys(s)]).forEach(o=>{const l=r.add(o);o in a?o in s?"object"==typeof a[o]&&null!==a[o]&&"object"==typeof s[o]&&null!==s[o]?t(l,a[o],s[o]):a[o]!==s[o]&&e.addComparisonError(new n.ComparisonError("oco03",i.YamlComparisonErrorType.VALUE_MISMATCH,l,a[o],s[o])):e.addComparisonError(new n.ComparisonError("oco02",i.YamlComparisonErrorType.MISSING_KEY_IN_RIGHT_OBJECT,l)):e.addComparisonError(new n.ComparisonError("oco01",i.YamlComparisonErrorType.UNEXPECTED_KEY_IN_RIGHT_OBJECT,l))})}(a,t,r)}}},3188(e,t){t.JsonPath=void 0;class r{path;static ANY="*";constructor(...e){this.path=e}equal(e){return this.path.length===e.path.length&&this.path.every((t,r)=>t===e.path[r])}add(...e){return new r(...this.path,...e)}join(e){return new r(...this.path,...e.path)}toString(){let e="";return this.path.forEach(t=>{e+="number"==typeof t?`/[${t}]`:`/${t}`}),e+"/"}toJSON(){return this.toString()}getLastComponent(){return 0===this.path.length?null:this.path[this.path.length-1]}endsIn(...e){for(let t=1;t<=e.length;t++){if(t>this.path.length)return!1;const n=e[e.length-t];if(this.path[this.path.length-t]!==n&&n!=r.ANY)return!1}return!0}getLastNComponents(e){if(e<=0||0===this.path.length)return new r;const t=Math.max(this.path.length-e,0),n=this.path.slice(t);return new r(...n)}}t.JsonPath=r},6968(e,t,r){t.JsonContainerArtifactContent=void 0;const n=r(8748);class a{static CONTEXT_VERBATIM={xsd:"http://www.w3.org/2001/XMLSchema#",pav:"http://purl.org/pav/",bibo:"http://purl.org/ontology/bibo/",oslc:"http://open-services.net/ns/core#",schema:"http://schema.org/","schema:name":{"@type":"xsd:string"},"schema:description":{"@type":"xsd:string"},"pav:createdOn":{"@type":"xsd:dateTime"},"pav:createdBy":{"@type":"@id"},"pav:lastUpdatedOn":{"@type":"xsd:dateTime"},"oslc:modifiedBy":{"@type":"@id"}};static CONTEXT_VERBATIM_NO_BIBO;static{this.CONTEXT_VERBATIM_NO_BIBO=n.ReaderUtil.deepClone(this.CONTEXT_VERBATIM),n.ReaderUtil.deleteNodeKey(this.CONTEXT_VERBATIM_NO_BIBO,"bibo"),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM_NO_BIBO),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM)}}t.JsonContainerArtifactContent=a},6551(e,t,r){t.JsonTemplateContent=void 0;const n=r(8748);class a{static ANNOTATIONS={type:"object",patternProperties:{"^.+$":{oneOf:[{type:"object",properties:{"@id":{type:"string",format:"uri"}},additionalProperties:!1},{type:"object",properties:{"@value":{type:["string","number","boolean","null"]}},additionalProperties:!1}]}},additionalProperties:!1};static REQUIRED_PARTIAL=["@context","@id","schema:isBasedOn","schema:name","schema:description","pav:createdOn","pav:createdBy","pav:lastUpdatedOn","oslc:modifiedBy"];static PROPERTIES_PARTIAL={"@context":{type:"object",properties:{_annotations:{type:"string",enum:["@nest"]},rdfs:{type:"string",format:"uri",enum:["http://www.w3.org/2000/01/rdf-schema#"]},xsd:{type:"string",format:"uri",enum:["http://www.w3.org/2001/XMLSchema#"]},pav:{type:"string",format:"uri",enum:["http://purl.org/pav/"]},schema:{type:"string",format:"uri",enum:["http://schema.org/"]},oslc:{type:"string",format:"uri",enum:["http://open-services.net/ns/core#"]},skos:{type:"string",format:"uri",enum:["http://www.w3.org/2004/02/skos/core#"]},"rdfs:label":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}},"schema:isBasedOn":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"schema:name":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}},"schema:description":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}},"pav:derivedFrom":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"pav:createdOn":{type:"object",properties:{"@type":{type:"string",enum:["xsd:dateTime"]}}},"pav:createdBy":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"pav:lastUpdatedOn":{type:"object",properties:{"@type":{type:"string",enum:["xsd:dateTime"]}}},"oslc:modifiedBy":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"skos:notation":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}}},required:["xsd","pav","schema","oslc","schema:isBasedOn","schema:name","schema:description","pav:createdOn","pav:createdBy","pav:lastUpdatedOn","oslc:modifiedBy"],additionalProperties:!1},"@id":{type:["string","null"],format:"uri"},"@type":{oneOf:[{type:"string",format:"uri"},{type:"array",minItems:1,items:{type:"string",format:"uri"},uniqueItems:!0}]},"schema:isBasedOn":{type:"string",format:"uri"},"schema:name":{type:"string",minLength:1},"schema:description":{type:"string"},"pav:derivedFrom":{type:"string",format:"uri"},"pav:createdOn":{type:["string","null"],format:"date-time"},"pav:createdBy":{type:["string","null"],format:"uri"},"pav:lastUpdatedOn":{type:["string","null"],format:"date-time"},"oslc:modifiedBy":{type:["string","null"],format:"uri"},_annotations:a.ANNOTATIONS};static REQUIRED_PARTIAL_KEY_MAP;static PROPERTIES_PARTIAL_KEY_LIST=[];static PROPERTIES_PARTIAL_KEY_MAP=new Map;static CONTEXT_VERBATIM_NO_BIBO;static{Object.keys(a.PROPERTIES_PARTIAL).forEach(e=>{this.PROPERTIES_PARTIAL_KEY_LIST.push(e),this.PROPERTIES_PARTIAL_KEY_MAP.set(e,!0)}),this.REQUIRED_PARTIAL_KEY_MAP=this.REQUIRED_PARTIAL.reduce((e,t)=>(e.set(t,!0),e),new Map),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL_KEY_MAP),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL_KEY_LIST),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL_KEY_MAP)}}t.JsonTemplateContent=a},1501(e,t,r){t.JsonTemplateElementContent=void 0;const n=r(8748);class a{static REQUIRED_PARTIAL=["@context","@id"];static PROPERTIES_PARTIAL={"@context":{type:"object",properties:{},required:[],additionalProperties:!1},"@id":{type:["string","null"],format:"uri"},"@type":{oneOf:[{type:"string",format:"uri"},{type:"array",minItems:1,items:{type:"string",format:"uri"},uniqueItems:!0}]}};static LEGACY_ID_TYPING={type:"string",format:"uri"};static acceptEitherIdTyping(e,t){const r=n.ReaderUtil.getNode(t,"@id");null!==r&&JSON.stringify(r)===JSON.stringify(a.LEGACY_ID_TYPING)&&(e["@id"]=n.ReaderUtil.deepClone(a.LEGACY_ID_TYPING))}static REQUIRED_PARTIAL_KEY_MAP;static PROPERTIES_PARTIAL_KEY_MAP=new Map;static CONTEXT_VERBATIM_NO_BIBO;static{Object.keys(a.PROPERTIES_PARTIAL).forEach(e=>{this.PROPERTIES_PARTIAL_KEY_MAP.set(e,!0)}),this.REQUIRED_PARTIAL_KEY_MAP=this.REQUIRED_PARTIAL.reduce((e,t)=>(e.set(t,!0),e),new Map),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL_KEY_MAP),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL_KEY_MAP)}}t.JsonTemplateElementContent=a},9932(e,t,r){t.JsonTemplateFieldContentDynamic=void 0;const n=r(8748),a=r(2733),i=r(936);class s{static CONTEXT_VERBATIM={xsd:"http://www.w3.org/2001/XMLSchema#",pav:"http://purl.org/pav/",bibo:"http://purl.org/ontology/bibo/",oslc:"http://open-services.net/ns/core#",schema:"http://schema.org/",skos:"http://www.w3.org/2004/02/skos/core#","schema:name":{"@type":"xsd:string"},"schema:description":{"@type":"xsd:string"},"skos:prefLabel":{"@type":"xsd:string"},"skos:altLabel":{"@type":"xsd:string"},"pav:createdOn":{"@type":"xsd:dateTime"},"pav:createdBy":{"@type":"@id"},"pav:lastUpdatedOn":{"@type":"xsd:dateTime"},"oslc:modifiedBy":{"@type":"@id"}};static PROPERTIES_VERBATIM_LITERAL={"@type":{type:"string",format:"uri"},"rdfs:label":{type:["string","null"]},"@value":{type:["string","null"]},"@language":{type:["string","null"],minLength:1}};static PROPERTIES_VERBATIM_IRI={"@type":{type:"string",format:"uri"},"@id":{type:"string",format:"uri"},"rdfs:label":{type:["string","null"]},"skos:notation":{type:["string","null"]}};static ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_OUTSIDE={type:"object",properties:{"@value":{type:["string","null"]},"@type":{type:"string",format:"uri"}},required:["@value"],additionalProperties:!1};static ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE={type:"string",format:"uri"};static PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE;static PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION;static CONTEXT_VERBATIM_NO_BIBO;static{n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_LITERAL),this.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE=n.ReaderUtil.deepClone(this.PROPERTIES_VERBATIM_LITERAL),n.ReaderUtil.deleteNodeKey(this.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE,a.JsonSchema.atLanguage),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE),this.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION=n.ReaderUtil.deepClone(this.PROPERTIES_VERBATIM_IRI),n.ReaderUtil.deleteNodeKey(this.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION,i.CedarModel.skosNotation),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION),this.CONTEXT_VERBATIM_NO_BIBO=n.ReaderUtil.deepClone(this.CONTEXT_VERBATIM),n.ReaderUtil.deleteNodeKey(this.CONTEXT_VERBATIM_NO_BIBO,"bibo"),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM_NO_BIBO),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_IRI),n.ReaderUtil.deepFreeze(this.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_OUTSIDE),n.ReaderUtil.deepFreeze(this.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE)}}t.JsonTemplateFieldContentDynamic=s},9251(e,t,r){t.JsonTemplateFieldContentStatic=void 0;const n=r(8748);class a{static CONTEXT_VERBATIM={schema:"http://schema.org/",pav:"http://purl.org/pav/",bibo:"http://purl.org/ontology/bibo/",oslc:"http://open-services.net/ns/core#"};static CONTEXT_VERBATIM_NO_BIBO;static{n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM),this.CONTEXT_VERBATIM_NO_BIBO=n.ReaderUtil.deepClone(this.CONTEXT_VERBATIM),n.ReaderUtil.deleteNodeKey(this.CONTEXT_VERBATIM_NO_BIBO,"bibo"),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM_NO_BIBO)}}t.JsonTemplateFieldContentStatic=a},350(e,t,r){t.JsonTemplateInstanceContent=void 0;const n=r(8748);class a{static CONTEXT_VERBATIM={rdfs:"http://www.w3.org/2000/01/rdf-schema#",xsd:"http://www.w3.org/2001/XMLSchema#",pav:"http://purl.org/pav/",schema:"http://schema.org/",oslc:"http://open-services.net/ns/core#",skos:"http://www.w3.org/2004/02/skos/core#","rdfs:label":{"@type":"xsd:string"},"schema:isBasedOn":{"@type":"@id"},"schema:name":{"@type":"xsd:string"},"schema:description":{"@type":"xsd:string"},"pav:derivedFrom":{"@type":"@id"},"pav:createdOn":{"@type":"xsd:dateTime"},"pav:createdBy":{"@type":"@id"},"pav:lastUpdatedOn":{"@type":"xsd:dateTime"},"oslc:modifiedBy":{"@type":"@id"},"skos:notation":{"@type":"xsd:string"}};static{n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM)}}t.JsonTemplateInstanceContent=a},3198(e,t,r){r.r(t),r.d(t,{Alias:()=>J,CST:()=>n,Composer:()=>er,Document:()=>vt,Lexer:()=>Nr,LineCounter:()=>wr,Pair:()=>Ee,Parser:()=>Ur,Scalar:()=>W,Schema:()=>St,YAMLError:()=>Nt,YAMLMap:()=>Se,YAMLParseError:()=>wt,YAMLSeq:()=>_e,YAMLWarning:()=>Lt,default:()=>a,isAlias:()=>m,isCollection:()=>C,isDocument:()=>p,isMap:()=>h,isNode:()=>E,isPair:()=>f,isScalar:()=>y,isSeq:()=>T,parse:()=>Pr,parseAllDocuments:()=>xr,parseDocument:()=>Jr,stringify:()=>kr,visit:()=>R,visitAsync:()=>v});var n={};r.r(n),r.d(n,{BOM:()=>hr,DOCUMENT:()=>fr,FLOW_END:()=>yr,SCALAR:()=>Tr,createScalarToken:()=>rr,isCollection:()=>Cr,isScalar:()=>Er,prettyToken:()=>gr,resolveAsScalar:()=>tr,setScalarValue:()=>nr,stringify:()=>sr,tokenType:()=>Ir,visit:()=>mr});var a={};r.r(a),r.d(a,{Alias:()=>J,CST:()=>n,Composer:()=>er,Document:()=>vt,Lexer:()=>Nr,LineCounter:()=>wr,Pair:()=>Ee,Parser:()=>Ur,Scalar:()=>W,Schema:()=>St,YAMLError:()=>Nt,YAMLMap:()=>Se,YAMLParseError:()=>wt,YAMLSeq:()=>_e,YAMLWarning:()=>Lt,isAlias:()=>m,isCollection:()=>C,isDocument:()=>p,isMap:()=>h,isNode:()=>E,isPair:()=>f,isScalar:()=>y,isSeq:()=>T,parse:()=>Pr,parseAllDocuments:()=>xr,parseDocument:()=>Jr,stringify:()=>kr,visit:()=>R,visitAsync:()=>v});const i=Symbol.for("yaml.alias"),s=Symbol.for("yaml.document"),o=Symbol.for("yaml.map"),l=Symbol.for("yaml.pair"),d=Symbol.for("yaml.scalar"),c=Symbol.for("yaml.seq"),u=Symbol.for("yaml.node.type"),m=e=>!!e&&"object"==typeof e&&e[u]===i,p=e=>!!e&&"object"==typeof e&&e[u]===s,h=e=>!!e&&"object"==typeof e&&e[u]===o,f=e=>!!e&&"object"==typeof e&&e[u]===l,y=e=>!!e&&"object"==typeof e&&e[u]===d,T=e=>!!e&&"object"==typeof e&&e[u]===c;function C(e){if(e&&"object"==typeof e)switch(e[u]){case o:case c:return!0}return!1}function E(e){if(e&&"object"==typeof e)switch(e[u]){case i:case o:case d:case c:return!0}return!1}const g=e=>(y(e)||C(e))&&!!e.anchor,I=Symbol("break visit"),A=Symbol("skip children"),b=Symbol("remove node");function R(e,t){const r=N(t);p(e)?S(null,e.contents,r,Object.freeze([e]))===b&&(e.contents=null):S(null,e,r,Object.freeze([]))}function S(e,t,r,n){const a=w(e,t,r,n);if(E(a)||f(a))return L(e,n,a),S(e,a,r,n);if("symbol"!=typeof a)if(C(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const a=S(e,t.items[e],r,n);if("number"==typeof a)e=a-1;else{if(a===I)return I;a===b&&(t.items.splice(e,1),e-=1)}}}else if(f(t)){n=Object.freeze(n.concat(t));const e=S("key",t.key,r,n);if(e===I)return I;e===b&&(t.key=null);const a=S("value",t.value,r,n);if(a===I)return I;a===b&&(t.value=null)}return a}async function v(e,t){const r=N(t);p(e)?await _(null,e.contents,r,Object.freeze([e]))===b&&(e.contents=null):await _(null,e,r,Object.freeze([]))}async function _(e,t,r,n){const a=await w(e,t,r,n);if(E(a)||f(a))return L(e,n,a),_(e,a,r,n);if("symbol"!=typeof a)if(C(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const a=await _(e,t.items[e],r,n);if("number"==typeof a)e=a-1;else{if(a===I)return I;a===b&&(t.items.splice(e,1),e-=1)}}}else if(f(t)){n=Object.freeze(n.concat(t));const e=await _("key",t.key,r,n);if(e===I)return I;e===b&&(t.key=null);const a=await _("value",t.value,r,n);if(a===I)return I;a===b&&(t.value=null)}return a}function N(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function w(e,t,r,n){return"function"==typeof r?r(e,t,n):h(t)?r.Map?.(e,t,n):T(t)?r.Seq?.(e,t,n):f(t)?r.Pair?.(e,t,n):y(t)?r.Scalar?.(e,t,n):m(t)?r.Alias?.(e,t,n):void 0}function L(e,t,r){const n=t[t.length-1];if(C(n))n.items[e]=r;else if(f(n))"key"===e?n.key=r:n.value=r;else{if(!p(n)){const e=m(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}n.contents=r}}R.BREAK=I,R.SKIP=A,R.REMOVE=b,v.BREAK=I,v.SKIP=A,v.REMOVE=b;const F={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},V=e=>e.replace(/[!,[\]{}]/g,e=>F[e]);class O{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},O.defaultYaml,e),this.tags=Object.assign({},O.defaultTags,t)}clone(){const e=new O(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new O(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:O.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},O.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:O.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},O.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(2!==r.length&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[e,n]=r;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==r.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=r;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const r=e.slice(2,-1);return"!"===r||"!!"===r?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),r)}const[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);const a=this.tags[r];if(a)try{return a+decodeURIComponent(n)}catch(e){return t(String(e)),null}return"!"===r?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+V(e.substring(r.length));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let n;if(e&&r.length>0&&E(e.contents)){const t={};R(e.contents,(e,r)=>{E(r)&&r.tag&&(t[r.tag]=!0)}),n=Object.keys(t)}else n=[];for(const[a,i]of r)"!!"===a&&"tag:yaml.org,2002:"===i||e&&!n.some(e=>e.startsWith(i))||t.push(`%TAG ${a} ${i}`);return t.join("\n")}}function D(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function M(e){const t=new Set;return R(e,{Value(e,r){r.anchor&&t.add(r.anchor)}}),t}function B(e,t){for(let r=1;;++r){const n=`${e}${r}`;if(!t.has(n))return n}}function U(e,t,r,n){if(n&&"object"==typeof n)if(Array.isArray(n))for(let t=0,r=n.length;t<r;++t){const r=n[t],a=U(e,n,String(t),r);void 0===a?delete n[t]:a!==r&&(n[t]=a)}else if(n instanceof Map)for(const t of Array.from(n.keys())){const r=n.get(t),a=U(e,n,t,r);void 0===a?n.delete(t):a!==r&&n.set(t,a)}else if(n instanceof Set)for(const t of Array.from(n)){const r=U(e,n,t,t);void 0===r?n.delete(t):r!==t&&(n.delete(t),n.add(r))}else for(const[t,r]of Object.entries(n)){const a=U(e,n,t,r);void 0===a?delete n[t]:a!==r&&(n[t]=a)}return e.call(t,r,n)}function Y(e,t,r){if(Array.isArray(e))return e.map((e,t)=>Y(e,String(t),r));if(e&&"function"==typeof e.toJSON){if(!r||!g(e))return e.toJSON(t,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=e=>{n.res=e,delete r.onCreate};const a=e.toJSON(t,r);return r.onCreate&&r.onCreate(a),a}return"bigint"!=typeof e||r?.keep?e:Number(e)}O.defaultYaml={explicit:!1,version:"1.2"},O.defaultTags={"!!":"tag:yaml.org,2002:"};class x{constructor(e){Object.defineProperty(this,u,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:a}={}){if(!p(e))throw new TypeError("A document argument is required");const i={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},s=Y(this,"",i);if("function"==typeof n)for(const{count:e,res:t}of i.anchors.values())n(t,e);return"function"==typeof a?U(a,{"":s},"",s):s}}class J extends x{constructor(e){super(i),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){if(0===t?.maxAliasCount)throw new ReferenceError("Alias resolution is disabled");let r,n;t?.aliasResolveCache?r=t.aliasResolveCache:(r=[],R(e,{Node:(e,t)=>{(m(t)||g(t))&&r.push(t)}}),t&&(t.aliasResolveCache=r));for(const e of r){if(e===this)break;e.anchor===this.source&&(n=e)}if(n&&t){const{anchors:e,doc:r,maxAliasCount:a}=t;let i=e.get(n);if(i||(Y(n,null,t),i=e.get(n)),void 0===i?.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(a>=0&&(i.count+=1,0===i.aliasCount&&(i.aliasCount=P(r,n,e)),i.count*i.aliasCount>a))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return n}toJSON(e,t){if(!t)return{source:this.source};const r=this.resolve(t.doc,t);if(!r){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}return t.anchors.get(r).res}toString(e,t,r){const n=`*${this.source}`;if(e){if(D(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${n} `}return n}}function P(e,t,r){if(m(t)){const n=t.resolve(e),a=r&&n&&r.get(n);return a?a.count*a.aliasCount:0}if(C(t)){let n=0;for(const a of t.items){const t=P(e,a,r);t>n&&(n=t)}return n}if(f(t)){const n=P(e,t.key,r),a=P(e,t.value,r);return Math.max(n,a)}return 1}const k=e=>!e||"function"!=typeof e&&"object"!=typeof e;class W extends x{constructor(e){super(d),this.value=e}toJSON(e,t){return t?.keep?this.value:Y(this.value,e,t)}toString(){return String(this.value)}}function K(e,t,r){if(p(e)&&(e=e.contents),E(e))return e;if(f(e)){const t=r.schema[o].createNode?.(r.schema,null,r);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:n,onAnchor:a,onTagObj:i,schema:s,sourceObjects:l}=r;let d;if(n&&e&&"object"==typeof e){if(d=l.get(e),d)return d.anchor??(d.anchor=a(e)),new J(d.anchor);d={anchor:null,node:null},l.set(e,d)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let u=function(e,t,r){if(t){const e=r.filter(e=>e.tag===t),n=e.find(e=>!e.format)??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find(t=>t.identify?.(e)&&!t.format)}(e,t,s.tags);if(!u){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new W(e);return d&&(d.node=t),t}u=e instanceof Map?s[o]:Symbol.iterator in Object(e)?s[c]:s[o]}i&&(i(u),delete r.onTagObj);const m=u?.createNode?u.createNode(r.schema,e,r):"function"==typeof u?.nodeClass?.from?u.nodeClass.from(r.schema,e,r):new W(e);return t?m.tag=t:u.default||(m.tag=u.tag),d&&(d.node=m),m}function j(e,t,r){let n=r;for(let e=t.length-1;e>=0;--e){const r=t[e];if("number"==typeof r&&Number.isInteger(r)&&r>=0){const e=[];e[r]=n,n=e}else n=new Map([[r,n]])}return K(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}W.BLOCK_FOLDED="BLOCK_FOLDED",W.BLOCK_LITERAL="BLOCK_LITERAL",W.PLAIN="PLAIN",W.QUOTE_DOUBLE="QUOTE_DOUBLE",W.QUOTE_SINGLE="QUOTE_SINGLE";const $=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class X extends x{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>E(t)||f(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if($(e))this.add(t);else{const[r,...n]=e,a=this.get(r,!0);if(C(a))a.addIn(n,t);else{if(void 0!==a||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,j(this.schema,n,t))}}}deleteIn(e){const[t,...r]=e;if(0===r.length)return this.delete(t);const n=this.get(t,!0);if(C(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){const[r,...n]=e,a=this.get(r,!0);return 0===n.length?!t&&y(a)?a.value:a:C(a)?a.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!f(t))return!1;const r=t.value;return null==r||e&&y(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[t,...r]=e;if(0===r.length)return this.has(t);const n=this.get(t,!0);return!!C(n)&&n.hasIn(r)}setIn(e,t){const[r,...n]=e;if(0===n.length)this.set(r,t);else{const e=this.get(r,!0);if(C(e))e.setIn(n,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,j(this.schema,n,t))}}}}const G=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function q(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const H=(e,t,r)=>e.endsWith("\n")?q(r,t):r.includes("\n")?"\n"+q(r,t):(e.endsWith(" ")?"":" ")+r,z="block",Q="quoted";function Z(e,t,r="flow",{indentAtStart:n,lineWidth:a=80,minContentWidth:i=20,onFold:s,onOverflow:o}={}){if(!a||a<0)return e;a<i&&(i=0);const l=Math.max(1+i,1+a-t.length);if(e.length<=l)return e;const d=[],c={};let u,m,p=a-t.length;"number"==typeof n&&(n>a-Math.max(2,i)?d.push(0):p=a-n);let h=!1,f=-1,y=-1,T=-1;r===z&&(f=ee(e,f,t.length),-1!==f&&(p=f+l));for(let n;n=e[f+=1];){if(r===Q&&"\\"===n){switch(y=f,e[f+1]){case"x":f+=3;break;case"u":f+=5;break;case"U":f+=9;break;default:f+=1}T=f}if("\n"===n)r===z&&(f=ee(e,f,t.length)),p=f+t.length+l,u=void 0;else{if(" "===n&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const t=e[f+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(u=f)}if(f>=p)if(u)d.push(u),p=u+l,u=void 0;else if(r===Q){for(;" "===m||"\t"===m;)m=n,n=e[f+=1],h=!0;const t=f>T+1?f-2:y-1;if(c[t])return e;d.push(t),c[t]=!0,p=t+l,u=void 0}else h=!0}m=n}if(h&&o&&o(),0===d.length)return e;s&&s();let C=e.slice(0,d[0]);for(let n=0;n<d.length;++n){const a=d[n],i=d[n+1]||e.length;0===a?C=`\n${t}${e.slice(0,i)}`:(r===Q&&c[a]&&(C+=`${e[a]}\\`),C+=`\n${t}${e.slice(a+1,i)}`)}return C}function ee(e,t,r){let n=t,a=t+1,i=e[a];for(;" "===i||"\t"===i;)if(t<a+r)i=e[++t];else{do{i=e[++t]}while(i&&"\n"!==i);n=t,a=t+1,i=e[a]}return n}const te=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),re=e=>/^(%|---|\.\.\.)/m.test(e);function ne(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=t,a=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(re(e)?" ":"");let s="",o=0;for(let e=0,t=r[e];t;t=r[++e])if(" "===t&&"\\"===r[e+1]&&"n"===r[e+2]&&(s+=r.slice(o,e)+"\\ ",e+=1,o=e,t="\\"),"\\"===t)switch(r[e+1]){case"u":{s+=r.slice(o,e);const t=r.substr(e+2,4);switch(t){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:"00"===t.substr(0,2)?s+="\\x"+t.substr(2):s+=r.substr(e,6)}e+=5,o=e+1}break;case"n":if(n||'"'===r[e+2]||r.length<a)e+=1;else{for(s+=r.slice(o,e)+"\n\n";"\\"===r[e+2]&&"n"===r[e+3]&&'"'!==r[e+4];)s+="\n",e+=2;s+=i," "===r[e+2]&&(s+="\\"),e+=1,o=e+1}break;default:e+=1}return s=o?s+r.slice(o):r,n?s:Z(s,i,"quoted",te(t,!1))}function ae(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return ne(e,t);const r=t.indent||(re(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${r}`)+"'";return t.implicitKey?n:Z(n,r,"flow",te(t,!1))}function ie(e,t){const{singleQuote:r}=t.options;let n;if(!1===r)n=ne;else{const t=e.includes('"'),a=e.includes("'");n=t&&!a?ae:a&&!t?ne:r?ae:ne}return n(e,t)}let se;try{se=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{se=/\n+(?!\n|$)/g}function oe({comment:e,type:t,value:r},n,a,i){const{blockQuote:s,commentString:o,lineWidth:l}=n.options;if(!s||/\n[\t ]+$/.test(r))return ie(r,n);const d=n.indent||(n.forceBlockIndent||re(r)?" ":""),c="literal"===s||"folded"!==s&&t!==W.BLOCK_FOLDED&&(t===W.BLOCK_LITERAL||!function(e,t,r){if(!t||t<0)return!1;const n=t-r,a=e.length;if(a<=n)return!1;for(let t=0,r=0;t<a;++t)if("\n"===e[t]){if(t-r>n)return!0;if(r=t+1,a-r<=n)return!1}return!0}(r,l,d.length));if(!r)return c?"|\n":">\n";let u,m;for(m=r.length;m>0;--m){const e=r[m-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let p=r.substring(m);const h=p.indexOf("\n");-1===h?u="-":r===p||h!==p.length-1?(u="+",i&&i()):u="",p&&(r=r.slice(0,-p.length),"\n"===p[p.length-1]&&(p=p.slice(0,-1)),p=p.replace(se,`$&${d}`));let f,y=!1,T=-1;for(f=0;f<r.length;++f){const e=r[f];if(" "===e)y=!0;else{if("\n"!==e)break;T=f}}let C=r.substring(0,T<f?T+1:f);C&&(r=r.substring(C.length),C=C.replace(/\n+/g,`$&${d}`));let E=(y?d?"2":"1":"")+u;if(e&&(E+=" "+o(e.replace(/ ?[\r\n]+/g," ")),a&&a()),!c){const e=r.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${d}`);let a=!1;const i=te(n,!0);"folded"!==s&&t!==W.BLOCK_FOLDED&&(i.onOverflow=()=>{a=!0});const o=Z(`${C}${e}${p}`,d,"block",i);if(!a)return`>${E}\n${d}${o}`}return`|${E}\n${d}${C}${r=r.replace(/\n+/g,`$&${d}`)}${p}`}function le(e,t,r,n){const{implicitKey:a,inFlow:i}=t,s="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:o}=e;o!==W.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(o=W.QUOTE_DOUBLE);const l=e=>{switch(e){case W.BLOCK_FOLDED:case W.BLOCK_LITERAL:return a||i?ie(s.value,t):oe(s,t,r,n);case W.QUOTE_DOUBLE:return ne(s.value,t);case W.QUOTE_SINGLE:return ae(s.value,t);case W.PLAIN:return function(e,t,r,n){const{type:a,value:i}=e,{actualString:s,implicitKey:o,indent:l,indentStep:d,inFlow:c}=t;if(o&&i.includes("\n")||c&&/[[\]{},]/.test(i))return ie(i,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return o||c||!i.includes("\n")?ie(i,t):oe(e,t,r,n);if(!o&&!c&&a!==W.PLAIN&&i.includes("\n"))return oe(e,t,r,n);if(re(i)){if(""===l)return t.forceBlockIndent=!0,oe(e,t,r,n);if(o&&l===d)return ie(i,t)}const u=i.replace(/\n+/g,`$&\n${l}`);if(s){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(u),{compat:r,tags:n}=t.doc.schema;if(n.some(e)||r?.some(e))return ie(i,t)}return o?u:Z(u,l,"flow",te(t,!1))}(s,t,r,n);default:return null}};let d=l(o);if(null===d){const{defaultKeyType:e,defaultStringType:r}=t.options,n=a&&e||r;if(d=l(n),null===d)throw new Error(`Unsupported default string type ${n}`)}return d}function de(e,t){const r=Object.assign({blockQuote:!0,commentString:G,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:n,options:r}}function ce(e,t,r,n){if(f(e))return e.toString(t,r,n);if(m(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let a;const i=E(e)?e:t.doc.createNode(e,{onTagObj:e=>a=e});a??(a=function(e,t){if(t.tag){const r=e.filter(e=>e.tag===t.tag);if(r.length>0)return r.find(e=>e.format===t.format)??r[0]}let r,n;if(y(t)){n=t.value;let a=e.filter(e=>e.identify?.(n));if(a.length>1){const e=a.filter(e=>e.test);e.length>0&&(a=e)}r=a.find(e=>e.format===t.format)??a.find(e=>!e.format)}else n=t,r=e.find(e=>e.nodeClass&&n instanceof e.nodeClass);if(!r)throw new Error(`Tag not resolved for ${n?.constructor?.name??(null===n?"null":typeof n)} value`);return r}(t.doc.schema.tags,i));const s=function(e,t,{anchors:r,doc:n}){if(!n.directives)return"";const a=[],i=(y(e)||C(e))&&e.anchor;i&&D(i)&&(r.add(i),a.push(`&${i}`));const s=e.tag??(t.default?null:t.tag);return s&&a.push(n.directives.tagString(s)),a.join(" ")}(i,a,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);const o="function"==typeof a.stringify?a.stringify(i,t,r,n):y(i)?le(i,t,r,n):i.toString(t,r,n);return s?y(i)||"{"===o[0]||"["===o[0]?`${s} ${o}`:`${s}\n${t.indent}${o}`:o}function ue(e,t){"debug"!==e&&"warn"!==e||console.warn(t)}const me="<<",pe={identify:e=>e===me||"symbol"==typeof e&&e.description===me,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new W(Symbol(me)),{addToJSMap:he}),stringify:()=>me};function he(e,t,r){const n=ye(e,r);if(T(n))for(const r of n.items)fe(e,t,r);else if(Array.isArray(n))for(const r of n)fe(e,t,r);else fe(e,t,n)}function fe(e,t,r){const n=ye(e,r);if(!h(n))throw new Error("Merge sources must be maps or map aliases");const a=n.toJSON(null,e,Map);for(const[e,r]of a)t instanceof Map?t.has(e)||t.set(e,r):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0});return t}function ye(e,t){return e&&m(t)?t.resolve(e.doc,e):t}function Te(e,t,{key:r,value:n}){if(E(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(((e,t)=>(pe.identify(t)||y(t)&&(!t.type||t.type===W.PLAIN)&&pe.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===pe.tag&&e.default))(e,r))he(e,t,n);else{const a=Y(r,"",e);if(t instanceof Map)t.set(a,Y(n,a,e));else if(t instanceof Set)t.add(a);else{const i=function(e,t,r){if(null===t)return"";if("object"!=typeof t)return String(t);if(E(e)&&r?.doc){const t=de(r.doc,{});t.anchors=new Set;for(const e of r.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const n=e.toString(t);if(!r.mapKeyWarned){let e=JSON.stringify(n);e.length>40&&(e=e.substring(0,36)+'..."'),ue(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(t)}(r,a,e),s=Y(n,i,e);i in t?Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[i]=s}}return t}function Ce(e,t,r){const n=K(e,void 0,r),a=K(t,void 0,r);return new Ee(n,a)}class Ee{constructor(e,t=null){Object.defineProperty(this,u,{value:l}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return E(t)&&(t=t.clone(e)),E(r)&&(r=r.clone(e)),new Ee(t,r)}toJSON(e,t){return Te(t,t?.mapAsMap?new Map:{},this)}toString(e,t,r){return e?.doc?function({key:e,value:t},r,n,a){const{allNullValues:i,doc:s,indent:o,indentStep:l,options:{commentString:d,indentSeq:c,simpleKeys:u}}=r;let m=E(e)&&e.comment||null;if(u){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(C(e)||!E(e)&&"object"==typeof e)throw new Error("With simple keys, collection cannot be used as a key value")}let p=!u&&(!e||m&&null==t&&!r.inFlow||C(e)||(y(e)?e.type===W.BLOCK_FOLDED||e.type===W.BLOCK_LITERAL:"object"==typeof e));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(u||!i),indent:o+l});let h,f,g,I=!1,A=!1,b=ce(e,r,()=>I=!0,()=>A=!0);if(!p&&!r.inFlow&&b.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(r.inFlow){if(i||null==t)return I&&n&&n(),""===b?"?":p?`? ${b}`:b}else if(i&&!u||null==t&&p)return b=`? ${b}`,m&&!I?b+=H(b,r.indent,d(m)):A&&a&&a(),b;I&&(m=null),p?(m&&(b+=H(b,r.indent,d(m))),b=`? ${b}\n${o}:`):(b=`${b}:`,m&&(b+=H(b,r.indent,d(m)))),E(t)?(h=!!t.spaceBefore,f=t.commentBefore,g=t.comment):(h=!1,f=null,g=null,t&&"object"==typeof t&&(t=s.createNode(t))),r.implicitKey=!1,p||m||!y(t)||(r.indentAtStart=b.length+1),A=!1,c||!(l.length>=2)||r.inFlow||p||!T(t)||t.flow||t.tag||t.anchor||(r.indent=r.indent.substring(2));let R=!1;const S=ce(t,r,()=>R=!0,()=>A=!0);let v=" ";if(m||h||f)v=h?"\n":"",f&&(v+=`\n${q(d(f),r.indent)}`),""!==S||r.inFlow?v+=`\n${r.indent}`:"\n"===v&&g&&(v="\n\n");else if(!p&&C(t)){const e=S[0],n=S.indexOf("\n"),a=-1!==n,i=r.inFlow??t.flow??0===t.items.length;if(a||!i){let t=!1;if(a&&("&"===e||"!"===e)){let r=S.indexOf(" ");"&"===e&&-1!==r&&r<n&&"!"===S[r+1]&&(r=S.indexOf(" ",r+1)),(-1===r||n<r)&&(t=!0)}t||(v=`\n${r.indent}`)}}else""!==S&&"\n"!==S[0]||(v="");return b+=v+S,r.inFlow?R&&n&&n():g&&!R?b+=H(b,r.indent,d(g)):A&&a&&a(),b}(this,e,t,r):JSON.stringify(this)}}function ge(e,t,r){return(t.inFlow??e.flow?Ae:Ie)(e,t,r)}function Ie({comment:e,items:t},r,{blockItemPrefix:n,flowChars:a,itemIndent:i,onChompKeep:s,onComment:o}){const{indent:l,options:{commentString:d}}=r,c=Object.assign({},r,{indent:i,type:null});let u=!1;const m=[];for(let e=0;e<t.length;++e){const a=t[e];let s=null;if(E(a))!u&&a.spaceBefore&&m.push(""),be(r,m,a.commentBefore,u),a.comment&&(s=a.comment);else if(f(a)){const e=E(a.key)?a.key:null;e&&(!u&&e.spaceBefore&&m.push(""),be(r,m,e.commentBefore,u))}u=!1;let o=ce(a,c,()=>s=null,()=>u=!0);s&&(o+=H(o,i,d(s))),u&&s&&(u=!1),m.push(n+o)}let p;if(0===m.length)p=a.start+a.end;else{p=m[0];for(let e=1;e<m.length;++e){const t=m[e];p+=t?`\n${l}${t}`:"\n"}}return e?(p+="\n"+q(d(e),l),o&&o()):u&&s&&s(),p}function Ae({items:e},t,{flowChars:r,itemIndent:n}){const{indent:a,indentStep:i,flowCollectionPadding:s,options:{commentString:o}}=t;n+=i;const l=Object.assign({},t,{indent:n,inFlow:!0,type:null});let d=!1,c=0;const u=[];for(let r=0;r<e.length;++r){const a=e[r];let i=null;if(E(a))a.spaceBefore&&u.push(""),be(t,u,a.commentBefore,!1),a.comment&&(i=a.comment);else if(f(a)){const e=E(a.key)?a.key:null;e&&(e.spaceBefore&&u.push(""),be(t,u,e.commentBefore,!1),e.comment&&(d=!0));const r=E(a.value)?a.value:null;r?(r.comment&&(i=r.comment),r.commentBefore&&(d=!0)):null==a.value&&e?.comment&&(i=e.comment)}i&&(d=!0);let s=ce(a,l,()=>i=null);d||(d=u.length>c||s.includes("\n")),r<e.length-1?s+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(d||(d=u.reduce((e,t)=>e+t.length+2,2)+(s.length+2)>t.options.lineWidth)),d&&(s+=",")),i&&(s+=H(s,n,o(i))),u.push(s),c=u.length}const{start:m,end:p}=r;if(0===u.length)return m+p;if(!d){const e=u.reduce((e,t)=>e+t.length+2,2);d=t.options.lineWidth>0&&e>t.options.lineWidth}if(d){let e=m;for(const t of u)e+=t?`\n${i}${a}${t}`:"\n";return`${e}\n${a}${p}`}return`${m}${s}${u.join(" ")}${s}${p}`}function be({indent:e,options:{commentString:t}},r,n,a){if(n&&a&&(n=n.replace(/^\n+/,"")),n){const a=q(t(n),e);r.push(a.trimStart())}}function Re(e,t){const r=y(t)?t.value:t;for(const n of e)if(f(n)){if(n.key===t||n.key===r)return n;if(y(n.key)&&n.key.value===r)return n}}class Se extends X{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(o,e),this.items=[]}static from(e,t,r){const{keepUndefined:n,replacer:a}=r,i=new this(e),s=(e,s)=>{if("function"==typeof a)s=a.call(t,e,s);else if(Array.isArray(a)&&!a.includes(e))return;(void 0!==s||n)&&i.items.push(Ce(e,s,r))};if(t instanceof Map)for(const[e,r]of t)s(e,r);else if(t&&"object"==typeof t)for(const e of Object.keys(t))s(e,t[e]);return"function"==typeof e.sortMapEntries&&i.items.sort(e.sortMapEntries),i}add(e,t){let r;r=f(e)?e:e&&"object"==typeof e&&"key"in e?new Ee(e.key,e.value):new Ee(e,e?.value);const n=Re(this.items,r.key),a=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${r.key} already set`);y(n.value)&&k(r.value)?n.value.value=r.value:n.value=r.value}else if(a){const e=this.items.findIndex(e=>a(r,e)<0);-1===e?this.items.push(r):this.items.splice(e,0,r)}else this.items.push(r)}delete(e){const t=Re(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const r=Re(this.items,e),n=r?.value;return(!t&&y(n)?n.value:n)??void 0}has(e){return!!Re(this.items,e)}set(e,t){this.add(new Ee(e,t),!0)}toJSON(e,t,r){const n=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(n);for(const e of this.items)Te(t,n,e);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const e of this.items)if(!f(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ge(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}const ve={collection:"map",default:!0,nodeClass:Se,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(h(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,r)=>Se.from(e,t,r)};class _e extends X{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(c,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Ne(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const r=Ne(e);if("number"!=typeof r)return;const n=this.items[r];return!t&&y(n)?n.value:n}has(e){const t=Ne(e);return"number"==typeof t&&t<this.items.length}set(e,t){const r=Ne(e);if("number"!=typeof r)throw new Error(`Expected a valid index, not ${e}.`);const n=this.items[r];y(n)&&k(t)?n.value=t:this.items[r]=t}toJSON(e,t){const r=[];t?.onCreate&&t.onCreate(r);let n=0;for(const e of this.items)r.push(Y(e,String(n++),t));return r}toString(e,t,r){return e?ge(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){const{replacer:n}=r,a=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let i of t){if("function"==typeof n){const r=t instanceof Set?i:String(e++);i=n.call(t,r,i)}a.items.push(K(i,void 0,r))}}return a}}function Ne(e){let t=y(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}const we={collection:"seq",default:!0,nodeClass:_e,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(T(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,r)=>_e.from(e,t,r)},Le={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,r,n)=>le(e,t=Object.assign({actualString:!0},t),r,n)},Fe={identify:e=>null==e,createNode:()=>new W(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new W(null),stringify:({source:e},t)=>"string"==typeof e&&Fe.test.test(e)?e:t.options.nullStr},Ve={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new W("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},r)=>e&&Ve.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?r.options.trueStr:r.options.falseStr};function Oe({format:e,minFractionDigits:t,tag:r,value:n}){if("bigint"==typeof n)return String(n);const a="number"==typeof n?n:Number(n);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let i=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||"tag:yaml.org,2002:float"===r)&&/^-?\d/.test(i)&&!i.includes("e")){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let r=t-(i.length-e-1);for(;r-- >0;)i+="0"}return i}const De={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Oe},Me={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Oe(e)}},Be={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new W(parseFloat(e)),r=e.indexOf(".");return-1!==r&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-r-1),t},stringify:Oe},Ue=e=>"bigint"==typeof e||Number.isInteger(e),Ye=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function xe(e,t,r){const{value:n}=e;return Ue(n)&&n>=0?r+n.toString(t):Oe(e)}const Je={identify:e=>Ue(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>Ye(e,2,8,r),stringify:e=>xe(e,8,"0o")},Pe={identify:Ue,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>Ye(e,0,10,r),stringify:Oe},ke={identify:e=>Ue(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>Ye(e,2,16,r),stringify:e=>xe(e,16,"0x")},We=[ve,we,Le,Fe,Ve,Je,Pe,ke,De,Me,Be];function Ke(e){return"bigint"==typeof e||Number.isInteger(e)}const je=({value:e})=>JSON.stringify(e),$e=[ve,we].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:je},{identify:e=>null==e,createNode:()=>new W(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:je},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:je},{identify:Ke,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>Ke(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:je}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),Xe={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let e=0;e<t.length;++e)r[e]=t.charCodeAt(e);return r}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},n,a,i){if(!r)return"";const s=r;let o;if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<s.length;++t)e+=String.fromCharCode(s[t]);o=btoa(e)}if(t??(t=W.BLOCK_LITERAL),t!==W.QUOTE_DOUBLE){const e=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),r=Math.ceil(o.length/e),a=new Array(r);for(let t=0,n=0;t<r;++t,n+=e)a[t]=o.substr(n,e);o=a.join(t===W.BLOCK_LITERAL?"\n":" ")}return le({comment:e,type:t,value:o},n,a,i)}};function Ge(e,t){if(T(e))for(let r=0;r<e.items.length;++r){let n=e.items[r];if(!f(n)){if(h(n)){n.items.length>1&&t("Each pair must have its own sequence indicator");const e=n.items[0]||new Ee(new W(null));if(n.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${n.commentBefore}\n${e.key.commentBefore}`:n.commentBefore),n.comment){const t=e.value??e.key;t.comment=t.comment?`${n.comment}\n${t.comment}`:n.comment}n=e}e.items[r]=f(n)?n:new Ee(n)}}else t("Expected a sequence for this tag");return e}function qe(e,t,r){const{replacer:n}=r,a=new _e(e);a.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let s,o;if("function"==typeof n&&(e=n.call(t,String(i++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);s=e[0],o=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);s=t[0],o=e[s]}else s=e;a.items.push(Ce(s,o,r))}return a}const He={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ge,createNode:qe};class ze extends _e{constructor(){super(),this.add=Se.prototype.add.bind(this),this.delete=Se.prototype.delete.bind(this),this.get=Se.prototype.get.bind(this),this.has=Se.prototype.has.bind(this),this.set=Se.prototype.set.bind(this),this.tag=ze.tag}toJSON(e,t){if(!t)return super.toJSON(e);const r=new Map;t?.onCreate&&t.onCreate(r);for(const e of this.items){let n,a;if(f(e)?(n=Y(e.key,"",t),a=Y(e.value,n,t)):n=Y(e,"",t),r.has(n))throw new Error("Ordered maps must not include duplicate keys");r.set(n,a)}return r}static from(e,t,r){const n=qe(e,t,r),a=new this;return a.items=n.items,a}}ze.tag="tag:yaml.org,2002:omap";const Qe={collection:"seq",identify:e=>e instanceof Map,nodeClass:ze,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=Ge(e,t),n=[];for(const{key:e}of r.items)y(e)&&(n.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):n.push(e.value));return Object.assign(new ze,r)},createNode:(e,t,r)=>ze.from(e,t,r)};function Ze({value:e,source:t},r){return t&&(e?et:tt).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}const et={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new W(!0),stringify:Ze},tt={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new W(!1),stringify:Ze},rt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Oe},nt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Oe(e)}},at={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new W(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(-1!==r){const n=e.substring(r+1).replace(/_/g,"");"0"===n[n.length-1]&&(t.minFractionDigits=n.length)}return t},stringify:Oe},it=e=>"bigint"==typeof e||Number.isInteger(e);function st(e,t,r,{intAsBigInt:n}){const a=e[0];if("-"!==a&&"+"!==a||(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===a?BigInt(-1)*t:t}const i=parseInt(e,r);return"-"===a?-1*i:i}function ot(e,t,r){const{value:n}=e;if(it(n)){const e=n.toString(t);return n<0?"-"+r+e.substr(1):r+e}return Oe(e)}const lt={identify:it,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>st(e,2,2,r),stringify:e=>ot(e,2,"0b")},dt={identify:it,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>st(e,1,8,r),stringify:e=>ot(e,8,"0")},ct={identify:it,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>st(e,0,10,r),stringify:Oe},ut={identify:it,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>st(e,2,16,r),stringify:e=>ot(e,16,"0x")};class mt extends Se{constructor(e){super(e),this.tag=mt.tag}add(e){let t;t=f(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new Ee(e.key,null):new Ee(e,null),Re(this.items,t.key)||this.items.push(t)}get(e,t){const r=Re(this.items,e);return!t&&f(r)?y(r.key)?r.key.value:r.key:r}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const r=Re(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new Ee(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){const{replacer:n}=r,a=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof n&&(e=n.call(t,e,e)),a.items.push(Ce(e,null,r));return a}}mt.tag="tag:yaml.org,2002:set";const pt={collection:"map",identify:e=>e instanceof Set,nodeClass:mt,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>mt.from(e,t,r),resolve(e,t){if(h(e)){if(e.hasAllNullValues(!0))return Object.assign(new mt,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function ht(e,t){const r=e[0],n="-"===r||"+"===r?e.substring(1):e,a=e=>t?BigInt(e):Number(e),i=n.replace(/_/g,"").split(":").reduce((e,t)=>e*a(60)+a(t),a(0));return"-"===r?a(-1)*i:i}function ft(e){let{value:t}=e,r=e=>e;if("bigint"==typeof t)r=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Oe(e);let n="";t<0&&(n="-",t*=r(-1));const a=r(60),i=[t%a];return t<60?i.unshift(0):(t=(t-i[0])/a,i.unshift(t%a),t>=60&&(t=(t-i[0])/a,i.unshift(t))),n+i.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const yt={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>ht(e,r),stringify:ft},Tt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>ht(e,!1),stringify:ft},Ct={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(Ct.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,a,i,s,o]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0;let d=Date.UTC(r,n-1,a,i||0,s||0,o||0,l);const c=t[8];if(c&&"Z"!==c){let e=ht(c,!1);Math.abs(e)<30&&(e*=60),d-=6e4*e}return new Date(d)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},Et=[ve,we,Le,Fe,et,tt,lt,dt,ct,ut,rt,nt,at,Xe,pe,Qe,He,pt,yt,Tt,Ct],gt=new Map([["core",We],["failsafe",[ve,we,Le]],["json",$e],["yaml11",Et],["yaml-1.1",Et]]),It={binary:Xe,bool:Ve,float:Be,floatExp:Me,floatNaN:De,floatTime:Tt,int:Pe,intHex:ke,intOct:Je,intTime:yt,map:ve,merge:pe,null:Fe,omap:Qe,pairs:He,seq:we,set:pt,timestamp:Ct},At={"tag:yaml.org,2002:binary":Xe,"tag:yaml.org,2002:merge":pe,"tag:yaml.org,2002:omap":Qe,"tag:yaml.org,2002:pairs":He,"tag:yaml.org,2002:set":pt,"tag:yaml.org,2002:timestamp":Ct};function bt(e,t,r){const n=gt.get(t);if(n&&!e)return r&&!n.includes(pe)?n.concat(pe):n.slice();let a=n;if(!a){if(!Array.isArray(e)){const e=Array.from(gt.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}a=[]}if(Array.isArray(e))for(const t of e)a=a.concat(t);else"function"==typeof e&&(a=e(a.slice()));return r&&(a=a.concat(pe)),a.reduce((e,t)=>{const r="string"==typeof t?It[t]:t;if(!r){const e=JSON.stringify(t),r=Object.keys(It).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${r}`)}return e.includes(r)||e.push(r),e},[])}const Rt=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class St{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:a,sortMapEntries:i,toStringDefaults:s}){this.compat=Array.isArray(e)?bt(e,"compat"):e?bt(null,e):null,this.name="string"==typeof a&&a||"core",this.knownTags=n?At:{},this.tags=bt(t,this.name,r),this.toStringOptions=s??null,Object.defineProperty(this,o,{value:ve}),Object.defineProperty(this,d,{value:Le}),Object.defineProperty(this,c,{value:we}),this.sortMapEntries="function"==typeof i?i:!0===i?Rt:null}clone(){const e=Object.create(St.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class vt{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,u,{value:s});let n=null;"function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t,t=void 0);const a=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=a;let{version:i}=a;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(i=this.directives.yaml.version)):this.directives=new O({version:i}),this.setSchema(i,r),this.contents=void 0===e?null:this.createNode(e,n,r)}clone(){const e=Object.create(vt.prototype,{[u]:{value:s}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=E(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){_t(this.contents)&&this.contents.add(e)}addIn(e,t){_t(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const r=M(this);e.anchor=!t||r.has(t)?B(t||"a",r):t}return new J(e.anchor)}createNode(e,t,r){let n;if("function"==typeof t)e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,r=t.filter(e).map(String);r.length>0&&(t=t.concat(r)),n=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:a,anchorPrefix:i,flow:s,keepUndefined:o,onTagObj:l,tag:d}=r??{},{onAnchor:c,setAnchors:u,sourceObjects:m}=function(e,t){const r=[],n=new Map;let a=null;return{onAnchor:n=>{r.push(n),a??(a=M(e));const i=B(t,a);return a.add(i),i},setAnchors:()=>{for(const e of r){const t=n.get(e);if("object"!=typeof t||!t.anchor||!y(t.node)&&!C(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:n}}(this,i||"a"),p=K(e,d,{aliasDuplicateObjects:a??!0,keepUndefined:o??!1,onAnchor:c,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:m});return s&&C(p)&&(p.flow=!0),u(),p}createPair(e,t,r={}){const n=this.createNode(e,null,r),a=this.createNode(t,null,r);return new Ee(n,a)}delete(e){return!!_t(this.contents)&&this.contents.delete(e)}deleteIn(e){return $(e)?null!=this.contents&&(this.contents=null,!0):!!_t(this.contents)&&this.contents.deleteIn(e)}get(e,t){return C(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return $(e)?!t&&y(this.contents)?this.contents.value:this.contents:C(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!C(this.contents)&&this.contents.has(e)}hasIn(e){return $(e)?void 0!==this.contents:!!C(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=j(this.schema,[e],t):_t(this.contents)&&this.contents.set(e,t)}setIn(e,t){$(e)?this.contents=t:null==this.contents?this.contents=j(this.schema,Array.from(e),t):_t(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let r;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new O({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new O({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!r)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new St(Object.assign(r,t))}}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:a,reviver:i}={}){const s={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===r,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},o=Y(this.contents,t??"",s);if("function"==typeof a)for(const{count:e,res:t}of s.anchors.values())a(t,e);return"function"==typeof i?U(i,{"":o},"",o):o}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){const r=[];let n=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(r.push(t),n=!0):e.directives.docStart&&(n=!0)}n&&r.push("---");const a=de(e,t),{commentString:i}=a.options;if(e.commentBefore){1!==r.length&&r.unshift("");const t=i(e.commentBefore);r.unshift(q(t,""))}let s=!1,o=null;if(e.contents){if(E(e.contents)){if(e.contents.spaceBefore&&n&&r.push(""),e.contents.commentBefore){const t=i(e.contents.commentBefore);r.push(q(t,""))}a.forceBlockIndent=!!e.comment,o=e.contents.comment}const t=o?void 0:()=>s=!0;let l=ce(e.contents,a,()=>o=null,t);o&&(l+=H(l,"",i(o))),"|"!==l[0]&&">"!==l[0]||"---"!==r[r.length-1]?r.push(l):r[r.length-1]=`--- ${l}`}else r.push(ce(e.contents,a));if(e.directives?.docEnd)if(e.comment){const t=i(e.comment);t.includes("\n")?(r.push("..."),r.push(q(t,""))):r.push(`... ${t}`)}else r.push("...");else{let t=e.comment;t&&s&&(t=t.replace(/^\n+/,"")),t&&(s&&!o||""===r[r.length-1]||r.push(""),r.push(q(i(t),"")))}return r.join("\n")+"\n"}(this,e)}}function _t(e){if(C(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Nt extends Error{constructor(e,t,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=t}}class wt extends Nt{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class Lt extends Nt{constructor(e,t,r){super("YAMLWarning",e,t,r)}}const Ft=(e,t)=>r=>{if(-1===r.pos[0])return;r.linePos=r.pos.map(e=>t.linePos(e));const{line:n,col:a}=r.linePos[0];r.message+=` at line ${n}, column ${a}`;let i=a-1,s=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(i>=60&&s.length>80){const e=Math.min(i-39,s.length-79);s="…"+s.substring(e),i-=e-1}if(s.length>80&&(s=s.substring(0,79)+"…"),n>1&&/^ *$/.test(s.substring(0,i))){let r=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);r.length>80&&(r=r.substring(0,79)+"…\n"),s=r+s}if(/[^ ]/.test(s)){let e=1;const t=r.linePos[1];t?.line===n&&t.col>a&&(e=Math.max(1,Math.min(t.col-a,80-i)));const o=" ".repeat(i)+"^".repeat(e);r.message+=`:\n\n${s}\n${o}\n`}};function Vt(e,{flow:t,indicator:r,next:n,offset:a,onError:i,parentIndent:s,startOnNewline:o}){let l=!1,d=o,c=o,u="",m="",p=!1,h=!1,f=null,y=null,T=null,C=null,E=null,g=null,I=null;for(const a of e)switch(h&&("space"!==a.type&&"newline"!==a.type&&"comma"!==a.type&&i(a.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),f&&(d&&"comment"!==a.type&&"newline"!==a.type&&i(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),f=null),a.type){case"space":t||"doc-start"===r&&"flow-collection"===n?.type||!a.source.includes("\t")||(f=a),c=!0;break;case"comment":{c||i(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=a.source.substring(1)||" ";u?u+=m+e:u=e,m="",d=!1;break}case"newline":d?u?u+=a.source:g&&"seq-item-ind"===r||(l=!0):m+=a.source,d=!0,p=!0,(y||T)&&(C=a),c=!0;break;case"anchor":y&&i(a,"MULTIPLE_ANCHORS","A node can have at most one anchor"),a.source.endsWith(":")&&i(a.offset+a.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=a,I??(I=a.offset),d=!1,c=!1,h=!0;break;case"tag":T&&i(a,"MULTIPLE_TAGS","A node can have at most one tag"),T=a,I??(I=a.offset),d=!1,c=!1,h=!0;break;case r:(y||T)&&i(a,"BAD_PROP_ORDER",`Anchors and tags must be after the ${a.source} indicator`),g&&i(a,"UNEXPECTED_TOKEN",`Unexpected ${a.source} in ${t??"collection"}`),g=a,d="seq-item-ind"===r||"explicit-key-ind"===r,c=!1;break;case"comma":if(t){E&&i(a,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),E=a,d=!1,c=!1;break}default:i(a,"UNEXPECTED_TOKEN",`Unexpected ${a.type} token`),d=!1,c=!1}const A=e[e.length-1],b=A?A.offset+A.source.length:a;return h&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&i(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f&&(d&&f.indent<=s||"block-map"===n?.type||"block-seq"===n?.type)&&i(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:E,found:g,spaceBefore:l,comment:u,hasNewline:p,anchor:y,tag:T,newlineAfterProp:C,end:b,start:I??b}}function Ot(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end)for(const t of e.end)if("newline"===t.type)return!0;return!1;case"flow-collection":for(const t of e.items){for(const e of t.start)if("newline"===e.type)return!0;if(t.sep)for(const e of t.sep)if("newline"===e.type)return!0;if(Ot(t.key)||Ot(t.value))return!0}return!1;default:return!0}}function Dt(e,t,r){if("flow-collection"===t?.type){const n=t.end[0];n.indent!==e||"]"!==n.source&&"}"!==n.source||!Ot(t)||r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Mt(e,t,r){const{uniqueKeys:n}=e.options;if(!1===n)return!1;const a="function"==typeof n?n:(e,t)=>e===t||y(e)&&y(t)&&e.value===t.value;return t.some(e=>a(e.key,r))}const Bt="All mapping items must start at the same column";function Ut(e,t,r,n){let a="";if(e){let i=!1,s="";for(const o of e){const{source:e,type:l}=o;switch(l){case"space":i=!0;break;case"comment":{r&&!i&&n(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";a?a+=s+t:a=t,s="";break}case"newline":a&&(s+=e),i=!0;break;default:n(o,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:a,offset:t}}const Yt="Block collections are not allowed within flow collections",xt=e=>e&&("block-map"===e.type||"block-seq"===e.type);function Jt(e,t,r,n,a,i){const s="block-map"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,a,i){const s=new(i?.nodeClass??Se)(r.schema);r.atRoot&&(r.atRoot=!1);let o=n.offset,l=null;for(const i of n.items){const{start:d,key:c,sep:u,value:m}=i,p=Vt(d,{indicator:"explicit-key-ind",next:c??u?.[0],offset:o,onError:a,parentIndent:n.indent,startOnNewline:!0}),h=!p.found;if(h){if(c&&("block-seq"===c.type?a(o,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in c&&c.indent!==n.indent&&a(o,"BAD_INDENT",Bt)),!p.anchor&&!p.tag&&!u){l=p.end,p.comment&&(s.comment?s.comment+="\n"+p.comment:s.comment=p.comment);continue}(p.newlineAfterProp||Ot(c))&&a(c??d[d.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else p.found?.indent!==n.indent&&a(o,"BAD_INDENT",Bt);r.atKey=!0;const f=p.end,y=c?e(r,c,p,a):t(r,f,d,null,p,a);r.schema.compat&&Dt(n.indent,c,a),r.atKey=!1,Mt(r,s.items,y)&&a(f,"DUPLICATE_KEY","Map keys must be unique");const T=Vt(u??[],{indicator:"map-value-ind",next:m,offset:y.range[2],onError:a,parentIndent:n.indent,startOnNewline:!c||"block-scalar"===c.type});if(o=T.end,T.found){h&&("block-map"!==m?.type||T.hasNewline||a(o,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&p.start<T.found.offset-1024&&a(y.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const l=m?e(r,m,T,a):t(r,o,u,null,T,a);r.schema.compat&&Dt(n.indent,m,a),o=l.range[2];const d=new Ee(y,l);r.options.keepSourceTokens&&(d.srcToken=i),s.items.push(d)}else{h&&a(y.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),T.comment&&(y.comment?y.comment+="\n"+T.comment:y.comment=T.comment);const e=new Ee(y);r.options.keepSourceTokens&&(e.srcToken=i),s.items.push(e)}}return l&&l<o&&a(l,"IMPOSSIBLE","Map comment with trailing content"),s.range=[n.offset,o,l??o],s}(e,t,r,n,i):"block-seq"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,a,i){const s=new(i?.nodeClass??_e)(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let o=n.offset,l=null;for(const{start:i,value:d}of n.items){const c=Vt(i,{indicator:"seq-item-ind",next:d,offset:o,onError:a,parentIndent:n.indent,startOnNewline:!0});if(!c.found){if(!(c.anchor||c.tag||d)){l=c.end,c.comment&&(s.comment=c.comment);continue}"block-seq"===d?.type?a(c.end,"BAD_INDENT","All sequence items must start at the same column"):a(o,"MISSING_CHAR","Sequence item without - indicator")}const u=d?e(r,d,c,a):t(r,c.end,i,null,c,a);r.schema.compat&&Dt(n.indent,d,a),o=u.range[2],s.items.push(u)}return s.range=[n.offset,o,l??o],s}(e,t,r,n,i):function({composeNode:e,composeEmptyNode:t},r,n,a,i){const s="{"===n.start.source,o=s?"flow map":"flow sequence",l=new(i?.nodeClass??(s?Se:_e))(r.schema);l.flow=!0;const d=r.atRoot;d&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let c=n.offset+n.start.source.length;for(let i=0;i<n.items.length;++i){const d=n.items[i],{start:u,key:m,sep:p,value:h}=d,y=Vt(u,{flow:o,indicator:"explicit-key-ind",next:m??p?.[0],offset:c,onError:a,parentIndent:n.indent,startOnNewline:!1});if(!y.found){if(!(y.anchor||y.tag||p||h)){0===i&&y.comma?a(y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):i<n.items.length-1&&a(y.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),y.comment&&(l.comment?l.comment+="\n"+y.comment:l.comment=y.comment),c=y.end;continue}!s&&r.options.strict&&Ot(m)&&a(m,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===i)y.comma&&a(y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(y.comma||a(y.start,"MISSING_CHAR",`Missing , between ${o} items`),y.comment){let e="";e:for(const t of u)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=l.items[l.items.length-1];f(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,y.comment=y.comment.substring(e.length+1)}}if(s||p||y.found){r.atKey=!0;const i=y.end,f=m?e(r,m,y,a):t(r,i,u,null,y,a);xt(m)&&a(f.range,"BLOCK_IN_FLOW",Yt),r.atKey=!1;const T=Vt(p??[],{flow:o,indicator:"map-value-ind",next:h,offset:f.range[2],onError:a,parentIndent:n.indent,startOnNewline:!1});if(T.found){if(!s&&!y.found&&r.options.strict){if(p)for(const e of p){if(e===T.found)break;if("newline"===e.type){a(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}y.start<T.found.offset-1024&&a(T.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else h&&("source"in h&&":"===h.source?.[0]?a(h,"MISSING_CHAR",`Missing space after : in ${o}`):a(T.start,"MISSING_CHAR",`Missing , or : between ${o} items`));const C=h?e(r,h,T,a):T.found?t(r,T.end,p,null,T,a):null;C?xt(h)&&a(C.range,"BLOCK_IN_FLOW",Yt):T.comment&&(f.comment?f.comment+="\n"+T.comment:f.comment=T.comment);const E=new Ee(f,C);if(r.options.keepSourceTokens&&(E.srcToken=d),s){const e=l;Mt(r,e.items,f)&&a(i,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(E)}else{const e=new Se(r.schema);e.flow=!0,e.items.push(E);const t=(C??f).range;e.range=[f.range[0],t[1],t[2]],l.items.push(e)}c=C?C.range[2]:T.end}else{const n=h?e(r,h,y,a):t(r,y.end,p,null,y,a);l.items.push(n),c=n.range[2],xt(h)&&a(n.range,"BLOCK_IN_FLOW",Yt)}}const u=s?"}":"]",[m,...p]=n.end;let h=c;if(m?.source===u)h=m.offset+m.source.length;else{const e=o[0].toUpperCase()+o.substring(1);a(c,d?"MISSING_CHAR":"BAD_INDENT",d?`${e} must end with a ${u}`:`${e} in block collection must be sufficiently indented and end with a ${u}`),m&&1!==m.source.length&&p.unshift(m)}if(p.length>0){const e=Ut(p,h,r.options.strict,a);e.comment&&(l.comment?l.comment+="\n"+e.comment:l.comment=e.comment),l.range=[n.offset,h,e.offset]}else l.range=[n.offset,h,h];return l}(e,t,r,n,i),o=s.constructor;return"!"===a||a===o.tagName?(s.tag=o.tagName,s):(a&&(s.tag=a),s)}function Pt(e,t,r){const n=t.offset,a=function({offset:e,props:t},r,n){if("block-scalar-header"!==t[0].type)return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:a}=t[0],i=a[0];let s=0,o="",l=-1;for(let t=1;t<a.length;++t){const r=a[t];if(o||"-"!==r&&"+"!==r){const n=Number(r);!s&&n?s=n:-1===l&&(l=e+t)}else o=r}-1!==l&&n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let d=!1,c="",u=a.length;for(let e=1;e<t.length;++e){const a=t[e];switch(a.type){case"space":d=!0;case"newline":u+=a.source.length;break;case"comment":r&&!d&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=a.source.length,c=a.source.substring(1);break;case"error":n(a,"UNEXPECTED_TOKEN",a.message),u+=a.source.length;break;default:{n(a,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${a.type}`);const e=a.source;e&&"string"==typeof e&&(u+=e.length)}}}return{mode:i,indent:s,chomp:o,comment:c,length:u}}(t,e.options.strict,r);if(!a)return{value:"",type:null,comment:"",range:[n,n,n]};const i=">"===a.mode?W.BLOCK_FOLDED:W.BLOCK_LITERAL,s=t.source?function(e){const t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),a=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let e=1;e<t.length;e+=2)a.push([t[e],t[e+1]]);return a}(t.source):[];let o=s.length;for(let e=s.length-1;e>=0;--e){const t=s[e][1];if(""!==t&&"\r"!==t)break;o=e}if(0===o){const e="+"===a.chomp&&s.length>0?"\n".repeat(Math.max(1,s.length-1)):"";let r=n+a.length;return t.source&&(r+=t.source.length),{value:e,type:i,comment:a.comment,range:[n,r,r]}}let l=t.indent+a.indent,d=t.offset+a.length,c=0;for(let t=0;t<o;++t){const[n,i]=s[t];if(""!==i&&"\r"!==i){if(n.length<l){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(d+n.length,"MISSING_CHAR",e)}0===a.indent&&(l=n.length),c=t,0!==l||e.atRoot||r(d,"BAD_INDENT","Block scalar values in collections must be indented");break}0===a.indent&&n.length>l&&(l=n.length),d+=n.length+i.length+1}for(let e=s.length-1;e>=o;--e)s[e][0].length>l&&(o=e+1);let u="",m="",p=!1;for(let e=0;e<c;++e)u+=s[e][0].slice(l)+"\n";for(let e=c;e<o;++e){let[t,n]=s[e];d+=t.length+n.length+1;const o="\r"===n[n.length-1];if(o&&(n=n.slice(0,-1)),n&&t.length<l){const e="Block scalar lines must not be less indented than their "+(a.indent?"explicit indentation indicator":"first line");r(d-n.length-(o?2:1),"BAD_INDENT",e),t=""}i===W.BLOCK_LITERAL?(u+=m+t.slice(l)+n,m="\n"):t.length>l||"\t"===n[0]?(" "===m?m="\n":p||"\n"!==m||(m="\n\n"),u+=m+t.slice(l)+n,m="\n",p=!0):""===n?"\n"===m?u+="\n":m="\n":(u+=m+n,m=" ",p=!1)}switch(a.chomp){case"-":break;case"+":for(let e=o;e<s.length;++e)u+="\n"+s[e][0].slice(l);"\n"!==u[u.length-1]&&(u+="\n");break;default:u+="\n"}const h=n+a.length+t.source.length;return{value:u,type:i,comment:a.comment,range:[n,h,h]}}function kt(e,t,r){const{offset:n,type:a,source:i,end:s}=e;let o,l;const d=(e,t,a)=>r(n+e,t,a);switch(a){case"scalar":o=W.PLAIN,l=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Wt(e)}(i,d);break;case"single-quoted-scalar":o=W.QUOTE_SINGLE,l=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),Wt(e.slice(1,-1)).replace(/''/g,"'")}(i,d);break;case"double-quoted-scalar":o=W.QUOTE_DOUBLE,l=function(e,t){let r="";for(let n=1;n<e.length-1;++n){const a=e[n];if("\r"!==a||"\n"!==e[n+1])if("\n"===a){const{fold:t,offset:a}=Kt(e,n);r+=t,n=a}else if("\\"===a){let a=e[++n];const i=jt[a];if(i)r+=i;else if("\n"===a)for(a=e[n+1];" "===a||"\t"===a;)a=e[1+ ++n];else if("\r"===a&&"\n"===e[n+1])for(a=e[1+ ++n];" "===a||"\t"===a;)a=e[1+ ++n];else if("x"===a||"u"===a||"U"===a){const i="x"===a?2:"u"===a?4:8;r+=$t(e,n+1,i,t),n+=i}else{const a=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),r+=a}}else if(" "===a||"\t"===a){const t=n;let i=e[n+1];for(;" "===i||"\t"===i;)i=e[1+ ++n];"\n"===i||"\r"===i&&"\n"===e[n+2]||(r+=n>t?e.slice(t,n+1):a)}else r+=a}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}(i,d);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[n,n+i.length,n+i.length]}}const c=n+i.length,u=Ut(s,c,t,r);return{value:l,type:o,comment:u.comment,range:[n,c,u.offset]}}function Wt(e){const t=/(.*?)\r?\n/sy;let r,n,a=t.exec(e);if(!a)return e;try{r=new RegExp("(?<![ \t])[ \t]+$"),n=new RegExp("^[ \t]+|(?<![ \t])[ \t]+$","g")}catch{r=/[ \t]+$/,n=/^[ \t]+|[ \t]+$/g}let i=a[1].replace(r,""),s=" ",o=t.lastIndex;for(;a=t.exec(e);){const e=a[1].replace(n,"");""===e?"\n"===s?i+=s:s="\n":(i+=s+e,s=" "),o=t.lastIndex}const l=/[ \t]*(.*)/sy;return l.lastIndex=o,a=l.exec(e),i+s+(a?.[1]??"")}function Kt(e,t){let r="",n=e[t+1];for(;!(" "!==n&&"\t"!==n&&"\n"!==n&&"\r"!==n||"\r"===n&&"\n"!==e[t+2]);)"\n"===n&&(r+="\n"),n=e[(t+=1)+1];return r||(r=" "),{fold:r,offset:t}}const jt={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function $t(e,t,r,n){const a=e.substr(t,r),i=a.length===r&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;try{return String.fromCodePoint(i)}catch{const a=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}function Xt(e,t,r,n){const{value:a,type:i,comment:s,range:o}="block-scalar"===t.type?Pt(e,t,n):kt(t,e.options.strict,n),l=r?e.directives.tagName(r.source,e=>n(r,"TAG_RESOLVE_FAILED",e)):null;let c,u;c=e.options.stringKeys&&e.atKey?e.schema[d]:l?function(e,t,r,n,a){if("!"===r)return e[d];const i=[];for(const t of e.tags)if(!t.collection&&t.tag===r){if(!t.default||!t.test)return t;i.push(t)}for(const e of i)if(e.test?.test(t))return e;const s=e.knownTags[r];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(a(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),e[d])}(e.schema,a,l,r,n):"scalar"===t.type?function({atKey:e,directives:t,schema:r},n,a,i){const s=r.tags.find(t=>(!0===t.default||e&&"key"===t.default)&&t.test?.test(n))||r[d];if(r.compat){const e=r.compat.find(e=>e.default&&e.test?.test(n))??r[d];s.tag!==e.tag&&i(a,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${t.tagString(s.tag)} or ${t.tagString(e.tag)}`,!0)}return s}(e,a,t,n):e.schema[d];try{const i=c.resolve(a,e=>n(r??t,"TAG_RESOLVE_FAILED",e),e.options);u=y(i)?i:new W(i)}catch(e){const i=e instanceof Error?e.message:String(e);n(r??t,"TAG_RESOLVE_FAILED",i),u=new W(a)}return u.range=o,u.source=a,i&&(u.type=i),l&&(u.tag=l),c.format&&(u.format=c.format),s&&(u.comment=s),u}function Gt(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let r=t[n];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++n];"space"===r?.type;)e+=r.source.length,r=t[++n];break}}return e}const qt={composeNode:Ht,composeEmptyNode:zt};function Ht(e,t,r,n){const a=e.atKey,{spaceBefore:i,comment:s,anchor:o,tag:l}=r;let d,c=!0;switch(t.type){case"alias":d=function({options:e},{offset:t,source:r,end:n},a){const i=new J(r.substring(1));""===i.source&&a(t,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&a(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const s=t+r.length,o=Ut(n,s,e.strict,a);return i.range=[t,s,o.offset],o.comment&&(i.comment=o.comment),i}(e,t,n),(o||l)&&n(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":d=Xt(e,t,l,n),o&&(d.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{d=function(e,t,r,n,a){const i=n.tag,s=i?t.directives.tagName(i.source,e=>a(i,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===r.type){const{anchor:e,newlineAfterProp:t}=n,r=e&&i?e.offset>i.offset?e:i:e??i;r&&(!t||t.offset<r.offset)&&a(r,"MISSING_CHAR","Missing newline after block sequence props")}const o="block-map"===r.type?"map":"block-seq"===r.type?"seq":"{"===r.start.source?"map":"seq";if(!i||!s||"!"===s||s===Se.tagName&&"map"===o||s===_e.tagName&&"seq"===o)return Jt(e,t,r,a,s);let l=t.schema.tags.find(e=>e.tag===s&&e.collection===o);if(!l){const n=t.schema.knownTags[s];if(n?.collection!==o)return n?a(i,"BAD_COLLECTION_TYPE",`${n.tag} used for ${o} collection, but expects ${n.collection??"scalar"}`,!0):a(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),Jt(e,t,r,a,s);t.schema.tags.push(Object.assign({},n,{default:!1})),l=n}const d=Jt(e,t,r,a,s,l),c=l.resolve?.(d,e=>a(i,"TAG_RESOLVE_FAILED",e),t.options)??d,u=E(c)?c:new W(c);return u.range=d.range,u.tag=s,l?.format&&(u.format=l.format),u}(qt,e,t,r,n),o&&(d.anchor=o.source.substring(1))}catch(e){n(t,"RESOURCE_EXHAUSTION",e instanceof Error?e.message:String(e))}break;default:n(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),c=!1}return d??(d=zt(e,t.offset,void 0,null,r,n)),o&&""===d.anchor&&n(o,"BAD_ALIAS","Anchor cannot be an empty string"),a&&e.options.stringKeys&&(!y(d)||"string"!=typeof d.value||d.tag&&"tag:yaml.org,2002:str"!==d.tag)&&n(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(d.spaceBefore=!0),s&&("scalar"===t.type&&""===t.source?d.comment=s:d.commentBefore=s),e.options.keepSourceTokens&&c&&(d.srcToken=t),d}function zt(e,t,r,n,{spaceBefore:a,comment:i,anchor:s,tag:o,end:l},d){const c=Xt(e,{type:"scalar",offset:Gt(t,r,n),indent:-1,source:""},o,d);return s&&(c.anchor=s.source.substring(1),""===c.anchor&&d(s,"BAD_ALIAS","Anchor cannot be an empty string")),a&&(c.spaceBefore=!0),i&&(c.comment=i,c.range[2]=l),c}function Qt(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:r}=e;return[t,t+("string"==typeof r?r.length:1)]}function Zt(e){let t="",r=!1,n=!1;for(let a=0;a<e.length;++a){const i=e[a];switch(i[0]){case"#":t+=(""===t?"":n?"\n\n":"\n")+(i.substring(1)||" "),r=!0,n=!1;break;case"%":"#"!==e[a+1]?.[0]&&(a+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:t,afterEmptyLine:n}}class er{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,r,n)=>{const a=Qt(e);n?this.warnings.push(new Lt(a,t,r)):this.errors.push(new wt(a,t,r))},this.directives=new O({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:r,afterEmptyLine:n}=Zt(this.prelude);if(r){const a=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${r}`:r;else if(n||e.directives.docStart||!a)e.commentBefore=r;else if(C(a)&&!a.flow&&a.items.length>0){let e=a.items[0];f(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${r}\n${t}`:r}else{const e=a.commentBefore;a.commentBefore=e?`${r}\n${e}`:r}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Zt(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(const t of e)yield*this.next(t);yield*this.end(t,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,r,n)=>{const a=Qt(e);a[0]+=t,this.onError(a,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=function(e,t,{offset:r,start:n,value:a,end:i},s){const o=Object.assign({_directives:t},e),l=new vt(void 0,o),d={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},c=Vt(n,{indicator:"doc-start",next:a??i?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});c.found&&(l.directives.docStart=!0,!a||"block-map"!==a.type&&"block-seq"!==a.type||c.hasNewline||s(c.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=a?Ht(d,a,c,s):zt(d,c.end,n,null,c,s);const u=l.contents.range[2],m=Ut(i,u,!1,s);return m.comment&&(l.comment=m.comment),l.range=[r,u,m.offset],l}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new wt(Qt(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new wt(Qt(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=Ut(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new wt(Qt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new vt(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}}function tr(e,t=!0,r){if(e){const n=(e,t,n)=>{const a="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!r)throw new wt([a,a+1],t,n);r(a,t,n)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return kt(e,t,n);case"block-scalar":return Pt({options:{strict:t}},e,n)}}return null}function rr(e,t){const{implicitKey:r=!1,indent:n,inFlow:a=!1,offset:i=-1,type:s="PLAIN"}=t,o=le({type:s,value:e},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:n,source:"\n"}];switch(o[0]){case"|":case">":{const e=o.indexOf("\n"),t=o.substring(0,e),r=o.substring(e+1)+"\n",a=[{type:"block-scalar-header",offset:i,indent:n,source:t}];return ar(a,l)||a.push({type:"newline",offset:-1,indent:n,source:"\n"}),{type:"block-scalar",offset:i,indent:n,props:a,source:r}}case'"':return{type:"double-quoted-scalar",offset:i,indent:n,source:o,end:l};case"'":return{type:"single-quoted-scalar",offset:i,indent:n,source:o,end:l};default:return{type:"scalar",offset:i,indent:n,source:o,end:l}}}function nr(e,t,r={}){let{afterKey:n=!1,implicitKey:a=!1,inFlow:i=!1,type:s}=r,o="indent"in e?e.indent:null;if(n&&"number"==typeof o&&(o+=2),!s)switch(e.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");s=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}const l=le({type:s,value:t},{implicitKey:a||null===o,indent:null!==o&&o>0?" ".repeat(o):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":!function(e,t){const r=t.indexOf("\n"),n=t.substring(0,r),a=t.substring(r+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=n,e.source=a}else{const{offset:t}=e,r="indent"in e?e.indent:-1,i=[{type:"block-scalar-header",offset:t,indent:r,source:n}];ar(i,"end"in e?e.end:void 0)||i.push({type:"newline",offset:-1,indent:r,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:r,props:i,source:a})}}(e,l);break;case'"':ir(e,l,"double-quoted-scalar");break;case"'":ir(e,l,"single-quoted-scalar");break;default:ir(e,l,"scalar")}}function ar(e,t){if(t)for(const r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function ir(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,e.source=t;break;case"block-scalar":{const n=e.props.slice(1);let a=t.length;"block-scalar-header"===e.props[0].type&&(a-=e.props[0].source.length);for(const e of n)e.offset+=a;delete e.props,Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{const n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:r,source:t,end:[n]});break}default:{const n="indent"in e?e.indent:-1,a="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:r,indent:n,source:t,end:a})}}}const sr=e=>"type"in e?or(e):lr(e);function or(e){switch(e.type){case"block-scalar":{let t="";for(const r of e.props)t+=or(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(const r of e.items)t+=lr(r);return t}case"flow-collection":{let t=e.start.source;for(const r of e.items)t+=lr(r);for(const r of e.end)t+=r.source;return t}case"document":{let t=lr(e);if(e.end)for(const r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const r of e.end)t+=r.source;return t}}}function lr({start:e,key:t,sep:r,value:n}){let a="";for(const t of e)a+=t.source;if(t&&(a+=or(t)),r)for(const e of r)a+=e.source;return n&&(a+=or(n)),a}const dr=Symbol("break visit"),cr=Symbol("skip children"),ur=Symbol("remove item");function mr(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),pr(Object.freeze([]),e,t)}function pr(e,t,r){let n=r(t,e);if("symbol"==typeof n)return n;for(const a of["key","value"]){const i=t[a];if(i&&"items"in i){for(let t=0;t<i.items.length;++t){const n=pr(Object.freeze(e.concat([[a,t]])),i.items[t],r);if("number"==typeof n)t=n-1;else{if(n===dr)return dr;n===ur&&(i.items.splice(t,1),t-=1)}}"function"==typeof n&&"key"===a&&(n=n(t,e))}}return"function"==typeof n?n(t,e):n}mr.BREAK=dr,mr.SKIP=cr,mr.REMOVE=ur,mr.itemAtPath=(e,t)=>{let r=e;for(const[e,n]of t){const t=r?.[e];if(!t||!("items"in t))return;r=t.items[n]}return r},mr.parentCollection=(e,t)=>{const r=mr.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],a=r?.[n];if(a&&"items"in a)return a;throw new Error("Parent collection not found")};const hr="\ufeff",fr="",yr="",Tr="",Cr=e=>!!e&&"items"in e,Er=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type);function gr(e){switch(e){case hr:return"<BOM>";case fr:return"<DOC>";case yr:return"<FLOW_END>";case Tr:return"<SCALAR>";default:return JSON.stringify(e)}}function Ir(e){switch(e){case hr:return"byte-order-mark";case fr:return"doc-mode";case yr:return"flow-error-end";case Tr:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Ar(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const br=new Set("0123456789ABCDEFabcdef"),Rr=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Sr=new Set(",[]{}"),vr=new Set(" ,[]{}\n\r\t"),_r=e=>!e||vr.has(e);class Nr{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;" "===t;)t=this.buffer[++r+e];if("\r"===t){const t=this.buffer[r+e+1];if("\n"===t||!t&&!this.atEnd)return e+r+1}return"\n"===t||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&Ar(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if(e[0]===hr&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,r=e.indexOf("#");for(;-1!==r;){const n=e[r-1];if(" "===n||"\t"===n){t=r-1;break}r=e.indexOf("#",r+1)}for(;;){const r=e[t-1];if(" "!==r&&"\t"!==r)break;t-=1}const n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield fr,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if(("---"===e||"..."===e)&&Ar(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ar(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&Ar(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(_r),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do{e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=(yield*this.pushSpaces(!0))}while(e+t>0);const n=this.getLine();if(null===n)return this.setNext("flow");if((-1!==r&&r<this.indentNext&&"#"!==n[0]||0===r&&(n.startsWith("---")||n.startsWith("..."))&&Ar(n[3]))&&(r!==this.indentNext-1||1!==this.flowLevel||"]"!==n[0]&&"}"!==n[0]))return this.flowLevel=0,yield yr,yield*this.parseLineStart();let a=0;for(;","===n[a];)a+=(yield*this.pushCount(1)),a+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(a+=(yield*this.pushIndicators()),n[a]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-a),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(_r),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||Ar(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const r=this.buffer.substring(0,t);let n=r.indexOf("\n",this.pos);if(-1!==n){for(;-1!==n;){const e=this.continueScalar(n+1);if(-1===e)break;n=r.indexOf("\n",e)}-1!==n&&(t=n-("\r"===r[n-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>Ar(e)||"#"===e)}*parseBlockScalar(){let e,t=this.pos-1,r=0;e:for(let n=this.pos;e=this.buffer[n];++n)switch(e){case" ":r+=1;break;case"\n":t=n,r=0;break;case"\r":{const e=this.buffer[n+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let n=t+1;for(e=this.buffer[n];" "===e;)e=this.buffer[++n];if("\t"===e){for(;"\t"===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++n];t=n-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,n=this.buffer[e];"\r"===n&&(n=this.buffer[--e]);const a=e;for(;" "===n;)n=this.buffer[--e];if(!("\n"===n&&e>=this.pos&&e+1+r>a))break;t=e}return yield Tr,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,r=this.pos-1,n=this.pos-1;for(;t=this.buffer[++n];)if(":"===t){const t=this.buffer[n+1];if(Ar(t)||e&&Sr.has(t))break;r=n}else if(Ar(t)){let a=this.buffer[n+1];if("\r"===t&&("\n"===a?(n+=1,t="\n",a=this.buffer[n+1]):r=n),"#"===a||e&&Sr.has(a))break;if("\n"===t){const e=this.continueScalar(n+1);if(-1===e)break;n=Math.max(n,e-2)}}else{if(e&&Sr.has(t))break;r=n}return t||this.atEnd?(yield Tr,yield*this.pushToIndex(r+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=(yield*this.pushTag()),e+=(yield*this.pushSpaces(!0));continue e;case"&":e+=(yield*this.pushUntil(_r)),e+=(yield*this.pushSpaces(!0));continue e;case"-":case"?":case":":{const t=this.flowLevel>0,r=this.charAt(1);if(Ar(r)||t&&Sr.has(r)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=(yield*this.pushCount(1)),e+=(yield*this.pushSpaces(!0));continue e}}}break e}return e}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!Ar(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Rr.has(t))t=this.buffer[++e];else{if("%"!==t||!br.has(this.buffer[e+1])||!br.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,r=this.pos-1;do{t=this.buffer[++r]}while(" "===t||e&&"\t"===t);const n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class wr{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){const n=t+r>>1;this.lineStarts[n]<e?t=n+1:r=n}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}function Lr(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function Fr(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function Vr(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Or(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function Dr(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function Mr(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function Br(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||Lr(t.start,"explicit-key-ind")||Lr(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,Vr(t.value)?t.value.end?Mr(t.value.end,t.sep):t.value.end=t.sep:Mr(t.start,t.sep),delete t.sep)}class Ur{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Nr,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=Ir(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||"doc-end"===e?.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&Br(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const r=e.items[e.items.length-1];if(r.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!r.sep)return Object.assign(r,{key:t,sep:[]}),void(this.onKeyLine=!r.explicitKey);r.value=t;break}case"block-seq":{const r=e.items[e.items.length-1];r.value?e.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{const r=e.items[e.items.length-1];return void(!r||r.value?e.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&-1===Fr(r.start)&&(0===t.indent||r.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=r.start:e.items.push({start:r.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(-1!==Fr(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=Dr(Or(this.peek(2)));let r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];const n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;"comment"===n?.type?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n))return Mr(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const r=!this.onKeyLine&&this.indent===e.indent,n=r&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let a=[];if(n&&t.sep&&!t.value){const r=[];for(let n=0;n<t.sep.length;++n){const a=t.sep[n];switch(a.type){case"newline":r.push(n);break;case"space":break;case"comment":a.indent>e.indent&&(r.length=0);break;default:r.length=0}}r.length>=2&&(a=t.sep.splice(r[1]))}switch(this.type){case"anchor":case"tag":return void(n||t.value?(a.push(this.sourceToken),e.items.push({start:a}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?n||t.value?(a.push(this.sourceToken),e.items.push({start:a,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Lr(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(Vr(t.key)&&!Lr(t.sep,"newline")){const e=Dr(t.start),r=t.key,n=t.sep;n.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:r,sep:n}]})}else a.length>0?t.sep=t.sep.concat(a,this.sourceToken):t.sep.push(this.sourceToken);else if(Lr(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=Dr(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||n?e.items.push({start:a,key:null,sep:[this.sourceToken]}):Lr(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(n||t.value?(e.items.push({start:a,key:r,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(r):(Object.assign(t,{key:r,sep:[]}),this.onKeyLine=!0))}default:{const n=this.startBlockValue(e);if(n){if("block-seq"===n.type){if(!t.explicitKey&&t.sep&&!Lr(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else r&&e.items.push({start:a});return void this.stack.push(n)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;"comment"===n?.type?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n))return Mr(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||Lr(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while("flow-collection"===e?.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const r=Dr(Or(t));Br(e);const n=e.end.splice(1,e.end.length);n.push(this.sourceToken);const a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=Dr(Or(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=Dr(Or(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type)}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}function Yr(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new wr||null,prettyErrors:t}}function xr(e,t={}){const{lineCounter:r,prettyErrors:n}=Yr(t),a=new Ur(r?.addNewLine),i=new er(t),s=Array.from(i.compose(a.parse(e)));if(n&&r)for(const t of s)t.errors.forEach(Ft(e,r)),t.warnings.forEach(Ft(e,r));return s.length>0?s:Object.assign([],{empty:!0},i.streamInfo())}function Jr(e,t={}){const{lineCounter:r,prettyErrors:n}=Yr(t),a=new Ur(r?.addNewLine),i=new er(t);let s=null;for(const t of i.compose(a.parse(e),!0,e.length))if(s){if("silent"!==s.options.logLevel){s.errors.push(new wt(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else s=t;return n&&r&&(s.errors.forEach(Ft(e,r)),s.warnings.forEach(Ft(e,r))),s}function Pr(e,t,r){let n;"function"==typeof t?n=t:void 0===r&&t&&"object"==typeof t&&(r=t);const a=Jr(e,r);if(!a)return null;if(a.warnings.forEach(e=>ue(a.options.logLevel,e)),a.errors.length>0){if("silent"!==a.options.logLevel)throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:n},r))}function kr(e,t,r){let n=null;if("function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??t??{};if(!e)return}return p(e)&&!n?e.toString(r):new vt(e,n,r).toString(r)}}};const t={};function r(n){const a=t[n];if(void 0!==a)return a.exports;const i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};let n={};(()=>{let e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.InstanceDataLinkAtom=e.InstanceDataTypedAtom=e.InstanceDataNotationAtom=e.InstanceDataLabelAtom=e.InstanceDataStringAtom=e.InstanceDataEmptyAtom=e.InstanceDataEmptyNode=e.ReservedNames=e.AttributeValueNamePolicy=e.InstanceDataAttributeValueFieldName=e.InstanceDataAttributeValueField=e.InstanceDataContainer=e.TemplateInstance=e.TemplateBuilder=e.Template=e.TemplateElementBuilder=e.TemplateElement=e.TemplateField=e.AbstractArtifact=e.AbstractInstanceArtifact=e.CedarFieldType=e.AbstractContainerArtifact=e.AbstractSchemaArtifact=e.YamlTemplateWriter=e.JsonTemplateWriter=e.YamlTemplateElementWriter=e.JsonTemplateElementWriter=e.JsonTemplateInstanceReader=e.InstanceValidator=e.InstanceInflater=e.YamlTemplateInstanceReader=e.YamlTemplateReader=e.JsonTemplateReader=e.YamlTemplateElementReader=e.JsonTemplateElementReader=e.YamlTemplateFieldReader=e.JsonTemplateFieldReader=e.JsonAbstractArtifactWriter=e.JsonAbstractArtifactReader=e.JsonAbstractInstanceArtifactReader=e.JsonAbstractSchemaArtifactReader=e.CedarYamlWriters=e.CedarYamlReaders=e.CedarJsonWriters=e.CedarJsonReaders=e.CedarReaders=e.CedarWriters=e.CedarBuilders=e.YamlTemplateFieldWriter=e.JsonTemplateFieldWriter=void 0,e.Language=e.PavVersion=e.CedarUser=e.CedarArtifactType=e.CedarFieldCategory=e.YamlValues=e.JsonTemplateInstanceWriter=e.JsonTemplateInstanceContent=e.PropertyIri=e.RoundTrip=e.ComparisonError=e.CedarArtifactId=e.BioportalTermType=e.BiboStatus=e.Iri=e.NumberType=e.TemporalType=e.TimeFormat=e.TemporalGranularity=e.JsonPath=e.SchemaVersion=e.IsoDate=e.JsonNode=e.ChildDeploymentInfoStaticBuilder=e.ChildDeploymentInfoStatic=e.ChildDeploymentInfoAlwaysMultipleBuilder=e.ChildDeploymentInfoAlwaysMultiple=e.ChildDeploymentInfoAlwaysSingleBuilder=e.ChildDeploymentInfoAlwaysSingle=e.ChildDeploymentInfoBuilder=e.ChildDeploymentInfo=e.ChildDeploymentInfoElementBuilder=e.ChildDeploymentInfoElement=e.AbstractFieldChildDeploymentInfoBuilder=e.AbstractFieldChildDeploymentInfo=e.AbstractDynamicChildDeploymentInfoBuilder=e.AbstractDynamicChildDeploymentInfo=e.AbstractChildDeploymentInfoBuilder=e.AbstractChildDeploymentInfo=e.ControlledTermVersion=e.ControlledTermActionBuilder=e.ControlledTermValueSetBuilder=e.ControlledTermOntologyBuilder=e.ControlledTermClassBuilder=e.ControlledTermBranchBuilder=e.IriSyntax=e.ControlledTermDefaultValue=e.ControlledTermDefaultValueBuilder=e.TemplateInstanceBuilder=e.InstanceDataControlledAtom=void 0,e.SchemaExtensions=e.AnnotationAtValue=e.AnnotationAtId=e.Annotations=e.YamlObjectComparator=e.JsonObjectComparator=e.ComparisonResult=e.YamlArtifactParsingResult=e.JsonArtifactParsingResult=e.YamlArtifactReaderResult=e.JsonArtifactReaderResult=e.YamlTemplateInstanceReaderResult=e.JsonTemplateInstanceReaderResult=e.YamlTemplateReaderResult=e.JsonTemplateReaderResult=e.YamlTemplateElementReaderResult=e.JsonTemplateElementReaderResult=e.YamlTemplateFieldReaderResult=e.JsonTemplateFieldReaderResult=e.ComparisonErrorType=void 0;const t=r(1625);Object.defineProperty(e,"InstanceDataNotationAtom",{enumerable:!0,get:function(){return t.InstanceDataNotationAtom}});const a=r(8810);Object.defineProperty(e,"CedarWriters",{enumerable:!0,get:function(){return a.CedarWriters}});const i=r(6568);Object.defineProperty(e,"CedarBuilders",{enumerable:!0,get:function(){return i.CedarBuilders}});const s=r(4381);Object.defineProperty(e,"JsonTemplateFieldReader",{enumerable:!0,get:function(){return s.JsonTemplateFieldReader}});const o=r(7909);Object.defineProperty(e,"JsonTemplateElementReader",{enumerable:!0,get:function(){return o.JsonTemplateElementReader}});const l=r(5291);Object.defineProperty(e,"JsonTemplateReader",{enumerable:!0,get:function(){return l.JsonTemplateReader}});const d=r(2748);Object.defineProperty(e,"JsonTemplateFieldWriter",{enumerable:!0,get:function(){return d.JsonTemplateFieldWriterInternal}});const c=r(5430);Object.defineProperty(e,"YamlTemplateFieldWriter",{enumerable:!0,get:function(){return c.YamlTemplateFieldWriterInternal}});const u=r(6645);Object.defineProperty(e,"JsonTemplateElementWriter",{enumerable:!0,get:function(){return u.JsonTemplateElementWriter}});const m=r(7519);Object.defineProperty(e,"JsonTemplateWriter",{enumerable:!0,get:function(){return m.JsonTemplateWriter}});const p=r(5251);Object.defineProperty(e,"YamlTemplateElementWriter",{enumerable:!0,get:function(){return p.YamlTemplateElementWriter}});const h=r(1933);Object.defineProperty(e,"YamlTemplateWriter",{enumerable:!0,get:function(){return h.YamlTemplateWriter}});const f=r(9129);Object.defineProperty(e,"TemplateField",{enumerable:!0,get:function(){return f.TemplateField}});const y=r(7661);Object.defineProperty(e,"TemplateElement",{enumerable:!0,get:function(){return y.TemplateElement}});const T=r(1762);Object.defineProperty(e,"TemplateElementBuilder",{enumerable:!0,get:function(){return T.TemplateElementBuilder}});const C=r(3281);Object.defineProperty(e,"Template",{enumerable:!0,get:function(){return C.Template}});const E=r(766);Object.defineProperty(e,"TemplateBuilder",{enumerable:!0,get:function(){return E.TemplateBuilder}});const g=r(4925);Object.defineProperty(e,"TemplateInstanceBuilder",{enumerable:!0,get:function(){return g.TemplateInstanceBuilder}});const I=r(9517);Object.defineProperty(e,"JsonNode",{enumerable:!0,get:function(){return I.JsonNode}});const A=r(9857);Object.defineProperty(e,"IsoDate",{enumerable:!0,get:function(){return A.IsoDate}});const b=r(8557);Object.defineProperty(e,"SchemaVersion",{enumerable:!0,get:function(){return b.SchemaVersion}});const R=r(3188);Object.defineProperty(e,"JsonPath",{enumerable:!0,get:function(){return R.JsonPath}});const S=r(7974);Object.defineProperty(e,"TemporalGranularity",{enumerable:!0,get:function(){return S.TemporalGranularity}});const v=r(3764);Object.defineProperty(e,"TimeFormat",{enumerable:!0,get:function(){return v.TimeFormat}});const _=r(8588);Object.defineProperty(e,"TemporalType",{enumerable:!0,get:function(){return _.TemporalType}});const N=r(3447);Object.defineProperty(e,"NumberType",{enumerable:!0,get:function(){return N.NumberType}});const w=r(8802);Object.defineProperty(e,"Iri",{enumerable:!0,get:function(){return w.Iri}});const L=r(2957);Object.defineProperty(e,"ControlledTermBranchBuilder",{enumerable:!0,get:function(){return L.ControlledTermBranchBuilder}});const F=r(3091);Object.defineProperty(e,"ControlledTermClassBuilder",{enumerable:!0,get:function(){return F.ControlledTermClassBuilder}});const V=r(5491);Object.defineProperty(e,"ControlledTermOntologyBuilder",{enumerable:!0,get:function(){return V.ControlledTermOntologyBuilder}});const O=r(1556);Object.defineProperty(e,"ControlledTermValueSetBuilder",{enumerable:!0,get:function(){return O.ControlledTermValueSetBuilder}});const D=r(2480);Object.defineProperty(e,"ControlledTermDefaultValueBuilder",{enumerable:!0,get:function(){return D.ControlledTermDefaultValueBuilder}});const M=r(7295);Object.defineProperty(e,"ControlledTermDefaultValue",{enumerable:!0,get:function(){return M.ControlledTermDefaultValue}});const B=r(8446);Object.defineProperty(e,"IriSyntax",{enumerable:!0,get:function(){return B.IriSyntax}});const U=r(5753);Object.defineProperty(e,"ControlledTermVersion",{enumerable:!0,get:function(){return U.ControlledTermVersion}});const Y=r(3910);Object.defineProperty(e,"BiboStatus",{enumerable:!0,get:function(){return Y.BiboStatus}});const x=r(455);Object.defineProperty(e,"ChildDeploymentInfo",{enumerable:!0,get:function(){return x.ChildDeploymentInfo}});const J=r(3608);Object.defineProperty(e,"ChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return J.ChildDeploymentInfoBuilder}});const P=r(8534);Object.defineProperty(e,"CedarArtifactId",{enumerable:!0,get:function(){return P.CedarArtifactId}});const k=r(2888);Object.defineProperty(e,"ComparisonError",{enumerable:!0,get:function(){return k.ComparisonError}});const W=r(1888);Object.defineProperty(e,"RoundTrip",{enumerable:!0,get:function(){return W.RoundTrip}});const K=r(6389);Object.defineProperty(e,"PropertyIri",{enumerable:!0,get:function(){return K.PropertyIri}});const j=r(6320);Object.defineProperty(e,"JsonTemplateInstanceWriter",{enumerable:!0,get:function(){return j.JsonTemplateInstanceWriter}});const $=r(350);Object.defineProperty(e,"JsonTemplateInstanceContent",{enumerable:!0,get:function(){return $.JsonTemplateInstanceContent}});const X=r(7733);Object.defineProperty(e,"ControlledTermActionBuilder",{enumerable:!0,get:function(){return X.ControlledTermActionBuilder}});const G=r(8349);Object.defineProperty(e,"YamlValues",{enumerable:!0,get:function(){return G.YamlValues}});const q=r(4531);Object.defineProperty(e,"BioportalTermType",{enumerable:!0,get:function(){return q.BioportalTermType}});const H=r(8421);Object.defineProperty(e,"CedarFieldCategory",{enumerable:!0,get:function(){return H.CedarFieldCategory}});const z=r(2999);Object.defineProperty(e,"YamlTemplateFieldReader",{enumerable:!0,get:function(){return z.YamlTemplateFieldReader}});const Q=r(8239);Object.defineProperty(e,"YamlTemplateElementReader",{enumerable:!0,get:function(){return Q.YamlTemplateElementReader}});const Z=r(5677);Object.defineProperty(e,"YamlTemplateReader",{enumerable:!0,get:function(){return Z.YamlTemplateReader}});const ee=r(9946);Object.defineProperty(e,"YamlTemplateInstanceReader",{enumerable:!0,get:function(){return ee.YamlTemplateInstanceReader}});const te=r(9961);Object.defineProperty(e,"InstanceInflater",{enumerable:!0,get:function(){return te.InstanceInflater}});const re=r(8410);Object.defineProperty(e,"InstanceValidator",{enumerable:!0,get:function(){return re.InstanceValidator}});const ne=r(2763);Object.defineProperty(e,"CedarArtifactType",{enumerable:!0,get:function(){return ne.CedarArtifactType}});const ae=r(978);Object.defineProperty(e,"JsonAbstractSchemaArtifactReader",{enumerable:!0,get:function(){return ae.JsonAbstractSchemaArtifactReader}});const ie=r(1998);Object.defineProperty(e,"CedarReaders",{enumerable:!0,get:function(){return ie.CedarReaders}});const se=r(8333);Object.defineProperty(e,"AbstractSchemaArtifact",{enumerable:!0,get:function(){return se.AbstractSchemaArtifact}});const oe=r(5451);Object.defineProperty(e,"AbstractContainerArtifact",{enumerable:!0,get:function(){return oe.AbstractContainerArtifact}});const le=r(4869);Object.defineProperty(e,"CedarFieldType",{enumerable:!0,get:function(){return le.CedarFieldType}});const de=r(3161);Object.defineProperty(e,"JsonAbstractArtifactWriter",{enumerable:!0,get:function(){return de.JsonAbstractArtifactWriter}});const ce=r(9760);Object.defineProperty(e,"ComparisonErrorType",{enumerable:!0,get:function(){return ce.ComparisonErrorType}});const ue=r(9607);Object.defineProperty(e,"CedarJsonWriters",{enumerable:!0,get:function(){return ue.CedarJsonWriters}});const me=r(2103);Object.defineProperty(e,"CedarJsonReaders",{enumerable:!0,get:function(){return me.CedarJsonReaders}});const pe=r(5359);Object.defineProperty(e,"CedarYamlWriters",{enumerable:!0,get:function(){return pe.CedarYamlWriters}});const he=r(8639);Object.defineProperty(e,"CedarYamlReaders",{enumerable:!0,get:function(){return he.CedarYamlReaders}});const fe=r(5697);Object.defineProperty(e,"AbstractInstanceArtifact",{enumerable:!0,get:function(){return fe.AbstractInstanceArtifact}});const ye=r(2674);Object.defineProperty(e,"AbstractArtifact",{enumerable:!0,get:function(){return ye.AbstractArtifact}});const Te=r(2272);Object.defineProperty(e,"TemplateInstance",{enumerable:!0,get:function(){return Te.TemplateInstance}});const Ce=r(7723);Object.defineProperty(e,"InstanceDataContainer",{enumerable:!0,get:function(){return Ce.InstanceDataContainer}});const Ee=r(9327);Object.defineProperty(e,"InstanceDataAttributeValueField",{enumerable:!0,get:function(){return Ee.InstanceDataAttributeValueField}});const ge=r(3644);Object.defineProperty(e,"InstanceDataAttributeValueFieldName",{enumerable:!0,get:function(){return ge.InstanceDataAttributeValueFieldName}});const Ie=r(4033);Object.defineProperty(e,"AttributeValueNamePolicy",{enumerable:!0,get:function(){return Ie.AttributeValueNamePolicy}});const Ae=r(5588);Object.defineProperty(e,"ReservedNames",{enumerable:!0,get:function(){return Ae.ReservedNames}});const be=r(4465);Object.defineProperty(e,"InstanceDataEmptyNode",{enumerable:!0,get:function(){return be.InstanceDataEmptyNode}});const Re=r(7548);Object.defineProperty(e,"InstanceDataEmptyAtom",{enumerable:!0,get:function(){return Re.InstanceDataEmptyAtom}});const Se=r(9167);Object.defineProperty(e,"InstanceDataLabelAtom",{enumerable:!0,get:function(){return Se.InstanceDataLabelAtom}});const ve=r(5222);Object.defineProperty(e,"InstanceDataStringAtom",{enumerable:!0,get:function(){return ve.InstanceDataStringAtom}});const _e=r(4877);Object.defineProperty(e,"InstanceDataTypedAtom",{enumerable:!0,get:function(){return _e.InstanceDataTypedAtom}});const Ne=r(7571);Object.defineProperty(e,"InstanceDataLinkAtom",{enumerable:!0,get:function(){return Ne.InstanceDataLinkAtom}});const we=r(8193);Object.defineProperty(e,"InstanceDataControlledAtom",{enumerable:!0,get:function(){return we.InstanceDataControlledAtom}});const Le=r(9232);Object.defineProperty(e,"JsonTemplateInstanceReader",{enumerable:!0,get:function(){return Le.JsonTemplateInstanceReader}});const Fe=r(3326);Object.defineProperty(e,"JsonAbstractInstanceArtifactReader",{enumerable:!0,get:function(){return Fe.JsonAbstractInstanceArtifactReader}});const Ve=r(7993);Object.defineProperty(e,"JsonAbstractArtifactReader",{enumerable:!0,get:function(){return Ve.JsonAbstractArtifactReader}});const Oe=r(7954);Object.defineProperty(e,"JsonTemplateReaderResult",{enumerable:!0,get:function(){return Oe.JsonTemplateReaderResult}});const De=r(2234);Object.defineProperty(e,"CedarUser",{enumerable:!0,get:function(){return De.CedarUser}});const Me=r(8518);Object.defineProperty(e,"JsonArtifactReaderResult",{enumerable:!0,get:function(){return Me.JsonArtifactReaderResult}});const Be=r(4948);Object.defineProperty(e,"JsonTemplateElementReaderResult",{enumerable:!0,get:function(){return Be.JsonTemplateElementReaderResult}});const Ue=r(6396);Object.defineProperty(e,"JsonTemplateFieldReaderResult",{enumerable:!0,get:function(){return Ue.JsonTemplateFieldReaderResult}});const Ye=r(6537);Object.defineProperty(e,"JsonTemplateInstanceReaderResult",{enumerable:!0,get:function(){return Ye.JsonTemplateInstanceReaderResult}});const xe=r(1027);Object.defineProperty(e,"PavVersion",{enumerable:!0,get:function(){return xe.PavVersion}});const Je=r(3581);Object.defineProperty(e,"ChildDeploymentInfoStatic",{enumerable:!0,get:function(){return Je.ChildDeploymentInfoStatic}});const Pe=r(8290);Object.defineProperty(e,"ChildDeploymentInfoStaticBuilder",{enumerable:!0,get:function(){return Pe.ChildDeploymentInfoStaticBuilder}});const ke=r(2266);Object.defineProperty(e,"ChildDeploymentInfoAlwaysSingle",{enumerable:!0,get:function(){return ke.ChildDeploymentInfoAlwaysSingle}});const We=r(587);Object.defineProperty(e,"ChildDeploymentInfoAlwaysSingleBuilder",{enumerable:!0,get:function(){return We.ChildDeploymentInfoAlwaysSingleBuilder}});const Ke=r(8878);Object.defineProperty(e,"ChildDeploymentInfoAlwaysMultiple",{enumerable:!0,get:function(){return Ke.ChildDeploymentInfoAlwaysMultiple}});const je=r(3239);Object.defineProperty(e,"ChildDeploymentInfoAlwaysMultipleBuilder",{enumerable:!0,get:function(){return je.ChildDeploymentInfoAlwaysMultipleBuilder}});const $e=r(513);Object.defineProperty(e,"AbstractChildDeploymentInfo",{enumerable:!0,get:function(){return $e.AbstractChildDeploymentInfo}});const Xe=r(6910);Object.defineProperty(e,"AbstractChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return Xe.AbstractChildDeploymentInfoBuilder}});const Ge=r(4809);Object.defineProperty(e,"AbstractDynamicChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return Ge.AbstractDynamicChildDeploymentInfoBuilder}});const qe=r(3812);Object.defineProperty(e,"AbstractDynamicChildDeploymentInfo",{enumerable:!0,get:function(){return qe.AbstractDynamicChildDeploymentInfo}});const He=r(9519);Object.defineProperty(e,"AbstractFieldChildDeploymentInfo",{enumerable:!0,get:function(){return He.AbstractFieldChildDeploymentInfo}});const ze=r(6096);Object.defineProperty(e,"AbstractFieldChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return ze.AbstractFieldChildDeploymentInfoBuilder}});const Qe=r(4831);Object.defineProperty(e,"ChildDeploymentInfoElement",{enumerable:!0,get:function(){return Qe.ChildDeploymentInfoElement}});const Ze=r(6976);Object.defineProperty(e,"ChildDeploymentInfoElementBuilder",{enumerable:!0,get:function(){return Ze.ChildDeploymentInfoElementBuilder}});const et=r(4036);Object.defineProperty(e,"JsonArtifactParsingResult",{enumerable:!0,get:function(){return et.JsonArtifactParsingResult}});const tt=r(1591);Object.defineProperty(e,"YamlArtifactParsingResult",{enumerable:!0,get:function(){return tt.YamlArtifactParsingResult}});const rt=r(4325);Object.defineProperty(e,"ComparisonResult",{enumerable:!0,get:function(){return rt.ComparisonResult}});const nt=r(1885);Object.defineProperty(e,"YamlObjectComparator",{enumerable:!0,get:function(){return nt.YamlObjectComparator}});const at=r(3056);Object.defineProperty(e,"JsonObjectComparator",{enumerable:!0,get:function(){return at.JsonObjectComparator}});const it=r(7868);Object.defineProperty(e,"YamlTemplateReaderResult",{enumerable:!0,get:function(){return it.YamlTemplateReaderResult}});const st=r(1790);Object.defineProperty(e,"YamlTemplateFieldReaderResult",{enumerable:!0,get:function(){return st.YamlTemplateFieldReaderResult}});const ot=r(4646);Object.defineProperty(e,"YamlTemplateElementReaderResult",{enumerable:!0,get:function(){return ot.YamlTemplateElementReaderResult}});const lt=r(6532);Object.defineProperty(e,"YamlArtifactReaderResult",{enumerable:!0,get:function(){return lt.YamlArtifactReaderResult}});const dt=r(147);Object.defineProperty(e,"YamlTemplateInstanceReaderResult",{enumerable:!0,get:function(){return dt.YamlTemplateInstanceReaderResult}});const ct=r(7752);Object.defineProperty(e,"Language",{enumerable:!0,get:function(){return ct.Language}});var ut=r(5226);Object.defineProperty(e,"Annotations",{enumerable:!0,get:function(){return ut.Annotations}});var mt=r(2787);Object.defineProperty(e,"AnnotationAtId",{enumerable:!0,get:function(){return mt.AnnotationAtId}});var pt=r(3549);Object.defineProperty(e,"AnnotationAtValue",{enumerable:!0,get:function(){return pt.AnnotationAtValue}});var ht=r(4443);Object.defineProperty(e,"SchemaExtensions",{enumerable:!0,get:function(){return ht.SchemaExtensions}})})();const a=n.AbstractArtifact,i=n.AbstractChildDeploymentInfo,s=n.AbstractChildDeploymentInfoBuilder,o=n.AbstractContainerArtifact,l=n.AbstractDynamicChildDeploymentInfo,d=n.AbstractDynamicChildDeploymentInfoBuilder,c=n.AbstractFieldChildDeploymentInfo,u=n.AbstractFieldChildDeploymentInfoBuilder,m=n.AbstractInstanceArtifact,p=n.AbstractSchemaArtifact,h=n.AnnotationAtId,f=n.AnnotationAtValue,y=n.Annotations,T=n.AttributeValueNamePolicy,C=n.BiboStatus,E=n.BioportalTermType,g=n.CedarArtifactId,I=n.CedarArtifactType,A=n.CedarBuilders,b=n.CedarFieldCategory,R=n.CedarFieldType,S=n.CedarJsonReaders,v=n.CedarJsonWriters,_=n.CedarReaders,N=n.CedarUser,w=n.CedarWriters,L=n.CedarYamlReaders,F=n.CedarYamlWriters,V=n.ChildDeploymentInfo,O=n.ChildDeploymentInfoAlwaysMultiple,D=n.ChildDeploymentInfoAlwaysMultipleBuilder,M=n.ChildDeploymentInfoAlwaysSingle,B=n.ChildDeploymentInfoAlwaysSingleBuilder,U=n.ChildDeploymentInfoBuilder,Y=n.ChildDeploymentInfoElement,x=n.ChildDeploymentInfoElementBuilder,J=n.ChildDeploymentInfoStatic,P=n.ChildDeploymentInfoStaticBuilder,k=n.ComparisonError,W=n.ComparisonErrorType,K=n.ComparisonResult,j=n.ControlledTermActionBuilder,$=n.ControlledTermBranchBuilder,X=n.ControlledTermClassBuilder,G=n.ControlledTermDefaultValue,q=n.ControlledTermDefaultValueBuilder,H=n.ControlledTermOntologyBuilder,z=n.ControlledTermValueSetBuilder,Q=n.ControlledTermVersion,Z=n.InstanceDataAttributeValueField,ee=n.InstanceDataAttributeValueFieldName,te=n.InstanceDataContainer,re=n.InstanceDataControlledAtom,ne=n.InstanceDataEmptyAtom,ae=n.InstanceDataEmptyNode,ie=n.InstanceDataLabelAtom,se=n.InstanceDataLinkAtom,oe=n.InstanceDataNotationAtom,le=n.InstanceDataStringAtom,de=n.InstanceDataTypedAtom,ce=n.InstanceInflater,ue=n.InstanceValidator,me=n.Iri,pe=n.IriSyntax,he=n.IsoDate,fe=n.JsonAbstractArtifactReader,ye=n.JsonAbstractArtifactWriter,Te=n.JsonAbstractInstanceArtifactReader,Ce=n.JsonAbstractSchemaArtifactReader,Ee=n.JsonArtifactParsingResult,ge=n.JsonArtifactReaderResult,Ie=n.JsonNode,Ae=n.JsonObjectComparator,be=n.JsonPath,Re=n.JsonTemplateElementReader,Se=n.JsonTemplateElementReaderResult,ve=n.JsonTemplateElementWriter,_e=n.JsonTemplateFieldReader,Ne=n.JsonTemplateFieldReaderResult,we=n.JsonTemplateFieldWriter,Le=n.JsonTemplateInstanceContent,Fe=n.JsonTemplateInstanceReader,Ve=n.JsonTemplateInstanceReaderResult,Oe=n.JsonTemplateInstanceWriter,De=n.JsonTemplateReader,Me=n.JsonTemplateReaderResult,Be=n.JsonTemplateWriter,Ue=n.Language,Ye=n.NumberType,xe=n.PavVersion,Je=n.PropertyIri,Pe=n.ReservedNames,ke=n.RoundTrip,We=n.SchemaExtensions,Ke=n.SchemaVersion,je=n.Template,$e=n.TemplateBuilder,Xe=n.TemplateElement,Ge=n.TemplateElementBuilder,qe=n.TemplateField,He=n.TemplateInstance,ze=n.TemplateInstanceBuilder,Qe=n.TemporalGranularity,Ze=n.TemporalType,et=n.TimeFormat,tt=n.YamlArtifactParsingResult,rt=n.YamlArtifactReaderResult,nt=n.YamlObjectComparator,at=n.YamlTemplateElementReader,it=n.YamlTemplateElementReaderResult,st=n.YamlTemplateElementWriter,ot=n.YamlTemplateFieldReader,lt=n.YamlTemplateFieldReaderResult,dt=n.YamlTemplateFieldWriter,ct=n.YamlTemplateInstanceReader,ut=n.YamlTemplateInstanceReaderResult,mt=n.YamlTemplateReader,pt=n.YamlTemplateReaderResult,ht=n.YamlTemplateWriter,ft=n.YamlValues,yt=n.__esModule;export{a as AbstractArtifact,i as AbstractChildDeploymentInfo,s as AbstractChildDeploymentInfoBuilder,o as AbstractContainerArtifact,l as AbstractDynamicChildDeploymentInfo,d as AbstractDynamicChildDeploymentInfoBuilder,c as AbstractFieldChildDeploymentInfo,u as AbstractFieldChildDeploymentInfoBuilder,m as AbstractInstanceArtifact,p as AbstractSchemaArtifact,h as AnnotationAtId,f as AnnotationAtValue,y as Annotations,T as AttributeValueNamePolicy,C as BiboStatus,E as BioportalTermType,g as CedarArtifactId,I as CedarArtifactType,A as CedarBuilders,b as CedarFieldCategory,R as CedarFieldType,S as CedarJsonReaders,v as CedarJsonWriters,_ as CedarReaders,N as CedarUser,w as CedarWriters,L as CedarYamlReaders,F as CedarYamlWriters,V as ChildDeploymentInfo,O as ChildDeploymentInfoAlwaysMultiple,D as ChildDeploymentInfoAlwaysMultipleBuilder,M as ChildDeploymentInfoAlwaysSingle,B as ChildDeploymentInfoAlwaysSingleBuilder,U as ChildDeploymentInfoBuilder,Y as ChildDeploymentInfoElement,x as ChildDeploymentInfoElementBuilder,J as ChildDeploymentInfoStatic,P as ChildDeploymentInfoStaticBuilder,k as ComparisonError,W as ComparisonErrorType,K as ComparisonResult,j as ControlledTermActionBuilder,$ as ControlledTermBranchBuilder,X as ControlledTermClassBuilder,G as ControlledTermDefaultValue,q as ControlledTermDefaultValueBuilder,H as ControlledTermOntologyBuilder,z as ControlledTermValueSetBuilder,Q as ControlledTermVersion,Z as InstanceDataAttributeValueField,ee as InstanceDataAttributeValueFieldName,te as InstanceDataContainer,re as InstanceDataControlledAtom,ne as InstanceDataEmptyAtom,ae as InstanceDataEmptyNode,ie as InstanceDataLabelAtom,se as InstanceDataLinkAtom,oe as InstanceDataNotationAtom,le as InstanceDataStringAtom,de as InstanceDataTypedAtom,ce as InstanceInflater,ue as InstanceValidator,me as Iri,pe as IriSyntax,he as IsoDate,fe as JsonAbstractArtifactReader,ye as JsonAbstractArtifactWriter,Te as JsonAbstractInstanceArtifactReader,Ce as JsonAbstractSchemaArtifactReader,Ee as JsonArtifactParsingResult,ge as JsonArtifactReaderResult,Ie as JsonNode,Ae as JsonObjectComparator,be as JsonPath,Re as JsonTemplateElementReader,Se as JsonTemplateElementReaderResult,ve as JsonTemplateElementWriter,_e as JsonTemplateFieldReader,Ne as JsonTemplateFieldReaderResult,we as JsonTemplateFieldWriter,Le as JsonTemplateInstanceContent,Fe as JsonTemplateInstanceReader,Ve as JsonTemplateInstanceReaderResult,Oe as JsonTemplateInstanceWriter,De as JsonTemplateReader,Me as JsonTemplateReaderResult,Be as JsonTemplateWriter,Ue as Language,Ye as NumberType,xe as PavVersion,Je as PropertyIri,Pe as ReservedNames,ke as RoundTrip,We as SchemaExtensions,Ke as SchemaVersion,je as Template,$e as TemplateBuilder,Xe as TemplateElement,Ge as TemplateElementBuilder,qe as TemplateField,He as TemplateInstance,ze as TemplateInstanceBuilder,Qe as TemporalGranularity,Ze as TemporalType,et as TimeFormat,tt as YamlArtifactParsingResult,rt as YamlArtifactReaderResult,nt as YamlObjectComparator,at as YamlTemplateElementReader,it as YamlTemplateElementReaderResult,st as YamlTemplateElementWriter,ot as YamlTemplateFieldReader,lt as YamlTemplateFieldReaderResult,dt as YamlTemplateFieldWriter,ct as YamlTemplateInstanceReader,ut as YamlTemplateInstanceReaderResult,mt as YamlTemplateReader,pt as YamlTemplateReaderResult,ht as YamlTemplateWriter,ft as YamlValues,yt as __esModule};export default n;
2
2
  //# sourceMappingURL=index.esm.js.map