PageSourceSearch

https://www.cfainstitute.org/modules/custom/ep_search_api_coveo/js…/atomic-commerce-refine-togglepVu7W6zN.js

js cfainstitute.org collected 2026-10-01 07:58:25 UTC 2,660 bytes, 63 lines download raw bytes

1import { l as e, o as t } from "./commerce.indexBu0Q3kxk.js";
2import { a as n, i as r, n as i, o as a, u as o } from "./decoratorsDgvFPsqQ.js";
3import { n as s, t as c } from "./directiveBxUhPfri.js";
4import { t as l } from "./buttonCbp3zP8q.js";
5import { t as u } from "./bind-stateHBIU0rdL.js";
6import { t as d } from "./binding-guardBYpyFCsg.js";
7import { t as f } from "./bindingsC1qzP6-H.js";
8import { t as p } from "./with-tailwind-stylesCLrXF-GP.js";
9import { t as m } from "./error-guardDZkUaSL0.js";
10//#region node_modules/@coveo/atomic/dist/atomic/components/components/common/refine-modal/button.js
11var h = ({ props: e }) => o`${l({ props: {
12	style: "outline-primary",
13	class: "w-full p-3",
14	onClick: e.onClick,
15	text: e.i18n.t("sort-and-filter"),
16	ref: e.refCallback,
17	part: "button"
18} })(a)}`, g = c(class extends s {
19	render({ hasError: e, firstRequestExecuted: t, hasItems: n }, r) {
20		return e ? a : t ? n ? o`${r()}` : a : o`
21        <div
22          part="placeholder"
23          aria-hidden="true"
24          class="bg-neutral mb-4 h-12 w-26 animate-pulse rounded"
25        ></div>
26      `;
27	}
28}), _ = function(e, t, n, r) {
29	var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
30	if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
31	else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
32	return i > 3 && a && Object.defineProperty(t, n, a), a;
33}, v = class extends n {
34	initialize() {
35		this.summary = (this.bindings.interfaceElement.type === "search" ? t(this.bindings.engine) : e(this.bindings.engine)).summary();
36	}
37	loadModal() {
38		this.modalRef || (this.modalRef = document.createElement("atomic-commerce-refine-modal"), this.insertAdjacentElement("beforebegin", this.modalRef), this.modalRef.openButton = this.buttonRef);
39	}
40	enableModal() {
41		this.modalRef && (this.modalRef.isOpen = !0);
42	}
43	render() {
44		return o`${g({
45			firstRequestExecuted: this.summaryState.firstRequestExecuted,
46			hasError: this.summaryState.hasError,
47			hasItems: this.summaryState.hasProducts
48		}, () => o`${h({ props: {
49			i18n: this.bindings.i18n,
50			onClick: () => this.enableModal(),
51			refCallback: (e) => {
52				e && (this.buttonRef = e, this.loadModal());
53			}
54		} })}`)}`;
55	}
56};
57_([i()], v.prototype, "bindings", void 0), _([i()], v.prototype, "error", void 0), _([u("summary"), i()], v.prototype, "summaryState", void 0), _([m(), d()], v.prototype, "render", null), v = _([
58	r("atomic-commerce-refine-toggle"),
59	f(),
60	p
61], v);
62//#endregion
63export { v as AtomicCommerceRefineToggle };

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.