cedar-model-typescript-library 1.0.19 → 1.0.21

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.
Files changed (100) hide show
  1. package/README.md +75 -4
  2. package/index.d.ts +12 -0
  3. package/index.d.ts.map +1 -1
  4. package/index.esm.js +1 -1
  5. package/index.esm.js.map +1 -1
  6. package/index.js +1 -1
  7. package/index.js.map +1 -1
  8. package/index.umd.js +1 -1
  9. package/index.umd.js.map +1 -1
  10. package/org/metadatacenter/io/reader/ReaderUtil.d.ts +9 -20
  11. package/org/metadatacenter/io/reader/ReaderUtil.d.ts.map +1 -1
  12. package/org/metadatacenter/io/reader/json/CedarJsonReaders.d.ts.map +1 -1
  13. package/org/metadatacenter/io/reader/json/JsonAbstractArtifactReader.d.ts.map +1 -1
  14. package/org/metadatacenter/io/reader/json/JsonTemplateElementReader.d.ts.map +1 -1
  15. package/org/metadatacenter/io/reader/json/JsonTemplateFieldReader.d.ts.map +1 -1
  16. package/org/metadatacenter/io/reader/json/JsonTemplateInstanceReader.d.ts.map +1 -1
  17. package/org/metadatacenter/io/reader/json/JsonTemplateReader.d.ts.map +1 -1
  18. package/org/metadatacenter/io/reader/yaml/YamlAbstractArtifactReader.d.ts.map +1 -1
  19. package/org/metadatacenter/io/reader/yaml/YamlSourcePolicy.d.ts +6 -0
  20. package/org/metadatacenter/io/reader/yaml/YamlSourcePolicy.d.ts.map +1 -0
  21. package/org/metadatacenter/io/reader/yaml/YamlTemplateElementReader.d.ts.map +1 -1
  22. package/org/metadatacenter/io/reader/yaml/YamlTemplateFieldReader.d.ts.map +1 -1
  23. package/org/metadatacenter/io/reader/yaml/YamlTemplateInstanceReader.d.ts.map +1 -1
  24. package/org/metadatacenter/io/reader/yaml/YamlTemplateReader.d.ts.map +1 -1
  25. package/org/metadatacenter/io/roundtrip/RoundTrip.d.ts.map +1 -1
  26. package/org/metadatacenter/io/writer/json/JsonTemplateInstanceWriter.d.ts.map +1 -1
  27. package/org/metadatacenter/io/writer/json/stringifyInstance.d.ts.map +1 -1
  28. package/org/metadatacenter/io/writer/json/stringifySchema.d.ts.map +1 -1
  29. package/org/metadatacenter/io/writer/yaml/SimpleYamlSerializer.d.ts.map +1 -1
  30. package/org/metadatacenter/io/writer/yaml/YamlTemplateInstanceWriter.d.ts.map +1 -1
  31. package/org/metadatacenter/model/cedar/AbstractContainerArtifact.d.ts +0 -2
  32. package/org/metadatacenter/model/cedar/AbstractContainerArtifact.d.ts.map +1 -1
  33. package/org/metadatacenter/model/cedar/TemplateValueValidator.d.ts +11 -0
  34. package/org/metadatacenter/model/cedar/TemplateValueValidator.d.ts.map +1 -0
  35. package/org/metadatacenter/model/cedar/field/dynamic/controlled-term/JsonFieldReaderControlledTerm.d.ts +8 -0
  36. package/org/metadatacenter/model/cedar/field/dynamic/controlled-term/JsonFieldReaderControlledTerm.d.ts.map +1 -1
  37. package/org/metadatacenter/model/cedar/field/dynamic/controlled-term/YamlFieldReaderControlledTerm.d.ts +8 -0
  38. package/org/metadatacenter/model/cedar/field/dynamic/controlled-term/YamlFieldReaderControlledTerm.d.ts.map +1 -1
  39. package/org/metadatacenter/model/cedar/field/dynamic/controlled-term/value-constraint/ControlledTermVersion.d.ts +7 -0
  40. package/org/metadatacenter/model/cedar/field/dynamic/controlled-term/value-constraint/ControlledTermVersion.d.ts.map +1 -1
  41. package/org/metadatacenter/model/cedar/field/dynamic/email/EmailFieldBuilderImpl.d.ts.map +1 -1
  42. package/org/metadatacenter/model/cedar/field/dynamic/numeric/NumericDefaultValueValidator.d.ts +2 -1
  43. package/org/metadatacenter/model/cedar/field/dynamic/numeric/NumericDefaultValueValidator.d.ts.map +1 -1
  44. package/org/metadatacenter/model/cedar/field/dynamic/numeric/NumericFieldBuilder.d.ts +4 -3
  45. package/org/metadatacenter/model/cedar/field/dynamic/numeric/NumericFieldBuilder.d.ts.map +1 -1
  46. package/org/metadatacenter/model/cedar/field/dynamic/numeric/NumericFieldBuilderImpl.d.ts +4 -3
  47. package/org/metadatacenter/model/cedar/field/dynamic/numeric/NumericFieldBuilderImpl.d.ts.map +1 -1
  48. package/org/metadatacenter/model/cedar/field/dynamic/numeric/ValueConstraintsNumericField.d.ts +4 -3
  49. package/org/metadatacenter/model/cedar/field/dynamic/numeric/ValueConstraintsNumericField.d.ts.map +1 -1
  50. package/org/metadatacenter/model/cedar/field/dynamic/phone-number/PhoneNumberFieldBuilderImpl.d.ts.map +1 -1
  51. package/org/metadatacenter/model/cedar/field/dynamic/temporal/TemporalDefaultValueValidator.d.ts +2 -11
  52. package/org/metadatacenter/model/cedar/field/dynamic/temporal/TemporalDefaultValueValidator.d.ts.map +1 -1
  53. package/org/metadatacenter/model/cedar/field/dynamic/temporal/TemporalFieldBuilderImpl.d.ts.map +1 -1
  54. package/org/metadatacenter/model/cedar/field/dynamic/textarea/TextAreaBuilderImpl.d.ts.map +1 -1
  55. package/org/metadatacenter/model/cedar/field/dynamic/textfield/TextFieldBuilderImpl.d.ts.map +1 -1
  56. package/org/metadatacenter/model/cedar/template-instance/AttributeValueNamePolicy.d.ts.map +1 -1
  57. package/org/metadatacenter/model/cedar/template-instance/InstanceValidator.d.ts +8 -72
  58. package/org/metadatacenter/model/cedar/template-instance/InstanceValidator.d.ts.map +1 -1
  59. package/org/metadatacenter/model/cedar/types/wrapped-types/IsoDate.d.ts +3 -3
  60. package/org/metadatacenter/model/cedar/types/wrapped-types/IsoDate.d.ts.map +1 -1
  61. package/org/metadatacenter/model/cedar/util/JavaStrings.d.ts +6 -0
  62. package/org/metadatacenter/model/cedar/util/JavaStrings.d.ts.map +1 -0
  63. package/org/metadatacenter/model/cedar/util/compare/JsonArtifactParsingResult.d.ts +6 -0
  64. package/org/metadatacenter/model/cedar/util/compare/JsonArtifactParsingResult.d.ts.map +1 -1
  65. package/org/metadatacenter/model/cedar/util/compare/JsonObjectComparator.d.ts.map +1 -1
  66. package/org/metadatacenter/model/cedar/util/path/JsonPath.d.ts +3 -0
  67. package/org/metadatacenter/model/cedar/util/path/JsonPath.d.ts.map +1 -1
  68. package/org/metadatacenter/model/cedar/util/validationFieldSchema.d.ts +5 -0
  69. package/org/metadatacenter/model/cedar/util/validationFieldSchema.d.ts.map +1 -0
  70. package/org/metadatacenter/policy/DisplayText.d.ts +13 -0
  71. package/org/metadatacenter/policy/DisplayText.d.ts.map +1 -0
  72. package/org/metadatacenter/policy/FieldValuePolicy.d.ts +35 -0
  73. package/org/metadatacenter/policy/FieldValuePolicy.d.ts.map +1 -0
  74. package/org/metadatacenter/policy/IdentifierPolicy.d.ts +30 -0
  75. package/org/metadatacenter/policy/IdentifierPolicy.d.ts.map +1 -0
  76. package/org/metadatacenter/policy/JsonSourcePolicy.d.ts +12 -0
  77. package/org/metadatacenter/policy/JsonSourcePolicy.d.ts.map +1 -0
  78. package/org/metadatacenter/policy/NumericPolicy.d.ts +26 -0
  79. package/org/metadatacenter/policy/NumericPolicy.d.ts.map +1 -0
  80. package/org/metadatacenter/policy/RegexChecks.d.ts +29 -0
  81. package/org/metadatacenter/policy/RegexChecks.d.ts.map +1 -0
  82. package/org/metadatacenter/policy/RegexPolicy.d.ts +52 -0
  83. package/org/metadatacenter/policy/RegexPolicy.d.ts.map +1 -0
  84. package/org/metadatacenter/policy/TemporalDefaultPolicy.d.ts +15 -0
  85. package/org/metadatacenter/policy/TemporalDefaultPolicy.d.ts.map +1 -0
  86. package/org/metadatacenter/policy/TextPolicy.d.ts +12 -0
  87. package/org/metadatacenter/policy/TextPolicy.d.ts.map +1 -0
  88. package/org/metadatacenter/policy/TimestampPolicy.d.ts +5 -0
  89. package/org/metadatacenter/policy/TimestampPolicy.d.ts.map +1 -0
  90. package/org/metadatacenter/policy/ValidationPolicy.d.ts +35 -0
  91. package/org/metadatacenter/policy/ValidationPolicy.d.ts.map +1 -0
  92. package/package.json +1 -1
  93. package/policy.d.ts +11 -0
  94. package/policy.d.ts.map +1 -0
  95. package/policy.esm.js +2 -0
  96. package/policy.esm.js.map +1 -0
  97. package/policy.js +2 -0
  98. package/policy.js.map +1 -0
  99. package/policy.umd.js +2 -0
  100. package/policy.umd.js.map +1 -0
package/index.umd.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CedarModelTypescriptLibrary=t():e.CedarModelTypescriptLibrary=t()}(this,()=>(()=>{"use strict";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),g=r(2703),E=r(9521),C=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 C.StaticSectionBreakFieldBuilderImpl.create()}static richTextFieldBuilder(){return E.StaticRichTextFieldBuilderImpl.create()}static pageBreakFieldBuilder(){return g.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),g=r(3812),E=r(3608),C=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 C.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 g.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 g.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 g extends y.JsonContainerArtifactReader{knownArtifactType=s.CedarArtifactType.TEMPLATE_ELEMENT;constructor(e){super(e)}static getStrict(){return new g(m.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new g(m.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new g(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=g},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),g=r(6511),E=r(9148),C=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),O=r(2419),V=r(9366),D=r(4869),M=r(8728),U=r(5846),B=r(6396),x=r(855),Y=r(978),J=r(455),P=r(7752),k=r(8244),K=r(4956),W=r(6854),j=r(3028),$=r(7004),X=r(1886),G=r(8583),q=r(6591),H=r(6731);class z extends Y.JsonAbstractSchemaArtifactReader{artifactTypeWord(){return"field"}constructor(e){super(e)}static getStrict(){return new z(U.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new z(U.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 K.JsonFieldReaderExtOrcid],[D.CedarFieldType.EXT_PFAS,new W.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 O.JsonFieldReaderList],[D.CedarFieldType.MULTIPLE_SELECT_LIST,new O.JsonFieldReaderList],[D.CedarFieldType.ATTRIBUTE_VALUE,new V.JsonFieldReaderAttributeValue],[D.CedarFieldType.STATIC_PAGE_BREAK,new T.JsonFieldReaderPageBreak],[D.CedarFieldType.STATIC_SECTION_BREAK,new g.JsonFieldReaderSectionBreak],[D.CedarFieldType.STATIC_IMAGE,new E.JsonFieldReaderImage],[D.CedarFieldType.STATIC_RICH_TEXT,new C.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 B.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 x.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),g=r(7571),E=r(7548),C=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 g.InstanceDataLinkAtom||e instanceof C.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?g.InstanceDataLinkAtom.fromParsedNode(t,h.ReaderUtil.getSingleType(e,f.JsonSchema.atType)):C.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),g=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=g.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 g{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),g.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=g},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),g=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(g);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),g.isField()){const r=m.CedarFieldType.forYamlArtifactType(g);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(!g.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),g=r(384),E=r(1872),C=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),O=r(9299),V=r(1591),D=r(6651),M=r(7123),U=r(5075),B=r(7709),x=r(6089),Y=r(8543),J=r(5907),P=r(6731),k=r(6591);class K extends u.YamlAbstractArtifactReader{knownArtifactType=o.CedarArtifactType.TEMPLATE_FIELD;constructor(e,t=!1){super(e,t)}static getStrict(){return new K(m.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new K(m.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new K(e,t)}static readerMap=new Map([[f.YamlArtifactType.TEXTFIELD,new y.YamlFieldReaderTextField],[f.YamlArtifactType.TEXTAREA,new T.YamlFieldReaderTextArea],[f.YamlArtifactType.CONTROLLED_TERM,new O.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 U.YamlFieldReaderExtPfas],[f.YamlArtifactType.EXT_PUBMED,new B.YamlFieldReaderExtPubmed],[f.YamlArtifactType.EXT_RRID,new x.YamlFieldReaderExtRrid],[f.YamlArtifactType.EXT_NIH_GRANT_ID,new Y.YamlFieldReaderExtNihGrantId],[f.YamlArtifactType.EXT_DOI,new J.YamlFieldReaderExtDoi],[f.YamlArtifactType.TEMPORAL,new g.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 C.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 V.YamlArtifactParsingResult,i=K.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=K.readFlag(r,t,h.YamlKeys.hidden),e.requiredValue=K.readFlag(r,t,h.YamlKeys.required),e.recommendedValue=K.readFlag(r,t,h.YamlKeys.recommended),e.continuePreviousLine=K.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=K},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),g=r(7723),E=r(5222),C=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 g.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 C.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),g=r(7335),E=r(275),C=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),O=r(2813),V=r(6645),D=r(2981),M=r(7432),U=r(8014),B=r(3281),x=r(7661),Y=r(6320),J=r(7584),P=r(8096),k=r(6122),K=r(3312),W=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=V.JsonTemplateElementWriter.getFor(e,this),this.jsonTemplateInstanceWriter=Y.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 C.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 K.JsonFieldWriterExtPubmed(e,this)],[s.CedarFieldType.EXT_RRID,new W.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 g.JsonFieldWriterList(e,this)],[s.CedarFieldType.MULTIPLE_SELECT_LIST,new g.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 O.JsonValueConstraintsValueSetWriter(e,this)],[M.ControlledTermAction.className,new U.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 B.Template)return i.JsonTemplateWriter.getFor(this.behavior,this);if(e instanceof x.TemplateElement)return V.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),g=r(9932),E=r(8802),C=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 C.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?g.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),g=r(6591),E=r(7752),C=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 g.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=C.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),g=r(7571),E=r(7548),C=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 g.InstanceDataLinkAtom?{[o.JsonSchema.atId]:e.id,...null===e.type?{}:{[o.JsonSchema.atType]:e.type}}:e instanceof E.InstanceDataEmptyAtom||e instanceof C.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),g=r(4935),E=r(6314),C=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),O=r(3671),V=r(9532),D=r(4647),M=r(9411),U=r(9326),B=r(491),x=r(4355),Y=r(5587),J=r(6557),P=r(4077),k=r(3711),K=r(6967);class W{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=U.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 B.YamlFieldWriterExtRor(e,this)],[n.CedarFieldType.EXT_ORCID,new x.YamlFieldWriterExtOrcid(e,this)],[n.CedarFieldType.EXT_PFAS,new Y.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 K.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 g.YamlFieldWriterStaticImage(e,this)],[n.CedarFieldType.STATIC_RICH_TEXT,new E.YamlFieldWriterStaticRichText(e,this)],[n.CedarFieldType.STATIC_YOUTUBE,new C.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 O.YamlValueConstraintsBranchWriter(e,this)],[l.ControlledTermValueSet.className,new V.YamlValueConstraintsValueSetWriter(e,this)],[d.ControlledTermAction.className,new D.YamlValueConstraintsActionWriter(e,this)]])}static getStrict(){return new W(M.YamlWriterBehavior.STRICT)}static getFor(e){return new W(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=W},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 g(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/g(h,T)*T;function C(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=g(g(p,h),y),p/=E,h/=E,y/=E;const A=l-C(s)+C(p)+I(Math.max(0,-m)),b=C(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 O=L.length+F;return L=O>0?L.slice(0,O)+"."+L.slice(O):"0."+"0".repeat(-O)+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),g=r(7752),E=r(8557),C=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!==g.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 C.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 g=y;return h&&(null===T&&(T=p.AbstractChildDeploymentInfo.defaultMinItems),e?.isMultiInstanceByDefinition()||e?.isSingleInstanceByDefinition()?t instanceof a.ChildDeploymentInfoAlwaysMultiple&&(o[l.YamlKeys.minItems]=T,null!==t.declaredMaxItems&&g!==n.UNBOUNDED_MAX_ITEMS&&(o[l.YamlKeys.maxItems]=g)):(o[l.YamlKeys.multiple]=!0,o[l.YamlKeys.minItems]=T,null!==g&&g!==n.UNBOUNDED_MAX_ITEMS&&(o[l.YamlKeys.maxItems]=g))),(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),g="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]:g};!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]=g),!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=0;_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(513),a=r(9519);class i extends a.AbstractFieldChildDeploymentInfo{_declaredMinItems=null;_declaredMaxItems=null;static empty(){return new i("")}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 n.AbstractChildDeploymentInfo.defaultMinItems}get maxItems(){return this._declaredMaxItems}}t.ChildDeploymentInfoAlwaysMultiple=i},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),g=r(2733),E=r(9034),C=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 C.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(g.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(g.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(g.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:()=>Br,Scalar:()=>K,Schema:()=>St,YAMLError:()=>Nt,YAMLMap:()=>Se,YAMLParseError:()=>wt,YAMLSeq:()=>_e,YAMLWarning:()=>Lt,default:()=>a,isAlias:()=>m,isCollection:()=>g,isDocument:()=>p,isMap:()=>h,isNode:()=>E,isPair:()=>f,isScalar:()=>y,isSeq:()=>T,parse:()=>Pr,parseAllDocuments:()=>Yr,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:()=>gr,isScalar:()=>Er,prettyToken:()=>Cr,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:()=>Br,Scalar:()=>K,Schema:()=>St,YAMLError:()=>Nt,YAMLMap:()=>Se,YAMLParseError:()=>wt,YAMLSeq:()=>_e,YAMLWarning:()=>Lt,isAlias:()=>m,isCollection:()=>g,isDocument:()=>p,isMap:()=>h,isNode:()=>E,isPair:()=>f,isScalar:()=>y,isSeq:()=>T,parse:()=>Pr,parseAllDocuments:()=>Yr,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 g(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 C=e=>(y(e)||g(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(g(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(g(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(g(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"},O=e=>e.replace(/[!,[\]{}]/g,e=>F[e]);class V{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},V.defaultYaml,e),this.tags=Object.assign({},V.defaultTags,t)}clone(){const e=new V(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new V(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:V.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},V.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:V.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},V.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+O(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 U(e,t){for(let r=1;;++r){const n=`${e}${r}`;if(!t.has(n))return n}}function B(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=B(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=B(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=B(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=B(e,n,t,r);void 0===a?delete n[t]:a!==r&&(n[t]=a)}return e.call(t,r,n)}function x(e,t,r){if(Array.isArray(e))return e.map((e,t)=>x(e,String(t),r));if(e&&"function"==typeof e.toJSON){if(!r||!C(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)}V.defaultYaml={explicit:!1,version:"1.2"},V.defaultTags={"!!":"tag:yaml.org,2002:"};class Y{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=x(this,"",i);if("function"==typeof n)for(const{count:e,res:t}of i.anchors.values())n(t,e);return"function"==typeof a?B(a,{"":s},"",s):s}}class J extends Y{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)||C(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||(x(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(g(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 K extends Y{constructor(e){super(d),this.value=e}toJSON(e,t){return t?.keep?this.value:x(this.value,e,t)}toString(){return String(this.value)}}function W(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 K(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 K(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 W(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}K.BLOCK_FOLDED="BLOCK_FOLDED",K.BLOCK_LITERAL="BLOCK_LITERAL",K.PLAIN="PLAIN",K.QUOTE_DOUBLE="QUOTE_DOUBLE",K.QUOTE_SINGLE="QUOTE_SINGLE";const $=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class X extends Y{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(g(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(g(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:g(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!!g(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(g(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 g=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?g=`\n${t}${e.slice(0,i)}`:(r===Q&&c[a]&&(g+=`${e[a]}\\`),g+=`\n${t}${e.slice(a+1,i)}`)}return g}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!==K.BLOCK_FOLDED&&(t===K.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 g=r.substring(0,T<f?T+1:f);g&&(r=r.substring(g.length),g=g.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!==K.BLOCK_FOLDED&&(i.onOverflow=()=>{a=!0});const o=Z(`${g}${e}${p}`,d,"block",i);if(!a)return`>${E}\n${d}${o}`}return`|${E}\n${d}${g}${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!==K.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(o=K.QUOTE_DOUBLE);const l=e=>{switch(e){case K.BLOCK_FOLDED:case K.BLOCK_LITERAL:return a||i?ie(s.value,t):oe(s,t,r,n);case K.QUOTE_DOUBLE:return ne(s.value,t);case K.QUOTE_SINGLE:return ae(s.value,t);case K.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!==K.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)||g(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 K(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===K.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=x(r,"",e);if(t instanceof Map)t.set(a,x(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=x(n,i,e);i in t?Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[i]=s}}return t}function ge(e,t,r){const n=W(e,void 0,r),a=W(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(g(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||g(e)||(y(e)?e.type===K.BLOCK_FOLDED||e.type===K.BLOCK_LITERAL:"object"==typeof e));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(u||!i),indent:o+l});let h,f,C,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,C=t.comment):(h=!1,f=null,C=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&&C&&(v="\n\n");else if(!p&&g(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():C&&!R?b+=H(b,r.indent,d(C)):A&&a&&a(),b}(this,e,t,r):JSON.stringify(this)}}function Ce(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(ge(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})),Ce(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(x(e,String(n++),t));return r}toString(e,t,r){return e?Ce(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(W(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 K(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new K(null),stringify:({source:e},t)=>"string"==typeof e&&Fe.test.test(e)?e:t.options.nullStr},Oe={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new K("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},r)=>e&&Oe.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?r.options.trueStr:r.options.falseStr};function Ve({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:Ve},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():Ve(e)}},Ue={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 K(parseFloat(e)),r=e.indexOf(".");return-1!==r&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-r-1),t},stringify:Ve},Be=e=>"bigint"==typeof e||Number.isInteger(e),xe=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function Ye(e,t,r){const{value:n}=e;return Be(n)&&n>=0?r+n.toString(t):Ve(e)}const Je={identify:e=>Be(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>xe(e,2,8,r),stringify:e=>Ye(e,8,"0o")},Pe={identify:Be,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>xe(e,0,10,r),stringify:Ve},ke={identify:e=>Be(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>xe(e,2,16,r),stringify:e=>Ye(e,16,"0x")},Ke=[ve,we,Le,Fe,Oe,Je,Pe,ke,De,Me,Ue];function We(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 K(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:We,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})=>We(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=K.BLOCK_LITERAL),t!==K.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===K.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 K(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(ge(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=x(e.key,"",t),a=x(e.value,n,t)):n=x(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 K(!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 K(!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:Ve},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():Ve(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 K(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:Ve},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 Ve(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:Ve},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(ge(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 Ve(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},gt={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(gt.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,gt],Ct=new Map([["core",Ke],["failsafe",[ve,we,Le]],["json",$e],["yaml11",Et],["yaml-1.1",Et]]),It={binary:Xe,bool:Oe,float:Ue,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:gt},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":gt};function bt(e,t,r){const n=Ct.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(Ct.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 V({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)?U(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=U(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)&&!g(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=W(e,d,{aliasDuplicateObjects:a??!0,keepUndefined:o??!1,onAnchor:c,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:m});return s&&g(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 g(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return $(e)?!t&&y(this.contents)?this.contents.value:this.contents:g(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!g(this.contents)&&this.contents.has(e)}hasIn(e){return $(e)?void 0!==this.contents:!!g(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 V({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 V({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=x(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?B(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(g(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 Ot(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,g=null,E=null,C=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:C&&"seq-item-ind"===r||(l=!0):m+=a.source,d=!0,p=!0,(y||T)&&(g=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`),C&&i(a,"UNEXPECTED_TOKEN",`Unexpected ${a.source} in ${t??"collection"}`),C=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:C,spaceBefore:l,comment:u,hasNewline:p,anchor:y,tag:T,newlineAfterProp:g,end:b,start:I??b}}function Vt(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(Vt(t.key)||Vt(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||!Vt(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 Ut="All mapping items must start at the same column";function Bt(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 xt="Block collections are not allowed within flow collections",Yt=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=Ot(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",Ut)),!p.anchor&&!p.tag&&!u){l=p.end,p.comment&&(s.comment?s.comment+="\n"+p.comment:s.comment=p.comment);continue}(p.newlineAfterProp||Vt(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",Ut);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=Ot(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=Ot(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=Ot(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&&Vt(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);Yt(m)&&a(f.range,"BLOCK_IN_FLOW",xt),r.atKey=!1;const T=Ot(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 g=h?e(r,h,T,a):T.found?t(r,T.end,p,null,T,a):null;g?Yt(h)&&a(g.range,"BLOCK_IN_FLOW",xt):T.comment&&(f.comment?f.comment+="\n"+T.comment:f.comment=T.comment);const E=new Ee(f,g);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=(g??f).range;e.range=[f.range[0],t[1],t[2]],l.items.push(e)}c=g?g.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],Yt(h)&&a(n.range,"BLOCK_IN_FLOW",xt)}}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=Bt(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?K.BLOCK_FOLDED:K.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===K.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=K.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}`),Kt(e)}(i,d);break;case"single-quoted-scalar":o=K.QUOTE_SINGLE,l=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),Kt(e.slice(1,-1)).replace(/''/g,"'")}(i,d);break;case"double-quoted-scalar":o=K.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}=Wt(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=Bt(s,c,t,r);return{value:l,type:o,comment:u.comment,range:[n,c,u.offset]}}function Kt(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 Wt(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 K(i)}catch(e){const i=e instanceof Error?e.message:String(e);n(r??t,"TAG_RESOLVE_FAILED",i),u=new K(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=Bt(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 K(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 V({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(g(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=Ot(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=Bt(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=Bt(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="",gr=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 Cr(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 Or(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 Vr(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 Ur(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,Or(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 Br{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&&Ur(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(Vr(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(Or(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(Vr(t));Ur(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(Vr(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(Vr(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 xr(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new wr||null,prettyErrors:t}}function Yr(e,t={}){const{lineCounter:r,prettyErrors:n}=xr(t),a=new Br(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}=xr(t),a=new Br(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={};return(()=>{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 g=r(3281);Object.defineProperty(e,"Template",{enumerable:!0,get:function(){return g.Template}});const E=r(766);Object.defineProperty(e,"TemplateBuilder",{enumerable:!0,get:function(){return E.TemplateBuilder}});const C=r(4925);Object.defineProperty(e,"TemplateInstanceBuilder",{enumerable:!0,get:function(){return C.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 O=r(5491);Object.defineProperty(e,"ControlledTermOntologyBuilder",{enumerable:!0,get:function(){return O.ControlledTermOntologyBuilder}});const V=r(1556);Object.defineProperty(e,"ControlledTermValueSetBuilder",{enumerable:!0,get:function(){return V.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 U=r(8446);Object.defineProperty(e,"IriSyntax",{enumerable:!0,get:function(){return U.IriSyntax}});const B=r(5753);Object.defineProperty(e,"ControlledTermVersion",{enumerable:!0,get:function(){return B.ControlledTermVersion}});const x=r(3910);Object.defineProperty(e,"BiboStatus",{enumerable:!0,get:function(){return x.BiboStatus}});const Y=r(455);Object.defineProperty(e,"ChildDeploymentInfo",{enumerable:!0,get:function(){return Y.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 K=r(1888);Object.defineProperty(e,"RoundTrip",{enumerable:!0,get:function(){return K.RoundTrip}});const W=r(6389);Object.defineProperty(e,"PropertyIri",{enumerable:!0,get:function(){return W.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 ge=r(7723);Object.defineProperty(e,"InstanceDataContainer",{enumerable:!0,get:function(){return ge.InstanceDataContainer}});const Ee=r(9327);Object.defineProperty(e,"InstanceDataAttributeValueField",{enumerable:!0,get:function(){return Ee.InstanceDataAttributeValueField}});const Ce=r(3644);Object.defineProperty(e,"InstanceDataAttributeValueFieldName",{enumerable:!0,get:function(){return Ce.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 Oe=r(7993);Object.defineProperty(e,"JsonAbstractArtifactReader",{enumerable:!0,get:function(){return Oe.JsonAbstractArtifactReader}});const Ve=r(7954);Object.defineProperty(e,"JsonTemplateReaderResult",{enumerable:!0,get:function(){return Ve.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 Ue=r(4948);Object.defineProperty(e,"JsonTemplateElementReaderResult",{enumerable:!0,get:function(){return Ue.JsonTemplateElementReaderResult}});const Be=r(6396);Object.defineProperty(e,"JsonTemplateFieldReaderResult",{enumerable:!0,get:function(){return Be.JsonTemplateFieldReaderResult}});const xe=r(6537);Object.defineProperty(e,"JsonTemplateInstanceReaderResult",{enumerable:!0,get:function(){return xe.JsonTemplateInstanceReaderResult}});const Ye=r(1027);Object.defineProperty(e,"PavVersion",{enumerable:!0,get:function(){return Ye.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 Ke=r(587);Object.defineProperty(e,"ChildDeploymentInfoAlwaysSingleBuilder",{enumerable:!0,get:function(){return Ke.ChildDeploymentInfoAlwaysSingleBuilder}});const We=r(8878);Object.defineProperty(e,"ChildDeploymentInfoAlwaysMultiple",{enumerable:!0,get:function(){return We.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}})})(),n})());
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CedarModelTypescriptLibrary=t():e.CedarModelTypescriptLibrary=t()}(this,()=>(()=>{"use strict";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 i extends n.ReaderWriterBehavior{value;constructor(e,t){super(t),this.value=e}getValue(){return this.value}static STRICT=new i(t.C.STRICT,!1);static FEBRUARY_2024=new i(t.C.FEBRUARY_2024,!0)}t.JsonReaderBehavior=i},2022(e,t,r){t.JsonWriterBehavior=t.C=void 0;const n=r(7639);t.C={STRICT:"strict",FEBRUARY_2024:"february-2024"};class i extends n.ReaderWriterBehavior{value;_outputPages;_usePropertiesAtLanguage;_includeSkosNotationForLinksAndControlled;constructor(e,t,r,n,i){super(i),this.value=e,this._outputPages=t,this._usePropertiesAtLanguage=r,this._includeSkosNotationForLinksAndControlled=n}getValue(){return this.value}static STRICT=new i(t.C.STRICT,!1,!0,!0,!1);static FEBRUARY_2024=new i(t.C.FEBRUARY_2024,!0,!1,!1,!0);outputPages(){return this._outputPages}usePropertiesAtLanguage(){return this._usePropertiesAtLanguage}includeSkosNotationForLinksAndControlled(){return this._includeSkosNotationForLinksAndControlled}}t.JsonWriterBehavior=i},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 i extends n.ReaderWriterBehavior{value;constructor(e,t){super(t),this.value=e}getValue(){return this.value}static STRICT=new i(t.L.STRICT,!1)}t.YamlReaderBehavior=i},9411(e,t,r){t.YamlWriterBehavior=t.D=void 0;const n=r(7639);t.D={STRICT:"strict"};class i extends n.ReaderWriterBehavior{value;constructor(e,t){super(t),this.value=e}getValue(){return this.value}static STRICT=new i(t.D.STRICT,!1)}t.YamlWriterBehavior=i},6568(e,t,r){t.CedarBuilders=void 0;const n=r(766),i=r(1762),a=r(4925),s=r(7889),o=r(1259),l=r(345),c=r(2875),d=r(8084),u=r(3675),m=r(9497),p=r(1667),h=r(2052),f=r(4675),y=r(9916),T=r(3138),g=r(2703),E=r(9521),C=r(5795),I=r(7674),A=r(9105),b=r(1513),R=r(7328),v=r(2376),S=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 i.TemplateElementBuilder}static templateInstanceBuilder(){return new a.TemplateInstanceBuilder}static textFieldBuilder(){return s.TextFieldBuilderImpl.create()}static textAreaBuilder(){return o.TextAreaBuilderImpl.create()}static temporalFieldBuilder(){return l.TemporalFieldBuilderImpl.create()}static phoneNumberFieldBuilder(){return d.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 C.StaticSectionBreakFieldBuilderImpl.create()}static richTextFieldBuilder(){return E.StaticRichTextFieldBuilderImpl.create()}static pageBreakFieldBuilder(){return g.StaticPageBreakFieldBuilderImpl.create()}static imageFieldBuilder(){return T.StaticImageFieldBuilderImpl.create()}static linkFieldBuilder(){return m.LinkFieldBuilderImpl.create()}static extRorFieldBuilder(){return R.ExtRorFieldBuilderImpl.create()}static extOrcidFieldBuilder(){return v.ExtOrcidFieldBuilderImpl.create()}static extPfasFieldBuilder(){return S.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 c.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),i=r(8639);t.CedarReaders=class{static json(){return n.CedarJsonReaders}static yaml(){return i.CedarYamlReaders}}},8446(e,t,r){t.IriSyntax=void 0;const n=r(2500);t.IriSyntax=class{constructor(){}static isValid(e){if(""===e)return!1;try{return n.IdentifierPolicy.assertIdentifier(e,"value"),!0}catch{return!1}}}},8748(e,t,r){t.ReaderUtil=void 0;const n=r(2108),i=r(2500),a=r(9517),s=r(8802);class o{static assertIdentifierCharacters=i.IdentifierPolicy.assertIdentifierCharacters.bind(i.IdentifierPolicy);static assertFieldIri=i.IdentifierPolicy.assertFieldIri.bind(i.IdentifierPolicy);static assertIri=i.IdentifierPolicy.assertIri.bind(i.IdentifierPolicy);static assertIdentifier=i.IdentifierPolicy.assertIdentifier.bind(i.IdentifierPolicy);static getIri(e,t){const r=this.getString(e,t);return this.assertIri(r,t),r}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){const r=e[t];if(null==r||""===r)return null;if("number"==typeof r||"string"==typeof r||n.ExactDecimal.isExact(r))try{return n.NumericPolicy.value(r)}catch(e){throw new Error("Numeric default must be a finite decimal number without surrounding whitespace.",{cause:e})}throw new Error(`Numeric default at "${t}" must be a number or numeric string.`)}static getExactNumber(e,t){const r=e[t];if(null==r)return null;if("number"==typeof r||n.ExactDecimal.isExact(r))return n.NumericPolicy.value(r);throw new Error(`Numeric bound at "${t}" must be a JSON number.`)}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]:a.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):[]}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),i=new Map;for(const[e,t]of n)i.set(e,t);return i}return new Map}static deepClone(e){return this.deepUnfreeze(e)}static deepUnfreeze(e){if(e instanceof n.ExactDecimal)return 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]:a.JsonNode.getEmptyList()}static getURI(e,t){const r=this.getStringOrEmpty(e,t);return this.assertIri(r,t),new s.Iri(r)}static getIdentifierURI(e,t){const r=this.getStringOrEmpty(e,t);return this.assertIdentifier(null===r?"":r,t),new s.Iri(r)}static deleteNodeKey(e,t){Object.hasOwn(e,t)&&delete e[t]}}t.ReaderUtil=o},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=i.PavVersion.DEFAULT),null==t[o]&&(e.bibo_status=a.BiboStatus.DRAFT)};const n=r(3188),i=r(1027),a=r(3910)},2103(e,t,r){t.CedarJsonReaders=void 0;const n=r(5904),i=r(2763),a=r(8748),s=r(2733),o=r(5291),l=r(7909),c=r(5846),d=r(9232),u=r(4381);class m{behavior;constructor(e){this.behavior=e}static getStrict(){return new m(c.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new m(c.JsonReaderBehavior.FEBRUARY_2024)}static detectArtifactType(e){let t;if(t="string"==typeof e?n.JsonSourcePolicy.parse(e):e,t&&t["@type"]){const e=a.ReaderUtil.getString(t,s.JsonSchema.atType);return i.CedarArtifactType.forValue(e)}return i.CedarArtifactType.NULL}getReaderForArtifactType(e){switch(e){case i.CedarArtifactType.TEMPLATE:return o.JsonTemplateReader.getStrict();case i.CedarArtifactType.TEMPLATE_ELEMENT:return l.JsonTemplateElementReader.getStrict();case i.CedarArtifactType.TEMPLATE_FIELD:case i.CedarArtifactType.STATIC_TEMPLATE_FIELD:return u.JsonTemplateFieldReader.getStrict();case i.CedarArtifactType.TEMPLATE_INSTANCE:return d.JsonTemplateInstanceReader.getStrict();default:throw new Error(`No JSON reader available for CedarArtifactType: ${e}`)}}getTemplateReader(){return o.JsonTemplateReader.getForBehavior(this.behavior)}getTemplateElementReader(){return l.JsonTemplateElementReader.getForBehavior(this.behavior)}getTemplateFieldReader(){return u.JsonTemplateFieldReader.getForBehavior(this.behavior)}getTemplateInstanceReader(){return d.JsonTemplateInstanceReader.getForBehavior(this.behavior)}}t.CedarJsonReaders=m},7993(e,t,r){t.JsonAbstractArtifactReader=void 0;const n=r(3992),i=r(8534),a=r(8748),s=r(2733),o=r(2234),l=r(9857),c=r(2763),d=r(5226),u=r(936),m=r(2787),p=r(3549);class h{static refuseEmptyIdentifier(e,t=s.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&&n.TextPolicy.isBlank(r))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=c.CedarArtifactType.NULL;get lenient(){return this.behavior.useWarningForKnownIssues()}constructor(e){this.behavior=e}readNonReportableAttributes(e,t){h.refuseEmptyIdentifier(t),e.at_id=i.CedarArtifactId.forValue(a.ReaderUtil.getString(t,s.JsonSchema.atId)),e.schema_name=a.ReaderUtil.getString(t,s.JsonSchema.schemaName),e.schema_description=a.ReaderUtil.getStringOrEmpty(t,s.JsonSchema.schemaDescription),e.pav_createdBy=o.CedarUser.forValue(a.ReaderUtil.getString(t,s.JsonSchema.pavCreatedBy)),e.pav_createdOn=l.IsoDate.forValue(a.ReaderUtil.getString(t,s.JsonSchema.pavCreatedOn)),e.oslc_modifiedBy=o.CedarUser.forValue(a.ReaderUtil.getString(t,s.JsonSchema.oslcModifiedBy)),e.pav_lastUpdatedOn=l.IsoDate.forValue(a.ReaderUtil.getString(t,s.JsonSchema.pavLastUpdatedOn))}readAnnotations(e,t){const r=new d.Annotations,n=a.ReaderUtil.getNodeOrNull(t,u.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 i=a.ReaderUtil.getNode(n,e),o=a.ReaderUtil.getString(i,s.JsonSchema.atId);if(null!==o)r.add(new m.AnnotationAtId(e,o));else{const t=a.ReaderUtil.getString(i,s.JsonSchema.atValue);if(null===t)throw new Error(`Value of annotation must contain an @id or @value at /_annotations/${e}`);r.add(new p.AnnotationAtValue(e,t))}}),r.getSize()>0&&(e.annotations=r)}}t.JsonAbstractArtifactReader=h},3326(e,t,r){t.JsonAbstractInstanceArtifactReader=void 0;const n=r(8534),i=r(8748),a=r(2733),s=r(7993);class o extends s.JsonAbstractArtifactReader{constructor(e){super(e)}readNonReportableAttributes(e,t){i.ReaderUtil.getArtifactIdentifier(t,a.JsonSchema.atId,this.lenient),super.readNonReportableAttributes(e,t),e.schema_isBasedOn=n.CedarArtifactId.forValue(i.ReaderUtil.getArtifactIdentifier(t,a.JsonSchema.schemaIsBasedOn,this.lenient)),e.pav_derivedFrom=n.CedarArtifactId.forValue(i.ReaderUtil.getArtifactIdentifier(t,a.JsonSchema.pavDerivedFrom,this.lenient))}}t.JsonAbstractInstanceArtifactReader=o},978(e,t,r){t.JsonAbstractSchemaArtifactReader=void 0;const n=r(4443),i=r(8333),a=r(8534),s=r(8748),o=r(2733),l=r(5747),c=r(8557),d=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,i.internalNameFor)(e.schema_name,this.artifactTypeWord()),e.description=s.ReaderUtil.getString(t,l.TemplateProperty.description),e.schema_schemaVersion=c.SchemaVersion.forValue(s.ReaderUtil.getString(t,o.JsonSchema.schemaVersion)),e.pav_version=d.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=a.CedarArtifactId.forValue(s.ReaderUtil.getArtifactIdentifier(t,o.JsonSchema.pavDerivedFrom,this.lenient)),e.pav_previousVersion=a.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),i=r(978),a=r(1492),s=r(455),o=r(2763),l=r(8748),c=r(2733),d=r(936),u=r(9034),m=r(2888),p=r(9760),h=r(3056),f=r(5793),y=r(2475),T=r(6968),g=r(3812),E=r(3608),C=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 v extends i.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,i){const a=o.CedarArtifactType.forValue(l.ReaderUtil.getString(e,c.JsonSchema.atType));if(a!==o.CedarArtifactType.NULL){const r=new s.ChildDeploymentInfo(t);r.atType=a;const i=l.ReaderUtil.getNode(e,d.CedarModel.ui);return r.uiInputType=u.UiInputType.forValue(l.ReaderUtil.getString(i,d.CedarModel.inputType)),r.hidden=l.ReaderUtil.getBoolean(i,d.CedarModel.Ui.hidden),n.add(r),r}return this.reportBlueprintDifference(r,new m.ComparisonError("jtr09",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,i.add(t,c.JsonSchema.atType))),null}readReportableAttributes(e,t,r,n){h.JsonObjectComparator.comparePrimitive(r,this.knownArtifactType.getValue(),l.ReaderUtil.getString(t,c.JsonSchema.atType),n.add(c.JsonSchema.atType));const i=l.ReaderUtil.getNode(t,c.JsonSchema.atContext),a=T.JsonContainerArtifactContent.CONTEXT_VERBATIM;h.JsonObjectComparator.compareBothWays(r,a,i,n.add(c.JsonSchema.atContext),this.behavior,[c.JsonSchema.atLanguage,...Object.keys(e.extensions.prefixes)]),h.JsonObjectComparator.comparePrimitive(r,f.JavascriptType.OBJECT.getValue(),l.ReaderUtil.getString(t,d.CedarModel.type),n.add(d.CedarModel.type)),h.JsonObjectComparator.comparePrimitive(r,y.ArtifactSchema.CURRENT.getValue(),l.ReaderUtil.getString(t,d.CedarModel.schema),n.add(d.CedarModel.schema)),e.language=A.Language.forValue(l.ReaderUtil.getString(i,c.JsonSchema.atLanguage))}parseChildren(e,t,r,n,i){for(const a of e.children){let e=l.ReaderUtil.getNode(t,a.name),d=i.add(c.JsonSchema.properties,a.name);if(a.isMultiInAnyWay()&&(e=l.ReaderUtil.getNode(e,c.JsonSchema.items),d=d.add(c.JsonSchema.items)),a.atType===o.CedarArtifactType.STATIC_TEMPLATE_FIELD){const t=this.fieldReader.readFromObjectInternal(e,a,d),i=t.field.createDeploymentBuilder(a.name).withLabel(a.label).withDescription(a.description);i.withHidden(a.hidden);const s=i.build();r.addChild(t.field,s),n.merge(t.parsingResult)}else if(a.atType===o.CedarArtifactType.TEMPLATE_FIELD){const t=this.fieldReader.readFromObjectInternal(e,a,d),i=t.field.createDeploymentBuilder(a.name),o=a;i.withIri(o.iri).withLabel(a.label).withDescription(a.description),a instanceof I.AbstractFieldChildDeploymentInfo&&i.withHidden(a.hidden).withRequiredValue(a.requiredValue).withRecommendedValue(a.recommendedValue).withContinuePreviousLine(a.continuePreviousLine).withValueRecommendationEnabled(a.valueRecommendationEnabled),i instanceof E.ChildDeploymentInfoBuilder&&a instanceof s.ChildDeploymentInfo?i.withMultiInstance(a.multiInstance).withMinItems(a.minItems).withMaxItems(a.maxItems):i instanceof C.ChildDeploymentInfoAlwaysMultipleBuilder&&i.withMinItems(o.minItems).withMaxItems(o.maxItems);const l=i.build();r.addChild(t.field,l),n.merge(t.parsingResult)}else if(a.atType===o.CedarArtifactType.TEMPLATE_ELEMENT){const t=this.getElementReader().readFromObject(e,d),i=t.element.createDeploymentBuilder(a.name).withLabel(a.label).withDescription(a.description);a instanceof g.AbstractDynamicChildDeploymentInfo&&i.withIri(a.iri),a instanceof s.ChildDeploymentInfo&&i.withMultiInstance(a.multiInstance).withMinItems(a.minItems).withMaxItems(a.maxItems),r.addChild(t.element,i.build()),n.merge(t.parsingResult)}}}validatePropertiesVsOrder(e,t,r,n){for(const i of e.children)t.includes(i.name)||this.reportBlueprintDifference(r,new m.ComparisonError("jtr08",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n.add(d.CedarModel.ui,d.CedarModel.order),i.name,null))}finalizeChildInfo(e,t,r,n){const i=new a.ContainerArtifactChildrenInfo;for(const a of e){const e=t.get(a);null!=e?i.add(e):this.reportBlueprintDifference(r,new m.ComparisonError("jtr07",p.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,n.add(d.CedarModel.ui,d.CedarModel.order),null,a))}return i}getCandidateChildrenInfo(e,t,r,i){const s=new a.ContainerArtifactChildrenInfo;return Object.keys(e).forEach(a=>{if(n.ReservedNames.isReservedName(a)){const t=l.ReaderUtil.getNode(e,a),r="array"===l.ReaderUtil.getString(t,c.JsonSchema.type)?l.ReaderUtil.getNode(t,c.JsonSchema.items):t,n=r?.[c.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 ${i.add(c.JsonSchema.properties,a).toString()}`)}if(!t.has(a)){const t=l.ReaderUtil.getNode(e,a);if("object"==typeof t&&null!==t){let e=t;const n=l.ReaderUtil.getString(t,c.JsonSchema.type);if("object"==n)this.readAndStoreCandidateChildInfo(e,a,r,s,i.add(c.JsonSchema.properties,a));else if("array"==n){e=l.ReaderUtil.getNode(t,c.JsonSchema.items);const n=this.readAndStoreCandidateChildInfo(e,a,r,s,i.add(c.JsonSchema.properties,a,c.JsonSchema.items));null!==n&&(n.multiInstance=!0,n.minItems=l.ReaderUtil.getNumber(t,d.CedarModel.minItems),n.maxItems=l.ReaderUtil.getNumber(t,d.CedarModel.maxItems))}}}}),s}generateAndValidateRequiredMap(e,t,r,n){const i=e.reduce((e,t)=>(e.set(t,!0),e),new Map);for(const e of t)i.has(e)||this.reportBlueprintDifference(r,new m.ComparisonError("jtr01",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n.add(c.JsonSchema.required),e));return i}checkRequiredBothWays(e,t,r,n,i,a){const s=e.getChildrenNamesForRequired();for(const e of s)t.has(e)||this.reportBlueprintDifference(i,new m.ComparisonError("jtr02",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,a.add(c.JsonSchema.required),e));for(const t of r)n.has(t)||e.has(t)||this.reportBlueprintDifference(i,new m.ComparisonError("jtr03",p.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,a.add(c.JsonSchema.required),t))}extractUIPreferredLabelsAndDescriptions(e,t,r,n){const i=l.ReaderUtil.getStringMap(e,d.CedarModel.propertyLabels);if(null!==i)for(const e of t.children)i.has(e.name)&&(e.label=i.get(e.name)??null);const a=l.ReaderUtil.getStringMap(e,d.CedarModel.propertyDescriptions);if(null!==a)for(const e of t.children)a.has(e.name)&&(e.description=a.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 i=l.ReaderUtil.getNode(e,c.JsonSchema.atContext),a=l.ReaderUtil.getNode(i,c.JsonSchema.properties);for(const e of t.children)if(this.includeInIRIMapping(e)){if(null===a||!Object.hasOwn(a,e.name))continue;const t=l.ReaderUtil.getNode(a,e.name),i=l.ReaderUtil.getStringList(t,c.JsonSchema.enum);null===i||1!=i.length?this.reportBlueprintDifference(r,new m.ComparisonError("jtr06",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n.add(c.JsonSchema.properties,c.JsonSchema.atContext,c.JsonSchema.properties,e.name,c.JsonSchema.enum,0))):e instanceof g.AbstractDynamicChildDeploymentInfo&&(l.ReaderUtil.assertIdentifier(i[0],c.JsonSchema.enum),e.iri=i[0])}}readInstanceTypeSpecification(e,t,r){const n=l.ReaderUtil.getNode(t,c.JsonSchema.properties);if(null!==n){const t=l.ReaderUtil.getNode(n,c.JsonSchema.atType);if(null!==t){const r=l.ReaderUtil.getNodeList(t,c.JsonSchema.oneOf);null!==r&&r.forEach(t=>{const r=l.ReaderUtil.getStringList(t,c.JsonSchema.enum);if(Object.hasOwn(t,c.JsonSchema.enum)){if(!Array.isArray(t[c.JsonSchema.enum])||0===r.length)throw new Error("Instance types must be a nonempty array of IRIs");e.instanceTypeSpecifications=r}})}}}}t.JsonContainerArtifactReader=v},7909(e,t,r){t.JsonTemplateElementReader=void 0;const n=r(5904),i=r(797),a=r(936),s=r(2733),o=r(2763),l=r(5747),c=r(8748),d=r(3056),u=r(4036),m=r(3188),p=r(5846),h=r(9932),f=r(4948),y=r(7661),T=r(5510),g=r(1501);class E extends T.JsonContainerArtifactReader{knownArtifactType=o.CedarArtifactType.TEMPLATE_ELEMENT;constructor(e){super(e)}static getStrict(){return new E(p.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new E(p.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new E(e)}getElementReader(){return this}includeInIRIMapping(e){return e.atType!==o.CedarArtifactType.STATIC_TEMPLATE_FIELD}readFromString(e){const t=n.JsonSourcePolicy.parse(e);return this.readFromObject(t,new m.JsonPath)}readFromObject(e,t=new m.JsonPath){const r=new u.JsonArtifactParsingResult,n=y.TemplateElement.buildEmptyWithNullValues();return null===t.getLastComponent()&&c.ReaderUtil.getArtifactIdentifier(e,s.JsonSchema.atId,this.lenient),this.readNonReportableAttributes(n,e),(0,i.applySchemaReaderDefaults)(n,e,t,"json"),this.readReportableAttributes(n,e,r,t),this.readAnnotations(n,e),this.readInstanceTypeSpecification(n,e,r),this.readAndValidateChildrenInfo(n,e,r,t),new f.JsonTemplateElementReaderResult(n,r,e)}readNonReportableAttributes(e,t){e.skos_prefLabel=c.ReaderUtil.getString(t,a.CedarModel.skosPrefLabel),e.skos_altLabel=c.ReaderUtil.getFilteredStringList(t,a.CedarModel.skosAltLabel);const r=c.ReaderUtil.getNode(t,a.CedarModel.ui);null!==r&&(e.header=c.ReaderUtil.getString(r,a.CedarModel.header),e.footer=c.ReaderUtil.getString(r,a.CedarModel.footer)),super.readNonReportableAttributes(e,t)}readAndValidateChildrenInfo(e,t,r,n){const i=c.ReaderUtil.getStringList(t,s.JsonSchema.required),o=c.ReaderUtil.getNode(t,s.JsonSchema.properties),l=this.generateAndValidateRequiredMap(i,g.JsonTemplateElementContent.REQUIRED_PARTIAL,r,n),d=this.getCandidateChildrenInfo(o,g.JsonTemplateElementContent.PROPERTIES_PARTIAL_KEY_MAP,r,n);this.checkRequiredBothWays(d,l,i,g.JsonTemplateElementContent.REQUIRED_PARTIAL_KEY_MAP,r,n);const u=c.ReaderUtil.getNode(t,a.CedarModel.ui);this.extractUIPreferredLabelsAndDescriptions(u,d,r,n),this.extractIRIMappings(o,d,r,n);const m=c.ReaderUtil.getStringList(u,a.CedarModel.order),p=this.finalizeChildInfo(m,d,r,n);this.validatePropertiesVsOrder(d,m,r,n),this.validateProperties(p,o,e,r,n),this.parseChildren(p,o,e,r,n)}validateProperties(e,t,r,n,i){const a=c.ReaderUtil.deepClone(g.JsonTemplateElementContent.PROPERTIES_PARTIAL);e.hasAttributeValue()&&(a[s.JsonSchema.atContext][l.TemplateProperty.additionalProperties]=h.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE);const o=a[s.JsonSchema.atContext],u=c.ReaderUtil.getNodeList(o,s.JsonSchema.required);null!=u&&0==u.length&&c.ReaderUtil.deleteNodeKey(o,s.JsonSchema.required),g.JsonTemplateElementContent.acceptEitherIdTyping(a,t),d.JsonObjectComparator.compareToLeft(n,a,t,i.add(s.JsonSchema.properties),this.behavior)}}t.JsonTemplateElementReader=E},4948(e,t,r){t.JsonTemplateElementReaderResult=void 0;const n=r(8518);class i extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get element(){return this._artifact}get elementSourceObject(){return this._artifactSourceObject}}t.JsonTemplateElementReaderResult=i},4381(e,t,r){t.JsonTemplateFieldReader=void 0;const n=r(5904),i=r(797),a=r(9517),s=r(4036),o=r(3188),l=r(8748),c=r(2733),d=r(5747),u=r(3056),m=r(2763),p=r(5793),h=r(936),f=r(2475),y=r(9932),T=r(9241),g=r(5933),E=r(6511),C=r(9148),I=r(6291),A=r(8596),b=r(7095),R=r(9251),v=r(9315),S=r(2691),_=r(1769),N=r(9683),w=r(1468),L=r(9053),F=r(9034),V=r(19),O=r(2419),x=r(9366),D=r(4869),M=r(8728),P=r(5846),U=r(6396),B=r(855),Y=r(978),J=r(455),k=r(7752),K=r(8244),W=r(4956),j=r(6854),$=r(3028),X=r(7004),q=r(1886),G=r(8583),z=r(6591),H=r(6731);class Q extends Y.JsonAbstractSchemaArtifactReader{artifactTypeWord(){return"field"}constructor(e){super(e)}static getStrict(){return new Q(P.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new Q(P.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new Q(e)}static dynamicTypeReaderMap=new Map([[D.CedarFieldType.TEXT,new T.JsonFieldReaderTextField],[D.CedarFieldType.TEXTAREA,new N.JsonFieldReaderTextArea],[D.CedarFieldType.CONTROLLED_TERM,new M.JsonFieldReaderControlledTerm],[D.CedarFieldType.LINK,new b.JsonFieldReaderLink],[D.CedarFieldType.EXT_ROR,new K.JsonFieldReaderExtRor],[D.CedarFieldType.EXT_ORCID,new W.JsonFieldReaderExtOrcid],[D.CedarFieldType.EXT_PFAS,new j.JsonFieldReaderExtPfas],[D.CedarFieldType.EXT_PUBMED,new $.JsonFieldReaderExtPubmed],[D.CedarFieldType.EXT_RRID,new X.JsonFieldReaderExtRrid],[D.CedarFieldType.EXT_NIH_GRANT_ID,new q.JsonFieldReaderExtNihGrantId],[D.CedarFieldType.EXT_DOI,new G.JsonFieldReaderExtDoi],[D.CedarFieldType.TEMPORAL,new v.JsonFieldReaderTemporal],[D.CedarFieldType.EMAIL,new S.JsonFieldReaderEmail],[D.CedarFieldType.NUMERIC,new _.JsonFieldReaderNumeric],[D.CedarFieldType.PHONE_NUMBER,new w.JsonFieldReaderPhoneNumber],[D.CedarFieldType.RADIO,new L.JsonFieldReaderRadio],[D.CedarFieldType.CHECKBOX,new V.JsonFieldReaderCheckbox],[D.CedarFieldType.SINGLE_SELECT_LIST,new O.JsonFieldReaderList],[D.CedarFieldType.MULTIPLE_SELECT_LIST,new O.JsonFieldReaderList],[D.CedarFieldType.ATTRIBUTE_VALUE,new x.JsonFieldReaderAttributeValue],[D.CedarFieldType.STATIC_PAGE_BREAK,new g.JsonFieldReaderPageBreak],[D.CedarFieldType.STATIC_SECTION_BREAK,new E.JsonFieldReaderSectionBreak],[D.CedarFieldType.STATIC_IMAGE,new C.JsonFieldReaderImage],[D.CedarFieldType.STATIC_RICH_TEXT,new I.JsonFieldReaderRichText],[D.CedarFieldType.STATIC_YOUTUBE,new A.JsonFieldReaderYoutube]]);readFromString(e){const t=n.JsonSourcePolicy.parse(e);return this.readFromObject(t)}readFromObject(e){const t=l.ReaderUtil.getNode(e,c.JsonSchema.items);"array"===e.type&&"attribute-value"===l.ReaderUtil.getNode(t,h.CedarModel.ui)[h.CedarModel.inputType]&&(e=t);const r=J.ChildDeploymentInfo.standalone(),n=new o.JsonPath;return this.readFromObjectInternal(e,r,n)}readFromObjectInternal(e,t,r){const n=new s.JsonArtifactParsingResult,a=Q.readFieldSpecificAttributes(e,t,n,r);if(t instanceof J.ChildDeploymentInfo&&t.isStandalone()&&(a instanceof z.TextFieldImpl||a instanceof H.ControlledTermFieldImpl)&&(a.valueRecommendationEnabled=t.valueRecommendationEnabled),t instanceof J.ChildDeploymentInfo&&t.isStandalone()){const r=l.ReaderUtil.getNode(e,h.CedarModel.ui);a.hidden=l.ReaderUtil.getBoolean(r,h.CedarModel.Ui.hidden),a.continuePreviousLine=t.continuePreviousLine,a.cedarFieldType.recordsRequirement&&(a.requiredValue=t.requiredValue,a.recommendedValue=t.recommendedValue)}return t instanceof J.ChildDeploymentInfo&&t.isStandalone()&&l.ReaderUtil.getArtifactIdentifier(e,c.JsonSchema.atId,this.lenient),this.readNonReportableAttributes(a,e),(0,i.applySchemaReaderDefaults)(a,e,r,"json"),this.readReportableAttributes(a,e,n,r),this.readAnnotations(a,e),new U.JsonTemplateFieldReaderResult(a,n,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t),e.skos_prefLabel=l.ReaderUtil.getString(t,h.CedarModel.skosPrefLabel),e.skos_altLabel=l.ReaderUtil.getFilteredStringList(t,h.CedarModel.skosAltLabel)}readReportableAttributes(e,t,r,n){const i=l.ReaderUtil.getNode(t,c.JsonSchema.atContext);let s=a.JsonNode.getEmpty();e.cedarArtifactType==m.CedarArtifactType.TEMPLATE_FIELD?s=y.JsonTemplateFieldContentDynamic.CONTEXT_VERBATIM:e.cedarArtifactType==m.CedarArtifactType.STATIC_TEMPLATE_FIELD&&(s=R.JsonTemplateFieldContentStatic.CONTEXT_VERBATIM),u.JsonObjectComparator.compareBothWays(r,s,i,n.add(c.JsonSchema.atContext),this.behavior,[c.JsonSchema.atLanguage,...Object.keys(e.extensions.prefixes)]),e.cedarFieldType===D.CedarFieldType.ATTRIBUTE_VALUE?u.JsonObjectComparator.comparePrimitive(r,p.JavascriptType.STRING.getValue(),l.ReaderUtil.getString(t,h.CedarModel.type),n.add(h.CedarModel.type)):u.JsonObjectComparator.comparePrimitive(r,p.JavascriptType.OBJECT.getValue(),l.ReaderUtil.getString(t,h.CedarModel.type),n.add(h.CedarModel.type)),u.JsonObjectComparator.comparePrimitive(r,!1,l.ReaderUtil.getBoolean(t,d.TemplateProperty.additionalProperties),n.add(d.TemplateProperty.additionalProperties)),u.JsonObjectComparator.comparePrimitive(r,f.ArtifactSchema.CURRENT.getValue(),l.ReaderUtil.getString(t,h.CedarModel.schema),n.add(h.CedarModel.schema)),e.language=k.Language.forValue(l.ReaderUtil.getString(i,c.JsonSchema.atLanguage))}static readFieldSpecificAttributes(e,t,r,n){const i=m.CedarArtifactType.forValue(l.ReaderUtil.getString(e,c.JsonSchema.atType)),a=l.ReaderUtil.getNode(e,h.CedarModel.ui),s=l.ReaderUtil.getString(a,h.CedarModel.inputType),o=F.UiInputType.forValue(s),d=this.getCedarFieldType(e,o);if(d===D.CedarFieldType.NULL)throw new Error(`Unknown uiInputType type: "${s}"`);if((i==m.CedarArtifactType.TEMPLATE_FIELD||i==m.CedarArtifactType.STATIC_TEMPLATE_FIELD)&&null!=o){const i=this.dynamicTypeReaderMap.get(d);if(!i)throw new Error(`\n No reader defined for dynamic input type "${d.getValue()}"`);return i.read(e,t,r,n)}return B.UnknownTemplateField.build()}static fieldHasValueConstraint(e){const t=l.ReaderUtil.getNode(e,h.CedarModel.valueConstraints);return l.ReaderUtil.getNodeList(t,h.CedarModel.ontologies).length>0||(l.ReaderUtil.getNodeList(t,h.CedarModel.branches).length>0||(l.ReaderUtil.getNodeList(t,h.CedarModel.classes).length>0||l.ReaderUtil.getNodeList(t,h.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=l.ReaderUtil.getNode(e,c.JsonSchema.properties);r=Object.prototype.hasOwnProperty.call(t,c.JsonSchema.atId)&&!Object.prototype.hasOwnProperty.call(t,c.JsonSchema.atValue)||this.fieldHasValueConstraint(e)?D.CedarFieldType.CONTROLLED_TERM:D.CedarFieldType.TEXT}return r}}t.JsonTemplateFieldReader=Q},8220(e,t,r){t.JsonTemplateFieldReaderInternal=void 0;const n=r(3188),i=r(4381),a=r(455);class s extends i.JsonTemplateFieldReader{constructor(e){super(e)}static getForBehavior(e){return new s(e)}readFromObjectInternal(e,t,r){return t=t||a.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 i extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get field(){return this._artifact}get fieldSourceObject(){return this._artifactSourceObject}}t.JsonTemplateFieldReaderResult=i},4385(e,t,r){t.JsonTemplateFieldTypeSpecificReader=void 0;const n=r(855),i=r(8748),a=r(936);t.JsonTemplateFieldTypeSpecificReader=class{read(e,t,r,i){return n.UnknownTemplateField.build()}readRequiredAndHidden(e,t){const r=i.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);null!=r&&(t.requiredValue=i.ReaderUtil.getBoolean(r,a.CedarModel.requiredValue),t.recommendedValue=i.ReaderUtil.getBoolean(r,a.CedarModel.ValueConstraints.recommendedValue));const n=i.ReaderUtil.getNode(e,a.CedarModel.ui);n&&(t.hidden=i.ReaderUtil.getBoolean(n,a.CedarModel.Ui.hidden),t.continuePreviousLine=i.ReaderUtil.getBoolean(n,a.CedarModel.Ui.continuePreviousLine),t.valueRecommendationEnabled=i.ReaderUtil.getBoolean(n,a.CedarModel.Ui.valueRecommendationEnabled))}}},9232(e,t,r){t.JsonTemplateInstanceReader=void 0;const n=r(5904),i=r(3992),a=r(1625),s=r(9167),o=r(2763),l=r(4036),c=r(2888),d=r(9760),u=r(3188),m=r(5846),p=r(3326),h=r(2272),f=r(6537),y=r(8748),T=r(2733),g=r(7723),E=r(5222),C=r(7571),I=r(7548),A=r(8193),b=r(4877),R=r(4465),v=r(3644),S=r(9327),_=r(936),N=r(350),w=r(4033);class L extends p.JsonAbstractInstanceArtifactReader{knownArtifactType=o.CedarArtifactType.TEMPLATE_INSTANCE;knownKeys={[T.JsonSchema.atId]:!0,[T.JsonSchema.atType]:!0,[T.JsonSchema.pavDerivedFrom]:!0,[T.JsonSchema.schemaIdentifier]:!0,[T.JsonSchema.oslcModifiedBy]:!0,[T.JsonSchema.pavLastUpdatedOn]:!0,[T.JsonSchema.pavCreatedBy]:!0,[T.JsonSchema.pavCreatedOn]:!0,[T.JsonSchema.schemaDescription]:!0,[T.JsonSchema.schemaName]:!0,[T.JsonSchema.schemaIsBasedOn]:!0,[T.JsonSchema.atContext]:!0,[_.CedarModel.annotations]:!0};constructor(e){super(e)}static getStrict(){return new L(m.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new L(m.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new L(e)}readFromString(e){const t=n.JsonSourcePolicy.parse(e);return this.readFromObject(t,new u.JsonPath)}readFromObject(e,t){const r=new l.JsonArtifactParsingResult,n=h.TemplateInstance.buildEmptyWithNullValues();this.readNonReportableAttributes(n,e),n.descriptionWasAbsent=null===y.ReaderUtil.getString(e,T.JsonSchema.schemaDescription),n.schema_description=n.schema_description??"";const i=t??new u.JsonPath;return this.readInstanceData(e,n,i,r),L.reportEnvelope(e,i,r),new f.JsonTemplateInstanceReaderResult(n,r,e)}static ENVELOPE_KEYS=[T.JsonSchema.atContext,T.JsonSchema.atId,T.JsonSchema.schemaIsBasedOn,T.JsonSchema.pavCreatedOn,T.JsonSchema.pavCreatedBy,T.JsonSchema.oslcModifiedBy,T.JsonSchema.pavLastUpdatedOn];static reportEnvelope(e,t,r){for(const n of L.ENVELOPE_KEYS){if(!Object.hasOwn(e,n)){r.addBlueprintComparisonWarning(new c.ComparisonError("JsonTemplateInstanceReader",d.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,t.add(n),n));continue}const i=y.ReaderUtil.getNode(e,n);(null==i||n===T.JsonSchema.atContext&&0===Object.keys(i).length)&&r.addBlueprintComparisonWarning(new c.ComparisonError("JsonTemplateInstanceReader",d.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 g.InstanceDataContainer;Object.keys(e).forEach(n=>{if(!this.isKnownKey(n)){const i=y.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,T.JsonSchema.atContext));i.forEach((i,a)=>{if(s){if(null===i||"object"!=typeof i||Array.isArray(i)||Object.hasOwn(i,T.JsonSchema.atValue))throw new Error(`Cannot mix fields and element instances in array "${n}" at index ${a}`);e[a]=this.parseContainer(i,t.add(n,a),r)}else e[a]=this.parseNode(i,t.add(n,a),r)})}else a.setValue(n,this.parseNode(i,t.add(n),r))}});for(const e of w.AttributeValueNamePolicy.findConflicts(a,n,!0).filter(e=>0===e.path.length))r.addBlueprintComparisonError(new c.ComparisonError("JsonTemplateInstanceReader",d.ComparisonErrorType.VALUE_MISMATCH,t.add(...w.AttributeValueNamePolicy.locationOf(e)),"a unique, non-reserved attribute-value name",e.name));this.packAttributeValues(a);const s=Object.hasOwn(e,T.JsonSchema.atContext)?y.ReaderUtil.getNode(e,T.JsonSchema.atContext):null;if(null!=s){const e=s;Object.keys(a.values).forEach(t=>{const r=y.ReaderUtil.getString(e,t);null!==r&&a.setIri(t,r)}),Object.keys(a.values).forEach(t=>{const r=a.values[t];r instanceof S.InstanceDataAttributeValueField&&Object.keys(r.values).forEach(t=>{const r=y.ReaderUtil.getString(e,t);null!==r&&a.setIri(t,r)})}),Object.keys(e).forEach(t=>{if(Object.hasOwn(N.JsonTemplateInstanceContent.CONTEXT_VERBATIM,t))return;const r=y.ReaderUtil.getString(e,t);null!==r&&a.setIri(t,r)})}if(Object.hasOwn(e,T.JsonSchema.atId)){const n=y.ReaderUtil.getString(e,T.JsonSchema.atId);if(null!==n){if("string"!=typeof n)throw new Error(`Invalid URI at "${T.JsonSchema.atId}": expected a string.`);i.TextPolicy.isBlank(n)?(this.behavior.useWarningForKnownIssues()||L.refuseEmptyIdentifier(e),r.addBlueprintComparisonWarning(new c.ComparisonError("JsonTemplateInstanceReader",d.ComparisonErrorType.VALUE_MISMATCH,t.add(T.JsonSchema.atId),"an absolute IRI or null while the occurrence awaits server assignment",n))):this.lenient?y.ReaderUtil.assertIri(n,T.JsonSchema.atId):y.ReaderUtil.assertIdentifier(n,T.JsonSchema.atId),a.id=n}}return a}static VALUE_ATOM_KEYS=new Set([T.JsonSchema.atValue,T.JsonSchema.atLanguage,T.JsonSchema.atId,T.JsonSchema.rdfsLabel,T.JsonSchema.atType,_.CedarModel.skosNotation,_.CedarModel.skosPrefLabel]);static isValueNode(e){if(null==e)return!1;if("string"==typeof e)return!0;if(Object.hasOwn(e,T.JsonSchema.atValue))return!0;if(Object.hasOwn(e,T.JsonSchema.atContext))return!1;const t=Object.keys(e);return t.length>0&&t.every(e=>L.VALUE_ATOM_KEYS.has(e))}static readValueNode(e){return null==e?new R.InstanceDataEmptyNode:"string"==typeof e?new v.InstanceDataAttributeValueFieldName(e):L.isValueNode(e)?L.parseDataAtom(e):new R.InstanceDataEmptyNode}parseNode(e,t,r){if(null==e)return new R.InstanceDataEmptyNode;if("string"==typeof e)return new v.InstanceDataAttributeValueFieldName(e);if(L.isValueNode(e)){const n=L.parseDataAtom(e);return L.reportNullIri(n,t,r),n}return 0===Object.keys(e).length?new R.InstanceDataEmptyNode:this.parseContainer(e,t,r)}static reportNullIri(e,t,r){(e instanceof C.InstanceDataLinkAtom||e instanceof A.InstanceDataControlledAtom)&&null===e.id&&r.addBlueprintComparisonError(new c.ComparisonError("JsonTemplateInstanceReader",d.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,t.add(T.JsonSchema.atId),"an IRI",null))}static parseDataAtom(e){if(Object.hasOwn(e,T.JsonSchema.atId)&&Object.hasOwn(e,T.JsonSchema.atValue))throw new Error("A field cannot contain both @id and @value.");const t=this.parseDataAtomWithoutNotation(e);return"language"in t&&(t.language=y.ReaderUtil.getString(e,T.JsonSchema.atLanguage)),"preferredLabel"in t&&(t.preferredLabel=y.ReaderUtil.getString(e,_.CedarModel.skosPrefLabel)),!("notation"in t)||t instanceof a.InstanceDataNotationAtom||(t.notation=y.ReaderUtil.getString(e,T.JsonSchema.skosNotation)),t}static parseDataAtomWithoutNotation(e){if(Object.hasOwn(e,T.JsonSchema.atValue)){const t=y.ReaderUtil.getString(e,T.JsonSchema.atValue),r=y.ReaderUtil.getSingleType(e,T.JsonSchema.atType);return null===r?new E.InstanceDataStringAtom(t,y.ReaderUtil.getString(e,T.JsonSchema.rdfsLabel)):new b.InstanceDataTypedAtom(t,r,y.ReaderUtil.getString(e,T.JsonSchema.rdfsLabel))}if(Object.hasOwn(e,T.JsonSchema.atId)){y.ReaderUtil.assertFieldIri(y.ReaderUtil.getString(e,T.JsonSchema.atId),T.JsonSchema.atId);const t=y.ReaderUtil.getString(e,T.JsonSchema.atId),r=y.ReaderUtil.getString(e,T.JsonSchema.rdfsLabel);return null===r?C.InstanceDataLinkAtom.fromParsedNode(t,y.ReaderUtil.getSingleType(e,T.JsonSchema.atType)):A.InstanceDataControlledAtom.fromParsedNode(t,r,y.ReaderUtil.getSingleType(e,T.JsonSchema.atType))}const t=y.ReaderUtil.getString(e,T.JsonSchema.rdfsLabel);if(null!==t)return new s.InstanceDataLabelAtom(t,y.ReaderUtil.getSingleType(e,T.JsonSchema.atType));const r=y.ReaderUtil.getString(e,T.JsonSchema.skosNotation);return null!==r?new a.InstanceDataNotationAtom(r,y.ReaderUtil.getSingleType(e,T.JsonSchema.atType)):new I.InstanceDataEmptyAtom(e)}packAttributeValues(e){const t=e.values,r=[];Object.keys(t).forEach(e=>{const n=t[e];if(Array.isArray(n)){let i=!1;if(n.forEach((e,t)=>{e instanceof v.InstanceDataAttributeValueFieldName||(i=!0)}),n.length>0&&!i){const i=new S.InstanceDataAttributeValueField(e);r.push(i),n.forEach((e,r)=>{const n=e.name;if(null!==n&&Object.hasOwn(t,n)){const e=t[n];i.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=L},6537(e,t,r){t.JsonTemplateInstanceReaderResult=void 0;const n=r(8518);class i extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get instance(){return this._artifact}get instanceSourceObject(){return this._artifactSourceObject}}t.JsonTemplateInstanceReaderResult=i},5291(e,t,r){t.JsonTemplateReader=void 0;const n=r(5904),i=r(797),a=r(936),s=r(2733),o=r(2763),l=r(5747),c=r(8748),d=r(6551),u=r(3056),m=r(4036),p=r(7954),h=r(3188),f=r(5846),y=r(9932),T=r(7909),g=r(5510),E=r(3281);class C extends g.JsonContainerArtifactReader{elementReader;knownArtifactType=o.CedarArtifactType.TEMPLATE;constructor(e){super(e),this.elementReader=T.JsonTemplateElementReader.getForBehavior(e)}static getStrict(){return new C(f.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new C(f.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new C(e)}getElementReader(){return this.elementReader}includeInIRIMapping(e){return e.atType!==o.CedarArtifactType.STATIC_TEMPLATE_FIELD}readFromString(e){const t=n.JsonSourcePolicy.parse(e);return this.readFromObject(t)}readFromObject(e,t=new h.JsonPath){const r=new m.JsonArtifactParsingResult,n=E.Template.buildEmptyWithNullValues();return c.ReaderUtil.getArtifactIdentifier(e,s.JsonSchema.atId,this.lenient),this.readNonReportableAttributes(n,e),(0,i.applySchemaReaderDefaults)(n,e,t,"json"),this.readReportableAttributes(n,e,r,t),this.readAnnotations(n,e),this.readInstanceTypeSpecification(n,e,r),this.readAndValidateChildrenInfo(n,e,r,t),new p.JsonTemplateReaderResult(n,r,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t);const r=c.ReaderUtil.getNode(t,a.CedarModel.ui);null!==r&&(e.header=c.ReaderUtil.getString(r,a.CedarModel.header),e.footer=c.ReaderUtil.getString(r,a.CedarModel.footer))}readAndValidateChildrenInfo(e,t,r,n){const i=c.ReaderUtil.getStringList(t,s.JsonSchema.required),o=c.ReaderUtil.getNode(t,s.JsonSchema.properties),l=this.generateAndValidateRequiredMap(i,d.JsonTemplateContent.REQUIRED_PARTIAL,r,n),u=this.getCandidateChildrenInfo(o,d.JsonTemplateContent.PROPERTIES_PARTIAL_KEY_MAP,r,n);this.checkRequiredBothWays(u,l,i,d.JsonTemplateContent.REQUIRED_PARTIAL_KEY_MAP,r,n);const m=c.ReaderUtil.getNode(t,a.CedarModel.ui);this.extractUIPreferredLabelsAndDescriptions(m,u,r,n),this.extractIRIMappings(o,u,r,n);const p=c.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,i){let o=c.ReaderUtil.deepClone(d.JsonTemplateContent.PROPERTIES_PARTIAL);e.hasAttributeValue()&&(o=c.ReaderUtil.deepClone(d.JsonTemplateContent.PROPERTIES_PARTIAL),o[s.JsonSchema.atContext][l.TemplateProperty.additionalProperties]=y.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE),a.CedarModel.annotations in t||delete o[a.CedarModel.annotations];const m=c.ReaderUtil.getNode(c.ReaderUtil.getNode(t,s.JsonSchema.atContext),s.JsonSchema.properties);a.CedarModel.annotations in m||delete c.ReaderUtil.getNode(c.ReaderUtil.getNode(o,s.JsonSchema.atContext),s.JsonSchema.properties)[a.CedarModel.annotations],u.JsonObjectComparator.compareToLeft(n,o,t,i.add(s.JsonSchema.properties),this.behavior)}}t.JsonTemplateReader=C},7954(e,t,r){t.JsonTemplateReaderResult=void 0;const n=r(8518);class i extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get template(){return this._artifact}get templateSourceObject(){return this._artifactSourceObject}}t.JsonTemplateReaderResult=i},8639(e,t,r){t.CedarYamlReaders=void 0;const n=r(2763),i=r(1395),a=r(5677),s=r(8239),o=r(2999),l=r(9946);class c{behavior;isCompact;constructor(e,t=!1){this.behavior=e,this.isCompact=t}static getStrict(){return new c(i.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new c(i.YamlReaderBehavior.STRICT,!0)}getTemplateReader(){return a.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 a.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=c},6575(e,t,r){t.YamlAbstractArtifactReader=void 0;const n=r(3992),i=r(4443),a=r(8333),s=r(8534),o=r(2234),l=r(9857),c=r(8557),d=r(1027),u=r(3910),m=r(2763),p=r(5226),h=r(2787),f=r(3549),y=r(8748),T=r(2099),g=r(7752);class E{behavior;knownArtifactType=m.CedarArtifactType.NULL;isCompact;constructor(e,t=!1){this.behavior=e,this.isCompact=t}artifactTypeWord(){return this.knownArtifactType===m.CedarArtifactType.TEMPLATE?"template":this.knownArtifactType===m.CedarArtifactType.TEMPLATE_ELEMENT?"element":"field"}readNonReportableAttributes(e,t){if(e.extensions=i.SchemaExtensions.fromYaml(t),E.refuseEmptyIdentifier(t),e.at_id=s.CedarArtifactId.forValue(y.ReaderUtil.getString(t,T.YamlKeys.id)),e.schema_name=y.ReaderUtil.getString(t,T.YamlKeys.name),e.schema_description=y.ReaderUtil.getStringOrEmpty(t,T.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=o.CedarUser.forValue(y.ReaderUtil.getString(t,T.YamlKeys.createdBy)),e.pav_createdOn=l.IsoDate.forValue(y.ReaderUtil.getString(t,T.YamlKeys.createdOn)),e.oslc_modifiedBy=o.CedarUser.forValue(y.ReaderUtil.getString(t,T.YamlKeys.modifiedBy)),e.pav_lastUpdatedOn=l.IsoDate.forValue(y.ReaderUtil.getString(t,T.YamlKeys.modifiedOn));const r=y.ReaderUtil.getString(t,T.YamlKeys.modelVersion);if(null===r&&!this.isCompact)throw new Error(`No ${T.YamlKeys.modelVersion} present. A document without one is the compact form, which a reader has to be asked for.`);e.schema_schemaVersion=c.SchemaVersion.forValue(r),e.pav_version=d.PavVersion.forValue(y.ReaderUtil.getString(t,T.YamlKeys.version)),e.bibo_status=u.BiboStatus.forYamlValue(y.ReaderUtil.getString(t,T.YamlKeys.status)),e.pav_derivedFrom=s.CedarArtifactId.forValue(y.ReaderUtil.getArtifactIdentifier(t,T.YamlKeys.derivedFrom,this.behavior.useWarningForKnownIssues())),e.pav_previousVersion=s.CedarArtifactId.forValue(y.ReaderUtil.getIdentifier(t,T.YamlKeys.previousVersion)),e.schema_identifier=y.ReaderUtil.getString(t,T.YamlKeys.identifier),e.language=g.Language.forValue(y.ReaderUtil.getString(t,T.YamlKeys.language))}static refuseEmptyIdentifier(e,t=T.YamlKeys.id){const r=y.ReaderUtil.getString(e,t);if(null!==r&&"string"!=typeof r)throw new Error(`Invalid URI at "${t}": expected a string.`);if(null!==r&&n.TextPolicy.isBlank(r))throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);y.ReaderUtil.assertIri(r,t)}readAnnotations(e,t,r,n){const i=new p.Annotations,a=y.ReaderUtil.getNode(t,T.YamlKeys.annotations);Object.keys(a).forEach(e=>{const t=a[e];if(null===t||"object"!=typeof t||Array.isArray(t))throw new Error(`Expected map value for annotation at /annotations/${e}`);const r=y.ReaderUtil.getNode(a,e),n=y.ReaderUtil.getString(r,T.YamlKeys.id),s=y.ReaderUtil.getString(r,T.YamlKeys.value);if(null!==e)if(null!==n)i.add(new h.AnnotationAtId(e,n));else{if(null===s)throw new Error(`Annotation must have either a value or id at /annotations/${e}`);i.add(new f.AnnotationAtValue(e,s))}}),i.getSize()>0&&(e.annotations=i)}}t.YamlAbstractArtifactReader=E},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),i=r(6575),a=r(2999),s=r(455),o=r(2763),l=r(8748),c=r(2099),d=r(699),u=r(9499),m=r(4869),p=r(3239),h=r(8290),f=r(3608),y=r(513);class T extends i.YamlAbstractArtifactReader{fieldReader;constructor(e,t=!1){super(e,t),this.fieldReader=a.YamlTemplateFieldReader.getForBehavior(e,t)}readAndValidateChildrenInfo(e,t,r,i){l.ReaderUtil.getNodeList(t,c.YamlKeys.children).forEach(t=>{const r=l.ReaderUtil.getString(t,c.YamlKeys.type),a=l.ReaderUtil.getString(t,c.YamlKeys.key),g=u.YamlArtifactType.forValue(r);if(null===a)throw new Error(`A child without a ${c.YamlKeys.key} at ${i.add(c.YamlKeys.children).toString()}`);{if("string"!=typeof a)throw new Error(`Child key must be a string at ${i.add(c.YamlKeys.children,c.YamlKeys.key).toString()}`);if(n.ReservedNames.isReservedName(a))throw new Error(`Child schema uses a reserved instance property name at ${i.add(c.YamlKeys.children,a).toString()}`);const u=new s.ChildDeploymentInfo(a);u.atType=o.CedarArtifactType.forYamlArtifactType(g);const E=l.ReaderUtil.getNode(t,c.YamlKeys.configuration);if(u.label=l.ReaderUtil.getString(E,c.YamlKeys.overrideLabel),u.description=l.ReaderUtil.getString(E,c.YamlKeys.overrideDescription),u.multiInstance=l.ReaderUtil.getBoolean(E,c.YamlKeys.multiple),u.multiInstance&&(u.minItems=l.ReaderUtil.getNumber(E,c.YamlKeys.minItems)??y.AbstractChildDeploymentInfo.defaultMinItems,u.maxItems=l.ReaderUtil.getNumber(E,c.YamlKeys.maxItems)),u.requiredValue=l.ReaderUtil.getBoolean(E,c.YamlKeys.required),u.recommendedValue=l.ReaderUtil.getBoolean(E,c.YamlKeys.recommended),u.hidden=l.ReaderUtil.getBoolean(E,c.YamlKeys.hidden),u.valueRecommendationEnabled=l.ReaderUtil.getBoolean(E,c.YamlKeys.valueRecommendation),u.iri=l.ReaderUtil.getIdentifier(E,c.YamlKeys.propertyIri),g.isField()){const r=m.CedarFieldType.forYamlArtifactType(g);u.uiInputType=r.getUiInputType();const n=this.fieldReader.readFromObject(t,u,i.add(c.YamlKeys.children,a));(0,d.isSizedStaticField)(n.field)&&(n.field.width=l.ReaderUtil.getNumber(E,c.YamlKeys.width),n.field.height=l.ReaderUtil.getNumber(E,c.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,c.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,c.YamlKeys.minItems)).withMaxItems(l.ReaderUtil.getNumber(E,c.YamlKeys.maxItems));const y=s.build();e.addChild(n.field,y)}else{if(!g.isElement())throw new Error(`Unknown child type "${r}" at ${i.add(c.YamlKeys.children,a).toString()}`);{const r=this.getElementReader().readFromObject(t,u,i.add(c.YamlKeys.children,a)),n=r.element.createDeploymentBuilder(a).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},8979(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.YamlSourcePolicy=void 0;const n=r(3198),i=r(5904);t.YamlSourcePolicy=class{static parse(e){const t=(0,n.parseAllDocuments)(e,{version:"1.2",schema:"core",uniqueKeys:!1});if(1!==t.length)throw new SyntaxError("Expected one YAML document");const r=t[0];if(r.errors.length||r.warnings.length)throw new SyntaxError("Invalid or unsupported YAML syntax");const a=new Set;let s=1e6;const o=new Set(["str","bool","null","int","float","seq","map"].map(e=>"tag:yaml.org,2002:"+e)),l=function e(t,l){if(null===t)return null;if(!t||"object"!=typeof t||--s<0||l>50||a.has(t))throw new SyntaxError("YAML alias expansion, nesting limit or cycle");a.add(t);try{if((0,n.isAlias)(t))return e(t.resolve(r),l+1);const a="tag"in t?t.tag:void 0;if(a&&!o.has(a))throw new SyntaxError("Unsupported YAML tag");if((0,n.isMap)(t)&&(!a||a.endsWith(":map"))){const r={};for(const i of t.items){if(!(0,n.isScalar)(i.key))throw new SyntaxError("Artifact mapping keys must be scalar strings");if(i.key.tag&&!o.has(i.key.tag))throw new SyntaxError("Unsupported YAML key tag");const t=i.key.source??String(i.key.value??"");if(Object.hasOwn(r,t))throw new SyntaxError("Duplicate YAML mapping key");Object.defineProperty(r,t,{value:e(i.value,l+1),enumerable:!0,writable:!0,configurable:!0})}return r}if((0,n.isSeq)(t)&&(!a||a.endsWith(":seq")))return t.items.map(t=>e(t,l+1));if((0,n.isScalar)(t)){const e=t.source??"";if(a?.endsWith(":str")||!a&&t.type!==n.Scalar.PLAIN)return e;const r=a?.slice(18);if((!r||"null"===r)&&/^(?:~|null|Null|NULL|)$/.test(e))return null;if((!r||"bool"===r)&&/^(?:true|True|TRUE|false|False|FALSE)$/.test(e))return"true"===e.toLowerCase();if((!r||"int"===r)&&/^(?:0o[0-7]+|0x[0-9a-fA-F]+)$/.test(e))return i.JsonSourcePolicy.sourceNumber(BigInt(e).toString());if((!r||"int"===r)&&/^[-+]?[0-9]+$/.test(e))return i.JsonSourcePolicy.sourceNumber(e);if((!r||"float"===r)&&/^[-+]?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[eE][-+]?[0-9]+)?$/.test(e))return i.JsonSourcePolicy.sourceNumber(e);if(r||/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/.test(e))throw new SyntaxError("Invalid YAML scalar");return e}throw new SyntaxError("Unsupported YAML value")}finally{a.delete(t)}}(r.contents,0);if(!(0,n.isMap)(r.contents))throw new SyntaxError("Expected a YAML mapping");return l}}},8239(e,t,r){t.YamlTemplateElementReader=void 0;const n=r(8979),i=r(797),a=r(2763),s=r(3188),o=r(1395),l=r(7661),c=r(455),d=r(9300),u=r(4646),m=r(1591),p=r(8748),h=r(2099);class f extends d.YamlContainerArtifactReader{knownArtifactType=a.CedarArtifactType.TEMPLATE_ELEMENT;constructor(e,t=!1){super(e,t)}static getStrict(){return new f(o.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new f(o.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new f(e,t)}getElementReader(){return this}readFromString(e){const t=n.YamlSourcePolicy.parse(e);return this.readFromObject(t,c.ChildDeploymentInfo.empty(),new s.JsonPath)}readFromObject(e,t,r){const n=new m.YamlArtifactParsingResult,a=l.TemplateElement.buildEmptyWithNullValues();return null===r.getLastComponent()&&p.ReaderUtil.getIdentifier(e,h.YamlKeys.id),this.readNonReportableAttributes(a,e),(0,i.applySchemaReaderDefaults)(a,e,r,"yaml"),this.readAnnotations(a,e,n,r),super.readAndValidateChildrenInfo(a,e,n,r),new u.YamlTemplateElementReaderResult(a,n,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t);const r=t[h.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=p.ReaderUtil.getString(t,h.YamlKeys.prefLabel),e.skos_altLabel=p.ReaderUtil.getFilteredStringList(t,h.YamlKeys.altLabels),e.header=p.ReaderUtil.getString(t,h.YamlKeys.header),e.footer=p.ReaderUtil.getString(t,h.YamlKeys.footer)}}t.YamlTemplateElementReader=f},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){t.YamlTemplateFieldReader=void 0;const n=r(8979),i=r(797),a=r(3188),s=r(8748),o=r(2763),l=r(3054),c=r(1790),d=r(455),u=r(6575),m=r(1395),p=r(2099),h=r(9499),f=r(1268),y=r(3168),T=r(384),g=r(1872),E=r(529),C=r(4568),I=r(8568),A=r(3980),b=r(7941),R=r(1404),v=r(7089),S=r(4329),_=r(7268),N=r(2709),w=r(7124),L=r(4284),F=r(9299),V=r(1591),O=r(6651),x=r(7123),D=r(5075),M=r(7709),P=r(6089),U=r(8543),B=r(5907),Y=r(6731),J=r(6591);class k extends u.YamlAbstractArtifactReader{knownArtifactType=o.CedarArtifactType.TEMPLATE_FIELD;constructor(e,t=!1){super(e,t)}static getStrict(){return new k(m.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new k(m.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new k(e,t)}static readerMap=new Map([[h.YamlArtifactType.TEXTFIELD,new f.YamlFieldReaderTextField],[h.YamlArtifactType.TEXTAREA,new y.YamlFieldReaderTextArea],[h.YamlArtifactType.CONTROLLED_TERM,new F.YamlFieldReaderControlledTerm],[h.YamlArtifactType.LINK,new I.YamlFieldReaderLink],[h.YamlArtifactType.EXT_ROR,new O.YamlFieldReaderExtRor],[h.YamlArtifactType.EXT_ORCID,new x.YamlFieldReaderExtOrcid],[h.YamlArtifactType.EXT_PFAS,new D.YamlFieldReaderExtPfas],[h.YamlArtifactType.EXT_PUBMED,new M.YamlFieldReaderExtPubmed],[h.YamlArtifactType.EXT_RRID,new P.YamlFieldReaderExtRrid],[h.YamlArtifactType.EXT_NIH_GRANT_ID,new U.YamlFieldReaderExtNihGrantId],[h.YamlArtifactType.EXT_DOI,new B.YamlFieldReaderExtDoi],[h.YamlArtifactType.TEMPORAL,new T.YamlFieldReaderTemporal],[h.YamlArtifactType.EMAIL,new l.YamlFieldReaderEmail],[h.YamlArtifactType.NUMERIC,new g.YamlFieldReaderNumeric],[h.YamlArtifactType.PHONE_NUMBER,new S.YamlFieldReaderPhoneNumber],[h.YamlArtifactType.RADIO,new L.YamlFieldReaderRadio],[h.YamlArtifactType.CHECKBOX,new _.YamlFieldReaderCheckbox],[h.YamlArtifactType.SINGLE_SELECT_LIST,new N.YamlFieldReaderSingleSelectList],[h.YamlArtifactType.MULTI_SELECT_LIST,new w.YamlFieldReaderMultiSelectList],[h.YamlArtifactType.ATTRIBUTE_VALUE,new E.YamlFieldReaderAttributeValue],[h.YamlArtifactType.PAGE_BREAK,new C.YamlFieldReaderPageBreak],[h.YamlArtifactType.SECTION_BREAK,new A.YamlFieldReaderSectionBreak],[h.YamlArtifactType.IMAGE,new b.YamlFieldReaderImage],[h.YamlArtifactType.RICH_TEXT,new R.YamlFieldReaderRichText],[h.YamlArtifactType.YOUTUBE,new v.YamlFieldReaderYoutube]]);readFromString(e){const t=n.YamlSourcePolicy.parse(e);return this.readFromObject(t,d.ChildDeploymentInfo.empty(),new a.JsonPath)}readFromObject(e,t,r){const n=new V.YamlArtifactParsingResult,a=k.readFieldSpecificAttributes(e,t,n,r);return null===r.getLastComponent()&&s.ReaderUtil.getIdentifier(e,p.YamlKeys.id),this.readNonReportableAttributes(a,e),(0,i.applySchemaReaderDefaults)(a,e,r,"yaml"),this.readAnnotations(a,e,n,r),new c.YamlTemplateFieldReaderResult(a,n,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t),e.skos_prefLabel=s.ReaderUtil.getString(t,p.YamlKeys.prefLabel),e.skos_altLabel=s.ReaderUtil.getFilteredStringList(t,p.YamlKeys.altLabels),(e instanceof Y.ControlledTermFieldImpl||e instanceof J.TextFieldImpl)&&(e.valueRecommendationEnabled=s.ReaderUtil.getBoolean(t,p.YamlKeys.valueRecommendation));const r=s.ReaderUtil.getNode(t,p.YamlKeys.configuration);e.hidden=k.readFlag(r,t,p.YamlKeys.hidden),e.requiredValue=k.readFlag(r,t,p.YamlKeys.required),e.recommendedValue=k.readFlag(r,t,p.YamlKeys.recommended),e.continuePreviousLine=k.readFlag(r,t,p.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 i=h.YamlArtifactType.forValue(s.ReaderUtil.getString(e,p.YamlKeys.type));if(i.isField()){const a=this.readerMap.get(i);if(!a)throw new Error(`No reader defined for dynamic input type "${i.getValue()}"`);const s=a.read(e,t,r,n);let l=o.CedarArtifactType.NULL;return i.isStaticField()?l=o.CedarArtifactType.STATIC_TEMPLATE_FIELD:i.isDynamicField()&&(l=o.CedarArtifactType.TEMPLATE_FIELD),s.cedarArtifactType=l,s}throw new Error(`Unknown field type "${s.ReaderUtil.getString(e,p.YamlKeys.type)}" at ${n.toString()}`)}}t.YamlTemplateFieldReader=k},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),i=r(8748),a=r(2099),s=r(4081),o=r(6145);t.YamlTemplateFieldTypeSpecificReader=class{read(e,t,r,i){return n.UnknownTemplateField.build()}static readAndStoreListValueConstraints(e,t){t.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(e,a.YamlKeys.default);const r=i.ReaderUtil.getNodeList(e,a.YamlKeys.values);null!==r&&r.forEach(e=>{const r=i.ReaderUtil.getString(e,a.YamlKeys.label),n=i.ReaderUtil.getBoolean(e,a.YamlKeys.selected),o=Object.hasOwn(e,a.YamlKeys.selected);if(null!=r){const e=new s.ListOption(r,n,o);t.valueConstraints.literals.push(e)}})}}},9946(e,t,r){t.YamlTemplateInstanceReader=void 0;const n=r(8979),i=r(5588),a=r(1625),s=r(9167),o=r(8534),l=r(1395),c=r(6575),d=r(2234),u=r(9857),m=r(1591),p=r(2099),h=r(8748),f=r(2272),y=r(147),T=r(7723),g=r(5222),E=r(4877),C=r(7571),I=r(8193),A=r(4465),b=r(9327),R=r(4033),v=r(2888),S=r(6109),_=r(3188);class N extends c.YamlAbstractArtifactReader{constructor(e,t=!1){super(e,t)}static getStrict(){return new N(l.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new N(l.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new N(e,t)}readFromString(e){const t=n.YamlSourcePolicy.parse(e);return this.readFromObject(t)}readFromObject(e){const t=new m.YamlArtifactParsingResult,r=f.TemplateInstance.buildEmptyWithNullValues(),n=e??{};r.schema_name=h.ReaderUtil.getString(n,p.YamlKeys.name),r.schema_description=h.ReaderUtil.getString(n,p.YamlKeys.description)??"",r.descriptionWasAbsent=null===h.ReaderUtil.getString(n,p.YamlKeys.description),r.at_id=o.CedarArtifactId.forValue(h.ReaderUtil.getIdentifier(n,p.YamlKeys.id));const i=this.behavior.useWarningForKnownIssues();r.schema_isBasedOn=o.CedarArtifactId.forValue(h.ReaderUtil.getArtifactIdentifier(n,p.YamlKeys.isBasedOn,i)),r.pav_derivedFrom=o.CedarArtifactId.forValue(h.ReaderUtil.getArtifactIdentifier(n,p.YamlKeys.derivedFrom,i)),r.pav_createdBy=d.CedarUser.forValue(h.ReaderUtil.getString(n,p.YamlKeys.createdBy)),r.pav_createdOn=u.IsoDate.forValue(h.ReaderUtil.getString(n,p.YamlKeys.createdOn)),r.oslc_modifiedBy=d.CedarUser.forValue(h.ReaderUtil.getString(n,p.YamlKeys.modifiedBy)),r.pav_lastUpdatedOn=u.IsoDate.forValue(h.ReaderUtil.getString(n,p.YamlKeys.modifiedOn)),this.readAnnotations(r,n,t,new _.JsonPath),r.dataContainer=this.parseContainer(n,!0);for(const e of R.AttributeValueNamePolicy.findConflicts(r.dataContainer,"template",!0))t.addBlueprintComparisonError(new v.ComparisonError("YamlTemplateInstanceReader",S.YamlComparisonErrorType.VALUE_MISMATCH,new _.JsonPath(...R.AttributeValueNamePolicy.locationOf(e)),"a unique, non-reserved attribute-value name",e.name));return new y.YamlTemplateInstanceReaderResult(r,t,n)}static RESERVED_KEYS=i.ReservedNames.TEMPLATE_INSTANCE_YAML_KEYS;static ELEMENT_RESERVED_KEYS=i.ReservedNames.NESTED_ELEMENT_INSTANCE_YAML_KEYS;parseContainer(e,t=!1){const r=new T.InstanceDataContainer,n=h.ReaderUtil.getNode(e,p.YamlKeys.children);null!==n&&Object.keys(n).forEach(e=>{const t=h.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?N.RESERVED_KEYS:N.ELEMENT_RESERVED_KEYS).has(n))return;const i=e[n];if(null===i||"object"!=typeof i||Array.isArray(i))return;const a=new b.InstanceDataAttributeValueField(n);Object.keys(i).forEach(e=>{const t=i[e];a.addValue(e,new g.InstanceDataStringAtom(this.parseAttributeValue(t)))}),r.setValue(n,a)});const i=h.ReaderUtil.getIdentifier(e,p.YamlKeys.id);return null!==i&&(r.id=i),r}parseAttributeValue(e){if("string"==typeof e)return e;if(null!==e&&"object"==typeof e&&!Array.isArray(e)){const t=e[p.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=h.ReaderUtil.getString(e,p.YamlKeys.language)),null!==e&&"object"==typeof e&&"preferredLabel"in t&&(t.preferredLabel=h.ReaderUtil.getString(e,p.YamlKeys.prefLabel)),null===e||"object"!=typeof e||!("notation"in t)||t instanceof a.InstanceDataNotationAtom||(t.notation=h.ReaderUtil.getString(e,p.YamlKeys.notation)),t}parseNodeWithoutNotation(e){if(null==e)return new A.InstanceDataEmptyNode;if("string"==typeof e)return new g.InstanceDataStringAtom(e);if(Object.hasOwn(e,p.YamlKeys.children)||"element-instance"===h.ReaderUtil.getString(e,p.YamlKeys.type))return this.parseContainer(e);if(Object.hasOwn(e,p.YamlKeys.id)&&Object.hasOwn(e,p.YamlKeys.value))throw new Error("A field cannot contain both id and value.");if(Array.isArray(e[p.YamlKeys.datatype]))throw new Error("A field value can have at most one datatype.");if(Object.hasOwn(e,p.YamlKeys.value)){const t=h.ReaderUtil.getString(e,p.YamlKeys.value),r=h.ReaderUtil.getString(e,p.YamlKeys.datatype),n=h.ReaderUtil.getString(e,p.YamlKeys.label);return null===r?new g.InstanceDataStringAtom(t,n):new E.InstanceDataTypedAtom(t,r,n)}if(Object.hasOwn(e,p.YamlKeys.id)){h.ReaderUtil.assertFieldIri(h.ReaderUtil.getString(e,p.YamlKeys.id),p.YamlKeys.id);const t=h.ReaderUtil.getString(e,p.YamlKeys.id),r=h.ReaderUtil.getString(e,p.YamlKeys.label),n=h.ReaderUtil.getString(e,p.YamlKeys.datatype);return null===r?C.InstanceDataLinkAtom.fromParsedNode(t,n):I.InstanceDataControlledAtom.fromParsedNode(t,r,n)}const t=h.ReaderUtil.getString(e,p.YamlKeys.label);if(null!==t)return new s.InstanceDataLabelAtom(t,h.ReaderUtil.getString(e,p.YamlKeys.datatype));const r=h.ReaderUtil.getString(e,p.YamlKeys.notation);return null!==r?new a.InstanceDataNotationAtom(r,h.ReaderUtil.getString(e,p.YamlKeys.datatype)):new A.InstanceDataEmptyNode}}t.YamlTemplateInstanceReader=N},147(e,t,r){t.YamlTemplateInstanceReaderResult=void 0;const n=r(6532);class i extends n.YamlArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get instance(){return this._artifact}get instanceSourceObject(){return this._artifactSourceObject}}t.YamlTemplateInstanceReaderResult=i},5677(e,t,r){t.YamlTemplateReader=void 0;const n=r(8979),i=r(797),a=r(2763),s=r(8748),o=r(7868),l=r(3188),c=r(1395),d=r(8239),u=r(3281),m=r(9300),p=r(2099),h=r(1591);class f extends m.YamlContainerArtifactReader{elementReader;knownArtifactType=a.CedarArtifactType.TEMPLATE;constructor(e,t=!1){super(e,t),this.elementReader=d.YamlTemplateElementReader.getForBehavior(e,t)}static getStrict(){return new f(c.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new f(c.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new f(e,t)}getElementReader(){return this.elementReader}readFromString(e){const t=n.YamlSourcePolicy.parse(e);return this.readFromObject(t)}readFromObject(e,t=new l.JsonPath){const r=new h.YamlArtifactParsingResult,n=u.Template.buildEmptyWithNullValues();return s.ReaderUtil.getIdentifier(e,p.YamlKeys.id),this.readNonReportableAttributes(n,e),(0,i.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,p.YamlKeys.header),e.footer=s.ReaderUtil.getString(t,p.YamlKeys.footer)}readInstanceTypeSpecification(e,t,r){const n=t[p.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=f},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(5904),i=r(6396),a=r(2748),s=r(4036),o=r(3056),l=r(455),c=r(3188),d=r(7954),u=r(7519),m=r(4948),p=r(6645),h=r(2022);t.RoundTrip=class{static compare(e,t){if(e instanceof i.JsonTemplateFieldReaderResult&&t instanceof a.JsonTemplateFieldWriterInternal)return this.compareField(e,t);if(e instanceof m.JsonTemplateElementReaderResult&&t instanceof p.JsonTemplateElementWriter)return this.compareElement(e,t);if(e instanceof d.JsonTemplateReaderResult&&t instanceof u.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 s.JsonArtifactParsingResult;return o.JsonObjectComparator.compareBothWays(r,e.fieldSourceObject,t.getAsJsonNode(e.field,l.ChildDeploymentInfo.empty()),new c.JsonPath,t.getBehavior()),r}static compareElement(e,t){const r=new s.JsonArtifactParsingResult;return o.JsonObjectComparator.compareBothWays(r,e.elementSourceObject,t.getAsJsonNode(e.element),new c.JsonPath,t.getBehavior()),r}static compareTemplate(e,t){const r=new s.JsonArtifactParsingResult;return o.JsonObjectComparator.compareBothWays(r,e.templateSourceObject,t.getAsJsonNode(e.template),new c.JsonPath,t.getBehavior()),r}static compareString(e,t){const r=n.JsonSourcePolicy.parse(e),i=n.JsonSourcePolicy.parse(t),a=new s.JsonArtifactParsingResult;return o.JsonObjectComparator.compareBothWays(a,r,i,new c.JsonPath,h.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),i=r(5359);t.CedarWriters=class{static json(){return n.CedarJsonWriters}static yaml(){return i.CedarYamlWriters}}},5692(e,t,r){t.WriterUtil=void 0;const n=r(8878),i=r(3812);t.WriterUtil=class{static getMultiMinMax(e,t){let r=null,a=null,s=!1;return e.isMultiInstanceByDefinition()?t instanceof n.ChildDeploymentInfoAlwaysMultiple&&(s=!0,r=t.minItems,a=t.maxItems):e.isSingleInstanceByDefinition()?s=!1:(s=t.isMultiInAnyWay(),s&&t instanceof i.AbstractDynamicChildDeploymentInfo&&(r=t.minItems,a=t.maxItems)),{isMultiInstance:s,minItems:r,maxItems:a}}}},9607(e,t,r){t.CedarJsonWriters=void 0;const n=r(2022),i=r(4872),a=r(7519),s=r(4869),o=r(7501),l=r(3691),c=r(4841),d=r(5459),u=r(8970),m=r(2347),p=r(41),h=r(6029),f=r(6766),y=r(9309),T=r(8663),g=r(7335),E=r(275),C=r(6876),I=r(9031),A=r(9129),b=r(1442),R=r(8280),v=r(8354),S=r(5996),_=r(2418),N=r(9222),w=r(9184),L=r(7054),F=r(2395),V=r(2813),O=r(6645),x=r(2981),D=r(7432),M=r(8014),P=r(3281),U=r(7661),B=r(6320),Y=r(7584),J=r(8096),k=r(6122),K=r(3312),W=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 i.JsonAtomicWriter(e),this.jsonAnnotationsWriter=new x.JsonAnnotationsWriter(e),this.jsonTemplateWriter=a.JsonTemplateWriter.getFor(e,this),this.jsonTemplateElementWriter=O.JsonTemplateElementWriter.getFor(e,this),this.jsonTemplateInstanceWriter=B.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 C.JsonFieldWriterPhoneNumber(e,this)],[s.CedarFieldType.EMAIL,new I.JsonFieldWriterEmail(e,this)],[s.CedarFieldType.LINK,new l.JsonFieldWriterLink(e,this)],[s.CedarFieldType.EXT_ROR,new Y.JsonFieldWriterExtRor(e,this)],[s.CedarFieldType.EXT_ORCID,new J.JsonFieldWriterExtOrcid(e,this)],[s.CedarFieldType.EXT_PFAS,new k.JsonFieldWriterExtPfas(e,this)],[s.CedarFieldType.EXT_PUBMED,new K.JsonFieldWriterExtPubmed(e,this)],[s.CedarFieldType.EXT_RRID,new W.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 c.JsonFieldWriterNumeric(e,this)],[s.CedarFieldType.TEMPORAL,new d.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 g.JsonFieldWriterList(e,this)],[s.CedarFieldType.MULTIPLE_SELECT_LIST,new g.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([[v.ControlledTermOntology.className,new S.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)],[D.ControlledTermAction.className,new M.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 P.Template)return a.JsonTemplateWriter.getFor(this.behavior,this);if(e instanceof U.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),i=r(9517),a=r(2733),s=r(3910),o=r(1027),l=r(936),c=r(8534);class d 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{[a.JsonSchema.schemaName]:e.schema_name,[a.JsonSchema.schemaDescription]:e.schema_description}}macroProvenance(e,t){return{[a.JsonSchema.pavCreatedOn]:t.write(e.pav_createdOn),[a.JsonSchema.pavCreatedBy]:t.write(e.pav_createdBy),[a.JsonSchema.pavLastUpdatedOn]:t.write(e.pav_lastUpdatedOn),[a.JsonSchema.oslcModifiedBy]:t.write(e.oslc_modifiedBy)}}macroStatusAndVersion(e,t){const r=i.JsonNode.getEmpty();return e.pav_version!==o.PavVersion.NULL&&(r[a.JsonSchema.pavVersion]=t.write(e.pav_version)),e.bibo_status!==s.BiboStatus.NULL&&(r[a.JsonSchema.biboStatus]=t.write(e.bibo_status)),r}macroSkos(e){const t=i.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=i.JsonNode.getEmpty();return e.pav_derivedFrom!==c.CedarArtifactId.NULL&&(t[a.JsonSchema.pavDerivedFrom]=this.atomicWriter.write(e.pav_derivedFrom)),t}macroIsBasedOn(e){const t=i.JsonNode.getEmpty();return e.schema_isBasedOn!==c.CedarArtifactId.NULL&&(t[a.JsonSchema.schemaIsBasedOn]=this.atomicWriter.write(e.schema_isBasedOn)),t}macroPreviousVersion(e){const t=i.JsonNode.getEmpty();return e.pav_previousVersion!==c.CedarArtifactId.NULL&&(t[a.JsonSchema.pavPreviousVersion]=this.atomicWriter.write(e.pav_previousVersion)),t}macroSchemaIdentifier(e){const t=i.JsonNode.getEmpty();return null!==e.schema_identifier&&(t[a.JsonSchema.schemaIdentifier]=e.schema_identifier),t}macroAnnotations(e){return this.annotationsWriter.write(e.annotations)}}t.JsonAbstractArtifactWriter=d},8872(e,t,r){t.JsonAbstractContainerArtifactWriter=void 0;const n=r(8198),i=r(3161),a=r(6968),s=r(9517),o=r(9129),l=r(2733),c=r(936),d=r(5692),u=r(513),m=r(8748);class p extends i.JsonAbstractArtifactWriter{macroContext(e){return a.JsonContainerArtifactContent.CONTEXT_VERBATIM}getChildMapAsJson(e){const t=s.JsonNode.getEmpty();return e.getChildrenInfo().getChildrenNames().forEach(r=>{const i=e.getChild(r);if(null!=i){let a=s.JsonNode.getEmpty();const m=e.getChildrenInfo().get(r);if(null!==m&&(a=i instanceof o.TemplateField?this.writers.getFieldWriterForType(i.cedarFieldType).getAsJsonNode(i,m):this.writers.getTemplateElementWriter().getAsJsonNode(i)),null!==m){const{isMultiInstance:e,minItems:o,maxItems:p}=d.WriterUtil.getMultiMinMax(i,m);let h=o;const f=p;if(e){null===h&&(h=u.AbstractChildDeploymentInfo.defaultMinItems);const e=s.JsonNode.getEmpty();e[c.CedarModel.minItems]=h,null!==f&&f!==n.UNBOUNDED_MAX_ITEMS&&(e[c.CedarModel.maxItems]=f),a={[l.JsonSchema.type]:"array",...e,[l.JsonSchema.items]:a}}t[r]=a}}}),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),i=r(936),a=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 a.AnnotationAtId?r[t]={[s.JsonSchema.atId]:n.getAtId()}:n instanceof o.AnnotationAtValue&&(r[t]={[s.JsonSchema.atValue]:n.getAtValue()})}),t[i.CedarModel.annotations]=r}return t}}},4872(e,t,r){t.JsonAtomicWriter=void 0;const n=r(8534),i=r(2763),a=r(5793),s=r(9857),o=r(2234),l=r(3910),c=r(1027),d=r(2475),u=r(8557),m=r(3447),p=r(8588),h=r(7974),f=r(3764),y=r(9034),T=r(3746),g=r(9932),E=r(8802),C=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 i.CedarArtifactType)return this.writeCedarArtifactType(e);if(e instanceof a.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 c.PavVersion)return this.writePavVersion(e);if(e instanceof d.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 C.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?g.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),i=r(8557),a=r(8748),s=r(2733),o=r(936),l=r(2763),c=r(5793),d=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=a.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]:a.ReaderUtil.deleteNodeKey(t[s.JsonSchema.atContext],s.JsonSchema.required),e.getChildrenInfo().hasAttributeValue()&&(t[s.JsonSchema.atContext][d.TemplateProperty.additionalProperties]=m.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE);const i={...t,...this.getChildMapAsJson(e)};return this.expandInstanceTypeSpecification(e,i),i}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(c.JavascriptType.OBJECT),[d.TemplateProperty.title]:e.title,[d.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(i.SchemaVersion.CURRENT),[d.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),i=r(8557),a=r(9517),s=r(936),o=r(2733),l=r(9932),c=r(5793),d=r(5747),u=r(2475),m=r(3161),p=r(3746),h=r(455),f=r(3812),y=r(9519),T=r(6731),g=r(6591),E=r(7752),C=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 g.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=a.JsonNode.getEmpty(),n={[s.CedarModel.valueConstraints]:r};return this.expandValueConstraintsNode(r,e,t),n}expandLiterals(e,t){const r=a.JsonNode.getEmptyList();e.valueConstraints.literals.forEach(e=>{const t=a.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=a.JsonNode.getEmpty();this.expandPropertiesNode(r);const n=a.JsonNode.getEmpty();this.expandRequiredNode(n);const l=this.buildUIObject(e,t),m=this.buildValueConstraintsObject(e,t),f={[s.CedarModel.type]:this.atomicWriter.write(c.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,[d.TemplateProperty.title]:e.title,[d.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(i.SchemaVersion.CURRENT),[d.TemplateProperty.additionalProperties]:this.atomicWriter.write(p.AdditionalProperties.FALSE),...this.macroSchemaIdentifier(e),[s.CedarModel.schema]:this.atomicWriter.write(u.ArtifactSchema.CURRENT)})}macroContext(e){const t=C.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(3992),i=r(9868),a=r(1625),s=r(9167),o=r(8748),l=r(2733),c=r(936),d=r(9517),u=r(3161),m=r(350),p=r(7723),h=r(5222),f=r(4877),y=r(9327),T=r(3644),g=r(8193),E=r(7571),C=r(7548),I=r(4465),A=r(4033);class b extends u.JsonAbstractArtifactWriter{constructor(e,t){super(e,t)}macroContext(e){return m.JsonTemplateInstanceContent.CONTEXT_VERBATIM}static getFor(e,t){return new b(e,t)}buildContext(e){const t=o.ReaderUtil.deepClone(m.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[l.JsonSchema.atId]=""===e.id?null:e.id),Object.keys(e.values).forEach(r=>{const i=e.values[r];if(Array.isArray(i)){const e=d.JsonNode.getEmptyList();t[r]=e,i.forEach((t,r)=>{if(t instanceof T.InstanceDataAttributeValueFieldName){const r=t.name;return void(n.TextPolicy.isBlank(r)||e.push(r))}const i=this.serializeCommonType(t);null!==i&&e.push(i)})}else{const e=this.serializeCommonType(i);if(null!==e&&(t[r]=e),i instanceof y.InstanceDataAttributeValueField){const e=[];Object.keys(i.values).forEach(t=>{e.push(t)}),t[r]=e}}}),this.serializeAttributeValueFields(e,t);const i=d.JsonNode.getEmpty();Object.keys(e.iris).forEach(t=>{i[t]=e.iris[t]}),t[l.JsonSchema.atContext]=i}static writeValueNode(e){const t=this.writeValueNodeWithoutNotation(e);return null!==t&&"language"in e&&null!==e.language&&(t[l.JsonSchema.atLanguage]=e.language),null!==t&&"notation"in e&&null!==e.notation&&(t[l.JsonSchema.skosNotation]=e.notation),null!==t&&"preferredLabel"in e&&null!==e.preferredLabel&&(t[c.CedarModel.skosPrefLabel]=e.preferredLabel),t}static writeValueNodeWithoutNotation(e){return e instanceof a.InstanceDataNotationAtom?null===e.type?d.JsonNode.getEmpty():{[l.JsonSchema.atType]:e.type}:e instanceof h.InstanceDataStringAtom?{[l.JsonSchema.atValue]:e.value,...null===e.label?{}:{[l.JsonSchema.rdfsLabel]:e.label}}:e instanceof f.InstanceDataTypedAtom?{[l.JsonSchema.atValue]:e.value,...null===e.label?{}:{[l.JsonSchema.rdfsLabel]:e.label},[l.JsonSchema.atType]:e.type}:e instanceof s.InstanceDataLabelAtom?{[l.JsonSchema.rdfsLabel]:e.label,...null===e.type?{}:{[l.JsonSchema.atType]:e.type}}:e instanceof g.InstanceDataControlledAtom?{[l.JsonSchema.atId]:e.id,[l.JsonSchema.rdfsLabel]:e.label,...null===e.type?{}:{[l.JsonSchema.atType]:e.type}}:e instanceof E.InstanceDataLinkAtom?{[l.JsonSchema.atId]:e.id,...null===e.type?{}:{[l.JsonSchema.atType]:e.type}}:e instanceof C.InstanceDataEmptyAtom||e instanceof I.InstanceDataEmptyNode?d.JsonNode.getEmpty():null}serializeCommonType(e){if(e instanceof p.InstanceDataContainer){const t=d.JsonNode.getEmpty();return this.serializeDataLevelInto(e,t),t}return b.writeValueNode(e)}serializeAtomString(e){return{[l.JsonSchema.atValue]:e.value,...null===e.label?{}:{[l.JsonSchema.rdfsLabel]:e.label}}}serializeAttributeValueFields(e,t){Object.keys(e.values).forEach(r=>{const n=e.values[r];n instanceof y.InstanceDataAttributeValueField&&Object.keys(n.values).forEach(e=>{const r=n.values[e];r instanceof h.InstanceDataStringAtom&&(t[e]=this.serializeAtomString(r))})})}getAsJsonString(e,t=2){return(0,i.stringifyInstance)(this.getAsJsonNode(e),e.dataContainer,t)}getAsJsonNode(e){A.AttributeValueNamePolicy.assertValid(e.dataContainer);const t=this.buildContext(e),r=this.macroSchemaNameAndDescription(e);return e.descriptionWasAbsent&&""===e.schema_description&&delete r[l.JsonSchema.schemaDescription],{[l.JsonSchema.atId]:this.atomicWriter.write(e.at_id),...r,...this.getDataTree(e),...this.macroAnnotations(e),[l.JsonSchema.atContext]:t,...this.macroIsBasedOn(e),[l.JsonSchema.schemaDescription]:e.schema_description,...this.macroProvenance(e,this.atomicWriter),...this.macroDerivedFrom(e)}}}t.JsonTemplateInstanceWriter=b},7519(e,t,r){t.JsonTemplateWriter=void 0;const n=r(8972),i=r(8557),a=r(8748),s=r(6551),o=r(2733),l=r(936),c=r(2763),d=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=a.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 i={...t,...this.getChildMapAsJson(e)};return this.expandInstanceTypeSpecification(e,i),i}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(c.CedarArtifactType.TEMPLATE),[o.JsonSchema.atContext]:this.macroContext(e),[l.CedarModel.type]:this.atomicWriter.write(d.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(i.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 n.JsonSourcePolicy.stringify(function e(t,r){const n={...t},s=new Map;for(const[o,l]of Object.entries(r.values))l instanceof a.InstanceDataAttributeValueField?s.set(o,t[o]):l instanceof i.InstanceDataContainer?n[o]=e(t[o],l):Array.isArray(l)&&Array.isArray(t[o])&&(n[o]=t[o].map((t,r)=>l[r]instanceof i.InstanceDataContainer?e(t,l[r]):t));const o=Object.keys(r.values),l=new Set([...o,...[...s.values()].flat()]),c=Object.keys(n).filter(e=>!l.has(e)),d=o.flatMap(e=>[e,...s.get(e)??[]]).filter(e=>Object.hasOwn(n,e)),u=c.findIndex(e=>"_annotations"===e||"@context"===e);return c.splice(u<0?c.length:u,0,...d),new Proxy(n,{ownKeys:()=>c})}(e,t),r)};const n=r(5904),i=r(7723),a=r(9327)},8972(e,t,r){t.stringifySchema=function(e,t){return n.JsonSourcePolicy.stringify(function e(t){if(Array.isArray(t))return t.map(e);if(!s(t)||i.ExactDecimal.isExact(t))return t;const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,e(r)])),n=r._ui,o=s(n)?n.order:void 0;if(Array.isArray(o)&&o.every(e=>"string"==typeof e)&&s(n)&&s(r.properties)){const e=new Set(o),t=r.properties;r.properties=a(t,[...Object.keys(t).filter(t=>!e.has(t)),...o]);const i=t["@context"];s(i)&&s(i.properties)&&(i.properties=a(i.properties,[...Object.keys(i.properties).filter(t=>!e.has(t)),...o]));for(const e of["propertyLabels","propertyDescriptions"]){const t=n[e];s(t)&&(n[e]=a(t,o))}}return r}(e),t)};const n=r(5904),i=r(2108);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 s(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}},5359(e,t,r){t.CedarYamlWriters=void 0;const n=r(4869),i=r(1933),a=r(8354),s=r(2418),o=r(9184),l=r(2395),c=r(7432),d=r(6116),u=r(2342),m=r(2287),p=r(836),h=r(7436),f=r(7594),y=r(1784),T=r(6082),g=r(4935),E=r(6314),C=r(1903),I=r(5251),A=r(1521),b=r(1038),R=r(3292),v=r(9821),S=r(4500),_=r(3080),N=r(8136),w=r(9535),L=r(1181),F=r(765),V=r(3671),O=r(9532),x=r(4647),D=r(9411),M=r(9326),P=r(491),U=r(4355),B=r(5587),Y=r(6557),J=r(4077),k=r(3711),K=r(6967);class W{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=i.YamlTemplateWriter.getFor(e,this),this.yamlTemplateElementWriter=I.YamlTemplateElementWriter.getFor(e,this),this.yamlTemplateInstanceWriter=M.YamlTemplateInstanceWriter.getFor(e,this),this.yamlDynamicFieldWriters=new Map([[n.CedarFieldType.TEXT,new d.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 v.YamlFieldWriterPhoneNumber(e,this)],[n.CedarFieldType.EMAIL,new b.YamlFieldWriterEmail(e,this)],[n.CedarFieldType.LINK,new y.YamlFieldWriterLink(e,this)],[n.CedarFieldType.EXT_ROR,new P.YamlFieldWriterExtRor(e,this)],[n.CedarFieldType.EXT_ORCID,new U.YamlFieldWriterExtOrcid(e,this)],[n.CedarFieldType.EXT_PFAS,new B.YamlFieldWriterExtPfas(e,this)],[n.CedarFieldType.EXT_PUBMED,new Y.YamlFieldWriterExtPubmed(e,this)],[n.CedarFieldType.EXT_RRID,new J.YamlFieldWriterExtRrid(e,this)],[n.CedarFieldType.EXT_NIH_GRANT_ID,new k.YamlFieldWriterExtNihGrantId(e,this)],[n.CedarFieldType.EXT_DOI,new K.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 S.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 g.YamlFieldWriterStaticImage(e,this)],[n.CedarFieldType.STATIC_RICH_TEXT,new E.YamlFieldWriterStaticRichText(e,this)],[n.CedarFieldType.STATIC_YOUTUBE,new C.YamlFieldWriterStaticYoutube(e,this)]]),this.yamlValueConstraintsWriters=new Map([[a.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)],[c.ControlledTermAction.className,new x.YamlValueConstraintsActionWriter(e,this)]])}static getStrict(){return new W(D.YamlWriterBehavior.STRICT)}static getFor(e){return new W(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=W},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 i=n.getBigUint64(0),a=Number(i>>52n&2047n),s=i&(1n<<52n)-1n|(a?1n<<52n:0n),o=a?a-1075:-1074,l=s.toString(2).length,c=o+l-1;let d=s,u=1n;if(o>=0?d<<=BigInt(o):u<<=BigInt(-o),c<=62&&d%u===0n){let e=d/u;const r=c>l?(1n<<BigInt(c-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*c),p=d,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 g(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/g(h,T)*T;function C(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=g(g(p,h),y),p/=E,h/=E,y/=E;const A=l-C(s)+C(p)+I(Math.max(0,-m)),b=C(h)+1+I(Math.max(0,m)+1),R=A<32&&b<32?32:A<64&&b<64?64:0,v=e=>R?BigInt.asIntN(R,e):e,S=10n*h;let _=0n,N=0,w=!0;for(;;){const e=p/h;p=p%h*10n,y=v(10n*y);let t=y<=0n||p<y,r=y<=0n||(R?v(p+y)>S:p+y>=S);if(w&&0n===e&&!r?m--:(_=10n*_+e,N++),w&&(m<-3||m>=8)&&(t=!1,r=!1),w=!1,t||r){const e=v(v(2n*p)-S);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,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=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]&&i(t,e,r[s]);return a(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleYamlSerializer=void 0;const o=r(2108),l=r(7120),c=s(r(3198)),d=r(1100),u={blockQuote:"literal",doubleQuotedMinMultiLineLength:1e9,lineWidth:0,minContentWidth:0,defaultStringType:"QUOTE_DOUBLE",defaultKeyType:"PLAIN",doubleQuotedAsJSON:!0},m=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 p(e){let t='"';for(const r of e){const e=r.codePointAt(0),n=m.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 c.default.Document(e,{customTags:e=>[{tag:"tag:yaml.org,2002:float",default:!0,identify:e=>o.ExactDecimal.isExact(e),resolve:e=>o.ExactDecimal.forValue(e),stringify:e=>String(e.value)},...e.map(e=>"string"!=typeof e&&void 0===e.collection&&"tag:yaml.org,2002:str"===e.tag?{...e,stringify(r,n,i,a){const s=t.get(r);if(void 0!==s)return s;const o=e.stringify(r,n,i,a);return o.startsWith('"')?p(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,i)=>"number"==typeof t.value&&Number.isFinite(t.value)?(0,l.javaPlainDecimal)(t.value):e.stringify(t,r,n,i)})]});return(0,c.visit)(r,{Scalar(e,r,n){if("key"===e&&"string"==typeof r.value){const e=(0,d.yamlKeyNeedsQuoting)(r.value);r.type=e?c.Scalar.QUOTE_DOUBLE:c.Scalar.PLAIN,r.value.length>=128&&(t.set(r,e?p(r.value):r.value),r.type=c.Scalar.BLOCK_LITERAL)}else if("value"===e&&"string"==typeof r.value){const e=n.at(-1);(0,c.isPair)(e)&&(0,c.isScalar)(e.key)&&"string"==typeof e.key.value&&(0,d.mayWriteYamlValuePlain)(e.key.value,r.value)&&(r.type=c.Scalar.PLAIN)}}}),r.toString(u).trim()+"\n"}}},211(e,t,r){t.YamlAbstractArtifactWriter=void 0;const n=r(2112),i=r(8333),a=r(9517),s=r(2099),o=r(3910),l=r(1027),c=r(9129),d=r(8534),u=r(2234),m=r(9857),p=r(7661),h=r(9499),f=r(3281),y=r(6731),T=r(6591),g=r(7752),E=r(8557),C=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=a.JsonNode.getEmpty();return e instanceof i.AbstractSchemaArtifact&&e.language!==g.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=a.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=a.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=a.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=a.JsonNode.getEmpty();return e.hidden&&(t[s.YamlKeys.hidden]=!0),e.continuePreviousLine&&(t[s.YamlKeys.continuePreviousLine]=!0),t}macroStandaloneFieldConfiguration(e){const t=a.JsonNode.getEmpty();return e.cedarFieldType.recordsRequirement&&(e.requiredValue&&(t[s.YamlKeys.required]=!0),e.recommendedValue&&(t[s.YamlKeys.recommended]=!0)),a.JsonNode.hasEntries(t)?{[s.YamlKeys.configuration]:t}:{}}macroValueRecommendation(e){const t=a.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=a.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=a.JsonNode.getEmpty();return null!==e.schema_identifier&&(t[s.YamlKeys.identifier]=e.schema_identifier),t}macroType(e){const t=a.JsonNode.getEmpty();return t[s.YamlKeys.type]=this.getYamlType(e),t}macroId(e,t=!1,r=!0){const n=a.JsonNode.getEmpty();return e.at_id===d.CedarArtifactId.NULL||t&&!r||(n[s.YamlKeys.id]=this.atomicWriter.write(e.at_id)),n}macroDerivedFrom(e,t){const r=a.JsonNode.getEmpty();return t||e.pav_derivedFrom!==d.CedarArtifactId.NULL&&(r[s.YamlKeys.derivedFrom]=this.atomicWriter.write(e.pav_derivedFrom)),r}macroIsBasedOn(e){const t=a.JsonNode.getEmpty();return e.schema_isBasedOn!==d.CedarArtifactId.NULL&&(t[s.YamlKeys.isBasedOn]=this.atomicWriter.write(e.schema_isBasedOn)),t}macroPreviousVersion(e,t){const r=a.JsonNode.getEmpty();return t||e.pav_previousVersion!==d.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 c.TemplateField?e.cedarFieldType.getYamlType().getValue():e instanceof C.TemplateInstance?h.YamlArtifactType.TEMPLATE_INSTANCE.getValue():void 0}}t.YamlAbstractArtifactWriter=I},5386(e,t,r){t.YamlAbstractContainerArtifactWriter=void 0;const n=r(8198),i=r(8878),a=r(9517),s=r(9129),o=r(211),l=r(2099),c=r(3812),d=r(9519),u=r(5692),m=r(699),p=r(513);class h extends o.YamlAbstractArtifactWriter{getChildListAsJSON(e,t){const r=a.JsonNode.getEmptyList();return e.getChildrenInfo().getChildrenNames().forEach(n=>{const i=e.getChild(n);if(null!=i){let o=a.JsonNode.getEmpty();const c=e.getChildrenInfo().get(n);if(null!==c){o[l.YamlKeys.key]=n,o=i instanceof s.TemplateField?{...o,...this.writers.getFieldWriterForType(i.cedarFieldType).getYamlAsJsonNode(i,c,t,!1)}:{...o,...this.writers.getTemplateElementWriter().getYamlAsJsonNode(i,t,!1)};const e=this.getDeploymentInfo(i,c,t);a.JsonNode.hasEntries(e)&&(o[l.YamlKeys.configuration]=e),r.push(o)}}}),r}getDeploymentInfo(e,t,r){const o=a.JsonNode.getEmpty();if(t instanceof c.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 c.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 d.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 g=y;return h&&(null===T&&(T=p.AbstractChildDeploymentInfo.defaultMinItems),e?.isMultiInstanceByDefinition()||e?.isSingleInstanceByDefinition()?t instanceof i.ChildDeploymentInfoAlwaysMultiple&&(o[l.YamlKeys.minItems]=T,null!==t.declaredMaxItems&&g!==n.UNBOUNDED_MAX_ITEMS&&(o[l.YamlKeys.maxItems]=g)):(o[l.YamlKeys.multiple]=!0,o[l.YamlKeys.minItems]=T,null!==g&&g!==n.UNBOUNDED_MAX_ITEMS&&(o[l.YamlKeys.maxItems]=g))),(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),i=r(2787),a=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 i.AnnotationAtId){const e={[s.YamlKeys.id]:n.getAtId()};r[t]=e}else if(n instanceof a.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),i=r(4872),a=r(4531),s=r(3910);class o extends i.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 a.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),i=r(4531),a=r(3910),s=r(3447),o=r(7974),l=r(8588),c=r(3764),d=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(d.YamlArtifactTypeValues),"element-instance",n.YamlValues.Controlled.class,i.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(a.BiboStatusYamlValues))],["datatype",p],["action",new Set(["move","delete"])],["granularity",new Set(Object.values(o.TemporalGranularityValues))],["termType",new Set(Object.values(i.BioportalTermTypeYamlValues))],["inputTimeFormat",new Set(Object.values(c.TimeFormatValues))]]);new Set([...f.keys(),"version","modelVersion"])},5251(e,t,r){t.YamlTemplateElementWriter=void 0;const n=r(9517),i=r(6574),a=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 i=n.JsonNode.getEmpty();null!==e.header&&(i[a.YamlKeys.header]=e.header),null!==e.footer&&(i[a.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),...i,...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[a.YamlKeys.children]=o),e.extensions.applyYaml(s)}getAsYamlString(e,t=!1){return i.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,t))}}t.YamlTemplateElementWriter=o},5430(e,t,r){t.YamlTemplateFieldWriterInternal=void 0;const n=r(9517),i=r(936),a=r(455),s=r(2099),o=r(211),l=r(6574);class c extends o.YamlAbstractArtifactWriter{constructor(e,t){super(e,t)}getAsYamlString(e,t=!1){return l.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,a.ChildDeploymentInfo.empty(),t))}getYamlAsJsonNode(e,t=a.ChildDeploymentInfo.empty(),r=!1,n=!0){const i=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),...i,...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[i.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=c},9326(e,t,r){t.YamlTemplateInstanceWriter=void 0;const n=r(3992),i=r(5588),a=r(1625),s=r(9167),o=r(9517),l=r(6574),c=r(211),d=r(7723),u=r(9327),m=r(5222),p=r(7571),h=r(4877),f=r(8193),y=r(2099),T=r(4033),g=r(3644),E="element-instance";class C extends c.YamlAbstractArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new C(e,t)}getYamlAsJsonNode(e,t=!1){return T.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 l.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,t))}getDataTree(e,t){const r=o.JsonNode.getEmpty();return this.serializeDataLevelInto(e.dataContainer,r,t,!0),r}serializeDataLevelInto(e,t,r,n=!1){const i=o.JsonNode.getEmpty(),a=this.getUnpackedAttributeValueGroups(e),s=new Set(Array.from(a.values()).flat());Object.keys(e.values).forEach(t=>{if(a.has(t)||s.has(t))return;const n=e.values[t];if(Array.isArray(n)){const e=o.JsonNode.getEmptyList();n.forEach((t,n)=>{const i=this.serializeCommonType(t,r);if(null!==i&&o.JsonNode.hasEntries(i))e.push(i);else if(t instanceof d.InstanceDataContainer){const n={[y.YamlKeys.type]:E};!r&&this.hasId(t.id)&&(n[y.YamlKeys.id]=t.id),e.push(n)}}),e.length>0&&(i[t]=e)}else{const e=this.serializeCommonType(n,r);null!==e&&o.JsonNode.hasEntries(e)&&(i[t]=e)}}),o.JsonNode.hasEntries(i)&&(!this.hasId(e.id)||r&&!n||(t[y.YamlKeys.id]=e.id),t[y.YamlKeys.children]=i);const l=o.JsonNode.getEmpty();this.serializeAttributeValueFields(e,l,a,n),n||!o.JsonNode.hasEntries(t)&&!o.JsonNode.hasEntries(l)||(Object.hasOwn(t,y.YamlKeys.children)||(t[y.YamlKeys.type]=E),!r&&this.hasId(e.id)&&(t[y.YamlKeys.id]=e.id)),Object.assign(t,l)}serializeAttributeValueFields(e,t,r,n){Object.keys(e.values).forEach(a=>{const s=e.values[a];if((s instanceof u.InstanceDataAttributeValueField||r.has(a))&&i.ReservedNames.yamlKeys(n?"template":"element").has(a))throw new Error(`Attribute-value field key "${a}" is reserved for CEDAR YAML metadata.`);if(s instanceof u.InstanceDataAttributeValueField){const e=o.JsonNode.getEmpty();let r=!1;Object.keys(s.values).forEach(t=>{const n=s.values[t];if(n instanceof m.InstanceDataStringAtom){const i=this.serializeAtomString(n);null!==i&&(e[t]=i,r=!0)}}),r&&(t[a]=e)}});for(const[n,i]of r){const r=o.JsonNode.getEmpty();for(const t of i){const n=e.values[t];if(n instanceof m.InstanceDataStringAtom){const e=this.serializeAtomString(n);null!==e&&(r[t]=e)}}o.JsonNode.hasEntries(r)&&(t[n]=r)}}getUnpackedAttributeValueGroups(e){const t=new Map;for(const[r,i]of Object.entries(e.values)){if(!Array.isArray(i))continue;const e=i.filter(e=>e instanceof g.InstanceDataAttributeValueFieldName).map(e=>e.name).filter(e=>!n.TextPolicy.isBlank(e));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??o.JsonNode.getEmpty();t[y.YamlKeys.notation]=e.notation,r=t}if("preferredLabel"in e&&null!==e.preferredLabel){const t=r??o.JsonNode.getEmpty();t[y.YamlKeys.prefLabel]=e.preferredLabel,r=t}return null!==r&&"language"in e&&null!==e.language&&(r[y.YamlKeys.language]=e.language),r}serializeCommonTypeWithoutNotation(e,t){if(e instanceof a.InstanceDataNotationAtom)return null===e.type?o.JsonNode.getEmpty():{[y.YamlKeys.datatype]:e.type};if(e instanceof m.InstanceDataStringAtom)return this.serializeAtomString(e);if(e instanceof h.InstanceDataTypedAtom)return null===e.value&&null===e.label&&null===e.notation&&null===e.preferredLabel?null:{[y.YamlKeys.datatype]:e.type,[y.YamlKeys.value]:e.value,...null===e.label?{}:{[y.YamlKeys.label]:e.label}};if(e instanceof s.InstanceDataLabelAtom)return{...null===e.type?{}:{[y.YamlKeys.datatype]:e.type},[y.YamlKeys.label]:e.label};if(e instanceof f.InstanceDataControlledAtom){const t=o.JsonNode.getEmpty();return null===e.type||!this.hasId(e.id)&&null===e.label&&null===e.notation||(t[y.YamlKeys.datatype]=e.type),this.hasId(e.id)&&(t[y.YamlKeys.id]=e.id),null!==e.label&&(t[y.YamlKeys.label]=e.label),o.JsonNode.hasEntries(t)?t:null}if(e instanceof p.InstanceDataLinkAtom)return this.serializeAtomLink(e);if(e instanceof d.InstanceDataContainer){const r=o.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:{[y.YamlKeys.value]:e.value,...null===e.label?{}:{[y.YamlKeys.label]:e.label}}}serializeAtomLink(e){return this.hasId(e.id)?{...null===e.type?{}:{[y.YamlKeys.datatype]:e.type},[y.YamlKeys.id]:e.id}:null!==e.notation&&null!==e.type?{[y.YamlKeys.datatype]:e.type}:null}hasId(e){return null!==e&&""!==e}}t.YamlTemplateInstanceWriter=C},1933(e,t,r){t.YamlTemplateWriter=void 0;const n=r(9517),i=r(6574),a=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[a.YamlKeys.header]=e.header),null!==e.footer&&(r[a.YamlKeys.footer]=e.footer);const i={...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&&(i[a.YamlKeys.children]=s),e.extensions.applyYaml(i)}getAsYamlString(e,t=!1){return i.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,t))}}t.YamlTemplateWriter=o},1641(e,t,r){t.AbstractArtifactBuilder=void 0;const n=r(4443),i=r(8333),a=r(2763),s=r(9857),o=r(2234),l=r(1027),c=r(3910),d=r(8534),u=r(8557);class m{at_id=d.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=c.BiboStatus.DRAFT;schema_name=null;schema_description="";schema_identifier=null;pav_derivedFrom=d.CedarArtifactId.NULL;withAtId(e){return e instanceof d.CedarArtifactId?this.at_id=e:this.at_id=d.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 c.BiboStatus?this.bibo_status=e:this.bibo_status=c.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,i.internalNameFor)(e.schema_name,t))}}static kindOf(e){return e===a.CedarArtifactType.TEMPLATE?"template":e===a.CedarArtifactType.TEMPLATE_ELEMENT?"element":e===a.CedarArtifactType.TEMPLATE_FIELD||e===a.CedarArtifactType.STATIC_TEMPLATE_FIELD?"field":null}}t.AbstractArtifactBuilder=m},2674(e,t,r){t.AbstractArtifact=void 0;const n=r(9857),i=r(2234),a=r(8534),s=r(2763);t.AbstractArtifact=class{at_id=a.CedarArtifactId.NULL;pav_createdOn=n.IsoDate.NULL;pav_createdBy=i.CedarUser.NULL;pav_lastUpdatedOn=n.IsoDate.NULL;oslc_modifiedBy=i.CedarUser.NULL;pav_derivedFrom=a.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),i=r(1492),a=r(3746),s=r(2763),o=r(4869),l=r(5588),c=r(4563);class d extends n.AbstractSchemaArtifact{childrenInfo=new i.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(c.JavaStrings.isBlank(r))throw new Error("A child key must not be blank.");const n=t.cedarArtifactType===s.CedarArtifactType.TEMPLATE_FIELD&&t.cedarFieldType===o.CedarFieldType.ATTRIBUTE_VALUE,i=e.cedarArtifactType===s.CedarArtifactType.TEMPLATE?"template":"element";if(n?l.ReservedNames.isReservedAttributeValueFieldName(r,i):l.ReservedNames.isReservedName(r))throw new Error(`Child name "${r}" is reserved for CEDAR instance metadata.`)}getChildrenInfo(){return this.childrenInfo}getAdditionalProperties(){return this.childrenInfo.hasAttributeValue()?a.AdditionalProperties.ALLOW_ATTRIBUTE_VALUE:a.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),i=r(2674);class a extends i.AbstractArtifact{schema_isBasedOn=n.CedarArtifactId.NULL}t.AbstractInstanceArtifact=a},8333(e,t,r){t.AbstractSchemaArtifact=void 0,t.internalNameFor=function(e,t){return`${e} ${t} schema`};const n=r(4443),i=r(1027),a=r(3910),s=r(8534),o=r(8557),l=r(2674),c=r(7752);class d extends l.AbstractArtifact{extensions=new n.SchemaExtensions;title=null;description=null;schema_schemaVersion=o.SchemaVersion.NULL;pav_version=i.PavVersion.NULL;bibo_status=a.BiboStatus.NULL;schema_identifier=null;pav_previousVersion=s.CedarArtifactId.NULL;language=c.Language.NULL}t.AbstractSchemaArtifact=d},5588(e,t,r){t.ReservedNames=void 0;const n=r(2099);class i{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(i.isReservedName(e))throw new Error(`Child name "${e}" is reserved for CEDAR instance metadata.`)}constructor(){}static isReservedName(e){return e.startsWith("@")||i.INSTANCE_PROPERTIES.has(e)||i.OBJECT_INTERNALS.has(e)}static isReservedAttributeValueFieldName(e,t){return i.isReservedName(e)||("template"===t?i.TEMPLATE_INSTANCE_YAML_KEYS:i.STANDALONE_ELEMENT_INSTANCE_YAML_KEYS).has(e)}static yamlKeys(e){return"template"===e?i.TEMPLATE_INSTANCE_YAML_KEYS:i.NESTED_ELEMENT_INSTANCE_YAML_KEYS}}t.ReservedNames=i},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 i(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function a(e){return Array.isArray(e)?e.map(a):i(e)?Object.fromEntries(Object.keys(e).sort().map(t=>[t,a(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=a(e),this.values=a(t)}get prefixes(){return{...this.namespaces}}get properties(){return a(this.values)}get isEmpty(){return 0===Object.keys(this.namespaces).length&&0===Object.keys(this.values).length}static fromJson(e){const t=i(e["@context"])?e["@context"]:{},r=Object.fromEntries(Object.entries(t).filter(([e,t])=>n(e)&&"string"==typeof t)),a=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,a)}static fromYaml(e){if(!Object.hasOwn(e,"extensions"))return new s;const t=e.extensions;if(!i(t)||2!==Object.keys(t).length||!i(t.prefixes)||!i(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},4257(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateValueValidator=void 0;const n=r(6830),i=r(7092),a=r(3281),s=r(7661),o=r(9129),l=r(3939),c=r(3812);t.TemplateValueValidator=class{static validate(e){if(e instanceof a.Template||e instanceof s.TemplateElement||e instanceof o.TemplateField){const t=[];return this.visitModel(e,"",t),i.ValidationPolicy.summarize(t,"template")}return i.ValidationPolicy.summarize([i.ValidationPolicy.finding("valueShape","","Expected a template, element or field definition.")],"template")}static visitModel(e,t,r){if(e instanceof o.TemplateField)this.visit((0,l.validationFieldSchema)(e,!0),t,r);else if(e instanceof a.Template||e instanceof s.TemplateElement)for(const n of e.getChildrenInfo().getChildrenNames()){const a=e.getChildInfo(n),s=e.getChild(n);let o=i.ValidationPolicy.child(t+"/properties",n);a?.isMultiInAnyWay()&&(a instanceof c.AbstractDynamicChildDeploymentInfo&&null!=a.minItems&&null!=a.maxItems&&a.minItems>a.maxItems&&r.push(i.ValidationPolicy.finding("templateConstraint",o+"/maxItems","Minimum occurrence count exceeds maximum.")),o+="/items"),s&&this.visitModel(s,o,r)}}static validateSource(e){const t=[];return this.visit(e,"",t),i.ValidationPolicy.summarize(t,"template")}static visit(e,t,r){if(!e||"object"!=typeof e||Array.isArray(e))return void r.push(i.ValidationPolicy.finding("valueShape",t,"A definition must be an object."));const a=e;if("array"===a.type)return null!=a.minItems&&null!=a.maxItems&&a.minItems>a.maxItems&&r.push(i.ValidationPolicy.finding("templateConstraint",t+"/maxItems","Minimum occurrence count exceeds maximum.")),void this.visit(a.items,t+"/items",r);if(a._ui?.inputType){r.push(...n.FieldValuePolicy.validateConfiguration(a,t),...n.FieldValuePolicy.validateDefault(a,t));const e=a._valueConstraints?.defaultValue;if(null!=e&&""!==e&&(n.FieldValuePolicy.isControlled(a)||n.FieldValuePolicy.authorityTypes.has(a._ui.inputType))){const s=t+"/_valueConstraints/defaultValue"+(n.FieldValuePolicy.isControlled(a)&&"object"==typeof e?"/termUri":"");r.push(i.ValidationPolicy.finding("semanticNotChecked",s,"Default identifier membership or existence has not been verified.","notChecked"))}return}for(const[e,n]of Object.entries(a.properties??{})){const a="array"===n?.type?n.items:n;a&&"object"==typeof a&&a._ui&&this.visit(n,i.ValidationPolicy.child(t+"/properties",e),r)}}}},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),i=r(9034);t.AbstractChildDeploymentInfo=class{static defaultMinItems=0;_name;_atType=n.CedarArtifactType.NULL;_uiInputType=i.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),i=r(9034),a=r(9129);t.AbstractChildDeploymentInfoBuilder=class{child=null;name="";atType=n.CedarArtifactType.NULL;uiInputType=i.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 a.TemplateField&&(e.uiInputType=this.child.cedarFieldType.getUiInputType()))}}},3812(e,t,r){t.AbstractDynamicChildDeploymentInfo=void 0;const n=r(513);class i 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=i},4809(e,t,r){t.AbstractDynamicChildDeploymentInfoBuilder=void 0;const n=r(455),i=r(6910);class a extends i.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=a},9519(e,t,r){t.AbstractFieldChildDeploymentInfo=void 0;const n=r(3812);class i 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=i},6096(e,t,r){t.AbstractFieldChildDeploymentInfoBuilder=void 0;const n=r(9129),i=r(4809),a=r(9519);class s extends i.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 a.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 i extends n.AbstractFieldChildDeploymentInfo{_multiInstance=!1;_minItems=null;_maxItems=null;_standalone=!1;static empty(){return new i("")}static standalone(){const e=new i("");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=i},8878(e,t,r){t.ChildDeploymentInfoAlwaysMultiple=void 0;const n=r(513),i=r(9519);class a extends i.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 n.AbstractChildDeploymentInfo.defaultMinItems}get maxItems(){return this._declaredMaxItems}}t.ChildDeploymentInfoAlwaysMultiple=a},3239(e,t,r){t.ChildDeploymentInfoAlwaysMultipleBuilder=void 0;const n=r(8198),i=r(8878),a=r(6096),s=r(9129),o=r(4869);class l extends a.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 i.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 i extends n.AbstractFieldChildDeploymentInfo{static empty(){return new i("")}constructor(e){super(e)}isMultiInAnyWay(){return!1}}t.ChildDeploymentInfoAlwaysSingle=i},587(e,t,r){t.ChildDeploymentInfoAlwaysSingleBuilder=void 0;const n=r(2266),i=r(6096);class a extends i.AbstractFieldChildDeploymentInfoBuilder{constructor(e,t){super(e,t)}build(){const e=new n.ChildDeploymentInfoAlwaysSingle(this.name);return this.setCommonData(e),e}}t.ChildDeploymentInfoAlwaysSingleBuilder=a},3608(e,t,r){t.ChildDeploymentInfoBuilder=void 0;const n=r(8198),i=r(455),a=r(6096);class s extends a.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 i.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 i extends n.AbstractDynamicChildDeploymentInfo{_multiInstance=!1;_minItems=null;_maxItems=null;static empty(){return new i("")}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=i},6976(e,t,r){t.ChildDeploymentInfoElementBuilder=void 0;const n=r(8198),i=r(4809),a=r(4831);class s extends i.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 a.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 i extends n.AbstractChildDeploymentInfo{_hidden=!1;static empty(){return new i("")}constructor(e){super(e)}get hidden(){return this._hidden}set hidden(e){this._hidden=e}isMultiInAnyWay(){return!1}}t.ChildDeploymentInfoStatic=i},8290(e,t,r){t.ChildDeploymentInfoStaticBuilder=void 0;const n=r(6910),i=r(3581);class a extends n.AbstractChildDeploymentInfoBuilder{hidden=!1;constructor(e,t){super(e,t)}withHidden(e){return this.hidden=e,this}build(){const e=new i.ChildDeploymentInfoStatic(this.name);return super.setCommonData(e),e.hidden=this.hidden,e}}t.ChildDeploymentInfoStaticBuilder=a},1492(e,t,r){t.ContainerArtifactChildrenInfo=void 0;const n=r(2763),i=r(2733),a=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!==a.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!==a.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 i=this.getChildInfo(r);i.atType===n.CedarArtifactType.STATIC_TEMPLATE_FIELD||!e&&i.uiInputType===a.UiInputType.ATTRIBUTE_VALUE||i instanceof s.AbstractDynamicChildDeploymentInfo&&null!==i.iri&&(t[i.name]=i.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]={[i.JsonSchema.enum]:[t[r]]}}),e}hasAttributeValue(){for(const e of this.childMap.values())if(e.uiInputType===a.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),i=r(8557),a=r(1027),s=r(5451),o=r(2763),l=r(6976);class c 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 c}static buildEmptyWithDefaultValues(){const e=new c;return e.schema_schemaVersion=i.SchemaVersion.CURRENT,e.bibo_status=n.BiboStatus.DRAFT,e.pav_version=a.PavVersion.DEFAULT,e}isMultiInstanceByDefinition(){return!1}isSingleInstanceByDefinition(){return!1}createDeploymentBuilder(e){return new l.ChildDeploymentInfoElementBuilder(this,e)}}t.TemplateElement=c},1762(e,t,r){t.TemplateElementBuilder=void 0;const n=r(1641),i=r(7661);class a 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=i.TemplateElement.buildEmptyWithNullValues();return super.buildInternal(e),e.instanceTypeSpecification=this.instanceTypeSpecification,this.children.forEach(([t,r])=>{e.addChild(t,r)}),e}}t.TemplateElementBuilder=a},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),i=r(8748);t.DefaultValueSerialization=class{static literalFromNode(e,t){return i.ReaderUtil.getString(e,t)}static writeLiteral(e,t,r){null!==r&&""!==r&&(e[t]=r)}static iriFromNode(e,t){if(""===i.ReaderUtil.getString(e,t))return null;const r=i.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 i extends n.JsonAbstractArtifactWriter{}t.JsonValueConstraintsWriter=i},9129(e,t,r){t.TemplateField=void 0;const n=r(4328),i=r(4869),a=r(8333);class s extends a.AbstractSchemaArtifact{skos_altLabel=null;skos_prefLabel=null;hidden=!1;requiredValue=!1;recommendedValue=!1;continuePreviousLine=!1;valueConstraints=new n.ValueConstraints;cedarFieldType=i.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 i 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=i},855(e,t,r){t.UnknownTemplateField=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(3608);class o extends n.TemplateField{constructor(){super(),this.cedarFieldType=i.CedarFieldType.NULL,this.cedarArtifactType=a.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 i extends n.ValueConstraints{defaultValue=null;constructor(){super()}}t.ValueConstraintsIriField=i},7765(e,t,r){t.ValueConstraintsLiteralField=void 0;const n=r(4328);class i extends n.ValueConstraints{defaultValue=null;constructor(){super()}}t.ValueConstraintsLiteralField=i},119(e,t,r){t.YamlValueConstraintsWriter=void 0;const n=r(211);class i extends n.YamlAbstractArtifactWriter{}t.YamlValueConstraintsWriter=i},2052(e,t,r){t.AttributeValueFieldBuilderImpl=void 0;const n=r(3350),i=r(9571);class a extends n.TemplateFieldBuilder{constructor(){super()}static create(){return new a}build(){const e=i.AttributeValueFieldImpl.buildEmpty();return super.buildInternal(e),e}}t.AttributeValueFieldBuilderImpl=a},9571(e,t,r){t.AttributeValueFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(4328),o=r(3239);class l extends n.TemplateField{constructor(){super(),this.cedarFieldType=i.CedarFieldType.ATTRIBUTE_VALUE,this.valueConstraints=new s.ValueConstraints,this.cedarArtifactType=a.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),i=r(9571);class a extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const a=i.AttributeValueFieldImpl.buildEmpty();return this.readRequiredAndHidden(e,t),a}}t.JsonFieldReaderAttributeValue=a},1442(e,t,r){t.JsonFieldWriterAttributeValue=void 0;const n=r(455),i=r(2748),a=r(9517),s=r(936),o=r(5793);class l extends i.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 a.JsonNode.getEmpty()}}t.JsonFieldWriterAttributeValue=l},529(e,t,r){t.YamlFieldReaderAttributeValue=void 0;const n=r(5675),i=r(9571);class a extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){return i.AttributeValueFieldImpl.buildEmpty()}}t.YamlFieldReaderAttributeValue=a},1521(e,t,r){t.YamlFieldWriterAttributeValue=void 0;const n=r(5430);class i extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}}t.YamlFieldWriterAttributeValue=i},4675(e,t,r){t.CheckboxFieldBuilderImpl=void 0;const n=r(3350),i=r(9915),a=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 i.CheckboxOption(e,t??!1,void 0!==t)),this}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.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),i=r(4869),a=r(2763),s=r(1489),o=r(3239);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.CHECKBOX,this.valueConstraints=new s.ValueConstraintsCheckboxField,this.cedarArtifactType=a.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 i extends n.ChoiceOptionEntity{constructor(e,t,r=!0){super(e,t,r)}}t.CheckboxOption=i},19(e,t,r){t.JsonFieldReaderCheckbox=void 0;const n=r(8748),i=r(936),a=r(4385),s=r(9915),o=r(9282),l=r(6145);class c extends a.JsonTemplateFieldTypeSpecificReader{read(e,t,r,a){const c=o.CheckboxFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=n.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);if(null!=d){c.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(d,i.CedarModel.defaultValue);const e=n.ReaderUtil.getNodeList(d,i.CedarModel.literals);null!==e&&e.forEach(e=>{const t=n.ReaderUtil.getString(e,i.CedarModel.label),r=n.ReaderUtil.getBoolean(e,i.CedarModel.selectedByDefault),a=Object.hasOwn(e,i.CedarModel.selectedByDefault);if(null!=t){const e=new s.CheckboxOption(t,r,a);c.valueConstraints.literals.push(e)}})}return c}}t.JsonFieldReaderCheckbox=c},8663(e,t,r){t.JsonFieldWriterCheckbox=void 0;const n=r(936),i=r(2748),a=r(6145);class s extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){a.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 i extends n.ValueConstraintsLiteralField{literals=[];constructor(){super()}}t.ValueConstraintsCheckboxField=i},7268(e,t,r){t.YamlFieldReaderCheckbox=void 0;const n=r(8748),i=r(9915),a=r(5675),s=r(2099),o=r(9282),l=r(6145);class c extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const c=o.CheckboxFieldImpl.buildEmpty();c.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(e,s.YamlKeys.default);const d=n.ReaderUtil.getNodeList(e,s.YamlKeys.values);return null!==d&&d.forEach(e=>{const t=n.ReaderUtil.getString(e,s.YamlKeys.label),r=n.ReaderUtil.getBoolean(e,s.YamlKeys.selected),a=Object.hasOwn(e,s.YamlKeys.selected);if(null!=t){const e=new i.CheckboxOption(t,r,a);c.valueConstraints.literals.push(e)}}),c}}t.YamlFieldReaderCheckbox=c},4500(e,t,r){t.YamlFieldWriterCheckbox=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.YamlKeys.default,t.valueConstraints.defaultValue),this.expandLiterals(t,e)}}t.YamlFieldWriterCheckbox=s},9916(e,t,r){t.ControlledTermFieldBuilderImpl=void 0;const n=r(5376),i=r(3350),a=r(6731);class s extends i.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=a.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),i=r(5376),a=r(4869),s=r(2763),o=r(3608);class l extends n.TemplateField{valueConstraints;valueRecommendationEnabled=!1;constructor(){super(),this.cedarFieldType=a.CedarFieldType.CONTROLLED_TERM,this.valueConstraints=new i.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),i=r(936),a=r(4385),s=r(8354),o=r(2418),l=r(9184),c=r(2395),d=r(7295),u=r(2733),m=r(7432),p=r(4531),h=r(6731),f=r(5753),y=r(4563);class T extends a.JsonTemplateFieldTypeSpecificReader{read(e,t,r,a){const s=h.ControlledTermFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const o=n.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);return null!=o&&(s.valueConstraints.ontologies=this.getOntologies(n.ReaderUtil.getNodeList(o,i.CedarModel.ontologies)),s.valueConstraints.classes=this.getClasses(n.ReaderUtil.getNodeList(o,i.CedarModel.classes)),s.valueConstraints.branches=this.getBranches(n.ReaderUtil.getNodeList(o,i.CedarModel.branches)),s.valueConstraints.valueSets=this.getValueSets(n.ReaderUtil.getNodeList(o,i.CedarModel.valueSets)),s.valueConstraints.defaultValue=this.getDefaultValue(n.ReaderUtil.getNodeOrNull(o,i.CedarModel.defaultValue)),s.valueConstraints.actions=this.getActions(n.ReaderUtil.getNodeList(o,i.CedarModel.actions))),s}getOntologies(e){const t=[];return e.forEach(e=>{const r=new s.ControlledTermOntology(n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.acronym),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.name),n.ReaderUtil.getNumberOrNull(e,i.CedarModel.ValueConstraints.numTerms),n.ReaderUtil.getIdentifierURI(e,i.CedarModel.ValueConstraints.uri),...T.readSourceAndVersion(e));t.push(r)}),t}getClasses(e){const t=[];return e.forEach(e=>{const r=new o.ControlledTermClass(n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.label),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.source),p.BioportalTermType.forJsonValue(n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.type)),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.prefLabel),n.ReaderUtil.getIdentifierURI(e,i.CedarModel.ValueConstraints.uri),...T.readSourceAndVersion(e));t.push(r)}),t}getBranches(e){const t=[];return e.forEach(e=>{const r=new l.ControlledTermBranch(n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.source),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.acronym),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.name),n.ReaderUtil.getNumberOrZero(e,i.CedarModel.ValueConstraints.maxDepth),n.ReaderUtil.getIdentifierURI(e,i.CedarModel.ValueConstraints.uri),...T.readSourceAndVersion(e));t.push(r)}),t}getValueSets(e){const t=[];return e.forEach(e=>{const r=new c.ControlledTermValueSet(n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.vsCollection),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.name),n.ReaderUtil.getNumberOrNull(e,i.CedarModel.ValueConstraints.numTerms),n.ReaderUtil.getIdentifierURI(e,i.CedarModel.ValueConstraints.uri),...T.readSourceAndVersion(e));t.push(r)}),t}getActions(e){const t=[];return e.forEach(e=>{const r=new m.ControlledTermAction(n.ReaderUtil.getNumber(e,i.CedarModel.ValueConstraints.to),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.action),n.ReaderUtil.getIdentifierURI(e,i.CedarModel.ValueConstraints.termUri),n.ReaderUtil.getURI(e,i.CedarModel.ValueConstraints.sourceUri),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.source),p.BioportalTermType.forJsonValue(n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.type)));t.push(r)}),t}static readSourceAndVersion(e){const t=n.ReaderUtil.getURI(e,i.CedarModel.ValueConstraints.iri),r=T.readVersion(n.ReaderUtil.getNodeOrNull(e,i.CedarModel.ValueConstraints.version));return[t.isEmpty()?null:t,n.ReaderUtil.getString(e,i.CedarModel.ValueConstraints.sourceSystem),r]}static readVersion(e){if(null===e||"object"!=typeof e||Array.isArray(e))return null;const t=n.ReaderUtil.getNodeOrNull(e,i.CedarModel.ValueConstraints.versionId);if("string"!=typeof t||""===t)throw new Error(`A pinned version needs a non-empty string at "${i.CedarModel.ValueConstraints.version}.${i.CedarModel.ValueConstraints.versionId}".`);if(y.JavaStrings.isBlank(t))throw new Error(`A pinned version's id at "${i.CedarModel.ValueConstraints.version}.${i.CedarModel.ValueConstraints.versionId}" must not be blank.`);return new f.ControlledTermVersion(t,n.ReaderUtil.getString(e,i.CedarModel.ValueConstraints.versionEffectiveDate),n.ReaderUtil.getString(e,i.CedarModel.ValueConstraints.versionDeclaredVersion))}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 d.ControlledTermDefaultValue(n.ReaderUtil.getIdentifierURI(e,u.JsonSchema.termUri),t??""):null}}t.JsonFieldReaderControlledTerm=T},8280(e,t,r){t.JsonFieldWriterControlledTerm=void 0;const n=r(9517),i=r(936),a=r(2748),s=r(2733),o=r(9932);class l extends a.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 a=n.JsonNode.getEmptyList();t.valueConstraints.ontologies.forEach(e=>{a.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[i.CedarModel.ontologies]=a;const o=n.JsonNode.getEmptyList();t.valueConstraints.valueSets.forEach(e=>{o.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[i.CedarModel.valueSets]=o;const l=n.JsonNode.getEmptyList();t.valueConstraints.classes.forEach(e=>{l.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[i.CedarModel.classes]=l;const c=n.JsonNode.getEmptyList();t.valueConstraints.branches.forEach(e=>{c.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[i.CedarModel.branches]=c;const d=n.JsonNode.getEmptyList();if(t.valueConstraints.actions.forEach(e=>{d.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),d.length>0&&(e[i.CedarModel.actions]=d),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[i.CedarModel.defaultValue]=r}super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterControlledTerm=l},5376(e,t,r){t.ValueConstraintsControlledTermField=void 0;const n=r(4328);class i extends n.ValueConstraints{defaultValue=null;ontologies=[];valueSets=[];classes=[];branches=[];actions=[];constructor(){super()}}t.ValueConstraintsControlledTermField=i},9299(e,t,r){t.YamlFieldReaderControlledTerm=void 0;const n=r(8748),i=r(7295),a=r(4531),s=r(5675),o=r(2099),l=r(8349),c=r(5491),d=r(3091),u=r(2957),m=r(1556),p=r(7733),h=r(6731),f=r(8802),y=r(5753),T=r(4563);class g 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 c.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),i=(new d.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(a.BioportalTermType.forYamlValue(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termType)));this.readSourceAndVersion(e,i),f.valueConstraints.classes.push(i.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 i.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(a.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)),t.withVersion(this.readVersion(n.ReaderUtil.getNodeOrNull(e,o.YamlKeys.version)))}readVersion(e){if(null===e||"object"!=typeof e||Array.isArray(e))return null;const t=n.ReaderUtil.getNodeOrNull(e,o.YamlKeys.Controlled.versionId);if("string"!=typeof t||""===t)throw new Error(`A pinned version needs a non-empty string at "${o.YamlKeys.version}.${o.YamlKeys.Controlled.versionId}".`);if(T.JavaStrings.isBlank(t))throw new Error(`A pinned version's id at "${o.YamlKeys.version}.${o.YamlKeys.Controlled.versionId}" must not be blank.`);return new y.ControlledTermVersion(t,n.ReaderUtil.getString(e,o.YamlKeys.Controlled.versionEffectiveDate),n.ReaderUtil.getString(e,o.YamlKeys.Controlled.versionDeclaredVersion))}}t.YamlFieldReaderControlledTerm=g},9535(e,t,r){t.YamlFieldWriterControlledTerm=void 0;const n=r(9517),i=r(5430),a=r(2099),s=r(4216);class o extends i.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return{[a.YamlKeys.datatype]:s.NonStandardDatatype.IRI}}expandValueConstraintsNodeForYAML(e,t,r){if(null!=t.valueConstraints.defaultValue){const r={[a.YamlKeys.value]:this.atomicWriter.write(t.valueConstraints.defaultValue.termUri),[a.YamlKeys.label]:t.valueConstraints.defaultValue.rdfsLabel};e[a.YamlKeys.default]=r}const i=n.JsonNode.getEmptyList();t.valueConstraints.ontologies.forEach(e=>{i.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),t.valueConstraints.classes.forEach(e=>{i.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),t.valueConstraints.branches.forEach(e=>{i.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),t.valueConstraints.valueSets.forEach(e=>{i.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),i.length>0&&(e[a.YamlKeys.values]=i);const s=n.JsonNode.getEmptyList();t.valueConstraints.actions.forEach(e=>{s.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),s.length>0&&(e[a.YamlKeys.actions]=s)}}t.YamlFieldWriterControlledTerm=o},1524(e,t,r){t.AbstractJsonControlledTermValueConstraintWriter=void 0;const n=r(9517),i=r(3557),a=r(936);class s extends i.JsonValueConstraintsWriter{writeSourceAndVersion(e,t){null===t.iri||t.iri.isEmpty()||(e[a.CedarModel.ValueConstraints.iri]=this.atomicWriter.write(t.iri)),null!==t.sourceSystem&&(e[a.CedarModel.ValueConstraints.sourceSystem]=t.sourceSystem);const r=t.version;if(null!==r){const t=n.JsonNode.getEmpty();t[a.CedarModel.ValueConstraints.versionId]=r.id,null!==r.effectiveDate&&(t[a.CedarModel.ValueConstraints.versionEffectiveDate]=r.effectiveDate),null!==r.declaredVersion&&(t[a.CedarModel.ValueConstraints.versionDeclaredVersion]=r.declaredVersion),e[a.CedarModel.ValueConstraints.version]=t}}}t.AbstractJsonControlledTermValueConstraintWriter=s},4339(e,t,r){t.AbstractYamlControlledTermValueConstraintWriter=void 0;const n=r(9517),i=r(119),a=r(2099);class s extends i.YamlValueConstraintsWriter{writeSourceSystem(e,t){null!==t.sourceSystem&&(e[a.YamlKeys.Controlled.sourceSystem]=t.sourceSystem)}writeSourceIri(e,t){null===t.iri||t.iri.isEmpty()||(e[a.YamlKeys.Controlled.sourceIri]=this.atomicWriter.write(t.iri))}writeVersion(e,t){const r=t.version;if(null===r)return;const i=n.JsonNode.getEmpty();i[a.YamlKeys.Controlled.versionId]=r.id,null!==r.effectiveDate&&(i[a.YamlKeys.Controlled.versionEffectiveDate]=r.effectiveDate),null!==r.declaredVersion&&(i[a.YamlKeys.Controlled.versionDeclaredVersion]=r.declaredVersion),e[a.YamlKeys.version]=i}}t.AbstractYamlControlledTermValueConstraintWriter=s},2369(e,t,r){t.ControlledTermAbstractValueConstraint=void 0;const n=r(4328);class i 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=i},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),i=r(7295),a=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 a.ValueConstraintRequirements.requireIri(this.termUri,"a term URI","A controlled-term default value"),a.ValueConstraintRequirements.requireText(this.rdfsLabel,"a label","A controlled-term default value"),new i.ControlledTermDefaultValue(this.termUri,this.rdfsLabel)}}},5753(e,t,r){t.ControlledTermVersion=void 0;const n=r(4563);t.ControlledTermVersion=class{_id;_effectiveDate;_declaredVersion;constructor(e,t=null,r=null){if("string"!=typeof e||""===e)throw new Error("A pinned version requires an id. A version with no id identifies no snapshot.");if(n.JavaStrings.isBlank(e))throw new Error("A pinned version's id must not be blank. An id made only of whitespace identifies no snapshot.");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 i extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermAction";className="ControlledTermAction";_to=null;_action;_termUri;_sourceUri;_source;_type;constructor(e,t,r,n,i,a){super(),this._to=e,this._action=t,this._termUri=r,this._sourceUri=n,this._source=i,this._type=a}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=i},7733(e,t,r){t.ControlledTermActionBuilder=void 0;const n=r(8802),i=r(7432),a=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 a.ValueConstraintRequirements.requireText(this._action,"an action","A controlled-term action"),a.ValueConstraintRequirements.requireIri(this._termUri,"a term URI","A controlled-term action"),a.ValueConstraintRequirements.requireIri(this._sourceUri,"a source URI","A controlled-term action"),a.ValueConstraintRequirements.requireText(this._source,"a source","A controlled-term action"),a.ValueConstraintRequirements.requireTermType(this._type,"A controlled-term action"),new i.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),i=r(936),a=r(1524);class s extends a.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[i.CedarModel.ValueConstraints.termUri]=this.atomicWriter.write(e.termUri),t[i.CedarModel.ValueConstraints.source]=e.source,t[i.CedarModel.ValueConstraints.type]=this.atomicWriter.write(e.type),t[i.CedarModel.ValueConstraints.action]=e.action,t[i.CedarModel.ValueConstraints.sourceUri]=this.atomicWriter.write(e.sourceUri),null!==e.to&&(t[i.CedarModel.ValueConstraints.to]=e.to),t}}t.JsonValueConstraintsActionWriter=s},4647(e,t,r){t.YamlValueConstraintsActionWriter=void 0;const n=r(9517),i=r(4339),a=r(2099);class s extends i.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.YamlKeys.action]=e.action,null!==e.to&&(t[a.YamlKeys.Controlled.to]=e.to),t[a.YamlKeys.Controlled.termIri]=this.atomicWriter.write(e.termUri),t[a.YamlKeys.Controlled.sourceIri]=this.atomicWriter.write(e.sourceUri),t[a.YamlKeys.Controlled.sourceAcronym]=e.source,t[a.YamlKeys.type]=this.atomicWriter.write(e.type),t}}t.YamlValueConstraintsActionWriter=s},9184(e,t,r){t.ControlledTermBranch=void 0;const n=r(2369);class i extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermBranch";className="ControlledTermBranch";_source;_acronym;_name;_uri;_maxDepth=0;constructor(e,t,r,n,i,a=null,s=null,o=null){super(a,s,o),this._source=e,this._acronym=t,this._uri=i,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=i},2957(e,t,r){t.ControlledTermBranchBuilder=void 0;const n=r(8802),i=r(9184),a=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 a.ValueConstraintRequirements.requireIri(this._uri,"a URI","A branch constraint"),a.ValueConstraintRequirements.requireText(this._source,"a source","A branch constraint"),a.ValueConstraintRequirements.requireText(this._acronym,"an acronym","A branch constraint"),a.ValueConstraintRequirements.requireText(this._name,"a name","A branch constraint"),new i.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),i=r(936),a=r(1524);class s extends a.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[i.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[i.CedarModel.ValueConstraints.source]=e.source,t[i.CedarModel.ValueConstraints.acronym]=e.acronym,t[i.CedarModel.ValueConstraints.name]=e.name,t[i.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),i=r(4339),a=r(2099),s=r(8349);class o extends i.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.YamlKeys.type]=s.YamlValues.Controlled.branch,this.writeSourceSystem(t,e),t[a.YamlKeys.Controlled.sourceAcronym]=e.acronym,t[a.YamlKeys.Controlled.sourceName]=e.source,this.writeSourceIri(t,e),t[a.YamlKeys.Controlled.termBaseIri]=this.atomicWriter.write(e.uri),t[a.YamlKeys.Controlled.termBaseLabel]=e.name,t[a.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 i extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermClass";className="ControlledTermClass";_label;_source;_type;_prefLabel;_uri;constructor(e,t,r,n,i,a=null,s=null,o=null){super(a,s,o),this._label=e,this._source=t,this._type=r,this._prefLabel=n,this._uri=i}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=i},3091(e,t,r){t.ControlledTermClassBuilder=void 0;const n=r(8802),i=r(2418),a=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 a.ValueConstraintRequirements.requireIri(this._uri,"a URI","A class constraint"),a.ValueConstraintRequirements.requireText(this._label,"a label","A class constraint"),a.ValueConstraintRequirements.requireText(this._prefLabel,"a preferred label","A class constraint"),a.ValueConstraintRequirements.requireText(this._source,"a source","A class constraint"),a.ValueConstraintRequirements.requireTermType(this._type,"A class constraint"),new i.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),i=r(936),a=r(1524);class s extends a.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[i.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[i.CedarModel.ValueConstraints.source]=e.source,t[i.CedarModel.ValueConstraints.label]=e.label,t[i.CedarModel.ValueConstraints.prefLabel]=e.prefLabel,t[i.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),i=r(4339),a=r(2099),s=r(8349);class o extends i.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.YamlKeys.type]=s.YamlValues.Controlled.class,this.writeSourceSystem(t,e),t[a.YamlKeys.Controlled.sourceAcronym]=e.source,this.writeSourceIri(t,e),t[a.YamlKeys.Controlled.termIri]=this.atomicWriter.write(e.uri),t[a.YamlKeys.Controlled.termType]=this.atomicWriter.write(e.type),t[a.YamlKeys.Controlled.termLabel]=e.prefLabel,e.label!==e.prefLabel&&(t[a.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 i extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermOntology";className="ControlledTermOntology";_acronym;_name;_uri;_numTerms=0;constructor(e,t,r,n,i=null,a=null,s=null){super(i,a,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=i},5491(e,t,r){t.ControlledTermOntologyBuilder=void 0;const n=r(8802),i=r(8354),a=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 a.ValueConstraintRequirements.requireIri(this.uri,"a URI","An ontology constraint"),a.ValueConstraintRequirements.requireText(this.acronym,"an acronym","An ontology constraint"),a.ValueConstraintRequirements.requireText(this.name,"a name","An ontology constraint"),new i.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),i=r(936),a=r(1524);class s extends a.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[i.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[i.CedarModel.ValueConstraints.acronym]=e.acronym,t[i.CedarModel.ValueConstraints.name]=e.name,null!==e.numTerms&&(t[i.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),i=r(4339),a=r(2099),s=r(8349);class o extends i.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.YamlKeys.type]=s.YamlValues.Controlled.ontology,this.writeSourceSystem(t,e),t[a.YamlKeys.Controlled.sourceAcronym]=e.acronym,t[a.YamlKeys.Controlled.sourceName]=e.name,this.writeSourceIri(t,e),null!==e.numTerms&&(t[a.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 i extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermValueSet";className="ControlledTermValueSet";_vsCollection;_name;_uri;_numTerms=0;constructor(e,t,r,n,i=null,a=null,s=null){super(i,a,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=i},1556(e,t,r){t.ControlledTermValueSetBuilder=void 0;const n=r(8802),i=r(2395),a=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 a.ValueConstraintRequirements.requireIri(this._uri,"a URI","A value-set constraint"),a.ValueConstraintRequirements.requireText(this._vsCollection,"a value-set collection","A value-set constraint"),a.ValueConstraintRequirements.requireText(this._name,"a name","A value-set constraint"),new i.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),i=r(936),a=r(1524);class s extends a.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[i.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[i.CedarModel.ValueConstraints.vsCollection]=e.vsCollection,t[i.CedarModel.ValueConstraints.name]=e.name,null!==e.numTerms&&(t[i.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),i=r(4339),a=r(2099),s=r(8349);class o extends i.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.YamlKeys.type]=s.YamlValues.Controlled.valueSet,this.writeSourceSystem(t,e),t[a.YamlKeys.Controlled.sourceAcronym]=e.vsCollection,this.writeSourceIri(t,e),t[a.YamlKeys.Controlled.termBaseIri]=this.atomicWriter.write(e.uri),t[a.YamlKeys.Controlled.termBaseLabel]=e.name,null!==e.numTerms&&(t[a.YamlKeys.Controlled.termCount]=e.numTerms),this.writeVersion(t,e),t}}t.YamlValueConstraintsValueSetWriter=o},1667(e,t,r){t.EmailFieldBuilderImpl=void 0;const n=r(6830),i=r(3350),a=r(4450);class s extends i.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new s}withDefaultValue(e){return this.defaultValue=e,this}build(){n.FieldValuePolicy.assertConsistent({_ui:{inputType:"email"},_valueConstraints:{defaultValue:this.defaultValue}});const e=a.EmailFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.EmailFieldBuilderImpl=s},4450(e,t,r){t.EmailFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(7765),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EMAIL,this.valueConstraints=new s.ValueConstraintsLiteralField,this.cedarArtifactType=a.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),i=r(4450),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.EmailFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderEmail=l},9031(e,t,r){t.JsonFieldWriterEmail=void 0;const n=r(2748),i=r(936),a=r(6145);class s extends n.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.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),i=r(4450),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.EmailFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.literalFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderEmail=o},1038(e,t,r){t.YamlFieldWriterEmail=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterEmail=s},6610(e,t,r){t.ExtDoiFieldBuilderImpl=void 0;const n=r(3350),i=r(997);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.ExtDoiFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtDoiFieldBuilderImpl=a},997(e,t,r){t.ExtDoiFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EXT_DOI,this.cedarArtifactType=a.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),i=r(997),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.ExtDoiFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtDoi=l},7412(e,t,r){t.JsonFieldWriterExtDoi=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.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[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.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),i=r(997),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.ExtDoiFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderExtDoi=o},6967(e,t,r){t.YamlFieldWriterExtDoi=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtDoi=s},9062(e,t,r){t.ExtNihGrantIdFieldBuilderImpl=void 0;const n=r(3350),i=r(7313);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.ExtNihGrantIdFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtNihGrantIdFieldBuilderImpl=a},7313(e,t,r){t.ExtNihGrantIdFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EXT_NIH_GRANT_ID,this.cedarArtifactType=a.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),i=r(7313),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.ExtNihGrantIdFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtNihGrantId=l},5250(e,t,r){t.JsonFieldWriterExtNihGrantId=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.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[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.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),i=r(7313),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.ExtNihGrantIdFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderExtNihGrantId=o},3711(e,t,r){t.YamlFieldWriterExtNihGrantId=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtNihGrantId=s},2376(e,t,r){t.ExtOrcidFieldBuilderImpl=void 0;const n=r(3350),i=r(5967);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.ExtOrcidFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtOrcidFieldBuilderImpl=a},5967(e,t,r){t.ExtOrcidFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EXT_ORCID,this.cedarArtifactType=a.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),i=r(5967),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.ExtOrcidFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtOrcid=l},8096(e,t,r){t.JsonFieldWriterExtOrcid=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.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[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.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),i=r(5967),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.ExtOrcidFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderExtOrcid=o},4355(e,t,r){t.YamlFieldWriterExtOrcid=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtOrcid=s},3914(e,t,r){t.ExtPfasFieldBuilderImpl=void 0;const n=r(3350),i=r(6637);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.ExtPfasFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtPfasFieldBuilderImpl=a},6637(e,t,r){t.ExtPfasFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EXT_PFAS,this.cedarArtifactType=a.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),i=r(6637),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.ExtPfasFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtPfas=l},6122(e,t,r){t.JsonFieldWriterExtPfas=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.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[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.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),i=r(6637),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.ExtPfasFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderExtPfas=o},5587(e,t,r){t.YamlFieldWriterExtPfas=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtPfas=s},7162(e,t,r){t.ExtPubmedFieldBuilderImpl=void 0;const n=r(3350),i=r(2685);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.ExtPubmedFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtPubmedFieldBuilderImpl=a},2685(e,t,r){t.ExtPubmedFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EXT_PUBMED,this.cedarArtifactType=a.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),i=r(2685),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.ExtPubmedFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtPubmed=l},3312(e,t,r){t.JsonFieldWriterExtPubmed=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.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[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.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),i=r(2685),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.ExtPubmedFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderExtPubmed=o},6557(e,t,r){t.YamlFieldWriterExtPubmed=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtPubmed=s},7328(e,t,r){t.ExtRorFieldBuilderImpl=void 0;const n=r(3350),i=r(4007);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.ExtRorFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtRorFieldBuilderImpl=a},4007(e,t,r){t.ExtRorFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EXT_ROR,this.cedarArtifactType=a.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),i=r(4007),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.ExtRorFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtRor=l},7584(e,t,r){t.JsonFieldWriterExtRor=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.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[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.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),i=r(4007),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.ExtRorFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderExtRor=o},491(e,t,r){t.YamlFieldWriterExtRor=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtRor=s},3474(e,t,r){t.ExtRridFieldBuilderImpl=void 0;const n=r(3350),i=r(789);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.ExtRridFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtRridFieldBuilderImpl=a},789(e,t,r){t.ExtRridFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EXT_RRID,this.cedarArtifactType=a.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),i=r(789),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.ExtRridFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtRrid=l},4780(e,t,r){t.JsonFieldWriterExtRrid=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.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[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.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),i=r(789),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.ExtRridFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderExtRrid=o},4077(e,t,r){t.YamlFieldWriterExtRrid=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtRrid=s},7095(e,t,r){t.JsonFieldReaderLink=void 0;const n=r(4385),i=r(4084),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.LinkFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderLink=l},3691(e,t,r){t.JsonFieldWriterLink=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.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[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.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),i=r(4084);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.LinkFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.LinkFieldBuilderImpl=a},4084(e,t,r){t.LinkFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.LINK,this.cedarArtifactType=a.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),i=r(4084),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.LinkFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderLink=o},1784(e,t,r){t.YamlFieldWriterLink=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterLink=s},1513(e,t,r){t.MultipleChoiceListFieldBuilderImpl=void 0;const n=r(9513);class i extends n.ListFieldBuilderImpl{constructor(){super(),this.multipleChoice=!0}static create(){return new i}build(){return super.build()}}t.MultipleChoiceListFieldBuilderImpl=i},4932(e,t,r){t.MultipleChoiceListFieldImpl=void 0;const n=r(5316),i=r(4869),a=r(3239);class s extends n.ListFieldImpl{constructor(){super(),this.multipleChoice=!0,this.cedarFieldType=i.CedarFieldType.MULTIPLE_SELECT_LIST}static buildEmpty(){return new s}isMultiInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new a.ChildDeploymentInfoAlwaysMultipleBuilder(this,e)}}t.MultipleChoiceListFieldImpl=s},7124(e,t,r){t.YamlFieldReaderMultiSelectList=void 0;const n=r(5675),i=r(4932);class a extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const s=i.MultipleChoiceListFieldImpl.buildEmpty();return n.YamlTemplateFieldTypeSpecificReader.readAndStoreListValueConstraints(e,s),s}}t.YamlFieldReaderMultiSelectList=a},9105(e,t,r){t.SingleChoiceListFieldBuilderImpl=void 0;const n=r(9513);class i extends n.ListFieldBuilderImpl{constructor(){super(),this.multipleChoice=!1}static create(){return new i}build(){return super.build()}}t.SingleChoiceListFieldBuilderImpl=i},1676(e,t,r){t.SingleChoiceListFieldImpl=void 0;const n=r(5316),i=r(3608),a=r(4869);class s extends n.ListFieldImpl{constructor(){super(),this.multipleChoice=!1,this.cedarFieldType=a.CedarFieldType.SINGLE_SELECT_LIST}static buildEmpty(){return new s}createDeploymentBuilder(e){return new i.ChildDeploymentInfoBuilder(this,e)}}t.SingleChoiceListFieldImpl=s},2709(e,t,r){t.YamlFieldReaderSingleSelectList=void 0;const n=r(5675),i=r(1676);class a extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const s=i.SingleChoiceListFieldImpl.buildEmpty();return n.YamlTemplateFieldTypeSpecificReader.readAndStoreListValueConstraints(e,s),s}}t.YamlFieldReaderSingleSelectList=a},2419(e,t,r){t.JsonFieldReaderList=void 0;const n=r(8748),i=r(936),a=r(4385),s=r(4081),o=r(4932),l=r(1676),c=r(6145);class d extends a.JsonTemplateFieldTypeSpecificReader{read(e,t,r,a){let d=l.SingleChoiceListFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const u=n.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);if(null!=u){n.ReaderUtil.getBoolean(u,i.CedarModel.multipleChoice)&&(d=o.MultipleChoiceListFieldImpl.buildEmpty()),d.valueConstraints.defaultValue=c.DefaultValueSerialization.literalFromNode(u,i.CedarModel.defaultValue);const e=n.ReaderUtil.getNodeList(u,i.CedarModel.literals);null!==e&&e.forEach(e=>{const t=n.ReaderUtil.getString(e,i.CedarModel.label),r=n.ReaderUtil.getBoolean(e,i.CedarModel.selectedByDefault),a=Object.hasOwn(e,i.CedarModel.selectedByDefault);if(null!=t){const e=new s.ListOption(t,r,a);d.valueConstraints.literals.push(e)}})}return d}}t.JsonFieldReaderList=d},7335(e,t,r){t.JsonFieldWriterList=void 0;const n=r(936),i=r(2748),a=r(6145);class s extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){a.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),i=r(3350),a=r(4932),s=r(1676);class o extends i.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?a.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),i=r(4869),a=r(2763),s=r(1623);class o extends n.TemplateField{valueConstraints;multipleChoice;constructor(){super(),this.cedarFieldType=i.CedarFieldType.NULL,this.valueConstraints=new s.ValueConstraintsListField,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD,this.multipleChoice=!1}}t.ListFieldImpl=o},4081(e,t,r){t.ListOption=void 0;const n=r(7282);class i extends n.ChoiceOptionEntity{constructor(e,t,r=!0){super(e,t,r)}}t.ListOption=i},1623(e,t,r){t.ValueConstraintsListField=void 0;const n=r(7765);class i extends n.ValueConstraintsLiteralField{literals=[];constructor(){super()}}t.ValueConstraintsListField=i},3080(e,t,r){t.YamlFieldWriterList=void 0;const n=r(5430),i=r(9499),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){s.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue),this.expandLiterals(t,e)}getYamlType(e){return e.multipleChoice?i.YamlArtifactType.MULTI_SELECT_LIST.getValue():i.YamlArtifactType.SINGLE_SELECT_LIST.getValue()}}t.YamlFieldWriterList=o},1769(e,t,r){t.JsonFieldReaderNumeric=void 0;const n=r(8748),i=r(936),a=r(3447),s=r(4385),o=r(4074),l=r(6444);class c extends s.JsonTemplateFieldTypeSpecificReader{read(e,t,r,s){const c=o.NumericFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=n.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);if(null!=d){const e=n.ReaderUtil.getString(d,i.CedarModel.numberType);null!==e&&(c.valueConstraints.numberType=a.NumberType.forValue(e)),c.valueConstraints.minValue=n.ReaderUtil.getExactNumber(d,i.CedarModel.minValue),c.valueConstraints.maxValue=n.ReaderUtil.getExactNumber(d,i.CedarModel.maxValue),c.valueConstraints.decimalPlaces=n.ReaderUtil.getNumber(d,i.CedarModel.decimalPlace),c.valueConstraints.unitOfMeasure=n.ReaderUtil.getString(d,i.CedarModel.unitOfMeasure),c.valueConstraints.defaultValue=n.ReaderUtil.getNumericDefault(d,i.CedarModel.defaultValue),l.NumericDefaultValueValidator.assertValid(c.valueConstraints.numberType,c.valueConstraints.defaultValue,c.valueConstraints.minValue,c.valueConstraints.maxValue)}return c}}t.JsonFieldReaderNumeric=c},4841(e,t,r){t.JsonFieldWriterNumeric=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6444);class l extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandPropertiesNode(e){e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_LITERAL}expandRequiredNode(e){e[i.JsonSchema.required]=[i.JsonSchema.atValue,i.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),i=r(2108);t.NumericDefaultValueValidator=class{static assertValid(e,t,r=null,a=null){if(null!==r&&i.NumericPolicy.value(r),null!==a&&i.NumericPolicy.value(a),null!==r&&null!==a&&i.NumericPolicy.compare(r,a)>0)throw new Error("Minimum value exceeds maximum value.");if(null===t)return;i.NumericPolicy.value(t);const s=e.getValue();if(null===s)throw new Error("Numeric default requires a numeric datatype.");const o={[n.NumberTypeValues.BYTE]:["-128","127"],[n.NumberTypeValues.SHORT]:["-32768","32767"],[n.NumberTypeValues.INT]:["-2147483648","2147483647"],[n.NumberTypeValues.LONG]:["-9223372036854775808","9223372036854775807"]}[s];if(o){if("number"==typeof t&&!Number.isSafeInteger(t))throw new Error("Numeric default requires exact decimal text for integers beyond the safe JavaScript range.");if(!i.NumericPolicy.isInteger(t))throw new Error(`Numeric default ${t} must be an integer for ${s}.`);if(i.NumericPolicy.compare(t,o[0])<0||i.NumericPolicy.compare(t,o[1])>0)throw new Error(`Numeric default ${t} is outside the ${s} range.`)}if(s===n.NumberTypeValues.FLOAT||s===n.NumberTypeValues.DOUBLE){const e=String(t).replace(/^-/,""),r=s===n.NumberTypeValues.FLOAT?"3.4028234663852886e38":"1.7976931348623157e308",a=s===n.NumberTypeValues.FLOAT?"1.401298464324817e-45":"4.9e-324";if(i.NumericPolicy.compare(e,r)>0||0!==i.NumericPolicy.compare(e,0)&&i.NumericPolicy.compare(e,a)<0)throw new Error(`Numeric default ${t} is outside the ${s} range.`)}if(null!==r&&i.NumericPolicy.compare(t,r)<0)throw new Error(`Numeric default ${t} is below minValue ${r}.`);if(null!==a&&i.NumericPolicy.compare(t,a)>0)throw new Error(`Numeric default ${t} is above maxValue ${a}.`)}}},3675(e,t,r){t.NumericFieldBuilderImpl=void 0;const n=r(6830),i=r(2108),a=r(3350),s=r(3447),o=r(4074),l=r(6444);class c extends a.TemplateFieldBuilder{numberType=s.NumberType.DECIMAL;minValue=null;maxValue=null;decimalPlaces=null;unitOfMeasure=null;defaultValue=null;constructor(){super()}static create(){return new c}withNumberType(e){return this.numberType=e,this}withMinValue(e){return this.minValue=null===e?null:i.NumericPolicy.value(e),this}withMaxValue(e){return this.maxValue=null===e?null:i.NumericPolicy.value(e),this}withDecimalPlaces(e){return this.decimalPlaces=e,this}withUnitOfMeasure(e){return this.unitOfMeasure=e,this}withDefaultValue(e){return this.defaultValue=null===e?null:i.NumericPolicy.value(e),this}build(){l.NumericDefaultValueValidator.assertValid(this.numberType,this.defaultValue,this.minValue,this.maxValue),n.FieldValuePolicy.assertConsistent({_ui:{inputType:"numeric"},_valueConstraints:{numberType:this.numberType.getValue(),defaultValue:this.defaultValue,minValue:this.minValue,maxValue:this.maxValue,decimalPlace:this.decimalPlaces}});const e=o.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=c},4074(e,t,r){t.NumericFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1211),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.NUMERIC,this.valueConstraints=new s.ValueConstraintsNumericField,this.cedarArtifactType=a.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),i=r(3447);class a extends n.ValueConstraints{numberType=i.NumberType.DECIMAL;minValue=null;maxValue=null;decimalPlaces=null;unitOfMeasure=null;defaultValue=null;constructor(){super()}}t.ValueConstraintsNumericField=a},1872(e,t,r){t.YamlFieldReaderNumeric=void 0;const n=r(8748),i=r(3447),a=r(5675),s=r(2099),o=r(4074),l=r(6444);class c extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const c=o.NumericFieldImpl.buildEmpty(),d=n.ReaderUtil.getString(e,s.YamlKeys.datatype);return null!==d&&(c.valueConstraints.numberType=i.NumberType.forValue(d)),c.valueConstraints.minValue=n.ReaderUtil.getExactNumber(e,s.YamlKeys.minValue),c.valueConstraints.maxValue=n.ReaderUtil.getExactNumber(e,s.YamlKeys.maxValue),c.valueConstraints.decimalPlaces=n.ReaderUtil.getNumber(e,s.YamlKeys.decimalPlaces),c.valueConstraints.unitOfMeasure=n.ReaderUtil.getString(e,s.YamlKeys.unit),c.valueConstraints.defaultValue=n.ReaderUtil.getNumericDefault(e,s.YamlKeys.default),l.NumericDefaultValueValidator.assertValid(c.valueConstraints.numberType,c.valueConstraints.defaultValue,c.valueConstraints.minValue,c.valueConstraints.maxValue),c}}t.YamlFieldReaderNumeric=c},3292(e,t,r){t.YamlFieldWriterNumeric=void 0;const n=r(5430),i=r(2099),a=r(6444);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.NumericDefaultValueValidator.assertValid(t.valueConstraints.numberType,t.valueConstraints.defaultValue,t.valueConstraints.minValue,t.valueConstraints.maxValue),e[i.YamlKeys.datatype]=this.atomicWriter.write(t.valueConstraints.numberType),null!=t.valueConstraints.minValue&&(e[i.YamlKeys.minValue]=t.valueConstraints.minValue),null!=t.valueConstraints.maxValue&&(e[i.YamlKeys.maxValue]=t.valueConstraints.maxValue),null!=t.valueConstraints.decimalPlaces&&(e[i.YamlKeys.decimalPlaces]=t.valueConstraints.decimalPlaces),null!=t.valueConstraints.unitOfMeasure&&(e[i.YamlKeys.unit]=t.valueConstraints.unitOfMeasure),null!=t.valueConstraints.defaultValue&&(e[i.YamlKeys.default]=t.valueConstraints.defaultValue)}}t.YamlFieldWriterNumeric=s},1468(e,t,r){t.JsonFieldReaderPhoneNumber=void 0;const n=r(4385),i=r(7459),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.PhoneNumberFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderPhoneNumber=l},6876(e,t,r){t.JsonFieldWriterPhoneNumber=void 0;const n=r(2748),i=r(936),a=r(6145);class s extends n.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterPhoneNumber=s},8084(e,t,r){t.PhoneNumberFieldBuilderImpl=void 0;const n=r(6830),i=r(3350),a=r(7459);class s extends i.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new s}withDefaultValue(e){return this.defaultValue=e,this}build(){n.FieldValuePolicy.assertConsistent({_ui:{inputType:"phone-number"},_valueConstraints:{defaultValue:this.defaultValue}});const e=a.PhoneNumberFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.PhoneNumberFieldBuilderImpl=s},7459(e,t,r){t.PhoneNumberFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(7765),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.PHONE_NUMBER,this.valueConstraints=new s.ValueConstraintsLiteralField,this.cedarArtifactType=a.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),i=r(7459),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.PhoneNumberFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.literalFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderPhoneNumber=o},9821(e,t,r){t.YamlFieldWriterPhoneNumber=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterPhoneNumber=s},9053(e,t,r){t.JsonFieldReaderRadio=void 0;const n=r(8748),i=r(936),a=r(3315),s=r(4385),o=r(8618),l=r(6145);class c extends s.JsonTemplateFieldTypeSpecificReader{read(e,t,r,s){const c=o.RadioFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=n.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);if(null!=d){c.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(d,i.CedarModel.defaultValue);const e=n.ReaderUtil.getNodeList(d,i.CedarModel.literals);null!==e&&e.forEach(e=>{const t=n.ReaderUtil.getString(e,i.CedarModel.label),r=n.ReaderUtil.getBoolean(e,i.CedarModel.selectedByDefault),s=Object.hasOwn(e,i.CedarModel.selectedByDefault);if(null!=t){const e=new a.RadioOption(t,r,s);c.valueConstraints.literals.push(e)}})}return c}}t.JsonFieldReaderRadio=c},9309(e,t,r){t.JsonFieldWriterRadio=void 0;const n=r(936),i=r(2748),a=r(6145);class s extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){a.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),i=r(3315),a=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 i.RadioOption(e,t??!1,void 0!==t)),this}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.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),i=r(4869),a=r(2763),s=r(9931),o=r(587);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.RADIO,this.valueConstraints=new s.ValueConstraintsRadioField,this.cedarArtifactType=a.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 i extends n.ChoiceOptionEntity{constructor(e,t,r=!0){super(e,t,r)}}t.RadioOption=i},9931(e,t,r){t.ValueConstraintsRadioField=void 0;const n=r(7765);class i extends n.ValueConstraintsLiteralField{literals=[];constructor(){super()}}t.ValueConstraintsRadioField=i},4284(e,t,r){t.YamlFieldReaderRadio=void 0;const n=r(8748),i=r(3315),a=r(5675),s=r(2099),o=r(8618),l=r(6145);class c extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const c=o.RadioFieldImpl.buildEmpty();c.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(e,s.YamlKeys.default);const d=n.ReaderUtil.getNodeList(e,s.YamlKeys.values);return null!==d&&d.forEach(e=>{const t=n.ReaderUtil.getString(e,s.YamlKeys.label),r=n.ReaderUtil.getBoolean(e,s.YamlKeys.selected),a=Object.hasOwn(e,s.YamlKeys.selected);if(null!=t){const e=new i.RadioOption(t,r,a);c.valueConstraints.literals.push(e)}}),c}}t.YamlFieldReaderRadio=c},8136(e,t,r){t.YamlFieldWriterRadio=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.YamlKeys.default,t.valueConstraints.defaultValue),this.expandLiterals(t,e)}}t.YamlFieldWriterRadio=s},9315(e,t,r){t.JsonFieldReaderTemporal=void 0;const n=r(8748),i=r(936),a=r(8588),s=r(3764),o=r(7974),l=r(4385),c=r(964),d=r(6342);class u extends l.JsonTemplateFieldTypeSpecificReader{read(e,t,r,l){const u=c.TemporalFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const m=n.ReaderUtil.getNode(e,i.CedarModel.ui);null!=m&&(u.temporalGranularity=o.TemporalGranularity.forValue(n.ReaderUtil.getString(m,i.CedarModel.temporalGranularity)),u.inputTimeFormat=s.TimeFormat.forValue(n.ReaderUtil.getString(m,i.CedarModel.inputTimeFormat)),u.timezoneEnabled=n.ReaderUtil.getBoolean(m,i.CedarModel.timezoneEnabled));const p=n.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);if(null!=p){const e=n.ReaderUtil.getString(p,i.CedarModel.temporalType);null!==e&&(u.valueConstraints.temporalType=a.TemporalType.forValue(e)),u.valueConstraints.defaultValue=n.ReaderUtil.getString(p,i.CedarModel.defaultValue),d.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),i=r(3764),a=r(7974),s=r(2748),o=r(2733),l=r(6342);class c extends s.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUINode(e,t,r){super.expandUINode(e,t,r),t.temporalGranularity!==a.TemporalGranularity.NULL&&(e[n.CedarModel.temporalGranularity]=this.atomicWriter.write(t.temporalGranularity)),a.TemporalGranularity.hasTime(t.temporalGranularity)&&(t.inputTimeFormat!==i.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=c},6342(e,t,r){t.TemporalDefaultValueValidator=void 0;const n=r(5036);t.TemporalDefaultValueValidator=class{static assertValid(e,t,r){n.TemporalDefaultPolicy.assertValid(e.getValue(),t.getValue(),r)}}},345(e,t,r){t.TemporalFieldBuilderImpl=void 0;const n=r(3350),i=r(3764),a=r(7974),s=r(8588),o=r(964),l=r(6342),c=r(6830);class d extends n.TemplateFieldBuilder{timezoneEnabled=!1;inputTimeFormat=i.TimeFormat.NULL;temporalGranularity=a.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),c.FieldValuePolicy.assertConsistent({_ui:{inputType:"temporal",timezoneEnabled:this.timezoneEnabled,temporalGranularity:this.temporalGranularity.getValue()},_valueConstraints:{temporalType:this.temporalType.getValue(),defaultValue: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),i=r(4869),a=r(2763),s=r(3567),o=r(3764),l=r(7974),c=r(3608);class d extends n.TemplateField{valueConstraints;timezoneEnabled=!1;inputTimeFormat=o.TimeFormat.NULL;temporalGranularity=l.TemporalGranularity.NULL;constructor(){super(),this.cedarFieldType=i.CedarFieldType.TEMPORAL,this.valueConstraints=new s.ValueConstraintsTemporalField,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new d}createDeploymentBuilder(e){return new c.ChildDeploymentInfoBuilder(this,e)}}t.TemporalFieldImpl=d},3567(e,t,r){t.ValueConstraintsTemporalField=void 0;const n=r(4328),i=r(8588);class a extends n.ValueConstraints{temporalType=i.TemporalType.DATETIME;defaultValue=null;constructor(){super()}}t.ValueConstraintsTemporalField=a},384(e,t,r){t.YamlFieldReaderTemporal=void 0;const n=r(8748),i=r(8588),a=r(3764),s=r(7974),o=r(5675),l=r(2099),c=r(964),d=r(6342);class u extends o.YamlTemplateFieldTypeSpecificReader{read(e,t,r,o){const u=c.TemporalFieldImpl.buildEmpty();u.temporalGranularity=s.TemporalGranularity.forValue(n.ReaderUtil.getString(e,l.YamlKeys.granularity)),u.inputTimeFormat=a.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=i.TemporalType.forValue(m)),u.valueConstraints.defaultValue=n.ReaderUtil.getString(e,l.YamlKeys.default),d.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),i=r(7974),a=r(5430),s=r(2099),o=r(6342);class l extends a.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!==i.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!==i.TemporalGranularity.YEAR&&t.temporalGranularity!==i.TemporalGranularity.MONTH&&t.temporalGranularity!==i.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),i=r(5450),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.TextAreaImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(c,s.CedarModel.defaultValue),l.valueConstraints.minLength=a.ReaderUtil.getNumber(c,s.CedarModel.minLength),l.valueConstraints.maxLength=a.ReaderUtil.getNumber(c,s.CedarModel.maxLength)),l}}t.JsonFieldReaderTextArea=l},275(e,t,r){t.JsonFieldWriterTextArea=void 0;const n=r(2748),i=r(936),a=r(6145);class s extends n.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.CedarModel.defaultValue,t.valueConstraints.defaultValue),null!==t.valueConstraints.minLength&&(e[i.CedarModel.minLength]=t.valueConstraints.minLength),null!==t.valueConstraints.maxLength&&(e[i.CedarModel.maxLength]=t.valueConstraints.maxLength),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterTextArea=s},1259(e,t,r){t.TextAreaBuilderImpl=void 0;const n=r(6830),i=r(3350),a=r(5450);class s extends i.TemplateFieldBuilder{defaultValue=null;minLength=null;maxLength=null;constructor(){super()}static create(){return new s}withDefaultValue(e){return this.defaultValue=e,this}withMinLength(e){return this.minLength=e,this}withMaxLength(e){return this.maxLength=e,this}build(){n.FieldValuePolicy.assertConsistent({_ui:{inputType:"textarea"},_valueConstraints:{defaultValue:this.defaultValue,minLength:this.minLength,maxLength:this.maxLength}});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=s},5450(e,t,r){t.TextAreaImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(3608),o=r(5923);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.TEXTAREA,this.valueConstraints=new o.ValueConstraintsTextArea,this.cedarArtifactType=a.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 i extends n.ValueConstraintsLiteralField{minLength=null;maxLength=null;constructor(){super()}}t.ValueConstraintsTextArea=i},3168(e,t,r){t.YamlFieldReaderTextArea=void 0;const n=r(8748),i=r(5675),a=r(5450),s=r(2099),o=r(6145);class l extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const l=a.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),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.YamlKeys.default,t.valueConstraints.defaultValue),null!==t.valueConstraints.minLength&&(e[i.YamlKeys.minLength]=t.valueConstraints.minLength),null!==t.valueConstraints.maxLength&&(e[i.YamlKeys.maxLength]=t.valueConstraints.maxLength)}}t.YamlFieldWriterTextArea=s},9241(e,t,r){t.JsonFieldReaderTextField=void 0;const n=r(8748),i=r(936),a=r(4385),s=r(6591),o=r(6145);class l extends a.JsonTemplateFieldTypeSpecificReader{read(e,t,r,a){const l=s.TextFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=n.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(c,i.CedarModel.defaultValue),l.valueConstraints.minLength=n.ReaderUtil.getNumber(c,i.CedarModel.minLength),l.valueConstraints.maxLength=n.ReaderUtil.getNumber(c,i.CedarModel.maxLength),l.valueConstraints.regex=n.ReaderUtil.getString(c,i.CedarModel.regex)),l}}t.JsonFieldReaderTextField=l},7501(e,t,r){t.JsonFieldWriterTextField=void 0;const n=r(936),i=r(2748),a=r(6145);class s extends i.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),a.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(6830),i=r(3350),a=r(6591);class s extends i.TemplateFieldBuilder{defaultValue=null;minLength=null;maxLength=null;regex=null;constructor(){super()}static create(){return new s}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(){n.FieldValuePolicy.assertConsistent({_ui:{inputType:"textfield"},_valueConstraints:{defaultValue:this.defaultValue,minLength:this.minLength,maxLength:this.maxLength,regex:this.regex}});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=s},6591(e,t,r){t.TextFieldImpl=void 0;const n=r(9129),i=r(9711),a=r(4869),s=r(2763),o=r(3608);class l extends n.TemplateField{valueConstraints;valueRecommendationEnabled=!1;constructor(){super(),this.cedarFieldType=a.CedarFieldType.TEXT,this.valueConstraints=new i.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 i extends n.ValueConstraintsLiteralField{minLength=null;maxLength=null;regex=null;constructor(){super()}}t.ValueConstraintsTextField=i},1268(e,t,r){t.YamlFieldReaderTextField=void 0;const n=r(8748),i=r(5675),a=r(2099),s=r(6591),o=r(6145);class l extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const l=s.TextFieldImpl.buildEmpty();return l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(e,a.YamlKeys.default),l.valueConstraints.minLength=n.ReaderUtil.getNumber(e,a.YamlKeys.minLength),l.valueConstraints.maxLength=n.ReaderUtil.getNumber(e,a.YamlKeys.maxLength),l.valueConstraints.regex=n.ReaderUtil.getString(e,a.YamlKeys.regex),l}}t.YamlFieldReaderTextField=l},6116(e,t,r){t.YamlFieldWriterTextField=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.YamlKeys.default,t.valueConstraints.defaultValue),null!=t.valueConstraints.minLength&&(e[i.YamlKeys.minLength]=t.valueConstraints.minLength),null!=t.valueConstraints.maxLength&&(e[i.YamlKeys.maxLength]=t.valueConstraints.maxLength),null!=t.valueConstraints.regex&&(e[i.YamlKeys.regex]=t.valueConstraints.regex)}}t.YamlFieldWriterTextField=s},8053(e,t,r){t.JsonStaticFieldWriter=void 0;const n=r(7752),i=r(455),a=r(2748),s=r(2733),o=r(9251),l=r(936),c=r(5793),d=r(5747),u=r(3746),m=r(2475);class p extends a.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=i.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(c.JavascriptType.OBJECT),[d.TemplateProperty.title]:e.title,[d.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),[d.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),i=r(5430),a=r(455);class s extends i.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=a.ChildDeploymentInfo.empty(),r=!1,i=!0){return e.extensions.applyYaml({...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,r,i),...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),i=r(936),a=r(4385),s=r(5573);class o extends a.JsonTemplateFieldTypeSpecificReader{read(e,t,r,a){const o=s.StaticImageFieldImpl.buildEmpty(),l=n.ReaderUtil.getNode(e,i.CedarModel.ui);o.content=n.ReaderUtil.getString(l,i.CedarModel.content);const c=n.ReaderUtil.getNode(l,i.CedarModel.size);return o.width=n.ReaderUtil.getNumber(c,i.CedarModel.width),o.height=n.ReaderUtil.getNumber(c,i.CedarModel.height),o}}t.JsonFieldReaderImage=o},8970(e,t,r){t.JsonFieldWriterStaticImage=void 0;const n=r(9517),i=r(936),a=r(8053);class s extends a.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){if(null!==t.content&&(e[i.CedarModel.content]=t.content),null!==t.width||null!==t.height){const r=n.JsonNode.getEmpty();null!==t.width&&(r[i.CedarModel.width]=t.width),null!==t.height&&(r[i.CedarModel.height]=t.height),e[i.CedarModel.size]=r}}}t.JsonFieldWriterStaticImage=s},3138(e,t,r){t.StaticImageFieldBuilderImpl=void 0;const n=r(3350),i=r(5573);class a extends n.TemplateFieldBuilder{content=null;width=null;height=null;constructor(){super()}static create(){return new a}withContent(e){return this.content=e,this}withWidth(e){return this.width=e,this}withHeight(e){return this.height=e,this}build(){const e=i.StaticImageFieldImpl.buildEmpty();return super.buildInternal(e),e.content=this.content,e.width=this.width,e.height=this.height,e}}t.StaticImageFieldBuilderImpl=a},5573(e,t,r){t.StaticImageFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(8290);class o extends n.TemplateField{content=null;width=null;height=null;constructor(){super(),this.cedarFieldType=i.CedarFieldType.STATIC_IMAGE,this.cedarArtifactType=a.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),i=r(2099),a=r(5675),s=r(5573);class o extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const o=s.StaticImageFieldImpl.buildEmpty();return o.content=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.YamlFieldReaderImage=o},4935(e,t,r){t.YamlFieldWriterStaticImage=void 0;const n=r(9517),i=r(934),a=r(2099);class s extends i.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.content&&(t[a.YamlKeys.content]=e.content),t}expandSizeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.width&&(t[a.YamlKeys.width]=e.width),null!==e.height&&(t[a.YamlKeys.height]=e.height),t}}t.YamlFieldWriterStaticImage=s},5933(e,t,r){t.JsonFieldReaderPageBreak=void 0;const n=r(4385),i=r(9046),a=r(936),s=r(8748);class o extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.StaticPageBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(s.ReaderUtil.getNode(e,a.CedarModel.ui),a.CedarModel.content),o}}t.JsonFieldReaderPageBreak=o},2347(e,t,r){t.JsonFieldWriterStaticPageBreak=void 0;const n=r(8053),i=r(936);class a extends n.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){null!==t.content&&(e[i.CedarModel.content]=t.content)}}t.JsonFieldWriterStaticPageBreak=a},2703(e,t,r){t.StaticPageBreakFieldBuilderImpl=void 0;const n=r(3350),i=r(9046);class a extends n.TemplateFieldBuilder{constructor(){super()}static create(){return new a}build(){const e=i.StaticPageBreakFieldImpl.buildEmpty();return super.buildInternal(e),e}}t.StaticPageBreakFieldBuilderImpl=a},9046(e,t,r){t.StaticPageBreakFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(8290);class o extends n.TemplateField{content=null;constructor(){super(),this.cedarFieldType=i.CedarFieldType.STATIC_PAGE_BREAK,this.cedarArtifactType=a.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),i=r(9046),a=r(2099),s=r(8748);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.StaticPageBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(e,a.YamlKeys.content),o}}t.YamlFieldReaderPageBreak=o},7594(e,t,r){t.YamlFieldWriterStaticPageBreak=void 0;const n=r(934),i=r(2099),a=r(9517);class s extends n.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return null!==e.content?{[i.YamlKeys.content]:e.content}:a.JsonNode.getEmpty()}}t.YamlFieldWriterStaticPageBreak=s},6291(e,t,r){t.JsonFieldReaderRichText=void 0;const n=r(8748),i=r(936),a=r(4385),s=r(5548);class o extends a.JsonTemplateFieldTypeSpecificReader{read(e,t,r,a){const o=s.StaticRichTextFieldImpl.buildEmpty(),l=n.ReaderUtil.getNode(e,i.CedarModel.ui);return o.content=n.ReaderUtil.getString(l,i.CedarModel.content),o}}t.JsonFieldReaderRichText=o},6029(e,t,r){t.JsonFieldWriterStaticRichText=void 0;const n=r(936),i=r(8053);class a extends i.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){null!==t.content&&(e[n.CedarModel.content]=t.content)}}t.JsonFieldWriterStaticRichText=a},9521(e,t,r){t.StaticRichTextFieldBuilderImpl=void 0;const n=r(3350),i=r(5548);class a extends n.TemplateFieldBuilder{content=null;constructor(){super()}static create(){return new a}withContent(e){return this.content=e,this}build(){const e=i.StaticRichTextFieldImpl.buildEmpty();return super.buildInternal(e),e.content=this.content,e}}t.StaticRichTextFieldBuilderImpl=a},5548(e,t,r){t.StaticRichTextFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(8290);class o extends n.TemplateField{content=null;constructor(){super(),this.cedarFieldType=i.CedarFieldType.STATIC_RICH_TEXT,this.cedarArtifactType=a.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),i=r(5675),a=r(2099),s=r(5548);class o extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticRichTextFieldImpl.buildEmpty();return o.content=n.ReaderUtil.getString(e,a.YamlKeys.content),o}}t.YamlFieldReaderRichText=o},6314(e,t,r){t.YamlFieldWriterStaticRichText=void 0;const n=r(9517),i=r(934),a=r(2099);class s extends i.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return null!==e.content?{[a.YamlKeys.content]:e.content}:n.JsonNode.getEmpty()}}t.YamlFieldWriterStaticRichText=s},6511(e,t,r){t.JsonFieldReaderSectionBreak=void 0;const n=r(4385),i=r(2546),a=r(936),s=r(8748);class o extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.StaticSectionBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(s.ReaderUtil.getNode(e,a.CedarModel.ui),a.CedarModel.content),o}}t.JsonFieldReaderSectionBreak=o},41(e,t,r){t.JsonFieldWriterStaticSectionsBreak=void 0;const n=r(8053),i=r(936);class a extends n.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){null!==t.content&&(e[i.CedarModel.content]=t.content)}}t.JsonFieldWriterStaticSectionsBreak=a},5795(e,t,r){t.StaticSectionBreakFieldBuilderImpl=void 0;const n=r(3350),i=r(2546);class a extends n.TemplateFieldBuilder{constructor(){super()}static create(){return new a}build(){const e=i.StaticSectionBreakFieldImpl.buildEmpty();return super.buildInternal(e),e}}t.StaticSectionBreakFieldBuilderImpl=a},2546(e,t,r){t.StaticSectionBreakFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(8290);class o extends n.TemplateField{content=null;constructor(){super(),this.cedarFieldType=i.CedarFieldType.STATIC_SECTION_BREAK,this.cedarArtifactType=a.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),i=r(2546),a=r(2099),s=r(8748);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.StaticSectionBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(e,a.YamlKeys.content),o}}t.YamlFieldReaderSectionBreak=o},6082(e,t,r){t.YAMLFieldWriterStaticSectionsBreak=void 0;const n=r(934),i=r(2099),a=r(9517);class s extends n.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return null!==e.content?{[i.YamlKeys.content]:e.content}:a.JsonNode.getEmpty()}}t.YAMLFieldWriterStaticSectionsBreak=s},8596(e,t,r){t.JsonFieldReaderYoutube=void 0;const n=r(8748),i=r(936),a=r(4385),s=r(477);class o extends a.JsonTemplateFieldTypeSpecificReader{read(e,t,r,a){const o=s.StaticYoutubeFieldImpl.buildEmpty(),l=n.ReaderUtil.getNode(e,i.CedarModel.ui);o.videoId=n.ReaderUtil.getString(l,i.CedarModel.content);const c=n.ReaderUtil.getNode(l,i.CedarModel.size);return o.width=n.ReaderUtil.getNumber(c,i.CedarModel.width),o.height=n.ReaderUtil.getNumber(c,i.CedarModel.height),o}}t.JsonFieldReaderYoutube=o},6766(e,t,r){t.JsonFieldWriterStaticYoutube=void 0;const n=r(9517),i=r(936),a=r(8053);class s extends a.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){if(null!==t.videoId&&(e[i.CedarModel.content]=t.videoId),null!==t.width||null!==t.height){const r=n.JsonNode.getEmpty();null!==t.width&&(r[i.CedarModel.width]=t.width),null!==t.height&&(r[i.CedarModel.height]=t.height),e[i.CedarModel.size]=r}}}t.JsonFieldWriterStaticYoutube=s},7674(e,t,r){t.StaticYoutubeFieldBuilderImpl=void 0;const n=r(3350),i=r(477);class a extends n.TemplateFieldBuilder{videoId=null;width=null;height=null;constructor(){super()}static create(){return new a}withVideoId(e){return this.videoId=e,this}withWidth(e){return this.width=e,this}withHeight(e){return this.height=e,this}build(){const e=i.StaticYoutubeFieldImpl.buildEmpty();return super.buildInternal(e),e.videoId=this.videoId,e.width=this.width,e.height=this.height,e}}t.StaticYoutubeFieldBuilderImpl=a},477(e,t,r){t.StaticYoutubeFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(8290);class o extends n.TemplateField{videoId=null;width=null;height=null;constructor(){super(),this.cedarFieldType=i.CedarFieldType.STATIC_YOUTUBE,this.cedarArtifactType=a.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),i=r(5675),a=r(2099),s=r(477);class o extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticYoutubeFieldImpl.buildEmpty();return o.videoId=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.YamlFieldReaderYoutube=o},1903(e,t,r){t.YamlFieldWriterStaticYoutube=void 0;const n=r(9517),i=r(934),a=r(2099);class s extends i.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.videoId&&(t[a.YamlKeys.content]=e.videoId),t}expandSizeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.width&&(t[a.YamlKeys.width]=e.width),null!==e.height&&(t[a.YamlKeys.height]=e.height),t}}t.YamlFieldWriterStaticYoutube=s},4033(e,t,r){t.AttributeValueNamePolicy=void 0;const n=r(3992),i=r(5588),a=r(9327),s=r(3644),o=r(7723);class l{constructor(){}static isReserved(e){return i.ReservedNames.isReservedName(e)}static findConflicts(e,t="template",r=!1){const n=[];return l.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=l.findConflicts(e)[0];if(void 0===t)return;const r=l.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,s){for(const t of Object.keys(e.values))i.ReservedNames.requireChildName(t);const o=l.attributeValueGroups(e),c=new Set(o.map(e=>e.name)),d=new Set(o.filter(e=>e.unpacked).flatMap(e=>e.attributeNames)),u=new Set(Object.keys(e.values).filter(e=>!c.has(e)&&!d.has(e))),m=new Map;for(const e of o){i.ReservedNames.isReservedAttributeValueFieldName(e.name,a)&&r.push({kind:"reservedField",name:e.name,groupName:e.name,path:t});const o=new Set;for(const i of e.attributeNames){if(n.TextPolicy.isBlank(i)){s&&r.push({kind:"blank",name:i,groupName:e.name,path:t});continue}l.isReserved(i)&&r.push({kind:"reserved",name:i,groupName:e.name,path:t}),(u.has(i)||c.has(i))&&r.push({kind:"sibling",name:i,groupName:e.name,path:t}),o.has(i)?r.push({kind:"duplicate",name:i,groupName:e.name,path:t,conflictingGroupName:e.name}):o.add(i);const a=m.get(i);void 0!==a&&a!==e.name?r.push({kind:"duplicate",name:i,groupName:e.name,path:t,conflictingGroupName:a}):m.set(i,e.name)}}for(const[n,i]of Object.entries(e.values))c.has(n)||d.has(n)||l.scanValue(i,[...t,n],r,s)}static scanValue(e,t,r,n){e instanceof o.InstanceDataContainer?l.scanContainer(e,t,r,"element",n):Array.isArray(e)&&e.forEach((e,i)=>l.scanValue(e,[...t,i],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 s.InstanceDataAttributeValueFieldName).map(e=>e.name);e.length>0&&t.push({name:r,attributeNames:e,unpacked:!0})}return t}}t.AttributeValueNamePolicy=l},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 i{language=null;preferredLabel=null;notation=null;_id;_type;_label;constructor(e,t,r,i=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?i:r??null,this._label=t}static fromParsedNode(e,t,r=null){return new i(e,t,n.PARSED_NODE,r)}get type(){return this._type}get id(){return this._id}get label(){return this._label}}t.InstanceDataControlledAtom=i},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,i=null){n!==t.PARSED_NODE&&r(e,"InstanceDataLinkAtom"),this._id=e,this._type=n===t.PARSED_NODE?i: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),i=r(4869),a=r(1211),s=r(3567),o=r(5222),l=r(4877),c=r(7723),d=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 a.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"):[i.CedarFieldType.CONTROLLED_TERM,i.CedarFieldType.LINK,i.CedarFieldType.EXT_ROR,i.CedarFieldType.EXT_ORCID,i.CedarFieldType.EXT_PFAS,i.CedarFieldType.EXT_PUBMED,i.CedarFieldType.EXT_RRID,i.CedarFieldType.EXT_NIH_GRANT_ID,i.CedarFieldType.EXT_DOI].includes(e.cedarFieldType)?new d.InstanceDataEmptyNode:new o.InstanceDataStringAtom(null)}static startingOccurrences(e,t){if(e instanceof n.TemplateField&&e.cedarFieldType===i.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 c.InstanceDataContainer:e instanceof n.TemplateField?f.emptyField(e):new d.InstanceDataEmptyNode)}static inflateContainer(e,t,r){const i=t.getChildrenInfo(),a=i.getChildIriMap();Object.keys(a).forEach(t=>e.setIri(t,a[t]));const s={};i.getChildrenNames().forEach(i=>{const a=t.getChild(i);let o=e.values[i];if(void 0===o){if(t.getChildInfo(i)?.atType===u.CedarArtifactType.STATIC_TEMPLATE_FIELD)return;const e=t.getChildInfo(i);o=e?.isMultiInAnyWay()?"empty"===r?[]:f.startingOccurrences(a,e):a instanceof m.TemplateElement?new c.InstanceDataContainer:a instanceof n.TemplateField?f.emptyField(a):new d.InstanceDataEmptyNode}a instanceof m.TemplateElement&&(o instanceof c.InstanceDataContainer?f.inflateContainer(o,a,r):Array.isArray(o)&&o.forEach(e=>{e instanceof c.InstanceDataContainer&&f.inflateContainer(e,a,r)})),s[i]=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),i=r(7548),a=r(4465),s=r(5222),o=r(4877),l=r(3812),c=r(7661),d=r(4036),u=r(2888),m=r(9760),p=r(3188),h=r(9034),f=r(9327),y=r(3644),T=r(4033),g=r(2763),E=r(9129),C=r(6320),I=r(6830),A=r(7092),b=r(3939),R="InstanceValidator";class v{constructor(){}static validate(e,t){const r=new d.JsonArtifactParsingResult;return v.validateContainer(e.dataContainer,t,new p.JsonPath,r),r}static validateReport(e,t){return this.validate(e,t).getValidationReport()}static validateContainer(e,t,r,n){const i=t.getChildrenInfo(),a=new Set(v.attributeValueGroups(e).filter(([e])=>i.get(e)?.uiInputType===h.UiInputType.ATTRIBUTE_VALUE).flatMap(([,e])=>e));for(const t of Object.keys(e.values))null!==i.get(t)||a.has(t)||n.addValidationFinding(A.ValidationPolicy.finding("valueShape",r.add(t).toPointer(),"The template does not declare this property."));const s=t.cedarArtifactType===g.CedarArtifactType.TEMPLATE?"template":"element";for(const t of T.AttributeValueNamePolicy.findConflicts(e,s).filter(e=>0===e.path.length))n.addBlueprintComparisonError(new u.ComparisonError(R,m.ComparisonErrorType.VALUE_MISMATCH,r.add(...T.AttributeValueNamePolicy.locationOf(t)),"a unique, non-reserved attribute-value name",t.name));for(const[t,a]of v.attributeValueGroups(e))for(const e of a){const a=i.get(e);null!==a&&a.atType!==g.CedarArtifactType.STATIC_TEMPLATE_FIELD&&n.addBlueprintComparisonError(new u.ComparisonError(R,m.ComparisonErrorType.VALUE_MISMATCH,r.add(t,e),"a name different from every serializable template child",e))}for(const t of i.getChildrenNamesForRequiredInProperties())Object.hasOwn(e.values,t)||n.addBlueprintComparisonError(new u.ComparisonError(R,m.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,r.add(t),t));for(const a of i.getChildrenNames()){const s=i.get(a);if(s?.uiInputType===h.UiInputType.ATTRIBUTE_VALUE)continue;const o=e.values[a];void 0!==o&&v.validateChild(a,o,s,t.getChild(a),r.add(a),n)}}static attributeValueGroups(e){const t=[];for(const[r,n]of Object.entries(e.values))if(n instanceof f.InstanceDataAttributeValueField)t.push([r,Object.keys(n.values)]);else if(Array.isArray(n)){const e=n.filter(e=>e instanceof y.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,i,a){const s=r?.isMultiInAnyWay()??!1,o=Array.isArray(t)?t:null,l=null!==o;if(s===l)return null!==o?(v.validateCardinality(o,r,i,a),void o.forEach((e,t)=>v.validateItem(e,n,i.add(t),a))):void v.validateItem(t,n,i,a);a.addBlueprintComparisonError(new u.ComparisonError(R,m.ComparisonErrorType.VALUE_MISMATCH,i,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 l.AbstractDynamicChildDeploymentInfo))return;const{minItems:i,maxItems:a}=t;null!==i&&e.length<i&&n.addValidationFinding(A.ValidationPolicy.finding("minItems",r.toPointer(),`Fewer than ${i} entries.`)),null!==a&&e.length>a&&n.addValidationFinding(A.ValidationPolicy.finding("maxItems",r.toPointer(),`More than ${a} entries.`))}static validateItem(e,t,r,a){if(t instanceof c.TemplateElement)e instanceof n.InstanceDataContainer?v.validateContainer(e,t,r,a):v.isEmpty(e)?v.validateContainer(new n.InstanceDataContainer,t,r,a):a.addBlueprintComparisonError(new u.ComparisonError(R,m.ComparisonErrorType.VALUE_MISMATCH,r,"an element","a field value"));else if(t instanceof E.TemplateField){const n=(0,b.validationFieldSchema)(t),s=r.toPointer();for(const e of I.FieldValuePolicy.validateConfiguration(n,s))a.addValidationFinding(e);if(e instanceof i.InstanceDataEmptyAtom&&e.hasDiscardedContent())return void a.addValidationFinding(A.ValidationPolicy.finding("valueShape",s,"The supplied node contains an unrecognized value shape."));const o=C.JsonTemplateInstanceWriter.writeValueNode(e);for(const e of I.FieldValuePolicy.validateNode(n,o,s)){let t;if(("valueType"===e.code||"missingProperty"===e.code&&e.path.endsWith("/@type"))&&o){const e=n._valueConstraints?.numberType??n._valueConstraints?.temporalType;t=new u.ComparisonError("ValidationPolicy",Object.hasOwn(o,"@type")?m.ComparisonErrorType.VALUE_MISMATCH:m.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,r.add("@type"),e,"string"==typeof o["@type"]?o["@type"]:void 0)}else"iriMalformed"===e.code&&o&&null===o["@id"]&&(t=new u.ComparisonError("ValidationPolicy",m.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,r.add("@id"),"an IRI",null));a.addValidationFinding(e,"instance",t)}o&&"object"==typeof o&&"string"==typeof o["@id"]&&(I.FieldValuePolicy.isControlled(n)||I.FieldValuePolicy.authorityTypes.has(n._ui?.inputType??""))&&a.addValidationFinding(A.ValidationPolicy.finding("semanticNotChecked",s+"/@id","Identifier membership or existence has not been verified.","notChecked"))}}static isEmpty(e){return e instanceof i.InstanceDataEmptyAtom||e instanceof a.InstanceDataEmptyNode||(e instanceof s.InstanceDataStringAtom||e instanceof o.InstanceDataTypedAtom)&&null===e.value}}t.InstanceValidator=v},2272(e,t,r){t.TemplateInstance=void 0;const n=r(2763),i=r(5697),a=r(7723);class s extends i.AbstractInstanceArtifact{dataContainer;descriptionWasAbsent=!1;constructor(){super(),this.cedarArtifactType=n.CedarArtifactType.TEMPLATE_INSTANCE,this.dataContainer=new a.InstanceDataContainer}static buildEmptyWithNullValues(){return new s}}t.TemplateInstance=s},4925(e,t,r){t.TemplateInstanceBuilder=void 0;const n=r(1641),i=r(2272),a=r(7723),s=r(8534);class o extends n.AbstractArtifactBuilder{schema_isBasedOn=s.CedarArtifactId.NULL;dataContainer=new a.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=i.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),i=r(8557),a=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=i.SchemaVersion.CURRENT,e.bibo_status=n.BiboStatus.DRAFT,e.pav_version=a.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),i=r(1641);class a extends i.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=a},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),i=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 a{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[a.TEXT,a.TEXTAREA,a.CONTROLLED_TERM,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.RADIO,a.CHECKBOX,a.SINGLE_SELECT_LIST,a.MULTIPLE_SELECT_LIST,a.ATTRIBUTE_VALUE,a.STATIC_PAGE_BREAK,a.STATIC_SECTION_BREAK,a.STATIC_IMAGE,a.STATIC_RICH_TEXT,a.STATIC_YOUTUBE]}static TEXT=new a(t.K.TEXTFIELD,n.UiInputType.TEXTFIELD,i.YamlArtifactType.TEXTFIELD,!1);static TEXTAREA=new a(t.K.TEXTAREA,n.UiInputType.TEXTAREA,i.YamlArtifactType.TEXTAREA,!1);static CONTROLLED_TERM=new a(t.K.CONTROLLED_TERM,n.UiInputType.TEXTFIELD,i.YamlArtifactType.CONTROLLED_TERM,!1);static LINK=new a(t.K.LINK,n.UiInputType.LINK,i.YamlArtifactType.LINK,!1);static EXT_ROR=new a(t.K.EXT_ROR,n.UiInputType.EXT_ROR,i.YamlArtifactType.EXT_ROR,!1);static EXT_ORCID=new a(t.K.EXT_ORCID,n.UiInputType.EXT_ORCID,i.YamlArtifactType.EXT_ORCID,!1);static EXT_PFAS=new a(t.K.EXT_PFAS,n.UiInputType.EXT_PFAS,i.YamlArtifactType.EXT_PFAS,!1);static EXT_PUBMED=new a(t.K.EXT_PUBMED,n.UiInputType.EXT_PUBMED,i.YamlArtifactType.EXT_PUBMED,!1);static EXT_RRID=new a(t.K.EXT_RRID,n.UiInputType.EXT_RRID,i.YamlArtifactType.EXT_RRID,!1);static EXT_NIH_GRANT_ID=new a(t.K.EXT_NIH_GRANT_ID,n.UiInputType.EXT_NIH_GRANT_ID,i.YamlArtifactType.EXT_NIH_GRANT_ID,!1);static EXT_DOI=new a(t.K.EXT_DOI,n.UiInputType.EXT_DOI,i.YamlArtifactType.EXT_DOI,!1);static TEMPORAL=new a(t.K.TEMPORAL,n.UiInputType.TEMPORAL,i.YamlArtifactType.TEMPORAL,!1);static EMAIL=new a(t.K.EMAIL,n.UiInputType.EMAIL,i.YamlArtifactType.EMAIL,!1);static NUMERIC=new a(t.K.NUMERIC,n.UiInputType.NUMERIC,i.YamlArtifactType.NUMERIC,!1);static PHONE_NUMBER=new a(t.K.PHONE_NUMBER,n.UiInputType.PHONE_NUMBER,i.YamlArtifactType.PHONE_NUMBER,!1);static RADIO=new a(t.K.RADIO,n.UiInputType.RADIO,i.YamlArtifactType.RADIO,!1);static CHECKBOX=new a(t.K.CHECKBOX,n.UiInputType.CHECKBOX,i.YamlArtifactType.CHECKBOX,!1);static SINGLE_SELECT_LIST=new a(t.K.SINGLE_SELECT_LIST,n.UiInputType.LIST,i.YamlArtifactType.SINGLE_SELECT_LIST,!1);static MULTIPLE_SELECT_LIST=new a(t.K.MULTIPLE_SELECT_LIST,n.UiInputType.LIST,i.YamlArtifactType.MULTI_SELECT_LIST,!1);static ATTRIBUTE_VALUE=new a(t.K.ATTRIBUTE_VALUE,n.UiInputType.ATTRIBUTE_VALUE,i.YamlArtifactType.ATTRIBUTE_VALUE,!1);static STATIC_PAGE_BREAK=new a(t.K.STATIC_PAGE_BREAK,n.UiInputType.PAGE_BREAK,i.YamlArtifactType.PAGE_BREAK,!0);static STATIC_SECTION_BREAK=new a(t.K.STATIC_SECTION_BREAK,n.UiInputType.SECTION_BREAK,i.YamlArtifactType.SECTION_BREAK,!0);static STATIC_IMAGE=new a(t.K.STATIC_IMAGE,n.UiInputType.IMAGE,i.YamlArtifactType.IMAGE,!0);static STATIC_RICH_TEXT=new a(t.K.STATIC_RICH_TEXT,n.UiInputType.RICH_TEXT,i.YamlArtifactType.RICH_TEXT,!0);static STATIC_YOUTUBE=new a(t.K.STATIC_YOUTUBE,n.UiInputType.YOUTUBE,i.YamlArtifactType.YOUTUBE,!0);static NULL=new a(null,n.UiInputType.NULL,i.YamlArtifactType.NULL,!0);static forUiInputType(e){for(const t of a.values())if(t.getUiInputType()===e)return t;return this.NULL}static forYamlArtifactType(e){for(const t of a.values())if(t.getYamlType()===e)return t;return this.NULL}}t.CedarFieldType=a},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,r){t.IsoDate=void 0;const n=r(5435);class i{value;constructor(e){this.value=e}static NULL=new i(null);getValue(){return this.value}static forValue(e){return null===e||""===e?i.NULL:new i(n.TimestampPolicy.canonical(e))}static now(){const e=new Date,t=new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString().slice(0,-1);return i.forValue(t+this.getCurrentGMTOffset())}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=i},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 i extends n.SemVer{static DEFAULT=new i(t.o.DEFAULT);static NULL=new i(null);static values(){return[i.DEFAULT,i.NULL]}static forValue(e){for(const t of i.values())if(t.getValue()===e)return t;return new i(e)}}t.PavVersion=i},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 i extends n.SemVer{static CURRENT=new i(t.y.CURRENT);static NULL=new i(null);static values(){return[i.CURRENT]}static forValue(e){for(const t of i.values())if(t.getValue()===e)return t;return new i(e)}}t.SchemaVersion=i},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 i{value;category;constructor(e,t){this.value=e,this.category=t}getValue(){return this.value}static TEMPLATE=new i(t.YamlArtifactTypeValues.TEMPLATE,n.CedarFieldCategory.NONE);static ELEMENT=new i(t.YamlArtifactTypeValues.ELEMENT,n.CedarFieldCategory.NONE);static TEXTFIELD=new i(t.YamlArtifactTypeValues.TEXTFIELD,n.CedarFieldCategory.DYNAMIC);static CONTROLLED_TERM=new i(t.YamlArtifactTypeValues.CONTROLLED_TERM,n.CedarFieldCategory.DYNAMIC);static TEXTAREA=new i(t.YamlArtifactTypeValues.TEXTAREA,n.CedarFieldCategory.DYNAMIC);static LINK=new i(t.YamlArtifactTypeValues.LINK,n.CedarFieldCategory.DYNAMIC);static EXT_ROR=new i(t.YamlArtifactTypeValues.EXT_ROR,n.CedarFieldCategory.DYNAMIC);static EXT_ORCID=new i(t.YamlArtifactTypeValues.EXT_ORCID,n.CedarFieldCategory.DYNAMIC);static EXT_PFAS=new i(t.YamlArtifactTypeValues.EXT_PFAS,n.CedarFieldCategory.DYNAMIC);static EXT_PUBMED=new i(t.YamlArtifactTypeValues.EXT_PUBMED,n.CedarFieldCategory.DYNAMIC);static EXT_RRID=new i(t.YamlArtifactTypeValues.EXT_RRID,n.CedarFieldCategory.DYNAMIC);static EXT_NIH_GRANT_ID=new i(t.YamlArtifactTypeValues.EXT_NIH_GRANT_ID,n.CedarFieldCategory.DYNAMIC);static EXT_DOI=new i(t.YamlArtifactTypeValues.EXT_DOI,n.CedarFieldCategory.DYNAMIC);static TEMPORAL=new i(t.YamlArtifactTypeValues.TEMPORAL,n.CedarFieldCategory.DYNAMIC);static EMAIL=new i(t.YamlArtifactTypeValues.EMAIL,n.CedarFieldCategory.DYNAMIC);static NUMERIC=new i(t.YamlArtifactTypeValues.NUMERIC,n.CedarFieldCategory.DYNAMIC);static PHONE_NUMBER=new i(t.YamlArtifactTypeValues.PHONE_NUMBER,n.CedarFieldCategory.DYNAMIC);static SINGLE_SELECT_LIST=new i(t.YamlArtifactTypeValues.SINGLE_SELECT_LIST,n.CedarFieldCategory.DYNAMIC);static MULTI_SELECT_LIST=new i(t.YamlArtifactTypeValues.MULTI_SELECT_LIST,n.CedarFieldCategory.DYNAMIC);static CHECKBOX=new i(t.YamlArtifactTypeValues.CHECKBOX,n.CedarFieldCategory.DYNAMIC);static RADIO=new i(t.YamlArtifactTypeValues.RADIO,n.CedarFieldCategory.DYNAMIC);static ATTRIBUTE_VALUE=new i(t.YamlArtifactTypeValues.ATTRIBUTE_VALUE,n.CedarFieldCategory.DYNAMIC);static PAGE_BREAK=new i(t.YamlArtifactTypeValues.PAGE_BREAK,n.CedarFieldCategory.STATIC);static SECTION_BREAK=new i(t.YamlArtifactTypeValues.SECTION_BREAK,n.CedarFieldCategory.STATIC);static IMAGE=new i(t.YamlArtifactTypeValues.IMAGE,n.CedarFieldCategory.STATIC);static RICH_TEXT=new i(t.YamlArtifactTypeValues.RICH_TEXT,n.CedarFieldCategory.STATIC);static YOUTUBE=new i(t.YamlArtifactTypeValues.YOUTUBE,n.CedarFieldCategory.STATIC);static TEMPLATE_INSTANCE=new i(t.YamlArtifactTypeValues.TEMPLATE_INSTANCE,n.CedarFieldCategory.NONE);static NULL=new i(null,n.CedarFieldCategory.NULL);static values(){return[i.TEMPLATE,i.ELEMENT,i.TEXTFIELD,i.CONTROLLED_TERM,i.TEXTAREA,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.SINGLE_SELECT_LIST,i.MULTI_SELECT_LIST,i.CHECKBOX,i.RADIO,i.ATTRIBUTE_VALUE,i.PAGE_BREAK,i.SECTION_BREAK,i.IMAGE,i.RICH_TEXT,i.YOUTUBE,i.TEMPLATE_INSTANCE,i.NULL]}static forValue(e){for(const t of i.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=i},4563(e,t,r){t.JavaStrings=void 0;const n=r(3992);t.JavaStrings=class{static isBlank(e){return n.TextPolicy.isBlank(e)}static isWhitespace(e){return n.TextPolicy.isBlankCodePoint(e.codePointAt(0))}}},2888(e,t){t.ComparisonError=void 0,t.ComparisonError=class{errorLocation;errorType;errorPath;expectedValue;encounteredValue;stackTopLines;constructor(e,t,r,n,i){this.errorLocation=e,this.errorType=t,this.errorPath=r,this.expectedValue=n,this.encounteredValue=i}}},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,r){t.JsonArtifactParsingResult=void 0;const n=r(2888),i=r(9760),a=r(3188),s=r(7092);t.JsonArtifactParsingResult=class{blueprintComparisonErrors=[];blueprintComparisonWarnings=[];validationFindings=[];getValidationFindings(){return[...this.validationFindings]}addValidationFinding(e,t="instance",r){if(this.validationFindings.some(t=>t.code===e.code&&t.path===e.path))return;if(this.validationFindings.push(e),"passed"===e.verificationStatus)return;const o=r??new n.ComparisonError("ValidationPolicy",i.ComparisonErrorType.VALUE_MISMATCH,a.JsonPath.fromPointer(e.path),e.message);s.ValidationPolicy.blocksSave(e,t)?this.addBlueprintComparisonError(o):this.addBlueprintComparisonWarning(o)}getValidationReport(e="instance"){const t=[...this.validationFindings];for(const e of this.blueprintComparisonErrors){if("ValidationPolicy"===e.errorLocation)continue;const r=e.errorType===i.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT?"missingProperty":"valueShape";t.push(s.ValidationPolicy.finding(r,e.errorPath.toPointer(),`Invalid structure: ${e.errorType}.`))}return s.ValidationPolicy.summarize(t,e)}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),this.validationFindings.push(...e.validationFindings)}}},3056(e,t,r){t.JsonObjectComparator=void 0;const n=r(2108),i=r(2888),a=r(3188),s=r(9760),o=r(5747),l=r(2733),c=r(936);function d(e){return null!==e&&"object"==typeof e&&!n.ExactDecimal.isExact(e)}function u(e,t){return"number"!=typeof e&&!n.ExactDecimal.isExact(e)||"number"!=typeof t&&!n.ExactDecimal.isExact(t)?e===t:0===n.NumericPolicy.compare(e,t)}class m{static compareBothWays(e,t,r,n,o,p=[]){!function t(r,n,h){const f=r.getLastComponent()==l.JsonSchema.required;if(Array.isArray(n)&&Array.isArray(h))if(f){const t=new Set(n),a=new Set(h);n.forEach((t,n)=>{const o=r.add(n);a.has(t)||e.addBlueprintComparisonError(new i.ComparisonError("oca01",s.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,o,t))}),h.forEach((n,a)=>{const o=r.add(a);t.has(n)||e.addBlueprintComparisonError(new i.ComparisonError("oca02",s.ComparisonErrorType.UNEXPECTED_VALUE_IN_REAL_OBJECT,o,void 0,n))})}else{const a=Math.max(n.length,h.length);for(let o=0;o<a;o++){const a=r.add(o);o in n?o in h?d(n[o])&&d(h[o])?t(a,n[o],h[o]):u(n[o],h[o])||e.addBlueprintComparisonError(new i.ComparisonError("ocl03",s.ComparisonErrorType.VALUE_MISMATCH,a,n[o],h[o])):e.addBlueprintComparisonError(new i.ComparisonError("ocl02",s.ComparisonErrorType.MISSING_INDEX_IN_REAL_OBJECT,a,n[o])):e.addBlueprintComparisonError(new i.ComparisonError("ocl01",s.ComparisonErrorType.UNEXPECTED_INDEX_IN_REAL_OBJECT,a,void 0,h[o]))}}else new Set([...Object.keys(n),...Object.keys(h)]).forEach(f=>{const y=r.add(f);if(f in n)if(f in h){if(d(n[f])&&d(h[f]))t(y,n[f],h[f]);else if(!u(n[f],h[f])){const t=new i.ComparisonError("oco03",s.ComparisonErrorType.VALUE_MISMATCH,y,n[f],h[f]);o.useWarningForKnownIssues()&&m.isKnownProductionVariation(y)?e.addBlueprintComparisonWarning(t):e.addBlueprintComparisonError(t)}}else o.useWarningForKnownIssues()&&(y.endsIn(c.CedarModel.literals,a.JsonPath.ANY,c.CedarModel.selectedByDefault)||y.endsIn(c.CedarModel.ui,c.CedarModel.pages)||m.isKnownProductionVariation(y))?e.addBlueprintComparisonWarning(new i.ComparisonError("wco02",s.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,y)):e.addBlueprintComparisonError(new i.ComparisonError("oco02",s.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,y));else o.useWarningForKnownIssues()&&(y.endsIn(l.JsonSchema.properties,l.JsonSchema.atLanguage)||m.isKnownProductionVariation(y))?e.addBlueprintComparisonWarning(new i.ComparisonError("wco01",s.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,y)):p.includes(f)||e.addBlueprintComparisonError(new i.ComparisonError("oco01",s.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,y))})}(n,t,r)}static isKnownProductionVariation(e){return e.endsIn(l.JsonSchema.atContext,o.TemplateProperty.additionalProperties)||e.endsIn(l.JsonSchema.atContext,l.JsonSchema.properties,a.JsonPath.ANY,c.CedarModel.enum,a.JsonPath.ANY)||e.endsIn(l.JsonSchema.atContext,l.JsonSchema.required,a.JsonPath.ANY)||e.endsIn(l.JsonSchema.atContext,a.JsonPath.ANY)||e.endsIn(c.CedarModel.ui,c.CedarModel.propertyDescriptions,a.JsonPath.ANY)||e.endsIn(c.CedarModel.ui,c.CedarModel.propertyDescriptions)||e.endsIn(c.CedarModel.ui,c.CedarModel.propertyLabels)||e.endsIn(l.JsonSchema.properties,a.JsonPath.ANY,c.CedarModel.enum,a.JsonPath.ANY)||e.endsIn(l.JsonSchema.required)}static reportToLeft(e,t,r){t.useWarningForKnownIssues()&&m.isKnownProductionVariation(r.errorPath)?e.addBlueprintComparisonWarning(r):e.addBlueprintComparisonError(r)}static compareToLeft(e,t,r,n,a){!function t(r,n,o){const c=r.getLastComponent()==l.JsonSchema.required;if(Array.isArray(n)&&Array.isArray(o))if(c){const t=new Set(o);n.forEach((n,o)=>{const l=r.add(o);t.has(n)||m.reportToLeft(e,a,new i.ComparisonError("ola01",s.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,l,n))})}else n.forEach((l,c)=>{const p=r.add(c);c in o?d(l)&&d(o[c])?t(p,l,o[c]):u(l,o[c])||m.reportToLeft(e,a,new i.ComparisonError("oll02",s.ComparisonErrorType.VALUE_MISMATCH,p,l,o[c])):m.reportToLeft(e,a,new i.ComparisonError("oll01",s.ComparisonErrorType.MISSING_INDEX_IN_REAL_OBJECT,p,n[c]))});else Object.keys(n).forEach(l=>{const c=r.add(l);l in o?d(n[l])&&d(o[l])?t(c,n[l],o[l]):u(n[l],o[l])||m.reportToLeft(e,a,new i.ComparisonError("olo02",s.ComparisonErrorType.VALUE_MISMATCH,c,n[l],o[l])):m.reportToLeft(e,a,new i.ComparisonError("olo01",s.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,c))})}(n,t,r)}static comparePrimitive(e,t,r,n){return u(t,r)||e.addBlueprintComparisonError(new i.ComparisonError("opp1",s.ComparisonErrorType.VALUE_MISMATCH,n,t,r)),e}}t.JsonObjectComparator=m},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),i=r(3188),a=r(6109),s=r(4325);t.YamlObjectComparator=class{static compare(e,t){const r=new s.ComparisonResult;return this.compareBothWays(r,e,t,new i.JsonPath),r}static compareBothWays(e,t,r,i){!function t(r,i,s){if(Array.isArray(i)&&Array.isArray(s)){const o=Math.max(i.length,s.length);for(let l=0;l<o;l++){const o=r.add(l);l in i?l in s?"object"==typeof i[l]&&null!==i[l]&&"object"==typeof s[l]&&null!==s[l]?t(o,i[l],s[l]):i[l]!==s[l]&&e.addComparisonError(new n.ComparisonError("ocl03",a.YamlComparisonErrorType.VALUE_MISMATCH,o,i[l],s[l])):e.addComparisonError(new n.ComparisonError("ocl02",a.YamlComparisonErrorType.MISSING_INDEX_IN_RIGHT_OBJECT,o,i[l])):e.addComparisonError(new n.ComparisonError("ocl01",a.YamlComparisonErrorType.UNEXPECTED_INDEX_IN_RIGHT_OBJECT,o,void 0,s[l]))}}else new Set([...Object.keys(i),...Object.keys(s)]).forEach(o=>{const l=r.add(o);o in i?o in s?"object"==typeof i[o]&&null!==i[o]&&"object"==typeof s[o]&&null!==s[o]?t(l,i[o],s[o]):i[o]!==s[o]&&e.addComparisonError(new n.ComparisonError("oco03",a.YamlComparisonErrorType.VALUE_MISMATCH,l,i[o],s[o])):e.addComparisonError(new n.ComparisonError("oco02",a.YamlComparisonErrorType.MISSING_KEY_IN_RIGHT_OBJECT,l)):e.addComparisonError(new n.ComparisonError("oco01",a.YamlComparisonErrorType.UNEXPECTED_KEY_IN_RIGHT_OBJECT,l))})}(i,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+"/"}toPointer(){return this.path.map(e=>"/"+String(e).replace(/~/g,"~0").replace(/\//g,"~1")).join("")}static fromPointer(e){return new r(...""===e?[]:e.slice(1).split("/").map(e=>e.replace(/~1/g,"/").replace(/~0/g,"~")))}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 i{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=i},6551(e,t,r){t.JsonTemplateContent=void 0;const n=r(8748);class i{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:i.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(i.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=i},1501(e,t,r){t.JsonTemplateElementContent=void 0;const n=r(8748);class i{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(i.LEGACY_ID_TYPING)&&(e["@id"]=n.ReaderUtil.deepClone(i.LEGACY_ID_TYPING))}static REQUIRED_PARTIAL_KEY_MAP;static PROPERTIES_PARTIAL_KEY_MAP=new Map;static CONTEXT_VERBATIM_NO_BIBO;static{Object.keys(i.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=i},9932(e,t,r){t.JsonTemplateFieldContentDynamic=void 0;const n=r(8748),i=r(2733),a=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,i.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,a.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 i{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=i},350(e,t,r){t.JsonTemplateInstanceContent=void 0;const n=r(8748);class i{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=i},3939(e,t,r){t.validationFieldSchema=function(e,t=!1){const r=e.valueConstraints,s=Object.assign(Object.create(Object.getPrototypeOf(e)),e);s.valueConstraints=Object.assign(Object.create(Object.getPrototypeOf(e.valueConstraints)),e.valueConstraints,{defaultValue:null,minValue:null,maxValue:null});const o=n.CedarJsonWriters.getStrict().getFieldWriterForField(s).getAsJsonNode(s);for(const e of["minValue","maxValue"])null!=r[e]&&((o._valueConstraints??={})[e]=r[e]);if(t&&null!=r.defaultValue){const e=r.defaultValue;(o._valueConstraints??={}).defaultValue=e instanceof i.ControlledTermDefaultValue?{termUri:e.termUri.getValue(),"rdfs:label":e.rdfsLabel}:e instanceof a.Iri?e.getValue():e}return o};const n=r(9607),i=r(7295),a=r(8802)},3068(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DisplayText=void 0;class r{static segmenter=new Intl.Segmenter("und",{granularity:"grapheme"});static take(e,t,r=!1){const n=Math.max(0,Math.trunc(t));if(!n)return"";const i=Array.from(this.segmenter.segment(e),({segment:e})=>e);return(r?i.slice(-n):i.slice(0,n)).join("")}static searchKey(e){return Array.from(this.segmenter.segment(e),({segment:e})=>e.normalize("NFC").toLowerCase()).join("")}static splitMatch(e,t){const r=this.searchKey(t);if(!r)return[e,"",""];let n="";const i=[];for(const{segment:t,index:r}of this.segmenter.segment(e)){const e=t.normalize("NFC").toLowerCase();n+=e;for(let n=0;n<e.length;n++)i.push({start:r,end:r+t.length})}const a=n.indexOf(r);if(a<0)return[e,"",""];const s=i[a].start,o=i[a+r.length-1].end;return[e.slice(0,s),e.slice(s,o),e.slice(o)]}static elide(e,t=96,r=28){const n=Array.from(this.segmenter.segment(e),({segment:e})=>e),i=Math.max(1,Math.trunc(t));if(n.length<=i)return e;const a=Math.max(0,Math.min(Math.trunc(r),i-1));return`${n.slice(0,i-a-1).join("").trimEnd()}…${a?n.slice(-a).join("").trimStart():""}`}}t.DisplayText=r},6830(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.FieldValuePolicy=void 0;const n=r(5036),i=r(2500),a=r(2108),s=r(1991),o=r(3992),l=r(7092);class c{static authorityTypes=new Set(["ext-orcid","ext-ror","ext-pfas","ext-pubmed","ext-rrid","ext-nih-grant-id","ext-doi"]);static integerRanges={"xsd:byte":["-128","127"],"xsd:short":["-32768","32767"],"xsd:int":["-2147483648","2147483647"],"xsd:long":["-9223372036854775808","9223372036854775807"]};static isControlled(e){const t=e._valueConstraints??{};return["controlled","controlled-term"].includes(e._ui?.inputType??"")||Object.hasOwn(e.properties??{},"@id")&&["ontologies","branches","classes","valueSets"].some(e=>Object.hasOwn(t,e))}static isIri(e){const t=e._ui?.inputType??"";return"link"===t||this.authorityTypes.has(t)||this.isControlled(e)||Object.hasOwn(e.properties??{},"@id")}static validateConfiguration(e,t=""){const r=e._valueConstraints??{},n=[],i=(e,r)=>n.push(l.ValidationPolicy.finding("templateConstraint",l.ValidationPolicy.child(t+"/_valueConstraints",e),r));for(const e of["minLength","maxLength","decimalPlace"])Object.hasOwn(r,e)&&(!Number.isInteger(r[e])||r[e]<0||r[e]>2147483647)&&i(e,`${e} must be a nonnegative integer.`);null!=r.minLength&&null!=r.maxLength&&r.minLength>r.maxLength&&i("maxLength","Minimum length exceeds maximum length.");const s=new Set;for(const e of["minValue","maxValue"])if(Object.hasOwn(r,e))try{if("number"!=typeof r[e]&&!a.ExactDecimal.isExact(r[e]))throw new Error;a.NumericPolicy.value(r[e]),s.add(e)}catch{i(e,"Numeric bounds must be finite decimal values.")}if(2===s.size&&a.NumericPolicy.compare(r.minValue,r.maxValue)>0&&i("maxValue","Minimum value exceeds maximum value."),"numeric"===e._ui?.inputType){const e=r.numberType,t=Object.hasOwn(this.integerRanges,e);t||["xsd:float","xsd:double","xsd:decimal"].includes(e)||i("numberType","A numeric field requires a recognized datatype.");const n=Number.isInteger(r.decimalPlace)&&r.decimalPlace>=0&&r.decimalPlace<=2147483647;t&&n&&0!==r.decimalPlace&&i("decimalPlace","Integer datatypes cannot declare fractional decimal places.");for(const o of s)(t||["xsd:float","xsd:double","xsd:decimal"].includes(e))&&(this.numeric({numberType:e},r[o],"","template").some(e=>"numberType"===e.code)?i(o,"The bound is outside its numeric datatype."):n&&a.NumericPolicy.fractionalDigits(r[o])>r.decimalPlace&&i(o,"The bound exceeds the declared decimal precision."))}return Object.hasOwn(r,"regex")&&("string"!=typeof r.regex?i("regex","A pattern must be a string."):""!==r.regex&&n.push(...this.regex(r.regex,null,t+"/_valueConstraints/regex"))),n}static validate(e,t,r="",a="instance"){if(null==t||""===t)return[];const s=e._valueConstraints??{},c=e._ui?.inputType,d=[],u=(e,t)=>d.push(l.ValidationPolicy.finding(e,r,t));if("string"!=typeof t&&("template"!==a||"numeric"!==c))return u("valueShape","A populated field value must be a string."),d;const m=String(t);if(null!=s.minLength&&o.TextPolicy.codePointLength(m)<s.minLength&&u("minLength",`Shorter than the minimum ${s.minLength}.`),null!=s.maxLength&&o.TextPolicy.codePointLength(m)>s.maxLength&&u("maxLength",`Longer than the maximum ${s.maxLength}.`),"string"==typeof s.regex&&""!==s.regex&&d.push(...this.regex(s.regex,m,r)),"email"!==c||/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(m)||u("email","Not a valid email address."),"phone-number"!==c||/^[+0-9 \t\-()]+$/.test(m)||u("phoneNumber","Not a valid phone number."),this.isIri(e)&&(i.IdentifierPolicy.isValidAuthoringIri(m,!0)||u("iriMalformed","Not a valid absolute IRI.")),"numeric"===c&&d.push(...this.numeric(s,t,r,a)),"temporal"===c)if("template"===a){try{n.TemporalDefaultPolicy.assertValid(s.temporalType??null,e._ui?.temporalGranularity??null,m)}catch(e){u("temporalType",e instanceof Error?e.message:"Invalid temporal default.")}/(Z|[+-]\d{2}:\d{2})$/.test(m)&&!0!==e._ui?.timezoneEnabled&&u("timezone","Carries a timezone offset but none is enabled.")}else d.push(...this.temporal(e,m,r));return Array.isArray(s.literals)&&s.literals.length&&!s.literals.some(e=>e?.label===m)&&u("choiceMembership","Not one of the declared options."),d}static validateNode(e,t,r=""){const n=[],i=(e,t,i)=>n.push(l.ValidationPolicy.finding(e,null===t?r:l.ValidationPolicy.child(r,t),i)),a=e._valueConstraints??{};if(!t||"object"!=typeof t||Array.isArray(t))return i("valueShape",null,"A field slot must be an object."),n;const s=t;for(const e of["rdfs:label","skos:prefLabel","skos:notation","@language"])Object.hasOwn(s,e)&&null!==s[e]&&"string"!=typeof s[e]&&i("valueShape",e,`${e} must be a string or null.`);if(Object.hasOwn(s,"@id")&&("string"!=typeof s["@id"]||""===s["@id"]))return i("iriMalformed","@id","A populated IRI must be a nonempty string."),n;const o=(e.required??[]).filter(e=>!Object.hasOwn(s,e));for(const e of o)i("missingProperty",e,`The field slot must contain ${e}.`);if(o.length)return n;if(0===Object.keys(s).length)return this.isIri(e)?(!0===a.requiredValue&&i("required",null,"A value is required."),n):(i("missingProperty","@value","A literal field slot must contain @value."),n);if(this.isIri(e))return Object.hasOwn(s,"@id")?"string"!=typeof s["@id"]||""===s["@id"]?(i("iriMalformed","@id","A populated IRI must be a nonempty string."),n):(Object.hasOwn(s,"@value")&&null!==s["@value"]&&i("valueShape","@value","An IRI field cannot contain a literal value."),n.push(...this.validate(e,s["@id"],r+"/@id")),n):null===s["@value"]?(!0===a.requiredValue&&i("required",null,"A value is required."),n):(i("controlledStructure","@id","An IRI field requires @id."),n);if(Object.hasOwn(s,"@id"))return i("valueShape","@id","A literal field cannot contain an IRI value."),n;if(!Object.hasOwn(s,"@value"))return i("valueShape","@value","A literal field requires @value."),n;const c=s["@value"];if(null===c||""===c)return!0===a.requiredValue&&i("required","@value","A value is required."),n;const d="numeric"===e._ui?.inputType?a.numberType:"temporal"===e._ui?.inputType?a.temporalType:null,u=e=>"string"==typeof e?e.replace("http://www.w3.org/2001/XMLSchema#","xsd:"):e;return null!=d&&u(s["@type"])!==u(d)&&i("valueType","@type",`The value must declare ${d}.`),n.push(...this.validate(e,c,r+"/@value")),n}static validateDefault(e,t=""){const r=(e._valueConstraints??{}).defaultValue;if(null==r)return[];const n=t+"/_valueConstraints/defaultValue";return this.isControlled(e)?r&&"object"==typeof r&&"string"==typeof r.termUri&&""!==r.termUri&&"string"==typeof r["rdfs:label"]&&""!==r["rdfs:label"]?this.validate(e,r.termUri,n+"/termUri","template"):[l.ValidationPolicy.finding("controlledStructure",n,"A controlled default requires termUri and rdfs:label.")]:this.validate(e,r,n,"template")}static assertConsistent(e){const t={...e,_valueConstraints:Object.fromEntries(Object.entries(e._valueConstraints??{}).filter(([,e])=>null!=e))},r=[...this.validateConfiguration(t),...this.validateDefault(t)].find(e=>l.ValidationPolicy.blocksSave(e.code,"template"));if(r)throw new Error(`${r.message} (${r.path})`)}static regex(e,t,r){const n=s.RegexChecks.inspect(e,t);return"valid"===n||"match"===n||"invalid"===n&&null!==t?[]:"mismatch"===n?[l.ValidationPolicy.finding("regex",r,"Does not match the field pattern.")]:"invalid"===n?[l.ValidationPolicy.finding("templateConstraint",r,"The field pattern is invalid.")]:[l.ValidationPolicy.finding("pending"===n?"regexPending":"regexEvaluation",r,"pending"===n?"Pattern validation is pending.":`Pattern validation could not finish (${n}).`,"pending"===n?"notChecked":"unavailable")]}static numeric(e,t,r,n){const i=[],s=(e,t)=>i.push(l.ValidationPolicy.finding(e,r,t)),o=e.numberType??"xsd:decimal",c=this.integerRanges[o],d=String(t);if("instance"===n&&(c?!/^[+-]?(?:0|[1-9][0-9]*)$/.test(d):!/^[+-]?(?:(?:0|[1-9][0-9]*)(?:\.[0-9]*)?|\.[0-9]+)$/.test(d)))return s("numberType",`Not a valid ${o}.`),i;try{if(!c&&!["xsd:float","xsd:double","xsd:decimal"].includes(o))throw new Error("Unknown numeric datatype.");if(a.NumericPolicy.value(t),c&&(!a.NumericPolicy.isInteger(t)||a.NumericPolicy.compare(t,c[0])<0||a.NumericPolicy.compare(t,c[1])>0))return s("numberType",`Outside the range of ${o}.`),i;if("template"===n&&("xsd:float"===o||"xsd:double"===o)){const e=d.replace(/^-/,""),t="xsd:float"===o?"3.4028234663852886e38":"1.7976931348623157e308",r="xsd:float"===o?"1.401298464324817e-45":"4.9e-324";if(a.NumericPolicy.compare(e,t)>0||0!==a.NumericPolicy.compare(e,0)&&a.NumericPolicy.compare(e,r)<0)return s("numberType",`Outside the range of ${o}.`),i}const r="instance"===n?d.split(".")[1]?.length??0:a.NumericPolicy.fractionalDigits(t);null!=e.decimalPlace&&r>e.decimalPlace&&s("decimalPlace",`More than ${e.decimalPlace} decimal places.`),("number"==typeof e.minValue||a.ExactDecimal.isExact(e.minValue))&&a.NumericPolicy.compare(t,e.minValue)<0&&s("minValue",`Below the minimum ${e.minValue}.`),("number"==typeof e.maxValue||a.ExactDecimal.isExact(e.maxValue))&&a.NumericPolicy.compare(t,e.maxValue)>0&&s("maxValue",`Above the maximum ${e.maxValue}.`)}catch{s("numberType","Not a finite decimal value.")}return i}static temporal(e,t,r){const n=[],i=(e,t)=>n.push(l.ValidationPolicy.finding(e,r,t)),a=e._valueConstraints?.temporalType,s=e._ui?.temporalGranularity,o=t.match(/(Z|[+-]\d{2}:\d{2})$/)?.[0],c=o?t.slice(0,-o.length):t;if(o){if("Z"!==o){const e=Number(o.slice(1,3)),t=Number(o.slice(4));(e>14||t>59||14===e&&0!==t)&&i("timezoneOffset","Not a valid xsd timezone offset.")}!0!==e._ui?.timezoneEnabled&&i("timezone","Carries a timezone offset but none is enabled.")}const d=/^(\d{4})-(\d{2})-(\d{2})$/,u=/^(\d{2}):(\d{2})(?::(\d{2}))?(\.\d+)?$/,m=c.split("T"),p="xsd:time"===a?null:m[0],h="xsd:time"===a?c:2===m.length?m[1]:null;if(!("xsd:date"===a?1===m.length&&d.test(c):"xsd:time"===a?u.test(c):"xsd:dateTime"===a&&2===m.length&&d.test(m[0])&&u.test(m[1])))return i("temporalType",`Not a valid ${a}.`),n;const f=p?.match(d),y=h?.match(u);if(f){const e=Number(f[1]),t=Number(f[2]),r=Number(f[3]);(t<1||t>12||r<1||r>[31,e%4!=0||e%100==0&&e%400!=0?28:29,31,30,31,30,31,31,30,31,30,31][t-1])&&i("temporalCalendar","Not a real calendar date.")}if(y&&(Number(y[1])>23||Number(y[2])>59||Number(y[3]??0)>59)&&i("temporalCalendar","Not a real time of day."),s){let e=f&&("year"===s&&("01"!==f[2]||"01"!==f[3])||"month"===s&&"01"!==f[3]);if(y){const t="00"===y[1]&&"00"===y[2]&&(null==y[3]||"00"===y[3])&&null==y[4];e||=["year","month","day"].includes(s)&&!("xsd:dateTime"===a&&t),e||=("second"===s||"decimalSecond"===s)&&null==y[3],e||="decimalSecond"===s&&null==y[4],e||="hour"===s&&("00"!==y[2]||null!=y[3]&&"00"!==y[3]||null!=y[4]),e||="minute"===s&&(null!=y[3]&&"00"!==y[3]||null!=y[4]),e||="second"===s&&null!=y[4]}e&&i("temporalGranularity",`Does not match ${s} granularity.`)}return n}}t.FieldValuePolicy=c},2500(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.IdentifierPolicy=void 0,t.IdentifierPolicy=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 i of e){const e=i.codePointAt(0);if("#"===i?(n=!0,r=!1):"?"!==i||n||(r=!0),e<128){if(e<=32||127===e||'<>"{}|\\^`'.includes(i))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 i=/^[A-Za-z][A-Za-z0-9+.-]*:/.exec(e)?.[0]??"",a=e.slice(i.length).split("#",1)[0];if(i&&!a||"//"===a)throw new Error(`Invalid URI/IRI at "${t}": missing scheme-specific part or authority.`);const s=Array.from(e,e=>e.codePointAt(0)>=128?encodeURIComponent(e):e).join("");this.assertIdentifierCharacters(s,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 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 isValid(e){if("string"!=typeof e)return!1;try{return this.assertIdentifier(e,"value"),!0}catch{return!1}}static isValidFieldValue(e){if("string"!=typeof e)return!1;try{return this.assertFieldIri(e,"value"),!0}catch{return!1}}static isValidAuthoringIri(e,t=!1){if(!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e))return!1;if(!(t?this.isValidFieldValue(e):this.isValid(e)))return!1;if(!/^https?:/i.test(e))return!0;if(!/^https?:\/\//i.test(e))return!1;try{return new URL(e).hostname.length>0}catch{return!1}}}},5904(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.JsonSourcePolicy=void 0;const n=r(2108),i=r(7120);class a{static sourceNumber(e){const t=n.NumericPolicy.value(e);return"number"==typeof t&&0!==n.NumericPolicy.compare(e,(0,i.javaPlainDecimal)(t))?n.ExactDecimal.forValue(e):t}static parse(e){let t=0;const r=()=>{for(;/[ \t\n\r]/.test(e[t]??"\0");)t++},i=()=>{throw new SyntaxError(`Invalid JSON at position ${t}`)};function s(){const r=t++;for(;;){if(t>=e.length)return i();const n=e[t++];if('"'===n)return JSON.parse(e.slice(r,t));if("\\"===n)t++;else if(n.charCodeAt(0)<32)return i()}}const o=function n(o){if(o>1e3)throw new RangeError("JSON nesting limit exceeded");r();const l=e[t];if('"'===l)return s();if("{"===l||"["===l){t++;const a={},c=[],d="{"===l?"}":"]";if(r(),e[t]!==d)for(;;){if(r(),"{"===l){if('"'!==e[t])return i();const l=s();if(Object.hasOwn(a,l))throw new SyntaxError("Duplicate JSON mapping key");if(r(),":"!==e[t++])return i();Object.defineProperty(a,l,{value:n(o+1),enumerable:!0,writable:!0,configurable:!0})}else c.push(n(o+1));if(r(),e[t]===d)break;if(","!==e[t++])return i()}return t++,"{"===l?a:c}for(const[r,n]of[["true",!0],["false",!1],["null",null]])if(e.startsWith(r,t))return t+=r.length,n;const c=/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?/.exec(e.slice(t));if(!c)return i();if(c[0].length>1e3)throw new RangeError("JSON number length limit exceeded");return t+=c[0].length,a.sourceNumber(c[0])}(0);if(r(),t!==e.length&&i(),null===o||"object"!=typeof o||Array.isArray(o)||o instanceof n.ExactDecimal)throw new SyntaxError("Expected a JSON object");return o}static clone(e){const t=new Set;return function e(r){if(n.ExactDecimal.isExact(r))return n.ExactDecimal.forValue(String(r));if(null==r||"string"==typeof r||"boolean"==typeof r)return r;if("number"==typeof r&&Number.isFinite(r))return r;if("object"!=typeof r||t.has(r))throw new TypeError("Expected acyclic JSON data");t.add(r);try{if(Array.isArray(r))return r.map(e);if(Object.getPrototypeOf(r)!==Object.prototype&&null!==Object.getPrototypeOf(r))throw new TypeError("Expected a JSON object");return Object.fromEntries(Object.entries(r).map(([t,r])=>[t,e(r)]))}finally{t.delete(r)}}(e)}static stringify(e,t=0){const r=" ".repeat(Math.max(0,Math.min(10,t))),a=new Set,s=function e(t,s){if(n.ExactDecimal.isExact(t))return t.toString();if("number"==typeof t)return(0,i.javaPlainDecimal)(t);if("string"==typeof t||"boolean"==typeof t||null===t)return JSON.stringify(t);if(void 0!==t){if("object"!=typeof t)throw new TypeError("Expected a JSON value");if(s>1e3||a.has(t))throw new TypeError("Cyclic JSON value or nesting limit exceeded");a.add(t);try{const n=Array.isArray(t),i=[];if(n)for(const r of t)i.push(e(r,s+1)??"null");else for(const n of Object.keys(t)){const a=e(t[n],s+1);void 0!==a&&i.push(JSON.stringify(n)+(r?": ":":")+a)}const[a,o]=n?["[","]"]:["{","}"];return i.length?r?a+"\n"+r.repeat(s+1)+i.join(",\n"+r.repeat(s+1))+"\n"+r.repeat(s)+o:a+i.join(",")+o:a+o}finally{a.delete(t)}}}(e,0);if(void 0===s)throw new TypeError("Expected a JSON value");return s}}t.JsonSourcePolicy=a},2108(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.NumericPolicy=t.ExactDecimal=void 0;class r{text;cedarExactDecimal=!0;static isExact(e){return null!==e&&"object"==typeof e&&!0===e.cedarExactDecimal&&"function"==typeof e.toJSON}constructor(e){this.text=e,Object.freeze(this)}static forValue(e){return new r(n.canonical(e))}toString(){return this.text}valueOf(){throw new Error("Use NumericPolicy.compare for exact decimals; implicit numeric coercion would lose precision.")}toJSON(){const e=JSON.rawJSON;if(!e)throw new Error("Use JsonSourcePolicy.stringify to serialize exact decimal numbers.");return e(this.text)}}t.ExactDecimal=r;class n{static parts(e){const t="string"==typeof e?e:String(e),r=/^([+-]?)(?:(\d+)(?:\.(\d*))?|\.(\d+))(?:[eE]([+-]?\d+))?$/.exec(t);if(!r)throw new Error("Expected a finite decimal number without surrounding whitespace.");const n=r[3]??r[4]??"",i=BigInt(r[5]??"0");let a=i-BigInt(n.length);if(i<-2147483647n||i>2147483647n||a<-2147483647n||a>2147483648n)throw new Error("Decimal exponent or scale is outside the shared numeric range.");let s=((r[2]??"")+n).replace(/^0+/,"");if(!s)return{sign:0,digits:"0",exponent:0n};const o=/0+$/.exec(s)?.[0].length??0;return o&&(s=s.slice(0,-o),a+=BigInt(o)),{sign:"-"===r[1]?-1:1,digits:s,exponent:a}}static canonical(e){const{sign:t,digits:r,exponent:n}=this.parts(e);if(!t)return"0";const i=t<0?"-":"",a=n+BigInt(r.length-1);if(n>=0n&&a<1000n)return i+r+"0".repeat(Number(n));if(n<0n&&a>=-1000n){const e=r.length+Number(n);return i+(e>0?r.slice(0,e)+"."+r.slice(e):"0."+"0".repeat(-e)+r)}if(a>2147483647n){const e=n-2147483647n;return i+r+(e>0n?"0".repeat(Number(e)):"")+"E+"+(e>0n?2147483647n:n)}return i+r[0]+(r.length>1?"."+r.slice(1):"")+"E"+(a>=0n?"+":"")+a}static compare(e,t){const r=this.parts(e),n=this.parts(t);if(r.sign!==n.sign)return r.sign<n.sign?-1:1;if(!r.sign)return 0;const i=BigInt(r.digits.length)+r.exponent,a=BigInt(n.digits.length)+n.exponent;let s;if(i!==a)s=i<a?-1:1;else{const e=Math.max(r.digits.length,n.digits.length),t=r.digits.padEnd(e,"0"),i=n.digits.padEnd(e,"0");s=t===i?0:t<i?-1:1}return 0===s?0:s*r.sign}static isInteger(e){return this.parts(e).exponent>=0n}static fractionalDigits(e){return Math.max(0,-Number(this.parts(e).exponent))}static value(e){if(r.isExact(e))return e;if(this.parts(e),"number"==typeof e)return e;const t=Number(e);return!Number.isFinite(t)||Number.isInteger(t)&&!Number.isSafeInteger(t)||0!==this.compare(e,t)?r.forValue(e):t}}t.NumericPolicy=n},1991(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.RegexChecks=void 0;const n=r(128);class i{changed;policy;entries=new Map;used=null;size=0;disposed=!1;capacityLimited=!1;static active=null;constructor(e=()=>{},t=new n.RegexPolicy){this.changed=e,this.policy=t}run(e){if(this.used)return e();const t=i.active;i.active=this,this.used=new Set,this.capacityLimited=!1;try{return e()}finally{const e=this.used;this.used=null,i.active=t;let r=!1;for(const[t,n]of this.entries)e.has(t)||(r=!0,this.entries.delete(t),this.size-=t.length,n.controller.abort());r&&this.capacityLimited&&queueMicrotask(()=>{this.disposed||this.changed()})}}static inspect(e,t=null){return this.active?.check(e,t)??"pending"}check(e,t){if(this.disposed)return"cancelled";if(e.length>1e4||(t?.length??0)>1e6)return"limit";const r=JSON.stringify([e,t]);this.used.add(r);const n=this.entries.get(r);if(n)return n.result;if(this.entries.size>=1024||this.size+r.length>4e6)return this.capacityLimited=!0,"limit";const i=new AbortController,a={result:"pending",controller:i,done:Promise.resolve()};return this.entries.set(r,a),this.size+=r.length,a.done=this.policy.evaluate(e,t,i.signal).then(e=>{this.disposed||this.entries.get(r)!==a||(a.result=e,this.pending||this.changed())}),"pending"}get pending(){return[...this.entries.values()].some(e=>"pending"===e.result)}async settled(){await Promise.all([...this.entries.values()].map(e=>e.done))}static async validate(e,t){const r=new i(void 0,t);try{let t=r.run(e);for(;r.pending;)await r.settled(),t=r.run(e);return t}finally{r.dispose()}}dispose(){this.disposed=!0;for(const e of this.entries.values())e.controller.abort();this.entries.clear(),this.size=0,this.policy.dispose()}}t.RegexChecks=i},128(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.RegexPolicy=t.REGEX_WORKER_SOURCE=void 0,t.REGEX_WORKER_SOURCE="\n onmessage = ({data}) => {\n let result;\n try {\n const expression = new RegExp('^(?:' + data.pattern + ')$');\n result = data.value === null ? 'valid' : expression.test(data.value) ? 'match' : 'mismatch';\n } catch (_) { result = 'invalid'; }\n postMessage({id: data.id, result});\n };\n postMessage({ready: true});\n",t.RegexPolicy=class{worker=null;ready=!1;releaseSource=null;current=null;queue=[];serial=0;timer;idleTimer;closed=!1;options;constructor(e={}){this.options={workerFactory:e.workerFactory??(()=>{const e=globalThis,r=e.URL.createObjectURL(new e.Blob([t.REGEX_WORKER_SOURCE],{type:"text/javascript"}));return this.releaseSource=()=>e.URL.revokeObjectURL(r),new e.Worker(r)}),workTimeoutMs:e.workTimeoutMs??250,startupTimeoutMs:e.startupTimeoutMs??5e3,queueLimit:e.queueLimit??1024};for(const e of[this.options.workTimeoutMs,this.options.startupTimeoutMs,this.options.queueLimit])if(!Number.isSafeInteger(e)||e<1)throw new RangeError("Regex limits must be positive integers")}evaluate(e,t=null,r){return this.closed||r?.aborted?Promise.resolve("cancelled"):e.length>1e4||(t?.length??0)>1e6||this.queue.length>=this.options.queueLimit?Promise.resolve("limit"):new Promise(n=>{const i={id:++this.serial,pattern:e,value:t,finish:e=>{r?.removeEventListener("abort",a),n(e)}},a=()=>{this.current===i?this.fail("cancelled"):(this.queue=this.queue.filter(e=>e!==i),i.finish("cancelled"))};r?.addEventListener("abort",a,{once:!0}),this.queue.push(i),this.next()})}stopWorker(){clearTimeout(this.timer),clearTimeout(this.idleTimer),this.worker&&(this.worker.onmessage=null,this.worker.onerror=null,this.worker.terminate()),this.worker=null,this.ready=!1,this.releaseSource?.(),this.releaseSource=null}fail(e){this.stopWorker();const t=this.current;this.current=null,t?.finish(e),queueMicrotask(()=>this.next())}next(){if(!this.closed&&!this.current&&0!==this.queue.length)if(clearTimeout(this.idleTimer),this.current=this.queue.shift(),this.worker&&this.ready)this.send();else try{const e=this.options.workerFactory();this.worker=e,this.timer=setTimeout(()=>this.fail("unavailable"),this.options.startupTimeoutMs),e.onerror=()=>{this.worker===e&&this.fail("unavailable")},e.onmessage=({data:t})=>{if(this.worker!==e||!t||"object"!=typeof t)return;const r=t;if(r.ready&&!this.ready)clearTimeout(this.timer),this.ready=!0,this.send();else if(r.id===this.current?.id&&["valid","match","mismatch","invalid"].includes(r.result??"")){clearTimeout(this.timer);const e=this.current;this.current=null,e.finish(r.result),this.idleTimer=setTimeout(()=>this.stopWorker(),1e3),this.next()}}}catch{this.fail("unavailable")}}send(){if(this.current&&this.worker){this.timer=setTimeout(()=>this.fail("timeout"),this.options.workTimeoutMs);try{this.worker.postMessage({id:this.current.id,pattern:this.current.pattern,value:this.current.value})}catch{this.fail("unavailable")}}}dispose(){this.closed=!0,this.stopWorker(),this.current?.finish("cancelled"),this.current=null,this.queue.splice(0).forEach(e=>e.finish("cancelled"))}}},5036(e,t){t.TemporalDefaultPolicy=void 0,t.TemporalDefaultPolicy=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;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} granularity.`);const i=this.datePattern(t,"xsd:date"===n),a=this.timePattern(t);let s;if(s="xsd:date"===n?i:"xsd:time"===n?a:this.dateTimePattern(t),!s.test(r)||!this.hasValidCalendarDate(r))throw new Error(`Temporal default "${r}" is not valid for ${n}`+(null===t?".":` at ${t} granularity.`))}static isCompatibleGranularity(e,t){return null===t||("xsd:date"===e?["year","month","day"].includes(t):"xsd:time"===e?["hour","minute","second","decimalSecond"].includes(t):["day","hour","minute","second","decimalSecond"].includes(t))}static datePattern(e,t){return"year"===e?/^\d{4}$/:"month"===e?/^\d{4}-(?:0[1-9]|1[0-2])$/:"day"!==e&&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,n=this.minute,i=this.second;return"hour"===e?new RegExp(`^${r}${t}$`):"minute"===e?new RegExp(`^${r}:${n}${t}$`):"second"===e?new RegExp(`^${r}:${n}:${i}${t}$`):"decimalSecond"===e?new RegExp(`^${r}:${n}:${i}\\.\\d+${t}$`):new RegExp(`^${r}(?::${n}(?::${i}(?:\\.\\d+)?)?)?${t}$`)}static dateTimePattern(e){const t="\\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\\d|3[01])";return"hour"===e||"minute"===e||"second"===e||"decimalSecond"===e?new RegExp(`^${t}T${this.timePatternSource(e)}$`):"year"===e||"month"===e?/a^/:"day"===e?new RegExp(`^${t}$`):new RegExp(`^${t}(?:T${this.timePatternSource(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]}}},3992(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TextPolicy=void 0,t.TextPolicy=class{constructor(){}static isBlank(e){for(const t of e)if(!this.isBlankCodePoint(t.codePointAt(0)))return!1;return!0}static isBlankCodePoint(e){return e>=9&&e<=13||e>=28&&e<=32||5760===e||e>=8192&&e<=8198||e>=8200&&e<=8202||8232===e||8233===e||8287===e||12288===e}static codePointLength(e){return Array.from(e).length}static trimInputPadding(e){return e.replace(/^[\t\n\r ]+|[\t\n\r ]+$/g,"")}}},5435(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TimestampPolicy=void 0,t.TimestampPolicy=class{static canonical(e){const t=e.replace(/([+-][0-9]{2})([0-9]{2})$/,"$1:$2"),r=/^(\d{4}|-\d{4,9}|\+\d{5,9})-(\d{2})-(\d{2})[Tt](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?([Zz]|[+-]\d{2}(?::\d{2}(?::\d{2})?)?)$/.exec(t);if(!r)throw new Error("Expected an ISO timestamp with an explicit offset.");const[,n,i,a,s,o,l="00",c="",d]=r,u=Number(n),m=Number(i),p=Number(a),h=[31,u%4!=0||u%100==0&&u%400!=0?28:29,31,30,31,30,31,31,30,31,30,31];if(0===u&&n.startsWith("-")||m<1||m>12||p<1||p>h[m-1]||Number(s)>23||Number(o)>59||Number(l)>59)throw new Error("Invalid timestamp calendar or clock value.");let f="Z";if("Z"!==d.toUpperCase()){const[e,t=0,r=0]=d.slice(1).split(":").map(Number);if(e>18||t>59||r>59||18===e&&(0!==t||0!==r))throw new Error("Timestamp offset is outside the ISO offset range.");(e||t||r)&&(f=`${d[0]}${String(e).padStart(2,"0")}:${String(t).padStart(2,"0")}`,r&&(f+=`:${String(r).padStart(2,"0")}`))}const y=(u<0?"-":u>9999?"+":"")+String(Math.abs(u)).padStart(4,"0"),T=c.replace(/0+$/,"");return`${y}-${i}-${a}T${s}:${o}:${l}${T?"."+T:""}${f}`}}},7092(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationPolicy=void 0;class r{static constraints=new Set(["minLength","maxLength","regex","pattern","email","link","phoneNumber","minValue","maxValue","decimalPlace","temporalGranularity","timezone","choiceMembership","maxItems","controlledTermMembership","authorityIdentifier","authorityMembership"]);static completeness=new Set(["required","minItems"]);static verification=new Set(["regexPending","regexEvaluation","regexUnavailable","semanticNotChecked","semanticUnavailable","controlledTermVerified","authorityVerified"]);static acceptsSemanticResult(e,t,r){switch(t){case"passed":return r===(e?"controlledTermVerified":"authorityVerified");case"failed":return e?"controlledTermMembership"===r:"authorityIdentifier"===r||"authorityMembership"===r;case"notChecked":return"semanticNotChecked"===r;case"unavailable":return"semanticUnavailable"===r;default:return!1}}static category(e){return this.constraints.has(e)?"constraint":this.completeness.has(e)?"completeness":this.verification.has(e)?"verification":"structural"}static blocksSave(e,t="instance"){if("string"!=typeof e&&"passed"===e.verificationStatus)return!1;const r="string"==typeof e?this.category(e):e.category;return"structural"===r||"template"===t&&("verification"!==r||"string"!=typeof e&&"failed"===e.verificationStatus)}static severity(e,t="instance"){return this.blocksSave(e,t)?"error":"warning"}static finding(e,t,r,n){const i={code:e,category:this.category(e),path:t,message:r};return void 0!==n&&(i.verificationStatus=n),i}static summarize(e,t="instance"){const r=e.filter(e=>"passed"!==e.verificationStatus);return{findings:[...e],structurallyValid:!r.some(e=>"structural"===e.category),canSave:!r.some(e=>this.blocksSave(e,t)),isValid:0===r.length}}static pointer(e){return e.map(e=>"/"+String(e).replace(/~/g,"~0").replace(/\//g,"~1")).join("")}static child(e,t){return e+this.pointer([t])}}t.ValidationPolicy=r},3198(e,t,r){r.r(t),r.d(t,{Alias:()=>Y,CST:()=>n,Composer:()=>er,Document:()=>St,Lexer:()=>Nr,LineCounter:()=>wr,Pair:()=>Ee,Parser:()=>Pr,Scalar:()=>K,Schema:()=>vt,YAMLError:()=>Nt,YAMLMap:()=>ve,YAMLParseError:()=>wt,YAMLSeq:()=>_e,YAMLWarning:()=>Lt,default:()=>i,isAlias:()=>m,isCollection:()=>g,isDocument:()=>p,isMap:()=>h,isNode:()=>E,isPair:()=>f,isScalar:()=>y,isSeq:()=>T,parse:()=>Jr,parseAllDocuments:()=>Br,parseDocument:()=>Yr,stringify:()=>kr,visit:()=>R,visitAsync:()=>S});var n={};r.r(n),r.d(n,{BOM:()=>hr,DOCUMENT:()=>fr,FLOW_END:()=>yr,SCALAR:()=>Tr,createScalarToken:()=>rr,isCollection:()=>gr,isScalar:()=>Er,prettyToken:()=>Cr,resolveAsScalar:()=>tr,setScalarValue:()=>nr,stringify:()=>sr,tokenType:()=>Ir,visit:()=>mr});var i={};r.r(i),r.d(i,{Alias:()=>Y,CST:()=>n,Composer:()=>er,Document:()=>St,Lexer:()=>Nr,LineCounter:()=>wr,Pair:()=>Ee,Parser:()=>Pr,Scalar:()=>K,Schema:()=>vt,YAMLError:()=>Nt,YAMLMap:()=>ve,YAMLParseError:()=>wt,YAMLSeq:()=>_e,YAMLWarning:()=>Lt,isAlias:()=>m,isCollection:()=>g,isDocument:()=>p,isMap:()=>h,isNode:()=>E,isPair:()=>f,isScalar:()=>y,isSeq:()=>T,parse:()=>Jr,parseAllDocuments:()=>Br,parseDocument:()=>Yr,stringify:()=>kr,visit:()=>R,visitAsync:()=>S});const a=Symbol.for("yaml.alias"),s=Symbol.for("yaml.document"),o=Symbol.for("yaml.map"),l=Symbol.for("yaml.pair"),c=Symbol.for("yaml.scalar"),d=Symbol.for("yaml.seq"),u=Symbol.for("yaml.node.type"),m=e=>!!e&&"object"==typeof e&&e[u]===a,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]===c,T=e=>!!e&&"object"==typeof e&&e[u]===d;function g(e){if(e&&"object"==typeof e)switch(e[u]){case o:case d:return!0}return!1}function E(e){if(e&&"object"==typeof e)switch(e[u]){case a:case o:case c:case d:return!0}return!1}const C=e=>(y(e)||g(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)?v(null,e.contents,r,Object.freeze([e]))===b&&(e.contents=null):v(null,e,r,Object.freeze([]))}function v(e,t,r,n){const i=w(e,t,r,n);if(E(i)||f(i))return L(e,n,i),v(e,i,r,n);if("symbol"!=typeof i)if(g(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const i=v(e,t.items[e],r,n);if("number"==typeof i)e=i-1;else{if(i===I)return I;i===b&&(t.items.splice(e,1),e-=1)}}}else if(f(t)){n=Object.freeze(n.concat(t));const e=v("key",t.key,r,n);if(e===I)return I;e===b&&(t.key=null);const i=v("value",t.value,r,n);if(i===I)return I;i===b&&(t.value=null)}return i}async function S(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 i=await w(e,t,r,n);if(E(i)||f(i))return L(e,n,i),_(e,i,r,n);if("symbol"!=typeof i)if(g(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const i=await _(e,t.items[e],r,n);if("number"==typeof i)e=i-1;else{if(i===I)return I;i===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 i=await _("value",t.value,r,n);if(i===I)return I;i===b&&(t.value=null)}return i}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(g(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,S.BREAK=I,S.SKIP=A,S.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 i=this.tags[r];if(i)try{return i+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[i,a]of r)"!!"===i&&"tag:yaml.org,2002:"===a||e&&!n.some(e=>e.startsWith(a))||t.push(`%TAG ${i} ${a}`);return t.join("\n")}}function x(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 D(e){const t=new Set;return R(e,{Value(e,r){r.anchor&&t.add(r.anchor)}}),t}function M(e,t){for(let r=1;;++r){const n=`${e}${r}`;if(!t.has(n))return n}}function P(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],i=P(e,n,String(t),r);void 0===i?delete n[t]:i!==r&&(n[t]=i)}else if(n instanceof Map)for(const t of Array.from(n.keys())){const r=n.get(t),i=P(e,n,t,r);void 0===i?n.delete(t):i!==r&&n.set(t,i)}else if(n instanceof Set)for(const t of Array.from(n)){const r=P(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 i=P(e,n,t,r);void 0===i?delete n[t]:i!==r&&(n[t]=i)}return e.call(t,r,n)}function U(e,t,r){if(Array.isArray(e))return e.map((e,t)=>U(e,String(t),r));if(e&&"function"==typeof e.toJSON){if(!r||!C(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 i=e.toJSON(t,r);return r.onCreate&&r.onCreate(i),i}return"bigint"!=typeof e||r?.keep?e:Number(e)}O.defaultYaml={explicit:!1,version:"1.2"},O.defaultTags={"!!":"tag:yaml.org,2002:"};class B{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:i}={}){if(!p(e))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},s=U(this,"",a);if("function"==typeof n)for(const{count:e,res:t}of a.anchors.values())n(t,e);return"function"==typeof i?P(i,{"":s},"",s):s}}class Y extends B{constructor(e){super(a),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)||C(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:i}=t;let a=e.get(n);if(a||(U(n,null,t),a=e.get(n)),void 0===a?.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(a.count+=1,0===a.aliasCount&&(a.aliasCount=J(r,n,e)),a.count*a.aliasCount>i))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(x(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 J(e,t,r){if(m(t)){const n=t.resolve(e),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}if(g(t)){let n=0;for(const i of t.items){const t=J(e,i,r);t>n&&(n=t)}return n}if(f(t)){const n=J(e,t.key,r),i=J(e,t.value,r);return Math.max(n,i)}return 1}const k=e=>!e||"function"!=typeof e&&"object"!=typeof e;class K extends B{constructor(e){super(c),this.value=e}toJSON(e,t){return t?.keep?this.value:U(this.value,e,t)}toString(){return String(this.value)}}function W(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:i,onTagObj:a,schema:s,sourceObjects:l}=r;let c;if(n&&e&&"object"==typeof e){if(c=l.get(e),c)return c.anchor??(c.anchor=i(e)),new Y(c.anchor);c={anchor:null,node:null},l.set(e,c)}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 K(e);return c&&(c.node=t),t}u=e instanceof Map?s[o]:Symbol.iterator in Object(e)?s[d]:s[o]}a&&(a(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 K(e);return t?m.tag=t:u.default||(m.tag=u.tag),c&&(c.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 W(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}K.BLOCK_FOLDED="BLOCK_FOLDED",K.BLOCK_LITERAL="BLOCK_LITERAL",K.PLAIN="PLAIN",K.QUOTE_DOUBLE="QUOTE_DOUBLE",K.QUOTE_SINGLE="QUOTE_SINGLE";const $=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class X extends B{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,i=this.get(r,!0);if(g(i))i.addIn(n,t);else{if(void 0!==i||!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(g(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){const[r,...n]=e,i=this.get(r,!0);return 0===n.length?!t&&y(i)?i.value:i:g(i)?i.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!!g(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(g(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 q=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function G(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const z=(e,t,r)=>e.endsWith("\n")?G(r,t):r.includes("\n")?"\n"+G(r,t):(e.endsWith(" ")?"":" ")+r,H="block",Q="quoted";function Z(e,t,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:a=20,onFold:s,onOverflow:o}={}){if(!i||i<0)return e;i<a&&(a=0);const l=Math.max(1+a,1+i-t.length);if(e.length<=l)return e;const c=[],d={};let u,m,p=i-t.length;"number"==typeof n&&(n>i-Math.max(2,a)?c.push(0):p=i-n);let h=!1,f=-1,y=-1,T=-1;r===H&&(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===H&&(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)c.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(d[t])return e;c.push(t),d[t]=!0,p=t+l,u=void 0}else h=!0}m=n}if(h&&o&&o(),0===c.length)return e;s&&s();let g=e.slice(0,c[0]);for(let n=0;n<c.length;++n){const i=c[n],a=c[n+1]||e.length;0===i?g=`\n${t}${e.slice(0,a)}`:(r===Q&&d[i]&&(g+=`${e[i]}\\`),g+=`\n${t}${e.slice(i+1,a)}`)}return g}function ee(e,t,r){let n=t,i=t+1,a=e[i];for(;" "===a||"\t"===a;)if(t<i+r)a=e[++t];else{do{a=e[++t]}while(a&&"\n"!==a);n=t,i=t+1,a=e[i]}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,i=t.options.doubleQuotedMinMultiLineLength,a=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<i)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+=a," "===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,a,"quoted",te(t,!1))}function ie(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 ae(e,t){const{singleQuote:r}=t.options;let n;if(!1===r)n=ne;else{const t=e.includes('"'),i=e.includes("'");n=t&&!i?ie:i&&!t?ne:r?ie: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,i,a){const{blockQuote:s,commentString:o,lineWidth:l}=n.options;if(!s||/\n[\t ]+$/.test(r))return ae(r,n);const c=n.indent||(n.forceBlockIndent||re(r)?" ":""),d="literal"===s||"folded"!==s&&t!==K.BLOCK_FOLDED&&(t===K.BLOCK_LITERAL||!function(e,t,r){if(!t||t<0)return!1;const n=t-r,i=e.length;if(i<=n)return!1;for(let t=0,r=0;t<i;++t)if("\n"===e[t]){if(t-r>n)return!0;if(r=t+1,i-r<=n)return!1}return!0}(r,l,c.length));if(!r)return d?"|\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="+",a&&a()):u="",p&&(r=r.slice(0,-p.length),"\n"===p[p.length-1]&&(p=p.slice(0,-1)),p=p.replace(se,`$&${c}`));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 g=r.substring(0,T<f?T+1:f);g&&(r=r.substring(g.length),g=g.replace(/\n+/g,`$&${c}`));let E=(y?c?"2":"1":"")+u;if(e&&(E+=" "+o(e.replace(/ ?[\r\n]+/g," ")),i&&i()),!d){const e=r.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let i=!1;const a=te(n,!0);"folded"!==s&&t!==K.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});const o=Z(`${g}${e}${p}`,c,"block",a);if(!i)return`>${E}\n${c}${o}`}return`|${E}\n${c}${g}${r=r.replace(/\n+/g,`$&${c}`)}${p}`}function le(e,t,r,n){const{implicitKey:i,inFlow:a}=t,s="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:o}=e;o!==K.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(o=K.QUOTE_DOUBLE);const l=e=>{switch(e){case K.BLOCK_FOLDED:case K.BLOCK_LITERAL:return i||a?ae(s.value,t):oe(s,t,r,n);case K.QUOTE_DOUBLE:return ne(s.value,t);case K.QUOTE_SINGLE:return ie(s.value,t);case K.PLAIN:return function(e,t,r,n){const{type:i,value:a}=e,{actualString:s,implicitKey:o,indent:l,indentStep:c,inFlow:d}=t;if(o&&a.includes("\n")||d&&/[[\]{},]/.test(a))return ae(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return o||d||!a.includes("\n")?ae(a,t):oe(e,t,r,n);if(!o&&!d&&i!==K.PLAIN&&a.includes("\n"))return oe(e,t,r,n);if(re(a)){if(""===l)return t.forceBlockIndent=!0,oe(e,t,r,n);if(o&&l===c)return ae(a,t)}const u=a.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 ae(a,t)}return o?u:Z(u,l,"flow",te(t,!1))}(s,t,r,n);default:return null}};let c=l(o);if(null===c){const{defaultKeyType:e,defaultStringType:r}=t.options,n=i&&e||r;if(c=l(n),null===c)throw new Error(`Unsupported default string type ${n}`)}return c}function ce(e,t){const r=Object.assign({blockQuote:!0,commentString:q,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 de(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 i;const a=E(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??(i=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 i=e.filter(e=>e.identify?.(n));if(i.length>1){const e=i.filter(e=>e.test);e.length>0&&(i=e)}r=i.find(e=>e.format===t.format)??i.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,a));const s=function(e,t,{anchors:r,doc:n}){if(!n.directives)return"";const i=[],a=(y(e)||g(e))&&e.anchor;a&&x(a)&&(r.add(a),i.push(`&${a}`));const s=e.tag??(t.default?null:t.tag);return s&&i.push(n.directives.tagString(s)),i.join(" ")}(a,i,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);const o="function"==typeof i.stringify?i.stringify(a,t,r,n):y(a)?le(a,t,r,n):a.toString(t,r,n);return s?y(a)||"{"===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 K(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 i=n.toJSON(null,e,Map);for(const[e,r]of i)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===K.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 i=U(r,"",e);if(t instanceof Map)t.set(i,U(n,i,e));else if(t instanceof Set)t.add(i);else{const a=function(e,t,r){if(null===t)return"";if("object"!=typeof t)return String(t);if(E(e)&&r?.doc){const t=ce(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,i,e),s=U(n,a,e);a in t?Object.defineProperty(t,a,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[a]=s}}return t}function ge(e,t,r){const n=W(e,void 0,r),i=W(t,void 0,r);return new Ee(n,i)}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,i){const{allNullValues:a,doc:s,indent:o,indentStep:l,options:{commentString:c,indentSeq:d,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(g(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||g(e)||(y(e)?e.type===K.BLOCK_FOLDED||e.type===K.BLOCK_LITERAL:"object"==typeof e));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(u||!a),indent:o+l});let h,f,C,I=!1,A=!1,b=de(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(a||null==t)return I&&n&&n(),""===b?"?":p?`? ${b}`:b}else if(a&&!u||null==t&&p)return b=`? ${b}`,m&&!I?b+=z(b,r.indent,c(m)):A&&i&&i(),b;I&&(m=null),p?(m&&(b+=z(b,r.indent,c(m))),b=`? ${b}\n${o}:`):(b=`${b}:`,m&&(b+=z(b,r.indent,c(m)))),E(t)?(h=!!t.spaceBefore,f=t.commentBefore,C=t.comment):(h=!1,f=null,C=null,t&&"object"==typeof t&&(t=s.createNode(t))),r.implicitKey=!1,p||m||!y(t)||(r.indentAtStart=b.length+1),A=!1,d||!(l.length>=2)||r.inFlow||p||!T(t)||t.flow||t.tag||t.anchor||(r.indent=r.indent.substring(2));let R=!1;const v=de(t,r,()=>R=!0,()=>A=!0);let S=" ";if(m||h||f)S=h?"\n":"",f&&(S+=`\n${G(c(f),r.indent)}`),""!==v||r.inFlow?S+=`\n${r.indent}`:"\n"===S&&C&&(S="\n\n");else if(!p&&g(t)){const e=v[0],n=v.indexOf("\n"),i=-1!==n,a=r.inFlow??t.flow??0===t.items.length;if(i||!a){let t=!1;if(i&&("&"===e||"!"===e)){let r=v.indexOf(" ");"&"===e&&-1!==r&&r<n&&"!"===v[r+1]&&(r=v.indexOf(" ",r+1)),(-1===r||n<r)&&(t=!0)}t||(S=`\n${r.indent}`)}}else""!==v&&"\n"!==v[0]||(S="");return b+=S+v,r.inFlow?R&&n&&n():C&&!R?b+=z(b,r.indent,c(C)):A&&i&&i(),b}(this,e,t,r):JSON.stringify(this)}}function Ce(e,t,r){return(t.inFlow??e.flow?Ae:Ie)(e,t,r)}function Ie({comment:e,items:t},r,{blockItemPrefix:n,flowChars:i,itemIndent:a,onChompKeep:s,onComment:o}){const{indent:l,options:{commentString:c}}=r,d=Object.assign({},r,{indent:a,type:null});let u=!1;const m=[];for(let e=0;e<t.length;++e){const i=t[e];let s=null;if(E(i))!u&&i.spaceBefore&&m.push(""),be(r,m,i.commentBefore,u),i.comment&&(s=i.comment);else if(f(i)){const e=E(i.key)?i.key:null;e&&(!u&&e.spaceBefore&&m.push(""),be(r,m,e.commentBefore,u))}u=!1;let o=de(i,d,()=>s=null,()=>u=!0);s&&(o+=z(o,a,c(s))),u&&s&&(u=!1),m.push(n+o)}let p;if(0===m.length)p=i.start+i.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"+G(c(e),l),o&&o()):u&&s&&s(),p}function Ae({items:e},t,{flowChars:r,itemIndent:n}){const{indent:i,indentStep:a,flowCollectionPadding:s,options:{commentString:o}}=t;n+=a;const l=Object.assign({},t,{indent:n,inFlow:!0,type:null});let c=!1,d=0;const u=[];for(let r=0;r<e.length;++r){const i=e[r];let a=null;if(E(i))i.spaceBefore&&u.push(""),be(t,u,i.commentBefore,!1),i.comment&&(a=i.comment);else if(f(i)){const e=E(i.key)?i.key:null;e&&(e.spaceBefore&&u.push(""),be(t,u,e.commentBefore,!1),e.comment&&(c=!0));const r=E(i.value)?i.value:null;r?(r.comment&&(a=r.comment),r.commentBefore&&(c=!0)):null==i.value&&e?.comment&&(a=e.comment)}a&&(c=!0);let s=de(i,l,()=>a=null);c||(c=u.length>d||s.includes("\n")),r<e.length-1?s+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(c||(c=u.reduce((e,t)=>e+t.length+2,2)+(s.length+2)>t.options.lineWidth)),c&&(s+=",")),a&&(s+=z(s,n,o(a))),u.push(s),d=u.length}const{start:m,end:p}=r;if(0===u.length)return m+p;if(!c){const e=u.reduce((e,t)=>e+t.length+2,2);c=t.options.lineWidth>0&&e>t.options.lineWidth}if(c){let e=m;for(const t of u)e+=t?`\n${a}${i}${t}`:"\n";return`${e}\n${i}${p}`}return`${m}${s}${u.join(" ")}${s}${p}`}function be({indent:e,options:{commentString:t}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){const i=G(t(n),e);r.push(i.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 ve 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:i}=r,a=new this(e),s=(e,s)=>{if("function"==typeof i)s=i.call(t,e,s);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==s||n)&&a.items.push(ge(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&&a.items.sort(e.sortMapEntries),a}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),i=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(i){const e=this.items.findIndex(e=>i(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})),Ce(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}const Se={collection:"map",default:!0,nodeClass:ve,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(h(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,r)=>ve.from(e,t,r)};class _e extends X{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(d,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(U(e,String(n++),t));return r}toString(e,t,r){return e?Ce(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,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if("function"==typeof n){const r=t instanceof Set?a:String(e++);a=n.call(t,r,a)}i.items.push(W(a,void 0,r))}}return i}}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 K(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new K(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 K("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 i="number"==typeof n?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let a=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||"tag:yaml.org,2002:float"===r)&&/^-?\d/.test(a)&&!a.includes("e")){let e=a.indexOf(".");e<0&&(e=a.length,a+=".");let r=t-(a.length-e-1);for(;r-- >0;)a+="0"}return a}const xe={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},De={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)}},Me={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 K(parseFloat(e)),r=e.indexOf(".");return-1!==r&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-r-1),t},stringify:Oe},Pe=e=>"bigint"==typeof e||Number.isInteger(e),Ue=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function Be(e,t,r){const{value:n}=e;return Pe(n)&&n>=0?r+n.toString(t):Oe(e)}const Ye={identify:e=>Pe(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>Ue(e,2,8,r),stringify:e=>Be(e,8,"0o")},Je={identify:Pe,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>Ue(e,0,10,r),stringify:Oe},ke={identify:e=>Pe(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>Ue(e,2,16,r),stringify:e=>Be(e,16,"0x")},Ke=[Se,we,Le,Fe,Ve,Ye,Je,ke,xe,De,Me];function We(e){return"bigint"==typeof e||Number.isInteger(e)}const je=({value:e})=>JSON.stringify(e),$e=[Se,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 K(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:We,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})=>We(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,i,a){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=K.BLOCK_LITERAL),t!==K.QUOTE_DOUBLE){const e=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),r=Math.ceil(o.length/e),i=new Array(r);for(let t=0,n=0;t<r;++t,n+=e)i[t]=o.substr(n,e);o=i.join(t===K.BLOCK_LITERAL?"\n":" ")}return le({comment:e,type:t,value:o},n,i,a)}};function qe(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 K(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 Ge(e,t,r){const{replacer:n}=r,i=new _e(e);i.tag="tag:yaml.org,2002:pairs";let a=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(a++),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;i.items.push(ge(s,o,r))}return i}const ze={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:qe,createNode:Ge};class He extends _e{constructor(){super(),this.add=ve.prototype.add.bind(this),this.delete=ve.prototype.delete.bind(this),this.get=ve.prototype.get.bind(this),this.has=ve.prototype.has.bind(this),this.set=ve.prototype.set.bind(this),this.tag=He.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,i;if(f(e)?(n=U(e.key,"",t),i=U(e.value,n,t)):n=U(e,"",t),r.has(n))throw new Error("Ordered maps must not include duplicate keys");r.set(n,i)}return r}static from(e,t,r){const n=Ge(e,t,r),i=new this;return i.items=n.items,i}}He.tag="tag:yaml.org,2002:omap";const Qe={collection:"seq",identify:e=>e instanceof Map,nodeClass:He,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=qe(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 He,r)},createNode:(e,t,r)=>He.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 K(!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 K(!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)}},it={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 K(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},at=e=>"bigint"==typeof e||Number.isInteger(e);function st(e,t,r,{intAsBigInt:n}){const i=e[0];if("-"!==i&&"+"!==i||(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"-"===i?BigInt(-1)*t:t}const a=parseInt(e,r);return"-"===i?-1*a:a}function ot(e,t,r){const{value:n}=e;if(at(n)){const e=n.toString(t);return n<0?"-"+r+e.substr(1):r+e}return Oe(e)}const lt={identify:at,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")},ct={identify:at,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")},dt={identify:at,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:at,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 ve{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,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof n&&(e=n.call(t,e,e)),i.items.push(ge(e,null,r));return i}}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,i=e=>t?BigInt(e):Number(e),a=n.replace(/_/g,"").split(":").reduce((e,t)=>e*i(60)+i(t),i(0));return"-"===r?i(-1)*a:a}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 i=r(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),n+a.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},gt={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(gt.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,i,a,s,o]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0;let c=Date.UTC(r,n-1,i,a||0,s||0,o||0,l);const d=t[8];if(d&&"Z"!==d){let e=ht(d,!1);Math.abs(e)<30&&(e*=60),c-=6e4*e}return new Date(c)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},Et=[Se,we,Le,Fe,et,tt,lt,ct,dt,ut,rt,nt,it,Xe,pe,Qe,ze,pt,yt,Tt,gt],Ct=new Map([["core",Ke],["failsafe",[Se,we,Le]],["json",$e],["yaml11",Et],["yaml-1.1",Et]]),It={binary:Xe,bool:Ve,float:Me,floatExp:De,floatNaN:xe,floatTime:Tt,int:Je,intHex:ke,intOct:Ye,intTime:yt,map:Se,merge:pe,null:Fe,omap:Qe,pairs:ze,seq:we,set:pt,timestamp:gt},At={"tag:yaml.org,2002:binary":Xe,"tag:yaml.org,2002:merge":pe,"tag:yaml.org,2002:omap":Qe,"tag:yaml.org,2002:pairs":ze,"tag:yaml.org,2002:set":pt,"tag:yaml.org,2002:timestamp":gt};function bt(e,t,r){const n=Ct.get(t);if(n&&!e)return r&&!n.includes(pe)?n.concat(pe):n.slice();let i=n;if(!i){if(!Array.isArray(e)){const e=Array.from(Ct.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`)}i=[]}if(Array.isArray(e))for(const t of e)i=i.concat(t);else"function"==typeof e&&(i=e(i.slice()));return r&&(i=i.concat(pe)),i.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 vt{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:i,sortMapEntries:a,toStringDefaults:s}){this.compat=Array.isArray(e)?bt(e,"compat"):e?bt(null,e):null,this.name="string"==typeof i&&i||"core",this.knownTags=n?At:{},this.tags=bt(t,this.name,r),this.toStringOptions=s??null,Object.defineProperty(this,o,{value:Se}),Object.defineProperty(this,c,{value:Le}),Object.defineProperty(this,d,{value:we}),this.sortMapEntries="function"==typeof a?a:!0===a?Rt:null}clone(){const e=Object.create(vt.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class St{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 i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:a}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new O({version:a}),this.setSchema(a,r),this.contents=void 0===e?null:this.createNode(e,n,r)}clone(){const e=Object.create(St.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=D(this);e.anchor=!t||r.has(t)?M(t||"a",r):t}return new Y(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:i,anchorPrefix:a,flow:s,keepUndefined:o,onTagObj:l,tag:c}=r??{},{onAnchor:d,setAnchors:u,sourceObjects:m}=function(e,t){const r=[],n=new Map;let i=null;return{onAnchor:n=>{r.push(n),i??(i=D(e));const a=M(t,i);return i.add(a),a},setAnchors:()=>{for(const e of r){const t=n.get(e);if("object"!=typeof t||!t.anchor||!y(t.node)&&!g(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,a||"a"),p=W(e,c,{aliasDuplicateObjects:i??!0,keepUndefined:o??!1,onAnchor:d,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:m});return s&&g(p)&&(p.flow=!0),u(),p}createPair(e,t,r={}){const n=this.createNode(e,null,r),i=this.createNode(t,null,r);return new Ee(n,i)}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 g(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return $(e)?!t&&y(this.contents)?this.contents.value:this.contents:g(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!g(this.contents)&&this.contents.has(e)}hasIn(e){return $(e)?void 0!==this.contents:!!g(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 vt(Object.assign(r,t))}}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:a}={}){const s={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===r,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},o=U(this.contents,t??"",s);if("function"==typeof i)for(const{count:e,res:t}of s.anchors.values())i(t,e);return"function"==typeof a?P(a,{"":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 i=ce(e,t),{commentString:a}=i.options;if(e.commentBefore){1!==r.length&&r.unshift("");const t=a(e.commentBefore);r.unshift(G(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=a(e.contents.commentBefore);r.push(G(t,""))}i.forceBlockIndent=!!e.comment,o=e.contents.comment}const t=o?void 0:()=>s=!0;let l=de(e.contents,i,()=>o=null,t);o&&(l+=z(l,"",a(o))),"|"!==l[0]&&">"!==l[0]||"---"!==r[r.length-1]?r.push(l):r[r.length-1]=`--- ${l}`}else r.push(de(e.contents,i));if(e.directives?.docEnd)if(e.comment){const t=a(e.comment);t.includes("\n")?(r.push("..."),r.push(G(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(G(a(t),"")))}return r.join("\n")+"\n"}(this,e)}}function _t(e){if(g(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:i}=r.linePos[0];r.message+=` at line ${n}, column ${i}`;let a=i-1,s=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(a>=60&&s.length>80){const e=Math.min(a-39,s.length-79);s="…"+s.substring(e),a-=e-1}if(s.length>80&&(s=s.substring(0,79)+"…"),n>1&&/^ *$/.test(s.substring(0,a))){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>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));const o=" ".repeat(a)+"^".repeat(e);r.message+=`:\n\n${s}\n${o}\n`}};function Vt(e,{flow:t,indicator:r,next:n,offset:i,onError:a,parentIndent:s,startOnNewline:o}){let l=!1,c=o,d=o,u="",m="",p=!1,h=!1,f=null,y=null,T=null,g=null,E=null,C=null,I=null;for(const i of e)switch(h&&("space"!==i.type&&"newline"!==i.type&&"comma"!==i.type&&a(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),f&&(c&&"comment"!==i.type&&"newline"!==i.type&&a(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),f=null),i.type){case"space":t||"doc-start"===r&&"flow-collection"===n?.type||!i.source.includes("\t")||(f=i),d=!0;break;case"comment":{d||a(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=i.source.substring(1)||" ";u?u+=m+e:u=e,m="",c=!1;break}case"newline":c?u?u+=i.source:C&&"seq-item-ind"===r||(l=!0):m+=i.source,c=!0,p=!0,(y||T)&&(g=i),d=!0;break;case"anchor":y&&a(i,"MULTIPLE_ANCHORS","A node can have at most one anchor"),i.source.endsWith(":")&&a(i.offset+i.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=i,I??(I=i.offset),c=!1,d=!1,h=!0;break;case"tag":T&&a(i,"MULTIPLE_TAGS","A node can have at most one tag"),T=i,I??(I=i.offset),c=!1,d=!1,h=!0;break;case r:(y||T)&&a(i,"BAD_PROP_ORDER",`Anchors and tags must be after the ${i.source} indicator`),C&&a(i,"UNEXPECTED_TOKEN",`Unexpected ${i.source} in ${t??"collection"}`),C=i,c="seq-item-ind"===r||"explicit-key-ind"===r,d=!1;break;case"comma":if(t){E&&a(i,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),E=i,c=!1,d=!1;break}default:a(i,"UNEXPECTED_TOKEN",`Unexpected ${i.type} token`),c=!1,d=!1}const A=e[e.length-1],b=A?A.offset+A.source.length:i;return h&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&a(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f&&(c&&f.indent<=s||"block-map"===n?.type||"block-seq"===n?.type)&&a(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:E,found:C,spaceBefore:l,comment:u,hasNewline:p,anchor:y,tag:T,newlineAfterProp:g,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 xt(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 Dt(e,t,r){const{uniqueKeys:n}=e.options;if(!1===n)return!1;const i="function"==typeof n?n:(e,t)=>e===t||y(e)&&y(t)&&e.value===t.value;return t.some(e=>i(e.key,r))}const Mt="All mapping items must start at the same column";function Pt(e,t,r,n){let i="";if(e){let a=!1,s="";for(const o of e){const{source:e,type:l}=o;switch(l){case"space":a=!0;break;case"comment":{r&&!a&&n(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";i?i+=s+t:i=t,s="";break}case"newline":i&&(s+=e),a=!0;break;default:n(o,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:i,offset:t}}const Ut="Block collections are not allowed within flow collections",Bt=e=>e&&("block-map"===e.type||"block-seq"===e.type);function Yt(e,t,r,n,i,a){const s="block-map"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,i,a){const s=new(a?.nodeClass??ve)(r.schema);r.atRoot&&(r.atRoot=!1);let o=n.offset,l=null;for(const a of n.items){const{start:c,key:d,sep:u,value:m}=a,p=Vt(c,{indicator:"explicit-key-ind",next:d??u?.[0],offset:o,onError:i,parentIndent:n.indent,startOnNewline:!0}),h=!p.found;if(h){if(d&&("block-seq"===d.type?i(o,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==n.indent&&i(o,"BAD_INDENT",Mt)),!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(d))&&i(d??c[c.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else p.found?.indent!==n.indent&&i(o,"BAD_INDENT",Mt);r.atKey=!0;const f=p.end,y=d?e(r,d,p,i):t(r,f,c,null,p,i);r.schema.compat&&xt(n.indent,d,i),r.atKey=!1,Dt(r,s.items,y)&&i(f,"DUPLICATE_KEY","Map keys must be unique");const T=Vt(u??[],{indicator:"map-value-ind",next:m,offset:y.range[2],onError:i,parentIndent:n.indent,startOnNewline:!d||"block-scalar"===d.type});if(o=T.end,T.found){h&&("block-map"!==m?.type||T.hasNewline||i(o,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&p.start<T.found.offset-1024&&i(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,i):t(r,o,u,null,T,i);r.schema.compat&&xt(n.indent,m,i),o=l.range[2];const c=new Ee(y,l);r.options.keepSourceTokens&&(c.srcToken=a),s.items.push(c)}else{h&&i(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=a),s.items.push(e)}}return l&&l<o&&i(l,"IMPOSSIBLE","Map comment with trailing content"),s.range=[n.offset,o,l??o],s}(e,t,r,n,a):"block-seq"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,i,a){const s=new(a?.nodeClass??_e)(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let o=n.offset,l=null;for(const{start:a,value:c}of n.items){const d=Vt(a,{indicator:"seq-item-ind",next:c,offset:o,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!d.found){if(!(d.anchor||d.tag||c)){l=d.end,d.comment&&(s.comment=d.comment);continue}"block-seq"===c?.type?i(d.end,"BAD_INDENT","All sequence items must start at the same column"):i(o,"MISSING_CHAR","Sequence item without - indicator")}const u=c?e(r,c,d,i):t(r,d.end,a,null,d,i);r.schema.compat&&xt(n.indent,c,i),o=u.range[2],s.items.push(u)}return s.range=[n.offset,o,l??o],s}(e,t,r,n,a):function({composeNode:e,composeEmptyNode:t},r,n,i,a){const s="{"===n.start.source,o=s?"flow map":"flow sequence",l=new(a?.nodeClass??(s?ve:_e))(r.schema);l.flow=!0;const c=r.atRoot;c&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let d=n.offset+n.start.source.length;for(let a=0;a<n.items.length;++a){const c=n.items[a],{start:u,key:m,sep:p,value:h}=c,y=Vt(u,{flow:o,indicator:"explicit-key-ind",next:m??p?.[0],offset:d,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!y.found){if(!(y.anchor||y.tag||p||h)){0===a&&y.comma?i(y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):a<n.items.length-1&&i(y.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),y.comment&&(l.comment?l.comment+="\n"+y.comment:l.comment=y.comment),d=y.end;continue}!s&&r.options.strict&&Ot(m)&&i(m,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===a)y.comma&&i(y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(y.comma||i(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 a=y.end,f=m?e(r,m,y,i):t(r,a,u,null,y,i);Bt(m)&&i(f.range,"BLOCK_IN_FLOW",Ut),r.atKey=!1;const T=Vt(p??[],{flow:o,indicator:"map-value-ind",next:h,offset:f.range[2],onError:i,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){i(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}y.start<T.found.offset-1024&&i(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]?i(h,"MISSING_CHAR",`Missing space after : in ${o}`):i(T.start,"MISSING_CHAR",`Missing , or : between ${o} items`));const g=h?e(r,h,T,i):T.found?t(r,T.end,p,null,T,i):null;g?Bt(h)&&i(g.range,"BLOCK_IN_FLOW",Ut):T.comment&&(f.comment?f.comment+="\n"+T.comment:f.comment=T.comment);const E=new Ee(f,g);if(r.options.keepSourceTokens&&(E.srcToken=c),s){const e=l;Dt(r,e.items,f)&&i(a,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(E)}else{const e=new ve(r.schema);e.flow=!0,e.items.push(E);const t=(g??f).range;e.range=[f.range[0],t[1],t[2]],l.items.push(e)}d=g?g.range[2]:T.end}else{const n=h?e(r,h,y,i):t(r,y.end,p,null,y,i);l.items.push(n),d=n.range[2],Bt(h)&&i(n.range,"BLOCK_IN_FLOW",Ut)}}const u=s?"}":"]",[m,...p]=n.end;let h=d;if(m?.source===u)h=m.offset+m.source.length;else{const e=o[0].toUpperCase()+o.substring(1);i(d,c?"MISSING_CHAR":"BAD_INDENT",c?`${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=Pt(p,h,r.options.strict,i);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,a),o=s.constructor;return"!"===i||i===o.tagName?(s.tag=o.tagName,s):(i&&(s.tag=i),s)}function Jt(e,t,r){const n=t.offset,i=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:i}=t[0],a=i[0];let s=0,o="",l=-1;for(let t=1;t<i.length;++t){const r=i[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: ${i}`);let c=!1,d="",u=i.length;for(let e=1;e<t.length;++e){const i=t[e];switch(i.type){case"space":c=!0;case"newline":u+=i.source.length;break;case"comment":r&&!c&&n(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=i.source.length,d=i.source.substring(1);break;case"error":n(i,"UNEXPECTED_TOKEN",i.message),u+=i.source.length;break;default:{n(i,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${i.type}`);const e=i.source;e&&"string"==typeof e&&(u+=e.length)}}}return{mode:a,indent:s,chomp:o,comment:d,length:u}}(t,e.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};const a=">"===i.mode?K.BLOCK_FOLDED:K.BLOCK_LITERAL,s=t.source?function(e){const t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),i=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}(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="+"===i.chomp&&s.length>0?"\n".repeat(Math.max(1,s.length-1)):"";let r=n+i.length;return t.source&&(r+=t.source.length),{value:e,type:a,comment:i.comment,range:[n,r,r]}}let l=t.indent+i.indent,c=t.offset+i.length,d=0;for(let t=0;t<o;++t){const[n,a]=s[t];if(""!==a&&"\r"!==a){if(n.length<l){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(c+n.length,"MISSING_CHAR",e)}0===i.indent&&(l=n.length),d=t,0!==l||e.atRoot||r(c,"BAD_INDENT","Block scalar values in collections must be indented");break}0===i.indent&&n.length>l&&(l=n.length),c+=n.length+a.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<d;++e)u+=s[e][0].slice(l)+"\n";for(let e=d;e<o;++e){let[t,n]=s[e];c+=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 "+(i.indent?"explicit indentation indicator":"first line");r(c-n.length-(o?2:1),"BAD_INDENT",e),t=""}a===K.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(i.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+i.length+t.source.length;return{value:u,type:a,comment:i.comment,range:[n,h,h]}}function kt(e,t,r){const{offset:n,type:i,source:a,end:s}=e;let o,l;const c=(e,t,i)=>r(n+e,t,i);switch(i){case"scalar":o=K.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}`),Kt(e)}(a,c);break;case"single-quoted-scalar":o=K.QUOTE_SINGLE,l=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),Kt(e.slice(1,-1)).replace(/''/g,"'")}(a,c);break;case"double-quoted-scalar":o=K.QUOTE_DOUBLE,l=function(e,t){let r="";for(let n=1;n<e.length-1;++n){const i=e[n];if("\r"!==i||"\n"!==e[n+1])if("\n"===i){const{fold:t,offset:i}=Wt(e,n);r+=t,n=i}else if("\\"===i){let i=e[++n];const a=jt[i];if(a)r+=a;else if("\n"===i)for(i=e[n+1];" "===i||"\t"===i;)i=e[1+ ++n];else if("\r"===i&&"\n"===e[n+1])for(i=e[1+ ++n];" "===i||"\t"===i;)i=e[1+ ++n];else if("x"===i||"u"===i||"U"===i){const a="x"===i?2:"u"===i?4:8;r+=$t(e,n+1,a,t),n+=a}else{const i=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),r+=i}}else if(" "===i||"\t"===i){const t=n;let a=e[n+1];for(;" "===a||"\t"===a;)a=e[1+ ++n];"\n"===a||"\r"===a&&"\n"===e[n+2]||(r+=n>t?e.slice(t,n+1):i)}else r+=i}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}(a,c);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+a.length,n+a.length]}}const d=n+a.length,u=Pt(s,d,t,r);return{value:l,type:o,comment:u.comment,range:[n,d,u.offset]}}function Kt(e){const t=/(.*?)\r?\n/sy;let r,n,i=t.exec(e);if(!i)return e;try{r=new RegExp("(?<![ \t])[ \t]+$"),n=new RegExp("^[ \t]+|(?<![ \t])[ \t]+$","g")}catch{r=/[ \t]+$/,n=/^[ \t]+|[ \t]+$/g}let a=i[1].replace(r,""),s=" ",o=t.lastIndex;for(;i=t.exec(e);){const e=i[1].replace(n,"");""===e?"\n"===s?a+=s:s="\n":(a+=s+e,s=" "),o=t.lastIndex}const l=/[ \t]*(.*)/sy;return l.lastIndex=o,i=l.exec(e),a+s+(i?.[1]??"")}function Wt(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 i=e.substr(t,r),a=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{const i=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),i}}function Xt(e,t,r,n){const{value:i,type:a,comment:s,range:o}="block-scalar"===t.type?Jt(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 d,u;d=e.options.stringKeys&&e.atKey?e.schema[c]:l?function(e,t,r,n,i){if("!"===r)return e[c];const a=[];for(const t of e.tags)if(!t.collection&&t.tag===r){if(!t.default||!t.test)return t;a.push(t)}for(const e of a)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):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),e[c])}(e.schema,i,l,r,n):"scalar"===t.type?function({atKey:e,directives:t,schema:r},n,i,a){const s=r.tags.find(t=>(!0===t.default||e&&"key"===t.default)&&t.test?.test(n))||r[c];if(r.compat){const e=r.compat.find(e=>e.default&&e.test?.test(n))??r[c];s.tag!==e.tag&&a(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${t.tagString(s.tag)} or ${t.tagString(e.tag)}`,!0)}return s}(e,i,t,n):e.schema[c];try{const a=d.resolve(i,e=>n(r??t,"TAG_RESOLVE_FAILED",e),e.options);u=y(a)?a:new K(a)}catch(e){const a=e instanceof Error?e.message:String(e);n(r??t,"TAG_RESOLVE_FAILED",a),u=new K(i)}return u.range=o,u.source=i,a&&(u.type=a),l&&(u.tag=l),d.format&&(u.format=d.format),s&&(u.comment=s),u}function qt(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 Gt={composeNode:zt,composeEmptyNode:Ht};function zt(e,t,r,n){const i=e.atKey,{spaceBefore:a,comment:s,anchor:o,tag:l}=r;let c,d=!0;switch(t.type){case"alias":c=function({options:e},{offset:t,source:r,end:n},i){const a=new Y(r.substring(1));""===a.source&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&i(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const s=t+r.length,o=Pt(n,s,e.strict,i);return a.range=[t,s,o.offset],o.comment&&(a.comment=o.comment),a}(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":c=Xt(e,t,l,n),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=function(e,t,r,n,i){const a=n.tag,s=a?t.directives.tagName(a.source,e=>i(a,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===r.type){const{anchor:e,newlineAfterProp:t}=n,r=e&&a?e.offset>a.offset?e:a:e??a;r&&(!t||t.offset<r.offset)&&i(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(!a||!s||"!"===s||s===ve.tagName&&"map"===o||s===_e.tagName&&"seq"===o)return Yt(e,t,r,i,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?i(a,"BAD_COLLECTION_TYPE",`${n.tag} used for ${o} collection, but expects ${n.collection??"scalar"}`,!0):i(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),Yt(e,t,r,i,s);t.schema.tags.push(Object.assign({},n,{default:!1})),l=n}const c=Yt(e,t,r,i,s,l),d=l.resolve?.(c,e=>i(a,"TAG_RESOLVE_FAILED",e),t.options)??c,u=E(d)?d:new K(d);return u.range=c.range,u.tag=s,l?.format&&(u.format=l.format),u}(Gt,e,t,r,n),o&&(c.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})`),d=!1}return c??(c=Ht(e,t.offset,void 0,null,r,n)),o&&""===c.anchor&&n(o,"BAD_ALIAS","Anchor cannot be an empty string"),i&&e.options.stringKeys&&(!y(c)||"string"!=typeof c.value||c.tag&&"tag:yaml.org,2002:str"!==c.tag)&&n(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),a&&(c.spaceBefore=!0),s&&("scalar"===t.type&&""===t.source?c.comment=s:c.commentBefore=s),e.options.keepSourceTokens&&d&&(c.srcToken=t),c}function Ht(e,t,r,n,{spaceBefore:i,comment:a,anchor:s,tag:o,end:l},c){const d=Xt(e,{type:"scalar",offset:qt(t,r,n),indent:-1,source:""},o,c);return s&&(d.anchor=s.source.substring(1),""===d.anchor&&c(s,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=l),d}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 i=0;i<e.length;++i){const a=e[i];switch(a[0]){case"#":t+=(""===t?"":n?"\n\n":"\n")+(a.substring(1)||" "),r=!0,n=!1;break;case"%":"#"!==e[i+1]?.[0]&&(i+=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 i=Qt(e);n?this.warnings.push(new Lt(i,t,r)):this.errors.push(new wt(i,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 i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${r}`:r;else if(n||e.directives.docStart||!i)e.commentBefore=r;else if(g(i)&&!i.flow&&i.items.length>0){let e=i.items[0];f(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${r}\n${t}`:r}else{const e=i.commentBefore;i.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 i=Qt(e);i[0]+=t,this.onError(i,"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:i,end:a},s){const o=Object.assign({_directives:t},e),l=new St(void 0,o),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},d=Vt(n,{indicator:"doc-start",next:i??a?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});d.found&&(l.directives.docStart=!0,!i||"block-map"!==i.type&&"block-seq"!==i.type||d.hasNewline||s(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?zt(c,i,d,s):Ht(c,d.end,n,null,d,s);const u=l.contents.range[2],m=Pt(a,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=Pt(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 St(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 i="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!r)throw new wt([i,i+1],t,n);r(i,t,n)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return kt(e,t,n);case"block-scalar":return Jt({options:{strict:t}},e,n)}}return null}function rr(e,t){const{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:a=-1,type:s="PLAIN"}=t,o=le({type:s,value:e},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:i,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",i=[{type:"block-scalar-header",offset:a,indent:n,source:t}];return ir(i,l)||i.push({type:"newline",offset:-1,indent:n,source:"\n"}),{type:"block-scalar",offset:a,indent:n,props:i,source:r}}case'"':return{type:"double-quoted-scalar",offset:a,indent:n,source:o,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:n,source:o,end:l};default:return{type:"scalar",offset:a,indent:n,source:o,end:l}}}function nr(e,t,r={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:a=!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:i||null===o,indent:null!==o&&o>0?" ".repeat(o):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":!function(e,t){const r=t.indexOf("\n"),n=t.substring(0,r),i=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=i}else{const{offset:t}=e,r="indent"in e?e.indent:-1,a=[{type:"block-scalar-header",offset:t,indent:r,source:n}];ir(a,"end"in e?e.end:void 0)||a.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:a,source:i})}}(e,l);break;case'"':ar(e,l,"double-quoted-scalar");break;case"'":ar(e,l,"single-quoted-scalar");break;default:ar(e,l,"scalar")}}function ir(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 ar(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 i=t.length;"block-scalar-header"===e.props[0].type&&(i-=e.props[0].source.length);for(const e of n)e.offset+=i;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,i="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:i})}}}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 i="";for(const t of e)i+=t.source;if(t&&(i+=or(t)),r)for(const e of r)i+=e.source;return n&&(i+=or(n)),i}const cr=Symbol("break visit"),dr=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 i of["key","value"]){const a=t[i];if(a&&"items"in a){for(let t=0;t<a.items.length;++t){const n=pr(Object.freeze(e.concat([[i,t]])),a.items[t],r);if("number"==typeof n)t=n-1;else{if(n===cr)return cr;n===ur&&(a.items.splice(t,1),t-=1)}}"function"==typeof n&&"key"===i&&(n=n(t,e))}}return"function"==typeof n?n(t,e):n}mr.BREAK=cr,mr.SKIP=dr,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],i=r?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};const hr="\ufeff",fr="",yr="",Tr="",gr=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 Cr(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-#;/?:@&=+$_.!~*'()"),vr=new Set(",[]{}"),Sr=new Set(" ,[]{}\n\r\t"),_r=e=>!e||Sr.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 i=0;for(;","===n[i];)i+=(yield*this.pushCount(1)),i+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(i+=(yield*this.pushIndicators()),n[i]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-i),"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 i=e;for(;" "===n;)n=this.buffer[--e];if(!("\n"===n&&e>=this.pos&&e+1+r>i))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&&vr.has(t))break;r=n}else if(Ar(t)){let i=this.buffer[n+1];if("\r"===t&&("\n"===i?(n+=1,t="\n",i=this.buffer[n+1]):r=n),"#"===i||e&&vr.has(i))break;if("\n"===t){const e=this.continueScalar(n+1);if(-1===e)break;n=Math.max(n,e-2)}}else{if(e&&vr.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&&vr.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 xr(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 Dr(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 Mr(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?Dr(t.value.end,t.sep):t.value.end=t.sep:Dr(t.start,t.sep),delete t.sep)}class Pr{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&&Mr(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=xr(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 Dr(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 i=[];if(n&&t.sep&&!t.value){const r=[];for(let n=0;n<t.sep.length;++n){const i=t.sep[n];switch(i.type){case"newline":r.push(n);break;case"space":break;case"comment":i.indent>e.indent&&(r.length=0);break;default:r.length=0}}r.length>=2&&(i=t.sep.splice(r[1]))}switch(this.type){case"anchor":case"tag":return void(n||t.value?(i.push(this.sourceToken),e.items.push({start:i}),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?(i.push(this.sourceToken),e.items.push({start:i,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:i,key:null,sep:[this.sourceToken]}]});else if(Vr(t.key)&&!Lr(t.sep,"newline")){const e=xr(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 i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(Lr(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=xr(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:i,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:i,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:i});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 Dr(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=xr(Or(t));Mr(e);const n=e.end.splice(1,e.end.length);n.push(this.sourceToken);const i={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]=i}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=xr(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=xr(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 Ur(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new wr||null,prettyErrors:t}}function Br(e,t={}){const{lineCounter:r,prettyErrors:n}=Ur(t),i=new Pr(r?.addNewLine),a=new er(t),s=Array.from(a.compose(i.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},a.streamInfo())}function Yr(e,t={}){const{lineCounter:r,prettyErrors:n}=Ur(t),i=new Pr(r?.addNewLine),a=new er(t);let s=null;for(const t of a.compose(i.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 Jr(e,t,r){let n;"function"==typeof t?n=t:void 0===r&&t&&"object"==typeof t&&(r=t);const i=Yr(e,r);if(!i)return null;if(i.warnings.forEach(e=>ue(i.options.logLevel,e)),i.errors.length>0){if("silent"!==i.options.logLevel)throw i.errors[0];i.errors=[]}return i.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 St(e,n,r).toString(r)}}};const t={};function r(n){const i=t[n];if(void 0!==i)return i.exports;const a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.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={};return(()=>{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.TemplateValueValidator=e.FieldValuePolicy=e.ValidationPolicy=e.RegexChecks=e.REGEX_WORKER_SOURCE=e.RegexPolicy=e.YamlSourcePolicy=e.JsonSourcePolicy=e.ExactDecimal=e.NumericPolicy=e.TimestampPolicy=e.DisplayText=e.IdentifierPolicy=e.TextPolicy=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 i=r(8810);Object.defineProperty(e,"CedarWriters",{enumerable:!0,get:function(){return i.CedarWriters}});const a=r(6568);Object.defineProperty(e,"CedarBuilders",{enumerable:!0,get:function(){return a.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 c=r(2748);Object.defineProperty(e,"JsonTemplateFieldWriter",{enumerable:!0,get:function(){return c.JsonTemplateFieldWriterInternal}});const d=r(5430);Object.defineProperty(e,"YamlTemplateFieldWriter",{enumerable:!0,get:function(){return d.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 g=r(3281);Object.defineProperty(e,"Template",{enumerable:!0,get:function(){return g.Template}});const E=r(766);Object.defineProperty(e,"TemplateBuilder",{enumerable:!0,get:function(){return E.TemplateBuilder}});const C=r(4925);Object.defineProperty(e,"TemplateInstanceBuilder",{enumerable:!0,get:function(){return C.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 v=r(7974);Object.defineProperty(e,"TemporalGranularity",{enumerable:!0,get:function(){return v.TemporalGranularity}});const S=r(3764);Object.defineProperty(e,"TimeFormat",{enumerable:!0,get:function(){return S.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 x=r(2480);Object.defineProperty(e,"ControlledTermDefaultValueBuilder",{enumerable:!0,get:function(){return x.ControlledTermDefaultValueBuilder}});const D=r(7295);Object.defineProperty(e,"ControlledTermDefaultValue",{enumerable:!0,get:function(){return D.ControlledTermDefaultValue}});const M=r(8446);Object.defineProperty(e,"IriSyntax",{enumerable:!0,get:function(){return M.IriSyntax}});const P=r(5753);Object.defineProperty(e,"ControlledTermVersion",{enumerable:!0,get:function(){return P.ControlledTermVersion}});const U=r(3910);Object.defineProperty(e,"BiboStatus",{enumerable:!0,get:function(){return U.BiboStatus}});const B=r(455);Object.defineProperty(e,"ChildDeploymentInfo",{enumerable:!0,get:function(){return B.ChildDeploymentInfo}});const Y=r(3608);Object.defineProperty(e,"ChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return Y.ChildDeploymentInfoBuilder}});const J=r(8534);Object.defineProperty(e,"CedarArtifactId",{enumerable:!0,get:function(){return J.CedarArtifactId}});const k=r(2888);Object.defineProperty(e,"ComparisonError",{enumerable:!0,get:function(){return k.ComparisonError}});const K=r(1888);Object.defineProperty(e,"RoundTrip",{enumerable:!0,get:function(){return K.RoundTrip}});const W=r(6389);Object.defineProperty(e,"PropertyIri",{enumerable:!0,get:function(){return W.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 q=r(8349);Object.defineProperty(e,"YamlValues",{enumerable:!0,get:function(){return q.YamlValues}});const G=r(4531);Object.defineProperty(e,"BioportalTermType",{enumerable:!0,get:function(){return G.BioportalTermType}});const z=r(8421);Object.defineProperty(e,"CedarFieldCategory",{enumerable:!0,get:function(){return z.CedarFieldCategory}});const H=r(2999);Object.defineProperty(e,"YamlTemplateFieldReader",{enumerable:!0,get:function(){return H.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 ie=r(978);Object.defineProperty(e,"JsonAbstractSchemaArtifactReader",{enumerable:!0,get:function(){return ie.JsonAbstractSchemaArtifactReader}});const ae=r(1998);Object.defineProperty(e,"CedarReaders",{enumerable:!0,get:function(){return ae.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 ce=r(3161);Object.defineProperty(e,"JsonAbstractArtifactWriter",{enumerable:!0,get:function(){return ce.JsonAbstractArtifactWriter}});const de=r(9760);Object.defineProperty(e,"ComparisonErrorType",{enumerable:!0,get:function(){return de.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 ge=r(7723);Object.defineProperty(e,"InstanceDataContainer",{enumerable:!0,get:function(){return ge.InstanceDataContainer}});const Ee=r(9327);Object.defineProperty(e,"InstanceDataAttributeValueField",{enumerable:!0,get:function(){return Ee.InstanceDataAttributeValueField}});const Ce=r(3644);Object.defineProperty(e,"InstanceDataAttributeValueFieldName",{enumerable:!0,get:function(){return Ce.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 ve=r(9167);Object.defineProperty(e,"InstanceDataLabelAtom",{enumerable:!0,get:function(){return ve.InstanceDataLabelAtom}});const Se=r(5222);Object.defineProperty(e,"InstanceDataStringAtom",{enumerable:!0,get:function(){return Se.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 xe=r(2234);Object.defineProperty(e,"CedarUser",{enumerable:!0,get:function(){return xe.CedarUser}});const De=r(8518);Object.defineProperty(e,"JsonArtifactReaderResult",{enumerable:!0,get:function(){return De.JsonArtifactReaderResult}});const Me=r(4948);Object.defineProperty(e,"JsonTemplateElementReaderResult",{enumerable:!0,get:function(){return Me.JsonTemplateElementReaderResult}});const Pe=r(6396);Object.defineProperty(e,"JsonTemplateFieldReaderResult",{enumerable:!0,get:function(){return Pe.JsonTemplateFieldReaderResult}});const Ue=r(6537);Object.defineProperty(e,"JsonTemplateInstanceReaderResult",{enumerable:!0,get:function(){return Ue.JsonTemplateInstanceReaderResult}});const Be=r(1027);Object.defineProperty(e,"PavVersion",{enumerable:!0,get:function(){return Be.PavVersion}});const Ye=r(3581);Object.defineProperty(e,"ChildDeploymentInfoStatic",{enumerable:!0,get:function(){return Ye.ChildDeploymentInfoStatic}});const Je=r(8290);Object.defineProperty(e,"ChildDeploymentInfoStaticBuilder",{enumerable:!0,get:function(){return Je.ChildDeploymentInfoStaticBuilder}});const ke=r(2266);Object.defineProperty(e,"ChildDeploymentInfoAlwaysSingle",{enumerable:!0,get:function(){return ke.ChildDeploymentInfoAlwaysSingle}});const Ke=r(587);Object.defineProperty(e,"ChildDeploymentInfoAlwaysSingleBuilder",{enumerable:!0,get:function(){return Ke.ChildDeploymentInfoAlwaysSingleBuilder}});const We=r(8878);Object.defineProperty(e,"ChildDeploymentInfoAlwaysMultiple",{enumerable:!0,get:function(){return We.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 qe=r(4809);Object.defineProperty(e,"AbstractDynamicChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return qe.AbstractDynamicChildDeploymentInfoBuilder}});const Ge=r(3812);Object.defineProperty(e,"AbstractDynamicChildDeploymentInfo",{enumerable:!0,get:function(){return Ge.AbstractDynamicChildDeploymentInfo}});const ze=r(9519);Object.defineProperty(e,"AbstractFieldChildDeploymentInfo",{enumerable:!0,get:function(){return ze.AbstractFieldChildDeploymentInfo}});const He=r(6096);Object.defineProperty(e,"AbstractFieldChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return He.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 it=r(3056);Object.defineProperty(e,"JsonObjectComparator",{enumerable:!0,get:function(){return it.JsonObjectComparator}});const at=r(7868);Object.defineProperty(e,"YamlTemplateReaderResult",{enumerable:!0,get:function(){return at.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 ct=r(147);Object.defineProperty(e,"YamlTemplateInstanceReaderResult",{enumerable:!0,get:function(){return ct.YamlTemplateInstanceReaderResult}});const dt=r(7752);Object.defineProperty(e,"Language",{enumerable:!0,get:function(){return dt.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}});var ft=r(3992);Object.defineProperty(e,"TextPolicy",{enumerable:!0,get:function(){return ft.TextPolicy}});var yt=r(2500);Object.defineProperty(e,"IdentifierPolicy",{enumerable:!0,get:function(){return yt.IdentifierPolicy}});var Tt=r(3068);Object.defineProperty(e,"DisplayText",{enumerable:!0,get:function(){return Tt.DisplayText}});var gt=r(5435);Object.defineProperty(e,"TimestampPolicy",{enumerable:!0,get:function(){return gt.TimestampPolicy}});var Et=r(2108);Object.defineProperty(e,"NumericPolicy",{enumerable:!0,get:function(){return Et.NumericPolicy}}),Object.defineProperty(e,"ExactDecimal",{enumerable:!0,get:function(){return Et.ExactDecimal}});var Ct=r(5904);Object.defineProperty(e,"JsonSourcePolicy",{enumerable:!0,get:function(){return Ct.JsonSourcePolicy}});var It=r(8979);Object.defineProperty(e,"YamlSourcePolicy",{enumerable:!0,get:function(){return It.YamlSourcePolicy}});var At=r(128);Object.defineProperty(e,"RegexPolicy",{enumerable:!0,get:function(){return At.RegexPolicy}}),Object.defineProperty(e,"REGEX_WORKER_SOURCE",{enumerable:!0,get:function(){return At.REGEX_WORKER_SOURCE}});var bt=r(1991);Object.defineProperty(e,"RegexChecks",{enumerable:!0,get:function(){return bt.RegexChecks}});var Rt=r(7092);Object.defineProperty(e,"ValidationPolicy",{enumerable:!0,get:function(){return Rt.ValidationPolicy}});var vt=r(6830);Object.defineProperty(e,"FieldValuePolicy",{enumerable:!0,get:function(){return vt.FieldValuePolicy}});var St=r(4257);Object.defineProperty(e,"TemplateValueValidator",{enumerable:!0,get:function(){return St.TemplateValueValidator}})})(),n})());
2
2
  //# sourceMappingURL=index.umd.js.map