/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../chunks/_rollupPluginBabelHelpers"],(function(t,e){"use strict";function n(t){return s(t,"",new Set,{})}function s(t,e,n,r){if(n.has(t))return r;n.add(t),e&&t.id&&(r[e]=t);for(const o of t.properties)if("string"!=typeof o.type){const t=e?`${e}.${o.name}`:o.name;s(o.type,t,n,r)}return n.delete(t),r}function r(t){const e=o(t,"",[]);return e.sort(((t,e)=>t.name.localeCompare(e.name))),e}function o(t,e,n){for(const s of t.properties){const t=e?`${e}.${s.name}`:s.name;"string"==typeof s.type?n.push({name:t,type:s.type,default:s.default,enum:s.enum}):0===s.type.properties.length?n.push({name:t,type:"unknown",default:s.default,enum:s.enum}):o(s.type,t,n)}return n}let u=function(){function t(){this.stack=[],this.seen=new Map}var n=t.prototype;return n.addProperty=function(t){this.currentClass.properties.push(t)},n.push=function(t,e){this.seen.set(e.id,e),this.stack.push({klass:e,propertyName:t})},n.pop=function(){return this.stack.pop().klass},e._createClass(t,[{key:"currentClass",get:function(){return this.stack.length?this.stack[this.stack.length-1].klass:null}},{key:"pathString",get:function(){return this.stack.map((t=>t.propertyName)).filter((t=>!!t)).join(".")}}]),t}();function a(t){const e=t.slice();return e.sort(),e}t.ScanContext=u,t.collectClassPaths=n,t.flatten=r,t.sorted=a,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
