@solid-design-system/components 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist/components/es/dialog.js +1 -1
  2. package/dist/components/umd/solid-components.js +1 -1
  3. package/dist/custom-elements.json +1 -1
  4. package/dist/package/styles/headline/headline.css.js +1 -1
  5. package/dist/styles/solid-styles.css +1 -1
  6. package/dist/versioned-components/es/accordion-group.js +1 -1
  7. package/dist/versioned-components/es/accordion.js +1 -1
  8. package/dist/versioned-components/es/badge.js +1 -1
  9. package/dist/versioned-components/es/brandshape.js +1 -1
  10. package/dist/versioned-components/es/button.js +1 -1
  11. package/dist/versioned-components/es/carousel-item.js +1 -1
  12. package/dist/versioned-components/es/carousel.js +3 -3
  13. package/dist/versioned-components/es/checkbox-group.js +1 -1
  14. package/dist/versioned-components/es/checkbox.js +1 -1
  15. package/dist/versioned-components/es/dialog.js +1 -1
  16. package/dist/versioned-components/es/divider.js +1 -1
  17. package/dist/versioned-components/es/drawer.js +1 -1
  18. package/dist/versioned-components/es/dropdown.js +1 -1
  19. package/dist/versioned-components/es/form.js +1 -1
  20. package/dist/versioned-components/es/header.js +1 -1
  21. package/dist/versioned-components/es/icon.js +1 -1
  22. package/dist/versioned-components/es/include.js +1 -1
  23. package/dist/versioned-components/es/input.js +1 -1
  24. package/dist/versioned-components/es/link.js +1 -1
  25. package/dist/versioned-components/es/navigation-item.js +1 -1
  26. package/dist/versioned-components/es/notification.js +1 -1
  27. package/dist/versioned-components/es/option.js +1 -1
  28. package/dist/versioned-components/es/popup.js +1 -1
  29. package/dist/versioned-components/es/radio-button.js +1 -1
  30. package/dist/versioned-components/es/radio-group.js +1 -1
  31. package/dist/versioned-components/es/radio.js +1 -1
  32. package/dist/versioned-components/es/select.js +3 -3
  33. package/dist/versioned-components/es/spinner.js +1 -1
  34. package/dist/versioned-components/es/switch.js +1 -1
  35. package/dist/versioned-components/es/tag.js +1 -1
  36. package/dist/versioned-components/es/teaser.js +1 -1
  37. package/dist/versioned-components/es/textarea.js +1 -1
  38. package/dist/versioned-components/es/tooltip.js +2 -2
  39. package/dist/versioned-components/es/video.js +1 -1
  40. package/dist/versioned-package/_components/button-group/button-group.d.ts +1 -1
  41. package/dist/versioned-package/_components/button-group/button-group.js +11 -11
  42. package/dist/versioned-package/components/accordion/accordion.d.ts +1 -1
  43. package/dist/versioned-package/components/accordion/accordion.js +2 -2
  44. package/dist/versioned-package/components/accordion-group/accordion-group.d.ts +1 -1
  45. package/dist/versioned-package/components/accordion-group/accordion-group.js +3 -3
  46. package/dist/versioned-package/components/badge/badge.d.ts +1 -1
  47. package/dist/versioned-package/components/badge/badge.js +1 -1
  48. package/dist/versioned-package/components/brandshape/brandshape.d.ts +1 -1
  49. package/dist/versioned-package/components/brandshape/brandshape.js +1 -1
  50. package/dist/versioned-package/components/button/button.d.ts +1 -1
  51. package/dist/versioned-package/components/button/button.js +4 -4
  52. package/dist/versioned-package/components/carousel/carousel.d.ts +1 -1
  53. package/dist/versioned-package/components/carousel/carousel.js +6 -6
  54. package/dist/versioned-package/components/carousel-item/carousel-item.d.ts +1 -1
  55. package/dist/versioned-package/components/carousel-item/carousel-item.js +1 -1
  56. package/dist/versioned-package/components/checkbox/checkbox.d.ts +1 -1
  57. package/dist/versioned-package/components/checkbox/checkbox.js +4 -4
  58. package/dist/versioned-package/components/checkbox-group/checkbox-group.d.ts +1 -1
  59. package/dist/versioned-package/components/checkbox-group/checkbox-group.js +5 -5
  60. package/dist/versioned-package/components/dialog/dialog.d.ts +1 -1
  61. package/dist/versioned-package/components/dialog/dialog.js +2 -2
  62. package/dist/versioned-package/components/divider/divider.d.ts +1 -1
  63. package/dist/versioned-package/components/divider/divider.js +2 -2
  64. package/dist/versioned-package/components/drawer/drawer.d.ts +1 -1
  65. package/dist/versioned-package/components/drawer/drawer.js +2 -2
  66. package/dist/versioned-package/components/dropdown/dropdown.d.ts +1 -1
  67. package/dist/versioned-package/components/dropdown/dropdown.js +8 -8
  68. package/dist/versioned-package/components/header/header.d.ts +1 -1
  69. package/dist/versioned-package/components/header/header.js +4 -4
  70. package/dist/versioned-package/components/icon/icon.d.ts +1 -1
  71. package/dist/versioned-package/components/icon/icon.js +1 -1
  72. package/dist/versioned-package/components/include/include.d.ts +1 -1
  73. package/dist/versioned-package/components/include/include.js +1 -1
  74. package/dist/versioned-package/components/input/input.d.ts +1 -1
  75. package/dist/versioned-package/components/input/input.js +4 -4
  76. package/dist/versioned-package/components/link/link.d.ts +1 -1
  77. package/dist/versioned-package/components/link/link.js +2 -2
  78. package/dist/versioned-package/components/navigation-item/navigation-item.d.ts +1 -1
  79. package/dist/versioned-package/components/navigation-item/navigation-item.js +3 -3
  80. package/dist/versioned-package/components/notification/notification.d.ts +1 -1
  81. package/dist/versioned-package/components/notification/notification.js +5 -5
  82. package/dist/versioned-package/components/option/option.d.ts +1 -1
  83. package/dist/versioned-package/components/option/option.js +2 -2
  84. package/dist/versioned-package/components/popup/popup.d.ts +1 -1
  85. package/dist/versioned-package/components/popup/popup.js +1 -1
  86. package/dist/versioned-package/components/radio/radio.d.ts +1 -1
  87. package/dist/versioned-package/components/radio/radio.js +2 -2
  88. package/dist/versioned-package/components/radio-button/radio-button.d.ts +1 -1
  89. package/dist/versioned-package/components/radio-button/radio-button.js +2 -2
  90. package/dist/versioned-package/components/radio-group/radio-group.d.ts +2 -2
  91. package/dist/versioned-package/components/radio-group/radio-group.js +15 -15
  92. package/dist/versioned-package/components/select/select.d.ts +4 -4
  93. package/dist/versioned-package/components/select/select.js +28 -28
  94. package/dist/versioned-package/components/spinner/spinner.d.ts +1 -1
  95. package/dist/versioned-package/components/spinner/spinner.js +1 -1
  96. package/dist/versioned-package/components/switch/switch.d.ts +1 -1
  97. package/dist/versioned-package/components/switch/switch.js +2 -2
  98. package/dist/versioned-package/components/tag/tag.d.ts +1 -1
  99. package/dist/versioned-package/components/tag/tag.js +2 -2
  100. package/dist/versioned-package/components/teaser/teaser.js +1 -1
  101. package/dist/versioned-package/components/textarea/textarea.d.ts +1 -1
  102. package/dist/versioned-package/components/textarea/textarea.js +3 -3
  103. package/dist/versioned-package/components/tooltip/tooltip.d.ts +1 -1
  104. package/dist/versioned-package/components/tooltip/tooltip.js +5 -5
  105. package/dist/versioned-package/components/video/video.d.ts +1 -1
  106. package/dist/versioned-package/components/video/video.js +2 -2
  107. package/dist/versioned-package/internal/form.js +3 -3
  108. package/dist/versioned-package/styles/headline/headline.css.js +1 -1
  109. package/dist/versioned-styles/solid-styles.css +1 -1
  110. package/dist/vscode.html-custom-data.json +33 -33
  111. package/dist/web-types.json +34 -34
  112. package/package.json +1 -1
