@fluid-experimental/property-properties 2.70.0-360753 → 2.70.0-361092
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/properties/arrayProperty.d.ts +2 -2
- package/dist/properties/arrayProperty.js +2 -2
- package/dist/properties/arrayProperty.js.map +1 -1
- package/dist/properties/containerProperty.d.ts +2 -2
- package/dist/properties/containerProperty.js +2 -2
- package/dist/properties/containerProperty.js.map +1 -1
- package/dist/properties/indexedCollectionBaseProperty.d.ts +2 -2
- package/dist/properties/indexedCollectionBaseProperty.js +2 -2
- package/dist/properties/indexedCollectionBaseProperty.js.map +1 -1
- package/dist/properties/intProperties.d.ts.map +1 -1
- package/dist/properties/intProperties.js +5 -6
- package/dist/properties/intProperties.js.map +1 -1
- package/dist/properties/mapProperty.d.ts +2 -2
- package/dist/properties/mapProperty.js +2 -2
- package/dist/properties/mapProperty.js.map +1 -1
- package/dist/properties/valueProperty.d.ts +2 -2
- package/dist/properties/valueProperty.js +2 -2
- package/dist/properties/valueProperty.js.map +1 -1
- package/dist/propertyFactory.js +6 -6
- package/dist/propertyFactory.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +1 -1
- package/lib/properties/arrayProperty.d.ts +2 -2
- package/lib/properties/arrayProperty.js +2 -2
- package/lib/properties/arrayProperty.js.map +1 -1
- package/lib/properties/containerProperty.d.ts +2 -2
- package/lib/properties/containerProperty.js +2 -2
- package/lib/properties/containerProperty.js.map +1 -1
- package/lib/properties/indexedCollectionBaseProperty.d.ts +2 -2
- package/lib/properties/indexedCollectionBaseProperty.js +2 -2
- package/lib/properties/indexedCollectionBaseProperty.js.map +1 -1
- package/lib/properties/intProperties.d.ts.map +1 -1
- package/lib/properties/intProperties.js +5 -6
- package/lib/properties/intProperties.js.map +1 -1
- package/lib/properties/mapProperty.d.ts +2 -2
- package/lib/properties/mapProperty.js +2 -2
- package/lib/properties/mapProperty.js.map +1 -1
- package/lib/properties/valueProperty.d.ts +2 -2
- package/lib/properties/valueProperty.js +2 -2
- package/lib/properties/valueProperty.js.map +1 -1
- package/lib/propertyFactory.js +6 -6
- package/lib/propertyFactory.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propertyFactory.js","sourceRoot":"","sources":["../src/propertyFactory.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,0FAA0F;AAC1F,iCAAiC;AAEjC;;;GAGG;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;AAElC,MAAM,EACL,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,SAAS,GACT,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACnD,MAAM,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC;AAE1B,MAAM,EACL,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,SAAS,GACT,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AAEtD,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/B,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAC3D,MAAM,EAAE,uBAAuB,EAAE,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAEzE,+BAA+B;AAC/B,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAC9D,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAChE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAC9D,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,gCAAgC,CAAC,CA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GAAG,oBAAoB,CAAC;AACjE,oBAAoB,CAAC,YAAY,GAAG,YAAY,CAAC;AACjD,oBAAoB,CAAC,eAAe,GAAG,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// These imports are grouped manually to ensure that the imports are in the correct order.\n/* eslint-disable import/order */\n\n/**\n * @fileoverview Declaration of the PropertyFactory class.\n * Responsible for creating property sets and registering property templates\n */\n\nconst _ = require(\"lodash\");\nconst { cloneDeep: deepCopy } = _;\n\nconst {\n\tCollection,\n\tConsoleUtils,\n\tEventEmitter,\n\tSortedCollection,\n\tconstants,\n\tGuidUtils,\n} = require(\"@fluid-experimental/property-common\");\nconst { MSG } = constants;\n\nconst {\n\tTypeIdHelper,\n\tTemplateValidator,\n\tPathHelper,\n\tChangeSet,\n} = require(\"@fluid-experimental/property-changeset\");\n\nconst semver = require(\"semver\");\nconst async = require(\"async\");\nconst { PropertyTemplate } = require(\"./propertyTemplate\");\nconst { PropertyTemplateWrapper } = require(\"./propertyTemplateWrapper\");\n\n// Include the property classes\nconst { BaseProperty } = require(\"./properties/baseProperty\");\nconst { NamedProperty } = require(\"./properties/namedProperty\");\nconst { NodeProperty } = require(\"./properties/nodeProperty\");\nconst { NamedNodeProperty } = require(\"./properties/namedNodeProperty\");\nconst { ContainerProperty } = require(\"./properties/containerProperty\");\nconst { ValueProperty } = require(\"./properties/valueProperty\");\n\n// Include all primitive properties –- will register at the end.\nconst {\n\tUint8Property,\n\tUint16Property,\n\tUint32Property,\n} = require(\"./properties/uintProperties\");\n\nconst { Float32Property, Float64Property } = require(\"./properties/floatProperties\");\n\nconst {\n\tInt8Property,\n\tInt16Property,\n\tInt32Property,\n\tInt64Property,\n\tUint64Property,\n} = require(\"./properties/intProperties\");\n\nconst { StringProperty } = require(\"./properties/stringProperty\");\nconst { BoolProperty } = require(\"./properties/boolProperty\");\nconst { ReferenceProperty } = require(\"./properties/referenceProperty\");\nconst { EnumProperty } = require(\"./properties/enumProperty\");\n\n// Include collection properties\nconst { ArrayProperty } = require(\"./properties/arrayProperty\");\nconst { SetProperty } = require(\"./properties/setProperty\");\nconst { MapProperty } = require(\"./properties/mapProperty\");\nconst { ValueMapProperty } = require(\"./properties/valueMapProperty\");\nconst {\n\tIndexedCollectionBaseProperty,\n} = require(\"./properties/indexedCollectionBaseProperty\");\nconst {\n\tAbstractStaticCollectionProperty,\n} = require(\"./properties/abstractStaticCollectionProperty\");\n\nconst {\n\tFloat32ArrayProperty,\n\tFloat64ArrayProperty,\n\tUint32ArrayProperty,\n\tInt32ArrayProperty,\n\tUint64ArrayProperty,\n\tInt64ArrayProperty,\n\tUint16ArrayProperty,\n\tInt16ArrayProperty,\n\tUint8ArrayProperty,\n\tInt8ArrayProperty,\n\tStringArrayProperty,\n\tBoolArrayProperty,\n} = require(\"./properties/valueArrayProperty\");\n\nconst { ReferenceMapProperty } = require(\"./properties/referenceMapProperty\");\nconst { ReferenceArrayProperty } = require(\"./properties/referenceArrayProperty\");\nconst { EnumArrayProperty } = require(\"./properties/enumArrayProperty\");\n\nconst {\n\tFloat64MapProperty,\n\tFloat32MapProperty,\n\tUint32MapProperty,\n\tUint64MapProperty,\n\tUint16MapProperty,\n\tUint8MapProperty,\n\tInt32MapProperty,\n\tInt64MapProperty,\n\tInt16MapProperty,\n\tInt8MapProperty,\n\tStringMapProperty,\n\tBoolMapProperty,\n} = require(\"./properties/valueMapProperty\");\n\nconst { LazyLoadedProperties } = require(\"./properties/lazyLoadedProperties\");\n\n/* eslint-enable import/order */\n\n/**\n * Creates an instance of the TemplateValidator\n *\n * @constructor\n * @protected\n *\n * @param {bool} skipSemver - Flag passed to the constructor of the TemplateValidator. Skips semver validation.\n *\n * @ignore\n */\nvar _createTemplateValidator = function (skipSemver) {\n\tvar hasSchema = function (typeid) {\n\t\treturn this._localVersionedTemplates.has(typeid);\n\t};\n\tvar params = {\n\t\tinheritsFrom: this.inheritsFrom.bind(this),\n\t\thasSchema: hasSchema.bind(this),\n\t};\n\n\tif (skipSemver) {\n\t\tparams.skipSemver = skipSemver;\n\t}\n\n\treturn new TemplateValidator(params);\n};\n\n/**\n * Register a template\n *\n * @private\n *\n * @throws if in_template is invalid.\n * @throws if trying to register a primitive property.\n * @throws if updating an existing template without property changing the version number.\n * @throws if no in_template is passed.\n * @param {property-properties.PropertyTemplate|object} in_template - the template to register.\n */\nvar registerLocal = function (in_template) {\n\tvar typeid = in_template.typeid;\n\tvar remoteTemplates = this._getRemoteTemplates(typeid);\n\n\tif (!this._isNativePropertyConstructor(in_template)) {\n\t\tif (!(in_template instanceof PropertyTemplate)) {\n\t\t\tin_template = new PropertyTemplate(in_template);\n\t\t}\n\n\t\t// Here we are registering a user defined template. We need to check whether it is already registered\n\t\t// as a remote template.\n\t\tif (this._localPrimitivePropertiesAndTemplates.has(typeid) || remoteTemplates.length) {\n\t\t\t// Template already exists. The incoming template MUST match what is currently registered.\n\t\t\t// If they do not match, throw an error letting the user know that the templates are incompatible.\n\n\t\t\tif (!remoteTemplates.length) {\n\t\t\t\tconsole.warn(MSG.REGISTERING_EXISTING_TYPEID + typeid);\n\t\t\t}\n\n\t\t\tvar templateValidator = _createTemplateValidator.call(this, true);\n\n\t\t\tvar serializedInTemplate = in_template.serializeCanonical();\n\n\t\t\tvar localValidationResults = { isValid: true };\n\t\t\tif (this._localPrimitivePropertiesAndTemplates.has(typeid)) {\n\t\t\t\tvar localRegisteredTemplate = this._localPrimitivePropertiesAndTemplates\n\t\t\t\t\t.item(typeid)\n\t\t\t\t\t.getPropertyTemplate();\n\n\t\t\t\tlocalValidationResults = templateValidator.validate(\n\t\t\t\t\tlocalRegisteredTemplate.serializeCanonical(),\n\t\t\t\t\tserializedInTemplate,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (localValidationResults.isValid) {\n\t\t\t\tvar remoteValidationResults = { isValid: true };\n\t\t\t\tif (remoteTemplates.length) {\n\t\t\t\t\t_.every(remoteTemplates, function (template) {\n\t\t\t\t\t\tremoteValidationResults = templateValidator.validate(\n\t\t\t\t\t\t\ttemplate.serializeCanonical(),\n\t\t\t\t\t\t\tserializedInTemplate,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn remoteValidationResults.isValid;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!localValidationResults.isValid) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\tMSG.TEMPLATE_MISMATCH +\n\t\t\t\t\t\ttypeid +\n\t\t\t\t\t\t\"\\n errors = \" +\n\t\t\t\t\t\tJSON.stringify(_extractErrorMessage(localValidationResults.errors), 0, 2),\n\t\t\t\t);\n\t\t\t} else if (!remoteValidationResults.isValid) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\tMSG.REMOTE_TEMPLATE_MISMATCH +\n\t\t\t\t\t\ttypeid +\n\t\t\t\t\t\t\"\\n errors = \" +\n\t\t\t\t\t\tJSON.stringify(_extractErrorMessage(remoteValidationResults.errors), 0, 2),\n\t\t\t\t);\n\t\t\t} else if (this._localPrimitivePropertiesAndTemplates.has(typeid)) {\n\t\t\t\t// Template is already registered. Do nothing.\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (in_template._isVersioned()) {\n\t\t\tvar validationResult = this.validate(in_template.serializeCanonical());\n\n\t\t\tif (validationResult.isValid) {\n\t\t\t\tvar typeidWithoutVersion = in_template.getTypeidWithoutVersion();\n\t\t\t\tvar version = in_template.getVersion();\n\t\t\t\tthis._validateSemver(in_template, true);\n\n\t\t\t\t// Semver validation passed. Add the template to the local versioned templates collection\n\t\t\t\tif (this._localVersionedTemplates.has(typeidWithoutVersion)) {\n\t\t\t\t\tthis._localVersionedTemplates.item(typeidWithoutVersion).add(version, in_template);\n\t\t\t\t} else {\n\t\t\t\t\tvar collection = _createVersionedSortedCollection();\n\t\t\t\t\tthis._localVersionedTemplates.add(typeidWithoutVersion, collection);\n\t\t\t\t\tcollection.add(version, in_template);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\n\t\t\t\t\tMSG.FAILED_TO_REGISTER +\n\t\t\t\t\t\ttypeid +\n\t\t\t\t\t\t\"\\n errors = \" +\n\t\t\t\t\t\tJSON.stringify(_extractErrorMessage(validationResult.errors), 0, 2),\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Error(\n\t\t\t\tMSG.UNVERSIONED_TEMPLATE + \" Template with typeid = \" + typeid + \" is not versioned.\",\n\t\t\t);\n\t\t}\n\t\t// Forward to the internal function\n\t\tthis._registerTypeId(typeid, in_template);\n\t} else {\n\t\tthrow new Error(MSG.CANNOT_REGISTER_PRIMITIVE + typeid);\n\t}\n};\n\n/**\n * Helper function used to extract the error messages from a list of Error objects\n * @param {Array.<Error>} in_errors - List of error objects\n * @private\n * @returns {Array.<string>} List of error messages\n */\nvar _extractErrorMessage = function (in_errors) {\n\treturn _.map(in_errors, function (error) {\n\t\treturn error.message;\n\t});\n};\n\n/**\n * Helper function used to create a sorted collection\n * @returns {property-common.Datastructures.SortedCollection} Empty sorted collection\n * @private\n */\nvar _createVersionedSortedCollection = function () {\n\tvar collection = new SortedCollection();\n\tcollection.setComparisonFunction(function (versionA, versionB) {\n\t\tif (semver.gt(versionA, versionB)) {\n\t\t\treturn 1;\n\t\t} else if (semver.lt(versionA, versionB)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn 0;\n\t});\n\treturn collection;\n};\n\n/**\n * Extracts typeids directly referred to in a template and that are not locally known\n *\n * @public\n * @param {property-properties.PropertyTemplate|object} in_template - from which to extract dependencies\n *\n * @returns {Array} list of unknown typeids\n */\nvar _extractUnknownDependencies = function (in_template) {\n\tvar self = this;\n\tvar dependencies = PropertyTemplate.extractDependencies(in_template);\n\n\tdependencies = dependencies.filter(function (typeid) {\n\t\treturn !self._localPrimitivePropertiesAndTemplates.has(typeid);\n\t});\n\n\treturn dependencies;\n};\n\n/**\n * Pushes a template request task onto the template requests queue\n *\n * @public\n * @param {String} in_typeid - typeid of the template to retrieve\n */\nvar _pushTemplateRequestTask = function (in_typeid) {\n\tvar that = this;\n\n\tif (that.missingDependencies[in_typeid].requested === true) {\n\t\treturn;\n\t}\n\tthat.missingDependencies[in_typeid].requested = true;\n\n\tthis.templateRequestsQueue.push(\n\t\t{ typeid: in_typeid, context: that._templateStore },\n\t\tfunction (response) {\n\t\t\tif (response.error) {\n\t\t\t\tthat.templateRequestsResults.errors[in_typeid] = response.error;\n\t\t\t} else {\n\t\t\t\tvar template = response.template;\n\t\t\t\tthat.templateRequestsResults.schemas[in_typeid] = template;\n\t\t\t\tvar unknownDependencies = _extractUnknownDependencies.call(that, template);\n\n\t\t\t\ttry {\n\t\t\t\t\tregisterLocal.call(that, template);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthat.templateRequestsResults.errors[in_typeid] = [error];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Launch new requests for those dependencies\n\t\t\t\tfor (var d = 0; d < unknownDependencies.length; d++) {\n\t\t\t\t\tvar typeid = unknownDependencies[d];\n\n\t\t\t\t\tif (that.missingDependencies[typeid] === undefined) {\n\t\t\t\t\t\tthat.missingDependencies[typeid] = { requested: false };\n\t\t\t\t\t\tif (that.templateRequestsResults.errors[typeid] === undefined) {\n\t\t\t\t\t\t\tthat.templateRequestsResults.errors[typeid] = {};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (that.templateRequestsResults.schemas[typeid] === undefined) {\n\t\t\t\t\t\t\tthat.templateRequestsResults.schemas[typeid] = {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t_pushTemplateRequestTask.call(that, typeid);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdelete that.missingDependencies[template.typeid];\n\t\t\t}\n\t\t},\n\t);\n};\n\n/**\n * Creates a new collection of property templates used later on\n * to instantiate property sets based on the typeid (Type identifier).\n */\nclass PropertyFactory {\n\t/**\n\t * @constructor\n\t * @protected\n\t * @alias property-properties.PropertyFactory\n\t */\n\tconstructor() {\n\t\t// Unfortunately, PropertyFactory can't inherit from EventEmitter class as\n\t\t// it shares the same member methods names `register` and `unregister`.\n\t\tthis._eventEmitter = new EventEmitter();\n\n\t\tthis._templateValidator = _createTemplateValidator.call(this);\n\n\t\t// Collection containing both local templates and primitive properties\n\t\tthis._localPrimitivePropertiesAndTemplates = new Collection();\n\n\t\t// Collection containing the local templates sorted by their version number in an ascending order\n\t\tthis._localVersionedTemplates = new Collection();\n\n\t\t// Collection containing the remote templates sorted by their version number in an ascending order\n\t\t// within a specified scope.\n\t\tthis._remoteScopedAndVersionedTemplates = new Collection();\n\n\t\t// To hold the template store the PropertyFactory interacts with.\n\t\tthis._templateStore = undefined;\n\n\t\t// Async queue of schema retrieval tasks\n\t\tthis.templateRequestsQueue = undefined;\n\n\t\t// List of missing dependencies\n\t\tthis.missingDependencies = undefined;\n\n\t\t// Structure containing results the process of retrieving property set schemas from store\n\t\tthis.templateRequestsResults = {\n\t\t\terrors: {},\n\t\t\tschemas: {},\n\t\t};\n\n\t\t// Cache of inheritsFrom() request results\n\t\tthis._inheritanceCache = {};\n\n\t\t/** Cache of constructor function that are auto-generated for typeids */\n\t\tthis._typedPropertyConstructorCache = {};\n\n\t\t/** A cache of functions that create the properties */\n\t\tthis._cachedCreationFunctions = new Map();\n\n\t\t/**\n\t\t * Usually we will use the precompiled creation functions, but those all share the same constant properties.\n\t\t * Since it is allowed to overwrite constants via default values, we have to explicitly instantiate new\n\t\t * property instances for constants. Since the constants themselves may contain nested property instances,\n\t\t * we use this flag to indicate that for all nested properties, we do not want to use the precompiled\n\t\t * instantiation functions.\n\t\t */\n\t\tthis._forceInstantion = false;\n\n\t\tthis._init();\n\t}\n\n\t/**\n\t * Add a listener for a given type of event.\n\t *\n\t * @param {string} eventName - A string representing the type of event upon which the\n\t * listener will be notified.\n\t * @param {function} eventListener - The function to call when the \"type\" of event\n\t * is emitted.\n\t */\n\taddListener(eventName, eventListener) {\n\t\tthis._eventEmitter.addListener(eventName, eventListener);\n\t}\n\n\t/**\n\t * Remove a listener for a given type of event. Iff a listener was removed,\n\t * an event 'removeListener' will be emitted.\n\t *\n\t * @param {string} eventName - A string representing the type of event on which the\n\t * listener was attached.\n\t * @param {function} eventListener - The function to remove from the list of functions\n\t */\n\tremoveListener(eventName, eventListener) {\n\t\tthis._eventEmitter.removeListener(eventName, eventListener);\n\t}\n\n\t/**\n\t * Initialize the PropertyFactory by registering primitive types\n\t */\n\t_init() {\n\t\t// Register all primitive properties\n\t\tthis._registerTypeId(\"BaseProperty\", BaseProperty, \"all\");\n\t\tthis._registerTypeId(\"NodeProperty\", NodeProperty, \"all\");\n\t\tthis._registerTypeId(\"ContainerProperty\", ContainerProperty, \"all\");\n\n\t\t// Register the primitive types for the context single\n\t\tthis._registerTypeId(\"Int8\", Int8Property);\n\t\tthis._registerTypeId(\"Uint8\", Uint8Property);\n\t\tthis._registerTypeId(\"Int16\", Int16Property);\n\t\tthis._registerTypeId(\"Uint16\", Uint16Property);\n\t\tthis._registerTypeId(\"Int32\", Int32Property);\n\t\tthis._registerTypeId(\"Int64\", Int64Property);\n\t\tthis._registerTypeId(\"Uint64\", Uint64Property);\n\t\tthis._registerTypeId(\"Uint32\", Uint32Property);\n\t\tthis._registerTypeId(\"Float32\", Float32Property);\n\t\tthis._registerTypeId(\"Float64\", Float64Property);\n\t\tthis._registerTypeId(\"Bool\", BoolProperty);\n\t\tthis._registerTypeId(\"String\", StringProperty);\n\t\tthis._registerTypeId(\"Reference\", ReferenceProperty);\n\t\tthis._registerTypeId(\"Enum\", EnumProperty);\n\n\t\t// Register the primitive types for the context array\n\t\tthis._registerTypeId(\"Int8\", Int8ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Uint8\", Uint8ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Int16\", Int16ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Uint16\", Uint16ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Int32\", Int32ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Uint32\", Uint32ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Int64\", Int64ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Uint64\", Uint64ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Float32\", Float32ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Float64\", Float64ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"String\", StringArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Bool\", BoolArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Reference\", ReferenceArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Enum\", EnumArrayProperty, \"array\");\n\n\t\t// Register the primitive types for the context map\n\t\tthis._registerTypeId(\"Int8\", Int8MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Uint8\", Uint8MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Int16\", Int16MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Uint16\", Uint16MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Int32\", Int32MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Uint32\", Uint32MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Int64\", Int64MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Uint64\", Uint64MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Float32\", Float32MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Float64\", Float64MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Bool\", BoolMapProperty, \"map\");\n\t\tthis._registerTypeId(\"String\", StringMapProperty, \"map\");\n\t\tthis._registerTypeId(\"Reference\", ReferenceMapProperty, \"map\");\n\n\t\t// Register the default templates\n\t\tvar NamedPropertyTemplate = {\n\t\t\ttypeid: \"NamedProperty\",\n\t\t\tproperties: [{ id: \"guid\", typeid: \"String\" }],\n\t\t};\n\n\t\tvar NamedNodePropertyTemplate = {\n\t\t\ttypeid: \"NamedNodeProperty\",\n\t\t\tinherits: [\"NodeProperty\", \"NamedProperty\"],\n\t\t};\n\n\t\tvar RelationshipPropertyTemplate = {\n\t\t\ttypeid: \"RelationshipProperty\",\n\t\t\tinherits: [\"NodeProperty\", \"NamedProperty\"],\n\t\t\tproperties: [{ id: \"to\", typeid: \"Reference\" }],\n\t\t};\n\n\t\tthis._registerTypeId(NamedPropertyTemplate.typeid, NamedPropertyTemplate);\n\t\tthis._registerTypeId(NamedNodePropertyTemplate.typeid, NamedNodePropertyTemplate);\n\t\tthis._registerTypeId(RelationshipPropertyTemplate.typeid, RelationshipPropertyTemplate);\n\t}\n\n\t/**\n\t * Register a template which are used to instantiate properties. To find out more about templates,\n\t * see https://docs.google.com/document/d/1-7kXkKTu3AZLjKyKl7XK2VuAJRSbUxo3ZuPA8bzWocs/edit\n\t *\n\t * In addition to json structures\n\t * it also accepts typeids, as well as arrays of jsons ans arrays of typeids\n\t * as arguments. IN the case of jsons, the behavior is similar to the behavior of registerLocal.\n\t * In the case of typeids, it adds it to a list of unknown dependencies if the corresponding template\n\t * is not known locally. The case of arrays is a a repetitive application of the scalar type.\n\t *\n\t * @param {property-properties.PropertyTemplate|object|String|Array} in_input - a template, a typeid or an array of either\n\t */\n\tregister(in_input) {\n\t\tif (this.missingDependencies === undefined) {\n\t\t\tthis.missingDependencies = {};\n\t\t}\n\n\t\t// 3 cases to consider:\n\n\t\t// 1. in_input is an object\n\t\t// Determine the list of dependencies and if at least one is not available locally.\n\t\t// If this is the case, add it to the list of pending dependencies.\n\t\t// If no missing dependency, call registerLocal on the object (Classical case)\n\n\t\t// 2. in_input is a string (typeid)\n\t\t// If in_input is a type id that cannot be resolved locally, add it to the list of missing dependencies.\n\t\t// Otherwise, nothing to do. The corresponding template is already registered locally.\n\n\t\t// 3. in_input is an array of strings (typeids) or jsons\n\t\t// apply step 1. or 2. for all elements of array\n\n\t\tvar validateArray = function (array) {\n\t\t\tvar isInvalid = _.some(array, function (value) {\n\t\t\t\treturn !PropertyTemplate.isTemplate(value) && !TypeIdHelper.isTemplateTypeid(value);\n\t\t\t});\n\n\t\t\treturn !isInvalid;\n\t\t};\n\n\t\tvar input_array = undefined;\n\t\tif (PropertyTemplate.isTemplate(in_input) || typeof in_input === \"string\") {\n\t\t\tinput_array = [in_input];\n\t\t} else if (_.isArray(in_input)) {\n\t\t\tinput_array = in_input;\n\t\t} else {\n\t\t\tthrow new TypeError(MSG.ATTEMPT_TO_REGISTER_WITH_BAD_ARGUMENT);\n\t\t}\n\n\t\tif (!validateArray(input_array)) {\n\t\t\tthrow new Error(MSG.ATTEMPT_TO_REGISTER_WITH_BAD_ARGUMENT);\n\t\t}\n\n\t\tfor (var i = 0; i < input_array.length; i++) {\n\t\t\tvar elem = input_array[i];\n\t\t\tif (typeof elem === \"string\") {\n\t\t\t\tif (!this._localPrimitivePropertiesAndTemplates.has(elem)) {\n\t\t\t\t\tif (this.missingDependencies[elem] === undefined) {\n\t\t\t\t\t\tthis.missingDependencies[elem] = { requested: false };\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (PropertyTemplate.isTemplate(elem)) {\n\t\t\t\tif (this.missingDependencies[elem.typeid] !== undefined) {\n\t\t\t\t\tdelete this.missingDependencies[elem.typeid];\n\t\t\t\t}\n\t\t\t\tregisterLocal.call(this, elem);\n\t\t\t\tdelete this.missingDependencies[elem];\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @returns {Array.<string>} Array of the names of the registered types.\n\t */\n\tlistRegisteredTypes() {\n\t\treturn Array.from(this._localPrimitivePropertiesAndTemplates.keys);\n\t}\n\n\t/**\n\t * Recursively parses the object of the specified type and returns the created\n\t * array of PropertySets Templates. It does the same thing as the registerFrom()\n\t * function, but it returns the array of templates instead of registering them.\n\t * Throws an error if any conversion error occurs.\n\t *\n\t * @param {String} in_fromType - The type of the object to convert.\n\t * The only type supported so far is 'JSONSchema'.\n\t * @param {Object} in_toConvert - The object to convert\n\t * @throws if in_fromType is not valid.\n\t * @throws if the in_toConvert object is not a valid template.\n\t * @returns {Array.<object>} Array of Property Sets Templates\n\t */\n\tconvertToTemplates(in_fromType, in_toConvert) {\n\t\tswitch (in_fromType) {\n\t\t\tdefault:\n\t\t\t\tthrow new Error(MSG.UNKNOWN_TYPE + in_fromType);\n\t\t}\n\t}\n\n\t/**\n\t * Recursively parses the object of the specified type and registers the created\n\t * Property Sets Templates. It does the same work as the convertToTemplates()\n\t * function, but it registers the templates for you instead of returning them.\n\t * Throws an error if any conversion error occurs.\n\t *\n\t * @param {String} in_fromType - The type of the object to convert.\n\t * The only type supported so far is 'JSONSchema'.\n\t * @param {Object} in_toConvert - The object to convert\n\t * @throws if in_toConvert is not valid.\n\t * @throws if in_fromType is not a valid object type.\n\t */\n\tregisterFrom(in_fromType, in_toConvert) {\n\t\tvar psetsTemplates = this.convertToTemplates(in_fromType, in_toConvert);\n\t\tfor (var i = 0; i < psetsTemplates.length; i++) {\n\t\t\tthis.register(psetsTemplates[i]);\n\t\t}\n\t}\n\n\t/**\n\t * Validate semver.\n\t * Here we compare the incoming template with its previous/next version in the\n\t * local and remote registry with the intent of detecting semver violations.\n\t * The semver rules for templates are as follows:\n\t *\n\t * - If the template structure has been altered (delete/modify existing field) then the MAJOR version should be\n\t * bumped.\n\t *\n\t * - If the template structure has been extended (add new fields) then the MINOR version should be bumped.\n\t *\n\t * - If the annotation field has been updated then the PATCH version should be bumped.\n\t *\n\t * If any of these rules have been broken then a warning message is printed onto the console.\n\t *\n\t * @param {object|property-properties.PropertyTemplate} in_template - The template to compare against\n\t * its previous or next versions.\n\t * @param {boolean} in_compareRemote - Flag indicating whether we want to compare the given\n\t * template against the remote registry.\n\t *\n\t * @private\n\t */\n\t_validateSemver(in_template, in_compareRemote) {\n\t\tvar typeidWithoutVersion = in_template.getTypeidWithoutVersion();\n\t\tvar version = in_template.getVersion();\n\t\tvar typeid = in_template.typeid;\n\t\tvar validationResults;\n\n\t\tvar warnings = [];\n\n\t\tif (this._localVersionedTemplates.has(typeidWithoutVersion)) {\n\t\t\tvar previousLocalVersion = this._localVersionedTemplates\n\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t.getNearestPreviousItem(version);\n\n\t\t\tif (previousLocalVersion) {\n\t\t\t\tvalidationResults = this._templateValidator.validate(\n\t\t\t\t\tin_template.serializeCanonical(),\n\t\t\t\t\tpreviousLocalVersion.serializeCanonical(),\n\t\t\t\t);\n\t\t\t\twarnings.push.apply(warnings, validationResults.warnings);\n\t\t\t} else {\n\t\t\t\tvar nextLocalVersion = this._localVersionedTemplates\n\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t.getNearestNextItem(version);\n\t\t\t\tif (nextLocalVersion) {\n\t\t\t\t\tvalidationResults = this._templateValidator.validate(\n\t\t\t\t\t\tnextLocalVersion.serializeCanonical(),\n\t\t\t\t\t\tin_template.serializeCanonical(),\n\t\t\t\t\t);\n\t\t\t\t\twarnings.push.apply(warnings, validationResults.warnings);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (in_compareRemote) {\n\t\t\tvar that = this;\n\t\t\tthis._remoteScopedAndVersionedTemplates.iterate(\n\t\t\t\tfunction (scope, remoteVersionedTemplates) {\n\t\t\t\t\tif (remoteVersionedTemplates.has(typeidWithoutVersion)) {\n\t\t\t\t\t\tvar previousRemoteVersion = remoteVersionedTemplates\n\t\t\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t\t\t.getNearestPreviousItem(version);\n\n\t\t\t\t\t\tif (previousRemoteVersion) {\n\t\t\t\t\t\t\tvalidationResults = that._templateValidator.validate(\n\t\t\t\t\t\t\t\tin_template.serializeCanonical(),\n\t\t\t\t\t\t\t\tpreviousRemoteVersion.getPropertyTemplate().serializeCanonical(),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\twarnings.push.apply(warnings, validationResults.warnings);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar nextRemoteVersion = remoteVersionedTemplates\n\t\t\t\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t\t\t\t.getNearestNextItem(version);\n\t\t\t\t\t\t\tif (nextRemoteVersion) {\n\t\t\t\t\t\t\t\tvalidationResults = that._templateValidator.validate(\n\t\t\t\t\t\t\t\t\tnextRemoteVersion.getPropertyTemplate().serializeCanonical(),\n\t\t\t\t\t\t\t\t\tin_template.serializeCanonical(),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\twarnings.push.apply(warnings, validationResults.warnings);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\n\t\tif (!_.isEmpty(warnings)) {\n\t\t\tconsole.warn(\n\t\t\t\t\"Template with typeid = \" +\n\t\t\t\t\ttypeid +\n\t\t\t\t\t\" is valid but with the following warnings = \" +\n\t\t\t\t\tJSON.stringify(warnings, 0, 2),\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Internal method used to register remote templates coming over the wire.\n\t * @param {property-properties.PropertyTemplate|object} in_remoteTemplate - The remote template to register\n\t * @param {string} in_scope - The scope in which the template will be stored in. The scope is usually determined by\n\t * the currently checked out workspaces. Each workspace can have their own set of versioned templates\n\t * that may be different from other workspaces.\n\t * @protected\n\t */\n\t_registerRemoteTemplate(in_remoteTemplate, in_scope) {\n\t\tif (!(in_remoteTemplate instanceof PropertyTemplate)) {\n\t\t\tin_remoteTemplate = new PropertyTemplate(in_remoteTemplate);\n\t\t}\n\n\t\tvar typeidWithoutVersion = in_remoteTemplate.getTypeidWithoutVersion();\n\t\tvar version = in_remoteTemplate.getVersion();\n\t\tvar typeid = in_remoteTemplate.typeid;\n\n\t\tif (this._localPrimitivePropertiesAndTemplates.has(typeid)) {\n\t\t\t// Template already exists. The incoming template MUST match what is registered.\n\t\t\t// If they do not match, throw an error letting the user know that the templates are incompatible.\n\t\t\t// This is likely due to the fact that the developer did not bump its version.\n\t\t\tvar registeredTemplate = this._localPrimitivePropertiesAndTemplates\n\t\t\t\t.item(typeid)\n\t\t\t\t.getPropertyTemplate();\n\n\t\t\tvar templateValidator = _createTemplateValidator.call(this);\n\t\t\tvar validationResults = templateValidator.validate(\n\t\t\t\tregisteredTemplate.serializeCanonical(),\n\t\t\t\tin_remoteTemplate.serializeCanonical(),\n\t\t\t);\n\t\t\tif (!validationResults.isValid) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\tMSG.TEMPLATE_MISMATCH +\n\t\t\t\t\t\ttypeid +\n\t\t\t\t\t\t\"\\n errors = \" +\n\t\t\t\t\t\tJSON.stringify(_extractErrorMessage(validationResults.errors), 0, 2),\n\t\t\t\t);\n\t\t\t}\n\t\t} else if (in_remoteTemplate._isVersioned()) {\n\t\t\tthis._validateSemver(in_remoteTemplate);\n\t\t\tvar wrappedTemplate = new PropertyTemplateWrapper(in_remoteTemplate, in_scope);\n\n\t\t\tif (this._remoteScopedAndVersionedTemplates.has(in_scope)) {\n\t\t\t\tif (this._remoteScopedAndVersionedTemplates.item(in_scope).has(typeidWithoutVersion)) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t!this._remoteScopedAndVersionedTemplates\n\t\t\t\t\t\t\t.item(in_scope)\n\t\t\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t\t\t.has(version)\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis._remoteScopedAndVersionedTemplates\n\t\t\t\t\t\t\t.item(in_scope)\n\t\t\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t\t\t.add(version, wrappedTemplate);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar versionCollection = _createVersionedSortedCollection();\n\t\t\t\t\tversionCollection.add(version, wrappedTemplate);\n\t\t\t\t\tthis._remoteScopedAndVersionedTemplates\n\t\t\t\t\t\t.item(in_scope)\n\t\t\t\t\t\t.add(typeidWithoutVersion, versionCollection);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar namespaceCollection = new Collection();\n\t\t\t\tvar versionCollection = _createVersionedSortedCollection();\n\t\t\t\tnamespaceCollection.add(typeidWithoutVersion, versionCollection);\n\t\t\t\tversionCollection.add(version, wrappedTemplate);\n\t\t\t\tthis._remoteScopedAndVersionedTemplates.add(in_scope, namespaceCollection);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Error(\n\t\t\t\tMSG.UNVERSIONED_REMOTE_TEMPLATE + \" \\n\" + JSON.stringify(in_remoteTemplate, 0, 2),\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Remove the scope from the remote templates collection\n\t * @param {string} in_scope - The scope to remove\n\t * @protected\n\t */\n\t_removeScope(in_scope) {\n\t\tvar that = this;\n\n\t\tif (this._remoteScopedAndVersionedTemplates.has(in_scope)) {\n\t\t\t// remove the schemas in this scope from the inheritance cache.\n\t\t\tthis._remoteScopedAndVersionedTemplates.item(in_scope).iterate(function (nt, schemas) {\n\t\t\t\tschemas.iterate(function (k, schema) {\n\t\t\t\t\tdelete that._inheritanceCache[schema.getPropertyTemplate().typeid];\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tthis._remoteScopedAndVersionedTemplates.remove(in_scope);\n\t\t}\n\t}\n\n\t/**\n\t * Triggered when a template is registered.\n\t * @event property-properties.PropertyFactory#registered\n\t * @param {property-properties.Template} Template - The template being registered.\n\t * @memberof property-properties.PropertyFactory\n\t *\n\t */\n\n\t/**\n\t * Register a template or a primitive property\n\t *\n\t * This is the internal function used to register templates and primitive properties.\n\t *\n\t * @param {property-properties.PropertyTemplate|string} in_typeid - typeid of for the property the given\n\t * template/constructor represents\n\t * @param {property-properties.PropertyTemplate|object|property-properties.BaseProperty} in_templateOrProperty -\n\t * Template/native property class to associate with the typeid\n\t * @param {string} [in_context='single'] - The context for which the parameter is added (if it is set to all the\n\t * object will be used in all contexts)\n\t */\n\t_registerTypeId(in_typeid, in_templateOrProperty, in_context) {\n\t\t// If the input is not yet a BaseProperty derived type or a\n\t\t// PropertyTemplate, we create a PropertyTemplate object for it\n\n\t\tif (\n\t\t\t!(\n\t\t\t\tin_templateOrProperty instanceof PropertyTemplate ||\n\t\t\t\tthis._isNativePropertyConstructor(in_templateOrProperty)\n\t\t\t)\n\t\t) {\n\t\t\tin_templateOrProperty = new PropertyTemplate(in_templateOrProperty);\n\t\t}\n\n\t\t// If no context is specified we assign one\n\t\tif (!in_context) {\n\t\t\t// By default templates are registered for all contexts together, BaseProperties are registered separately\n\t\t\tin_context = in_templateOrProperty instanceof PropertyTemplate ? \"all\" : \"single\";\n\t\t}\n\n\t\tif (in_context !== \"all\") {\n\t\t\tif (!this._localPrimitivePropertiesAndTemplates.has(in_typeid)) {\n\t\t\t\tthis._localPrimitivePropertiesAndTemplates.add(in_typeid, new Collection());\n\t\t\t}\n\t\t\tthis._localPrimitivePropertiesAndTemplates\n\t\t\t\t.item(in_typeid)\n\t\t\t\t.add(in_context, in_templateOrProperty);\n\t\t} else if (!this._localPrimitivePropertiesAndTemplates.has(in_typeid)) {\n\t\t\tvar wrapper = new PropertyTemplateWrapper(in_templateOrProperty);\n\t\t\tthis._localPrimitivePropertiesAndTemplates.add(in_typeid, wrapper);\n\t\t}\n\n\t\tthis._eventEmitter.emit(\"registered\", in_templateOrProperty);\n\t}\n\n\t/**\n\t * Validate a template.\n\t * Check that the template is syntactically correct as well as semantically correct.\n\t *\n\t * @param {object|property-properties.PropertyTemplate} in_template - The template to check against.\n\t *\n\t * @returns {object|undefined} map of key-value pairs where the path of the invalid property is the key,\n\t * and the value is the error message.\n\t *\n\t * i.e.\n\t *\n\t * ```\n\t * <pre>\n\t * {\n\t * 'isValid': true or false,\n\t * 'typeid': 'The typeid of the object being parsed',\n\t * 'unresolvedTypes': [ 'An array', 'of strong typeids', 'that were found',\n\t * 'in the document', 'but not resolved from the local cache' ],\n\t * 'resolvedTypes': [ 'Array of', 'strong types resolved', 'during template parsing'],\n\t * 'errors': [ 'Array of', 'objects describing', 'syntax errors in the template' ]\n\t * ...\n\t * }\n\t * </pre>\n\t * ```\n\t */\n\tvalidate(in_template) {\n\t\treturn this._templateValidator.validate(in_template);\n\t}\n\n\t/**\n\t * Get a template or property object based on a typeid and a context\n\t *\n\t * @param {string} in_typeid - The type unique identifier\n\t * @param {string} [in_context] - The context of the property to create\n\t * @param {string} [in_scope] - The scope in which the property typeid is defined\n\t *\n\t * @returns {property-properties.PropertyTemplate|object|property-properties.BaseProperty|undefined}\n\t * Template/Property identified by the typeid.\n\t */\n\t_get(in_typeid, in_context, in_scope = undefined) {\n\t\tvar templateOrProperty = this._getWrapper(in_typeid, in_context, in_scope);\n\t\tif (templateOrProperty instanceof PropertyTemplateWrapper) {\n\t\t\treturn templateOrProperty.getPropertyTemplate();\n\t\t}\n\t\treturn templateOrProperty;\n\t}\n\n\t/**\n\t * Get a template or property object based on a typeid and a context\n\t *\n\t * @param {string} in_typeid - The type unique identifier\n\t * @param {string} [in_context] - The context of the property to create\n\t * @param {string} [in_scope] - The scope in which the property typeid is defined\n\t *\n\t * @returns {property-properties.PropertyTemplateWrapper|property-properties.BaseProperty|undefined}\n\t * Template/Property identified by the typeid.\n\t */\n\t_getWrapper(in_typeid, in_context, in_scope) {\n\t\tif (this._localPrimitivePropertiesAndTemplates.has(in_typeid)) {\n\t\t\tvar typeidItem = this._localPrimitivePropertiesAndTemplates.item(in_typeid);\n\t\t\tif (!(typeidItem instanceof Collection)) {\n\t\t\t\treturn typeidItem;\n\t\t\t} else {\n\t\t\t\tvar context = in_context || \"single\";\n\t\t\t\treturn this._localPrimitivePropertiesAndTemplates.item(in_typeid).item(context);\n\t\t\t}\n\t\t} else if (in_scope && this._remoteScopedAndVersionedTemplates.has(in_scope)) {\n\t\t\tvar splitTypeId = TypeIdHelper.extractVersion(in_typeid);\n\t\t\tif (splitTypeId.version) {\n\t\t\t\tvar typeidWithoutVersion = splitTypeId.typeidWithoutVersion;\n\t\t\t\tvar version = splitTypeId.version;\n\n\t\t\t\tif (\n\t\t\t\t\tthis._remoteScopedAndVersionedTemplates.item(in_scope).has(typeidWithoutVersion) &&\n\t\t\t\t\tthis._remoteScopedAndVersionedTemplates\n\t\t\t\t\t\t.item(in_scope)\n\t\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t\t.has(version)\n\t\t\t\t) {\n\t\t\t\t\treturn this._remoteScopedAndVersionedTemplates\n\t\t\t\t\t\t.item(in_scope)\n\t\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t\t.item(version);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Get template based on typeid\n\t *\n\t * @param {string} in_typeid - The type unique identifier\n\t * @returns {property-properties.PropertyTemplate|undefined} Template identified by the typeid.\n\t */\n\tgetTemplate(in_typeid) {\n\t\treturn this._localPrimitivePropertiesAndTemplates.has(in_typeid) &&\n\t\t\t!TypeIdHelper.isPrimitiveType(in_typeid)\n\t\t\t? this._localPrimitivePropertiesAndTemplates.item(in_typeid).getPropertyTemplate()\n\t\t\t: undefined;\n\t}\n\n\t/**\n\t * Get remote templates based on typeid\n\t * @private\n\t * @param {string} in_typeid - The type unique identifier\n\t * @returns {array<property-properties.PropertyTemplate>} Array of templates.\n\t */\n\t_getRemoteTemplates(in_typeid) {\n\t\tvar templatesFound = [];\n\n\t\tvar parsedTypeId = TypeIdHelper.extractVersion(in_typeid);\n\t\tvar typeidWithoutVersion = parsedTypeId.typeidWithoutVersion;\n\t\tvar version = parsedTypeId.version;\n\n\t\tthis._remoteScopedAndVersionedTemplates.iterate(\n\t\t\tfunction (scope, remoteVersionedTemplates) {\n\t\t\t\tif (\n\t\t\t\t\tremoteVersionedTemplates.has(typeidWithoutVersion) &&\n\t\t\t\t\tremoteVersionedTemplates.item(typeidWithoutVersion).item(version)\n\t\t\t\t) {\n\t\t\t\t\ttemplatesFound.push(\n\t\t\t\t\t\tremoteVersionedTemplates\n\t\t\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t\t\t.item(version)\n\t\t\t\t\t\t\t.getPropertyTemplate(),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t},\n\t\t);\n\n\t\treturn templatesFound;\n\t}\n\n\t/**\n\t * Create an instance of the given property typeid if there is a template registered for it.\n\t * Otherwise, this method returns undefined. Searches also in scoped templates.\n\t *\n\t * @param {string} in_typeid - The type unique identifier\n\t * @param {string} in_context - The type of collection of values that the property contains.\n\t * Accepted values are \"single\" (default), \"array\", \"map\" and \"set\".\n\t * @param {object|undefined} in_initialProperties - A set of initial values for the PropertySet being created\n\t * @param {string|undefined} in_scope - The scope in which the property typeid is defined\n\t * @returns {property-properties.BaseProperty|undefined} the property instance\n\t * @private\n\t */\n\t_createProperty(in_typeid, in_context, in_initialProperties, in_scope) {\n\t\tconst ifNotSingleOrUndefined = (in_context || \"single\") !== \"single\";\n\t\tConsoleUtils.assert(\n\t\t\tifNotSingleOrUndefined || _.isString(in_typeid),\n\t\t\tMSG.UNKNOWN_TYPEID_SPECIFIED + in_typeid,\n\t\t);\n\t\tlet context = in_context;\n\t\tif (!context) {\n\t\t\t// If no context is supplied, we check whether the typeid contains a context\n\t\t\tif (!TypeIdHelper.isReferenceTypeId(in_typeid)) {\n\t\t\t\tvar splitTypeId = TypeIdHelper.extractContext(in_typeid);\n\t\t\t\tin_typeid = splitTypeId.typeid;\n\t\t\t\tcontext = splitTypeId.context;\n\t\t\t}\n\t\t}\n\n\t\tlet propertyCreationFunction = undefined;\n\n\t\tif (!this._forceInstantion) {\n\t\t\t// Check, whether we already have a property creation function for this property\n\t\t\t// in the cache\n\t\t\tconst scopeFunctionEntry = this._cachedCreationFunctions.get(in_typeid);\n\t\t\tconst contextFunctionEntry = scopeFunctionEntry && scopeFunctionEntry.get(in_scope);\n\t\t\tpropertyCreationFunction = contextFunctionEntry && contextFunctionEntry.get(context);\n\t\t}\n\n\t\t// If we don't have a cached function or are requested to explicitly instantiate the property\n\t\t// we have to first create a property definition by recursively traversing all templates\n\t\tlet propertyDef;\n\t\tif (!propertyCreationFunction) {\n\t\t\tpropertyDef = {};\n\t\t\tthis._createDefFromPropertyDeclaration(\n\t\t\t\t{\n\t\t\t\t\ttypeid: in_typeid,\n\t\t\t\t\tcontext: context || \"single\",\n\t\t\t\t},\n\t\t\t\tin_scope,\n\t\t\t\tpropertyDef,\n\t\t\t);\n\t\t}\n\n\t\tlet property;\n\t\tif (!this._forceInstantion) {\n\t\t\t// If we don't yet have a creation function, we will create one here\n\t\t\tpropertyCreationFunction =\n\t\t\t\tpropertyCreationFunction ||\n\t\t\t\tthis._definePropertyCreationFunction(propertyDef, in_typeid, in_scope, context);\n\n\t\t\t// Create the property by invoking the precompiled creation function\n\t\t\tproperty = propertyCreationFunction();\n\n\t\t\t// If initial properties have been provided, we will assign them to the\n\t\t\t// default initialized property\n\t\t\tif (in_initialProperties !== undefined) {\n\t\t\t\tthis._setInitialValue(\n\t\t\t\t\tproperty,\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue: in_initialProperties,\n\t\t\t\t\t},\n\t\t\t\t\tfalse,\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\t// Directly instantiate the property from the definition (without using) a precompield function\n\t\t\tproperty = this._instantiatePropertyDef(\n\t\t\t\tpropertyDef,\n\t\t\t\tin_scope,\n\t\t\t\tin_initialProperties && {\n\t\t\t\t\tvalue: in_initialProperties,\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\n\t\treturn property;\n\t}\n\n\t/**\n\t * Creates an instance of the property described in the property definition.\n\t *\n\t * Note: this function won't create any constant children, it is only used to\n\t * instantiate nested constant properties and those will be set to constant\n\t * after their instantiation.\n\t *\n\t * @param {Object} propertyDef - The property defintion for the property to create\n\t * @param {String} in_scope - The scope for the property to create\n\t * @param {String} in_initialProperties - The initial values for the property\n\t *\n\t * @returns {BaseProperty} An instance of the property\n\t */\n\t_instantiatePropertyDef(propertyDef, in_scope, in_initialProperties) {\n\t\tlet rootProperty = undefined;\n\n\t\t// This stack is used to recursively iterate over the property definition\n\t\tconst creationStack = [\n\t\t\t{\n\t\t\t\tid: undefined,\n\t\t\t\tentry: propertyDef,\n\t\t\t\tparent: undefined,\n\t\t\t},\n\t\t];\n\n\t\twhile (creationStack.length > 0) {\n\t\t\tconst currentEntry = creationStack.pop();\n\n\t\t\t// We have an entry on the stack that is just waiting for its children to finish, but has already\n\t\t\t// been created\n\t\t\tif (currentEntry.signalChildrenFinished) {\n\t\t\t\tcurrentEntry.property._signalAllStaticMembersHaveBeenAdded(in_scope);\n\n\t\t\t\tif (currentEntry.initialValue) {\n\t\t\t\t\tthis._setInitialValue(currentEntry.property, currentEntry.initialValue, true);\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Create the property instance\n\t\t\tlet property = new currentEntry.entry.constructorFunction(currentEntry.entry.entry);\n\n\t\t\t// Insert / append the property to the parent\n\t\t\tif (currentEntry.parent) {\n\t\t\t\tif (currentEntry.entry.optional) {\n\t\t\t\t\tcurrentEntry.parent._insert(property.getId(), property, true);\n\t\t\t\t} else {\n\t\t\t\t\tcurrentEntry.parent._append(property, currentEntry.entry.allowChildMerges);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If we are at the root, we store the property object to return it later\n\t\t\t\trootProperty = property;\n\t\t\t}\n\n\t\t\t// For named properties we have to assign a GUID (note: all constant properties in\n\t\t\t// a template will share this GUID)\n\t\t\tif (currentEntry.setGuid) {\n\t\t\t\tproperty.value = GuidUtils.generateGUID();\n\t\t\t}\n\n\t\t\t// Assign optional children\n\t\t\tif (currentEntry.entry.optionalChildren) {\n\t\t\t\tfor (let [id, typeid] of Object.entries(currentEntry.entry.optionalChildren)) {\n\t\t\t\t\tproperty._addOptionalChild(id, typeid);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Recursively process all children of this entry\n\t\t\tif (currentEntry.entry.children) {\n\t\t\t\t// Create an entry on the stack, which is later needed,\n\t\t\t\t// to signal that all child properties have been added\n\t\t\t\tconst parentStackEntry = {\n\t\t\t\t\tsignalChildrenFinished: true,\n\t\t\t\t\tinitialValue: currentEntry.entry.initialValue,\n\t\t\t\t\tproperty,\n\t\t\t\t};\n\t\t\t\tcreationStack.push(parentStackEntry);\n\n\t\t\t\tfor (let [id, child] of currentEntry.entry.children) {\n\t\t\t\t\tcreationStack.push({\n\t\t\t\t\t\tparent: property,\n\t\t\t\t\t\tid: id,\n\t\t\t\t\t\tentry: child,\n\t\t\t\t\t\tsetGuid: currentEntry.entry.assignGuid && id === \"guid\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If there are no children, we directly assign the initial value and\n\t\t\t\t// signal that the property has completely been initialized\n\t\t\t\tif (currentEntry.entry.initialValue) {\n\t\t\t\t\tthis._setInitialValue(property, currentEntry.entry.initialValue, true);\n\t\t\t\t}\n\n\t\t\t\tif (currentEntry.entry.signal) {\n\t\t\t\t\tproperty._signalAllStaticMembersHaveBeenAdded(in_scope);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (in_initialProperties !== undefined) {\n\t\t\tthis._setInitialValue(rootProperty, in_initialProperties, true);\n\t\t}\n\n\t\treturn rootProperty;\n\t}\n\n\t/**\n\t * Creates a javascript function that instantiates the requested property\n\t *\n\t * @param {Object} propertyDef - The property defintion for the property for which the function is created\n\t * @param {String} in_typeid - The typeid for the property for which the function is created\n\t * @param {String} in_scope - The scope for the property for which the function is created\n\t * @param {String} in_context - The context for the property for which the function is created\n\t *\n\t * @returns {Function} A function that creates an instance of the property\n\t */\n\t_definePropertyCreationFunction(propertyDef, in_typeid, in_scope, in_context) {\n\t\t// This stack is used to recursively iterate over the property definition\n\t\tconst creationStack = [\n\t\t\t{\n\t\t\t\tid: null,\n\t\t\t\tdef: propertyDef,\n\t\t\t\tparent: undefined,\n\t\t\t},\n\t\t];\n\n\t\tlet creationFunctionSource = \"\";\n\t\tlet currentParameterIndex = 0;\n\t\tlet parameters = [];\n\t\tlet currentPropertyNumber = 0;\n\t\tlet currentPropertyVarName = \"\";\n\t\tlet resultVarName;\n\n\t\twhile (creationStack.length > 0) {\n\t\t\tconst currentEntry = creationStack.pop();\n\n\t\t\t// We have an entry on the stack that is just waiting for its children to finish, but has already\n\t\t\t// been created\n\t\t\tif (currentEntry.signalChildrenFinished) {\n\t\t\t\t// Add the signalling function\n\t\t\t\tcreationFunctionSource += `${\n\t\t\t\t\tcurrentEntry.propertyVarname\n\t\t\t\t}._signalAllStaticMembersHaveBeenAdded(${JSON.stringify(in_scope)});\\n`;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Determine the initial value for this property\n\t\t\tlet initialValue =\n\t\t\t\tcurrentEntry.def.initialValue !== undefined\n\t\t\t\t\t? currentEntry.def.initialValue\n\t\t\t\t\t: undefined;\n\n\t\t\tif (currentEntry.def.entry.id) {\n\t\t\t\tlet parentEntry = currentEntry.parentStackEntry;\n\t\t\t\tlet path = [currentEntry.def.entry.id];\n\n\t\t\t\t// We have to walk the whole parent chain and extract for\n\t\t\t\t// each parent the initial values. Entries further up in the\n\t\t\t\t// chain can overwrite entries further down\n\t\t\t\twhile (parentEntry) {\n\t\t\t\t\tif (parentEntry.initialValue) {\n\t\t\t\t\t\t// Extract changes to be applied to this property\n\t\t\t\t\t\tlet filteredChangeSet = parentEntry.initialValue.value;\n\t\t\t\t\t\tfor (let i = 0; i < path.length; i++) {\n\t\t\t\t\t\t\tfilteredChangeSet = filteredChangeSet && filteredChangeSet[path[i]];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Update the initial value with the extract changeset\n\t\t\t\t\t\tif (_.isObject(filteredChangeSet)) {\n\t\t\t\t\t\t\tif (initialValue === undefined) {\n\t\t\t\t\t\t\t\tinitialValue = {\n\t\t\t\t\t\t\t\t\ttyped: false,\n\t\t\t\t\t\t\t\t\tvalue: filteredChangeSet,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t} else if (_.isObject(initialValue)) {\n\t\t\t\t\t\t\t\tObject.assign(initialValue.value, filteredChangeSet);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow new TypeError(\"Invalid default values specified\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (filteredChangeSet !== undefined) {\n\t\t\t\t\t\t\tif (initialValue === undefined) {\n\t\t\t\t\t\t\t\tinitialValue = {\n\t\t\t\t\t\t\t\t\tvalue: undefined,\n\t\t\t\t\t\t\t\t\ttyped: false,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tinitialValue.value = filteredChangeSet;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (parentEntry.id !== null) {\n\t\t\t\t\t\tpath.unshift(parentEntry.id);\n\t\t\t\t\t}\n\t\t\t\t\tparentEntry = parentEntry.parentStackEntry;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (currentEntry.def.constant) {\n\t\t\t\t// If we have a constant property, we create a concrete property object instance and share it\n\t\t\t\t// among all instances of the parent property\n\t\t\t\tlet instantiatedChild;\n\t\t\t\ttry {\n\t\t\t\t\t// Usually we would use the precompiled creation functions, but those all share\n\t\t\t\t\t// the same constant properties. Since it is allowed to overwrite constants via\n\t\t\t\t\t// default values, we have to explicitly instantiate new property instances for\n\t\t\t\t\t// constants. Since the constants themselves may contain nested property instances,\n\t\t\t\t\t// we use this flag to indicate that for all nested properties, we do not want to use\n\t\t\t\t\t// the precompiled instantiation functions.\n\t\t\t\t\tthis._forceInstantion = true;\n\t\t\t\t\tinstantiatedChild = this._instantiatePropertyDef(\n\t\t\t\t\t\tcurrentEntry.def,\n\t\t\t\t\t\tin_scope,\n\t\t\t\t\t\tcurrentEntry.def.initialValue,\n\t\t\t\t\t);\n\t\t\t\t} finally {\n\t\t\t\t\tthis._forceInstantion = false;\n\t\t\t\t}\n\t\t\t\tinstantiatedChild._setAsConstant();\n\n\t\t\t\t// Add a reference to the newly instantiate constant property to the parameters and add\n\t\t\t\t// a command to add it into the tree\n\t\t\t\tparameters.push(instantiatedChild);\n\t\t\t\tcreationFunctionSource += `${currentEntry.parentVarName}._append(\n parameters[${currentParameterIndex}], ${currentEntry.def.allowChildMerges}\n );\\n`;\n\t\t\t\tcurrentParameterIndex += 1;\n\t\t\t} else {\n\t\t\t\t// Put the constructor function and the description of the property into the\n\t\t\t\t// parameters array\n\t\t\t\tparameters.push(currentEntry.def.constructorFunction);\n\t\t\t\tparameters.push(currentEntry.def.entry);\n\n\t\t\t\t// and add the instantiation call to the generated function\n\t\t\t\tcurrentPropertyNumber++;\n\t\t\t\tcurrentPropertyVarName = `property${currentPropertyNumber}`;\n\t\t\t\tcreationFunctionSource += `const ${currentPropertyVarName} =\n new parameters[${currentParameterIndex}](parameters[${\n\t\t\t\t\t\t\t\t\t\t\tcurrentParameterIndex + 1\n\t\t\t\t\t\t\t\t\t\t}]);\\n`;\n\t\t\t\tcurrentParameterIndex += 2;\n\n\t\t\t\t// Insert / append the property to the parent\n\t\t\t\tif (currentEntry.parentVarName !== undefined) {\n\t\t\t\t\tcreationFunctionSource += currentEntry.def.optional\n\t\t\t\t\t\t? `${currentEntry.parentVarName}._insert(\n ${JSON.stringify(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentEntry.def.entry.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}, ${currentPropertyVarName}, true\n );\\n`\n\t\t\t\t\t\t: `${currentEntry.parentVarName}._append(\n ${currentPropertyVarName}, ${currentEntry.def.allowChildMerges}\n );\\n`;\n\t\t\t\t} else {\n\t\t\t\t\tresultVarName = currentPropertyVarName;\n\t\t\t\t}\n\n\t\t\t\t// For named properties we have to add a calll to assign a GUID to the function\n\t\t\t\tif (currentEntry.setGuid) {\n\t\t\t\t\tcreationFunctionSource += `${currentPropertyVarName}.value = GuidUtils.generateGUID();\\n`;\n\t\t\t\t}\n\n\t\t\t\t// And if there are any optional children, we add them here (should this be further optimized? I\n\t\t\t\t// propbably would not have to be done on every instantiation, those could be stored in the prototype)\n\t\t\t\tif (currentEntry.def.optionalChildren) {\n\t\t\t\t\tfor (let [id, typeid] of Object.entries(currentEntry.def.optionalChildren)) {\n\t\t\t\t\t\tcreationFunctionSource += `${currentPropertyVarName}._addOptionalChild(\n ${JSON.stringify(id)},\n ${JSON.stringify(typeid)}\n );\\n`;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Recursively process all children of this entry\n\t\t\t\tif (currentEntry.def.children) {\n\t\t\t\t\t// Create an entry on the stack, which is later needed,\n\t\t\t\t\t// to signal that all child properties have been added\n\t\t\t\t\tconst parentStackEntry = {\n\t\t\t\t\t\tsignalChildrenFinished: true,\n\t\t\t\t\t\tinitialValue: currentEntry.def.initialValue,\n\t\t\t\t\t\tpropertyVarname: currentPropertyVarName,\n\t\t\t\t\t\tparentStackEntry: currentEntry.parentStackEntry,\n\t\t\t\t\t\tid: currentEntry.id,\n\t\t\t\t\t};\n\t\t\t\t\tcreationStack.push(parentStackEntry);\n\n\t\t\t\t\t// Recursively add all children to the stack\n\t\t\t\t\tfor (let [id, child] of currentEntry.def.children) {\n\t\t\t\t\t\tcreationStack.push({\n\t\t\t\t\t\t\tparentVarName: currentPropertyVarName,\n\t\t\t\t\t\t\tid: id,\n\t\t\t\t\t\t\tdef: child,\n\t\t\t\t\t\t\tsignalParent: false,\n\t\t\t\t\t\t\tsetGuid: currentEntry.def.assignGuid && id === \"guid\",\n\t\t\t\t\t\t\tparentStackEntry,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// This is a leaf property, so if there is a default value\n\t\t\t\t\t// we directly assign it here\n\t\t\t\t\tif (initialValue !== undefined) {\n\t\t\t\t\t\tcreationFunctionSource += !_.isObject(initialValue.value)\n\t\t\t\t\t\t\t? // We have a primitive property and thus direclty invoke the setValue function\n\t\t\t\t\t\t\t\t`${currentPropertyVarName}.setValue(${JSON.stringify(initialValue.value)})\\n`\n\t\t\t\t\t\t\t: // For non primitive properties, we currently use the member on the property factory,\n\t\t\t\t\t\t\t\t// probably we could further optimize this to directly call the correct function on the\n\t\t\t\t\t\t\t\t// property\n\t\t\t\t\t\t\t\t`this._setInitialValue(${currentPropertyVarName},\n ${JSON.stringify(initialValue)},\n false);\\n`;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If this property is constant, we assign the constant flag\n\t\t\t\t\tif (currentEntry.def.constant) {\n\t\t\t\t\t\tcreationFunctionSource += `${currentPropertyVarName}._setAsConstant();\\n`;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If necessary, signal that the propert has been fully initialized (is this ever needed?)\n\t\t\t\t\tif (currentEntry.def.signal) {\n\t\t\t\t\t\tcreationFunctionSource += `${currentPropertyVarName}._signalAllStaticMembersHaveBeenAdded(\n ${JSON.stringify(in_scope)}\n );\\n`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the return statement at the end of the function\n\t\tcreationFunctionSource += ` return ${resultVarName};`;\n\n\t\t// Finally, create the actual JS function with the source we compiled above\n\t\tlet creationFunction = new Function(\n\t\t\t\"parameters\",\n\t\t\t\" GuidUtils\",\n\t\t\tcreationFunctionSource,\n\t\t).bind(this, parameters, GuidUtils);\n\n\t\t// Add the created function to the cache\n\t\tlet scopesFunction = this._cachedCreationFunctions.get(in_typeid);\n\t\tif (!scopesFunction) {\n\t\t\tscopesFunction = new Map();\n\t\t\tthis._cachedCreationFunctions.set(in_typeid, scopesFunction);\n\t\t}\n\t\tlet contextsFunction = scopesFunction.get(in_scope);\n\t\tif (!contextsFunction) {\n\t\t\tcontextsFunction = new Map();\n\t\t\tscopesFunction.set(in_scope, contextsFunction);\n\t\t}\n\t\tcontextsFunction.set(in_context, creationFunction);\n\n\t\treturn creationFunction;\n\t}\n\n\t/**\n\t * Sets a value to a property\n\t * The value can be passed through a default, initial or constant.\n\t *\n\t * @param {string} property - The property to set the value for\n\t * @param {object} valueParsed - The value to set in the given property\n\t * @param {string} value - The value to set\n\t * @param {boolean} typed - Whether the value has a different type than the property (polymorphic).\n\t * @param {string} typeid - THe typeid of the property.\n\t */\n\t_setInitialValue(property, valueParsed, unsetConstant) {\n\t\tif (unsetConstant) {\n\t\t\tproperty._unsetAsConstant();\n\t\t}\n\t\tif (property instanceof ValueProperty || property instanceof StringProperty) {\n\t\t\tproperty.setValue(valueParsed.value);\n\t\t} else if (valueParsed.typed) {\n\t\t\tproperty._setValues(valueParsed.value, true, true);\n\t\t} else if (\n\t\t\tproperty.getTypeid() !== \"ContainerProperty\" ||\n\t\t\tproperty._getChildrenCount() > 0\n\t\t) {\n\t\t\tproperty._setValues(valueParsed.value, false, true);\n\t\t} else if (!valueParsed.typeid) {\n\t\t\tthrow new Error(MSG.FIELD_TYPEID_IS_REQUIRED + property._id + \".typeid\");\n\t\t} else {\n\t\t\tproperty._setValues(valueParsed.value, false, true);\n\t\t}\n\t}\n\n\t/**\n\t * Create an instance of the given property typeid if there is a template registered for it.\n\t * Otherwise, this method returns undefined.\n\t *\n\t * @param {string} in_typeid - The type unique identifier\n\t * @param {string} in_context - The type of collection of values that the property contains.\n\t * Accepted values are \"single\" (default), \"array\", \"map\" and \"set\".\n\t * @param {object=} in_initialProperties - A set of initial values for the PropertySet being created\n\t * @param {object=} in_options - Additional options\n\t *\n\t * @returns {property-properties.BaseProperty|undefined} the property instance\n\t */\n\tcreate(in_typeid, in_context, in_initialProperties) {\n\t\treturn this._createProperty(in_typeid, in_context, in_initialProperties, null);\n\t}\n\n\t/**\n\t * Creates a constructor function for the given typeid and id. The function will inherit from the\n\t * passed base constructor, but have the typeid and id assigned in its constructor. This way, we\n\t * avoid the storage overhead of having those members in each instance of the property.\n\t *\n\t * @param {String} in_context - The context of the property\n\t * @param {String} in_typeid - The typeid of the property\n\t * @param {Function} in_baseConstructor - The constructor to inherit from\n\t * @param {String} in_id - The Id of the property\n\t * @param {String} in_scope - The scope of the property\n\t *\n\t * @returns {Function} The constructor for the property\n\t */\n\t_getConstructorFunctionForTypeidAndID(\n\t\tin_context,\n\t\tin_typeid,\n\t\tin_baseConstructor,\n\t\tin_id,\n\t\tin_scope,\n\t) {\n\t\t// Create a unique key for this constructor\n\t\tlet key = in_context === \"single\" ? in_typeid : in_context + \"<\" + in_typeid + \">\";\n\n\t\tif (in_id !== undefined) {\n\t\t\tkey = key + \"-\" + in_id;\n\t\t}\n\n\t\tif (in_scope && !this._localPrimitivePropertiesAndTemplates.has(in_typeid)) {\n\t\t\tkey += \"-\" + in_scope;\n\t\t}\n\n\t\t// Check, whether we already have this function in the cache\n\t\tif (this._typedPropertyConstructorCache[key]) {\n\t\t\treturn this._typedPropertyConstructorCache[key];\n\t\t}\n\n\t\t// If it is not in the cache, create the function\n\n\t\t// This creates a class that will have the correct name in the debugger, but I am not\n\t\t// sure whether we want to use a dynamic eval for this. It might be flagged by some security scans\n\t\t// It should be safe, since we control the name of constructorClasses for properties\n\t\tvar propertyConstructorFunction = class extends in_baseConstructor {};\n\t\tpropertyConstructorFunction.prototype._typeid = in_typeid;\n\n\t\tObject.defineProperty(propertyConstructorFunction, \"name\", {\n\t\t\tvalue: in_baseConstructor.name,\n\t\t});\n\n\t\tif (in_id !== undefined) {\n\t\t\tpropertyConstructorFunction.prototype._id = in_id;\n\t\t}\n\n\t\tthis._typedPropertyConstructorCache[key] = propertyConstructorFunction;\n\n\t\treturn propertyConstructorFunction;\n\t}\n\n\t/**\n\t * Creates a property definition for a non-collection property with the entry and constructor function assigned\n\t * Children will be added later by parseTemplate.\n\t *\n\t * @param {string} in_typeid - The type unique identifier\n\t * @param {string} in_id - The id of the property to create\n\t * @param {property-properties.PropertyTemplate|object|property-properties.BaseProperty} in_templateOrConstructor -\n\t * the Template/Property for this in_typeid\n\t * @param {string|undefined} in_scope - The scope in which the property typeid is defined\n\t *\n\t * @returns {property-properties.BaseProperty} The property that serves as parent for the properties in the template\n\t * @private\n\t */\n\t_createNonCollectionPropertyDef(\n\t\tin_typeid,\n\t\tin_id,\n\t\tin_templateOrConstructor,\n\t\tin_scope,\n\t\tpropertyDef,\n\t) {\n\t\tlet ConstructorFunction;\n\t\tconst params = {\n\t\t\ttypeid: in_typeid,\n\t\t\tid: in_id,\n\t\t};\n\n\t\tif (this.inheritsFrom(in_typeid, \"NamedProperty\", { scope: in_scope })) {\n\t\t\t// An id of NULL means that the GUID of the property is used if it is a named property\n\t\t\tparams.id = in_id || null;\n\t\t}\n\n\t\tconst wrapper = this._getWrapper(in_typeid, undefined, in_scope);\n\t\tconst creationType = wrapper.getCreationType();\n\n\t\tswitch (creationType) {\n\t\t\tcase \"Enum\":\n\t\t\t\tparams._enumDictionary = in_templateOrConstructor._enumDictionary;\n\t\t\t\tConstructorFunction = EnumProperty;\n\t\t\t\tbreak;\n\t\t\tcase \"NodeProperty\":\n\t\t\t\tConstructorFunction = NodeProperty;\n\t\t\t\tparams.typeid = params.typeid || \"NodeProperty\";\n\t\t\t\tbreak;\n\t\t\tcase \"NamedProperty\":\n\t\t\t\tConstructorFunction = NamedProperty;\n\t\t\t\tparams.typeid = params.typeid || \"NamedProperty\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tConstructorFunction = ContainerProperty;\n\t\t\t\tparams.typeid = params.typeid || \"ContainerProperty\";\n\t\t}\n\n\t\tConstructorFunction = this._getConstructorFunctionForTypeidAndID(\n\t\t\t\"single\",\n\t\t\tin_typeid,\n\t\t\tConstructorFunction,\n\t\t\tin_id,\n\t\t\tin_scope,\n\t\t);\n\n\t\tpropertyDef.constructorFunction = ConstructorFunction;\n\t\tpropertyDef.signal = true;\n\t\tpropertyDef.entry = params;\n\t\tpropertyDef.context = \"single\";\n\t\tpropertyDef.typeid = in_typeid;\n\t}\n\n\t/**\n\t * Check whether a typeid is registered\n\t * @param {string} in_typeid - The type unique identifier\n\t * @param {string|undefined} in_scope - The scope in which the property typeid is defined\n\t * @returns {boolean} Returns true if the typeid is registered. False otherwise.\n\t * @private\n\t */\n\t_isRegisteredTypeid(in_typeid, in_scope) {\n\t\treturn !!this._get(in_typeid, undefined, in_scope);\n\t}\n\n\t/**\n\t * Checks if there exists a registered template with a corresponding typeid\n\t * example:example would match to example:example-1.0.0\n\t * example:example-1.0.0 would not match to example:example only to example:example-1.0.0\n\t * @param {string} in_typeid - The type unique identifier with or without a version\n\t * @param {string|undefined} in_scope - The scope in which the property typeid is defined\n\t * @returns {boolean} Returns true if a match is found. False otherwise.\n\t * @private\n\t */\n\t_hasCorrespondingRegisteredTypeid(in_typeid, in_scope) {\n\t\tif (in_typeid.includes(\"-\")) {\n\t\t\treturn this._isRegisteredTypeid(in_typeid, in_scope);\n\t\t}\n\n\t\tvar registered =\n\t\t\tthis._localVersionedTemplates.has(in_typeid) ||\n\t\t\tthis._localPrimitivePropertiesAndTemplates.has(in_typeid);\n\n\t\tif (!registered && in_scope && this._remoteScopedAndVersionedTemplates.has(in_scope)) {\n\t\t\tregistered = this._remoteScopedAndVersionedTemplates.item(in_scope).has(in_typeid);\n\t\t}\n\n\t\treturn registered;\n\t}\n\n\t/**\n\t * Check whether the given typeid is a specialized constructor\n\t * Specialized constructors are of Array or Map types\n\t * @param {string} in_typeid - The type unique identifier\n\t * @returns {boolean} Returns true if the typeid is a specialized constructor\n\t * @private\n\t */\n\t_isSpecializedConstructor(in_typeid) {\n\t\treturn this._localPrimitivePropertiesAndTemplates.item(in_typeid) instanceof Collection;\n\t}\n\n\t/**\n\t * Generate the typeid according to multiple settings\n\t *\n\t * @param {Object} in_propertiesEntry - Describes the property object to create\n\t * @param {string=} [in_propertiesEntry.id] - The name of the property\n\t * @param {string=} [in_propertiesEntry.typeid] - The type identifier\n\t * @param {string=} [in_propertiesEntry.context] - Context in which the property is created\n\t * @param {Object=} [in_propertiesEntry.properties] - Context in which the property is created\n\t * @param {number} [in_propertiesEntry.length] - The length of an array property\n\t * @param {string} in_scope - The scope in which the property typeid is defined\n\t * @param {string} context - The context of the property\n\t *\n\t * @returns {string} The typeid.\n\t */\n\t_computeTypeid(in_propertiesEntry, in_scope, context) {\n\t\tvar typeid = in_propertiesEntry.typeid;\n\t\tif (context === \"single\") {\n\t\t\tvar valueParsed = this._parseTypedValue(in_propertiesEntry, in_scope, context);\n\t\t\tif (valueParsed.typed && valueParsed.typeid) {\n\t\t\t\ttypeid = in_propertiesEntry.typedValue.typeid;\n\t\t\t}\n\t\t}\n\t\t// We create a polymorphic collection (one inheriting from BaseProperty), if no typeid is specified\n\t\t// but a context is given\n\t\tif (!typeid && context !== \"single\") {\n\t\t\ttypeid = context !== \"set\" ? \"ContainerProperty\" : \"NamedProperty\";\n\t\t}\n\t\tif (\n\t\t\tin_propertiesEntry.typeid &&\n\t\t\tTypeIdHelper.isReferenceTypeId(in_propertiesEntry.typeid)\n\t\t) {\n\t\t\ttypeid = \"Reference\";\n\t\t}\n\t\treturn typeid;\n\t}\n\n\t/**\n\t * Creates a propertyDef for the given properties entry\n\t *\n\t * @param {Object} in_propertiesEntry - Describes the property object to create\n\t * @param {string=} [in_propertiesEntry.id] - The name of the property\n\t * @param {string=} [in_propertiesEntry.typeid] - The type identifier\n\t * @param {string=} [in_propertiesEntry.context] - Context in which the property is created\n\t * @param {Object=} [in_propertiesEntry.properties] - Context in which the property is created\n\t * @param {number} [in_propertiesEntry.length] - The length of an array property\n\t * @param {string} in_scope - The scope in which the property typeid is defined\n\t * @param {Object} out_propertyDef - The created property definition\n\t */\n\t_createDefFromPropertyDeclaration(in_propertiesEntry, in_scope, out_propertyDef) {\n\t\tvar context =\n\t\t\tin_propertiesEntry.context !== undefined ? in_propertiesEntry.context : \"single\";\n\t\tvar typeid = this._computeTypeid(in_propertiesEntry, in_scope, context);\n\t\tvar referenceTarget =\n\t\t\ttypeid === \"Reference\"\n\t\t\t\t? TypeIdHelper.extractReferenceTargetTypeIdFromReference(in_propertiesEntry.typeid)\n\t\t\t\t: undefined;\n\n\t\tif (typeid) {\n\t\t\tif (\n\t\t\t\tthis._isRegisteredTypeid(typeid, in_scope) &&\n\t\t\t\t(!referenceTarget || this._hasCorrespondingRegisteredTypeid(referenceTarget, in_scope))\n\t\t\t) {\n\t\t\t\tvar templateOrConstructor = this._get(typeid, context, in_scope);\n\t\t\t\tvar isSpecializedConstructor = this._isSpecializedConstructor(typeid);\n\n\t\t\t\tif (\n\t\t\t\t\tthis._isNativePropertyConstructor(templateOrConstructor) &&\n\t\t\t\t\t(isSpecializedConstructor || context === \"single\")\n\t\t\t\t) {\n\t\t\t\t\tif (TypeIdHelper.isReferenceTypeId(typeid) || in_propertiesEntry.id !== undefined) {\n\t\t\t\t\t\ttemplateOrConstructor = this._getConstructorFunctionForTypeidAndID(\n\t\t\t\t\t\t\tin_propertiesEntry.context,\n\t\t\t\t\t\t\tin_propertiesEntry.typeid,\n\t\t\t\t\t\t\ttemplateOrConstructor,\n\t\t\t\t\t\t\tin_propertiesEntry.id,\n\t\t\t\t\t\t\tin_scope,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tout_propertyDef.constructorFunction = templateOrConstructor;\n\t\t\t\t\tout_propertyDef.signal = false;\n\t\t\t\t\tout_propertyDef.entry = in_propertiesEntry;\n\t\t\t\t\tout_propertyDef.context = in_propertiesEntry.context;\n\t\t\t\t\tout_propertyDef.typeid = in_propertiesEntry.typeid;\n\n\t\t\t\t\t// If this is a primitive type, we create it via the registered constructor\n\t\t\t\t\tvar result = new templateOrConstructor(in_propertiesEntry);\n\t\t\t\t\treturn result;\n\t\t\t\t} else {\n\t\t\t\t\tconst templateWrapper = this._getWrapper(typeid, context, in_scope);\n\t\t\t\t\ttemplateOrConstructor = templateWrapper.getCompiledTemplate(this);\n\t\t\t\t\tif (context === \"single\") {\n\t\t\t\t\t\t// If we have a template in a single context, we create it directly here\n\n\t\t\t\t\t\t// Create the base object\n\t\t\t\t\t\tthis._createNonCollectionPropertyDef(\n\t\t\t\t\t\t\ttypeid,\n\t\t\t\t\t\t\tin_propertiesEntry.id,\n\t\t\t\t\t\t\ttemplateOrConstructor,\n\t\t\t\t\t\t\tin_scope,\n\t\t\t\t\t\t\tout_propertyDef,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tthis._parseTemplate(\n\t\t\t\t\t\t\ttemplateOrConstructor,\n\t\t\t\t\t\t\tin_scope,\n\t\t\t\t\t\t\t!!templateOrConstructor.inherits,\n\t\t\t\t\t\t\tout_propertyDef,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If we have other contexts, we have to create the corresponding property object for that context\n\n\t\t\t\t\t\t// check if a specialized collection is needed\n\t\t\t\t\t\tvar isEnum = this.inheritsFrom(typeid, \"Enum\", { scope: in_scope });\n\n\t\t\t\t\t\tvar constructorFunction;\n\t\t\t\t\t\tswitch (context) {\n\t\t\t\t\t\t\tcase \"array\":\n\t\t\t\t\t\t\t\tif (isEnum) {\n\t\t\t\t\t\t\t\t\tvar enumPropertyEntry = deepCopy(in_propertiesEntry);\n\t\t\t\t\t\t\t\t\tenumPropertyEntry._enumDictionary = templateOrConstructor._enumDictionary;\n\t\t\t\t\t\t\t\t\tin_propertiesEntry = enumPropertyEntry;\n\n\t\t\t\t\t\t\t\t\tconstructorFunction = EnumArrayProperty;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tconstructorFunction = ArrayProperty;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"set\":\n\t\t\t\t\t\t\t\t// Validate that a set inherit from a NamedProperty\n\t\t\t\t\t\t\t\tvar typeid = in_propertiesEntry.typeid;\n\t\t\t\t\t\t\t\tif (!this.inheritsFrom(typeid, \"NamedProperty\", { scope: in_scope })) {\n\t\t\t\t\t\t\t\t\tthrow new Error(MSG.SET_ONLY_NAMED_PROPS + typeid);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tconstructorFunction = SetProperty;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"map\":\n\t\t\t\t\t\t\t\tconstructorFunction = MapProperty;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tthrow new Error(MSG.UNKNOWN_CONTEXT_SPECIFIED + context);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tout_propertyDef.constructorFunction = constructorFunction;\n\t\t\t\t\t\tout_propertyDef.signal = false;\n\t\t\t\t\t\tout_propertyDef.entry = in_propertiesEntry;\n\t\t\t\t\t\tout_propertyDef.typeid = typeid;\n\t\t\t\t\t\tout_propertyDef.context = context;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// We tried to create a property with an unknown typeid\n\t\t\t\t// that means we have no template and don't know what to instantiate\n\t\t\t\t// TODO: look for and use the missing template somehow at this point\n\t\t\t\ttypeid = referenceTarget || typeid;\n\t\t\t\tthrow new Error(MSG.UNKNOWN_TYPEID_SPECIFIED + typeid);\n\t\t\t}\n\t\t} else {\n\t\t\tif (!in_propertiesEntry.properties) {\n\t\t\t\tin_propertiesEntry.properties = [];\n\t\t\t}\n\n\t\t\t// If this is a declaration which contains a properties list, we have to create a new container property for it\n\t\t\tlet copiedPropertyEntry = Object.assign(\n\t\t\t\t{ typeid: \"ContainerProperty\" },\n\t\t\t\tin_propertiesEntry,\n\t\t\t);\n\t\t\tout_propertyDef.constructorFunction = ContainerProperty;\n\t\t\tout_propertyDef.entry = copiedPropertyEntry;\n\t\t\tout_propertyDef.signal = false;\n\t\t\tout_propertyDef.typeid = copiedPropertyEntry.typeid;\n\t\t\tout_propertyDef.context = \"single\";\n\n\t\t\t// And then parse the entry like a template\n\t\t\tthis._parseTemplate(in_propertiesEntry, in_scope, false, out_propertyDef);\n\t\t}\n\n\t\t// If this property inherits from NamedProperty we assign a random GUID\n\t\tif (typeid && this.inheritsFrom(typeid, \"NamedProperty\", { scope: in_scope })) {\n\t\t\tout_propertyDef.assignGuid = true;\n\t\t}\n\t}\n\n\t/**\n\t * Method used to determine whether the given object is a property constructor\n\t *\n\t * @param {Object} in_obj - Object to check.\n\t * @returns {boolean} True if the object is a BaseProperty.\n\t * @private\n\t */\n\t_isNativePropertyConstructor(in_obj) {\n\t\t// TODO: This tests seems dangerous. I think it is based on the assumption that constructor is not\n\t\t// overwritten in the derived classes (which it probably should be)\n\t\treturn in_obj.constructor && in_obj.constructor === ContainerProperty.constructor;\n\t}\n\n\t/**\n\t * Checks whether the property has a typedValue and replaces the value and the typeid\n\t * with the ones in the typedValue.\n\t * @param {Object} in_property - The property top parse.\n\t * @param {string} in_scope - The scope in which in_template is defined in\n\t * @param {string} in_context - The context of the in_property\n\t * @returns {Boolean} - True if the property has a typedValue.\n\t * @throws {TYPED_VALUES_MUST_DERIVE_FROM_BASE_TYPE} - Thrown when setting a typed value for a primitive.\n\t * @private\n\t */\n\t_parseTypedValue(in_property, in_scope, in_context) {\n\t\tvar res = {\n\t\t\ttyped: false,\n\t\t\tvalue: in_property.value,\n\t\t\ttypeid: in_property.typeid,\n\t\t};\n\n\t\tif (in_property.typedValue) {\n\t\t\tvar typeid = in_property.typeid || \"ContainerProperty\";\n\n\t\t\t// Setting typedValue to a primitive is not supported\n\t\t\tif (TypeIdHelper.isPrimitiveType(typeid)) {\n\t\t\t\tthrow new Error(MSG.TYPED_VALUES_FOR_PRIMITIVES_NOT_SUPPORTED + in_property.id);\n\t\t\t}\n\n\t\t\tres.typed = true;\n\t\t\tif (in_context === \"single\") {\n\t\t\t\tif (!in_property.typedValue.typeid) {\n\t\t\t\t\tthrow new Error(MSG.FIELD_TYPEID_IS_REQUIRED + \"typedValue \" + typeid);\n\t\t\t\t}\n\n\t\t\t\tif (!this.inheritsFrom(in_property.typedValue.typeid, typeid, { scope: in_scope })) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\tMSG.TYPED_VALUES_MUST_DERIVE_FROM_BASE_TYPE +\n\t\t\t\t\t\t\tin_property.typedValue.typeid +\n\t\t\t\t\t\t\t\" must be a subclass of \" +\n\t\t\t\t\t\t\ttypeid,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tres.value = in_property.typedValue.value;\n\t\t\t\tres.typeid = in_property.typedValue.typeid;\n\t\t\t} else {\n\t\t\t\tres.value = in_property.typedValue;\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}\n\n\t/**\n\t * Parse a given property template appending its property and constant objects to the given propertyDef\n\t *\n\t * @param {property-properties.PropertyTemplate} in_template - template for the property\n\t * @param {string} in_scope - The scope in which in_template is defined in\n\t * @param {boolean} in_allowChildMerges - Whether merging of children (nested properties) is allowed.\n\t * This is used for extending inherited properties.\n\t * @param {Object} out_propertyDef - The created property definition\n\t * @private\n\t */\n\t_parseTemplate(in_template, in_scope, in_allowChildMerges, propertyDef) {\n\t\t// Check if there are nested property arrays\n\t\tif (!(in_template.inherits && in_template.inherits.indexOf(\"Enum\") !== -1)) {\n\t\t\tif (in_template.properties) {\n\t\t\t\tconst properties = in_template.properties;\n\n\t\t\t\tfor (let i = 0; i < properties.length; i++) {\n\t\t\t\t\tconst id = properties[i].id;\n\t\t\t\t\tconst typeid = properties[i].typeid || \"ContainerProperty\";\n\t\t\t\t\tconst context = properties[i].context || \"single\";\n\t\t\t\t\tconst optional = properties[i].optional || false;\n\n\t\t\t\t\tconst valueParsed = this._parseTypedValue(properties[i], in_scope, context);\n\n\t\t\t\t\tif (optional) {\n\t\t\t\t\t\tpropertyDef.optionalChildren = propertyDef.optionalChildren || {};\n\t\t\t\t\t\tpropertyDef.entry.optionalChildren = true;\n\t\t\t\t\t\tpropertyDef.optionalChildren[id] = typeid;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (valueParsed.value) {\n\t\t\t\t\t\tconst newChildEntry = {\n\t\t\t\t\t\t\tinitialValue: valueParsed,\n\t\t\t\t\t\t\toptional,\n\t\t\t\t\t\t\tallowChildMerges: in_allowChildMerges,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tpropertyDef.children = propertyDef.children || [];\n\t\t\t\t\t\tpropertyDef.children.unshift([properties[i].id, newChildEntry]);\n\t\t\t\t\t\tthis._createDefFromPropertyDeclaration(properties[i], in_scope, newChildEntry);\n\t\t\t\t\t} else if (!optional) {\n\t\t\t\t\t\tconst newChildEntry = {\n\t\t\t\t\t\t\tinitialValue: undefined,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tpropertyDef.children = propertyDef.children || [];\n\t\t\t\t\t\tpropertyDef.children.unshift([properties[i].id, newChildEntry]);\n\t\t\t\t\t\tthis._createDefFromPropertyDeclaration(properties[i], in_scope, newChildEntry);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (in_template.constants) {\n\t\t\t\tconst constants = in_template.constants;\n\t\t\t\tfor (let i = 0; i < constants.length; i++) {\n\t\t\t\t\tconst context = constants[i].context || \"single\";\n\t\t\t\t\tconst valueParsed = this._parseTypedValue(constants[i], in_scope, context);\n\n\t\t\t\t\tconst newChildEntry = {\n\t\t\t\t\t\tinitialValue: undefined,\n\t\t\t\t\t\tconstant: true,\n\t\t\t\t\t};\n\t\t\t\t\tpropertyDef.children = propertyDef.children || [];\n\t\t\t\t\tpropertyDef.children.unshift([constants[i].id, newChildEntry]);\n\n\t\t\t\t\tthis._createDefFromPropertyDeclaration(constants[i], in_scope, newChildEntry);\n\n\t\t\t\t\tif (valueParsed.value) {\n\t\t\t\t\t\tnewChildEntry.initialValue = valueParsed;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// private params:\n\t// @param {string} [in_options.scope] - The scope in which the property typeid is defined\n\t/**\n\t * Checks whether the template with typeid in_templateTypeid inherits from the template in in_baseTypeid\n\t *\n\t * Note: By default, this also returns true if in_templateTypeid === in_baseTypeid, since in most use cases\n\t * the user wants to check whether a given template has all members as another template and so this is\n\t * true for the template itself\n\t *\n\t * @param {string} in_templateTypeid - Template for which we want to check, whether in_baseTypeid is a parent\n\t * @param {string} in_baseTypeid - The base template to check for\n\t * @param {object} [in_options] - Additional options\n\t * @param {boolean} [in_options.includeSelf=true] - Also return true if in_templateTypeid === in_baseTypeid\n\t * @param {property-properties.Workspace} [in_options.workspace] - A checked out workspace to check against. If supplied,\n\t * the function will check against the schemas that have been registered within the workspace\n\t * @throws if no template is found for in_templateTypeid\n\t * @returns {boolean} True if in_baseTypeid is a parent of in_templateTypeid or\n\t * if (in_includeSelf == true and in_templateTypeid == in_baseTypeid)\n\t */\n\tinheritsFrom(in_templateTypeid, in_baseTypeid, in_options) {\n\t\tconst cachedInheritance = this._inheritanceCache[in_templateTypeid];\n\n\t\tin_options = in_options || {};\n\n\t\tif (\n\t\t\tin_templateTypeid === in_baseTypeid &&\n\t\t\t(!!in_options.includeSelf || in_options.includeSelf === undefined)\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// check the inheritance of primitive typeid\n\t\tif (\n\t\t\t(TypeIdHelper.isPrimitiveType(in_templateTypeid) ||\n\t\t\t\tTypeIdHelper.isReservedType(in_templateTypeid)) &&\n\t\t\t(TypeIdHelper.isPrimitiveType(in_baseTypeid) ||\n\t\t\t\tTypeIdHelper.isReservedType(in_baseTypeid))\n\t\t) {\n\t\t\treturn TypeIdHelper.nativeInheritsFrom(in_templateTypeid, in_baseTypeid);\n\t\t}\n\n\t\t// look in the cache first\n\t\tif (cachedInheritance && cachedInheritance[in_baseTypeid]) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tvar parents = {};\n\t\t\tthis._getAllParentsForTemplateInternal(\n\t\t\t\tin_templateTypeid,\n\t\t\t\tparents,\n\t\t\t\ttrue,\n\t\t\t\tin_options.scope,\n\t\t\t);\n\n\t\t\t// update the cache\n\t\t\tthis._inheritanceCache[in_templateTypeid] = parents;\n\n\t\t\treturn parents[in_baseTypeid] !== undefined;\n\t\t}\n\t}\n\n\t// private params:\n\t// @param {string|undefined} [in_options.scope] - The scope in which the template was stored.\n\t/**\n\t * Returns all the typeids the template inherits from (including all possible paths through multiple inheritance).\n\t * The order of the elements in the array is unspecified.\n\t *\n\t * @param {string} in_typeid - typeid of the template\n\t * @param {object} [in_options] - Additional options\n\t * @param {boolean} [in_options.includeBaseProperty=false] - Include BaseProperty as parent.\n\t * Everything implicitly inherits from BaseProperty, but it is not explicitly listed in the template,\n\t * so it is only included if explicitly requested.\n\t * @param {property-properties.Workspace} [in_options.workspace] - A checked out workspace to check against.\n\t * If supplied, the function will check against the schemas that have been registered within the workspace.\n\t * @throws if no template found for in_typeid. Make sure it is registered first.\n\t * @returns {Array.<string>} typeids of all inherited types (in unspecified order)\n\t */\n\tgetAllParentsForTemplate(in_typeid, in_options) {\n\t\tin_options = in_options || {};\n\t\t// We just forward the request to the internal function\n\t\tvar parents = {};\n\t\tvar scope = in_options.workspace\n\t\t\t? in_options.workspace.getRoot()._getCheckedOutRepositoryInfo().getScope()\n\t\t\t: in_options.scope;\n\t\tthis._getAllParentsForTemplateInternal(\n\t\t\tin_typeid,\n\t\t\tparents,\n\t\t\t!!in_options.includeBaseProperty,\n\t\t\tscope,\n\t\t);\n\n\t\treturn _.keys(parents);\n\t}\n\n\t/**\n\t * Returns all the typeids the template inherits from (including all possible paths through multiple inheritance).\n\t *\n\t * @param {string} in_typeid - typeid of the template\n\t * @param {Object} out_parents - Map containing the parents\n\t * @param {Boolean} in_includeBaseProperty - Include BaseProperty as parent. Everything implicitly inherits from\n\t * BaseProperty, but it is not explicitly listed in the template, so it is only be included if explicitly requested.\n\t * @param {string} [in_scope] - The scope in which the property typeid is defined.\n\t */\n\t_getAllParentsForTemplateInternal(in_typeid, out_parents, in_includeBaseProperty, in_scope) {\n\t\tif (TypeIdHelper.isPrimitiveType(in_typeid)) {\n\t\t\t// Everything inherits from BaseProperty.\n\t\t\tif (in_includeBaseProperty) {\n\t\t\t\tout_parents[\"AbstractStaticCollectionProperty\"] = true;\n\t\t\t\tout_parents[\"BaseProperty\"] = true;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tvar template = this._get(in_typeid, undefined, in_scope);\n\t\tif (!template) {\n\t\t\tthrow new Error(MSG.NON_EXISTING_TYPEID + in_typeid);\n\t\t}\n\n\t\t// Everything inherits from BaseProperty.\n\t\tif (in_includeBaseProperty) {\n\t\t\tout_parents[\"AbstractStaticCollectionProperty\"] = true;\n\t\t\tout_parents[\"BaseProperty\"] = true;\n\t\t}\n\n\t\t// Run over all parents and insert them into the parents array\n\t\tif (template.inherits) {\n\t\t\t// We have to distinguish the cases where the parents are either specified as a single string or an array\n\t\t\tvar parents = _.isArray(template.inherits) ? template.inherits : [template.inherits];\n\n\t\t\tfor (var i = 0; i < parents.length; i++) {\n\t\t\t\t// Mark it as parent\n\t\t\t\tout_parents[parents[i]] = true;\n\n\t\t\t\t// Continue recursively\n\t\t\t\tthis._getAllParentsForTemplateInternal(parents[i], out_parents, undefined, in_scope);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Internal function used to clear and reinitialize the PropertyFactory\n\t * @private\n\t */\n\t_clear() {\n\t\tthis._localPrimitivePropertiesAndTemplates = new Collection();\n\t\tthis._localVersionedTemplates = new Collection();\n\t\tthis._remoteScopedAndVersionedTemplates = new Collection();\n\t\tthis._inheritanceCache = {};\n\t\tthis._typedPropertyConstructorCache = {};\n\n\t\tthis._init();\n\t}\n\n\t/**\n\t * Reregisters a template (by overwriting the existing template).\n\t *\n\t * This should NEVER be necessary in the final application, but it might be helpful during interactive debugging\n\t * sessions, when trying out different templates.\n\t *\n\t * @protected\n\t * @param {property-properties.PropertyTemplate|object|property-properties.BaseProperty} in_template -\n\t * The template to reregister\n\t */\n\t_reregister(in_template) {\n\t\tvar typeid = in_template.typeid;\n\n\t\tif (!(in_template instanceof PropertyTemplate)) {\n\t\t\tin_template = new PropertyTemplate(in_template);\n\t\t}\n\n\t\tvar typeidWithoutVersion = in_template.getTypeidWithoutVersion();\n\t\tvar version = in_template.getVersion();\n\n\t\t// Remove the existing entry\n\t\tthis._localPrimitivePropertiesAndTemplates.remove(typeid);\n\n\t\tif (this._localVersionedTemplates.has(typeidWithoutVersion)) {\n\t\t\tif (this._localVersionedTemplates.item(typeidWithoutVersion).has(version)) {\n\t\t\t\tthis._localVersionedTemplates.item(typeidWithoutVersion).remove(version);\n\t\t\t}\n\t\t}\n\n\t\t// Clear this schema from the inheritance cache\n\t\tdelete this._inheritanceCache[typeid];\n\n\t\t// Remove the typeid from the constructor cache\n\t\tvar registeredConstructors = _.keys(this._typedPropertyConstructorCache);\n\t\tfor (var i = 0; i < registeredConstructors.length; i++) {\n\t\t\tif (registeredConstructors[i].substr(0, typeid.length) === typeid) {\n\t\t\t\tdelete this._typedPropertyConstructorCache[registeredConstructors[i]];\n\t\t\t}\n\t\t}\n\n\t\t// Remove from typeid creation cache\n\t\tthis._cachedCreationFunctions.delete(typeid);\n\n\t\t// And repeat the registration\n\t\tregisterLocal.call(this, in_template);\n\t}\n\n\t/**\n\t * Initializes the schema store.\n\t * @param {Object} in_options - the store settings.\n\t * @param {getBearerTokenFn} in_options.getBearerToken - Function that accepts a callback.\n\t * Function that should be called with an error or the OAuth2 bearer token representing the user.\n\t * @param {string} in_options.url - The root of the url used in the request to retrieve PropertySet schemas.\n\t *\n\t * @returns {Promise} Return an empty promise when checkout resolve or reject with error.\n\t */\n\tasync initializeSchemaStore(in_options) {\n\t\t// https://regex101.com/r/TlgGJp/2\n\t\tvar regexBaseUrl =\n\t\t\t// eslint-disable-next-line unicorn/no-unsafe-regex\n\t\t\t/^(https?:)?\\/\\/((.[-a-zA-Z0-9@:%_+~#=.]{2,256}){1,2}\\.[a-z]{2,6}|\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})(:\\d{1,5})?(\\/[-a-zA-Z0-9@:%_+.~#?&/=]*)*$/;\n\n\t\tif (\n\t\t\t!in_options ||\n\t\t\t!in_options.getBearerToken ||\n\t\t\t!_.isFunction(in_options.getBearerToken) ||\n\t\t\t!in_options.url\n\t\t) {\n\t\t\treturn Promise.reject(new Error(MSG.MISSING_FSS_INIT_OPTIONS));\n\t\t}\n\n\t\tif (!regexBaseUrl.test(in_options.url)) {\n\t\t\treturn Promise.reject(new Error(MSG.FSS_BASEURL_WRONG));\n\t\t}\n\n\t\tif (!in_options.url.endsWith(\"/\")) {\n\t\t\tin_options.url = in_options.url + \"/\";\n\t\t}\n\n\t\tthis._templateStore = new ForgeSchemaStore(in_options);\n\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Pushes a template request task onto the template requests queue\n\t *\n\t * @param {String} in_task - schema retrieval task\n\t * @param {String} in_callback - callback of the task\n\t *\n\t * @private\n\t */\n\t_retrieveTemplateRequestWorker(in_task, in_callback) {\n\t\tvar store = in_task.context;\n\t\tif (store) {\n\t\t\tstore\n\t\t\t\t.retrieveTemplate(in_task.typeid)\n\t\t\t\t.then(function (response) {\n\t\t\t\t\tin_callback(response);\n\t\t\t\t})\n\t\t\t\t.catch(function (error) {\n\t\t\t\t\tin_callback({ error: error });\n\t\t\t\t});\n\t\t} else {\n\t\t\tthrow new Error(MSG.INVALID_TEMPLATE_STORE);\n\t\t}\n\t}\n\n\t/**\n\t * Tries to resolve dependencies after some calls to register() have been made\n\t *\n\t *\n\t * @returns {Promise} A promise that resolves to an object with the following structure:\n\t *\n\t * ```json\n\t * {\n\t * errors: {\n\t * typeid1: errors,\n\t * ...\n\t * typeidn: errors\n\t * },\n\t * templates: {\n\t * typeid1: [], array of templates\n\t * ...\n\t * typeidn: [] array of templates\n\t * }\n\t * }\n\t * ```\n\t */\n\tasync resolveSchemas() {\n\t\t// Only one queue at a time can be processed.\n\t\tif (this.templateRequestsQueue !== undefined) {\n\t\t\treturn Promise.reject(new Error(MSG.DEPENDENCIES_RESOLUTION_IN_PROGRESS));\n\t\t}\n\n\t\tthis.templateRequestsQueue = async.queue(this._retrieveTemplateRequestWorker, 5);\n\n\t\tvar that = this;\n\n\t\t// 0. Inspect locally registered templates for unknown dependencies\n\t\tthis._localPrimitivePropertiesAndTemplates.iterate(function (key, type) {\n\t\t\tif (\n\t\t\t\t!that._isSpecializedConstructor(key) &&\n\t\t\t\tPropertyTemplate.isTemplate(type.getPropertyTemplate())\n\t\t\t) {\n\t\t\t\tvar unknownDeps = _extractUnknownDependencies.call(that, type.getPropertyTemplate());\n\t\t\t\tfor (var d = 0; d < unknownDeps.length; d++) {\n\t\t\t\t\tvar dep = unknownDeps[d];\n\t\t\t\t\tif (that.missingDependencies[dep] === undefined) {\n\t\t\t\t\t\tthat.missingDependencies[dep] = { requested: false };\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tvar typeids = Object.keys(this.missingDependencies);\n\n\t\t// 1. Iterate over missing dependencies. Create pending request entries. Set status to pending.\n\t\t// Push template retrieve task to the queue for unresolved typeids (missing dependencies)\n\t\tfor (var i = 0; i < typeids.length; i++) {\n\t\t\tvar typeid = typeids[i];\n\t\t\tif (that.templateRequestsResults.errors[typeid] === undefined) {\n\t\t\t\tthat.templateRequestsResults.errors[typeid] = {};\n\t\t\t}\n\t\t\tif (that.templateRequestsResults.schemas[typeid] === undefined) {\n\t\t\t\tthat.templateRequestsResults.schemas[typeid] = {};\n\t\t\t}\n\n\t\t\t_pushTemplateRequestTask.call(that, typeid);\n\t\t}\n\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\tif (that.templateRequestsQueue.length() === 0) {\n\t\t\t\tresolve({ errors: {}, schemas: {} });\n\t\t\t\tthat.templateRequestsQueue = undefined;\n\t\t\t} else {\n\t\t\t\tthat.templateRequestsQueue.drain = function () {\n\t\t\t\t\tvar errors = _.compact(_.pluck(that.templateRequestsResults.errors, \"typeid\"));\n\t\t\t\t\tvar results = that.templateRequestsResults;\n\t\t\t\t\tvar resultsKeys = Object.keys(that.templateRequestsResults.schemas);\n\t\t\t\t\tvar tempMissingDependencies = [];\n\t\t\t\t\tlet tempConstant;\n\t\t\t\t\t// create missing dependencies for contextKeyType\n\t\t\t\t\tfor (var j = 0; j < resultsKeys.length; j++) {\n\t\t\t\t\t\tvar templateWrapper = that._getWrapper(\n\t\t\t\t\t\t\tresults.schemas[resultsKeys[j]].typeid,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (templateWrapper) {\n\t\t\t\t\t\t\tvar compiledTemplate = templateWrapper.getCompiledTemplate(that);\n\t\t\t\t\t\t\tif (compiledTemplate.constants) {\n\t\t\t\t\t\t\t\tfor (var s = 0; s < compiledTemplate.constants.length; s++) {\n\t\t\t\t\t\t\t\t\ttempConstant = compiledTemplate.constants[s];\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\ttempConstant.contextKeyType === \"typeid\" &&\n\t\t\t\t\t\t\t\t\t\ttempConstant.context === \"map\" &&\n\t\t\t\t\t\t\t\t\t\ttempConstant.value\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tvar valueKeys = Object.keys(tempConstant.value);\n\t\t\t\t\t\t\t\t\t\tfor (var z = 0; z < valueKeys.length; z++) {\n\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\tTypeIdHelper.isTemplateTypeid(valueKeys[z]) &&\n\t\t\t\t\t\t\t\t\t\t\t\t!(valueKeys[z] in that.templateRequestsResults.schemas) &&\n\t\t\t\t\t\t\t\t\t\t\t\t!tempMissingDependencies.includes(valueKeys[z])\n\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\ttempMissingDependencies.push(valueKeys[z]);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (tempMissingDependencies.length !== 0) {\n\t\t\t\t\t\tfor (var j = 0; j < tempMissingDependencies.length; j++) {\n\t\t\t\t\t\t\tvar missingTypeid = tempMissingDependencies[j];\n\t\t\t\t\t\t\tif (that.missingDependencies[missingTypeid] === undefined) {\n\t\t\t\t\t\t\t\tthat.missingDependencies[missingTypeid] = { requested: false };\n\t\t\t\t\t\t\t\tif (that.templateRequestsResults.errors[missingTypeid] === undefined) {\n\t\t\t\t\t\t\t\t\tthat.templateRequestsResults.errors[missingTypeid] = {};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (that.templateRequestsResults.schemas[missingTypeid] === undefined) {\n\t\t\t\t\t\t\t\t\tthat.templateRequestsResults.schemas[missingTypeid] = {};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_pushTemplateRequestTask.call(that, missingTypeid);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (that.templateRequestsQueue.length() === 0) {\n\t\t\t\t\t\tthat.templateRequestsResults = { errors: {}, schemas: {} };\n\t\t\t\t\t\tif (errors.length && errors.length > 0) {\n\t\t\t\t\t\t\treject(new Error(\"Some errors occured\"));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.missingDependencies = {};\n\t\t\t\t\t\t\tresolve(results);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthat.templateRequestsQueue = undefined;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Determines whether the given property is an instance of the property type corresponding to the given native\n\t * property typeid and context.\n\t *\n\t * @param {property-properties.BaseProperty} in_property - The property to test\n\t * @param {String} in_primitiveTypeid - Native property typeid\n\t * @param {String} in_context - Context of the property\n\t * @returns {boolean} True, if the property is an instance of the corresponding type\n\t */\n\tinstanceOf(in_property, in_primitiveTypeid, in_context) {\n\t\tvar templateConstructor = this._get(in_primitiveTypeid, in_context);\n\t\tvar result = false;\n\t\tif (templateConstructor && this._isNativePropertyConstructor(templateConstructor)) {\n\t\t\tresult = in_property instanceof templateConstructor;\n\t\t}\n\t\treturn result;\n\t}\n}\n\n/**\n * @internal\n */\nconst PropertyFactorySingleton = new PropertyFactory();\nexport { PropertyFactorySingleton as PropertyFactory };\n\nLazyLoadedProperties.AbstractStaticCollectionProperty = AbstractStaticCollectionProperty;\nLazyLoadedProperties.IndexedCollectionBaseProperty = IndexedCollectionBaseProperty;\nLazyLoadedProperties.ContainerProperty = ContainerProperty;\nLazyLoadedProperties.ArrayProperty = ArrayProperty;\nLazyLoadedProperties.EnumArrayProperty = EnumArrayProperty;\nLazyLoadedProperties.ReferenceProperty = ReferenceProperty;\nLazyLoadedProperties.StringProperty = StringProperty;\nLazyLoadedProperties.ValueProperty = ValueProperty;\nLazyLoadedProperties.ValueMapProperty = ValueMapProperty;\nLazyLoadedProperties.ReferenceMapProperty = ReferenceMapProperty;\nLazyLoadedProperties.NodeProperty = NodeProperty;\nLazyLoadedProperties.PropertyFactory = PropertyFactorySingleton;\n"]}
|
|
1
|
+
{"version":3,"file":"propertyFactory.js","sourceRoot":"","sources":["../src/propertyFactory.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,0FAA0F;AAC1F,iCAAiC;AAEjC;;;GAGG;AAEH,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAC5B,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;AAElC,MAAM,EACL,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,SAAS,GACT,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACnD,MAAM,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC;AAE1B,MAAM,EACL,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,SAAS,GACT,GAAG,OAAO,CAAC,wCAAwC,CAAC,CAAC;AAEtD,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAC/B,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAC3D,MAAM,EAAE,uBAAuB,EAAE,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAEzE,+BAA+B;AAC/B,MAAM,EAAE,YAAY,EAAE,GAAG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,GAAG,iBAAiB,CAAC;AAC3D,oBAAoB,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;AAC3D,oBAAoB,CAAC,cAAc,GAAG,cAAc,CAAC;AACrD,oBAAoB,CAAC,aAAa,GAAG,aAAa,CAAC;AACnD,oBAAoB,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;AACzD,oBAAoB,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;AACjE,oBAAoB,CAAC,YAAY,GAAG,YAAY,CAAC;AACjD,oBAAoB,CAAC,eAAe,GAAG,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// These imports are grouped manually to ensure that the imports are in the correct order.\n/* eslint-disable import/order */\n\n/**\n * @fileoverview Declaration of the PropertyFactory class.\n * Responsible for creating property sets and registering property templates\n */\n\nconst _ = require(\"lodash\");\nconst { cloneDeep: deepCopy } = _;\n\nconst {\n\tCollection,\n\tConsoleUtils,\n\tEventEmitter,\n\tSortedCollection,\n\tconstants,\n\tGuidUtils,\n} = require(\"@fluid-experimental/property-common\");\nconst { MSG } = constants;\n\nconst {\n\tTypeIdHelper,\n\tTemplateValidator,\n\tPathHelper,\n\tChangeSet,\n} = require(\"@fluid-experimental/property-changeset\");\n\nconst semver = require(\"semver\");\nconst async = require(\"async\");\nconst { PropertyTemplate } = require(\"./propertyTemplate\");\nconst { PropertyTemplateWrapper } = require(\"./propertyTemplateWrapper\");\n\n// Include the property classes\nconst { BaseProperty } = require(\"./properties/baseProperty\");\nconst { NamedProperty } = require(\"./properties/namedProperty\");\nconst { NodeProperty } = require(\"./properties/nodeProperty\");\nconst { NamedNodeProperty } = require(\"./properties/namedNodeProperty\");\nconst { ContainerProperty } = require(\"./properties/containerProperty\");\nconst { ValueProperty } = require(\"./properties/valueProperty\");\n\n// Include all primitive properties –- will register at the end.\nconst {\n\tUint8Property,\n\tUint16Property,\n\tUint32Property,\n} = require(\"./properties/uintProperties\");\n\nconst { Float32Property, Float64Property } = require(\"./properties/floatProperties\");\n\nconst {\n\tInt8Property,\n\tInt16Property,\n\tInt32Property,\n\tInt64Property,\n\tUint64Property,\n} = require(\"./properties/intProperties\");\n\nconst { StringProperty } = require(\"./properties/stringProperty\");\nconst { BoolProperty } = require(\"./properties/boolProperty\");\nconst { ReferenceProperty } = require(\"./properties/referenceProperty\");\nconst { EnumProperty } = require(\"./properties/enumProperty\");\n\n// Include collection properties\nconst { ArrayProperty } = require(\"./properties/arrayProperty\");\nconst { SetProperty } = require(\"./properties/setProperty\");\nconst { MapProperty } = require(\"./properties/mapProperty\");\nconst { ValueMapProperty } = require(\"./properties/valueMapProperty\");\nconst {\n\tIndexedCollectionBaseProperty,\n} = require(\"./properties/indexedCollectionBaseProperty\");\nconst {\n\tAbstractStaticCollectionProperty,\n} = require(\"./properties/abstractStaticCollectionProperty\");\n\nconst {\n\tFloat32ArrayProperty,\n\tFloat64ArrayProperty,\n\tUint32ArrayProperty,\n\tInt32ArrayProperty,\n\tUint64ArrayProperty,\n\tInt64ArrayProperty,\n\tUint16ArrayProperty,\n\tInt16ArrayProperty,\n\tUint8ArrayProperty,\n\tInt8ArrayProperty,\n\tStringArrayProperty,\n\tBoolArrayProperty,\n} = require(\"./properties/valueArrayProperty\");\n\nconst { ReferenceMapProperty } = require(\"./properties/referenceMapProperty\");\nconst { ReferenceArrayProperty } = require(\"./properties/referenceArrayProperty\");\nconst { EnumArrayProperty } = require(\"./properties/enumArrayProperty\");\n\nconst {\n\tFloat64MapProperty,\n\tFloat32MapProperty,\n\tUint32MapProperty,\n\tUint64MapProperty,\n\tUint16MapProperty,\n\tUint8MapProperty,\n\tInt32MapProperty,\n\tInt64MapProperty,\n\tInt16MapProperty,\n\tInt8MapProperty,\n\tStringMapProperty,\n\tBoolMapProperty,\n} = require(\"./properties/valueMapProperty\");\n\nconst { LazyLoadedProperties } = require(\"./properties/lazyLoadedProperties\");\n\n/* eslint-enable import/order */\n\n/**\n * Creates an instance of the TemplateValidator\n *\n * @constructor\n * @protected\n *\n * @param {bool} skipSemver - Flag passed to the constructor of the TemplateValidator. Skips semver validation.\n *\n * @ignore\n */\nvar _createTemplateValidator = function (skipSemver) {\n\tvar hasSchema = function (typeid) {\n\t\treturn this._localVersionedTemplates.has(typeid);\n\t};\n\tvar params = {\n\t\tinheritsFrom: this.inheritsFrom.bind(this),\n\t\thasSchema: hasSchema.bind(this),\n\t};\n\n\tif (skipSemver) {\n\t\tparams.skipSemver = skipSemver;\n\t}\n\n\treturn new TemplateValidator(params);\n};\n\n/**\n * Register a template\n *\n * @private\n *\n * @throws if in_template is invalid.\n * @throws if trying to register a primitive property.\n * @throws if updating an existing template without property changing the version number.\n * @throws if no in_template is passed.\n * @param {property-properties.PropertyTemplate|object} in_template - the template to register.\n */\nvar registerLocal = function (in_template) {\n\tvar typeid = in_template.typeid;\n\tvar remoteTemplates = this._getRemoteTemplates(typeid);\n\n\tif (!this._isNativePropertyConstructor(in_template)) {\n\t\tif (!(in_template instanceof PropertyTemplate)) {\n\t\t\tin_template = new PropertyTemplate(in_template);\n\t\t}\n\n\t\t// Here we are registering a user defined template. We need to check whether it is already registered\n\t\t// as a remote template.\n\t\tif (this._localPrimitivePropertiesAndTemplates.has(typeid) || remoteTemplates.length) {\n\t\t\t// Template already exists. The incoming template MUST match what is currently registered.\n\t\t\t// If they do not match, throw an error letting the user know that the templates are incompatible.\n\n\t\t\tif (!remoteTemplates.length) {\n\t\t\t\tconsole.warn(MSG.REGISTERING_EXISTING_TYPEID + typeid);\n\t\t\t}\n\n\t\t\tvar templateValidator = _createTemplateValidator.call(this, true);\n\n\t\t\tvar serializedInTemplate = in_template.serializeCanonical();\n\n\t\t\tvar localValidationResults = { isValid: true };\n\t\t\tif (this._localPrimitivePropertiesAndTemplates.has(typeid)) {\n\t\t\t\tvar localRegisteredTemplate = this._localPrimitivePropertiesAndTemplates\n\t\t\t\t\t.item(typeid)\n\t\t\t\t\t.getPropertyTemplate();\n\n\t\t\t\tlocalValidationResults = templateValidator.validate(\n\t\t\t\t\tlocalRegisteredTemplate.serializeCanonical(),\n\t\t\t\t\tserializedInTemplate,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (localValidationResults.isValid) {\n\t\t\t\tvar remoteValidationResults = { isValid: true };\n\t\t\t\tif (remoteTemplates.length) {\n\t\t\t\t\t_.every(remoteTemplates, function (template) {\n\t\t\t\t\t\tremoteValidationResults = templateValidator.validate(\n\t\t\t\t\t\t\ttemplate.serializeCanonical(),\n\t\t\t\t\t\t\tserializedInTemplate,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn remoteValidationResults.isValid;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!localValidationResults.isValid) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\tMSG.TEMPLATE_MISMATCH +\n\t\t\t\t\t\ttypeid +\n\t\t\t\t\t\t\"\\n errors = \" +\n\t\t\t\t\t\tJSON.stringify(_extractErrorMessage(localValidationResults.errors), 0, 2),\n\t\t\t\t);\n\t\t\t} else if (!remoteValidationResults.isValid) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\tMSG.REMOTE_TEMPLATE_MISMATCH +\n\t\t\t\t\t\ttypeid +\n\t\t\t\t\t\t\"\\n errors = \" +\n\t\t\t\t\t\tJSON.stringify(_extractErrorMessage(remoteValidationResults.errors), 0, 2),\n\t\t\t\t);\n\t\t\t} else if (this._localPrimitivePropertiesAndTemplates.has(typeid)) {\n\t\t\t\t// Template is already registered. Do nothing.\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (in_template._isVersioned()) {\n\t\t\tvar validationResult = this.validate(in_template.serializeCanonical());\n\n\t\t\tif (validationResult.isValid) {\n\t\t\t\tvar typeidWithoutVersion = in_template.getTypeidWithoutVersion();\n\t\t\t\tvar version = in_template.getVersion();\n\t\t\t\tthis._validateSemver(in_template, true);\n\n\t\t\t\t// Semver validation passed. Add the template to the local versioned templates collection\n\t\t\t\tif (this._localVersionedTemplates.has(typeidWithoutVersion)) {\n\t\t\t\t\tthis._localVersionedTemplates.item(typeidWithoutVersion).add(version, in_template);\n\t\t\t\t} else {\n\t\t\t\t\tvar collection = _createVersionedSortedCollection();\n\t\t\t\t\tthis._localVersionedTemplates.add(typeidWithoutVersion, collection);\n\t\t\t\t\tcollection.add(version, in_template);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new Error(\n\t\t\t\t\tMSG.FAILED_TO_REGISTER +\n\t\t\t\t\t\ttypeid +\n\t\t\t\t\t\t\"\\n errors = \" +\n\t\t\t\t\t\tJSON.stringify(_extractErrorMessage(validationResult.errors), 0, 2),\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Error(\n\t\t\t\tMSG.UNVERSIONED_TEMPLATE + \" Template with typeid = \" + typeid + \" is not versioned.\",\n\t\t\t);\n\t\t}\n\t\t// Forward to the internal function\n\t\tthis._registerTypeId(typeid, in_template);\n\t} else {\n\t\tthrow new Error(MSG.CANNOT_REGISTER_PRIMITIVE + typeid);\n\t}\n};\n\n/**\n * Helper function used to extract the error messages from a list of Error objects\n * @param {Array.<Error>} in_errors - List of error objects\n * @private\n * @returns {Array.<string>} List of error messages\n */\nvar _extractErrorMessage = function (in_errors) {\n\treturn _.map(in_errors, function (error) {\n\t\treturn error.message;\n\t});\n};\n\n/**\n * Helper function used to create a sorted collection\n * @returns {property-common.Datastructures.SortedCollection} Empty sorted collection\n * @private\n */\nvar _createVersionedSortedCollection = function () {\n\tvar collection = new SortedCollection();\n\tcollection.setComparisonFunction(function (versionA, versionB) {\n\t\tif (semver.gt(versionA, versionB)) {\n\t\t\treturn 1;\n\t\t} else if (semver.lt(versionA, versionB)) {\n\t\t\treturn -1;\n\t\t}\n\n\t\treturn 0;\n\t});\n\treturn collection;\n};\n\n/**\n * Extracts typeids directly referred to in a template and that are not locally known\n *\n * @public\n * @param {property-properties.PropertyTemplate|object} in_template - from which to extract dependencies\n *\n * @returns {Array} list of unknown typeids\n */\nvar _extractUnknownDependencies = function (in_template) {\n\tvar self = this;\n\tvar dependencies = PropertyTemplate.extractDependencies(in_template);\n\n\tdependencies = dependencies.filter(function (typeid) {\n\t\treturn !self._localPrimitivePropertiesAndTemplates.has(typeid);\n\t});\n\n\treturn dependencies;\n};\n\n/**\n * Pushes a template request task onto the template requests queue\n *\n * @public\n * @param {String} in_typeid - typeid of the template to retrieve\n */\nvar _pushTemplateRequestTask = function (in_typeid) {\n\tvar that = this;\n\n\tif (that.missingDependencies[in_typeid].requested === true) {\n\t\treturn;\n\t}\n\tthat.missingDependencies[in_typeid].requested = true;\n\n\tthis.templateRequestsQueue.push(\n\t\t{ typeid: in_typeid, context: that._templateStore },\n\t\tfunction (response) {\n\t\t\tif (response.error) {\n\t\t\t\tthat.templateRequestsResults.errors[in_typeid] = response.error;\n\t\t\t} else {\n\t\t\t\tvar template = response.template;\n\t\t\t\tthat.templateRequestsResults.schemas[in_typeid] = template;\n\t\t\t\tvar unknownDependencies = _extractUnknownDependencies.call(that, template);\n\n\t\t\t\ttry {\n\t\t\t\t\tregisterLocal.call(that, template);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthat.templateRequestsResults.errors[in_typeid] = [error];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Launch new requests for those dependencies\n\t\t\t\tfor (var d = 0; d < unknownDependencies.length; d++) {\n\t\t\t\t\tvar typeid = unknownDependencies[d];\n\n\t\t\t\t\tif (that.missingDependencies[typeid] === undefined) {\n\t\t\t\t\t\tthat.missingDependencies[typeid] = { requested: false };\n\t\t\t\t\t\tif (that.templateRequestsResults.errors[typeid] === undefined) {\n\t\t\t\t\t\t\tthat.templateRequestsResults.errors[typeid] = {};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (that.templateRequestsResults.schemas[typeid] === undefined) {\n\t\t\t\t\t\t\tthat.templateRequestsResults.schemas[typeid] = {};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t_pushTemplateRequestTask.call(that, typeid);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdelete that.missingDependencies[template.typeid];\n\t\t\t}\n\t\t},\n\t);\n};\n\n/**\n * Creates a new collection of property templates used later on\n * to instantiate property sets based on the typeid (Type identifier).\n */\nclass PropertyFactory {\n\t/**\n\t * @constructor\n\t * @protected\n\t * @alias property-properties.PropertyFactory\n\t */\n\tconstructor() {\n\t\t// Unfortunately, PropertyFactory can't inherit from EventEmitter class as\n\t\t// it shares the same member methods names `register` and `unregister`.\n\t\tthis._eventEmitter = new EventEmitter();\n\n\t\tthis._templateValidator = _createTemplateValidator.call(this);\n\n\t\t// Collection containing both local templates and primitive properties\n\t\tthis._localPrimitivePropertiesAndTemplates = new Collection();\n\n\t\t// Collection containing the local templates sorted by their version number in an ascending order\n\t\tthis._localVersionedTemplates = new Collection();\n\n\t\t// Collection containing the remote templates sorted by their version number in an ascending order\n\t\t// within a specified scope.\n\t\tthis._remoteScopedAndVersionedTemplates = new Collection();\n\n\t\t// To hold the template store the PropertyFactory interacts with.\n\t\tthis._templateStore = undefined;\n\n\t\t// Async queue of schema retrieval tasks\n\t\tthis.templateRequestsQueue = undefined;\n\n\t\t// List of missing dependencies\n\t\tthis.missingDependencies = undefined;\n\n\t\t// Structure containing results the process of retrieving property set schemas from store\n\t\tthis.templateRequestsResults = {\n\t\t\terrors: {},\n\t\t\tschemas: {},\n\t\t};\n\n\t\t// Cache of inheritsFrom() request results\n\t\tthis._inheritanceCache = {};\n\n\t\t/** Cache of constructor function that are auto-generated for typeids */\n\t\tthis._typedPropertyConstructorCache = {};\n\n\t\t/** A cache of functions that create the properties */\n\t\tthis._cachedCreationFunctions = new Map();\n\n\t\t/**\n\t\t * Usually we will use the precompiled creation functions, but those all share the same constant properties.\n\t\t * Since it is allowed to overwrite constants via default values, we have to explicitly instantiate new\n\t\t * property instances for constants. Since the constants themselves may contain nested property instances,\n\t\t * we use this flag to indicate that for all nested properties, we do not want to use the precompiled\n\t\t * instantiation functions.\n\t\t */\n\t\tthis._forceInstantion = false;\n\n\t\tthis._init();\n\t}\n\n\t/**\n\t * Add a listener for a given type of event.\n\t *\n\t * @param {string} eventName - A string representing the type of event upon which the\n\t * listener will be notified.\n\t * @param {function} eventListener - The function to call when the \"type\" of event\n\t * is emitted.\n\t */\n\taddListener(eventName, eventListener) {\n\t\tthis._eventEmitter.addListener(eventName, eventListener);\n\t}\n\n\t/**\n\t * Remove a listener for a given type of event. Iff a listener was removed,\n\t * an event 'removeListener' will be emitted.\n\t *\n\t * @param {string} eventName - A string representing the type of event on which the\n\t * listener was attached.\n\t * @param {function} eventListener - The function to remove from the list of functions\n\t */\n\tremoveListener(eventName, eventListener) {\n\t\tthis._eventEmitter.removeListener(eventName, eventListener);\n\t}\n\n\t/**\n\t * Initialize the PropertyFactory by registering primitive types\n\t */\n\t_init() {\n\t\t// Register all primitive properties\n\t\tthis._registerTypeId(\"BaseProperty\", BaseProperty, \"all\");\n\t\tthis._registerTypeId(\"NodeProperty\", NodeProperty, \"all\");\n\t\tthis._registerTypeId(\"ContainerProperty\", ContainerProperty, \"all\");\n\n\t\t// Register the primitive types for the context single\n\t\tthis._registerTypeId(\"Int8\", Int8Property);\n\t\tthis._registerTypeId(\"Uint8\", Uint8Property);\n\t\tthis._registerTypeId(\"Int16\", Int16Property);\n\t\tthis._registerTypeId(\"Uint16\", Uint16Property);\n\t\tthis._registerTypeId(\"Int32\", Int32Property);\n\t\tthis._registerTypeId(\"Int64\", Int64Property);\n\t\tthis._registerTypeId(\"Uint64\", Uint64Property);\n\t\tthis._registerTypeId(\"Uint32\", Uint32Property);\n\t\tthis._registerTypeId(\"Float32\", Float32Property);\n\t\tthis._registerTypeId(\"Float64\", Float64Property);\n\t\tthis._registerTypeId(\"Bool\", BoolProperty);\n\t\tthis._registerTypeId(\"String\", StringProperty);\n\t\tthis._registerTypeId(\"Reference\", ReferenceProperty);\n\t\tthis._registerTypeId(\"Enum\", EnumProperty);\n\n\t\t// Register the primitive types for the context array\n\t\tthis._registerTypeId(\"Int8\", Int8ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Uint8\", Uint8ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Int16\", Int16ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Uint16\", Uint16ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Int32\", Int32ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Uint32\", Uint32ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Int64\", Int64ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Uint64\", Uint64ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Float32\", Float32ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Float64\", Float64ArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"String\", StringArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Bool\", BoolArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Reference\", ReferenceArrayProperty, \"array\");\n\t\tthis._registerTypeId(\"Enum\", EnumArrayProperty, \"array\");\n\n\t\t// Register the primitive types for the context map\n\t\tthis._registerTypeId(\"Int8\", Int8MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Uint8\", Uint8MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Int16\", Int16MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Uint16\", Uint16MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Int32\", Int32MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Uint32\", Uint32MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Int64\", Int64MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Uint64\", Uint64MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Float32\", Float32MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Float64\", Float64MapProperty, \"map\");\n\t\tthis._registerTypeId(\"Bool\", BoolMapProperty, \"map\");\n\t\tthis._registerTypeId(\"String\", StringMapProperty, \"map\");\n\t\tthis._registerTypeId(\"Reference\", ReferenceMapProperty, \"map\");\n\n\t\t// Register the default templates\n\t\tvar NamedPropertyTemplate = {\n\t\t\ttypeid: \"NamedProperty\",\n\t\t\tproperties: [{ id: \"guid\", typeid: \"String\" }],\n\t\t};\n\n\t\tvar NamedNodePropertyTemplate = {\n\t\t\ttypeid: \"NamedNodeProperty\",\n\t\t\tinherits: [\"NodeProperty\", \"NamedProperty\"],\n\t\t};\n\n\t\tvar RelationshipPropertyTemplate = {\n\t\t\ttypeid: \"RelationshipProperty\",\n\t\t\tinherits: [\"NodeProperty\", \"NamedProperty\"],\n\t\t\tproperties: [{ id: \"to\", typeid: \"Reference\" }],\n\t\t};\n\n\t\tthis._registerTypeId(NamedPropertyTemplate.typeid, NamedPropertyTemplate);\n\t\tthis._registerTypeId(NamedNodePropertyTemplate.typeid, NamedNodePropertyTemplate);\n\t\tthis._registerTypeId(RelationshipPropertyTemplate.typeid, RelationshipPropertyTemplate);\n\t}\n\n\t/**\n\t * Register a template which are used to instantiate properties. To find out more about templates,\n\t * see https://docs.google.com/document/d/1-7kXkKTu3AZLjKyKl7XK2VuAJRSbUxo3ZuPA8bzWocs/edit\n\t *\n\t * In addition to json structures\n\t * it also accepts typeids, as well as arrays of jsons ans arrays of typeids\n\t * as arguments. IN the case of jsons, the behavior is similar to the behavior of registerLocal.\n\t * In the case of typeids, it adds it to a list of unknown dependencies if the corresponding template\n\t * is not known locally. The case of arrays is a a repetitive application of the scalar type.\n\t *\n\t * @param {property-properties.PropertyTemplate|object|String|Array} in_input - a template, a typeid or an array of either\n\t */\n\tregister(in_input) {\n\t\tif (this.missingDependencies === undefined) {\n\t\t\tthis.missingDependencies = {};\n\t\t}\n\n\t\t// 3 cases to consider:\n\n\t\t// 1. in_input is an object\n\t\t// Determine the list of dependencies and if at least one is not available locally.\n\t\t// If this is the case, add it to the list of pending dependencies.\n\t\t// If no missing dependency, call registerLocal on the object (Classical case)\n\n\t\t// 2. in_input is a string (typeid)\n\t\t// If in_input is a type id that cannot be resolved locally, add it to the list of missing dependencies.\n\t\t// Otherwise, nothing to do. The corresponding template is already registered locally.\n\n\t\t// 3. in_input is an array of strings (typeids) or jsons\n\t\t// apply step 1. or 2. for all elements of array\n\n\t\tvar validateArray = function (array) {\n\t\t\tvar isInvalid = _.some(array, function (value) {\n\t\t\t\treturn !PropertyTemplate.isTemplate(value) && !TypeIdHelper.isTemplateTypeid(value);\n\t\t\t});\n\n\t\t\treturn !isInvalid;\n\t\t};\n\n\t\tvar input_array = undefined;\n\t\tif (PropertyTemplate.isTemplate(in_input) || typeof in_input === \"string\") {\n\t\t\tinput_array = [in_input];\n\t\t} else if (_.isArray(in_input)) {\n\t\t\tinput_array = in_input;\n\t\t} else {\n\t\t\tthrow new TypeError(MSG.ATTEMPT_TO_REGISTER_WITH_BAD_ARGUMENT);\n\t\t}\n\n\t\tif (!validateArray(input_array)) {\n\t\t\tthrow new Error(MSG.ATTEMPT_TO_REGISTER_WITH_BAD_ARGUMENT);\n\t\t}\n\n\t\tfor (var i = 0; i < input_array.length; i++) {\n\t\t\tvar elem = input_array[i];\n\t\t\tif (typeof elem === \"string\") {\n\t\t\t\tif (!this._localPrimitivePropertiesAndTemplates.has(elem)) {\n\t\t\t\t\tif (this.missingDependencies[elem] === undefined) {\n\t\t\t\t\t\tthis.missingDependencies[elem] = { requested: false };\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (PropertyTemplate.isTemplate(elem)) {\n\t\t\t\tif (this.missingDependencies[elem.typeid] !== undefined) {\n\t\t\t\t\tdelete this.missingDependencies[elem.typeid];\n\t\t\t\t}\n\t\t\t\tregisterLocal.call(this, elem);\n\t\t\t\tdelete this.missingDependencies[elem];\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @returns {Array.<string>} Array of the names of the registered types.\n\t */\n\tlistRegisteredTypes() {\n\t\treturn Array.from(this._localPrimitivePropertiesAndTemplates.keys);\n\t}\n\n\t/**\n\t * Recursively parses the object of the specified type and returns the created\n\t * array of PropertySets Templates. It does the same thing as the registerFrom()\n\t * function, but it returns the array of templates instead of registering them.\n\t * Throws an error if any conversion error occurs.\n\t *\n\t * @param {String} in_fromType - The type of the object to convert.\n\t * The only type supported so far is 'JSONSchema'.\n\t * @param {Object} in_toConvert - The object to convert\n\t * @throws if in_fromType is not valid.\n\t * @throws if the in_toConvert object is not a valid template.\n\t * @returns {Array.<object>} Array of Property Sets Templates\n\t */\n\tconvertToTemplates(in_fromType, in_toConvert) {\n\t\tswitch (in_fromType) {\n\t\t\tdefault:\n\t\t\t\tthrow new Error(MSG.UNKNOWN_TYPE + in_fromType);\n\t\t}\n\t}\n\n\t/**\n\t * Recursively parses the object of the specified type and registers the created\n\t * Property Sets Templates. It does the same work as the convertToTemplates()\n\t * function, but it registers the templates for you instead of returning them.\n\t * Throws an error if any conversion error occurs.\n\t *\n\t * @param {String} in_fromType - The type of the object to convert.\n\t * The only type supported so far is 'JSONSchema'.\n\t * @param {Object} in_toConvert - The object to convert\n\t * @throws if in_toConvert is not valid.\n\t * @throws if in_fromType is not a valid object type.\n\t */\n\tregisterFrom(in_fromType, in_toConvert) {\n\t\tvar psetsTemplates = this.convertToTemplates(in_fromType, in_toConvert);\n\t\tfor (var i = 0; i < psetsTemplates.length; i++) {\n\t\t\tthis.register(psetsTemplates[i]);\n\t\t}\n\t}\n\n\t/**\n\t * Validate semver.\n\t * Here we compare the incoming template with its previous/next version in the\n\t * local and remote registry with the intent of detecting semver violations.\n\t * The semver rules for templates are as follows:\n\t *\n\t * - If the template structure has been altered (delete/modify existing field) then the MAJOR version should be\n\t * bumped.\n\t *\n\t * - If the template structure has been extended (add new fields) then the MINOR version should be bumped.\n\t *\n\t * - If the annotation field has been updated then the PATCH version should be bumped.\n\t *\n\t * If any of these rules have been broken then a warning message is printed onto the console.\n\t *\n\t * @param {object|property-properties.PropertyTemplate} in_template - The template to compare against\n\t * its previous or next versions.\n\t * @param {boolean} in_compareRemote - Flag indicating whether we want to compare the given\n\t * template against the remote registry.\n\t *\n\t * @private\n\t */\n\t_validateSemver(in_template, in_compareRemote) {\n\t\tvar typeidWithoutVersion = in_template.getTypeidWithoutVersion();\n\t\tvar version = in_template.getVersion();\n\t\tvar typeid = in_template.typeid;\n\t\tvar validationResults;\n\n\t\tvar warnings = [];\n\n\t\tif (this._localVersionedTemplates.has(typeidWithoutVersion)) {\n\t\t\tvar previousLocalVersion = this._localVersionedTemplates\n\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t.getNearestPreviousItem(version);\n\n\t\t\tif (previousLocalVersion) {\n\t\t\t\tvalidationResults = this._templateValidator.validate(\n\t\t\t\t\tin_template.serializeCanonical(),\n\t\t\t\t\tpreviousLocalVersion.serializeCanonical(),\n\t\t\t\t);\n\t\t\t\twarnings.push.apply(warnings, validationResults.warnings);\n\t\t\t} else {\n\t\t\t\tvar nextLocalVersion = this._localVersionedTemplates\n\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t.getNearestNextItem(version);\n\t\t\t\tif (nextLocalVersion) {\n\t\t\t\t\tvalidationResults = this._templateValidator.validate(\n\t\t\t\t\t\tnextLocalVersion.serializeCanonical(),\n\t\t\t\t\t\tin_template.serializeCanonical(),\n\t\t\t\t\t);\n\t\t\t\t\twarnings.push.apply(warnings, validationResults.warnings);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (in_compareRemote) {\n\t\t\tvar that = this;\n\t\t\tthis._remoteScopedAndVersionedTemplates.iterate(\n\t\t\t\tfunction (scope, remoteVersionedTemplates) {\n\t\t\t\t\tif (remoteVersionedTemplates.has(typeidWithoutVersion)) {\n\t\t\t\t\t\tvar previousRemoteVersion = remoteVersionedTemplates\n\t\t\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t\t\t.getNearestPreviousItem(version);\n\n\t\t\t\t\t\tif (previousRemoteVersion) {\n\t\t\t\t\t\t\tvalidationResults = that._templateValidator.validate(\n\t\t\t\t\t\t\t\tin_template.serializeCanonical(),\n\t\t\t\t\t\t\t\tpreviousRemoteVersion.getPropertyTemplate().serializeCanonical(),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\twarnings.push.apply(warnings, validationResults.warnings);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar nextRemoteVersion = remoteVersionedTemplates\n\t\t\t\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t\t\t\t.getNearestNextItem(version);\n\t\t\t\t\t\t\tif (nextRemoteVersion) {\n\t\t\t\t\t\t\t\tvalidationResults = that._templateValidator.validate(\n\t\t\t\t\t\t\t\t\tnextRemoteVersion.getPropertyTemplate().serializeCanonical(),\n\t\t\t\t\t\t\t\t\tin_template.serializeCanonical(),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\twarnings.push.apply(warnings, validationResults.warnings);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\n\t\tif (!_.isEmpty(warnings)) {\n\t\t\tconsole.warn(\n\t\t\t\t\"Template with typeid = \" +\n\t\t\t\t\ttypeid +\n\t\t\t\t\t\" is valid but with the following warnings = \" +\n\t\t\t\t\tJSON.stringify(warnings, 0, 2),\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Internal method used to register remote templates coming over the wire.\n\t * @param {property-properties.PropertyTemplate|object} in_remoteTemplate - The remote template to register\n\t * @param {string} in_scope - The scope in which the template will be stored in. The scope is usually determined by\n\t * the currently checked out workspaces. Each workspace can have their own set of versioned templates\n\t * that may be different from other workspaces.\n\t * @protected\n\t */\n\t_registerRemoteTemplate(in_remoteTemplate, in_scope) {\n\t\tif (!(in_remoteTemplate instanceof PropertyTemplate)) {\n\t\t\tin_remoteTemplate = new PropertyTemplate(in_remoteTemplate);\n\t\t}\n\n\t\tvar typeidWithoutVersion = in_remoteTemplate.getTypeidWithoutVersion();\n\t\tvar version = in_remoteTemplate.getVersion();\n\t\tvar typeid = in_remoteTemplate.typeid;\n\n\t\tif (this._localPrimitivePropertiesAndTemplates.has(typeid)) {\n\t\t\t// Template already exists. The incoming template MUST match what is registered.\n\t\t\t// If they do not match, throw an error letting the user know that the templates are incompatible.\n\t\t\t// This is likely due to the fact that the developer did not bump its version.\n\t\t\tvar registeredTemplate = this._localPrimitivePropertiesAndTemplates\n\t\t\t\t.item(typeid)\n\t\t\t\t.getPropertyTemplate();\n\n\t\t\tvar templateValidator = _createTemplateValidator.call(this);\n\t\t\tvar validationResults = templateValidator.validate(\n\t\t\t\tregisteredTemplate.serializeCanonical(),\n\t\t\t\tin_remoteTemplate.serializeCanonical(),\n\t\t\t);\n\t\t\tif (!validationResults.isValid) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\tMSG.TEMPLATE_MISMATCH +\n\t\t\t\t\t\ttypeid +\n\t\t\t\t\t\t\"\\n errors = \" +\n\t\t\t\t\t\tJSON.stringify(_extractErrorMessage(validationResults.errors), 0, 2),\n\t\t\t\t);\n\t\t\t}\n\t\t} else if (in_remoteTemplate._isVersioned()) {\n\t\t\tthis._validateSemver(in_remoteTemplate);\n\t\t\tvar wrappedTemplate = new PropertyTemplateWrapper(in_remoteTemplate, in_scope);\n\n\t\t\tif (this._remoteScopedAndVersionedTemplates.has(in_scope)) {\n\t\t\t\tif (this._remoteScopedAndVersionedTemplates.item(in_scope).has(typeidWithoutVersion)) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t!this._remoteScopedAndVersionedTemplates\n\t\t\t\t\t\t\t.item(in_scope)\n\t\t\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t\t\t.has(version)\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis._remoteScopedAndVersionedTemplates\n\t\t\t\t\t\t\t.item(in_scope)\n\t\t\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t\t\t.add(version, wrappedTemplate);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar versionCollection = _createVersionedSortedCollection();\n\t\t\t\t\tversionCollection.add(version, wrappedTemplate);\n\t\t\t\t\tthis._remoteScopedAndVersionedTemplates\n\t\t\t\t\t\t.item(in_scope)\n\t\t\t\t\t\t.add(typeidWithoutVersion, versionCollection);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar namespaceCollection = new Collection();\n\t\t\t\tvar versionCollection = _createVersionedSortedCollection();\n\t\t\t\tnamespaceCollection.add(typeidWithoutVersion, versionCollection);\n\t\t\t\tversionCollection.add(version, wrappedTemplate);\n\t\t\t\tthis._remoteScopedAndVersionedTemplates.add(in_scope, namespaceCollection);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Error(\n\t\t\t\tMSG.UNVERSIONED_REMOTE_TEMPLATE + \" \\n\" + JSON.stringify(in_remoteTemplate, 0, 2),\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Remove the scope from the remote templates collection\n\t * @param {string} in_scope - The scope to remove\n\t * @protected\n\t */\n\t_removeScope(in_scope) {\n\t\tvar that = this;\n\n\t\tif (this._remoteScopedAndVersionedTemplates.has(in_scope)) {\n\t\t\t// remove the schemas in this scope from the inheritance cache.\n\t\t\tthis._remoteScopedAndVersionedTemplates.item(in_scope).iterate(function (nt, schemas) {\n\t\t\t\tschemas.iterate(function (k, schema) {\n\t\t\t\t\tdelete that._inheritanceCache[schema.getPropertyTemplate().typeid];\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tthis._remoteScopedAndVersionedTemplates.remove(in_scope);\n\t\t}\n\t}\n\n\t/**\n\t * Triggered when a template is registered.\n\t * @event property-properties.PropertyFactory#registered\n\t * @param {property-properties.Template} Template - The template being registered.\n\t * @memberof property-properties.PropertyFactory\n\t *\n\t */\n\n\t/**\n\t * Register a template or a primitive property\n\t *\n\t * This is the internal function used to register templates and primitive properties.\n\t *\n\t * @param {property-properties.PropertyTemplate|string} in_typeid - typeid of for the property the given\n\t * template/constructor represents\n\t * @param {property-properties.PropertyTemplate|object|property-properties.BaseProperty} in_templateOrProperty - Template/native\n\t * property class to associate with the typeid\n\t * @param {string} [in_context='single'] - The context for which the parameter is added (if it is set to all the\n\t * object will be used in all contexts)\n\t */\n\t_registerTypeId(in_typeid, in_templateOrProperty, in_context) {\n\t\t// If the input is not yet a BaseProperty derived type or a\n\t\t// PropertyTemplate, we create a PropertyTemplate object for it\n\n\t\tif (\n\t\t\t!(\n\t\t\t\tin_templateOrProperty instanceof PropertyTemplate ||\n\t\t\t\tthis._isNativePropertyConstructor(in_templateOrProperty)\n\t\t\t)\n\t\t) {\n\t\t\tin_templateOrProperty = new PropertyTemplate(in_templateOrProperty);\n\t\t}\n\n\t\t// If no context is specified we assign one\n\t\tif (!in_context) {\n\t\t\t// By default templates are registered for all contexts together, BaseProperties are registered separately\n\t\t\tin_context = in_templateOrProperty instanceof PropertyTemplate ? \"all\" : \"single\";\n\t\t}\n\n\t\tif (in_context !== \"all\") {\n\t\t\tif (!this._localPrimitivePropertiesAndTemplates.has(in_typeid)) {\n\t\t\t\tthis._localPrimitivePropertiesAndTemplates.add(in_typeid, new Collection());\n\t\t\t}\n\t\t\tthis._localPrimitivePropertiesAndTemplates\n\t\t\t\t.item(in_typeid)\n\t\t\t\t.add(in_context, in_templateOrProperty);\n\t\t} else if (!this._localPrimitivePropertiesAndTemplates.has(in_typeid)) {\n\t\t\tvar wrapper = new PropertyTemplateWrapper(in_templateOrProperty);\n\t\t\tthis._localPrimitivePropertiesAndTemplates.add(in_typeid, wrapper);\n\t\t}\n\n\t\tthis._eventEmitter.emit(\"registered\", in_templateOrProperty);\n\t}\n\n\t/**\n\t * Validate a template.\n\t * Check that the template is syntactically correct as well as semantically correct.\n\t *\n\t * @param {object|property-properties.PropertyTemplate} in_template - The template to check against.\n\t *\n\t * @returns {object|undefined} map of key-value pairs where the path of the invalid property is the key,\n\t * and the value is the error message.\n\t *\n\t * i.e.\n\t *\n\t * ```\n\t * <pre>\n\t * {\n\t * 'isValid': true or false,\n\t * 'typeid': 'The typeid of the object being parsed',\n\t * 'unresolvedTypes': [ 'An array', 'of strong typeids', 'that were found',\n\t * 'in the document', 'but not resolved from the local cache' ],\n\t * 'resolvedTypes': [ 'Array of', 'strong types resolved', 'during template parsing'],\n\t * 'errors': [ 'Array of', 'objects describing', 'syntax errors in the template' ]\n\t * ...\n\t * }\n\t * </pre>\n\t * ```\n\t */\n\tvalidate(in_template) {\n\t\treturn this._templateValidator.validate(in_template);\n\t}\n\n\t/**\n\t * Get a template or property object based on a typeid and a context\n\t *\n\t * @param {string} in_typeid - The type unique identifier\n\t * @param {string} [in_context] - The context of the property to create\n\t * @param {string} [in_scope] - The scope in which the property typeid is defined\n\t *\n\t * @returns {property-properties.PropertyTemplate|object|property-properties.BaseProperty|undefined}\n\t * Template/Property identified by the typeid.\n\t */\n\t_get(in_typeid, in_context, in_scope = undefined) {\n\t\tvar templateOrProperty = this._getWrapper(in_typeid, in_context, in_scope);\n\t\tif (templateOrProperty instanceof PropertyTemplateWrapper) {\n\t\t\treturn templateOrProperty.getPropertyTemplate();\n\t\t}\n\t\treturn templateOrProperty;\n\t}\n\n\t/**\n\t * Get a template or property object based on a typeid and a context\n\t *\n\t * @param {string} in_typeid - The type unique identifier\n\t * @param {string} [in_context] - The context of the property to create\n\t * @param {string} [in_scope] - The scope in which the property typeid is defined\n\t *\n\t * @returns {property-properties.PropertyTemplateWrapper|property-properties.BaseProperty|undefined}\n\t * Template/Property identified by the typeid.\n\t */\n\t_getWrapper(in_typeid, in_context, in_scope) {\n\t\tif (this._localPrimitivePropertiesAndTemplates.has(in_typeid)) {\n\t\t\tvar typeidItem = this._localPrimitivePropertiesAndTemplates.item(in_typeid);\n\t\t\tif (!(typeidItem instanceof Collection)) {\n\t\t\t\treturn typeidItem;\n\t\t\t} else {\n\t\t\t\tvar context = in_context || \"single\";\n\t\t\t\treturn this._localPrimitivePropertiesAndTemplates.item(in_typeid).item(context);\n\t\t\t}\n\t\t} else if (in_scope && this._remoteScopedAndVersionedTemplates.has(in_scope)) {\n\t\t\tvar splitTypeId = TypeIdHelper.extractVersion(in_typeid);\n\t\t\tif (splitTypeId.version) {\n\t\t\t\tvar typeidWithoutVersion = splitTypeId.typeidWithoutVersion;\n\t\t\t\tvar version = splitTypeId.version;\n\n\t\t\t\tif (\n\t\t\t\t\tthis._remoteScopedAndVersionedTemplates.item(in_scope).has(typeidWithoutVersion) &&\n\t\t\t\t\tthis._remoteScopedAndVersionedTemplates\n\t\t\t\t\t\t.item(in_scope)\n\t\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t\t.has(version)\n\t\t\t\t) {\n\t\t\t\t\treturn this._remoteScopedAndVersionedTemplates\n\t\t\t\t\t\t.item(in_scope)\n\t\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t\t.item(version);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Get template based on typeid\n\t *\n\t * @param {string} in_typeid - The type unique identifier\n\t * @returns {property-properties.PropertyTemplate|undefined} Template identified by the typeid.\n\t */\n\tgetTemplate(in_typeid) {\n\t\treturn this._localPrimitivePropertiesAndTemplates.has(in_typeid) &&\n\t\t\t!TypeIdHelper.isPrimitiveType(in_typeid)\n\t\t\t? this._localPrimitivePropertiesAndTemplates.item(in_typeid).getPropertyTemplate()\n\t\t\t: undefined;\n\t}\n\n\t/**\n\t * Get remote templates based on typeid\n\t * @private\n\t * @param {string} in_typeid - The type unique identifier\n\t * @returns {array<property-properties.PropertyTemplate>} Array of templates.\n\t */\n\t_getRemoteTemplates(in_typeid) {\n\t\tvar templatesFound = [];\n\n\t\tvar parsedTypeId = TypeIdHelper.extractVersion(in_typeid);\n\t\tvar typeidWithoutVersion = parsedTypeId.typeidWithoutVersion;\n\t\tvar version = parsedTypeId.version;\n\n\t\tthis._remoteScopedAndVersionedTemplates.iterate(\n\t\t\tfunction (scope, remoteVersionedTemplates) {\n\t\t\t\tif (\n\t\t\t\t\tremoteVersionedTemplates.has(typeidWithoutVersion) &&\n\t\t\t\t\tremoteVersionedTemplates.item(typeidWithoutVersion).item(version)\n\t\t\t\t) {\n\t\t\t\t\ttemplatesFound.push(\n\t\t\t\t\t\tremoteVersionedTemplates\n\t\t\t\t\t\t\t.item(typeidWithoutVersion)\n\t\t\t\t\t\t\t.item(version)\n\t\t\t\t\t\t\t.getPropertyTemplate(),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t},\n\t\t);\n\n\t\treturn templatesFound;\n\t}\n\n\t/**\n\t * Create an instance of the given property typeid if there is a template registered for it.\n\t * Otherwise, this method returns undefined. Searches also in scoped templates.\n\t *\n\t * @param {string} in_typeid - The type unique identifier\n\t * @param {string} in_context - The type of collection of values that the property contains.\n\t * Accepted values are \"single\" (default), \"array\", \"map\" and \"set\".\n\t * @param {object|undefined} in_initialProperties - A set of initial values for the PropertySet being created\n\t * @param {string|undefined} in_scope - The scope in which the property typeid is defined\n\t * @returns {property-properties.BaseProperty|undefined} the property instance\n\t * @private\n\t */\n\t_createProperty(in_typeid, in_context, in_initialProperties, in_scope) {\n\t\tconst ifNotSingleOrUndefined = (in_context || \"single\") !== \"single\";\n\t\tConsoleUtils.assert(\n\t\t\tifNotSingleOrUndefined || _.isString(in_typeid),\n\t\t\tMSG.UNKNOWN_TYPEID_SPECIFIED + in_typeid,\n\t\t);\n\t\tlet context = in_context;\n\t\tif (!context) {\n\t\t\t// If no context is supplied, we check whether the typeid contains a context\n\t\t\tif (!TypeIdHelper.isReferenceTypeId(in_typeid)) {\n\t\t\t\tvar splitTypeId = TypeIdHelper.extractContext(in_typeid);\n\t\t\t\tin_typeid = splitTypeId.typeid;\n\t\t\t\tcontext = splitTypeId.context;\n\t\t\t}\n\t\t}\n\n\t\tlet propertyCreationFunction = undefined;\n\n\t\tif (!this._forceInstantion) {\n\t\t\t// Check, whether we already have a property creation function for this property\n\t\t\t// in the cache\n\t\t\tconst scopeFunctionEntry = this._cachedCreationFunctions.get(in_typeid);\n\t\t\tconst contextFunctionEntry = scopeFunctionEntry && scopeFunctionEntry.get(in_scope);\n\t\t\tpropertyCreationFunction = contextFunctionEntry && contextFunctionEntry.get(context);\n\t\t}\n\n\t\t// If we don't have a cached function or are requested to explicitly instantiate the property\n\t\t// we have to first create a property definition by recursively traversing all templates\n\t\tlet propertyDef;\n\t\tif (!propertyCreationFunction) {\n\t\t\tpropertyDef = {};\n\t\t\tthis._createDefFromPropertyDeclaration(\n\t\t\t\t{\n\t\t\t\t\ttypeid: in_typeid,\n\t\t\t\t\tcontext: context || \"single\",\n\t\t\t\t},\n\t\t\t\tin_scope,\n\t\t\t\tpropertyDef,\n\t\t\t);\n\t\t}\n\n\t\tlet property;\n\t\tif (!this._forceInstantion) {\n\t\t\t// If we don't yet have a creation function, we will create one here\n\t\t\tpropertyCreationFunction =\n\t\t\t\tpropertyCreationFunction ||\n\t\t\t\tthis._definePropertyCreationFunction(propertyDef, in_typeid, in_scope, context);\n\n\t\t\t// Create the property by invoking the precompiled creation function\n\t\t\tproperty = propertyCreationFunction();\n\n\t\t\t// If initial properties have been provided, we will assign them to the\n\t\t\t// default initialized property\n\t\t\tif (in_initialProperties !== undefined) {\n\t\t\t\tthis._setInitialValue(\n\t\t\t\t\tproperty,\n\t\t\t\t\t{\n\t\t\t\t\t\tvalue: in_initialProperties,\n\t\t\t\t\t},\n\t\t\t\t\tfalse,\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\t// Directly instantiate the property from the definition (without using) a precompield function\n\t\t\tproperty = this._instantiatePropertyDef(\n\t\t\t\tpropertyDef,\n\t\t\t\tin_scope,\n\t\t\t\tin_initialProperties && {\n\t\t\t\t\tvalue: in_initialProperties,\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\n\t\treturn property;\n\t}\n\n\t/**\n\t * Creates an instance of the property described in the property definition.\n\t *\n\t * Note: this function won't create any constant children, it is only used to\n\t * instantiate nested constant properties and those will be set to constant\n\t * after their instantiation.\n\t *\n\t * @param {Object} propertyDef - The property defintion for the property to create\n\t * @param {String} in_scope - The scope for the property to create\n\t * @param {String} in_initialProperties - The initial values for the property\n\t *\n\t * @returns {BaseProperty} An instance of the property\n\t */\n\t_instantiatePropertyDef(propertyDef, in_scope, in_initialProperties) {\n\t\tlet rootProperty = undefined;\n\n\t\t// This stack is used to recursively iterate over the property definition\n\t\tconst creationStack = [\n\t\t\t{\n\t\t\t\tid: undefined,\n\t\t\t\tentry: propertyDef,\n\t\t\t\tparent: undefined,\n\t\t\t},\n\t\t];\n\n\t\twhile (creationStack.length > 0) {\n\t\t\tconst currentEntry = creationStack.pop();\n\n\t\t\t// We have an entry on the stack that is just waiting for its children to finish, but has already\n\t\t\t// been created\n\t\t\tif (currentEntry.signalChildrenFinished) {\n\t\t\t\tcurrentEntry.property._signalAllStaticMembersHaveBeenAdded(in_scope);\n\n\t\t\t\tif (currentEntry.initialValue) {\n\t\t\t\t\tthis._setInitialValue(currentEntry.property, currentEntry.initialValue, true);\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Create the property instance\n\t\t\tlet property = new currentEntry.entry.constructorFunction(currentEntry.entry.entry);\n\n\t\t\t// Insert / append the property to the parent\n\t\t\tif (currentEntry.parent) {\n\t\t\t\tif (currentEntry.entry.optional) {\n\t\t\t\t\tcurrentEntry.parent._insert(property.getId(), property, true);\n\t\t\t\t} else {\n\t\t\t\t\tcurrentEntry.parent._append(property, currentEntry.entry.allowChildMerges);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If we are at the root, we store the property object to return it later\n\t\t\t\trootProperty = property;\n\t\t\t}\n\n\t\t\t// For named properties we have to assign a GUID (note: all constant properties in\n\t\t\t// a template will share this GUID)\n\t\t\tif (currentEntry.setGuid) {\n\t\t\t\tproperty.value = GuidUtils.generateGUID();\n\t\t\t}\n\n\t\t\t// Assign optional children\n\t\t\tif (currentEntry.entry.optionalChildren) {\n\t\t\t\tfor (let [id, typeid] of Object.entries(currentEntry.entry.optionalChildren)) {\n\t\t\t\t\tproperty._addOptionalChild(id, typeid);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Recursively process all children of this entry\n\t\t\tif (currentEntry.entry.children) {\n\t\t\t\t// Create an entry on the stack, which is later needed,\n\t\t\t\t// to signal that all child properties have been added\n\t\t\t\tconst parentStackEntry = {\n\t\t\t\t\tsignalChildrenFinished: true,\n\t\t\t\t\tinitialValue: currentEntry.entry.initialValue,\n\t\t\t\t\tproperty,\n\t\t\t\t};\n\t\t\t\tcreationStack.push(parentStackEntry);\n\n\t\t\t\tfor (let [id, child] of currentEntry.entry.children) {\n\t\t\t\t\tcreationStack.push({\n\t\t\t\t\t\tparent: property,\n\t\t\t\t\t\tid: id,\n\t\t\t\t\t\tentry: child,\n\t\t\t\t\t\tsetGuid: currentEntry.entry.assignGuid && id === \"guid\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// If there are no children, we directly assign the initial value and\n\t\t\t\t// signal that the property has completely been initialized\n\t\t\t\tif (currentEntry.entry.initialValue) {\n\t\t\t\t\tthis._setInitialValue(property, currentEntry.entry.initialValue, true);\n\t\t\t\t}\n\n\t\t\t\tif (currentEntry.entry.signal) {\n\t\t\t\t\tproperty._signalAllStaticMembersHaveBeenAdded(in_scope);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (in_initialProperties !== undefined) {\n\t\t\tthis._setInitialValue(rootProperty, in_initialProperties, true);\n\t\t}\n\n\t\treturn rootProperty;\n\t}\n\n\t/**\n\t * Creates a javascript function that instantiates the requested property\n\t *\n\t * @param {Object} propertyDef - The property defintion for the property for which the function is created\n\t * @param {String} in_typeid - The typeid for the property for which the function is created\n\t * @param {String} in_scope - The scope for the property for which the function is created\n\t * @param {String} in_context - The context for the property for which the function is created\n\t *\n\t * @returns {Function} A function that creates an instance of the property\n\t */\n\t_definePropertyCreationFunction(propertyDef, in_typeid, in_scope, in_context) {\n\t\t// This stack is used to recursively iterate over the property definition\n\t\tconst creationStack = [\n\t\t\t{\n\t\t\t\tid: null,\n\t\t\t\tdef: propertyDef,\n\t\t\t\tparent: undefined,\n\t\t\t},\n\t\t];\n\n\t\tlet creationFunctionSource = \"\";\n\t\tlet currentParameterIndex = 0;\n\t\tlet parameters = [];\n\t\tlet currentPropertyNumber = 0;\n\t\tlet currentPropertyVarName = \"\";\n\t\tlet resultVarName;\n\n\t\twhile (creationStack.length > 0) {\n\t\t\tconst currentEntry = creationStack.pop();\n\n\t\t\t// We have an entry on the stack that is just waiting for its children to finish, but has already\n\t\t\t// been created\n\t\t\tif (currentEntry.signalChildrenFinished) {\n\t\t\t\t// Add the signalling function\n\t\t\t\tcreationFunctionSource += `${\n\t\t\t\t\tcurrentEntry.propertyVarname\n\t\t\t\t}._signalAllStaticMembersHaveBeenAdded(${JSON.stringify(in_scope)});\\n`;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Determine the initial value for this property\n\t\t\tlet initialValue =\n\t\t\t\tcurrentEntry.def.initialValue !== undefined\n\t\t\t\t\t? currentEntry.def.initialValue\n\t\t\t\t\t: undefined;\n\n\t\t\tif (currentEntry.def.entry.id) {\n\t\t\t\tlet parentEntry = currentEntry.parentStackEntry;\n\t\t\t\tlet path = [currentEntry.def.entry.id];\n\n\t\t\t\t// We have to walk the whole parent chain and extract for\n\t\t\t\t// each parent the initial values. Entries further up in the\n\t\t\t\t// chain can overwrite entries further down\n\t\t\t\twhile (parentEntry) {\n\t\t\t\t\tif (parentEntry.initialValue) {\n\t\t\t\t\t\t// Extract changes to be applied to this property\n\t\t\t\t\t\tlet filteredChangeSet = parentEntry.initialValue.value;\n\t\t\t\t\t\tfor (let i = 0; i < path.length; i++) {\n\t\t\t\t\t\t\tfilteredChangeSet = filteredChangeSet && filteredChangeSet[path[i]];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Update the initial value with the extract changeset\n\t\t\t\t\t\tif (_.isObject(filteredChangeSet)) {\n\t\t\t\t\t\t\tif (initialValue === undefined) {\n\t\t\t\t\t\t\t\tinitialValue = {\n\t\t\t\t\t\t\t\t\ttyped: false,\n\t\t\t\t\t\t\t\t\tvalue: filteredChangeSet,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t} else if (_.isObject(initialValue)) {\n\t\t\t\t\t\t\t\tObject.assign(initialValue.value, filteredChangeSet);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow new TypeError(\"Invalid default values specified\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (filteredChangeSet !== undefined) {\n\t\t\t\t\t\t\tif (initialValue === undefined) {\n\t\t\t\t\t\t\t\tinitialValue = {\n\t\t\t\t\t\t\t\t\tvalue: undefined,\n\t\t\t\t\t\t\t\t\ttyped: false,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tinitialValue.value = filteredChangeSet;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (parentEntry.id !== null) {\n\t\t\t\t\t\tpath.unshift(parentEntry.id);\n\t\t\t\t\t}\n\t\t\t\t\tparentEntry = parentEntry.parentStackEntry;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (currentEntry.def.constant) {\n\t\t\t\t// If we have a constant property, we create a concrete property object instance and share it\n\t\t\t\t// among all instances of the parent property\n\t\t\t\tlet instantiatedChild;\n\t\t\t\ttry {\n\t\t\t\t\t// Usually we would use the precompiled creation functions, but those all share\n\t\t\t\t\t// the same constant properties. Since it is allowed to overwrite constants via\n\t\t\t\t\t// default values, we have to explicitly instantiate new property instances for\n\t\t\t\t\t// constants. Since the constants themselves may contain nested property instances,\n\t\t\t\t\t// we use this flag to indicate that for all nested properties, we do not want to use\n\t\t\t\t\t// the precompiled instantiation functions.\n\t\t\t\t\tthis._forceInstantion = true;\n\t\t\t\t\tinstantiatedChild = this._instantiatePropertyDef(\n\t\t\t\t\t\tcurrentEntry.def,\n\t\t\t\t\t\tin_scope,\n\t\t\t\t\t\tcurrentEntry.def.initialValue,\n\t\t\t\t\t);\n\t\t\t\t} finally {\n\t\t\t\t\tthis._forceInstantion = false;\n\t\t\t\t}\n\t\t\t\tinstantiatedChild._setAsConstant();\n\n\t\t\t\t// Add a reference to the newly instantiate constant property to the parameters and add\n\t\t\t\t// a command to add it into the tree\n\t\t\t\tparameters.push(instantiatedChild);\n\t\t\t\tcreationFunctionSource += `${currentEntry.parentVarName}._append(\n parameters[${currentParameterIndex}], ${currentEntry.def.allowChildMerges}\n );\\n`;\n\t\t\t\tcurrentParameterIndex += 1;\n\t\t\t} else {\n\t\t\t\t// Put the constructor function and the description of the property into the\n\t\t\t\t// parameters array\n\t\t\t\tparameters.push(currentEntry.def.constructorFunction);\n\t\t\t\tparameters.push(currentEntry.def.entry);\n\n\t\t\t\t// and add the instantiation call to the generated function\n\t\t\t\tcurrentPropertyNumber++;\n\t\t\t\tcurrentPropertyVarName = `property${currentPropertyNumber}`;\n\t\t\t\tcreationFunctionSource += `const ${currentPropertyVarName} =\n new parameters[${currentParameterIndex}](parameters[${\n\t\t\t\t\t\t\t\t\t\t\tcurrentParameterIndex + 1\n\t\t\t\t\t\t\t\t\t\t}]);\\n`;\n\t\t\t\tcurrentParameterIndex += 2;\n\n\t\t\t\t// Insert / append the property to the parent\n\t\t\t\tif (currentEntry.parentVarName !== undefined) {\n\t\t\t\t\tcreationFunctionSource += currentEntry.def.optional\n\t\t\t\t\t\t? `${currentEntry.parentVarName}._insert(\n ${JSON.stringify(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentEntry.def.entry.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}, ${currentPropertyVarName}, true\n );\\n`\n\t\t\t\t\t\t: `${currentEntry.parentVarName}._append(\n ${currentPropertyVarName}, ${currentEntry.def.allowChildMerges}\n );\\n`;\n\t\t\t\t} else {\n\t\t\t\t\tresultVarName = currentPropertyVarName;\n\t\t\t\t}\n\n\t\t\t\t// For named properties we have to add a calll to assign a GUID to the function\n\t\t\t\tif (currentEntry.setGuid) {\n\t\t\t\t\tcreationFunctionSource += `${currentPropertyVarName}.value = GuidUtils.generateGUID();\\n`;\n\t\t\t\t}\n\n\t\t\t\t// And if there are any optional children, we add them here (should this be further optimized? I\n\t\t\t\t// propbably would not have to be done on every instantiation, those could be stored in the prototype)\n\t\t\t\tif (currentEntry.def.optionalChildren) {\n\t\t\t\t\tfor (let [id, typeid] of Object.entries(currentEntry.def.optionalChildren)) {\n\t\t\t\t\t\tcreationFunctionSource += `${currentPropertyVarName}._addOptionalChild(\n ${JSON.stringify(id)},\n ${JSON.stringify(typeid)}\n );\\n`;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Recursively process all children of this entry\n\t\t\t\tif (currentEntry.def.children) {\n\t\t\t\t\t// Create an entry on the stack, which is later needed,\n\t\t\t\t\t// to signal that all child properties have been added\n\t\t\t\t\tconst parentStackEntry = {\n\t\t\t\t\t\tsignalChildrenFinished: true,\n\t\t\t\t\t\tinitialValue: currentEntry.def.initialValue,\n\t\t\t\t\t\tpropertyVarname: currentPropertyVarName,\n\t\t\t\t\t\tparentStackEntry: currentEntry.parentStackEntry,\n\t\t\t\t\t\tid: currentEntry.id,\n\t\t\t\t\t};\n\t\t\t\t\tcreationStack.push(parentStackEntry);\n\n\t\t\t\t\t// Recursively add all children to the stack\n\t\t\t\t\tfor (let [id, child] of currentEntry.def.children) {\n\t\t\t\t\t\tcreationStack.push({\n\t\t\t\t\t\t\tparentVarName: currentPropertyVarName,\n\t\t\t\t\t\t\tid: id,\n\t\t\t\t\t\t\tdef: child,\n\t\t\t\t\t\t\tsignalParent: false,\n\t\t\t\t\t\t\tsetGuid: currentEntry.def.assignGuid && id === \"guid\",\n\t\t\t\t\t\t\tparentStackEntry,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// This is a leaf property, so if there is a default value\n\t\t\t\t\t// we directly assign it here\n\t\t\t\t\tif (initialValue !== undefined) {\n\t\t\t\t\t\tcreationFunctionSource += !_.isObject(initialValue.value)\n\t\t\t\t\t\t\t? // We have a primitive property and thus direclty invoke the setValue function\n\t\t\t\t\t\t\t\t`${currentPropertyVarName}.setValue(${JSON.stringify(initialValue.value)})\\n`\n\t\t\t\t\t\t\t: // For non primitive properties, we currently use the member on the property factory,\n\t\t\t\t\t\t\t\t// probably we could further optimize this to directly call the correct function on the\n\t\t\t\t\t\t\t\t// property\n\t\t\t\t\t\t\t\t`this._setInitialValue(${currentPropertyVarName},\n ${JSON.stringify(initialValue)},\n false);\\n`;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If this property is constant, we assign the constant flag\n\t\t\t\t\tif (currentEntry.def.constant) {\n\t\t\t\t\t\tcreationFunctionSource += `${currentPropertyVarName}._setAsConstant();\\n`;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If necessary, signal that the propert has been fully initialized (is this ever needed?)\n\t\t\t\t\tif (currentEntry.def.signal) {\n\t\t\t\t\t\tcreationFunctionSource += `${currentPropertyVarName}._signalAllStaticMembersHaveBeenAdded(\n ${JSON.stringify(in_scope)}\n );\\n`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the return statement at the end of the function\n\t\tcreationFunctionSource += ` return ${resultVarName};`;\n\n\t\t// Finally, create the actual JS function with the source we compiled above\n\t\tlet creationFunction = new Function(\n\t\t\t\"parameters\",\n\t\t\t\" GuidUtils\",\n\t\t\tcreationFunctionSource,\n\t\t).bind(this, parameters, GuidUtils);\n\n\t\t// Add the created function to the cache\n\t\tlet scopesFunction = this._cachedCreationFunctions.get(in_typeid);\n\t\tif (!scopesFunction) {\n\t\t\tscopesFunction = new Map();\n\t\t\tthis._cachedCreationFunctions.set(in_typeid, scopesFunction);\n\t\t}\n\t\tlet contextsFunction = scopesFunction.get(in_scope);\n\t\tif (!contextsFunction) {\n\t\t\tcontextsFunction = new Map();\n\t\t\tscopesFunction.set(in_scope, contextsFunction);\n\t\t}\n\t\tcontextsFunction.set(in_context, creationFunction);\n\n\t\treturn creationFunction;\n\t}\n\n\t/**\n\t * Sets a value to a property\n\t * The value can be passed through a default, initial or constant.\n\t *\n\t * @param {string} property - The property to set the value for\n\t * @param {object} valueParsed - The value to set in the given property\n\t * @param {string} value - The value to set\n\t * @param {boolean} typed - Whether the value has a different type than the property (polymorphic).\n\t * @param {string} typeid - THe typeid of the property.\n\t */\n\t_setInitialValue(property, valueParsed, unsetConstant) {\n\t\tif (unsetConstant) {\n\t\t\tproperty._unsetAsConstant();\n\t\t}\n\t\tif (property instanceof ValueProperty || property instanceof StringProperty) {\n\t\t\tproperty.setValue(valueParsed.value);\n\t\t} else if (valueParsed.typed) {\n\t\t\tproperty._setValues(valueParsed.value, true, true);\n\t\t} else if (\n\t\t\tproperty.getTypeid() !== \"ContainerProperty\" ||\n\t\t\tproperty._getChildrenCount() > 0\n\t\t) {\n\t\t\tproperty._setValues(valueParsed.value, false, true);\n\t\t} else if (!valueParsed.typeid) {\n\t\t\tthrow new Error(MSG.FIELD_TYPEID_IS_REQUIRED + property._id + \".typeid\");\n\t\t} else {\n\t\t\tproperty._setValues(valueParsed.value, false, true);\n\t\t}\n\t}\n\n\t/**\n\t * Create an instance of the given property typeid if there is a template registered for it.\n\t * Otherwise, this method returns undefined.\n\t *\n\t * @param {string} in_typeid - The type unique identifier\n\t * @param {string} in_context - The type of collection of values that the property contains.\n\t * Accepted values are \"single\" (default), \"array\", \"map\" and \"set\".\n\t * @param {object=} in_initialProperties - A set of initial values for the PropertySet being created\n\t * @param {object=} in_options - Additional options\n\t *\n\t * @returns {property-properties.BaseProperty|undefined} the property instance\n\t */\n\tcreate(in_typeid, in_context, in_initialProperties) {\n\t\treturn this._createProperty(in_typeid, in_context, in_initialProperties, null);\n\t}\n\n\t/**\n\t * Creates a constructor function for the given typeid and id. The function will inherit from the\n\t * passed base constructor, but have the typeid and id assigned in its constructor. This way, we\n\t * avoid the storage overhead of having those members in each instance of the property.\n\t *\n\t * @param {String} in_context - The context of the property\n\t * @param {String} in_typeid - The typeid of the property\n\t * @param {Function} in_baseConstructor - The constructor to inherit from\n\t * @param {String} in_id - The Id of the property\n\t * @param {String} in_scope - The scope of the property\n\t *\n\t * @returns {Function} The constructor for the property\n\t */\n\t_getConstructorFunctionForTypeidAndID(\n\t\tin_context,\n\t\tin_typeid,\n\t\tin_baseConstructor,\n\t\tin_id,\n\t\tin_scope,\n\t) {\n\t\t// Create a unique key for this constructor\n\t\tlet key = in_context === \"single\" ? in_typeid : in_context + \"<\" + in_typeid + \">\";\n\n\t\tif (in_id !== undefined) {\n\t\t\tkey = key + \"-\" + in_id;\n\t\t}\n\n\t\tif (in_scope && !this._localPrimitivePropertiesAndTemplates.has(in_typeid)) {\n\t\t\tkey += \"-\" + in_scope;\n\t\t}\n\n\t\t// Check, whether we already have this function in the cache\n\t\tif (this._typedPropertyConstructorCache[key]) {\n\t\t\treturn this._typedPropertyConstructorCache[key];\n\t\t}\n\n\t\t// If it is not in the cache, create the function\n\n\t\t// This creates a class that will have the correct name in the debugger, but I am not\n\t\t// sure whether we want to use a dynamic eval for this. It might be flagged by some security scans\n\t\t// It should be safe, since we control the name of constructorClasses for properties\n\t\tvar propertyConstructorFunction = class extends in_baseConstructor {};\n\t\tpropertyConstructorFunction.prototype._typeid = in_typeid;\n\n\t\tObject.defineProperty(propertyConstructorFunction, \"name\", {\n\t\t\tvalue: in_baseConstructor.name,\n\t\t});\n\n\t\tif (in_id !== undefined) {\n\t\t\tpropertyConstructorFunction.prototype._id = in_id;\n\t\t}\n\n\t\tthis._typedPropertyConstructorCache[key] = propertyConstructorFunction;\n\n\t\treturn propertyConstructorFunction;\n\t}\n\n\t/**\n\t * Creates a property definition for a non-collection property with the entry and constructor function assigned\n\t * Children will be added later by parseTemplate.\n\t *\n\t * @param {string} in_typeid - The type unique identifier\n\t * @param {string} in_id - The id of the property to create\n\t * @param {property-properties.PropertyTemplate|object|property-properties.BaseProperty} in_templateOrConstructor - The\n\t * Template/Property for this in_typeid\n\t * @param {string|undefined} in_scope - The scope in which the property typeid is defined\n\t *\n\t * @returns {property-properties.BaseProperty} The property that serves as parent for the properties in the template\n\t * @private\n\t */\n\t_createNonCollectionPropertyDef(\n\t\tin_typeid,\n\t\tin_id,\n\t\tin_templateOrConstructor,\n\t\tin_scope,\n\t\tpropertyDef,\n\t) {\n\t\tlet ConstructorFunction;\n\t\tconst params = {\n\t\t\ttypeid: in_typeid,\n\t\t\tid: in_id,\n\t\t};\n\n\t\tif (this.inheritsFrom(in_typeid, \"NamedProperty\", { scope: in_scope })) {\n\t\t\t// An id of NULL means that the GUID of the property is used if it is a named property\n\t\t\tparams.id = in_id || null;\n\t\t}\n\n\t\tconst wrapper = this._getWrapper(in_typeid, undefined, in_scope);\n\t\tconst creationType = wrapper.getCreationType();\n\n\t\tswitch (creationType) {\n\t\t\tcase \"Enum\":\n\t\t\t\tparams._enumDictionary = in_templateOrConstructor._enumDictionary;\n\t\t\t\tConstructorFunction = EnumProperty;\n\t\t\t\tbreak;\n\t\t\tcase \"NodeProperty\":\n\t\t\t\tConstructorFunction = NodeProperty;\n\t\t\t\tparams.typeid = params.typeid || \"NodeProperty\";\n\t\t\t\tbreak;\n\t\t\tcase \"NamedProperty\":\n\t\t\t\tConstructorFunction = NamedProperty;\n\t\t\t\tparams.typeid = params.typeid || \"NamedProperty\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tConstructorFunction = ContainerProperty;\n\t\t\t\tparams.typeid = params.typeid || \"ContainerProperty\";\n\t\t}\n\n\t\tConstructorFunction = this._getConstructorFunctionForTypeidAndID(\n\t\t\t\"single\",\n\t\t\tin_typeid,\n\t\t\tConstructorFunction,\n\t\t\tin_id,\n\t\t\tin_scope,\n\t\t);\n\n\t\tpropertyDef.constructorFunction = ConstructorFunction;\n\t\tpropertyDef.signal = true;\n\t\tpropertyDef.entry = params;\n\t\tpropertyDef.context = \"single\";\n\t\tpropertyDef.typeid = in_typeid;\n\t}\n\n\t/**\n\t * Check whether a typeid is registered\n\t * @param {string} in_typeid - The type unique identifier\n\t * @param {string|undefined} in_scope - The scope in which the property typeid is defined\n\t * @returns {boolean} Returns true if the typeid is registered. False otherwise.\n\t * @private\n\t */\n\t_isRegisteredTypeid(in_typeid, in_scope) {\n\t\treturn !!this._get(in_typeid, undefined, in_scope);\n\t}\n\n\t/**\n\t * Checks if there exists a registered template with a corresponding typeid\n\t * example:example would match to example:example-1.0.0\n\t * example:example-1.0.0 would not match to example:example only to example:example-1.0.0\n\t * @param {string} in_typeid - The type unique identifier with or without a version\n\t * @param {string|undefined} in_scope - The scope in which the property typeid is defined\n\t * @returns {boolean} Returns true if a match is found. False otherwise.\n\t * @private\n\t */\n\t_hasCorrespondingRegisteredTypeid(in_typeid, in_scope) {\n\t\tif (in_typeid.includes(\"-\")) {\n\t\t\treturn this._isRegisteredTypeid(in_typeid, in_scope);\n\t\t}\n\n\t\tvar registered =\n\t\t\tthis._localVersionedTemplates.has(in_typeid) ||\n\t\t\tthis._localPrimitivePropertiesAndTemplates.has(in_typeid);\n\n\t\tif (!registered && in_scope && this._remoteScopedAndVersionedTemplates.has(in_scope)) {\n\t\t\tregistered = this._remoteScopedAndVersionedTemplates.item(in_scope).has(in_typeid);\n\t\t}\n\n\t\treturn registered;\n\t}\n\n\t/**\n\t * Check whether the given typeid is a specialized constructor\n\t * Specialized constructors are of Array or Map types\n\t * @param {string} in_typeid - The type unique identifier\n\t * @returns {boolean} Returns true if the typeid is a specialized constructor\n\t * @private\n\t */\n\t_isSpecializedConstructor(in_typeid) {\n\t\treturn this._localPrimitivePropertiesAndTemplates.item(in_typeid) instanceof Collection;\n\t}\n\n\t/**\n\t * Generate the typeid according to multiple settings\n\t *\n\t * @param {Object} in_propertiesEntry - Describes the property object to create\n\t * @param {string=} [in_propertiesEntry.id] - The name of the property\n\t * @param {string=} [in_propertiesEntry.typeid] - The type identifier\n\t * @param {string=} [in_propertiesEntry.context] - Context in which the property is created\n\t * @param {Object=} [in_propertiesEntry.properties] - Context in which the property is created\n\t * @param {number} [in_propertiesEntry.length] - The length of an array property\n\t * @param {string} in_scope - The scope in which the property typeid is defined\n\t * @param {string} context - The context of the property\n\t *\n\t * @returns {string} The typeid.\n\t */\n\t_computeTypeid(in_propertiesEntry, in_scope, context) {\n\t\tvar typeid = in_propertiesEntry.typeid;\n\t\tif (context === \"single\") {\n\t\t\tvar valueParsed = this._parseTypedValue(in_propertiesEntry, in_scope, context);\n\t\t\tif (valueParsed.typed && valueParsed.typeid) {\n\t\t\t\ttypeid = in_propertiesEntry.typedValue.typeid;\n\t\t\t}\n\t\t}\n\t\t// We create a polymorphic collection (one inheriting from BaseProperty), if no typeid is specified\n\t\t// but a context is given\n\t\tif (!typeid && context !== \"single\") {\n\t\t\ttypeid = context !== \"set\" ? \"ContainerProperty\" : \"NamedProperty\";\n\t\t}\n\t\tif (\n\t\t\tin_propertiesEntry.typeid &&\n\t\t\tTypeIdHelper.isReferenceTypeId(in_propertiesEntry.typeid)\n\t\t) {\n\t\t\ttypeid = \"Reference\";\n\t\t}\n\t\treturn typeid;\n\t}\n\n\t/**\n\t * Creates a propertyDef for the given properties entry\n\t *\n\t * @param {Object} in_propertiesEntry - Describes the property object to create\n\t * @param {string=} [in_propertiesEntry.id] - The name of the property\n\t * @param {string=} [in_propertiesEntry.typeid] - The type identifier\n\t * @param {string=} [in_propertiesEntry.context] - Context in which the property is created\n\t * @param {Object=} [in_propertiesEntry.properties] - Context in which the property is created\n\t * @param {number} [in_propertiesEntry.length] - The length of an array property\n\t * @param {string} in_scope - The scope in which the property typeid is defined\n\t * @param {Object} out_propertyDef - The created property definition\n\t */\n\t_createDefFromPropertyDeclaration(in_propertiesEntry, in_scope, out_propertyDef) {\n\t\tvar context =\n\t\t\tin_propertiesEntry.context !== undefined ? in_propertiesEntry.context : \"single\";\n\t\tvar typeid = this._computeTypeid(in_propertiesEntry, in_scope, context);\n\t\tvar referenceTarget =\n\t\t\ttypeid === \"Reference\"\n\t\t\t\t? TypeIdHelper.extractReferenceTargetTypeIdFromReference(in_propertiesEntry.typeid)\n\t\t\t\t: undefined;\n\n\t\tif (typeid) {\n\t\t\tif (\n\t\t\t\tthis._isRegisteredTypeid(typeid, in_scope) &&\n\t\t\t\t(!referenceTarget || this._hasCorrespondingRegisteredTypeid(referenceTarget, in_scope))\n\t\t\t) {\n\t\t\t\tvar templateOrConstructor = this._get(typeid, context, in_scope);\n\t\t\t\tvar isSpecializedConstructor = this._isSpecializedConstructor(typeid);\n\n\t\t\t\tif (\n\t\t\t\t\tthis._isNativePropertyConstructor(templateOrConstructor) &&\n\t\t\t\t\t(isSpecializedConstructor || context === \"single\")\n\t\t\t\t) {\n\t\t\t\t\tif (TypeIdHelper.isReferenceTypeId(typeid) || in_propertiesEntry.id !== undefined) {\n\t\t\t\t\t\ttemplateOrConstructor = this._getConstructorFunctionForTypeidAndID(\n\t\t\t\t\t\t\tin_propertiesEntry.context,\n\t\t\t\t\t\t\tin_propertiesEntry.typeid,\n\t\t\t\t\t\t\ttemplateOrConstructor,\n\t\t\t\t\t\t\tin_propertiesEntry.id,\n\t\t\t\t\t\t\tin_scope,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tout_propertyDef.constructorFunction = templateOrConstructor;\n\t\t\t\t\tout_propertyDef.signal = false;\n\t\t\t\t\tout_propertyDef.entry = in_propertiesEntry;\n\t\t\t\t\tout_propertyDef.context = in_propertiesEntry.context;\n\t\t\t\t\tout_propertyDef.typeid = in_propertiesEntry.typeid;\n\n\t\t\t\t\t// If this is a primitive type, we create it via the registered constructor\n\t\t\t\t\tvar result = new templateOrConstructor(in_propertiesEntry);\n\t\t\t\t\treturn result;\n\t\t\t\t} else {\n\t\t\t\t\tconst templateWrapper = this._getWrapper(typeid, context, in_scope);\n\t\t\t\t\ttemplateOrConstructor = templateWrapper.getCompiledTemplate(this);\n\t\t\t\t\tif (context === \"single\") {\n\t\t\t\t\t\t// If we have a template in a single context, we create it directly here\n\n\t\t\t\t\t\t// Create the base object\n\t\t\t\t\t\tthis._createNonCollectionPropertyDef(\n\t\t\t\t\t\t\ttypeid,\n\t\t\t\t\t\t\tin_propertiesEntry.id,\n\t\t\t\t\t\t\ttemplateOrConstructor,\n\t\t\t\t\t\t\tin_scope,\n\t\t\t\t\t\t\tout_propertyDef,\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tthis._parseTemplate(\n\t\t\t\t\t\t\ttemplateOrConstructor,\n\t\t\t\t\t\t\tin_scope,\n\t\t\t\t\t\t\t!!templateOrConstructor.inherits,\n\t\t\t\t\t\t\tout_propertyDef,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If we have other contexts, we have to create the corresponding property object for that context\n\n\t\t\t\t\t\t// check if a specialized collection is needed\n\t\t\t\t\t\tvar isEnum = this.inheritsFrom(typeid, \"Enum\", { scope: in_scope });\n\n\t\t\t\t\t\tvar constructorFunction;\n\t\t\t\t\t\tswitch (context) {\n\t\t\t\t\t\t\tcase \"array\":\n\t\t\t\t\t\t\t\tif (isEnum) {\n\t\t\t\t\t\t\t\t\tvar enumPropertyEntry = deepCopy(in_propertiesEntry);\n\t\t\t\t\t\t\t\t\tenumPropertyEntry._enumDictionary = templateOrConstructor._enumDictionary;\n\t\t\t\t\t\t\t\t\tin_propertiesEntry = enumPropertyEntry;\n\n\t\t\t\t\t\t\t\t\tconstructorFunction = EnumArrayProperty;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tconstructorFunction = ArrayProperty;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"set\":\n\t\t\t\t\t\t\t\t// Validate that a set inherit from a NamedProperty\n\t\t\t\t\t\t\t\tvar typeid = in_propertiesEntry.typeid;\n\t\t\t\t\t\t\t\tif (!this.inheritsFrom(typeid, \"NamedProperty\", { scope: in_scope })) {\n\t\t\t\t\t\t\t\t\tthrow new Error(MSG.SET_ONLY_NAMED_PROPS + typeid);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tconstructorFunction = SetProperty;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"map\":\n\t\t\t\t\t\t\t\tconstructorFunction = MapProperty;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tthrow new Error(MSG.UNKNOWN_CONTEXT_SPECIFIED + context);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tout_propertyDef.constructorFunction = constructorFunction;\n\t\t\t\t\t\tout_propertyDef.signal = false;\n\t\t\t\t\t\tout_propertyDef.entry = in_propertiesEntry;\n\t\t\t\t\t\tout_propertyDef.typeid = typeid;\n\t\t\t\t\t\tout_propertyDef.context = context;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// We tried to create a property with an unknown typeid\n\t\t\t\t// that means we have no template and don't know what to instantiate\n\t\t\t\t// TODO: look for and use the missing template somehow at this point\n\t\t\t\ttypeid = referenceTarget || typeid;\n\t\t\t\tthrow new Error(MSG.UNKNOWN_TYPEID_SPECIFIED + typeid);\n\t\t\t}\n\t\t} else {\n\t\t\tif (!in_propertiesEntry.properties) {\n\t\t\t\tin_propertiesEntry.properties = [];\n\t\t\t}\n\n\t\t\t// If this is a declaration which contains a properties list, we have to create a new container property for it\n\t\t\tlet copiedPropertyEntry = Object.assign(\n\t\t\t\t{ typeid: \"ContainerProperty\" },\n\t\t\t\tin_propertiesEntry,\n\t\t\t);\n\t\t\tout_propertyDef.constructorFunction = ContainerProperty;\n\t\t\tout_propertyDef.entry = copiedPropertyEntry;\n\t\t\tout_propertyDef.signal = false;\n\t\t\tout_propertyDef.typeid = copiedPropertyEntry.typeid;\n\t\t\tout_propertyDef.context = \"single\";\n\n\t\t\t// And then parse the entry like a template\n\t\t\tthis._parseTemplate(in_propertiesEntry, in_scope, false, out_propertyDef);\n\t\t}\n\n\t\t// If this property inherits from NamedProperty we assign a random GUID\n\t\tif (typeid && this.inheritsFrom(typeid, \"NamedProperty\", { scope: in_scope })) {\n\t\t\tout_propertyDef.assignGuid = true;\n\t\t}\n\t}\n\n\t/**\n\t * Method used to determine whether the given object is a property constructor\n\t *\n\t * @param {Object} in_obj - Object to check.\n\t * @returns {boolean} True if the object is a BaseProperty.\n\t * @private\n\t */\n\t_isNativePropertyConstructor(in_obj) {\n\t\t// TODO: This tests seems dangerous. I think it is based on the assumption that constructor is not\n\t\t// overwritten in the derived classes (which it probably should be)\n\t\treturn in_obj.constructor && in_obj.constructor === ContainerProperty.constructor;\n\t}\n\n\t/**\n\t * Checks whether the property has a typedValue and replaces the value and the typeid\n\t * with the ones in the typedValue.\n\t * @param {Object} in_property - The property top parse.\n\t * @param {string} in_scope - The scope in which in_template is defined in\n\t * @param {string} in_context - The context of the in_property\n\t * @returns {Boolean} - True if the property has a typedValue.\n\t * @throws {TYPED_VALUES_MUST_DERIVE_FROM_BASE_TYPE} - Thrown when setting a typed value for a primitive.\n\t * @private\n\t */\n\t_parseTypedValue(in_property, in_scope, in_context) {\n\t\tvar res = {\n\t\t\ttyped: false,\n\t\t\tvalue: in_property.value,\n\t\t\ttypeid: in_property.typeid,\n\t\t};\n\n\t\tif (in_property.typedValue) {\n\t\t\tvar typeid = in_property.typeid || \"ContainerProperty\";\n\n\t\t\t// Setting typedValue to a primitive is not supported\n\t\t\tif (TypeIdHelper.isPrimitiveType(typeid)) {\n\t\t\t\tthrow new Error(MSG.TYPED_VALUES_FOR_PRIMITIVES_NOT_SUPPORTED + in_property.id);\n\t\t\t}\n\n\t\t\tres.typed = true;\n\t\t\tif (in_context === \"single\") {\n\t\t\t\tif (!in_property.typedValue.typeid) {\n\t\t\t\t\tthrow new Error(MSG.FIELD_TYPEID_IS_REQUIRED + \"typedValue \" + typeid);\n\t\t\t\t}\n\n\t\t\t\tif (!this.inheritsFrom(in_property.typedValue.typeid, typeid, { scope: in_scope })) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\tMSG.TYPED_VALUES_MUST_DERIVE_FROM_BASE_TYPE +\n\t\t\t\t\t\t\tin_property.typedValue.typeid +\n\t\t\t\t\t\t\t\" must be a subclass of \" +\n\t\t\t\t\t\t\ttypeid,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tres.value = in_property.typedValue.value;\n\t\t\t\tres.typeid = in_property.typedValue.typeid;\n\t\t\t} else {\n\t\t\t\tres.value = in_property.typedValue;\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}\n\n\t/**\n\t * Parse a given property template appending its property and constant objects to the given propertyDef\n\t *\n\t * @param {property-properties.PropertyTemplate} in_template - template for the property\n\t * @param {string} in_scope - The scope in which in_template is defined in\n\t * @param {boolean} in_allowChildMerges - Whether merging of children (nested properties) is allowed.\n\t * This is used for extending inherited properties.\n\t * @param {Object} out_propertyDef - The created property definition\n\t * @private\n\t */\n\t_parseTemplate(in_template, in_scope, in_allowChildMerges, propertyDef) {\n\t\t// Check if there are nested property arrays\n\t\tif (!(in_template.inherits && in_template.inherits.indexOf(\"Enum\") !== -1)) {\n\t\t\tif (in_template.properties) {\n\t\t\t\tconst properties = in_template.properties;\n\n\t\t\t\tfor (let i = 0; i < properties.length; i++) {\n\t\t\t\t\tconst id = properties[i].id;\n\t\t\t\t\tconst typeid = properties[i].typeid || \"ContainerProperty\";\n\t\t\t\t\tconst context = properties[i].context || \"single\";\n\t\t\t\t\tconst optional = properties[i].optional || false;\n\n\t\t\t\t\tconst valueParsed = this._parseTypedValue(properties[i], in_scope, context);\n\n\t\t\t\t\tif (optional) {\n\t\t\t\t\t\tpropertyDef.optionalChildren = propertyDef.optionalChildren || {};\n\t\t\t\t\t\tpropertyDef.entry.optionalChildren = true;\n\t\t\t\t\t\tpropertyDef.optionalChildren[id] = typeid;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (valueParsed.value) {\n\t\t\t\t\t\tconst newChildEntry = {\n\t\t\t\t\t\t\tinitialValue: valueParsed,\n\t\t\t\t\t\t\toptional,\n\t\t\t\t\t\t\tallowChildMerges: in_allowChildMerges,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tpropertyDef.children = propertyDef.children || [];\n\t\t\t\t\t\tpropertyDef.children.unshift([properties[i].id, newChildEntry]);\n\t\t\t\t\t\tthis._createDefFromPropertyDeclaration(properties[i], in_scope, newChildEntry);\n\t\t\t\t\t} else if (!optional) {\n\t\t\t\t\t\tconst newChildEntry = {\n\t\t\t\t\t\t\tinitialValue: undefined,\n\t\t\t\t\t\t};\n\t\t\t\t\t\tpropertyDef.children = propertyDef.children || [];\n\t\t\t\t\t\tpropertyDef.children.unshift([properties[i].id, newChildEntry]);\n\t\t\t\t\t\tthis._createDefFromPropertyDeclaration(properties[i], in_scope, newChildEntry);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (in_template.constants) {\n\t\t\t\tconst constants = in_template.constants;\n\t\t\t\tfor (let i = 0; i < constants.length; i++) {\n\t\t\t\t\tconst context = constants[i].context || \"single\";\n\t\t\t\t\tconst valueParsed = this._parseTypedValue(constants[i], in_scope, context);\n\n\t\t\t\t\tconst newChildEntry = {\n\t\t\t\t\t\tinitialValue: undefined,\n\t\t\t\t\t\tconstant: true,\n\t\t\t\t\t};\n\t\t\t\t\tpropertyDef.children = propertyDef.children || [];\n\t\t\t\t\tpropertyDef.children.unshift([constants[i].id, newChildEntry]);\n\n\t\t\t\t\tthis._createDefFromPropertyDeclaration(constants[i], in_scope, newChildEntry);\n\n\t\t\t\t\tif (valueParsed.value) {\n\t\t\t\t\t\tnewChildEntry.initialValue = valueParsed;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// private params:\n\t// @param {string} [in_options.scope] - The scope in which the property typeid is defined\n\t/**\n\t * Checks whether the template with typeid in_templateTypeid inherits from the template in in_baseTypeid\n\t *\n\t * Note: By default, this also returns true if in_templateTypeid === in_baseTypeid, since in most use cases\n\t * the user wants to check whether a given template has all members as another template and so this is\n\t * true for the template itself\n\t *\n\t * @param {string} in_templateTypeid - Template for which we want to check, whether in_baseTypeid is a parent\n\t * @param {string} in_baseTypeid - The base template to check for\n\t * @param {object} [in_options] - Additional options\n\t * @param {boolean} [in_options.includeSelf=true] - Also return true if in_templateTypeid === in_baseTypeid\n\t * @param {property-properties.Workspace} [in_options.workspace] - A checked out workspace to check against. If supplied,\n\t * the function will check against the schemas that have been registered within the workspace\n\t * @throws if no template is found for in_templateTypeid\n\t * @returns {boolean} True if in_baseTypeid is a parent of in_templateTypeid or\n\t * if (in_includeSelf == true and in_templateTypeid == in_baseTypeid)\n\t */\n\tinheritsFrom(in_templateTypeid, in_baseTypeid, in_options) {\n\t\tconst cachedInheritance = this._inheritanceCache[in_templateTypeid];\n\n\t\tin_options = in_options || {};\n\n\t\tif (\n\t\t\tin_templateTypeid === in_baseTypeid &&\n\t\t\t(!!in_options.includeSelf || in_options.includeSelf === undefined)\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// check the inheritance of primitive typeid\n\t\tif (\n\t\t\t(TypeIdHelper.isPrimitiveType(in_templateTypeid) ||\n\t\t\t\tTypeIdHelper.isReservedType(in_templateTypeid)) &&\n\t\t\t(TypeIdHelper.isPrimitiveType(in_baseTypeid) ||\n\t\t\t\tTypeIdHelper.isReservedType(in_baseTypeid))\n\t\t) {\n\t\t\treturn TypeIdHelper.nativeInheritsFrom(in_templateTypeid, in_baseTypeid);\n\t\t}\n\n\t\t// look in the cache first\n\t\tif (cachedInheritance && cachedInheritance[in_baseTypeid]) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tvar parents = {};\n\t\t\tthis._getAllParentsForTemplateInternal(\n\t\t\t\tin_templateTypeid,\n\t\t\t\tparents,\n\t\t\t\ttrue,\n\t\t\t\tin_options.scope,\n\t\t\t);\n\n\t\t\t// update the cache\n\t\t\tthis._inheritanceCache[in_templateTypeid] = parents;\n\n\t\t\treturn parents[in_baseTypeid] !== undefined;\n\t\t}\n\t}\n\n\t// private params:\n\t// @param {string|undefined} [in_options.scope] - The scope in which the template was stored.\n\t/**\n\t * Returns all the typeids the template inherits from (including all possible paths through multiple inheritance).\n\t * The order of the elements in the array is unspecified.\n\t *\n\t * @param {string} in_typeid - typeid of the template\n\t * @param {object} [in_options] - Additional options\n\t * @param {boolean} [in_options.includeBaseProperty=false] - Include BaseProperty as parent.\n\t * Everything implicitly inherits from BaseProperty, but it is not explicitly listed in the template,\n\t * so it is only included if explicitly requested.\n\t * @param {property-properties.Workspace} [in_options.workspace] - A checked out workspace to check against.\n\t * If supplied, the function will check against the schemas that have been registered within the workspace.\n\t * @throws if no template found for in_typeid. Make sure it is registered first.\n\t * @returns {Array.<string>} typeids of all inherited types (in unspecified order)\n\t */\n\tgetAllParentsForTemplate(in_typeid, in_options) {\n\t\tin_options = in_options || {};\n\t\t// We just forward the request to the internal function\n\t\tvar parents = {};\n\t\tvar scope = in_options.workspace\n\t\t\t? in_options.workspace.getRoot()._getCheckedOutRepositoryInfo().getScope()\n\t\t\t: in_options.scope;\n\t\tthis._getAllParentsForTemplateInternal(\n\t\t\tin_typeid,\n\t\t\tparents,\n\t\t\t!!in_options.includeBaseProperty,\n\t\t\tscope,\n\t\t);\n\n\t\treturn _.keys(parents);\n\t}\n\n\t/**\n\t * Returns all the typeids the template inherits from (including all possible paths through multiple inheritance).\n\t *\n\t * @param {string} in_typeid - typeid of the template\n\t * @param {Object} out_parents - Map containing the parents\n\t * @param {Boolean} in_includeBaseProperty - Include BaseProperty as parent. Everything implicitly inherits from\n\t * BaseProperty, but it is not explicitly listed in the template, so it is only be included if explicitly requested.\n\t * @param {string} [in_scope] - The scope in which the property typeid is defined.\n\t */\n\t_getAllParentsForTemplateInternal(in_typeid, out_parents, in_includeBaseProperty, in_scope) {\n\t\tif (TypeIdHelper.isPrimitiveType(in_typeid)) {\n\t\t\t// Everything inherits from BaseProperty.\n\t\t\tif (in_includeBaseProperty) {\n\t\t\t\tout_parents[\"AbstractStaticCollectionProperty\"] = true;\n\t\t\t\tout_parents[\"BaseProperty\"] = true;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tvar template = this._get(in_typeid, undefined, in_scope);\n\t\tif (!template) {\n\t\t\tthrow new Error(MSG.NON_EXISTING_TYPEID + in_typeid);\n\t\t}\n\n\t\t// Everything inherits from BaseProperty.\n\t\tif (in_includeBaseProperty) {\n\t\t\tout_parents[\"AbstractStaticCollectionProperty\"] = true;\n\t\t\tout_parents[\"BaseProperty\"] = true;\n\t\t}\n\n\t\t// Run over all parents and insert them into the parents array\n\t\tif (template.inherits) {\n\t\t\t// We have to distinguish the cases where the parents are either specified as a single string or an array\n\t\t\tvar parents = _.isArray(template.inherits) ? template.inherits : [template.inherits];\n\n\t\t\tfor (var i = 0; i < parents.length; i++) {\n\t\t\t\t// Mark it as parent\n\t\t\t\tout_parents[parents[i]] = true;\n\n\t\t\t\t// Continue recursively\n\t\t\t\tthis._getAllParentsForTemplateInternal(parents[i], out_parents, undefined, in_scope);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Internal function used to clear and reinitialize the PropertyFactory\n\t * @private\n\t */\n\t_clear() {\n\t\tthis._localPrimitivePropertiesAndTemplates = new Collection();\n\t\tthis._localVersionedTemplates = new Collection();\n\t\tthis._remoteScopedAndVersionedTemplates = new Collection();\n\t\tthis._inheritanceCache = {};\n\t\tthis._typedPropertyConstructorCache = {};\n\n\t\tthis._init();\n\t}\n\n\t/**\n\t * Reregisters a template (by overwriting the existing template).\n\t *\n\t * This should NEVER be necessary in the final application, but it might be helpful during interactive debugging\n\t * sessions, when trying out different templates.\n\t *\n\t * @protected\n\t * @param {property-properties.PropertyTemplate|object|property-properties.BaseProperty} in_template - The template\n\t * to reregister.\n\t */\n\t_reregister(in_template) {\n\t\tvar typeid = in_template.typeid;\n\n\t\tif (!(in_template instanceof PropertyTemplate)) {\n\t\t\tin_template = new PropertyTemplate(in_template);\n\t\t}\n\n\t\tvar typeidWithoutVersion = in_template.getTypeidWithoutVersion();\n\t\tvar version = in_template.getVersion();\n\n\t\t// Remove the existing entry\n\t\tthis._localPrimitivePropertiesAndTemplates.remove(typeid);\n\n\t\tif (this._localVersionedTemplates.has(typeidWithoutVersion)) {\n\t\t\tif (this._localVersionedTemplates.item(typeidWithoutVersion).has(version)) {\n\t\t\t\tthis._localVersionedTemplates.item(typeidWithoutVersion).remove(version);\n\t\t\t}\n\t\t}\n\n\t\t// Clear this schema from the inheritance cache\n\t\tdelete this._inheritanceCache[typeid];\n\n\t\t// Remove the typeid from the constructor cache\n\t\tvar registeredConstructors = _.keys(this._typedPropertyConstructorCache);\n\t\tfor (var i = 0; i < registeredConstructors.length; i++) {\n\t\t\tif (registeredConstructors[i].substr(0, typeid.length) === typeid) {\n\t\t\t\tdelete this._typedPropertyConstructorCache[registeredConstructors[i]];\n\t\t\t}\n\t\t}\n\n\t\t// Remove from typeid creation cache\n\t\tthis._cachedCreationFunctions.delete(typeid);\n\n\t\t// And repeat the registration\n\t\tregisterLocal.call(this, in_template);\n\t}\n\n\t/**\n\t * Initializes the schema store.\n\t * @param {Object} in_options - the store settings.\n\t * @param {getBearerTokenFn} in_options.getBearerToken - Function that accepts a callback.\n\t * Function that should be called with an error or the OAuth2 bearer token representing the user.\n\t * @param {string} in_options.url - The root of the url used in the request to retrieve PropertySet schemas.\n\t *\n\t * @returns {Promise} Return an empty promise when checkout resolve or reject with error.\n\t */\n\tasync initializeSchemaStore(in_options) {\n\t\t// https://regex101.com/r/TlgGJp/2\n\t\tvar regexBaseUrl =\n\t\t\t// eslint-disable-next-line unicorn/no-unsafe-regex\n\t\t\t/^(https?:)?\\/\\/((.[-a-zA-Z0-9@:%_+~#=.]{2,256}){1,2}\\.[a-z]{2,6}|\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})(:\\d{1,5})?(\\/[-a-zA-Z0-9@:%_+.~#?&/=]*)*$/;\n\n\t\tif (\n\t\t\t!in_options ||\n\t\t\t!in_options.getBearerToken ||\n\t\t\t!_.isFunction(in_options.getBearerToken) ||\n\t\t\t!in_options.url\n\t\t) {\n\t\t\treturn Promise.reject(new Error(MSG.MISSING_FSS_INIT_OPTIONS));\n\t\t}\n\n\t\tif (!regexBaseUrl.test(in_options.url)) {\n\t\t\treturn Promise.reject(new Error(MSG.FSS_BASEURL_WRONG));\n\t\t}\n\n\t\tif (!in_options.url.endsWith(\"/\")) {\n\t\t\tin_options.url = in_options.url + \"/\";\n\t\t}\n\n\t\tthis._templateStore = new ForgeSchemaStore(in_options);\n\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Pushes a template request task onto the template requests queue\n\t *\n\t * @param {String} in_task - schema retrieval task\n\t * @param {String} in_callback - callback of the task\n\t *\n\t * @private\n\t */\n\t_retrieveTemplateRequestWorker(in_task, in_callback) {\n\t\tvar store = in_task.context;\n\t\tif (store) {\n\t\t\tstore\n\t\t\t\t.retrieveTemplate(in_task.typeid)\n\t\t\t\t.then(function (response) {\n\t\t\t\t\tin_callback(response);\n\t\t\t\t})\n\t\t\t\t.catch(function (error) {\n\t\t\t\t\tin_callback({ error: error });\n\t\t\t\t});\n\t\t} else {\n\t\t\tthrow new Error(MSG.INVALID_TEMPLATE_STORE);\n\t\t}\n\t}\n\n\t/**\n\t * Tries to resolve dependencies after some calls to register() have been made\n\t *\n\t *\n\t * @returns {Promise} A promise that resolves to an object with the following structure:\n\t *\n\t * ```json\n\t * {\n\t * errors: {\n\t * typeid1: errors,\n\t * ...\n\t * typeidn: errors\n\t * },\n\t * templates: {\n\t * typeid1: [], array of templates\n\t * ...\n\t * typeidn: [] array of templates\n\t * }\n\t * }\n\t * ```\n\t */\n\tasync resolveSchemas() {\n\t\t// Only one queue at a time can be processed.\n\t\tif (this.templateRequestsQueue !== undefined) {\n\t\t\treturn Promise.reject(new Error(MSG.DEPENDENCIES_RESOLUTION_IN_PROGRESS));\n\t\t}\n\n\t\tthis.templateRequestsQueue = async.queue(this._retrieveTemplateRequestWorker, 5);\n\n\t\tvar that = this;\n\n\t\t// 0. Inspect locally registered templates for unknown dependencies\n\t\tthis._localPrimitivePropertiesAndTemplates.iterate(function (key, type) {\n\t\t\tif (\n\t\t\t\t!that._isSpecializedConstructor(key) &&\n\t\t\t\tPropertyTemplate.isTemplate(type.getPropertyTemplate())\n\t\t\t) {\n\t\t\t\tvar unknownDeps = _extractUnknownDependencies.call(that, type.getPropertyTemplate());\n\t\t\t\tfor (var d = 0; d < unknownDeps.length; d++) {\n\t\t\t\t\tvar dep = unknownDeps[d];\n\t\t\t\t\tif (that.missingDependencies[dep] === undefined) {\n\t\t\t\t\t\tthat.missingDependencies[dep] = { requested: false };\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tvar typeids = Object.keys(this.missingDependencies);\n\n\t\t// 1. Iterate over missing dependencies. Create pending request entries. Set status to pending.\n\t\t// Push template retrieve task to the queue for unresolved typeids (missing dependencies)\n\t\tfor (var i = 0; i < typeids.length; i++) {\n\t\t\tvar typeid = typeids[i];\n\t\t\tif (that.templateRequestsResults.errors[typeid] === undefined) {\n\t\t\t\tthat.templateRequestsResults.errors[typeid] = {};\n\t\t\t}\n\t\t\tif (that.templateRequestsResults.schemas[typeid] === undefined) {\n\t\t\t\tthat.templateRequestsResults.schemas[typeid] = {};\n\t\t\t}\n\n\t\t\t_pushTemplateRequestTask.call(that, typeid);\n\t\t}\n\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\tif (that.templateRequestsQueue.length() === 0) {\n\t\t\t\tresolve({ errors: {}, schemas: {} });\n\t\t\t\tthat.templateRequestsQueue = undefined;\n\t\t\t} else {\n\t\t\t\tthat.templateRequestsQueue.drain = function () {\n\t\t\t\t\tvar errors = _.compact(_.pluck(that.templateRequestsResults.errors, \"typeid\"));\n\t\t\t\t\tvar results = that.templateRequestsResults;\n\t\t\t\t\tvar resultsKeys = Object.keys(that.templateRequestsResults.schemas);\n\t\t\t\t\tvar tempMissingDependencies = [];\n\t\t\t\t\tlet tempConstant;\n\t\t\t\t\t// create missing dependencies for contextKeyType\n\t\t\t\t\tfor (var j = 0; j < resultsKeys.length; j++) {\n\t\t\t\t\t\tvar templateWrapper = that._getWrapper(\n\t\t\t\t\t\t\tresults.schemas[resultsKeys[j]].typeid,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (templateWrapper) {\n\t\t\t\t\t\t\tvar compiledTemplate = templateWrapper.getCompiledTemplate(that);\n\t\t\t\t\t\t\tif (compiledTemplate.constants) {\n\t\t\t\t\t\t\t\tfor (var s = 0; s < compiledTemplate.constants.length; s++) {\n\t\t\t\t\t\t\t\t\ttempConstant = compiledTemplate.constants[s];\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\ttempConstant.contextKeyType === \"typeid\" &&\n\t\t\t\t\t\t\t\t\t\ttempConstant.context === \"map\" &&\n\t\t\t\t\t\t\t\t\t\ttempConstant.value\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tvar valueKeys = Object.keys(tempConstant.value);\n\t\t\t\t\t\t\t\t\t\tfor (var z = 0; z < valueKeys.length; z++) {\n\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\tTypeIdHelper.isTemplateTypeid(valueKeys[z]) &&\n\t\t\t\t\t\t\t\t\t\t\t\t!(valueKeys[z] in that.templateRequestsResults.schemas) &&\n\t\t\t\t\t\t\t\t\t\t\t\t!tempMissingDependencies.includes(valueKeys[z])\n\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\ttempMissingDependencies.push(valueKeys[z]);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (tempMissingDependencies.length !== 0) {\n\t\t\t\t\t\tfor (var j = 0; j < tempMissingDependencies.length; j++) {\n\t\t\t\t\t\t\tvar missingTypeid = tempMissingDependencies[j];\n\t\t\t\t\t\t\tif (that.missingDependencies[missingTypeid] === undefined) {\n\t\t\t\t\t\t\t\tthat.missingDependencies[missingTypeid] = { requested: false };\n\t\t\t\t\t\t\t\tif (that.templateRequestsResults.errors[missingTypeid] === undefined) {\n\t\t\t\t\t\t\t\t\tthat.templateRequestsResults.errors[missingTypeid] = {};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (that.templateRequestsResults.schemas[missingTypeid] === undefined) {\n\t\t\t\t\t\t\t\t\tthat.templateRequestsResults.schemas[missingTypeid] = {};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t_pushTemplateRequestTask.call(that, missingTypeid);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (that.templateRequestsQueue.length() === 0) {\n\t\t\t\t\t\tthat.templateRequestsResults = { errors: {}, schemas: {} };\n\t\t\t\t\t\tif (errors.length && errors.length > 0) {\n\t\t\t\t\t\t\treject(new Error(\"Some errors occured\"));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthat.missingDependencies = {};\n\t\t\t\t\t\t\tresolve(results);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthat.templateRequestsQueue = undefined;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Determines whether the given property is an instance of the property type corresponding to the given native\n\t * property typeid and context.\n\t *\n\t * @param {property-properties.BaseProperty} in_property - The property to test\n\t * @param {String} in_primitiveTypeid - Native property typeid\n\t * @param {String} in_context - Context of the property\n\t * @returns {boolean} True, if the property is an instance of the corresponding type\n\t */\n\tinstanceOf(in_property, in_primitiveTypeid, in_context) {\n\t\tvar templateConstructor = this._get(in_primitiveTypeid, in_context);\n\t\tvar result = false;\n\t\tif (templateConstructor && this._isNativePropertyConstructor(templateConstructor)) {\n\t\t\tresult = in_property instanceof templateConstructor;\n\t\t}\n\t\treturn result;\n\t}\n}\n\n/**\n * @internal\n */\nconst PropertyFactorySingleton = new PropertyFactory();\nexport { PropertyFactorySingleton as PropertyFactory };\n\nLazyLoadedProperties.AbstractStaticCollectionProperty = AbstractStaticCollectionProperty;\nLazyLoadedProperties.IndexedCollectionBaseProperty = IndexedCollectionBaseProperty;\nLazyLoadedProperties.ContainerProperty = ContainerProperty;\nLazyLoadedProperties.ArrayProperty = ArrayProperty;\nLazyLoadedProperties.EnumArrayProperty = EnumArrayProperty;\nLazyLoadedProperties.ReferenceProperty = ReferenceProperty;\nLazyLoadedProperties.StringProperty = StringProperty;\nLazyLoadedProperties.ValueProperty = ValueProperty;\nLazyLoadedProperties.ValueMapProperty = ValueMapProperty;\nLazyLoadedProperties.ReferenceMapProperty = ReferenceMapProperty;\nLazyLoadedProperties.NodeProperty = NodeProperty;\nLazyLoadedProperties.PropertyFactory = PropertyFactorySingleton;\n"]}
|