@ds-mo/ui 13.16.0 → 13.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"schemaVersion":1,"package":"@ds-mo/ui","version":"13.16.0","components":67,"digest":"55fed7e47f4c13794943756d36dadf566a3d4c505a7f1fde06e6595a0fd383da","completedAt":"2026-08-13T00:16:44.079Z"}
1
+ {"schemaVersion":1,"package":"@ds-mo/ui","version":"13.16.1","components":67,"digest":"0ff7f761112558b5a32bed4cabe2bdea0391a9ca9755bdaf54a2697a39fe8b30","completedAt":"2026-08-13T02:34:39.498Z"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
3
  "package": "@ds-mo/ui",
4
- "packageVersion": "13.16.0",
4
+ "packageVersion": "13.16.1",
5
5
  "kind": "patterns",
6
6
  "entries": [
7
7
  {
package/dist/agent.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
3
  "package": "@ds-mo/ui",
4
- "packageVersion": "13.16.0",
4
+ "packageVersion": "13.16.1",
5
5
  "kind": "components",
6
6
  "entries": [
7
7
  {
@@ -2727,7 +2727,7 @@
2727
2727
  "Use presentation mode only inside a composite option that owns selection semantics, focus, and interaction."
2728
2728
  ],
2729
2729
  "states": [
2730
- "Unchecked boxes use a tertiary-foreground inset stroke: 1.5px at lg, 1.25px at md, 1px at sm, and 0.75px at xs. Selected and mixed boxes remove the border, use a brand fill, and draw a component-owned check or subtract mark at the same density-specific stroke width.",
2730
+ "Unchecked boxes use a tertiary-foreground inset stroke: 1.5px at lg, 1.25px at md, 1px at sm, and 0.75px at xs. Selected and mixed boxes remove the border, use a brand fill, and draw a component-owned filled check or subtract outline that scales with the box.",
2731
2731
  "Activating an indeterminate checkbox clears the mixed state, toggles checked, and emits dsChange with the resulting boolean.",
2732
2732
  "The initial checked and indeterminate values are restored by native form reset; checked values submit under name and unchecked values submit nothing.",
2733
2733
  "Sizes are lg with a 20px box in a 24px placement, md with a 16px box in a 20px placement, sm with a 12px box in a 16px placement, and xs with an 8px box in a 12px placement.",
@@ -6821,6 +6821,7 @@
6821
6821
  "A slotted Banner remains below the top safe-area inset and above routed, navigation, fullscreen-tool, and mobile global-surface presentations.",
6822
6822
  "Mobile global surfaces conceal and inert the routed workspace without unmounting it, preserving nested routes and scroll state.",
6823
6823
  "Keep PanelNav width, BarNav height, PanelTools chrome, and main-content origin stable except during intentional responsive or collapse transitions.",
6824
+ "Keep managed page-header capacity compact or constrained through the complete PanelTools close transition, then restore the closed-tools capacity after the drawer no longer occupies page width.",
6824
6825
  "The bottom bar remains visible at all route and tool depths in the foundation release."
6825
6826
  ],
6826
6827
  "frameworkCaveats": {
@@ -1,2 +1,2 @@
1
- import{A as o,d as s}from"./p-BxR8omPQ.js";const t=o;const m=s;export{t as DsAgentQuestionnaire,m as defineCustomElement};
1
+ import{A as o,d as s}from"./p-D4AfoIu6.js";const t=o;const p=s;export{t as DsAgentQuestionnaire,p as defineCustomElement};
2
2
  //# sourceMappingURL=ds-agent-questionnaire.js.map
@@ -1,2 +1,2 @@
1
- import{p as s,H as e,h as t,a,t as o}from"./index.js";import{d as i}from"./p-BRze4tRe.js";import{d}from"./p-BxR8omPQ.js";import{d as r}from"./p-NQOI5gN1.js";import{d as n}from"./p-CqDJRVT8.js";import{d as m}from"./p-B69Re7HW.js";import{d as c}from"./p-dEouiXJ8.js";import{d as l}from"./p-CnUq7E8S.js";import{d as f}from"./p-DStd98dM.js";import{d as u}from"./p-CKo3OFG1.js";import{d as p}from"./p-D5sIwLjA.js";import{d as b}from"./p-C8U5BsJf.js";import{d as k}from"./p-Ca-I2UnB.js";import{d as h}from"./p-D9FdOR_m.js";import{d as g}from"./p-00or0yGw.js";import{d as y}from"./p-C891ueIx.js";import{d as E}from"./p-Dhx_3_tf.js";import{d as w}from"./p-DyqLVdJp.js";const j=()=>`.sc-ds-agent-response-h{display:block;width:100%;--ds-prose-text-max-inline-size:var(--dimension-panel-width-lg);-webkit-user-select:none;user-select:none}.agent-response.sc-ds-agent-response{display:grid;gap:var(--dimension-space-150);min-width:0;width:100%;-webkit-user-select:none;user-select:none}`;const x=s(class s extends e{constructor(s){super();if(s!==false){this.__registerHost()}this.messageId="";this.author="";this.showAuthor=true;this.timestamp="";this.parts=[];this.renderMode="parts";this.streaming=false;this.metadataVisibility="always"}renderPart(s){switch(s.type){case"markdown":return t("ds-markdown",{key:s.id,content:s.content,streaming:s.state==="streaming"});case"activity":return t("ds-agent-activity",{key:s.id,items:s.items});case"tool":return t("ds-agent-tool-call",{key:s.id,name:s.name,label:s.label,state:s.state,input:s.input,output:s.output,error:s.error});case"attachments":return t("ds-attachment-list",{key:s.id,items:s.items});case"sources":return t("ds-agent-source-list",{key:s.id,items:s.items});case"questionnaire":return t("ds-agent-questionnaire",{key:s.id,requestId:s.requestId,questions:s.questions,answers:s.answers,status:"answered"})}}render(){return t(a,{key:"a478c74f2609ad1445b867695dc2714d30d1d5a7"},t("ds-message",{key:"fe201531d131f2699a0e014702836b0e62e095a2",messageId:this.messageId,direction:"incoming",author:this.author,showAuthor:this.showAuthor,timestamp:this.timestamp,streaming:this.streaming,metadataVisibility:this.metadataVisibility},t("div",{key:"34d428e08d3f2a58e3e60b18e7cc3133b5defe90",class:"agent-response"},this.renderMode==="composed"?t("slot",null):this.parts.map((s=>this.renderPart(s)))),t("slot",{key:"94c09f5cd1727f3d1aced38f7cd0d7365005e899",name:"footer",slot:"footer"}),t("slot",{key:"1dc0f5d4d202377dfd3e4a8f396a4fbf29c61f12",name:"metadata-actions",slot:"metadata-actions"}),t("slot",{key:"ab5df79a72f189c4c02567d0fd2fa9cc4c44b703",name:"actions",slot:"actions"})))}static get style(){return j()}},[262,"ds-agent-response",{messageId:[1,"message-id"],author:[1],showAuthor:[4,"show-author"],timestamp:[1],parts:[16],renderMode:[1,"render-mode"],streaming:[4],metadataVisibility:[1,"metadata-visibility"]}]);function q(){if(typeof customElements==="undefined"){return}const s=["ds-agent-response","ds-agent-activity","ds-agent-questionnaire","ds-agent-source-list","ds-agent-tool-call","ds-attachment-list","ds-badge","ds-button-filled","ds-button-unfilled","ds-checkbox","ds-code-block","ds-icon","ds-loader","ds-markdown","ds-message","ds-radio","ds-text","ds-tooltip"];s.forEach((s=>{switch(s){case"ds-agent-response":if(!customElements.get(o(s))){customElements.define(o(s),x)}break;case"ds-agent-activity":if(!customElements.get(o(s))){i()}break;case"ds-agent-questionnaire":if(!customElements.get(o(s))){d()}break;case"ds-agent-source-list":if(!customElements.get(o(s))){r()}break;case"ds-agent-tool-call":if(!customElements.get(o(s))){n()}break;case"ds-attachment-list":if(!customElements.get(o(s))){m()}break;case"ds-badge":if(!customElements.get(o(s))){c()}break;case"ds-button-filled":if(!customElements.get(o(s))){l()}break;case"ds-button-unfilled":if(!customElements.get(o(s))){f()}break;case"ds-checkbox":if(!customElements.get(o(s))){u()}break;case"ds-code-block":if(!customElements.get(o(s))){p()}break;case"ds-icon":if(!customElements.get(o(s))){b()}break;case"ds-loader":if(!customElements.get(o(s))){k()}break;case"ds-markdown":if(!customElements.get(o(s))){h()}break;case"ds-message":if(!customElements.get(o(s))){g()}break;case"ds-radio":if(!customElements.get(o(s))){y()}break;case"ds-text":if(!customElements.get(o(s))){E()}break;case"ds-tooltip":if(!customElements.get(o(s))){w()}break}}))}q();const v=x;const I=q;export{v as DsAgentResponse,I as defineCustomElement};
1
+ import{p as s,H as e,h as t,a,t as o}from"./index.js";import{d as i}from"./p-BRze4tRe.js";import{d}from"./p-D4AfoIu6.js";import{d as r}from"./p-NQOI5gN1.js";import{d as n}from"./p-CqDJRVT8.js";import{d as m}from"./p-B69Re7HW.js";import{d as c}from"./p-dEouiXJ8.js";import{d as l}from"./p-CnUq7E8S.js";import{d as f}from"./p-DStd98dM.js";import{d as u}from"./p-D4jQy3Ps.js";import{d as p}from"./p-D5sIwLjA.js";import{d as b}from"./p-C8U5BsJf.js";import{d as k}from"./p-Ca-I2UnB.js";import{d as h}from"./p-D9FdOR_m.js";import{d as g}from"./p-00or0yGw.js";import{d as y}from"./p-C891ueIx.js";import{d as E}from"./p-Dhx_3_tf.js";import{d as j}from"./p-DyqLVdJp.js";const w=()=>`.sc-ds-agent-response-h{display:block;width:100%;--ds-prose-text-max-inline-size:var(--dimension-panel-width-lg);-webkit-user-select:none;user-select:none}.agent-response.sc-ds-agent-response{display:grid;gap:var(--dimension-space-150);min-width:0;width:100%;-webkit-user-select:none;user-select:none}`;const x=s(class s extends e{constructor(s){super();if(s!==false){this.__registerHost()}this.messageId="";this.author="";this.showAuthor=true;this.timestamp="";this.parts=[];this.renderMode="parts";this.streaming=false;this.metadataVisibility="always"}renderPart(s){switch(s.type){case"markdown":return t("ds-markdown",{key:s.id,content:s.content,streaming:s.state==="streaming"});case"activity":return t("ds-agent-activity",{key:s.id,items:s.items});case"tool":return t("ds-agent-tool-call",{key:s.id,name:s.name,label:s.label,state:s.state,input:s.input,output:s.output,error:s.error});case"attachments":return t("ds-attachment-list",{key:s.id,items:s.items});case"sources":return t("ds-agent-source-list",{key:s.id,items:s.items});case"questionnaire":return t("ds-agent-questionnaire",{key:s.id,requestId:s.requestId,questions:s.questions,answers:s.answers,status:"answered"})}}render(){return t(a,{key:"a478c74f2609ad1445b867695dc2714d30d1d5a7"},t("ds-message",{key:"fe201531d131f2699a0e014702836b0e62e095a2",messageId:this.messageId,direction:"incoming",author:this.author,showAuthor:this.showAuthor,timestamp:this.timestamp,streaming:this.streaming,metadataVisibility:this.metadataVisibility},t("div",{key:"34d428e08d3f2a58e3e60b18e7cc3133b5defe90",class:"agent-response"},this.renderMode==="composed"?t("slot",null):this.parts.map((s=>this.renderPart(s)))),t("slot",{key:"94c09f5cd1727f3d1aced38f7cd0d7365005e899",name:"footer",slot:"footer"}),t("slot",{key:"1dc0f5d4d202377dfd3e4a8f396a4fbf29c61f12",name:"metadata-actions",slot:"metadata-actions"}),t("slot",{key:"ab5df79a72f189c4c02567d0fd2fa9cc4c44b703",name:"actions",slot:"actions"})))}static get style(){return w()}},[262,"ds-agent-response",{messageId:[1,"message-id"],author:[1],showAuthor:[4,"show-author"],timestamp:[1],parts:[16],renderMode:[1,"render-mode"],streaming:[4],metadataVisibility:[1,"metadata-visibility"]}]);function q(){if(typeof customElements==="undefined"){return}const s=["ds-agent-response","ds-agent-activity","ds-agent-questionnaire","ds-agent-source-list","ds-agent-tool-call","ds-attachment-list","ds-badge","ds-button-filled","ds-button-unfilled","ds-checkbox","ds-code-block","ds-icon","ds-loader","ds-markdown","ds-message","ds-radio","ds-text","ds-tooltip"];s.forEach((s=>{switch(s){case"ds-agent-response":if(!customElements.get(o(s))){customElements.define(o(s),x)}break;case"ds-agent-activity":if(!customElements.get(o(s))){i()}break;case"ds-agent-questionnaire":if(!customElements.get(o(s))){d()}break;case"ds-agent-source-list":if(!customElements.get(o(s))){r()}break;case"ds-agent-tool-call":if(!customElements.get(o(s))){n()}break;case"ds-attachment-list":if(!customElements.get(o(s))){m()}break;case"ds-badge":if(!customElements.get(o(s))){c()}break;case"ds-button-filled":if(!customElements.get(o(s))){l()}break;case"ds-button-unfilled":if(!customElements.get(o(s))){f()}break;case"ds-checkbox":if(!customElements.get(o(s))){u()}break;case"ds-code-block":if(!customElements.get(o(s))){p()}break;case"ds-icon":if(!customElements.get(o(s))){b()}break;case"ds-loader":if(!customElements.get(o(s))){k()}break;case"ds-markdown":if(!customElements.get(o(s))){h()}break;case"ds-message":if(!customElements.get(o(s))){g()}break;case"ds-radio":if(!customElements.get(o(s))){y()}break;case"ds-text":if(!customElements.get(o(s))){E()}break;case"ds-tooltip":if(!customElements.get(o(s))){j()}break}}))}q();const v=x;const D=q;export{v as DsAgentResponse,D as defineCustomElement};
2
2
  //# sourceMappingURL=ds-agent-response.js.map
@@ -1,2 +1,2 @@
1
- import{B as o,d as s}from"./p-BPbE-Kbl.js";const t=o;const p=s;export{t as DsBarNav,p as defineCustomElement};
1
+ import{B as o,d as s}from"./p-DO5-fplZ.js";const p=o;const t=s;export{p as DsBarNav,t as defineCustomElement};
2
2
  //# sourceMappingURL=ds-bar-nav.js.map
@@ -1,2 +1,2 @@
1
- import{C as o,d as s}from"./p-CKo3OFG1.js";const t=o;const p=s;export{t as DsCheckbox,p as defineCustomElement};
1
+ import{C as s,d as o}from"./p-D4jQy3Ps.js";const t=s;const p=o;export{t as DsCheckbox,p as defineCustomElement};
2
2
  //# sourceMappingURL=ds-checkbox.js.map
@@ -1,2 +1,2 @@
1
- import{p as e,H as s,c as t,h as i,a as o,t as r}from"./index.js";import{a as n,C as c,b as d}from"./p-ymtdhOU5.js";import{A as a}from"./p-BBxcMVqk.js";import{c as l,r as h}from"./p-DhKvqh5G.js";import{r as g}from"./p-BMc0DE59.js";import{T as u,r as f}from"./p-CXduurfd.js";import{d as p}from"./p-dEouiXJ8.js";import{d as v}from"./p-DStd98dM.js";import{d as m}from"./p-CKo3OFG1.js";import{d as b}from"./p-chA2WA5x.js";import{d as y}from"./p-C8U5BsJf.js";import{d as x}from"./p-Ca-I2UnB.js";import{d as w}from"./p-Dhx_3_tf.js";import{d as k}from"./p-DyqLVdJp.js";import{D as _,s as z}from"./p-DOUk4KoT.js";import{a as C,s as T,r as F,c as V}from"./p-D2xWcVv6.js";import{a as A,C as j}from"./p-CuwopElg.js";import{c as I}from"./p-DAW6G8Sl.js";function $(e,s){return s.length>0?s:[{options:e}]}function O(e){return e.flatMap((e=>e.options))}function D(e){return e.length>0&&e.every((e=>Boolean(e.icon)))}function L(e){return e.some((e=>Boolean(e.subtext?.trim())))}function E(e,s){const t=s.trim().toLocaleLowerCase();if(!t)return e;return e.map((e=>{const s=e.header?.toLocaleLowerCase().includes(t);return{...e,options:s?e.options:e.options.filter((e=>`${e.label} ${e.subtext??""}`.toLocaleLowerCase().includes(t)))}})).filter((e=>e.options.length>0))}function P(e){return e.map(((e,s)=>({option:e,index:s}))).filter((({option:e})=>!e.isInactive)).map((({index:e})=>e))}function S(e,s,t){const i=P(e);if(!i.length)return-1;const o=i.indexOf(s);const r=o>=0?o:t===1?-1:0;return i[(r+t+i.length)%i.length]}function q(e,s,t){const i=s.toLocaleLowerCase();if(!i)return-1;for(let s=1;s<=e.length;s+=1){const o=(Math.max(t,-1)+s)%e.length;const r=e[o];if(!r.isInactive&&r.label.toLocaleLowerCase().startsWith(i))return o}return-1}function B(e){return{"ds-interaction-fill--on-faint":e==="faint","ds-interaction-fill--on-medium":e==="medium","ds-interaction-fill--on-bold":e==="bold","ds-interaction-fill--on-strong":e==="strong","ds-interaction-fill--on-translucent":e==="translucent","ds-interaction-fill--on-inverted":e==="inverted","ds-interaction-fill--on-media":e==="media","ds-interaction-fill--on-always-dark":e==="always-dark"}}class R{constructor(e){this.state=e;this.triggerEl=null;this.popupEl=null;this.searchEl=null;this.typeahead="";this.typeaheadTimer=null;this.outsideHandler=null;this.setTriggerElement=e=>{this.triggerEl=e};this.setPopupElement=e=>{this.popupEl=e};this.setSearchElement=e=>{this.searchEl=e};this.handleTriggerKeyDown=e=>{if(!this.state.open){if(["ArrowDown","ArrowUp","Enter"," "].includes(e.key)){e.preventDefault();this.openPopup(true,e.key==="ArrowUp"?"last":"first")}else if(this.isTypeaheadKey(e)){e.preventDefault();this.openPopup(true);if(this.state.searchable)this.state.searchTerm=e.key;else this.handleTypeahead(e.key)}return}this.handleListKeyDown(e)};this.handleListKeyDown=e=>{switch(e.key){case"ArrowDown":e.preventDefault();this.state.focusRingVisible=true;this.state.activeIndex=S(this.state.options,this.state.activeIndex,1);break;case"ArrowUp":e.preventDefault();this.state.focusRingVisible=true;this.state.activeIndex=S(this.state.options,this.state.activeIndex,-1);break;case"Home":e.preventDefault();this.state.focusRingVisible=true;this.state.activeIndex=P(this.state.options)[0]??-1;break;case"End":{e.preventDefault();this.state.focusRingVisible=true;const s=P(this.state.options);this.state.activeIndex=s[s.length-1]??-1;break}case"Enter":case" ":{if(e.key===" "&&this.state.searchable&&e.target===this.searchEl)break;e.preventDefault();const s=this.state.options[this.state.activeIndex];if(s)this.state.selectOption(s);break}case"Escape":e.preventDefault();this.closePopup(true);break;case"Tab":this.closePopup();break;default:if(!this.state.searchable&&this.isTypeaheadKey(e)){this.handleTypeahead(e.key)}}};this.position=new a({getAnchor:()=>this.triggerEl,getPopup:()=>this.popupEl,measure:(e,s)=>{if(!this.state.open||!s.isConnected||!this.state.host.contains(s))return null;const t=g(u.space050,u.space050);s.style.minWidth=`${l(e.offsetWidth,t)}px`;return{anchorRect:e.getBoundingClientRect(),popupWidth:s.offsetWidth,popupHeight:s.offsetHeight,side:"bottom",align:"start",sideOffsetPx:t,alignOffsetPx:h({align:"start",alignOffsetPx:0,sectionInsetPx:t}),viewportPadPx:t,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}},apply:({x:e,y:s})=>{this.state.position={x:e,y:s};this.state.positionReady=true},topLayer:true})}get activeOptionId(){return!this.state.isLoading&&this.state.activeIndex>=0?`${this.state.generatedId}-option-${this.state.activeIndex}`:undefined}connect(){if(this.state.open)this.openChanged(true)}disconnect(){this.cancelPositionRetry();this.unbindPopupListeners();if(this.typeaheadTimer)clearTimeout(this.typeaheadTimer)}setFocus(){this.triggerEl?.focus()}optionsChanged(){if(!this.state.open)return;const e=P(this.state.options);if(!e.includes(this.state.activeIndex))this.state.activeIndex=e[0]??-1;requestAnimationFrame((()=>this.updatePosition()))}loadingChanged(){if(this.state.open)requestAnimationFrame((()=>this.updatePosition()))}openChanged(e){if(e){this.bindPopupListeners();this.schedulePositionUpdate((()=>{this.scrollActiveOptionIntoView();if(this.state.searchable)this.searchEl?.focus()}));return}this.cancelPositionRetry();this.unbindPopupListeners();this.state.searchTerm="";this.state.positionReady=false}searchChanged(){this.state.activeIndex=P(this.state.options)[0]??-1;requestAnimationFrame((()=>{this.updatePosition();this.scrollActiveOptionIntoView()}))}activeIndexChanged(){requestAnimationFrame((()=>this.scrollActiveOptionIntoView()))}openPopup(e,s){if(this.state.isDisabled||!this.state.options.length&&!this.state.isLoading)return;const t=P(this.state.options);this.state.activeIndex=s==="last"?t[t.length-1]??-1:this.state.preferredIndex>=0?this.state.preferredIndex:t[0]??-1;this.state.focusRingVisible=e;this.state.open=true}closePopup(e=false){if(!this.state.open)return;this.state.open=false;if(e)requestAnimationFrame((()=>this.triggerEl?.focus()))}focusSearchOrTrigger(){requestAnimationFrame((()=>this.state.searchable?this.searchEl?.focus():this.triggerEl?.focus()))}isTypeaheadKey(e){return e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey}handleTypeahead(e){if(this.typeaheadTimer)clearTimeout(this.typeaheadTimer);this.state.focusRingVisible=true;const s=e.toLocaleLowerCase();const t=this.typeahead.length>0&&[...this.typeahead].every((e=>e===s));this.typeahead=t?s:`${this.typeahead}${s}`;const i=q(this.state.options,this.typeahead,this.state.activeIndex);if(i>=0)this.state.activeIndex=i;const o=f(u.animationDurationMedium1,u.animationDurationMedium1);this.typeaheadTimer=setTimeout((()=>{this.typeahead="";this.typeaheadTimer=null}),o)}scrollActiveOptionIntoView(){if(!this.state.open||!this.activeOptionId)return;this.state.host.querySelector(`#${this.activeOptionId}`)?.scrollIntoView({block:"nearest",inline:"nearest"})}bindPopupListeners(){this.unbindPopupListeners();this.outsideHandler=e=>{if(this.state.host.contains(e.target))return;this.closePopup()};document.addEventListener("mousedown",this.outsideHandler,true);this.position.observe()}unbindPopupListeners(){if(this.outsideHandler){document.removeEventListener("mousedown",this.outsideHandler,true);this.outsideHandler=null}this.position.unobserve()}cancelPositionRetry(){this.position.cancel()}schedulePositionUpdate(e){if(!this.state.open)return;this.state.positionReady=false;this.position.schedule(e)}updatePosition(){return this.position.update()}}const H=()=>`@media (forced-colors: active){.sc-ds-select:root,.sc-ds-select-h,.ds-forced-colors-scope.sc-ds-select{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.sc-ds-select-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-select-h,.ds-focus-ring.sc-ds-select,.ds-focus-ring-inset.sc-ds-select-h,.ds-focus-ring-inset.sc-ds-select{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-select-h:focus-visible,.ds-focus-ring.sc-ds-select:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-select-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-select{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-select-h:focus-visible,.ds-focus-ring-inset.sc-ds-select:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-select-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-select:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-select-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-select{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-select-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-select::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}@media (forced-colors: active){.sc-ds-select-h{--ds-focus-ring-color:var(--ds-forced-color-selected)}}@media (forced-colors: active){.sc-ds-select:root,.sc-ds-select-h,.ds-forced-colors-scope.sc-ds-select{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}@media (forced-colors: active){.sc-ds-select:root,.sc-ds-select-h,.ds-forced-colors-scope.sc-ds-select{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-interaction-fill.sc-ds-select-h,.ds-interaction-fill.sc-ds-select{position:var(--ds-interaction-position, relative);z-index:var(--ds-interaction-z-index, 0);cursor:default;--ds-interaction-hover:var(--color-interaction-hover);--ds-interaction-pressed:var(--color-interaction-pressed);--ds-interaction-active:var(--color-interaction-active-brand);--ds-interaction-border-width:0px;--ds-interaction-border-color:transparent;--ds-interaction-divider-width:0px;--ds-interaction-divider-color:transparent;--ds-interaction-divider-inline-start-width:0px;--ds-interaction-divider-inline-start-color:transparent;--ds-interaction-divider-inline-end-width:0px;--ds-interaction-divider-inline-end-color:transparent}.ds-interaction-fill.sc-ds-select-h::before,.ds-interaction-fill.sc-ds-select::before,.ds-interaction-fill.sc-ds-select-h::after,.ds-interaction-fill.sc-ds-select::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;cursor:inherit;transition:none}.ds-interaction-fill.sc-ds-select-h::before,.ds-interaction-fill.sc-ds-select::before{z-index:1}.ds-interaction-fill.sc-ds-select-h::after,.ds-interaction-fill.sc-ds-select::after{z-index:3;box-shadow:inset 0 calc(-1 * var(--ds-interaction-divider-width)) 0 var(--ds-interaction-divider-color), inset var(--ds-interaction-divider-inline-start-width) 0 0 var(--ds-interaction-divider-inline-start-color), inset calc(-1 * var(--ds-interaction-divider-inline-end-width)) 0 0 var(--ds-interaction-divider-inline-end-color), inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}.ds-interaction-fill--bordered.sc-ds-select-h,.ds-interaction-fill--bordered.sc-ds-select{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}.ds-interaction-fill--selected.sc-ds-select-h::before,.ds-interaction-fill--selected.sc-ds-select::before{background:var(--ds-interaction-active)}.ds-interaction-fill--selected.sc-ds-select-h,.ds-interaction-fill--selected.sc-ds-select{--ds-interaction-dot-ring:var(--ds-interaction-active)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-select-h:hover:not(:disabled)::after,.ds-interaction-fill.sc-ds-select:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}}.ds-interaction-fill.sc-ds-select-h:active:not(:disabled)::after,.ds-interaction-fill.sc-ds-select:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}.ds-interaction-fill--grouped.sc-ds-select-h::after,.ds-interaction-fill--grouped.sc-ds-select::after,.ds-interaction-fill--grouped.sc-ds-select-h:active:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-select:active:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill--grouped.sc-ds-select-h:hover:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-select:hover:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}}.ds-interaction-fill--grouped.sc-ds-select-h,.ds-interaction-fill--grouped.sc-ds-select{--ds-interaction-divider-width:var(--ds-interaction-group-divider-width, 0px);--ds-interaction-divider-color:var(--ds-interaction-group-divider-color, transparent);--ds-interaction-divider-inline-start-width:var( --ds-interaction-group-divider-inline-start-width, 0px );--ds-interaction-divider-inline-start-color:var( --ds-interaction-group-divider-inline-start-color, transparent );--ds-interaction-divider-inline-end-width:var( --ds-interaction-group-divider-inline-end-width, 0px );--ds-interaction-divider-inline-end-color:var( --ds-interaction-group-divider-inline-end-color, transparent )}.ds-interaction-fill.sc-ds-select-h>.ds-interaction-fill__content.sc-ds-select,.ds-interaction-fill.sc-ds-select>.ds-interaction-fill__content.sc-ds-select,.ds-interaction-fill__content.sc-ds-select{position:relative;z-index:2;cursor:inherit}.ds-interaction-fill--on-faint.sc-ds-select-h,.ds-interaction-fill--on-faint.sc-ds-select{--ds-interaction-active:var(--color-interaction-active)}.ds-interaction-fill--on-medium.sc-ds-select-h,.ds-interaction-fill--on-medium.sc-ds-select{--ds-interaction-hover:var(--color-interaction-on-medium-background-hover);--ds-interaction-pressed:var(--color-interaction-on-medium-background-pressed);--ds-interaction-active:var(--color-interaction-on-medium-background-active);--ds-focus-ring-color:var(--color-interaction-on-medium-background-focus)}.ds-interaction-fill--on-bold.sc-ds-select-h,.ds-interaction-fill--on-bold.sc-ds-select{--ds-interaction-hover:var(--color-interaction-on-bold-background-hover);--ds-interaction-pressed:var(--color-interaction-on-bold-background-pressed);--ds-interaction-active:var(--color-interaction-on-bold-background-active);--ds-focus-ring-color:var(--color-interaction-on-bold-background-focus)}.ds-interaction-fill--on-strong.sc-ds-select-h,.ds-interaction-fill--on-strong.sc-ds-select{--ds-interaction-hover:var(--color-interaction-on-strong-background-hover);--ds-interaction-pressed:var(--color-interaction-on-strong-background-pressed);--ds-interaction-active:var(--color-interaction-on-strong-background-active);--ds-focus-ring-color:var(--color-interaction-on-strong-background-focus)}.ds-interaction-fill--on-translucent.sc-ds-select-h,.ds-interaction-fill--on-translucent.sc-ds-select{--ds-interaction-hover:var(--color-translucent-interaction-hover);--ds-interaction-pressed:var(--color-translucent-interaction-pressed);--ds-interaction-active:var(--color-translucent-interaction-active);--ds-focus-ring-color:var(--color-translucent-interaction-focus)}.ds-interaction-fill--on-inverted.sc-ds-select-h,.ds-interaction-fill--on-inverted.sc-ds-select{--ds-interaction-hover:var(--color-inverted-interaction-hover);--ds-interaction-pressed:var(--color-inverted-interaction-pressed);--ds-interaction-active:var(--color-inverted-interaction-active);--ds-focus-ring-color:var(--color-inverted-interaction-focus)}.ds-interaction-fill--on-media.sc-ds-select-h,.ds-interaction-fill--on-media.sc-ds-select{--ds-interaction-hover:var(--color-media-interaction-hover);--ds-interaction-pressed:var(--color-media-interaction-pressed);--ds-interaction-active:var(--color-media-interaction-active);--ds-focus-ring-color:var(--color-media-interaction-focus)}.ds-interaction-fill--on-always-dark.sc-ds-select-h,.ds-interaction-fill--on-always-dark.sc-ds-select{--ds-interaction-hover:var(--color-always-dark-interaction-hover);--ds-interaction-pressed:var(--color-always-dark-interaction-pressed);--ds-interaction-active:var(--color-always-dark-interaction-active);--ds-focus-ring-color:var(--color-always-dark-interaction-focus)}.ds-interaction-fill--on-navigation.sc-ds-select-h,.ds-interaction-fill--on-navigation.sc-ds-select{--ds-interaction-hover:var(--color-navigation-interaction-hover);--ds-interaction-pressed:var(--color-navigation-interaction-pressed);--ds-interaction-active:var(--color-navigation-interaction-active);--ds-focus-ring-color:var(--color-navigation-interaction-focus)}@media (forced-colors: active){.ds-interaction-fill.sc-ds-select-h::after,.ds-interaction-fill.sc-ds-select::after{box-shadow:none;outline:var(--ds-interaction-border-width) solid var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--ds-interaction-border-width))}.ds-interaction-fill--selected.sc-ds-select-h::before,.ds-interaction-fill--selected.sc-ds-select::before{background:transparent;outline:var(--dimension-stroke-width-025) solid var(--ds-forced-color-selected);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}}@media (forced-colors: active) and (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-select-h:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after,.ds-interaction-fill.sc-ds-select:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline-color:var(--ds-forced-color-selected);outline-width:var(--dimension-stroke-width-012)}}@media (forced-colors: active){.sc-ds-select:root,.sc-ds-select-h,.ds-forced-colors-scope.sc-ds-select{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-control-inactive.sc-ds-select-h,.ds-control-inactive.sc-ds-select{opacity:var(--effect-opacity-medium);pointer-events:none;cursor:not-allowed}@media (forced-colors: active){.ds-control-inactive.sc-ds-select-h,.ds-control-inactive.sc-ds-select{color:var(--ds-forced-color-disabled);opacity:1}}.ds-control--lg.sc-ds-select,.ds-control--lg.sc-ds-select-h,.ds-control--md.sc-ds-select-h,.ds-control--md.sc-ds-select,.ds-control--sm.sc-ds-select-h,.ds-control--sm.sc-ds-select,.ds-control--xs.sc-ds-select-h,.ds-control--xs.sc-ds-select{--ds-control-radius:var(--dimension-radius-025)}.ds-control--lg.sc-ds-select-h,.ds-control--lg.sc-ds-select{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}.ds-control--md.sc-ds-select-h,.ds-control--md.sc-ds-select{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}.ds-control--sm.sc-ds-select-h,.ds-control--sm.sc-ds-select{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}.ds-control--xs.sc-ds-select-h,.ds-control--xs.sc-ds-select{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}.ds-chrome-space--sm.sc-ds-select-h,.ds-chrome-space--sm.sc-ds-select{--ds-chrome-padding:var(--dimension-space-050);--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-select-h,.ds-chrome-space--md.sc-ds-select{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-select-h,.ds-chrome-space--lg.sc-ds-select{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-select-h,.ds-chrome-row.sc-ds-select,.ds-chrome-column.sc-ds-select-h,.ds-chrome-column.sc-ds-select,.ds-chrome-grid.sc-ds-select-h,.ds-chrome-grid.sc-ds-select{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}.ds-chrome-row.sc-ds-select-h,.ds-chrome-row.sc-ds-select{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-select-h,.ds-chrome-column.sc-ds-select{flex-direction:column}.ds-chrome-grid.sc-ds-select-h,.ds-chrome-grid.sc-ds-select{display:grid;align-items:center}.ds-control-frame.sc-ds-select{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.ds-control-section-heading.sc-ds-select{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-control-icon-box.sc-ds-select{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md))}.ds-control-label-box.sc-ds-select{min-width:0;padding-inline:var(--ds-control-label-inset, var(--dimension-space-025))}.ds-empty-region.sc-ds-select{display:flex;flex:1 1 auto;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;min-height:0}.ds-empty-region--padded.sc-ds-select{padding:var(--dimension-space-200)}.ds-choice-popup.sc-ds-select{box-sizing:border-box;display:flex;flex-direction:column;min-width:var(--dimension-menu-width-xs);max-width:min( var(--dimension-panel-width-lg), calc(100vw - var(--dimension-space-200)) );max-height:calc(100vh - var(--dimension-space-200));overflow:hidden;inset:auto;margin:0;padding:0;border:0;background-color:var(--color-background-primary);border-radius:var(--dimension-radius-075);box-shadow:var(--effect-shadow-elevated-floating);animation:dsChoiceFadeIn var(--effect-motion-short-2) forwards;backface-visibility:hidden;will-change:transform;text-align:start}.ds-choice-popup.sc-ds-select::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:var(--effect-highlight-elevated-floating)}.ds-choice-popup--closing.sc-ds-select{animation:dsChoiceFadeOut var(--effect-motion-short-2) forwards}@keyframes dsChoiceFadeIn{from{opacity:0;transform:inherit scale(0.97)}to{opacity:1}}@keyframes dsChoiceFadeOut{from{opacity:1}to{opacity:0}}@media (prefers-reduced-motion: reduce){.ds-choice-popup.sc-ds-select{animation:none;opacity:1}.ds-choice-popup--closing.sc-ds-select{opacity:0}}.ds-choice-list.sc-ds-select{display:flex;flex-direction:column;min-height:0;overflow-y:auto;overscroll-behavior:contain}.ds-choice-section--divided.sc-ds-select{border-bottom:var(--dimension-stroke-width-015) solid var(--color-border-tertiary)}ds-text.ds-choice-section__header.sc-ds-select{text-align:start;-webkit-user-select:none;user-select:none}.ds-choice-item.sc-ds-select{width:100%;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));background:transparent;cursor:default;-webkit-user-select:none;user-select:none;text-align:left;color:inherit}.ds-choice-item.sc-ds-select:has(.ds-choice-item__subtext){height:auto;min-height:var(--ds-control-height, var(--dimension-size-400));padding-block:var(--ds-control-padding-inline, var(--dimension-space-075));align-items:flex-start}.ds-choice-item__content.sc-ds-select{display:flex;flex:1;flex-direction:column;gap:var(--dimension-space-025);min-width:0}ds-text.ds-choice-item__label.sc-ds-select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ds-text.ds-choice-item__subtext.sc-ds-select{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ds-choice-item__icon.sc-ds-select,.ds-choice-item__suffix.sc-ds-select{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md));pointer-events:none}.ds-choice-empty.sc-ds-select,.ds-choice-loading.sc-ds-select{min-height:var(--dimension-size-600);padding:var(--dimension-space-100)}.ds-choice-footer.sc-ds-select{position:relative;box-sizing:border-box;padding-block:var(--dimension-space-050)}.ds-choice-footer.sc-ds-select::before{content:'';position:absolute;inset:0 0 auto;height:var(--dimension-stroke-width-012);background-color:var(--color-border-tertiary);pointer-events:none}.ds-choice-footer__content.sc-ds-select{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400))}.ds-choice-footer__summary.sc-ds-select,.ds-choice-footer__clear.sc-ds-select ds-text.sc-ds-select{padding-inline:calc( var(--dimension-space-050) + var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-choice-footer__clear.sc-ds-select{appearance:none;display:inline-flex;align-items:center;padding:0;border:0;border-radius:var(--dimension-radius-025);background:transparent;color:var(--color-foreground-bold-brand);cursor:default}@media (hover: hover) and (pointer: fine){.ds-choice-footer__clear.sc-ds-select:hover{text-decoration:underline;text-decoration-color:var(--color-foreground-tertiary)}}@media (forced-colors: active){.ds-choice-popup.sc-ds-select{outline:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);outline-offset:calc(-1 * var(--dimension-stroke-width-012))}.ds-choice-popup.sc-ds-select::after{box-shadow:none}.ds-choice-section--divided.sc-ds-select{border-bottom-color:var(--ds-forced-color-content)}.ds-choice-footer.sc-ds-select::before{background-color:var(--ds-forced-color-content)}}.ds-control-frame.sc-ds-select{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.ds-control-section-heading.sc-ds-select{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-control-icon-box.sc-ds-select{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md))}.ds-control-label-box.sc-ds-select{min-width:0;padding-inline:var(--ds-control-label-inset, var(--dimension-space-025))}.ds-control-width--hug.sc-ds-select-h,.ds-control-width--hug.sc-ds-select{width:fit-content;max-width:100%;flex:0 0 auto;align-self:flex-start}.ds-control-width--fill.sc-ds-select-h,.ds-control-width--fill.sc-ds-select{width:100%;min-width:0;flex:1 1 auto;align-self:stretch}.ds-field-stack.sc-ds-select-h,.ds-field-stack.sc-ds-select{display:flex;flex-direction:column;gap:var(--dimension-space-050)}.select-search.sc-ds-select{position:relative;box-sizing:border-box;padding:var(--dimension-space-050);background:transparent}.select-search.sc-ds-select::after{content:'';position:absolute;inset:auto 0 0;height:var(--dimension-stroke-width-012);background-color:var(--color-border-tertiary);pointer-events:none}.select-search.sc-ds-select:focus-within::after{height:var(--dimension-stroke-width-018);background-color:var(--color-border-bold-brand)}.select-search__control.sc-ds-select{display:flex;align-items:center;box-sizing:border-box;gap:var(--ds-control-gap, var(--dimension-space-050));height:var(--ds-control-height, var(--dimension-size-400));padding:0 var(--ds-control-padding-inline, var(--dimension-space-075));border:0;border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.select-search__control.sc-ds-select:has(.select-search__clear){padding-right:0}.select-search__control.sc-ds-select>ds-icon.sc-ds-select{flex-shrink:0;color:var(--color-foreground-secondary)}.select-search.sc-ds-select .select-search__control.sc-ds-select .select-search__clear.sc-ds-select{align-self:center;flex-shrink:0;margin-right:var(--dimension-space-050)}.select-search__control.sc-ds-select input.sc-ds-select{flex:1;min-width:0;height:100%;padding:0 var(--ds-control-label-inset, var(--dimension-space-025));border:0;outline:none;background:transparent;color:var(--color-foreground-primary);font-family:inherit}.select-search__control.sc-ds-select input.sc-ds-select::placeholder{color:var(--color-foreground-secondary)}.select-search__control.sc-ds-select input.sc-ds-select:focus::placeholder{color:var(--color-foreground-quaternary)}.select-search__control.sc-ds-select input[type='search'].sc-ds-select::-webkit-search-cancel-button,.select-search__control.sc-ds-select input[type='search'].sc-ds-select::-webkit-search-decoration{display:none}.ds-text--display-medium.sc-ds-select-h,.ds-text--display-medium.sc-ds-select{font-size:var(--typography-fontsize-3xl);line-height:var(--typography-lineheight-3xl)}.ds-text--display-small.sc-ds-select-h,.ds-text--display-small.sc-ds-select{font-size:var(--typography-fontsize-2xl);line-height:var(--typography-lineheight-2xl)}.ds-text--title-large.sc-ds-select-h,.ds-text--title-large.sc-ds-select{font-size:var(--typography-fontsize-xl);line-height:var(--typography-lineheight-xl)}.ds-text--title-medium.sc-ds-select-h,.ds-text--title-medium.sc-ds-select{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg)}.ds-text--title-small.sc-ds-select-h,.ds-text--title-small.sc-ds-select{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md)}.ds-text--body-large.sc-ds-select-h,.ds-text--body-large.sc-ds-select{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg)}.ds-text--body-medium.sc-ds-select-h,.ds-text--body-medium.sc-ds-select{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md)}.ds-text--body-small.sc-ds-select-h,.ds-text--body-small.sc-ds-select{font-size:var(--typography-fontsize-sm);line-height:var(--typography-lineheight-sm)}.ds-text--caption.sc-ds-select-h,.ds-text--caption.sc-ds-select{font-size:var(--typography-fontsize-xs);line-height:var(--typography-lineheight-xs);text-transform:uppercase}.ds-text--display-medium.ds-text--emphasis.sc-ds-select-h,.ds-text--display-small.ds-text--emphasis.sc-ds-select-h,.ds-text--display-medium.ds-text--emphasis.sc-ds-select,.ds-text--display-small.ds-text--emphasis.sc-ds-select{font-weight:var(--typography-weight-bold);letter-spacing:var(--typography-letterspacing-negative-double)}.ds-text--display-medium.ds-text--regular.sc-ds-select-h,.ds-text--display-small.ds-text--regular.sc-ds-select-h,.ds-text--display-medium.ds-text--regular.sc-ds-select,.ds-text--display-small.ds-text--regular.sc-ds-select{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-large.ds-text--emphasis.sc-ds-select-h,.ds-text--title-large.ds-text--emphasis.sc-ds-select{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative-double)}.ds-text--title-large.ds-text--regular.sc-ds-select-h,.ds-text--title-large.ds-text--regular.sc-ds-select{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-medium.ds-text--emphasis.sc-ds-select-h,.ds-text--title-small.ds-text--emphasis.sc-ds-select-h,.ds-text--title-medium.ds-text--emphasis.sc-ds-select,.ds-text--title-small.ds-text--emphasis.sc-ds-select{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-medium.ds-text--regular.sc-ds-select-h,.ds-text--title-small.ds-text--regular.sc-ds-select-h,.ds-text--title-medium.ds-text--regular.sc-ds-select,.ds-text--title-small.ds-text--regular.sc-ds-select{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-large.ds-text--emphasis.sc-ds-select-h,.ds-text--body-medium.ds-text--emphasis.sc-ds-select-h,.ds-text--body-large.ds-text--emphasis.sc-ds-select,.ds-text--body-medium.ds-text--emphasis.sc-ds-select{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--body-large.ds-text--regular.sc-ds-select-h,.ds-text--body-medium.ds-text--regular.sc-ds-select-h,.ds-text--body-large.ds-text--regular.sc-ds-select,.ds-text--body-medium.ds-text--regular.sc-ds-select{font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-small.ds-text--emphasis.sc-ds-select-h,.ds-text--body-small.ds-text--emphasis.sc-ds-select{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-small.ds-text--regular.sc-ds-select-h,.ds-text--body-small.ds-text--regular.sc-ds-select{font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-none)}.ds-text--caption.ds-text--emphasis.sc-ds-select-h,.ds-text--caption.ds-text--emphasis.sc-ds-select{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-positive)}.ds-text--caption.ds-text--regular.sc-ds-select-h,.ds-text--caption.ds-text--regular.sc-ds-select{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-positive)}.select-host.sc-ds-select-h{display:inline-flex;position:relative;outline:none;--ds-select-fg:var(--color-foreground-secondary);--ds-select-fg-active:var(--color-foreground-primary);--ds-select-prefix-fg:var(--ds-select-fg);--ds-select-chevron-fg:var(--ds-select-fg);--ds-select-border:var(--color-border-secondary)}.ds-control-width--fill.sc-ds-select-h,.ds-control-width--fill.sc-ds-select-h .trigger.sc-ds-select{width:100%}.trigger.sc-ds-select{justify-content:flex-start;background:transparent;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));color:var(--ds-select-fg);cursor:default;font-family:inherit;-webkit-user-select:none;user-select:none;overflow:hidden;transition:color var(--effect-motion-short-2)}.trigger--bordered.sc-ds-select{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--ds-select-border)}.trigger--has-value.sc-ds-select .trigger__label.sc-ds-select{color:var(--ds-select-fg-active)}.wrapper--error.sc-ds-select{--ds-interaction-border-width:var(--dimension-stroke-width-018);--ds-interaction-border-color:var(--color-border-bold-negative)}.trigger__prefix.sc-ds-select,.trigger__chevron.sc-ds-select{position:relative;z-index:2}.trigger__prefix.sc-ds-select{color:var(--ds-select-prefix-fg)}.trigger__chevron.sc-ds-select{color:var(--ds-select-chevron-fg)}.trigger__label.sc-ds-select{position:relative;z-index:2;flex:1 1 auto;text-align:left;color:inherit;transition:color var(--effect-motion-short-2)}.select-popup.sc-ds-select{color:var(--color-foreground-secondary)}.select-option[aria-selected='true'].sc-ds-select .ds-choice-item__icon.sc-ds-select{color:var(--color-foreground-primary)}.error-text.sc-ds-select{width:100%}.select-host--background-medium.sc-ds-select-h{--ds-select-fg:var(--color-foreground-on-medium-background-secondary);--ds-select-fg-active:var(--color-foreground-on-medium-background-primary);--ds-select-border:var(--color-border-on-medium-background-secondary)}.select-host--background-bold.sc-ds-select-h{--ds-select-fg:var(--color-foreground-on-bold-background-secondary);--ds-select-fg-active:var(--color-foreground-on-bold-background-primary);--ds-select-border:var(--color-border-on-bold-background-secondary)}.select-host--background-strong.sc-ds-select-h{--ds-select-fg:var(--color-foreground-on-strong-background-secondary);--ds-select-fg-active:var(--color-foreground-on-strong-background-primary);--ds-select-border:var(--color-border-on-strong-background-secondary)}.select-host--background-translucent.sc-ds-select-h{--ds-select-fg:var(--color-translucent-foreground-secondary);--ds-select-fg-active:var(--color-translucent-foreground-primary);--ds-select-border:var(--color-translucent-border-secondary)}.select-host--background-inverted.sc-ds-select-h{--ds-select-fg:var(--color-inverted-foreground-secondary);--ds-select-fg-active:var(--color-inverted-foreground-primary);--ds-select-border:var(--color-inverted-border-secondary)}.select-host--background-media.sc-ds-select-h{--ds-select-fg:var(--color-media-foreground-secondary);--ds-select-fg-active:var(--color-media-foreground-primary);--ds-select-border:var(--color-media-border-secondary)}.select-host--background-always-dark.sc-ds-select-h{--ds-select-fg:var(--color-always-dark-foreground-secondary);--ds-select-fg-active:var(--color-always-dark-foreground-primary);--ds-select-border:var(--color-always-dark-border-secondary)}`;const M={lg:"lg",md:"md",sm:"sm",xs:"xs"};let U=0;const G=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.dsChange=t(this,"dsChange");this.dsClear=t(this,"dsClear");this.dsOpenChange=t(this,"dsOpenChange");this.internals=this.attachInternals();this.options=[];this.sections=[];this.multiple=false;this.value="";this.open=false;this.disabled=false;this.required=false;this.requiredMessage=_;this.placeholder="Select";this.size="md";this.width="hug";this.isInactive=false;this.isLoading=false;this.activeFill=true;this.hasBorder=true;this.allowClear=true;this.clearLabel="Clear";this.selectedLabel="selected";this.searchable=false;this.searchPlaceholder="Search";this.noResultsText="No results found";this.loadingLabel="Loading";this.error=false;this.ariaLabel=null;this.activeIndex=-1;this.searchTerm="";this.formDisabled=false;this.position={x:0,y:0};this.positionReady=false;this.focusRingVisible=false;this.generatedId=`ds-select-${++U}`;this.listboxId=`${this.generatedId}-listbox`;this.errorId=`${this.generatedId}-error`;this.initialValue="";this.controller=this.createController();this.clearSelection=e=>{e.preventDefault();e.stopPropagation();this.value=this.multiple?[]:"";this.dsChange.emit(this.multiple?[]:"");this.dsClear.emit();if(!this.multiple){const e=P(this.visibleOptions);this.activeIndex=e[0]??-1}this.controller.focusSearchOrTrigger()};this.handleListKeyDown=this.controller.handleListKeyDown;this.handleTriggerKeyDown=this.controller.handleTriggerKeyDown}createController(){const e=this;return new R({get host(){return e.el},generatedId:e.generatedId,get options(){return e.visibleOptions},get searchable(){return e.searchable},get isLoading(){return e.isLoading},get isDisabled(){return e.isDisabled},get preferredIndex(){if(e.multiple)return-1;return e.visibleOptions.findIndex((s=>s.value===e.scalarValue&&!s.isInactive))},get open(){return e.open},set open(s){e.open=s},get activeIndex(){return e.activeIndex},set activeIndex(s){e.activeIndex=s},get searchTerm(){return e.searchTerm},set searchTerm(s){e.searchTerm=s},get focusRingVisible(){return e.focusRingVisible},set focusRingVisible(s){e.focusRingVisible=s},get position(){return e.position},set position(s){e.position=s},get positionReady(){return e.positionReady},set positionReady(s){e.positionReady=s},selectOption:s=>e.selectOption(s)})}componentWillLoad(){this.value=this.normalizeValueForMode(this.value);this.initialValue=Array.isArray(this.value)?[...this.value]:this.value;this.syncFormValue()}componentDidLoad(){this.controller.connect()}disconnectedCallback(){this.controller.disconnect()}syncFormValue(){if(this.multiple&&!Array.isArray(this.value)||!this.multiple&&Array.isArray(this.value)){this.value=this.normalizeValueForMode(this.value)}const e=this.isDisabled;if(this.multiple){const s=this.resolvedValues;C(this.internals,this.name,s,{inactive:e})}else{const s=this.hasSelection?this.scalarValue:"";T(this.internals,s,{inactive:e})}const s=this.required&&!e&&!this.hasSelection;z(this.internals,s,this.requiredMessage);this.controller.optionsChanged()}onLoadingChange(){this.controller.loadingChanged()}onOpenChange(e){this.dsOpenChange.emit(e);this.controller.openChanged(e)}onSearchTermChange(){this.controller.searchChanged()}onActiveIndexChange(){this.controller.activeIndexChanged()}formDisabledCallback(e){this.formDisabled=e;this.syncFormValue()}formResetCallback(){this.value=this.normalizeValueForMode(this.initialValue);this.closePopup()}formStateRestoreCallback(e){if(!this.multiple){this.value=F(e);return}this.value=V(e)}async setFocus(){this.controller.setFocus()}get isDisabled(){return this.disabled||this.isInactive||this.formDisabled}normalizeValueForMode(e){if(this.multiple){return Array.isArray(e)?[...e]:e?[e]:[]}return Array.isArray(e)?e[0]??"":e}get allSections(){return $(this.options,this.sections)}get allOptions(){return O(this.allSections)}get visibleSections(){return this.searchable?E(this.allSections,this.searchTerm):this.allSections}get visibleOptions(){return O(this.visibleSections)}get scalarValue(){return typeof this.value==="string"?this.value:""}get resolvedValues(){if(!this.multiple||!Array.isArray(this.value))return[];const e=new Set(this.allOptions.map((e=>e.value)));return[...new Set(this.value.filter((s=>e.has(s))))]}get selectedOption(){if(this.multiple)return undefined;return this.allOptions.find((e=>e.value===this.scalarValue))}get hasSelection(){return this.multiple?this.resolvedValues.length>0:Boolean(this.selectedOption)}get activeOptionId(){return this.controller.activeOptionId}closePopup(e=false){this.controller.closePopup(e)}openPopup(e,s){this.controller.openPopup(e,s)}selectOption(e){if(e.isInactive||this.isLoading)return;if(this.multiple){const s=this.resolvedValues;const t=s.includes(e.value)?s.filter((s=>s!==e.value)):[...s,e.value];this.value=t;this.dsChange.emit([...t]);return}this.value=e.value;this.dsChange.emit(e.value);this.controller.closePopup(true)}renderOption(e,s,t,o){const r=this.multiple?this.resolvedValues.includes(e.value):e.value===this.scalarValue;const c=s===this.activeIndex;return i(n,{size:this.size,id:`${this.generatedId}-option-${s}`,option:e,selected:r,active:c,focusRingVisible:this.focusRingVisible,usesSubtext:o,leading:this.multiple?i("span",{class:"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},i("ds-checkbox",{class:"select-option__checkbox",label:"",size:this.size,checked:r,presentation:true})):t&&e.icon?i("span",{class:"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},i("ds-icon",{name:e.icon,size:this.size,color:"inherit"})):undefined,onHover:()=>{this.focusRingVisible=false;this.activeIndex=s},onSelect:()=>this.selectOption(e)})}render(){const e=this.isDisabled;const s=!this.hasSelection;const t=this.resolvedValues.length;const r=this.multiple?`${this.placeholder}${t>0?` · ${t}`:""}`:s?this.placeholder:this.selectedOption?.label;const n=j[this.size];const a=M[this.size];const l=!this.multiple&&D(this.allOptions);const h=L(this.allOptions);const g=this.error&&Boolean(this.errorMessage);const u=[this.ariaDescribedby,g?this.errorId:undefined].filter(Boolean).join(" ")||undefined;const f={position:"fixed",left:"0",top:"0",transform:`translate(${Math.round(this.position.x)}px, ${Math.round(this.position.y)}px)`,zIndex:"var(--dimension-z-index-floating)",visibility:this.positionReady?"visible":"hidden"};let p=0;return i(o,{key:"ab88e227e8d2951a49041c738447e68dd65ad76b",class:{"select-host":true,"select-host--multiple":this.multiple,"ds-field-stack":true,"ds-control-inactive":e,[`ds-control--${this.size}`]:true,...I(this.width),[`select-host--background-${this.background}`]:!!this.background}},i("button",{key:"fd66d348443465182fef2a02e4ba423725915df7",ref:e=>{this.controller.setTriggerElement(e??null)},id:this.inputId??this.generatedId,type:"button",class:{trigger:true,"ds-control-frame":true,"ds-focus-ring-inset":true,"ds-interaction-fill":true,"ds-interaction-fill--selected":!e&&this.activeFill&&this.hasSelection,"trigger--bordered":this.hasBorder,"trigger--placeholder":s&&!this.multiple,"trigger--has-value":this.hasSelection,"wrapper--error":this.hasBorder&&this.error,[`ds-control--${this.size}`]:true,...B(this.background)},disabled:e,role:"combobox","aria-haspopup":"listbox","aria-expanded":String(this.open),"aria-controls":this.open?this.listboxId:undefined,"aria-activedescendant":this.open&&!this.searchable?this.activeOptionId:undefined,"aria-label":this.ariaLabel,"aria-labelledby":this.ariaLabelledby,"aria-describedby":u,"aria-invalid":this.error?"true":undefined,"aria-required":this.required||undefined,"aria-busy":this.isLoading?"true":undefined,onClick:()=>this.open?this.closePopup():this.openPopup(false),onKeyDown:this.handleTriggerKeyDown},(this.icon||this.isLoading)&&i("span",{key:"25002eda4117f1963ca19f9a93b91c3ef0cd7dde",class:"trigger__prefix ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},this.isLoading?i("ds-loader",{size:a,color:"inherit"}):i("ds-icon",{name:this.icon,size:a,color:"inherit"})),i("ds-text",{key:"708533ed69cc074019092fd5d1691db5e48ac4b6",class:"trigger__label ds-control-label-box ds-interaction-fill__content",as:"span",variant:n,color:"inherit",lineTruncation:1},r),i("span",{key:"289cea347f24c8cf24490bde3b9a6736be5783c2",class:"trigger__chevron ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},i("ds-icon",{key:"29a2af43896c90e5304dc8a4a761fa45542bd58a",name:"ChevronDown",size:a,color:"inherit"}))),this.open&&i("div",{key:"1b2fda1b263c29c1b70c85613a1c54abb3930611",popover:"manual",ref:e=>{this.controller.setPopupElement(e??null)},class:"select-popup ds-choice-popup",style:f},this.searchable&&i(c,{key:"75a8db2973b1ca6a4349e36baa74a285c49fd0f8",size:this.size,value:this.searchTerm,placeholder:this.searchPlaceholder,controls:this.listboxId,activeDescendant:this.activeOptionId,inputRef:this.controller.setSearchElement,clearLabel:this.clearLabel,onValueChange:e=>{this.searchTerm=e},onKeyDown:e=>this.handleListKeyDown(e)}),i("div",{key:"080b9c847a5f682572572028b345c858d967502a",id:this.listboxId,class:"ds-choice-list",role:"listbox","aria-multiselectable":this.multiple?"true":undefined,"aria-label":this.ariaLabel??this.placeholder,"aria-busy":this.isLoading?"true":undefined},this.isLoading?i("div",{class:"ds-choice-loading ds-empty-region",role:"option","aria-selected":"false","aria-disabled":"true","aria-label":this.loadingLabel,"aria-live":"polite"},i("ds-loader",{size:this.size,color:"inherit"})):this.visibleOptions.length===0?i("div",{class:"ds-choice-empty ds-empty-region",role:"option","aria-selected":"false","aria-disabled":"true","aria-label":this.noResultsText,"aria-live":"polite"},i("ds-empty-state",{body:this.noResultsText})):this.visibleSections.map((e=>i("div",{class:{"ds-choice-section":true,"ds-chrome-column":true,"ds-chrome-space--sm":true,"ds-choice-section--divided":!!e.divider},role:e.header?"group":undefined,"aria-label":e.header},e.header&&i("ds-text",{class:`ds-choice-section__header ds-control-section-heading ds-control--${this.size}`,as:"span",variant:A[this.size],emphasis:true,color:"primary","aria-hidden":"true"},e.header),e.options.map((e=>this.renderOption(e,p++,l,h))))))),this.allowClear&&this.hasSelection&&!this.isLoading&&i(d,{key:"b28918cc685a7389d91d73b4c24a2ab5562ec0ec",size:this.size,summary:this.multiple?`${t} ${this.selectedLabel}`:undefined,clearLabel:this.clearLabel,onClear:this.clearSelection})),g&&i("ds-text",{key:"c02ffd0dc7c0cddbdd104e42a276b9abef33d276",class:"error-text",as:"div",variant:"text-body-small",color:"negative",textId:this.errorId,role:"alert"},this.errorMessage))}static get formAssociated(){return true}get el(){return this}static get watchers(){return{value:[{syncFormValue:0}],multiple:[{syncFormValue:0}],disabled:[{syncFormValue:0}],isInactive:[{syncFormValue:0}],required:[{syncFormValue:0}],name:[{syncFormValue:0}],options:[{syncFormValue:0}],sections:[{syncFormValue:0}],isLoading:[{onLoadingChange:0}],open:[{onOpenChange:0}],searchTerm:[{onSearchTermChange:0}],activeIndex:[{onActiveIndexChange:0}]}}static get style(){return H()}},[66,"ds-select",{options:[16],sections:[16],multiple:[516],value:[1025],open:[1540],name:[513],disabled:[516],required:[516],requiredMessage:[1,"required-message"],placeholder:[1],size:[1],width:[1],isInactive:[4,"is-inactive"],isLoading:[4,"is-loading"],activeFill:[4,"active-fill"],hasBorder:[4,"has-border"],icon:[1],allowClear:[4,"allow-clear"],clearLabel:[1,"clear-label"],selectedLabel:[1,"selected-label"],searchable:[4],searchPlaceholder:[1,"search-placeholder"],noResultsText:[1,"no-results-text"],loadingLabel:[1,"loading-label"],background:[1],error:[4],errorMessage:[1,"error-message"],inputId:[1,"input-id"],ariaLabel:[1,"aria-label"],ariaLabelledby:[1,"aria-labelledby"],ariaDescribedby:[1,"aria-describedby"],activeIndex:[32],searchTerm:[32],formDisabled:[32],position:[32],positionReady:[32],focusRingVisible:[32],setFocus:[64]},undefined,{value:[{syncFormValue:0}],multiple:[{syncFormValue:0}],disabled:[{syncFormValue:0}],isInactive:[{syncFormValue:0}],required:[{syncFormValue:0}],name:[{syncFormValue:0}],options:[{syncFormValue:0}],sections:[{syncFormValue:0}],isLoading:[{onLoadingChange:0}],open:[{onOpenChange:0}],searchTerm:[{onSearchTermChange:0}],activeIndex:[{onActiveIndexChange:0}]}]);function K(){if(typeof customElements==="undefined"){return}const e=["ds-select","ds-badge","ds-button-unfilled","ds-checkbox","ds-empty-state","ds-icon","ds-loader","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-select":if(!customElements.get(r(e))){customElements.define(r(e),G)}break;case"ds-badge":if(!customElements.get(r(e))){p()}break;case"ds-button-unfilled":if(!customElements.get(r(e))){v()}break;case"ds-checkbox":if(!customElements.get(r(e))){m()}break;case"ds-empty-state":if(!customElements.get(r(e))){b()}break;case"ds-icon":if(!customElements.get(r(e))){y()}break;case"ds-loader":if(!customElements.get(r(e))){x()}break;case"ds-text":if(!customElements.get(r(e))){w()}break;case"ds-tooltip":if(!customElements.get(r(e))){k()}break}}))}K();const W=G;const J=K;export{W as DsSelect,J as defineCustomElement};
1
+ import{p as e,H as s,c as t,h as i,a as o,t as r}from"./index.js";import{a as n,C as c,b as d}from"./p-ymtdhOU5.js";import{A as a}from"./p-BBxcMVqk.js";import{c as l,r as h}from"./p-DhKvqh5G.js";import{r as g}from"./p-BMc0DE59.js";import{T as u,r as f}from"./p-CXduurfd.js";import{d as p}from"./p-dEouiXJ8.js";import{d as v}from"./p-DStd98dM.js";import{d as m}from"./p-D4jQy3Ps.js";import{d as b}from"./p-chA2WA5x.js";import{d as y}from"./p-C8U5BsJf.js";import{d as x}from"./p-Ca-I2UnB.js";import{d as w}from"./p-Dhx_3_tf.js";import{d as k}from"./p-DyqLVdJp.js";import{D as _,s as z}from"./p-DOUk4KoT.js";import{a as C,s as T,r as F,c as V}from"./p-D2xWcVv6.js";import{a as A,C as j}from"./p-CuwopElg.js";import{c as I}from"./p-DAW6G8Sl.js";function $(e,s){return s.length>0?s:[{options:e}]}function D(e){return e.flatMap((e=>e.options))}function L(e){return e.length>0&&e.every((e=>Boolean(e.icon)))}function O(e){return e.some((e=>Boolean(e.subtext?.trim())))}function E(e,s){const t=s.trim().toLocaleLowerCase();if(!t)return e;return e.map((e=>{const s=e.header?.toLocaleLowerCase().includes(t);return{...e,options:s?e.options:e.options.filter((e=>`${e.label} ${e.subtext??""}`.toLocaleLowerCase().includes(t)))}})).filter((e=>e.options.length>0))}function P(e){return e.map(((e,s)=>({option:e,index:s}))).filter((({option:e})=>!e.isInactive)).map((({index:e})=>e))}function S(e,s,t){const i=P(e);if(!i.length)return-1;const o=i.indexOf(s);const r=o>=0?o:t===1?-1:0;return i[(r+t+i.length)%i.length]}function q(e,s,t){const i=s.toLocaleLowerCase();if(!i)return-1;for(let s=1;s<=e.length;s+=1){const o=(Math.max(t,-1)+s)%e.length;const r=e[o];if(!r.isInactive&&r.label.toLocaleLowerCase().startsWith(i))return o}return-1}function B(e){return{"ds-interaction-fill--on-faint":e==="faint","ds-interaction-fill--on-medium":e==="medium","ds-interaction-fill--on-bold":e==="bold","ds-interaction-fill--on-strong":e==="strong","ds-interaction-fill--on-translucent":e==="translucent","ds-interaction-fill--on-inverted":e==="inverted","ds-interaction-fill--on-media":e==="media","ds-interaction-fill--on-always-dark":e==="always-dark"}}class R{constructor(e){this.state=e;this.triggerEl=null;this.popupEl=null;this.searchEl=null;this.typeahead="";this.typeaheadTimer=null;this.outsideHandler=null;this.setTriggerElement=e=>{this.triggerEl=e};this.setPopupElement=e=>{this.popupEl=e};this.setSearchElement=e=>{this.searchEl=e};this.handleTriggerKeyDown=e=>{if(!this.state.open){if(["ArrowDown","ArrowUp","Enter"," "].includes(e.key)){e.preventDefault();this.openPopup(true,e.key==="ArrowUp"?"last":"first")}else if(this.isTypeaheadKey(e)){e.preventDefault();this.openPopup(true);if(this.state.searchable)this.state.searchTerm=e.key;else this.handleTypeahead(e.key)}return}this.handleListKeyDown(e)};this.handleListKeyDown=e=>{switch(e.key){case"ArrowDown":e.preventDefault();this.state.focusRingVisible=true;this.state.activeIndex=S(this.state.options,this.state.activeIndex,1);break;case"ArrowUp":e.preventDefault();this.state.focusRingVisible=true;this.state.activeIndex=S(this.state.options,this.state.activeIndex,-1);break;case"Home":e.preventDefault();this.state.focusRingVisible=true;this.state.activeIndex=P(this.state.options)[0]??-1;break;case"End":{e.preventDefault();this.state.focusRingVisible=true;const s=P(this.state.options);this.state.activeIndex=s[s.length-1]??-1;break}case"Enter":case" ":{if(e.key===" "&&this.state.searchable&&e.target===this.searchEl)break;e.preventDefault();const s=this.state.options[this.state.activeIndex];if(s)this.state.selectOption(s);break}case"Escape":e.preventDefault();this.closePopup(true);break;case"Tab":this.closePopup();break;default:if(!this.state.searchable&&this.isTypeaheadKey(e)){this.handleTypeahead(e.key)}}};this.position=new a({getAnchor:()=>this.triggerEl,getPopup:()=>this.popupEl,measure:(e,s)=>{if(!this.state.open||!s.isConnected||!this.state.host.contains(s))return null;const t=g(u.space050,u.space050);s.style.minWidth=`${l(e.offsetWidth,t)}px`;return{anchorRect:e.getBoundingClientRect(),popupWidth:s.offsetWidth,popupHeight:s.offsetHeight,side:"bottom",align:"start",sideOffsetPx:t,alignOffsetPx:h({align:"start",alignOffsetPx:0,sectionInsetPx:t}),viewportPadPx:t,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}},apply:({x:e,y:s})=>{this.state.position={x:e,y:s};this.state.positionReady=true},topLayer:true})}get activeOptionId(){return!this.state.isLoading&&this.state.activeIndex>=0?`${this.state.generatedId}-option-${this.state.activeIndex}`:undefined}connect(){if(this.state.open)this.openChanged(true)}disconnect(){this.cancelPositionRetry();this.unbindPopupListeners();if(this.typeaheadTimer)clearTimeout(this.typeaheadTimer)}setFocus(){this.triggerEl?.focus()}optionsChanged(){if(!this.state.open)return;const e=P(this.state.options);if(!e.includes(this.state.activeIndex))this.state.activeIndex=e[0]??-1;requestAnimationFrame((()=>this.updatePosition()))}loadingChanged(){if(this.state.open)requestAnimationFrame((()=>this.updatePosition()))}openChanged(e){if(e){this.bindPopupListeners();this.schedulePositionUpdate((()=>{this.scrollActiveOptionIntoView();if(this.state.searchable)this.searchEl?.focus()}));return}this.cancelPositionRetry();this.unbindPopupListeners();this.state.searchTerm="";this.state.positionReady=false}searchChanged(){this.state.activeIndex=P(this.state.options)[0]??-1;requestAnimationFrame((()=>{this.updatePosition();this.scrollActiveOptionIntoView()}))}activeIndexChanged(){requestAnimationFrame((()=>this.scrollActiveOptionIntoView()))}openPopup(e,s){if(this.state.isDisabled||!this.state.options.length&&!this.state.isLoading)return;const t=P(this.state.options);this.state.activeIndex=s==="last"?t[t.length-1]??-1:this.state.preferredIndex>=0?this.state.preferredIndex:t[0]??-1;this.state.focusRingVisible=e;this.state.open=true}closePopup(e=false){if(!this.state.open)return;this.state.open=false;if(e)requestAnimationFrame((()=>this.triggerEl?.focus()))}focusSearchOrTrigger(){requestAnimationFrame((()=>this.state.searchable?this.searchEl?.focus():this.triggerEl?.focus()))}isTypeaheadKey(e){return e.key.length===1&&!e.metaKey&&!e.ctrlKey&&!e.altKey}handleTypeahead(e){if(this.typeaheadTimer)clearTimeout(this.typeaheadTimer);this.state.focusRingVisible=true;const s=e.toLocaleLowerCase();const t=this.typeahead.length>0&&[...this.typeahead].every((e=>e===s));this.typeahead=t?s:`${this.typeahead}${s}`;const i=q(this.state.options,this.typeahead,this.state.activeIndex);if(i>=0)this.state.activeIndex=i;const o=f(u.animationDurationMedium1,u.animationDurationMedium1);this.typeaheadTimer=setTimeout((()=>{this.typeahead="";this.typeaheadTimer=null}),o)}scrollActiveOptionIntoView(){if(!this.state.open||!this.activeOptionId)return;this.state.host.querySelector(`#${this.activeOptionId}`)?.scrollIntoView({block:"nearest",inline:"nearest"})}bindPopupListeners(){this.unbindPopupListeners();this.outsideHandler=e=>{if(this.state.host.contains(e.target))return;this.closePopup()};document.addEventListener("mousedown",this.outsideHandler,true);this.position.observe()}unbindPopupListeners(){if(this.outsideHandler){document.removeEventListener("mousedown",this.outsideHandler,true);this.outsideHandler=null}this.position.unobserve()}cancelPositionRetry(){this.position.cancel()}schedulePositionUpdate(e){if(!this.state.open)return;this.state.positionReady=false;this.position.schedule(e)}updatePosition(){return this.position.update()}}const H=()=>`@media (forced-colors: active){.sc-ds-select:root,.sc-ds-select-h,.ds-forced-colors-scope.sc-ds-select{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.sc-ds-select-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-select-h,.ds-focus-ring.sc-ds-select,.ds-focus-ring-inset.sc-ds-select-h,.ds-focus-ring-inset.sc-ds-select{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-select-h:focus-visible,.ds-focus-ring.sc-ds-select:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-select-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-select{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-select-h:focus-visible,.ds-focus-ring-inset.sc-ds-select:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-select-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-select:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-select-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-select{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-select-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-select::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}@media (forced-colors: active){.sc-ds-select-h{--ds-focus-ring-color:var(--ds-forced-color-selected)}}@media (forced-colors: active){.sc-ds-select:root,.sc-ds-select-h,.ds-forced-colors-scope.sc-ds-select{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}@media (forced-colors: active){.sc-ds-select:root,.sc-ds-select-h,.ds-forced-colors-scope.sc-ds-select{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-interaction-fill.sc-ds-select-h,.ds-interaction-fill.sc-ds-select{position:var(--ds-interaction-position, relative);z-index:var(--ds-interaction-z-index, 0);cursor:default;--ds-interaction-hover:var(--color-interaction-hover);--ds-interaction-pressed:var(--color-interaction-pressed);--ds-interaction-active:var(--color-interaction-active-brand);--ds-interaction-border-width:0px;--ds-interaction-border-color:transparent;--ds-interaction-divider-width:0px;--ds-interaction-divider-color:transparent;--ds-interaction-divider-inline-start-width:0px;--ds-interaction-divider-inline-start-color:transparent;--ds-interaction-divider-inline-end-width:0px;--ds-interaction-divider-inline-end-color:transparent}.ds-interaction-fill.sc-ds-select-h::before,.ds-interaction-fill.sc-ds-select::before,.ds-interaction-fill.sc-ds-select-h::after,.ds-interaction-fill.sc-ds-select::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;cursor:inherit;transition:none}.ds-interaction-fill.sc-ds-select-h::before,.ds-interaction-fill.sc-ds-select::before{z-index:1}.ds-interaction-fill.sc-ds-select-h::after,.ds-interaction-fill.sc-ds-select::after{z-index:3;box-shadow:inset 0 calc(-1 * var(--ds-interaction-divider-width)) 0 var(--ds-interaction-divider-color), inset var(--ds-interaction-divider-inline-start-width) 0 0 var(--ds-interaction-divider-inline-start-color), inset calc(-1 * var(--ds-interaction-divider-inline-end-width)) 0 0 var(--ds-interaction-divider-inline-end-color), inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}.ds-interaction-fill--bordered.sc-ds-select-h,.ds-interaction-fill--bordered.sc-ds-select{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}.ds-interaction-fill--selected.sc-ds-select-h::before,.ds-interaction-fill--selected.sc-ds-select::before{background:var(--ds-interaction-active)}.ds-interaction-fill--selected.sc-ds-select-h,.ds-interaction-fill--selected.sc-ds-select{--ds-interaction-dot-ring:var(--ds-interaction-active)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-select-h:hover:not(:disabled)::after,.ds-interaction-fill.sc-ds-select:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}}.ds-interaction-fill.sc-ds-select-h:active:not(:disabled)::after,.ds-interaction-fill.sc-ds-select:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}.ds-interaction-fill--grouped.sc-ds-select-h::after,.ds-interaction-fill--grouped.sc-ds-select::after,.ds-interaction-fill--grouped.sc-ds-select-h:active:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-select:active:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill--grouped.sc-ds-select-h:hover:not(:disabled)::after,.ds-interaction-fill--grouped.sc-ds-select:hover:not(:disabled)::after{background:var(--ds-interaction-group-fill, transparent)}}.ds-interaction-fill--grouped.sc-ds-select-h,.ds-interaction-fill--grouped.sc-ds-select{--ds-interaction-divider-width:var(--ds-interaction-group-divider-width, 0px);--ds-interaction-divider-color:var(--ds-interaction-group-divider-color, transparent);--ds-interaction-divider-inline-start-width:var( --ds-interaction-group-divider-inline-start-width, 0px );--ds-interaction-divider-inline-start-color:var( --ds-interaction-group-divider-inline-start-color, transparent );--ds-interaction-divider-inline-end-width:var( --ds-interaction-group-divider-inline-end-width, 0px );--ds-interaction-divider-inline-end-color:var( --ds-interaction-group-divider-inline-end-color, transparent )}.ds-interaction-fill.sc-ds-select-h>.ds-interaction-fill__content.sc-ds-select,.ds-interaction-fill.sc-ds-select>.ds-interaction-fill__content.sc-ds-select,.ds-interaction-fill__content.sc-ds-select{position:relative;z-index:2;cursor:inherit}.ds-interaction-fill--on-faint.sc-ds-select-h,.ds-interaction-fill--on-faint.sc-ds-select{--ds-interaction-active:var(--color-interaction-active)}.ds-interaction-fill--on-medium.sc-ds-select-h,.ds-interaction-fill--on-medium.sc-ds-select{--ds-interaction-hover:var(--color-interaction-on-medium-background-hover);--ds-interaction-pressed:var(--color-interaction-on-medium-background-pressed);--ds-interaction-active:var(--color-interaction-on-medium-background-active);--ds-focus-ring-color:var(--color-interaction-on-medium-background-focus)}.ds-interaction-fill--on-bold.sc-ds-select-h,.ds-interaction-fill--on-bold.sc-ds-select{--ds-interaction-hover:var(--color-interaction-on-bold-background-hover);--ds-interaction-pressed:var(--color-interaction-on-bold-background-pressed);--ds-interaction-active:var(--color-interaction-on-bold-background-active);--ds-focus-ring-color:var(--color-interaction-on-bold-background-focus)}.ds-interaction-fill--on-strong.sc-ds-select-h,.ds-interaction-fill--on-strong.sc-ds-select{--ds-interaction-hover:var(--color-interaction-on-strong-background-hover);--ds-interaction-pressed:var(--color-interaction-on-strong-background-pressed);--ds-interaction-active:var(--color-interaction-on-strong-background-active);--ds-focus-ring-color:var(--color-interaction-on-strong-background-focus)}.ds-interaction-fill--on-translucent.sc-ds-select-h,.ds-interaction-fill--on-translucent.sc-ds-select{--ds-interaction-hover:var(--color-translucent-interaction-hover);--ds-interaction-pressed:var(--color-translucent-interaction-pressed);--ds-interaction-active:var(--color-translucent-interaction-active);--ds-focus-ring-color:var(--color-translucent-interaction-focus)}.ds-interaction-fill--on-inverted.sc-ds-select-h,.ds-interaction-fill--on-inverted.sc-ds-select{--ds-interaction-hover:var(--color-inverted-interaction-hover);--ds-interaction-pressed:var(--color-inverted-interaction-pressed);--ds-interaction-active:var(--color-inverted-interaction-active);--ds-focus-ring-color:var(--color-inverted-interaction-focus)}.ds-interaction-fill--on-media.sc-ds-select-h,.ds-interaction-fill--on-media.sc-ds-select{--ds-interaction-hover:var(--color-media-interaction-hover);--ds-interaction-pressed:var(--color-media-interaction-pressed);--ds-interaction-active:var(--color-media-interaction-active);--ds-focus-ring-color:var(--color-media-interaction-focus)}.ds-interaction-fill--on-always-dark.sc-ds-select-h,.ds-interaction-fill--on-always-dark.sc-ds-select{--ds-interaction-hover:var(--color-always-dark-interaction-hover);--ds-interaction-pressed:var(--color-always-dark-interaction-pressed);--ds-interaction-active:var(--color-always-dark-interaction-active);--ds-focus-ring-color:var(--color-always-dark-interaction-focus)}.ds-interaction-fill--on-navigation.sc-ds-select-h,.ds-interaction-fill--on-navigation.sc-ds-select{--ds-interaction-hover:var(--color-navigation-interaction-hover);--ds-interaction-pressed:var(--color-navigation-interaction-pressed);--ds-interaction-active:var(--color-navigation-interaction-active);--ds-focus-ring-color:var(--color-navigation-interaction-focus)}@media (forced-colors: active){.ds-interaction-fill.sc-ds-select-h::after,.ds-interaction-fill.sc-ds-select::after{box-shadow:none;outline:var(--ds-interaction-border-width) solid var(--ds-forced-color-control-boundary);outline-offset:calc(-1 * var(--ds-interaction-border-width))}.ds-interaction-fill--selected.sc-ds-select-h::before,.ds-interaction-fill--selected.sc-ds-select::before{background:transparent;outline:var(--dimension-stroke-width-025) solid var(--ds-forced-color-selected);outline-offset:calc(-1 * var(--dimension-stroke-width-025))}}@media (forced-colors: active) and (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-select-h:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after,.ds-interaction-fill.sc-ds-select:hover:not(:disabled):not(:focus-visible):not(:focus-within):not(.ds-focus-ring--visible)::after{outline-color:var(--ds-forced-color-selected);outline-width:var(--dimension-stroke-width-012)}}@media (forced-colors: active){.sc-ds-select:root,.sc-ds-select-h,.ds-forced-colors-scope.sc-ds-select{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.ds-control-inactive.sc-ds-select-h,.ds-control-inactive.sc-ds-select{opacity:var(--effect-opacity-medium);pointer-events:none;cursor:not-allowed}@media (forced-colors: active){.ds-control-inactive.sc-ds-select-h,.ds-control-inactive.sc-ds-select{color:var(--ds-forced-color-disabled);opacity:1}}.ds-control--lg.sc-ds-select,.ds-control--lg.sc-ds-select-h,.ds-control--md.sc-ds-select-h,.ds-control--md.sc-ds-select,.ds-control--sm.sc-ds-select-h,.ds-control--sm.sc-ds-select,.ds-control--xs.sc-ds-select-h,.ds-control--xs.sc-ds-select{--ds-control-radius:var(--dimension-radius-025)}.ds-control--lg.sc-ds-select-h,.ds-control--lg.sc-ds-select{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}.ds-control--md.sc-ds-select-h,.ds-control--md.sc-ds-select{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}.ds-control--sm.sc-ds-select-h,.ds-control--sm.sc-ds-select{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}.ds-control--xs.sc-ds-select-h,.ds-control--xs.sc-ds-select{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}.ds-chrome-space--sm.sc-ds-select-h,.ds-chrome-space--sm.sc-ds-select{--ds-chrome-padding:var(--dimension-space-050);--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-select-h,.ds-chrome-space--md.sc-ds-select{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-select-h,.ds-chrome-space--lg.sc-ds-select{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-select-h,.ds-chrome-row.sc-ds-select,.ds-chrome-column.sc-ds-select-h,.ds-chrome-column.sc-ds-select,.ds-chrome-grid.sc-ds-select-h,.ds-chrome-grid.sc-ds-select{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}.ds-chrome-row.sc-ds-select-h,.ds-chrome-row.sc-ds-select{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-select-h,.ds-chrome-column.sc-ds-select{flex-direction:column}.ds-chrome-grid.sc-ds-select-h,.ds-chrome-grid.sc-ds-select{display:grid;align-items:center}.ds-control-frame.sc-ds-select{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.ds-control-section-heading.sc-ds-select{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-control-icon-box.sc-ds-select{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md))}.ds-control-label-box.sc-ds-select{min-width:0;padding-inline:var(--ds-control-label-inset, var(--dimension-space-025))}.ds-empty-region.sc-ds-select{display:flex;flex:1 1 auto;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;min-height:0}.ds-empty-region--padded.sc-ds-select{padding:var(--dimension-space-200)}.ds-choice-popup.sc-ds-select{box-sizing:border-box;display:flex;flex-direction:column;min-width:var(--dimension-menu-width-xs);max-width:min( var(--dimension-panel-width-lg), calc(100vw - var(--dimension-space-200)) );max-height:calc(100vh - var(--dimension-space-200));overflow:hidden;inset:auto;margin:0;padding:0;border:0;background-color:var(--color-background-primary);border-radius:var(--dimension-radius-075);box-shadow:var(--effect-shadow-elevated-floating);animation:dsChoiceFadeIn var(--effect-motion-short-2) forwards;backface-visibility:hidden;will-change:transform;text-align:start}.ds-choice-popup.sc-ds-select::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;box-shadow:var(--effect-highlight-elevated-floating)}.ds-choice-popup--closing.sc-ds-select{animation:dsChoiceFadeOut var(--effect-motion-short-2) forwards}@keyframes dsChoiceFadeIn{from{opacity:0;transform:inherit scale(0.97)}to{opacity:1}}@keyframes dsChoiceFadeOut{from{opacity:1}to{opacity:0}}@media (prefers-reduced-motion: reduce){.ds-choice-popup.sc-ds-select{animation:none;opacity:1}.ds-choice-popup--closing.sc-ds-select{opacity:0}}.ds-choice-list.sc-ds-select{display:flex;flex-direction:column;min-height:0;overflow-y:auto;overscroll-behavior:contain}.ds-choice-section--divided.sc-ds-select{border-bottom:var(--dimension-stroke-width-015) solid var(--color-border-tertiary)}ds-text.ds-choice-section__header.sc-ds-select{text-align:start;-webkit-user-select:none;user-select:none}.ds-choice-item.sc-ds-select{width:100%;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));background:transparent;cursor:default;-webkit-user-select:none;user-select:none;text-align:left;color:inherit}.ds-choice-item.sc-ds-select:has(.ds-choice-item__subtext){height:auto;min-height:var(--ds-control-height, var(--dimension-size-400));padding-block:var(--ds-control-padding-inline, var(--dimension-space-075));align-items:flex-start}.ds-choice-item__content.sc-ds-select{display:flex;flex:1;flex-direction:column;gap:var(--dimension-space-025);min-width:0}ds-text.ds-choice-item__label.sc-ds-select{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}ds-text.ds-choice-item__subtext.sc-ds-select{display:-webkit-box;overflow:hidden;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2}.ds-choice-item__icon.sc-ds-select,.ds-choice-item__suffix.sc-ds-select{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md));pointer-events:none}.ds-choice-empty.sc-ds-select,.ds-choice-loading.sc-ds-select{min-height:var(--dimension-size-600);padding:var(--dimension-space-100)}.ds-choice-footer.sc-ds-select{position:relative;box-sizing:border-box;padding-block:var(--dimension-space-050)}.ds-choice-footer.sc-ds-select::before{content:'';position:absolute;inset:0 0 auto;height:var(--dimension-stroke-width-012);background-color:var(--color-border-tertiary);pointer-events:none}.ds-choice-footer__content.sc-ds-select{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400))}.ds-choice-footer__summary.sc-ds-select,.ds-choice-footer__clear.sc-ds-select ds-text.sc-ds-select{padding-inline:calc( var(--dimension-space-050) + var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-choice-footer__clear.sc-ds-select{appearance:none;display:inline-flex;align-items:center;padding:0;border:0;border-radius:var(--dimension-radius-025);background:transparent;color:var(--color-foreground-bold-brand);cursor:default}@media (hover: hover) and (pointer: fine){.ds-choice-footer__clear.sc-ds-select:hover{text-decoration:underline;text-decoration-color:var(--color-foreground-tertiary)}}@media (forced-colors: active){.ds-choice-popup.sc-ds-select{outline:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);outline-offset:calc(-1 * var(--dimension-stroke-width-012))}.ds-choice-popup.sc-ds-select::after{box-shadow:none}.ds-choice-section--divided.sc-ds-select{border-bottom-color:var(--ds-forced-color-content)}.ds-choice-footer.sc-ds-select::before{background-color:var(--ds-forced-color-content)}}.ds-control-frame.sc-ds-select{display:inline-flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:var(--ds-control-padding-inline, var(--dimension-space-075));gap:var(--ds-control-gap, var(--dimension-space-050));border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.ds-control-section-heading.sc-ds-select{display:flex;align-items:center;box-sizing:border-box;height:var(--ds-control-height, var(--dimension-size-400));padding-inline:calc( var(--ds-control-padding-inline, var(--dimension-space-075)) + var(--ds-control-label-inset, var(--dimension-space-025)) )}.ds-control-icon-box.sc-ds-select{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--ds-control-icon, var(--dimension-iconography-md));height:var(--ds-control-icon, var(--dimension-iconography-md))}.ds-control-label-box.sc-ds-select{min-width:0;padding-inline:var(--ds-control-label-inset, var(--dimension-space-025))}.ds-control-width--hug.sc-ds-select-h,.ds-control-width--hug.sc-ds-select{width:fit-content;max-width:100%;flex:0 0 auto;align-self:flex-start}.ds-control-width--fill.sc-ds-select-h,.ds-control-width--fill.sc-ds-select{width:100%;min-width:0;flex:1 1 auto;align-self:stretch}.ds-field-stack.sc-ds-select-h,.ds-field-stack.sc-ds-select{display:flex;flex-direction:column;gap:var(--dimension-space-050)}.select-search.sc-ds-select{position:relative;box-sizing:border-box;padding:var(--dimension-space-050);background:transparent}.select-search.sc-ds-select::after{content:'';position:absolute;inset:auto 0 0;height:var(--dimension-stroke-width-012);background-color:var(--color-border-tertiary);pointer-events:none}.select-search.sc-ds-select:focus-within::after{height:var(--dimension-stroke-width-018);background-color:var(--color-border-bold-brand)}.select-search__control.sc-ds-select{display:flex;align-items:center;box-sizing:border-box;gap:var(--ds-control-gap, var(--dimension-space-050));height:var(--ds-control-height, var(--dimension-size-400));padding:0 var(--ds-control-padding-inline, var(--dimension-space-075));border:0;border-radius:var(--ds-control-radius, var(--dimension-radius-025))}.select-search__control.sc-ds-select:has(.select-search__clear){padding-right:0}.select-search__control.sc-ds-select>ds-icon.sc-ds-select{flex-shrink:0;color:var(--color-foreground-secondary)}.select-search.sc-ds-select .select-search__control.sc-ds-select .select-search__clear.sc-ds-select{align-self:center;flex-shrink:0;margin-right:var(--dimension-space-050)}.select-search__control.sc-ds-select input.sc-ds-select{flex:1;min-width:0;height:100%;padding:0 var(--ds-control-label-inset, var(--dimension-space-025));border:0;outline:none;background:transparent;color:var(--color-foreground-primary);font-family:inherit}.select-search__control.sc-ds-select input.sc-ds-select::placeholder{color:var(--color-foreground-secondary)}.select-search__control.sc-ds-select input.sc-ds-select:focus::placeholder{color:var(--color-foreground-quaternary)}.select-search__control.sc-ds-select input[type='search'].sc-ds-select::-webkit-search-cancel-button,.select-search__control.sc-ds-select input[type='search'].sc-ds-select::-webkit-search-decoration{display:none}.ds-text--display-medium.sc-ds-select-h,.ds-text--display-medium.sc-ds-select{font-size:var(--typography-fontsize-3xl);line-height:var(--typography-lineheight-3xl)}.ds-text--display-small.sc-ds-select-h,.ds-text--display-small.sc-ds-select{font-size:var(--typography-fontsize-2xl);line-height:var(--typography-lineheight-2xl)}.ds-text--title-large.sc-ds-select-h,.ds-text--title-large.sc-ds-select{font-size:var(--typography-fontsize-xl);line-height:var(--typography-lineheight-xl)}.ds-text--title-medium.sc-ds-select-h,.ds-text--title-medium.sc-ds-select{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg)}.ds-text--title-small.sc-ds-select-h,.ds-text--title-small.sc-ds-select{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md)}.ds-text--body-large.sc-ds-select-h,.ds-text--body-large.sc-ds-select{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg)}.ds-text--body-medium.sc-ds-select-h,.ds-text--body-medium.sc-ds-select{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md)}.ds-text--body-small.sc-ds-select-h,.ds-text--body-small.sc-ds-select{font-size:var(--typography-fontsize-sm);line-height:var(--typography-lineheight-sm)}.ds-text--caption.sc-ds-select-h,.ds-text--caption.sc-ds-select{font-size:var(--typography-fontsize-xs);line-height:var(--typography-lineheight-xs);text-transform:uppercase}.ds-text--display-medium.ds-text--emphasis.sc-ds-select-h,.ds-text--display-small.ds-text--emphasis.sc-ds-select-h,.ds-text--display-medium.ds-text--emphasis.sc-ds-select,.ds-text--display-small.ds-text--emphasis.sc-ds-select{font-weight:var(--typography-weight-bold);letter-spacing:var(--typography-letterspacing-negative-double)}.ds-text--display-medium.ds-text--regular.sc-ds-select-h,.ds-text--display-small.ds-text--regular.sc-ds-select-h,.ds-text--display-medium.ds-text--regular.sc-ds-select,.ds-text--display-small.ds-text--regular.sc-ds-select{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-large.ds-text--emphasis.sc-ds-select-h,.ds-text--title-large.ds-text--emphasis.sc-ds-select{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative-double)}.ds-text--title-large.ds-text--regular.sc-ds-select-h,.ds-text--title-large.ds-text--regular.sc-ds-select{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-medium.ds-text--emphasis.sc-ds-select-h,.ds-text--title-small.ds-text--emphasis.sc-ds-select-h,.ds-text--title-medium.ds-text--emphasis.sc-ds-select,.ds-text--title-small.ds-text--emphasis.sc-ds-select{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-medium.ds-text--regular.sc-ds-select-h,.ds-text--title-small.ds-text--regular.sc-ds-select-h,.ds-text--title-medium.ds-text--regular.sc-ds-select,.ds-text--title-small.ds-text--regular.sc-ds-select{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-large.ds-text--emphasis.sc-ds-select-h,.ds-text--body-medium.ds-text--emphasis.sc-ds-select-h,.ds-text--body-large.ds-text--emphasis.sc-ds-select,.ds-text--body-medium.ds-text--emphasis.sc-ds-select{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--body-large.ds-text--regular.sc-ds-select-h,.ds-text--body-medium.ds-text--regular.sc-ds-select-h,.ds-text--body-large.ds-text--regular.sc-ds-select,.ds-text--body-medium.ds-text--regular.sc-ds-select{font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-small.ds-text--emphasis.sc-ds-select-h,.ds-text--body-small.ds-text--emphasis.sc-ds-select{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-small.ds-text--regular.sc-ds-select-h,.ds-text--body-small.ds-text--regular.sc-ds-select{font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-none)}.ds-text--caption.ds-text--emphasis.sc-ds-select-h,.ds-text--caption.ds-text--emphasis.sc-ds-select{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-positive)}.ds-text--caption.ds-text--regular.sc-ds-select-h,.ds-text--caption.ds-text--regular.sc-ds-select{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-positive)}.select-host.sc-ds-select-h{display:inline-flex;position:relative;outline:none;--ds-select-fg:var(--color-foreground-secondary);--ds-select-fg-active:var(--color-foreground-primary);--ds-select-prefix-fg:var(--ds-select-fg);--ds-select-chevron-fg:var(--ds-select-fg);--ds-select-border:var(--color-border-secondary)}.ds-control-width--fill.sc-ds-select-h,.ds-control-width--fill.sc-ds-select-h .trigger.sc-ds-select{width:100%}.trigger.sc-ds-select{justify-content:flex-start;background:transparent;border:none;border-radius:var(--ds-control-radius, var(--dimension-radius-025));color:var(--ds-select-fg);cursor:default;font-family:inherit;-webkit-user-select:none;user-select:none;overflow:hidden;transition:color var(--effect-motion-short-2)}.trigger--bordered.sc-ds-select{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--ds-select-border)}.trigger--has-value.sc-ds-select .trigger__label.sc-ds-select{color:var(--ds-select-fg-active)}.wrapper--error.sc-ds-select{--ds-interaction-border-width:var(--dimension-stroke-width-018);--ds-interaction-border-color:var(--color-border-bold-negative)}.trigger__prefix.sc-ds-select,.trigger__chevron.sc-ds-select{position:relative;z-index:2}.trigger__prefix.sc-ds-select{color:var(--ds-select-prefix-fg)}.trigger__chevron.sc-ds-select{color:var(--ds-select-chevron-fg)}.trigger__label.sc-ds-select{position:relative;z-index:2;flex:1 1 auto;text-align:left;color:inherit;transition:color var(--effect-motion-short-2)}.select-popup.sc-ds-select{color:var(--color-foreground-secondary)}.select-option[aria-selected='true'].sc-ds-select .ds-choice-item__icon.sc-ds-select{color:var(--color-foreground-primary)}.error-text.sc-ds-select{width:100%}.select-host--background-medium.sc-ds-select-h{--ds-select-fg:var(--color-foreground-on-medium-background-secondary);--ds-select-fg-active:var(--color-foreground-on-medium-background-primary);--ds-select-border:var(--color-border-on-medium-background-secondary)}.select-host--background-bold.sc-ds-select-h{--ds-select-fg:var(--color-foreground-on-bold-background-secondary);--ds-select-fg-active:var(--color-foreground-on-bold-background-primary);--ds-select-border:var(--color-border-on-bold-background-secondary)}.select-host--background-strong.sc-ds-select-h{--ds-select-fg:var(--color-foreground-on-strong-background-secondary);--ds-select-fg-active:var(--color-foreground-on-strong-background-primary);--ds-select-border:var(--color-border-on-strong-background-secondary)}.select-host--background-translucent.sc-ds-select-h{--ds-select-fg:var(--color-translucent-foreground-secondary);--ds-select-fg-active:var(--color-translucent-foreground-primary);--ds-select-border:var(--color-translucent-border-secondary)}.select-host--background-inverted.sc-ds-select-h{--ds-select-fg:var(--color-inverted-foreground-secondary);--ds-select-fg-active:var(--color-inverted-foreground-primary);--ds-select-border:var(--color-inverted-border-secondary)}.select-host--background-media.sc-ds-select-h{--ds-select-fg:var(--color-media-foreground-secondary);--ds-select-fg-active:var(--color-media-foreground-primary);--ds-select-border:var(--color-media-border-secondary)}.select-host--background-always-dark.sc-ds-select-h{--ds-select-fg:var(--color-always-dark-foreground-secondary);--ds-select-fg-active:var(--color-always-dark-foreground-primary);--ds-select-border:var(--color-always-dark-border-secondary)}`;const M={lg:"lg",md:"md",sm:"sm",xs:"xs"};let U=0;const G=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.dsChange=t(this,"dsChange");this.dsClear=t(this,"dsClear");this.dsOpenChange=t(this,"dsOpenChange");this.internals=this.attachInternals();this.options=[];this.sections=[];this.multiple=false;this.value="";this.open=false;this.disabled=false;this.required=false;this.requiredMessage=_;this.placeholder="Select";this.size="md";this.width="hug";this.isInactive=false;this.isLoading=false;this.activeFill=true;this.hasBorder=true;this.allowClear=true;this.clearLabel="Clear";this.selectedLabel="selected";this.searchable=false;this.searchPlaceholder="Search";this.noResultsText="No results found";this.loadingLabel="Loading";this.error=false;this.ariaLabel=null;this.activeIndex=-1;this.searchTerm="";this.formDisabled=false;this.position={x:0,y:0};this.positionReady=false;this.focusRingVisible=false;this.generatedId=`ds-select-${++U}`;this.listboxId=`${this.generatedId}-listbox`;this.errorId=`${this.generatedId}-error`;this.initialValue="";this.controller=this.createController();this.clearSelection=e=>{e.preventDefault();e.stopPropagation();this.value=this.multiple?[]:"";this.dsChange.emit(this.multiple?[]:"");this.dsClear.emit();if(!this.multiple){const e=P(this.visibleOptions);this.activeIndex=e[0]??-1}this.controller.focusSearchOrTrigger()};this.handleListKeyDown=this.controller.handleListKeyDown;this.handleTriggerKeyDown=this.controller.handleTriggerKeyDown}createController(){const e=this;return new R({get host(){return e.el},generatedId:e.generatedId,get options(){return e.visibleOptions},get searchable(){return e.searchable},get isLoading(){return e.isLoading},get isDisabled(){return e.isDisabled},get preferredIndex(){if(e.multiple)return-1;return e.visibleOptions.findIndex((s=>s.value===e.scalarValue&&!s.isInactive))},get open(){return e.open},set open(s){e.open=s},get activeIndex(){return e.activeIndex},set activeIndex(s){e.activeIndex=s},get searchTerm(){return e.searchTerm},set searchTerm(s){e.searchTerm=s},get focusRingVisible(){return e.focusRingVisible},set focusRingVisible(s){e.focusRingVisible=s},get position(){return e.position},set position(s){e.position=s},get positionReady(){return e.positionReady},set positionReady(s){e.positionReady=s},selectOption:s=>e.selectOption(s)})}componentWillLoad(){this.value=this.normalizeValueForMode(this.value);this.initialValue=Array.isArray(this.value)?[...this.value]:this.value;this.syncFormValue()}componentDidLoad(){this.controller.connect()}disconnectedCallback(){this.controller.disconnect()}syncFormValue(){if(this.multiple&&!Array.isArray(this.value)||!this.multiple&&Array.isArray(this.value)){this.value=this.normalizeValueForMode(this.value)}const e=this.isDisabled;if(this.multiple){const s=this.resolvedValues;C(this.internals,this.name,s,{inactive:e})}else{const s=this.hasSelection?this.scalarValue:"";T(this.internals,s,{inactive:e})}const s=this.required&&!e&&!this.hasSelection;z(this.internals,s,this.requiredMessage);this.controller.optionsChanged()}onLoadingChange(){this.controller.loadingChanged()}onOpenChange(e){this.dsOpenChange.emit(e);this.controller.openChanged(e)}onSearchTermChange(){this.controller.searchChanged()}onActiveIndexChange(){this.controller.activeIndexChanged()}formDisabledCallback(e){this.formDisabled=e;this.syncFormValue()}formResetCallback(){this.value=this.normalizeValueForMode(this.initialValue);this.closePopup()}formStateRestoreCallback(e){if(!this.multiple){this.value=F(e);return}this.value=V(e)}async setFocus(){this.controller.setFocus()}get isDisabled(){return this.disabled||this.isInactive||this.formDisabled}normalizeValueForMode(e){if(this.multiple){return Array.isArray(e)?[...e]:e?[e]:[]}return Array.isArray(e)?e[0]??"":e}get allSections(){return $(this.options,this.sections)}get allOptions(){return D(this.allSections)}get visibleSections(){return this.searchable?E(this.allSections,this.searchTerm):this.allSections}get visibleOptions(){return D(this.visibleSections)}get scalarValue(){return typeof this.value==="string"?this.value:""}get resolvedValues(){if(!this.multiple||!Array.isArray(this.value))return[];const e=new Set(this.allOptions.map((e=>e.value)));return[...new Set(this.value.filter((s=>e.has(s))))]}get selectedOption(){if(this.multiple)return undefined;return this.allOptions.find((e=>e.value===this.scalarValue))}get hasSelection(){return this.multiple?this.resolvedValues.length>0:Boolean(this.selectedOption)}get activeOptionId(){return this.controller.activeOptionId}closePopup(e=false){this.controller.closePopup(e)}openPopup(e,s){this.controller.openPopup(e,s)}selectOption(e){if(e.isInactive||this.isLoading)return;if(this.multiple){const s=this.resolvedValues;const t=s.includes(e.value)?s.filter((s=>s!==e.value)):[...s,e.value];this.value=t;this.dsChange.emit([...t]);return}this.value=e.value;this.dsChange.emit(e.value);this.controller.closePopup(true)}renderOption(e,s,t,o){const r=this.multiple?this.resolvedValues.includes(e.value):e.value===this.scalarValue;const c=s===this.activeIndex;return i(n,{size:this.size,id:`${this.generatedId}-option-${s}`,option:e,selected:r,active:c,focusRingVisible:this.focusRingVisible,usesSubtext:o,leading:this.multiple?i("span",{class:"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},i("ds-checkbox",{class:"select-option__checkbox",label:"",size:this.size,checked:r,presentation:true})):t&&e.icon?i("span",{class:"ds-choice-item__icon ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},i("ds-icon",{name:e.icon,size:this.size,color:"inherit"})):undefined,onHover:()=>{this.focusRingVisible=false;this.activeIndex=s},onSelect:()=>this.selectOption(e)})}render(){const e=this.isDisabled;const s=!this.hasSelection;const t=this.resolvedValues.length;const r=this.multiple?`${this.placeholder}${t>0?` · ${t}`:""}`:s?this.placeholder:this.selectedOption?.label;const n=j[this.size];const a=M[this.size];const l=!this.multiple&&L(this.allOptions);const h=O(this.allOptions);const g=this.error&&Boolean(this.errorMessage);const u=[this.ariaDescribedby,g?this.errorId:undefined].filter(Boolean).join(" ")||undefined;const f={position:"fixed",left:"0",top:"0",transform:`translate(${Math.round(this.position.x)}px, ${Math.round(this.position.y)}px)`,zIndex:"var(--dimension-z-index-floating)",visibility:this.positionReady?"visible":"hidden"};let p=0;return i(o,{key:"ab88e227e8d2951a49041c738447e68dd65ad76b",class:{"select-host":true,"select-host--multiple":this.multiple,"ds-field-stack":true,"ds-control-inactive":e,[`ds-control--${this.size}`]:true,...I(this.width),[`select-host--background-${this.background}`]:!!this.background}},i("button",{key:"fd66d348443465182fef2a02e4ba423725915df7",ref:e=>{this.controller.setTriggerElement(e??null)},id:this.inputId??this.generatedId,type:"button",class:{trigger:true,"ds-control-frame":true,"ds-focus-ring-inset":true,"ds-interaction-fill":true,"ds-interaction-fill--selected":!e&&this.activeFill&&this.hasSelection,"trigger--bordered":this.hasBorder,"trigger--placeholder":s&&!this.multiple,"trigger--has-value":this.hasSelection,"wrapper--error":this.hasBorder&&this.error,[`ds-control--${this.size}`]:true,...B(this.background)},disabled:e,role:"combobox","aria-haspopup":"listbox","aria-expanded":String(this.open),"aria-controls":this.open?this.listboxId:undefined,"aria-activedescendant":this.open&&!this.searchable?this.activeOptionId:undefined,"aria-label":this.ariaLabel,"aria-labelledby":this.ariaLabelledby,"aria-describedby":u,"aria-invalid":this.error?"true":undefined,"aria-required":this.required||undefined,"aria-busy":this.isLoading?"true":undefined,onClick:()=>this.open?this.closePopup():this.openPopup(false),onKeyDown:this.handleTriggerKeyDown},(this.icon||this.isLoading)&&i("span",{key:"25002eda4117f1963ca19f9a93b91c3ef0cd7dde",class:"trigger__prefix ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},this.isLoading?i("ds-loader",{size:a,color:"inherit"}):i("ds-icon",{name:this.icon,size:a,color:"inherit"})),i("ds-text",{key:"708533ed69cc074019092fd5d1691db5e48ac4b6",class:"trigger__label ds-control-label-box ds-interaction-fill__content",as:"span",variant:n,color:"inherit",lineTruncation:1},r),i("span",{key:"289cea347f24c8cf24490bde3b9a6736be5783c2",class:"trigger__chevron ds-control-icon-box ds-interaction-fill__content","aria-hidden":"true"},i("ds-icon",{key:"29a2af43896c90e5304dc8a4a761fa45542bd58a",name:"ChevronDown",size:a,color:"inherit"}))),this.open&&i("div",{key:"1b2fda1b263c29c1b70c85613a1c54abb3930611",popover:"manual",ref:e=>{this.controller.setPopupElement(e??null)},class:"select-popup ds-choice-popup",style:f},this.searchable&&i(c,{key:"75a8db2973b1ca6a4349e36baa74a285c49fd0f8",size:this.size,value:this.searchTerm,placeholder:this.searchPlaceholder,controls:this.listboxId,activeDescendant:this.activeOptionId,inputRef:this.controller.setSearchElement,clearLabel:this.clearLabel,onValueChange:e=>{this.searchTerm=e},onKeyDown:e=>this.handleListKeyDown(e)}),i("div",{key:"080b9c847a5f682572572028b345c858d967502a",id:this.listboxId,class:"ds-choice-list",role:"listbox","aria-multiselectable":this.multiple?"true":undefined,"aria-label":this.ariaLabel??this.placeholder,"aria-busy":this.isLoading?"true":undefined},this.isLoading?i("div",{class:"ds-choice-loading ds-empty-region",role:"option","aria-selected":"false","aria-disabled":"true","aria-label":this.loadingLabel,"aria-live":"polite"},i("ds-loader",{size:this.size,color:"inherit"})):this.visibleOptions.length===0?i("div",{class:"ds-choice-empty ds-empty-region",role:"option","aria-selected":"false","aria-disabled":"true","aria-label":this.noResultsText,"aria-live":"polite"},i("ds-empty-state",{body:this.noResultsText})):this.visibleSections.map((e=>i("div",{class:{"ds-choice-section":true,"ds-chrome-column":true,"ds-chrome-space--sm":true,"ds-choice-section--divided":!!e.divider},role:e.header?"group":undefined,"aria-label":e.header},e.header&&i("ds-text",{class:`ds-choice-section__header ds-control-section-heading ds-control--${this.size}`,as:"span",variant:A[this.size],emphasis:true,color:"primary","aria-hidden":"true"},e.header),e.options.map((e=>this.renderOption(e,p++,l,h))))))),this.allowClear&&this.hasSelection&&!this.isLoading&&i(d,{key:"b28918cc685a7389d91d73b4c24a2ab5562ec0ec",size:this.size,summary:this.multiple?`${t} ${this.selectedLabel}`:undefined,clearLabel:this.clearLabel,onClear:this.clearSelection})),g&&i("ds-text",{key:"c02ffd0dc7c0cddbdd104e42a276b9abef33d276",class:"error-text",as:"div",variant:"text-body-small",color:"negative",textId:this.errorId,role:"alert"},this.errorMessage))}static get formAssociated(){return true}get el(){return this}static get watchers(){return{value:[{syncFormValue:0}],multiple:[{syncFormValue:0}],disabled:[{syncFormValue:0}],isInactive:[{syncFormValue:0}],required:[{syncFormValue:0}],name:[{syncFormValue:0}],options:[{syncFormValue:0}],sections:[{syncFormValue:0}],isLoading:[{onLoadingChange:0}],open:[{onOpenChange:0}],searchTerm:[{onSearchTermChange:0}],activeIndex:[{onActiveIndexChange:0}]}}static get style(){return H()}},[66,"ds-select",{options:[16],sections:[16],multiple:[516],value:[1025],open:[1540],name:[513],disabled:[516],required:[516],requiredMessage:[1,"required-message"],placeholder:[1],size:[1],width:[1],isInactive:[4,"is-inactive"],isLoading:[4,"is-loading"],activeFill:[4,"active-fill"],hasBorder:[4,"has-border"],icon:[1],allowClear:[4,"allow-clear"],clearLabel:[1,"clear-label"],selectedLabel:[1,"selected-label"],searchable:[4],searchPlaceholder:[1,"search-placeholder"],noResultsText:[1,"no-results-text"],loadingLabel:[1,"loading-label"],background:[1],error:[4],errorMessage:[1,"error-message"],inputId:[1,"input-id"],ariaLabel:[1,"aria-label"],ariaLabelledby:[1,"aria-labelledby"],ariaDescribedby:[1,"aria-describedby"],activeIndex:[32],searchTerm:[32],formDisabled:[32],position:[32],positionReady:[32],focusRingVisible:[32],setFocus:[64]},undefined,{value:[{syncFormValue:0}],multiple:[{syncFormValue:0}],disabled:[{syncFormValue:0}],isInactive:[{syncFormValue:0}],required:[{syncFormValue:0}],name:[{syncFormValue:0}],options:[{syncFormValue:0}],sections:[{syncFormValue:0}],isLoading:[{onLoadingChange:0}],open:[{onOpenChange:0}],searchTerm:[{onSearchTermChange:0}],activeIndex:[{onActiveIndexChange:0}]}]);function W(){if(typeof customElements==="undefined"){return}const e=["ds-select","ds-badge","ds-button-unfilled","ds-checkbox","ds-empty-state","ds-icon","ds-loader","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-select":if(!customElements.get(r(e))){customElements.define(r(e),G)}break;case"ds-badge":if(!customElements.get(r(e))){p()}break;case"ds-button-unfilled":if(!customElements.get(r(e))){v()}break;case"ds-checkbox":if(!customElements.get(r(e))){m()}break;case"ds-empty-state":if(!customElements.get(r(e))){b()}break;case"ds-icon":if(!customElements.get(r(e))){y()}break;case"ds-loader":if(!customElements.get(r(e))){x()}break;case"ds-text":if(!customElements.get(r(e))){w()}break;case"ds-tooltip":if(!customElements.get(r(e))){k()}break}}))}W();const K=G;const J=W;export{K as DsSelect,J as defineCustomElement};
2
2
  //# sourceMappingURL=ds-select.js.map
@@ -1,2 +1,2 @@
1
- import{p as s,H as e,c as t,h as i,a as n,t as o}from"./index.js";import{c as a,d as l}from"./p-Dbobj7DI.js";import{C as h,c as r,r as d,a as c,b as p,d as u}from"./p-BPbE-Kbl.js";import{i as f,a as b,r as m,b as g,S as v,c as _}from"./p-DNpE0RBz.js";import{d as w}from"./p-GbTasczF.js";import{d as y}from"./p-dEouiXJ8.js";import{d as k}from"./p-BMAZWEDa.js";import{d as x}from"./p-BtUgncSJ.js";import{d as C}from"./p-CnUq7E8S.js";import{d as S}from"./p-DStd98dM.js";import{d as D}from"./p-C8U5BsJf.js";import{d as M}from"./p-Ca-I2UnB.js";import{d as L}from"./p-CMbcRN92.js";import{d as B}from"./p-CsXC1cHI.js";import{d as E}from"./p-B94M62Tx.js";import{d as T}from"./p-m5CSrx_s.js";import{d as A}from"./p-CnIvWEVm.js";import{d as P}from"./p-DrvEhJhO.js";import{d as j}from"./p-B53Vpuqq.js";import{d as z}from"./p-BAAjiAIF.js";import{d as N}from"./p-D9CDoQBx.js";import{d as I}from"./p-CdKz-QT2.js";import{d as $}from"./p-GWUTrIlk.js";import{d as F}from"./p-D4j0deyd.js";import{d as G}from"./p-Dhx_3_tf.js";import{d as O}from"./p-DyqLVdJp.js";const U=["none","cool","neutral","warm","fresh"];const H="neutral";const V={cool:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-blue-strong-background)",position:100}]},neutral:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-grey-strong-background)",position:100}]},warm:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-yellow-strong-background)",position:100}]},fresh:{opacity:.4,stops:[{color:"var(--color-color-intent-cyan-faint-background)",position:0},{color:"var(--color-background-transparent)",position:47},{color:"var(--color-background-transparent)",position:58},{color:"var(--color-color-intent-red-faint-background)",position:83},{color:"var(--color-color-intent-pink-faint-background)",position:100}]}};const R="100% 100% at 0% 0%";function W(s){const e=J(s);return e==="none"?null:V[e]}function q(s){return String(W(s)?.opacity??0)}function K(s){return U.includes(s)}function J(s){return s!=null&&K(s)?s:H}function Q(s){const e=J(s);if(e==="none")return"none";return X(V[e].stops)}function X(s){const e=s.map((s=>`${s.color} ${s.position}%`)).join(", ");return`radial-gradient(${R}, ${e})`}const Z="--ds-shell-gradient-image";const Y="--ds-shell-gradient-size";const ss="--ds-shell-gradient-position-panel";const es="--ds-shell-gradient-position-bar";const ts="--ds-shell-gradient-opacity";function is(s=H){return Q(s)}function ns(s){const e=typeof globalThis.window!=="undefined"?globalThis.window:undefined;if(!e)return{width:0,height:0};const t=e.visualViewport;return{width:Math.round(t?.width??e.innerWidth),height:Math.round(t?.height??e.innerHeight)}}function os(s){return`${Math.round(s.width)}px ${Math.round(s.height)}px`}function as(){return"0 0"}function ls(s){return`${-Math.round(s)}px 0`}const hs={k:"search",a:"agents",s:"stacks",m:"messages",n:"activity","/":"help"};function rs(s){return!s.metaKey&&!s.ctrlKey&&!s.altKey&&!s.shiftKey}function ds(s){if(!s||typeof s!=="object")return false;if(!("closest"in s)||typeof s.closest!=="function")return false;const e=s;const t=e.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]');if(t)return true;const i=e.getAttribute("role");if(i==="textbox"||i==="combobox"||i==="searchbox")return true;return Boolean(e.isContentEditable)}function cs(s){if(s.key==="["||s.code==="BracketLeft")return"[";if(s.key==="]"||s.code==="BracketRight")return"]";return s.key.length===1?s.key.toLowerCase():s.key.toLowerCase()}function ps(s){if(!rs(s))return null;const e=cs(s);if(e==="[")return"toggle-panel-nav";if(e==="]")return"close-panel-tools";const t=hs[e];if(t)return`open-tool:${t}`;return null}function us(s,e){if(typeof document==="undefined")return 0;const t=document.createElement("div");t.style.cssText="position:absolute;visibility:hidden;pointer-events:none;height:0;width:var("+e+");";s.appendChild(t);const i=t.getBoundingClientRect().width;s.removeChild(t);return i}function fs(s){return{expandedPx:us(s,"--_nav-width"),collapsedPx:us(s,"--_nav-width-collapsed")}}function bs(s,e){if(e?.classList.contains("panel-nav--collapsed"))return true;const t=s?.collapsed;return t===true}function ms(s,e){return e?s.collapsedPx:s.expandedPx}const gs=()=>`@media (forced-colors: active){.sc-ds-shell-app:root,.sc-ds-shell-app-h,.ds-forced-colors-scope.sc-ds-shell-app{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.sc-ds-shell-app-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-shell-app-h,.ds-focus-ring.sc-ds-shell-app,.ds-focus-ring-inset.sc-ds-shell-app-h,.ds-focus-ring-inset.sc-ds-shell-app{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-shell-app-h:focus-visible,.ds-focus-ring.sc-ds-shell-app:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-shell-app-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-shell-app{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-shell-app-h:focus-visible,.ds-focus-ring-inset.sc-ds-shell-app:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-shell-app-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-shell-app:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}@media (forced-colors: active){.sc-ds-shell-app-h{--ds-focus-ring-color:var(--ds-forced-color-selected)}}.sc-ds-shell-app-h{display:flex;flex-direction:column;height:100%;min-height:0;box-sizing:border-box;overflow:hidden;overscroll-behavior:none;font-family:var(--typography-font-family-ui, system-ui);--ds-shell-panel-tools-width:var(--dimension-panel-width-xs)}.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-secondary)}.shell-app__row.sc-ds-shell-app{display:flex;flex:1 1 0;min-height:0;position:relative}.shell-app__banner.sc-ds-shell-app{flex:0 0 auto;min-width:0;position:relative;z-index:5}.shell-app__banner.sc-ds-shell-app-s>ds-banner,.shell-app__banner .sc-ds-shell-app-s>ds-banner{display:grid;width:100%}.shell-app__chrome.sc-ds-shell-app{position:absolute;inset:0;pointer-events:none;z-index:0;background-color:var(--_shell-chrome-bg)}.shell-app--gradient.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app::before{content:'';position:absolute;inset:0;pointer-events:none;background-position:0 0;background-attachment:fixed;z-index:1;opacity:var(--ds-shell-gradient-opacity, 1);background-image:var(--ds-shell-gradient-image, none);background-size:var(--ds-shell-gradient-size, auto);background-repeat:no-repeat}.shell-app__panel.sc-ds-shell-app{flex:0 0 auto;min-height:0;height:100%;position:relative;z-index:2}.shell-app__panel.sc-ds-shell-app-s>ds-panel-nav,.shell-app__panel .sc-ds-shell-app-s>ds-panel-nav{display:block;height:100%}.shell-app__panel.sc-ds-shell-app>ds-panel-nav.sc-ds-shell-app{display:block;height:100%}.shell-app__main.sc-ds-shell-app{flex:1 1 auto;min-width:0;min-height:0;display:grid;grid-template-columns:minmax(0, 1fr) auto;grid-template-rows:auto minmax(0, 1fr);grid-template-areas:'bar tools' 'content tools';position:relative;z-index:1}.shell-app__mobile-sheet-nav.sc-ds-shell-app,.shell-app__mobile-bar-nav.sc-ds-shell-app{display:none}.shell-app__bar.sc-ds-shell-app{grid-area:bar;flex:0 0 auto;min-width:0}.shell-app__bar.sc-ds-shell-app-s>ds-bar-nav,.shell-app__bar .sc-ds-shell-app-s>ds-bar-nav{display:block}.shell-app__bar.sc-ds-shell-app>ds-bar-nav.sc-ds-shell-app{display:block}.shell-app__content.sc-ds-shell-app{grid-area:content;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;overscroll-behavior:none;contain:layout}.shell-app__content.sc-ds-shell-app{position:relative;z-index:1;background-color:var(--color-background-primary)}.shell-app__tools.sc-ds-shell-app{grid-area:tools;flex:0 0 auto;min-width:0;min-height:0;height:100%;display:flex;position:relative;z-index:0;overflow:hidden}.shell-app__tools.sc-ds-shell-app-s>ds-panel-tools,.shell-app__tools .sc-ds-shell-app-s>ds-panel-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app-s>ds-shell-tools,.shell-app__tools .sc-ds-shell-app-s>ds-shell-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app>ds-shell-tools.sc-ds-shell-app{display:block;height:100%;min-height:0}.shell-app__content.sc-ds-shell-app>ds-shell-page.sc-ds-shell-app{display:block;min-height:100%}.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{visibility:hidden}.shell-app--mobile.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-primary);padding-block-start:env(safe-area-inset-top)}.shell-app--mobile.shell-app--foreground-refresh.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{transform:translateZ(0)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app{display:none}.shell-app--mobile.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{width:100%;box-sizing:border-box;grid-template-columns:minmax(0, 1fr);grid-template-rows:minmax(0, 1fr) auto;grid-template-areas:'stage' 'mobile-bar-nav';background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{grid-area:stage;min-width:0;min-height:0;height:100%;position:relative}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{z-index:1;overflow:auto}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{z-index:2;width:100%;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{display:block;z-index:3;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav.sc-ds-shell-app{grid-area:mobile-bar-nav;display:block;min-width:0;position:relative;z-index:4}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav[hidden].sc-ds-shell-app{display:none}.shell-app--mobile-tool-active.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{visibility:hidden}`;const vs=s(class s extends e{constructor(s){super();if(s!==false){this.__registerHost()}this.dsResponsiveModeChange=t(this,"dsResponsiveModeChange");this.dsNavSelect=t(this,"dsNavSelect");this.dsTabChange=t(this,"dsTabChange");this.dsSubsectionChange=t(this,"dsSubsectionChange");this.dsPageBack=t(this,"dsPageBack");this.dsBreadcrumbSelect=t(this,"dsBreadcrumbSelect");this.dsPageAction=t(this,"dsPageAction");this.dsToolChange=t(this,"dsToolChange");this.dsHeaderBack=t(this,"dsHeaderBack");this.dsHeaderAction=t(this,"dsHeaderAction");this.dsPresentationChange=t(this,"dsPresentationChange");this.dsBrowseContextChange=t(this,"dsBrowseContextChange");this.dsNavFooterAction=t(this,"dsNavFooterAction");this.dsNavUserAction=t(this,"dsNavUserAction");this.composition="managed";this.navigation={};this.pageChrome={};this.tools={};this.navStyle="dashboard";this.gradientPreset=H;this.shortcutsEnabled=true;this.mobileDestination="area";this.mobileSheetNavOpen=false;this.toolsFullscreen=false;this.resolvedMode="desktop";this.managedToolsOpen=false;this.managedActiveTool="";this.managedToolPresentation="drawer";this.managedMobileDestination="area";this.managedMobileSheetNavOpen=false;this.managedInboxTool="";this.managedBrowseContext="dashboard";this.resizeObserver=null;this.hasLoaded=false;this.foregroundRefreshTimer=null;this.panelNavTransition=new h;this.chromeSyncCoalescer=r((()=>this.syncChrome()));this.panelWidthTokens={expandedPx:0,collapsedPx:0};this.cachedViewportWidth=0;this.cachedViewportHeight=0;this.onWindowResize=()=>{this.updateResponsiveMode();if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onVisualViewportChange=()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onChromeTransitionStart=s=>{if(d(s)!=="panel-nav")return;this.panelNavTransition.enter();const e=ns();this.cachedViewportWidth=e.width;this.cachedViewportHeight=e.height;this.syncChrome()};this.onChromeTransitionEnd=s=>{if(d(s)!=="panel-nav")return;this.panelNavTransition.exit();if(!this.panelNavTransition.isActive){this.scheduleChromeSync()}};this.onDocumentVisibilityChange=()=>{if(!document.hidden)this.refreshAfterForegroundRestore()};this.onPageShow=s=>{if(s.persisted)this.refreshAfterForegroundRestore()};this.handleManagedNavSelect=s=>{s.stopPropagation();this.dsNavSelect.emit(s.detail)};this.handleManagedTabChange=s=>{s.stopPropagation();this.dsTabChange.emit(s.detail)};this.handleManagedPageBack=s=>{s.stopPropagation();this.dsPageBack.emit(s.detail)};this.handleManagedBreadcrumbSelect=s=>{s.stopPropagation();const e=this.dsBreadcrumbSelect.emit(s.detail);if(e.defaultPrevented)s.preventDefault()};this.handleManagedSubsectionChange=s=>{s.stopPropagation();this.dsSubsectionChange.emit(s.detail)};this.handleManagedPageAction=s=>{s.stopPropagation();this.dsPageAction.emit(s.detail)};this.handleManagedToolChange=s=>{s.stopPropagation();const{id:e,selected:t}=s.detail;this.managedActiveTool=e;this.managedToolsOpen=t;const i=this.resolvedToolItems.find((s=>s.id===e));if(i?.mobileDestination==="inbox"||f(e)){this.managedInboxTool=e}this.managedMobileDestination=t?i?.mobileDestination??b(true,e):"area";this.managedMobileSheetNavOpen=false;this.dsToolChange.emit(s.detail)};this.handleManagedPresentationChange=s=>{s.stopPropagation();this.managedToolPresentation=s.detail.presentation;this.toolsFullscreen=s.detail.presentation==="fullscreen";this.dsPresentationChange.emit(s.detail)};this.handleManagedHeaderBack=s=>{s.stopPropagation();this.dsHeaderBack.emit(s.detail)};this.handleManagedHeaderAction=s=>{s.stopPropagation();this.dsHeaderAction.emit(s.detail)};this.handleManagedSheetToggle=s=>{s.stopPropagation();this.managedMobileSheetNavOpen=s.detail};this.handleManagedMobileDestination=s=>{s.stopPropagation();const e=s.detail.destination;this.managedMobileSheetNavOpen=false;this.managedMobileDestination=e;if(e==="area"){this.managedToolsOpen=false;return}const t=e==="inbox"?m(this.managedInboxTool,this.availableInboxTools):e;if(!t)return;const i=this.resolvedToolItems.find((s=>s.id===t||e!=="inbox"&&s.mobileDestination===e));if(!i||i.isInactive)return;const n=i.id;this.managedActiveTool=n;this.managedToolsOpen=true;if(f(n))this.managedInboxTool=n;this.dsToolChange.emit({id:n,selected:true})};this.handleManagedAreaSelect=s=>{s.stopPropagation();this.managedMobileSheetNavOpen=false;this.managedMobileDestination="area";this.managedToolsOpen=false;this.dsNavSelect.emit(s.detail)};this.handleManagedBrowseContext=s=>{s.stopPropagation();this.managedBrowseContext=s.detail;this.dsBrowseContextChange.emit(s.detail)};this.handleManagedSheetClose=s=>{s.stopPropagation();this.managedMobileSheetNavOpen=false};this.handleManagedNavFooterAction=s=>{s.stopPropagation();this.dsNavFooterAction.emit()};this.handleManagedNavUserAction=s=>{s.stopPropagation();this.dsNavUserAction.emit(s.detail)}}get managed(){return this.composition==="managed"}get effectiveMobileDestination(){return this.managed?this.managedMobileDestination:this.mobileDestination}get effectiveMobileSheetNavOpen(){return this.managed?this.managedMobileSheetNavOpen:this.mobileSheetNavOpen}get resolvedNavigationGroups(){if(this.navigation.groups?.length)return this.navigation.groups;return this.managedBrowseContext==="settings"?this.navigation.settingsGroups??[]:this.navigation.dashboardGroups??[]}get resolvedToolItems(){return this.tools.items??a}get availableInboxTools(){return this.resolvedToolItems.filter((s=>!s.isInactive&&(s.mobileDestination==="inbox"||f(s.id)))).map((s=>s.id))}componentWillLoad(){if(typeof window!=="undefined"){this.resolvedMode=g(window.innerWidth)}this.managedBrowseContext=this.navigation.browseContext??this.navStyle;this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen;this.managedInboxTool=m("",this.availableInboxTools)}componentDidLoad(){this.hasLoaded=true;this.syncSlottedNavStyle();this.syncSlottedMobileState();this.connectMetricsObserver();this.connectViewportListeners();this.connectPageLifecycleListeners();this.el.addEventListener(c,this.onChromeTransitionStart);this.el.addEventListener(p,this.onChromeTransitionEnd);requestAnimationFrame((()=>{this.cachePanelWidthTokens();this.scheduleChromeSync()}));const s=this.el.querySelector("ds-shell-tools, ds-panel-tools");this.toolsFullscreen=s?.getAttribute("presentation")==="fullscreen"}handleToolsPresentation(s){this.toolsFullscreen=s.detail?.presentation==="fullscreen"}disconnectedCallback(){this.resizeObserver?.disconnect();this.resizeObserver=null;this.disconnectViewportListeners();this.disconnectPageLifecycleListeners();this.cancelForegroundRefresh();this.chromeSyncCoalescer.cancel();this.el.removeEventListener(c,this.onChromeTransitionStart);this.el.removeEventListener(p,this.onChromeTransitionEnd)}onShellPropsChange(){this.syncSlottedNavStyle();this.scheduleChromeSync()}handleNavigationChange(){this.managedBrowseContext=this.navigation.browseContext??this.navStyle}handleToolsChange(){if(this.managedActiveTool&&!this.resolvedToolItems.some((s=>s.id===this.managedActiveTool))){this.managedToolsOpen=false;this.managedActiveTool="";this.managedMobileDestination="area"}this.managedInboxTool=m(this.managedInboxTool,this.availableInboxTools)}onMobileStateChange(s,t){if(this.managed){this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen}this.syncSlottedMobileState();if(t===true&&!this.effectiveMobileSheetNavOpen&&this.resolvedMode==="mobile"){requestAnimationFrame((()=>{const s=this.el.querySelector("ds-mobile-bar-nav");const t=document.activeElement;if(t instanceof e&&s?.contains(t))return;void s?.focusDestination?.("sheet-nav")}))}}updateResponsiveMode(){if(typeof window==="undefined")return;const s=g(window.innerWidth);if(s===this.resolvedMode)return;this.resolvedMode=s;this.syncSlottedMobileState();this.scheduleChromeSync();if(this.hasLoaded)this.dsResponsiveModeChange.emit({mode:s})}scheduleChromeSync(){this.chromeSyncCoalescer.schedule()}syncSlottedNavStyle(){const s=this.el.querySelector("ds-panel-nav");const e=this.el.querySelector("ds-bar-nav");if(s){s.setAttribute("nav-style",this.navStyle);s.navStyle=this.navStyle}if(e){e.setAttribute("nav-style",this.navStyle);e.navStyle=this.navStyle}}syncSlottedMobileState(){const s=this.el.querySelector("ds-shell-tools");const e=this.el.querySelector("ds-mobile-bar-nav");const t=this.el.querySelector("ds-mobile-sheet-nav");if(s){s.setAttribute("responsive-mode",this.resolvedMode);s.responsiveMode=this.resolvedMode}if(e){e.activeDestination=this.effectiveMobileDestination;e.sheetNavExpanded=this.effectiveMobileSheetNavOpen}if(t){t.open=this.effectiveMobileSheetNavOpen}}connectMetricsObserver(){this.resizeObserver=new ResizeObserver((()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()}));this.resizeObserver.observe(this.el);const s=this.el.querySelector(".shell-app__panel");if(s)this.resizeObserver.observe(s)}connectViewportListeners(){if(typeof window==="undefined")return;window.addEventListener("resize",this.onWindowResize,{passive:true});const s=window.visualViewport;if(s){s.addEventListener("resize",this.onVisualViewportChange,{passive:true});s.addEventListener("scroll",this.onVisualViewportChange,{passive:true})}}disconnectViewportListeners(){if(typeof window==="undefined")return;window.removeEventListener("resize",this.onWindowResize);const s=window.visualViewport;if(s){s.removeEventListener("resize",this.onVisualViewportChange);s.removeEventListener("scroll",this.onVisualViewportChange)}}connectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.addEventListener("visibilitychange",this.onDocumentVisibilityChange);window.addEventListener("pageshow",this.onPageShow)}disconnectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.removeEventListener("visibilitychange",this.onDocumentVisibilityChange);window.removeEventListener("pageshow",this.onPageShow)}cancelForegroundRefresh(){if(this.foregroundRefreshTimer!==null){window.clearTimeout(this.foregroundRefreshTimer);this.foregroundRefreshTimer=null}this.el.classList.remove("shell-app--foreground-refresh")}refreshAfterForegroundRestore(){this.updateResponsiveMode();this.syncSlottedMobileState();this.scheduleChromeSync();if(this.resolvedMode!=="mobile")return;this.cancelForegroundRefresh();this.el.classList.add("shell-app--foreground-refresh");this.foregroundRefreshTimer=window.setTimeout((()=>{this.foregroundRefreshTimer=null;this.el.classList.remove("shell-app--foreground-refresh");void this.el.querySelector(".shell-app__main")?.offsetHeight}),s.FOREGROUND_REFRESH_MS)}cachePanelWidthTokens(){const s=this.el.querySelector("ds-panel-nav .panel-nav");if(!s)return;this.panelWidthTokens=fs(s)}applyGradientVars(s,e){const t=s.style;for(const[s,i]of Object.entries(e)){if(i===null)t.removeProperty(s);else t.setProperty(s,i)}}clearGradientPaintVars(s){const e=[Z,Y,ts];for(const t of s){for(const s of e)t.style.removeProperty(s)}}syncChromeLayoutVars(s,e,t,i){if(s){s.style.setProperty(ss,t)}if(e){e.style.setProperty(es,i)}}resolvePanelWidthPx(s){const e=s?.querySelector(".panel-nav");if(this.panelNavTransition.isActive&&this.panelWidthTokens.expandedPx>0){const t=bs(s,e);return ms(this.panelWidthTokens,t)}const t=this.el.querySelector(".shell-app__panel");const i=t?.getBoundingClientRect().width??0;if(i>0)return i;if(this.panelWidthTokens.expandedPx>0){const t=bs(s,e);return ms(this.panelWidthTokens,t)}return 0}resolveViewportDimensions(){if(this.panelNavTransition.isActive&&this.cachedViewportWidth>0){return{width:this.cachedViewportWidth,height:this.cachedViewportHeight}}return ns()}chromeLayerActive(){return this.resolvedMode!=="mobile"&&J(this.gradientPreset)!=="none"}handleWindowKeyDown(s){if(!this.shortcutsEnabled)return;if(ds(s.target))return;const e=ps(s);if(!e)return;s.preventDefault();const t=this.el.querySelector("ds-panel-nav");const i=this.el.querySelector("ds-shell-tools, ds-panel-tools");if(e==="toggle-panel-nav"){void t?.toggleCollapsed();return}if(e==="close-panel-tools"){void i?.closeDrawer?.();return}if(e.startsWith("open-tool:")&&i){const s=e.slice("open-tool:".length);void i.activateTool?.(s)}}async activateTool(s){const e=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(e?.activateTool?.(s))}async closeGlobalSurface(){if(this.managedMobileSheetNavOpen){this.managedMobileSheetNavOpen=false;return}const s=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(s?.closeDrawer?.())}async setToolPresentation(s){this.managedToolPresentation=s;this.toolsFullscreen=s==="fullscreen"}get currentArea(){const s=[...this.navigation.dashboardGroups??[],...this.navigation.settingsGroups??[],...this.resolvedNavigationGroups];const e=s.flatMap((s=>s.items));const t=this.navigation.activeId||w(this.navigation.currentUrl??this.pageChrome.currentUrl??"",e);return e.find((s=>s.id===t))??e[0]??{id:"area",icon:"MapPage",label:this.pageChrome.heading||"Area"}}toolDot(s){return this.resolvedToolItems.find((e=>e.id===s))?.dot??false}syncChrome(){const s=this.el.querySelector("ds-panel-nav");const e=this.el.querySelector("ds-bar-nav");const t=[this.el,s,e].filter((s=>s!==null));const i=()=>{if(s)s.style.removeProperty(ss);if(e)e.style.removeProperty(es)};const n=J(this.gradientPreset);if(n==="none"||this.resolvedMode==="mobile"){this.clearGradientPaintVars(t);i();return}const o=this.resolveViewportDimensions();const a=this.resolvePanelWidthPx(s);const l=as();const h=ls(a);this.syncChromeLayoutVars(s,e,l,h);const r=is(n);const d=os({width:o.width,height:o.height});const c=q(n);for(const s of t){if(s===this.el){this.applyGradientVars(s,{[Z]:r,[Y]:d,[ss]:l,[es]:h,[ts]:c});continue}const e=s.tagName.toLowerCase()==="ds-bar-nav";this.applyGradientVars(s,{[Z]:r,[Y]:d,[ts]:c,[ss]:e?null:l,[es]:e?h:null})}}renderManagedPanelNav(){const s=this.navigation;return i("ds-panel-nav",{navStyle:this.navStyle,groups:this.resolvedNavigationGroups,breakpoint:v,routerMode:s.routerMode??"event",activeId:s.activeId??"",currentUrl:s.currentUrl??this.pageChrome.currentUrl??"",storageKey:s.storageKey??"",userName:s.userName??"",userInitial:s.userInitial??"",accountMenuExpanded:s.accountMenuExpanded??false,dashboardLabel:s.dashboardLabel??"Dashboard",settingsLabel:s.settingsLabel??"Settings",accountLabel:s.accountLabel??"Account",dashboardNavigationLabel:s.dashboardNavigationLabel??"Dashboard navigation",settingsNavigationLabel:s.settingsNavigationLabel??"Settings navigation",navigationItemsLabel:s.navigationLabel??"Navigation items",onDsNavSelect:this.handleManagedNavSelect,onDsNavFooterAction:this.handleManagedNavFooterAction,onDsNavUserAction:this.handleManagedNavUserAction})}renderManagedBarNav(){return i("ds-bar-nav",{navStyle:this.navStyle,tabs:this.pageChrome.tabs??[],value:this.pageChrome.value??"",heading:this.pageChrome.routeHeading??this.pageChrome.heading,basePath:this.pageChrome.basePath??"",currentUrl:this.pageChrome.currentUrl??this.navigation.currentUrl??"",onDsTabChange:this.handleManagedTabChange})}renderManagedToolSlots(){const s=[...new Set(this.resolvedToolItems.map((s=>s.id)))].sort();return s.flatMap((s=>[i("slot",{key:`tool:${s}`,name:s,slot:s}),i("slot",{key:`tool-view:${s}`,name:`${s}-view`,slot:`${s}-view`})]))}renderManagedTools(){const s=this.tools;return i("ds-shell-tools",{responsiveMode:this.resolvedMode,open:this.managedToolsOpen,activeTool:this.managedActiveTool,presentation:this.managedToolPresentation,fullscreenHeaderMode:s.fullscreenHeaderMode??"shared",items:this.resolvedToolItems,headers:s.headers??{},storageKey:s.storageKey??"",toolsLabel:s.toolsLabel??"Tools",toolShortcutsLabel:s.toolShortcutsLabel??"Tool shortcuts",inboxLabel:s.inboxLabel??"Inbox",inboxNavigationLabel:s.inboxNavigationLabel??"Inbox sections",onDsToolChange:this.handleManagedToolChange,onDsPresentationChange:this.handleManagedPresentationChange,onDsHeaderBack:this.handleManagedHeaderBack,onDsHeaderAction:this.handleManagedHeaderAction},this.renderManagedToolSlots())}renderManagedMobileSheetNav(){const s=this.navigation;return i("ds-mobile-sheet-nav",{open:this.managedMobileSheetNavOpen,browseContext:this.managedBrowseContext,dashboardGroups:s.dashboardGroups??s.groups??[],settingsGroups:s.settingsGroups??[],currentUrl:s.currentUrl??this.pageChrome.currentUrl??"",navigationLabel:s.navigationLabel??"Application navigation",dashboardLabel:s.dashboardLabel??"Dashboard",settingsLabel:s.settingsLabel??"Settings",accountLabel:s.accountLabel??"Account",onDsAreaSelect:this.handleManagedAreaSelect,onDsBrowseContextChange:this.handleManagedBrowseContext,onDsClose:this.handleManagedSheetClose})}renderManagedMobileBarNav(){return i("ds-mobile-bar-nav",{hidden:this.tools.mobileBarHidden??false,activeDestination:this.managedMobileDestination,currentArea:this.currentArea,sheetNavExpanded:this.managedMobileSheetNavOpen,searchLabel:this.tools.items?.find((s=>s.id==="search"))?.ariaLabel??"Search",inboxLabel:this.tools.inboxLabel??"Inbox",messagesLabel:this.tools.items?.find((s=>s.id==="messages"))?.ariaLabel??"Messages",agentsLabel:this.tools.items?.find((s=>s.id==="agents"))?.ariaLabel??"Agents",helpLabel:this.tools.items?.find((s=>s.id==="help"))?.ariaLabel??"Help & Support",searchDot:this.toolDot("search"),inboxDot:this.toolDot("stacks")||this.toolDot("activity"),messagesDot:this.toolDot("messages"),agentsDot:this.toolDot("agents"),onDsSheetNavToggle:this.handleManagedSheetToggle,onDsDestinationChange:this.handleManagedMobileDestination})}renderManagedMobileLeading(){if(!this.pageChrome.showBack){return i("slot",{name:"page-header-leading",slot:"leading"})}return[i("ds-tooltip",{slot:"leading",label:this.pageChrome.backAriaLabel??"Back",side:"bottom",size:"sm"},i("ds-button-unfilled",{variant:"icon",icon:this.pageChrome.backIcon??"ChevronLeft",size:"md","aria-label":this.pageChrome.backAriaLabel??"Back",activeFill:false,hasBorder:false,onDsClick:s=>this.dsPageBack.emit(s.detail)})),i("slot",{name:"page-header-leading",slot:"leading"})]}renderManagedMobileActions(){const s=this.pageChrome.mobileActions??[];return[...s.map((s=>i("ds-tooltip",{slot:"trailing",key:s.id,label:s.ariaLabel,side:"bottom",size:"sm"},i("ds-button-unfilled",{id:s.triggerId||undefined,variant:"icon",icon:s.icon,size:"md","aria-label":s.ariaLabel,haspopup:s.haspopup,controls:s.controls,expanded:s.expanded,pressed:s.pressed,isActive:!!s.expanded,isInactive:s.isInactive,activeFill:false,hasBorder:false,onDsClick:()=>this.dsPageAction.emit(s.id)})))),i("slot",{name:"page-header-trailing",slot:"trailing"})]}renderManagedPage(){const s=this.pageChrome;const e=s.showBack?[]:s.tabs??[];const t=(s.subsections??[]).map((s=>"type"in s?{type:"divider"}:{id:s.id,label:s.label,isInactive:s.isInactive}));return i("ds-shell-page",{responsiveMode:this.resolvedMode,headerCapacity:_(this.resolvedMode,this.managedToolsOpen),contentInset:s.contentInset??"default",contentInsetBlockStart:s.contentInsetBlockStart??"default",contentInsetBlockStartSize:s.contentInsetBlockStartSize,compactContentInsetBlockStartSize:s.compactContentInsetBlockStartSize,scrollCompaction:s.scrollCompaction??true,contentSurface:s.contentSurface??"primary"},i("ds-bar-title",{slot:"header",heading:s.heading??"",description:s.description??"",showBack:s.showBack??false,backAriaLabel:s.backAriaLabel??"Back",backLabel:s.backLabel??"Back",breadcrumbs:s.breadcrumbs??[],breadcrumbAriaLabel:s.breadcrumbAriaLabel??"Breadcrumb",sections:t,value:s.subvalue??"",sectionsAriaLabel:s.subsectionsAriaLabel??"Change page subsection",primaryAction:s.primaryAction??null,actions:s.actions??[],actionsAriaLabel:s.actionsAriaLabel??"More page actions",showDivider:s.showHeaderDivider??true,showCompactDivider:s.showCompactHeaderDivider,onDsBack:this.handleManagedPageBack,onDsBreadcrumbSelect:this.handleManagedBreadcrumbSelect,onDsSectionChange:this.handleManagedSubsectionChange,onDsAction:this.handleManagedPageAction}),i("ds-mobile-header",{slot:"mobile-header",heading:s.heading??"",headingLevel:s.headingLevel??"h1",sections:e,value:s.showBack?"":s.value??"",sectionsAriaLabel:s.sectionsAriaLabel??"Change page section",subsections:s.subsections??[],subvalue:s.subvalue??"",subsectionsAriaLabel:s.subsectionsAriaLabel??"Change page subsection",tone:s.tone??"default",onDsSectionChange:this.handleManagedTabChange,onDsSubsectionChange:this.handleManagedSubsectionChange},this.renderManagedMobileLeading(),this.renderManagedMobileActions()),i("slot",null))}renderSlottedShell(s,e,t,o,a){return i(n,{class:s,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"}),i("div",{class:"shell-app__panel","aria-hidden":a?"true":undefined,inert:a?true:undefined},i("slot",{name:"panel"})),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":a?"true":undefined,inert:a?true:undefined},i("slot",{name:"bar"})),i("div",{class:"shell-app__tools","aria-hidden":e&&(!t||this.mobileSheetNavOpen)?"true":undefined,inert:e&&(!t||this.mobileSheetNavOpen)?true:undefined,hidden:e&&!t},i("slot",{name:"tools"})),i("div",{class:"shell-app__content ds-focus-ring","aria-hidden":a||o?"true":undefined,inert:a||o?true:undefined,tabIndex:0},i("slot",null)),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!e||!this.mobileSheetNavOpen,"aria-hidden":e&&this.mobileSheetNavOpen?undefined:"true",inert:e&&this.mobileSheetNavOpen?undefined:true},i("slot",{name:"mobile-sheet-nav"})),i("div",{class:"shell-app__mobile-bar-nav",hidden:!e},i("slot",{name:"mobile-bar-nav"})))))}render(){const s=this.chromeLayerActive();const e=this.resolvedMode==="mobile";const t=e&&this.effectiveMobileDestination!=="area";const o=e&&(t||this.effectiveMobileSheetNavOpen);const a=!e&&this.toolsFullscreen;const l={"shell-app":true,"shell-app--gradient":s,[`shell-app--${this.navStyle}`]:true,[`shell-app--${this.resolvedMode}`]:true,"shell-app--tools-fullscreen":a,"shell-app--mobile-tool-active":t,"shell-app--mobile-sheet-nav-open":e&&this.effectiveMobileSheetNavOpen,"shell-app--managed":this.managed,"shell-app--slotted":!this.managed};if(!this.managed){return this.renderSlottedShell(l,e,t,o,a)}return i(n,{class:l,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"}),i("div",{class:"shell-app__panel","aria-hidden":a?"true":undefined,inert:a?true:undefined},this.renderManagedPanelNav()),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":a?"true":undefined,inert:a?true:undefined},this.renderManagedBarNav()),i("div",{class:"shell-app__tools","aria-hidden":e&&(!t||this.effectiveMobileSheetNavOpen)?"true":undefined,inert:e&&(!t||this.effectiveMobileSheetNavOpen)?true:undefined,hidden:e&&!t},this.renderManagedTools()),i("div",{class:"shell-app__content ds-focus-ring","aria-hidden":a||o?"true":undefined,inert:a||o?true:undefined,tabIndex:0},this.renderManagedPage()),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!e||!this.effectiveMobileSheetNavOpen,"aria-hidden":e&&this.effectiveMobileSheetNavOpen?undefined:"true",inert:e&&this.effectiveMobileSheetNavOpen?undefined:true},this.renderManagedMobileSheetNav()),i("div",{class:"shell-app__mobile-bar-nav",hidden:!e},this.renderManagedMobileBarNav()))))}get el(){return this}static get watchers(){return{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}}static get style(){return gs()}},[262,"ds-shell-app",{composition:[513],navigation:[16],pageChrome:[16],tools:[16],navStyle:[513,"nav-style"],gradientPreset:[513,"gradient-preset"],shortcutsEnabled:[4,"shortcuts-enabled"],mobileDestination:[1,"mobile-destination"],mobileSheetNavOpen:[4,"mobile-sheet-nav-open"],toolsFullscreen:[32],resolvedMode:[32],managedToolsOpen:[32],managedActiveTool:[32],managedToolPresentation:[32],managedMobileDestination:[32],managedMobileSheetNavOpen:[32],managedInboxTool:[32],managedBrowseContext:[32],activateTool:[64],closeGlobalSurface:[64],setToolPresentation:[64]},[[0,"dsPresentationChange","handleToolsPresentation"],[10,"keydown","handleWindowKeyDown"]],{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}]);vs.FOREGROUND_REFRESH_MS=50;function _s(){if(typeof customElements==="undefined"){return}const s=["ds-shell-app","ds-badge","ds-bar-nav","ds-bar-title","ds-breadcrumb","ds-button-filled","ds-button-unfilled","ds-icon","ds-loader","ds-menu","ds-mobile-bar-nav","ds-mobile-header","ds-mobile-section-switcher","ds-mobile-sheet-nav","ds-panel-nav","ds-panel-tool-header","ds-panel-tools","ds-shell-page","ds-shell-tools","ds-swatch-picker","ds-switch","ds-tab-group","ds-text","ds-tooltip"];s.forEach((s=>{switch(s){case"ds-shell-app":if(!customElements.get(o(s))){customElements.define(o(s),vs)}break;case"ds-badge":if(!customElements.get(o(s))){y()}break;case"ds-bar-nav":if(!customElements.get(o(s))){u()}break;case"ds-bar-title":if(!customElements.get(o(s))){k()}break;case"ds-breadcrumb":if(!customElements.get(o(s))){x()}break;case"ds-button-filled":if(!customElements.get(o(s))){C()}break;case"ds-button-unfilled":if(!customElements.get(o(s))){S()}break;case"ds-icon":if(!customElements.get(o(s))){D()}break;case"ds-loader":if(!customElements.get(o(s))){M()}break;case"ds-menu":if(!customElements.get(o(s))){L()}break;case"ds-mobile-bar-nav":if(!customElements.get(o(s))){B()}break;case"ds-mobile-header":if(!customElements.get(o(s))){E()}break;case"ds-mobile-section-switcher":if(!customElements.get(o(s))){T()}break;case"ds-mobile-sheet-nav":if(!customElements.get(o(s))){A()}break;case"ds-panel-nav":if(!customElements.get(o(s))){P()}break;case"ds-panel-tool-header":if(!customElements.get(o(s))){j()}break;case"ds-panel-tools":if(!customElements.get(o(s))){l()}break;case"ds-shell-page":if(!customElements.get(o(s))){z()}break;case"ds-shell-tools":if(!customElements.get(o(s))){N()}break;case"ds-swatch-picker":if(!customElements.get(o(s))){I()}break;case"ds-switch":if(!customElements.get(o(s))){$()}break;case"ds-tab-group":if(!customElements.get(o(s))){F()}break;case"ds-text":if(!customElements.get(o(s))){G()}break;case"ds-tooltip":if(!customElements.get(o(s))){O()}break}}))}_s();const ws=vs;const ys=_s;export{ws as DsShellApp,ys as defineCustomElement};
1
+ import{p as s,H as e,c as t,h as i,a as n,t as o}from"./index.js";import{c as a,d as l}from"./p-Dbobj7DI.js";import{C as h,c as r,r as d,a as c,b as p,e as u,d as f}from"./p-DO5-fplZ.js";import{i as b,a as m,r as g,b as v,S as _,c as w}from"./p-DNpE0RBz.js";import{d as y}from"./p-GbTasczF.js";import{d as k}from"./p-dEouiXJ8.js";import{d as x}from"./p-BMAZWEDa.js";import{d as C}from"./p-BtUgncSJ.js";import{d as S}from"./p-CnUq7E8S.js";import{d as D}from"./p-DStd98dM.js";import{d as M}from"./p-C8U5BsJf.js";import{d as L}from"./p-Ca-I2UnB.js";import{d as T}from"./p-CMbcRN92.js";import{d as B}from"./p-CsXC1cHI.js";import{d as E}from"./p-B94M62Tx.js";import{d as A}from"./p-m5CSrx_s.js";import{d as P}from"./p-CnIvWEVm.js";import{d as j}from"./p-DrvEhJhO.js";import{d as z}from"./p-B53Vpuqq.js";import{d as N}from"./p-BAAjiAIF.js";import{d as I}from"./p-D9CDoQBx.js";import{d as $}from"./p-CdKz-QT2.js";import{d as F}from"./p-GWUTrIlk.js";import{d as O}from"./p-D4j0deyd.js";import{d as G}from"./p-Dhx_3_tf.js";import{d as U}from"./p-DyqLVdJp.js";const H=["none","cool","neutral","warm","fresh"];const V="neutral";const R={cool:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-blue-strong-background)",position:100}]},neutral:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-grey-strong-background)",position:100}]},warm:{opacity:.1,stops:[{color:"var(--color-background-transparent)",position:0},{color:"var(--color-color-intent-yellow-strong-background)",position:100}]},fresh:{opacity:.4,stops:[{color:"var(--color-color-intent-cyan-faint-background)",position:0},{color:"var(--color-background-transparent)",position:47},{color:"var(--color-background-transparent)",position:58},{color:"var(--color-color-intent-red-faint-background)",position:83},{color:"var(--color-color-intent-pink-faint-background)",position:100}]}};const W="100% 100% at 0% 0%";function q(s){const e=Z(s);return e==="none"?null:R[e]}function J(s){return String(q(s)?.opacity??0)}function K(s){return H.includes(s)}function Z(s){return s!=null&&K(s)?s:V}function Q(s){const e=Z(s);if(e==="none")return"none";return X(R[e].stops)}function X(s){const e=s.map((s=>`${s.color} ${s.position}%`)).join(", ");return`radial-gradient(${W}, ${e})`}const Y="--ds-shell-gradient-image";const ss="--ds-shell-gradient-size";const es="--ds-shell-gradient-position-panel";const ts="--ds-shell-gradient-position-bar";const is="--ds-shell-gradient-opacity";function ns(s=V){return Q(s)}function os(s){const e=typeof globalThis.window!=="undefined"?globalThis.window:undefined;if(!e)return{width:0,height:0};const t=e.visualViewport;return{width:Math.round(t?.width??e.innerWidth),height:Math.round(t?.height??e.innerHeight)}}function as(s){return`${Math.round(s.width)}px ${Math.round(s.height)}px`}function ls(){return"0 0"}function hs(s){return`${-Math.round(s)}px 0`}const rs={k:"search",a:"agents",s:"stacks",m:"messages",n:"activity","/":"help"};function ds(s){return!s.metaKey&&!s.ctrlKey&&!s.altKey&&!s.shiftKey}function cs(s){if(!s||typeof s!=="object")return false;if(!("closest"in s)||typeof s.closest!=="function")return false;const e=s;const t=e.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]');if(t)return true;const i=e.getAttribute("role");if(i==="textbox"||i==="combobox"||i==="searchbox")return true;return Boolean(e.isContentEditable)}function ps(s){if(s.key==="["||s.code==="BracketLeft")return"[";if(s.key==="]"||s.code==="BracketRight")return"]";return s.key.length===1?s.key.toLowerCase():s.key.toLowerCase()}function us(s){if(!ds(s))return null;const e=ps(s);if(e==="[")return"toggle-panel-nav";if(e==="]")return"close-panel-tools";const t=rs[e];if(t)return`open-tool:${t}`;return null}function fs(s,e){if(typeof document==="undefined")return 0;const t=document.createElement("div");t.style.cssText="position:absolute;visibility:hidden;pointer-events:none;height:0;width:var("+e+");";s.appendChild(t);const i=t.getBoundingClientRect().width;s.removeChild(t);return i}function bs(s){return{expandedPx:fs(s,"--_nav-width"),collapsedPx:fs(s,"--_nav-width-collapsed")}}function ms(s,e){if(e?.classList.contains("panel-nav--collapsed"))return true;const t=s?.collapsed;return t===true}function gs(s,e){return e?s.collapsedPx:s.expandedPx}const vs=()=>`@media (forced-colors: active){.sc-ds-shell-app:root,.sc-ds-shell-app-h,.ds-forced-colors-scope.sc-ds-shell-app{--ds-forced-color-surface:Canvas;--ds-forced-color-content:CanvasText;--ds-forced-color-control-boundary:ButtonText;--ds-forced-color-selected:Highlight;--ds-forced-color-on-selected:HighlightText;--ds-forced-color-disabled:GrayText}}.sc-ds-shell-app-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-shell-app-h,.ds-focus-ring.sc-ds-shell-app,.ds-focus-ring-inset.sc-ds-shell-app-h,.ds-focus-ring-inset.sc-ds-shell-app{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-shell-app-h:focus-visible,.ds-focus-ring.sc-ds-shell-app:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-shell-app-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-shell-app{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-shell-app-h:focus-visible,.ds-focus-ring-inset.sc-ds-shell-app:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-shell-app-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-shell-app:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-shell-app::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}@media (forced-colors: active){.sc-ds-shell-app-h{--ds-focus-ring-color:var(--ds-forced-color-selected)}}.sc-ds-shell-app-h{display:flex;flex-direction:column;height:100%;min-height:0;box-sizing:border-box;overflow:hidden;overscroll-behavior:none;font-family:var(--typography-font-family-ui, system-ui);--ds-shell-panel-tools-width:var(--dimension-panel-width-xs)}.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-secondary)}.shell-app__row.sc-ds-shell-app{display:flex;flex:1 1 0;min-height:0;position:relative}.shell-app__banner.sc-ds-shell-app{flex:0 0 auto;min-width:0;position:relative;z-index:5}.shell-app__banner.sc-ds-shell-app-s>ds-banner,.shell-app__banner .sc-ds-shell-app-s>ds-banner{display:grid;width:100%}.shell-app__chrome.sc-ds-shell-app{position:absolute;inset:0;pointer-events:none;z-index:0;background-color:var(--_shell-chrome-bg)}.shell-app--gradient.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app::before{content:'';position:absolute;inset:0;pointer-events:none;background-position:0 0;background-attachment:fixed;z-index:1;opacity:var(--ds-shell-gradient-opacity, 1);background-image:var(--ds-shell-gradient-image, none);background-size:var(--ds-shell-gradient-size, auto);background-repeat:no-repeat}.shell-app__panel.sc-ds-shell-app{flex:0 0 auto;min-height:0;height:100%;position:relative;z-index:2}.shell-app__panel.sc-ds-shell-app-s>ds-panel-nav,.shell-app__panel .sc-ds-shell-app-s>ds-panel-nav{display:block;height:100%}.shell-app__panel.sc-ds-shell-app>ds-panel-nav.sc-ds-shell-app{display:block;height:100%}.shell-app__main.sc-ds-shell-app{flex:1 1 auto;min-width:0;min-height:0;display:grid;grid-template-columns:minmax(0, 1fr) auto;grid-template-rows:auto minmax(0, 1fr);grid-template-areas:'bar tools' 'content tools';position:relative;z-index:1}.shell-app__mobile-sheet-nav.sc-ds-shell-app,.shell-app__mobile-bar-nav.sc-ds-shell-app{display:none}.shell-app__bar.sc-ds-shell-app{grid-area:bar;flex:0 0 auto;min-width:0}.shell-app__bar.sc-ds-shell-app-s>ds-bar-nav,.shell-app__bar .sc-ds-shell-app-s>ds-bar-nav{display:block}.shell-app__bar.sc-ds-shell-app>ds-bar-nav.sc-ds-shell-app{display:block}.shell-app__content.sc-ds-shell-app{grid-area:content;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;overscroll-behavior:none;contain:layout}.shell-app__content.sc-ds-shell-app{position:relative;z-index:1;background-color:var(--color-background-primary)}.shell-app__tools.sc-ds-shell-app{grid-area:tools;flex:0 0 auto;min-width:0;min-height:0;height:100%;display:flex;position:relative;z-index:0;overflow:hidden}.shell-app__tools.sc-ds-shell-app-s>ds-panel-tools,.shell-app__tools .sc-ds-shell-app-s>ds-panel-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app-s>ds-shell-tools,.shell-app__tools .sc-ds-shell-app-s>ds-shell-tools{display:block;height:100%;min-height:0}.shell-app__tools.sc-ds-shell-app>ds-shell-tools.sc-ds-shell-app{display:block;height:100%;min-height:0}.shell-app__content.sc-ds-shell-app>ds-shell-page.sc-ds-shell-app{display:block;min-height:100%}.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app,.shell-app--tools-fullscreen.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{visibility:hidden}.shell-app--mobile.sc-ds-shell-app-h{--_shell-chrome-bg:var(--color-background-primary);padding-block-start:env(safe-area-inset-top)}.shell-app--mobile.shell-app--foreground-refresh.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{transform:translateZ(0)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__chrome.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__panel.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__bar.sc-ds-shell-app{display:none}.shell-app--mobile.sc-ds-shell-app-h .shell-app__main.sc-ds-shell-app{width:100%;box-sizing:border-box;grid-template-columns:minmax(0, 1fr);grid-template-rows:minmax(0, 1fr) auto;grid-template-areas:'stage' 'mobile-bar-nav';background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{grid-area:stage;min-width:0;min-height:0;height:100%;position:relative}.shell-app--mobile.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app{z-index:1;overflow:auto}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{z-index:2;width:100%;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav.sc-ds-shell-app{display:block;z-index:3;overflow:hidden;background:var(--color-background-primary)}.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav.sc-ds-shell-app{grid-area:mobile-bar-nav;display:block;min-width:0;position:relative;z-index:4}.shell-app--mobile.sc-ds-shell-app-h .shell-app__tools[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-sheet-nav[hidden].sc-ds-shell-app,.shell-app--mobile.sc-ds-shell-app-h .shell-app__mobile-bar-nav[hidden].sc-ds-shell-app{display:none}.shell-app--mobile-tool-active.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__content.sc-ds-shell-app,.shell-app--mobile-sheet-nav-open.sc-ds-shell-app-h .shell-app__tools.sc-ds-shell-app{visibility:hidden}`;const _s=s(class s extends e{constructor(s){super();if(s!==false){this.__registerHost()}this.dsResponsiveModeChange=t(this,"dsResponsiveModeChange");this.dsNavSelect=t(this,"dsNavSelect");this.dsTabChange=t(this,"dsTabChange");this.dsSubsectionChange=t(this,"dsSubsectionChange");this.dsPageBack=t(this,"dsPageBack");this.dsBreadcrumbSelect=t(this,"dsBreadcrumbSelect");this.dsPageAction=t(this,"dsPageAction");this.dsToolChange=t(this,"dsToolChange");this.dsHeaderBack=t(this,"dsHeaderBack");this.dsHeaderAction=t(this,"dsHeaderAction");this.dsPresentationChange=t(this,"dsPresentationChange");this.dsBrowseContextChange=t(this,"dsBrowseContextChange");this.dsNavFooterAction=t(this,"dsNavFooterAction");this.dsNavUserAction=t(this,"dsNavUserAction");this.composition="managed";this.navigation={};this.pageChrome={};this.tools={};this.navStyle="dashboard";this.gradientPreset=V;this.shortcutsEnabled=true;this.mobileDestination="area";this.mobileSheetNavOpen=false;this.toolsFullscreen=false;this.resolvedMode="desktop";this.managedToolsOpen=false;this.managedToolsClosing=false;this.managedActiveTool="";this.managedToolPresentation="drawer";this.managedMobileDestination="area";this.managedMobileSheetNavOpen=false;this.managedInboxTool="";this.managedBrowseContext="dashboard";this.resizeObserver=null;this.hasLoaded=false;this.foregroundRefreshTimer=null;this.panelNavTransition=new h;this.chromeSyncCoalescer=r((()=>this.syncChrome()));this.panelWidthTokens={expandedPx:0,collapsedPx:0};this.cachedViewportWidth=0;this.cachedViewportHeight=0;this.onWindowResize=()=>{this.updateResponsiveMode();if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onVisualViewportChange=()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onChromeTransitionStart=s=>{const e=u(s);if(e==="panel-tools"){if(d(s)==="closing"){this.managedToolsClosing=true}return}if(e!=="panel-nav")return;this.panelNavTransition.enter();const t=os();this.cachedViewportWidth=t.width;this.cachedViewportHeight=t.height;this.syncChrome()};this.onChromeTransitionEnd=s=>{const e=u(s);if(e==="panel-tools"){this.managedToolsClosing=false;return}if(e!=="panel-nav")return;this.panelNavTransition.exit();if(!this.panelNavTransition.isActive){this.scheduleChromeSync()}};this.onDocumentVisibilityChange=()=>{if(!document.hidden)this.refreshAfterForegroundRestore()};this.onPageShow=s=>{if(s.persisted)this.refreshAfterForegroundRestore()};this.handleManagedNavSelect=s=>{s.stopPropagation();this.dsNavSelect.emit(s.detail)};this.handleManagedTabChange=s=>{s.stopPropagation();this.dsTabChange.emit(s.detail)};this.handleManagedPageBack=s=>{s.stopPropagation();this.dsPageBack.emit(s.detail)};this.handleManagedBreadcrumbSelect=s=>{s.stopPropagation();const e=this.dsBreadcrumbSelect.emit(s.detail);if(e.defaultPrevented)s.preventDefault()};this.handleManagedSubsectionChange=s=>{s.stopPropagation();this.dsSubsectionChange.emit(s.detail)};this.handleManagedPageAction=s=>{s.stopPropagation();this.dsPageAction.emit(s.detail)};this.handleManagedToolChange=s=>{s.stopPropagation();const{id:e,selected:t}=s.detail;this.managedActiveTool=e;this.managedToolsOpen=t;const i=this.resolvedToolItems.find((s=>s.id===e));if(i?.mobileDestination==="inbox"||b(e)){this.managedInboxTool=e}this.managedMobileDestination=t?i?.mobileDestination??m(true,e):"area";this.managedMobileSheetNavOpen=false;this.dsToolChange.emit(s.detail)};this.handleManagedPresentationChange=s=>{s.stopPropagation();this.managedToolPresentation=s.detail.presentation;this.toolsFullscreen=s.detail.presentation==="fullscreen";this.dsPresentationChange.emit(s.detail)};this.handleManagedHeaderBack=s=>{s.stopPropagation();this.dsHeaderBack.emit(s.detail)};this.handleManagedHeaderAction=s=>{s.stopPropagation();this.dsHeaderAction.emit(s.detail)};this.handleManagedSheetToggle=s=>{s.stopPropagation();this.managedMobileSheetNavOpen=s.detail};this.handleManagedMobileDestination=s=>{s.stopPropagation();const e=s.detail.destination;this.managedMobileSheetNavOpen=false;this.managedMobileDestination=e;if(e==="area"){this.managedToolsOpen=false;return}const t=e==="inbox"?g(this.managedInboxTool,this.availableInboxTools):e;if(!t)return;const i=this.resolvedToolItems.find((s=>s.id===t||e!=="inbox"&&s.mobileDestination===e));if(!i||i.isInactive)return;const n=i.id;this.managedActiveTool=n;this.managedToolsOpen=true;if(b(n))this.managedInboxTool=n;this.dsToolChange.emit({id:n,selected:true})};this.handleManagedAreaSelect=s=>{s.stopPropagation();this.managedMobileSheetNavOpen=false;this.managedMobileDestination="area";this.managedToolsOpen=false;this.dsNavSelect.emit(s.detail)};this.handleManagedBrowseContext=s=>{s.stopPropagation();this.managedBrowseContext=s.detail;this.dsBrowseContextChange.emit(s.detail)};this.handleManagedSheetClose=s=>{s.stopPropagation();this.managedMobileSheetNavOpen=false};this.handleManagedNavFooterAction=s=>{s.stopPropagation();this.dsNavFooterAction.emit()};this.handleManagedNavUserAction=s=>{s.stopPropagation();this.dsNavUserAction.emit(s.detail)}}get managed(){return this.composition==="managed"}get effectiveMobileDestination(){return this.managed?this.managedMobileDestination:this.mobileDestination}get effectiveMobileSheetNavOpen(){return this.managed?this.managedMobileSheetNavOpen:this.mobileSheetNavOpen}get resolvedNavigationGroups(){if(this.navigation.groups?.length)return this.navigation.groups;return this.managedBrowseContext==="settings"?this.navigation.settingsGroups??[]:this.navigation.dashboardGroups??[]}get resolvedToolItems(){return this.tools.items??a}get availableInboxTools(){return this.resolvedToolItems.filter((s=>!s.isInactive&&(s.mobileDestination==="inbox"||b(s.id)))).map((s=>s.id))}componentWillLoad(){if(typeof window!=="undefined"){this.resolvedMode=v(window.innerWidth)}this.managedBrowseContext=this.navigation.browseContext??this.navStyle;this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen;this.managedInboxTool=g("",this.availableInboxTools)}componentDidLoad(){this.hasLoaded=true;this.syncSlottedNavStyle();this.syncSlottedMobileState();this.connectMetricsObserver();this.connectViewportListeners();this.connectPageLifecycleListeners();this.el.addEventListener(c,this.onChromeTransitionStart);this.el.addEventListener(p,this.onChromeTransitionEnd);requestAnimationFrame((()=>{this.cachePanelWidthTokens();this.scheduleChromeSync()}));const s=this.el.querySelector("ds-shell-tools, ds-panel-tools");this.toolsFullscreen=s?.getAttribute("presentation")==="fullscreen"}handleToolsPresentation(s){this.toolsFullscreen=s.detail?.presentation==="fullscreen"}disconnectedCallback(){this.resizeObserver?.disconnect();this.resizeObserver=null;this.disconnectViewportListeners();this.disconnectPageLifecycleListeners();this.cancelForegroundRefresh();this.chromeSyncCoalescer.cancel();this.el.removeEventListener(c,this.onChromeTransitionStart);this.el.removeEventListener(p,this.onChromeTransitionEnd)}onShellPropsChange(){this.syncSlottedNavStyle();this.scheduleChromeSync()}handleNavigationChange(){this.managedBrowseContext=this.navigation.browseContext??this.navStyle}handleToolsChange(){if(this.managedActiveTool&&!this.resolvedToolItems.some((s=>s.id===this.managedActiveTool))){this.managedToolsOpen=false;this.managedActiveTool="";this.managedMobileDestination="area"}this.managedInboxTool=g(this.managedInboxTool,this.availableInboxTools)}onMobileStateChange(s,t){if(this.managed){this.managedMobileDestination=this.mobileDestination;this.managedMobileSheetNavOpen=this.mobileSheetNavOpen}this.syncSlottedMobileState();if(t===true&&!this.effectiveMobileSheetNavOpen&&this.resolvedMode==="mobile"){requestAnimationFrame((()=>{const s=this.el.querySelector("ds-mobile-bar-nav");const t=document.activeElement;if(t instanceof e&&s?.contains(t))return;void s?.focusDestination?.("sheet-nav")}))}}updateResponsiveMode(){if(typeof window==="undefined")return;const s=v(window.innerWidth);if(s===this.resolvedMode)return;this.resolvedMode=s;this.syncSlottedMobileState();this.scheduleChromeSync();if(this.hasLoaded)this.dsResponsiveModeChange.emit({mode:s})}scheduleChromeSync(){this.chromeSyncCoalescer.schedule()}syncSlottedNavStyle(){const s=this.el.querySelector("ds-panel-nav");const e=this.el.querySelector("ds-bar-nav");if(s){s.setAttribute("nav-style",this.navStyle);s.navStyle=this.navStyle}if(e){e.setAttribute("nav-style",this.navStyle);e.navStyle=this.navStyle}}syncSlottedMobileState(){const s=this.el.querySelector("ds-shell-tools");const e=this.el.querySelector("ds-mobile-bar-nav");const t=this.el.querySelector("ds-mobile-sheet-nav");if(s){s.setAttribute("responsive-mode",this.resolvedMode);s.responsiveMode=this.resolvedMode}if(e){e.activeDestination=this.effectiveMobileDestination;e.sheetNavExpanded=this.effectiveMobileSheetNavOpen}if(t){t.open=this.effectiveMobileSheetNavOpen}}connectMetricsObserver(){this.resizeObserver=new ResizeObserver((()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()}));this.resizeObserver.observe(this.el);const s=this.el.querySelector(".shell-app__panel");if(s)this.resizeObserver.observe(s)}connectViewportListeners(){if(typeof window==="undefined")return;window.addEventListener("resize",this.onWindowResize,{passive:true});const s=window.visualViewport;if(s){s.addEventListener("resize",this.onVisualViewportChange,{passive:true});s.addEventListener("scroll",this.onVisualViewportChange,{passive:true})}}disconnectViewportListeners(){if(typeof window==="undefined")return;window.removeEventListener("resize",this.onWindowResize);const s=window.visualViewport;if(s){s.removeEventListener("resize",this.onVisualViewportChange);s.removeEventListener("scroll",this.onVisualViewportChange)}}connectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.addEventListener("visibilitychange",this.onDocumentVisibilityChange);window.addEventListener("pageshow",this.onPageShow)}disconnectPageLifecycleListeners(){if(typeof window==="undefined"||typeof document==="undefined")return;document.removeEventListener("visibilitychange",this.onDocumentVisibilityChange);window.removeEventListener("pageshow",this.onPageShow)}cancelForegroundRefresh(){if(this.foregroundRefreshTimer!==null){window.clearTimeout(this.foregroundRefreshTimer);this.foregroundRefreshTimer=null}this.el.classList.remove("shell-app--foreground-refresh")}refreshAfterForegroundRestore(){this.updateResponsiveMode();this.syncSlottedMobileState();this.scheduleChromeSync();if(this.resolvedMode!=="mobile")return;this.cancelForegroundRefresh();this.el.classList.add("shell-app--foreground-refresh");this.foregroundRefreshTimer=window.setTimeout((()=>{this.foregroundRefreshTimer=null;this.el.classList.remove("shell-app--foreground-refresh");void this.el.querySelector(".shell-app__main")?.offsetHeight}),s.FOREGROUND_REFRESH_MS)}cachePanelWidthTokens(){const s=this.el.querySelector("ds-panel-nav .panel-nav");if(!s)return;this.panelWidthTokens=bs(s)}applyGradientVars(s,e){const t=s.style;for(const[s,i]of Object.entries(e)){if(i===null)t.removeProperty(s);else t.setProperty(s,i)}}clearGradientPaintVars(s){const e=[Y,ss,is];for(const t of s){for(const s of e)t.style.removeProperty(s)}}syncChromeLayoutVars(s,e,t,i){if(s){s.style.setProperty(es,t)}if(e){e.style.setProperty(ts,i)}}resolvePanelWidthPx(s){const e=s?.querySelector(".panel-nav");if(this.panelNavTransition.isActive&&this.panelWidthTokens.expandedPx>0){const t=ms(s,e);return gs(this.panelWidthTokens,t)}const t=this.el.querySelector(".shell-app__panel");const i=t?.getBoundingClientRect().width??0;if(i>0)return i;if(this.panelWidthTokens.expandedPx>0){const t=ms(s,e);return gs(this.panelWidthTokens,t)}return 0}resolveViewportDimensions(){if(this.panelNavTransition.isActive&&this.cachedViewportWidth>0){return{width:this.cachedViewportWidth,height:this.cachedViewportHeight}}return os()}chromeLayerActive(){return this.resolvedMode!=="mobile"&&Z(this.gradientPreset)!=="none"}handleWindowKeyDown(s){if(!this.shortcutsEnabled)return;if(cs(s.target))return;const e=us(s);if(!e)return;s.preventDefault();const t=this.el.querySelector("ds-panel-nav");const i=this.el.querySelector("ds-shell-tools, ds-panel-tools");if(e==="toggle-panel-nav"){void t?.toggleCollapsed();return}if(e==="close-panel-tools"){void i?.closeDrawer?.();return}if(e.startsWith("open-tool:")&&i){const s=e.slice("open-tool:".length);void i.activateTool?.(s)}}async activateTool(s){const e=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(e?.activateTool?.(s))}async closeGlobalSurface(){if(this.managedMobileSheetNavOpen){this.managedMobileSheetNavOpen=false;return}const s=this.el.querySelector("ds-shell-tools, ds-panel-tools");await(s?.closeDrawer?.())}async setToolPresentation(s){this.managedToolPresentation=s;this.toolsFullscreen=s==="fullscreen"}get currentArea(){const s=[...this.navigation.dashboardGroups??[],...this.navigation.settingsGroups??[],...this.resolvedNavigationGroups];const e=s.flatMap((s=>s.items));const t=this.navigation.activeId||y(this.navigation.currentUrl??this.pageChrome.currentUrl??"",e);return e.find((s=>s.id===t))??e[0]??{id:"area",icon:"MapPage",label:this.pageChrome.heading||"Area"}}toolDot(s){return this.resolvedToolItems.find((e=>e.id===s))?.dot??false}syncChrome(){const s=this.el.querySelector("ds-panel-nav");const e=this.el.querySelector("ds-bar-nav");const t=[this.el,s,e].filter((s=>s!==null));const i=()=>{if(s)s.style.removeProperty(es);if(e)e.style.removeProperty(ts)};const n=Z(this.gradientPreset);if(n==="none"||this.resolvedMode==="mobile"){this.clearGradientPaintVars(t);i();return}const o=this.resolveViewportDimensions();const a=this.resolvePanelWidthPx(s);const l=ls();const h=hs(a);this.syncChromeLayoutVars(s,e,l,h);const r=ns(n);const d=as({width:o.width,height:o.height});const c=J(n);for(const s of t){if(s===this.el){this.applyGradientVars(s,{[Y]:r,[ss]:d,[es]:l,[ts]:h,[is]:c});continue}const e=s.tagName.toLowerCase()==="ds-bar-nav";this.applyGradientVars(s,{[Y]:r,[ss]:d,[is]:c,[es]:e?null:l,[ts]:e?h:null})}}renderManagedPanelNav(){const s=this.navigation;return i("ds-panel-nav",{navStyle:this.navStyle,groups:this.resolvedNavigationGroups,breakpoint:_,routerMode:s.routerMode??"event",activeId:s.activeId??"",currentUrl:s.currentUrl??this.pageChrome.currentUrl??"",storageKey:s.storageKey??"",userName:s.userName??"",userInitial:s.userInitial??"",accountMenuExpanded:s.accountMenuExpanded??false,dashboardLabel:s.dashboardLabel??"Dashboard",settingsLabel:s.settingsLabel??"Settings",accountLabel:s.accountLabel??"Account",dashboardNavigationLabel:s.dashboardNavigationLabel??"Dashboard navigation",settingsNavigationLabel:s.settingsNavigationLabel??"Settings navigation",navigationItemsLabel:s.navigationLabel??"Navigation items",onDsNavSelect:this.handleManagedNavSelect,onDsNavFooterAction:this.handleManagedNavFooterAction,onDsNavUserAction:this.handleManagedNavUserAction})}renderManagedBarNav(){return i("ds-bar-nav",{navStyle:this.navStyle,tabs:this.pageChrome.tabs??[],value:this.pageChrome.value??"",heading:this.pageChrome.routeHeading??this.pageChrome.heading,basePath:this.pageChrome.basePath??"",currentUrl:this.pageChrome.currentUrl??this.navigation.currentUrl??"",onDsTabChange:this.handleManagedTabChange})}renderManagedToolSlots(){const s=[...new Set(this.resolvedToolItems.map((s=>s.id)))].sort();return s.flatMap((s=>[i("slot",{key:`tool:${s}`,name:s,slot:s}),i("slot",{key:`tool-view:${s}`,name:`${s}-view`,slot:`${s}-view`})]))}renderManagedTools(){const s=this.tools;return i("ds-shell-tools",{responsiveMode:this.resolvedMode,open:this.managedToolsOpen,activeTool:this.managedActiveTool,presentation:this.managedToolPresentation,fullscreenHeaderMode:s.fullscreenHeaderMode??"shared",items:this.resolvedToolItems,headers:s.headers??{},storageKey:s.storageKey??"",toolsLabel:s.toolsLabel??"Tools",toolShortcutsLabel:s.toolShortcutsLabel??"Tool shortcuts",inboxLabel:s.inboxLabel??"Inbox",inboxNavigationLabel:s.inboxNavigationLabel??"Inbox sections",onDsToolChange:this.handleManagedToolChange,onDsPresentationChange:this.handleManagedPresentationChange,onDsHeaderBack:this.handleManagedHeaderBack,onDsHeaderAction:this.handleManagedHeaderAction},this.renderManagedToolSlots())}renderManagedMobileSheetNav(){const s=this.navigation;return i("ds-mobile-sheet-nav",{open:this.managedMobileSheetNavOpen,browseContext:this.managedBrowseContext,dashboardGroups:s.dashboardGroups??s.groups??[],settingsGroups:s.settingsGroups??[],currentUrl:s.currentUrl??this.pageChrome.currentUrl??"",navigationLabel:s.navigationLabel??"Application navigation",dashboardLabel:s.dashboardLabel??"Dashboard",settingsLabel:s.settingsLabel??"Settings",accountLabel:s.accountLabel??"Account",onDsAreaSelect:this.handleManagedAreaSelect,onDsBrowseContextChange:this.handleManagedBrowseContext,onDsClose:this.handleManagedSheetClose})}renderManagedMobileBarNav(){return i("ds-mobile-bar-nav",{hidden:this.tools.mobileBarHidden??false,activeDestination:this.managedMobileDestination,currentArea:this.currentArea,sheetNavExpanded:this.managedMobileSheetNavOpen,searchLabel:this.tools.items?.find((s=>s.id==="search"))?.ariaLabel??"Search",inboxLabel:this.tools.inboxLabel??"Inbox",messagesLabel:this.tools.items?.find((s=>s.id==="messages"))?.ariaLabel??"Messages",agentsLabel:this.tools.items?.find((s=>s.id==="agents"))?.ariaLabel??"Agents",helpLabel:this.tools.items?.find((s=>s.id==="help"))?.ariaLabel??"Help & Support",searchDot:this.toolDot("search"),inboxDot:this.toolDot("stacks")||this.toolDot("activity"),messagesDot:this.toolDot("messages"),agentsDot:this.toolDot("agents"),onDsSheetNavToggle:this.handleManagedSheetToggle,onDsDestinationChange:this.handleManagedMobileDestination})}renderManagedMobileLeading(){if(!this.pageChrome.showBack){return i("slot",{name:"page-header-leading",slot:"leading"})}return[i("ds-tooltip",{slot:"leading",label:this.pageChrome.backAriaLabel??"Back",side:"bottom",size:"sm"},i("ds-button-unfilled",{variant:"icon",icon:this.pageChrome.backIcon??"ChevronLeft",size:"md","aria-label":this.pageChrome.backAriaLabel??"Back",activeFill:false,hasBorder:false,onDsClick:s=>this.dsPageBack.emit(s.detail)})),i("slot",{name:"page-header-leading",slot:"leading"})]}renderManagedMobileActions(){const s=this.pageChrome.mobileActions??[];return[...s.map((s=>i("ds-tooltip",{slot:"trailing",key:s.id,label:s.ariaLabel,side:"bottom",size:"sm"},i("ds-button-unfilled",{id:s.triggerId||undefined,variant:"icon",icon:s.icon,size:"md","aria-label":s.ariaLabel,haspopup:s.haspopup,controls:s.controls,expanded:s.expanded,pressed:s.pressed,isActive:!!s.expanded,isInactive:s.isInactive,activeFill:false,hasBorder:false,onDsClick:()=>this.dsPageAction.emit(s.id)})))),i("slot",{name:"page-header-trailing",slot:"trailing"})]}renderManagedPage(){const s=this.pageChrome;const e=s.showBack?[]:s.tabs??[];const t=(s.subsections??[]).map((s=>"type"in s?{type:"divider"}:{id:s.id,label:s.label,isInactive:s.isInactive}));return i("ds-shell-page",{responsiveMode:this.resolvedMode,headerCapacity:w(this.resolvedMode,this.managedToolsOpen||this.managedToolsClosing),contentInset:s.contentInset??"default",contentInsetBlockStart:s.contentInsetBlockStart??"default",contentInsetBlockStartSize:s.contentInsetBlockStartSize,compactContentInsetBlockStartSize:s.compactContentInsetBlockStartSize,scrollCompaction:s.scrollCompaction??true,contentSurface:s.contentSurface??"primary"},i("ds-bar-title",{slot:"header",heading:s.heading??"",description:s.description??"",showBack:s.showBack??false,backAriaLabel:s.backAriaLabel??"Back",backLabel:s.backLabel??"Back",breadcrumbs:s.breadcrumbs??[],breadcrumbAriaLabel:s.breadcrumbAriaLabel??"Breadcrumb",sections:t,value:s.subvalue??"",sectionsAriaLabel:s.subsectionsAriaLabel??"Change page subsection",primaryAction:s.primaryAction??null,actions:s.actions??[],actionsAriaLabel:s.actionsAriaLabel??"More page actions",showDivider:s.showHeaderDivider??true,showCompactDivider:s.showCompactHeaderDivider,onDsBack:this.handleManagedPageBack,onDsBreadcrumbSelect:this.handleManagedBreadcrumbSelect,onDsSectionChange:this.handleManagedSubsectionChange,onDsAction:this.handleManagedPageAction}),i("ds-mobile-header",{slot:"mobile-header",heading:s.heading??"",headingLevel:s.headingLevel??"h1",sections:e,value:s.showBack?"":s.value??"",sectionsAriaLabel:s.sectionsAriaLabel??"Change page section",subsections:s.subsections??[],subvalue:s.subvalue??"",subsectionsAriaLabel:s.subsectionsAriaLabel??"Change page subsection",tone:s.tone??"default",onDsSectionChange:this.handleManagedTabChange,onDsSubsectionChange:this.handleManagedSubsectionChange},this.renderManagedMobileLeading(),this.renderManagedMobileActions()),i("slot",null))}renderSlottedShell(s,e,t,o,a){return i(n,{class:s,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"}),i("div",{class:"shell-app__panel","aria-hidden":a?"true":undefined,inert:a?true:undefined},i("slot",{name:"panel"})),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":a?"true":undefined,inert:a?true:undefined},i("slot",{name:"bar"})),i("div",{class:"shell-app__tools","aria-hidden":e&&(!t||this.mobileSheetNavOpen)?"true":undefined,inert:e&&(!t||this.mobileSheetNavOpen)?true:undefined,hidden:e&&!t},i("slot",{name:"tools"})),i("div",{class:"shell-app__content ds-focus-ring","aria-hidden":a||o?"true":undefined,inert:a||o?true:undefined,tabIndex:0},i("slot",null)),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!e||!this.mobileSheetNavOpen,"aria-hidden":e&&this.mobileSheetNavOpen?undefined:"true",inert:e&&this.mobileSheetNavOpen?undefined:true},i("slot",{name:"mobile-sheet-nav"})),i("div",{class:"shell-app__mobile-bar-nav",hidden:!e},i("slot",{name:"mobile-bar-nav"})))))}render(){const s=this.chromeLayerActive();const e=this.resolvedMode==="mobile";const t=e&&this.effectiveMobileDestination!=="area";const o=e&&(t||this.effectiveMobileSheetNavOpen);const a=!e&&this.toolsFullscreen;const l={"shell-app":true,"shell-app--gradient":s,[`shell-app--${this.navStyle}`]:true,[`shell-app--${this.resolvedMode}`]:true,"shell-app--tools-fullscreen":a,"shell-app--mobile-tool-active":t,"shell-app--mobile-sheet-nav-open":e&&this.effectiveMobileSheetNavOpen,"shell-app--managed":this.managed,"shell-app--slotted":!this.managed};if(!this.managed){return this.renderSlottedShell(l,e,t,o,a)}return i(n,{class:l,"responsive-mode":this.resolvedMode},i("div",{class:"shell-app__banner"},i("slot",{name:"banner"})),i("div",{class:"shell-app__row"},i("div",{class:"shell-app__chrome","aria-hidden":"true"}),i("div",{class:"shell-app__panel","aria-hidden":a?"true":undefined,inert:a?true:undefined},this.renderManagedPanelNav()),i("div",{class:"shell-app__main"},i("div",{class:"shell-app__bar","aria-hidden":a?"true":undefined,inert:a?true:undefined},this.renderManagedBarNav()),i("div",{class:"shell-app__tools","aria-hidden":e&&(!t||this.effectiveMobileSheetNavOpen)?"true":undefined,inert:e&&(!t||this.effectiveMobileSheetNavOpen)?true:undefined,hidden:e&&!t},this.renderManagedTools()),i("div",{class:"shell-app__content ds-focus-ring","aria-hidden":a||o?"true":undefined,inert:a||o?true:undefined,tabIndex:0},this.renderManagedPage()),i("div",{class:"shell-app__mobile-sheet-nav",hidden:!e||!this.effectiveMobileSheetNavOpen,"aria-hidden":e&&this.effectiveMobileSheetNavOpen?undefined:"true",inert:e&&this.effectiveMobileSheetNavOpen?undefined:true},this.renderManagedMobileSheetNav()),i("div",{class:"shell-app__mobile-bar-nav",hidden:!e},this.renderManagedMobileBarNav()))))}get el(){return this}static get watchers(){return{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}}static get style(){return vs()}},[262,"ds-shell-app",{composition:[513],navigation:[16],pageChrome:[16],tools:[16],navStyle:[513,"nav-style"],gradientPreset:[513,"gradient-preset"],shortcutsEnabled:[4,"shortcuts-enabled"],mobileDestination:[1,"mobile-destination"],mobileSheetNavOpen:[4,"mobile-sheet-nav-open"],toolsFullscreen:[32],resolvedMode:[32],managedToolsOpen:[32],managedToolsClosing:[32],managedActiveTool:[32],managedToolPresentation:[32],managedMobileDestination:[32],managedMobileSheetNavOpen:[32],managedInboxTool:[32],managedBrowseContext:[32],activateTool:[64],closeGlobalSurface:[64],setToolPresentation:[64]},[[0,"dsPresentationChange","handleToolsPresentation"],[10,"keydown","handleWindowKeyDown"]],{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}],navigation:[{handleNavigationChange:0}],tools:[{handleToolsChange:0}],mobileDestination:[{onMobileStateChange:0}],mobileSheetNavOpen:[{onMobileStateChange:0}]}]);_s.FOREGROUND_REFRESH_MS=50;function ws(){if(typeof customElements==="undefined"){return}const s=["ds-shell-app","ds-badge","ds-bar-nav","ds-bar-title","ds-breadcrumb","ds-button-filled","ds-button-unfilled","ds-icon","ds-loader","ds-menu","ds-mobile-bar-nav","ds-mobile-header","ds-mobile-section-switcher","ds-mobile-sheet-nav","ds-panel-nav","ds-panel-tool-header","ds-panel-tools","ds-shell-page","ds-shell-tools","ds-swatch-picker","ds-switch","ds-tab-group","ds-text","ds-tooltip"];s.forEach((s=>{switch(s){case"ds-shell-app":if(!customElements.get(o(s))){customElements.define(o(s),_s)}break;case"ds-badge":if(!customElements.get(o(s))){k()}break;case"ds-bar-nav":if(!customElements.get(o(s))){f()}break;case"ds-bar-title":if(!customElements.get(o(s))){x()}break;case"ds-breadcrumb":if(!customElements.get(o(s))){C()}break;case"ds-button-filled":if(!customElements.get(o(s))){S()}break;case"ds-button-unfilled":if(!customElements.get(o(s))){D()}break;case"ds-icon":if(!customElements.get(o(s))){M()}break;case"ds-loader":if(!customElements.get(o(s))){L()}break;case"ds-menu":if(!customElements.get(o(s))){T()}break;case"ds-mobile-bar-nav":if(!customElements.get(o(s))){B()}break;case"ds-mobile-header":if(!customElements.get(o(s))){E()}break;case"ds-mobile-section-switcher":if(!customElements.get(o(s))){A()}break;case"ds-mobile-sheet-nav":if(!customElements.get(o(s))){P()}break;case"ds-panel-nav":if(!customElements.get(o(s))){j()}break;case"ds-panel-tool-header":if(!customElements.get(o(s))){z()}break;case"ds-panel-tools":if(!customElements.get(o(s))){l()}break;case"ds-shell-page":if(!customElements.get(o(s))){N()}break;case"ds-shell-tools":if(!customElements.get(o(s))){I()}break;case"ds-swatch-picker":if(!customElements.get(o(s))){$()}break;case"ds-switch":if(!customElements.get(o(s))){F()}break;case"ds-tab-group":if(!customElements.get(o(s))){O()}break;case"ds-text":if(!customElements.get(o(s))){G()}break;case"ds-tooltip":if(!customElements.get(o(s))){U()}break}}))}ws();const ys=_s;const ks=ws;export{ys as DsShellApp,ks as defineCustomElement};
2
2
  //# sourceMappingURL=ds-shell-app.js.map