import { setAssetPath } from "./chunk-P6MX663D.js"; import { a as a2, c, e as e3, i2 as i, k, n as n3, o, p, t as t2, t2 as t3 } from "./chunk-7256PFPA.js"; import { t } from "./chunk-QY775BFA.js"; import { h as h2 } from "./chunk-PHRSJJ3U.js"; import { u } from "./chunk-NE3ESGA6.js"; import { f, h, l as l2 } from "./chunk-YIS6BAC3.js"; import { a } from "./chunk-MXB2XLKV.js"; import { s as s4 } from "./chunk-XH7RUGVZ.js"; import { m as m2 } from "./chunk-YBSUITLL.js"; import { n as n2 } from "./chunk-DT6EAZQ5.js"; import { Q } from "./chunk-VBRY5KJM.js"; import { s as s3 } from "./chunk-GCDJLKH4.js"; import { d, e, g, n2 as n, s4 as s2 } from "./chunk-Y3WMVFTW.js"; import { E, b, e as e2, r2 as r, x } from "./chunk-ULGDPLM2.js"; import { s } from "./chunk-EMJ4ZSM2.js"; import { m } from "./chunk-IKP3YN53.js"; import { l } from "./chunk-GZT4BVFP.js"; // node_modules/@arcgis/core/core/domUtils.js function e4(e13) { return typeof e13 == "string" ? document.getElementById(e13) : e13; } function t4(e13) { for (; e13.hasChildNodes(); ) e13.removeChild(e13.firstChild); } function o2(e13, t9) { const n9 = t9.parentNode; n9 && n9.insertBefore(e13, t9); } function r2(e13, t9) { for (; ; ) { const n9 = e13.firstChild; if (!n9) break; t9.appendChild(n9); } } var l3 = (() => { if (typeof Element.prototype.closest == "function") return (e14, t9) => e14.closest(t9); const e13 = Element.prototype.matches || Element.prototype.msMatchesSelector; return (t9, n9) => { let o5 = t9; do { if (e13.call(o5, n9)) return o5; o5 = o5.parentElement; } while (o5 !== null && o5.nodeType === 1); return null; }; })(); // node_modules/@arcgis/core/libs/maquette-advanced-projector/advanced-projector-options.js var e5 = { handleInterceptedEvent: (e13, p2, t9, n9) => (e13.scheduleRender(), p2.properties[`on${n9.type}`].apply(p2.properties.bind || t9, [n9])) }; // node_modules/@arcgis/core/libs/maquette-advanced-projector/utils.js var e6 = { namespace: void 0, performanceLogger: () => { }, eventHandlerInterceptor: void 0, styleApplyer: (e13, r6, o5) => { e13.style[r6] = o5; } }; var r3 = (r6) => ({ ...e6, ...r6 }); // node_modules/@arcgis/core/libs/maquette-advanced-projector/projector.js var o3 = (e13, t9) => { const r6 = []; for (; e13 && e13 !== t9; ) r6.push(e13), e13 = e13.parentNode; return r6; }; var n4 = (e13, t9) => e13.find(t9); var d2 = (e13, t9, r6 = false) => { let o5 = e13; return t9.forEach((e14, d3) => { const s7 = o5?.children ? n4(o5.children, (t10) => t10.domNode === e14) : void 0; r6 && !s7 && d3 !== t9.length - 1 || (o5 = s7); }), o5; }; var s5 = (n9) => { let s7; const i3 = { ...e5, ...n9 }, c3 = r3(i3), a3 = c3.performanceLogger; let m4, p2 = true, l4 = false; const f3 = [], u2 = [], h4 = (e13, t9, r6) => { let n10; c3.eventHandlerInterceptor = (e14, t10, r7, c4) => function(e15) { let t11; a3("domEvent", e15); const r8 = o3(e15.currentTarget, n10.domNode), c5 = r8.some((e16) => customElements.get(e16?.tagName?.toLowerCase())); if (e15.eventPhase === Event.CAPTURING_PHASE || !c5) r8.reverse(), t11 = d2(n10.getLastRender(), r8); else { const r9 = e15.composedPath(), o5 = r9.slice(r9.indexOf(e15.currentTarget), r9.indexOf(n10.domNode)).filter((e16) => e16.getRootNode() === e16.ownerDocument).reverse(); t11 = d2(n10.getLastRender(), o5, true); } let m6; return t11 && (m6 = i3.handleInterceptedEvent(s7, t11, this, e15)), a3("domEventProcessed", e15), m6; }, i3.postProcessProjectionOptions?.(c3); const m5 = r6(); n10 = e13(t9, m5, c3), f3.push(n10), u2.push(r6), i3.afterFirstVNodeRendered && i3.afterFirstVNodeRendered(n10, m5); }; let v2 = () => { if (m4 = void 0, p2) { p2 = false, a3("renderStart", void 0); for (let e13 = 0; e13 < f3.length; e13++) { const t9 = u2[e13](); a3("rendered", void 0), f3[e13].update(t9), a3("patched", void 0); } a3("renderDone", void 0), p2 = true; } }; return i3.modifyDoRenderImplementation && (v2 = i3.modifyDoRenderImplementation(v2, f3, u2)), s7 = { renderNow: v2, scheduleRender: () => { m4 || l4 || (m4 = requestAnimationFrame(v2)); }, stop: () => { m4 && (cancelAnimationFrame(m4), m4 = void 0), l4 = true; }, resume: () => { l4 = false, p2 = true, s7.scheduleRender(); }, append: (t9, r6) => { h4(n3.append, t9, r6); }, insertBefore: (t9, r6) => { h4(n3.insertBefore, t9, r6); }, merge: (t9, r6) => { h4(n3.merge, t9, r6); }, replace: (t9, r6) => { h4(n3.replace, t9, r6); }, detach: (e13) => { for (let t9 = 0; t9 < u2.length; t9++) if (u2[t9] === e13) return u2.splice(t9, 1), f3.splice(t9, 1)[0]; throw new Error("renderFunction was not found"); } }, s7; }; // node_modules/@arcgis/core/widgets/support/componentsUtils.js var e7; function r4() { setAssetPath(Q(a(e7))); } e7 = "components/assets"; // node_modules/@arcgis/core/widgets/support/tests.js var e8 = new Set(); function n5(n9) { e8.add(n9), n9.finally(() => e8.delete(n9)); } // node_modules/@arcgis/core/widgets/Widget.js var U = "esri.widgets.Widget"; var $ = s.getLogger(U); var x2 = 0; var z = { widgetIcon: "esri-icon-checkbox-unchecked" }; function A(e13, t9) { for (const r6 in t9) e13[r6] != null && (typeof e13[r6] == "object" && typeof t9[r6] == "object" ? A(e13[r6], t9[r6]) : e13[r6] = t9[r6]); return e13; } var B = s5({ postProcessProjectionOptions(e13) { const t9 = e13.eventHandlerInterceptor, r6 = /capture$/i; e13.eventHandlerInterceptor = (e14, o5, s7, i3) => { const n9 = t9(e14, o5, s7, i3), a3 = r6.test(e14); if (!((e14 = e14.replace(r6, "")).toLowerCase() in s7) || a3) { const t10 = e14[2].toLowerCase() + e14.slice(3), r7 = (e15) => n9.call(s7, e15); s7.addEventListener(t10, r7, a3); const o6 = () => s7.removeEventListener(t10, r7, a3), c3 = i3.afterRemoved; i3.afterRemoved = (e15) => { c3?.(e15), o6(); }; } return n9; }; }, handleInterceptedEvent(e13, t9, r6, o5) { const { eventPhase: s7, type: i3 } = o5, n9 = s7 === Event.CAPTURING_PHASE; let a3 = `on${i3}${n9 ? "capture" : ""}`; const c3 = t9.properties; (a3 in c3 || (a3 = `on${i3[0].toUpperCase()}${i3.slice(1)}${n9 ? "Capture" : ""}`, a3 in c3)) && (t2(), e13.scheduleRender(), c3[a3].call(c3.bind || r6, o5)); } }); var D = false; var M = class extends m2(n2.EventedAccessor) { constructor(e13, t9) { super(e13, t9), this._attached = false, this._internalHandles = new u(), this._projector = B, this._readyForTrueRender = false, this.domNode = null, this.iconClass = z.widgetIcon, this.label = this.declaredClass.split(".").pop(), this.visible = true, this.key = this, this._loadLocale = x(async () => { if (this._messageBundleProps && this._messageBundleProps.length) { const e14 = await E(this._messageBundleProps.map(async ({ bundlePath: e15, propertyName: t10 }) => { let r7 = await h2(e15); this.uiStrings && Object.keys(this.uiStrings) && (r7 = A(m(r7), this.uiStrings)), this[t10] = r7; })); for (const t10 of e14) t10.error && $.error("widget-intl:locale-error", this.declaredClass, t10.error); } await this.loadLocale(); }), r4(); const r6 = "esri-widget-uid-" + t(), o5 = this.render.bind(this); this._trackingTarget = new s2(() => this.scheduleRender()); const s7 = () => { if (!this._readyForTrueRender || this.destroyed) return null; if (!this.visible) return { vnodeSelector: "div", properties: { key: r6, class: "", styles: { display: "none" } }, domNode: void 0, children: void 0, text: void 0 }; const e14 = o5(); let { properties: t10 } = e14; t10 || (e14.properties = t10 = {}); let { key: s8, styles: i3 } = t10; s8 || (t10.key = r6), i3 || (t10.styles = i3 = {}), i3.display || (i3.display = ""); let n9 = 0; return e14.children?.forEach((e15) => { if (a2(e15.vnodeSelector)) return; let { properties: t11 } = e15; t11 || (e15.properties = t11 = {}), t11.key || (t11.key = `${this.id}--${n9++}`); }), i(this, e14); }; this.render = () => { if (D) return s7(); let e14 = e3(this); if (e14) return e14; this._trackingTarget.clear(), D = true; try { e14 = g(this._trackingTarget, s7); } catch (t10) { throw console.error(t10), t10; } finally { D = false; } return c(this, e14), e14; }, this.addResolvingPromise(this._resourcesFetch = this.beforeFirstRender().then(() => { this._readyForTrueRender = true, this._postInitialize(); })), n5(this._resourcesFetch); } normalizeCtorArgs(e13, t9) { const r6 = { ...e13 }; return t9 && (r6.container = t9), r6; } postInitialize() { } beforeFirstRender() { return Promise.all([this.loadDependencies(), this._loadLocale()]).then(() => { }).catch(b); } async loadDependencies() { } async loadLocale() { } destroy() { this.destroyed || (l(this._trackingTarget), l(this.viewModel), this._detach(this.container), this._set("container", null), this._internalHandles.destroy(), this._emitter.clear(), this.render = () => null, this._projector = null, o(this)); } set container(e13) { this._get("container") || this._set("container", e13); } castContainer(e13) { return e4(e13); } get id() { return this._get("id") || this.get("container.id") || Date.now().toString(16) + "-widget-" + x2++; } set id(e13) { e13 && this._set("id", e13); } get renderable() { return this._resourcesFetch; } get test() { return { projector: this._projector }; } render() { throw new Error("not implemented"); } scheduleRender() { this.destroyed || (o(this), this._projector.scheduleRender()); } classes(...e13) { return p.apply(this, e13); } renderNow() { o(this), this._projector.renderNow(); } _postInitialize() { if (this.destroyed) return; this.scheduleRender(), this._delegatedEventNames?.length && this._internalHandles.add(l2(() => this.viewModel, (e14, t9) => { t9 && this._internalHandles.remove("delegated-events"), e14 && e2(e14) && this._internalHandles.add(this._delegatedEventNames.map((t10) => r(e14, t10, (e15) => { this.emit(t10, e15); })), "delegated-events"); }, h)), this.postInitialize(); const e13 = async () => { await this._loadLocale().catch(b), this.scheduleRender(); }; this._internalHandles.add([s4(e13), l2(() => this.uiStrings, e13), f(() => this.container, (e14) => { this.destroyed || this._attach(e14); }, { initial: true, once: true })]); } _attach(e13) { e13 && (this._projector.merge(e13, this.render), this._attached = true); } _detach(e13) { e13 && this._attached && (this._projector.detach(this.render), e13.parentNode && e13.parentNode.removeChild(e13), this._attached = false); } }; M[t3] = true, e([d()], M.prototype, "_readyForTrueRender", void 0), e([d({ value: null })], M.prototype, "container", null), e([s3("container")], M.prototype, "castContainer", null), e([d({ aliasOf: "container" })], M.prototype, "domNode", void 0), e([d()], M.prototype, "iconClass", void 0), e([d()], M.prototype, "id", null), e([d()], M.prototype, "label", void 0), e([d()], M.prototype, "renderable", null), e([d()], M.prototype, "uiStrings", void 0), e([d()], M.prototype, "viewModel", void 0), e([d()], M.prototype, "visible", void 0), e([d()], M.prototype, "key", void 0), e([d()], M.prototype, "children", void 0), e([d()], M.prototype, "afterCreate", void 0), e([d()], M.prototype, "afterUpdate", void 0), e([d()], M.prototype, "afterRemoved", void 0), M = e([n(U)], M); var O = M; // node_modules/@arcgis/core/widgets/support/decorators/messageBundle.js function e9(e13) { return (s7, r6) => { s7.hasOwnProperty("_messageBundleProps") || (s7._messageBundleProps = s7._messageBundleProps ? s7._messageBundleProps.slice() : []); s7._messageBundleProps.push({ bundlePath: e13, propertyName: r6 }); }; } // node_modules/@arcgis/core/widgets/support/decorators/accessibleHandler.js function t5() { return function(n9, t9) { if (!n9[t9]) throw new TypeError(`Cannot auto bind undefined function '${t9}'`); return { value: o4(n9[t9]) }; }; } function e10(n9) { const { type: t9 } = n9; return n9 instanceof KeyboardEvent || t9 === "keyup" || t9 === "keydown" || t9 === "keypress"; } function o4(t9) { return function(o5, ...r6) { e10(o5) ? k(o5.key) && (o5.preventDefault(), o5.stopPropagation(), o5.target.click()) : t9.call(this, o5, ...r6); }; } // node_modules/@arcgis/core/widgets/support/decorators/propUtils.js function n6(n9) { return n9.split(",").map((n10) => n10.trim()); } // node_modules/@arcgis/core/widgets/support/decorators/vmEvent.js function t6(t9) { return (a3) => { a3.hasOwnProperty("_delegatedEventNames") || (a3._delegatedEventNames = a3._delegatedEventNames ? a3._delegatedEventNames.slice() : []); const r6 = a3._delegatedEventNames, s7 = Array.isArray(t9) ? t9 : n6(t9); r6.push(...s7); }; } // node_modules/@arcgis/core/support/themeUtils.js var t7 = "calcite-theme-"; function e11() { return getComputedStyle(document.body).getPropertyValue("--esri-calcite-theme-name").replace(/\s|'|"/g, ""); } function r5() { return e11().startsWith("dark"); } function c2() { return `${t7}${r5() ? "dark" : "light"}`; } function n7(t9) { s6(t9), t9.classList.add(c2()); } function s6(e13) { Array.from(e13.classList).forEach((r6) => { r6.startsWith(t7) && e13.classList.remove(r6); }); } // node_modules/@arcgis/core/widgets/support/widget.js function e12(e13) { return e13 && typeof e13.render == "function"; } function t8(e13) { return e13 && typeof e13.postMixInProperties == "function" && typeof e13.buildRendering == "function" && typeof e13.postCreate == "function" && typeof e13.startup == "function"; } export { e4 as e, t4 as t, o2 as o, r2 as r, O, e9 as e2, t5 as t2, t6 as t3, r5 as r2, n7 as n, e12 as e3, t8 as t4 }; /*! * All material copyright ESRI, All Rights Reserved, unless otherwise specified. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details. * v1.0.0-beta.82 */ //# sourceMappingURL=chunk-E6CBEY54.js.map