@@ -1 +1 @@
1
- import"./button.js";import"./icon.js";import{a as e,s as i,w as s}from"./event.js";import{S as t,x as a,r as o,i as r,n}from"./solid-element.js";import{c as l}from"./register-custom-element.js";import{g as d,s as h}from"./animation-registry.js";import{H as p}from"./slot.js";import{L as c}from"./solid-components2.js";import{l as m,u as f}from"./scroll.js";import{e as g}from"./query.js";import{w as y}from"./watch.js";import{c as u}from"./component.styles.js";import{t as v}from"./classix.js";import{M as x}from"./modal.js";import"./spinner.js";import"./form.js";import"./static.js";import"./if-defined.js";import"./state.js";import"./query-assigned-elements.js";import"./request.js";import"./request2.js";import"./directive.js";import"./tabbable.js";var w=Object.defineProperty,b=Object.getOwnPropertyDescriptor,z=(e,i,s,t)=>{for(var a,o=t>1?void 0:t?b(i,s):i,r=e.length-1;r>=0;r--)(a=e[r])&&(o=(t?a(i,s,o):a(o))||o);return t&&o&&w(i,s,o),o};let j=class extends t{constructor(){super(...arguments),this.hasSlotController=new p(this,"footer"),this.localize=new c(this),this.open=!1,this.headline="",this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new x(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),m(this))}disconnectedCallback(){super.disconnectedCallback(),f(this)}requestClose(i){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:i}}).defaultPrevented){const i=d(this,"dialog.denyClose",{dir:this.localize.dir()});e(this.panel,i.keyframes,i.options)}else this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(e){this.open&&"Escape"===e.key&&(e.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),m(this);const s=this.querySelector("[autofocus]");s&&s.removeAttribute("autofocus"),await Promise.all([i(this.dialog),i(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame((()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(s?s.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),s&&s.setAttribute("autofocus","")}));const t=d(this,"dialog.show",{dir:this.localize.dir()}),a=d(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([e(this.panel,t.keyframes,t.options),e(this.overlay,a.keyframes,a.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([i(this.dialog),i(this.overlay)]);const s=d(this,"dialog.hide",{dir:this.localize.dir()}),t=d(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([e(this.overlay,t.keyframes,t.options).then((()=>{this.overlay.hidden=!0})),e(this.panel,s.keyframes,s.options).then((()=>{this.panel.hidden=!0}))]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,f(this);const a=this.originalTrigger;"function"==typeof(null==a?void 0:a.focus)&&setTimeout((()=>a.focus())),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,s(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,s(this,"sd-after-hide")}render(){return a`<div part="base" class="${v("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${v("flex flex-col z-20 bg-white focus:outline-none py-4 sm:py-8 relative gap-6",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.headline}" aria-labelledby="title" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length>0?a`<h4 class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</h4>`:a`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":a`<sd-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${v("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-icon name="system/close" library="global-resources" color="currentColor"></sd-icon></sd-button>`}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`}};j.styles=[u,o(".sd-headline{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity));display:flex;font-size:var(--sd-font-size-3xl,2rem);font-weight:700;gap:var(--sd-spacing-4,1rem)}@media (min-width:640px){.sd-headline{font-size:var(--sd-font-size-4xl,2.5rem)}}.sd-headline sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity));flex-shrink:0;font-size:3rem}@media (min-width:640px){.sd-headline sd-icon{margin-top:var(--sd-spacing-2,.5rem)}}.sd-headline--size-3xl{font-size:var(--sd-font-size-2xl,1.75rem)}@media (min-width:640px){.sd-headline--size-3xl{font-size:var(--sd-font-size-3xl,2rem)}}.sd-headline--size-3xl sd-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}@media (min-width:640px){.sd-headline--size-3xl sd-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline--size-base,.sd-headline--size-lg,.sd-headline--size-xl{--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity));gap:var(--sd-spacing-2,.5rem)}.sd-headline--size-base sd-icon,.sd-headline--size-lg sd-icon,.sd-headline--size-xl sd-icon{font-size:2rem}.sd-headline--size-xl{font-size:var(--sd-font-size-xl,1.5rem)}.sd-headline--size-xl sd-icon{margin-top:var(--sd-spacing-0-5,.125rem)}@media (min-width:640px){.sd-headline--size-xl sd-icon{margin-top:var(--sd-spacing-0-5,.125rem)}}.sd-headline--size-lg{font-size:var(--sd-font-size-lg,1.25rem)}.sd-headline--size-lg sd-icon{margin-top:var(--sd-spacing-0,0)}@media (min-width:640px){.sd-headline--size-lg sd-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline--size-base{--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity));font-size:var(--sd-font-size-base,1rem)}.sd-headline--size-base sd-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}.sd-headline--size-base mark{color:inherit}.sd-headline--inverted,.sd-headline--inverted sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity))}.sd-headline--inline{display:inline}.sd-headline--inline sd-icon{margin-right:var(--sd-spacing-2,.5rem);margin-top:calc(var(--sd-spacing-1, .25rem)*-1);vertical-align:middle}.sd-headline--inline.sd-headline--size-base sd-icon,.sd-headline--inline.sd-headline--size-lg sd-icon,.sd-headline--inline.sd-headline--size-xl sd-icon{margin-right:var(--sd-spacing-0-5,.125rem)}"),t.styles,r`:host{--width:662px}[part=panel]{width:var(--width);max-height:80vh}[part=body]{-webkit-overflow-scrolling:touch}@media (max-width:414px){:host{--width:335px}[part=footer]{width:100%}}`],z([g('[part="base"]')],j.prototype,"dialog",2),z([g('[part="panel"]')],j.prototype,"panel",2),z([g('[part="overlay"]')],j.prototype,"overlay",2),z([n({type:Boolean,reflect:!0})],j.prototype,"open",2),z([n({reflect:!0})],j.prototype,"headline",2),z([n({attribute:"no-close-button",type:Boolean,reflect:!0})],j.prototype,"noCloseButton",2),z([y("open",{waitUntilFirstUpdate:!0})],j.prototype,"handleOpenChange",1),j=z([l("sd-dialog")],j),h("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),h("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),h("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),h("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),h("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});export{j as default};
1
+ import"./button.js";import"./icon.js";import{a as e,s as i,w as s}from"./event.js";import{S as t,x as a,r as o,i as n,n as r}from"./solid-element.js";import{c as l}from"./register-custom-element.js";import{g as d,s as h}from"./animation-registry.js";import{H as p}from"./slot.js";import{L as c}from"./solid-components2.js";import{l as m,u as f}from"./scroll.js";import{e as g}from"./query.js";import{w as y}from"./watch.js";import{c as u}from"./component.styles.js";import{t as v}from"./classix.js";import{M as x}from"./modal.js";import"./spinner.js";import"./form.js";import"./static.js";import"./if-defined.js";import"./state.js";import"./query-assigned-elements.js";import"./request.js";import"./request2.js";import"./directive.js";import"./tabbable.js";var b=Object.defineProperty,w=Object.getOwnPropertyDescriptor,z=(e,i,s,t)=>{for(var a,o=t>1?void 0:t?w(i,s):i,n=e.length-1;n>=0;n--)(a=e[n])&&(o=(t?a(i,s,o):a(o))||o);return t&&o&&b(i,s,o),o};let j=class extends t{constructor(){super(...arguments),this.hasSlotController=new p(this,"footer"),this.localize=new c(this),this.open=!1,this.headline="",this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new x(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),m(this))}disconnectedCallback(){super.disconnectedCallback(),f(this)}requestClose(i){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:i}}).defaultPrevented){const i=d(this,"dialog.denyClose",{dir:this.localize.dir()});e(this.panel,i.keyframes,i.options)}else this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(e){this.open&&"Escape"===e.key&&(e.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),m(this);const s=this.querySelector("[autofocus]");s&&s.removeAttribute("autofocus"),await Promise.all([i(this.dialog),i(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame((()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(s?s.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),s&&s.setAttribute("autofocus","")}));const t=d(this,"dialog.show",{dir:this.localize.dir()}),a=d(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([e(this.panel,t.keyframes,t.options),e(this.overlay,a.keyframes,a.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([i(this.dialog),i(this.overlay)]);const s=d(this,"dialog.hide",{dir:this.localize.dir()}),t=d(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([e(this.overlay,t.keyframes,t.options).then((()=>{this.overlay.hidden=!0})),e(this.panel,s.keyframes,s.options).then((()=>{this.panel.hidden=!0}))]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,f(this);const a=this.originalTrigger;"function"==typeof(null==a?void 0:a.focus)&&setTimeout((()=>a.focus())),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,s(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,s(this,"sd-after-hide")}render(){return a`<div part="base" class="${v("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${v("flex flex-col z-20 bg-white focus:outline-none py-4 sm:py-8 relative gap-6",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.headline}" aria-labelledby="title" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length>0?a`<h4 class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</h4>`:a`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":a`<sd-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${v("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-icon name="system/close" library="global-resources" color="currentColor"></sd-icon></sd-button>`}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`}};j.styles=[u,o(".sd-headline{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity));display:flex;font-size:var(--sd-font-size-3xl,2rem);font-weight:700;gap:var(--sd-spacing-4,1rem);line-height:var(--sd-line-height-tight,120%)}@media (min-width:640px){.sd-headline{font-size:var(--sd-font-size-4xl,2.5rem)}}.sd-headline sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity));flex-shrink:0;font-size:3rem}@media (min-width:640px){.sd-headline sd-icon{margin-top:var(--sd-spacing-2,.5rem)}}.sd-headline--size-3xl{font-size:var(--sd-font-size-2xl,1.75rem)}@media (min-width:640px){.sd-headline--size-3xl{font-size:var(--sd-font-size-3xl,2rem)}}.sd-headline--size-3xl sd-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}@media (min-width:640px){.sd-headline--size-3xl sd-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline--size-base,.sd-headline--size-lg,.sd-headline--size-xl{--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity));gap:var(--sd-spacing-2,.5rem)}.sd-headline--size-base sd-icon,.sd-headline--size-lg sd-icon,.sd-headline--size-xl sd-icon{font-size:2rem}.sd-headline--size-xl{font-size:var(--sd-font-size-xl,1.5rem)}.sd-headline--size-xl sd-icon{margin-top:var(--sd-spacing-0-5,.125rem)}@media (min-width:640px){.sd-headline--size-xl sd-icon{margin-top:var(--sd-spacing-0-5,.125rem)}}.sd-headline--size-base,.sd-headline--size-lg{line-height:var(--sd-line-height-normal,150%)}.sd-headline--size-lg{font-size:var(--sd-font-size-lg,1.25rem)}.sd-headline--size-lg sd-icon{margin-top:var(--sd-spacing-0,0)}@media (min-width:640px){.sd-headline--size-lg sd-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline--size-base{--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity));font-size:var(--sd-font-size-base,1rem)}.sd-headline--size-base sd-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}.sd-headline--size-base mark{color:inherit}.sd-headline--inverted,.sd-headline--inverted sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity))}.sd-headline--inline{display:inline}.sd-headline--inline sd-icon{margin-right:var(--sd-spacing-2,.5rem);margin-top:calc(var(--sd-spacing-1, .25rem)*-1);vertical-align:middle}.sd-headline--inline.sd-headline--size-base sd-icon,.sd-headline--inline.sd-headline--size-lg sd-icon,.sd-headline--inline.sd-headline--size-xl sd-icon{margin-right:var(--sd-spacing-0-5,.125rem)}"),t.styles,n`:host{--width:662px}[part=panel]{width:var(--width);max-height:80vh}[part=body]{-webkit-overflow-scrolling:touch}@media (max-width:414px){:host{--width:335px}[part=footer]{width:100%}}`],z([g('[part="base"]')],j.prototype,"dialog",2),z([g('[part="panel"]')],j.prototype,"panel",2),z([g('[part="overlay"]')],j.prototype,"overlay",2),z([r({type:Boolean,reflect:!0})],j.prototype,"open",2),z([r({reflect:!0})],j.prototype,"headline",2),z([r({attribute:"no-close-button",type:Boolean,reflect:!0})],j.prototype,"noCloseButton",2),z([y("open",{waitUntilFirstUpdate:!0})],j.prototype,"handleOpenChange",1),j=z([l("sd-dialog")],j),h("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),h("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),h("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),h("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),h("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});export{j as default};
@@ -91,7 +91,7 @@ let Ot=class extends K{constructor(){super(...arguments),this.renderOptions={hos
91
91
  * @license
92
92
  * Copyright 2020 Google LLC
93
93
  * SPDX-License-Identifier: BSD-3-Clause
94
- */})(t),e}});var Bi=Object.defineProperty,Vi=Object.getOwnPropertyDescriptor,Ii=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Vi(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Bi(e,i,s),s};let ji=class extends ie{constructor(){super(...arguments),this.formControlController=new Xe(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e}),this.title="",this.name="",this.size="lg",this.disabled=!1,this.checked=!1,this.indeterminate=!1,this.defaultChecked=!1,this.form="",this.required=!1,this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return pt`<label part="base" class="${we("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed",{sm:"text-sm",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${ai(this.value)}" .indeterminate="${Li(this.indeterminate)}" .checked="${Li(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${we("relative flex flex-initial items-center justify-center border rounded-sm h-4 w-4\n peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2\n peer-focus-visible:outline-primary",{sm:"mt-[2px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}">${this.checked?pt`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-hook"></sd-icon>`:""} ${!this.checked&&this.indeterminate?pt`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="system" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${we("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};ji.styles=[ie.styles,P`:host{display:block}:host(:focus-visible){outline-width:0}:host([required]) #label::after{content:' *'}`],Ii([Bt('input[type="checkbox"]')],ji.prototype,"input",2),Ii([Bt("#invalid-message")],ji.prototype,"invalidMessage",2),Ii([Mt()],ji.prototype,"title",2),Ii([Mt()],ji.prototype,"name",2),Ii([Mt()],ji.prototype,"value",2),Ii([Mt({reflect:!0})],ji.prototype,"size",2),Ii([Mt({type:Boolean,reflect:!0})],ji.prototype,"disabled",2),Ii([Mt({type:Boolean,reflect:!0})],ji.prototype,"checked",2),Ii([Mt({type:Boolean,reflect:!0})],ji.prototype,"indeterminate",2),Ii([Mi("checked")],ji.prototype,"defaultChecked",2),Ii([Mt({reflect:!0})],ji.prototype,"form",2),Ii([Mt({type:Boolean,reflect:!0})],ji.prototype,"required",2),Ii([Dt()],ji.prototype,"showInvalidStyle",2),Ii([Xt("disabled",{waitUntilFirstUpdate:!0})],ji.prototype,"handleDisabledChange",1),Ii([Xt(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],ji.prototype,"handleStateChange",1),ji=Ii([Pt("sd-checkbox")],ji);const Ui=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ji}},Symbol.toStringTag,{value:"Module"})),Fi=new Set;function Ri(t){if(Fi.add(t),!document.body.classList.contains("sd-scroll-lock")){const t=function(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}();document.body.classList.add("sd-scroll-lock"),document.body.style.setProperty("--sd-scroll-lock-size",`${t}px`)}}function Hi(t){Fi.delete(t),0===Fi.size&&(document.body.classList.remove("sd-scroll-lock"),document.body.style.removeProperty("--sd-scrollbar-width"))}function Ni(t,e,i="vertical",o="smooth"){const r=function(t,e){return{top:Math.round(t.getBoundingClientRect().top-e.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-e.getBoundingClientRect().left)}}(t,e),s=r.top+e.scrollTop,a=r.left+e.scrollLeft,n=e.scrollLeft,l=e.scrollLeft+e.offsetWidth,d=e.scrollTop,h=e.scrollTop+e.offsetHeight;("horizontal"===i||"both"===i)&&(a<n?e.scrollTo({left:a,behavior:o}):a+t.clientWidth>l&&e.scrollTo({left:a-e.offsetWidth+t.clientWidth,behavior:o})),("vertical"===i||"both"===i)&&(s<d?e.scrollTo({top:s,behavior:o}):s+t.clientHeight>h&&e.scrollTo({top:s-e.offsetHeight+t.clientHeight,behavior:o}))}function qi(t){const e=t.tagName.toLowerCase();return!("-1"===t.getAttribute("tabindex")||t.hasAttribute("disabled")||t.hasAttribute("aria-disabled")&&"false"!==t.getAttribute("aria-disabled")||"input"===e&&"radio"===t.getAttribute("type")&&!t.hasAttribute("checked")||null===t.offsetParent||"hidden"===window.getComputedStyle(t).visibility)&&(!!(("audio"===e||"video"===e)&&t.hasAttribute("controls")||t.hasAttribute("tabindex")||t.hasAttribute("contenteditable")&&"false"!==t.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(e))}function Ki(t){const e=[];return function t(i){i instanceof HTMLElement&&(e.push(i),null!==i.shadowRoot&&"open"===i.shadowRoot.mode&&t(i.shadowRoot)),[...i.children].forEach((e=>t(e)))}(t),{start:e.find((t=>qi(t)))??null,end:e.reverse().find((t=>qi(t)))??null}}let Zi=[];class Wi{constructor(t){this.tabDirection="forward",this.element=t,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){Zi.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Zi=Zi.filter((t=>t!==this.element)),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Zi[Zi.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:t,end:e}=Ki(this.element),i="forward"===this.tabDirection?t:e;"function"==typeof(null==i?void 0:i.focus)&&i.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(t){"Tab"===t.key&&t.shiftKey&&(this.tabDirection="backward",requestAnimationFrame((()=>this.checkFocus())))}handleKeyUp(){this.tabDirection="forward"}}var Yi=Object.defineProperty,Xi=Object.getOwnPropertyDescriptor,Gi=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Xi(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Yi(e,i,s),s};let Ji=class extends ie{constructor(){super(...arguments),this.hasSlotController=new ti(this,"footer"),this.localize=new k(this),this.open=!1,this.headline="",this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new Wi(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),Ri(this))}disconnectedCallback(){super.disconnectedCallback(),Hi(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const t=ye(this,"dialog.denyClose",{dir:this.localize.dir()});de(this.panel,t.keyframes,t.options)}else this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),Ri(this);const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([pe(this.dialog),pe(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame((()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")}));const e=ye(this,"dialog.show",{dir:this.localize.dir()}),i=ye(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([de(this.panel,e.keyframes,e.options),de(this.overlay,i.keyframes,i.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([pe(this.dialog),pe(this.overlay)]);const t=ye(this,"dialog.hide",{dir:this.localize.dir()}),e=ye(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([de(this.overlay,e.keyframes,e.options).then((()=>{this.overlay.hidden=!0})),de(this.panel,t.keyframes,t.options).then((()=>{this.panel.hidden=!0}))]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,Hi(this);const i=this.originalTrigger;"function"==typeof(null==i?void 0:i.focus)&&setTimeout((()=>i.focus())),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,fe(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,fe(this,"sd-after-hide")}render(){return pt`<div part="base" class="${we("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${we("flex flex-col z-20 bg-white focus:outline-none py-4 sm:py-8 relative gap-6",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.headline}" aria-labelledby="title" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length>0?pt`<h4 class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</h4>`:pt`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":pt`<sd-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${we("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-icon name="system/close" library="global-resources" color="currentColor"></sd-icon></sd-button>`}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`}};Ji.styles=[Gt,E(".sd-headline{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity));display:flex;font-size:var(--sd-font-size-3xl,2rem);font-weight:700;gap:var(--sd-spacing-4,1rem)}@media (min-width:640px){.sd-headline{font-size:var(--sd-font-size-4xl,2.5rem)}}.sd-headline sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity));flex-shrink:0;font-size:3rem}@media (min-width:640px){.sd-headline sd-icon{margin-top:var(--sd-spacing-2,.5rem)}}.sd-headline--size-3xl{font-size:var(--sd-font-size-2xl,1.75rem)}@media (min-width:640px){.sd-headline--size-3xl{font-size:var(--sd-font-size-3xl,2rem)}}.sd-headline--size-3xl sd-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}@media (min-width:640px){.sd-headline--size-3xl sd-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline--size-base,.sd-headline--size-lg,.sd-headline--size-xl{--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity));gap:var(--sd-spacing-2,.5rem)}.sd-headline--size-base sd-icon,.sd-headline--size-lg sd-icon,.sd-headline--size-xl sd-icon{font-size:2rem}.sd-headline--size-xl{font-size:var(--sd-font-size-xl,1.5rem)}.sd-headline--size-xl sd-icon{margin-top:var(--sd-spacing-0-5,.125rem)}@media (min-width:640px){.sd-headline--size-xl sd-icon{margin-top:var(--sd-spacing-0-5,.125rem)}}.sd-headline--size-lg{font-size:var(--sd-font-size-lg,1.25rem)}.sd-headline--size-lg sd-icon{margin-top:var(--sd-spacing-0,0)}@media (min-width:640px){.sd-headline--size-lg sd-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline--size-base{--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity));font-size:var(--sd-font-size-base,1rem)}.sd-headline--size-base sd-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}.sd-headline--size-base mark{color:inherit}.sd-headline--inverted,.sd-headline--inverted sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity))}.sd-headline--inline{display:inline}.sd-headline--inline sd-icon{margin-right:var(--sd-spacing-2,.5rem);margin-top:calc(var(--sd-spacing-1, .25rem)*-1);vertical-align:middle}.sd-headline--inline.sd-headline--size-base sd-icon,.sd-headline--inline.sd-headline--size-lg sd-icon,.sd-headline--inline.sd-headline--size-xl sd-icon{margin-right:var(--sd-spacing-0-5,.125rem)}"),ie.styles,P`:host{--width:662px}[part=panel]{width:var(--width);max-height:80vh}[part=body]{-webkit-overflow-scrolling:touch}@media (max-width:414px){:host{--width:335px}[part=footer]{width:100%}}`],Gi([Bt('[part="base"]')],Ji.prototype,"dialog",2),Gi([Bt('[part="panel"]')],Ji.prototype,"panel",2),Gi([Bt('[part="overlay"]')],Ji.prototype,"overlay",2),Gi([Mt({type:Boolean,reflect:!0})],Ji.prototype,"open",2),Gi([Mt({reflect:!0})],Ji.prototype,"headline",2),Gi([Mt({attribute:"no-close-button",type:Boolean,reflect:!0})],Ji.prototype,"noCloseButton",2),Gi([Xt("open",{waitUntilFirstUpdate:!0})],Ji.prototype,"handleOpenChange",1),Ji=Gi([Pt("sd-dialog")],Ji),ve("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),ve("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),ve("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),ve("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),ve("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});const Qi=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Ji}},Symbol.toStringTag,{value:"Module"}));var to=Object.defineProperty,eo=Object.getOwnPropertyDescriptor,io=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?eo(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&to(e,i,s),s};let oo=class extends ie{constructor(){super(...arguments),this.orientation="horizontal",this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return pt`<hr part="main" class="${we(this.inverted?"border-primary-400":"border-neutral-400","horizontal"===this.orientation?"border-t w-full":" border-l h-full")}">`}};oo.styles=[Gt,ie.styles,P`:host{margin:var(--sd-spacing-0,0)}:host(sd-divider[orientation=horizontal]){display:block}:host(sd-divider[orientation=vertical]){display:inline-block}`],io([Mt({reflect:!0})],oo.prototype,"orientation",2),io([Mt({type:Boolean,reflect:!0})],oo.prototype,"inverted",2),oo=io([Pt("sd-divider")],oo);const ro=Object.freeze(Object.defineProperty({__proto__:null,get default(){return oo}},Symbol.toStringTag,{value:"Module"}));function so(t){return t.charAt(0).toUpperCase()+t.slice(1)}var ao=Object.defineProperty,no=Object.getOwnPropertyDescriptor,lo=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?no(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&ao(e,i,s),s};let ho=class extends ie{constructor(){super(...arguments),this.hasSlotController=new ti(this,"footer"),this.localize=new k(this),this.modal=new Wi(this),this.open=!1,this.label="",this.placement="end",this.contained=!1,this.noHeader=!1,this.handleDocumentKeyDown=t=>{this.open&&"Escape"===t.key&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),Ri(this)))}disconnectedCallback(){super.disconnectedCallback(),Hi(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const t=ye(this,"drawer.denyClose",{dir:this.localize.dir()});de(this.panel,t.keyframes,t.options)}else this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.contained||(this.modal.activate(),Ri(this));const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([pe(this.drawer),pe(this.overlay)]),this.drawer.hidden=!1,requestAnimationFrame((()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")}));const e=ye(this,`drawer.show${so(this.placement)}`,{dir:this.localize.dir()}),i=ye(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([de(this.panel,e.keyframes,e.options),de(this.overlay,i.keyframes,i.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),Hi(this)),await Promise.all([pe(this.drawer),pe(this.overlay)]);const t=ye(this,`drawer.hide${so(this.placement)}`,{dir:this.localize.dir()}),e=ye(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([de(this.overlay,e.keyframes,e.options).then((()=>{this.overlay.hidden=!0})),de(this.panel,t.keyframes,t.options).then((()=>{this.panel.hidden=!0}))]),this.drawer.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1;const i=this.originalTrigger;"function"==typeof(null==i?void 0:i.focus)&&setTimeout((()=>i.focus())),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),Ri(this)),this.open&&this.contained&&(this.modal.deactivate(),Hi(this))}async show(){if(!this.open)return this.open=!0,fe(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,fe(this,"sd-after-hide")}render(){return pt`<div part="base" class="${we("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}"><div part="overlay" class="${we("block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${we("absolute flex flex-col z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[--width] h-full",start:"top-0 end-auto bottom-auto start-0 w-[--width] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.label}" aria-labelledby="${ai(this.noHeader?void 0:"title")}" tabindex="0">${this.noHeader?"":pt`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-icon name="close" library="system"></sd-icon></sd-button></div></header>`}<div part="body" class="flex-auto block px-4"><slot></slot></div><footer part="footer" class="${we(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></div>`}};ho.styles=[ie.styles,Gt,P`:host{--width:25rem;display:contents}:host([contained]){z-index:initial}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}`],lo([Bt("[part=base]")],ho.prototype,"drawer",2),lo([Bt("[part=panel]")],ho.prototype,"panel",2),lo([Bt("[part=overlay]")],ho.prototype,"overlay",2),lo([Mt({type:Boolean,reflect:!0})],ho.prototype,"open",2),lo([Mt({attribute:"label",reflect:!0})],ho.prototype,"label",2),lo([Mt({reflect:!0})],ho.prototype,"placement",2),lo([Mt({type:Boolean,reflect:!0})],ho.prototype,"contained",2),lo([Mt({attribute:"no-header",type:Boolean})],ho.prototype,"noHeader",2),lo([Xt("open",{waitUntilFirstUpdate:!0})],ho.prototype,"handleOpenChange",1),lo([Xt("contained",{waitUntilFirstUpdate:!0})],ho.prototype,"handleNoModalChange",1),ho=lo([Pt("sd-drawer")],ho),ve("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),ve("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:250,easing:"ease"}}),ve("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),ve("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:250,easing:"ease"}}),ve("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}}),ve("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),ve("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});const co=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ho}},Symbol.toStringTag,{value:"Module"})),po=Math.min,uo=Math.max,bo=Math.round,mo=Math.floor,go=t=>({x:t,y:t}),vo={left:"right",right:"left",bottom:"top",top:"bottom"},yo={start:"end",end:"start"};function fo(t,e,i){return uo(t,po(e,i))}function wo(t,e){return"function"==typeof t?t(e):t}function xo(t){return t.split("-")[0]}function ko(t){return t.split("-")[1]}function Co(t){return"x"===t?"y":"x"}function $o(t){return"y"===t?"height":"width"}function So(t){return["top","bottom"].includes(xo(t))?"y":"x"}function _o(t){return Co(So(t))}function zo(t){return t.replace(/start|end/g,(t=>yo[t]))}function Oo(t){return t.replace(/left|right|bottom|top/g,(t=>vo[t]))}function Eo(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function Po(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Ao(t,e,i){let{reference:o,floating:r}=t;const s=So(e),a=_o(e),n=$o(a),l=xo(e),d="y"===s,h=o.x+o.width/2-r.width/2,c=o.y+o.height/2-r.height/2,p=o[n]/2-r[n]/2;let u;switch(l){case"top":u={x:h,y:o.y-r.height};break;case"bottom":u={x:h,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:c};break;case"left":u={x:o.x-r.width,y:c};break;default:u={x:o.x,y:o.y}}switch(ko(e)){case"start":u[a]-=p*(i&&d?-1:1);break;case"end":u[a]+=p*(i&&d?-1:1)}return u}async function To(t,e){var i;void 0===e&&(e={});const{x:o,y:r,platform:s,rects:a,elements:n,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:c="floating",altBoundary:p=!1,padding:u=0}=wo(e,t),b=Eo(u),m=n[p?"floating"===c?"reference":"floating":c],g=Po(await s.getClippingRect({element:null==(i=await(null==s.isElement?void 0:s.isElement(m)))||i?m:m.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(n.floating)),boundary:d,rootBoundary:h,strategy:l})),v="floating"===c?{...a.floating,x:o,y:r}:a.reference,y=await(null==s.getOffsetParent?void 0:s.getOffsetParent(n.floating)),f=await(null==s.isElement?void 0:s.isElement(y))&&await(null==s.getScale?void 0:s.getScale(y))||{x:1,y:1},w=Po(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-w.top+b.top)/f.y,bottom:(w.bottom-g.bottom+b.bottom)/f.y,left:(g.left-w.left+b.left)/f.x,right:(w.right-g.right+b.right)/f.x}}const Mo=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:i,y:o}=e,r=await async function(t,e){const{placement:i,platform:o,elements:r}=t,s=await(null==o.isRTL?void 0:o.isRTL(r.floating)),a=xo(i),n=ko(i),l="y"===So(i),d=["left","top"].includes(a)?-1:1,h=s&&l?-1:1,c=wo(e,t);let{mainAxis:p,crossAxis:u,alignmentAxis:b}="number"==typeof c?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...c};return n&&"number"==typeof b&&(u="end"===n?-1*b:b),l?{x:u*h,y:p*d}:{x:p*d,y:u*h}}(e,t);return{x:i+r.x,y:o+r.y,data:r}}}},Do=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:i,rects:o,platform:r,elements:s}=e,{apply:a=(()=>{}),...n}=wo(t,e),l=await To(e,n),d=xo(i),h=ko(i),c="y"===So(i),{width:p,height:u}=o.floating;let b,m;"top"===d||"bottom"===d?(b=d,m=h===(await(null==r.isRTL?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(m=d,b="end"===h?"top":"bottom");const g=u-l[b],v=p-l[m],y=!e.middlewareData.shift;let f=g,w=v;if(c){const t=p-l.left-l.right;w=h||y?po(v,t):t}else{const t=u-l.top-l.bottom;f=h||y?po(g,t):t}if(y&&!h){const t=uo(l.left,0),e=uo(l.right,0),i=uo(l.top,0),o=uo(l.bottom,0);c?w=p-2*(0!==t||0!==e?t+e:uo(l.left,l.right)):f=u-2*(0!==i||0!==o?i+o:uo(l.top,l.bottom))}await a({...e,availableWidth:w,availableHeight:f});const x=await r.getDimensions(s.floating);return p!==x.width||u!==x.height?{reset:{rects:!0}}:{}}}};function Lo(t){return Io(t)?(t.nodeName||"").toLowerCase():"#document"}function Bo(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Vo(t){var e;return null==(e=(Io(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function Io(t){return t instanceof Node||t instanceof Bo(t).Node}function jo(t){return t instanceof Element||t instanceof Bo(t).Element}function Uo(t){return t instanceof HTMLElement||t instanceof Bo(t).HTMLElement}function Fo(t){return!(typeof ShadowRoot>"u")&&(t instanceof ShadowRoot||t instanceof Bo(t).ShadowRoot)}function Ro(t){const{overflow:e,overflowX:i,overflowY:o,display:r}=Zo(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+i)&&!["inline","contents"].includes(r)}function Ho(t){return["table","td","th"].includes(Lo(t))}function No(t){const e=qo(),i=Zo(t);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function qo(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ko(t){return["html","body","#document"].includes(Lo(t))}function Zo(t){return Bo(t).getComputedStyle(t)}function Wo(t){return jo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Yo(t){if("html"===Lo(t))return t;const e=t.assignedSlot||t.parentNode||Fo(t)&&t.host||Vo(t);return Fo(e)?e.host:e}function Xo(t){const e=Yo(t);return Ko(e)?t.ownerDocument?t.ownerDocument.body:t.body:Uo(e)&&Ro(e)?e:Xo(e)}function Go(t,e,i){var o;void 0===e&&(e=[]),void 0===i&&(i=!0);const r=Xo(t),s=r===(null==(o=t.ownerDocument)?void 0:o.body),a=Bo(r);return s?e.concat(a,a.visualViewport||[],Ro(r)?r:[],a.frameElement&&i?Go(a.frameElement):[]):e.concat(r,Go(r,[],i))}function Jo(t){const e=Zo(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=Uo(t),s=r?t.offsetWidth:i,a=r?t.offsetHeight:o,n=bo(i)!==s||bo(o)!==a;return n&&(i=s,o=a),{width:i,height:o,$:n}}function Qo(t){return jo(t)?t:t.contextElement}function tr(t){const e=Qo(t);if(!Uo(e))return go(1);const i=e.getBoundingClientRect(),{width:o,height:r,$:s}=Jo(e);let a=(s?bo(i.width):i.width)/o,n=(s?bo(i.height):i.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!n||!Number.isFinite(n))&&(n=1),{x:a,y:n}}const er=go(0);function ir(t){const e=Bo(t);return qo()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:er}function or(t,e,i,o){void 0===e&&(e=!1),void 0===i&&(i=!1);const r=t.getBoundingClientRect(),s=Qo(t);let a=go(1);e&&(o?jo(o)&&(a=tr(o)):a=tr(t));const n=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==Bo(t))&&e}(s,i,o)?ir(s):go(0);let l=(r.left+n.x)/a.x,d=(r.top+n.y)/a.y,h=r.width/a.x,c=r.height/a.y;if(s){const t=Bo(s),e=o&&jo(o)?Bo(o):o;let i=t.frameElement;for(;i&&o&&e!==t;){const t=tr(i),e=i.getBoundingClientRect(),o=Zo(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x,d*=t.y,h*=t.x,c*=t.y,l+=r,d+=s,i=Bo(i).frameElement}}return Po({width:h,height:c,x:l,y:d})}function rr(t){return or(Vo(t)).left+Wo(t).scrollLeft}function sr(t,e,i){let o;if("viewport"===e)o=function(t,e){const i=Bo(t),o=Vo(t),r=i.visualViewport;let s=o.clientWidth,a=o.clientHeight,n=0,l=0;if(r){s=r.width,a=r.height;const t=qo();(!t||t&&"fixed"===e)&&(n=r.offsetLeft,l=r.offsetTop)}return{width:s,height:a,x:n,y:l}}(t,i);else if("document"===e)o=function(t){const e=Vo(t),i=Wo(t),o=t.ownerDocument.body,r=uo(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=uo(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-i.scrollLeft+rr(t);const n=-i.scrollTop;return"rtl"===Zo(o).direction&&(a+=uo(e.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:n}}(Vo(t));else if(jo(e))o=function(t,e){const i=or(t,!0,"fixed"===e),o=i.top+t.clientTop,r=i.left+t.clientLeft,s=Uo(t)?tr(t):go(1);return{width:t.clientWidth*s.x,height:t.clientHeight*s.y,x:r*s.x,y:o*s.y}}(e,i);else{const i=ir(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return Po(o)}function ar(t,e){const i=Yo(t);return!(i===e||!jo(i)||Ko(i))&&("fixed"===Zo(i).position||ar(i,e))}function nr(t,e){const i=e.get(t);if(i)return i;let o=Go(t,[],!1).filter((t=>jo(t)&&"body"!==Lo(t))),r=null;const s="fixed"===Zo(t).position;let a=s?Yo(t):t;for(;jo(a)&&!Ko(a);){const e=Zo(a),i=No(a);!i&&"fixed"===e.position&&(r=null),(s?!i&&!r:!i&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||Ro(a)&&!i&&ar(t,a))?o=o.filter((t=>t!==a)):r=e,a=Yo(a)}return e.set(t,o),o}function lr(t,e,i){const o=Uo(e),r=Vo(e),s="fixed"===i,a=or(t,!0,s,e);let n={scrollLeft:0,scrollTop:0};const l=go(0);if(o||!o&&!s)if(("body"!==Lo(e)||Ro(r))&&(n=Wo(e)),o){const t=or(e,!0,s,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=rr(r));return{x:a.left+n.scrollLeft-l.x,y:a.top+n.scrollTop-l.y,width:a.width,height:a.height}}function dr(t,e){return Uo(t)&&"fixed"!==Zo(t).position?e?e(t):t.offsetParent:null}function hr(t,e){const i=Bo(t);if(!Uo(t))return i;let o=dr(t,e);for(;o&&Ho(o)&&"static"===Zo(o).position;)o=dr(o,e);return o&&("html"===Lo(o)||"body"===Lo(o)&&"static"===Zo(o).position&&!No(o))?i:o||function(t){let e=Yo(t);for(;Uo(e)&&!Ko(e);){if(No(e))return e;e=Yo(e)}return null}(t)||i}const cr={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:i,strategy:o}=t;const r=Uo(i),s=Vo(i);if(i===s)return e;let a={scrollLeft:0,scrollTop:0},n=go(1);const l=go(0);if((r||!r&&"fixed"!==o)&&(("body"!==Lo(i)||Ro(s))&&(a=Wo(i)),Uo(i))){const t=or(i);n=tr(i),l.x=t.x+i.clientLeft,l.y=t.y+i.clientTop}return{width:e.width*n.x,height:e.height*n.y,x:e.x*n.x-a.scrollLeft*n.x+l.x,y:e.y*n.y-a.scrollTop*n.y+l.y}},getDocumentElement:Vo,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:o,strategy:r}=t;const s=[..."clippingAncestors"===i?nr(e,this._c):[].concat(i),o],a=s[0],n=s.reduce(((t,i)=>{const o=sr(e,i,r);return t.top=uo(o.top,t.top),t.right=po(o.right,t.right),t.bottom=po(o.bottom,t.bottom),t.left=uo(o.left,t.left),t}),sr(e,a,r));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:hr,getElementRects:async function(t){let{reference:e,floating:i,strategy:o}=t;const r=this.getOffsetParent||hr,s=this.getDimensions;return{reference:lr(e,await r(i),o),floating:{x:0,y:0,...await s(i)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return Jo(t)},getScale:tr,isElement:jo,isRTL:function(t){return"rtl"===Zo(t).direction}};var pr=Object.defineProperty,ur=Object.getOwnPropertyDescriptor,br=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?ur(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&pr(e,i,s),s};let mr=class extends ie{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver((t=>this.handleCurrentPlacementChange(t))),this.mutationObserver.observe(this,{attributes:!0})}handleCurrentPlacementChange(t){return t.forEach((t=>{if("data-current-placement"===t.attributeName){const t=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:t})}}))}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=function(t,e,i,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,d=Qo(t),h=r||s?[...d?Go(d):[],...Go(e)]:[];h.forEach((t=>{r&&t.addEventListener("scroll",i,{passive:!0}),s&&t.addEventListener("resize",i)}));const c=d&&n?function(t,e){let i,o=null;const r=Vo(t);function s(){clearTimeout(i),o&&o.disconnect(),o=null}return function a(n,l){void 0===n&&(n=!1),void 0===l&&(l=1),s();const{left:d,top:h,width:c,height:p}=t.getBoundingClientRect();if(n||e(),!c||!p)return;const u={rootMargin:-mo(h)+"px "+-mo(r.clientWidth-(d+c))+"px "+-mo(r.clientHeight-(h+p))+"px "+-mo(d)+"px",threshold:uo(0,po(1,l))||1};let b=!0;function m(t){const e=t[0].intersectionRatio;if(e!==l){if(!b)return a();e?a(!1,e):i=setTimeout((()=>{a(!1,1e-7)}),100)}b=!1}try{o=new IntersectionObserver(m,{...u,root:r.ownerDocument})}catch{o=new IntersectionObserver(m,u)}o.observe(t)}(!0),s}(d,i):null;let p=-1,u=null;a&&(u=new ResizeObserver((t=>{let[o]=t;o&&o.target===d&&u&&(u.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{u&&u.observe(e)}))),i()})),d&&!l&&u.observe(d),u.observe(e));let b,m=l?or(t):null;return l&&function e(){const o=or(t);m&&(o.x!==m.x||o.y!==m.y||o.width!==m.width||o.height!==m.height)&&i(),m=o,b=requestAnimationFrame(e)}(),i(),()=>{h.forEach((t=>{r&&t.removeEventListener("scroll",i),s&&t.removeEventListener("resize",i)})),c&&c(),u&&u.disconnect(),u=null,l&&cancelAnimationFrame(b)}}(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>t()))):t()}))}reposition(){if(!this.active||!this.anchorEl)return;const t=[Mo({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Do({apply:({rects:t})=>{const e="width"===this.sync||"both"===this.sync,i="height"===this.sync||"both"===this.sync;this.popup.style.width=e?`${t.reference.width}px`:"",this.popup.style.height=i?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:n,platform:l,elements:d}=e,{mainAxis:h=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...g}=wo(t,e);if(null!=(i=s.arrow)&&i.alignmentOffset)return{};const v=xo(r),y=xo(n)===n,f=await(null==l.isRTL?void 0:l.isRTL(d.floating)),w=p||(y||!m?[Oo(n)]:function(t){const e=Oo(t);return[zo(t),e,zo(e)]}(n));!p&&"none"!==b&&w.push(...function(t,e,i,o){const r=ko(t);let s=function(t,e,i){const o=["left","right"],r=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return i?e?r:o:e?o:r;case"left":case"right":return e?s:a;default:return[]}}(xo(t),"start"===i,o);return r&&(s=s.map((t=>t+"-"+r)),e&&(s=s.concat(s.map(zo)))),s}(n,m,b,f));const x=[n,...w],k=await To(e,g),C=[];let $=(null==(o=s.flip)?void 0:o.overflows)||[];if(h&&C.push(k[v]),c){const t=function(t,e,i){void 0===i&&(i=!1);const o=ko(t),r=_o(t),s=$o(r);let a="x"===r?o===(i?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Oo(a)),[a,Oo(a)]}(r,a,f);C.push(k[t[0]],k[t[1]])}if($=[...$,{placement:r,overflows:C}],!C.every((t=>t<=0))){var S,_;const t=((null==(S=s.flip)?void 0:S.index)||0)+1,e=x[t];if(e)return{data:{index:t,overflows:$},reset:{placement:e}};let i=null==(_=$.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:_.placement;if(!i)switch(u){case"bestFit":{var z;const t=null==(z=$.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:z[0];t&&(i=t);break}case"initialPlacement":i=n}if(r!==i)return{reset:{placement:i}}}return{}}}}({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:o,placement:r}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:n={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...l}=wo(t,e),d={x:i,y:o},h=await To(e,l),c=So(xo(r)),p=Co(c);let u=d[p],b=d[c];if(s){const t="y"===p?"bottom":"right";u=fo(u+h["y"===p?"top":"left"],u,u-h[t])}if(a){const t="y"===c?"bottom":"right";b=fo(b+h["y"===c?"top":"left"],b,b-h[t])}const m=n.fn({...e,[p]:u,[c]:b});return{...m,data:{x:m.x-i,y:m.y-o}}}}}({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Do({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:e})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${e}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push((t=>({name:"arrow",options:t,async fn(e){const{x:i,y:o,placement:r,rects:s,platform:a,elements:n,middlewareData:l}=e,{element:d,padding:h=0}=wo(t,e)||{};if(null==d)return{};const c=Eo(h),p={x:i,y:o},u=_o(r),b=$o(u),m=await a.getDimensions(d),g="y"===u,v=g?"top":"left",y=g?"bottom":"right",f=g?"clientHeight":"clientWidth",w=s.reference[b]+s.reference[u]-p[u]-s.floating[b],x=p[u]-s.reference[u],k=await(null==a.getOffsetParent?void 0:a.getOffsetParent(d));let C=k?k[f]:0;(!C||!await(null==a.isElement?void 0:a.isElement(k)))&&(C=n.floating[f]||s.floating[b]);const $=w/2-x/2,S=C/2-m[b]/2-1,_=po(c[v],S),z=po(c[y],S),O=_,E=C-m[b]-z,P=C/2-m[b]/2+$,A=fo(O,P,E),T=!l.arrow&&null!=ko(r)&&P!=A&&s.reference[b]/2-(P<O?_:z)-m[b]/2<0,M=T?P<O?P-O:P-E:0;return{[u]:p[u]+M,data:{[u]:A,centerOffset:P-A-M,...T&&{alignmentOffset:M}},reset:T}}}))({element:this.arrowEl,padding:this.arrowPadding})),((t,e,i)=>{const o=new Map,r={platform:cr,...i},s={...r.platform,_c:o};return(async(t,e,i)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=i,n=s.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(e));let d=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:h,y:c}=Ao(d,o,l),p=o,u={},b=0;for(let i=0;i<n.length;i++){const{name:s,fn:m}=n[i],{x:g,y:v,data:y,reset:f}=await m({x:h,y:c,initialPlacement:o,placement:p,strategy:r,middlewareData:u,rects:d,platform:a,elements:{reference:t,floating:e}});h=g??h,c=v??c,u={...u,[s]:{...u[s],...y}},f&&b<=50&&(b++,"object"==typeof f&&(f.placement&&(p=f.placement),f.rects&&(d=!0===f.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):f.rects),({x:h,y:c}=Ao(d,p,l))),i=-1)}return{x:h,y:c,placement:p,strategy:r,middlewareData:u}})(t,e,{...r,platform:s})})(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy}).then((({x:t,y:e,middlewareData:i,placement:o})=>{const r="rtl"===getComputedStyle(this).direction,s={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]];if(this.setAttribute("data-current-placement",o),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=i.arrow.x,e=i.arrow.y;let o="",a="",n="",l="";if("start"===this.arrowPlacement){const i="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";o="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",a=r?i:"",l=r?"":i}else if("end"===this.arrowPlacement){const i="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";a=r?"":i,l=r?i:"",n="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",o="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",o="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:o,right:a,bottom:n,left:l,[s]:"calc(var(--arrow-size-diagonal) * -1)"})}})),this.emit("sd-reposition")}render(){return pt`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${we("isolate","fixed"!==this.strategy?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?pt`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};mr.styles=[ie.styles,Gt,P`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-width:var(--auto-size-available-width,none);max-height:var(--auto-size-available-height,none)}[part=arrow]{width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);background:var(--arrow-color)}`],br([Bt('[part="popup"]')],mr.prototype,"popup",2),br([Bt('[part="arrow"]')],mr.prototype,"arrowEl",2),br([Mt()],mr.prototype,"anchor",2),br([Mt({type:Boolean,reflect:!0})],mr.prototype,"active",2),br([Mt({reflect:!0})],mr.prototype,"placement",2),br([Mt({reflect:!0})],mr.prototype,"strategy",2),br([Mt({type:Number})],mr.prototype,"distance",2),br([Mt({type:Number})],mr.prototype,"skidding",2),br([Mt({type:Boolean})],mr.prototype,"arrow",2),br([Mt({attribute:"arrow-placement"})],mr.prototype,"arrowPlacement",2),br([Mt({attribute:"arrow-padding",type:Number})],mr.prototype,"arrowPadding",2),br([Mt({type:Boolean})],mr.prototype,"flip",2),br([Mt({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],mr.prototype,"flipFallbackPlacements",2),br([Mt({attribute:"flip-fallback-strategy"})],mr.prototype,"flipFallbackStrategy",2),br([Mt({type:Object})],mr.prototype,"flipBoundary",2),br([Mt({attribute:"flip-padding",type:Number})],mr.prototype,"flipPadding",2),br([Mt({type:Boolean})],mr.prototype,"shift",2),br([Mt({type:Object})],mr.prototype,"shiftBoundary",2),br([Mt({attribute:"shift-padding",type:Number})],mr.prototype,"shiftPadding",2),br([Mt({attribute:"auto-size"})],mr.prototype,"autoSize",2),br([Mt()],mr.prototype,"sync",2),br([Mt({type:Object})],mr.prototype,"autoSizeBoundary",2),br([Mt({attribute:"auto-size-padding",type:Number})],mr.prototype,"autoSizePadding",2),mr=br([Pt("sd-popup")],mr);const gr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return mr}},Symbol.toStringTag,{value:"Module"}));var vr=Object.defineProperty,yr=Object.getOwnPropertyDescriptor,fr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?yr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&vr(e,i,s),s};let wr=class extends ie{constructor(){super(...arguments),this.localize=new k(this),this.open=!1,this.rounded=!1,this.placement="bottom-start",this.disabled=!1,this.stayOpenOnSelect=!1,this.distance=0,this.skidding=0,this.noAutoSize=!1,this.noFlip=!1,this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleMenuItemActivate=this.handleMenuItemActivate.bind(this),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}focusOnTrigger(){const t=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof(null==t?void 0:t.focus)&&t.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find((t=>"sd-menu"===t.tagName.toLowerCase()))}handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(t){var e;if("Tab"===t.key){if(this.open&&"sd-menu-item"===(null==(e=document.activeElement)?void 0:e.tagName.toLowerCase()))return t.preventDefault(),this.hide(),void this.focusOnTrigger();setTimeout((()=>{var t,e,i;const o=(null==(t=this.containingElement)?void 0:t.getRootNode())instanceof ShadowRoot?null==(i=null==(e=document.activeElement)?void 0:e.shadowRoot)?void 0:i.activeElement:document.activeElement;(!this.containingElement||(null==o?void 0:o.closest(this.containingElement.tagName.toLowerCase()))!==this.containingElement)&&this.hide()}))}}handleDocumentMouseDown(t){const e=t.composedPath();this.containingElement&&!e.includes(this.containingElement)&&this.hide()}handleMenuItemActivate(t){Ni(t.target,this.panel)}handlePanelSelect(t){const e=t.target;!this.stayOpenOnSelect&&"sd-menu"===e.tagName.toLowerCase()&&(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.open?this.hide():this.show()}handleTriggerKeyDown(t){if("Escape"===t.key&&this.open)return t.stopPropagation(),this.focusOnTrigger(),void this.hide();if([" ","Enter"].includes(t.key))return t.preventDefault(),void this.handleTriggerClick();const e=this.getMenu();if(e){const i=e.defaultSlot.assignedElements({flatten:!0}),o=i[0],r=i[i.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),i.length>0&&requestAnimationFrame((()=>{("ArrowDown"===t.key||"Home"===t.key)&&(e.setCurrentItem(o),o.focus()),("ArrowUp"===t.key||"End"===t.key)&&(e.setCurrentItem(r),r.focus())})))}}handleTriggerKeyUp(t){" "===t.key&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}updateAccessibleTrigger(){const t=this.trigger.assignedElements({flatten:!0}).find((t=>Ki(t).start));let e;if(t){switch(t.tagName.toLowerCase()){case"sd-button":case"sd-icon-button":e=t.button;break;default:e=t}e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded",this.open?"true":"false")}}async show(){if(!this.open)return this.open=!0,fe(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,fe(this,"sd-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("sd-activate",this.handleMenuItemActivate),this.panel.addEventListener("sd-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("sd-activate",this.handleMenuItemActivate),this.panel.removeEventListener("sd-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}async handleOpenChange(){if(this.disabled)this.open=!1;else if(this.updateAccessibleTrigger(),this.open){this.emit("sd-show"),this.addOpenListeners(),await pe(this),this.panel.hidden=!1,this.popup.active=!0;const{keyframes:t,options:e}=ye(this,"dropdown.show",{dir:this.localize.dir()});await de(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await pe(this);const{keyframes:t,options:e}=ye(this,"dropdown.hide",{dir:this.localize.dir()});await de(this.popup.popup,t,e),this.panel.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}render(){return pt`<sd-popup part="base" id="dropdown" placement="${this.placement}" distance="${this.rounded&&this.distance<1?1:this.distance}" skidding="${this.skidding}" strategy="${this.hoist?"fixed":"absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10" ?active="${this.open}"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${we("shadow bg-white",this.open?"block pointer-events-auto":"pointer-events-none",this.rounded&&"rounded-md")}" aria-hidden="${this.open?"false":"true"}" aria-labelledby="dropdown"></slot></sd-popup>`}};wr.styles=[ie.styles,Gt,P`:host{display:inline-block}#dropdown::part(popup){z-index:var(--sd-z-index-dropdown,900)}#dropdown[data-current-placement^=top]::part(popup){transform-origin:bottom}#dropdown[data-current-placement^=bottom]::part(popup){transform-origin:top}#dropdown[data-current-placement^=left]::part(popup){transform-origin:right}#dropdown[data-current-placement^=right]::part(popup){transform-origin:left}:host(:not([no-auto-size])) ::slotted(:not([slot=trigger])){overflow:auto;max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}`],fr([Bt("#dropdown")],wr.prototype,"popup",2),fr([Bt("[part=trigger]")],wr.prototype,"trigger",2),fr([Bt("[part=panel]")],wr.prototype,"panel",2),fr([Mt({type:Boolean,reflect:!0})],wr.prototype,"open",2),fr([Mt({type:Boolean,reflect:!0})],wr.prototype,"rounded",2),fr([Mt({reflect:!0})],wr.prototype,"placement",2),fr([Mt({type:Boolean,reflect:!0})],wr.prototype,"disabled",2),fr([Mt({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],wr.prototype,"stayOpenOnSelect",2),fr([Mt({attribute:!1})],wr.prototype,"containingElement",2),fr([Mt({type:Number})],wr.prototype,"distance",2),fr([Mt({type:Number})],wr.prototype,"skidding",2),fr([Mt({type:Boolean,reflect:!0,attribute:"no-auto-size"})],wr.prototype,"noAutoSize",2),fr([Mt({type:Boolean,reflect:!0,attribute:"no-flip"})],wr.prototype,"noFlip",2),fr([Mt({type:Boolean})],wr.prototype,"hoist",2),fr([Xt("open",{waitUntilFirstUpdate:!0})],wr.prototype,"handleOpenChange",1),wr=fr([Pt("sd-dropdown")],wr),ve("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),ve("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});const xr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return wr}},Symbol.toStringTag,{value:"Module"}));var kr=Object.defineProperty,Cr=Object.getOwnPropertyDescriptor,$r=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Cr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&kr(e,i,s),s};let Sr=class extends ie{constructor(){super(...arguments),this.fixed=!1}connectedCallback(){super.connectedCallback(),this.setCalculatedHeightProperty=this.setCalculatedHeightProperty.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this)}firstUpdated(){this.toggleHeightCalculation()}toggleHeightCalculation(){var t;this.fixed?(this.setCalculatedHeightProperty(),this.addResizeObserver()):(this.setCalculatedHeightProperty(),null==(t=this.resizeObserver)||t.disconnect(),this.resizeObserver=void 0)}disconnectedCallback(){super.disconnectedCallback()}updated(t){super.updated(t),t.has("fixed")&&this.toggleHeightCalculation()}onResize(){this.fixed&&this.setCalculatedHeightProperty()}addResizeObserver(){this.resizeObserver=new ResizeObserver((()=>{this.onResize()})),this.refHeaderElement&&this.resizeObserver.observe(this.refHeaderElement)}setCalculatedHeightProperty(){this.fixed&&this.refHeaderElement?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.refHeaderElement.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return pt`<header class="w-full bg-white relative" role="banner" @slotchange="${this.handleSlotChange}"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}handleSlotChange(t){t.target.assignedElements().length>0&&(this.refHeaderElement=t.currentTarget,this.setCalculatedHeightProperty())}};Sr.styles=[ie.styles,Gt,P`:host{display:block}:host([fixed]){position:fixed;left:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header::after{content:'';position:absolute;left:var(--sd-spacing-0,0);right:var(--sd-spacing-0,0);top:100%;height:var(--sd-spacing-2,.5rem);background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%))}[part=main]{width:var(--sd-header-inner-width);max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px)}`],$r([Mt({reflect:!0,type:Boolean})],Sr.prototype,"fixed",2),$r([vi(100)],Sr.prototype,"onResize",1),Sr=$r([Pt("sd-header")],Sr);const _r=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Sr}},Symbol.toStringTag,{value:"Module"}));var zr=Object.defineProperty,Or=Object.getOwnPropertyDescriptor,Er=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Or(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&zr(e,i,s),s};let Pr=class extends ie{constructor(){super(...arguments),this.mode="cors",this.allowScripts=!1}executeScript(t){const e=document.createElement("script");[...t.attributes].forEach((t=>e.setAttribute(t.name,t.value))),e.textContent=t.textContent,t.parentNode.replaceChild(e,t)}async handleSrcChange(){try{const t=this.src,e=await jt(t,this.mode);if(t!==this.src)return;if(!e.ok)return void this.emit("sd-error",{detail:{status:e.status}});this.innerHTML=e.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach((t=>this.executeScript(t))),this.emit("sd-load")}catch{this.emit("sd-error",{detail:{status:-1}})}}render(){return pt`<slot></slot>`}};Pr.styles=[Gt,P`:host{display:block}`],Er([Mt()],Pr.prototype,"src",2),Er([Mt()],Pr.prototype,"mode",2),Er([Mt({attribute:"allow-scripts",type:Boolean})],Pr.prototype,"allowScripts",2),Er([Xt("src")],Pr.prototype,"handleSrcChange",1),Pr=Er([Pt("sd-include")],Pr);const Ar=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Pr}},Symbol.toStringTag,{value:"Module"}));var Tr=Object.defineProperty,Mr=Object.getOwnPropertyDescriptor,Dr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Mr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Tr(e,i,s),s};const Lr=!(null==(i=navigator.userAgentData)?void 0:i.brands.some((t=>t.brand.includes("Chromium"))))&&navigator.userAgent.includes("Firefox");let Br=class extends ie{constructor(){super(...arguments),this.formControlController=new Xe(this),this.hasSlotController=new ti(this,"help-text","label","left","right","message","placeholder"),this.localize=new k(this),this.hasFocus=!1,this.showValidStyle=!1,this.showInvalidStyle=!1,this.type="text",this.size="lg",this.value="",this.defaultValue="",this.placeholder="",this.label="",this.helpText="",this.clearable=!1,this.disabled=!1,this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.noSpinButtons=!1,this.form="",this.name="",this.title="",this.required=!1,this.styleOnValid=!1,this.spellcheck=!0}get valueAsDate(){var t;return(null==(t=this.input)?void 0:t.valueAsDate)??null}set valueAsDate(t){const e=document.createElement("input");e.type="date",e.valueAsDate=t,this.value=e.value}get valueAsNumber(){var t;return(null==(t=this.input)?void 0:t.valueAsNumber)??parseFloat(this.value)}set valueAsNumber(t){const e=document.createElement("input");e.type="number",e.valueAsNumber=t,this.value=e.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(t){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),t.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleKeyDown(t){const e=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;"Enter"===t.key&&!e&&setTimeout((()=>{!t.defaultPrevented&&!t.isComposing&&this.formControlController.submit()}))}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(t,e,i="none"){this.input.setSelectionRange(t,e,i)}setRangeText(t,e,i,o){this.input.setRangeText(t,e,i,o),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var t;return null==(t=this.input)?void 0:t.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("label"),e=this.hasSlotController.test("help-text"),i=(this.hasSlotController.test("description"),this.hasSlotController.test("left")),o=this.hasSlotController.test("right"),r=!!this.label||!!t,s=!!this.helpText||!!e,a=this.clearable&&!this.readonly&&("number"==typeof this.value||this.value.length>0),n=this.disabled?"disabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",l="sm"===this.size?"text-sm":"text-base",d={disabled:"text-neutral-500",readonly:"text-black",activeInvalid:"text-error",activeValid:"text-success",active:"text-black",invalid:"text-error",valid:"text-success",default:"text-black"}[n],h={disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[n],c=this.disabled?"text-neutral-500":"text-primary",p={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],u={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return pt`<div part="form-control" class="${we(this.disabled&&"pointer-events-none")}"><label part="form-control-label" id="label" class="${we("mb-2",r?"inline-block":"hidden",l)}" for="input" aria-hidden="${r?"false":"true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="relative w-full"><div part="border" class="${we("absolute w-full h-full pointer-events-none border rounded-default",h)}"></div><div part="base" class="${we("px-4 flex flex-row items-center rounded-default transition-all bg-white","lg"===this.size?"py-2":"py-1",this.disabled||this.readonly?"":"hover:bg-neutral-200",this.readonly&&"bg-neutral-100",d)}">${i?pt`<slot name="left" part="left" class="${we("inline-flex","sm"===this.size?"mr-1":"mr-2",c,u)}"></slot>`:""} <input part="input" id="input" class="${we("min-w-0 flex-grow focus:outline-none bg-transparent placeholder-neutral-700","sm"===this.size?"h-6":"h-8",l)}" type="${"password"===this.type&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${ai(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${ai(this.placeholder)}" minlength="${ai(this.minlength)}" maxlength="${ai(this.maxlength)}" min="${ai(this.min)}" max="${ai(this.max)}" step="${ai(this.step)}" .value="${Li(this.value)}" autocapitalize="${ai("password"===this.type?"off":this.autocapitalize)}" autocomplete="${ai("password"===this.type?"off":this.autocomplete)}" autocorrect="${ai("password"===this.type?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${ai(this.pattern)}" enterkeyhint="${ai(this.enterkeyhint)}" inputmode="${ai(this.inputmode)}" aria-describedby="help-text" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${a?pt`<button part="clear-button" class="${we("flex justify-center ",p)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${we("text-neutral-500",u)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.passwordToggle&&"password"===this.type?pt`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="flex items-center" type="button" @click="${this.handlePasswordToggle}" tabindex="-1">${this.passwordVisible?pt`<slot name="show-password-icon"><sd-icon class="${we(c,p,u)}" library="system" name="eye"></sd-icon></slot>`:pt`<slot name="hide-password-icon"><sd-icon class="${we(c,p,u)}" library="system" name="eye-crossed-out"></sd-icon></slot>`}</button>`:""} ${"date"!==this.type&&"datetime-local"!==this.type||Lr?"":pt`<sd-icon class="${we(c,p,u)}" library="system" name="calendar"></sd-icon>`} ${"time"===this.type?pt`<sd-icon class="${we(c,p,u)}" library="system" name="clock"></sd-icon>`:""} ${this.showInvalidStyle?pt`<sd-icon part="invalid-icon" class="${we("text-error",p,u)}" library="system" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?pt`<sd-icon class="${we("text-success",p,u)}" library="system" name="confirm" part="valid-icon"></sd-icon>`:""} ${o?pt`<slot name="right" part="right" class="${we("inline-flex",c,p,u)}"></slot>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${we("text-sm text-neutral-700",s?"block":"hidden")}" aria-hidden="${!s}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};Br.styles=[Gt,ie.styles,P`:host{position:relative;box-sizing:border-box;display:inline-block;width:100%;text-align:left}:host([vertical]){display:block}:host([required]) #label::after{content:' *'}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}`],Dr([Bt("#input")],Br.prototype,"input",2),Dr([Bt("#invalid-message")],Br.prototype,"invalidMessage",2),Dr([Dt()],Br.prototype,"hasFocus",2),Dr([Dt()],Br.prototype,"showValidStyle",2),Dr([Dt()],Br.prototype,"showInvalidStyle",2),Dr([Mt({reflect:!0})],Br.prototype,"type",2),Dr([Mt({reflect:!0})],Br.prototype,"size",2),Dr([Mt()],Br.prototype,"inputmode",2),Dr([Mt()],Br.prototype,"value",2),Dr([Mi()],Br.prototype,"defaultValue",2),Dr([Mt()],Br.prototype,"placeholder",2),Dr([Mt()],Br.prototype,"label",2),Dr([Mt({attribute:"help-text"})],Br.prototype,"helpText",2),Dr([Mt({type:Boolean})],Br.prototype,"clearable",2),Dr([Mt({type:Boolean,reflect:!0})],Br.prototype,"disabled",2),Dr([Mt({type:Boolean,reflect:!0})],Br.prototype,"readonly",2),Dr([Mt({attribute:"password-toggle",type:Boolean})],Br.prototype,"passwordToggle",2),Dr([Mt({attribute:"password-visible",type:Boolean})],Br.prototype,"passwordVisible",2),Dr([Mt({attribute:"no-spin-buttons",type:Boolean})],Br.prototype,"noSpinButtons",2),Dr([Mt({type:Number})],Br.prototype,"minlength",2),Dr([Mt({type:Number})],Br.prototype,"maxlength",2),Dr([Mt({type:Number})],Br.prototype,"min",2),Dr([Mt({type:Number})],Br.prototype,"max",2),Dr([Mt({reflect:!0})],Br.prototype,"form",2),Dr([Mt()],Br.prototype,"name",2),Dr([Mt()],Br.prototype,"title",2),Dr([Mt({type:Boolean,reflect:!0})],Br.prototype,"required",2),Dr([Mt()],Br.prototype,"pattern",2),Dr([Mt()],Br.prototype,"step",2),Dr([Mt()],Br.prototype,"autocapitalize",2),Dr([Mt()],Br.prototype,"autocorrect",2),Dr([Mt()],Br.prototype,"autocomplete",2),Dr([Mt({type:Boolean})],Br.prototype,"autofocus",2),Dr([Mt()],Br.prototype,"enterkeyhint",2),Dr([Mt({type:Boolean,reflect:!0,attribute:"style-on-valid"})],Br.prototype,"styleOnValid",2),Dr([Mt({type:Boolean,converter:{fromAttribute:t=>!(!t||"false"===t),toAttribute:t=>t?"true":"false"}})],Br.prototype,"spellcheck",2),Dr([Xt("disabled",{waitUntilFirstUpdate:!0})],Br.prototype,"handleDisabledChange",1),Dr([Xt("step",{waitUntilFirstUpdate:!0})],Br.prototype,"handleStepChange",1),Dr([Xt("value",{waitUntilFirstUpdate:!0})],Br.prototype,"handleValueChange",1),Br=Dr([Pt("sd-input")],Br);const Vr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Br}},Symbol.toStringTag,{value:"Module"}));var Ir=Object.defineProperty,jr=Object.getOwnPropertyDescriptor,Ur=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?jr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Ir(e,i,s),s};let Fr=class extends ie{constructor(){super(...arguments),this.hasSlotController=new ti(this,"[default]","icon-left","icon-right"),this.size="inherit",this.inverted=!1,this.standalone=!1,this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){const t={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return pt`<a part="base" class="${we("inline",this.href?"cursor-pointer":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline"}[this.href?"enabled":"disabled"],this.standalone&&"flex items-start")}" href="${ai(this.href||void 0)}" target="${ai(this.target||void 0)}" download="${ai(this.download||void 0)}" rel="${ai(this.target?"noreferrer noopener":void 0)}" aria-disabled="${this.href?"false":"true"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"><slot name="icon-left" part="icon-left" class="${we("inline",t["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${we("inline",t["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};Fr.styles=[ie.styles,P`::slotted(sd-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-base,1rem)}:host([size=lg][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-xl,1.5rem)}`],Ur([Bt("a")],Fr.prototype,"button",2),Ur([Mt({reflect:!0})],Fr.prototype,"size",2),Ur([Mt({type:Boolean,reflect:!0})],Fr.prototype,"inverted",2),Ur([Mt({type:Boolean,reflect:!0})],Fr.prototype,"standalone",2),Ur([Mt()],Fr.prototype,"href",2),Ur([Mt()],Fr.prototype,"target",2),Ur([Mt()],Fr.prototype,"download",2),Fr=Ur([Pt("sd-link")],Fr);const Rr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Fr}},Symbol.toStringTag,{value:"Module"}));var Hr=Object.defineProperty,Nr=Object.getOwnPropertyDescriptor,qr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Nr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Hr(e,i,s),s};let Kr=class extends ie{constructor(){super(...arguments),this.hasSlotController=new ti(this,"[default]","description","children"),this.href="",this.current=!1,this.disabled=!1,this.size="base",this.vertical=!1,this.chevron=!1,this.indented=!1,this.relaxed=!1,this.divider=!1,this.open=!1}isButton(){return!this.href&&!this.hasSlotController.test("children")}isLink(){return!!this.href}isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}handleClickSummary(t){t.preventDefault(),t.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}render(){const t=this.isLink(),e=this.isButton(),i=this.isAccordion(),o=(this.hasSlotController.test("[default]"),this.hasSlotController.test("main"),this.hasSlotController.test("description")),r=this.hasSlotController.test("children"),s=t?oi`a`:i?oi`summary`:oi`button`,a=this.vertical?"pb-3":"pb-2",n=si`<${s} part="base" class="${we("hover:bg-neutral-200 group transition-all min-h-[48px] cursor-pointer relative focus-visible:focus-outline",{base:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",i?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-[1px]",this.vertical?"px-8":"px-4")}" aria-controls="${ai(i?"navigation-item-details":void 0)}" aria-current="${ai(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${ai(e?this.disabled:void 0)}" href="${ai(this.href||void 0)}" target="${ai(t?this.target:void 0)}" download="${ai(t?this.download:void 0)}" rel="${ai(t&&this.target?"noreferrer noopener":void 0)}" role="${t?"link":"button"}" tabindex="${this.disabled?"-1":"0"}" @click="${i?this.handleClickSummary:e?this.handleClickButton:void 0}"><div part="current-indicator" class="${we("absolute left-0 pointer-events-none transition-all duration-150",this.vertical?"w-1 h-[calc(100%-8px)] top-1 group-hover:h-full group-hover:top-0":"h-1 w-full bottom-0",this.current?"bg-accent":"bg-transparent",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${we("relative pt-3 inline-flex justify-between items-center",i?"grow":"w-full",o?"pb-1":a,this.calculatePaddingX())}">${this.divider&&this.vertical?si`<sd-divider part="divider" class="${we("w-full transition-all absolute -top-[1px] left-0",this.calculatePaddingX())}"></sd-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto"><slot part="content" class="inline"></slot></span>${(this.chevron||r)&&this.vertical?si`<sd-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${we("h-6 w-6 ml-2 transition-all",i?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon>`:""} </span>${o&&this.vertical?si`<slot name="description" part="description" class="${we("inline-block text-sm text-left text-black",i?"grow":"w-full",a,this.calculatePaddingX())}"></slot>`:""}</${s}>`;return i?si`<details part="details" id="navigation-item-details" ?open="${this.open}" class="relative flex">${n}<slot name="children"></slot></details>`:si`${n}`}};Kr.styles=[Gt,ie.styles,P`:host{position:relative;box-sizing:border-box;display:inline-block}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}`],qr([Mt({reflect:!0})],Kr.prototype,"href",2),qr([Mt()],Kr.prototype,"target",2),qr([Mt()],Kr.prototype,"download",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"current",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"disabled",2),qr([Mt({reflect:!0})],Kr.prototype,"size",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"vertical",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"chevron",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"indented",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"relaxed",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"divider",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"open",2),Kr=qr([(t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)})
94
+ */})(t),e}});var Bi=Object.defineProperty,Vi=Object.getOwnPropertyDescriptor,Ii=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Vi(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Bi(e,i,s),s};let ji=class extends ie{constructor(){super(...arguments),this.formControlController=new Xe(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e}),this.title="",this.name="",this.size="lg",this.disabled=!1,this.checked=!1,this.indeterminate=!1,this.defaultChecked=!1,this.form="",this.required=!1,this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return pt`<label part="base" class="${we("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed",{sm:"text-sm",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${ai(this.value)}" .indeterminate="${Li(this.indeterminate)}" .checked="${Li(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${we("relative flex flex-initial items-center justify-center border rounded-sm h-4 w-4\n peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2\n peer-focus-visible:outline-primary",{sm:"mt-[2px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}">${this.checked?pt`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-hook"></sd-icon>`:""} ${!this.checked&&this.indeterminate?pt`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="system" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${we("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};ji.styles=[ie.styles,P`:host{display:block}:host(:focus-visible){outline-width:0}:host([required]) #label::after{content:' *'}`],Ii([Bt('input[type="checkbox"]')],ji.prototype,"input",2),Ii([Bt("#invalid-message")],ji.prototype,"invalidMessage",2),Ii([Mt()],ji.prototype,"title",2),Ii([Mt()],ji.prototype,"name",2),Ii([Mt()],ji.prototype,"value",2),Ii([Mt({reflect:!0})],ji.prototype,"size",2),Ii([Mt({type:Boolean,reflect:!0})],ji.prototype,"disabled",2),Ii([Mt({type:Boolean,reflect:!0})],ji.prototype,"checked",2),Ii([Mt({type:Boolean,reflect:!0})],ji.prototype,"indeterminate",2),Ii([Mi("checked")],ji.prototype,"defaultChecked",2),Ii([Mt({reflect:!0})],ji.prototype,"form",2),Ii([Mt({type:Boolean,reflect:!0})],ji.prototype,"required",2),Ii([Dt()],ji.prototype,"showInvalidStyle",2),Ii([Xt("disabled",{waitUntilFirstUpdate:!0})],ji.prototype,"handleDisabledChange",1),Ii([Xt(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],ji.prototype,"handleStateChange",1),ji=Ii([Pt("sd-checkbox")],ji);const Ui=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ji}},Symbol.toStringTag,{value:"Module"})),Fi=new Set;function Ri(t){if(Fi.add(t),!document.body.classList.contains("sd-scroll-lock")){const t=function(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}();document.body.classList.add("sd-scroll-lock"),document.body.style.setProperty("--sd-scroll-lock-size",`${t}px`)}}function Hi(t){Fi.delete(t),0===Fi.size&&(document.body.classList.remove("sd-scroll-lock"),document.body.style.removeProperty("--sd-scrollbar-width"))}function Ni(t,e,i="vertical",o="smooth"){const r=function(t,e){return{top:Math.round(t.getBoundingClientRect().top-e.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-e.getBoundingClientRect().left)}}(t,e),s=r.top+e.scrollTop,a=r.left+e.scrollLeft,n=e.scrollLeft,l=e.scrollLeft+e.offsetWidth,d=e.scrollTop,h=e.scrollTop+e.offsetHeight;("horizontal"===i||"both"===i)&&(a<n?e.scrollTo({left:a,behavior:o}):a+t.clientWidth>l&&e.scrollTo({left:a-e.offsetWidth+t.clientWidth,behavior:o})),("vertical"===i||"both"===i)&&(s<d?e.scrollTo({top:s,behavior:o}):s+t.clientHeight>h&&e.scrollTo({top:s-e.offsetHeight+t.clientHeight,behavior:o}))}function qi(t){const e=t.tagName.toLowerCase();return!("-1"===t.getAttribute("tabindex")||t.hasAttribute("disabled")||t.hasAttribute("aria-disabled")&&"false"!==t.getAttribute("aria-disabled")||"input"===e&&"radio"===t.getAttribute("type")&&!t.hasAttribute("checked")||null===t.offsetParent||"hidden"===window.getComputedStyle(t).visibility)&&(!!(("audio"===e||"video"===e)&&t.hasAttribute("controls")||t.hasAttribute("tabindex")||t.hasAttribute("contenteditable")&&"false"!==t.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(e))}function Ki(t){const e=[];return function t(i){i instanceof HTMLElement&&(e.push(i),null!==i.shadowRoot&&"open"===i.shadowRoot.mode&&t(i.shadowRoot)),[...i.children].forEach((e=>t(e)))}(t),{start:e.find((t=>qi(t)))??null,end:e.reverse().find((t=>qi(t)))??null}}let Zi=[];class Wi{constructor(t){this.tabDirection="forward",this.element=t,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){Zi.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Zi=Zi.filter((t=>t!==this.element)),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Zi[Zi.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:t,end:e}=Ki(this.element),i="forward"===this.tabDirection?t:e;"function"==typeof(null==i?void 0:i.focus)&&i.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(t){"Tab"===t.key&&t.shiftKey&&(this.tabDirection="backward",requestAnimationFrame((()=>this.checkFocus())))}handleKeyUp(){this.tabDirection="forward"}}var Yi=Object.defineProperty,Xi=Object.getOwnPropertyDescriptor,Gi=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Xi(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Yi(e,i,s),s};let Ji=class extends ie{constructor(){super(...arguments),this.hasSlotController=new ti(this,"footer"),this.localize=new k(this),this.open=!1,this.headline="",this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new Wi(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),Ri(this))}disconnectedCallback(){super.disconnectedCallback(),Hi(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const t=ye(this,"dialog.denyClose",{dir:this.localize.dir()});de(this.panel,t.keyframes,t.options)}else this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),Ri(this);const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([pe(this.dialog),pe(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame((()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")}));const e=ye(this,"dialog.show",{dir:this.localize.dir()}),i=ye(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([de(this.panel,e.keyframes,e.options),de(this.overlay,i.keyframes,i.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([pe(this.dialog),pe(this.overlay)]);const t=ye(this,"dialog.hide",{dir:this.localize.dir()}),e=ye(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([de(this.overlay,e.keyframes,e.options).then((()=>{this.overlay.hidden=!0})),de(this.panel,t.keyframes,t.options).then((()=>{this.panel.hidden=!0}))]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,Hi(this);const i=this.originalTrigger;"function"==typeof(null==i?void 0:i.focus)&&setTimeout((()=>i.focus())),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,fe(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,fe(this,"sd-after-hide")}render(){return pt`<div part="base" class="${we("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${we("flex flex-col z-20 bg-white focus:outline-none py-4 sm:py-8 relative gap-6",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.headline}" aria-labelledby="title" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length>0?pt`<h4 class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</h4>`:pt`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":pt`<sd-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${we("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-icon name="system/close" library="global-resources" color="currentColor"></sd-icon></sd-button>`}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`}};Ji.styles=[Gt,E(".sd-headline{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity));display:flex;font-size:var(--sd-font-size-3xl,2rem);font-weight:700;gap:var(--sd-spacing-4,1rem);line-height:var(--sd-line-height-tight,120%)}@media (min-width:640px){.sd-headline{font-size:var(--sd-font-size-4xl,2.5rem)}}.sd-headline sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity));flex-shrink:0;font-size:3rem}@media (min-width:640px){.sd-headline sd-icon{margin-top:var(--sd-spacing-2,.5rem)}}.sd-headline--size-3xl{font-size:var(--sd-font-size-2xl,1.75rem)}@media (min-width:640px){.sd-headline--size-3xl{font-size:var(--sd-font-size-3xl,2rem)}}.sd-headline--size-3xl sd-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}@media (min-width:640px){.sd-headline--size-3xl sd-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline--size-base,.sd-headline--size-lg,.sd-headline--size-xl{--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity));gap:var(--sd-spacing-2,.5rem)}.sd-headline--size-base sd-icon,.sd-headline--size-lg sd-icon,.sd-headline--size-xl sd-icon{font-size:2rem}.sd-headline--size-xl{font-size:var(--sd-font-size-xl,1.5rem)}.sd-headline--size-xl sd-icon{margin-top:var(--sd-spacing-0-5,.125rem)}@media (min-width:640px){.sd-headline--size-xl sd-icon{margin-top:var(--sd-spacing-0-5,.125rem)}}.sd-headline--size-base,.sd-headline--size-lg{line-height:var(--sd-line-height-normal,150%)}.sd-headline--size-lg{font-size:var(--sd-font-size-lg,1.25rem)}.sd-headline--size-lg sd-icon{margin-top:var(--sd-spacing-0,0)}@media (min-width:640px){.sd-headline--size-lg sd-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline--size-base{--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity));font-size:var(--sd-font-size-base,1rem)}.sd-headline--size-base sd-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}.sd-headline--size-base mark{color:inherit}.sd-headline--inverted,.sd-headline--inverted sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity))}.sd-headline--inline{display:inline}.sd-headline--inline sd-icon{margin-right:var(--sd-spacing-2,.5rem);margin-top:calc(var(--sd-spacing-1, .25rem)*-1);vertical-align:middle}.sd-headline--inline.sd-headline--size-base sd-icon,.sd-headline--inline.sd-headline--size-lg sd-icon,.sd-headline--inline.sd-headline--size-xl sd-icon{margin-right:var(--sd-spacing-0-5,.125rem)}"),ie.styles,P`:host{--width:662px}[part=panel]{width:var(--width);max-height:80vh}[part=body]{-webkit-overflow-scrolling:touch}@media (max-width:414px){:host{--width:335px}[part=footer]{width:100%}}`],Gi([Bt('[part="base"]')],Ji.prototype,"dialog",2),Gi([Bt('[part="panel"]')],Ji.prototype,"panel",2),Gi([Bt('[part="overlay"]')],Ji.prototype,"overlay",2),Gi([Mt({type:Boolean,reflect:!0})],Ji.prototype,"open",2),Gi([Mt({reflect:!0})],Ji.prototype,"headline",2),Gi([Mt({attribute:"no-close-button",type:Boolean,reflect:!0})],Ji.prototype,"noCloseButton",2),Gi([Xt("open",{waitUntilFirstUpdate:!0})],Ji.prototype,"handleOpenChange",1),Ji=Gi([Pt("sd-dialog")],Ji),ve("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),ve("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),ve("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),ve("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),ve("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});const Qi=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Ji}},Symbol.toStringTag,{value:"Module"}));var to=Object.defineProperty,eo=Object.getOwnPropertyDescriptor,io=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?eo(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&to(e,i,s),s};let oo=class extends ie{constructor(){super(...arguments),this.orientation="horizontal",this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return pt`<hr part="main" class="${we(this.inverted?"border-primary-400":"border-neutral-400","horizontal"===this.orientation?"border-t w-full":" border-l h-full")}">`}};oo.styles=[Gt,ie.styles,P`:host{margin:var(--sd-spacing-0,0)}:host(sd-divider[orientation=horizontal]){display:block}:host(sd-divider[orientation=vertical]){display:inline-block}`],io([Mt({reflect:!0})],oo.prototype,"orientation",2),io([Mt({type:Boolean,reflect:!0})],oo.prototype,"inverted",2),oo=io([Pt("sd-divider")],oo);const ro=Object.freeze(Object.defineProperty({__proto__:null,get default(){return oo}},Symbol.toStringTag,{value:"Module"}));function so(t){return t.charAt(0).toUpperCase()+t.slice(1)}var ao=Object.defineProperty,no=Object.getOwnPropertyDescriptor,lo=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?no(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&ao(e,i,s),s};let ho=class extends ie{constructor(){super(...arguments),this.hasSlotController=new ti(this,"footer"),this.localize=new k(this),this.modal=new Wi(this),this.open=!1,this.label="",this.placement="end",this.contained=!1,this.noHeader=!1,this.handleDocumentKeyDown=t=>{this.open&&"Escape"===t.key&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),Ri(this)))}disconnectedCallback(){super.disconnectedCallback(),Hi(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const t=ye(this,"drawer.denyClose",{dir:this.localize.dir()});de(this.panel,t.keyframes,t.options)}else this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.contained||(this.modal.activate(),Ri(this));const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([pe(this.drawer),pe(this.overlay)]),this.drawer.hidden=!1,requestAnimationFrame((()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")}));const e=ye(this,`drawer.show${so(this.placement)}`,{dir:this.localize.dir()}),i=ye(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([de(this.panel,e.keyframes,e.options),de(this.overlay,i.keyframes,i.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),Hi(this)),await Promise.all([pe(this.drawer),pe(this.overlay)]);const t=ye(this,`drawer.hide${so(this.placement)}`,{dir:this.localize.dir()}),e=ye(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([de(this.overlay,e.keyframes,e.options).then((()=>{this.overlay.hidden=!0})),de(this.panel,t.keyframes,t.options).then((()=>{this.panel.hidden=!0}))]),this.drawer.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1;const i=this.originalTrigger;"function"==typeof(null==i?void 0:i.focus)&&setTimeout((()=>i.focus())),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),Ri(this)),this.open&&this.contained&&(this.modal.deactivate(),Hi(this))}async show(){if(!this.open)return this.open=!0,fe(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,fe(this,"sd-after-hide")}render(){return pt`<div part="base" class="${we("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}"><div part="overlay" class="${we("block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${we("absolute flex flex-col z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[--width] h-full",start:"top-0 end-auto bottom-auto start-0 w-[--width] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.label}" aria-labelledby="${ai(this.noHeader?void 0:"title")}" tabindex="0">${this.noHeader?"":pt`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-icon name="close" library="system"></sd-icon></sd-button></div></header>`}<div part="body" class="flex-auto block px-4"><slot></slot></div><footer part="footer" class="${we(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></div>`}};ho.styles=[ie.styles,Gt,P`:host{--width:25rem;display:contents}:host([contained]){z-index:initial}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}`],lo([Bt("[part=base]")],ho.prototype,"drawer",2),lo([Bt("[part=panel]")],ho.prototype,"panel",2),lo([Bt("[part=overlay]")],ho.prototype,"overlay",2),lo([Mt({type:Boolean,reflect:!0})],ho.prototype,"open",2),lo([Mt({attribute:"label",reflect:!0})],ho.prototype,"label",2),lo([Mt({reflect:!0})],ho.prototype,"placement",2),lo([Mt({type:Boolean,reflect:!0})],ho.prototype,"contained",2),lo([Mt({attribute:"no-header",type:Boolean})],ho.prototype,"noHeader",2),lo([Xt("open",{waitUntilFirstUpdate:!0})],ho.prototype,"handleOpenChange",1),lo([Xt("contained",{waitUntilFirstUpdate:!0})],ho.prototype,"handleNoModalChange",1),ho=lo([Pt("sd-drawer")],ho),ve("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),ve("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:250,easing:"ease"}}),ve("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),ve("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:250,easing:"ease"}}),ve("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}}),ve("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),ve("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});const co=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ho}},Symbol.toStringTag,{value:"Module"})),po=Math.min,uo=Math.max,bo=Math.round,mo=Math.floor,go=t=>({x:t,y:t}),vo={left:"right",right:"left",bottom:"top",top:"bottom"},yo={start:"end",end:"start"};function fo(t,e,i){return uo(t,po(e,i))}function wo(t,e){return"function"==typeof t?t(e):t}function xo(t){return t.split("-")[0]}function ko(t){return t.split("-")[1]}function Co(t){return"x"===t?"y":"x"}function $o(t){return"y"===t?"height":"width"}function So(t){return["top","bottom"].includes(xo(t))?"y":"x"}function _o(t){return Co(So(t))}function zo(t){return t.replace(/start|end/g,(t=>yo[t]))}function Oo(t){return t.replace(/left|right|bottom|top/g,(t=>vo[t]))}function Eo(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function Po(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Ao(t,e,i){let{reference:o,floating:r}=t;const s=So(e),a=_o(e),n=$o(a),l=xo(e),d="y"===s,h=o.x+o.width/2-r.width/2,c=o.y+o.height/2-r.height/2,p=o[n]/2-r[n]/2;let u;switch(l){case"top":u={x:h,y:o.y-r.height};break;case"bottom":u={x:h,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:c};break;case"left":u={x:o.x-r.width,y:c};break;default:u={x:o.x,y:o.y}}switch(ko(e)){case"start":u[a]-=p*(i&&d?-1:1);break;case"end":u[a]+=p*(i&&d?-1:1)}return u}async function To(t,e){var i;void 0===e&&(e={});const{x:o,y:r,platform:s,rects:a,elements:n,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:c="floating",altBoundary:p=!1,padding:u=0}=wo(e,t),b=Eo(u),m=n[p?"floating"===c?"reference":"floating":c],g=Po(await s.getClippingRect({element:null==(i=await(null==s.isElement?void 0:s.isElement(m)))||i?m:m.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(n.floating)),boundary:d,rootBoundary:h,strategy:l})),v="floating"===c?{...a.floating,x:o,y:r}:a.reference,y=await(null==s.getOffsetParent?void 0:s.getOffsetParent(n.floating)),f=await(null==s.isElement?void 0:s.isElement(y))&&await(null==s.getScale?void 0:s.getScale(y))||{x:1,y:1},w=Po(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-w.top+b.top)/f.y,bottom:(w.bottom-g.bottom+b.bottom)/f.y,left:(g.left-w.left+b.left)/f.x,right:(w.right-g.right+b.right)/f.x}}const Mo=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:i,y:o}=e,r=await async function(t,e){const{placement:i,platform:o,elements:r}=t,s=await(null==o.isRTL?void 0:o.isRTL(r.floating)),a=xo(i),n=ko(i),l="y"===So(i),d=["left","top"].includes(a)?-1:1,h=s&&l?-1:1,c=wo(e,t);let{mainAxis:p,crossAxis:u,alignmentAxis:b}="number"==typeof c?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...c};return n&&"number"==typeof b&&(u="end"===n?-1*b:b),l?{x:u*h,y:p*d}:{x:p*d,y:u*h}}(e,t);return{x:i+r.x,y:o+r.y,data:r}}}},Do=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:i,rects:o,platform:r,elements:s}=e,{apply:a=(()=>{}),...n}=wo(t,e),l=await To(e,n),d=xo(i),h=ko(i),c="y"===So(i),{width:p,height:u}=o.floating;let b,m;"top"===d||"bottom"===d?(b=d,m=h===(await(null==r.isRTL?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(m=d,b="end"===h?"top":"bottom");const g=u-l[b],v=p-l[m],y=!e.middlewareData.shift;let f=g,w=v;if(c){const t=p-l.left-l.right;w=h||y?po(v,t):t}else{const t=u-l.top-l.bottom;f=h||y?po(g,t):t}if(y&&!h){const t=uo(l.left,0),e=uo(l.right,0),i=uo(l.top,0),o=uo(l.bottom,0);c?w=p-2*(0!==t||0!==e?t+e:uo(l.left,l.right)):f=u-2*(0!==i||0!==o?i+o:uo(l.top,l.bottom))}await a({...e,availableWidth:w,availableHeight:f});const x=await r.getDimensions(s.floating);return p!==x.width||u!==x.height?{reset:{rects:!0}}:{}}}};function Lo(t){return Io(t)?(t.nodeName||"").toLowerCase():"#document"}function Bo(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Vo(t){var e;return null==(e=(Io(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function Io(t){return t instanceof Node||t instanceof Bo(t).Node}function jo(t){return t instanceof Element||t instanceof Bo(t).Element}function Uo(t){return t instanceof HTMLElement||t instanceof Bo(t).HTMLElement}function Fo(t){return!(typeof ShadowRoot>"u")&&(t instanceof ShadowRoot||t instanceof Bo(t).ShadowRoot)}function Ro(t){const{overflow:e,overflowX:i,overflowY:o,display:r}=Zo(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+i)&&!["inline","contents"].includes(r)}function Ho(t){return["table","td","th"].includes(Lo(t))}function No(t){const e=qo(),i=Zo(t);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function qo(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ko(t){return["html","body","#document"].includes(Lo(t))}function Zo(t){return Bo(t).getComputedStyle(t)}function Wo(t){return jo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Yo(t){if("html"===Lo(t))return t;const e=t.assignedSlot||t.parentNode||Fo(t)&&t.host||Vo(t);return Fo(e)?e.host:e}function Xo(t){const e=Yo(t);return Ko(e)?t.ownerDocument?t.ownerDocument.body:t.body:Uo(e)&&Ro(e)?e:Xo(e)}function Go(t,e,i){var o;void 0===e&&(e=[]),void 0===i&&(i=!0);const r=Xo(t),s=r===(null==(o=t.ownerDocument)?void 0:o.body),a=Bo(r);return s?e.concat(a,a.visualViewport||[],Ro(r)?r:[],a.frameElement&&i?Go(a.frameElement):[]):e.concat(r,Go(r,[],i))}function Jo(t){const e=Zo(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=Uo(t),s=r?t.offsetWidth:i,a=r?t.offsetHeight:o,n=bo(i)!==s||bo(o)!==a;return n&&(i=s,o=a),{width:i,height:o,$:n}}function Qo(t){return jo(t)?t:t.contextElement}function tr(t){const e=Qo(t);if(!Uo(e))return go(1);const i=e.getBoundingClientRect(),{width:o,height:r,$:s}=Jo(e);let a=(s?bo(i.width):i.width)/o,n=(s?bo(i.height):i.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!n||!Number.isFinite(n))&&(n=1),{x:a,y:n}}const er=go(0);function ir(t){const e=Bo(t);return qo()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:er}function or(t,e,i,o){void 0===e&&(e=!1),void 0===i&&(i=!1);const r=t.getBoundingClientRect(),s=Qo(t);let a=go(1);e&&(o?jo(o)&&(a=tr(o)):a=tr(t));const n=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==Bo(t))&&e}(s,i,o)?ir(s):go(0);let l=(r.left+n.x)/a.x,d=(r.top+n.y)/a.y,h=r.width/a.x,c=r.height/a.y;if(s){const t=Bo(s),e=o&&jo(o)?Bo(o):o;let i=t.frameElement;for(;i&&o&&e!==t;){const t=tr(i),e=i.getBoundingClientRect(),o=Zo(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x,d*=t.y,h*=t.x,c*=t.y,l+=r,d+=s,i=Bo(i).frameElement}}return Po({width:h,height:c,x:l,y:d})}function rr(t){return or(Vo(t)).left+Wo(t).scrollLeft}function sr(t,e,i){let o;if("viewport"===e)o=function(t,e){const i=Bo(t),o=Vo(t),r=i.visualViewport;let s=o.clientWidth,a=o.clientHeight,n=0,l=0;if(r){s=r.width,a=r.height;const t=qo();(!t||t&&"fixed"===e)&&(n=r.offsetLeft,l=r.offsetTop)}return{width:s,height:a,x:n,y:l}}(t,i);else if("document"===e)o=function(t){const e=Vo(t),i=Wo(t),o=t.ownerDocument.body,r=uo(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=uo(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-i.scrollLeft+rr(t);const n=-i.scrollTop;return"rtl"===Zo(o).direction&&(a+=uo(e.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:n}}(Vo(t));else if(jo(e))o=function(t,e){const i=or(t,!0,"fixed"===e),o=i.top+t.clientTop,r=i.left+t.clientLeft,s=Uo(t)?tr(t):go(1);return{width:t.clientWidth*s.x,height:t.clientHeight*s.y,x:r*s.x,y:o*s.y}}(e,i);else{const i=ir(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return Po(o)}function ar(t,e){const i=Yo(t);return!(i===e||!jo(i)||Ko(i))&&("fixed"===Zo(i).position||ar(i,e))}function nr(t,e){const i=e.get(t);if(i)return i;let o=Go(t,[],!1).filter((t=>jo(t)&&"body"!==Lo(t))),r=null;const s="fixed"===Zo(t).position;let a=s?Yo(t):t;for(;jo(a)&&!Ko(a);){const e=Zo(a),i=No(a);!i&&"fixed"===e.position&&(r=null),(s?!i&&!r:!i&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||Ro(a)&&!i&&ar(t,a))?o=o.filter((t=>t!==a)):r=e,a=Yo(a)}return e.set(t,o),o}function lr(t,e,i){const o=Uo(e),r=Vo(e),s="fixed"===i,a=or(t,!0,s,e);let n={scrollLeft:0,scrollTop:0};const l=go(0);if(o||!o&&!s)if(("body"!==Lo(e)||Ro(r))&&(n=Wo(e)),o){const t=or(e,!0,s,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=rr(r));return{x:a.left+n.scrollLeft-l.x,y:a.top+n.scrollTop-l.y,width:a.width,height:a.height}}function dr(t,e){return Uo(t)&&"fixed"!==Zo(t).position?e?e(t):t.offsetParent:null}function hr(t,e){const i=Bo(t);if(!Uo(t))return i;let o=dr(t,e);for(;o&&Ho(o)&&"static"===Zo(o).position;)o=dr(o,e);return o&&("html"===Lo(o)||"body"===Lo(o)&&"static"===Zo(o).position&&!No(o))?i:o||function(t){let e=Yo(t);for(;Uo(e)&&!Ko(e);){if(No(e))return e;e=Yo(e)}return null}(t)||i}const cr={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:i,strategy:o}=t;const r=Uo(i),s=Vo(i);if(i===s)return e;let a={scrollLeft:0,scrollTop:0},n=go(1);const l=go(0);if((r||!r&&"fixed"!==o)&&(("body"!==Lo(i)||Ro(s))&&(a=Wo(i)),Uo(i))){const t=or(i);n=tr(i),l.x=t.x+i.clientLeft,l.y=t.y+i.clientTop}return{width:e.width*n.x,height:e.height*n.y,x:e.x*n.x-a.scrollLeft*n.x+l.x,y:e.y*n.y-a.scrollTop*n.y+l.y}},getDocumentElement:Vo,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:o,strategy:r}=t;const s=[..."clippingAncestors"===i?nr(e,this._c):[].concat(i),o],a=s[0],n=s.reduce(((t,i)=>{const o=sr(e,i,r);return t.top=uo(o.top,t.top),t.right=po(o.right,t.right),t.bottom=po(o.bottom,t.bottom),t.left=uo(o.left,t.left),t}),sr(e,a,r));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:hr,getElementRects:async function(t){let{reference:e,floating:i,strategy:o}=t;const r=this.getOffsetParent||hr,s=this.getDimensions;return{reference:lr(e,await r(i),o),floating:{x:0,y:0,...await s(i)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return Jo(t)},getScale:tr,isElement:jo,isRTL:function(t){return"rtl"===Zo(t).direction}};var pr=Object.defineProperty,ur=Object.getOwnPropertyDescriptor,br=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?ur(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&pr(e,i,s),s};let mr=class extends ie{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver((t=>this.handleCurrentPlacementChange(t))),this.mutationObserver.observe(this,{attributes:!0})}handleCurrentPlacementChange(t){return t.forEach((t=>{if("data-current-placement"===t.attributeName){const t=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:t})}}))}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=function(t,e,i,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,d=Qo(t),h=r||s?[...d?Go(d):[],...Go(e)]:[];h.forEach((t=>{r&&t.addEventListener("scroll",i,{passive:!0}),s&&t.addEventListener("resize",i)}));const c=d&&n?function(t,e){let i,o=null;const r=Vo(t);function s(){clearTimeout(i),o&&o.disconnect(),o=null}return function a(n,l){void 0===n&&(n=!1),void 0===l&&(l=1),s();const{left:d,top:h,width:c,height:p}=t.getBoundingClientRect();if(n||e(),!c||!p)return;const u={rootMargin:-mo(h)+"px "+-mo(r.clientWidth-(d+c))+"px "+-mo(r.clientHeight-(h+p))+"px "+-mo(d)+"px",threshold:uo(0,po(1,l))||1};let b=!0;function m(t){const e=t[0].intersectionRatio;if(e!==l){if(!b)return a();e?a(!1,e):i=setTimeout((()=>{a(!1,1e-7)}),100)}b=!1}try{o=new IntersectionObserver(m,{...u,root:r.ownerDocument})}catch{o=new IntersectionObserver(m,u)}o.observe(t)}(!0),s}(d,i):null;let p=-1,u=null;a&&(u=new ResizeObserver((t=>{let[o]=t;o&&o.target===d&&u&&(u.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{u&&u.observe(e)}))),i()})),d&&!l&&u.observe(d),u.observe(e));let b,m=l?or(t):null;return l&&function e(){const o=or(t);m&&(o.x!==m.x||o.y!==m.y||o.width!==m.width||o.height!==m.height)&&i(),m=o,b=requestAnimationFrame(e)}(),i(),()=>{h.forEach((t=>{r&&t.removeEventListener("scroll",i),s&&t.removeEventListener("resize",i)})),c&&c(),u&&u.disconnect(),u=null,l&&cancelAnimationFrame(b)}}(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>t()))):t()}))}reposition(){if(!this.active||!this.anchorEl)return;const t=[Mo({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Do({apply:({rects:t})=>{const e="width"===this.sync||"both"===this.sync,i="height"===this.sync||"both"===this.sync;this.popup.style.width=e?`${t.reference.width}px`:"",this.popup.style.height=i?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:n,platform:l,elements:d}=e,{mainAxis:h=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...g}=wo(t,e);if(null!=(i=s.arrow)&&i.alignmentOffset)return{};const v=xo(r),y=xo(n)===n,f=await(null==l.isRTL?void 0:l.isRTL(d.floating)),w=p||(y||!m?[Oo(n)]:function(t){const e=Oo(t);return[zo(t),e,zo(e)]}(n));!p&&"none"!==b&&w.push(...function(t,e,i,o){const r=ko(t);let s=function(t,e,i){const o=["left","right"],r=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return i?e?r:o:e?o:r;case"left":case"right":return e?s:a;default:return[]}}(xo(t),"start"===i,o);return r&&(s=s.map((t=>t+"-"+r)),e&&(s=s.concat(s.map(zo)))),s}(n,m,b,f));const x=[n,...w],k=await To(e,g),C=[];let $=(null==(o=s.flip)?void 0:o.overflows)||[];if(h&&C.push(k[v]),c){const t=function(t,e,i){void 0===i&&(i=!1);const o=ko(t),r=_o(t),s=$o(r);let a="x"===r?o===(i?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Oo(a)),[a,Oo(a)]}(r,a,f);C.push(k[t[0]],k[t[1]])}if($=[...$,{placement:r,overflows:C}],!C.every((t=>t<=0))){var S,_;const t=((null==(S=s.flip)?void 0:S.index)||0)+1,e=x[t];if(e)return{data:{index:t,overflows:$},reset:{placement:e}};let i=null==(_=$.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:_.placement;if(!i)switch(u){case"bestFit":{var z;const t=null==(z=$.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:z[0];t&&(i=t);break}case"initialPlacement":i=n}if(r!==i)return{reset:{placement:i}}}return{}}}}({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:o,placement:r}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:n={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...l}=wo(t,e),d={x:i,y:o},h=await To(e,l),c=So(xo(r)),p=Co(c);let u=d[p],b=d[c];if(s){const t="y"===p?"bottom":"right";u=fo(u+h["y"===p?"top":"left"],u,u-h[t])}if(a){const t="y"===c?"bottom":"right";b=fo(b+h["y"===c?"top":"left"],b,b-h[t])}const m=n.fn({...e,[p]:u,[c]:b});return{...m,data:{x:m.x-i,y:m.y-o}}}}}({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Do({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:e})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${e}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push((t=>({name:"arrow",options:t,async fn(e){const{x:i,y:o,placement:r,rects:s,platform:a,elements:n,middlewareData:l}=e,{element:d,padding:h=0}=wo(t,e)||{};if(null==d)return{};const c=Eo(h),p={x:i,y:o},u=_o(r),b=$o(u),m=await a.getDimensions(d),g="y"===u,v=g?"top":"left",y=g?"bottom":"right",f=g?"clientHeight":"clientWidth",w=s.reference[b]+s.reference[u]-p[u]-s.floating[b],x=p[u]-s.reference[u],k=await(null==a.getOffsetParent?void 0:a.getOffsetParent(d));let C=k?k[f]:0;(!C||!await(null==a.isElement?void 0:a.isElement(k)))&&(C=n.floating[f]||s.floating[b]);const $=w/2-x/2,S=C/2-m[b]/2-1,_=po(c[v],S),z=po(c[y],S),O=_,E=C-m[b]-z,P=C/2-m[b]/2+$,A=fo(O,P,E),T=!l.arrow&&null!=ko(r)&&P!=A&&s.reference[b]/2-(P<O?_:z)-m[b]/2<0,M=T?P<O?P-O:P-E:0;return{[u]:p[u]+M,data:{[u]:A,centerOffset:P-A-M,...T&&{alignmentOffset:M}},reset:T}}}))({element:this.arrowEl,padding:this.arrowPadding})),((t,e,i)=>{const o=new Map,r={platform:cr,...i},s={...r.platform,_c:o};return(async(t,e,i)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=i,n=s.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(e));let d=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:h,y:c}=Ao(d,o,l),p=o,u={},b=0;for(let i=0;i<n.length;i++){const{name:s,fn:m}=n[i],{x:g,y:v,data:y,reset:f}=await m({x:h,y:c,initialPlacement:o,placement:p,strategy:r,middlewareData:u,rects:d,platform:a,elements:{reference:t,floating:e}});h=g??h,c=v??c,u={...u,[s]:{...u[s],...y}},f&&b<=50&&(b++,"object"==typeof f&&(f.placement&&(p=f.placement),f.rects&&(d=!0===f.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):f.rects),({x:h,y:c}=Ao(d,p,l))),i=-1)}return{x:h,y:c,placement:p,strategy:r,middlewareData:u}})(t,e,{...r,platform:s})})(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy}).then((({x:t,y:e,middlewareData:i,placement:o})=>{const r="rtl"===getComputedStyle(this).direction,s={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]];if(this.setAttribute("data-current-placement",o),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=i.arrow.x,e=i.arrow.y;let o="",a="",n="",l="";if("start"===this.arrowPlacement){const i="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";o="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",a=r?i:"",l=r?"":i}else if("end"===this.arrowPlacement){const i="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";a=r?"":i,l=r?i:"",n="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",o="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",o="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:o,right:a,bottom:n,left:l,[s]:"calc(var(--arrow-size-diagonal) * -1)"})}})),this.emit("sd-reposition")}render(){return pt`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${we("isolate","fixed"!==this.strategy?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?pt`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};mr.styles=[ie.styles,Gt,P`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-width:var(--auto-size-available-width,none);max-height:var(--auto-size-available-height,none)}[part=arrow]{width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);background:var(--arrow-color)}`],br([Bt('[part="popup"]')],mr.prototype,"popup",2),br([Bt('[part="arrow"]')],mr.prototype,"arrowEl",2),br([Mt()],mr.prototype,"anchor",2),br([Mt({type:Boolean,reflect:!0})],mr.prototype,"active",2),br([Mt({reflect:!0})],mr.prototype,"placement",2),br([Mt({reflect:!0})],mr.prototype,"strategy",2),br([Mt({type:Number})],mr.prototype,"distance",2),br([Mt({type:Number})],mr.prototype,"skidding",2),br([Mt({type:Boolean})],mr.prototype,"arrow",2),br([Mt({attribute:"arrow-placement"})],mr.prototype,"arrowPlacement",2),br([Mt({attribute:"arrow-padding",type:Number})],mr.prototype,"arrowPadding",2),br([Mt({type:Boolean})],mr.prototype,"flip",2),br([Mt({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],mr.prototype,"flipFallbackPlacements",2),br([Mt({attribute:"flip-fallback-strategy"})],mr.prototype,"flipFallbackStrategy",2),br([Mt({type:Object})],mr.prototype,"flipBoundary",2),br([Mt({attribute:"flip-padding",type:Number})],mr.prototype,"flipPadding",2),br([Mt({type:Boolean})],mr.prototype,"shift",2),br([Mt({type:Object})],mr.prototype,"shiftBoundary",2),br([Mt({attribute:"shift-padding",type:Number})],mr.prototype,"shiftPadding",2),br([Mt({attribute:"auto-size"})],mr.prototype,"autoSize",2),br([Mt()],mr.prototype,"sync",2),br([Mt({type:Object})],mr.prototype,"autoSizeBoundary",2),br([Mt({attribute:"auto-size-padding",type:Number})],mr.prototype,"autoSizePadding",2),mr=br([Pt("sd-popup")],mr);const gr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return mr}},Symbol.toStringTag,{value:"Module"}));var vr=Object.defineProperty,yr=Object.getOwnPropertyDescriptor,fr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?yr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&vr(e,i,s),s};let wr=class extends ie{constructor(){super(...arguments),this.localize=new k(this),this.open=!1,this.rounded=!1,this.placement="bottom-start",this.disabled=!1,this.stayOpenOnSelect=!1,this.distance=0,this.skidding=0,this.noAutoSize=!1,this.noFlip=!1,this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleMenuItemActivate=this.handleMenuItemActivate.bind(this),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}focusOnTrigger(){const t=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof(null==t?void 0:t.focus)&&t.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find((t=>"sd-menu"===t.tagName.toLowerCase()))}handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(t){var e;if("Tab"===t.key){if(this.open&&"sd-menu-item"===(null==(e=document.activeElement)?void 0:e.tagName.toLowerCase()))return t.preventDefault(),this.hide(),void this.focusOnTrigger();setTimeout((()=>{var t,e,i;const o=(null==(t=this.containingElement)?void 0:t.getRootNode())instanceof ShadowRoot?null==(i=null==(e=document.activeElement)?void 0:e.shadowRoot)?void 0:i.activeElement:document.activeElement;(!this.containingElement||(null==o?void 0:o.closest(this.containingElement.tagName.toLowerCase()))!==this.containingElement)&&this.hide()}))}}handleDocumentMouseDown(t){const e=t.composedPath();this.containingElement&&!e.includes(this.containingElement)&&this.hide()}handleMenuItemActivate(t){Ni(t.target,this.panel)}handlePanelSelect(t){const e=t.target;!this.stayOpenOnSelect&&"sd-menu"===e.tagName.toLowerCase()&&(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.open?this.hide():this.show()}handleTriggerKeyDown(t){if("Escape"===t.key&&this.open)return t.stopPropagation(),this.focusOnTrigger(),void this.hide();if([" ","Enter"].includes(t.key))return t.preventDefault(),void this.handleTriggerClick();const e=this.getMenu();if(e){const i=e.defaultSlot.assignedElements({flatten:!0}),o=i[0],r=i[i.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),i.length>0&&requestAnimationFrame((()=>{("ArrowDown"===t.key||"Home"===t.key)&&(e.setCurrentItem(o),o.focus()),("ArrowUp"===t.key||"End"===t.key)&&(e.setCurrentItem(r),r.focus())})))}}handleTriggerKeyUp(t){" "===t.key&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}updateAccessibleTrigger(){const t=this.trigger.assignedElements({flatten:!0}).find((t=>Ki(t).start));let e;if(t){switch(t.tagName.toLowerCase()){case"sd-button":case"sd-icon-button":e=t.button;break;default:e=t}e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded",this.open?"true":"false")}}async show(){if(!this.open)return this.open=!0,fe(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,fe(this,"sd-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("sd-activate",this.handleMenuItemActivate),this.panel.addEventListener("sd-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("sd-activate",this.handleMenuItemActivate),this.panel.removeEventListener("sd-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}async handleOpenChange(){if(this.disabled)this.open=!1;else if(this.updateAccessibleTrigger(),this.open){this.emit("sd-show"),this.addOpenListeners(),await pe(this),this.panel.hidden=!1,this.popup.active=!0;const{keyframes:t,options:e}=ye(this,"dropdown.show",{dir:this.localize.dir()});await de(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await pe(this);const{keyframes:t,options:e}=ye(this,"dropdown.hide",{dir:this.localize.dir()});await de(this.popup.popup,t,e),this.panel.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}render(){return pt`<sd-popup part="base" id="dropdown" placement="${this.placement}" distance="${this.rounded&&this.distance<1?1:this.distance}" skidding="${this.skidding}" strategy="${this.hoist?"fixed":"absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10" ?active="${this.open}"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${we("shadow bg-white",this.open?"block pointer-events-auto":"pointer-events-none",this.rounded&&"rounded-md")}" aria-hidden="${this.open?"false":"true"}" aria-labelledby="dropdown"></slot></sd-popup>`}};wr.styles=[ie.styles,Gt,P`:host{display:inline-block}#dropdown::part(popup){z-index:var(--sd-z-index-dropdown,900)}#dropdown[data-current-placement^=top]::part(popup){transform-origin:bottom}#dropdown[data-current-placement^=bottom]::part(popup){transform-origin:top}#dropdown[data-current-placement^=left]::part(popup){transform-origin:right}#dropdown[data-current-placement^=right]::part(popup){transform-origin:left}:host(:not([no-auto-size])) ::slotted(:not([slot=trigger])){overflow:auto;max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}`],fr([Bt("#dropdown")],wr.prototype,"popup",2),fr([Bt("[part=trigger]")],wr.prototype,"trigger",2),fr([Bt("[part=panel]")],wr.prototype,"panel",2),fr([Mt({type:Boolean,reflect:!0})],wr.prototype,"open",2),fr([Mt({type:Boolean,reflect:!0})],wr.prototype,"rounded",2),fr([Mt({reflect:!0})],wr.prototype,"placement",2),fr([Mt({type:Boolean,reflect:!0})],wr.prototype,"disabled",2),fr([Mt({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],wr.prototype,"stayOpenOnSelect",2),fr([Mt({attribute:!1})],wr.prototype,"containingElement",2),fr([Mt({type:Number})],wr.prototype,"distance",2),fr([Mt({type:Number})],wr.prototype,"skidding",2),fr([Mt({type:Boolean,reflect:!0,attribute:"no-auto-size"})],wr.prototype,"noAutoSize",2),fr([Mt({type:Boolean,reflect:!0,attribute:"no-flip"})],wr.prototype,"noFlip",2),fr([Mt({type:Boolean})],wr.prototype,"hoist",2),fr([Xt("open",{waitUntilFirstUpdate:!0})],wr.prototype,"handleOpenChange",1),wr=fr([Pt("sd-dropdown")],wr),ve("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),ve("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});const xr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return wr}},Symbol.toStringTag,{value:"Module"}));var kr=Object.defineProperty,Cr=Object.getOwnPropertyDescriptor,$r=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Cr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&kr(e,i,s),s};let Sr=class extends ie{constructor(){super(...arguments),this.fixed=!1}connectedCallback(){super.connectedCallback(),this.setCalculatedHeightProperty=this.setCalculatedHeightProperty.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this)}firstUpdated(){this.toggleHeightCalculation()}toggleHeightCalculation(){var t;this.fixed?(this.setCalculatedHeightProperty(),this.addResizeObserver()):(this.setCalculatedHeightProperty(),null==(t=this.resizeObserver)||t.disconnect(),this.resizeObserver=void 0)}disconnectedCallback(){super.disconnectedCallback()}updated(t){super.updated(t),t.has("fixed")&&this.toggleHeightCalculation()}onResize(){this.fixed&&this.setCalculatedHeightProperty()}addResizeObserver(){this.resizeObserver=new ResizeObserver((()=>{this.onResize()})),this.refHeaderElement&&this.resizeObserver.observe(this.refHeaderElement)}setCalculatedHeightProperty(){this.fixed&&this.refHeaderElement?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.refHeaderElement.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return pt`<header class="w-full bg-white relative" role="banner" @slotchange="${this.handleSlotChange}"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}handleSlotChange(t){t.target.assignedElements().length>0&&(this.refHeaderElement=t.currentTarget,this.setCalculatedHeightProperty())}};Sr.styles=[ie.styles,Gt,P`:host{display:block}:host([fixed]){position:fixed;left:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header::after{content:'';position:absolute;left:var(--sd-spacing-0,0);right:var(--sd-spacing-0,0);top:100%;height:var(--sd-spacing-2,.5rem);background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%))}[part=main]{width:var(--sd-header-inner-width);max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px)}`],$r([Mt({reflect:!0,type:Boolean})],Sr.prototype,"fixed",2),$r([vi(100)],Sr.prototype,"onResize",1),Sr=$r([Pt("sd-header")],Sr);const _r=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Sr}},Symbol.toStringTag,{value:"Module"}));var zr=Object.defineProperty,Or=Object.getOwnPropertyDescriptor,Er=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Or(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&zr(e,i,s),s};let Pr=class extends ie{constructor(){super(...arguments),this.mode="cors",this.allowScripts=!1}executeScript(t){const e=document.createElement("script");[...t.attributes].forEach((t=>e.setAttribute(t.name,t.value))),e.textContent=t.textContent,t.parentNode.replaceChild(e,t)}async handleSrcChange(){try{const t=this.src,e=await jt(t,this.mode);if(t!==this.src)return;if(!e.ok)return void this.emit("sd-error",{detail:{status:e.status}});this.innerHTML=e.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach((t=>this.executeScript(t))),this.emit("sd-load")}catch{this.emit("sd-error",{detail:{status:-1}})}}render(){return pt`<slot></slot>`}};Pr.styles=[Gt,P`:host{display:block}`],Er([Mt()],Pr.prototype,"src",2),Er([Mt()],Pr.prototype,"mode",2),Er([Mt({attribute:"allow-scripts",type:Boolean})],Pr.prototype,"allowScripts",2),Er([Xt("src")],Pr.prototype,"handleSrcChange",1),Pr=Er([Pt("sd-include")],Pr);const Ar=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Pr}},Symbol.toStringTag,{value:"Module"}));var Tr=Object.defineProperty,Mr=Object.getOwnPropertyDescriptor,Dr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Mr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Tr(e,i,s),s};const Lr=!(null==(i=navigator.userAgentData)?void 0:i.brands.some((t=>t.brand.includes("Chromium"))))&&navigator.userAgent.includes("Firefox");let Br=class extends ie{constructor(){super(...arguments),this.formControlController=new Xe(this),this.hasSlotController=new ti(this,"help-text","label","left","right","message","placeholder"),this.localize=new k(this),this.hasFocus=!1,this.showValidStyle=!1,this.showInvalidStyle=!1,this.type="text",this.size="lg",this.value="",this.defaultValue="",this.placeholder="",this.label="",this.helpText="",this.clearable=!1,this.disabled=!1,this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.noSpinButtons=!1,this.form="",this.name="",this.title="",this.required=!1,this.styleOnValid=!1,this.spellcheck=!0}get valueAsDate(){var t;return(null==(t=this.input)?void 0:t.valueAsDate)??null}set valueAsDate(t){const e=document.createElement("input");e.type="date",e.valueAsDate=t,this.value=e.value}get valueAsNumber(){var t;return(null==(t=this.input)?void 0:t.valueAsNumber)??parseFloat(this.value)}set valueAsNumber(t){const e=document.createElement("input");e.type="number",e.valueAsNumber=t,this.value=e.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(t){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),t.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleKeyDown(t){const e=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;"Enter"===t.key&&!e&&setTimeout((()=>{!t.defaultPrevented&&!t.isComposing&&this.formControlController.submit()}))}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(t,e,i="none"){this.input.setSelectionRange(t,e,i)}setRangeText(t,e,i,o){this.input.setRangeText(t,e,i,o),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var t;return null==(t=this.input)?void 0:t.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("label"),e=this.hasSlotController.test("help-text"),i=(this.hasSlotController.test("description"),this.hasSlotController.test("left")),o=this.hasSlotController.test("right"),r=!!this.label||!!t,s=!!this.helpText||!!e,a=this.clearable&&!this.readonly&&("number"==typeof this.value||this.value.length>0),n=this.disabled?"disabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",l="sm"===this.size?"text-sm":"text-base",d={disabled:"text-neutral-500",readonly:"text-black",activeInvalid:"text-error",activeValid:"text-success",active:"text-black",invalid:"text-error",valid:"text-success",default:"text-black"}[n],h={disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[n],c=this.disabled?"text-neutral-500":"text-primary",p={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],u={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return pt`<div part="form-control" class="${we(this.disabled&&"pointer-events-none")}"><label part="form-control-label" id="label" class="${we("mb-2",r?"inline-block":"hidden",l)}" for="input" aria-hidden="${r?"false":"true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="relative w-full"><div part="border" class="${we("absolute w-full h-full pointer-events-none border rounded-default",h)}"></div><div part="base" class="${we("px-4 flex flex-row items-center rounded-default transition-all bg-white","lg"===this.size?"py-2":"py-1",this.disabled||this.readonly?"":"hover:bg-neutral-200",this.readonly&&"bg-neutral-100",d)}">${i?pt`<slot name="left" part="left" class="${we("inline-flex","sm"===this.size?"mr-1":"mr-2",c,u)}"></slot>`:""} <input part="input" id="input" class="${we("min-w-0 flex-grow focus:outline-none bg-transparent placeholder-neutral-700","sm"===this.size?"h-6":"h-8",l)}" type="${"password"===this.type&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${ai(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${ai(this.placeholder)}" minlength="${ai(this.minlength)}" maxlength="${ai(this.maxlength)}" min="${ai(this.min)}" max="${ai(this.max)}" step="${ai(this.step)}" .value="${Li(this.value)}" autocapitalize="${ai("password"===this.type?"off":this.autocapitalize)}" autocomplete="${ai("password"===this.type?"off":this.autocomplete)}" autocorrect="${ai("password"===this.type?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${ai(this.pattern)}" enterkeyhint="${ai(this.enterkeyhint)}" inputmode="${ai(this.inputmode)}" aria-describedby="help-text" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${a?pt`<button part="clear-button" class="${we("flex justify-center ",p)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${we("text-neutral-500",u)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.passwordToggle&&"password"===this.type?pt`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="flex items-center" type="button" @click="${this.handlePasswordToggle}" tabindex="-1">${this.passwordVisible?pt`<slot name="show-password-icon"><sd-icon class="${we(c,p,u)}" library="system" name="eye"></sd-icon></slot>`:pt`<slot name="hide-password-icon"><sd-icon class="${we(c,p,u)}" library="system" name="eye-crossed-out"></sd-icon></slot>`}</button>`:""} ${"date"!==this.type&&"datetime-local"!==this.type||Lr?"":pt`<sd-icon class="${we(c,p,u)}" library="system" name="calendar"></sd-icon>`} ${"time"===this.type?pt`<sd-icon class="${we(c,p,u)}" library="system" name="clock"></sd-icon>`:""} ${this.showInvalidStyle?pt`<sd-icon part="invalid-icon" class="${we("text-error",p,u)}" library="system" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?pt`<sd-icon class="${we("text-success",p,u)}" library="system" name="confirm" part="valid-icon"></sd-icon>`:""} ${o?pt`<slot name="right" part="right" class="${we("inline-flex",c,p,u)}"></slot>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${we("text-sm text-neutral-700",s?"block":"hidden")}" aria-hidden="${!s}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};Br.styles=[Gt,ie.styles,P`:host{position:relative;box-sizing:border-box;display:inline-block;width:100%;text-align:left}:host([vertical]){display:block}:host([required]) #label::after{content:' *'}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}`],Dr([Bt("#input")],Br.prototype,"input",2),Dr([Bt("#invalid-message")],Br.prototype,"invalidMessage",2),Dr([Dt()],Br.prototype,"hasFocus",2),Dr([Dt()],Br.prototype,"showValidStyle",2),Dr([Dt()],Br.prototype,"showInvalidStyle",2),Dr([Mt({reflect:!0})],Br.prototype,"type",2),Dr([Mt({reflect:!0})],Br.prototype,"size",2),Dr([Mt()],Br.prototype,"inputmode",2),Dr([Mt()],Br.prototype,"value",2),Dr([Mi()],Br.prototype,"defaultValue",2),Dr([Mt()],Br.prototype,"placeholder",2),Dr([Mt()],Br.prototype,"label",2),Dr([Mt({attribute:"help-text"})],Br.prototype,"helpText",2),Dr([Mt({type:Boolean})],Br.prototype,"clearable",2),Dr([Mt({type:Boolean,reflect:!0})],Br.prototype,"disabled",2),Dr([Mt({type:Boolean,reflect:!0})],Br.prototype,"readonly",2),Dr([Mt({attribute:"password-toggle",type:Boolean})],Br.prototype,"passwordToggle",2),Dr([Mt({attribute:"password-visible",type:Boolean})],Br.prototype,"passwordVisible",2),Dr([Mt({attribute:"no-spin-buttons",type:Boolean})],Br.prototype,"noSpinButtons",2),Dr([Mt({type:Number})],Br.prototype,"minlength",2),Dr([Mt({type:Number})],Br.prototype,"maxlength",2),Dr([Mt({type:Number})],Br.prototype,"min",2),Dr([Mt({type:Number})],Br.prototype,"max",2),Dr([Mt({reflect:!0})],Br.prototype,"form",2),Dr([Mt()],Br.prototype,"name",2),Dr([Mt()],Br.prototype,"title",2),Dr([Mt({type:Boolean,reflect:!0})],Br.prototype,"required",2),Dr([Mt()],Br.prototype,"pattern",2),Dr([Mt()],Br.prototype,"step",2),Dr([Mt()],Br.prototype,"autocapitalize",2),Dr([Mt()],Br.prototype,"autocorrect",2),Dr([Mt()],Br.prototype,"autocomplete",2),Dr([Mt({type:Boolean})],Br.prototype,"autofocus",2),Dr([Mt()],Br.prototype,"enterkeyhint",2),Dr([Mt({type:Boolean,reflect:!0,attribute:"style-on-valid"})],Br.prototype,"styleOnValid",2),Dr([Mt({type:Boolean,converter:{fromAttribute:t=>!(!t||"false"===t),toAttribute:t=>t?"true":"false"}})],Br.prototype,"spellcheck",2),Dr([Xt("disabled",{waitUntilFirstUpdate:!0})],Br.prototype,"handleDisabledChange",1),Dr([Xt("step",{waitUntilFirstUpdate:!0})],Br.prototype,"handleStepChange",1),Dr([Xt("value",{waitUntilFirstUpdate:!0})],Br.prototype,"handleValueChange",1),Br=Dr([Pt("sd-input")],Br);const Vr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Br}},Symbol.toStringTag,{value:"Module"}));var Ir=Object.defineProperty,jr=Object.getOwnPropertyDescriptor,Ur=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?jr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Ir(e,i,s),s};let Fr=class extends ie{constructor(){super(...arguments),this.hasSlotController=new ti(this,"[default]","icon-left","icon-right"),this.size="inherit",this.inverted=!1,this.standalone=!1,this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){const t={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return pt`<a part="base" class="${we("inline",this.href?"cursor-pointer":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline"}[this.href?"enabled":"disabled"],this.standalone&&"flex items-start")}" href="${ai(this.href||void 0)}" target="${ai(this.target||void 0)}" download="${ai(this.download||void 0)}" rel="${ai(this.target?"noreferrer noopener":void 0)}" aria-disabled="${this.href?"false":"true"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"><slot name="icon-left" part="icon-left" class="${we("inline",t["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${we("inline",t["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};Fr.styles=[ie.styles,P`::slotted(sd-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-base,1rem)}:host([size=lg][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-xl,1.5rem)}`],Ur([Bt("a")],Fr.prototype,"button",2),Ur([Mt({reflect:!0})],Fr.prototype,"size",2),Ur([Mt({type:Boolean,reflect:!0})],Fr.prototype,"inverted",2),Ur([Mt({type:Boolean,reflect:!0})],Fr.prototype,"standalone",2),Ur([Mt()],Fr.prototype,"href",2),Ur([Mt()],Fr.prototype,"target",2),Ur([Mt()],Fr.prototype,"download",2),Fr=Ur([Pt("sd-link")],Fr);const Rr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Fr}},Symbol.toStringTag,{value:"Module"}));var Hr=Object.defineProperty,Nr=Object.getOwnPropertyDescriptor,qr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Nr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Hr(e,i,s),s};let Kr=class extends ie{constructor(){super(...arguments),this.hasSlotController=new ti(this,"[default]","description","children"),this.href="",this.current=!1,this.disabled=!1,this.size="base",this.vertical=!1,this.chevron=!1,this.indented=!1,this.relaxed=!1,this.divider=!1,this.open=!1}isButton(){return!this.href&&!this.hasSlotController.test("children")}isLink(){return!!this.href}isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}handleClickSummary(t){t.preventDefault(),t.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}render(){const t=this.isLink(),e=this.isButton(),i=this.isAccordion(),o=(this.hasSlotController.test("[default]"),this.hasSlotController.test("main"),this.hasSlotController.test("description")),r=this.hasSlotController.test("children"),s=t?oi`a`:i?oi`summary`:oi`button`,a=this.vertical?"pb-3":"pb-2",n=si`<${s} part="base" class="${we("hover:bg-neutral-200 group transition-all min-h-[48px] cursor-pointer relative focus-visible:focus-outline",{base:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",i?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-[1px]",this.vertical?"px-8":"px-4")}" aria-controls="${ai(i?"navigation-item-details":void 0)}" aria-current="${ai(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${ai(e?this.disabled:void 0)}" href="${ai(this.href||void 0)}" target="${ai(t?this.target:void 0)}" download="${ai(t?this.download:void 0)}" rel="${ai(t&&this.target?"noreferrer noopener":void 0)}" role="${t?"link":"button"}" tabindex="${this.disabled?"-1":"0"}" @click="${i?this.handleClickSummary:e?this.handleClickButton:void 0}"><div part="current-indicator" class="${we("absolute left-0 pointer-events-none transition-all duration-150",this.vertical?"w-1 h-[calc(100%-8px)] top-1 group-hover:h-full group-hover:top-0":"h-1 w-full bottom-0",this.current?"bg-accent":"bg-transparent",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${we("relative pt-3 inline-flex justify-between items-center",i?"grow":"w-full",o?"pb-1":a,this.calculatePaddingX())}">${this.divider&&this.vertical?si`<sd-divider part="divider" class="${we("w-full transition-all absolute -top-[1px] left-0",this.calculatePaddingX())}"></sd-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto"><slot part="content" class="inline"></slot></span>${(this.chevron||r)&&this.vertical?si`<sd-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${we("h-6 w-6 ml-2 transition-all",i?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon>`:""} </span>${o&&this.vertical?si`<slot name="description" part="description" class="${we("inline-block text-sm text-left text-black",i?"grow":"w-full",a,this.calculatePaddingX())}"></slot>`:""}</${s}>`;return i?si`<details part="details" id="navigation-item-details" ?open="${this.open}" class="relative flex">${n}<slot name="children"></slot></details>`:si`${n}`}};Kr.styles=[Gt,ie.styles,P`:host{position:relative;box-sizing:border-box;display:inline-block}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}`],qr([Mt({reflect:!0})],Kr.prototype,"href",2),qr([Mt()],Kr.prototype,"target",2),qr([Mt()],Kr.prototype,"download",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"current",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"disabled",2),qr([Mt({reflect:!0})],Kr.prototype,"size",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"vertical",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"chevron",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"indented",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"relaxed",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"divider",2),qr([Mt({type:Boolean,reflect:!0})],Kr.prototype,"open",2),Kr=qr([(t=>(e,i)=>{void 0!==i?i.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)})
95
95
  /**
96
96
  * @license
97
97
  * Copyright 2017 Google LLC