/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{getOrCreateMapValue as e}from"./MapUtils.js";import{trackAccess as t}from"./accessorSupport/tracking.js";import{SimpleObservable as r}from"./accessorSupport/tracking/SimpleObservable.js";const s=new WeakMap;class o{constructor(){this._observables=new Map}get(s,o,c){const n=e(this._observables,o,()=>new r);return t(n),Reflect.get(s,o)}set(e,t,r,s){return Reflect.set(e,t,r),this._observables.get(t)?.notify(),!0}}function c(t){return!t||"object"!=typeof t||"__accessor__"in t?t:e(s,t,()=>new Proxy(t,new o))}export{c as createObservableProxy};
