@govtechsg/sgds-web-component 3.6.0 → 3.6.2

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 (88) hide show
  1. package/base/dropdown-element.d.ts +1 -1
  2. package/base/dropdown-element.js +3 -3
  3. package/base/dropdown-element.js.map +1 -1
  4. package/components/Breadcrumb/index.umd.min.js +7 -7
  5. package/components/Breadcrumb/index.umd.min.js.map +1 -1
  6. package/components/Checkbox/checkbox.js +1 -1
  7. package/components/Checkbox/index.umd.min.js +6 -6
  8. package/components/Checkbox/index.umd.min.js.map +1 -1
  9. package/components/Checkbox/sgds-checkbox.js +1 -1
  10. package/components/Checkbox/sgds-checkbox.js.map +1 -1
  11. package/components/ComboBox/index.umd.min.js +274 -260
  12. package/components/ComboBox/index.umd.min.js.map +1 -1
  13. package/components/ComboBox/sgds-combo-box-option.d.ts +0 -3
  14. package/components/ComboBox/sgds-combo-box-option.js +2 -20
  15. package/components/ComboBox/sgds-combo-box-option.js.map +1 -1
  16. package/components/ComboBox/sgds-combo-box.d.ts +4 -0
  17. package/components/ComboBox/sgds-combo-box.js +79 -24
  18. package/components/ComboBox/sgds-combo-box.js.map +1 -1
  19. package/components/Datepicker/index.umd.min.js +2 -2
  20. package/components/Datepicker/index.umd.min.js.map +1 -1
  21. package/components/Dropdown/index.umd.min.js +1 -1
  22. package/components/Dropdown/index.umd.min.js.map +1 -1
  23. package/components/Footer/index.umd.min.js +1 -1
  24. package/components/Footer/index.umd.min.js.map +1 -1
  25. package/components/Input/index.umd.min.js +1 -1
  26. package/components/Input/index.umd.min.js.map +1 -1
  27. package/components/Link/index.umd.min.js +9 -9
  28. package/components/Link/index.umd.min.js.map +1 -1
  29. package/components/Link/link.js +1 -1
  30. package/components/Mainnav/index.umd.min.js +1 -1
  31. package/components/Mainnav/index.umd.min.js.map +1 -1
  32. package/components/OverflowMenu/index.umd.min.js +1 -1
  33. package/components/OverflowMenu/index.umd.min.js.map +1 -1
  34. package/components/QuantityToggle/index.umd.min.js +1 -1
  35. package/components/QuantityToggle/index.umd.min.js.map +1 -1
  36. package/components/Radio/index.umd.min.js +6 -6
  37. package/components/Radio/index.umd.min.js.map +1 -1
  38. package/components/Radio/radio.js +1 -1
  39. package/components/Select/index.umd.min.js +1 -1
  40. package/components/Select/index.umd.min.js.map +1 -1
  41. package/components/Switch/index.umd.min.js +1 -1
  42. package/components/Switch/index.umd.min.js.map +1 -1
  43. package/components/Switch/switch.js +1 -1
  44. package/components/SystemBanner/index.umd.min.js +5 -1
  45. package/components/SystemBanner/index.umd.min.js.map +1 -1
  46. package/components/SystemBanner/sgds-system-banner.js +5 -1
  47. package/components/SystemBanner/sgds-system-banner.js.map +1 -1
  48. package/components/Textarea/index.umd.min.js +1 -1
  49. package/components/Textarea/index.umd.min.js.map +1 -1
  50. package/components/index.umd.min.js +33 -14
  51. package/components/index.umd.min.js.map +1 -1
  52. package/index.umd.min.js +33 -14
  53. package/index.umd.min.js.map +1 -1
  54. package/package.json +1 -1
  55. package/react/base/dropdown-element.cjs.js +3 -3
  56. package/react/base/dropdown-element.cjs.js.map +1 -1
  57. package/react/base/dropdown-element.js +3 -3
  58. package/react/base/dropdown-element.js.map +1 -1
  59. package/react/components/Checkbox/checkbox.cjs.js +1 -1
  60. package/react/components/Checkbox/checkbox.js +1 -1
  61. package/react/components/Checkbox/sgds-checkbox.cjs.js +1 -1
  62. package/react/components/Checkbox/sgds-checkbox.cjs.js.map +1 -1
  63. package/react/components/Checkbox/sgds-checkbox.js +1 -1
  64. package/react/components/Checkbox/sgds-checkbox.js.map +1 -1
  65. package/react/components/ComboBox/sgds-combo-box-option.cjs.js +2 -20
  66. package/react/components/ComboBox/sgds-combo-box-option.cjs.js.map +1 -1
  67. package/react/components/ComboBox/sgds-combo-box-option.js +2 -20
  68. package/react/components/ComboBox/sgds-combo-box-option.js.map +1 -1
  69. package/react/components/ComboBox/sgds-combo-box.cjs.js +79 -24
  70. package/react/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
  71. package/react/components/ComboBox/sgds-combo-box.js +79 -24
  72. package/react/components/ComboBox/sgds-combo-box.js.map +1 -1
  73. package/react/components/Link/link.cjs.js +1 -1
  74. package/react/components/Link/link.js +1 -1
  75. package/react/components/Radio/radio.cjs.js +1 -1
  76. package/react/components/Radio/radio.js +1 -1
  77. package/react/components/Switch/switch.cjs.js +1 -1
  78. package/react/components/Switch/switch.js +1 -1
  79. package/react/components/SystemBanner/sgds-system-banner.cjs.js +5 -1
  80. package/react/components/SystemBanner/sgds-system-banner.cjs.js.map +1 -1
  81. package/react/components/SystemBanner/sgds-system-banner.js +5 -1
  82. package/react/components/SystemBanner/sgds-system-banner.js.map +1 -1
  83. package/react/styles/form-check.cjs.js +1 -1
  84. package/react/styles/form-check.js +1 -1
  85. package/react/styles/form-text-control.cjs.js +1 -1
  86. package/react/styles/form-text-control.js +1 -1
  87. package/styles/form-check.js +1 -1
  88. package/styles/form-text-control.js +1 -1
@@ -15,18 +15,18 @@ const t=globalThis,i=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
17
  */
