@ds-mo/ui 13.9.0 → 13.11.0

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.
Files changed (172) hide show
  1. package/dist/.package-ready.json +1 -1
  2. package/dist/agent-patterns.json +4 -4
  3. package/dist/agent.json +16 -8
  4. package/dist/angular/ds-mobile-bar-nav.d.ts +1 -1
  5. package/dist/angular/ds-mobile-bar-nav.js +3 -3
  6. package/dist/components/ds-agent-activity.js +1 -1
  7. package/dist/components/ds-agent-response.js +1 -1
  8. package/dist/components/ds-agent-source-list.js +1 -1
  9. package/dist/components/ds-agent-tool-call.js +1 -1
  10. package/dist/components/ds-attachment-list.js +1 -1
  11. package/dist/components/ds-avatar.js +1 -1
  12. package/dist/components/ds-banner.js +1 -1
  13. package/dist/components/ds-bar-nav.js +1 -1
  14. package/dist/components/ds-bar-title.js +1 -1
  15. package/dist/components/ds-bar-workflow.js +1 -1
  16. package/dist/components/ds-button-filled.js +1 -1
  17. package/dist/components/ds-button-unfilled.js +1 -1
  18. package/dist/components/ds-card-chart.js +1 -1
  19. package/dist/components/ds-card-overview.js +1 -1
  20. package/dist/components/ds-card-overview.js.map +1 -1
  21. package/dist/components/ds-card-setting.js +1 -1
  22. package/dist/components/ds-chip.js +1 -1
  23. package/dist/components/ds-code-block.js +1 -1
  24. package/dist/components/ds-empty-state.js +1 -1
  25. package/dist/components/ds-icon.js +1 -1
  26. package/dist/components/ds-input.js +1 -1
  27. package/dist/components/ds-markdown.js +1 -1
  28. package/dist/components/ds-message-actions.js +1 -1
  29. package/dist/components/ds-message-composer.js +1 -1
  30. package/dist/components/ds-message-scroller.js +1 -1
  31. package/dist/components/ds-mobile-bar-nav.js +1 -1
  32. package/dist/components/ds-mobile-sheet-nav.js +1 -1
  33. package/dist/components/ds-modal.js +1 -1
  34. package/dist/components/ds-panel-nav.js +1 -1
  35. package/dist/components/ds-panel-tool-header.js +1 -1
  36. package/dist/components/ds-panel-tool-search.js +1 -1
  37. package/dist/components/ds-panel-tools.js +1 -1
  38. package/dist/components/ds-select.js +1 -1
  39. package/dist/components/ds-shell-app.js +1 -1
  40. package/dist/components/ds-shell-app.js.map +1 -1
  41. package/dist/components/ds-shell-tools.js +1 -1
  42. package/dist/components/ds-tab-group.js +1 -1
  43. package/dist/components/ds-tag.js +1 -1
  44. package/dist/components/ds-toast.js +1 -1
  45. package/dist/components/index.js +1 -1
  46. package/dist/components/index.js.map +1 -1
  47. package/dist/components/{p-BtS5na9O.js → p-BRajO-Za.js} +2 -2
  48. package/dist/components/{p-BQDi0v_h.js → p-BX57q1Lo.js} +2 -2
  49. package/dist/components/{p-BkWhTEqe.js → p-B_nHX-BW.js} +2 -2
  50. package/dist/components/{p-Dv8_hmUZ.js → p-C5gZHZHU.js} +2 -2
  51. package/dist/components/{p-HIg1XX62.js → p-CIlO_j3q.js} +2 -2
  52. package/dist/components/p-CIlO_j3q.js.map +1 -0
  53. package/dist/components/{p-CnbrksLl.js → p-CVmtbj-6.js} +2 -2
  54. package/dist/components/{p-BjoyHNaM.js → p-CdFnvBem.js} +2 -2
  55. package/dist/components/{p-BP-EtYbR.js → p-DAbaMtEX.js} +2 -2
  56. package/dist/components/{p-KFHFBznh.js → p-DBJJiSP0.js} +2 -2
  57. package/dist/components/{p-D8qgVmHn.js → p-DBchq8Zw.js} +2 -2
  58. package/dist/components/{p-BYB0f1_F.js → p-DCN04sgt.js} +2 -2
  59. package/dist/components/{p-D2dQyoyK.js → p-DGkWMhHO.js} +2 -2
  60. package/dist/components/{p-2inC7Jm-.js → p-DJGdoPMG.js} +2 -2
  61. package/dist/components/p-DNpE0RBz.js +2 -0
  62. package/dist/components/p-DNpE0RBz.js.map +1 -0
  63. package/dist/components/{p-BjIYFiuQ.js → p-DcmqsAMP.js} +2 -2
  64. package/dist/components/p-DkhE3BsH.js +2 -0
  65. package/dist/components/p-DkhE3BsH.js.map +1 -0
  66. package/dist/components/{p-B4VlfBNc.js → p-Doz2uwRv.js} +2 -2
  67. package/dist/components/p-DumWT7NN.js +2 -0
  68. package/dist/components/p-DumWT7NN.js.map +1 -0
  69. package/dist/components/{p-Cog5NTLa.js → p-Xftomzsv.js} +2 -2
  70. package/dist/components/{p-DJ0XMH9E.js → p-c1pY-Mqq.js} +2 -2
  71. package/dist/docs/components.json +76 -10
  72. package/dist/lib/components/PanelTools/panel-tools-types.d.ts +3 -3
  73. package/dist/lib/shell/index.js +12 -11
  74. package/dist/lib/shell/index.js.map +2 -2
  75. package/dist/lib/shell/shell-responsive.d.ts +1 -1
  76. package/dist/mcp-data/registry/agent-activity.json +1 -1
  77. package/dist/mcp-data/registry/agent-response.json +1 -1
  78. package/dist/mcp-data/registry/agent-source-list.json +1 -1
  79. package/dist/mcp-data/registry/agent-tool-call.json +1 -1
  80. package/dist/mcp-data/registry/attachment-list.json +1 -1
  81. package/dist/mcp-data/registry/avatar.json +1 -1
  82. package/dist/mcp-data/registry/badge.json +1 -1
  83. package/dist/mcp-data/registry/banner.json +1 -1
  84. package/dist/mcp-data/registry/bar-nav.json +1 -1
  85. package/dist/mcp-data/registry/bar-title.json +1 -1
  86. package/dist/mcp-data/registry/bar-workflow.json +1 -1
  87. package/dist/mcp-data/registry/breadcrumb.json +1 -1
  88. package/dist/mcp-data/registry/button-filled.json +1 -1
  89. package/dist/mcp-data/registry/button-unfilled.json +1 -1
  90. package/dist/mcp-data/registry/card-chart.json +1 -1
  91. package/dist/mcp-data/registry/card-overview.json +7 -7
  92. package/dist/mcp-data/registry/card-setting.json +1 -1
  93. package/dist/mcp-data/registry/chart-legend.json +1 -1
  94. package/dist/mcp-data/registry/chart.json +1 -1
  95. package/dist/mcp-data/registry/checkbox.json +1 -1
  96. package/dist/mcp-data/registry/chip.json +1 -1
  97. package/dist/mcp-data/registry/code-block.json +1 -1
  98. package/dist/mcp-data/registry/conversation-list-item.json +1 -1
  99. package/dist/mcp-data/registry/conversation-list-section.json +1 -1
  100. package/dist/mcp-data/registry/conversation-list.json +1 -1
  101. package/dist/mcp-data/registry/divider.json +1 -1
  102. package/dist/mcp-data/registry/empty-state.json +1 -1
  103. package/dist/mcp-data/registry/field.json +1 -1
  104. package/dist/mcp-data/registry/icon.json +2 -2
  105. package/dist/mcp-data/registry/input.json +1 -1
  106. package/dist/mcp-data/registry/loader.json +1 -1
  107. package/dist/mcp-data/registry/markdown.json +1 -1
  108. package/dist/mcp-data/registry/menu.json +1 -1
  109. package/dist/mcp-data/registry/message-actions.json +1 -1
  110. package/dist/mcp-data/registry/message-bubble.json +1 -1
  111. package/dist/mcp-data/registry/message-composer.json +1 -1
  112. package/dist/mcp-data/registry/message-scroller.json +1 -1
  113. package/dist/mcp-data/registry/message.json +1 -1
  114. package/dist/mcp-data/registry/mobile-bar-nav.json +39 -7
  115. package/dist/mcp-data/registry/mobile-header.json +1 -1
  116. package/dist/mcp-data/registry/mobile-section-switcher.json +1 -1
  117. package/dist/mcp-data/registry/mobile-sheet-nav.json +1 -1
  118. package/dist/mcp-data/registry/modal.json +1 -1
  119. package/dist/mcp-data/registry/panel-nav.json +1 -1
  120. package/dist/mcp-data/registry/panel-sub-nav.json +1 -1
  121. package/dist/mcp-data/registry/panel-tool-header.json +1 -1
  122. package/dist/mcp-data/registry/panel-tool-search.json +1 -1
  123. package/dist/mcp-data/registry/panel-tools.json +3 -3
  124. package/dist/mcp-data/registry/radio.json +1 -1
  125. package/dist/mcp-data/registry/registry.json +16 -8
  126. package/dist/mcp-data/registry/scroll-overlay.json +1 -1
  127. package/dist/mcp-data/registry/select.json +1 -1
  128. package/dist/mcp-data/registry/shell-app.json +4 -4
  129. package/dist/mcp-data/registry/shell-page.json +1 -1
  130. package/dist/mcp-data/registry/shell-tools.json +4 -4
  131. package/dist/mcp-data/registry/skeleton.json +1 -1
  132. package/dist/mcp-data/registry/slider.json +1 -1
  133. package/dist/mcp-data/registry/swatch-picker.json +1 -1
  134. package/dist/mcp-data/registry/switch.json +1 -1
  135. package/dist/mcp-data/registry/tab-group.json +1 -1
  136. package/dist/mcp-data/registry/tag.json +1 -1
  137. package/dist/mcp-data/registry/text.json +1 -1
  138. package/dist/mcp-data/registry/toast.json +1 -1
  139. package/dist/mcp-data/registry/tooltip-chart.json +1 -1
  140. package/dist/mcp-data/registry/tooltip.json +1 -1
  141. package/dist/mcp-data/registry/typing-indicator.json +1 -1
  142. package/dist/types/components/CardOverview/CardOverview.d.ts +2 -0
  143. package/dist/types/components/CardOverview/card-overview-controller.d.ts +15 -4
  144. package/dist/types/components/CardOverview/card-overview-types.d.ts +0 -2
  145. package/dist/types/components/MobileBarNav/MobileBarNav.d.ts +4 -2
  146. package/dist/types/components/PanelTools/panel-tools-types.d.ts +3 -3
  147. package/dist/types/components.d.ts +22 -4
  148. package/dist/types/shell/shell-responsive.d.ts +1 -1
  149. package/package.json +6 -5
  150. package/dist/components/p-B16OuqyJ.js +0 -2
  151. package/dist/components/p-B16OuqyJ.js.map +0 -1
  152. package/dist/components/p-BAfG3M8z.js +0 -2
  153. package/dist/components/p-BAfG3M8z.js.map +0 -1
  154. package/dist/components/p-BnQXAbif.js +0 -2
  155. package/dist/components/p-BnQXAbif.js.map +0 -1
  156. package/dist/components/p-HIg1XX62.js.map +0 -1
  157. /package/dist/components/{p-BtS5na9O.js.map → p-BRajO-Za.js.map} +0 -0
  158. /package/dist/components/{p-BQDi0v_h.js.map → p-BX57q1Lo.js.map} +0 -0
  159. /package/dist/components/{p-BkWhTEqe.js.map → p-B_nHX-BW.js.map} +0 -0
  160. /package/dist/components/{p-Dv8_hmUZ.js.map → p-C5gZHZHU.js.map} +0 -0
  161. /package/dist/components/{p-CnbrksLl.js.map → p-CVmtbj-6.js.map} +0 -0
  162. /package/dist/components/{p-BjoyHNaM.js.map → p-CdFnvBem.js.map} +0 -0
  163. /package/dist/components/{p-BP-EtYbR.js.map → p-DAbaMtEX.js.map} +0 -0
  164. /package/dist/components/{p-KFHFBznh.js.map → p-DBJJiSP0.js.map} +0 -0
  165. /package/dist/components/{p-D8qgVmHn.js.map → p-DBchq8Zw.js.map} +0 -0
  166. /package/dist/components/{p-BYB0f1_F.js.map → p-DCN04sgt.js.map} +0 -0
  167. /package/dist/components/{p-D2dQyoyK.js.map → p-DGkWMhHO.js.map} +0 -0
  168. /package/dist/components/{p-2inC7Jm-.js.map → p-DJGdoPMG.js.map} +0 -0
  169. /package/dist/components/{p-BjIYFiuQ.js.map → p-DcmqsAMP.js.map} +0 -0
  170. /package/dist/components/{p-B4VlfBNc.js.map → p-Doz2uwRv.js.map} +0 -0
  171. /package/dist/components/{p-Cog5NTLa.js.map → p-Xftomzsv.js.map} +0 -0
  172. /package/dist/components/{p-DJ0XMH9E.js.map → p-c1pY-Mqq.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{p as t,H as s,c as i,h as e,a as o,t as n}from"./index.js";import{c as a}from"./p-BX0BMhgz.js";import{d as r}from"./p-DwKC_9u2.js";import{d as c}from"./p-DJ0XMH9E.js";import{d as h}from"./p-BAfG3M8z.js";import{d}from"./p-Ca-I2UnB.js";import{d as l}from"./p-BNiIyZCn.js";import{T as f,r as u,a as m}from"./p-CXduurfd.js";import{r as p}from"./p-BJMRBHKW.js";function v(t,s){const i=typeof t==="function"?t(s):t;return typeof i==="string"?{description:i}:i}class g{constructor(){this.records=[];this.listeners=new Set;this.nextId=0}add(t){const s=t.id||`ds-toast-${++this.nextId}`;const i=this.records.findIndex((t=>t.id===s));if(!t.title?.trim()&&!t.description?.trim()){console.warn(`[ds-toast] Toast "${s}" should provide a title or description.`)}if(i>=0){const e=this.records[i];const o={...e,...t,id:s,priority:t.priority??e.priority,transitionStatus:"active",closeReason:undefined,updateKey:e.updateKey+1,timerKey:e.timerKey+1};this.records=[o,...this.records.filter(((t,s)=>s!==i))];this.emit();return s}const e={...t,id:s,priority:t.priority??"low",transitionStatus:"starting",updateKey:0,timerKey:0};this.records=[e,...this.records];this.emit();return s}update(t,s){const i=this.records.findIndex((s=>s.id===t));if(i<0)return;const e=this.records[i];const o=Object.prototype.hasOwnProperty.call(s,"timeout")||e.type==="loading"&&s.type!==undefined&&s.type!=="loading";const n={...e,...s,id:t,priority:s.priority??e.priority,updateKey:e.updateKey+1,timerKey:o?e.timerKey+1:e.timerKey};this.records=this.records.map(((t,s)=>s===i?n:t));this.emit()}close(t,s="programmatic"){const i=this.records.findIndex((s=>s.id===t));if(i<0||this.records[i].transitionStatus==="ending")return;const e={...this.records[i],transitionStatus:"ending",closeReason:s};this.records=this.records.map(((t,s)=>s===i?e:t));this.emit();e.onClose?.({id:t,reason:s,toast:e})}closeAll(t="programmatic"){for(const s of[...this.records])this.close(s.id,t)}async promise(t,s){const i=v(s.loading,undefined);const e=this.add({...i,type:i.type??"loading",timeout:0});try{const i=await t;const o=v(s.success,i);this.update(e,{...o,type:o.type??"success",timeout:o.timeout});return i}catch(t){const i=v(s.error,t);this.update(e,{...i,type:i.type??"error",timeout:i.timeout});throw t}}subscribe(t){this.listeners.add(t);t(this.getSnapshot());return()=>{this.listeners.delete(t)}}getSnapshot(){return this.records.map((t=>({...t})))}activate(t){const s=this.records.find((s=>s.id===t));if(!s||s.transitionStatus!=="starting")return;this.records=this.records.map((s=>s.id===t?{...s,transitionStatus:"active"}:s));this.emit()}remove(t){const s=this.records.find((s=>s.id===t));if(!s||s.transitionStatus!=="ending")return null;const i=s.closeReason??"programmatic";this.records=this.records.filter((s=>s.id!==t));this.emit();const e={id:t,reason:i,toast:s};return e}notifyRemove(t){const{toast:s}=t;s.onRemove?.(t)}emit(){const t=this.getSnapshot();for(const s of this.listeners)s(t)}}function w(){return new g}const y=Symbol.for("@ds-mo/ui/default-toast-manager");const b=globalThis;const x=b[y];const M=x??w();if(!x)b[y]=M;const T=()=>`.ds-visually-hidden.sc-ds-toast-h,.ds-visually-hidden.sc-ds-toast{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}@media (forced-colors: active){.sc-ds-toast:root,.sc-ds-toast-h,.ds-forced-colors-scope.sc-ds-toast{--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-toast-h{display:contents}.toast-region.sc-ds-toast{position:fixed;inset:0;z-index:var(--dimension-z-index-floating);pointer-events:none;outline:none}.toast-viewport.sc-ds-toast{position:absolute;right:var(--dimension-space-200);bottom:var(--dimension-space-200);display:grid;width:min( var(--dimension-card-width-sm), calc(100vw - 2 * var(--dimension-space-200)) )}@media (max-width: 767px){[avoid-mobile-shell-bar].sc-ds-toast-h .toast-viewport.sc-ds-toast{bottom:calc( var(--dimension-space-200) + var(--dimension-stroke-width-012) + var(--dimension-space-100) + var(--dimension-size-500) + max(var(--dimension-space-100), env(safe-area-inset-bottom)) )}}.toast-positioner.sc-ds-toast{grid-area:1 / 1;align-self:end;justify-self:center;width:100%;pointer-events:auto;transform:translateY( calc(-1 * var(--toast-index) * var(--dimension-space-100)) );transition:transform var(--effect-motion-short-3), width var(--effect-motion-short-3)}.toast-viewport.sc-ds-toast:not([data-expanded]) .toast-positioner.sc-ds-toast{width:calc( 100% - 2 * var(--toast-index) * var(--dimension-space-100) )}.toast-viewport[data-expanded].sc-ds-toast .toast-positioner.sc-ds-toast{transform:translateY(calc(-1 * var(--toast-offset-y)))}.toast-positioner[data-limited].sc-ds-toast{visibility:hidden;pointer-events:none}.toast-positioner--anchored.sc-ds-toast{position:fixed;width:min( var(--dimension-card-width-sm), calc(100vw - 2 * var(--dimension-space-200)) );transform:none}.toast-positioner--anchored[data-positioned='false'].sc-ds-toast{visibility:hidden}.toast-surface.sc-ds-toast{position:relative;display:block;box-sizing:border-box;width:100%;height:var(--toast-height, auto);padding:var(--dimension-space-200);overflow:hidden;color:var(--color-foreground-primary);background-color:var(--color-background-primary);border-radius:var(--dimension-radius-050);box-shadow:var(--effect-elevation-elevated-floating);transform:translate( var(--toast-swipe-movement-x), var(--toast-swipe-movement-y) );animation:toast-enter var(--effect-motion-short-2) both}.toast-positioner--ending.sc-ds-toast .toast-surface.sc-ds-toast{animation:toast-exit var(--effect-motion-short-3) both}.toast-surface--swiping.sc-ds-toast{transition:none;user-select:none}.toast-content.sc-ds-toast{display:flex;flex-direction:column;min-width:0;padding-inline-end:var(--dimension-size-500);transition:opacity var(--effect-motion-short-3)}.toast-copy.sc-ds-toast{display:flex;flex-direction:column;min-width:0;min-height:var(--typography-lineheight-md);margin-block:calc(-1 * var(--dimension-space-025));gap:var(--dimension-space-050)}.toast-title.sc-ds-toast,.toast-description.sc-ds-toast{min-width:0}.toast-action.sc-ds-toast{align-self:start;margin-top:calc( var(--dimension-space-200) + var(--dimension-space-025) )}.toast-close.sc-ds-toast{position:absolute;top:var(--dimension-space-100);right:var(--dimension-space-100);transition:opacity var(--effect-motion-short-3)}.toast-viewport.sc-ds-toast:not([data-expanded]) .toast-positioner[data-behind].sc-ds-toast .toast-content.sc-ds-toast,.toast-viewport.sc-ds-toast:not([data-expanded]) .toast-positioner[data-behind].sc-ds-toast .toast-close.sc-ds-toast{opacity:0}@keyframes toast-enter{from{opacity:0;transform:translateY(var(--dimension-space-100))}to{opacity:1;transform:translateY(0)}}@keyframes toast-exit{from{opacity:1}to{opacity:0}}@media (prefers-reduced-motion: reduce){.toast-positioner.sc-ds-toast,.toast-surface.sc-ds-toast,.toast-content.sc-ds-toast,.toast-close.sc-ds-toast,.toast-positioner--ending.sc-ds-toast .toast-surface.sc-ds-toast{transition:none;animation:none}.toast-positioner--ending.sc-ds-toast .toast-surface.sc-ds-toast{opacity:0}}@media (forced-colors: active){.toast-surface.sc-ds-toast{box-shadow:none;outline:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);outline-offset:calc(-1 * var(--dimension-stroke-width-012))}}`;const k=40;const A=10;const C="__global-stack__";const P='button,a,input,textarea,select,[role="button"],[data-ds-toast-swipe-ignore]';const S=new WeakMap;const E=new Set;let F=null;let D=0;const z=t(class t extends s{constructor(t){super();if(t!==false){this.__registerHost()}this.dsToastClose=i(this,"dsToastClose");this.dsToastRemove=i(this,"dsToastRemove");this.dsToastAction=i(this,"dsToastAction");this.manager=M;this.limit=3;this.timeout=f.animationDelayLong2;this.label="Notifications";this.closeLabel="Close notification";this.avoidMobileShellBar=false;this.swipeDirections=["down","right"];this.records=[];this.expanded=false;this.keyboardActive=false;this.swipe=null;this.layoutVersion=0;this.instanceId=++D;this.domIds=new Map;this.timers=new Map;this.closeWatchdogs=new Map;this.closeFrames=new Map;this.closeEvents=new Set;this.activationFrames=new Map;this.pauseReasons=new Set;this.hoveredIds=new Set;this.heights=new Map;this.measuredUpdateKeys=new Map;this.anchoredPositions=new Map;this.dismissedSwipeDirections=new Map;this.observedElements=new Set;this.pendingRemovals=[];this.unsubscribe=null;this.attachedManager=null;this.previousFocus=null;this.resizeObserver=null;this.mutationObserver=null;this.layoutFrame=null;this.activeSwipe=null;this.nextDomId=0;this.connected=false;this.pendingHoverLeave=false;this.handleWindowBlur=()=>this.pauseTimers("window");this.handleWindowFocus=()=>this.resumeTimers("window");this.handleVisibilityChange=()=>{if(document.hidden)this.pauseTimers("document");else this.resumeTimers("document")};this.handleFocusIn=()=>{const t=document.activeElement;if(!(t instanceof s)||!t.matches(":focus-visible"))return;F=this;this.keyboardActive=true;this.expanded=true;this.pauseTimers("focus")};this.handleFocusOut=t=>{const s=t.relatedTarget;if(s instanceof Node&&this.el.contains(s))return;if(!this.keyboardActive)return;this.keyboardActive=false;this.expanded=this.hoveredIds.size>0;this.resumeTimers("focus")};this.handleDocumentKeyDown=t=>{if(t.key!=="F6")return;const s=Array.from(E).filter((t=>t.activeRecords.length>0));const i=F&&F.activeRecords.length?F:s[s.length-1];if(i!==this)return;t.preventDefault();if(!this.el.contains(document.activeElement)){this.previousFocus=document.activeElement}this.keyboardActive=true;this.regionElement?.focus()};this.handleRegionKeyDown=t=>{if(t.key==="Escape"){const s=t.target;const i=s.closest(".toast-positioner");const e=i?.dataset["toastId"]??this.activeRecords[0]?.id;if(e){t.preventDefault();this.manager.close(e,"escape")}return}if(t.key==="Tab"&&t.shiftKey&&t.target===this.regionElement){t.preventDefault();this.restorePreviousFocus()}};this.handleWindowResize=()=>{this.heights.clear();this.measuredUpdateKeys.clear();this.layoutVersion+=1;this.scheduleLayout()};this.scheduleLayout=()=>{if(this.layoutFrame!==null)return;this.layoutFrame=requestAnimationFrame((()=>{this.layoutFrame=null;this.measureLayout()}))}}connectedCallback(){this.connect()}componentDidLoad(){this.connect()}connect(){if(this.connected)return;this.connected=true;this.resizeObserver??(this.resizeObserver=new ResizeObserver((()=>this.scheduleLayout())));this.mutationObserver??(this.mutationObserver=new MutationObserver((()=>this.scheduleLayout())));this.mutationObserver.observe(document.body,{childList:true,subtree:true});if(!this.unsubscribe)this.attachManager(this.manager);window.addEventListener("blur",this.handleWindowBlur);window.addEventListener("focus",this.handleWindowFocus);window.addEventListener("resize",this.handleWindowResize);window.addEventListener("scroll",this.scheduleLayout,true);document.addEventListener("keydown",this.handleDocumentKeyDown);document.addEventListener("visibilitychange",this.handleVisibilityChange);E.add(this);if(!F)F=this}componentDidRender(){this.syncObservedElements();this.flushPendingRemovals();this.scheduleLayout()}disconnectedCallback(){this.connected=false;this.flushPendingRemovals();this.detachManager();this.resetManagerState();this.resizeObserver?.disconnect();this.resizeObserver=null;this.mutationObserver?.disconnect();this.mutationObserver=null;this.observedElements.clear();if(this.layoutFrame!==null)cancelAnimationFrame(this.layoutFrame);this.layoutFrame=null;window.removeEventListener("blur",this.handleWindowBlur);window.removeEventListener("focus",this.handleWindowFocus);window.removeEventListener("resize",this.handleWindowResize);window.removeEventListener("scroll",this.scheduleLayout,true);document.removeEventListener("keydown",this.handleDocumentKeyDown);document.removeEventListener("visibilitychange",this.handleVisibilityChange);E.delete(this);if(F===this){const t=Array.from(E);F=t[t.length-1]??null}}onManagerChange(t){this.detachManager();this.resetManagerState();if(this.connected)this.attachManager(t)}onTimeoutChange(){for(const t of this.timers.values()){if(t.handle)clearTimeout(t.handle)}this.timers.clear();this.syncTimers()}attachManager(t){const s=S.get(t);if(s&&s!==this){console.warn("[ds-toast] A manager can control only one connected ds-toast instance.");return}S.set(t,this);this.attachedManager=t;this.unsubscribe=t.subscribe((t=>{this.records=t;this.syncLifecycle(t);this.scheduleLayout()}))}detachManager(){this.unsubscribe?.();this.unsubscribe=null;if(this.attachedManager&&S.get(this.attachedManager)===this){S.delete(this.attachedManager)}this.attachedManager=null}resetManagerState(){this.flushPendingRemovals();if(this.el.contains(document.activeElement))this.restorePreviousFocus();this.clearAllTimers();for(const t of this.activationFrames.values())cancelAnimationFrame(t);for(const t of this.closeFrames.values())cancelAnimationFrame(t);this.activationFrames.clear();this.closeFrames.clear();this.closeEvents.clear();this.pauseReasons.clear();this.hoveredIds.clear();this.pendingHoverLeave=false;this.heights.clear();this.measuredUpdateKeys.clear();this.anchoredPositions.clear();this.dismissedSwipeDirections.clear();this.domIds.clear();this.activeSwipe=null;this.swipe=null;this.expanded=false;this.keyboardActive=false;this.records=[];this.resizeObserver?.disconnect();this.observedElements.clear()}syncObservedElements(){const t=new Set(this.el.querySelectorAll(".toast-positioner"));for(const s of this.records){if(!s.positioner)continue;const i=this.resolveAnchor(s.positioner.anchor);if(i)t.add(i)}for(const s of this.observedElements){if(!t.has(s)){this.resizeObserver?.unobserve(s);this.observedElements.delete(s)}}for(const s of t){if(this.observedElements.has(s))continue;this.resizeObserver?.observe(s);this.observedElements.add(s)}}flushPendingRemovals(){for(const t of this.pendingRemovals.splice(0)){t.manager.notifyRemove(t.context);this.dsToastRemove.emit({id:t.context.id,toast:t.context.toast})}}syncLifecycle(t){const s=new Set(t.map((t=>t.id)));for(const t of this.hoveredIds){if(t!==C&&!s.has(t))this.hoveredIds.delete(t)}const i=t.some((t=>t.transitionStatus==="ending"));if(this.pendingHoverLeave&&!i&&!this.hoveredIds.size){this.pendingHoverLeave=false;this.expanded=false;this.resumeTimers("hover")}else if(!this.hoveredIds.size&&!this.pendingHoverLeave){this.resumeTimers("hover")}for(const[t,i]of this.timers){if(s.has(t))continue;if(i.handle)clearTimeout(i.handle);this.timers.delete(t)}for(const[t,i]of this.closeWatchdogs){if(s.has(t))continue;clearTimeout(i);this.closeWatchdogs.delete(t)}for(const[t,i]of this.activationFrames){if(s.has(t))continue;cancelAnimationFrame(i);this.activationFrames.delete(t)}for(const[t,i]of this.closeFrames){if(s.has(t))continue;cancelAnimationFrame(i);this.closeFrames.delete(t)}for(const t of this.domIds.keys()){if(s.has(t))continue;this.closeEvents.delete(t);this.domIds.delete(t);this.heights.delete(t);this.measuredUpdateKeys.delete(t);this.anchoredPositions.delete(t);this.dismissedSwipeDirections.delete(t)}for(const s of t){this.ensureDomId(s.id);if(s.transitionStatus==="starting"&&!this.activationFrames.has(s.id)){const t=this.attachedManager;const i=requestAnimationFrame((()=>{this.activationFrames.delete(s.id);t?.activate(s.id)}));this.activationFrames.set(s.id,i)}if(s.transitionStatus==="ending"){this.clearToastTimer(s.id);this.beginRemoval(s)}else{const t=this.closeWatchdogs.get(s.id);if(t)clearTimeout(t);this.closeWatchdogs.delete(s.id);const i=this.closeFrames.get(s.id);if(i)cancelAnimationFrame(i);this.closeFrames.delete(s.id);this.closeEvents.delete(s.id)}}this.syncTimers()}syncTimers(){const t=new Set;for(const s of this.records){if(s.transitionStatus!=="active")continue;t.add(s.id);const i=this.resolveToastTimeout(s);if(i<=0){this.clearToastTimer(s.id);continue}const e=this.timers.get(s.id);if(!e||e.timerKey!==s.timerKey){this.clearToastTimer(s.id);this.timers.set(s.id,{timerKey:s.timerKey,remaining:i,startedAt:0,handle:null})}if(!this.isPaused)this.startToastTimer(s.id)}for(const s of this.timers.keys()){if(!t.has(s))this.clearToastTimer(s)}}resolveToastTimeout(t){const s=t.timeout??this.timeout;if(typeof s==="number")return Math.max(0,s);return u(s,f.animationDelayLong2)}startToastTimer(t){const s=this.timers.get(t);if(!s||s.handle||s.remaining<=0)return;s.startedAt=Date.now();s.handle=setTimeout((()=>{s.handle=null;s.remaining=0;this.manager.close(t,"timeout")}),s.remaining)}pauseTimers(t){const s=this.isPaused;this.pauseReasons.add(t);if(s)return;const i=Date.now();for(const t of this.timers.values()){if(!t.handle)continue;clearTimeout(t.handle);t.handle=null;t.remaining=Math.max(0,t.remaining-(i-t.startedAt))}}resumeTimers(t){this.pauseReasons.delete(t);if(this.isPaused)return;for(const t of this.timers.keys())this.startToastTimer(t)}get isPaused(){return this.pauseReasons.size>0}clearToastTimer(t){const s=this.timers.get(t);if(s?.handle)clearTimeout(s.handle);this.timers.delete(t)}clearAllTimers(){for(const t of this.timers.values()){if(t.handle)clearTimeout(t.handle)}for(const t of this.closeWatchdogs.values())clearTimeout(t);this.timers.clear();this.closeWatchdogs.clear()}beginRemoval(t){if(!this.closeEvents.has(t.id)){this.closeEvents.add(t.id);this.dsToastClose.emit({id:t.id,reason:t.closeReason??"programmatic",toast:t});this.moveFocusAfterClose(t.id)}if(this.closeWatchdogs.has(t.id)||this.closeFrames.has(t.id))return;const s=m(f.motionShort3,f.animationDurationShort3);if(s<=0){queueMicrotask((()=>this.completeRemoval(t)));return}const i=requestAnimationFrame((()=>{this.closeFrames.delete(t.id);const i=this.records.find((s=>s.id===t.id));if(!i||i.transitionStatus!=="ending")return;this.closeWatchdogs.set(t.id,setTimeout((()=>this.completeRemoval(i)),s))}));this.closeFrames.set(t.id,i)}completeRemoval(t){const s=this.records.find((s=>s.id===t.id));if(!s||s.transitionStatus!=="ending")return;const i=this.closeWatchdogs.get(t.id);if(i)clearTimeout(i);this.closeWatchdogs.delete(t.id);const e=this.closeFrames.get(t.id);if(e)cancelAnimationFrame(e);this.closeFrames.delete(t.id);const o=this.attachedManager;const n=o?.remove(t.id);if(o&&n)this.pendingRemovals.push({manager:o,context:n})}handleAnimationComplete(t){if(t.transitionStatus==="ending")this.completeRemoval(t)}bindAnimationCancel(t,s){if(!t||t.dataset["cancelBound"]==="true")return;t.dataset["cancelBound"]="true";t.addEventListener("animationcancel",(()=>{const t=this.records.find((t=>t.id===s));if(t)this.handleAnimationComplete(t)}))}handlePointerEnter(t){F=this;this.pendingHoverLeave=false;this.hoveredIds.add(t);this.expanded=true;this.pauseTimers("hover")}handlePointerLeave(t){this.hoveredIds.delete(t);if(this.hoveredIds.size)return;if(this.records.some((t=>t.transitionStatus==="ending"))){this.pendingHoverLeave=true;return}this.expanded=false;this.resumeTimers("hover")}get regionElement(){return this.el.querySelector(".toast-region")}restorePreviousFocus(){this.previousFocus?.focus?.();this.previousFocus=null;this.keyboardActive=false}moveFocusAfterClose(t){const s=document.activeElement;const i=this.positionerElement(t);if(!s||!i?.contains(s))return;requestAnimationFrame((()=>{const s=this.activeRecords.find((s=>s.id!==t));const i=s?this.positionerElement(s.id)?.querySelector("ds-button-unfilled"):null;if(i?.setFocus)void i.setFocus();else if(s)this.regionElement?.focus();else this.restorePreviousFocus()}))}handleAction(t,s){const i={id:t.id,toast:t,originalEvent:s.detail};this.dsToastAction.emit(i);t.action?.onAction?.({id:t.id,data:t.data,manager:this.manager,originalEvent:s.detail})}handlePointerDown(t,s){if(s.button!==0)return;const i=s.target;if(i.closest(P))return;const e=s.currentTarget;e.setPointerCapture(s.pointerId);this.activeSwipe={id:t.id,pointerId:s.pointerId,pointerType:s.pointerType,startX:s.clientX,startY:s.clientY,maxDistance:0,cancelled:false,axis:null};this.swipe={id:t.id,x:0,y:0};if(s.pointerType==="touch")this.pauseTimers("swipe")}handlePointerMove(t){const s=this.activeSwipe;if(!s||s.pointerId!==t.pointerId||s.cancelled)return;const i=t.clientX-s.startX;const e=t.clientY-s.startY;if(!s.axis&&Math.max(Math.abs(i),Math.abs(e))>1){s.axis=Math.abs(i)>=Math.abs(e)?"x":"y"}if(!s.axis)return;const o=s.axis==="x";const n=o?i>=0?"right":"left":e>=0?"down":"up";const a=this.swipeDirections.includes(n);const r=o?Math.abs(i):Math.abs(e);const c=a?r:Math.sqrt(r);const h=(o?i:e)<0?-c:c;const d=o?h:0;const l=o?0:h;if(s.maxDistance-c>=A){s.cancelled=true;this.cancelSwipe();return}s.maxDistance=Math.max(s.maxDistance,c);if(r>1)t.preventDefault();this.swipe={id:s.id,x:d,y:l,direction:a?n:undefined}}handlePointerUp(t){const s=this.activeSwipe;if(!s||s.pointerId!==t.pointerId)return;const i=this.swipe;const e=i?Math.max(Math.abs(i.x),Math.abs(i.y)):0;const o=!s.cancelled&&!!i?.direction&&e>=k;const n=s.id;const a=s.pointerType==="touch";this.activeSwipe=null;this.swipe=null;if(a)this.resumeTimers("swipe");if(o&&i.direction){this.dismissedSwipeDirections.set(n,i.direction);this.manager.close(n,"swipe")}}handlePointerCancel(t){if(this.activeSwipe?.pointerId!==t.pointerId)return;this.cancelSwipe()}cancelSwipe(){const t=this.activeSwipe?.pointerType==="touch";this.activeSwipe=null;this.swipe=null;if(t)this.resumeTimers("swipe")}get touchAction(){const t=this.swipeDirections.includes("left")||this.swipeDirections.includes("right");const s=this.swipeDirections.includes("up")||this.swipeDirections.includes("down");if(t&&s)return"none";if(t)return"pan-y";if(s)return"pan-x";return"auto"}measureNaturalHeight(t,s){const i=t.querySelector(".toast-surface");if(!i)return 0;const e=t.style.width;const o=t.style.transition;const n=i.style.height;if(s){t.style.transition="none";t.style.width="100%"}i.style.height="auto";const a=i.getBoundingClientRect().height;i.style.height=n;if(s){t.style.width=e;t.getBoundingClientRect();t.style.transition=o}return a}measureLayout(){let t=false;for(const s of this.records){const i=this.positionerElement(s.id);if(!i)continue;let e=this.heights.get(s.id)??0;const o=e<=0||this.measuredUpdateKeys.get(s.id)!==s.updateKey;if(o){e=this.measureNaturalHeight(i,!s.positioner);if(e>0){if(this.heights.get(s.id)!==e)t=true;this.heights.set(s.id,e);this.measuredUpdateKeys.set(s.id,s.updateKey)}}if(!s.positioner)continue;const n=this.resolveAnchor(s.positioner.anchor);if(!n||e<=0){if(this.anchoredPositions.delete(s.id))t=true;continue}const r=i.getBoundingClientRect();const c=p(s.positioner.sideOffset,f.space050);const h=p(s.positioner.alignOffset,0);const d=a({anchorRect:n.getBoundingClientRect(),popupWidth:r.width,popupHeight:e,side:s.positioner.side??"top",align:s.positioner.align??"center",sideOffsetPx:c,alignOffsetPx:h,viewportPadPx:p(undefined,f.space200),viewportWidth:window.innerWidth,viewportHeight:window.innerHeight});const l=this.anchoredPositions.get(s.id);if(!l||l.x!==d.x||l.y!==d.y||l.side!==d.resolvedSide){this.anchoredPositions.set(s.id,{x:d.x,y:d.y,side:d.resolvedSide});t=true}}if(t)this.layoutVersion+=1}resolveAnchor(t){return typeof t==="string"?document.getElementById(t):t}positionerElement(t){return Array.from(this.el.querySelectorAll(".toast-positioner")).find((s=>s.dataset["toastId"]===t))??null}ensureDomId(t){const s=this.domIds.get(t);if(s)return s;const i=++this.nextDomId;this.domIds.set(t,i);return i}get activeRecords(){return this.records.filter((t=>t.transitionStatus!=="ending"))}globalLayout(){const t=this.records.filter((t=>!t.positioner));let s=0;let i=0;const e=p(undefined,f.space200);const o=new Map;t.forEach(((t,n)=>{if(t.transitionStatus==="ending"){o.set(t.id,{index:n,offset:s,limited:false});return}const a=i>=Math.max(1,this.limit);o.set(t.id,{index:i,offset:s,limited:a});s+=(this.heights.get(t.id)??0)+e;i+=1}));return o}renderToast(t,s){const i=this.ensureDomId(t.id);const o=`ds-toast-${this.instanceId}-${i}-title`;const n=`ds-toast-${this.instanceId}-${i}-description`;const a=this.swipe?.id===t.id?this.swipe:null;const r=a?.direction??this.dismissedSwipeDirections.get(t.id);const c=!!t.positioner;const h=this.anchoredPositions.get(t.id);const d=t.priority==="high"&&!this.keyboardActive;const l=this.keyboardActive&&!s.limited?0:-1;const f=this.heights.get(t.id);return e("div",{ref:s=>this.bindAnimationCancel(s,t.id),class:{"toast-positioner":true,"toast-positioner--anchored":c,"toast-positioner--ending":t.transitionStatus==="ending"},"data-toast-id":t.id,"data-behind":!c&&s.index>0?"":undefined,"data-limited":s.limited?"":undefined,"data-positioned":c?String(!!h):undefined,"data-side":h?.side,inert:s.limited?true:undefined,"aria-hidden":s.limited?"true":undefined,style:{"--toast-index":String(s.index),"--toast-offset-y":`${s.offset}px`,"--toast-height":f?`${f}px`:undefined,zIndex:String(this.records.length-s.index),left:h?`${h.x}px`:undefined,top:h?`${h.y}px`:undefined},onAnimationEnd:()=>this.handleAnimationComplete(t)},e("div",{class:{"toast-surface":true,"toast-surface--swiping":!!a},role:t.priority==="high"?"alertdialog":"dialog","aria-modal":"false","aria-labelledby":t.title?o:t.description?n:undefined,"aria-describedby":t.title&&t.description?n:undefined,"aria-hidden":d?"true":undefined,"data-type":t.type,"data-priority":t.priority,"data-transition-status":t.transitionStatus,"data-swiping":a?"":undefined,"data-swipe-direction":r,style:{"--toast-swipe-movement-x":`${a?.x??0}px`,"--toast-swipe-movement-y":`${a?.y??0}px`,touchAction:this.touchAction},onPointerDown:s=>this.handlePointerDown(t,s),onPointerMove:t=>this.handlePointerMove(t),onPointerUp:t=>this.handlePointerUp(t),onPointerCancel:t=>this.handlePointerCancel(t),onPointerEnter:c?()=>this.handlePointerEnter(t.id):undefined,onPointerLeave:c?()=>this.handlePointerLeave(t.id):undefined},e("div",{class:"toast-content"},e("div",{class:"toast-copy"},t.title&&e("ds-text",{class:"toast-title",as:"div",variant:"text-title-small",color:"primary",textId:o},t.title),t.description&&e("ds-text",{class:"toast-description",as:"div",variant:"text-body-medium",color:"secondary",textId:n},t.description)),t.action&&e("ds-button-unfilled",{class:"toast-action",variant:"label",size:"md",type:"button",label:t.action.label,"aria-label":t.action.ariaLabel,hasBorder:true,focusTabIndex:l,"aria-hidden":!this.keyboardActive?"true":undefined,onDsClick:s=>this.handleAction(t,s)})),e("ds-button-unfilled",{class:"toast-close",variant:"icon",size:"md",type:"button",icon:"Cross","aria-label":this.closeLabel,hasBorder:false,activeFill:false,focusTabIndex:l,"aria-hidden":!this.keyboardActive?"true":undefined,onDsClick:()=>this.manager.close(t.id,"close-button")})))}render(){const t=this.globalLayout();const s=this.records.filter((t=>!t.positioner));const i=this.records.filter((t=>!!t.positioner));const n=this.records.filter((s=>s.priority==="high"&&s.transitionStatus!=="ending"&&!t.get(s.id)?.limited));return e(o,{key:"c69a849189d301c570397b7c83b3674c9ed48c6f"},e("section",{key:"ca457339d10fa1328e3715597397acedfc80763a",class:"toast-region",role:"region","aria-label":this.label,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text",tabIndex:-1,onFocusin:this.handleFocusIn,onFocusout:t=>this.handleFocusOut(t),onKeyDown:t=>this.handleRegionKeyDown(t)},e("div",{key:"13fea8a8d32111d0de94c573596504483a916dc9",class:"toast-viewport","data-expanded":this.expanded?"":undefined,onPointerEnter:()=>this.handlePointerEnter(C),onPointerLeave:()=>this.handlePointerLeave(C)},s.map((s=>this.renderToast(s,t.get(s.id)??{index:0,offset:0,limited:false})))),e("div",{key:"4b4176f0ae1268dceb8ffc732cb5ca0e58ded045",class:"toast-anchored-layer"},i.map((t=>this.renderToast(t,{index:0,offset:0,limited:false})))),e("div",{key:"65a17f61c3cde1a22cae64732c6a259c2a9221c8",class:"toast-assertive-announcer ds-visually-hidden"},n.map((t=>e("div",{role:"alert","aria-atomic":"true"},[t.title,t.description].filter(Boolean).join(". ")))))))}get el(){return this}static get watchers(){return{manager:[{onManagerChange:0}],timeout:[{onTimeoutChange:0}]}}static get style(){return T()}},[2,"ds-toast",{manager:[16],limit:[2],timeout:[8],label:[1],closeLabel:[1,"close-label"],avoidMobileShellBar:[516,"avoid-mobile-shell-bar"],swipeDirections:[16],records:[32],expanded:[32],keyboardActive:[32],swipe:[32],layoutVersion:[32]},undefined,{manager:[{onManagerChange:0}],timeout:[{onTimeoutChange:0}]}]);function B(){if(typeof customElements==="undefined"){return}const t=["ds-toast","ds-badge","ds-button-unfilled","ds-icon","ds-loader","ds-text"];t.forEach((t=>{switch(t){case"ds-toast":if(!customElements.get(n(t))){customElements.define(n(t),z)}break;case"ds-badge":if(!customElements.get(n(t))){r()}break;case"ds-button-unfilled":if(!customElements.get(n(t))){c()}break;case"ds-icon":if(!customElements.get(n(t))){h()}break;case"ds-loader":if(!customElements.get(n(t))){d()}break;case"ds-text":if(!customElements.get(n(t))){l()}break}}))}B();const R=z;const $=B;export{R as DsToast,$ as defineCustomElement};
1
+ import{p as t,H as s,c as i,h as e,a as o,t as n}from"./index.js";import{c as a}from"./p-BX0BMhgz.js";import{d as r}from"./p-DwKC_9u2.js";import{d as c}from"./p-c1pY-Mqq.js";import{d as h}from"./p-DumWT7NN.js";import{d}from"./p-Ca-I2UnB.js";import{d as l}from"./p-BNiIyZCn.js";import{T as f,r as u,a as m}from"./p-CXduurfd.js";import{r as p}from"./p-BJMRBHKW.js";function v(t,s){const i=typeof t==="function"?t(s):t;return typeof i==="string"?{description:i}:i}class g{constructor(){this.records=[];this.listeners=new Set;this.nextId=0}add(t){const s=t.id||`ds-toast-${++this.nextId}`;const i=this.records.findIndex((t=>t.id===s));if(!t.title?.trim()&&!t.description?.trim()){console.warn(`[ds-toast] Toast "${s}" should provide a title or description.`)}if(i>=0){const e=this.records[i];const o={...e,...t,id:s,priority:t.priority??e.priority,transitionStatus:"active",closeReason:undefined,updateKey:e.updateKey+1,timerKey:e.timerKey+1};this.records=[o,...this.records.filter(((t,s)=>s!==i))];this.emit();return s}const e={...t,id:s,priority:t.priority??"low",transitionStatus:"starting",updateKey:0,timerKey:0};this.records=[e,...this.records];this.emit();return s}update(t,s){const i=this.records.findIndex((s=>s.id===t));if(i<0)return;const e=this.records[i];const o=Object.prototype.hasOwnProperty.call(s,"timeout")||e.type==="loading"&&s.type!==undefined&&s.type!=="loading";const n={...e,...s,id:t,priority:s.priority??e.priority,updateKey:e.updateKey+1,timerKey:o?e.timerKey+1:e.timerKey};this.records=this.records.map(((t,s)=>s===i?n:t));this.emit()}close(t,s="programmatic"){const i=this.records.findIndex((s=>s.id===t));if(i<0||this.records[i].transitionStatus==="ending")return;const e={...this.records[i],transitionStatus:"ending",closeReason:s};this.records=this.records.map(((t,s)=>s===i?e:t));this.emit();e.onClose?.({id:t,reason:s,toast:e})}closeAll(t="programmatic"){for(const s of[...this.records])this.close(s.id,t)}async promise(t,s){const i=v(s.loading,undefined);const e=this.add({...i,type:i.type??"loading",timeout:0});try{const i=await t;const o=v(s.success,i);this.update(e,{...o,type:o.type??"success",timeout:o.timeout});return i}catch(t){const i=v(s.error,t);this.update(e,{...i,type:i.type??"error",timeout:i.timeout});throw t}}subscribe(t){this.listeners.add(t);t(this.getSnapshot());return()=>{this.listeners.delete(t)}}getSnapshot(){return this.records.map((t=>({...t})))}activate(t){const s=this.records.find((s=>s.id===t));if(!s||s.transitionStatus!=="starting")return;this.records=this.records.map((s=>s.id===t?{...s,transitionStatus:"active"}:s));this.emit()}remove(t){const s=this.records.find((s=>s.id===t));if(!s||s.transitionStatus!=="ending")return null;const i=s.closeReason??"programmatic";this.records=this.records.filter((s=>s.id!==t));this.emit();const e={id:t,reason:i,toast:s};return e}notifyRemove(t){const{toast:s}=t;s.onRemove?.(t)}emit(){const t=this.getSnapshot();for(const s of this.listeners)s(t)}}function w(){return new g}const y=Symbol.for("@ds-mo/ui/default-toast-manager");const b=globalThis;const x=b[y];const M=x??w();if(!x)b[y]=M;const T=()=>`.ds-visually-hidden.sc-ds-toast-h,.ds-visually-hidden.sc-ds-toast{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}@media (forced-colors: active){.sc-ds-toast:root,.sc-ds-toast-h,.ds-forced-colors-scope.sc-ds-toast{--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-toast-h{display:contents}.toast-region.sc-ds-toast{position:fixed;inset:0;z-index:var(--dimension-z-index-floating);pointer-events:none;outline:none}.toast-viewport.sc-ds-toast{position:absolute;right:var(--dimension-space-200);bottom:var(--dimension-space-200);display:grid;width:min( var(--dimension-card-width-sm), calc(100vw - 2 * var(--dimension-space-200)) )}@media (max-width: 767px){[avoid-mobile-shell-bar].sc-ds-toast-h .toast-viewport.sc-ds-toast{bottom:calc( var(--dimension-space-200) + var(--dimension-stroke-width-012) + var(--dimension-space-100) + var(--dimension-size-500) + max(var(--dimension-space-100), env(safe-area-inset-bottom)) )}}.toast-positioner.sc-ds-toast{grid-area:1 / 1;align-self:end;justify-self:center;width:100%;pointer-events:auto;transform:translateY( calc(-1 * var(--toast-index) * var(--dimension-space-100)) );transition:transform var(--effect-motion-short-3), width var(--effect-motion-short-3)}.toast-viewport.sc-ds-toast:not([data-expanded]) .toast-positioner.sc-ds-toast{width:calc( 100% - 2 * var(--toast-index) * var(--dimension-space-100) )}.toast-viewport[data-expanded].sc-ds-toast .toast-positioner.sc-ds-toast{transform:translateY(calc(-1 * var(--toast-offset-y)))}.toast-positioner[data-limited].sc-ds-toast{visibility:hidden;pointer-events:none}.toast-positioner--anchored.sc-ds-toast{position:fixed;width:min( var(--dimension-card-width-sm), calc(100vw - 2 * var(--dimension-space-200)) );transform:none}.toast-positioner--anchored[data-positioned='false'].sc-ds-toast{visibility:hidden}.toast-surface.sc-ds-toast{position:relative;display:block;box-sizing:border-box;width:100%;height:var(--toast-height, auto);padding:var(--dimension-space-200);overflow:hidden;color:var(--color-foreground-primary);background-color:var(--color-background-primary);border-radius:var(--dimension-radius-050);box-shadow:var(--effect-elevation-elevated-floating);transform:translate( var(--toast-swipe-movement-x), var(--toast-swipe-movement-y) );animation:toast-enter var(--effect-motion-short-2) both}.toast-positioner--ending.sc-ds-toast .toast-surface.sc-ds-toast{animation:toast-exit var(--effect-motion-short-3) both}.toast-surface--swiping.sc-ds-toast{transition:none;user-select:none}.toast-content.sc-ds-toast{display:flex;flex-direction:column;min-width:0;padding-inline-end:var(--dimension-size-500);transition:opacity var(--effect-motion-short-3)}.toast-copy.sc-ds-toast{display:flex;flex-direction:column;min-width:0;min-height:var(--typography-lineheight-md);margin-block:calc(-1 * var(--dimension-space-025));gap:var(--dimension-space-050)}.toast-title.sc-ds-toast,.toast-description.sc-ds-toast{min-width:0}.toast-action.sc-ds-toast{align-self:start;margin-top:calc( var(--dimension-space-200) + var(--dimension-space-025) )}.toast-close.sc-ds-toast{position:absolute;top:var(--dimension-space-100);right:var(--dimension-space-100);transition:opacity var(--effect-motion-short-3)}.toast-viewport.sc-ds-toast:not([data-expanded]) .toast-positioner[data-behind].sc-ds-toast .toast-content.sc-ds-toast,.toast-viewport.sc-ds-toast:not([data-expanded]) .toast-positioner[data-behind].sc-ds-toast .toast-close.sc-ds-toast{opacity:0}@keyframes toast-enter{from{opacity:0;transform:translateY(var(--dimension-space-100))}to{opacity:1;transform:translateY(0)}}@keyframes toast-exit{from{opacity:1}to{opacity:0}}@media (prefers-reduced-motion: reduce){.toast-positioner.sc-ds-toast,.toast-surface.sc-ds-toast,.toast-content.sc-ds-toast,.toast-close.sc-ds-toast,.toast-positioner--ending.sc-ds-toast .toast-surface.sc-ds-toast{transition:none;animation:none}.toast-positioner--ending.sc-ds-toast .toast-surface.sc-ds-toast{opacity:0}}@media (forced-colors: active){.toast-surface.sc-ds-toast{box-shadow:none;outline:var(--dimension-stroke-width-012) solid var(--ds-forced-color-content);outline-offset:calc(-1 * var(--dimension-stroke-width-012))}}`;const k=40;const A=10;const C="__global-stack__";const P='button,a,input,textarea,select,[role="button"],[data-ds-toast-swipe-ignore]';const S=new WeakMap;const E=new Set;let F=null;let D=0;const z=t(class t extends s{constructor(t){super();if(t!==false){this.__registerHost()}this.dsToastClose=i(this,"dsToastClose");this.dsToastRemove=i(this,"dsToastRemove");this.dsToastAction=i(this,"dsToastAction");this.manager=M;this.limit=3;this.timeout=f.animationDelayLong2;this.label="Notifications";this.closeLabel="Close notification";this.avoidMobileShellBar=false;this.swipeDirections=["down","right"];this.records=[];this.expanded=false;this.keyboardActive=false;this.swipe=null;this.layoutVersion=0;this.instanceId=++D;this.domIds=new Map;this.timers=new Map;this.closeWatchdogs=new Map;this.closeFrames=new Map;this.closeEvents=new Set;this.activationFrames=new Map;this.pauseReasons=new Set;this.hoveredIds=new Set;this.heights=new Map;this.measuredUpdateKeys=new Map;this.anchoredPositions=new Map;this.dismissedSwipeDirections=new Map;this.observedElements=new Set;this.pendingRemovals=[];this.unsubscribe=null;this.attachedManager=null;this.previousFocus=null;this.resizeObserver=null;this.mutationObserver=null;this.layoutFrame=null;this.activeSwipe=null;this.nextDomId=0;this.connected=false;this.pendingHoverLeave=false;this.handleWindowBlur=()=>this.pauseTimers("window");this.handleWindowFocus=()=>this.resumeTimers("window");this.handleVisibilityChange=()=>{if(document.hidden)this.pauseTimers("document");else this.resumeTimers("document")};this.handleFocusIn=()=>{const t=document.activeElement;if(!(t instanceof s)||!t.matches(":focus-visible"))return;F=this;this.keyboardActive=true;this.expanded=true;this.pauseTimers("focus")};this.handleFocusOut=t=>{const s=t.relatedTarget;if(s instanceof Node&&this.el.contains(s))return;if(!this.keyboardActive)return;this.keyboardActive=false;this.expanded=this.hoveredIds.size>0;this.resumeTimers("focus")};this.handleDocumentKeyDown=t=>{if(t.key!=="F6")return;const s=Array.from(E).filter((t=>t.activeRecords.length>0));const i=F&&F.activeRecords.length?F:s[s.length-1];if(i!==this)return;t.preventDefault();if(!this.el.contains(document.activeElement)){this.previousFocus=document.activeElement}this.keyboardActive=true;this.regionElement?.focus()};this.handleRegionKeyDown=t=>{if(t.key==="Escape"){const s=t.target;const i=s.closest(".toast-positioner");const e=i?.dataset["toastId"]??this.activeRecords[0]?.id;if(e){t.preventDefault();this.manager.close(e,"escape")}return}if(t.key==="Tab"&&t.shiftKey&&t.target===this.regionElement){t.preventDefault();this.restorePreviousFocus()}};this.handleWindowResize=()=>{this.heights.clear();this.measuredUpdateKeys.clear();this.layoutVersion+=1;this.scheduleLayout()};this.scheduleLayout=()=>{if(this.layoutFrame!==null)return;this.layoutFrame=requestAnimationFrame((()=>{this.layoutFrame=null;this.measureLayout()}))}}connectedCallback(){this.connect()}componentDidLoad(){this.connect()}connect(){if(this.connected)return;this.connected=true;this.resizeObserver??(this.resizeObserver=new ResizeObserver((()=>this.scheduleLayout())));this.mutationObserver??(this.mutationObserver=new MutationObserver((()=>this.scheduleLayout())));this.mutationObserver.observe(document.body,{childList:true,subtree:true});if(!this.unsubscribe)this.attachManager(this.manager);window.addEventListener("blur",this.handleWindowBlur);window.addEventListener("focus",this.handleWindowFocus);window.addEventListener("resize",this.handleWindowResize);window.addEventListener("scroll",this.scheduleLayout,true);document.addEventListener("keydown",this.handleDocumentKeyDown);document.addEventListener("visibilitychange",this.handleVisibilityChange);E.add(this);if(!F)F=this}componentDidRender(){this.syncObservedElements();this.flushPendingRemovals();this.scheduleLayout()}disconnectedCallback(){this.connected=false;this.flushPendingRemovals();this.detachManager();this.resetManagerState();this.resizeObserver?.disconnect();this.resizeObserver=null;this.mutationObserver?.disconnect();this.mutationObserver=null;this.observedElements.clear();if(this.layoutFrame!==null)cancelAnimationFrame(this.layoutFrame);this.layoutFrame=null;window.removeEventListener("blur",this.handleWindowBlur);window.removeEventListener("focus",this.handleWindowFocus);window.removeEventListener("resize",this.handleWindowResize);window.removeEventListener("scroll",this.scheduleLayout,true);document.removeEventListener("keydown",this.handleDocumentKeyDown);document.removeEventListener("visibilitychange",this.handleVisibilityChange);E.delete(this);if(F===this){const t=Array.from(E);F=t[t.length-1]??null}}onManagerChange(t){this.detachManager();this.resetManagerState();if(this.connected)this.attachManager(t)}onTimeoutChange(){for(const t of this.timers.values()){if(t.handle)clearTimeout(t.handle)}this.timers.clear();this.syncTimers()}attachManager(t){const s=S.get(t);if(s&&s!==this){console.warn("[ds-toast] A manager can control only one connected ds-toast instance.");return}S.set(t,this);this.attachedManager=t;this.unsubscribe=t.subscribe((t=>{this.records=t;this.syncLifecycle(t);this.scheduleLayout()}))}detachManager(){this.unsubscribe?.();this.unsubscribe=null;if(this.attachedManager&&S.get(this.attachedManager)===this){S.delete(this.attachedManager)}this.attachedManager=null}resetManagerState(){this.flushPendingRemovals();if(this.el.contains(document.activeElement))this.restorePreviousFocus();this.clearAllTimers();for(const t of this.activationFrames.values())cancelAnimationFrame(t);for(const t of this.closeFrames.values())cancelAnimationFrame(t);this.activationFrames.clear();this.closeFrames.clear();this.closeEvents.clear();this.pauseReasons.clear();this.hoveredIds.clear();this.pendingHoverLeave=false;this.heights.clear();this.measuredUpdateKeys.clear();this.anchoredPositions.clear();this.dismissedSwipeDirections.clear();this.domIds.clear();this.activeSwipe=null;this.swipe=null;this.expanded=false;this.keyboardActive=false;this.records=[];this.resizeObserver?.disconnect();this.observedElements.clear()}syncObservedElements(){const t=new Set(this.el.querySelectorAll(".toast-positioner"));for(const s of this.records){if(!s.positioner)continue;const i=this.resolveAnchor(s.positioner.anchor);if(i)t.add(i)}for(const s of this.observedElements){if(!t.has(s)){this.resizeObserver?.unobserve(s);this.observedElements.delete(s)}}for(const s of t){if(this.observedElements.has(s))continue;this.resizeObserver?.observe(s);this.observedElements.add(s)}}flushPendingRemovals(){for(const t of this.pendingRemovals.splice(0)){t.manager.notifyRemove(t.context);this.dsToastRemove.emit({id:t.context.id,toast:t.context.toast})}}syncLifecycle(t){const s=new Set(t.map((t=>t.id)));for(const t of this.hoveredIds){if(t!==C&&!s.has(t))this.hoveredIds.delete(t)}const i=t.some((t=>t.transitionStatus==="ending"));if(this.pendingHoverLeave&&!i&&!this.hoveredIds.size){this.pendingHoverLeave=false;this.expanded=false;this.resumeTimers("hover")}else if(!this.hoveredIds.size&&!this.pendingHoverLeave){this.resumeTimers("hover")}for(const[t,i]of this.timers){if(s.has(t))continue;if(i.handle)clearTimeout(i.handle);this.timers.delete(t)}for(const[t,i]of this.closeWatchdogs){if(s.has(t))continue;clearTimeout(i);this.closeWatchdogs.delete(t)}for(const[t,i]of this.activationFrames){if(s.has(t))continue;cancelAnimationFrame(i);this.activationFrames.delete(t)}for(const[t,i]of this.closeFrames){if(s.has(t))continue;cancelAnimationFrame(i);this.closeFrames.delete(t)}for(const t of this.domIds.keys()){if(s.has(t))continue;this.closeEvents.delete(t);this.domIds.delete(t);this.heights.delete(t);this.measuredUpdateKeys.delete(t);this.anchoredPositions.delete(t);this.dismissedSwipeDirections.delete(t)}for(const s of t){this.ensureDomId(s.id);if(s.transitionStatus==="starting"&&!this.activationFrames.has(s.id)){const t=this.attachedManager;const i=requestAnimationFrame((()=>{this.activationFrames.delete(s.id);t?.activate(s.id)}));this.activationFrames.set(s.id,i)}if(s.transitionStatus==="ending"){this.clearToastTimer(s.id);this.beginRemoval(s)}else{const t=this.closeWatchdogs.get(s.id);if(t)clearTimeout(t);this.closeWatchdogs.delete(s.id);const i=this.closeFrames.get(s.id);if(i)cancelAnimationFrame(i);this.closeFrames.delete(s.id);this.closeEvents.delete(s.id)}}this.syncTimers()}syncTimers(){const t=new Set;for(const s of this.records){if(s.transitionStatus!=="active")continue;t.add(s.id);const i=this.resolveToastTimeout(s);if(i<=0){this.clearToastTimer(s.id);continue}const e=this.timers.get(s.id);if(!e||e.timerKey!==s.timerKey){this.clearToastTimer(s.id);this.timers.set(s.id,{timerKey:s.timerKey,remaining:i,startedAt:0,handle:null})}if(!this.isPaused)this.startToastTimer(s.id)}for(const s of this.timers.keys()){if(!t.has(s))this.clearToastTimer(s)}}resolveToastTimeout(t){const s=t.timeout??this.timeout;if(typeof s==="number")return Math.max(0,s);return u(s,f.animationDelayLong2)}startToastTimer(t){const s=this.timers.get(t);if(!s||s.handle||s.remaining<=0)return;s.startedAt=Date.now();s.handle=setTimeout((()=>{s.handle=null;s.remaining=0;this.manager.close(t,"timeout")}),s.remaining)}pauseTimers(t){const s=this.isPaused;this.pauseReasons.add(t);if(s)return;const i=Date.now();for(const t of this.timers.values()){if(!t.handle)continue;clearTimeout(t.handle);t.handle=null;t.remaining=Math.max(0,t.remaining-(i-t.startedAt))}}resumeTimers(t){this.pauseReasons.delete(t);if(this.isPaused)return;for(const t of this.timers.keys())this.startToastTimer(t)}get isPaused(){return this.pauseReasons.size>0}clearToastTimer(t){const s=this.timers.get(t);if(s?.handle)clearTimeout(s.handle);this.timers.delete(t)}clearAllTimers(){for(const t of this.timers.values()){if(t.handle)clearTimeout(t.handle)}for(const t of this.closeWatchdogs.values())clearTimeout(t);this.timers.clear();this.closeWatchdogs.clear()}beginRemoval(t){if(!this.closeEvents.has(t.id)){this.closeEvents.add(t.id);this.dsToastClose.emit({id:t.id,reason:t.closeReason??"programmatic",toast:t});this.moveFocusAfterClose(t.id)}if(this.closeWatchdogs.has(t.id)||this.closeFrames.has(t.id))return;const s=m(f.motionShort3,f.animationDurationShort3);if(s<=0){queueMicrotask((()=>this.completeRemoval(t)));return}const i=requestAnimationFrame((()=>{this.closeFrames.delete(t.id);const i=this.records.find((s=>s.id===t.id));if(!i||i.transitionStatus!=="ending")return;this.closeWatchdogs.set(t.id,setTimeout((()=>this.completeRemoval(i)),s))}));this.closeFrames.set(t.id,i)}completeRemoval(t){const s=this.records.find((s=>s.id===t.id));if(!s||s.transitionStatus!=="ending")return;const i=this.closeWatchdogs.get(t.id);if(i)clearTimeout(i);this.closeWatchdogs.delete(t.id);const e=this.closeFrames.get(t.id);if(e)cancelAnimationFrame(e);this.closeFrames.delete(t.id);const o=this.attachedManager;const n=o?.remove(t.id);if(o&&n)this.pendingRemovals.push({manager:o,context:n})}handleAnimationComplete(t){if(t.transitionStatus==="ending")this.completeRemoval(t)}bindAnimationCancel(t,s){if(!t||t.dataset["cancelBound"]==="true")return;t.dataset["cancelBound"]="true";t.addEventListener("animationcancel",(()=>{const t=this.records.find((t=>t.id===s));if(t)this.handleAnimationComplete(t)}))}handlePointerEnter(t){F=this;this.pendingHoverLeave=false;this.hoveredIds.add(t);this.expanded=true;this.pauseTimers("hover")}handlePointerLeave(t){this.hoveredIds.delete(t);if(this.hoveredIds.size)return;if(this.records.some((t=>t.transitionStatus==="ending"))){this.pendingHoverLeave=true;return}this.expanded=false;this.resumeTimers("hover")}get regionElement(){return this.el.querySelector(".toast-region")}restorePreviousFocus(){this.previousFocus?.focus?.();this.previousFocus=null;this.keyboardActive=false}moveFocusAfterClose(t){const s=document.activeElement;const i=this.positionerElement(t);if(!s||!i?.contains(s))return;requestAnimationFrame((()=>{const s=this.activeRecords.find((s=>s.id!==t));const i=s?this.positionerElement(s.id)?.querySelector("ds-button-unfilled"):null;if(i?.setFocus)void i.setFocus();else if(s)this.regionElement?.focus();else this.restorePreviousFocus()}))}handleAction(t,s){const i={id:t.id,toast:t,originalEvent:s.detail};this.dsToastAction.emit(i);t.action?.onAction?.({id:t.id,data:t.data,manager:this.manager,originalEvent:s.detail})}handlePointerDown(t,s){if(s.button!==0)return;const i=s.target;if(i.closest(P))return;const e=s.currentTarget;e.setPointerCapture(s.pointerId);this.activeSwipe={id:t.id,pointerId:s.pointerId,pointerType:s.pointerType,startX:s.clientX,startY:s.clientY,maxDistance:0,cancelled:false,axis:null};this.swipe={id:t.id,x:0,y:0};if(s.pointerType==="touch")this.pauseTimers("swipe")}handlePointerMove(t){const s=this.activeSwipe;if(!s||s.pointerId!==t.pointerId||s.cancelled)return;const i=t.clientX-s.startX;const e=t.clientY-s.startY;if(!s.axis&&Math.max(Math.abs(i),Math.abs(e))>1){s.axis=Math.abs(i)>=Math.abs(e)?"x":"y"}if(!s.axis)return;const o=s.axis==="x";const n=o?i>=0?"right":"left":e>=0?"down":"up";const a=this.swipeDirections.includes(n);const r=o?Math.abs(i):Math.abs(e);const c=a?r:Math.sqrt(r);const h=(o?i:e)<0?-c:c;const d=o?h:0;const l=o?0:h;if(s.maxDistance-c>=A){s.cancelled=true;this.cancelSwipe();return}s.maxDistance=Math.max(s.maxDistance,c);if(r>1)t.preventDefault();this.swipe={id:s.id,x:d,y:l,direction:a?n:undefined}}handlePointerUp(t){const s=this.activeSwipe;if(!s||s.pointerId!==t.pointerId)return;const i=this.swipe;const e=i?Math.max(Math.abs(i.x),Math.abs(i.y)):0;const o=!s.cancelled&&!!i?.direction&&e>=k;const n=s.id;const a=s.pointerType==="touch";this.activeSwipe=null;this.swipe=null;if(a)this.resumeTimers("swipe");if(o&&i.direction){this.dismissedSwipeDirections.set(n,i.direction);this.manager.close(n,"swipe")}}handlePointerCancel(t){if(this.activeSwipe?.pointerId!==t.pointerId)return;this.cancelSwipe()}cancelSwipe(){const t=this.activeSwipe?.pointerType==="touch";this.activeSwipe=null;this.swipe=null;if(t)this.resumeTimers("swipe")}get touchAction(){const t=this.swipeDirections.includes("left")||this.swipeDirections.includes("right");const s=this.swipeDirections.includes("up")||this.swipeDirections.includes("down");if(t&&s)return"none";if(t)return"pan-y";if(s)return"pan-x";return"auto"}measureNaturalHeight(t,s){const i=t.querySelector(".toast-surface");if(!i)return 0;const e=t.style.width;const o=t.style.transition;const n=i.style.height;if(s){t.style.transition="none";t.style.width="100%"}i.style.height="auto";const a=i.getBoundingClientRect().height;i.style.height=n;if(s){t.style.width=e;t.getBoundingClientRect();t.style.transition=o}return a}measureLayout(){let t=false;for(const s of this.records){const i=this.positionerElement(s.id);if(!i)continue;let e=this.heights.get(s.id)??0;const o=e<=0||this.measuredUpdateKeys.get(s.id)!==s.updateKey;if(o){e=this.measureNaturalHeight(i,!s.positioner);if(e>0){if(this.heights.get(s.id)!==e)t=true;this.heights.set(s.id,e);this.measuredUpdateKeys.set(s.id,s.updateKey)}}if(!s.positioner)continue;const n=this.resolveAnchor(s.positioner.anchor);if(!n||e<=0){if(this.anchoredPositions.delete(s.id))t=true;continue}const r=i.getBoundingClientRect();const c=p(s.positioner.sideOffset,f.space050);const h=p(s.positioner.alignOffset,0);const d=a({anchorRect:n.getBoundingClientRect(),popupWidth:r.width,popupHeight:e,side:s.positioner.side??"top",align:s.positioner.align??"center",sideOffsetPx:c,alignOffsetPx:h,viewportPadPx:p(undefined,f.space200),viewportWidth:window.innerWidth,viewportHeight:window.innerHeight});const l=this.anchoredPositions.get(s.id);if(!l||l.x!==d.x||l.y!==d.y||l.side!==d.resolvedSide){this.anchoredPositions.set(s.id,{x:d.x,y:d.y,side:d.resolvedSide});t=true}}if(t)this.layoutVersion+=1}resolveAnchor(t){return typeof t==="string"?document.getElementById(t):t}positionerElement(t){return Array.from(this.el.querySelectorAll(".toast-positioner")).find((s=>s.dataset["toastId"]===t))??null}ensureDomId(t){const s=this.domIds.get(t);if(s)return s;const i=++this.nextDomId;this.domIds.set(t,i);return i}get activeRecords(){return this.records.filter((t=>t.transitionStatus!=="ending"))}globalLayout(){const t=this.records.filter((t=>!t.positioner));let s=0;let i=0;const e=p(undefined,f.space200);const o=new Map;t.forEach(((t,n)=>{if(t.transitionStatus==="ending"){o.set(t.id,{index:n,offset:s,limited:false});return}const a=i>=Math.max(1,this.limit);o.set(t.id,{index:i,offset:s,limited:a});s+=(this.heights.get(t.id)??0)+e;i+=1}));return o}renderToast(t,s){const i=this.ensureDomId(t.id);const o=`ds-toast-${this.instanceId}-${i}-title`;const n=`ds-toast-${this.instanceId}-${i}-description`;const a=this.swipe?.id===t.id?this.swipe:null;const r=a?.direction??this.dismissedSwipeDirections.get(t.id);const c=!!t.positioner;const h=this.anchoredPositions.get(t.id);const d=t.priority==="high"&&!this.keyboardActive;const l=this.keyboardActive&&!s.limited?0:-1;const f=this.heights.get(t.id);return e("div",{ref:s=>this.bindAnimationCancel(s,t.id),class:{"toast-positioner":true,"toast-positioner--anchored":c,"toast-positioner--ending":t.transitionStatus==="ending"},"data-toast-id":t.id,"data-behind":!c&&s.index>0?"":undefined,"data-limited":s.limited?"":undefined,"data-positioned":c?String(!!h):undefined,"data-side":h?.side,inert:s.limited?true:undefined,"aria-hidden":s.limited?"true":undefined,style:{"--toast-index":String(s.index),"--toast-offset-y":`${s.offset}px`,"--toast-height":f?`${f}px`:undefined,zIndex:String(this.records.length-s.index),left:h?`${h.x}px`:undefined,top:h?`${h.y}px`:undefined},onAnimationEnd:()=>this.handleAnimationComplete(t)},e("div",{class:{"toast-surface":true,"toast-surface--swiping":!!a},role:t.priority==="high"?"alertdialog":"dialog","aria-modal":"false","aria-labelledby":t.title?o:t.description?n:undefined,"aria-describedby":t.title&&t.description?n:undefined,"aria-hidden":d?"true":undefined,"data-type":t.type,"data-priority":t.priority,"data-transition-status":t.transitionStatus,"data-swiping":a?"":undefined,"data-swipe-direction":r,style:{"--toast-swipe-movement-x":`${a?.x??0}px`,"--toast-swipe-movement-y":`${a?.y??0}px`,touchAction:this.touchAction},onPointerDown:s=>this.handlePointerDown(t,s),onPointerMove:t=>this.handlePointerMove(t),onPointerUp:t=>this.handlePointerUp(t),onPointerCancel:t=>this.handlePointerCancel(t),onPointerEnter:c?()=>this.handlePointerEnter(t.id):undefined,onPointerLeave:c?()=>this.handlePointerLeave(t.id):undefined},e("div",{class:"toast-content"},e("div",{class:"toast-copy"},t.title&&e("ds-text",{class:"toast-title",as:"div",variant:"text-title-small",color:"primary",textId:o},t.title),t.description&&e("ds-text",{class:"toast-description",as:"div",variant:"text-body-medium",color:"secondary",textId:n},t.description)),t.action&&e("ds-button-unfilled",{class:"toast-action",variant:"label",size:"md",type:"button",label:t.action.label,"aria-label":t.action.ariaLabel,hasBorder:true,focusTabIndex:l,"aria-hidden":!this.keyboardActive?"true":undefined,onDsClick:s=>this.handleAction(t,s)})),e("ds-button-unfilled",{class:"toast-close",variant:"icon",size:"md",type:"button",icon:"Cross","aria-label":this.closeLabel,hasBorder:false,activeFill:false,focusTabIndex:l,"aria-hidden":!this.keyboardActive?"true":undefined,onDsClick:()=>this.manager.close(t.id,"close-button")})))}render(){const t=this.globalLayout();const s=this.records.filter((t=>!t.positioner));const i=this.records.filter((t=>!!t.positioner));const n=this.records.filter((s=>s.priority==="high"&&s.transitionStatus!=="ending"&&!t.get(s.id)?.limited));return e(o,{key:"c69a849189d301c570397b7c83b3674c9ed48c6f"},e("section",{key:"ca457339d10fa1328e3715597397acedfc80763a",class:"toast-region",role:"region","aria-label":this.label,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text",tabIndex:-1,onFocusin:this.handleFocusIn,onFocusout:t=>this.handleFocusOut(t),onKeyDown:t=>this.handleRegionKeyDown(t)},e("div",{key:"13fea8a8d32111d0de94c573596504483a916dc9",class:"toast-viewport","data-expanded":this.expanded?"":undefined,onPointerEnter:()=>this.handlePointerEnter(C),onPointerLeave:()=>this.handlePointerLeave(C)},s.map((s=>this.renderToast(s,t.get(s.id)??{index:0,offset:0,limited:false})))),e("div",{key:"4b4176f0ae1268dceb8ffc732cb5ca0e58ded045",class:"toast-anchored-layer"},i.map((t=>this.renderToast(t,{index:0,offset:0,limited:false})))),e("div",{key:"65a17f61c3cde1a22cae64732c6a259c2a9221c8",class:"toast-assertive-announcer ds-visually-hidden"},n.map((t=>e("div",{role:"alert","aria-atomic":"true"},[t.title,t.description].filter(Boolean).join(". ")))))))}get el(){return this}static get watchers(){return{manager:[{onManagerChange:0}],timeout:[{onTimeoutChange:0}]}}static get style(){return T()}},[2,"ds-toast",{manager:[16],limit:[2],timeout:[8],label:[1],closeLabel:[1,"close-label"],avoidMobileShellBar:[516,"avoid-mobile-shell-bar"],swipeDirections:[16],records:[32],expanded:[32],keyboardActive:[32],swipe:[32],layoutVersion:[32]},undefined,{manager:[{onManagerChange:0}],timeout:[{onTimeoutChange:0}]}]);function R(){if(typeof customElements==="undefined"){return}const t=["ds-toast","ds-badge","ds-button-unfilled","ds-icon","ds-loader","ds-text"];t.forEach((t=>{switch(t){case"ds-toast":if(!customElements.get(n(t))){customElements.define(n(t),z)}break;case"ds-badge":if(!customElements.get(n(t))){r()}break;case"ds-button-unfilled":if(!customElements.get(n(t))){c()}break;case"ds-icon":if(!customElements.get(n(t))){h()}break;case"ds-loader":if(!customElements.get(n(t))){d()}break;case"ds-text":if(!customElements.get(n(t))){l()}break}}))}R();const $=z;const j=R;export{$ as DsToast,j as defineCustomElement};
2
2
  //# sourceMappingURL=ds-toast.js.map
@@ -1,2 +1,2 @@
1
- const e="ds-mo";const t={hotModuleReplacement:false,hydratedSelectorName:"hydrated",lazyLoad:false,slotRelocation:true,state:true,updatable:true};var n="http://www.w3.org/2000/svg";var l="http://www.w3.org/1999/xhtml";function r(e,t,n){const l=typeof HTMLElement!=="undefined"?HTMLElement.prototype:null;while(e&&e!==l){const l=Object.getOwnPropertyDescriptor(e,t);if(l&&(!n||l.get))return l;e=Object.getPrototypeOf(e)}return void 0}var i=(e,t)=>{var n;const l=t.t;const i=Object.entries((n=l.l)!=null?n:{});i.map((([n,[l]])=>{if(l&31||l&32){const l=e[n];const i=r(Object.getPrototypeOf(e),n,true)||Object.getOwnPropertyDescriptor(e,n);if(i){Object.defineProperty(e,n,{get(){return i.get.call(this)},set(e){i.set.call(this,e)},configurable:true,enumerable:true})}if(t.i.has(n)){e[n]=t.i.get(n)}else if(l!==void 0){e[n]=l}}}))};var s=e=>{if(e.__stencil__getHostRef){return e.__stencil__getHostRef()}return void 0};var o=(e,n)=>{const l={o:0,$hostElement$:e,t:n,i:new Map,u:new Map};{l.v=new Promise((e=>l.p=e));e["s-p"]=[];e["s-rc"]=[]}const r=l;e.__stencil__getHostRef=()=>r;if(n.o&512&&t.state){i(e,l)}return r};var f=(e,t)=>t in e;var a=(e,t)=>(0,console.error)(e,t);var c=new Map;var u="slot-fb{display:contents}slot-fb[hidden]{display:none}";var v="http://www.w3.org/1999/xlink";var d=["formAssociatedCallback","formResetCallback","formDisabledCallback","formStateRestoreCallback"];var p=typeof window!=="undefined"?window:{};var h=p.HTMLElement||class{};var y={o:0,h:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)};var b=(()=>{var e;let t=false;try{(e=p.document)==null?void 0:e.addEventListener("e",null,Object.defineProperty({},"passive",{get(){t=true}}))}catch(e){}return t})();var m=e=>Promise.resolve(e);var w=(()=>{try{if(!p.document.adoptedStyleSheets){return false}new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false})();var g=w?(()=>!!p.document&&Object.getOwnPropertyDescriptor(p.document.adoptedStyleSheets,"length").writable)():false;var $=false;var j=[];var O=[];var S=(e,t)=>n=>{e.push(n);if(!$){$=true;if(t&&y.o&4){M(N)}else{y.raf(N)}}};var k=e=>{for(let t=0;t<e.length;t++){try{e[t](performance.now())}catch(e){a(e)}}e.length=0};var N=()=>{k(j);{k(O);if($=j.length>0){y.raf(N)}}};var M=e=>m().then(e);var C=S(O,true);var E=e=>{const t=new URL(e,y.h);return t.origin!==p.location.origin?t.href:t.pathname};var R=e=>y.h=e;function x(e){return void 0}var A;function L(e){var t;const n={mode:"open"};const l=this.attachShadow(n);if(A===void 0)A=(t=x())!=null?t:null;if(A){if(g){l.adoptedStyleSheets.push(A)}else{l.adoptedStyleSheets=[...l.adoptedStyleSheets,A]}}}var _=e=>{const t=B(e,"childNodes");if(e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"){T(t,e.tagName).forEach((e=>{if(e.nodeType===1&&e.tagName==="SLOT-FB"){if(U(e,H(e),false).length){e.hidden=true}else{e.hidden=false}}}))}let n=0;for(n=0;n<t.length;n++){const e=t[n];if(e.nodeType===1&&B(e,"childNodes").length){_(e)}}};var F=e=>{const t=[];for(let n=0;n<e.length;n++){const l=e[n]["s-nr"]||void 0;if(l&&l.isConnected){t.push(l)}}return t};function T(e,t,n){let l=0;let r=[];let i;for(;l<e.length;l++){i=e[l];if(i["s-sr"]&&(!t||i["s-hn"]===t)&&(n===void 0||H(i)===n)){r.push(i);if(typeof n!=="undefined")return r}r=[...r,...T(i.childNodes,t,n)]}return r}var U=(e,t,n=true)=>{const l=[];if(n&&e["s-sr"]||!e["s-sr"])l.push(e);let r=e;while(r=r.nextSibling){if(H(r)===t&&(n||!r["s-sr"]))l.push(r)}return l};var D=(e,t)=>{if(e.nodeType===1){if(e.getAttribute("slot")===null&&t===""){return true}if(e.getAttribute("slot")===t){return true}return false}if(e["s-sn"]===t){return true}return t===""};var H=e=>typeof e["s-sn"]==="string"?e["s-sn"]:e.nodeType===1&&e.getAttribute("slot")||void 0;function P(e){if(e.assignedElements||e.assignedNodes||!e["s-sr"])return;const t=t=>function(e){const n=[];const l=this["s-sn"];if(e==null?void 0:e.flatten){console.error(`\n Flattening is not supported for Stencil non-shadow slots.\n You can use \`.childNodes\` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n `)}const r=this["s-cr"].parentElement;const i=r.__childNodes?r.childNodes:F(r.childNodes);i.forEach((e=>{if(l===H(e)){n.push(e)}}));if(t){return n.filter((e=>e.nodeType===1))}return n}.bind(e);e.assignedElements=t(true);e.assignedNodes=t(false)}function W(e){e.dispatchEvent(new CustomEvent("slotchange",{bubbles:false,cancelable:false,composed:false}))}function z(e,t){var n;t=t||((n=e["s-ol"])==null?void 0:n.parentElement);if(!t)return{slotNode:null,slotName:""};const l=e["s-sn"]=H(e)||"";const r=B(t,"childNodes");const i=T(r,t.tagName,l)[0];return{slotNode:i,slotName:l}}function B(e,t){if("__"+t in e){const n=e["__"+t];if(typeof n!=="function")return n;return n.bind(e)}else{if(typeof e[t]!=="function")return e[t];return e[t].bind(e)}}var V=(e,t="")=>{{return()=>{}}};function q(e){var t,n,l;return(l=(n=(t=e.head)==null?void 0:t.querySelector('meta[name="csp-nonce"]'))==null?void 0:n.getAttribute("content"))!=null?l:void 0}var Y=new WeakMap;var I=(e,t,n)=>{let l=c.get(e);if(w&&n){l=l||new CSSStyleSheet;if(typeof l==="string"){l=t}else{l.replaceSync(t)}}else{l=t}c.set(e,l)};var Z=(e,t,n)=>{var l,r,i;const s=J(t);const o=c.get(s);if(!p.document){return s}e=e.nodeType===11?e:p.document;if(o){if(typeof o==="string"){e=e.head||e;let n=Y.get(e);let i;if(!n){Y.set(e,n=new Set)}if(!n.has(s)){i=p.document.createElement("style");i.textContent=o;const f=(l=y.m)!=null?l:q(p.document);if(f!=null){i.setAttribute("nonce",f)}if(!(t.o&1)){if(e.nodeName==="HEAD"){const t=e.querySelectorAll("link[rel=preconnect]");const n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(i,(n==null?void 0:n.parentNode)===e?n:null)}else if("host"in e){if(w){const t=(r=e.defaultView)!=null?r:e.ownerDocument.defaultView;const n=new t.CSSStyleSheet;n.replaceSync(o);if(g){e.adoptedStyleSheets.unshift(n)}else{e.adoptedStyleSheets=[n,...e.adoptedStyleSheets]}}else{const t=e.querySelector("style");if(t&&true){t.textContent=o+t.textContent}else{e.prepend(i)}}}else{e.append(i)}}if(t.o&1){e.insertBefore(i,null)}if(t.o&4){i.textContent+=u}if(n){n.add(s)}}}else{let t=Y.get(e);if(!t){Y.set(e,t=new Set)}if(!t.has(s)){const n=(i=e.defaultView)!=null?i:e.ownerDocument.defaultView;let l;if(o.constructor===n.CSSStyleSheet){l=o}else{l=new n.CSSStyleSheet;for(let e=0;e<o.cssRules.length;e++){l.insertRule(o.cssRules[e].cssText,e)}}if(g){e.adoptedStyleSheets.push(l)}else{e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]}t.add(s)}}}return s};var G=e=>{const t=e.t;const n=e.$hostElement$;const l=t.o;const r=V("attachStyles",t.$);const i=Z(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);if(l&10){n["s-sc"]=i;n.classList.add(i+"-h")}r()};var J=(e,t)=>"sc-"+e.$;var K=e=>e!=null&&e!==void 0;var Q=e=>{e=typeof e;return e==="object"||e==="function"};var X=(e,t,...n)=>{if(typeof e==="string"){e=mt(e)}let l=null;let r=null;let i=null;let s=false;let o=false;const f=[];const a=t=>{for(let n=0;n<t.length;n++){l=t[n];if(Array.isArray(l)){a(l)}else if(l!=null&&typeof l!=="boolean"){if(s=typeof e!=="function"&&!Q(l)){l=String(l)}if(s&&o){f[f.length-1].j+=l}else{f.push(s?ee(null,l):l)}o=s}}};a(n);if(t){if(t.key){r=t.key}if(t.name){i=t.name}{const e=t.className||t.class;if(e){t.class=typeof e!=="object"?e:Object.keys(e).filter((t=>e[t])).join(" ")}}}if(typeof e==="function"){return e(t===null?{}:t,f,le)}const c=ee(e,null);c.O=t;if(f.length>0){c.S=f}{c.k=r}{c.N=i}return c};var ee=(e,t)=>{const n={o:0,M:e,j:t!=null?t:null,C:null,S:null};{n.O=null}{n.k=null}{n.N=null}return n};var te={};var ne=e=>e&&e.M===te;var le={forEach:(e,t)=>e.map(re).forEach(t),map:(e,t)=>e.map(re).map(t).map(ie)};var re=e=>({vattrs:e.O,vchildren:e.S,vkey:e.k,vname:e.N,vtag:e.M,vtext:e.j});var ie=e=>{if(typeof e.vtag==="function"){const t={...e.vattrs};if(e.vkey){t.key=e.vkey}if(e.vname){t.name=e.vname}return X(e.vtag,t,...e.vchildren||[])}const t=ee(e.vtag,e.vtext);t.O=e.vattrs;t.S=e.vchildren;t.k=e.vkey;t.N=e.vname;return t};var se=e=>{if(!e)return void 0;const t=Object.keys(e);if(t.length===0)return void 0;let n=false;for(const l of t){if(n)break;for(const t of e[l]){if(typeof t==="string"){n=true;break}}}if(!n)return e;const l={};for(const n of t){l[n]=e[n].map((e=>typeof e==="string"?{[e]:0}:e))}return l};var oe=(e,t,n)=>{if(e!=null&&!Q(e)){if(t&4){if(n&&typeof e==="string"){return e===""||!!e}else{return e==="false"?false:e===""||!!e}}if(t&2){return typeof e==="string"?parseFloat(e):typeof e==="number"?e:NaN}if(t&1){return String(e)}return e}return e};var fe=e=>e;var ae=(e,t,n)=>{const l=fe(e);return{emit:e=>ce(l,t,{bubbles:true,composed:true,cancelable:true,detail:e})}};var ce=(e,t,n)=>{const l=y.ce(t,n);e.dispatchEvent(l);return l};var ue=(e,t,n,l,r,i,o)=>{if(n===l){return}let a=f(e,t);let c=t.toLowerCase();if(t==="class"){const t=e.classList;const r=de(n);let i=de(l);{t.remove(...r.filter((e=>e&&!i.includes(e))));t.add(...i.filter((e=>e&&!r.includes(e))))}}else if(t==="style"){{for(const t in n){if(!l||l[t]==null){if(t.includes("-")){e.style.removeProperty(t)}else{e.style[t]=""}}}}for(const t in l){if(!n||l[t]!==n[t]){if(t.includes("-")){e.style.setProperty(t,l[t])}else{e.style[t]=l[t]}}}}else if(t==="key");else if(t==="ref"){if(l){He(l,e)}}else if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(f(p,c)){t=c.slice(2)}else{t=c[2]+t.slice(3)}if(n||l){const r=t.endsWith(pe);t=t.replace(he,"");if(n){y.rel(e,t,n,r)}if(l){y.ael(e,t,l,r)}}}else if(t[0]==="a"&&t.startsWith("attr:")){const n=t.slice(5);let r;{const t=s(e);if(t&&t.t&&t.t.l){const e=t.t.l[n];if(e&&e[1]){r=e[1]}}}if(!r){r=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}if(l==null||l===false){if(l!==false||e.getAttribute(r)===""){e.removeAttribute(r)}}else{e.setAttribute(r,l===true?"":l)}return}else if(t[0]==="p"&&t.startsWith("prop:")){const n=t.slice(5);try{e[n]=l}catch(e){}return}else{const s=Q(l);if((a||s&&l!==null)&&!r){try{if(!e.tagName.includes("-")){const r=l==null?"":l;if(t==="list"){a=false}else if(n==null||e[t]!==r){if(typeof e.__lookupSetter__(t)==="function"){e[t]=r}else{e.setAttribute(t,r)}}}else if(e[t]!==l){e[t]=l}}catch(e){}}let o=false;{if(c!==(c=c.replace(/^xlink\:?/,""))){t=c;o=true}}if(l==null||l===false){if(l!==false||e.getAttribute(t)===""){if(o){e.removeAttributeNS(v,t)}else{e.removeAttribute(t)}}}else if((!a||i&4||r)&&!s&&e.nodeType===1){l=l===true?"":l;if(o){e.setAttributeNS(v,t,l)}else{e.setAttribute(t,l)}}}};var ve=/\s/;var de=e=>{if(typeof e==="object"&&e&&"baseVal"in e){e=e.baseVal}if(!e||typeof e!=="string"){return[]}return e.split(ve)};var pe="Capture";var he=new RegExp(pe+"$");var ye=(e,t,n,l)=>{const r=t.C.nodeType===11&&t.C.host?t.C.host:t.C;const i=e&&e.O||{};const s=t.O||{};{for(const e of be(Object.keys(i))){if(!(e in s)){ue(r,e,i[e],void 0,n,t.o)}}}for(const e of be(Object.keys(s))){ue(r,e,i[e],s[e],n,t.o)}};function be(e){return e.includes("ref")?[...e.filter((e=>e!=="ref")),"ref"]:e}var me;var we;var ge;var $e=false;var je=false;var Oe=false;var Se=false;var ke=[];var Ne=[];var Me=(e,r,i)=>{var s;const o=r.S[i];let f=0;let a;let c;let u;if(!$e){Oe=true;if(o.M==="slot"){o.o|=o.S?2:1}}if(o.j!=null){a=o.C=p.document.createTextNode(o.j)}else if(o.o&1){a=o.C=p.document.createTextNode("");{ye(null,o,Se)}}else{if(!Se){Se=o.M==="svg"}if(!p.document){throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.")}a=o.C=p.document.createElementNS(Se?n:l,!$e&&t.slotRelocation&&o.o&2?"slot-fb":o.M);if(Se&&o.M==="foreignObject"){Se=false}{ye(null,o,Se)}if(K(me)&&a["s-si"]!==me){a.classList.add(a["s-si"]=me)}if(o.S){const t=o.M==="template"?a.content:a;for(f=0;f<o.S.length;++f){c=Me(e,o,f);if(c){t.appendChild(c)}}}{if(o.M==="svg"){Se=false}else if(a.tagName==="foreignObject"){Se=true}}}a["s-hn"]=ge;{if(o.o&(2|1)){a["s-sr"]=true;a["s-cr"]=we;a["s-sn"]=o.N||"";a["s-rf"]=(s=o.O)==null?void 0:s.ref;P(a);u=e&&e.S&&e.S[i];if(u&&u.M===o.M&&e.C){Ce(e.C)}{ze(we,a,r.C,e==null?void 0:e.C)}}}return a};var Ce=e=>{y.o|=1;const t=e.closest(ge.toLowerCase());if(t!=null){const n=Array.from(t.__childNodes||t.childNodes).find((e=>e["s-cr"]));const l=Array.from(e.__childNodes||e.childNodes);for(const e of n?l.reverse():l){if(e["s-sh"]!=null){We(t,e,n!=null?n:null);e["s-sh"]=void 0;Oe=true}}}y.o&=-2};var Ee=(e,t)=>{y.o|=1;const n=Array.from(e.__childNodes||e.childNodes);if(e["s-sr"]){let t=e;while(t=t.nextSibling){if(t&&t["s-sn"]===e["s-sn"]&&t["s-sh"]===ge){n.push(t)}}}for(let e=n.length-1;e>=0;e--){const l=n[e];if(l["s-hn"]!==ge&&l["s-ol"]){We(_e(l).parentNode,l,_e(l));l["s-ol"].remove();l["s-ol"]=void 0;l["s-sh"]=void 0;Oe=true}if(t){Ee(l,t)}}y.o&=-2};var Re=(e,t,n,l,r,i)=>{let s=e["s-cr"]&&e["s-cr"].parentNode||e;let o;if(s.shadowRoot&&s.tagName===ge){s=s.shadowRoot}if(n.M==="template"){s=s.content}for(;r<=i;++r){if(l[r]){o=Me(null,n,r);if(o){l[r].C=o;We(s,o,_e(t))}}}};var xe=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.C;De(t);if(e){{je=true;if(e["s-ol"]){e["s-ol"].remove()}else{Ee(e,true)}}e.remove()}}}};var Ae=(e,t,n,l,r=false)=>{let i=0;let s=0;let o=0;let f=0;let a=t.length-1;let c=t[0];let u=t[a];let v=l.length-1;let d=l[0];let p=l[v];let h;let y;const b=n.M==="template"?e.content:e;while(i<=a&&s<=v){if(c==null){c=t[++i]}else if(u==null){u=t[--a]}else if(d==null){d=l[++s]}else if(p==null){p=l[--v]}else if(Le(c,d,r)){Fe(c,d,r);c=t[++i];d=l[++s]}else if(Le(u,p,r)){Fe(u,p,r);u=t[--a];p=l[--v]}else if(Le(c,p,r)){if(c.M==="slot"||p.M==="slot"){Ee(c.C.parentNode,false)}Fe(c,p,r);We(b,c.C,u.C.nextSibling);c=t[++i];p=l[--v]}else if(Le(u,d,r)){if(c.M==="slot"||p.M==="slot"){Ee(u.C.parentNode,false)}Fe(u,d,r);We(b,u.C,c.C);u=t[--a];d=l[++s]}else{o=-1;{for(f=i;f<=a;++f){if(t[f]&&t[f].k!==null&&t[f].k===d.k){o=f;break}}}if(o>=0){y=t[o];if(y.M!==d.M){h=Me(t&&t[s],n,o)}else{Fe(y,d,r);t[o]=void 0;h=y.C}d=l[++s]}else{h=Me(t&&t[s],n,s);d=l[++s]}if(h){{We(_e(c.C).parentNode,h,_e(c.C))}}}}if(i>a){Re(e,l[v+1]==null?null:l[v+1].C,n,l,s,v)}else if(s>v){xe(t,i,a)}};var Le=(e,t,n=false)=>{if(e.M===t.M){if(e.M==="slot"){return e.N===t.N}if(!n){return e.k===t.k}if(n&&!e.k&&t.k){e.k=t.k}return true}return false};var _e=e=>e&&e["s-ol"]||e;var Fe=(e,n,l=false)=>{const r=n.C=e.C;const i=e.S;const s=n.S;const o=n.M;const f=n.j;let a;if(f==null){{Se=o==="svg"?true:o==="foreignObject"?false:Se}{if(o==="slot"&&!$e){if(e.N!==n.N){n.C["s-sn"]=n.N||"";Ce(n.C.parentElement)}}ye(e,n,Se)}if(i!==null&&s!==null){Ae(r,i,n,s,l)}else if(s!==null){if(e.j!==null){r.textContent=""}Re(r,null,n,s,0,s.length-1)}else if(!l&&t.updatable&&i!==null){xe(i,0,i.length-1)}else;if(Se&&o==="svg"){Se=false}}else if(a=r["s-cr"]){a.parentNode.textContent=f}else if(e.j!==f){r.data=f}};var Te=[];var Ue=e=>{let t;let n;let l;const r=e.__childNodes||e.childNodes;for(const e of r){if(e["s-sr"]&&(t=e["s-cr"])&&t.parentNode){n=t.parentNode.__childNodes||t.parentNode.childNodes;const r=e["s-sn"];for(l=n.length-1;l>=0;l--){t=n[l];if(!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==e["s-hn"]&&(!t["s-sh"]||t["s-sh"]!==e["s-hn"])){if(D(t,r)){let n=Te.find((e=>e.R===t));je=true;t["s-sn"]=t["s-sn"]||r;if(n){n.R["s-sh"]=e["s-hn"];n.A=e}else{t["s-sh"]=e["s-hn"];Te.push({A:e,R:t})}if(t["s-sr"]){Te.map((e=>{if(D(e.R,t["s-sn"])){n=Te.find((e=>e.R===t));if(n&&!e.A){e.A=n.A}}}))}}else if(!Te.some((e=>e.R===t))){Te.push({R:t})}}}}if(e.nodeType===1){Ue(e)}}};var De=e=>{{if(e.O&&e.O.ref){ke.push((()=>e.O.ref(null)))}e.S&&e.S.map(De)}};var He=(e,t)=>{{Ne.push((()=>e(t)))}};var Pe=()=>{{ke.forEach((e=>e()));ke.length=0;Ne.forEach((e=>e()));Ne.length=0}};var We=(e,t,n,l)=>{{if(typeof t["s-sn"]==="string"&&!!t["s-sr"]&&!!t["s-cr"]){ze(t["s-cr"],t,e,t.parentElement)}else if(typeof t["s-sn"]==="string"){e.insertBefore(t,n);const{slotNode:r}=z(t);if(r&&!l)W(r);return t}}if(e.__insertBefore){return e.__insertBefore(t,n)}else{return e==null?void 0:e.insertBefore(t,n)}};function ze(e,t,n,l){var r,i;let s;if(e&&typeof t["s-sn"]==="string"&&!!t["s-sr"]&&e.parentNode&&e.parentNode["s-sc"]&&(s=t["s-si"]||e.parentNode["s-sc"])){const e=t["s-sn"];const o=t["s-hn"];(r=n.classList)==null?void 0:r.add(s+"-s");if(l&&((i=l.classList)==null?void 0:i.contains(s+"-s"))){let t=(l.__childNodes||l.childNodes)[0];let n=false;while(t){if(t["s-sn"]!==e&&t["s-hn"]===o&&!!t["s-sr"]){n=true;break}t=t.nextSibling}if(!n)l.classList.remove(s+"-s")}}}var Be=(e,t,n=false)=>{var l,r,i,s,o;const f=e.$hostElement$;const a=e.t;const c=e.L||ee(null,null);const u=ne(t);const v=u?t:X(null,null,t);ge=f.tagName;if(a._){v.O=v.O||{};a._.forEach((([e,t])=>{{v.O[t]=f[e]}}))}if(n&&v.O){for(const e of Object.keys(v.O)){if(f.hasAttribute(e)&&!["key","ref","style","class"].includes(e)){v.O[e]=f[e]}}}v.M=null;v.o|=4;e.L=v;v.C=c.C=f.shadowRoot||f;{me=f["s-sc"]}$e=!!(a.o&1)&&!(a.o&128);{we=f["s-cr"];je=false}Fe(c,v,n);{y.o|=1;if(Oe){Ue(v.C);for(const e of Te){const t=e.R;if(!t["s-ol"]&&p.document){const e=p.document.createTextNode("");e["s-nr"]=t;We(t.parentNode,t["s-ol"]=e,t,n)}}for(const e of Te){const t=e.R;const o=e.A;if(t.nodeType===1&&n){t["s-ih"]=(l=t.hidden)!=null?l:false}if(o){const e=o.parentNode;let l=o.nextSibling;if(l&&l.nodeType===1){let n=(r=t["s-ol"])==null?void 0:r.previousSibling;while(n){let r=(i=n["s-nr"])!=null?i:null;if(r&&r["s-sn"]===t["s-sn"]&&e===(r.__parentNode||r.parentNode)){r=r.nextSibling;while(r===t||(r==null?void 0:r["s-sr"])){r=r==null?void 0:r.nextSibling}if(!r||!r["s-nr"]){l=r;break}}n=n.previousSibling}}const f=t.__parentNode||t.parentNode;const a=t.__nextSibling||t.nextSibling;if(!l&&e!==f||a!==l){if(t!==l){We(e,t,l,n);if(t.nodeType===8&&t.nodeValue.startsWith("s-nt-")){const e=p.document.createTextNode(t.nodeValue.replace(/^s-nt-/,""));e["s-hn"]=t["s-hn"];e["s-sn"]=t["s-sn"];e["s-sh"]=t["s-sh"];e["s-sr"]=t["s-sr"];e["s-ol"]=t["s-ol"];e["s-ol"]["s-nr"]=e;We(t.parentNode,e,t,n);t.parentNode.removeChild(t)}if(t.nodeType===1&&t.tagName!=="SLOT-FB"){t.hidden=(s=t["s-ih"])!=null?s:false}}}t&&typeof o["s-rf"]==="function"&&o["s-rf"](o)}else if(t.nodeType===1){t.hidden=true}}}if(je){_(v.C)}y.o&=-2;Te.length=0}if(!$e&&!(a.o&1)&&f["s-cr"]){const e=v.C.__childNodes||v.C.childNodes;for(const t of e){if(t["s-hn"]!==ge&&!t["s-sh"]){if(n&&t["s-ih"]==null){t["s-ih"]=(o=t.hidden)!=null?o:false}if(t.nodeType===1){t.hidden=true}else if(t.nodeType===3&&!!t.nodeValue.trim()){const e=p.document.createComment("s-nt-"+t.nodeValue);e["s-sn"]=t["s-sn"];We(t.parentNode,e,t,n);t.parentNode.removeChild(t)}}}}we=void 0;Pe()};var Ve=(e,t)=>{if(t&&!e.F&&t["s-p"]){const n=t["s-p"].push(new Promise((l=>e.F=()=>{t["s-p"].splice(n-1,1);l()})))}};var qe=(e,t)=>{{e.o|=16}if(e.o&4){e.o|=512;return}Ve(e,e.T);const n=()=>Ye(e,t);if(t){queueMicrotask((()=>{n()}));return}return C(n)};var Ye=(e,t)=>{const n=e.$hostElement$;const l=V("scheduleUpdate",e.t.$);const r=n;if(!r){throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`)}let i;if(t){i=Xe(r,"componentWillLoad",void 0,n)}else{i=Xe(r,"componentWillUpdate",void 0,n)}i=Ie(i,(()=>Xe(r,"componentWillRender",void 0,n)));l();return Ie(i,(()=>Ge(e,r,t)))};var Ie=(e,t)=>Ze(e)?e.then(t).catch((e=>{console.error(e);t()})):t();var Ze=e=>e instanceof Promise||e&&e.then&&typeof e.then==="function";var Ge=async(e,t,n)=>{var l;const r=e.$hostElement$;const i=V("update",e.t.$);const s=r["s-rc"];if(n){G(e)}const o=V("render",e.t.$);{Je(e,t,r,n)}if(s){s.map((e=>e()));r["s-rc"]=void 0}o();i();{const t=(l=r["s-p"])!=null?l:[];const n=()=>Ke(e);if(t.length===0){n()}else{Promise.all(t).then(n).catch(n);e.o|=4;t.length=0}}};var Je=(e,t,n,l)=>{try{t=t.render();{e.o&=-17}{e.o|=2}{{{Be(e,t,l)}}}}catch(t){a(t,e.$hostElement$)}return null};var Ke=e=>{const t=e.t.$;const n=e.$hostElement$;const l=V("postUpdate",t);const r=n;const i=e.T;Xe(r,"componentDidRender",void 0,n);if(!(e.o&64)){e.o|=64;{et(n)}Xe(r,"componentDidLoad",void 0,n);l();{e.p(n);if(!i){Qe()}}}else{Xe(r,"componentDidUpdate",void 0,n);l()}{if(e.F){e.F();e.F=void 0}if(e.o&512){M((()=>qe(e,false)))}e.o&=-517}};var Qe=t=>{M((()=>ce(p,"appload",{detail:{namespace:e}})))};var Xe=(e,t,n,l)=>{if(e&&e[t]){try{return e[t](n)}catch(e){a(e,l)}}return void 0};var et=e=>{var n;return e.classList.add((n=t.hydratedSelectorName)!=null?n:"hydrated")};var tt=(e,t)=>s(e).i.get(t);var nt=(e,t,n,l)=>{const r=s(e);if(!r){return}const i=e;const o=r.i.get(t);const f=r.o;const c=i;n=oe(n,l.l[t][0],!!(l.o&64));const u=Number.isNaN(o)&&Number.isNaN(n);const v=n!==o&&!u;if(v){r.i.set(t,n);if(l.U){const e=l.U[t];if(e){e.map((e=>{try{const[[l,i]]=Object.entries(e);if(f&128||i&1){if(!c){r.D.push((()=>{r.H[l](n,o,t)}))}else{c[l](n,o,t)}}}catch(e){a(e,i)}}))}}if(f&2){if(c.componentShouldUpdate){const e=c.componentShouldUpdate(n,o,t);if(e===false&&!(f&16)){return}}if(!(f&16)){qe(r,false)}}}};var lt=(e,n,l)=>{var i,o;const f=e.prototype;if(n.o&64&&l&1){d.forEach((e=>{const t=f[e];Object.defineProperty(f,e,{value(...n){var l;const r=s(this);const i=this;if(!i){(l=r==null?void 0:r.v)==null?void 0:l.then((t=>{const l=t[e];typeof l==="function"&&l.call(t,...n)}))}else{const e=t;typeof e==="function"&&e.call(i,...n)}}})}))}{{if(e.watchers&&!n.U){n.U=se(e.watchers)}if(e.deserializers&&!n.P){n.P=e.deserializers}if(e.serializers&&!n.W){n.W=e.serializers}}const l=Object.entries((i=n.l)!=null?i:{});l.map((([e,[t]])=>{if(t&31||t&32){const{get:l,set:i}=r(f,e)||{};if(l)n.l[e][0]|=2048;if(i)n.l[e][0]|=4096;{Object.defineProperty(f,e,{get(){{return l?l.apply(this):tt(this,e)}},configurable:true,enumerable:true})}Object.defineProperty(f,e,{set(l){const r=s(this);if(!r){return}if(i){const s=t&32?this[e]:r.$hostElement$[e];if(typeof s==="undefined"&&r.i.get(e)){l=r.i.get(e)}i.apply(this,[oe(l,t,!!(n.o&64))]);l=t&32?this[e]:r.$hostElement$[e];nt(this,e,l,n);return}{nt(this,e,l,n);return}}})}}));{const r=new Map;f.attributeChangedCallback=function(e,i,o){y.jmp((()=>{var a;const c=r.get(e);const u=s(this);if(this.hasOwnProperty(c)&&t.lazyLoad);if(f.hasOwnProperty(c)&&typeof this[c]==="number"&&this[c]==o){return}else if(c==null){const t=u==null?void 0:u.o;if(u&&t&&!(t&8)&&o!==i){const l=this;const r=l;const s=(a=n.U)==null?void 0:a[e];s==null?void 0:s.forEach((n=>{const[[l,s]]=Object.entries(n);if(r[l]!=null&&(t&128||s&1)){r[l].call(r,o,i,e)}}))}return}const v=l.find((([e])=>e===c));const d=v&&v[1][0]&4;const p=d&&o===null&&this[c]===void 0;if(d){o=o===null||o==="false"?false:true}const h=Object.getOwnPropertyDescriptor(f,c);if(!p&&o!=this[c]&&(!h.get||!!h.set)){this[c]=o}}))};e.observedAttributes=Array.from(new Set([...Object.keys((o=n.U)!=null?o:{}),...l.filter((([e,t])=>t[0]&31)).map((([e,t])=>{var l;const i=t[1]||e;r.set(i,e);if(t[0]&512){(l=n._)==null?void 0:l.push([e,i])}return i}))]))}}return e};var rt=async(e,n,l,r)=>{let i;try{if((n.o&32)===0){n.o|=32;{i=e.constructor;const t=e.localName;customElements.whenDefined(t).then((()=>n.o|=128))}if(i&&i.style){let e;if(typeof i.style==="string"){e=i.style}const n=J(l);if(!c.has(n)||t.hotModuleReplacement){const t=V("registerStyles",l.$);I(n,e,!!(l.o&1));t()}}}const r=n.T;const s=()=>qe(n,true);if(r&&r["s-rc"]){r["s-rc"].push(s)}else{s()}}catch(t){a(t,e);if(n.F){n.F();n.F=void 0}if(n.p){n.p(e)}}};var it=(e,t)=>{};var st=e=>{if((y.o&1)===0){const t=s(e);if(!t){return}const n=t.t;const l=V("connectedCallback",n.$);if(!(t.o&1)){t.o|=1;{if(n.o&(4|8)){ot(e)}}{let n=e;while(n=n.parentNode||n.host){if(n["s-p"]){Ve(t,t.T=n);break}}}if(n.l){Object.entries(n.l).map((([t,[n]])=>{if(n&31&&Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];delete e[t];e[t]=n}}))}{rt(e,t,n)}}else{ct(e,t,n.B);if(t==null?void 0:t.H);else if(t==null?void 0:t.v){t.v.then((()=>it()))}}l()}};var ot=e=>{if(!p.document){return}const t=e["s-cr"]=p.document.createComment("");t["s-cn"]=true;We(e,t,e.firstChild)};var ft=async e=>{if((y.o&1)===0){const t=s(e);{if(t==null?void 0:t.V){t.V.map((e=>e()));t.V=void 0}}}if(Y.has(e)){Y.delete(e)}if(e.shadowRoot&&Y.has(e.shadowRoot)){Y.delete(e.shadowRoot)}};var at=(e,t)=>{const n={o:t[0],$:t[1]};try{{n.l=t[2]}{n.B=t[3]}{n.U=se(e.U);n.P=e.P;n.W=e.W}{n._=[]}const l=e.prototype.connectedCallback;const r=e.prototype.disconnectedCallback;Object.assign(e.prototype,{__hasHostListenerAttached:false,__registerHost(){o(this,n)},connectedCallback(){if(!this.__hasHostListenerAttached){const e=s(this);if(!e){return}ct(this,e,n.B);this.__hasHostListenerAttached=true}st(this);if(l){l.call(this)}},disconnectedCallback(){ft(this);if(r){r.call(this)}},__attachShadow(){{if(!this.shadowRoot){L.call(this,n)}else{if(this.shadowRoot.mode!=="open"){throw new Error(`Unable to re-use existing shadow root for ${n.$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}}}}});Object.defineProperty(e,"is",{value:n.$,configurable:true});return lt(e,n,1|2)}catch(t){a(t);return e}};var ct=(e,t,n,l)=>{if(n&&p.document){n.map((([n,l,r])=>{const i=vt(p.document,e,n);const s=ut(t,r);const o=dt(n);y.ael(i,l,s,o);(t.V=t.V||[]).push((()=>y.rel(i,l,s,o)))}))}};var ut=(e,t)=>n=>{try{{e.$hostElement$[t](n)}}catch(t){a(t,e.$hostElement$)}};var vt=(e,t,n)=>{if(n&8){return p}return t};var dt=e=>b?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0;var pt=e=>y.m=e;var ht=e=>Object.assign(y,e);var yt=new WeakMap;function bt(e,t){let n=yt.get(t);if(!n){const e={o:0,$:t.tagName};n={o:0,t:e,$hostElement$:t};yt.set(t,n)}Be(n,e)}function mt(e){return e}export{h as H,te as a,ae as c,E as getAssetPath,X as h,at as p,bt as render,R as setAssetPath,pt as setNonce,ht as setPlatformOptions,mt as t};
1
+ const e="ds-mo";const t={hotModuleReplacement:false,hydratedSelectorName:"hydrated",lazyLoad:false,slotRelocation:true,state:true,updatable:true};var n="http://www.w3.org/2000/svg";var l="http://www.w3.org/1999/xhtml";function r(e,t,n){const l=typeof HTMLElement!=="undefined"?HTMLElement.prototype:null;while(e&&e!==l){const l=Object.getOwnPropertyDescriptor(e,t);if(l&&(!n||l.get))return l;e=Object.getPrototypeOf(e)}return void 0}var i=(e,t)=>{var n;const l=t.t;const i=Object.entries((n=l.l)!=null?n:{});i.map((([n,[l]])=>{if(l&31||l&32){const l=e[n];const i=r(Object.getPrototypeOf(e),n,true)||Object.getOwnPropertyDescriptor(e,n);if(i){Object.defineProperty(e,n,{get(){return i.get.call(this)},set(e){i.set.call(this,e)},configurable:true,enumerable:true})}if(t.i.has(n)){e[n]=t.i.get(n)}else if(l!==void 0){e[n]=l}}}))};var s=e=>{if(e.__stencil__getHostRef){return e.__stencil__getHostRef()}return void 0};var o=(e,n)=>{const l={o:0,$hostElement$:e,t:n,i:new Map,u:new Map};{l.v=new Promise((e=>l.p=e));e["s-p"]=[];e["s-rc"]=[]}const r=l;e.__stencil__getHostRef=()=>r;if(n.o&512&&t.state){i(e,l)}return r};var f=(e,t)=>t in e;var a=(e,t)=>(0,console.error)(e,t);var c=new Map;var u="slot-fb{display:contents}slot-fb[hidden]{display:none}";var v="http://www.w3.org/1999/xlink";var d=["formAssociatedCallback","formResetCallback","formDisabledCallback","formStateRestoreCallback"];var p=typeof window!=="undefined"?window:{};var h=p.HTMLElement||class{};var y={o:0,h:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)};var b=(()=>{var e;let t=false;try{(e=p.document)==null?void 0:e.addEventListener("e",null,Object.defineProperty({},"passive",{get(){t=true}}))}catch(e){}return t})();var m=e=>Promise.resolve(e);var w=(()=>{try{if(!p.document.adoptedStyleSheets){return false}new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false})();var g=w?(()=>!!p.document&&Object.getOwnPropertyDescriptor(p.document.adoptedStyleSheets,"length").writable)():false;var $=false;var j=[];var O=[];var S=(e,t)=>n=>{e.push(n);if(!$){$=true;if(t&&y.o&4){M(N)}else{y.raf(N)}}};var k=e=>{for(let t=0;t<e.length;t++){try{e[t](performance.now())}catch(e){a(e)}}e.length=0};var N=()=>{k(j);{k(O);if($=j.length>0){y.raf(N)}}};var M=e=>m().then(e);var C=S(O,true);var E=e=>{const t=new URL(e,y.h);return t.origin!==p.location.origin?t.href:t.pathname};var R=e=>y.h=e;function x(e){return void 0}var A;function L(e){var t;const n={mode:"open"};const l=this.attachShadow(n);if(A===void 0)A=(t=x())!=null?t:null;if(A){if(g){l.adoptedStyleSheets.push(A)}else{l.adoptedStyleSheets=[...l.adoptedStyleSheets,A]}}}var _=e=>{const t=B(e,"childNodes");if(e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"){T(t,e.tagName).forEach((e=>{if(e.nodeType===1&&e.tagName==="SLOT-FB"){if(U(e,H(e),false).length){e.hidden=true}else{e.hidden=false}}}))}let n=0;for(n=0;n<t.length;n++){const e=t[n];if(e.nodeType===1&&B(e,"childNodes").length){_(e)}}};var F=e=>{const t=[];for(let n=0;n<e.length;n++){const l=e[n]["s-nr"]||void 0;if(l&&l.isConnected){t.push(l)}}return t};function T(e,t,n){let l=0;let r=[];let i;for(;l<e.length;l++){i=e[l];if(i["s-sr"]&&(!t||i["s-hn"]===t)&&(n===void 0||H(i)===n)){r.push(i);if(typeof n!=="undefined")return r}r=[...r,...T(i.childNodes,t,n)]}return r}var U=(e,t,n=true)=>{const l=[];if(n&&e["s-sr"]||!e["s-sr"])l.push(e);let r=e;while(r=r.nextSibling){if(H(r)===t&&(n||!r["s-sr"]))l.push(r)}return l};var D=(e,t)=>{if(e.nodeType===1){if(e.getAttribute("slot")===null&&t===""){return true}if(e.getAttribute("slot")===t){return true}return false}if(e["s-sn"]===t){return true}return t===""};var H=e=>typeof e["s-sn"]==="string"?e["s-sn"]:e.nodeType===1&&e.getAttribute("slot")||void 0;function P(e){if(e.assignedElements||e.assignedNodes||!e["s-sr"])return;const t=t=>function(e){const n=[];const l=this["s-sn"];if(e==null?void 0:e.flatten){console.error(`\n Flattening is not supported for Stencil non-shadow slots.\n You can use \`.childNodes\` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n `)}const r=this["s-cr"].parentElement;const i=r.__childNodes?r.childNodes:F(r.childNodes);i.forEach((e=>{if(l===H(e)){n.push(e)}}));if(t){return n.filter((e=>e.nodeType===1))}return n}.bind(e);e.assignedElements=t(true);e.assignedNodes=t(false)}function W(e){e.dispatchEvent(new CustomEvent("slotchange",{bubbles:false,cancelable:false,composed:false}))}function z(e,t){var n;t=t||((n=e["s-ol"])==null?void 0:n.parentElement);if(!t)return{slotNode:null,slotName:""};const l=e["s-sn"]=H(e)||"";const r=B(t,"childNodes");const i=T(r,t.tagName,l)[0];return{slotNode:i,slotName:l}}function B(e,t){if("__"+t in e){const n=e["__"+t];if(typeof n!=="function")return n;return n.bind(e)}else{if(typeof e[t]!=="function")return e[t];return e[t].bind(e)}}var V=(e,t="")=>{{return()=>{}}};function q(e){var t,n,l;return(l=(n=(t=e.head)==null?void 0:t.querySelector('meta[name="csp-nonce"]'))==null?void 0:n.getAttribute("content"))!=null?l:void 0}var Y=new WeakMap;var I=(e,t,n)=>{let l=c.get(e);if(w&&n){l=l||new CSSStyleSheet;if(typeof l==="string"){l=t}else{l.replaceSync(t)}}else{l=t}c.set(e,l)};var Z=(e,t,n)=>{var l,r,i;const s=J(t);const o=c.get(s);if(!p.document){return s}e=e.nodeType===11?e:p.document;if(o){if(typeof o==="string"){e=e.head||e;let n=Y.get(e);let i;if(!n){Y.set(e,n=new Set)}if(!n.has(s)){i=p.document.createElement("style");i.textContent=o;const f=(l=y.m)!=null?l:q(p.document);if(f!=null){i.setAttribute("nonce",f)}if(!(t.o&1)){if(e.nodeName==="HEAD"){const t=e.querySelectorAll("link[rel=preconnect]");const n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(i,(n==null?void 0:n.parentNode)===e?n:null)}else if("host"in e){if(w){const t=(r=e.defaultView)!=null?r:e.ownerDocument.defaultView;const n=new t.CSSStyleSheet;n.replaceSync(o);if(g){e.adoptedStyleSheets.unshift(n)}else{e.adoptedStyleSheets=[n,...e.adoptedStyleSheets]}}else{const t=e.querySelector("style");if(t&&true){t.textContent=o+t.textContent}else{e.prepend(i)}}}else{e.append(i)}}if(t.o&1){e.insertBefore(i,null)}if(t.o&4){i.textContent+=u}if(n){n.add(s)}}}else{let t=Y.get(e);if(!t){Y.set(e,t=new Set)}if(!t.has(s)){const n=(i=e.defaultView)!=null?i:e.ownerDocument.defaultView;let l;if(o.constructor===n.CSSStyleSheet){l=o}else{l=new n.CSSStyleSheet;for(let e=0;e<o.cssRules.length;e++){l.insertRule(o.cssRules[e].cssText,e)}}if(g){e.adoptedStyleSheets.push(l)}else{e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]}t.add(s)}}}return s};var G=e=>{const t=e.t;const n=e.$hostElement$;const l=t.o;const r=V("attachStyles",t.$);const i=Z(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);if(l&10){n["s-sc"]=i;n.classList.add(i+"-h")}r()};var J=(e,t)=>"sc-"+e.$;var K=e=>e!=null&&e!==void 0;var Q=e=>{e=typeof e;return e==="object"||e==="function"};var X=(e,t,...n)=>{if(typeof e==="string"){e=wt(e)}let l=null;let r=null;let i=null;let s=false;let o=false;const f=[];const a=t=>{for(let n=0;n<t.length;n++){l=t[n];if(Array.isArray(l)){a(l)}else if(l!=null&&typeof l!=="boolean"){if(s=typeof e!=="function"&&!Q(l)){l=String(l)}if(s&&o){f[f.length-1].j+=l}else{f.push(s?ee(null,l):l)}o=s}}};a(n);if(t){if(t.key){r=t.key}if(t.name){i=t.name}{const e=t.className||t.class;if(e){t.class=typeof e!=="object"?e:Object.keys(e).filter((t=>e[t])).join(" ")}}}if(typeof e==="function"){return e(t===null?{}:t,f,le)}const c=ee(e,null);c.O=t;if(f.length>0){c.S=f}{c.k=r}{c.N=i}return c};var ee=(e,t)=>{const n={o:0,M:e,j:t!=null?t:null,C:null,S:null};{n.O=null}{n.k=null}{n.N=null}return n};var te={};var ne=e=>e&&e.M===te;var le={forEach:(e,t)=>e.map(re).forEach(t),map:(e,t)=>e.map(re).map(t).map(ie)};var re=e=>({vattrs:e.O,vchildren:e.S,vkey:e.k,vname:e.N,vtag:e.M,vtext:e.j});var ie=e=>{if(typeof e.vtag==="function"){const t={...e.vattrs};if(e.vkey){t.key=e.vkey}if(e.vname){t.name=e.vname}return X(e.vtag,t,...e.vchildren||[])}const t=ee(e.vtag,e.vtext);t.O=e.vattrs;t.S=e.vchildren;t.k=e.vkey;t.N=e.vname;return t};var se=e=>{if(!e)return void 0;const t=Object.keys(e);if(t.length===0)return void 0;let n=false;for(const l of t){if(n)break;for(const t of e[l]){if(typeof t==="string"){n=true;break}}}if(!n)return e;const l={};for(const n of t){l[n]=e[n].map((e=>typeof e==="string"?{[e]:0}:e))}return l};var oe=(e,t,n)=>{if(e!=null&&!Q(e)){if(t&4){if(n&&typeof e==="string"){return e===""||!!e}else{return e==="false"?false:e===""||!!e}}if(t&2){return typeof e==="string"?parseFloat(e):typeof e==="number"?e:NaN}if(t&1){return String(e)}return e}return e};var fe=e=>e;var ae=(e,t,n)=>{const l=fe(e);return{emit:e=>ce(l,t,{bubbles:true,composed:true,cancelable:true,detail:e})}};var ce=(e,t,n)=>{const l=y.ce(t,n);e.dispatchEvent(l);return l};var ue=(e,t,n,l,r,i,o)=>{if(n===l){return}let a=f(e,t);let c=t.toLowerCase();if(t==="class"){const t=e.classList;const r=de(n);let i=de(l);{t.remove(...r.filter((e=>e&&!i.includes(e))));t.add(...i.filter((e=>e&&!r.includes(e))))}}else if(t==="style"){{for(const t in n){if(!l||l[t]==null){if(t.includes("-")){e.style.removeProperty(t)}else{e.style[t]=""}}}}for(const t in l){if(!n||l[t]!==n[t]){if(t.includes("-")){e.style.setProperty(t,l[t])}else{e.style[t]=l[t]}}}}else if(t==="key");else if(t==="ref"){if(l){He(l,e)}}else if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"){t=t.slice(3)}else if(f(p,c)){t=c.slice(2)}else{t=c[2]+t.slice(3)}if(n||l){const r=t.endsWith(pe);t=t.replace(he,"");if(n){y.rel(e,t,n,r)}if(l){y.ael(e,t,l,r)}}}else if(t[0]==="a"&&t.startsWith("attr:")){const n=t.slice(5);let r;{const t=s(e);if(t&&t.t&&t.t.l){const e=t.t.l[n];if(e&&e[1]){r=e[1]}}}if(!r){r=n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}if(l==null||l===false){if(l!==false||e.getAttribute(r)===""){e.removeAttribute(r)}}else{e.setAttribute(r,l===true?"":l)}return}else if(t[0]==="p"&&t.startsWith("prop:")){const n=t.slice(5);try{e[n]=l}catch(e){}return}else{const s=Q(l);if((a||s&&l!==null)&&!r){try{if(!e.tagName.includes("-")){const r=l==null?"":l;if(t==="list"){a=false}else if(n==null||e[t]!==r){if(typeof e.__lookupSetter__(t)==="function"){e[t]=r}else{e.setAttribute(t,r)}}}else if(e[t]!==l){e[t]=l}}catch(e){}}let o=false;{if(c!==(c=c.replace(/^xlink\:?/,""))){t=c;o=true}}if(l==null||l===false){if(l!==false||e.getAttribute(t)===""){if(o){e.removeAttributeNS(v,t)}else{e.removeAttribute(t)}}}else if((!a||i&4||r)&&!s&&e.nodeType===1){l=l===true?"":l;if(o){e.setAttributeNS(v,t,l)}else{e.setAttribute(t,l)}}}};var ve=/\s/;var de=e=>{if(typeof e==="object"&&e&&"baseVal"in e){e=e.baseVal}if(!e||typeof e!=="string"){return[]}return e.split(ve)};var pe="Capture";var he=new RegExp(pe+"$");var ye=(e,t,n,l)=>{const r=t.C.nodeType===11&&t.C.host?t.C.host:t.C;const i=e&&e.O||{};const s=t.O||{};{for(const e of be(Object.keys(i))){if(!(e in s)){ue(r,e,i[e],void 0,n,t.o)}}}for(const e of be(Object.keys(s))){ue(r,e,i[e],s[e],n,t.o)}};function be(e){return e.includes("ref")?[...e.filter((e=>e!=="ref")),"ref"]:e}var me;var we;var ge;var $e=false;var je=false;var Oe=false;var Se=false;var ke=[];var Ne=[];var Me=(e,r,i)=>{var s;const o=r.S[i];let f=0;let a;let c;let u;if(!$e){Oe=true;if(o.M==="slot"){o.o|=o.S?2:1}}if(o.j!=null){a=o.C=p.document.createTextNode(o.j)}else if(o.o&1){a=o.C=p.document.createTextNode("");{ye(null,o,Se)}}else{if(!Se){Se=o.M==="svg"}if(!p.document){throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.")}a=o.C=p.document.createElementNS(Se?n:l,!$e&&t.slotRelocation&&o.o&2?"slot-fb":o.M);if(Se&&o.M==="foreignObject"){Se=false}{ye(null,o,Se)}if(K(me)&&a["s-si"]!==me){a.classList.add(a["s-si"]=me)}if(o.S){const t=o.M==="template"?a.content:a;for(f=0;f<o.S.length;++f){c=Me(e,o,f);if(c){t.appendChild(c)}}}{if(o.M==="svg"){Se=false}else if(a.tagName==="foreignObject"){Se=true}}}a["s-hn"]=ge;{if(o.o&(2|1)){a["s-sr"]=true;a["s-cr"]=we;a["s-sn"]=o.N||"";a["s-rf"]=(s=o.O)==null?void 0:s.ref;P(a);u=e&&e.S&&e.S[i];if(u&&u.M===o.M&&e.C){Ce(e.C)}{ze(we,a,r.C,e==null?void 0:e.C)}}}return a};var Ce=e=>{y.o|=1;const t=e.closest(ge.toLowerCase());if(t!=null){const n=Array.from(t.__childNodes||t.childNodes).find((e=>e["s-cr"]));const l=Array.from(e.__childNodes||e.childNodes);for(const e of n?l.reverse():l){if(e["s-sh"]!=null){We(t,e,n!=null?n:null);e["s-sh"]=void 0;Oe=true}}}y.o&=-2};var Ee=(e,t)=>{y.o|=1;const n=Array.from(e.__childNodes||e.childNodes);if(e["s-sr"]){let t=e;while(t=t.nextSibling){if(t&&t["s-sn"]===e["s-sn"]&&t["s-sh"]===ge){n.push(t)}}}for(let e=n.length-1;e>=0;e--){const l=n[e];if(l["s-hn"]!==ge&&l["s-ol"]){We(_e(l).parentNode,l,_e(l));l["s-ol"].remove();l["s-ol"]=void 0;l["s-sh"]=void 0;Oe=true}if(t){Ee(l,t)}}y.o&=-2};var Re=(e,t,n,l,r,i)=>{let s=e["s-cr"]&&e["s-cr"].parentNode||e;let o;if(s.shadowRoot&&s.tagName===ge){s=s.shadowRoot}if(n.M==="template"){s=s.content}for(;r<=i;++r){if(l[r]){o=Me(null,n,r);if(o){l[r].C=o;We(s,o,_e(t))}}}};var xe=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.C;De(t);if(e){{je=true;if(e["s-ol"]){e["s-ol"].remove()}else{Ee(e,true)}}e.remove()}}}};var Ae=(e,t,n,l,r=false)=>{let i=0;let s=0;let o=0;let f=0;let a=t.length-1;let c=t[0];let u=t[a];let v=l.length-1;let d=l[0];let p=l[v];let h;let y;const b=n.M==="template"?e.content:e;while(i<=a&&s<=v){if(c==null){c=t[++i]}else if(u==null){u=t[--a]}else if(d==null){d=l[++s]}else if(p==null){p=l[--v]}else if(Le(c,d,r)){Fe(c,d,r);c=t[++i];d=l[++s]}else if(Le(u,p,r)){Fe(u,p,r);u=t[--a];p=l[--v]}else if(Le(c,p,r)){if(c.M==="slot"||p.M==="slot"){Ee(c.C.parentNode,false)}Fe(c,p,r);We(b,c.C,u.C.nextSibling);c=t[++i];p=l[--v]}else if(Le(u,d,r)){if(c.M==="slot"||p.M==="slot"){Ee(u.C.parentNode,false)}Fe(u,d,r);We(b,u.C,c.C);u=t[--a];d=l[++s]}else{o=-1;{for(f=i;f<=a;++f){if(t[f]&&t[f].k!==null&&t[f].k===d.k){o=f;break}}}if(o>=0){y=t[o];if(y.M!==d.M){h=Me(t&&t[s],n,o)}else{Fe(y,d,r);t[o]=void 0;h=y.C}d=l[++s]}else{h=Me(t&&t[s],n,s);d=l[++s]}if(h){{We(_e(c.C).parentNode,h,_e(c.C))}}}}if(i>a){Re(e,l[v+1]==null?null:l[v+1].C,n,l,s,v)}else if(s>v){xe(t,i,a)}};var Le=(e,t,n=false)=>{if(e.M===t.M){if(e.M==="slot"){return e.N===t.N}if(!n){return e.k===t.k}if(n&&!e.k&&t.k){e.k=t.k}return true}return false};var _e=e=>e&&e["s-ol"]||e;var Fe=(e,n,l=false)=>{const r=n.C=e.C;const i=e.S;const s=n.S;const o=n.M;const f=n.j;let a;if(f==null){{Se=o==="svg"?true:o==="foreignObject"?false:Se}{if(o==="slot"&&!$e){if(e.N!==n.N){n.C["s-sn"]=n.N||"";Ce(n.C.parentElement)}}ye(e,n,Se)}if(i!==null&&s!==null){Ae(r,i,n,s,l)}else if(s!==null){if(e.j!==null){r.textContent=""}Re(r,null,n,s,0,s.length-1)}else if(!l&&t.updatable&&i!==null){xe(i,0,i.length-1)}else;if(Se&&o==="svg"){Se=false}}else if(a=r["s-cr"]){a.parentNode.textContent=f}else if(e.j!==f){r.data=f}};var Te=[];var Ue=e=>{let t;let n;let l;const r=e.__childNodes||e.childNodes;for(const e of r){if(e["s-sr"]&&(t=e["s-cr"])&&t.parentNode){n=t.parentNode.__childNodes||t.parentNode.childNodes;const r=e["s-sn"];for(l=n.length-1;l>=0;l--){t=n[l];if(!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==e["s-hn"]&&(!t["s-sh"]||t["s-sh"]!==e["s-hn"])){if(D(t,r)){let n=Te.find((e=>e.R===t));je=true;t["s-sn"]=t["s-sn"]||r;if(n){n.R["s-sh"]=e["s-hn"];n.A=e}else{t["s-sh"]=e["s-hn"];Te.push({A:e,R:t})}if(t["s-sr"]){Te.map((e=>{if(D(e.R,t["s-sn"])){n=Te.find((e=>e.R===t));if(n&&!e.A){e.A=n.A}}}))}}else if(!Te.some((e=>e.R===t))){Te.push({R:t})}}}}if(e.nodeType===1){Ue(e)}}};var De=e=>{{if(e.O&&e.O.ref){ke.push((()=>e.O.ref(null)))}e.S&&e.S.map(De)}};var He=(e,t)=>{{Ne.push((()=>e(t)))}};var Pe=()=>{{ke.forEach((e=>e()));ke.length=0;Ne.forEach((e=>e()));Ne.length=0}};var We=(e,t,n,l)=>{{if(typeof t["s-sn"]==="string"&&!!t["s-sr"]&&!!t["s-cr"]){ze(t["s-cr"],t,e,t.parentElement)}else if(typeof t["s-sn"]==="string"){e.insertBefore(t,n);const{slotNode:r}=z(t);if(r&&!l)W(r);return t}}if(e.__insertBefore){return e.__insertBefore(t,n)}else{return e==null?void 0:e.insertBefore(t,n)}};function ze(e,t,n,l){var r,i;let s;if(e&&typeof t["s-sn"]==="string"&&!!t["s-sr"]&&e.parentNode&&e.parentNode["s-sc"]&&(s=t["s-si"]||e.parentNode["s-sc"])){const e=t["s-sn"];const o=t["s-hn"];(r=n.classList)==null?void 0:r.add(s+"-s");if(l&&((i=l.classList)==null?void 0:i.contains(s+"-s"))){let t=(l.__childNodes||l.childNodes)[0];let n=false;while(t){if(t["s-sn"]!==e&&t["s-hn"]===o&&!!t["s-sr"]){n=true;break}t=t.nextSibling}if(!n)l.classList.remove(s+"-s")}}}var Be=(e,t,n=false)=>{var l,r,i,s,o;const f=e.$hostElement$;const a=e.t;const c=e.L||ee(null,null);const u=ne(t);const v=u?t:X(null,null,t);ge=f.tagName;if(a._){v.O=v.O||{};a._.forEach((([e,t])=>{{v.O[t]=f[e]}}))}if(n&&v.O){for(const e of Object.keys(v.O)){if(f.hasAttribute(e)&&!["key","ref","style","class"].includes(e)){v.O[e]=f[e]}}}v.M=null;v.o|=4;e.L=v;v.C=c.C=f.shadowRoot||f;{me=f["s-sc"]}$e=!!(a.o&1)&&!(a.o&128);{we=f["s-cr"];je=false}Fe(c,v,n);{y.o|=1;if(Oe){Ue(v.C);for(const e of Te){const t=e.R;if(!t["s-ol"]&&p.document){const e=p.document.createTextNode("");e["s-nr"]=t;We(t.parentNode,t["s-ol"]=e,t,n)}}for(const e of Te){const t=e.R;const o=e.A;if(t.nodeType===1&&n){t["s-ih"]=(l=t.hidden)!=null?l:false}if(o){const e=o.parentNode;let l=o.nextSibling;if(l&&l.nodeType===1){let n=(r=t["s-ol"])==null?void 0:r.previousSibling;while(n){let r=(i=n["s-nr"])!=null?i:null;if(r&&r["s-sn"]===t["s-sn"]&&e===(r.__parentNode||r.parentNode)){r=r.nextSibling;while(r===t||(r==null?void 0:r["s-sr"])){r=r==null?void 0:r.nextSibling}if(!r||!r["s-nr"]){l=r;break}}n=n.previousSibling}}const f=t.__parentNode||t.parentNode;const a=t.__nextSibling||t.nextSibling;if(!l&&e!==f||a!==l){if(t!==l){We(e,t,l,n);if(t.nodeType===8&&t.nodeValue.startsWith("s-nt-")){const e=p.document.createTextNode(t.nodeValue.replace(/^s-nt-/,""));e["s-hn"]=t["s-hn"];e["s-sn"]=t["s-sn"];e["s-sh"]=t["s-sh"];e["s-sr"]=t["s-sr"];e["s-ol"]=t["s-ol"];e["s-ol"]["s-nr"]=e;We(t.parentNode,e,t,n);t.parentNode.removeChild(t)}if(t.nodeType===1&&t.tagName!=="SLOT-FB"){t.hidden=(s=t["s-ih"])!=null?s:false}}}t&&typeof o["s-rf"]==="function"&&o["s-rf"](o)}else if(t.nodeType===1){t.hidden=true}}}if(je){_(v.C)}y.o&=-2;Te.length=0}if(!$e&&!(a.o&1)&&f["s-cr"]){const e=v.C.__childNodes||v.C.childNodes;for(const t of e){if(t["s-hn"]!==ge&&!t["s-sh"]){if(n&&t["s-ih"]==null){t["s-ih"]=(o=t.hidden)!=null?o:false}if(t.nodeType===1){t.hidden=true}else if(t.nodeType===3&&!!t.nodeValue.trim()){const e=p.document.createComment("s-nt-"+t.nodeValue);e["s-sn"]=t["s-sn"];We(t.parentNode,e,t,n);t.parentNode.removeChild(t)}}}}we=void 0;Pe()};var Ve=(e,t)=>{if(t&&!e.F&&t["s-p"]){const n=t["s-p"].push(new Promise((l=>e.F=()=>{t["s-p"].splice(n-1,1);l()})))}};var qe=(e,t)=>{{e.o|=16}if(e.o&4){e.o|=512;return}Ve(e,e.T);const n=()=>Ye(e,t);if(t){queueMicrotask((()=>{n()}));return}return C(n)};var Ye=(e,t)=>{const n=e.$hostElement$;const l=V("scheduleUpdate",e.t.$);const r=n;if(!r){throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`)}let i;if(t){i=et(r,"componentWillLoad",void 0,n)}else{i=et(r,"componentWillUpdate",void 0,n)}i=Ie(i,(()=>et(r,"componentWillRender",void 0,n)));l();return Ie(i,(()=>Ge(e,r,t)))};var Ie=(e,t)=>Ze(e)?e.then(t).catch((e=>{console.error(e);t()})):t();var Ze=e=>e instanceof Promise||e&&e.then&&typeof e.then==="function";var Ge=async(e,t,n)=>{var l;const r=e.$hostElement$;const i=V("update",e.t.$);const s=r["s-rc"];if(n){G(e)}const o=V("render",e.t.$);{Je(e,t,r,n)}if(s){s.map((e=>e()));r["s-rc"]=void 0}o();i();{const t=(l=r["s-p"])!=null?l:[];const n=()=>Ke(e);if(t.length===0){n()}else{Promise.all(t).then(n).catch(n);e.o|=4;t.length=0}}};var Je=(e,t,n,l)=>{try{t=t.render();{e.o&=-17}{e.o|=2}{{{Be(e,t,l)}}}}catch(t){a(t,e.$hostElement$)}return null};var Ke=e=>{const t=e.t.$;const n=e.$hostElement$;const l=V("postUpdate",t);const r=n;const i=e.T;et(r,"componentDidRender",void 0,n);if(!(e.o&64)){e.o|=64;{tt(n)}et(r,"componentDidLoad",void 0,n);l();{e.p(n);if(!i){Xe()}}}else{et(r,"componentDidUpdate",void 0,n);l()}{if(e.F){e.F();e.F=void 0}if(e.o&512){M((()=>qe(e,false)))}e.o&=-517}};var Qe=e=>{var t;{const n=s(e);const l=(t=n==null?void 0:n.$hostElement$)==null?void 0:t.isConnected;if(l&&(n.o&(2|16))===2){qe(n,false)}return l}};var Xe=t=>{M((()=>ce(p,"appload",{detail:{namespace:e}})))};var et=(e,t,n,l)=>{if(e&&e[t]){try{return e[t](n)}catch(e){a(e,l)}}return void 0};var tt=e=>{var n;return e.classList.add((n=t.hydratedSelectorName)!=null?n:"hydrated")};var nt=(e,t)=>s(e).i.get(t);var lt=(e,t,n,l)=>{const r=s(e);if(!r){return}const i=e;const o=r.i.get(t);const f=r.o;const c=i;n=oe(n,l.l[t][0],!!(l.o&64));const u=Number.isNaN(o)&&Number.isNaN(n);const v=n!==o&&!u;if(v){r.i.set(t,n);if(l.U){const e=l.U[t];if(e){e.map((e=>{try{const[[l,i]]=Object.entries(e);if(f&128||i&1){if(!c){r.D.push((()=>{r.H[l](n,o,t)}))}else{c[l](n,o,t)}}}catch(e){a(e,i)}}))}}if(f&2){if(c.componentShouldUpdate){const e=c.componentShouldUpdate(n,o,t);if(e===false&&!(f&16)){return}}if(!(f&16)){qe(r,false)}}}};var rt=(e,n,l)=>{var i,o;const f=e.prototype;if(n.o&64&&l&1){d.forEach((e=>{const t=f[e];Object.defineProperty(f,e,{value(...n){var l;const r=s(this);const i=this;if(!i){(l=r==null?void 0:r.v)==null?void 0:l.then((t=>{const l=t[e];typeof l==="function"&&l.call(t,...n)}))}else{const e=t;typeof e==="function"&&e.call(i,...n)}}})}))}{{if(e.watchers&&!n.U){n.U=se(e.watchers)}if(e.deserializers&&!n.P){n.P=e.deserializers}if(e.serializers&&!n.W){n.W=e.serializers}}const l=Object.entries((i=n.l)!=null?i:{});l.map((([e,[t]])=>{if(t&31||t&32){const{get:l,set:i}=r(f,e)||{};if(l)n.l[e][0]|=2048;if(i)n.l[e][0]|=4096;{Object.defineProperty(f,e,{get(){{return l?l.apply(this):nt(this,e)}},configurable:true,enumerable:true})}Object.defineProperty(f,e,{set(l){const r=s(this);if(!r){return}if(i){const s=t&32?this[e]:r.$hostElement$[e];if(typeof s==="undefined"&&r.i.get(e)){l=r.i.get(e)}i.apply(this,[oe(l,t,!!(n.o&64))]);l=t&32?this[e]:r.$hostElement$[e];lt(this,e,l,n);return}{lt(this,e,l,n);return}}})}}));{const r=new Map;f.attributeChangedCallback=function(e,i,o){y.jmp((()=>{var a;const c=r.get(e);const u=s(this);if(this.hasOwnProperty(c)&&t.lazyLoad);if(f.hasOwnProperty(c)&&typeof this[c]==="number"&&this[c]==o){return}else if(c==null){const t=u==null?void 0:u.o;if(u&&t&&!(t&8)&&o!==i){const l=this;const r=l;const s=(a=n.U)==null?void 0:a[e];s==null?void 0:s.forEach((n=>{const[[l,s]]=Object.entries(n);if(r[l]!=null&&(t&128||s&1)){r[l].call(r,o,i,e)}}))}return}const v=l.find((([e])=>e===c));const d=v&&v[1][0]&4;const p=d&&o===null&&this[c]===void 0;if(d){o=o===null||o==="false"?false:true}const h=Object.getOwnPropertyDescriptor(f,c);if(!p&&o!=this[c]&&(!h.get||!!h.set)){this[c]=o}}))};e.observedAttributes=Array.from(new Set([...Object.keys((o=n.U)!=null?o:{}),...l.filter((([e,t])=>t[0]&31)).map((([e,t])=>{var l;const i=t[1]||e;r.set(i,e);if(t[0]&512){(l=n._)==null?void 0:l.push([e,i])}return i}))]))}}return e};var it=async(e,n,l,r)=>{let i;try{if((n.o&32)===0){n.o|=32;{i=e.constructor;const t=e.localName;customElements.whenDefined(t).then((()=>n.o|=128))}if(i&&i.style){let e;if(typeof i.style==="string"){e=i.style}const n=J(l);if(!c.has(n)||t.hotModuleReplacement){const t=V("registerStyles",l.$);I(n,e,!!(l.o&1));t()}}}const r=n.T;const s=()=>qe(n,true);if(r&&r["s-rc"]){r["s-rc"].push(s)}else{s()}}catch(t){a(t,e);if(n.F){n.F();n.F=void 0}if(n.p){n.p(e)}}};var st=(e,t)=>{};var ot=e=>{if((y.o&1)===0){const t=s(e);if(!t){return}const n=t.t;const l=V("connectedCallback",n.$);if(!(t.o&1)){t.o|=1;{if(n.o&(4|8)){ft(e)}}{let n=e;while(n=n.parentNode||n.host){if(n["s-p"]){Ve(t,t.T=n);break}}}if(n.l){Object.entries(n.l).map((([t,[n]])=>{if(n&31&&Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];delete e[t];e[t]=n}}))}{it(e,t,n)}}else{ut(e,t,n.B);if(t==null?void 0:t.H);else if(t==null?void 0:t.v){t.v.then((()=>st()))}}l()}};var ft=e=>{if(!p.document){return}const t=e["s-cr"]=p.document.createComment("");t["s-cn"]=true;We(e,t,e.firstChild)};var at=async e=>{if((y.o&1)===0){const t=s(e);{if(t==null?void 0:t.V){t.V.map((e=>e()));t.V=void 0}}}if(Y.has(e)){Y.delete(e)}if(e.shadowRoot&&Y.has(e.shadowRoot)){Y.delete(e.shadowRoot)}};var ct=(e,t)=>{const n={o:t[0],$:t[1]};try{{n.l=t[2]}{n.B=t[3]}{n.U=se(e.U);n.P=e.P;n.W=e.W}{n._=[]}const l=e.prototype.connectedCallback;const r=e.prototype.disconnectedCallback;Object.assign(e.prototype,{__hasHostListenerAttached:false,__registerHost(){o(this,n)},connectedCallback(){if(!this.__hasHostListenerAttached){const e=s(this);if(!e){return}ut(this,e,n.B);this.__hasHostListenerAttached=true}ot(this);if(l){l.call(this)}},disconnectedCallback(){at(this);if(r){r.call(this)}},__attachShadow(){{if(!this.shadowRoot){L.call(this,n)}else{if(this.shadowRoot.mode!=="open"){throw new Error(`Unable to re-use existing shadow root for ${n.$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}}}}});Object.defineProperty(e,"is",{value:n.$,configurable:true});return rt(e,n,1|2)}catch(t){a(t);return e}};var ut=(e,t,n,l)=>{if(n&&p.document){n.map((([n,l,r])=>{const i=dt(p.document,e,n);const s=vt(t,r);const o=pt(n);y.ael(i,l,s,o);(t.V=t.V||[]).push((()=>y.rel(i,l,s,o)))}))}};var vt=(e,t)=>n=>{try{{e.$hostElement$[t](n)}}catch(t){a(t,e.$hostElement$)}};var dt=(e,t,n)=>{if(n&8){return p}return t};var pt=e=>b?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0;var ht=e=>y.m=e;var yt=e=>Object.assign(y,e);var bt=new WeakMap;function mt(e,t){let n=bt.get(t);if(!n){const e={o:0,$:t.tagName};n={o:0,t:e,$hostElement$:t};bt.set(t,n)}Be(n,e)}function wt(e){return e}export{h as H,te as a,ae as c,Qe as f,E as getAssetPath,X as h,ct as p,mt as render,R as setAssetPath,ht as setNonce,yt as setPlatformOptions,wt as t};
2
2
  //# sourceMappingURL=index.js.map