{"version":3,"sources":["webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/index.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/vue-model-observability.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/helpers.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/source-adapter.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/custom-observer.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/source-path-adapter.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/vue-model.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/source-path-mixin.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/source-root-adapter.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/source-item-adapter.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/source-root-mixin.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/vue-internals.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/vue-global-mixin.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/vue-helpers.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/entity-observer.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/object-meta-observer.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/array-observer.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/source-option-adapter.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/vm-root-component.js","webpack:///C:/a/1/s/Cognito.Web.Client/libs/vuemodel/lib/vm-source-component.js"],"names":["Object","defineProperty","exports","value","preventVueObservability","isSourceAdapter","vue_model_1","default","VueModel","source_adapter_1","enumerable","get","vue_model_observability_1","makeEntitiesVueObservable","dependChildArray","getArrayObserverConstructor","getArrayObserver","observeArray","getObjectMetaObserverConstructor","getObjectMetaObserver","getEntityObserverConstructor","getEntityObserver","observeEntity","getCustomObserverConstructor","vue_1","model_js_1","model_js_2","model_js_3","helpers_1","CustomObserverConstructor","CustomObserver","entity","asRootData","Entity","ob","meta","vmCount","create","EntityObserver","hasOwnProperty","getProp","markRaw","obj","__ob__","EntityObserverConstructor","ObjectMetaObserver","ObjectMetaObserverConstructor","array","Array","isArray","ObservableArray","isObservableArray","ArrayObserver","ArrayObserverConstructor","arrayObserver","ensureObservable","e","i","l","length","observer","dep","depend","vueCompatibleModels","model","Model","indexOf","_entitiesAreVueObservable","entityRegistered","subscribe","args","_i","_a","keys","types","typeName","known","forEach","push","debug","setProp","isEntity","type","jstype","isEntityType","prop","target","key","hasOwnPropertyFn","prototype","call","message","hasOverrideValue","isSourcePropertyAdapter","isSourceItemAdapter","isSourcePathAdapter","isSourceRootAdapter","source_root_adapter_1","source_path_adapter_1","source_item_adapter_1","SourceRootAdapter","SourcePathAdapter","SourceItemAdapter","allowAnyObject","String","Boolean","extendStatics","__extends","this","d","b","setPrototypeOf","__proto__","p","TypeError","__","constructor","VueInternals","_VueInternals","Observer","Error","_super","shallow","mock","_this","propertyDeps","getPropertyDep","propertyName","propertyDep","Dep","configurable","writable","onPropertyAccess","childOb","onPropertyChange","newValue","notify","__decorate","decorators","desc","c","arguments","r","getOwnPropertyDescriptor","Reflect","decorate","__metadata","k","v","metadata","__importDefault","mod","__esModule","formatDisplayValue","vue_property_decorator_1","source_option_adapter_1","model_js_4","model_js_5","model_js_6","model_js_7","_id","apply","formatErrorCondition","id","concat","parentVm","$parent","parentLevel","$source","property","parent","getPath","source","propertyType","isList","getLastTarget","label","overrides","labelIsFormat","evaluateLabel","helptext","helptextIsFormat","toString","readonly","required","isPropertyBooleanFunctionAndOptions","isPropertyBooleanFunction","function","set","valueArray_1","observableArray_1","batchUpdate","updateArray","metaOb","conditionTargets","conditions","condition","formatErrorConditions","Property","PropertyChain","lastProperty","filter","properties","map","conditionTarget","sort","conditionA","conditionB","compare","err","createCondition","formatError","invalidValue","text","formatter","format","isValueType","containingType","getFormat","clearCondition","FormatError","ConditionType","convertBack","allowedValuesRules","rules","AllowedValuesRule","allowedValuesRule","targetObj","allowedValuesFromRule","values","ignoreValidation","clearInvalidOptions","$children","SourceOptionAdapter","$destroy","allowedValues","propsData","items","existingItemsToDestroy","existingItemsMap_1","adapter","isOrphaned","existingItem","existingItemIndex","splice","$options","index","newItem","parentSource","subscribeToSourceChanges","conditionTargetA","conditionTargetB","RequiredRule","category","item","Prop","Component","displayValue","convert","join","createVueModel","vue_internals_1","vue_global_mixin_1","source_path_mixin_1","source_root_mixin_1","vm_root_component_1","vm_source_component_1","options","config","_Vue","install","vue","component","VMRoot","VMSource","ensureVueInternalTypes","VueModel$installGlobalMixin","mixins","SourcePath","SourcePathMixin","SourceRoot","SourceRootMixin","CultureInfo","Promise","resolve","ready","onLabelChanged","onOverrideValueChanged","onHelptextChanged","onReadonlyChanged","onRequiredChanged","ensureOverridesAppliedToSourceAdapter","hasOverrides","name","Watch","Function","fullName","_this_1","internalIndex","isSubscribedToSourceChanges","created","suppressChangeTracking","onIndexChanged","changed","changes","ArrayChangeType","remove","startIndex","add","Number","VueModel$Vue","Vue","observableData","observable","data","$data","observerCtor","depCtor","vue_helpers_1","replaceEntityData","vm","vm$private","_entity","mixin","beforeCreate","dataFn","preprocessDataToInterceptEntities","_data","props","methods","Vue$isReserved","Vue$proxy","proxyEntityPropertiesOntoComponentInstance","restoreComponentEntityData","Vue$dependArray","str","charCodeAt","sourceKey","custom_observer_1","_observable","accessed","_onAccess","bind","_onChange","__fields__","_onConditionsChanged","path","vue_class_component_1","render","slotNodes","$scopedSlots"],"mappings":"gGACAA,OAAOC,eAAeC,EAAS,aAAc,CAAEC,OAAO,IACtDD,EAAQE,wBAA0BF,EAAQG,qBAAkB,EAC5D,IAAIC,EAAc,EAAQ,KAE1B,EAAQ,KACRJ,EAAQK,QAAUD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AUuK,EAAUzJ,GAIpByJ,EAASzL,UAAUmQ,OAAS,WACxB,IAAIC,EAAYjP,KAAKkP,aAAavV,QAAQ,CACtCiK,QAAS5D,KAAK4D,UAElB,GAAyB,IAArBqL,EAAUlS,OACV,MAAM,IAAI6D,MAAM,SAAWqO,EAAUlS,OAAS,qDAElD,OAAOkS,EAAU,IAErB3E,EAAWzI,EAAW,CAClBiB,EAAyBsG,WAC1BkB,GAhBsB,EAkB3B,EAAIyE,EAAsBtE,QAAQd,EAAoBgB,kBACxDrR,EAAQgR,SAAWA","file":"176.f7a4e212a59b113b4cb2.js","sourcesContent":["\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.preventVueObservability = exports.isSourceAdapter = void 0;\r\nvar vue_model_1 = require(\"./vue-model\");\r\n// Include English resources by default\r\nrequire(\"@cognitoforms/model.js/lib/resource-en\");\r\nexports.default = vue_model_1.VueModel;\r\nvar source_adapter_1 = require(\"./source-adapter\");\r\nObject.defineProperty(exports, \"isSourceAdapter\", { enumerable: true, get: function () { return source_adapter_1.isSourceAdapter; } });\r\nvar vue_model_observability_1 = require(\"./vue-model-observability\");\r\nObject.defineProperty(exports, \"preventVueObservability\", { enumerable: true, get: function () { return vue_model_observability_1.preventVueObservability; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.makeEntitiesVueObservable = exports.dependChildArray = exports.getArrayObserverConstructor = exports.getArrayObserver = exports.observeArray = exports.getObjectMetaObserverConstructor = exports.getObjectMetaObserver = exports.getEntityObserverConstructor = exports.getEntityObserver = exports.observeEntity = exports.preventVueObservability = exports.getCustomObserverConstructor = void 0;\r\nvar vue_1 = require(\"vue\");\r\nvar model_js_1 = require(\"@cognitoforms/model.js\"); // eslint-disable-line import/no-duplicates\r\nvar model_js_2 = require(\"@cognitoforms/model.js\"); // eslint-disable-line import/no-duplicates\r\nvar model_js_3 = require(\"@cognitoforms/model.js\"); // eslint-disable-line import/no-duplicates\r\nvar helpers_1 = require(\"./helpers\");\r\n// eslint-disable-next-line no-redeclare\r\nvar CustomObserverConstructor = null;\r\nfunction getCustomObserverConstructor() {\r\n return CustomObserverConstructor || (CustomObserverConstructor = require(\"./custom-observer\").CustomObserver);\r\n}\r\nexports.getCustomObserverConstructor = getCustomObserverConstructor;\r\nfunction preventVueObservability(obj) {\r\n if (obj) {\r\n if (!(0, helpers_1.hasOwnProperty)(obj, \"__ob__\")) {\r\n // Mark the object as \"raw\" so that Vue won't try to make it observable\r\n (0, vue_1.markRaw)(obj);\r\n return true;\r\n }\r\n else {\r\n // Vue's default observability is also bypassed if the object's observer is a subclass of `CustomObserver`\r\n var CustomObserver = getCustomObserverConstructor();\r\n return obj.__ob__ instanceof CustomObserver;\r\n }\r\n }\r\n}\r\nexports.preventVueObservability = preventVueObservability;\r\n/**\r\n * Based on Vue's internal `observe()` function. Ensures that the given entity\r\n * is observable and optionally notes that it is referenced by a component\r\n * @param entity The entity to observe\r\n * @param asRootData The entity is referenced as a component's data\r\n */\r\nfunction observeEntity(entity, asRootData) {\r\n if (asRootData === void 0) { asRootData = false; }\r\n if (entity instanceof model_js_2.Entity) {\r\n var ob = getEntityObserver(entity, true);\r\n if (entity.meta) {\r\n getObjectMetaObserver(entity.meta, true);\r\n }\r\n if (asRootData && ob) {\r\n ob.vmCount++;\r\n }\r\n return ob;\r\n }\r\n else {\r\n // TODO: Warn about attempting to observe non-entity?\r\n }\r\n}\r\nexports.observeEntity = observeEntity;\r\n/**\r\n * Gets or creates an `EntityObserver` for the given entity\r\n * @param entity The entity begin observed\r\n * @param create If true, create the observer if it doesn't already exist\r\n */\r\nfunction getEntityObserver(entity, create) {\r\n if (create === void 0) { create = false; }\r\n var EntityObserver = getEntityObserverConstructor();\r\n if ((0, helpers_1.hasOwnProperty)(entity, \"__ob__\") && (0, helpers_1.getProp)(entity, \"__ob__\") instanceof EntityObserver) {\r\n return (0, helpers_1.getProp)(entity, \"__ob__\");\r\n }\r\n else if (create) {\r\n // Mark the entity as \"raw\" so that Vue won't try to make it observable\r\n (0, vue_1.markRaw)(entity);\r\n return new EntityObserver(entity, true);\r\n }\r\n else {\r\n return null;\r\n }\r\n}\r\nexports.getEntityObserver = getEntityObserver;\r\n// eslint-disable-next-line no-redeclare\r\nvar EntityObserverConstructor = null;\r\nfunction getEntityObserverConstructor() {\r\n return EntityObserverConstructor || (EntityObserverConstructor = require(\"./entity-observer\").EntityObserver);\r\n}\r\nexports.getEntityObserverConstructor = getEntityObserverConstructor;\r\n/**\r\n * Gets or creates an `ObjectMetaObserver` for the given meta object\r\n * @param meta The object meta begin observed\r\n * @param create If true, create the observer if it doesn't already exist\r\n */\r\nfunction getObjectMetaObserver(meta, create) {\r\n if (create === void 0) { create = false; }\r\n var ObjectMetaObserver = getObjectMetaObserverConstructor();\r\n if ((0, helpers_1.hasOwnProperty)(meta, \"__ob__\") && (0, helpers_1.getProp)(meta, \"__ob__\") instanceof ObjectMetaObserver) {\r\n return (0, helpers_1.getProp)(meta, \"__ob__\");\r\n }\r\n else if (create) {\r\n // Mark the object meta as \"raw\" so that Vue won't try to make it observable\r\n (0, vue_1.markRaw)(meta);\r\n return new ObjectMetaObserver(meta, true);\r\n }\r\n else {\r\n return null;\r\n }\r\n}\r\nexports.getObjectMetaObserver = getObjectMetaObserver;\r\n// eslint-disable-next-line no-redeclare\r\nvar ObjectMetaObserverConstructor = null;\r\nfunction getObjectMetaObserverConstructor() {\r\n return ObjectMetaObserverConstructor || (ObjectMetaObserverConstructor = require(\"./object-meta-observer\").ObjectMetaObserver);\r\n}\r\nexports.getObjectMetaObserverConstructor = getObjectMetaObserverConstructor;\r\n/**\r\n * Based on Vue's internal `observe()` function. Ensures that the given array\r\n * is observable and optionally notes that it is referenced by a component\r\n * @param array The array to observe\r\n * @param asRootData The array is referenced as a component's data\r\n */\r\nfunction observeArray(array, asRootData) {\r\n if (asRootData === void 0) { asRootData = false; }\r\n if (Array.isArray(array)) {\r\n if (model_js_3.ObservableArray.isObservableArray(array)) {\r\n var ob = getArrayObserver(array, true);\r\n if (asRootData && ob) {\r\n ob.vmCount++;\r\n }\r\n return ob;\r\n }\r\n else {\r\n // TODO: Warn about attempting to observe non-observable array?\r\n }\r\n }\r\n else {\r\n // TODO: Warn about attempting to observe non-array?\r\n }\r\n}\r\nexports.observeArray = observeArray;\r\n/**\r\n * Gets or creates an `ArrayObserver` for the given observable array\r\n * @param entity The entity begin observed\r\n * @param create If true, create the observer if it doesn't already exist\r\n */\r\nfunction getArrayObserver(array, create) {\r\n if (create === void 0) { create = false; }\r\n var ArrayObserver = getArrayObserverConstructor();\r\n if ((0, helpers_1.hasOwnProperty)(array, \"__ob__\") && (0, helpers_1.getProp)(array, \"__ob__\") instanceof ArrayObserver) {\r\n return (0, helpers_1.getProp)(array, \"__ob__\");\r\n }\r\n else if (create) {\r\n // Mark the array as \"raw\" so that Vue won't try to make it observable\r\n (0, vue_1.markRaw)(array);\r\n return new ArrayObserver(array, true);\r\n }\r\n else {\r\n return null;\r\n }\r\n}\r\nexports.getArrayObserver = getArrayObserver;\r\n// eslint-disable-next-line no-redeclare\r\nvar ArrayObserverConstructor = null;\r\nfunction getArrayObserverConstructor() {\r\n return ArrayObserverConstructor || (ArrayObserverConstructor = require(\"./array-observer\").ArrayObserver);\r\n}\r\nexports.getArrayObserverConstructor = getArrayObserverConstructor;\r\n/**\r\n * Based on Vue's internals `dependArray()` function\r\n * @param array The child array to track as a dependency\r\n */\r\nfunction dependChildArray(array) {\r\n var arrayObserver = observeArray(array);\r\n if (arrayObserver)\r\n arrayObserver.ensureObservable();\r\n for (var e, i = 0, l = array.length; i < l; i++) {\r\n e = array[i];\r\n if (e != null) {\r\n if (e instanceof model_js_2.Entity) {\r\n var observer = getEntityObserver(e, true);\r\n observer.ensureObservable();\r\n observer.dep.depend();\r\n }\r\n else if ((0, helpers_1.hasOwnProperty)(e, \"__ob__\")) {\r\n e.__ob__.dep.depend();\r\n }\r\n if (Array.isArray(e)) {\r\n dependChildArray(e);\r\n }\r\n }\r\n }\r\n}\r\nexports.dependChildArray = dependChildArray;\r\nvar vueCompatibleModels = [];\r\n/**\r\n * Make sure that entities in the given model are observable by Vue\r\n * By default, entities would not be observable, since model properties\r\n * are added to the prototype, Vue will not detect them. So, we use a custom\r\n * observer that leverages model metadata to manage property access/change.\r\n * @param model The model to augment\r\n */\r\nfunction makeEntitiesVueObservable(model) {\r\n if (!model || !(model instanceof model_js_1.Model)) {\r\n // TODO: Warn about missing or non-Model argument?\r\n return;\r\n }\r\n if (vueCompatibleModels.indexOf(model) >= 0 || model._entitiesAreVueObservable === true) {\r\n return;\r\n }\r\n model.entityRegistered.subscribe(function (args) {\r\n observeEntity(args.entity).ensureObservable();\r\n });\r\n // Make existing entities observable\r\n for (var _i = 0, _a = Object.keys(model.types); _i < _a.length; _i++) {\r\n var typeName = _a[_i];\r\n var type = model.types[typeName];\r\n type.known().forEach(function (entity) {\r\n observeEntity(entity).ensureObservable();\r\n });\r\n }\r\n vueCompatibleModels.push(model);\r\n model._entitiesAreVueObservable = true;\r\n}\r\nexports.makeEntitiesVueObservable = makeEntitiesVueObservable;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.debug = exports.hasOwnProperty = exports.setProp = exports.getProp = exports.isEntity = void 0;\r\nvar model_js_1 = require(\"@cognitoforms/model.js\");\r\nfunction isEntity(obj) {\r\n return obj && obj.meta && obj.meta.type && obj.meta.type.jstype && (0, model_js_1.isEntityType)(obj.meta.type.jstype);\r\n}\r\nexports.isEntity = isEntity;\r\nfunction getProp(obj, prop) {\r\n return obj[prop];\r\n}\r\nexports.getProp = getProp;\r\nfunction setProp(target, key, value) {\r\n target[key] = value;\r\n}\r\nexports.setProp = setProp;\r\nvar hasOwnPropertyFn = Object.prototype.hasOwnProperty;\r\nfunction hasOwnProperty(obj, prop) {\r\n return hasOwnPropertyFn.call(obj, prop);\r\n}\r\nexports.hasOwnProperty = hasOwnProperty;\r\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\r\nfunction debug(message) {\r\n // console.log(\"%c[DEBUG] \" + message, \"background-color: #efefef; color: #999;\");\r\n}\r\nexports.debug = debug;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.hasOverrideValue = exports.isSourcePropertyAdapter = exports.isSourceAdapter = exports.isSourceItemAdapter = exports.isSourcePathAdapter = exports.isSourceRootAdapter = void 0;\r\nvar source_root_adapter_1 = require(\"./source-root-adapter\");\r\nvar source_path_adapter_1 = require(\"./source-path-adapter\");\r\nvar source_item_adapter_1 = require(\"./source-item-adapter\");\r\nfunction isSourceRootAdapter(obj) {\r\n return obj instanceof source_root_adapter_1.SourceRootAdapter;\r\n}\r\nexports.isSourceRootAdapter = isSourceRootAdapter;\r\nfunction isSourcePathAdapter(obj) {\r\n return obj instanceof source_path_adapter_1.SourcePathAdapter;\r\n}\r\nexports.isSourcePathAdapter = isSourcePathAdapter;\r\nfunction isSourceItemAdapter(obj) {\r\n return obj instanceof source_item_adapter_1.SourceItemAdapter;\r\n}\r\nexports.isSourceItemAdapter = isSourceItemAdapter;\r\nfunction isSourceAdapter(obj, allowAnyObject) {\r\n if (allowAnyObject === void 0) { allowAnyObject = true; }\r\n if (isSourceRootAdapter(obj))\r\n return true;\r\n if (isSourcePathAdapter(obj))\r\n return true;\r\n if (isSourceItemAdapter(obj))\r\n return true;\r\n if (allowAnyObject && typeof obj === \"object\")\r\n return true;\r\n return false;\r\n}\r\nexports.isSourceAdapter = isSourceAdapter;\r\nfunction isSourcePropertyAdapter(obj) {\r\n if (isSourcePathAdapter(obj))\r\n return true;\r\n return false;\r\n}\r\nexports.isSourcePropertyAdapter = isSourcePropertyAdapter;\r\nfunction hasOverrideValue(value, type) {\r\n if (type === String) {\r\n return typeof value === \"string\" && value.length > 0;\r\n }\r\n else if (type === Boolean) {\r\n return typeof value === \"boolean\";\r\n }\r\n}\r\nexports.hasOverrideValue = hasOverrideValue;\r\n","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CustomObserver = void 0;\r\nvar vue_model_1 = require(\"./vue-model\");\r\nvar helpers_1 = require(\"./helpers\");\r\nvar vue_model_observability_1 = require(\"./vue-model-observability\");\r\nvar model_js_1 = require(\"@cognitoforms/model.js\");\r\nvar VueInternals = vue_model_1.VueModel._VueInternals;\r\nif (!VueInternals.Observer) {\r\n throw new Error(\"Vue's Observer constructor has not yet been obtained, be sure to call Vue.use(VueModel).\");\r\n}\r\nvar Observer = VueInternals.Observer;\r\n/**\r\n * A subclass of Vue's internal Observer class that is responsible\r\n * for managing its own access/change events for properties rather than\r\n * walking the object's own properties\r\n */\r\nvar CustomObserver = /** @class */ (function (_super) {\r\n __extends(CustomObserver, _super);\r\n function CustomObserver(value, shallow, mock) {\r\n if (shallow === void 0) { shallow = false; }\r\n if (mock === void 0) { mock = false; }\r\n var _this = _super.call(this, value, shallow, mock) || this;\r\n _this.propertyDeps = {};\r\n return _this;\r\n }\r\n /**\r\n * Gets (or creates) a `Dep` object for a property of the given name\r\n * The `Dep` object will be stored internally by the observer, using\r\n * the given target property name as a key\r\n * @param propertyName The target property name\r\n * @param create If true, create the `Dep` object if it doesn't already exist\r\n */\r\n CustomObserver.prototype.getPropertyDep = function (propertyName, create) {\r\n if (create === void 0) { create = false; }\r\n var propertyDep;\r\n var Dep = VueInternals.Dep;\r\n var propertyDeps = this.propertyDeps;\r\n if ((0, helpers_1.hasOwnProperty)(propertyDeps, propertyName) && propertyDeps[propertyName] instanceof Dep) {\r\n propertyDep = propertyDeps[propertyName];\r\n }\r\n else if (create) {\r\n propertyDep = new Dep();\r\n Object.defineProperty(propertyDeps, propertyName, {\r\n configurable: true,\r\n enumerable: true,\r\n value: propertyDep,\r\n writable: true\r\n });\r\n }\r\n return propertyDep;\r\n };\r\n /**\r\n * Emulate's Vue's getter logic in `defineReactive()`\r\n * @param propertyName The property being accessed\r\n * @param value The current property value\r\n */\r\n CustomObserver.prototype.onPropertyAccess = function (propertyName, value) {\r\n var Dep = VueInternals.Dep;\r\n // Attach dependencies if something is watching\r\n if (Dep.target) {\r\n // Get or initialize the `Dep` object\r\n var propertyDep = this.getPropertyDep(propertyName, true);\r\n // Let an active observer target know that the property was accessed and is a dependency\r\n propertyDep.depend();\r\n var childOb = (0, vue_model_observability_1.observeEntity)(value);\r\n if (childOb) {\r\n childOb.dep.depend();\r\n }\r\n if (Array.isArray(value)) {\r\n // Track dependency on children as well (creating entity observer as needed)\r\n (0, vue_model_observability_1.dependChildArray)(value);\r\n }\r\n }\r\n };\r\n /**\r\n * Emulate's Vue's setter logic in `defineReactive()`\r\n * @param propertyName The property being accessed\r\n * @param newValue The new property value\r\n */\r\n CustomObserver.prototype.onPropertyChange = function (propertyName, newValue) {\r\n // Get or initialize the `Dep` object\r\n var propertyDep = this.getPropertyDep(propertyName, true);\r\n // Make sure a new value that is an entity is observable\r\n if (newValue && newValue instanceof model_js_1.Entity) {\r\n (0, vue_model_observability_1.observeEntity)(newValue).ensureObservable();\r\n }\r\n // Notify of property change\r\n propertyDep.notify();\r\n };\r\n return CustomObserver;\r\n}(Observer));\r\nexports.CustomObserver = CustomObserver;\r\n","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __metadata = (this && this.__metadata) || function (k, v) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.formatDisplayValue = exports.SourcePathAdapter = void 0;\r\nvar vue_1 = __importDefault(require(\"vue\"));\r\nvar vue_property_decorator_1 = require(\"vue-property-decorator\");\r\nvar model_js_1 = require(\"@cognitoforms/model.js\"); // eslint-disable-line import/no-duplicates\r\nvar model_js_2 = require(\"@cognitoforms/model.js\"); // eslint-disable-line import/no-duplicates\r\nvar source_adapter_1 = require(\"./source-adapter\");\r\nvar source_option_adapter_1 = require(\"./source-option-adapter\");\r\nvar model_js_3 = require(\"@cognitoforms/model.js\"); // eslint-disable-line import/no-duplicates\r\nvar vue_model_observability_1 = require(\"./vue-model-observability\");\r\nvar model_js_4 = require(\"@cognitoforms/model.js\"); // eslint-disable-line import/no-duplicates\r\nvar model_js_5 = require(\"@cognitoforms/model.js\"); // eslint-disable-line import/no-duplicates\r\nvar source_item_adapter_1 = require(\"./source-item-adapter\");\r\nvar model_js_6 = require(\"@cognitoforms/model.js\"); // eslint-disable-line import/no-duplicates\r\nvar model_js_7 = require(\"@cognitoforms/model.js\"); // eslint-disable-line import/no-duplicates\r\nvar helpers_1 = require(\"./helpers\");\r\nvar _id = 0;\r\n// @ts-ignore\r\nvar SourcePathAdapter = /** @class */ (function (_super) {\r\n __extends(SourcePathAdapter, _super);\r\n function SourcePathAdapter() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n // viewState: { formatError: ConditionTarget } = { formatError: null };\r\n // formatError: FormatError = null;\r\n _this.formatErrorCondition = null;\r\n _this.id = \"\".concat(_id++);\r\n return _this;\r\n }\r\n Object.defineProperty(SourcePathAdapter.prototype, \"parent\", {\r\n get: function () {\r\n for (var parentVm = this.$parent.$parent, parentLevel = 1; parentVm != null; parentVm = parentVm.$parent, parentLevel += 1) {\r\n if ((0, source_adapter_1.isSourceAdapter)(parentVm.$source)) {\r\n return parentVm.$source;\r\n }\r\n }\r\n throw new Error(\"Parent source not found!\");\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"property\", {\r\n get: function () {\r\n var property = this.parent.type.meta.getPath(this.source);\r\n (0, vue_model_observability_1.preventVueObservability)(property);\r\n return property;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"type\", {\r\n get: function () {\r\n // If possible, determine the type based on the actual entity instance\r\n if (this.value && (0, helpers_1.isEntity)(this.value))\r\n return this.value.meta.type.jstype;\r\n return this.property.propertyType;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"isList\", {\r\n get: function () {\r\n return this.property.isList;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"lastTarget\", {\r\n get: function () {\r\n var property = this.property;\r\n return property.getLastTarget(this.parent.value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"label\", {\r\n /**\r\n * Gets the label for the source property.\r\n *\r\n * @returns The source override label if specified, or the model property label if not\r\n */\r\n get: function () {\r\n var label = this.overrides ? this.overrides.label : null;\r\n if (label === undefined || label === null) {\r\n if (this.property.labelIsFormat) {\r\n label = (0, model_js_2.evaluateLabel)(this.property, this.parent.value);\r\n }\r\n else {\r\n label = this.property.label;\r\n }\r\n }\r\n return label;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"helptext\", {\r\n /**\r\n * Gets the helptext for the source property.\r\n *\r\n * @returns The source override helptext if specified, or the model property helptext if not\r\n */\r\n get: function () {\r\n var helptext = this.overrides ? this.overrides.helptext : null;\r\n if (helptext === undefined || helptext === null) {\r\n if (this.property.helptextIsFormat) {\r\n helptext = this.parent.value.toString(this.property.helptext);\r\n }\r\n else {\r\n helptext = this.property.helptext;\r\n }\r\n }\r\n return helptext;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"readonly\", {\r\n /**\r\n * Indicants whether the source property is readonly.\r\n *\r\n * @returns True if either the parent source or the source override is read only, otherwise false\r\n */\r\n get: function () {\r\n return this.parent.readonly || (this.overrides ? !!this.overrides.readonly : false);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"required\", {\r\n /**\r\n * Indicants whether the source property is required.\r\n *\r\n * @returns True if the property is required, otherwise false\r\n */\r\n get: function () {\r\n if (this.overrides && this.overrides.required != null)\r\n return this.overrides.required;\r\n if ((0, model_js_2.isPropertyBooleanFunctionAndOptions)(this.property.required)) {\r\n if ((0, model_js_2.isPropertyBooleanFunction)(this.property.required.function)) {\r\n return this.property.required.function.call(this.parent.value);\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n if ((0, model_js_2.isPropertyBooleanFunction)(this.property.required))\r\n return this.property.required.call(this.parent.value);\r\n return this.property.required === true;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"value\", {\r\n /**\r\n * Gets the value of the source property on the entity.\r\n *\r\n * @returns The observable raw value of the property\r\n */\r\n get: function () {\r\n // This adapter has no value if its parent has no value\r\n if (!this.parent.value)\r\n return;\r\n return this.ensureObservable(this.property.value(this.parent.value));\r\n },\r\n /**\r\n * Sets the value of the source property on the entity.\r\n *\r\n * @param value - The new value to assign to the property\r\n */\r\n set: function (value) {\r\n if (this.property.isList) {\r\n var valueArray_1 = value;\r\n var observableArray_1 = this.property.value(this.parent.value);\r\n observableArray_1.batchUpdate(function () { return (0, model_js_5.updateArray)(observableArray_1, valueArray_1); });\r\n }\r\n else {\r\n this.property.value(this.parent.value, this.ensureObservable(value));\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"conditions\", {\r\n get: function () {\r\n var _this = this;\r\n var meta = this.parent.value.meta;\r\n var metaOb = (0, vue_model_observability_1.getObjectMetaObserver)(meta);\r\n // Make sure that the meta object is observable, ex: subscribes to conditions array changed\r\n metaOb.ensureObservable();\r\n var conditionTargets = meta.conditions;\r\n conditionTargets.forEach(function (condition) { (0, vue_model_observability_1.preventVueObservability)(condition); });\r\n // Raise property access to let Vue know that array was accessed\r\n // Changes to conditions will result in a Vue change notification for the 'conditions' property\r\n metaOb.onPropertyAccess(\"conditions\", conditionTargets);\r\n var formatErrorConditions = this.formatErrorCondition ? [this.formatErrorCondition] : [];\r\n var property = this.property instanceof model_js_2.Property ? this.property : this.property instanceof model_js_4.PropertyChain ? this.property.lastProperty : null;\r\n if (!property)\r\n return formatErrorConditions;\r\n var conditions = conditionTargets.filter(function (c) { return c.properties.indexOf(property) >= 0; }).map(function (conditionTarget) {\r\n return conditionTarget.condition;\r\n });\r\n conditions = conditions.concat(formatErrorConditions);\r\n conditions = conditions.sort(function (conditionA, conditionB) {\r\n return _this.compare(conditionA, conditionB);\r\n });\r\n return conditions;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"formatError\", {\r\n get: function () {\r\n return this.formatErrorCondition ? this.formatErrorCondition[\"formatError\"] : null;\r\n },\r\n set: function (err) {\r\n if (err) {\r\n (0, vue_model_observability_1.preventVueObservability)(err);\r\n var formatErrorCondition = err.createCondition(this.property.getLastTarget(this.parent.value), this.property.lastProperty);\r\n (0, vue_model_observability_1.preventVueObservability)(formatErrorCondition);\r\n formatErrorCondition[\"formatError\"] = err;\r\n this.formatErrorCondition = formatErrorCondition;\r\n }\r\n else {\r\n this.formatErrorCondition = null;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"invalidValue\", {\r\n get: function () {\r\n if (this.formatError) {\r\n return this.formatError.invalidValue;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"firstError\", {\r\n get: function () {\r\n return this.conditions.length ? this.conditions[0] : null;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"displayValue\", {\r\n get: function () {\r\n if (this.formatError) {\r\n return this.formatError.invalidValue;\r\n }\r\n var value = this.ensureObservable(this.property.value(this.parent.value));\r\n return formatDisplayValue(this, value);\r\n },\r\n set: function (text) {\r\n if ((0, model_js_6.isEntityType)(this.property.propertyType)) {\r\n throw new Error(\"Cannot set displayValue property of Adapters for entity types.\");\r\n }\r\n /// / TODO: Implement auto-reformat?\r\n // var initialValue = text;\r\n var newValue;\r\n var formatter;\r\n if (this.property.format != null) {\r\n formatter = this.property.format;\r\n }\r\n else if ((0, model_js_6.isValueType)(this.property.propertyType) && this.property.propertyType !== String) {\r\n // Try to use the general format by default\r\n formatter = this.property.containingType.model.getFormat(this.property.propertyType, \"G\");\r\n }\r\n if (this.formatError) {\r\n this.parent.value.meta.clearCondition(model_js_7.FormatError.ConditionType); // TODO: This shouldn't do anything...\r\n this.formatError = null;\r\n }\r\n if (formatter) {\r\n newValue = formatter.convertBack(text);\r\n if (newValue instanceof model_js_7.FormatError) {\r\n (0, vue_model_observability_1.preventVueObservability)(newValue);\r\n this.formatError = newValue;\r\n return;\r\n }\r\n }\r\n else if (this.property.propertyType === String && typeof text === \"string\" && text.length === 0) {\r\n // Convert blank string to null\r\n newValue = null;\r\n }\r\n else {\r\n newValue = text;\r\n }\r\n this.value = newValue;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"allowedValuesRule\", {\r\n get: function () {\r\n var property;\r\n if (this.property instanceof model_js_4.PropertyChain) {\r\n property = this.property.lastProperty;\r\n }\r\n else if (this.property instanceof model_js_2.Property) {\r\n property = this.property;\r\n }\r\n var allowedValuesRules = property.rules.filter(function (r) { return r instanceof model_js_3.AllowedValuesRule; });\r\n if (allowedValuesRules.length) {\r\n var allowedValuesRule = allowedValuesRules[0];\r\n (0, vue_model_observability_1.preventVueObservability)(allowedValuesRule);\r\n return allowedValuesRule;\r\n }\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"allowedValues\", {\r\n get: function () {\r\n var allowedValuesRule = this.allowedValuesRule;\r\n if (!allowedValuesRule) {\r\n // If there is no rule, return an empty list\r\n return;\r\n }\r\n var targetObj;\r\n if (this.property instanceof model_js_4.PropertyChain) {\r\n targetObj = this.property.getLastTarget(this.parent.value);\r\n }\r\n else {\r\n targetObj = this.parent.value;\r\n }\r\n // Retrieve the value of allowed values property\r\n var allowedValuesFromRule = allowedValuesRule.values(targetObj);\r\n if (allowedValuesFromRule) {\r\n // Clear our values that are no longer valid\r\n if (!allowedValuesRule.ignoreValidation) {\r\n this.clearInvalidOptions(allowedValuesFromRule);\r\n }\r\n }\r\n else if (!allowedValuesRule.ignoreValidation) {\r\n // Clear out values since the property doesn't currently have any allowed values\r\n this.clearInvalidOptions(null);\r\n }\r\n allowedValuesFromRule.forEach(function (value) {\r\n if (value instanceof model_js_1.Entity) {\r\n (0, vue_model_observability_1.observeEntity)(value).ensureObservable();\r\n }\r\n else if (typeof value === \"object\") {\r\n (0, vue_model_observability_1.preventVueObservability)(value);\r\n }\r\n });\r\n return allowedValuesFromRule;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"options\", {\r\n get: function () {\r\n var _this = this;\r\n // Destroy existing option components\r\n var optionsToDestroy = this.$children.filter(function (c) { return c instanceof source_option_adapter_1.SourceOptionAdapter; });\r\n optionsToDestroy.forEach(function (c) { return c.$destroy(); });\r\n // TODO: preserve option adapters if possible?\r\n var allowedValues = this.allowedValues;\r\n if (!allowedValues && this.property.propertyType === Boolean) {\r\n // Provide true and false as special allowed values for booleans\r\n allowedValues = [true, false];\r\n }\r\n if (!allowedValues) {\r\n return [];\r\n }\r\n // Map the allowed values to option adapters\r\n return allowedValues.map(function (v) { return new source_option_adapter_1.SourceOptionAdapter({ parent: _this, propsData: { value: v } }); });\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourcePathAdapter.prototype, \"items\", {\r\n get: function () {\r\n var items = [];\r\n // Collect existing option components to potentially be destroyed\r\n var existingItemsToDestroy = this.$children.filter(function (c) { return c instanceof source_item_adapter_1.SourceItemAdapter; });\r\n var value = this.value;\r\n if (Array.isArray(value)) {\r\n if ((0, model_js_6.isEntityType)(this.property.propertyType)) {\r\n var existingItemsMap_1 = {};\r\n existingItemsToDestroy.forEach(function (c) {\r\n var adapter = c;\r\n if (!adapter.isOrphaned) {\r\n var key = adapter.value ? adapter.value.meta.id : null;\r\n if (key) {\r\n existingItemsMap_1[key] = adapter;\r\n }\r\n }\r\n });\r\n for (var i = 0; i < value.length; i++) {\r\n var key = value[i].meta.id;\r\n var existingItem = existingItemsMap_1[key];\r\n if (existingItem) {\r\n // Delete the existing item from the map so that it can't be fetched more than once\r\n delete existingItemsMap_1[key];\r\n // Remove the component from the list of items to destroy since we're going to reuse it\r\n var existingItemIndex = existingItemsToDestroy.indexOf(existingItem);\r\n if (existingItemIndex >= 0) {\r\n existingItemsToDestroy.splice(existingItemIndex, 1);\r\n }\r\n // Set the backing storage for the 'index' prop, the internal data should\r\n // already have this value, this just makes the component's state consistent,\r\n // since the inconsistency is just a side-effect of reusing item adapters\r\n var propsData = existingItem.$options.propsData;\r\n propsData.index = i;\r\n // Include the existing item in the return value\r\n items.push(existingItem);\r\n }\r\n else {\r\n // Create a new item adapter\r\n var newItem = new source_item_adapter_1.SourceItemAdapter({ parent: this, propsData: { index: i, parentSource: this } });\r\n // Subscribes to changes to its underlying list source in order to update its index and detect when it becomes orphaned\r\n newItem.subscribeToSourceChanges();\r\n // Include the new item in the return value\r\n items.push(newItem);\r\n }\r\n }\r\n }\r\n }\r\n existingItemsToDestroy.forEach(function (c) { return c.$destroy(); });\r\n return items;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n SourcePathAdapter.prototype.compare = function (conditionTargetA, conditionTargetB) {\r\n if (conditionTargetA[\"formatError\"] instanceof model_js_7.FormatError || conditionTargetB[\"formatError\"] instanceof model_js_7.FormatError) {\r\n return conditionTargetA[\"formatError\"] instanceof model_js_7.FormatError && conditionTargetB[\"formatError\"] instanceof model_js_7.FormatError ? 0 :\r\n conditionTargetA[\"formatError\"] instanceof model_js_7.FormatError ? -1 : 1;\r\n }\r\n else if (conditionTargetA[\"source\"] instanceof model_js_1.RequiredRule || conditionTargetB[\"source\"] instanceof model_js_1.RequiredRule)\r\n return conditionTargetA[\"source\"] instanceof model_js_1.RequiredRule && conditionTargetB[\"source\"] instanceof model_js_1.RequiredRule ? 0 :\r\n conditionTargetA[\"source\"] instanceof model_js_1.RequiredRule ? -1 : 1;\r\n else if (conditionTargetA.type.category === \"Error\" || conditionTargetB.type.category === \"Error\")\r\n return conditionTargetA.type.category === \"Error\" && conditionTargetB.type.category === \"Error\" ? 0 :\r\n conditionTargetA.type.category === \"Error\" ? -1 : 1;\r\n else\r\n return 0;\r\n };\r\n SourcePathAdapter.prototype.clearInvalidOptions = function (allowedValues) {\r\n var property = this.property;\r\n var value = this.value;\r\n if (allowedValues) {\r\n // Remove option values that are no longer valid\r\n if (value instanceof Array) {\r\n var array = value;\r\n array.batchUpdate(function (array) {\r\n // From the `purge()` function in ExoWeb...\r\n for (var i = 0; i < array.length; i++) {\r\n var item = array[i];\r\n if (allowedValues.indexOf(item) < 0) {\r\n array.splice(i--, 1);\r\n }\r\n }\r\n });\r\n }\r\n else if (value !== null && allowedValues.indexOf(value) < 0) {\r\n property.value(this.parent.value, null);\r\n }\r\n }\r\n else if (value instanceof Array) {\r\n value.splice(0, value.length);\r\n }\r\n else if (value !== null) {\r\n property.value(this.parent.value, null);\r\n }\r\n };\r\n SourcePathAdapter.prototype.ensureObservable = function (value) {\r\n if (Array.isArray(value)) {\r\n if (model_js_5.ObservableArray.isObservableArray(value)) {\r\n (0, vue_model_observability_1.observeArray)(value).ensureObservable();\r\n }\r\n for (var i = 0; i < value.length; i++) {\r\n var item = value[i];\r\n if (item instanceof model_js_1.Entity) {\r\n (0, vue_model_observability_1.observeEntity)(item).ensureObservable();\r\n }\r\n }\r\n }\r\n else if (value instanceof model_js_1.Entity) {\r\n (0, vue_model_observability_1.observeEntity)(value).ensureObservable();\r\n }\r\n return value;\r\n };\r\n SourcePathAdapter.prototype.toString = function () {\r\n return \"Source['\" + this.source + \"']\";\r\n };\r\n __decorate([\r\n (0, vue_property_decorator_1.Prop)(String),\r\n __metadata(\"design:type\", String)\r\n ], SourcePathAdapter.prototype, \"source\", void 0);\r\n __decorate([\r\n (0, vue_property_decorator_1.Prop)(Object),\r\n __metadata(\"design:type\", Object)\r\n ], SourcePathAdapter.prototype, \"overrides\", void 0);\r\n SourcePathAdapter = __decorate([\r\n vue_property_decorator_1.Component\r\n ], SourcePathAdapter);\r\n return SourcePathAdapter;\r\n}(vue_1.default));\r\nexports.SourcePathAdapter = SourcePathAdapter;\r\nfunction formatDisplayValue(adapter, value) {\r\n var displayValue;\r\n var property = adapter.property;\r\n if (value === null || value === undefined) {\r\n displayValue = \"\";\r\n }\r\n else if (property.format != null) {\r\n // Use a markup or property format if available\r\n if (Array.isArray(value)) {\r\n var array = value;\r\n displayValue = array.map(function (item) { return property.format.convert(item); });\r\n }\r\n else {\r\n displayValue = property.format.convert(value);\r\n }\r\n }\r\n else if (Array.isArray(value)) {\r\n // If no format exists, then fall back to toString\r\n var array = value;\r\n displayValue = array.map(function (item) {\r\n if (value === null || value === undefined) {\r\n return \"\";\r\n }\r\n else {\r\n return item.toString();\r\n }\r\n });\r\n }\r\n else {\r\n displayValue = value.toString();\r\n }\r\n displayValue = Array.isArray(displayValue) ? displayValue.join(\", \") : displayValue;\r\n return displayValue;\r\n}\r\nexports.formatDisplayValue = formatDisplayValue;\r\n","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.createVueModel = exports.VueModel = void 0;\r\nvar model_js_1 = require(\"@cognitoforms/model.js\"); // eslint-disable-line import/no-duplicates\r\nvar model_js_2 = require(\"@cognitoforms/model.js\"); // eslint-disable-line import/no-duplicates\r\nvar vue_internals_1 = require(\"./vue-internals\");\r\nvar vue_global_mixin_1 = require(\"./vue-global-mixin\");\r\nvar source_path_mixin_1 = require(\"./source-path-mixin\");\r\nvar source_root_mixin_1 = require(\"./source-root-mixin\");\r\nvar vue_model_observability_1 = require(\"./vue-model-observability\");\r\nvar vm_root_component_1 = require(\"./vm-root-component\");\r\nvar vm_source_component_1 = require(\"./vm-source-component\");\r\nvar model_js_3 = require(\"@cognitoforms/model.js\"); // eslint-disable-line import/no-duplicates\r\n// TODO: Do we need to take `toggleObserving()` into account?\r\nvar VueModel = /** @class */ (function (_super) {\r\n __extends(VueModel, _super);\r\n /**\r\n * Creates a new model with the specified type information.\r\n * @param options The set of model types to add.\r\n */\r\n function VueModel(options, config) {\r\n var _this = _super.call(this, options, config) || this;\r\n if (!VueModel._Vue) {\r\n // TODO: auto-install if needed?\r\n throw new Error(\"Vue.use(VueModel) must be called before constructing a VueModel instance.\");\r\n }\r\n // Make sure that the model itself is not made observable by Vue, since anything that we want to be made observable should be made observable explicitly\r\n (0, vue_model_observability_1.preventVueObservability)(_this);\r\n // Make sure that entities are observable by Vue\r\n (0, vue_model_observability_1.makeEntitiesVueObservable)(_this);\r\n return _this;\r\n }\r\n /**\r\n * Implement the Vue plugin interface:\r\n * https://vuejs.org/v2/guide/plugins.html#Writing-a-Plugin\r\n */\r\n VueModel.install = function (vue) {\r\n // Detect if the plugin install has already been called\r\n if (VueModel._Vue)\r\n return;\r\n // Register components globally for use in templates\r\n vue.component(\"vm-root\", vm_root_component_1.VMRoot);\r\n vue.component(\"vm-source\", vm_source_component_1.VMSource);\r\n // Store a reference to the Vue constructor/module\r\n VueModel._Vue = vue;\r\n // Get access to Vue's internal types that we need\r\n (0, vue_internals_1.ensureVueInternalTypes)(VueModel._VueInternals, VueModel._Vue);\r\n // Install the Vue global mixin\r\n return (0, vue_global_mixin_1.VueModel$installGlobalMixin)(vue);\r\n };\r\n VueModel._Vue = null;\r\n VueModel._VueInternals = { Observer: null, Dep: null };\r\n /**\r\n * Provide access to Vue mixins for source provider/consumer\r\n */\r\n VueModel.mixins = {\r\n SourcePath: source_path_mixin_1.SourcePathMixin,\r\n SourceRoot: source_root_mixin_1.SourceRootMixin\r\n };\r\n VueModel.Entity = model_js_2.Entity;\r\n VueModel.CultureInfo = model_js_3.CultureInfo;\r\n return VueModel;\r\n}(model_js_1.Model));\r\nexports.VueModel = VueModel;\r\n// eslint-disable-next-line no-redeclare\r\nfunction createVueModel(options, config) {\r\n return new Promise(function (resolve) {\r\n var model = new VueModel(options, config);\r\n model.ready(function () {\r\n resolve(model);\r\n });\r\n });\r\n}\r\nexports.createVueModel = createVueModel;\r\n","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __metadata = (this && this.__metadata) || function (k, v) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SourcePathMixin = void 0;\r\nvar vue_1 = __importDefault(require(\"vue\"));\r\nvar vue_property_decorator_1 = require(\"vue-property-decorator\");\r\nvar source_adapter_1 = require(\"./source-adapter\");\r\nvar source_path_adapter_1 = require(\"./source-path-adapter\");\r\n// @ts-ignore\r\nvar SourcePathMixin = /** @class */ (function (_super) {\r\n __extends(SourcePathMixin, _super);\r\n function SourcePathMixin() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n SourcePathMixin.prototype.onLabelChanged = function (label) {\r\n this.onOverrideValueChanged(label, String);\r\n };\r\n SourcePathMixin.prototype.onHelptextChanged = function (helptext) {\r\n this.onOverrideValueChanged(helptext, String);\r\n };\r\n SourcePathMixin.prototype.onReadonlyChanged = function (readonly) {\r\n this.onOverrideValueChanged(readonly, Boolean);\r\n };\r\n SourcePathMixin.prototype.onRequiredChanged = function (required) {\r\n this.onOverrideValueChanged(required, Boolean);\r\n };\r\n Object.defineProperty(SourcePathMixin.prototype, \"$source\", {\r\n get: function () {\r\n // If the source is an adapter, then potentially apply overrides, and return it\r\n if ((0, source_adapter_1.isSourceAdapter)(this.source)) {\r\n this.ensureOverridesAppliedToSourceAdapter(this.source);\r\n return this.source;\r\n }\r\n return new source_path_adapter_1.SourcePathAdapter({ parent: this, propsData: { source: this.source, overrides: this } });\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n SourcePathMixin.prototype.ensureOverridesAppliedToSourceAdapter = function (source) {\r\n var hasOverrides = (0, source_adapter_1.hasOverrideValue)(this.label, String) || (0, source_adapter_1.hasOverrideValue)(this.helptext, String) || (0, source_adapter_1.hasOverrideValue)(this.readonly, Boolean) || (0, source_adapter_1.hasOverrideValue)(this.required, Boolean);\r\n if ((0, source_adapter_1.isSourcePathAdapter)(source)) {\r\n if (hasOverrides) {\r\n if (source.overrides && source.overrides !== this) {\r\n throw new Error(\"Overrides have already been applied to source of type '\" + source.constructor.name + \"'.\");\r\n }\r\n // Apply the given overrides as the overrides for the source\r\n source.overrides = this;\r\n }\r\n }\r\n else {\r\n if (hasOverrides) {\r\n throw new Error(\"Cannot apply overrides to source of type '\" + source.constructor.name + \"'.\");\r\n }\r\n }\r\n };\r\n SourcePathMixin.prototype.onOverrideValueChanged = function (value, type) {\r\n // If the source is an adapter, and an override value is set, then ensure that the\r\n if ((0, source_adapter_1.isSourceAdapter)(this.source) && (0, source_adapter_1.hasOverrideValue)(value, type)) {\r\n this.ensureOverridesAppliedToSourceAdapter(this.source);\r\n }\r\n };\r\n __decorate([\r\n (0, vue_property_decorator_1.Prop)({ type: [String, Object] }),\r\n __metadata(\"design:type\", Object)\r\n ], SourcePathMixin.prototype, \"source\", void 0);\r\n __decorate([\r\n (0, vue_property_decorator_1.Prop)(String),\r\n __metadata(\"design:type\", String)\r\n ], SourcePathMixin.prototype, \"label\", void 0);\r\n __decorate([\r\n (0, vue_property_decorator_1.Watch)(\"label\"),\r\n __metadata(\"design:type\", Function),\r\n __metadata(\"design:paramtypes\", [String]),\r\n __metadata(\"design:returntype\", void 0)\r\n ], SourcePathMixin.prototype, \"onLabelChanged\", null);\r\n __decorate([\r\n (0, vue_property_decorator_1.Prop)(String),\r\n __metadata(\"design:type\", String)\r\n ], SourcePathMixin.prototype, \"helptext\", void 0);\r\n __decorate([\r\n (0, vue_property_decorator_1.Watch)(\"helptext\"),\r\n __metadata(\"design:type\", Function),\r\n __metadata(\"design:paramtypes\", [String]),\r\n __metadata(\"design:returntype\", void 0)\r\n ], SourcePathMixin.prototype, \"onHelptextChanged\", null);\r\n __decorate([\r\n (0, vue_property_decorator_1.Prop)({ type: Boolean, default: null }),\r\n __metadata(\"design:type\", Boolean)\r\n ], SourcePathMixin.prototype, \"readonly\", void 0);\r\n __decorate([\r\n (0, vue_property_decorator_1.Watch)(\"readonly\"),\r\n __metadata(\"design:type\", Function),\r\n __metadata(\"design:paramtypes\", [Boolean]),\r\n __metadata(\"design:returntype\", void 0)\r\n ], SourcePathMixin.prototype, \"onReadonlyChanged\", null);\r\n __decorate([\r\n (0, vue_property_decorator_1.Prop)({ type: Boolean, default: null }),\r\n __metadata(\"design:type\", Boolean)\r\n ], SourcePathMixin.prototype, \"required\", void 0);\r\n __decorate([\r\n (0, vue_property_decorator_1.Watch)(\"required\"),\r\n __metadata(\"design:type\", Function),\r\n __metadata(\"design:paramtypes\", [Boolean]),\r\n __metadata(\"design:returntype\", void 0)\r\n ], SourcePathMixin.prototype, \"onRequiredChanged\", null);\r\n SourcePathMixin = __decorate([\r\n vue_property_decorator_1.Component\r\n ], SourcePathMixin);\r\n return SourcePathMixin;\r\n}(vue_1.default));\r\nexports.SourcePathMixin = SourcePathMixin;\r\n","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __metadata = (this && this.__metadata) || function (k, v) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SourceRootAdapter = void 0;\r\nvar vue_1 = __importDefault(require(\"vue\"));\r\nvar vue_property_decorator_1 = require(\"vue-property-decorator\");\r\n// @ts-ignore\r\nvar SourceRootAdapter = /** @class */ (function (_super) {\r\n __extends(SourceRootAdapter, _super);\r\n function SourceRootAdapter() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n _this.readonly = false;\r\n return _this;\r\n }\r\n Object.defineProperty(SourceRootAdapter.prototype, \"value\", {\r\n get: function () {\r\n return this.entity;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourceRootAdapter.prototype, \"type\", {\r\n get: function () {\r\n return this.entity.meta.type.jstype;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourceRootAdapter.prototype, \"isList\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourceRootAdapter.prototype, \"displayValue\", {\r\n get: function () {\r\n return this.entity.toString();\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n SourceRootAdapter.prototype.toString = function () {\r\n return this.entity.meta.type.fullName + \"|\" + this.entity.meta.id;\r\n };\r\n __decorate([\r\n (0, vue_property_decorator_1.Prop)(Object),\r\n __metadata(\"design:type\", Object)\r\n ], SourceRootAdapter.prototype, \"entity\", void 0);\r\n SourceRootAdapter = __decorate([\r\n vue_property_decorator_1.Component\r\n ], SourceRootAdapter);\r\n return SourceRootAdapter;\r\n}(vue_1.default));\r\nexports.SourceRootAdapter = SourceRootAdapter;\r\n","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __metadata = (this && this.__metadata) || function (k, v) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SourceItemAdapter = void 0;\r\nvar vue_1 = __importDefault(require(\"vue\"));\r\nvar vue_property_decorator_1 = require(\"vue-property-decorator\");\r\nvar source_adapter_1 = require(\"./source-adapter\");\r\nvar model_js_1 = require(\"@cognitoforms/model.js\"); // eslint-disable-line import/no-duplicates\r\nvar helpers_1 = require(\"./helpers\");\r\n// @ts-ignore\r\nvar SourceItemAdapter = /** @class */ (function (_super) {\r\n __extends(SourceItemAdapter, _super);\r\n function SourceItemAdapter() {\r\n var _this_1 = _super !== null && _super.apply(this, arguments) || this;\r\n _this_1.isOrphaned = false;\r\n _this_1.internalIndex = -1;\r\n _this_1.isSubscribedToSourceChanges = false;\r\n return _this_1;\r\n }\r\n SourceItemAdapter.prototype.created = function () {\r\n // Track the intial index internally\r\n this.internalIndex = this.index;\r\n // Track changes to the list and update the component's state appropriately\r\n if (!this.suppressChangeTracking) {\r\n this.subscribeToSourceChanges();\r\n }\r\n };\r\n SourceItemAdapter.prototype.onIndexChanged = function (index) {\r\n this.internalIndex = index;\r\n };\r\n Object.defineProperty(SourceItemAdapter.prototype, \"parent\", {\r\n get: function () {\r\n if ((0, source_adapter_1.isSourceAdapter)(this.parentSource)) {\r\n return this.parentSource;\r\n }\r\n for (var parentVm = this.$parent.$parent, parentLevel = 1; parentVm != null; parentVm = parentVm.$parent, parentLevel += 1) {\r\n if ((0, source_adapter_1.isSourceAdapter)(parentVm.$source)) {\r\n return parentVm.$source;\r\n }\r\n }\r\n throw new Error(\"Parent source not found!\");\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourceItemAdapter.prototype, \"readonly\", {\r\n /**\r\n * Indicants whether the source property is readonly.\r\n *\r\n * @returns True if either the parent source or the source override is read only, otherwise false\r\n */\r\n get: function () {\r\n return this.parent.readonly || (this.overrides ? this.overrides.readonly : false);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n SourceItemAdapter.prototype.subscribeToSourceChanges = function () {\r\n if (this.isSubscribedToSourceChanges) {\r\n return;\r\n }\r\n var _this = this;\r\n var array = model_js_1.ObservableArray.ensureObservable(this.parent.value);\r\n array.changed.subscribe(function (args) {\r\n var index = _this.internalIndex;\r\n var isOrphaned = _this.isOrphaned;\r\n args.changes.forEach(function (c) {\r\n if (c.type === model_js_1.ArrayChangeType.remove) {\r\n if (c.startIndex === index) {\r\n index = -1;\r\n isOrphaned = true;\r\n }\r\n else if (c.startIndex < index) {\r\n if (c.items.length > index - c.startIndex) {\r\n index = -1;\r\n isOrphaned = true;\r\n }\r\n else {\r\n index -= c.items.length;\r\n }\r\n }\r\n }\r\n else if (c.type === model_js_1.ArrayChangeType.add) {\r\n if (c.startIndex >= 0) {\r\n if (c.startIndex <= index) {\r\n index += c.items.length;\r\n }\r\n }\r\n }\r\n });\r\n if (isOrphaned !== _this.isOrphaned) {\r\n vue_1.default.set(_this, \"isOrphaned\", isOrphaned);\r\n }\r\n if (index !== _this.internalIndex) {\r\n vue_1.default.set(_this, \"internalIndex\", index);\r\n }\r\n });\r\n this.isSubscribedToSourceChanges = true;\r\n };\r\n Object.defineProperty(SourceItemAdapter.prototype, \"value\", {\r\n get: function () {\r\n var list = this.parent.value;\r\n var value = list[this.internalIndex];\r\n return value;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourceItemAdapter.prototype, \"type\", {\r\n get: function () {\r\n // If possible, determine the type based on the actual entity instance\r\n if (this.value && (0, helpers_1.isEntity)(this.value))\r\n return this.value.meta.type.jstype;\r\n return this.parent.type;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourceItemAdapter.prototype, \"isList\", {\r\n get: function () {\r\n return false;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourceItemAdapter.prototype, \"displayValue\", {\r\n get: function () {\r\n var list = this.parent.value;\r\n var value = list[this.internalIndex];\r\n var displayValue;\r\n if ((0, source_adapter_1.isSourcePropertyAdapter)(this.parent) && this.parent.property.format != null) {\r\n // Use a markup or property format if available\r\n displayValue = this.parent.property.format.convert(value);\r\n }\r\n else {\r\n displayValue = value.toString();\r\n }\r\n return displayValue;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n SourceItemAdapter.prototype.toString = function () {\r\n return \"Source[\" + this.internalIndex + \"]\";\r\n };\r\n __decorate([\r\n (0, vue_property_decorator_1.Prop)(Number),\r\n __metadata(\"design:type\", Number)\r\n ], SourceItemAdapter.prototype, \"index\", void 0);\r\n __decorate([\r\n (0, vue_property_decorator_1.Prop)(Object),\r\n __metadata(\"design:type\", Object)\r\n ], SourceItemAdapter.prototype, \"parentSource\", void 0);\r\n __decorate([\r\n (0, vue_property_decorator_1.Prop)(Object),\r\n __metadata(\"design:type\", Object)\r\n ], SourceItemAdapter.prototype, \"overrides\", void 0);\r\n __decorate([\r\n (0, vue_property_decorator_1.Prop)({ type: Boolean, default: false }),\r\n __metadata(\"design:type\", Boolean)\r\n ], SourceItemAdapter.prototype, \"suppressChangeTracking\", void 0);\r\n __decorate([\r\n (0, vue_property_decorator_1.Watch)(\"index\"),\r\n __metadata(\"design:type\", Function),\r\n __metadata(\"design:paramtypes\", [Number]),\r\n __metadata(\"design:returntype\", void 0)\r\n ], SourceItemAdapter.prototype, \"onIndexChanged\", null);\r\n SourceItemAdapter = __decorate([\r\n vue_property_decorator_1.Component\r\n ], SourceItemAdapter);\r\n return SourceItemAdapter;\r\n}(vue_1.default));\r\nexports.SourceItemAdapter = SourceItemAdapter;\r\n","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __metadata = (this && this.__metadata) || function (k, v) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SourceRootMixin = void 0;\r\nvar vue_1 = __importDefault(require(\"vue\"));\r\nvar vue_property_decorator_1 = require(\"vue-property-decorator\");\r\nvar model_js_1 = require(\"@cognitoforms/model.js\");\r\nvar source_root_adapter_1 = require(\"./source-root-adapter\");\r\nvar vue_model_observability_1 = require(\"./vue-model-observability\");\r\n// @ts-ignore\r\nvar SourceRootMixin = /** @class */ (function (_super) {\r\n __extends(SourceRootMixin, _super);\r\n function SourceRootMixin() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n SourceRootMixin.prototype.onReadonlyChanged = function (readonly) {\r\n this.$source.readonly = readonly;\r\n };\r\n Object.defineProperty(SourceRootMixin.prototype, \"$source\", {\r\n get: function () {\r\n var entity;\r\n if (this.source instanceof model_js_1.Entity) {\r\n entity = this.source;\r\n }\r\n else {\r\n entity = this[this.source || \"entity\"];\r\n if (!entity || !(entity instanceof model_js_1.Entity)) {\r\n throw new Error(\"No entity data!\");\r\n }\r\n }\r\n (0, vue_model_observability_1.observeEntity)(entity).ensureObservable();\r\n return new source_root_adapter_1.SourceRootAdapter({ parent: this, propsData: { entity: entity } });\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n __decorate([\r\n (0, vue_property_decorator_1.Prop)({ type: [Object, String] }),\r\n __metadata(\"design:type\", Object)\r\n ], SourceRootMixin.prototype, \"source\", void 0);\r\n __decorate([\r\n (0, vue_property_decorator_1.Prop)({ type: Boolean, default: null }),\r\n __metadata(\"design:type\", Boolean)\r\n ], SourceRootMixin.prototype, \"readonly\", void 0);\r\n __decorate([\r\n (0, vue_property_decorator_1.Watch)(\"readonly\"),\r\n __metadata(\"design:type\", Function),\r\n __metadata(\"design:paramtypes\", [Boolean]),\r\n __metadata(\"design:returntype\", void 0)\r\n ], SourceRootMixin.prototype, \"onReadonlyChanged\", null);\r\n SourceRootMixin = __decorate([\r\n vue_property_decorator_1.Component\r\n ], SourceRootMixin);\r\n return SourceRootMixin;\r\n}(vue_1.default));\r\nexports.SourceRootMixin = SourceRootMixin;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ensureVueInternalTypes = exports.VueModel$Vue = void 0;\r\nexports.VueModel$Vue = null;\r\nfunction ensureVueInternalTypes(target, Vue) {\r\n // Exit early if Observer or Dep are already defined\r\n if (target.Observer || target.Dep) {\r\n return;\r\n }\r\n var observableData;\r\n if (Vue.observable) {\r\n observableData = Vue.observable({});\r\n }\r\n else {\r\n var component = new Vue({\r\n data: function () {\r\n return {};\r\n }\r\n });\r\n observableData = component.$data;\r\n }\r\n var observer = observableData.__ob__;\r\n var observerCtor = observer.constructor;\r\n var depCtor = observer.dep.constructor;\r\n target.Observer = observerCtor;\r\n target.Dep = depCtor;\r\n}\r\nexports.ensureVueInternalTypes = ensureVueInternalTypes;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.VueModel$installGlobalMixin = void 0;\r\nvar model_js_1 = require(\"@cognitoforms/model.js\");\r\nvar helpers_1 = require(\"./helpers\");\r\nvar vue_helpers_1 = require(\"./vue-helpers\");\r\nvar vue_model_observability_1 = require(\"./vue-model-observability\");\r\n/**\r\n * Installs a global Vue mixin that hooks into component events to intercept model entities as component data and make necesary adjustments\r\n * @param Vue The Vue constructor/module object\r\n */\r\nfunction VueModel$installGlobalMixin(Vue) {\r\n Vue.mixin({\r\n beforeCreate: function VueModel$Plugin$beforeCreate() {\r\n var vm = this;\r\n if (vm.$options.data) {\r\n // Intercept data that is an entity or data function that returns an entity\r\n // so that this plugin can make the entity observable and create proxy properties\r\n preprocessDataToInterceptEntities(vm);\r\n }\r\n },\r\n created: function VueModel$Plugin$created() {\r\n var vm = this;\r\n var vm$private = vm;\r\n if (vm$private._entity) {\r\n var entity = vm$private._entity;\r\n if (!entity.meta.type.model._entitiesAreVueObservable) {\r\n // Ensure that Model entities are observable objects compatible with Vue's observer\r\n (0, vue_model_observability_1.makeEntitiesVueObservable)(vm$private._entity.meta.type.model);\r\n }\r\n (0, vue_model_observability_1.getEntityObserver)(vm$private._entity, true).ensureObservable();\r\n // Restore the data by attempting to emulate what would have happened to\r\n // the `data` object had it gone through normal component intialization\r\n restoreComponentEntityData(vm);\r\n }\r\n }\r\n });\r\n}\r\nexports.VueModel$installGlobalMixin = VueModel$installGlobalMixin;\r\nfunction replaceEntityData(vm, data) {\r\n var vm$private = vm;\r\n if (data != null && data instanceof model_js_1.Entity) {\r\n (0, helpers_1.debug)(\"Data is an entity, returning empty object...\");\r\n vm$private._entity = data;\r\n return {};\r\n }\r\n return data;\r\n}\r\nfunction preprocessDataToInterceptEntities(vm) {\r\n if (!vm.$options.data) {\r\n return;\r\n }\r\n if (vm.$options.data instanceof Function) {\r\n // The `.data` options is a function that will be invoked by Vue, so wrap it\r\n // to prevent Vue from getting an Entity prior to setting up Entity observability\r\n (0, helpers_1.debug)(\"Data is a function...wrapping to intercept the return value...\");\r\n var dataFn = vm.$options.data;\r\n vm.$options.data = function () {\r\n return replaceEntityData(vm, dataFn.apply(this, arguments));\r\n };\r\n }\r\n else {\r\n // Don't let Vue from getting an Entity prior to setting up Entity observability\r\n vm.$options.data = replaceEntityData(vm, vm.$options.data);\r\n }\r\n}\r\nfunction restoreComponentEntityData(vm) {\r\n var vm$private = vm;\r\n // Since the entity is now observable, go ahead and let the component see it\r\n // TODO: Is it necessary to somehow \"merge\" the object? Or, just not set the data\r\n // field since we're going to do custom proxying of properties anyway?\r\n vm$private._data = vm$private._entity;\r\n // Vue proxies the data objects `Object.keys()` onto the component itself,\r\n // so that the data objects properties can be used directly in templates\r\n proxyEntityPropertiesOntoComponentInstance(vm, vm$private._entity);\r\n // The internal `observe()` method basically makes the given object observable,\r\n // (entities should already be at this point) but it also updates a `vmCount` counter\r\n (0, vue_model_observability_1.observeEntity)(vm$private._entity, true).ensureObservable();\r\n // Null out the field now that we've finished preparing the entity\r\n vm$private._entity = null;\r\n}\r\nfunction proxyEntityPropertiesOntoComponentInstance(vm, entity) {\r\n // TODO: add proxies onto the component instance\r\n // proxy data on instance\r\n var properties = entity.meta.type.properties;\r\n var props = vm.$options.props;\r\n var methods = vm.$options.methods;\r\n for (var i = 0; i < properties.length; i++) {\r\n var property = properties[i];\r\n if (methods && (0, helpers_1.hasOwnProperty)(methods, property.name)) {\r\n (0, helpers_1.debug)(\"Property '\" + property.name + \"' is hidden by a component method with the same name.\");\r\n }\r\n else if (props && (0, helpers_1.hasOwnProperty)(props, property.name)) {\r\n (0, helpers_1.debug)(\"Property '\" + property.name + \"' is hidden by a component prop with the same name.\");\r\n }\r\n else if (!(0, vue_helpers_1.Vue$isReserved)(property.name)) {\r\n (0, vue_helpers_1.Vue$proxy)(vm, \"_data\", property.name);\r\n }\r\n }\r\n}\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Vue$proxy = exports.Vue$dependArray = exports.Vue$isReserved = void 0;\r\nfunction Vue$isReserved(str) {\r\n var c = (str + \"\").charCodeAt(0);\r\n return c === 0x24 || c === 0x5F;\r\n}\r\nexports.Vue$isReserved = Vue$isReserved;\r\nfunction Vue$dependArray(value) {\r\n for (var e, i = 0, l = value.length; i < l; i++) {\r\n e = value[i];\r\n e && e.__ob__ && e.__ob__.dep.depend();\r\n if (Array.isArray(e)) {\r\n Vue$dependArray(e);\r\n }\r\n }\r\n}\r\nexports.Vue$dependArray = Vue$dependArray;\r\nfunction Vue$proxy(target, sourceKey, key) {\r\n Object.defineProperty(target, key, {\r\n configurable: true,\r\n enumerable: true,\r\n get: function VueModel$proxyPropertyGet() {\r\n return this[sourceKey][key];\r\n },\r\n set: function VueModel$proxyPropertySet(value) {\r\n this[sourceKey][key] = value;\r\n }\r\n });\r\n}\r\nexports.Vue$proxy = Vue$proxy;\r\n","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.EntityObserver = void 0;\r\nvar custom_observer_1 = require(\"./custom-observer\");\r\nvar vue_model_observability_1 = require(\"./vue-model-observability\");\r\n/**\r\n * A subclass of Vue's internal `Observer` class for entities, which uses model\r\n * metadata to manage property access/change rather than property walking and rewriting\r\n */\r\nvar EntityObserver = /** @class */ (function (_super) {\r\n __extends(EntityObserver, _super);\r\n function EntityObserver(value, shallow, mock) {\r\n if (shallow === void 0) { shallow = false; }\r\n if (mock === void 0) { mock = false; }\r\n return _super.call(this, value, shallow, mock) || this;\r\n }\r\n EntityObserver.prototype.ensureObservable = function () {\r\n if (this._observable === true) {\r\n return;\r\n }\r\n this.value.accessed.subscribe(this._onAccess.bind(this));\r\n this.value.changed.subscribe(this._onChange.bind(this));\r\n if (this.value.meta) {\r\n (0, vue_model_observability_1.getObjectMetaObserver)(this.value.meta).ensureObservable();\r\n }\r\n this._observable = true;\r\n };\r\n EntityObserver.prototype._onAccess = function (args) {\r\n // Get the current property value\r\n var value = args.entity.__fields__[args.property.name];\r\n // Notify interested observers of the property access in order to track dependencies\r\n this.onPropertyAccess(args.property.name, value);\r\n };\r\n EntityObserver.prototype._onChange = function (args) {\r\n // Get the current property value\r\n var newValue = args.entity.__fields__[args.property.name];\r\n // Notify interested observers of the property change\r\n this.onPropertyChange(args.property.name, newValue);\r\n };\r\n return EntityObserver;\r\n}(custom_observer_1.CustomObserver));\r\nexports.EntityObserver = EntityObserver;\r\n","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ObjectMetaObserver = void 0;\r\nvar custom_observer_1 = require(\"./custom-observer\");\r\n/**\r\n * A subclass of Vue's internal `Observer` class for entity meta objects, which uses model\r\n * metadata to manage condition change rather than property walking and rewriting\r\n */\r\nvar ObjectMetaObserver = /** @class */ (function (_super) {\r\n __extends(ObjectMetaObserver, _super);\r\n function ObjectMetaObserver(value, shallow, mock) {\r\n if (shallow === void 0) { shallow = false; }\r\n if (mock === void 0) { mock = false; }\r\n return _super.call(this, value, shallow, mock) || this;\r\n }\r\n ObjectMetaObserver.prototype.ensureObservable = function () {\r\n if (this._observable === true) {\r\n return;\r\n }\r\n this.value.conditions.changed.subscribe(this._onConditionsChanged.bind(this));\r\n this._observable = true;\r\n };\r\n ObjectMetaObserver.prototype._onConditionsChanged = function () {\r\n // Notify interested observers of the condition change in order to update dependants\r\n this.onPropertyChange(\"conditions\", null);\r\n };\r\n return ObjectMetaObserver;\r\n}(custom_observer_1.CustomObserver));\r\nexports.ObjectMetaObserver = ObjectMetaObserver;\r\n","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ArrayObserver = void 0;\r\nvar custom_observer_1 = require(\"./custom-observer\");\r\n/**\r\n * A subclass of Vue's internal `Observer` class for arrays, which uses observable\r\n * array events rather than property walking and rewriting\r\n */\r\nvar ArrayObserver = /** @class */ (function (_super) {\r\n __extends(ArrayObserver, _super);\r\n function ArrayObserver(value, shallow, mock) {\r\n if (shallow === void 0) { shallow = false; }\r\n if (mock === void 0) { mock = false; }\r\n return _super.call(this, value, shallow, mock) || this;\r\n }\r\n ArrayObserver.prototype.ensureObservable = function () {\r\n if (this._observable === true) {\r\n return;\r\n }\r\n this.value.changed.subscribe(this._onChange.bind(this));\r\n this._observable = true;\r\n };\r\n ArrayObserver.prototype._onChange = function () {\r\n this.dep.notify();\r\n };\r\n return ArrayObserver;\r\n}(custom_observer_1.CustomObserver));\r\nexports.ArrayObserver = ArrayObserver;\r\n","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __metadata = (this && this.__metadata) || function (k, v) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SourceOptionAdapter = void 0;\r\nvar vue_1 = __importDefault(require(\"vue\"));\r\nvar vue_property_decorator_1 = require(\"vue-property-decorator\");\r\nvar source_adapter_1 = require(\"./source-adapter\");\r\nvar source_path_adapter_1 = require(\"./source-path-adapter\");\r\n// @ts-ignore\r\nvar SourceOptionAdapter = /** @class */ (function (_super) {\r\n __extends(SourceOptionAdapter, _super);\r\n function SourceOptionAdapter() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Object.defineProperty(SourceOptionAdapter.prototype, \"parent\", {\r\n get: function () {\r\n for (var parentVm = this.$parent.$parent, parentLevel = 1; parentVm != null; parentVm = parentVm.$parent, parentLevel += 1) {\r\n if ((0, source_adapter_1.isSourcePropertyAdapter)(parentVm.$source)) {\r\n return parentVm.$source;\r\n }\r\n }\r\n throw new Error(\"Parent source not found!\");\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourceOptionAdapter.prototype, \"label\", {\r\n get: function () {\r\n return this.parent.label;\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n Object.defineProperty(SourceOptionAdapter.prototype, \"displayValue\", {\r\n get: function () {\r\n return (0, source_path_adapter_1.formatDisplayValue)(this.parent, this.value);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n SourceOptionAdapter.prototype.toString = function () {\r\n return \"Option for Source['\" + this.parent.property.path + \"']\";\r\n };\r\n __decorate([\r\n (0, vue_property_decorator_1.Prop)(),\r\n __metadata(\"design:type\", Object)\r\n ], SourceOptionAdapter.prototype, \"value\", void 0);\r\n SourceOptionAdapter = __decorate([\r\n vue_property_decorator_1.Component\r\n ], SourceOptionAdapter);\r\n return SourceOptionAdapter;\r\n}(vue_1.default));\r\nexports.SourceOptionAdapter = SourceOptionAdapter;\r\n","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.VMRoot = void 0;\r\nvar vue_property_decorator_1 = require(\"vue-property-decorator\");\r\nvar vue_class_component_1 = require(\"vue-class-component\");\r\nvar source_root_mixin_1 = require(\"./source-root-mixin\");\r\n// @ts-ignore\r\nvar VMRoot = /** @class */ (function (_super) {\r\n __extends(VMRoot, _super);\r\n function VMRoot() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n VMRoot.prototype.render = function () {\r\n var slotNodes = this.$scopedSlots.default({\r\n $source: this.$source\r\n });\r\n if (slotNodes.length !== 1) {\r\n throw new Error(\"Found \" + slotNodes.length + \" nodes in default slot for component 'vm-root'.\");\r\n }\r\n return slotNodes[0];\r\n };\r\n VMRoot = __decorate([\r\n vue_property_decorator_1.Component\r\n ], VMRoot);\r\n return VMRoot;\r\n}((0, vue_class_component_1.mixins)(source_root_mixin_1.SourceRootMixin)));\r\nexports.VMRoot = VMRoot;\r\n","\"use strict\";\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.VMSource = void 0;\r\nvar vue_property_decorator_1 = require(\"vue-property-decorator\");\r\nvar vue_class_component_1 = require(\"vue-class-component\");\r\nvar source_path_mixin_1 = require(\"./source-path-mixin\");\r\n// @ts-ignore\r\nvar VMSource = /** @class */ (function (_super) {\r\n __extends(VMSource, _super);\r\n function VMSource() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n VMSource.prototype.render = function () {\r\n var slotNodes = this.$scopedSlots.default({\r\n $source: this.$source\r\n });\r\n if (slotNodes.length !== 1) {\r\n throw new Error(\"Found \" + slotNodes.length + \" nodes in default slot for component 'vm-source'.\");\r\n }\r\n return slotNodes[0];\r\n };\r\n VMSource = __decorate([\r\n vue_property_decorator_1.Component\r\n ], VMSource);\r\n return VMSource;\r\n}((0, vue_class_component_1.mixins)(source_path_mixin_1.SourcePathMixin)));\r\nexports.VMSource = VMSource;\r\n"],"sourceRoot":""}