18
- const k=globalThis,P=e=>{k.emitLitDebugLogEvents&&k.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let C,x=0;k.litIssuedWarnings??=new Set,C=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",k.litIssuedWarnings.has(t)||(console.warn(t),k.litIssuedWarnings.add(t))},C("dev-mode","Lit is in dev mode. Not recommended for production!");const E=k.ShadyDOM?.inUse&&!0===k.ShadyDOM?.noPatch?k.ShadyDOM.wrap:e=>e,V=k.trustedTypes,T=V?V.createPolicy("lit-html",{createHTML:e=>e}):void 0,U=e=>e,O=(e,t,i)=>U,M=e=>{if(re!==O)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");re=e},N=()=>{re=O},R=(e,t,i)=>re(e,t,i),I="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,z="?"+A,D=`<${z}>`,L=document,F=()=>L.createComment(""),W=e=>null===e||"object"!=typeof e&&"function"!=typeof e,q=Array.isArray,j="[ \t\n\f\r]",H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,Z=/>/g,J=new RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,K=/"/g,Y=/^(?:script|style|textarea|title)$/i,X=(Q=1,(e,...t)=>(e.some((e=>void 0===e))&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some((e=>e?._$litStatic$))&&C("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:Q,strings:e,values:t}));var Q;const ee=Symbol.for("lit-noChange"),te=Symbol.for("lit-nothing"),ie=new WeakMap,se=L.createTreeWalker(L,129);let re=O;function ne(e,t){if(!q(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==T?T.createHTML(t):t}class oe{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let r=0,n=0;const o=e.length-1,a=this.parts,[l,d]=((e,t)=>{const i=e.length-1,s=[];let r,n=2===t?"<svg>":3===t?"<math>":"",o=H;for(let t=0;t<i;t++){const i=e[t];let a,l,d=-1,h=0;for(;h<i.length&&(o.lastIndex=h,l=o.exec(i),null!==l);)if(h=o.lastIndex,o===H){if("!--"===l[1])o=B;else if(void 0!==l[1])o=Z;else if(void 0!==l[2])Y.test(l[2])&&(r=new RegExp(`</${l[2]}`,"g")),o=J;else if(void 0!==l[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else o===J?">"===l[0]?(o=r??H,d=-1):void 0===l[1]?d=-2:(d=o.lastIndex-l[2].length,a=l[1],o=void 0===l[3]?J:'"'===l[3]?K:G):o===K||o===G?o=J:o===B||o===Z?o=H:(o=J,r=void 0);console.assert(-1===d||o===J||o===G||o===K,"unexpected parse state B");const c=o===J&&e[t+1].startsWith("/>")?" ":"";n+=o===H?i+D:d>=0?(s.push(a),i.slice(0,d)+I+i.slice(d)+A+c):i+A+(-2===d?t:c)}return[ne(e,n+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),s]})(e,t);if(this.el=oe.createElement(l,i),se.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(s=se.nextNode())&&a.length<o;){if(1===s.nodeType){{const e=s.localName;if(/^(?:textarea|template)$/i.test(e)&&s.innerHTML.includes(A)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);C("",t)}}if(s.hasAttributes())for(const e of s.getAttributeNames())if(e.endsWith(I)){const t=d[n++],i=s.getAttribute(e).split(A),o=/([.?@])?(.*)/.exec(t);a.push({type:1,index:r,name:o[2],strings:i,ctor:"."===o[1]?ce:"?"===o[1]?pe:"@"===o[1]?ue:he}),s.removeAttribute(e)}else e.startsWith(A)&&(a.push({type:6,index:r}),s.removeAttribute(e));if(Y.test(s.tagName)){const e=s.textContent.split(A),t=e.length-1;if(t>0){s.textContent=V?V.emptyScript:"";for(let i=0;i<t;i++)s.append(e[i],F()),se.nextNode(),a.push({type:2,index:++r});s.append(e[t],F())}}}else if(8===s.nodeType){if(s.data===z)a.push({type:2,index:r});else{let e=-1;for(;-1!==(e=s.data.indexOf(A,e+1));)a.push({type:7,index:r}),e+=A.length-1}}r++}if(d.length!==n)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");P&&P({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const i=L.createElement("template");return i.innerHTML=e,i}}function ae(e,t,i=e,s){if(t===ee)return t;let r=void 0!==s?i.__directives?.[s]:i.__directive;const n=W(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$notifyDirectiveConnectionChanged?.(!1),void 0===n?r=void 0:(r=new n(e),r._$initialize(e,i,s)),void 0!==s?(i.__directives??=[])[s]=r:i.__directive=r),void 0!==r&&(t=ae(e,r._$resolve(e,t.values),r,s)),t}class le{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:i}=this._$template,s=(e?.creationScope??L).importNode(t,!0);se.currentNode=s;let r=se.nextNode(),n=0,o=0,a=i[0];for(;void 0!==a;){if(n===a.index){let t;2===a.type?t=new de(r,r.nextSibling,this,e):1===a.type?t=new a.ctor(r,a.name,a.strings,this,e):6===a.type&&(t=new me(r,this,e)),this._$parts.push(t),a=i[++o]}n!==a?.index&&(r=se.nextNode(),n++)}return se.currentNode=L,s}_update(e){let t=0;for(const i of this._$parts)void 0!==i&&(P&&P({kind:"set part",part:i,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==i.strings?(i._$setValue(e,i,t),t+=i.strings.length-2):i._$setValue(e[t])),t++}}class de{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,i,s){this.type=2,this._$committedValue=te,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=i,this.options=s,this.__isConnected=s?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=E(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=ae(this,e,t),W(e))e===te||null==e||""===e?(this._$committedValue!==te&&(P&&P({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=te):e!==this._$committedValue&&e!==ee&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else(e=>q(e)||"function"==typeof e?.[Symbol.iterator])(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return E(E(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),re!==O){const e=this._$startNode.parentNode?.nodeName;if("STYLE"===e||"SCRIPT"===e){let t="Forbidden";throw t="STYLE"===e?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(t)}}P&&P({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==te&&W(this._$committedValue)){const t=E(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=R(t,"data","property")),e=this._textSanitizer(e),P&&P({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=L.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=R(t,"data","property")),e=this._textSanitizer(e),P&&P({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:i}=e,s="number"==typeof i?this._$getTemplate(e):(void 0===i.el&&(i.el=oe.createElement(ne(i.h,i.h[0]),this.options)),i);if(this._$committedValue?._$template===s)P&&P({kind:"template updating",template:s,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new le(s,this),i=e._clone(this.options);P&&P({kind:"template instantiated",template:s,instance:e,parts:e._$parts,options:this.options,fragment:i,values:t}),e._update(t),P&&P({kind:"template instantiated and updated",template:s,instance:e,parts:e._$parts,options:this.options,fragment:i,values:t}),this._commitNode(i),this._$committedValue=e}}_$getTemplate(e){let t=ie.get(e.strings);return void 0===t&&ie.set(e.strings,t=new oe(e)),t}_commitIterable(e){q(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let i,s=0;for(const r of e)s===t.length?t.push(i=new de(this._insert(F()),this._insert(F()),this,this.options)):i=t[s],i._$setValue(r),s++;s<t.length&&(this._$clear(i&&E(i._$endNode).nextSibling,s),t.length=s)}_$clear(e=E(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e&&e!==this._$endNode;){const t=E(e).nextSibling;E(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class he{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,i,s,r){this.type=1,this._$committedValue=te,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=te,this._sanitizer=void 0}_$setValue(e,t=this,i,s){const r=this.strings;let n=!1;if(void 0===r)e=ae(this,e,t,0),n=!W(e)||e!==this._$committedValue&&e!==ee,n&&(this._$committedValue=e);else{const s=e;let o,a;for(e=r[0],o=0;o<r.length-1;o++)a=ae(this,s[i+o],t,o),a===ee&&(a=this._$committedValue[o]),n||=!W(a)||a!==this._$committedValue[o],a===te?e=te:e!==te&&(e+=(a??"")+r[o+1]),this._$committedValue[o]=a}n&&!s&&this._commitValue(e)}_commitValue(e){e===te?E(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=re(this.element,this.name,"attribute")),e=this._sanitizer(e??""),P&&P({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),E(this.element).setAttribute(this.name,e??""))}}class ce extends he{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=re(this.element,this.name,"property")),e=this._sanitizer(e),P&&P({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===te?void 0:e}}class pe extends he{constructor(){super(...arguments),this.type=4}_commitValue(e){P&&P({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===te),options:this.options}),E(this.element).toggleAttribute(this.name,!!e&&e!==te)}}class ue extends he{constructor(e,t,i,s,r){if(super(e,t,i,s,r),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=ae(this,e,t,0)??te)===ee)return;const i=this._$committedValue,s=e===te&&i!==te||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==te&&(i===te||s);P&&P({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:s,addListener:r,oldListener:i}),s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,e):this._$committedValue.handleEvent(e)}}class me{constructor(e,t,i){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=i}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){P&&P({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ae(this,e)}}const fe=k.litHtmlPolyfillSupportDevMode;fe?.(oe,de),(k.litHtmlVersions??=[]).push("3.2.0"),k.litHtmlVersions.length>1&&C("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");const ge=(e,t,i)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const s=x++,r=i?.renderBefore??t;let n=r._$litPart$;if(P&&P({kind:"begin render",id:s,value:e,container:t,options:i,part:n}),void 0===n){const e=i?.renderBefore??null;r._$litPart$=n=new de(t.insertBefore(F(),e),e,void 0,i??{})}return n._$setValue(e),P&&P({kind:"end render",id:s,value:e,container:t,options:i,part:n}),n};ge.setSanitizer=M,ge.createSanitizer=R,ge._testOnlyClearSanitizerFactoryDoNotCallOrElse=N;
18
+ const P=globalThis,k=e=>{P.emitLitDebugLogEvents&&P.dispatchEvent(new CustomEvent("lit-debug",{detail:e}))};let C,x=0;P.litIssuedWarnings??=new Set,C=(e,t)=>{t+=e?` See https://lit.dev/msg/${e} for more information.`:"",P.litIssuedWarnings.has(t)||(console.warn(t),P.litIssuedWarnings.add(t))},C("dev-mode","Lit is in dev mode. Not recommended for production!");const E=P.ShadyDOM?.inUse&&!0===P.ShadyDOM?.noPatch?P.ShadyDOM.wrap:e=>e,V=P.trustedTypes,T=V?V.createPolicy("lit-html",{createHTML:e=>e}):void 0,U=e=>e,O=(e,t,i)=>U,M=e=>{if(re!==O)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");re=e},N=()=>{re=O},R=(e,t,i)=>re(e,t,i),I="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,z="?"+A,D=`<${z}>`,L=document,F=()=>L.createComment(""),W=e=>null===e||"object"!=typeof e&&"function"!=typeof e,q=Array.isArray,j="[ \t\n\f\r]",H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,Z=/>/g,J=new RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,K=/"/g,Y=/^(?:script|style|textarea|title)$/i,X=(Q=1,(e,...t)=>(e.some((e=>void 0===e))&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),t.some((e=>e?._$litStatic$))&&C("","Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.\nPlease use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions"),{_$litType$:Q,strings:e,values:t}));var Q;const ee=Symbol.for("lit-noChange"),te=Symbol.for("lit-nothing"),ie=new WeakMap,se=L.createTreeWalker(L,129);let re=O;function ne(e,t){if(!q(e)||!e.hasOwnProperty("raw")){let e="invalid template strings array";throw e="\n Internal Error: expected template strings to be an array\n with a 'raw' field. Faking a template strings array by\n calling html or svg like an ordinary function is effectively\n the same as calling unsafeHtml and can lead to major security\n issues, e.g. opening your code up to XSS attacks.\n If you're using the html or svg tagged template functions normally\n and still seeing this error, please file a bug at\n https://github.com/lit/lit/issues/new?template=bug_report.md\n and include information about your build tooling, if any.\n ".trim().replace(/\n */g,"\n"),new Error(e)}return void 0!==T?T.createHTML(t):t}class oe{constructor({strings:e,_$litType$:t},i){let s;this.parts=[];let r=0,n=0;const o=e.length-1,a=this.parts,[l,d]=((e,t)=>{const i=e.length-1,s=[];let r,n=2===t?"<svg>":3===t?"<math>":"",o=H;for(let t=0;t<i;t++){const i=e[t];let a,l,d=-1,h=0;for(;h<i.length&&(o.lastIndex=h,l=o.exec(i),null!==l);)if(h=o.lastIndex,o===H){if("!--"===l[1])o=B;else if(void 0!==l[1])o=Z;else if(void 0!==l[2])Y.test(l[2])&&(r=new RegExp(`</${l[2]}`,"g")),o=J;else if(void 0!==l[3])throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else o===J?">"===l[0]?(o=r??H,d=-1):void 0===l[1]?d=-2:(d=o.lastIndex-l[2].length,a=l[1],o=void 0===l[3]?J:'"'===l[3]?K:G):o===K||o===G?o=J:o===B||o===Z?o=H:(o=J,r=void 0);console.assert(-1===d||o===J||o===G||o===K,"unexpected parse state B");const c=o===J&&e[t+1].startsWith("/>")?" ":"";n+=o===H?i+D:d>=0?(s.push(a),i.slice(0,d)+I+i.slice(d)+A+c):i+A+(-2===d?t:c)}return[ne(e,n+(e[i]||"<?>")+(2===t?"</svg>":3===t?"</math>":"")),s]})(e,t);if(this.el=oe.createElement(l,i),se.currentNode=this.el.content,2===t||3===t){const e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(s=se.nextNode())&&a.length<o;){if(1===s.nodeType){{const e=s.localName;if(/^(?:textarea|template)$/i.test(e)&&s.innerHTML.includes(A)){const t=`Expressions are not supported inside \`${e}\` elements. See https://lit.dev/msg/expression-in-${e} for more information.`;if("template"===e)throw new Error(t);C("",t)}}if(s.hasAttributes())for(const e of s.getAttributeNames())if(e.endsWith(I)){const t=d[n++],i=s.getAttribute(e).split(A),o=/([.?@])?(.*)/.exec(t);a.push({type:1,index:r,name:o[2],strings:i,ctor:"."===o[1]?ce:"?"===o[1]?pe:"@"===o[1]?ue:he}),s.removeAttribute(e)}else e.startsWith(A)&&(a.push({type:6,index:r}),s.removeAttribute(e));if(Y.test(s.tagName)){const e=s.textContent.split(A),t=e.length-1;if(t>0){s.textContent=V?V.emptyScript:"";for(let i=0;i<t;i++)s.append(e[i],F()),se.nextNode(),a.push({type:2,index:++r});s.append(e[t],F())}}}else if(8===s.nodeType){if(s.data===z)a.push({type:2,index:r});else{let e=-1;for(;-1!==(e=s.data.indexOf(A,e+1));)a.push({type:7,index:r}),e+=A.length-1}}r++}if(d.length!==n)throw new Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+e.join("${...}")+"`");k&&k({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:e})}static createElement(e,t){const i=L.createElement("template");return i.innerHTML=e,i}}function ae(e,t,i=e,s){if(t===ee)return t;let r=void 0!==s?i.__directives?.[s]:i.__directive;const n=W(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$notifyDirectiveConnectionChanged?.(!1),void 0===n?r=void 0:(r=new n(e),r._$initialize(e,i,s)),void 0!==s?(i.__directives??=[])[s]=r:i.__directive=r),void 0!==r&&(t=ae(e,r._$resolve(e,t.values),r,s)),t}class le{constructor(e,t){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=e,this._$parent=t}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(e){const{el:{content:t},parts:i}=this._$template,s=(e?.creationScope??L).importNode(t,!0);se.currentNode=s;let r=se.nextNode(),n=0,o=0,a=i[0];for(;void 0!==a;){if(n===a.index){let t;2===a.type?t=new de(r,r.nextSibling,this,e):1===a.type?t=new a.ctor(r,a.name,a.strings,this,e):6===a.type&&(t=new me(r,this,e)),this._$parts.push(t),a=i[++o]}n!==a?.index&&(r=se.nextNode(),n++)}return se.currentNode=L,s}_update(e){let t=0;for(const i of this._$parts)void 0!==i&&(k&&k({kind:"set part",part:i,value:e[t],valueIndex:t,values:e,templateInstance:this}),void 0!==i.strings?(i._$setValue(e,i,t),t+=i.strings.length-2):i._$setValue(e[t])),t++}}class de{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(e,t,i,s){this.type=2,this._$committedValue=te,this._$disconnectableChildren=void 0,this._$startNode=e,this._$endNode=t,this._$parent=i,this.options=s,this.__isConnected=s?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let e=E(this._$startNode).parentNode;const t=this._$parent;return void 0!==t&&11===e?.nodeType&&(e=t.parentNode),e}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(e,t=this){if(null===this.parentNode)throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(e=ae(this,e,t),W(e))e===te||null==e||""===e?(this._$committedValue!==te&&(k&&k({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=te):e!==this._$committedValue&&e!==ee&&this._commitText(e);else if(void 0!==e._$litType$)this._commitTemplateResult(e);else if(void 0!==e.nodeType){if(this.options?.host===e)return this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),void console.warn("Attempted to render the template host",e,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");this._commitNode(e)}else(e=>q(e)||"function"==typeof e?.[Symbol.iterator])(e)?this._commitIterable(e):this._commitText(e)}_insert(e){return E(E(this._$startNode).parentNode).insertBefore(e,this._$endNode)}_commitNode(e){if(this._$committedValue!==e){if(this._$clear(),re!==O){const e=this._$startNode.parentNode?.nodeName;if("STYLE"===e||"SCRIPT"===e){let t="Forbidden";throw t="STYLE"===e?"Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.":"Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.",new Error(t)}}k&&k({kind:"commit node",start:this._$startNode,parent:this._$parent,value:e,options:this.options}),this._$committedValue=this._insert(e)}}_commitText(e){if(this._$committedValue!==te&&W(this._$committedValue)){const t=E(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=R(t,"data","property")),e=this._textSanitizer(e),k&&k({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}else{const t=L.createTextNode("");this._commitNode(t),void 0===this._textSanitizer&&(this._textSanitizer=R(t,"data","property")),e=this._textSanitizer(e),k&&k({kind:"commit text",node:t,value:e,options:this.options}),t.data=e}this._$committedValue=e}_commitTemplateResult(e){const{values:t,_$litType$:i}=e,s="number"==typeof i?this._$getTemplate(e):(void 0===i.el&&(i.el=oe.createElement(ne(i.h,i.h[0]),this.options)),i);if(this._$committedValue?._$template===s)k&&k({kind:"template updating",template:s,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:t}),this._$committedValue._update(t);else{const e=new le(s,this),i=e._clone(this.options);k&&k({kind:"template instantiated",template:s,instance:e,parts:e._$parts,options:this.options,fragment:i,values:t}),e._update(t),k&&k({kind:"template instantiated and updated",template:s,instance:e,parts:e._$parts,options:this.options,fragment:i,values:t}),this._commitNode(i),this._$committedValue=e}}_$getTemplate(e){let t=ie.get(e.strings);return void 0===t&&ie.set(e.strings,t=new oe(e)),t}_commitIterable(e){q(this._$committedValue)||(this._$committedValue=[],this._$clear());const t=this._$committedValue;let i,s=0;for(const r of e)s===t.length?t.push(i=new de(this._insert(F()),this._insert(F()),this,this.options)):i=t[s],i._$setValue(r),s++;s<t.length&&(this._$clear(i&&E(i._$endNode).nextSibling,s),t.length=s)}_$clear(e=E(this._$startNode).nextSibling,t){for(this._$notifyConnectionChanged?.(!1,!0,t);e&&e!==this._$endNode;){const t=E(e).nextSibling;E(e).remove(),e=t}}setConnected(e){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=e,this._$notifyConnectionChanged?.(e)}}class he{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(e,t,i,s,r){this.type=1,this._$committedValue=te,this._$disconnectableChildren=void 0,this.element=e,this.name=t,this._$parent=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$committedValue=new Array(i.length-1).fill(new String),this.strings=i):this._$committedValue=te,this._sanitizer=void 0}_$setValue(e,t=this,i,s){const r=this.strings;let n=!1;if(void 0===r)e=ae(this,e,t,0),n=!W(e)||e!==this._$committedValue&&e!==ee,n&&(this._$committedValue=e);else{const s=e;let o,a;for(e=r[0],o=0;o<r.length-1;o++)a=ae(this,s[i+o],t,o),a===ee&&(a=this._$committedValue[o]),n||=!W(a)||a!==this._$committedValue[o],a===te?e=te:e!==te&&(e+=(a??"")+r[o+1]),this._$committedValue[o]=a}n&&!s&&this._commitValue(e)}_commitValue(e){e===te?E(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=re(this.element,this.name,"attribute")),e=this._sanitizer(e??""),k&&k({kind:"commit attribute",element:this.element,name:this.name,value:e,options:this.options}),E(this.element).setAttribute(this.name,e??""))}}class ce extends he{constructor(){super(...arguments),this.type=3}_commitValue(e){void 0===this._sanitizer&&(this._sanitizer=re(this.element,this.name,"property")),e=this._sanitizer(e),k&&k({kind:"commit property",element:this.element,name:this.name,value:e,options:this.options}),this.element[this.name]=e===te?void 0:e}}class pe extends he{constructor(){super(...arguments),this.type=4}_commitValue(e){k&&k({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!e||e===te),options:this.options}),E(this.element).toggleAttribute(this.name,!!e&&e!==te)}}class ue extends he{constructor(e,t,i,s,r){if(super(e,t,i,s,r),this.type=5,void 0!==this.strings)throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(e,t=this){if((e=ae(this,e,t,0)??te)===ee)return;const i=this._$committedValue,s=e===te&&i!==te||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,r=e!==te&&(i===te||s);k&&k({kind:"commit event listener",element:this.element,name:this.name,value:e,options:this.options,removeListener:s,addListener:r,oldListener:i}),s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,e),this._$committedValue=e}handleEvent(e){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,e):this._$committedValue.handleEvent(e)}}class me{constructor(e,t,i){this.element=e,this.type=6,this._$disconnectableChildren=void 0,this._$parent=t,this.options=i}get _$isConnected(){return this._$parent._$isConnected}_$setValue(e){k&&k({kind:"commit to element binding",element:this.element,value:e,options:this.options}),ae(this,e)}}const fe=P.litHtmlPolyfillSupportDevMode;fe?.(oe,de),(P.litHtmlVersions??=[]).push("3.2.0"),P.litHtmlVersions.length>1&&C("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");const ge=(e,t,i)=>{if(null==t)throw new TypeError(`The container to render into may not be ${t}`);const s=x++,r=i?.renderBefore??t;let n=r._$litPart$;if(k&&k({kind:"begin render",id:s,value:e,container:t,options:i,part:n}),void 0===n){const e=i?.renderBefore??null;r._$litPart$=n=new de(t.insertBefore(F(),e),e,void 0,i??{})}return n._$setValue(e),k&&k({kind:"end render",id:s,value:e,container:t,options:i,part:n}),n};ge.setSanitizer=M,ge.createSanitizer=R,ge._testOnlyClearSanitizerFactoryDoNotCallOrElse=N;
19
19
  /**
20
20
  * @license
21
21
  * Copyright 2019 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
23
  */
24
- const ve=globalThis,_e=ve.ShadowRoot&&(void 0===ve.ShadyCSS||ve.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ye=Symbol(),be=new WeakMap;class we{constructor(e,t,i){if(this._$cssResult$=!0,i!==ye)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=t}get styleSheet(){let e=this._styleSheet;const t=this._strings;if(_e&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=be.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),i&&be.set(t,e))}return e}toString(){return this.cssText}}const $e=(e,...t)=>{const i=1===e.length?e[0]:t.reduce(((t,i,s)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(i)+e[s+1]),e[0]);return new we(i,e,ye)},Se=e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return new we("string"==typeof(i=t)?i:String(i),void 0,ye);var i},ke=_e?e=>e:e=>e instanceof CSSStyleSheet?Se(e):e
24
+ const ve=globalThis,_e=ve.ShadowRoot&&(void 0===ve.ShadyCSS||ve.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ye=Symbol(),be=new WeakMap;class we{constructor(e,t,i){if(this._$cssResult$=!0,i!==ye)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=t}get styleSheet(){let e=this._styleSheet;const t=this._strings;if(_e&&void 0===e){const i=void 0!==t&&1===t.length;i&&(e=be.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),i&&be.set(t,e))}return e}toString(){return this.cssText}}const $e=(e,...t)=>{const i=1===e.length?e[0]:t.reduce(((t,i,s)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(i)+e[s+1]),e[0]);return new we(i,e,ye)},Se=e=>{let t="";for(const i of e.cssRules)t+=i.cssText;return new we("string"==typeof(i=t)?i:String(i),void 0,ye);var i},Pe=_e?e=>e:e=>e instanceof CSSStyleSheet?Se(e):e
25
25
  /**
26
26
  * @license
27
27
  * Copyright 2017 Google LLC
28
28
  * SPDX-License-Identifier: BSD-3-Clause
29
- */,{is:Pe,defineProperty:Ce,getOwnPropertyDescriptor:xe,getOwnPropertyNames:Ee,getOwnPropertySymbols:Ve,getPrototypeOf:Te}=Object,Ue=globalThis;let Oe;const Me=Ue.trustedTypes,Ne=Me?Me.emptyScript:"",Re=Ue.reactiveElementPolyfillSupportDevMode;{const e=Ue.litIssuedWarnings??=new Set;Oe=(t,i)=>{i+=` See https://lit.dev/msg/${t} for more information.`,e.has(i)||(console.warn(i),e.add(i))},Oe("dev-mode","Lit is in dev mode. Not recommended for production!"),Ue.ShadyDOM?.inUse&&void 0===Re&&Oe("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")}const Ie=(e,t)=>e,Ae={toAttribute(e,t){switch(t){case Boolean:e=e?Ne:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},ze=(e,t)=>!Pe(e,t),De={attribute:!0,type:String,converter:Ae,reflect:!1,hasChanged:ze};Symbol.metadata??=Symbol("metadata"),Ue.litPropertyMetadata??=new WeakMap;class Le extends HTMLElement{static addInitializer(e){this.__prepare(),(this._initializers??=[]).push(e)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(e,t=De){if(t.state&&(t.attribute=!1),this.__prepare(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol.for(`${String(e)} (@property() cache)`),s=this.getPropertyDescriptor(e,i,t);void 0!==s&&Ce(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:r}=xe(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==s){if("value"in(xe(this.prototype,e)??{}))throw new Error(`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it's actually declared as a value on the prototype. Usually this is due to using @property or @state on a method.`);Oe("reactive-property-without-getter",`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it does not have a getter. This will be an error in a future version of Lit.`)}return{get(){return s?.call(this)},set(t){const n=s?.call(this);r.call(this,t),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??De}static __prepare(){if(this.hasOwnProperty(Ie("elementProperties")))return;const e=Te(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Ie("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(Ie("properties"))){const e=this.properties,t=[...Ee(e),...Ve(e)];for(const i of t)this.createProperty(i,e[i])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,i]of t)this.elementProperties.set(e,i)}this.__attributeToPropertyMap=new Map;for(const[e,t]of this.elementProperties){const i=this.__attributeNameForProperty(e,t);void 0!==i&&this.__attributeToPropertyMap.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&Oe("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&Oe("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(ke(e))}else void 0!==e&&t.push(ke(e));return t}static __attributeNameForProperty(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this.__instanceProperties=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}__initialize(){this.__updatePromise=new Promise((e=>this.enableUpdating=e)),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach((e=>e(this)))}addController(e){(this.__controllers??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this.__controllers?.delete(e)}__saveInstanceProperties(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this.__instanceProperties=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(_e)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const i of t){const t=document.createElement("style"),s=ve.litNonce;void 0!==s&&t.setAttribute("nonce",s),t.textContent=i.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this.__controllers?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,i){this._$attributeToProperty(e,i)}__propertyToAttribute(e,t){const i=this.constructor.elementProperties.get(e),s=this.constructor.__attributeNameForProperty(e,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:Ae).toAttribute(t,i.type);this.constructor.enabledWarnings.includes("migration")&&void 0===r&&Oe("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`),this.__reflectingProperty=e,null==r?this.removeAttribute(s):this.setAttribute(s,r),this.__reflectingProperty=null}}_$attributeToProperty(e,t){const i=this.constructor,s=i.__attributeToPropertyMap.get(e);if(void 0!==s&&this.__reflectingProperty!==s){const e=i.getPropertyOptions(s),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Ae;this.__reflectingProperty=s,this[s]=r.fromAttribute(t,e.type),this.__reflectingProperty=null}}requestUpdate(e,t,i){if(void 0!==e){e instanceof Event&&Oe("","The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()"),i??=this.constructor.getPropertyOptions(e);if(!(i.hasChanged??ze)(this[e],t))return;this._$changeProperty(e,t,i)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,i){this._$changedProperties.has(e)||this._$changedProperties.set(e,t),!0===i.reflect&&this.__reflectingProperty!==e&&(this.__reflectingProperties??=new Set).add(e)}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){const e=this.performUpdate();return this.constructor.enabledWarnings.includes("async-perform-update")&&"function"==typeof e?.then&&Oe("async-perform-update",`Element ${this.localName} returned a Promise from performUpdate(). This behavior is deprecated and will be removed in a future version of ReactiveElement.`),e}performUpdate(){if(!this.isUpdatePending)return;var e;if(e={kind:"update"},Ue.emitLitDebugLogEvents&&Ue.dispatchEvent(new CustomEvent("lit-debug",{detail:e})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const e=[...this.constructor.elementProperties.keys()].filter((e=>this.hasOwnProperty(e)&&e in Te(this)));if(e.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${e.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}if(this.__instanceProperties){for(const[e,t]of this.__instanceProperties)this[e]=t;this.__instanceProperties=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,i]of e)!0!==i.wrapped||this._$changedProperties.has(t)||void 0===this[t]||this._$changeProperty(t,this[t],i)}let t=!1;const i=this._$changedProperties;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),this.__controllers?.forEach((e=>e.hostUpdate?.())),this.update(i)):this.__markUpdated()}catch(e){throw t=!1,this.__markUpdated(),e}t&&this._$didUpdate(i)}willUpdate(e){}_$didUpdate(e){this.__controllers?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e),this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update")&&Oe("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(e){return!0}update(e){this.__reflectingProperties&&=this.__reflectingProperties.forEach((e=>this.__propertyToAttribute(e,this[e]))),this.__markUpdated()}updated(e){}firstUpdated(e){}}Le.elementStyles=[],Le.shadowRootOptions={mode:"open"},Le[Ie("elementProperties")]=new Map,Le[Ie("finalized")]=new Map,Re?.({ReactiveElement:Le});{Le.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(Ie("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};Le.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},Le.disableWarning=function(t){e(this);const i=this.enabledWarnings.indexOf(t);i>=0&&this.enabledWarnings.splice(i,1)}}(Ue.reactiveElementVersions??=[]).push("2.0.4"),Ue.reactiveElementVersions.length>1&&Oe("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")
29
+ */,{is:ke,defineProperty:Ce,getOwnPropertyDescriptor:xe,getOwnPropertyNames:Ee,getOwnPropertySymbols:Ve,getPrototypeOf:Te}=Object,Ue=globalThis;let Oe;const Me=Ue.trustedTypes,Ne=Me?Me.emptyScript:"",Re=Ue.reactiveElementPolyfillSupportDevMode;{const e=Ue.litIssuedWarnings??=new Set;Oe=(t,i)=>{i+=` See https://lit.dev/msg/${t} for more information.`,e.has(i)||(console.warn(i),e.add(i))},Oe("dev-mode","Lit is in dev mode. Not recommended for production!"),Ue.ShadyDOM?.inUse&&void 0===Re&&Oe("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")}const Ie=(e,t)=>e,Ae={toAttribute(e,t){switch(t){case Boolean:e=e?Ne:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let i=e;switch(t){case Boolean:i=null!==e;break;case Number:i=null===e?null:Number(e);break;case Object:case Array:try{i=JSON.parse(e)}catch(e){i=null}}return i}},ze=(e,t)=>!ke(e,t),De={attribute:!0,type:String,converter:Ae,reflect:!1,hasChanged:ze};Symbol.metadata??=Symbol("metadata"),Ue.litPropertyMetadata??=new WeakMap;class Le extends HTMLElement{static addInitializer(e){this.__prepare(),(this._initializers??=[]).push(e)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(e,t=De){if(t.state&&(t.attribute=!1),this.__prepare(),this.elementProperties.set(e,t),!t.noAccessor){const i=Symbol.for(`${String(e)} (@property() cache)`),s=this.getPropertyDescriptor(e,i,t);void 0!==s&&Ce(this.prototype,e,s)}}static getPropertyDescriptor(e,t,i){const{get:s,set:r}=xe(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==s){if("value"in(xe(this.prototype,e)??{}))throw new Error(`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it's actually declared as a value on the prototype. Usually this is due to using @property or @state on a method.`);Oe("reactive-property-without-getter",`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it does not have a getter. This will be an error in a future version of Lit.`)}return{get(){return s?.call(this)},set(t){const n=s?.call(this);r.call(this,t),this.requestUpdate(e,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??De}static __prepare(){if(this.hasOwnProperty(Ie("elementProperties")))return;const e=Te(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Ie("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(Ie("properties"))){const e=this.properties,t=[...Ee(e),...Ve(e)];for(const i of t)this.createProperty(i,e[i])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,i]of t)this.elementProperties.set(e,i)}this.__attributeToPropertyMap=new Map;for(const[e,t]of this.elementProperties){const i=this.__attributeNameForProperty(e,t);void 0!==i&&this.__attributeToPropertyMap.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&Oe("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&Oe("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const e of i)t.unshift(Pe(e))}else void 0!==e&&t.push(Pe(e));return t}static __attributeNameForProperty(e,t){const i=t.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this.__instanceProperties=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}__initialize(){this.__updatePromise=new Promise((e=>this.enableUpdating=e)),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach((e=>e(this)))}addController(e){(this.__controllers??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this.__controllers?.delete(e)}__saveInstanceProperties(){const e=new Map,t=this.constructor.elementProperties;for(const i of t.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this.__instanceProperties=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,t)=>{if(_e)e.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(const i of t){const t=document.createElement("style"),s=ve.litNonce;void 0!==s&&t.setAttribute("nonce",s),t.textContent=i.cssText,e.appendChild(t)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this.__controllers?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,t,i){this._$attributeToProperty(e,i)}__propertyToAttribute(e,t){const i=this.constructor.elementProperties.get(e),s=this.constructor.__attributeNameForProperty(e,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:Ae).toAttribute(t,i.type);this.constructor.enabledWarnings.includes("migration")&&void 0===r&&Oe("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`),this.__reflectingProperty=e,null==r?this.removeAttribute(s):this.setAttribute(s,r),this.__reflectingProperty=null}}_$attributeToProperty(e,t){const i=this.constructor,s=i.__attributeToPropertyMap.get(e);if(void 0!==s&&this.__reflectingProperty!==s){const e=i.getPropertyOptions(s),r="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:Ae;this.__reflectingProperty=s,this[s]=r.fromAttribute(t,e.type),this.__reflectingProperty=null}}requestUpdate(e,t,i){if(void 0!==e){e instanceof Event&&Oe("","The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()"),i??=this.constructor.getPropertyOptions(e);if(!(i.hasChanged??ze)(this[e],t))return;this._$changeProperty(e,t,i)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,i){this._$changedProperties.has(e)||this._$changedProperties.set(e,t),!0===i.reflect&&this.__reflectingProperty!==e&&(this.__reflectingProperties??=new Set).add(e)}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){const e=this.performUpdate();return this.constructor.enabledWarnings.includes("async-perform-update")&&"function"==typeof e?.then&&Oe("async-perform-update",`Element ${this.localName} returned a Promise from performUpdate(). This behavior is deprecated and will be removed in a future version of ReactiveElement.`),e}performUpdate(){if(!this.isUpdatePending)return;var e;if(e={kind:"update"},Ue.emitLitDebugLogEvents&&Ue.dispatchEvent(new CustomEvent("lit-debug",{detail:e})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const e=[...this.constructor.elementProperties.keys()].filter((e=>this.hasOwnProperty(e)&&e in Te(this)));if(e.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${e.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}if(this.__instanceProperties){for(const[e,t]of this.__instanceProperties)this[e]=t;this.__instanceProperties=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,i]of e)!0!==i.wrapped||this._$changedProperties.has(t)||void 0===this[t]||this._$changeProperty(t,this[t],i)}let t=!1;const i=this._$changedProperties;try{t=this.shouldUpdate(i),t?(this.willUpdate(i),this.__controllers?.forEach((e=>e.hostUpdate?.())),this.update(i)):this.__markUpdated()}catch(e){throw t=!1,this.__markUpdated(),e}t&&this._$didUpdate(i)}willUpdate(e){}_$didUpdate(e){this.__controllers?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e),this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update")&&Oe("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(e){return!0}update(e){this.__reflectingProperties&&=this.__reflectingProperties.forEach((e=>this.__propertyToAttribute(e,this[e]))),this.__markUpdated()}updated(e){}firstUpdated(e){}}Le.elementStyles=[],Le.shadowRootOptions={mode:"open"},Le[Ie("elementProperties")]=new Map,Le[Ie("finalized")]=new Map,Re?.({ReactiveElement:Le});{Le.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(Ie("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};Le.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},Le.disableWarning=function(t){e(this);const i=this.enabledWarnings.indexOf(t);i>=0&&this.enabledWarnings.splice(i,1)}}(Ue.reactiveElementVersions??=[]).push("2.0.4"),Ue.reactiveElementVersions.length>1&&Oe("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")
30
30
  /**
31
31
  * @license
32
32
  * Copyright 2017 Google LLC
@@ -78,7 +78,7 @@ const tt=1,it=3,st=4,rt=e=>(...t)=>({_$litDirective$:e,values:t});class nt{const
78
78
  * @license
79
79
  * Copyright 2018 Google LLC
80
80
  * SPDX-License-Identifier: BSD-3-Clause
81
- */var lt=$e`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:var(--sgds-icon-size-lg);margin-left:.25rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:bottom;width:var(--sgds-icon-size-lg)}::slotted(svg){vertical-align:middle}}`;class dt extends We{emit(e,t){const i=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i),i}static define(e,t=this,i={}){if(customElements.get(e));else try{customElements.define(e,t,i)}catch(s){customElements.define(e,class extends t{},i)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach((([e,t])=>{this.constructor.define(e,t)}))}firstUpdated(e){var t;super.firstUpdated(e),this.ssr&&(null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("slot").forEach((e=>{e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))})))}}dt.styles=[lt],dt.dependencies={},e([Ge({type:Boolean,reflect:!0})],dt.prototype,"ssr",void 0);var ht=$e`.form-label{color:var(--sgds-form-color-default);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-50)}.form-check-label{color:var(--sgds-form-color-default)}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:not-allowed}`,ct=$e`input{margin:0}.form-check{display:flex;gap:var(--sgds-form-gap-md);padding:var(--sgds-form-padding-inline-sm) 0}.form-check-input{appearance:none;background-color:var(--sgds-form-surface-default);background-image:var(--sgds-radio-bg-image);background-position:50%;background-repeat:no-repeat;background-size:auto;border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);height:var(--sgds-form-height-sm);width:var(--sgds-form-width-xs)}.form-check-input:checked,.form-check-input[checked]{background-color:var(--sgds-form-primary-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent)}.form-check-input:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid):not([aria-checked=true]):not(:focus-visible):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid):checked:focus-visible,.form-check-input:not([disabled]):not(.is-invalid):checked:hover,.form-check-input:not([disabled]):not(.is-invalid)[checked]:focus-visible,.form-check-input:not([disabled]):not(.is-invalid)[checked]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}:host([disabled]) .form-check{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.form-check-input:not([disabled]).is-invalid{border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-check-input:not([disabled]).is-invalid:focus-visible{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;function pt(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}function ut(e,t){const i=Object.assign({waitUntilFirstUpdate:!1},t);return(t,s)=>{const{update:r}=t;if(e in t){const n=e;t.update=function(e){if(e.has(n)){const t=e.get(n),r=this[n];t!==r&&(i.waitUntilFirstUpdate&&!this.hasUpdated||this[s](t,r))}r.call(this,e)}}}}var mt=$e`:host{outline:0}.form-check-input[type=radio]{border-radius:50%}.form-check-input:checked,.form-check-input[checked]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg width="8" height="8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 4a4 4 0 1 1 8 0 4 4 0 0 1-8 0Z" fill="%23fff"/></svg>')}.form-check-input:checked.is-invalid,.form-check-input[checked].is-invalid{background-color:var(--sgds-form-danger-surface-default)}`;class ft extends dt{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.invalid=!1,this.radioId=pt("radio")}connectedCallback(){super.connectedCallback(),this.setInitialAttributes(),this.addEventListeners()}handleCheckedChange(){var e;this.checked&&(null===(e=this.input)||void 0===e||e.focus()),this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleBlur(){this.emit("sgds-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.emit("sgds-focus")}addEventListeners(){this.addEventListener("blur",(()=>this.handleBlur())),this.addEventListener("click",(()=>this.handleClick())),this.addEventListener("focus",(()=>this.handleFocus()))}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return X`
81
+ */var lt=$e`:host{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--sgds-body-color-default);font-family:var(--sgds-font-family-brand);font-size:var(--sgds-font-size-2);font-weight:var(--sgds-font-weight-regular);line-height:var(--sgds-line-height-24);margin:0;*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:disabled{cursor:not-allowed}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}::slotted(a[target=_blank]):after,a[target=_blank]:after{background-color:currentColor;content:"/";display:inline-block;height:var(--sgds-icon-size-lg);margin-left:.25rem;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.774 4.4H9.8a.6.6 0 1 1 0 1.2c-.85 0-1.451 0-1.922.039-.463.038-.745.11-.968.223A2.4 2.4 0 0 0 5.861 6.91c-.113.223-.184.505-.222.968-.039.47-.04 1.072-.04 1.922v4.4c0 .85.001 1.451.04 1.922.038.463.11.745.222.968a2.4 2.4 0 0 0 1.05 1.048c.222.114.504.185.967.223.47.038 1.072.039 1.922.039h4.4c.85 0 1.451 0 1.921-.039.464-.038.746-.11.969-.223a2.4 2.4 0 0 0 1.048-1.048c.113-.223.185-.505.223-.968.038-.47.039-1.072.039-1.922a.6.6 0 1 1 1.2 0v.026c0 .818 0 1.468-.043 1.993-.044.538-.136.996-.35 1.415a3.6 3.6 0 0 1-1.573 1.574c-.42.213-.878.305-1.415.35-.525.042-1.175.042-1.993.042H9.774c-.818 0-1.469 0-1.993-.043-.538-.044-.996-.136-1.415-.35a3.6 3.6 0 0 1-1.574-1.573c-.213-.42-.305-.877-.35-1.415-.042-.525-.042-1.175-.042-1.993V9.774c0-.818 0-1.468.043-1.993.044-.538.136-.996.35-1.415a3.6 3.6 0 0 1 1.573-1.574c.42-.213.877-.305 1.415-.35C8.305 4.4 8.956 4.4 9.774 4.4ZM12.4 5a.6.6 0 0 1 .6-.6h6a.6.6 0 0 1 .6.6v6a.6.6 0 1 1-1.2 0V6.449l-5.976 5.975a.6.6 0 0 1-.848-.848L17.55 5.6H13a.6.6 0 0 1-.6-.6Z' fill='%230E0E0E'/%3E%3C/svg%3E");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;vertical-align:bottom;width:var(--sgds-icon-size-lg)}::slotted(svg){vertical-align:middle}}`;class dt extends We{emit(e,t){const i=new CustomEvent(e,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i),i}static define(e,t=this,i={}){if(customElements.get(e));else try{customElements.define(e,t,i)}catch(s){customElements.define(e,class extends t{},i)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach((([e,t])=>{this.constructor.define(e,t)}))}firstUpdated(e){var t;super.firstUpdated(e),this.ssr&&(null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("slot").forEach((e=>{e.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))})))}}dt.styles=[lt],dt.dependencies={},e([Ge({type:Boolean,reflect:!0})],dt.prototype,"ssr",void 0);var ht=$e`.form-label{color:var(--sgds-form-color-default);margin-bottom:0}.form-label.disabled{opacity:var(--sgds-opacity-50)}.form-check-label{color:var(--sgds-form-color-default)}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:not-allowed}`,ct=$e`input{margin:0}.form-check{display:flex;gap:var(--sgds-form-gap-md);padding:var(--sgds-form-padding-inline-sm) 0}.form-check-input{appearance:none;background-color:var(--sgds-form-surface-default);background-image:var(--sgds-radio-bg-image);background-position:50%;background-repeat:no-repeat;background-size:auto;border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-default);height:var(--sgds-form-height-sm);width:var(--sgds-form-width-xs)}.form-check-input[checked]{background-color:var(--sgds-form-primary-surface-default);border:var(--sgds-form-border-width-default) solid var(--sgds-border-color-transparent)}.form-check-input:focus-visible{outline:var(--sgds-form-outline-focus);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid):not([aria-checked=true]):not(:focus-visible):hover{outline:var(--sgds-form-border-width-thick) solid var(--sgds-border-color-emphasis);outline-offset:var(--sgds-form-outline-offset-focus)}.form-check-input:not([disabled]):not(.is-invalid)[checked]:focus-visible,.form-check-input:not([disabled]):not(.is-invalid)[checked]:hover{background-color:var(--sgds-form-primary-surface-emphasis)}:host([disabled]) .form-check{cursor:not-allowed;opacity:var(--sgds-opacity-50)}.form-check-input:not([disabled]).is-invalid{border:var(--sgds-form-border-width-default) solid var(--sgds-form-danger-border-color-default)}.form-check-input:not([disabled]).is-invalid:focus-visible{outline:var(--sgds-border-width-2) solid var(--sgds-form-danger-color-default);outline-offset:var(--sgds-form-outline-offset-focus)}`;function pt(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}function ut(e,t){const i=Object.assign({waitUntilFirstUpdate:!1},t);return(t,s)=>{const{update:r}=t;if(e in t){const n=e;t.update=function(e){if(e.has(n)){const t=e.get(n),r=this[n];t!==r&&(i.waitUntilFirstUpdate&&!this.hasUpdated||this[s](t,r))}r.call(this,e)}}}}var mt=$e`:host{outline:0}.form-check-input[type=radio]{border-radius:50%}.form-check-input[checked]{--sgds-radio-bg-image:url('data:image/svg+xml;charset=utf-8,<svg width="8" height="8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 4a4 4 0 1 1 8 0 4 4 0 0 1-8 0Z" fill="%23fff"/></svg>')}.form-check-input[checked].is-invalid{background-color:var(--sgds-form-danger-surface-default)}`;class ft extends dt{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.invalid=!1,this.radioId=pt("radio")}connectedCallback(){super.connectedCallback(),this.setInitialAttributes(),this.addEventListeners()}handleCheckedChange(){var e;this.checked&&(null===(e=this.input)||void 0===e||e.focus()),this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleBlur(){this.emit("sgds-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.emit("sgds-focus")}addEventListeners(){this.addEventListener("blur",(()=>this.handleBlur())),this.addEventListener("click",(()=>this.handleClick())),this.addEventListener("focus",(()=>this.handleFocus()))}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return X`
82
82
  <div class="form-check">
83
83
  <input
84
84
  class=${ot({"form-check-input":!0,"is-invalid":this.invalid})}
@@ -107,7 +107,7 @@ window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch&&window.ShadyDOM.wrap;cons
107
107
  * Copyright 2020 Google LLC
108
108
  * SPDX-License-Identifier: BSD-3-Clause
109
109
  */
110
- class extends nt{constructor(e){if(super(e),e.type!==it&&e.type!==tt&&e.type!==st)throw new Error("The `live` directive is not allowed on child or event bindings");if(void 0!==e.strings)throw new Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===ee||t===te)return t;const i=e.element,s=e.name;if(e.type===it){if(t===i[s])return ee}else if(e.type===st){if(!!t===i.hasAttribute(s))return ee}else if(e.type===tt&&i.getAttribute(s)===String(t))return ee;return((e,t=gt)=>{e._$committedValue=t})(e),t}});var _t=$e`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-1);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,yt=$e`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-1);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,bt=$e`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-24)}`;class wt extends dt{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=pt("input"),this._labelId=pt("label")}setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}}wt.styles=[...dt.styles,_t,yt,ht,bt],e([Ge({reflect:!0})],wt.prototype,"label",void 0),e([Ge({reflect:!0})],wt.prototype,"hintText",void 0),e([Ge({reflect:!0})],wt.prototype,"name",void 0),e([Ge({type:Boolean,reflect:!0})],wt.prototype,"disabled",void 0),e([Ge({type:Boolean,reflect:!0})],wt.prototype,"invalid",void 0);class $t{constructor(e,t){(this.host=e).addController(this),this._internals=this.host.attachInternals(),this.options=Object.assign({setInvalid:(e,t)=>{e.invalid=t},value:e=>e.value,input:e=>e.input},t)}hostConnected(){this.host.addEventListener("invalid",(e=>this.handleInvalid(e)))}hostDisconnected(){this.host.removeEventListener("invalid",(e=>this.handleInvalid(e)))}handleInvalid(e){e.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(e){const t=e.target;this.options.setInvalid(this.host,!1),this.validateInput(t)}handleChange(e){const t=e.target;this.validateInput(t),this.options.setInvalid(this.host,!this.checkValidity())}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}updateInvalidState(){this.options.setInvalid(this.host,!this.checkValidity())}resetValidity(){return this._internals.setValidity({})}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setValidity(e,t,i){return this._internals.setValidity(e,t,i)}setFormValue(){const e=this.options.value(this.host);this._internals.setFormValue(e)}validateInput(e){if(this.options.input(this.host).disabled)return this._internals.setValidity({});const t=e.validity;if(t.valid)this._internals.setValidity({});else for(const i in t)t[i]&&(this.validationError=i.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const St=t=>{class i extends t{constructor(){super(...arguments),this._isTouched=!1}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new $t(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinShouldSkipSgdsValidation()||this._mixinValidate(this.input)}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(e){this._mixinSetFormValue(),this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(e),this._isTouched&&(this._isTouched=!1)}_mixinValidate(e){this.inputValidationController.validateInput(e)}_mixinSetFormValue(){this.inputValidationController.setFormValue()}_mixinCheckValidity(){return this.inputValidationController.checkValidity()}_mixinReportValidity(){return this.inputValidationController.reportValidity()}_mixinGetValidity(){return this.inputValidationController.validity}_mixinGetValidationMessage(){return this.inputValidationController.validationMessage}_mixinSetValidity(e,t,i){return this.inputValidationController.setValidity(e,t,i)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return i.formAssociated=!0,e([et("sgds-input")],i.prototype,"sgdsInput",void 0),e([et("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};var kt,Pt=$e`fieldset{border:0;gap:var(--sgds-form-gap-md);margin:0;min-width:0;padding:0}.label-hint-container,fieldset{display:flex;flex-direction:column}.label-hint-container{gap:var(--sgds-form-gap-sm)}.radio-group-validation-input{display:none}.radio-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}:host([disabled]) .label-hint-container{cursor:not-allowed;opacity:var(--sgds-opacity-50)}`;class Ct extends(St(wt)){constructor(){super(...arguments),this.defaultValue="",this.value="",this.invalidFeedback="",this.hasFeedback=!1,this.required=!1,this._isTouched=!1}_handleValueChange(){this.emit("sgds-change",{detail:{value:this.value}}),this._updateCheckedRadio()}_handleInvalidChange(){this._radios.forEach((e=>e.invalid=this.invalid))}_mixinResetFormControl(){this.value=this.input.value=this.defaultValue,this._updateInputValue("reset"),this._mixinResetValidity(this.input)}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.addEventListener("sgds-blur",(()=>{this._isTouched=!0}))}firstUpdated(e){super.firstUpdated(e);const t=this._radios;t.forEach(((e,i)=>{if(t.length>1)switch(i){case 0:e.setAttribute("first-of-type","");break;case t.length-1:e.setAttribute("last-of-type","");break;default:e.setAttribute("nth-of-type","")}})),this.value&&this._updateInputValue("change")}_handleRadioClick(e){e.preventDefault();const t=e.target;if(t.disabled)return;this.value=t.value,this._updateInputValue();this._radios.forEach((e=>e.checked=e===t))}_updateInputValue(e="change"){this.input.value=this.value,this.input.dispatchEvent(new InputEvent(e))}_handleKeyDown(e){var t;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;const i=this._radios.filter((e=>!e.disabled)),s=null!==(t=i.find((e=>e.checked)))&&void 0!==t?t:i[0],r=" "===e.key?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1;let n=i.indexOf(s)+r;n<0&&(n=i.length-1),n>i.length-1&&(n=0),this._radios.forEach((e=>{e.checked=!1,e.tabIndex=-1})),this.value=i[n].value,this._updateInputValue(),i[n].checked=!0,i[n].tabIndex=0,e.preventDefault()}_handleSlotChange(){const e=this._radios;e.forEach((e=>e.checked=e.value===this.value)),this._disabledChildRadios(),e.some((e=>e.checked))||e[0]&&(e[0].tabIndex=0)}_updateCheckedRadio(){this._radios.forEach((e=>e.checked=e.value===this.value))}_renderHintText(){const e=X` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&e}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_handleIsTouched(){this._isTouched&&(this.invalid=!this.input.checkValidity())}_handleDisabledChange(){this.setInvalid(!1),this._disabledChildRadios()}_disabledChildRadios(){if(this.disabled){this._radios.forEach((e=>e.disabled=this.disabled))}}render(){const e=X`
110
+ class extends nt{constructor(e){if(super(e),e.type!==it&&e.type!==tt&&e.type!==st)throw new Error("The `live` directive is not allowed on child or event bindings");if(void 0!==e.strings)throw new Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===ee||t===te)return t;const i=e.element,s=e.name;if(e.type===it){if(t===i[s])return ee}else if(e.type===st){if(!!t===i.hasAttribute(s))return ee}else if(e.type===tt&&i.getAttribute(s)===String(t))return ee;return((e,t=gt)=>{e._$committedValue=t})(e),t}});var _t=$e`.invalid-feedback-container{display:flex;gap:var(--sgds-form-gap-sm)}.invalid-feedback,.invalid-feedback-container{color:var(--sgds-form-danger-color-default);line-height:var(--sgds-line-height-20)}.invalid-feedback{font-size:var(--sgds-font-size-1);font-weight:var(--sgds-font-weight-regular)}.valid-icon{color:var(--sgds-form-success-color-default)}`,yt=$e`.form-text{color:var(--sgds-form-color-subtle);font-size:var(--sgds-font-size-1);line-height:var(--sgds-line-height-20)}.form-text.disabled{opacity:var(--sgds-opacity-50)}`,bt=$e`.form-control::placeholder{color:var(--sgds-form-color-subtle);font-family:var(--sgds-font-family-brand);font-weight:var(--sgds-font-weight-light);line-height:var(--sgds-line-height-24)}`;class wt extends dt{constructor(){super(...arguments),this.label="",this.hintText="",this.disabled=!1,this.invalid=!1,this._controlId=pt("input"),this._labelId=pt("label")}setInvalid(e){this.invalid=e,e?this.emit("sgds-invalid"):this.emit("sgds-valid")}}wt.styles=[...dt.styles,_t,yt,ht,bt],e([Ge({reflect:!0})],wt.prototype,"label",void 0),e([Ge({reflect:!0})],wt.prototype,"hintText",void 0),e([Ge({reflect:!0})],wt.prototype,"name",void 0),e([Ge({type:Boolean,reflect:!0})],wt.prototype,"disabled",void 0),e([Ge({type:Boolean,reflect:!0})],wt.prototype,"invalid",void 0);class $t{constructor(e,t){(this.host=e).addController(this),this._internals=this.host.attachInternals(),this.options=Object.assign({setInvalid:(e,t)=>{e.invalid=t},value:e=>e.value,input:e=>e.input},t)}hostConnected(){this.host.addEventListener("invalid",(e=>this.handleInvalid(e)))}hostDisconnected(){this.host.removeEventListener("invalid",(e=>this.handleInvalid(e)))}handleInvalid(e){e.preventDefault(),this.options.setInvalid(this.host,!0)}handleInput(e){const t=e.target;this.options.setInvalid(this.host,!1),this.validateInput(t)}handleChange(e){const t=e.target;this.validateInput(t),this.options.setInvalid(this.host,!this.checkValidity())}get form(){return this._internals.form}get validity(){return this._internals.validity}get validationMessage(){return this._internals.validationMessage}get willValidate(){return this._internals.willValidate}updateInvalidState(){this.options.setInvalid(this.host,!this.checkValidity())}resetValidity(){return this._internals.setValidity({})}checkValidity(){return this._internals.checkValidity()}reportValidity(){return this._internals.reportValidity()}setValidity(e,t,i){return this._internals.setValidity(e,t,i)}setFormValue(){const e=this.options.value(this.host);this._internals.setFormValue(e)}validateInput(e){if(this.options.input(this.host).disabled)return this._internals.setValidity({});const t=e.validity;if(t.valid)this._internals.setValidity({});else for(const i in t)t[i]&&(this.validationError=i.toString(),this._internals.setValidity({[this.validationError]:!0},e.validationMessage,e))}}const St=t=>{class i extends t{constructor(){super(...arguments),this._isTouched=!1}connectedCallback(){var e;super.connectedCallback(),this._mixinShouldSkipSgdsValidation()||null!==(e=this.inputValidationController)&&void 0!==e||(this.inputValidationController=new $t(this))}async firstUpdated(e){super.firstUpdated(e),this.input=this.shadowRoot.querySelector("input")||await this.sgdsInput||this.shadowRoot.querySelector("textarea")||await this.sgdsDatepickerInput,this._mixinShouldSkipSgdsValidation()||this._mixinValidate(this.input)}formResetCallback(){this._mixinResetFormControl?this._mixinResetFormControl():(this.value=this.defaultValue,this._mixinResetValidity(this.input)),this._mixinSetFormValue()}_mixinHandleChange(e){this._mixinSetFormValue(),this.inputValidationController.handleChange(e)}_mixinHandleInputChange(e){this._mixinSetFormValue(),this.inputValidationController.handleInput(e)}_mixinResetValidity(e){this.inputValidationController.resetValidity(),this.inputValidationController.updateInvalidState(),this.inputValidationController.validateInput(e),this._isTouched&&(this._isTouched=!1)}_mixinValidate(e){this.inputValidationController.validateInput(e)}_mixinSetFormValue(){this.inputValidationController.setFormValue()}_mixinCheckValidity(){return this.inputValidationController.checkValidity()}_mixinReportValidity(){return this.inputValidationController.reportValidity()}_mixinGetValidity(){return this.inputValidationController.validity}_mixinGetValidationMessage(){return this.inputValidationController.validationMessage}_mixinSetValidity(e,t,i){return this.inputValidationController.setValidity(e,t,i)}_mixinShouldSkipSgdsValidation(){const e=this.closest("form");return(null==e?void 0:e.noValidate)||this.noValidate}}return i.formAssociated=!0,e([et("sgds-input")],i.prototype,"sgdsInput",void 0),e([et("sgds-datepicker-input")],i.prototype,"sgdsDatepickerInput",void 0),i};var Pt,kt=$e`fieldset{border:0;gap:var(--sgds-form-gap-md);margin:0;min-width:0;padding:0}.label-hint-container,fieldset{display:flex;flex-direction:column}.label-hint-container{gap:var(--sgds-form-gap-sm)}.radio-group-validation-input{display:none}.radio-container{display:flex;flex-direction:column;gap:var(--sgds-form-gap-md)}:host([disabled]) .label-hint-container{cursor:not-allowed;opacity:var(--sgds-opacity-50)}`;class Ct extends(St(wt)){constructor(){super(...arguments),this.defaultValue="",this.value="",this.invalidFeedback="",this.hasFeedback=!1,this.required=!1,this._isTouched=!1}_handleValueChange(){this.emit("sgds-change",{detail:{value:this.value}}),this._updateCheckedRadio()}_handleInvalidChange(){this._radios.forEach((e=>e.invalid=this.invalid))}_mixinResetFormControl(){this.value=this.input.value=this.defaultValue,this._updateInputValue("reset"),this._mixinResetValidity(this.input)}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.addEventListener("sgds-blur",(()=>{this._isTouched=!0}))}firstUpdated(e){super.firstUpdated(e);const t=this._radios;t.forEach(((e,i)=>{if(t.length>1)switch(i){case 0:e.setAttribute("first-of-type","");break;case t.length-1:e.setAttribute("last-of-type","");break;default:e.setAttribute("nth-of-type","")}})),this.value&&this._updateInputValue("change")}_handleRadioClick(e){e.preventDefault();const t=e.target;if(t.disabled)return;this.value=t.value,this._updateInputValue();this._radios.forEach((e=>e.checked=e===t))}_updateInputValue(e="change"){this.input.value=this.value,this.input.dispatchEvent(new InputEvent(e))}_handleKeyDown(e){var t;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(e.key))return;const i=this._radios.filter((e=>!e.disabled)),s=null!==(t=i.find((e=>e.checked)))&&void 0!==t?t:i[0],r=" "===e.key?0:["ArrowUp","ArrowLeft"].includes(e.key)?-1:1;let n=i.indexOf(s)+r;n<0&&(n=i.length-1),n>i.length-1&&(n=0),this._radios.forEach((e=>{e.checked=!1,e.tabIndex=-1})),this.value=i[n].value,this._updateInputValue(),i[n].checked=!0,i[n].tabIndex=0,e.preventDefault()}_handleSlotChange(){const e=this._radios;e.forEach((e=>e.checked=e.value===this.value)),this._disabledChildRadios(),e.some((e=>e.checked))||e[0]&&(e[0].tabIndex=0)}_updateCheckedRadio(){this._radios.forEach((e=>e.checked=e.value===this.value))}_renderHintText(){const e=X` <div id="${this._controlId}Help" class="form-text">${this.hintText}</div> `;return this.hintText&&e}reportValidity(){return this._mixinReportValidity()}checkValidity(){return this._mixinCheckValidity()}get validity(){return this._mixinGetValidity()}get validationMessage(){return this._mixinGetValidationMessage()}_handleIsTouched(){this._isTouched&&(this.invalid=!this.input.checkValidity())}_handleDisabledChange(){this.setInvalid(!1),this._disabledChildRadios()}_disabledChildRadios(){if(this.disabled){this._radios.forEach((e=>e.disabled=this.disabled))}}render(){const e=X`
111
111
  <slot
112
112
  class="radio-container"
113
113
  @click=${this._handleRadioClick}
@@ -151,5 +151,5 @@ class extends nt{constructor(e){if(super(e),e.type!==it&&e.type!==tt&&e.type!==s
151
151
  </div>
152
152
  `:te}
153
153
  </fieldset>
154
- `}}function xt(e,t){customElements.get(e)||customElements.define(e,t)}Ct.styles=[...wt.styles,Pt],e([Qe("slot:not([name])")],Ct.prototype,"defaultSlot",void 0),e([Ke()],Ct.prototype,"defaultValue",void 0),e([Ge({reflect:!0})],Ct.prototype,"value",void 0),e([Ge({type:String,reflect:!0})],Ct.prototype,"invalidFeedback",void 0),e([Ge({type:Boolean,reflect:!0})],Ct.prototype,"hasFeedback",void 0),e([Ge({type:Boolean,reflect:!0})],Ct.prototype,"required",void 0),e([ut("value",{waitUntilFirstUpdate:!0})],Ct.prototype,"_handleValueChange",null),e([ut("invalid",{waitUntilFirstUpdate:!0})],Ct.prototype,"_handleInvalidChange",null),e([Ke()],Ct.prototype,"_isTouched",void 0),e([(e,t)=>{const{slot:i,selector:s}=kt??{},r="slot"+(i?`[name=${i}]`:":not([name])");return Ye(e,t,{get(){const e=this.renderRoot?.querySelector(r),t=e?.assignedElements(kt)??[];return void 0===s?t:t.filter((e=>e.matches(s)))}})}],Ct.prototype,"_radios",void 0),e([ut("_isTouched",{waitUntilFirstUpdate:!0})],Ct.prototype,"_handleIsTouched",null),e([ut("disabled",{waitUntilFirstUpdate:!0})],Ct.prototype,"_handleDisabledChange",null),xt("sgds-radio",ft),xt("sgds-radio-group",Ct)}));
154
+ `}}function xt(e,t){customElements.get(e)||customElements.define(e,t)}Ct.styles=[...wt.styles,kt],e([Qe("slot:not([name])")],Ct.prototype,"defaultSlot",void 0),e([Ke()],Ct.prototype,"defaultValue",void 0),e([Ge({reflect:!0})],Ct.prototype,"value",void 0),e([Ge({type:String,reflect:!0})],Ct.prototype,"invalidFeedback",void 0),e([Ge({type:Boolean,reflect:!0})],Ct.prototype,"hasFeedback",void 0),e([Ge({type:Boolean,reflect:!0})],Ct.prototype,"required",void 0),e([ut("value",{waitUntilFirstUpdate:!0})],Ct.prototype,"_handleValueChange",null),e([ut("invalid",{waitUntilFirstUpdate:!0})],Ct.prototype,"_handleInvalidChange",null),e([Ke()],Ct.prototype,"_isTouched",void 0),e([(e,t)=>{const{slot:i,selector:s}=Pt??{},r="slot"+(i?`[name=${i}]`:":not([name])");return Ye(e,t,{get(){const e=this.renderRoot?.querySelector(r),t=e?.assignedElements(Pt)??[];return void 0===s?t:t.filter((e=>e.matches(s)))}})}],Ct.prototype,"_radios",void 0),e([ut("_isTouched",{waitUntilFirstUpdate:!0})],Ct.prototype,"_handleIsTouched",null),e([ut("disabled",{waitUntilFirstUpdate:!0})],Ct.prototype,"_handleDisabledChange",null),xt("sgds-radio",ft),xt("sgds-radio-group",Ct)}));
155
155
  //# sourceMappingURL=index.umd.min.js.map