<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/*
 *   Copyright (c) 2022 Esri
 *   All rights reserved.

 *   Licensed under the Apache License, Version 2.0 (the "License");
 *   you may not use this file except in compliance with the License.
 *   You may obtain a copy of the License at

 *   http://www.apache.org/licenses/LICENSE-2.0

 *   Unless required by applicable law or agreed to in writing, software
 *   distributed under the License is distributed on an "AS IS" BASIS,
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *   See the License for the specific language governing permissions and
 *   limitations under the License.
 */
var __decorate = (this &amp;&amp; this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c &lt; 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" &amp;&amp; typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i &gt;= 0; i--) if (d = decorators[i]) r = (c &lt; 3 ? d(r) : c &gt; 3 ? d(target, key, r) : d(target, key)) || r;
    return c &gt; 3 &amp;&amp; r &amp;&amp; Object.defineProperty(target, key, r), r;
};
var __importDefault = (this &amp;&amp; this.__importDefault) || function (mod) {
    return (mod &amp;&amp; mod.__esModule) ? mod : { "default": mod };
};
define(["require", "exports", "esri/core/accessorSupport/decorators", "esri/widgets/Widget", "esri/widgets/support/widget"], function (require, exports, decorators_1, Widget_1, widget_1) {
    "use strict";
    Widget_1 = __importDefault(Widget_1);
    let FilterPanel = class FilterPanel extends Widget_1.default {
        //--------------------------------------------------------------------------
        //
        //  Public Methods
        //
        //--------------------------------------------------------------------------
        constructor(props) {
            super(props);
            this.messages = null;
            this.instantMessages = null;
            //--------------------------------------------------------------------------
            //
            // Variables
            //
            //--------------------------------------------------------------------------
            this._mainContainer = null;
        }
        render() {
            const { filterConfig, extentSelector, extentSelectorConfig, expandFilters, enableFilter } = this.config;
            const { layerExpressions } = filterConfig || [];
            return enableFilter ? ((0, widget_1.tsx)("div", null,
                (0, widget_1.tsx)("instant-apps-filter-list", { bind: this, class: this.classes("panel-header"), afterCreate: widget_1.storeNode, "data-node-ref": "filterList", layerExpressions: layerExpressions, closeBtn: true, closeBtnOnClick: () =&gt; {
                        this._closePanel();
                    }, autoUpdateUrl: true, extentSelector: extentSelector, extentSelectorConfig: extentSelectorConfig, openFilters: expandFilters, view: this.view, onFilterUpdate: () =&gt; (this.filterCount = this.filterList.filterCount || 0) }))) : null;
        }
        _closePanel() {
            // Show the info panel if we don't have results
            // and its not modal and not mobile
            const isMobile = window.matchMedia("(max-width: 859px)");
            if (!this.config?.infoAsModal &amp;&amp;
                document?.body?.classList?.contains("no-results") &amp;&amp;
                !isMobile.matches) {
                const panel = document.getElementById("infoPanel");
                document.body.classList.add("detail-full-height");
                panel?.classList?.remove("hide");
            }
            // Close the filter container
            if (!this.container)
                return;
            const c = this.container;
            c?.classList.add("hide");
        }
        showPanel() {
            if (!this.container)
                return;
            const c = this.container;
            c?.classList.remove("hide");
            // hide info panel if visible
            const panel = document.getElementById("infoPanel");
            document.body.classList.remove("detail-full-height");
            panel?.classList?.add("hide");
        }
        update(propertyName, value) {
            this.config.shouldZoom = false;
            if (!this.filterList)
                return;
            if (propertyName === "filterConfig") {
                if (value)
                    this.filterList.layerExpressions = value?.layerExpressions;
            }
            else if (propertyName === "expandFilters") {
                this.filterList.openFilters = value;
            }
            else if (propertyName === "extentSelector") {
                this.filterList.extentSelector = value;
            }
            else if (propertyName === "extentSelectorConfig") {
                this.filterList.extentSelectorConfig = value;
            }
        }
    };
    __decorate([
        (0, decorators_1.property)()
    ], FilterPanel.prototype, "config", void 0);
    __decorate([
        (0, decorators_1.property)()
    ], FilterPanel.prototype, "filterList", void 0);
    __decorate([
        (0, decorators_1.property)()
    ], FilterPanel.prototype, "filterCount", void 0);
    __decorate([
        (0, decorators_1.property)()
    ], FilterPanel.prototype, "view", void 0);
    __decorate([
        (0, decorators_1.property)(),
        (0, widget_1.messageBundle)("nearby/app/t9n/common")
    ], FilterPanel.prototype, "messages", void 0);
    __decorate([
        (0, decorators_1.property)(),
        (0, widget_1.messageBundle)("instant/../t9n/common")
    ], FilterPanel.prototype, "instantMessages", void 0);
    FilterPanel = __decorate([
        (0, decorators_1.subclass)("app.FilterPanel")
    ], FilterPanel);
    return FilterPanel;
});
</pre></body></html>