{"version":3,"sources":["node_modules/@arcgis/core/core/Loadable.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport { _ as o } from \"../chunks/tslib.es6.js\";\nimport t from \"./Error.js\";\nimport { abortMaybe as r } from \"./maybe.js\";\nimport { EsriPromise as s } from \"./Promise.js\";\nimport { onAbortOrThrow as l } from \"./promiseUtils.js\";\nimport e from \"./Warning.js\";\nimport { property as a } from \"./accessorSupport/decorators/property.js\";\nimport { subclass as n } from \"./accessorSupport/decorators/subclass.js\";\nconst i = \"not-loaded\",\n d = \"loading\",\n h = \"failed\",\n c = \"loaded\",\n u = s => {\n let u = class extends s {\n constructor(...o) {\n super(...o), this._loadController = null, this.loadError = null, this.loadStatus = \"not-loaded\", this._set(\"loadWarnings\", []), this.addResolvingPromise(new Promise(o => {\n const r = this.load.bind(this);\n this.load = s => {\n const e = new Promise((o, r) => {\n const e = l(s, r);\n this.destroyed && r(new t(\"load:instance-destroyed\", `Instance of '${this.declaredClass || this.constructor.name}' is already destroyed`, {\n instance: this\n })), this.when(o, r).finally(() => {\n e && e.remove();\n });\n });\n if (this.loadStatus === i) {\n this._set(\"loadStatus\", d);\n const o = this._loadController = new AbortController();\n r({\n signal: o.signal\n });\n }\n return o(), e;\n };\n })), this.when(() => {\n this._set(\"loadStatus\", c), this._loadController = null;\n }, o => {\n this._set(\"loadStatus\", h), this._set(\"loadError\", o), this._loadController = null;\n });\n }\n destroy() {\n this._loadController && (this._loadController = r(this._loadController), this._promiseProps.abort()), this._set(\"loadError\", null), this._set(\"loadWarnings\", []);\n }\n get loaded() {\n return this.loadStatus === c;\n }\n get loadWarnings() {\n return this._get(\"loadWarnings\");\n }\n load() {\n return null;\n }\n cancelLoad() {\n return this.isFulfilled() || (this._set(\"loadError\", new t(\"load:cancelled\", \"Cancelled\")), this._loadController?.abort(), this._promiseProps.abort()), this;\n }\n };\n return o([a({\n readOnly: !0\n })], u.prototype, \"loaded\", null), o([a({\n readOnly: !0\n })], u.prototype, \"loadError\", void 0), o([a({\n clonable: !1\n })], u.prototype, \"loadStatus\", void 0), o([a({\n type: [e],\n readOnly: !0\n })], u.prototype, \"loadWarnings\", null), u = o([n(\"esri.core.Loadable\")], u), u;\n };\nlet p = class extends u(s) {};\np = o([n(\"esri.core.Loadable\")], p), function (o) {\n function t(o) {\n return !(!o || !o.load);\n }\n o.LoadableMixin = u, o.isLoadable = t;\n}(p || (p = {}));\nconst m = p;\nexport { m as default };"],"mappings":"0RAYA,IAAMA,EAAI,aACRC,EAAI,UACJC,EAAI,SACJC,EAAI,SACJC,EAAIC,GAAK,CACP,IAAID,EAAI,cAAcC,CAAE,CACtB,eAAeC,EAAG,CAChB,MAAM,GAAGA,CAAC,EAAG,KAAK,gBAAkB,KAAM,KAAK,UAAY,KAAM,KAAK,WAAa,aAAc,KAAK,KAAK,eAAgB,CAAC,CAAC,EAAG,KAAK,oBAAoB,IAAI,QAAQA,GAAK,CACxK,IAAMC,EAAI,KAAK,KAAK,KAAK,IAAI,EAC7B,KAAK,KAAOF,GAAK,CACf,IAAMG,EAAI,IAAI,QAAQ,CAACF,EAAGC,IAAM,CAC9B,IAAMC,EAAIC,EAAEJ,EAAGE,CAAC,EAChB,KAAK,WAAaA,EAAE,IAAIF,EAAE,0BAA2B,gBAAgB,KAAK,eAAiB,KAAK,YAAY,IAAI,yBAA0B,CACxI,SAAU,IACZ,CAAC,CAAC,EAAG,KAAK,KAAKC,EAAGC,CAAC,EAAE,QAAQ,IAAM,CACjCC,GAAKA,EAAE,OAAO,CAChB,CAAC,CACH,CAAC,EACD,GAAI,KAAK,aAAeR,EAAG,CACzB,KAAK,KAAK,aAAcC,CAAC,EACzB,IAAMK,EAAI,KAAK,gBAAkB,IAAI,gBACrCC,EAAE,CACA,OAAQD,EAAE,MACZ,CAAC,CACH,CACA,OAAOA,EAAE,EAAGE,CACd,CACF,CAAC,CAAC,EAAG,KAAK,KAAK,I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