1import{a as L}from"./chunk-3WAA7OZS.js";import{a as D}from"./chunk-JLFNFR2V.js";import{b as _}from"./chunk-OG4MZ6A6.js";import{a as S,b as A,g as I}from"./chunk-3AW4TKV6.js";import"./chunk-LKGJ2WZ6.js";import"./chunk-AZXTZ57V.js";import"./chunk-UBM2KGFR.js";import"./chunk-5OV6675O.js";import"./chunk-6BRW6J3W.js";import{a as u}from"./chunk-3Q6SZ2TB.js";import{a,b as B}from"./chunk-RF45J46S.js";import{a as m}from"./chunk-GZUIJYIO.js";import{a as f}from"./chunk-7B5QVQO3.js";import"./chunk-YXPAYWQJ.js";import{a as w}from"./chunk-ZSRY565N.js";import{b as y}from"./chunk-F3QBL26E.js";import"./chunk-FHKXEPZ5.js";import{b,c as i,d as v,e as k,f as n}from"./chunk-QRUAUUK2.js";import{a as p,b as h,i as O}from"./chunk-QN26NOZT.js";var H=()=>"@media (min-width: 640px){.show-for-sm-only{display:none !important}}@media (min-width: 640px){.hide-for-md{display:none !important}}@media (max-width: 640px){.show-for-md{display:none !important}}@media (min-width: 640px) and (max-width: 768px){.hide-for-md-only{display:none !important}}@media (max-width: 640px), (min-width: 768px){.show-for-md-only{display:none !important}}@media (min-width: 768px){.hide-for-lg{display:none !important}}@media (max-width: 768px){.show-for-lg{display:none !important}}@media (max-width: 767px){.show-for-lg-exclusive{display:none !important}}@media (min-width: 768px) and (max-width: 1024px){.hide-for-large-only{display:none !important}}@media (max-width: 768px), (min-width: 1024px){.show-for-lg-only{display:none !important}}@media (min-width: 1024px){.hide-for-xl{display:none !important}}@media (max-width: 1024px){.show-for-xl{display:none !important}}@media (min-width: 1024px) and (max-width: 1440px){.hide-for-xl-only{display:none !important}}@media (max-width: 1024px), (min-width: 1440px){.show-for-xl-only{display:none !important}}@media (min-width: 1440px){.hide-for-xxl{display:none !important}}@media (max-width: 1440px){.show-for-xxl{display:none !important}}@media (min-width: 1440px){.hide-for-xxl-only{display:none !important}}.show-for-sr,.show-on-focus{border:0 !important;clip:rect(0, 0, 0, 0) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;white-space:nowrap !important;width:1px !important}.show-on-focus:active,.show-on-focus:focus{clip:auto !important;height:auto !important;overflow:visible !important;position:static !important;white-space:normal !important;width:auto !important}.show-for-landscape,.hide-for-portrait{display:block !important}@media screen and (orientation: landscape){.show-for-landscape,.hide-for-portrait{display:block !important}}@media screen and (orientation: portrait){.show-for-landscape,.hide-for-portrait{display:none !important}}.hide-for-landscape,.show-for-portrait{display:none !important}@media screen and (orientation: landscape){.hide-for-landscape,.show-for-portrait{display:none !important}}@media screen and (orientation: portrait){.hide-for-landscape,.show-for-portrait{display:block !important}}@keyframes gdsLocalNavFadeIn{from{opacity:0}to{opacity:100%}}@keyframes gdsLocalNavSlideDown{from{max-height:0}to{max-height:100vh}}@keyframes GdsOpacityFadeIn{from{opacity:0}to{opacity:1}}@keyframes GdsOpacityFadeOut{from{opacity:1}to{opacity:0}}@keyframes fade-reveal{0%{opacity:0}100%{opacity:1}}@keyframes fade-conceal{0%{opacity:1}100%{opacity:0}}@keyframes bounce-down{0%{transform:translateY(0)}50%{transform:translateY(15px)}100%{transform:translateY(0)}}@keyframes blur-reveal{0%{filter:blur(0px)}100%{filter:blur(4px)}}@keyframes blur-conceal{0%{filter:blur(4px)}100%{filter:blur(0px)}}@keyframes GdsOpacityFadeIn{from{opacity:0}to{opacity:1}}@keyframes GdsOpacityFadeOut{from{opacity:1}to{opacity:0}}.gds-spacer.spacer-10{height:2px;min-height:2px}.gds-spacer.vertical-spacer-10{min-width:2px;width:2px}.gds-spacer.spacer-20{height:4px;min-height:4px}.gds-spacer.vertical-spacer-20{min-width:4px;width:4px}.gds-spacer.spacer-30{height:8px;min-height:8px}.gds-spacer.vertical-spacer-30{min-width:8px;width:8px}.gds-spacer.spacer-40{height:12px;min-height:12px}.gds-spacer.vertical-spacer-40{min-width:12px;width:12px}.gds-spacer.spacer-50{height:16px;min-height:16px}.gds-spacer.vertical-spacer-50{min-width:16px;width:16px}.gds-spacer.spacer-60{height:20px;min-height:20px}.gds-spacer.vertical-spacer-60{min-width:20px;width:20px}.gds-spacer.spacer-70{height:24px;min-height:24px}.gds-spacer.vertical-spacer-70{min-width:24px;width:24px}.gds-spacer.spacer-80{height:32px;min-height:32px}.gds-spacer.vertical-spacer-80{min-width:32px;width:32px}.gds-spacer.spacer-85{height:40px;min-height:40px}.gds-spacer.vertical-spacer-85{min-width:40px;width:40px}.gds-spacer.spacer-90{height:48px;min-height:48px}.gds-spacer.vertical-spacer-90{min-width:48px;width:48px}.gds-spacer.spacer-100{height:56px;min-height:56px}.gds-spacer.vertical-spacer-100{min-width:56px;width:56px}.gds-spacer.spacer-110{height:64px;min-height:64px}.gds-spacer.vertical-spacer-110{min-width:64px;width:64px}.gds-spacer.spacer-115{height:72px;min-height:72px}.gds-spacer.vertical-spacer-115{min-width:72px;width:72px}.gds-spacer.spacer-120{height:80px;min-height:80px}.gds-spacer.vertical-spacer-120{min-width:80px;width:80px}.gds-spacer.spacer-130{height:96px;min-height:96px}.gds-spacer.vertical-spacer-130{min-width:96px;width:96px}.gds-spacer.spacer-140{height:128px;min-height:128px}.gds-spacer.vertical-spacer-140{min-width:128px;width:128px}
1gds-checkbox-filter-section .gds-checkbox-filter-section{display:flex;flex-direction:column;gap:16px;border-top:1px solid var(--component-sidebar-color-border);padding:16px}gds-checkbox-filter-section .gds-checkbox-filter-section-header{display:flex;flex-direction:column;gap:8px;color:var(--common-color-text-page-generic)}gds-checkbox-filter-section .gds-checkbox-filter-section-header gds-heading .gds-heading{word-break:break-word}gds-checkbox-filter-section .gds-checkbox-filter-section-list{display:flex;flex-direction:column;gap:16px;margin-left:32px}gds-checkbox-filter-section .gds-checkbox-filter-section-accordion{padding:0 16px 16px}",E=class{constructor(e){b(this,e),this.gdsComponentLoaded=n(this,"gdsComponentLoaded",7),this.checkboxSectionValueChange=n(this,"checkboxSectionValueChange",7)}get el(){return k(this)}gdsVersion;xpath;_xpath;gdsComponentLoaded;checkboxSectionValueChange;contrast;theme="gds-default";data;showInAccordion;checkboxes=[];renderOpen=!1;_data;auId;heading;description;updateData(e,t){JSON.stringify(e)!==JSON.stringify(t)&&this.parseData()}checkEmptyAccordions(){return O(this,null,function*(){this.renderOpen=this.checkboxes.some(e=>e.checked)})}componentWillLoad(){this.auId=w(),this.init()}componentDidLoad(){this.gdsComponentLoaded.emit()}init(){this.parseData(),this.showInAccordion&&this.checkEmptyAccordions(),f.store.onChange("contrast",e=>{this.contrast=e})}parseData(){this._data=m(this.data),this.theme=y(this.theme),this.heading=a(this._data,"heading",""),this.description=a(this._data,"description",""),this.checkboxes=a(this._data,"checkboxes",[]),this.showInAccordion=a(this._data,"showInAccordion",!1),u(this.xpath)&&(this._xpath=m(this.xpath))}render(){if(!(!this._data||!this.checkboxes.length))return this.renderTemplate()}renderTemplate(){return i(v,{"gds-version":this.gdsVersion,"data-aui":`gds-checkbox-filter-section-${this.auId}`},this.showInAccordion?this.renderAccordion():this.renderSection())}renderSection(){return i("div",{class:{"gds-checkbox-filter-section":!0,contrast:!!this.contrast,[`${this.theme}`]:!!this.theme}},(this.heading||this.description)&&i("div",{class:"gds-checkbox-filter-section-header"},this.renderHeading(),this.renderDescription()),this.renderCheckboxes())}renderAccordion(){return i("gds-accordion",{data:{heading:this.heading,headerOption:S.secondary,description:this.description},isOpen:this.renderOpen,theme:this.theme,contrast:this.contrast,onAccordionToggled:this.updateRenderOpen},i("gds-spacer",{classes:"spacer-20"}),this.renderCheckboxes())}renderHeading(){if(!this.showInAccordion)return!!this.heading&&i("gds-heading",{classes:"heading-11",data:{heading:this.heading},tagtype:"h5",theme:this.theme,xpath:this._xpath})}renderDescription(){if(!this.showInAccordion)return!!this.description&&i("gds-body",{class:"gds-checkbox-filter-section-description",classes:"body-2",data:this._data,TagType:"span",theme:this.theme,xpath:this._xpath})}renderCheckboxes(){return i("div",{class:{"gds-checkbox-filter-section-list":!0,"gds-checkbox-filter-section-accordion":this.showInAccordion},role:"group","aria-label":this.heading},this.checkboxes.map((e,t)=>i("div",{key:e.primaryLabel},i("gds-input",{labelId:this.auId+"-"+t,theme:this.theme,contrast:this.contrast,value:e.checked,data:e,index:t,type:I.checkbox,onValueChange:this.onValueChange}
1))))}updateRenderOpen=e=>{this.renderOpen=a(e,"detail.isOpen",!1)};onValueChange=e=>{let t=e.target,s=t?.index,d=a(t,"data",{}),o=a(d,"primaryLabel",""),c=!!e.detail;this.checkboxes[s].checked=e.detail;let r=a(t,"data.customEventDetail",{});this.checkboxSectionValueChange.emit(h(p({},r),{label:o,value:c}))};static get watchers(){return{data:[{updateData:0}]}}};E.style=H();var G=()=>"@media (min-width: 640px){.show-for-sm-only{display:none !important}}@media (min-width: 640px){.hide-for-md{display:none !important}}@media (max-width: 640px){.show-for-md{display:none !important}}@media (min-width: 640px) and (max-width: 768px){.hide-for-md-only{display:none !important}}@media (max-width: 640px), (min-width: 768px){.show-for-md-only{display:none !important}}@media (min-width: 768px){.hide-for-lg{display:none !important}}@media (max-width: 768px){.show-for-lg{display:none !important}}@media (max-width: 767px){.show-for-lg-exclusive{display:none !important}}@media (min-width: 768px) and (max-width: 1024px){.hide-for-large-only{display:none !important}}@media (max-width: 768px), (min-width: 1024px){.show-for-lg-only{display:none !important}}@media (min-width: 1024px){.hide-for-xl{display:none !important}}@media (max-width: 1024px){.show-for-xl{display:none !important}}@media (min-width: 1024px) and (max-width: 1440px){.hide-for-xl-only{display:none !important}}@media (max-width: 1024px), (min-width: 1440px){.show-for-xl-only{display:none !important}}@media (min-width: 1440px){.hide-for-xxl{display:none !important}}@media (max-width: 1440px){.show-for-xxl{display:none !important}}@media (min-width: 1440px){.hide-for-xxl-only{display:none !important}}.show-for-sr,.show-on-focus{border:0 !important;clip:rect(0, 0, 0, 0) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;white-space:nowrap !important;width:1px !important}.show-on-focus:active,.show-on-focus:focus{clip:auto !important;height:auto !important;overflow:visible !important;position:static !important;white-space:normal !important;width:auto !important}.show-for-landscape,.hide-for-portrait{display:block !important}@media screen and (orientation: landscape){.show-for-landscape,.hide-for-portrait{display:block !important}}@media screen and (orientation: portrait){.show-for-landscape,.hide-for-portrait{display:none !important}}.hide-for-landscape,.show-for-portrait{display:none !important}@media screen and (orientation: landscape){.hide-for-landscape,.show-for-portrait{display:none !important}}@media screen and (orientation: portrait){.hide-for-landscape,.show-for-portrait{display:block !important}}@keyframes gdsLocalNavFadeIn{from{opacity:0}to{opacity:100%}}@keyframes gdsLocalNavSlideDown{from{max-height:0}to{max-height:100vh}}@keyframes GdsOpacityFadeIn{from{opacity:0}to{opacity:1}}@keyframes GdsOpacityFadeOut{from{opacity:1}to{opacity:0}}@keyframes fade-reveal{0%{opacity:0}100%{opacity:1}}@keyframes fade-conceal{0%{opacity:1}100%{opacity:0}}@keyframes bounce-down{0%{transform:translateY(0)}50%{transform:translateY(15px)}100%{transform:translateY(0)}}@keyframes blur-reveal{0%{filter:blur(0px)}100%{filter:blur(4px)}}@keyframes blur-conceal{0%{filter:blur(4px)}100%{filter:blur(0px)}}@keyframes GdsOpacityFadeIn{from{opacity:0}to{opacity:1}}@keyframes GdsOpacityFadeOut{from{opacity:1}to{opacity:0}}.gds-spacer.spacer-10{height:2px;min-height:2px}.gds-spacer.vertical-spacer-10{min-width:2px;width:2px}.gds-spacer.spacer-20{height:4px;min-height:4px}.gds-spacer.vertical-spacer-20{min-width:4px;width:4px}.gds-spacer.spacer-30{height:8px;min-height:8px}.gds-spacer.vertical-spacer-30{min-width:8px;width:8px}.gds-spacer.spacer-40{height:12px;min-height:12px}.gds-spacer.vertical-spacer-40{min-width:12px;width:12px}.gds-spacer.spacer-50{height:16px;min-height:16px}.gds-spacer.vertical-spacer-50{min-width:16px;width:16px}.gds-spacer.spacer-60{height:20px;min-height:20px}.gds-spacer.vertical-spacer-60{min-width:20px;width:20px}.gds-spacer.spacer-70{height:24px;min-height:24px}.gds-spacer.vertical-spacer-70{min-width:24px;width:24px}.gds-spacer.spacer-80{height:32px;min-height:32px}.gds-spacer.vertical-spacer-80{min-width:32px;width:32px}.gds-spacer.spacer-85{height:40px;min-height:40px}.gds-spacer.vertical-spacer-85{min-width:40px;width:40px}.gds-spacer.spacer-90{height:48px;min-height:48px}.gds-spacer.vertical-spacer-90{min-width:48px;width:48px}.gds-spacer.spacer-100{height:56px;min-height:56px}.gds-spacer.vertical-spacer-100{min-width:56px;width:56px}.gds-spacer.spacer-110{height:64px;min-height:64px}.gds-spacer.vertical-spacer-110{min-width:64px;width:64px}.gds-spacer.spacer-115{height:72px;min-height:72px}.gds-spacer.vertical-spacer-115{min-width:72px;width:72px}.gds-spacer.spacer-120{height:80px;min-height:80px}.gds-spacer.vertical-spacer-120{min-width:80px;width:80px}.gds-spacer.spacer-130{height:96px;min-height:96px}.gds-spacer.vertical-spacer-130{min-width:96px;width:96px}.gds-spacer.spacer-140{height:128px;min-height:128px}.gds-spacer.vertical-spacer-140{min-width:128px;width:128px}gds-filter-list-sidebar .gds-sidebar-container .gds-sidebar-container--content{padding:0}gds-filter-list-sidebar .gds-filter-list-sidebar-sections{background:var(--common-color-background-page-default);display:flex;flex-direction:column;height:100%;margin-bottom:56px;overflow-anchor:auto;overflow-x:hidden;overflow-y:auto;width:100%}gds-filter-list-sidebar .gds-filter-list-sidebar-sections .visually-hidden{width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}gds-filter-list-sidebar .gds-filter-list-sidebar-sections-containers-container{padding:16px;border-top:1px solid var(--component-sidebar-color-border)}gds-filter-list-sidebar .gds-filter-list-sidebar-sections-containers-container:first-child{border-top:0}gds-filter-list-sidebar .gds-filter-list-sidebar-sections-containers-container--combined{border-top:0;padding-top:0}gds-filter-list-sidebar .gds-filter-list-sidebar-sections-containers-container--accordion{padding:0}gds-filter-list-sidebar .gds-filter-list-sidebar-sections-containers-container--accordion .gds-accordion button.gds-accordion-trigger{border-top:0}gds-filter-list-sidebar .gds-filter-list-sidebar-sections-containers-container--accordion .gds-accordion .gds-accordion-panel.inset{padding:4px 16px 16px}gds-filter-list-sidebar .gds-filter-list-sidebar-sections-containers-container .gds-checkbox-filter-section{padding:0;border:none}gds-filter-list-sidebar .gds-filter-list-sidebar-sections-containers-container--dropdown .gds-form-field-label-heading{font-weight:700;font-size:1rem;letter-spacing:0.013rem;line-height:1.25rem}gds-filter-list-sidebar .gds-filter-list-sidebar-footer{align-items:center;background:var(--common-color-background-page-default);bottom:0;border-top:1px solid var(--component-sidebar-color-border);box-sizing:border-box;display:flex;gap:16px;left:0;justify-content:flex-end;padding:6px 16px;position:absolute;width:100%}@media (min-width: 1440px){gds-filter-list-sidebar .gds-filter-list-sidebar-footer{border-radius:0 0 0.75rem 0.75rem}}",V=class{constructor(e){b(this,e),this.gdsComponentLoaded=n(this,"gdsComponentLoaded",7),this.closeFilterSidebar=n(this,"closeFilterSidebar",7),this.filterChanged=n(this,"filterChanged",7),this.filterSidebarSecondaryButton=n(this,"filterSidebarSecondaryButton",7),this.filterSidebarPrimaryButton=n(this,"filterSidebarPrimaryButton",7),this.modalOpen=n(this,"modalOpen",7),this.modalClose=n(this,"modalClose",7)}get el(){return k(this)}gdsVersion;xpath;_xpath;gdsComponentLoaded;contrast;theme="gds-default";data;sidebar=!1;closeFilterSidebar;filterChanged;filterSidebarSecondaryButton;filterSidebarPrimaryButton;modalOpen;modalClose;isXxl;selectedFilterData;ariaAlert=!1;ariaMessage="";updateData(e,t){JSON.stringify(e)!==JSON.stringify(t)&&this.parseData()}
1updateBackgroundScroll(){this.updateCheckboxSections()}clearButton;applyButton;_data;auId;componentWillLoad(){this.auId=w(),this.init()}init(){this.setViewport(),this.parseData(),f.store.onChange("contrast",e=>{this.contrast=e})}parseData(){this._data=m(this.data),this.theme=y(this.theme),this.clearButton=a(this._data,"clearButton",null),this.applyButton=a(this._data,"applyButton",null),this.selectedFilterData=a(this._data,"sections",[]),u(this.xpath)&&(this._xpath=m(this.xpath))}componentDidLoad(){this.gdsComponentLoaded.emit(),window.addEventListener("resize",this.setViewport),window.addEventListener("keydown",this.keydownHandler)}render(){if(this._data)return this.renderTemplate()}renderTemplate(){let e=a(this._data,"heading","");return i(v,{"gds-version":this.gdsVersion,"data-aui":`gds-filter-list-sidebar-${this.auId}`},i("gds-sidebar",{opened:this.sidebar,heading:e,onSidebarCloseClick:this.closeHandler,isFlyout:this.isXxl,showFooter:!0,showHeaderDivider:!0,showFooterDivider:!0,theme:this.theme,contrast:this.contrast},this.renderFilters(),this.renderFooter()))}renderFooter=()=>i("div",{slot:"gds-sidebar-footer",class:"gds-filter-list-sidebar-footer"},!!this.clearButton&&i("gds-buttons",{type:"tertiary",data:this.clearButton,contrast:this.contrast,disableContrast:!0,theme:this.theme,onButtonClicked:this.clearFiltersHandler,xpath:this._xpath?.clearButton}),!!this.applyButton&&i("gds-buttons",{type:"primary",data:this.applyButton,contrast:this.contrast,disableContrast:!0,theme:this.theme,xpath:this._xpath?.applyButton,onButtonClicked:this.applyHandler}));renderFilters=()=>i("div",{slot:"gds-sidebar-content",class:"gds-filter-list-sidebar-sections-containers"},this.selectedFilterData?.map((e,t)=>e.map((s,d)=>{let o=a(this._xpath,`sections[${t}][${d}].data`,{});switch(s.type){case"selectionChip":return this.renderSelectionChips(s.data,o,s.combined);case"toggle":return this.renderToggle(s.data,o,s.combined);case"checkbox":return this.renderCheckboxSection(s.data,o,s.combined);case"dropdown":return this.renderDropdownSection(s.data,o,s.combined);default:return}})),this.ariaMessage&&i("div",{class:"sr-only","aria-live":"polite","aria-atomic":"true","aria-relevant":"additions removals"},this.ariaAlert&&this.ariaMessage));renderSelectionChips=(e,t,s)=>i("div",{key:e.header?.heading,class:{"gds-filter-list-sidebar-sections-containers-container":!0,"gds-filter-list-sidebar-sections-containers-container--accordion":e.showInAccordion,"gds-filter-list-sidebar-sections-containers-container--combined":s&&!e.showInAccordion}},i("gds-selection-chips",{data:e,use:"sidebar",theme:this.theme,contrast:this.contrast,xpath:t,onSelectionChipsChanged:this.filterChangedHandler}));renderToggle=(e,t,s)=>i("div",{class:{"gds-filter-list-sidebar-sections-containers-container":!0,"gds-filter-list-sidebar-sections-containers-container--combined":s},key:e.label},i("gds-toggle",{data:e,type:"v2",theme:this.theme,xpath:t,onToggleClicked:this.filterChangedHandler}));renderCheckboxSection=(e,t,s)=>i("div",{class:{"gds-filter-list-sidebar-sections-containers-container":!0,"gds-filter-list-sidebar-sections-containers-container--accordion":e.showInAccordion,"gds-filter-list-sidebar-sections-containers-container--combined":s&&!e.showInAccordion},key:e.heading},i("gds-checkbox-filter-section",{data:e,theme:this.theme,contrast:this.contrast,xpath:t,onCheckboxSectionValueChange:this.filterChangedHandler}));renderDropdownSection=(e,t,s)=>i("div",{class:{"gds-filter-list-sidebar-sections-containers-container":!0,"gds-filter-list-sidebar-sections-containers-container--dropdown":!0,"gds-filter-list-sidebar-sections-containers-container--combined":s},key:e.formField.primaryLabel},i("gds-dropdown",{value:a(e,"default",null),data:e,theme:this.theme,contrast:this.contrast,xpath:t,onValueChange:this.onDropdownValueChange}));updateCheckboxSections=()=>{this.el.querySelectorAll("gds-checkbox-filter-section")?.forEach(t=>{t.checkEmptyAccordions()})};filterChangedHandler=e=>{this.filterChanged.emit(e.detail),this.updateAriaMessage("clickApplyAriaLabel")};clearFiltersHandler=e=>
1{this.filterSidebarSecondaryButton.emit(e.detail),this.updateAriaMessage("clearedAriaLabel")};applyHandler=e=>{this.filterSidebarPrimaryButton.emit(e.detail),this.updateAriaMessage("appliedAriaLabel")};updateAriaMessage=e=>{setTimeout(()=>{this.ariaAlert=!0,this.ariaMessage=a(this._data,e,"")},50)};closeHandler=e=>{this.closeFilterSidebar.emit(e.detail)};setViewport=()=>{this.isXxl=_.get().toLowerCase()==="xxlarge"};keydownHandler=e=>{e.code.toLowerCase()==="tab"&&(this.ariaAlert=!1)};disconnectedCallback(){window.removeEventListener("resize",this.setViewport),window.removeEventListener("keydown",this.keydownHandler)}onDropdownValueChange=e=>{let t=e.target,s=a(t,"data.options",[]),d=!0,o=!1,c=s.map(r=>{let g=e.detail==r.value,l=a(r,"isSelected",!1),x=g&&!l;if(g&&l)return d=!1,r;if(!g&&!l)return r;let{label:C,customEventDetail:F}=r;return this.filterChanged.emit(h(p({},F),{label:C,value:x})),x&&(o=!0),h(p({},r),{isSelected:x})});d&&(t.value=o?t.value:"placeholder",B(t,"data.options",c))};static get watchers(){return{data:[{updateData:0}
1],sidebar:[{updateBackgroundScroll:0}]}}};V.style=G();var T=()=>"@media (min-width: 640px){.show-for-sm-only{display:none !important}}@media (min-width: 640px){.hide-for-md{display:none !important}}@media (max-width: 640px){.show-for-md{display:none !important}}@media (min-width: 640px) and (max-width: 768px){.hide-for-md-only{display:none !important}}@media (max-width: 640px), (min-width: 768px){.show-for-md-only{display:none !important}}@media (min-width: 768px){.hide-for-lg{display:none !important}}@media (max-width: 768px){.show-for-lg{display:none !important}}@media (max-width: 767px){.show-for-lg-exclusive{display:none !important}}@media (min-width: 768px) and (max-width: 1024px){.hide-for-large-only{display:none !important}}@media (max-width: 768px), (min-width: 1024px){.show-for-lg-only{display:none !important}}@media (min-width: 1024px){.hide-for-xl{display:none !important}}@media (max-width: 1024px){.show-for-xl{display:none !important}}@media (min-width: 1024px) and (max-width: 1440px){.hide-for-xl-only{display:none !important}}@media (max-width: 1024px), (min-width: 1440px){.show-for-xl-only{display:none !important}}@media (min-width: 1440px){.hide-for-xxl{display:none !important}}@media (max-width: 1440px){.show-for-xxl{display:none !important}}@media (min-width: 1440px){.hide-for-xxl-only{display:none !important}}.show-for-sr,.show-on-focus{border:0 !important;clip:rect(0, 0, 0, 0) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;white-space:nowrap !important;width:1px !important}.show-on-focus:active,.show-on-focus:focus{clip:auto !important;height:auto !important;overflow:visible !important;position:static !important;white-space:normal !important;width:auto !important}.show-for-landscape,.hide-for-portrait{display:block !important}@media screen and (orientation: landscape){.show-for-landscape,.hide-for-portrait{display:block !important}}@media screen and (orientation: portrait){.show-for-landscape,.hide-for-portrait{display:none !important}}.hide-for-landscape,.show-for-portrait{display:none !important}@media screen and (orientation: landscape){.hide-for-landscape,.show-for-portrait{display:none !important}}@media screen and (orientation: portrait){.hide-for-landscape,.show-for-portrait{display:block !important}}@keyframes gdsLocalNavFadeIn{from{opacity:0}to{opacity:100%}}@keyframes gdsLocalNavSlideDown{from{max-height:0}to{max-height:100vh}}@keyframes GdsOpacityFadeIn{from{opacity:0}to{opacity:1}}@keyframes GdsOpacityFadeOut{from{opacity:1}to{opacity:0}}@keyframes fade-reveal{0%{opacity:0}100%{opacity:1}}@keyframes fade-conceal{0%{opacity:1}100%{opacity:0}}@keyframes bounce-down{0%{transform:translateY(0)}50%{transform:translateY(15px)}100%{transform:translateY(0)}}@keyframes blur-reveal{0%{filter:blur(0px)}100%{filter:blur(4px)}}@keyframes blur-conceal{0%{filter:blur(4px)}100%{filter:blur(0px)}}@keyframes GdsOpacityFadeIn{from{opacity:0}to{opacity:1}}@keyframes GdsOpacityFadeOut{from{opacity:1}to{opacity:0}}.gds-spacer.spacer-10{height:2px;min-height:2px}.gds-spacer.vertical-spacer-10{min-width:2px;width:2px}.gds-spacer.spacer-20{height:4px;min-height:4px}.gds-spacer.vertical-spacer-20{min-width:4px;width:4px}.gds-spacer.spacer-30{height:8px;min-height:8px}.gds-spacer.vertical-spacer-30{min-width:8px;width:8px}.gds-spacer.spacer-40{height:12px;min-height:12px}.gds-spacer.vertical-spacer-40{min-width:12px;width:12px}.gds-spacer.spacer-50{height:16px;min-height:16px}.gds-spacer.vertical-spacer-50{min-width:16px;width:16px}.gds-spacer.spacer-60{height:20px;min-height:20px}.gds-spacer.vertical-spacer-60{min-width:20px;width:20px}.gds-spacer.spacer-70{height:24px;min-height:24px}.gds-spacer.vertical-spacer-70{min-width:24px;width:24px}.gds-spacer.spacer-80{height:32px;min-height:32px}.gds-spacer.vertical-spacer-80{min-width:32px;width:32px}.gds-spacer.spacer-85{height:40px;min-height:40px}.gds-spacer.vertical-spacer-85{min-width:40px;width:40px}.gds-spacer.spacer-90{height:48px;min-height:48px}.gds-spacer.vertical-spacer-90{min-width:48px;width:48px}.gds-spacer.spacer-100{height:56px;min-height:56px}.gds-spacer.vertical-spacer-100{min-width:56px;width:56px}.gds-spacer.spacer-110{height:64px;min-height:64px}.gds-spacer.vertical-spacer-110{min-width:64px;width:64px}.gds-spacer.spacer-115{height:72px;min-height:72px}.gds-spacer.vertical-spacer-115{min-width:72px;width:72px}.gds-spacer.spacer-120{height:80px;min-height:80px}.gds-spacer.vertical-spacer-120{min-width:80px;width:80px}.gds-spacer.spacer-130{height:96px;min-height:96px}.gds-spacer.vertical-spacer-130{min-width:96px;width:96px}.gds-spacer.spacer-140{height:128px;min-height:128px}.gds-spacer.vertical-spacer-140{min-width:128px;width:128px}gds-selection-chips .gds-selection-chips-container{margin:0;padding:0;border:0}gds-selection-chips .gds-selection-chips-heading{font-weight:700;font-size:1rem;letter-spacing:0.013rem;line-height:1.25rem;color:var(--component-selection-chip-color-text-web-default);margin-bottom:8px;max-width:504px;word-break:break-word}gds-selection-chips .gds-selection-chips-body .gds-body{color:var(--component-selection-chip-color-text-web-default);padding-bottom:16px;max-width:504px}gds-selection-chips .gds-selection-chips.min-width{display:flex;flex-wrap:wrap;gap:8px}gds-selection-chips .gds-selection-chips.sidebar gds-button-element{display:contents}gds-selection-chips .gds-selection-chips.sidebar{display:inline-grid;grid-template-columns:repeat(2, 1fr);gap:8px;grid-auto-rows:max-content;width:100%}gds-selection-chips .gds-selection-chips.single-item{display:inline-grid;
1gap:0;grid-template-columns:none;grid-auto-rows:max-content;width:100%}gds-selection-chips .gds-selection-chips.use-images .gds-selection-chip{min-width:152px;display:flex;flex-direction:column;align-items:center}gds-selection-chips .gds-selection-chips.use-images img{display:block}gds-selection-chips .gds-selection-chips:not(.use-images) img{display:none}",N=class{constructor(e){b(this,e),this.gdsComponentLoaded=n(this,"gdsComponentLoaded",7),this.selectionChipsChanged=n(this,"selectionChipsChanged",7)}get el(){return k(this)}gdsVersion;xpath;_xpath;gdsComponentLoaded;selectionChipsChanged;contrast;theme="gds-default";use;chipType;data;filterButtons;renderOpen=!1;updateData(e,t){JSON.stringify(e)!==JSON.stringify(t)&&this.parseData()}_data;heading;description;showInAccordion;auId;uniqueId;resize;buttonElements;useImages;observeElement;imageLoaded(){this.updateButtonHeight()}componentWillLoad(){this.auId=w(),this.init()}componentWillRender(){u(this.xpath)&&(this._xpath=m(this.xpath))}componentDidLoad(){this.gdsComponentLoaded.emit()}componentDidRender(){this.buttonElements=this.el?.querySelectorAll(".gds-selection-chip"),this.setButtonHeight()}init(){this.parseData(),this.renderOpen=this.filterButtons.some(e=>e.isActive),this.uniqueId=`gds-selection-chips-${this.auId}`,f.store.onChange("contrast",e=>{this.contrast=e})}parseData(){this._data=m(this.data),this.theme=y(this.theme),this.heading=a(this._data,"header.heading",""),this.description=a(this._data,"header.description",""),this.showInAccordion=[!0,"true"].includes(a(this._data,"showInAccordion",!1)),this.filterButtons=[...a(this._data,"items",[])],this.useImages=this.filterButtons.some(e=>a(e,"image.mobile",""))}render(){if(this._data)return this.renderTemplate()}renderTemplate(){return i(v,{"gds-version":this.gdsVersion,"data-aui":`gds-selection-chips-${this.auId}`},this.showInAccordion?this.renderChipsInAccordion():this.renderChips())}renderChipButtons(){return i("div",{id:this.uniqueId,class:{"gds-selection-chips":!0,[`${this.use}`]:!!this.use,"single-item":this.filterButtons?.length===1,contrast:!!this.contrast,[`${this.theme}`]:!!this.theme,"use-images":!!this.useImages}},this.filterButtons.map((e,t)=>i("gds-button-element",{key:e.label,data:{button:h(p({},e),{index:t})},theme:this.theme,type:this.chipType||"selection-chip",contrast:this.contrast,xpath:{button:this._xpath?.items[t]},onButtonElementClick:this.filterChipSelectedHandler})))}renderChips(){return i("fieldset",{class:"gds-selection-chips-container"},this.heading&&i("legend",{class:`gds-selection-chips-heading ${this.theme}`,innerHTML:this.heading,"aria-live":"assertive"}),this.description&&i("gds-body",{data:{description:this.description},theme:this.theme,contrast:this.contrast,class:"gds-selection-chips-body",classes:"body-2"}),this.renderChipButtons())}renderChipsInAccordion(){return i("gds-accordion",{data:{contentOption:A.inset,heading:this.heading,headerOption:S.secondary,description:this.description},theme:this.theme,contrast:this.contrast,isOpen:this.renderOpen,onAccordionToggled:this.updateRenderOpen},i("fieldset",{class:"gds-selection-chips-container"},this.renderChipButtons()))}filterChipSelectedHandler=e=>{let t=a(e,"target",{}),s=a(t,"data.button",{}),{index:d}=s,o=a(s,"label",""),c=!a(s,"isActive",!1);if(this._data.type==="multi"){let r=a(s,"customEventDetail",{});this.filterButtons[d].isActive=c,this.filterButtons=[...this.filterButtons],this.selectionChipsChanged.emit(h(p({},r),{label:o,value:c}))}else this.filterButtons=this.filterButtons.map((r,g)=>{let l=c&&g===d;if(!l&&!r.isActive)return r;{let{label:x,customEventDetail:C}=r;return this.selectionChipsChanged.emit(h(p({}
1,C),{label:x,value:l})),h(p({},r),{isActive:l})}})};setButtonHeight(){this.observeElement=this.el.querySelector(D(this.uniqueId)),this.resize=new L(this.observeElement),this.resize.store.onChange("viewportWidth",()=>{this.updateButtonHeight()}),this.updateButtonHeight()}updateButtonHeight=()=>{let e=[];this.buttonElements?.forEach(s=>{s.style.height="fit-content",e.push(s.offsetHeight)});let t=Math.max(...e);this.buttonElements?.forEach(s=>{s.style.height=`${t}px`})};updateRenderOpen=e=>{this.renderOpen=a(e,"detail.isOpen",!1),this.updateButtonHeight()};disconnectedCallback(){this.resize&&this.resize.destroyObserver(this.observeElement)}static get watchers(){return{data:[{updateData:0}]}}};N.style=T();export{E as gds_checkbox_filter_section,V as gds_filter_list_sidebar,N as gds_selection_chips};
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.