Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@glimmer/object-reference

Package Overview
Dependencies
Maintainers
11
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@glimmer/object-reference - npm Package Compare versions

Comparing version 0.47.9 to 0.48.0

626

dist/amd/es5/glimmer-object-reference.js
define('@glimmer/object-reference', ['exports', '@glimmer/util', '@glimmer/validator', '@glimmer/reference'], function (exports, util, validator, reference) { 'use strict';
function EMPTY_CACHE() {}
function EMPTY_CACHE() {}
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var PathReference =
/*#__PURE__*/
function () {
function PathReference(parent, property) {
this.cache = EMPTY_CACHE;
this.inner = null;
this.chains = null;
this.lastParentValue = EMPTY_CACHE;
this._guid = 0;
this.tag = validator.CURRENT_TAG;
this.parent = parent;
this.property = property;
}
var PathReference = function () {
function PathReference(parent, property) {
_classCallCheck(this, PathReference);
var _proto = PathReference.prototype;
this.cache = EMPTY_CACHE;
this.inner = null;
this.chains = null;
this.lastParentValue = EMPTY_CACHE;
this._guid = 0;
this.tag = validator.CURRENT_TAG;
this.parent = parent;
this.property = property;
}
_proto.value = function value() {
var lastParentValue = this.lastParentValue,
property = this.property,
inner = this.inner;
PathReference.prototype.value = function value() {
var lastParentValue = this.lastParentValue,
property = this.property,
inner = this.inner;
var parentValue = this._parentValue();
var parentValue = this._parentValue();
if (parentValue === null || parentValue === undefined) {
return this.cache = undefined;
}
if (lastParentValue === parentValue) {
inner = this.inner;
} else {
var ReferenceType = typeof parentValue === 'object' ? Meta.for(parentValue).referenceTypeFor(property) : PropertyReference;
inner = this.inner = new ReferenceType(parentValue, property, this);
}
// if (typeof parentValue === 'object') {
// Meta.for(parentValue).addReference(property, this);
// }
return this.cache = inner.value();
};
if (parentValue === null || parentValue === undefined) {
return this.cache = undefined;
}
PathReference.prototype.get = function get(prop) {
var chains = this._getChains();
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
};
if (lastParentValue === parentValue) {
inner = this.inner;
} else {
var ReferenceType = typeof parentValue === 'object' ? Meta["for"](parentValue).referenceTypeFor(property) : PropertyReference;
inner = this.inner = new ReferenceType(parentValue, property, this);
} // if (typeof parentValue === 'object') {
// Meta.for(parentValue).addReference(property, this);
// }
PathReference.prototype.label = function label() {
return '[reference Direct]';
};
PathReference.prototype._getChains = function _getChains() {
if (this.chains) return this.chains;
return this.chains = util.dict();
};
return this.cache = inner.value();
};
PathReference.prototype._parentValue = function _parentValue() {
var parent = this.parent.value();
this.lastParentValue = parent;
return parent;
};
_proto.get = function get(prop) {
var chains = this._getChains();
return PathReference;
}();
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
};
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
_proto.label = function label() {
return '[reference Direct]';
};
var RootReference = function () {
function RootReference(object) {
_classCallCheck$1(this, RootReference);
_proto._getChains = function _getChains() {
if (this.chains) return this.chains;
return this.chains = util.dict();
};
this.chains = util.dict();
this.tag = validator.CURRENT_TAG;
this.object = object;
}
_proto._parentValue = function _parentValue() {
var parent = this.parent.value();
this.lastParentValue = parent;
return parent;
};
RootReference.prototype.value = function value() {
return this.object;
};
return PathReference;
}();
RootReference.prototype.update = function update(object) {
this.object = object;
validator.bump();
};
var RootReference =
/*#__PURE__*/
function () {
function RootReference(object) {
this.chains = util.dict();
this.tag = validator.CURRENT_TAG;
this.object = object;
}
RootReference.prototype.get = function get(prop) {
var chains = this.chains;
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
};
var _proto = RootReference.prototype;
RootReference.prototype.chainFor = function chainFor(prop) {
var chains = this.chains;
if (prop in chains) return chains[prop];
return null;
};
_proto.value = function value() {
return this.object;
};
RootReference.prototype.path = function path(string) {
return this.referenceFromParts(string.split('.'));
};
_proto.update = function update(object) {
this.object = object;
validator.bump();
};
RootReference.prototype.referenceFromParts = function referenceFromParts(parts) {
return parts.reduce(function (ref, part) {
return ref.get(part);
}, this);
};
_proto.get = function get(prop) {
var chains = this.chains;
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
};
RootReference.prototype.label = function label() {
return '[reference Root]';
};
_proto.chainFor = function chainFor(prop) {
var chains = this.chains;
if (prop in chains) return chains[prop];
return null;
};
return RootReference;
}();
_proto.path = function path(string) {
return this.referenceFromParts(string.split('.'));
};
function State(object) {
return new RootReference(object);
_proto.referenceFromParts = function referenceFromParts(parts) {
return parts.reduce(function (ref, part) {
return ref.get(part);
}, this);
};
_proto.label = function label() {
return '[reference Root]';
};
return RootReference;
}();
function State(object) {
return new RootReference(object);
}
var NOOP_DESTROY = {
destroy: function destroy() {}
};
var ConstPath =
/*#__PURE__*/
function () {
function ConstPath(parent, property) {
this.parent = parent;
this.property = property;
this.tag = validator.CURRENT_TAG;
this.parent = parent;
}
function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var NOOP_DESTROY = {
destroy: function destroy() {}
var _proto = ConstPath.prototype;
_proto.chain = function chain() {
return NOOP_DESTROY;
};
var ConstPath = function () {
function ConstPath(parent, property) {
_classCallCheck$2(this, ConstPath);
_proto.notify = function notify() {};
this.parent = parent;
this.property = property;
this.tag = validator.CURRENT_TAG;
this.parent = parent;
}
_proto.value = function value() {
return this.parent[this.property];
};
ConstPath.prototype.chain = function chain() {
return NOOP_DESTROY;
};
_proto.get = function get(prop) {
return new ConstPath(this.parent[this.property], prop);
};
ConstPath.prototype.notify = function notify() {};
return ConstPath;
}();
ConstPath.prototype.value = function value() {
return this.parent[this.property];
};
var ConstRoot =
/*#__PURE__*/
function () {
function ConstRoot(value) {
this.tag = validator.CURRENT_TAG;
this.inner = value;
}
ConstPath.prototype.get = function get(prop) {
return new ConstPath(this.parent[this.property], prop);
};
var _proto2 = ConstRoot.prototype;
return ConstPath;
}();
_proto2.update = function update(inner) {
this.inner = inner;
};
var ConstRoot = function () {
function ConstRoot(value) {
_classCallCheck$2(this, ConstRoot);
_proto2.chain = function chain() {
return NOOP_DESTROY;
};
this.tag = validator.CURRENT_TAG;
this.inner = value;
}
_proto2.notify = function notify() {};
ConstRoot.prototype.update = function update(inner) {
this.inner = inner;
};
_proto2.value = function value() {
return this.inner;
};
ConstRoot.prototype.chain = function chain() {
return NOOP_DESTROY;
};
_proto2.referenceFromParts = function referenceFromParts(_parts) {
throw new Error('Not implemented');
};
ConstRoot.prototype.notify = function notify() {};
_proto2.chainFor = function chainFor(_prop) {
throw new Error('Not implemented');
};
ConstRoot.prototype.value = function value() {
return this.inner;
};
_proto2.get = function get(prop) {
return new ConstPath(this.inner, prop);
};
ConstRoot.prototype.referenceFromParts = function referenceFromParts(_parts) {
throw new Error('Not implemented');
};
return ConstRoot;
}();
ConstRoot.prototype.chainFor = function chainFor(_prop) {
throw new Error('Not implemented');
};
var ConstMeta
/*implements IMeta*/
=
/*#__PURE__*/
function () {
function ConstMeta(object) {
this.object = object;
}
ConstRoot.prototype.get = function get(prop) {
return new ConstPath(this.inner, prop);
};
var _proto3 = ConstMeta.prototype;
return ConstRoot;
}();
_proto3.root = function root() {
return new ConstRoot(this.object);
};
var ConstMeta /*implements IMeta*/ = function () {
function ConstMeta(object) {
_classCallCheck$2(this, ConstMeta);
return ConstMeta;
}();
this.object = object;
}
var CLASS_META = util.symbol('CLASS_META');
var hasOwnProperty = Object.hasOwnProperty;
ConstMeta.prototype.root = function root() {
return new ConstRoot(this.object);
};
var Meta =
/*#__PURE__*/
function () {
function Meta(object, _ref) {
var RootReferenceFactory = _ref.RootReferenceFactory;
this.references = null;
this.slots = null;
this.referenceTypes = null;
this.propertyMetadata = null;
this.object = object;
this.RootReferenceFactory = RootReferenceFactory || RootReference;
}
return ConstMeta;
}();
Meta["for"] = function _for(obj) {
if (obj === null || obj === undefined) return new Meta(obj, {});
if (hasOwnProperty.call(obj, '_meta') && obj._meta) return obj._meta;
if (!Object.isExtensible(obj)) return new ConstMeta(obj);
var MetaToUse = Meta;
var CLASS_META = util.symbol('CLASS_META');
var hasOwnProperty = Object.hasOwnProperty;
if (obj.constructor && obj.constructor[CLASS_META]) {
var classMeta = obj.constructor[CLASS_META];
MetaToUse = classMeta.InstanceMetaConstructor;
} else if (obj[CLASS_META]) {
MetaToUse = obj[CLASS_META].InstanceMetaConstructor;
}
var Meta = function () {
function Meta(object, _ref) {
var RootReferenceFactory = _ref.RootReferenceFactory;
return obj._meta = new MetaToUse(obj, {});
};
_classCallCheck$2(this, Meta);
Meta.exists = function exists(obj) {
return typeof obj === 'object' && obj._meta;
};
this.references = null;
this.slots = null;
this.referenceTypes = null;
this.propertyMetadata = null;
this.object = object;
this.RootReferenceFactory = RootReferenceFactory || RootReference;
}
Meta.metadataForProperty = function metadataForProperty(_key) {
return null;
};
Meta.for = function _for(obj) {
if (obj === null || obj === undefined) return new Meta(obj, {});
if (hasOwnProperty.call(obj, '_meta') && obj._meta) return obj._meta;
if (!Object.isExtensible(obj)) return new ConstMeta(obj);
var MetaToUse = Meta;
if (obj.constructor && obj.constructor[CLASS_META]) {
var classMeta = obj.constructor[CLASS_META];
MetaToUse = classMeta.InstanceMetaConstructor;
} else if (obj[CLASS_META]) {
MetaToUse = obj[CLASS_META].InstanceMetaConstructor;
}
return obj._meta = new MetaToUse(obj, {});
};
var _proto4 = Meta.prototype;
Meta.exists = function exists(obj) {
return typeof obj === 'object' && obj._meta;
};
_proto4.toJSON = function toJSON() {
return '<META>';
};
Meta.metadataForProperty = function metadataForProperty(_key) {
return null;
};
_proto4.addReference = function addReference(property, reference) {
var refs = this.references = this.references || util.dict();
var set = refs[property] = refs[property] || new util.DictSet();
set.add(reference);
};
Meta.prototype.toJSON = function toJSON() {
return '<META>';
};
_proto4.addReferenceTypeFor = function addReferenceTypeFor(property, type) {
this.referenceTypes = this.referenceTypes || util.dict();
this.referenceTypes[property] = type;
};
Meta.prototype.addReference = function addReference(property, reference$$1) {
var refs = this.references = this.references || util.dict();
var set = refs[property] = refs[property] || new util.DictSet();
set.add(reference$$1);
};
_proto4.referenceTypeFor = function referenceTypeFor(property) {
if (!this.referenceTypes) return PropertyReference;
return this.referenceTypes[property] || PropertyReference;
};
Meta.prototype.addReferenceTypeFor = function addReferenceTypeFor(property, type) {
this.referenceTypes = this.referenceTypes || util.dict();
this.referenceTypes[property] = type;
};
_proto4.removeReference = function removeReference(property, reference) {
if (!this.references) return;
var set = this.references[property];
set["delete"](reference);
};
Meta.prototype.referenceTypeFor = function referenceTypeFor(property) {
if (!this.referenceTypes) return PropertyReference;
return this.referenceTypes[property] || PropertyReference;
};
_proto4.getReferenceTypes = function getReferenceTypes() {
this.referenceTypes = this.referenceTypes || util.dict();
return this.referenceTypes;
};
Meta.prototype.removeReference = function removeReference(property, reference$$1) {
if (!this.references) return;
var set = this.references[property];
set.delete(reference$$1);
};
_proto4.referencesFor = function referencesFor(property) {
if (!this.references) return null;
return this.references[property];
};
Meta.prototype.getReferenceTypes = function getReferenceTypes() {
this.referenceTypes = this.referenceTypes || util.dict();
return this.referenceTypes;
};
_proto4.getSlots = function getSlots() {
return this.slots = this.slots || util.dict();
};
Meta.prototype.referencesFor = function referencesFor(property) {
if (!this.references) return null;
return this.references[property];
};
_proto4.root = function root() {
return this.rootCache = this.rootCache || new this.RootReferenceFactory(this.object);
};
Meta.prototype.getSlots = function getSlots() {
return this.slots = this.slots || util.dict();
};
return Meta;
}();
function metaFor(obj) {
return Meta["for"](obj);
}
Meta.prototype.root = function root() {
return this.rootCache = this.rootCache || new this.RootReferenceFactory(this.object);
};
return Meta;
}();
function metaFor(obj) {
return Meta.for(obj);
var PropertyReference =
/*#__PURE__*/
function () {
function PropertyReference(object, property, _outer) {
this.tag = validator.CURRENT_TAG;
this.object = object;
this.property = property;
}
function _classCallCheck$3(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var PropertyReference = function () {
function PropertyReference(object, property, _outer) {
_classCallCheck$3(this, PropertyReference);
var _proto = PropertyReference.prototype;
this.tag = validator.CURRENT_TAG;
this.object = object;
this.property = property;
_proto.value = function value() {
return this.object[this.property];
};
_proto.label = function label() {
return '[reference Property]';
};
return PropertyReference;
}();
function ComputedReferenceBlueprint(_property, dependencies) {
return (
/*#__PURE__*/
function () {
function ComputedReference(object, property) {
this.installed = false;
this.tag = validator.CURRENT_TAG;
this.object = object;
this.property = property;
this.dependencies = dependencies;
}
PropertyReference.prototype.value = function value() {
return this.object[this.property];
var _proto2 = ComputedReference.prototype;
_proto2.value = function value() {
if (!this.installed) {
var root = Meta["for"](this.object).root();
this.dependencies.forEach(function (dep) {
var ref = root.referenceFromParts(dep);
ref.value();
});
this.installed = true;
}
return this.object[this.property];
};
PropertyReference.prototype.label = function label() {
return '[reference Property]';
_proto2.label = function label() {
return '[reference Computed]';
};
return PropertyReference;
}();
function ComputedReferenceBlueprint(_property, dependencies) {
return function () {
function ComputedReference(object, property) {
_classCallCheck$3(this, ComputedReference);
return ComputedReference;
}()
);
}
this.installed = false;
this.tag = validator.CURRENT_TAG;
this.object = object;
this.property = property;
this.dependencies = dependencies;
}
// import { intern } from '@glimmer/util';
ComputedReference.prototype.value = function value() {
if (!this.installed) {
var root = Meta.for(this.object).root();
this.dependencies.forEach(function (dep) {
var ref = root.referenceFromParts(dep);
ref.value();
});
this.installed = true;
}
return this.object[this.property];
};
function setProperty(parent, property, val) {
// let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
parent[property] = val;
validator.bump(); // if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
}
function notifyProperty(_parent, _property) {
validator.bump(); // let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
// if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
}
ComputedReference.prototype.label = function label() {
return '[reference Computed]';
};
return ComputedReference;
}();
Object.defineProperty(exports, 'isConst', {
enumerable: true,
get: function () {
return validator.isConst;
}
// import { metaFor } from './meta';
// import { intern } from '@glimmer/util';
function setProperty(parent, property, val) {
// let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
parent[property] = val;
validator.bump();
// if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
});
Object.defineProperty(exports, 'ConstReference', {
enumerable: true,
get: function () {
return reference.ConstReference;
}
function notifyProperty(_parent, _property) {
validator.bump();
// let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
// if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
}
});
exports.CLASS_META = CLASS_META;
exports.ComputedReferenceBlueprint = ComputedReferenceBlueprint;
exports.Meta = Meta;
exports.ObjectReference = PathReference;
exports.PropertyReference = PropertyReference;
exports.State = State;
exports.UpdatableRootReference = RootReference;
exports.metaFor = metaFor;
exports.notifyProperty = notifyProperty;
exports.setProperty = setProperty;
exports.isConst = validator.isConst;
exports.ConstReference = reference.ConstReference;
exports.ComputedReferenceBlueprint = ComputedReferenceBlueprint;
exports.PropertyReference = PropertyReference;
exports.CLASS_META = CLASS_META;
exports.Meta = Meta;
exports.metaFor = metaFor;
exports.setProperty = setProperty;
exports.notifyProperty = notifyProperty;
exports.ObjectReference = PathReference;
exports.UpdatableRootReference = RootReference;
exports.State = State;
Object.defineProperty(exports, '__esModule', { value: true });
Object.defineProperty(exports, '__esModule', { value: true });
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xpbW1lci1vYmplY3QtcmVmZXJlbmNlLmpzIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9AZ2xp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E7RUFBQTtFQUFBO0VBZ0NEOztFQzdERDs7QUFFQSxFQUFNLFNBQUEsV0FBQSxDQUFBLE1BQUEsRUFBQSxRQUFBLEVBQUEsR0FBQSxFQUE2RDtFQUNqRTtFQUVBO0VBRUEsRUFBQSxNQUFNLENBQU4sUUFBTSxDQUFOLEdBQUEsR0FBQTtFQUNBLEVBQUFFLGNBTmlFLEdBQUE7RUFTakU7RUFDQTtFQUVBO0VBQ0Q7QUFFRCxFQUFNLFNBQUEsY0FBQSxDQUFBLE9BQUEsRUFBQSxTQUFBLEVBQXdEO0VBQzVELEVBQUFBLGNBRDRELEdBQUE7RUFJNUQ7RUFFQTtFQUNBO0VBQ0E7RUFFQTtFQUNEOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7In0=

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -6,6 +6,3 @@ Object.defineProperty(exports, "__esModule", {

});
var _descriptors = require('./lib/references/descriptors');
Object.defineProperty(exports, 'ComputedReferenceBlueprint', {
Object.defineProperty(exports, "ComputedReferenceBlueprint", {
enumerable: true,

@@ -16,3 +13,3 @@ get: function () {

});
Object.defineProperty(exports, 'PropertyReference', {
Object.defineProperty(exports, "PropertyReference", {
enumerable: true,

@@ -23,6 +20,3 @@ get: function () {

});
var _meta = require('./lib/meta');
Object.defineProperty(exports, 'CLASS_META', {
Object.defineProperty(exports, "CLASS_META", {
enumerable: true,

@@ -33,9 +27,9 @@ get: function () {

});
Object.defineProperty(exports, 'Meta', {
Object.defineProperty(exports, "Meta", {
enumerable: true,
get: function () {
return _interopRequireDefault(_meta).default;
return _meta.default;
}
});
Object.defineProperty(exports, 'metaFor', {
Object.defineProperty(exports, "metaFor", {
enumerable: true,

@@ -46,6 +40,3 @@ get: function () {

});
var _object = require('./lib/object');
Object.defineProperty(exports, 'setProperty', {
Object.defineProperty(exports, "setProperty", {
enumerable: true,

@@ -56,3 +47,3 @@ get: function () {

});
Object.defineProperty(exports, 'notifyProperty', {
Object.defineProperty(exports, "notifyProperty", {
enumerable: true,

@@ -63,21 +54,15 @@ get: function () {

});
var _path = require('./lib/references/path');
Object.defineProperty(exports, 'ObjectReference', {
Object.defineProperty(exports, "ObjectReference", {
enumerable: true,
get: function () {
return _interopRequireDefault(_path).default;
return _path.default;
}
});
var _root = require('./lib/references/root');
Object.defineProperty(exports, 'UpdatableRootReference', {
Object.defineProperty(exports, "UpdatableRootReference", {
enumerable: true,
get: function () {
return _interopRequireDefault(_root).default;
return _root.default;
}
});
Object.defineProperty(exports, 'State', {
Object.defineProperty(exports, "State", {
enumerable: true,

@@ -88,6 +73,3 @@ get: function () {

});
var _reference = require('@glimmer/reference');
Object.defineProperty(exports, 'ConstReference', {
Object.defineProperty(exports, "ConstReference", {
enumerable: true,

@@ -98,6 +80,3 @@ get: function () {

});
var _validator = require('@glimmer/validator');
Object.defineProperty(exports, 'isConst', {
Object.defineProperty(exports, "isConst", {
enumerable: true,

@@ -109,3 +88,21 @@ get: function () {

var _descriptors = require("./lib/references/descriptors");
var _meta = _interopRequireWildcard(require("./lib/meta"));
var _object = require("./lib/object");
var _path = _interopRequireDefault(require("./lib/references/path"));
var _root = _interopRequireWildcard(require("./lib/references/root"));
var _reference = require("@glimmer/reference");
var _validator = require("@glimmer/validator");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7d0JBQUEsaUI7Ozs7Ozs7OztpQkFLQSxVOzs7Ozs7eUNBQUEsTzs7Ozs7O2lCQUFBLE87Ozs7Ozs7OzttQkFDQSxXOzs7Ozs7bUJBQUEsYzs7Ozs7Ozs7O3lDQUVBLE87Ozs7Ozs7Ozt5Q0FDQSxPOzs7Ozs7aUJBQUEsSzs7Ozs7Ozs7O3NCQUNBLGM7Ozs7Ozs7OztzQkFDQSxPIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHtcbiAgQ29tcHV0ZWRSZWZlcmVuY2VCbHVlcHJpbnQsXG4gIElubmVyUmVmZXJlbmNlRmFjdG9yeSxcbiAgUHJvcGVydHlSZWZlcmVuY2UsXG59IGZyb20gJy4vbGliL3JlZmVyZW5jZXMvZGVzY3JpcHRvcnMnO1xuZXhwb3J0IHsgQ0xBU1NfTUVUQSwgZGVmYXVsdCBhcyBNZXRhLCBtZXRhRm9yIH0gZnJvbSAnLi9saWIvbWV0YSc7XG5leHBvcnQgeyBzZXRQcm9wZXJ0eSwgbm90aWZ5UHJvcGVydHkgfSBmcm9tICcuL2xpYi9vYmplY3QnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdHlwZXMnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBPYmplY3RSZWZlcmVuY2UgfSBmcm9tICcuL2xpYi9yZWZlcmVuY2VzL3BhdGgnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBVcGRhdGFibGVSb290UmVmZXJlbmNlLCBTdGF0ZSB9IGZyb20gJy4vbGliL3JlZmVyZW5jZXMvcm9vdCc7XG5leHBvcnQgeyBDb25zdFJlZmVyZW5jZSB9IGZyb20gJ0BnbGltbWVyL3JlZmVyZW5jZSc7XG5leHBvcnQgeyBpc0NvbnN0IH0gZnJvbSAnQGdsaW1tZXIvdmFsaWRhdG9yJztcbiJdLCJzb3VyY2VSb290IjoiIn0=
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7O0FBS0E7O0FBQ0E7O0FBRUE7O0FBQ0E7O0FBQ0E7O0FBQ0EiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQge1xuICBDb21wdXRlZFJlZmVyZW5jZUJsdWVwcmludCxcbiAgSW5uZXJSZWZlcmVuY2VGYWN0b3J5LFxuICBQcm9wZXJ0eVJlZmVyZW5jZSxcbn0gZnJvbSAnLi9saWIvcmVmZXJlbmNlcy9kZXNjcmlwdG9ycyc7XG5leHBvcnQgeyBDTEFTU19NRVRBLCBkZWZhdWx0IGFzIE1ldGEsIG1ldGFGb3IgfSBmcm9tICcuL2xpYi9tZXRhJztcbmV4cG9ydCB7IHNldFByb3BlcnR5LCBub3RpZnlQcm9wZXJ0eSB9IGZyb20gJy4vbGliL29iamVjdCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi90eXBlcyc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIE9iamVjdFJlZmVyZW5jZSB9IGZyb20gJy4vbGliL3JlZmVyZW5jZXMvcGF0aCc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIFVwZGF0YWJsZVJvb3RSZWZlcmVuY2UsIFN0YXRlIH0gZnJvbSAnLi9saWIvcmVmZXJlbmNlcy9yb290JztcbmV4cG9ydCB7IENvbnN0UmVmZXJlbmNlIH0gZnJvbSAnQGdsaW1tZXIvcmVmZXJlbmNlJztcbmV4cG9ydCB7IGlzQ29uc3QgfSBmcm9tICdAZ2xpbW1lci92YWxpZGF0b3InO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==

@@ -1,143 +0,187 @@

'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
exports.CLASS_META = undefined;
exports.metaFor = metaFor;
exports.default = exports.CLASS_META = void 0;
var _descriptors = require('./references/descriptors');
var _descriptors = require("./references/descriptors");
var _root = require('./references/root');
var _root = _interopRequireDefault(require("./references/root"));
var _root2 = _interopRequireDefault(_root);
var _util = require("@glimmer/util");
var _util = require('@glimmer/util');
var _validator = require("@glimmer/validator");
var _validator = require('@glimmer/validator');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const NOOP_DESTROY = { destroy() {} };
const NOOP_DESTROY = {
destroy() {}
};
class ConstPath {
constructor(parent, property) {
this.parent = parent;
this.property = property;
this.tag = _validator.CURRENT_TAG;
this.parent = parent;
}
chain() {
return NOOP_DESTROY;
}
notify() {}
value() {
return this.parent[this.property];
}
get(prop) {
return new ConstPath(this.parent[this.property], prop);
}
constructor(parent, property) {
this.parent = parent;
this.property = property;
this.tag = _validator.CURRENT_TAG;
this.parent = parent;
}
chain() {
return NOOP_DESTROY;
}
notify() {}
value() {
return this.parent[this.property];
}
get(prop) {
return new ConstPath(this.parent[this.property], prop);
}
}
class ConstRoot {
constructor(value) {
this.tag = _validator.CURRENT_TAG;
this.inner = value;
}
update(inner) {
this.inner = inner;
}
chain() {
return NOOP_DESTROY;
}
notify() {}
value() {
return this.inner;
}
referenceFromParts(_parts) {
throw new Error('Not implemented');
}
chainFor(_prop) {
throw new Error('Not implemented');
}
get(prop) {
return new ConstPath(this.inner, prop);
}
constructor(value) {
this.tag = _validator.CURRENT_TAG;
this.inner = value;
}
update(inner) {
this.inner = inner;
}
chain() {
return NOOP_DESTROY;
}
notify() {}
value() {
return this.inner;
}
referenceFromParts(_parts) {
throw new Error('Not implemented');
}
chainFor(_prop) {
throw new Error('Not implemented');
}
get(prop) {
return new ConstPath(this.inner, prop);
}
}
class ConstMeta /*implements IMeta*/ {
constructor(object) {
this.object = object;
}
root() {
return new ConstRoot(this.object);
}
class ConstMeta
/*implements IMeta*/
{
constructor(object) {
this.object = object;
}
root() {
return new ConstRoot(this.object);
}
}
const CLASS_META = exports.CLASS_META = (0, _util.symbol)('CLASS_META');
const CLASS_META = (0, _util.symbol)('CLASS_META');
exports.CLASS_META = CLASS_META;
const hasOwnProperty = Object.hasOwnProperty;
class Meta {
constructor(object, { RootReferenceFactory }) {
this.references = null;
this.slots = null;
this.referenceTypes = null;
this.propertyMetadata = null;
this.object = object;
this.RootReferenceFactory = RootReferenceFactory || _root2.default;
constructor(object, {
RootReferenceFactory
}) {
this.references = null;
this.slots = null;
this.referenceTypes = null;
this.propertyMetadata = null;
this.object = object;
this.RootReferenceFactory = RootReferenceFactory || _root.default;
}
static for(obj) {
if (obj === null || obj === undefined) return new Meta(obj, {});
if (hasOwnProperty.call(obj, '_meta') && obj._meta) return obj._meta;
if (!Object.isExtensible(obj)) return new ConstMeta(obj);
let MetaToUse = Meta;
if (obj.constructor && obj.constructor[CLASS_META]) {
let classMeta = obj.constructor[CLASS_META];
MetaToUse = classMeta.InstanceMetaConstructor;
} else if (obj[CLASS_META]) {
MetaToUse = obj[CLASS_META].InstanceMetaConstructor;
}
static for(obj) {
if (obj === null || obj === undefined) return new Meta(obj, {});
if (hasOwnProperty.call(obj, '_meta') && obj._meta) return obj._meta;
if (!Object.isExtensible(obj)) return new ConstMeta(obj);
let MetaToUse = Meta;
if (obj.constructor && obj.constructor[CLASS_META]) {
let classMeta = obj.constructor[CLASS_META];
MetaToUse = classMeta.InstanceMetaConstructor;
} else if (obj[CLASS_META]) {
MetaToUse = obj[CLASS_META].InstanceMetaConstructor;
}
return obj._meta = new MetaToUse(obj, {});
}
static exists(obj) {
return typeof obj === 'object' && obj._meta;
}
static metadataForProperty(_key) {
return null;
}
toJSON() {
return '<META>';
}
addReference(property, reference) {
let refs = this.references = this.references || (0, _util.dict)();
let set = refs[property] = refs[property] || new _util.DictSet();
set.add(reference);
}
addReferenceTypeFor(property, type) {
this.referenceTypes = this.referenceTypes || (0, _util.dict)();
this.referenceTypes[property] = type;
}
referenceTypeFor(property) {
if (!this.referenceTypes) return _descriptors.PropertyReference;
return this.referenceTypes[property] || _descriptors.PropertyReference;
}
removeReference(property, reference) {
if (!this.references) return;
let set = this.references[property];
set.delete(reference);
}
getReferenceTypes() {
this.referenceTypes = this.referenceTypes || (0, _util.dict)();
return this.referenceTypes;
}
referencesFor(property) {
if (!this.references) return null;
return this.references[property];
}
getSlots() {
return this.slots = this.slots || (0, _util.dict)();
}
root() {
return this.rootCache = this.rootCache || new this.RootReferenceFactory(this.object);
}
return obj._meta = new MetaToUse(obj, {});
}
static exists(obj) {
return typeof obj === 'object' && obj._meta;
}
static metadataForProperty(_key) {
return null;
}
toJSON() {
return '<META>';
}
addReference(property, reference) {
let refs = this.references = this.references || (0, _util.dict)();
let set = refs[property] = refs[property] || new _util.DictSet();
set.add(reference);
}
addReferenceTypeFor(property, type) {
this.referenceTypes = this.referenceTypes || (0, _util.dict)();
this.referenceTypes[property] = type;
}
referenceTypeFor(property) {
if (!this.referenceTypes) return _descriptors.PropertyReference;
return this.referenceTypes[property] || _descriptors.PropertyReference;
}
removeReference(property, reference) {
if (!this.references) return;
let set = this.references[property];
set.delete(reference);
}
getReferenceTypes() {
this.referenceTypes = this.referenceTypes || (0, _util.dict)();
return this.referenceTypes;
}
referencesFor(property) {
if (!this.references) return null;
return this.references[property];
}
getSlots() {
return this.slots = this.slots || (0, _util.dict)();
}
root() {
return this.rootCache = this.rootCache || new this.RootReferenceFactory(this.object);
}
}
exports.default = Meta;
var _default = Meta;
exports.default = _default;
function metaFor(obj) {
return Meta.for(obj);
return Meta.for(obj);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL21ldGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O1FBMExNLE8sR0FBQSxPOzs7O0FBekxOOzs7O0FBR0E7O0FBVUE7Ozs7QUFLQSxNQUFNLGVBQWUsRUFBRSxVQUFPLENBQTlCLENBQXFCLEVBQXJCO0FBRUEsTUFBQSxTQUFBLENBQWU7QUFHYixnQkFBQSxNQUFBLEVBQUEsUUFBQSxFQUF5RDtBQUFyQyxhQUFBLE1BQUEsR0FBQSxNQUFBO0FBQXFCLGFBQUEsUUFBQSxHQUFBLFFBQUE7QUFGbEMsYUFBQSxHQUFBLEdBQUEsc0JBQUE7QUFHTCxhQUFBLE1BQUEsR0FBQSxNQUFBO0FBQ0Q7QUFFRCxZQUFLO0FBQ0gsZUFBQSxZQUFBO0FBQ0Q7QUFDRCxhQUFNLENBQUs7QUFFWCxZQUFLO0FBQ0gsZUFBTyxLQUFBLE1BQUEsQ0FBWSxLQUFuQixRQUFPLENBQVA7QUFDRDtBQUVELFFBQUEsSUFBQSxFQUFnQjtBQUNkLGVBQU8sSUFBQSxTQUFBLENBQWMsS0FBQSxNQUFBLENBQVksS0FBMUIsUUFBYyxDQUFkLEVBQVAsSUFBTyxDQUFQO0FBQ0Q7QUFsQlk7QUFxQmYsTUFBQSxTQUFBLENBQWU7QUFJYixnQkFBQSxLQUFBLEVBQXNCO0FBRmYsYUFBQSxHQUFBLEdBQUEsc0JBQUE7QUFHTCxhQUFBLEtBQUEsR0FBQSxLQUFBO0FBQ0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lclJlZmVyZW5jZUZhY3Rvcnk8YW55Pj4ge1xuICAgIHRoaXMucmVmZXJlbmNlVHlwZXMgPSB0aGlzLnJlZmVyZW5jZVR5cGVzIHx8IGRpY3Q8UGF0aFJlZmVyZW5jZUZhY3Rvcnk8YW55Pj4oKTtcbiAgICByZXR1cm4gdGhpcy5yZWZlcmVuY2VUeXBlcztcbiAgfVxuXG4gIHJlZmVyZW5jZXNGb3IocHJvcGVydHk6IHN0cmluZyk6IE9wdGlvbjxTZXQ8SVBhdGhSZWZlcmVuY2U8YW55Pj4+IHtcbiAgICBpZiAoIXRoaXMucmVmZXJlbmNlcykgcmV0dXJuIG51bGw7XG4gICAgcmV0dXJuIHRoaXMucmVmZXJlbmNlc1twcm9wZXJ0eV07XG4gIH1cblxuICBnZXRTbG90cygpIHtcbiAgICByZXR1cm4gKHRoaXMuc2xvdHMgPSB0aGlzLnNsb3RzIHx8IGRpY3QoKSk7XG4gIH1cblxuICByb290KCk6IElSb290UmVmZXJlbmNlPGFueT4ge1xuICAgIHJldHVybiAodGhpcy5yb290Q2FjaGUgPSB0aGlzLnJvb3RDYWNoZSB8fCBuZXcgdGhpcy5Sb290UmVmZXJlbmNlRmFjdG9yeSh0aGlzLm9iamVjdCkpO1xuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IE1ldGE7XG5cbmludGVyZmFjZSBDbGFzc01ldGEge1xuICBJbnN0YW5jZU1ldGFDb25zdHJ1Y3RvcjogdHlwZW9mIE1ldGE7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBtZXRhRm9yKG9iajogYW55KTogSU1ldGEge1xuICByZXR1cm4gTWV0YS5mb3Iob2JqKTtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=

@@ -1,5 +0,5 @@

'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});

@@ -9,3 +9,3 @@ exports.setProperty = setProperty;

var _validator = require('@glimmer/validator');
var _validator = require("@glimmer/validator");

@@ -15,20 +15,19 @@ // import { metaFor } from './meta';

function setProperty(parent, property, val) {
// let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
parent[property] = val;
(0, _validator.bump)();
// if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
// let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
parent[property] = val;
(0, _validator.bump)(); // if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
}
function notifyProperty(_parent, _property) {
(0, _validator.bump)();
// let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
// if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
(0, _validator.bump)(); // let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
// if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL29iamVjdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztRQUtNLFcsR0FBQSxXO1FBZUEsYyxHQUFBLGM7Ozs7QUFsQk47QUFDQTtBQUVNLFNBQUEsV0FBQSxDQUFBLE1BQUEsRUFBQSxRQUFBLEVBQUEsR0FBQSxFQUE2RDtBQUNqRTtBQUVBO0FBRUEsV0FBQSxRQUFBLElBQUEsR0FBQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBRUE7QUFDRDtBQUVLLFNBQUEsY0FBQSxDQUFBLE9BQUEsRUFBQSxTQUFBLEVBQXdEO0FBQzVEO0FBQ0E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IHtcbiAgLy8gbGV0IHJvb3RQcm9wID0gbWV0YUZvcihwYXJlbnQpLnJvb3QoKS5jaGFpbkZvcihwcm9wZXJ0eSkpO1xuXG4gIC8vIGxldCByZWZlcmVuY2VzVG9Ob3RpZnkgPSBtZXRhRm9yKHBhcmVudCkucmVmZXJlbmNlc0Zvcihwcm9wZXJ0eSkpO1xuXG4gIHBhcmVudFtwcm9wZXJ0eV0gPSB2YWw7XG4gIGJ1bXAoKTtcblxuICAvLyBpZiAocmVmZXJlbmNlc1RvTm90aWZ5KSB7XG4gIC8vICAgcmVmZXJlbmNlc1RvTm90aWZ5LmZvckVhY2goZnVuY3Rpb24ocmVmKSB7IHJlZi5ub3RpZnkoKTsgfSk7XG4gIC8vIH1cblxuICAvLyBpZiAocm9vdFByb3ApIHJvb3RQcm9wLm5vdGlmeSgpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gbm90aWZ5UHJvcGVydHkoX3BhcmVudDogYW55LCBfcHJvcGVydHk6IHN0cmluZykge1xuICBidW1wKCk7XG4gIC8vIGxldCByb290UHJvcCA9IG1ldGFGb3IocGFyZW50KS5yb290KCkuY2hhaW5Gb3IocHJvcGVydHkpKTtcblxuICAvLyBsZXQgcmVmZXJlbmNlc1RvTm90aWZ5ID0gbWV0YUZvcihwYXJlbnQpLnJlZmVyZW5jZXNGb3IocHJvcGVydHkpKTtcblxuICAvLyBpZiAocmVmZXJlbmNlc1RvTm90aWZ5KSB7XG4gIC8vICAgcmVmZXJlbmNlc1RvTm90aWZ5LmZvckVhY2goZnVuY3Rpb24ocmVmKSB7IHJlZi5ub3RpZnkoKTsgfSk7XG4gIC8vIH1cblxuICAvLyBpZiAocm9vdFByb3ApIHJvb3RQcm9wLm5vdGlmeSgpO1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ==

@@ -1,56 +0,64 @@

'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
exports.PropertyReference = undefined;
exports.ComputedReferenceBlueprint = ComputedReferenceBlueprint;
exports.PropertyReference = void 0;
var _meta = require('../meta');
var _meta = _interopRequireDefault(require("../meta"));
var _meta2 = _interopRequireDefault(_meta);
var _validator = require("@glimmer/validator");
var _validator = require('@glimmer/validator');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
class PropertyReference {
constructor(object, property, _outer) {
this.tag = _validator.CURRENT_TAG;
this.object = object;
this.property = property;
constructor(object, property, _outer) {
this.tag = _validator.CURRENT_TAG;
this.object = object;
this.property = property;
}
value() {
return this.object[this.property];
}
label() {
return '[reference Property]';
}
}
exports.PropertyReference = PropertyReference;
function ComputedReferenceBlueprint(_property, dependencies) {
return class ComputedReference {
constructor(object, property) {
this.installed = false;
this.tag = _validator.CURRENT_TAG;
this.object = object;
this.property = property;
this.dependencies = dependencies;
}
value() {
return this.object[this.property];
if (!this.installed) {
let root = _meta.default.for(this.object).root();
this.dependencies.forEach(dep => {
let ref = root.referenceFromParts(dep);
ref.value();
});
this.installed = true;
}
return this.object[this.property];
}
label() {
return '[reference Property]';
return '[reference Computed]';
}
};
}
exports.PropertyReference = PropertyReference;
function ComputedReferenceBlueprint(_property, dependencies) {
return class ComputedReference {
constructor(object, property) {
this.installed = false;
this.tag = _validator.CURRENT_TAG;
this.object = object;
this.property = property;
this.dependencies = dependencies;
}
value() {
if (!this.installed) {
let root = _meta2.default.for(this.object).root();
this.dependencies.forEach(dep => {
let ref = root.referenceFromParts(dep);
ref.value();
});
this.installed = true;
}
return this.object[this.property];
}
label() {
return '[reference Computed]';
}
};
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3JlZmVyZW5jZXMvZGVzY3JpcHRvcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O1FBNEJNLDBCLEdBQUEsMEI7Ozs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mplY3QgPSBvYmplY3Q7XG4gICAgICB0aGlzLnByb3BlcnR5ID0gcHJvcGVydHk7XG4gICAgICB0aGlzLmRlcGVuZGVuY2llcyA9IGRlcGVuZGVuY2llcztcbiAgICB9XG5cbiAgICB2YWx1ZSgpOiBUIHtcbiAgICAgIGlmICghdGhpcy5pbnN0YWxsZWQpIHtcbiAgICAgICAgbGV0IHJvb3QgPSBNZXRhLmZvcih0aGlzLm9iamVjdCkucm9vdCgpO1xuXG4gICAgICAgIHRoaXMuZGVwZW5kZW5jaWVzLmZvckVhY2goZGVwID0+IHtcbiAgICAgICAgICBsZXQgcmVmID0gcm9vdC5yZWZlcmVuY2VGcm9tUGFydHMoZGVwKTtcbiAgICAgICAgICByZWYudmFsdWUoKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5pbnN0YWxsZWQgPSB0cnVlO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5vYmplY3RbdGhpcy5wcm9wZXJ0eV07XG4gICAgfVxuXG4gICAgbGFiZWwoKSB7XG4gICAgICByZXR1cm4gJ1tyZWZlcmVuY2UgQ29tcHV0ZWRdJztcbiAgICB9XG4gIH07XG59XG4iXSwic291cmNlUm9vdCI6IiJ9

@@ -1,70 +0,83 @@

'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
exports.PathReference = undefined;
exports.PathReference = exports.default = void 0;
var _utils = require('../utils');
var _utils = require("../utils");
var _util = require('@glimmer/util');
var _util = require("@glimmer/util");
var _meta = require('../meta');
var _meta = _interopRequireDefault(require("../meta"));
var _meta2 = _interopRequireDefault(_meta);
var _descriptors = require("./descriptors");
var _descriptors = require('./descriptors');
var _validator = require("@glimmer/validator");
var _validator = require('@glimmer/validator');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
class PathReference {
constructor(parent, property) {
this.cache = _utils.EMPTY_CACHE;
this.inner = null;
this.chains = null;
this.lastParentValue = _utils.EMPTY_CACHE;
this._guid = 0;
this.tag = _validator.CURRENT_TAG;
this.parent = parent;
this.property = property;
constructor(parent, property) {
this.cache = _utils.EMPTY_CACHE;
this.inner = null;
this.chains = null;
this.lastParentValue = _utils.EMPTY_CACHE;
this._guid = 0;
this.tag = _validator.CURRENT_TAG;
this.parent = parent;
this.property = property;
}
value() {
let {
lastParentValue,
property,
inner
} = this;
let parentValue = this._parentValue();
if (parentValue === null || parentValue === undefined) {
return this.cache = undefined;
}
value() {
let { lastParentValue, property, inner } = this;
let parentValue = this._parentValue();
if (parentValue === null || parentValue === undefined) {
return this.cache = undefined;
}
if (lastParentValue === parentValue) {
inner = this.inner;
} else {
let ReferenceType = typeof parentValue === 'object' ? _meta2.default.for(parentValue).referenceTypeFor(property) : _descriptors.PropertyReference;
inner = this.inner = new ReferenceType(parentValue, property, this);
}
// if (typeof parentValue === 'object') {
// Meta.for(parentValue).addReference(property, this);
// }
return this.cache = inner.value();
}
get(prop) {
let chains = this._getChains();
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
}
label() {
return '[reference Direct]';
}
_getChains() {
if (this.chains) return this.chains;
return this.chains = (0, _util.dict)();
}
_parentValue() {
let parent = this.parent.value();
this.lastParentValue = parent;
return parent;
}
if (lastParentValue === parentValue) {
inner = this.inner;
} else {
let ReferenceType = typeof parentValue === 'object' ? _meta.default.for(parentValue).referenceTypeFor(property) : _descriptors.PropertyReference;
inner = this.inner = new ReferenceType(parentValue, property, this);
} // if (typeof parentValue === 'object') {
// Meta.for(parentValue).addReference(property, this);
// }
return this.cache = inner.value();
}
get(prop) {
let chains = this._getChains();
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
}
label() {
return '[reference Direct]';
}
_getChains() {
if (this.chains) return this.chains;
return this.chains = (0, _util.dict)();
}
_parentValue() {
let parent = this.parent.value();
this.lastParentValue = parent;
return parent;
}
}
exports.default = PathReference;
exports.PathReference = PathReference;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9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bmNlPGFueT4+KCkpO1xuICB9XG5cbiAgcHJpdmF0ZSBfcGFyZW50VmFsdWUoKSB7XG4gICAgbGV0IHBhcmVudCA9IHRoaXMucGFyZW50LnZhbHVlKCk7XG4gICAgdGhpcy5sYXN0UGFyZW50VmFsdWUgPSBwYXJlbnQ7XG4gICAgcmV0dXJuIHBhcmVudDtcbiAgfVxufVxuXG5leHBvcnQgeyBQYXRoUmVmZXJlbmNlIH07XG4iXSwic291cmNlUm9vdCI6IiJ9

@@ -1,51 +0,62 @@

'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
exports.State = State;
exports.default = void 0;
var _util = require('@glimmer/util');
var _util = require("@glimmer/util");
var _path = require('./path');
var _path = require("./path");
var _validator = require('@glimmer/validator');
var _validator = require("@glimmer/validator");
class RootReference {
constructor(object) {
this.chains = (0, _util.dict)();
this.tag = _validator.CURRENT_TAG;
this.object = object;
}
value() {
return this.object;
}
update(object) {
this.object = object;
(0, _validator.bump)();
}
get(prop) {
let chains = this.chains;
if (prop in chains) return chains[prop];
return chains[prop] = new _path.PathReference(this, prop);
}
chainFor(prop) {
let chains = this.chains;
if (prop in chains) return chains[prop];
return null;
}
path(string) {
return this.referenceFromParts(string.split('.'));
}
referenceFromParts(parts) {
return parts.reduce((ref, part) => ref.get(part), this);
}
label() {
return '[reference Root]';
}
constructor(object) {
this.chains = (0, _util.dict)();
this.tag = _validator.CURRENT_TAG;
this.object = object;
}
value() {
return this.object;
}
update(object) {
this.object = object;
(0, _validator.bump)();
}
get(prop) {
let chains = this.chains;
if (prop in chains) return chains[prop];
return chains[prop] = new _path.PathReference(this, prop);
}
chainFor(prop) {
let chains = this.chains;
if (prop in chains) return chains[prop];
return null;
}
path(string) {
return this.referenceFromParts(string.split('.'));
}
referenceFromParts(parts) {
return parts.reduce((ref, part) => ref.get(part), this);
}
label() {
return '[reference Root]';
}
}
exports.default = RootReference;
function State(object) {
return new RootReference(object);
return new RootReference(object);
}
//# sourceMappingURL=data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VyZW5jZTx1bmtub3duPiB7XG4gICAgcmV0dXJuIHRoaXMucmVmZXJlbmNlRnJvbVBhcnRzKHN0cmluZy5zcGxpdCgnLicpKTtcbiAgfVxuXG4gIHJlZmVyZW5jZUZyb21QYXJ0cyhwYXJ0czogc3RyaW5nW10pOiBJUGF0aFJlZmVyZW5jZTx1bmtub3duPiB7XG4gICAgcmV0dXJuIHBhcnRzLnJlZHVjZShcbiAgICAgIChyZWYsIHBhcnQpID0+IHJlZi5nZXQocGFydCkgYXMgSVBhdGhSZWZlcmVuY2U8dW5rbm93bj4sXG4gICAgICB0aGlzIGFzIElQYXRoUmVmZXJlbmNlPHVua25vd24+XG4gICAgKTtcbiAgfVxuXG4gIGxhYmVsKCkge1xuICAgIHJldHVybiAnW3JlZmVyZW5jZSBSb290XSc7XG4gIH1cbn1cblxuZXhwb3J0IGZ1bmN0aW9uIFN0YXRlPFQ+KG9iamVjdDogVCk6IFJvb3RSZWZlcmVuY2U8VD4ge1xuICByZXR1cm4gbmV3IFJvb3RSZWZlcmVuY2Uob2JqZWN0KTtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=

@@ -7,3 +7,4 @@ "use strict";

exports.EMPTY_CACHE = EMPTY_CACHE;
function EMPTY_CACHE() {}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O1FBQU0sVyxHQUFBLFc7QUFBQSxTQUFBLFdBQUEsR0FBcUIsQ0FBSyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBFTVBUWV9DQUNIRSgpIHt9XG4iXSwic291cmNlUm9vdCI6IiJ9
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBTSxTQUFBLFdBQUEsR0FBcUIsQ0FBSyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBFTVBUWV9DQUNIRSgpIHt9XG4iXSwic291cmNlUm9vdCI6IiJ9

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -6,6 +6,3 @@ Object.defineProperty(exports, "__esModule", {

});
var _descriptors = require('./lib/references/descriptors');
Object.defineProperty(exports, 'ComputedReferenceBlueprint', {
Object.defineProperty(exports, "ComputedReferenceBlueprint", {
enumerable: true,

@@ -16,3 +13,3 @@ get: function () {

});
Object.defineProperty(exports, 'PropertyReference', {
Object.defineProperty(exports, "PropertyReference", {
enumerable: true,

@@ -23,6 +20,3 @@ get: function () {

});
var _meta = require('./lib/meta');
Object.defineProperty(exports, 'CLASS_META', {
Object.defineProperty(exports, "CLASS_META", {
enumerable: true,

@@ -33,9 +27,9 @@ get: function () {

});
Object.defineProperty(exports, 'Meta', {
Object.defineProperty(exports, "Meta", {
enumerable: true,
get: function () {
return _interopRequireDefault(_meta).default;
return _meta.default;
}
});
Object.defineProperty(exports, 'metaFor', {
Object.defineProperty(exports, "metaFor", {
enumerable: true,

@@ -46,6 +40,3 @@ get: function () {

});
var _object = require('./lib/object');
Object.defineProperty(exports, 'setProperty', {
Object.defineProperty(exports, "setProperty", {
enumerable: true,

@@ -56,3 +47,3 @@ get: function () {

});
Object.defineProperty(exports, 'notifyProperty', {
Object.defineProperty(exports, "notifyProperty", {
enumerable: true,

@@ -63,21 +54,15 @@ get: function () {

});
var _path = require('./lib/references/path');
Object.defineProperty(exports, 'ObjectReference', {
Object.defineProperty(exports, "ObjectReference", {
enumerable: true,
get: function () {
return _interopRequireDefault(_path).default;
return _path.default;
}
});
var _root = require('./lib/references/root');
Object.defineProperty(exports, 'UpdatableRootReference', {
Object.defineProperty(exports, "UpdatableRootReference", {
enumerable: true,
get: function () {
return _interopRequireDefault(_root).default;
return _root.default;
}
});
Object.defineProperty(exports, 'State', {
Object.defineProperty(exports, "State", {
enumerable: true,

@@ -88,6 +73,3 @@ get: function () {

});
var _reference = require('@glimmer/reference');
Object.defineProperty(exports, 'ConstReference', {
Object.defineProperty(exports, "ConstReference", {
enumerable: true,

@@ -98,6 +80,3 @@ get: function () {

});
var _validator = require('@glimmer/validator');
Object.defineProperty(exports, 'isConst', {
Object.defineProperty(exports, "isConst", {
enumerable: true,

@@ -109,3 +88,21 @@ get: function () {

var _descriptors = require("./lib/references/descriptors");
var _meta = _interopRequireWildcard(require("./lib/meta"));
var _object = require("./lib/object");
var _path = _interopRequireDefault(require("./lib/references/path"));
var _root = _interopRequireWildcard(require("./lib/references/root"));
var _reference = require("@glimmer/reference");
var _validator = require("@glimmer/validator");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7d0JBQUEsaUI7Ozs7Ozs7OztpQkFLQSxVOzs7Ozs7eUNBQUEsTzs7Ozs7O2lCQUFBLE87Ozs7Ozs7OzttQkFDQSxXOzs7Ozs7bUJBQUEsYzs7Ozs7Ozs7O3lDQUVBLE87Ozs7Ozs7Ozt5Q0FDQSxPOzs7Ozs7aUJBQUEsSzs7Ozs7Ozs7O3NCQUNBLGM7Ozs7Ozs7OztzQkFDQSxPIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHtcbiAgQ29tcHV0ZWRSZWZlcmVuY2VCbHVlcHJpbnQsXG4gIElubmVyUmVmZXJlbmNlRmFjdG9yeSxcbiAgUHJvcGVydHlSZWZlcmVuY2UsXG59IGZyb20gJy4vbGliL3JlZmVyZW5jZXMvZGVzY3JpcHRvcnMnO1xuZXhwb3J0IHsgQ0xBU1NfTUVUQSwgZGVmYXVsdCBhcyBNZXRhLCBtZXRhRm9yIH0gZnJvbSAnLi9saWIvbWV0YSc7XG5leHBvcnQgeyBzZXRQcm9wZXJ0eSwgbm90aWZ5UHJvcGVydHkgfSBmcm9tICcuL2xpYi9vYmplY3QnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdHlwZXMnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBPYmplY3RSZWZlcmVuY2UgfSBmcm9tICcuL2xpYi9yZWZlcmVuY2VzL3BhdGgnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBVcGRhdGFibGVSb290UmVmZXJlbmNlLCBTdGF0ZSB9IGZyb20gJy4vbGliL3JlZmVyZW5jZXMvcm9vdCc7XG5leHBvcnQgeyBDb25zdFJlZmVyZW5jZSB9IGZyb20gJ0BnbGltbWVyL3JlZmVyZW5jZSc7XG5leHBvcnQgeyBpc0NvbnN0IH0gZnJvbSAnQGdsaW1tZXIvdmFsaWRhdG9yJztcbiJdLCJzb3VyY2VSb290IjoiIn0=
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUE7O0FBS0E7O0FBQ0E7O0FBRUE7O0FBQ0E7O0FBQ0E7O0FBQ0EiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQge1xuICBDb21wdXRlZFJlZmVyZW5jZUJsdWVwcmludCxcbiAgSW5uZXJSZWZlcmVuY2VGYWN0b3J5LFxuICBQcm9wZXJ0eVJlZmVyZW5jZSxcbn0gZnJvbSAnLi9saWIvcmVmZXJlbmNlcy9kZXNjcmlwdG9ycyc7XG5leHBvcnQgeyBDTEFTU19NRVRBLCBkZWZhdWx0IGFzIE1ldGEsIG1ldGFGb3IgfSBmcm9tICcuL2xpYi9tZXRhJztcbmV4cG9ydCB7IHNldFByb3BlcnR5LCBub3RpZnlQcm9wZXJ0eSB9IGZyb20gJy4vbGliL29iamVjdCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi90eXBlcyc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIE9iamVjdFJlZmVyZW5jZSB9IGZyb20gJy4vbGliL3JlZmVyZW5jZXMvcGF0aCc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIFVwZGF0YWJsZVJvb3RSZWZlcmVuY2UsIFN0YXRlIH0gZnJvbSAnLi9saWIvcmVmZXJlbmNlcy9yb290JztcbmV4cG9ydCB7IENvbnN0UmVmZXJlbmNlIH0gZnJvbSAnQGdsaW1tZXIvcmVmZXJlbmNlJztcbmV4cG9ydCB7IGlzQ29uc3QgfSBmcm9tICdAZ2xpbW1lci92YWxpZGF0b3InO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==

@@ -1,199 +0,205 @@

'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
exports.CLASS_META = undefined;
exports.metaFor = metaFor;
exports.default = exports.CLASS_META = void 0;
var _descriptors = require('./references/descriptors');
var _descriptors = require("./references/descriptors");
var _root = require('./references/root');
var _root = _interopRequireDefault(require("./references/root"));
var _root2 = _interopRequireDefault(_root);
var _util = require("@glimmer/util");
var _util = require('@glimmer/util');
var _validator = require("@glimmer/validator");
var _validator = require('@glimmer/validator');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var NOOP_DESTROY = {
destroy: function destroy() {}
destroy: function destroy() {}
};
var ConstPath = function () {
function ConstPath(parent, property) {
_classCallCheck(this, ConstPath);
var ConstPath =
/*#__PURE__*/
function () {
function ConstPath(parent, property) {
this.parent = parent;
this.property = property;
this.tag = _validator.CURRENT_TAG;
this.parent = parent;
}
this.parent = parent;
this.property = property;
this.tag = _validator.CURRENT_TAG;
this.parent = parent;
}
var _proto = ConstPath.prototype;
ConstPath.prototype.chain = function chain() {
return NOOP_DESTROY;
};
_proto.chain = function chain() {
return NOOP_DESTROY;
};
ConstPath.prototype.notify = function notify() {};
_proto.notify = function notify() {};
ConstPath.prototype.value = function value() {
return this.parent[this.property];
};
_proto.value = function value() {
return this.parent[this.property];
};
ConstPath.prototype.get = function get(prop) {
return new ConstPath(this.parent[this.property], prop);
};
_proto.get = function get(prop) {
return new ConstPath(this.parent[this.property], prop);
};
return ConstPath;
return ConstPath;
}();
var ConstRoot = function () {
function ConstRoot(value) {
_classCallCheck(this, ConstRoot);
var ConstRoot =
/*#__PURE__*/
function () {
function ConstRoot(value) {
this.tag = _validator.CURRENT_TAG;
this.inner = value;
}
this.tag = _validator.CURRENT_TAG;
this.inner = value;
}
var _proto2 = ConstRoot.prototype;
ConstRoot.prototype.update = function update(inner) {
this.inner = inner;
};
_proto2.update = function update(inner) {
this.inner = inner;
};
ConstRoot.prototype.chain = function chain() {
return NOOP_DESTROY;
};
_proto2.chain = function chain() {
return NOOP_DESTROY;
};
ConstRoot.prototype.notify = function notify() {};
_proto2.notify = function notify() {};
ConstRoot.prototype.value = function value() {
return this.inner;
};
_proto2.value = function value() {
return this.inner;
};
ConstRoot.prototype.referenceFromParts = function referenceFromParts(_parts) {
throw new Error('Not implemented');
};
_proto2.referenceFromParts = function referenceFromParts(_parts) {
throw new Error('Not implemented');
};
ConstRoot.prototype.chainFor = function chainFor(_prop) {
throw new Error('Not implemented');
};
_proto2.chainFor = function chainFor(_prop) {
throw new Error('Not implemented');
};
ConstRoot.prototype.get = function get(prop) {
return new ConstPath(this.inner, prop);
};
_proto2.get = function get(prop) {
return new ConstPath(this.inner, prop);
};
return ConstRoot;
return ConstRoot;
}();
var ConstMeta /*implements IMeta*/ = function () {
function ConstMeta(object) {
_classCallCheck(this, ConstMeta);
var ConstMeta
/*implements IMeta*/
=
/*#__PURE__*/
function () {
function ConstMeta(object) {
this.object = object;
}
this.object = object;
}
var _proto3 = ConstMeta.prototype;
ConstMeta.prototype.root = function root() {
return new ConstRoot(this.object);
};
_proto3.root = function root() {
return new ConstRoot(this.object);
};
return ConstMeta;
return ConstMeta;
}();
var CLASS_META = exports.CLASS_META = (0, _util.symbol)('CLASS_META');
var CLASS_META = (0, _util.symbol)('CLASS_META');
exports.CLASS_META = CLASS_META;
var hasOwnProperty = Object.hasOwnProperty;
var Meta = function () {
function Meta(object, _ref) {
var RootReferenceFactory = _ref.RootReferenceFactory;
var Meta =
/*#__PURE__*/
function () {
function Meta(object, _ref) {
var RootReferenceFactory = _ref.RootReferenceFactory;
this.references = null;
this.slots = null;
this.referenceTypes = null;
this.propertyMetadata = null;
this.object = object;
this.RootReferenceFactory = RootReferenceFactory || _root.default;
}
_classCallCheck(this, Meta);
Meta["for"] = function _for(obj) {
if (obj === null || obj === undefined) return new Meta(obj, {});
if (hasOwnProperty.call(obj, '_meta') && obj._meta) return obj._meta;
if (!Object.isExtensible(obj)) return new ConstMeta(obj);
var MetaToUse = Meta;
this.references = null;
this.slots = null;
this.referenceTypes = null;
this.propertyMetadata = null;
this.object = object;
this.RootReferenceFactory = RootReferenceFactory || _root2.default;
if (obj.constructor && obj.constructor[CLASS_META]) {
var classMeta = obj.constructor[CLASS_META];
MetaToUse = classMeta.InstanceMetaConstructor;
} else if (obj[CLASS_META]) {
MetaToUse = obj[CLASS_META].InstanceMetaConstructor;
}
Meta.for = function _for(obj) {
if (obj === null || obj === undefined) return new Meta(obj, {});
if (hasOwnProperty.call(obj, '_meta') && obj._meta) return obj._meta;
if (!Object.isExtensible(obj)) return new ConstMeta(obj);
var MetaToUse = Meta;
if (obj.constructor && obj.constructor[CLASS_META]) {
var classMeta = obj.constructor[CLASS_META];
MetaToUse = classMeta.InstanceMetaConstructor;
} else if (obj[CLASS_META]) {
MetaToUse = obj[CLASS_META].InstanceMetaConstructor;
}
return obj._meta = new MetaToUse(obj, {});
};
return obj._meta = new MetaToUse(obj, {});
};
Meta.exists = function exists(obj) {
return typeof obj === 'object' && obj._meta;
};
Meta.exists = function exists(obj) {
return typeof obj === 'object' && obj._meta;
};
Meta.metadataForProperty = function metadataForProperty(_key) {
return null;
};
Meta.metadataForProperty = function metadataForProperty(_key) {
return null;
};
Meta.prototype.toJSON = function toJSON() {
return '<META>';
};
var _proto4 = Meta.prototype;
Meta.prototype.addReference = function addReference(property, reference) {
var refs = this.references = this.references || (0, _util.dict)();
var set = refs[property] = refs[property] || new _util.DictSet();
set.add(reference);
};
_proto4.toJSON = function toJSON() {
return '<META>';
};
Meta.prototype.addReferenceTypeFor = function addReferenceTypeFor(property, type) {
this.referenceTypes = this.referenceTypes || (0, _util.dict)();
this.referenceTypes[property] = type;
};
_proto4.addReference = function addReference(property, reference) {
var refs = this.references = this.references || (0, _util.dict)();
var set = refs[property] = refs[property] || new _util.DictSet();
set.add(reference);
};
Meta.prototype.referenceTypeFor = function referenceTypeFor(property) {
if (!this.referenceTypes) return _descriptors.PropertyReference;
return this.referenceTypes[property] || _descriptors.PropertyReference;
};
_proto4.addReferenceTypeFor = function addReferenceTypeFor(property, type) {
this.referenceTypes = this.referenceTypes || (0, _util.dict)();
this.referenceTypes[property] = type;
};
Meta.prototype.removeReference = function removeReference(property, reference) {
if (!this.references) return;
var set = this.references[property];
set.delete(reference);
};
_proto4.referenceTypeFor = function referenceTypeFor(property) {
if (!this.referenceTypes) return _descriptors.PropertyReference;
return this.referenceTypes[property] || _descriptors.PropertyReference;
};
Meta.prototype.getReferenceTypes = function getReferenceTypes() {
this.referenceTypes = this.referenceTypes || (0, _util.dict)();
return this.referenceTypes;
};
_proto4.removeReference = function removeReference(property, reference) {
if (!this.references) return;
var set = this.references[property];
set["delete"](reference);
};
Meta.prototype.referencesFor = function referencesFor(property) {
if (!this.references) return null;
return this.references[property];
};
_proto4.getReferenceTypes = function getReferenceTypes() {
this.referenceTypes = this.referenceTypes || (0, _util.dict)();
return this.referenceTypes;
};
Meta.prototype.getSlots = function getSlots() {
return this.slots = this.slots || (0, _util.dict)();
};
_proto4.referencesFor = function referencesFor(property) {
if (!this.references) return null;
return this.references[property];
};
Meta.prototype.root = function root() {
return this.rootCache = this.rootCache || new this.RootReferenceFactory(this.object);
};
_proto4.getSlots = function getSlots() {
return this.slots = this.slots || (0, _util.dict)();
};
return Meta;
_proto4.root = function root() {
return this.rootCache = this.rootCache || new this.RootReferenceFactory(this.object);
};
return Meta;
}();
exports.default = Meta;
var _default = Meta;
exports.default = _default;
function metaFor(obj) {
return Meta.for(obj);
return Meta["for"](obj);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL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FJlZmVyZW5jZUZhY3Rvcnk8YW55Pj4oKTtcbiAgICByZXR1cm4gdGhpcy5yZWZlcmVuY2VUeXBlcztcbiAgfVxuXG4gIHJlZmVyZW5jZXNGb3IocHJvcGVydHk6IHN0cmluZyk6IE9wdGlvbjxTZXQ8SVBhdGhSZWZlcmVuY2U8YW55Pj4+IHtcbiAgICBpZiAoIXRoaXMucmVmZXJlbmNlcykgcmV0dXJuIG51bGw7XG4gICAgcmV0dXJuIHRoaXMucmVmZXJlbmNlc1twcm9wZXJ0eV07XG4gIH1cblxuICBnZXRTbG90cygpIHtcbiAgICByZXR1cm4gKHRoaXMuc2xvdHMgPSB0aGlzLnNsb3RzIHx8IGRpY3QoKSk7XG4gIH1cblxuICByb290KCk6IElSb290UmVmZXJlbmNlPGFueT4ge1xuICAgIHJldHVybiAodGhpcy5yb290Q2FjaGUgPSB0aGlzLnJvb3RDYWNoZSB8fCBuZXcgdGhpcy5Sb290UmVmZXJlbmNlRmFjdG9yeSh0aGlzLm9iamVjdCkpO1xuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IE1ldGE7XG5cbmludGVyZmFjZSBDbGFzc01ldGEge1xuICBJbnN0YW5jZU1ldGFDb25zdHJ1Y3RvcjogdHlwZW9mIE1ldGE7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBtZXRhRm9yKG9iajogYW55KTogSU1ldGEge1xuICByZXR1cm4gTWV0YS5mb3Iob2JqKTtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=

@@ -1,5 +0,5 @@

'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});

@@ -9,3 +9,3 @@ exports.setProperty = setProperty;

var _validator = require('@glimmer/validator');
var _validator = require("@glimmer/validator");

@@ -15,20 +15,19 @@ // import { metaFor } from './meta';

function setProperty(parent, property, val) {
// let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
parent[property] = val;
(0, _validator.bump)();
// if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
// let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
parent[property] = val;
(0, _validator.bump)(); // if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
}
function notifyProperty(_parent, _property) {
(0, _validator.bump)();
// let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
// if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
(0, _validator.bump)(); // let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
// if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL29iamVjdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztRQUtNLFcsR0FBQSxXO1FBZUEsYyxHQUFBLGM7Ozs7QUFsQk47QUFDQTtBQUVNLFNBQUEsV0FBQSxDQUFBLE1BQUEsRUFBQSxRQUFBLEVBQUEsR0FBQSxFQUE2RDtBQUNqRTtBQUVBO0FBRUEsV0FBQSxRQUFBLElBQUEsR0FBQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBRUE7QUFDRDtBQUVLLFNBQUEsY0FBQSxDQUFBLE9BQUEsRUFBQSxTQUFBLEVBQXdEO0FBQzVEO0FBQ0E7QUFFQTtBQUVBO0FBQ0E7QUFDQTtBQUVBO0FBQ0QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBidW1wIH0gZnJvbSAnQGdsaW1tZXIvdmFsa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2VzVG9Ob3RpZnkgPSBtZXRhRm9yKHBhcmVudCkucmVmZXJlbmNlc0Zvcihwcm9wZXJ0eSkpO1xuXG4gIHBhcmVudFtwcm9wZXJ0eV0gPSB2YWw7XG4gIGJ1bXAoKTtcblxuICAvLyBpZiAocmVmZXJlbmNlc1RvTm90aWZ5KSB7XG4gIC8vICAgcmVmZXJlbmNlc1RvTm90aWZ5LmZvckVhY2goZnVuY3Rpb24ocmVmKSB7IHJlZi5ub3RpZnkoKTsgfSk7XG4gIC8vIH1cblxuICAvLyBpZiAocm9vdFByb3ApIHJvb3RQcm9wLm5vdGlmeSgpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gbm90aWZ5UHJvcGVydHkoX3BhcmVudDogYW55LCBfcHJvcGVydHk6IHN0cmluZykge1xuICBidW1wKCk7XG4gIC8vIGxldCByb290UHJvcCA9IG1ldGFGb3IocGFyZW50KS5yb290KCkuY2hhaW5Gb3IocHJvcGVydHkpKTtcblxuICAvLyBsZXQgcmVmZXJlbmNlc1RvTm90aWZ5ID0gbWV0YUZvcihwYXJlbnQpLnJlZmVyZW5jZXNGb3IocHJvcGVydHkpKTtcblxuICAvLyBpZiAocmVmZXJlbmNlc1RvTm90aWZ5KSB7XG4gIC8vICAgcmVmZXJlbmNlc1RvTm90aWZ5LmZvckVhY2goZnVuY3Rpb24ocmVmKSB7IHJlZi5ub3RpZnkoKTsgfSk7XG4gIC8vIH1cblxuICAvLyBpZiAocm9vdFByb3ApIHJvb3RQcm9wLm5vdGlmeSgpO1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ==

@@ -1,73 +0,75 @@

'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
exports.PropertyReference = undefined;
exports.ComputedReferenceBlueprint = ComputedReferenceBlueprint;
exports.PropertyReference = void 0;
var _meta = require('../meta');
var _meta = _interopRequireDefault(require("../meta"));
var _meta2 = _interopRequireDefault(_meta);
var _validator = require("@glimmer/validator");
var _validator = require('@glimmer/validator');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var PropertyReference =
/*#__PURE__*/
function () {
function PropertyReference(object, property, _outer) {
this.tag = _validator.CURRENT_TAG;
this.object = object;
this.property = property;
}
var PropertyReference = exports.PropertyReference = function () {
function PropertyReference(object, property, _outer) {
_classCallCheck(this, PropertyReference);
var _proto = PropertyReference.prototype;
_proto.value = function value() {
return this.object[this.property];
};
_proto.label = function label() {
return '[reference Property]';
};
return PropertyReference;
}();
exports.PropertyReference = PropertyReference;
function ComputedReferenceBlueprint(_property, dependencies) {
return (
/*#__PURE__*/
function () {
function ComputedReference(object, property) {
this.installed = false;
this.tag = _validator.CURRENT_TAG;
this.object = object;
this.property = property;
}
this.dependencies = dependencies;
}
PropertyReference.prototype.value = function value() {
return this.object[this.property];
};
var _proto2 = ComputedReference.prototype;
PropertyReference.prototype.label = function label() {
return '[reference Property]';
};
_proto2.value = function value() {
if (!this.installed) {
var root = _meta.default["for"](this.object).root();
return PropertyReference;
}();
function ComputedReferenceBlueprint(_property, dependencies) {
return function () {
function ComputedReference(object, property) {
_classCallCheck(this, ComputedReference);
this.installed = false;
this.tag = _validator.CURRENT_TAG;
this.object = object;
this.property = property;
this.dependencies = dependencies;
this.dependencies.forEach(function (dep) {
var ref = root.referenceFromParts(dep);
ref.value();
});
this.installed = true;
}
ComputedReference.prototype.value = function value() {
if (!this.installed) {
var root = _meta2.default.for(this.object).root();
this.dependencies.forEach(function (dep) {
var ref = root.referenceFromParts(dep);
ref.value();
});
this.installed = true;
}
return this.object[this.property];
};
return this.object[this.property];
};
ComputedReference.prototype.label = function label() {
return '[reference Computed]';
};
_proto2.label = function label() {
return '[reference Computed]';
};
return ComputedReference;
}();
return ComputedReference;
}()
);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi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b290ID0gTWV0YS5mb3IodGhpcy5vYmplY3QpLnJvb3QoKTtcblxuICAgICAgICB0aGlzLmRlcGVuZGVuY2llcy5mb3JFYWNoKGRlcCA9PiB7XG4gICAgICAgICAgbGV0IHJlZiA9IHJvb3QucmVmZXJlbmNlRnJvbVBhcnRzKGRlcCk7XG4gICAgICAgICAgcmVmLnZhbHVlKCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMuaW5zdGFsbGVkID0gdHJ1ZTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHRoaXMub2JqZWN0W3RoaXMucHJvcGVydHldO1xuICAgIH1cblxuICAgIGxhYmVsKCkge1xuICAgICAgcmV0dXJuICdbcmVmZXJlbmNlIENvbXB1dGVkXSc7XG4gICAgfVxuICB9O1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ==

@@ -1,89 +0,86 @@

'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
exports.PathReference = undefined;
exports.PathReference = exports.default = void 0;
var _utils = require('../utils');
var _utils = require("../utils");
var _util = require('@glimmer/util');
var _util = require("@glimmer/util");
var _meta = require('../meta');
var _meta = _interopRequireDefault(require("../meta"));
var _meta2 = _interopRequireDefault(_meta);
var _descriptors = require("./descriptors");
var _descriptors = require('./descriptors');
var _validator = require("@glimmer/validator");
var _validator = require('@glimmer/validator');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var PathReference =
/*#__PURE__*/
function () {
function PathReference(parent, property) {
this.cache = _utils.EMPTY_CACHE;
this.inner = null;
this.chains = null;
this.lastParentValue = _utils.EMPTY_CACHE;
this._guid = 0;
this.tag = _validator.CURRENT_TAG;
this.parent = parent;
this.property = property;
}
var PathReference = function () {
function PathReference(parent, property) {
_classCallCheck(this, PathReference);
var _proto = PathReference.prototype;
this.cache = _utils.EMPTY_CACHE;
this.inner = null;
this.chains = null;
this.lastParentValue = _utils.EMPTY_CACHE;
this._guid = 0;
this.tag = _validator.CURRENT_TAG;
this.parent = parent;
this.property = property;
_proto.value = function value() {
var lastParentValue = this.lastParentValue,
property = this.property,
inner = this.inner;
var parentValue = this._parentValue();
if (parentValue === null || parentValue === undefined) {
return this.cache = undefined;
}
PathReference.prototype.value = function value() {
var lastParentValue = this.lastParentValue,
property = this.property,
inner = this.inner;
if (lastParentValue === parentValue) {
inner = this.inner;
} else {
var ReferenceType = typeof parentValue === 'object' ? _meta.default["for"](parentValue).referenceTypeFor(property) : _descriptors.PropertyReference;
inner = this.inner = new ReferenceType(parentValue, property, this);
} // if (typeof parentValue === 'object') {
// Meta.for(parentValue).addReference(property, this);
// }
var parentValue = this._parentValue();
if (parentValue === null || parentValue === undefined) {
return this.cache = undefined;
}
if (lastParentValue === parentValue) {
inner = this.inner;
} else {
var ReferenceType = typeof parentValue === 'object' ? _meta2.default.for(parentValue).referenceTypeFor(property) : _descriptors.PropertyReference;
inner = this.inner = new ReferenceType(parentValue, property, this);
}
// if (typeof parentValue === 'object') {
// Meta.for(parentValue).addReference(property, this);
// }
return this.cache = inner.value();
};
PathReference.prototype.get = function get(prop) {
var chains = this._getChains();
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
};
return this.cache = inner.value();
};
PathReference.prototype.label = function label() {
return '[reference Direct]';
};
_proto.get = function get(prop) {
var chains = this._getChains();
PathReference.prototype._getChains = function _getChains() {
if (this.chains) return this.chains;
return this.chains = (0, _util.dict)();
};
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
};
PathReference.prototype._parentValue = function _parentValue() {
var parent = this.parent.value();
this.lastParentValue = parent;
return parent;
};
_proto.label = function label() {
return '[reference Direct]';
};
return PathReference;
_proto._getChains = function _getChains() {
if (this.chains) return this.chains;
return this.chains = (0, _util.dict)();
};
_proto._parentValue = function _parentValue() {
var parent = this.parent.value();
this.lastParentValue = parent;
return parent;
};
return PathRe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m9wIGFzIHN0cmluZykgaW4gY2hhaW5zKSByZXR1cm4gY2hhaW5zW3Byb3BdO1xuICAgIHJldHVybiAoY2hhaW5zW3Byb3BdID0gbmV3IFBhdGhSZWZlcmVuY2UodGhpcywgcHJvcCkpO1xuICB9XG5cbiAgbGFiZWwoKTogc3RyaW5nIHtcbiAgICByZXR1cm4gJ1tyZWZlcmVuY2UgRGlyZWN0XSc7XG4gIH1cblxuICBwcml2YXRlIF9nZXRDaGFpbnMoKTogRGljdDxQYXRoUmVmZXJlbmNlPGFueT4+IHtcbiAgICBpZiAodGhpcy5jaGFpbnMpIHJldHVybiB0aGlzLmNoYWlucztcbiAgICByZXR1cm4gKHRoaXMuY2hhaW5zID0gZGljdDxQYXRoUmVmZXJlbmNlPGFueT4+KCkpO1xuICB9XG5cbiAgcHJpdmF0ZSBfcGFyZW50VmFsdWUoKSB7XG4gICAgbGV0IHBhcmVudCA9IHRoaXMucGFyZW50LnZhbHVlKCk7XG4gICAgdGhpcy5sYXN0UGFyZW50VmFsdWUgPSBwYXJlbnQ7XG4gICAgcmV0dXJuIHBhcmVudDtcbiAgfVxufVxuXG5leHBvcnQgeyBQYXRoUmVmZXJlbmNlIH07XG4iXSwic291cmNlUm9vdCI6IiJ9
exports.PathReference = exports.default = PathReference;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3JlZmVyZW5jZXMvcGF0aC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUE7O0FBQ0E7O0FBQ0E7O0FBQ0E7O0FBRUE7Ozs7SUFJYyxhOzs7QUFVWixXQUFBLGFBQUEsQ0FBQSxNQUFBLEVBQUEsUUFBQSxFQUF1RDtBQVA3QyxTQUFBLEtBQUEsR0FBQSxrQkFBQTtBQUNGLFNBQUEsS0F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KTogRGljdDxQYXRoUmVmZXJlbmNlPGFueT4+IHtcbiAgICBpZiAodGhpcy5jaGFpbnMpIHJldHVybiB0aGlzLmNoYWlucztcbiAgICByZXR1cm4gKHRoaXMuY2hhaW5zID0gZGljdDxQYXRoUmVmZXJlbmNlPGFueT4+KCkpO1xuICB9XG5cbiAgcHJpdmF0ZSBfcGFyZW50VmFsdWUoKSB7XG4gICAgbGV0IHBhcmVudCA9IHRoaXMucGFyZW50LnZhbHVlKCk7XG4gICAgdGhpcy5sYXN0UGFyZW50VmFsdWUgPSBwYXJlbnQ7XG4gICAgcmV0dXJuIHBhcmVudDtcbiAgfVxufVxuXG5leHBvcnQgeyBQYXRoUmVmZXJlbmNlIH07XG4iXSwic291cmNlUm9vdCI6IiJ9

@@ -1,71 +0,69 @@

'use strict';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});
exports.State = State;
exports.default = void 0;
var _util = require('@glimmer/util');
var _util = require("@glimmer/util");
var _path = require('./path');
var _path = require("./path");
var _validator = require('@glimmer/validator');
var _validator = require("@glimmer/validator");
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var RootReference =
/*#__PURE__*/
function () {
function RootReference(object) {
this.chains = (0, _util.dict)();
this.tag = _validator.CURRENT_TAG;
this.object = object;
}
var RootReference = function () {
function RootReference(object) {
_classCallCheck(this, RootReference);
var _proto = RootReference.prototype;
this.chains = (0, _util.dict)();
this.tag = _validator.CURRENT_TAG;
this.object = object;
}
_proto.value = function value() {
return this.object;
};
RootReference.prototype.value = function value() {
return this.object;
};
_proto.update = function update(object) {
this.object = object;
(0, _validator.bump)();
};
RootReference.prototype.update = function update(object) {
this.object = object;
(0, _validator.bump)();
};
_proto.get = function get(prop) {
var chains = this.chains;
if (prop in chains) return chains[prop];
return chains[prop] = new _path.PathReference(this, prop);
};
RootReference.prototype.get = function get(prop) {
var chains = this.chains;
if (prop in chains) return chains[prop];
return chains[prop] = new _path.PathReference(this, prop);
};
_proto.chainFor = function chainFor(prop) {
var chains = this.chains;
if (prop in chains) return chains[prop];
return null;
};
RootReference.prototype.chainFor = function chainFor(prop) {
var chains = this.chains;
if (prop in chains) return chains[prop];
return null;
};
_proto.path = function path(string) {
return this.referenceFromParts(string.split('.'));
};
RootReference.prototype.path = function path(string) {
return this.referenceFromParts(string.split('.'));
};
_proto.referenceFromParts = function referenceFromParts(parts) {
return parts.reduce(function (ref, part) {
return ref.get(part);
}, this);
};
RootReference.prototype.referenceFromParts = function referenceFromParts(parts) {
return parts.reduce(function (ref, part) {
return ref.get(part);
}, this);
};
_proto.label = function label() {
return '[reference Root]';
};
RootReference.prototype.label = function label() {
return '[reference Root]';
};
return RootReference;
return RootReference;
}();
exports.default = RootReference;
function State(object) {
return new RootReference(object);
return new RootReference(object);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3JlZmVyZW5jZXMvcm9vdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztRQW9ETSxLLEdBQUEsSzs7QUFwRE47O0FBQ0E7O0FBR0E7Ozs7Ozs7O0lBRWMsZ0I7QUFLWixhQUFBLGFBQUEsQ0FBQSxNQUFBLEVBQXFCO0FBQUEsd0JBQUEsSUFBQSxFQUFBLGFBQUE7O0FBSGIsYUFBQSxNQUFBLEdBQUEsaUJBQUE7QUFDRCxhQUFBLEdBQUEsR0FBQSxzQkFBQTtBQUdMLGFBQUEsTUFBQSxHQUFBLE1BQUE7QUFDRDs7NEJBRUQsSyxvQkFBSztBQUNILGVBQU8sS0FBUCxNQUFBOzs7NEJBR0YsTSxtQkFBQSxNLEVBQWdCO0FBQ2QsYUFBQSxNQUFBLEdBQUEsTUFBQTtBQUNBOzs7NEJBR0YsRyxnQkFBQSxJLEVBQW1C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lbmNlPFQ+IHtcbiAgcmV0dXJuIG5ldyBSb290UmVmZXJlbmNlKG9iamVjdCk7XG59XG4iXSwic291cmNlUm9vdCI6IiJ9

@@ -7,3 +7,4 @@ "use strict";

exports.EMPTY_CACHE = EMPTY_CACHE;
function EMPTY_CACHE() {}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O1FBQU0sVyxHQUFBLFc7QUFBQSxTQUFBLFdBQUEsR0FBcUIsQ0FBSyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBFTVBUWV9DQUNIRSgpIHt9XG4iXSwic291cmNlUm9vdCI6IiJ9
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBTSxTQUFBLFdBQUEsR0FBcUIsQ0FBSyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBFTVBUWV9DQUNIRSgpIHt9XG4iXSwic291cmNlUm9vdCI6IiJ9

@@ -8,2 +8,2 @@ export { ComputedReferenceBlueprint, PropertyReference } from './lib/references/descriptors';

export { isConst } from '@glimmer/validator';
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEs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BPYmplY3RSZWZlcmVuY2UgfSBmcm9tICcuL2xpYi9yZWZlcmVuY2VzL3BhdGgnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBVcGRhdGFibGVSb290UmVmZXJlbmNlLCBTdGF0ZSB9IGZyb20gJy4vbGliL3JlZmVyZW5jZXMvcm9vdCc7XG5leHBvcnQgeyBDb25zdFJlZmVyZW5jZSB9IGZyb20gJ0BnbGltbWVyL3JlZmVyZW5jZSc7XG5leHBvcnQgeyBpc0NvbnN0IH0gZnJvbSAnQGdsaW1tZXIvdmFsaWRhdG9yJztcbiJdLCJzb3VyY2VSb290IjoiIn0=

@@ -5,124 +5,167 @@ import { PropertyReference } from './references/descriptors';

import { CURRENT_TAG } from '@glimmer/validator';
const NOOP_DESTROY = { destroy() {} };
const NOOP_DESTROY = {
destroy() {}
};
class ConstPath {
constructor(parent, property) {
this.parent = parent;
this.property = property;
this.tag = CURRENT_TAG;
this.parent = parent;
}
chain() {
return NOOP_DESTROY;
}
notify() {}
value() {
return this.parent[this.property];
}
get(prop) {
return new ConstPath(this.parent[this.property], prop);
}
constructor(parent, property) {
this.parent = parent;
this.property = property;
this.tag = CURRENT_TAG;
this.parent = parent;
}
chain() {
return NOOP_DESTROY;
}
notify() {}
value() {
return this.parent[this.property];
}
get(prop) {
return new ConstPath(this.parent[this.property], prop);
}
}
class ConstRoot {
constructor(value) {
this.tag = CURRENT_TAG;
this.inner = value;
}
update(inner) {
this.inner = inner;
}
chain() {
return NOOP_DESTROY;
}
notify() {}
value() {
return this.inner;
}
referenceFromParts(_parts) {
throw new Error('Not implemented');
}
chainFor(_prop) {
throw new Error('Not implemented');
}
get(prop) {
return new ConstPath(this.inner, prop);
}
constructor(value) {
this.tag = CURRENT_TAG;
this.inner = value;
}
update(inner) {
this.inner = inner;
}
chain() {
return NOOP_DESTROY;
}
notify() {}
value() {
return this.inner;
}
referenceFromParts(_parts) {
throw new Error('Not implemented');
}
chainFor(_prop) {
throw new Error('Not implemented');
}
get(prop) {
return new ConstPath(this.inner, prop);
}
}
class ConstMeta /*implements IMeta*/ {
constructor(object) {
this.object = object;
}
root() {
return new ConstRoot(this.object);
}
class ConstMeta
/*implements IMeta*/
{
constructor(object) {
this.object = object;
}
root() {
return new ConstRoot(this.object);
}
}
export const CLASS_META = symbol('CLASS_META');
const hasOwnProperty = Object.hasOwnProperty;
class Meta {
constructor(object, { RootReferenceFactory }) {
this.references = null;
this.slots = null;
this.referenceTypes = null;
this.propertyMetadata = null;
this.object = object;
this.RootReferenceFactory = RootReferenceFactory || RootReference;
constructor(object, {
RootReferenceFactory
}) {
this.references = null;
this.slots = null;
this.referenceTypes = null;
this.propertyMetadata = null;
this.object = object;
this.RootReferenceFactory = RootReferenceFactory || RootReference;
}
static for(obj) {
if (obj === null || obj === undefined) return new Meta(obj, {});
if (hasOwnProperty.call(obj, '_meta') && obj._meta) return obj._meta;
if (!Object.isExtensible(obj)) return new ConstMeta(obj);
let MetaToUse = Meta;
if (obj.constructor && obj.constructor[CLASS_META]) {
let classMeta = obj.constructor[CLASS_META];
MetaToUse = classMeta.InstanceMetaConstructor;
} else if (obj[CLASS_META]) {
MetaToUse = obj[CLASS_META].InstanceMetaConstructor;
}
static for(obj) {
if (obj === null || obj === undefined) return new Meta(obj, {});
if (hasOwnProperty.call(obj, '_meta') && obj._meta) return obj._meta;
if (!Object.isExtensible(obj)) return new ConstMeta(obj);
let MetaToUse = Meta;
if (obj.constructor && obj.constructor[CLASS_META]) {
let classMeta = obj.constructor[CLASS_META];
MetaToUse = classMeta.InstanceMetaConstructor;
} else if (obj[CLASS_META]) {
MetaToUse = obj[CLASS_META].InstanceMetaConstructor;
}
return obj._meta = new MetaToUse(obj, {});
}
static exists(obj) {
return typeof obj === 'object' && obj._meta;
}
static metadataForProperty(_key) {
return null;
}
toJSON() {
return '<META>';
}
addReference(property, reference) {
let refs = this.references = this.references || dict();
let set = refs[property] = refs[property] || new DictSet();
set.add(reference);
}
addReferenceTypeFor(property, type) {
this.referenceTypes = this.referenceTypes || dict();
this.referenceTypes[property] = type;
}
referenceTypeFor(property) {
if (!this.referenceTypes) return PropertyReference;
return this.referenceTypes[property] || PropertyReference;
}
removeReference(property, reference) {
if (!this.references) return;
let set = this.references[property];
set.delete(reference);
}
getReferenceTypes() {
this.referenceTypes = this.referenceTypes || dict();
return this.referenceTypes;
}
referencesFor(property) {
if (!this.references) return null;
return this.references[property];
}
getSlots() {
return this.slots = this.slots || dict();
}
root() {
return this.rootCache = this.rootCache || new this.RootReferenceFactory(this.object);
}
return obj._meta = new MetaToUse(obj, {});
}
static exists(obj) {
return typeof obj === 'object' && obj._meta;
}
static metadataForProperty(_key) {
return null;
}
toJSON() {
return '<META>';
}
addReference(property, reference) {
let refs = this.references = this.references || dict();
let set = refs[property] = refs[property] || new DictSet();
set.add(reference);
}
addReferenceTypeFor(property, type) {
this.referenceTypes = this.referenceTypes || dict();
this.referenceTypes[property] = type;
}
referenceTypeFor(property) {
if (!this.referenceTypes) return PropertyReference;
return this.referenceTypes[property] || PropertyReference;
}
removeReference(property, reference) {
if (!this.references) return;
let set = this.references[property];
set.delete(reference);
}
getReferenceTypes() {
this.referenceTypes = this.referenceTypes || dict();
return this.referenceTypes;
}
referencesFor(property) {
if (!this.references) return null;
return this.references[property];
}
getSlots() {
return this.slots = this.slots || dict();
}
root() {
return this.rootCache = this.rootCache || new this.RootReferenceFactory(this.object);
}
}
export default Meta;
export function metaFor(obj) {
return Meta.for(obj);
return Meta.for(obj);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL21ldGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsU0FBUyxpQkFBVCxRQUFrQywwQkFBbEM7QUFDQSxPQUFPLGFBQVAsTUFBMEIsbUJBQTFCO0FBR0EsU0FBaUIsT0FBakIsR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iB7XG4gICAgdGhpcy5yZWZlcmVuY2VUeXBlcyA9IHRoaXMucmVmZXJlbmNlVHlwZXMgfHwgZGljdDxQYXRoUmVmZXJlbmNlRmFjdG9yeTxhbnk+PigpO1xuICAgIHJldHVybiB0aGlzLnJlZmVyZW5jZVR5cGVzO1xuICB9XG5cbiAgcmVmZXJlbmNlc0Zvcihwcm9wZXJ0eTogc3RyaW5nKTogT3B0aW9uPFNldDxJUGF0aFJlZmVyZW5jZTxhbnk+Pj4ge1xuICAgIGlmICghdGhpcy5yZWZlcmVuY2VzKSByZXR1cm4gbnVsbDtcbiAgICByZXR1cm4gdGhpcy5yZWZlcmVuY2VzW3Byb3BlcnR5XTtcbiAgfVxuXG4gIGdldFNsb3RzKCkge1xuICAgIHJldHVybiAodGhpcy5zbG90cyA9IHRoaXMuc2xvdHMgfHwgZGljdCgpKTtcbiAgfVxuXG4gIHJvb3QoKTogSVJvb3RSZWZlcmVuY2U8YW55PiB7XG4gICAgcmV0dXJuICh0aGlzLnJvb3RDYWNoZSA9IHRoaXMucm9vdENhY2hlIHx8IG5ldyB0aGlzLlJvb3RSZWZlcmVuY2VGYWN0b3J5KHRoaXMub2JqZWN0KSk7XG4gIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgTWV0YTtcblxuaW50ZXJmYWNlIENsYXNzTWV0YSB7XG4gIEluc3RhbmNlTWV0YUNvbnN0cnVjdG9yOiB0eXBlb2YgTWV0YTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIG1ldGFGb3Iob2JqOiBhbnkpOiBJTWV0YSB7XG4gIHJldHVybiBNZXRhLmZvcihvYmopO1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ==

@@ -1,23 +0,21 @@

import { bump } from '@glimmer/validator';
// import { metaFor } from './meta';
import { bump } from '@glimmer/validator'; // import { metaFor } from './meta';
// import { intern } from '@glimmer/util';
export function setProperty(parent, property, val) {
// let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
parent[property] = val;
bump();
// if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
// let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
parent[property] = val;
bump(); // if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
}
export function notifyProperty(_parent, _property) {
bump();
// let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
// if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
bump(); // let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
// if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL29iamVjdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxTQUFTLElBQVQsUUFBcUIsb0JBQXJCO0FBRUE7QUFDQTtBQUVBLE9BQU0sU0FBVSxXQUFWLENBQXNCLE1BQXRCLEVBQW1DLFFBQW5DLEVBQXFELEdBQXJELEVBQTZEO0FBQ2pFO0FBRUE7QUFFQSxXQUFPLFFBQVAsSUFBbUIsR0FBbkI7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUVBO0FBQ0Q7QUFFRCxPQUFNLFNBQVUsY0FBVixDQUF5QixPQUF6QixFQUF1QyxTQUF2QyxFQUF3RDtBQUM1RDtBQUNBO0FBRUE7QUFFQTtBQUNBO0FBQ0E7QUFFQTtBQUNEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgYnVtcCB9IGZyb20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KS5yb290KCkuY2hhaW5Gb3IocHJvcGVydHkpKTtcblxuICAvLyBsZXQgcmVmZXJlbmNlc1RvTm90aWZ5ID0gbWV0YUZvcihwYXJlbnQpLnJlZmVyZW5jZXNGb3IocHJvcGVydHkpKTtcblxuICBwYXJlbnRbcHJvcGVydHldID0gdmFsO1xuICBidW1wKCk7XG5cbiAgLy8gaWYgKHJlZmVyZW5jZXNUb05vdGlmeSkge1xuICAvLyAgIHJlZmVyZW5jZXNUb05vdGlmeS5mb3JFYWNoKGZ1bmN0aW9uKHJlZikgeyByZWYubm90aWZ5KCk7IH0pO1xuICAvLyB9XG5cbiAgLy8gaWYgKHJvb3RQcm9wKSByb290UHJvcC5ub3RpZnkoKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIG5vdGlmeVByb3BlcnR5KF9wYXJlbnQ6IGFueSwgX3Byb3BlcnR5OiBzdHJpbmcpIHtcbiAgYnVtcCgpO1xuICAvLyBsZXQgcm9vdFByb3AgPSBtZXRhRm9yKHBhcmVudCkucm9vdCgpLmNoYWluRm9yKHByb3BlcnR5KSk7XG5cbiAgLy8gbGV0IHJlZmVyZW5jZXNUb05vdGlmeSA9IG1ldGFGb3IocGFyZW50KS5yZWZlcmVuY2VzRm9yKHByb3BlcnR5KSk7XG5cbiAgLy8gaWYgKHJlZmVyZW5jZXNUb05vdGlmeSkge1xuICAvLyAgIHJlZmVyZW5jZXNUb05vdGlmeS5mb3JFYWNoKGZ1bmN0aW9uKHJlZikgeyByZWYubm90aWZ5KCk7IH0pO1xuICAvLyB9XG5cbiAgLy8gaWYgKHJvb3RQcm9wKSByb290UHJvcC5ub3RpZnkoKTtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=
import Meta from '../meta';
import { CURRENT_TAG } from '@glimmer/validator';
export class PropertyReference {
constructor(object, property, _outer) {
this.tag = CURRENT_TAG;
this.object = object;
this.property = property;
constructor(object, property, _outer) {
this.tag = CURRENT_TAG;
this.object = object;
this.property = property;
}
value() {
return this.object[this.property];
}
label() {
return '[reference Property]';
}
}
export function ComputedReferenceBlueprint(_property, dependencies) {
return class ComputedReference {
constructor(object, property) {
this.installed = false;
this.tag = CURRENT_TAG;
this.object = object;
this.property = property;
this.dependencies = dependencies;
}
value() {
return this.object[this.property];
if (!this.installed) {
let root = Meta.for(this.object).root();
this.dependencies.forEach(dep => {
let ref = root.referenceFromParts(dep);
ref.value();
});
this.installed = true;
}
return this.object[this.property];
}
label() {
return '[reference Property]';
return '[reference Computed]';
}
};
}
export function ComputedReferenceBlueprint(_property, dependencies) {
return class ComputedReference {
constructor(object, property) {
this.installed = false;
this.tag = CURRENT_TAG;
this.object = object;
this.property = property;
this.dependencies = dependencies;
}
value() {
if (!this.installed) {
let root = Meta.for(this.object).root();
this.dependencies.forEach(dep => {
let ref = root.referenceFromParts(dep);
ref.value();
});
this.installed = true;
}
return this.object[this.property];
}
label() {
return '[reference Computed]';
}
};
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3JlZmVyZW5jZXMvZGVzY3JpcHRvcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxJQUFQLE1BQWlCLFNBQWpCO0FBRUEsU0FBYyxXQUFkLFFBQWlDLG9CQUFqQztBQU9BLE9BQU0sTUFBTyxpQkFBUCxDQUF3QjtBQUs1QixnQkFBWSxNQUFaLEVBQXlCLFFBQXpCLEVBQTJDLE1BQTNDLEVBQXlFO0FBRmxFLGFBQUEsR0FBQSxHQUFXLFdBQVg7QUFHTCxhQUFLLE1BQUwsR0FBYyxNQUFkO0FBQ0EsYUFBSyxRQUFMLEdBQWdCLFFBQWhCO0FBQ0Q7QUFFRCxZQUFLO0FBQ0gsZUFBTyxLQUFLLE1BQUwsQ0FBWSxLQUFLLFFBQWpCLENBQVA7QU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HJpdmF0ZSBvYmplY3Q6IGFueTtcbiAgICBwcml2YXRlIHByb3BlcnR5OiBzdHJpbmc7XG4gICAgcHJpdmF0ZSBkZXBlbmRlbmNpZXM6IHN0cmluZ1tdW107XG4gICAgcHJpdmF0ZSBpbnN0YWxsZWQgPSBmYWxzZTtcbiAgICBwdWJsaWMgdGFnOiBUYWcgPSBDVVJSRU5UX1RBRztcblxuICAgIGNvbnN0cnVjdG9yKG9iamVjdDogYW55LCBwcm9wZXJ0eTogc3RyaW5nKSB7XG4gICAgICB0aGlzLm9iamVjdCA9IG9iamVjdDtcbiAgICAgIHRoaXMucHJvcGVydHkgPSBwcm9wZXJ0eTtcbiAgICAgIHRoaXMuZGVwZW5kZW5jaWVzID0gZGVwZW5kZW5jaWVzO1xuICAgIH1cblxuICAgIHZhbHVlKCk6IFQge1xuICAgICAgaWYgKCF0aGlzLmluc3RhbGxlZCkge1xuICAgICAgICBsZXQgcm9vdCA9IE1ldGEuZm9yKHRoaXMub2JqZWN0KS5yb290KCk7XG5cbiAgICAgICAgdGhpcy5kZXBlbmRlbmNpZXMuZm9yRWFjaChkZXAgPT4ge1xuICAgICAgICAgIGxldCByZWYgPSByb290LnJlZmVyZW5jZUZyb21QYXJ0cyhkZXApO1xuICAgICAgICAgIHJlZi52YWx1ZSgpO1xuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLmluc3RhbGxlZCA9IHRydWU7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLm9iamVjdFt0aGlzLnByb3BlcnR5XTtcbiAgICB9XG5cbiAgICBsYWJlbCgpIHtcbiAgICAgIHJldHVybiAnW3JlZmVyZW5jZSBDb21wdXRlZF0nO1xuICAgIH1cbiAgfTtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVj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IE1ldGEuZm9yKHRoaXMub2JqZWN0KS5yb290KCk7XG5cbiAgICAgICAgdGhpcy5kZXBlbmRlbmNpZXMuZm9yRWFjaChkZXAgPT4ge1xuICAgICAgICAgIGxldCByZWYgPSByb290LnJlZmVyZW5jZUZyb21QYXJ0cyhkZXApO1xuICAgICAgICAgIHJlZi52YWx1ZSgpO1xuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLmluc3RhbGxlZCA9IHRydWU7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiB0aGlzLm9iamVjdFt0aGlzLnByb3BlcnR5XTtcbiAgICB9XG5cbiAgICBsYWJlbCgpIHtcbiAgICAgIHJldHVybiAnW3JlZmVyZW5jZSBDb21wdXRlZF0nO1xuICAgIH1cbiAgfTtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=

@@ -7,48 +7,63 @@ import { EMPTY_CACHE } from '../utils';

export default class PathReference {
constructor(parent, property) {
this.cache = EMPTY_CACHE;
this.inner = null;
this.chains = null;
this.lastParentValue = EMPTY_CACHE;
this._guid = 0;
this.tag = CURRENT_TAG;
this.parent = parent;
this.property = property;
constructor(parent, property) {
this.cache = EMPTY_CACHE;
this.inner = null;
this.chains = null;
this.lastParentValue = EMPTY_CACHE;
this._guid = 0;
this.tag = CURRENT_TAG;
this.parent = parent;
this.property = property;
}
value() {
let {
lastParentValue,
property,
inner
} = this;
let parentValue = this._parentValue();
if (parentValue === null || parentValue === undefined) {
return this.cache = undefined;
}
value() {
let { lastParentValue, property, inner } = this;
let parentValue = this._parentValue();
if (parentValue === null || parentValue === undefined) {
return this.cache = undefined;
}
if (lastParentValue === parentValue) {
inner = this.inner;
} else {
let ReferenceType = typeof parentValue === 'object' ? Meta.for(parentValue).referenceTypeFor(property) : PropertyReference;
inner = this.inner = new ReferenceType(parentValue, property, this);
}
// if (typeof parentValue === 'object') {
// Meta.for(parentValue).addReference(property, this);
// }
return this.cache = inner.value();
}
get(prop) {
let chains = this._getChains();
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
}
label() {
return '[reference Direct]';
}
_getChains() {
if (this.chains) return this.chains;
return this.chains = dict();
}
_parentValue() {
let parent = this.parent.value();
this.lastParentValue = parent;
return parent;
}
if (lastParentValue === parentValue) {
inner = this.inner;
} else {
let ReferenceType = typeof parentValue === 'object' ? Meta.for(parentValue).referenceTypeFor(property) : PropertyReference;
inner = this.inner = new ReferenceType(parentValue, property, this);
} // if (typeof parentValue === 'object') {
// Meta.for(parentValue).addReference(property, this);
// }
return this.cache = inner.value();
}
get(prop) {
let chains = this._getChains();
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
}
label() {
return '[reference Direct]';
}
_getChains() {
if (this.chains) return this.chains;
return this.chains = dict();
}
_parentValue() {
let parent = this.parent.value();
this.lastParentValue = parent;
return parent;
}
}
export { PathReference };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3JlZmVyZW5jZXMvcGF0aC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxTQUFTLFdBQVQsUUFBNEIsVUFBNUI7QUFDQSxTQUFTLElBQVQsUUFBcUIsZUFBckI7QUFDQSxPQUFPLElBQVAsTUFBaUIsU0FBakI7QUFDQSxTQUFTLGlCQUFULFFBQWtDLGVBQWxDO0FBRUEsU0FBYyxXQUFkLFFBQWlDLG9CQUFqQztBQUlBLGVBQWMsTUFBTyxhQUFQLENBQW9CO0FBVWhDLGdCQUFZLE1BQVosRUFBdUMsUUFBdkMsRUFBdUQ7QUFQN0MsYUFBQSxLQUFBLEdBQWEsV0FBYjtBQUNGLGFBQUEsS0FBQSxHQUE4QixJQUE5QjtBQUNBLGFBQUEsTUFBQSxHQUEyQyxJQUEzQztBQUNBLGFBQUEsZUFBQSxHQUF1QixXQUF2QjtBQUNELG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FJlZmVyZW5jZSB9O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==

@@ -5,37 +5,45 @@ import { dict } from '@glimmer/util';

export default class RootReference {
constructor(object) {
this.chains = dict();
this.tag = CURRENT_TAG;
this.object = object;
}
value() {
return this.object;
}
update(object) {
this.object = object;
bump();
}
get(prop) {
let chains = this.chains;
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
}
chainFor(prop) {
let chains = this.chains;
if (prop in chains) return chains[prop];
return null;
}
path(string) {
return this.referenceFromParts(string.split('.'));
}
referenceFromParts(parts) {
return parts.reduce((ref, part) => ref.get(part), this);
}
label() {
return '[reference Root]';
}
constructor(object) {
this.chains = dict();
this.tag = CURRENT_TAG;
this.object = object;
}
value() {
return this.object;
}
update(object) {
this.object = object;
bump();
}
get(prop) {
let chains = this.chains;
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
}
chainFor(prop) {
let chains = this.chains;
if (prop in chains) return chains[prop];
return null;
}
path(string) {
return this.referenceFromParts(string.split('.'));
}
referenceFromParts(parts) {
return parts.reduce((ref, part) => ref.get(part), this);
}
label() {
return '[reference Root]';
}
}
export function State(object) {
return new RootReference(object);
return new RootReference(object);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3JlZmVyZW5jZXMvcm9vdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxTQUFpQixJQUFqQixRQUE2QixlQUE3QjtBQUNBLFNBQVMsYUFBVCxRQUE4QixRQUE5QjtBQUdBLFNBQWMsV0FBZCxFQUEyQixJQUEzQixRQUF1QyxvQkFBdkM7QUFFQSxlQUFjLE1BQU8sYUFBUCxDQUFvQjtBQUtoQyxnQkFBWSxNQUFaLEVBQXFCO0FBSGIsYUFBQSxNQUFBLEdBQVMs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ua25vd24+IHtcbiAgICByZXR1cm4gcGFydHMucmVkdWNlKFxuICAgICAgKHJlZiwgcGFydCkgPT4gcmVmLmdldChwYXJ0KSBhcyBJUGF0aFJlZmVyZW5jZTx1bmtub3duPixcbiAgICAgIHRoaXMgYXMgSVBhdGhSZWZlcmVuY2U8dW5rbm93bj5cbiAgICApO1xuICB9XG5cbiAgbGFiZWwoKSB7XG4gICAgcmV0dXJuICdbcmVmZXJlbmNlIFJvb3RdJztcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gU3RhdGU8VD4ob2JqZWN0OiBUKTogUm9vdFJlZmVyZW5jZTxUPiB7XG4gIHJldHVybiBuZXcgUm9vdFJlZmVyZW5jZShvYmplY3QpO1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ==
export function EMPTY_CACHE() {}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJPQUFNLFNBQVUsV0FBVixHQUFxQixDQUFLIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGZ1bmN0aW9uIEVNUFRZX0NBQ0hFKCkge31cbiJdLCJzb3VyY2VSb290IjoiIn0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU0sU0FBVSxXQUFWLEdBQXFCLENBQUsiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gRU1QVFlfQ0FDSEUoKSB7fVxuIl0sInNvdXJjZVJvb3QiOiIifQ==

@@ -8,2 +8,2 @@ export { ComputedReferenceBlueprint, PropertyReference } from './lib/references/descriptors';

export { isConst } from '@glimmer/validator';
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsU0FBQSwwQkFBQSxFQUFBLGlCQUFBLFFBQUEsOEJBQUE7QUFLQSxTQUFBLFVBQUEsRUFBcUIsV0FBckIsSUFBQSxFQUFBLE9BQUEsUUFBQSxZQUFBO0FBQ0EsU0FBQSxXQUFBLEVBQUEsY0FBQSxRQUFBLGNBQUE7QUFFQSxTQUFTLFdBQVQsZUFBQSxRQUFBLHVCQUFBO0FBQ0EsU0FBUyxXQUFULHNCQUFBLEVBQUEsS0FBQSxRQUFBLHVCQUFBO0FBQ0EsU0FBQSxjQUFBLFFBQUEsb0JBQUE7QUFDQSxTQUFBLE9BQUEsUUFBQSxvQkFBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB7XG4gIENvbXB1dGVkUmVmZXJlbmNlQmx1ZXByaW50LFxuICBJbm5lclJlZmVyZW5jZUZhY3RvcnksXG4gIFByb3BlcnR5UmVmZXJlbmNlLFxufSBmcm9tICcuL2xpYi9yZWZlcmVuY2VzL2Rlc2NyaXB0b3JzJztcbmV4cG9ydCB7IENMQVNTX01FVEEsIGRlZmF1bHQgYXMgTWV0YSwgbWV0YUZvciB9IGZyb20gJy4vbGliL21ldGEnO1xuZXhwb3J0IHsgc2V0UHJvcGVydHksIG5vdGlmeVByb3BlcnR5IH0gZnJvbSAnLi9saWIvb2JqZWN0JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL3R5cGVzJztcbmV4cG9ydCB7IGRlZmF1bHQgYXMgT2JqZWN0UmVmZXJlbmNlIH0gZnJvbSAnLi9saWIvcmVmZ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YXVsdCBhcyBNZXRhLCBtZXRhRm9yIH0gZnJvbSAnLi9saWIvbWV0YSc7XG5leHBvcnQgeyBzZXRQcm9wZXJ0eSwgbm90aWZ5UHJvcGVydHkgfSBmcm9tICcuL2xpYi9vYmplY3QnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvdHlwZXMnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBPYmplY3RSZWZlcmVuY2UgfSBmcm9tICcuL2xpYi9yZWZlcmVuY2VzL3BhdGgnO1xuZXhwb3J0IHsgZGVmYXVsdCBhcyBVcGRhdGFibGVSb290UmVmZXJlbmNlLCBTdGF0ZSB9IGZyb20gJy4vbGliL3JlZmVyZW5jZXMvcm9vdCc7XG5leHBvcnQgeyBDb25zdFJlZmVyZW5jZSB9IGZyb20gJ0BnbGltbWVyL3JlZmVyZW5jZSc7XG5leHBvcnQgeyBpc0NvbnN0IH0gZnJvbSAnQGdsaW1tZXIvdmFsaWRhdG9yJztcbiJdLCJzb3VyY2VSb290IjoiIn0=

@@ -1,3 +0,1 @@

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
import { PropertyReference } from './references/descriptors';

@@ -8,81 +6,89 @@ import RootReference from './references/root';

var NOOP_DESTROY = {
destroy: function destroy() {}
destroy: function destroy() {}
};
var ConstPath = function () {
function ConstPath(parent, property) {
_classCallCheck(this, ConstPath);
var ConstPath =
/*#__PURE__*/
function () {
function ConstPath(parent, property) {
this.parent = parent;
this.property = property;
this.tag = CURRENT_TAG;
this.parent = parent;
}
this.parent = parent;
this.property = property;
this.tag = CURRENT_TAG;
this.parent = parent;
}
var _proto = ConstPath.prototype;
ConstPath.prototype.chain = function chain() {
return NOOP_DESTROY;
};
_proto.chain = function chain() {
return NOOP_DESTROY;
};
ConstPath.prototype.notify = function notify() {};
_proto.notify = function notify() {};
ConstPath.prototype.value = function value() {
return this.parent[this.property];
};
_proto.value = function value() {
return this.parent[this.property];
};
ConstPath.prototype.get = function get(prop) {
return new ConstPath(this.parent[this.property], prop);
};
_proto.get = function get(prop) {
return new ConstPath(this.parent[this.property], prop);
};
return ConstPath;
return ConstPath;
}();
var ConstRoot = function () {
function ConstRoot(value) {
_classCallCheck(this, ConstRoot);
var ConstRoot =
/*#__PURE__*/
function () {
function ConstRoot(value) {
this.tag = CURRENT_TAG;
this.inner = value;
}
this.tag = CURRENT_TAG;
this.inner = value;
}
var _proto2 = ConstRoot.prototype;
ConstRoot.prototype.update = function update(inner) {
this.inner = inner;
};
_proto2.update = function update(inner) {
this.inner = inner;
};
ConstRoot.prototype.chain = function chain() {
return NOOP_DESTROY;
};
_proto2.chain = function chain() {
return NOOP_DESTROY;
};
ConstRoot.prototype.notify = function notify() {};
_proto2.notify = function notify() {};
ConstRoot.prototype.value = function value() {
return this.inner;
};
_proto2.value = function value() {
return this.inner;
};
ConstRoot.prototype.referenceFromParts = function referenceFromParts(_parts) {
throw new Error('Not implemented');
};
_proto2.referenceFromParts = function referenceFromParts(_parts) {
throw new Error('Not implemented');
};
ConstRoot.prototype.chainFor = function chainFor(_prop) {
throw new Error('Not implemented');
};
_proto2.chainFor = function chainFor(_prop) {
throw new Error('Not implemented');
};
ConstRoot.prototype.get = function get(prop) {
return new ConstPath(this.inner, prop);
};
_proto2.get = function get(prop) {
return new ConstPath(this.inner, prop);
};
return ConstRoot;
return ConstRoot;
}();
var ConstMeta /*implements IMeta*/ = function () {
function ConstMeta(object) {
_classCallCheck(this, ConstMeta);
var ConstMeta
/*implements IMeta*/
=
/*#__PURE__*/
function () {
function ConstMeta(object) {
this.object = object;
}
this.object = object;
}
var _proto3 = ConstMeta.prototype;
ConstMeta.prototype.root = function root() {
return new ConstRoot(this.object);
};
_proto3.root = function root() {
return new ConstRoot(this.object);
};
return ConstMeta;
return ConstMeta;
}();

@@ -93,83 +99,86 @@

var Meta = function () {
function Meta(object, _ref) {
var RootReferenceFactory = _ref.RootReferenceFactory;
var Meta =
/*#__PURE__*/
function () {
function Meta(object, _ref) {
var RootReferenceFactory = _ref.RootReferenceFactory;
this.references = null;
this.slots = null;
this.referenceTypes = null;
this.propertyMetadata = null;
this.object = object;
this.RootReferenceFactory = RootReferenceFactory || RootReference;
}
_classCallCheck(this, Meta);
Meta["for"] = function _for(obj) {
if (obj === null || obj === undefined) return new Meta(obj, {});
if (hasOwnProperty.call(obj, '_meta') && obj._meta) return obj._meta;
if (!Object.isExtensible(obj)) return new ConstMeta(obj);
var MetaToUse = Meta;
this.references = null;
this.slots = null;
this.referenceTypes = null;
this.propertyMetadata = null;
this.object = object;
this.RootReferenceFactory = RootReferenceFactory || RootReference;
if (obj.constructor && obj.constructor[CLASS_META]) {
var classMeta = obj.constructor[CLASS_META];
MetaToUse = classMeta.InstanceMetaConstructor;
} else if (obj[CLASS_META]) {
MetaToUse = obj[CLASS_META].InstanceMetaConstructor;
}
Meta.for = function _for(obj) {
if (obj === null || obj === undefined) return new Meta(obj, {});
if (hasOwnProperty.call(obj, '_meta') && obj._meta) return obj._meta;
if (!Object.isExtensible(obj)) return new ConstMeta(obj);
var MetaToUse = Meta;
if (obj.constructor && obj.constructor[CLASS_META]) {
var classMeta = obj.constructor[CLASS_META];
MetaToUse = classMeta.InstanceMetaConstructor;
} else if (obj[CLASS_META]) {
MetaToUse = obj[CLASS_META].InstanceMetaConstructor;
}
return obj._meta = new MetaToUse(obj, {});
};
return obj._meta = new MetaToUse(obj, {});
};
Meta.exists = function exists(obj) {
return typeof obj === 'object' && obj._meta;
};
Meta.exists = function exists(obj) {
return typeof obj === 'object' && obj._meta;
};
Meta.metadataForProperty = function metadataForProperty(_key) {
return null;
};
Meta.metadataForProperty = function metadataForProperty(_key) {
return null;
};
Meta.prototype.toJSON = function toJSON() {
return '<META>';
};
var _proto4 = Meta.prototype;
Meta.prototype.addReference = function addReference(property, reference) {
var refs = this.references = this.references || dict();
var set = refs[property] = refs[property] || new DictSet();
set.add(reference);
};
_proto4.toJSON = function toJSON() {
return '<META>';
};
Meta.prototype.addReferenceTypeFor = function addReferenceTypeFor(property, type) {
this.referenceTypes = this.referenceTypes || dict();
this.referenceTypes[property] = type;
};
_proto4.addReference = function addReference(property, reference) {
var refs = this.references = this.references || dict();
var set = refs[property] = refs[property] || new DictSet();
set.add(reference);
};
Meta.prototype.referenceTypeFor = function referenceTypeFor(property) {
if (!this.referenceTypes) return PropertyReference;
return this.referenceTypes[property] || PropertyReference;
};
_proto4.addReferenceTypeFor = function addReferenceTypeFor(property, type) {
this.referenceTypes = this.referenceTypes || dict();
this.referenceTypes[property] = type;
};
Meta.prototype.removeReference = function removeReference(property, reference) {
if (!this.references) return;
var set = this.references[property];
set.delete(reference);
};
_proto4.referenceTypeFor = function referenceTypeFor(property) {
if (!this.referenceTypes) return PropertyReference;
return this.referenceTypes[property] || PropertyReference;
};
Meta.prototype.getReferenceTypes = function getReferenceTypes() {
this.referenceTypes = this.referenceTypes || dict();
return this.referenceTypes;
};
_proto4.removeReference = function removeReference(property, reference) {
if (!this.references) return;
var set = this.references[property];
set["delete"](reference);
};
Meta.prototype.referencesFor = function referencesFor(property) {
if (!this.references) return null;
return this.references[property];
};
_proto4.getReferenceTypes = function getReferenceTypes() {
this.referenceTypes = this.referenceTypes || dict();
return this.referenceTypes;
};
Meta.prototype.getSlots = function getSlots() {
return this.slots = this.slots || dict();
};
_proto4.referencesFor = function referencesFor(property) {
if (!this.references) return null;
return this.references[property];
};
Meta.prototype.root = function root() {
return this.rootCache = this.rootCache || new this.RootReferenceFactory(this.object);
};
_proto4.getSlots = function getSlots() {
return this.slots = this.slots || dict();
};
return Meta;
_proto4.root = function root() {
return this.rootCache = this.rootCache || new this.RootReferenceFactory(this.object);
};
return Meta;
}();

@@ -179,4 +188,4 @@

export function metaFor(obj) {
return Meta.for(obj);
return Meta["for"](obj);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamV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W5jZVR5cGVzID0gdGhpcy5yZWZlcmVuY2VUeXBlcyB8fCBkaWN0PFBhdGhSZWZlcmVuY2VGYWN0b3J5PGFueT4+KCk7XG4gICAgcmV0dXJuIHRoaXMucmVmZXJlbmNlVHlwZXM7XG4gIH1cblxuICByZWZlcmVuY2VzRm9yKHByb3BlcnR5OiBzdHJpbmcpOiBPcHRpb248U2V0PElQYXRoUmVmZXJlbmNlPGFueT4+PiB7XG4gICAgaWYgKCF0aGlzLnJlZmVyZW5jZXMpIHJldHVybiBudWxsO1xuICAgIHJldHVybiB0aGlzLnJlZmVyZW5jZXNbcHJvcGVydHldO1xuICB9XG5cbiAgZ2V0U2xvdHMoKSB7XG4gICAgcmV0dXJuICh0aGlzLnNsb3RzID0gdGhpcy5zbG90cyB8fCBkaWN0KCkpO1xuICB9XG5cbiAgcm9vdCgpOiBJUm9vdFJlZmVyZW5jZTxhbnk+IHtcbiAgICByZXR1cm4gKHRoaXMucm9vdENhY2hlID0gdGhpcy5yb290Q2FjaGUgfHwgbmV3IHRoaXMuUm9vdFJlZmVyZW5jZUZhY3RvcnkodGhpcy5vYmplY3QpKTtcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBNZXRhO1xuXG5pbnRlcmZhY2UgQ2xhc3NNZXRhIHtcbiAgSW5zdGFuY2VNZXRhQ29uc3RydWN0b3I6IHR5cGVvZiBNZXRhO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gbWV0YUZvcihvYmo6IGFueSk6IElNZXRhIHtcbiAgcmV0dXJuIE1ldGEuZm9yKG9iaik7XG59XG4iXSwic291cmNlUm9vdCI6IiJ9

@@ -1,23 +0,21 @@

import { bump } from '@glimmer/validator';
// import { metaFor } from './meta';
import { bump } from '@glimmer/validator'; // import { metaFor } from './meta';
// import { intern } from '@glimmer/util';
export function setProperty(parent, property, val) {
// let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
parent[property] = val;
bump();
// if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
// let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
parent[property] = val;
bump(); // if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
}
export function notifyProperty(_parent, _property) {
bump();
// let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
// if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
bump(); // let rootProp = metaFor(parent).root().chainFor(property));
// let referencesToNotify = metaFor(parent).referencesFor(property));
// if (referencesToNotify) {
// referencesToNotify.forEach(function(ref) { ref.notify(); });
// }
// if (rootProp) rootProp.notify();
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL29iamVjdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxTQUFBLElBQUEsUUFBQSxvQkFBQTtBQUVBO0FBQ0E7QUFFQSxPQUFNLFNBQUEsV0FBQSxDQUFBLE1BQUEsRUFBQSxRQUFBLEVBQUEsR0FBQSxFQUE2RDtBQUNqRTtBQUVBO0FBRUEsV0FBQSxRQUFBLElBQUEsR0FBQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBRUE7QUFDRDtBQUVELE9BQU0sU0FBQSxjQUFBLENBQUEsT0FBQSxFQUFBLFNBQUEsRUFBd0Q7QUFDNUQ7QUFDQTtBQUVBO0FBRUE7QUFDQTtBQUNBO0FBRUE7QUFDRCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGJ1bXAgfSBmcm9tICdAZ2xpbW1lci92YWxpZGF0b3InO1xuXG4vLyBpbXBvcnQgeyBtZ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XNUb05vdGlmeSA9IG1ldGFGb3IocGFyZW50KS5yZWZlcmVuY2VzRm9yKHByb3BlcnR5KSk7XG5cbiAgcGFyZW50W3Byb3BlcnR5XSA9IHZhbDtcbiAgYnVtcCgpO1xuXG4gIC8vIGlmIChyZWZlcmVuY2VzVG9Ob3RpZnkpIHtcbiAgLy8gICByZWZlcmVuY2VzVG9Ob3RpZnkuZm9yRWFjaChmdW5jdGlvbihyZWYpIHsgcmVmLm5vdGlmeSgpOyB9KTtcbiAgLy8gfVxuXG4gIC8vIGlmIChyb290UHJvcCkgcm9vdFByb3Aubm90aWZ5KCk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBub3RpZnlQcm9wZXJ0eShfcGFyZW50OiBhbnksIF9wcm9wZXJ0eTogc3RyaW5nKSB7XG4gIGJ1bXAoKTtcbiAgLy8gbGV0IHJvb3RQcm9wID0gbWV0YUZvcihwYXJlbnQpLnJvb3QoKS5jaGFpbkZvcihwcm9wZXJ0eSkpO1xuXG4gIC8vIGxldCByZWZlcmVuY2VzVG9Ob3RpZnkgPSBtZXRhRm9yKHBhcmVudCkucmVmZXJlbmNlc0Zvcihwcm9wZXJ0eSkpO1xuXG4gIC8vIGlmIChyZWZlcmVuY2VzVG9Ob3RpZnkpIHtcbiAgLy8gICByZWZlcmVuY2VzVG9Ob3RpZnkuZm9yRWFjaChmdW5jdGlvbihyZWYpIHsgcmVmLm5vdGlmeSgpOyB9KTtcbiAgLy8gfVxuXG4gIC8vIGlmIChyb290UHJvcCkgcm9vdFByb3Aubm90aWZ5KCk7XG59XG4iXSwic291cmNlUm9vdCI6IiJ9

@@ -1,55 +0,59 @@

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
import Meta from '../meta';
import { CURRENT_TAG } from '@glimmer/validator';
export var PropertyReference = function () {
function PropertyReference(object, property, _outer) {
_classCallCheck(this, PropertyReference);
export var PropertyReference =
/*#__PURE__*/
function () {
function PropertyReference(object, property, _outer) {
this.tag = CURRENT_TAG;
this.object = object;
this.property = property;
}
this.tag = CURRENT_TAG;
this.object = object;
this.property = property;
}
var _proto = PropertyReference.prototype;
PropertyReference.prototype.value = function value() {
return this.object[this.property];
};
_proto.value = function value() {
return this.object[this.property];
};
PropertyReference.prototype.label = function label() {
return '[reference Property]';
};
_proto.label = function label() {
return '[reference Property]';
};
return PropertyReference;
return PropertyReference;
}();
export function ComputedReferenceBlueprint(_property, dependencies) {
return function () {
function ComputedReference(object, property) {
_classCallCheck(this, ComputedReference);
return (
/*#__PURE__*/
function () {
function ComputedReference(object, property) {
this.installed = false;
this.tag = CURRENT_TAG;
this.object = object;
this.property = property;
this.dependencies = dependencies;
}
this.installed = false;
this.tag = CURRENT_TAG;
this.object = object;
this.property = property;
this.dependencies = dependencies;
var _proto2 = ComputedReference.prototype;
_proto2.value = function value() {
if (!this.installed) {
var root = Meta["for"](this.object).root();
this.dependencies.forEach(function (dep) {
var ref = root.referenceFromParts(dep);
ref.value();
});
this.installed = true;
}
ComputedReference.prototype.value = function value() {
if (!this.installed) {
var root = Meta.for(this.object).root();
this.dependencies.forEach(function (dep) {
var ref = root.referenceFromParts(dep);
ref.value();
});
this.installed = true;
}
return this.object[this.property];
};
return this.object[this.property];
};
ComputedReference.prototype.label = function label() {
return '[reference Computed]';
};
_proto2.label = function label() {
return '[reference Computed]';
};
return ComputedReference;
}();
return ComputedReference;
}()
);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3JlZmVyZW5jZXMvZGVzY3JpcHRvcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxPQUFBLElBQUEsTUFBQSxTQUFBO0FBRUEsU0FBQSxXQUFBLFFBQUEsb0JBQUE7QUFPQSxXQUFNLGlCQUFOO0FBS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FnID0gQ1VSUkVOVF9UQUc7XG5cbiAgICBjb25zdHJ1Y3RvcihvYmplY3Q6IGFueSwgcHJvcGVydHk6IHN0cmluZykge1xuICAgICAgdGhpcy5vYmplY3QgPSBvYmplY3Q7XG4gICAgICB0aGlzLnByb3BlcnR5ID0gcHJvcGVydHk7XG4gICAgICB0aGlzLmRlcGVuZGVuY2llcyA9IGRlcGVuZGVuY2llcztcbiAgICB9XG5cbiAgICB2YWx1ZSgpOiBUIHtcbiAgICAgIGlmICghdGhpcy5pbnN0YWxsZWQpIHtcbiAgICAgICAgbGV0IHJvb3QgPSBNZXRhLmZvcih0aGlzLm9iamVjdCkucm9vdCgpO1xuXG4gICAgICAgIHRoaXMuZGVwZW5kZW5jaWVzLmZvckVhY2goZGVwID0+IHtcbiAgICAgICAgICBsZXQgcmVmID0gcm9vdC5yZWZlcmVuY2VGcm9tUGFydHMoZGVwKTtcbiAgICAgICAgICByZWYudmFsdWUoKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgdGhpcy5pbnN0YWxsZWQgPSB0cnVlO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5vYmplY3RbdGhpcy5wcm9wZXJ0eV07XG4gICAgfVxuXG4gICAgbGFiZWwoKSB7XG4gICAgICByZXR1cm4gJ1tyZWZlcmVuY2UgQ29tcHV0ZWRdJztcbiAgICB9XG4gIH07XG59XG4iXSwic291cmNlUm9vdCI6IiJ9

@@ -1,3 +0,1 @@

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
import { EMPTY_CACHE } from '../utils';

@@ -9,64 +7,69 @@ import { dict } from '@glimmer/util';

var PathReference = function () {
function PathReference(parent, property) {
_classCallCheck(this, PathReference);
var PathReference =
/*#__PURE__*/
function () {
function PathReference(parent, property) {
this.cache = EMPTY_CACHE;
this.inner = null;
this.chains = null;
this.lastParentValue = EMPTY_CACHE;
this._guid = 0;
this.tag = CURRENT_TAG;
this.parent = parent;
this.property = property;
}
this.cache = EMPTY_CACHE;
this.inner = null;
this.chains = null;
this.lastParentValue = EMPTY_CACHE;
this._guid = 0;
this.tag = CURRENT_TAG;
this.parent = parent;
this.property = property;
var _proto = PathReference.prototype;
_proto.value = function value() {
var lastParentValue = this.lastParentValue,
property = this.property,
inner = this.inner;
var parentValue = this._parentValue();
if (parentValue === null || parentValue === undefined) {
return this.cache = undefined;
}
PathReference.prototype.value = function value() {
var lastParentValue = this.lastParentValue,
property = this.property,
inner = this.inner;
if (lastParentValue === parentValue) {
inner = this.inner;
} else {
var ReferenceType = typeof parentValue === 'object' ? Meta["for"](parentValue).referenceTypeFor(property) : PropertyReference;
inner = this.inner = new ReferenceType(parentValue, property, this);
} // if (typeof parentValue === 'object') {
// Meta.for(parentValue).addReference(property, this);
// }
var parentValue = this._parentValue();
if (parentValue === null || parentValue === undefined) {
return this.cache = undefined;
}
if (lastParentValue === parentValue) {
inner = this.inner;
} else {
var ReferenceType = typeof parentValue === 'object' ? Meta.for(parentValue).referenceTypeFor(property) : PropertyReference;
inner = this.inner = new ReferenceType(parentValue, property, this);
}
// if (typeof parentValue === 'object') {
// Meta.for(parentValue).addReference(property, this);
// }
return this.cache = inner.value();
};
PathReference.prototype.get = function get(prop) {
var chains = this._getChains();
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
};
return this.cache = inner.value();
};
PathReference.prototype.label = function label() {
return '[reference Direct]';
};
_proto.get = function get(prop) {
var chains = this._getChains();
PathReference.prototype._getChains = function _getChains() {
if (this.chains) return this.chains;
return this.chains = dict();
};
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
};
PathReference.prototype._parentValue = function _parentValue() {
var parent = this.parent.value();
this.lastParentValue = parent;
return parent;
};
_proto.label = function label() {
return '[reference Direct]';
};
return PathReference;
_proto._getChains = function _getChains() {
if (this.chains) return this.chains;
return this.chains = dict();
};
_proto._parentValue = function _parentValue() {
var parent = this.parent.value();
this.lastParentValue = parent;
return parent;
};
return PathReference;
}();
export default PathReference;
export { PathReference as default };
export { PathReference };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3JlZmVyZW5jZXMvcGF0aC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLFNBQUEsV0FBQSxRQUFBLFVBQUE7QUFDQSxTQUFBLElBQUEsUUFBQSxlQUFBO0FBQ0EsT0FBQSxJQUFBLE1BQUEsU0FBQTtBQUNBLFNBQUEsaUJBQUEsUUFBQSxlQUFBO0FBRUEsU0FBQSxXQUFBLFFBQUEsb0JBQUE7O0lBSWMsYTtBQVVaLDJCQUFBLE1BQUEsRUFBQSxRQUFBLEVBQXVEO0FBQUE7O0FBUDdDLGFBQUEsS0FBQSxHQUFBLFdBQUE7QUFDRixhQUFBLEtBQUEsR0FBQSxJQUFBO0FBQ0EsYUFBQSxNQUFBLEdBQUEsSUFBQTtBQUNBLGFBQUEsZUFBQSxHQUFBLFdBQUE7QUFDRCxhQUFBLEtBQUEsR0FBQSxDQUFBO0FBQ0EsYUFBQSxHQUFBLEdBQUEsV0FBQTtBQUdMLGFBQUEsTUFBQSxHQUFBLE1BQUE7QUFDQSxhQUFBLFFBQUEsR0FBQSxRQUFBO0FBQ0Q7OzRCQUVELEssb0JBQUs7QUFBQSxZQUNDLGVBREQsR0FDSCxJQURHLENBQ0MsZUFERDtBQUFBLFlBQ0MsUUFERCxHQUNILElBREcsQ0FDQyxRQUREO0FBQUEsWUFDQyxLQURELEdBQ0gsSUFERyxDQUNDLEtBREQ7O0FBRUgsWUFBSSxjQUFjLEtBQWxCLFlBQWtCLEVBQWxCO0FBRUEsWUFBSSxnQkFBQSxJQUFBLElBQXdCLGdCQUE1QixTQUFBLEVBQXVEO0FBQ3JELG1CQUFRLEtBQUEsS0FBQSxHQUFSLF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JvcCBhcyBzdHJpbmcpIGluIGNoYWlucykgcmV0dXJuIGNoYWluc1twcm9wXTtcbiAgICByZXR1cm4gKGNoYWluc1twcm9wXSA9IG5ldyBQYXRoUmVmZXJlbmNlKHRoaXMsIHByb3ApKTtcbiAgfVxuXG4gIGxhYmVsKCk6IHN0cmluZyB7XG4gICAgcmV0dXJuICdbcmVmZXJlbmNlIERpcmVjdF0nO1xuICB9XG5cbiAgcHJpdmF0ZSBfZ2V0Q2hhaW5zKCk6IERpY3Q8UGF0aFJlZmVyZW5jZTxhbnk+PiB7XG4gICAgaWYgKHRoaXMuY2hhaW5zKSByZXR1cm4gdGhpcy5jaGFpbnM7XG4gICAgcmV0dXJuICh0aGlzLmNoYWlucyA9IGRpY3Q8UGF0aFJlZmVyZW5jZTxhbnk+PigpKTtcbiAgfVxuXG4gIHByaXZhdGUgX3BhcmVudFZhbHVlKCkge1xuICAgIGxldCBwYXJlbnQgPSB0aGlzLnBhcmVudC52YWx1ZSgpO1xuICAgIHRoaXMubGFzdFBhcmVudFZhbHVlID0gcGFyZW50O1xuICAgIHJldHVybiBwYXJlbnQ7XG4gIH1cbn1cblxuZXhwb3J0IHsgUGF0aFJlZmVyZW5jZSB9O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==

@@ -1,3 +0,1 @@

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
import { dict } from '@glimmer/util';

@@ -7,54 +5,55 @@ import { PathReference } from './path';

var RootReference = function () {
function RootReference(object) {
_classCallCheck(this, RootReference);
var RootReference =
/*#__PURE__*/
function () {
function RootReference(object) {
this.chains = dict();
this.tag = CURRENT_TAG;
this.object = object;
}
this.chains = dict();
this.tag = CURRENT_TAG;
this.object = object;
}
var _proto = RootReference.prototype;
RootReference.prototype.value = function value() {
return this.object;
};
_proto.value = function value() {
return this.object;
};
RootReference.prototype.update = function update(object) {
this.object = object;
bump();
};
_proto.update = function update(object) {
this.object = object;
bump();
};
RootReference.prototype.get = function get(prop) {
var chains = this.chains;
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
};
_proto.get = function get(prop) {
var chains = this.chains;
if (prop in chains) return chains[prop];
return chains[prop] = new PathReference(this, prop);
};
RootReference.prototype.chainFor = function chainFor(prop) {
var chains = this.chains;
if (prop in chains) return chains[prop];
return null;
};
_proto.chainFor = function chainFor(prop) {
var chains = this.chains;
if (prop in chains) return chains[prop];
return null;
};
RootReference.prototype.path = function path(string) {
return this.referenceFromParts(string.split('.'));
};
_proto.path = function path(string) {
return this.referenceFromParts(string.split('.'));
};
RootReference.prototype.referenceFromParts = function referenceFromParts(parts) {
return parts.reduce(function (ref, part) {
return ref.get(part);
}, this);
};
_proto.referenceFromParts = function referenceFromParts(parts) {
return parts.reduce(function (ref, part) {
return ref.get(part);
}, this);
};
RootReference.prototype.label = function label() {
return '[reference Root]';
};
_proto.label = function label() {
return '[reference Root]';
};
return RootReference;
return RootReference;
}();
export default RootReference;
export { RootReference as default };
export function State(object) {
return new RootReference(object);
return new RootReference(object);
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3JlZmVyZW5jZXMvcm9vdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLFNBQUEsSUFBQSxRQUFBLGVBQUE7QUFDQSxTQUFBLGFBQUEsUUFBQSxRQUFBO0FBR0EsU0FBQSxXQUFBLEVBQUEsSUFBQSxRQUFBLG9CQUFBOztJQUVjLGE7QUFLWiwyQkFBQSxNQUFBLEVBQXFCO0FBQUE7O0FBSGIsYUFBQSxNQUFBLEdBQUEsTUFBQTtBQUNELGFBQUEsR0FBQSxHQUFBLFdBQUE7QUFHTCxhQUFBLE1BQUEsR0FBQSxNQUFBO0FBQ0Q7OzRCQUVELEssb0JBQUs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F0aFJlZmVyZW5jZTx1bmtub3duPixcbiAgICAgIHRoaXMgYXMgSVBhdGhSZWZlcmVuY2U8dW5rbm93bj5cbiAgICApO1xuICB9XG5cbiAgbGFiZWwoKSB7XG4gICAgcmV0dXJuICdbcmVmZXJlbmNlIFJvb3RdJztcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gU3RhdGU8VD4ob2JqZWN0OiBUKTogUm9vdFJlZmVyZW5jZTxUPiB7XG4gIHJldHVybiBuZXcgUm9vdFJlZmVyZW5jZShvYmplY3QpO1xufVxuIl0sInNvdXJjZVJvb3QiOiIifQ==
export function EMPTY_CACHE() {}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJPQUFNLFNBQUEsV0FBQSxHQUFxQixDQUFLIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGZ1bmN0aW9uIEVNUFRZX0NBQ0hFKCkge31cbiJdLCJzb3VyY2VSb290IjoiIn0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3BhY2thZ2VzL0BnbGltbWVyL29iamVjdC1yZWZlcmVuY2UvbGliL3V0aWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU0sU0FBQSxXQUFBLEdBQXFCLENBQUsiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gRU1QVFlfQ0FDSEUoKSB7fVxuIl0sInNvdXJjZVJvb3QiOiIifQ==
{
"name": "@glimmer/object-reference",
"version": "0.47.9",
"version": "0.48.0",
"description": "References for a Glimmer-compatible object model",

@@ -8,5 +8,6 @@ "repository": "https://github.com/glimmerjs/glimmer-vm/tree/master/packages/@glimmer/object-reference",

"dependencies": {
"@glimmer/util": "^0.47.9",
"@glimmer/reference": "^0.47.9",
"@glimmer/validator": "^0.47.9"
"@glimmer/util": "^0.48.0",
"@glimmer/interfaces": "^0.48.0",
"@glimmer/reference": "^0.48.0",
"@glimmer/validator": "^0.48.0"
},

@@ -13,0 +14,0 @@ "main": "dist/commonjs/es5/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc