@govtechsg/sgds-web-component 3.6.0-rc.2 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base/button.js +1 -1
- package/components/Alert/index.umd.min.js +17 -17
- package/components/Alert/index.umd.min.js.map +1 -1
- package/components/Alert/sgds-alert.d.ts +1 -1
- package/components/Alert/sgds-alert.js +2 -2
- package/components/Alert/sgds-alert.js.map +1 -1
- package/components/Badge/index.umd.min.js +16 -16
- package/components/Badge/index.umd.min.js.map +1 -1
- package/components/Badge/sgds-badge.d.ts +1 -1
- package/components/Badge/sgds-badge.js +2 -2
- package/components/Badge/sgds-badge.js.map +1 -1
- package/components/Breadcrumb/index.umd.min.js +17 -17
- package/components/Breadcrumb/index.umd.min.js.map +1 -1
- package/components/Breadcrumb/sgds-breadcrumb-item.d.ts +1 -0
- package/components/Breadcrumb/sgds-breadcrumb-item.js +5 -2
- package/components/Breadcrumb/sgds-breadcrumb-item.js.map +1 -1
- package/components/Button/index.umd.min.js +1 -1
- package/components/Card/index.umd.min.js.map +1 -1
- package/components/Card/sgds-card.js.map +1 -1
- package/components/CloseButton/close-button.js +6 -0
- package/components/CloseButton/index.js +5 -0
- package/components/CloseButton/index.js.map +1 -0
- package/components/CloseButton/index.umd.min.js +50 -0
- package/components/CloseButton/index.umd.min.js.map +1 -0
- package/{internals → components}/CloseButton/sgds-close-button.d.ts +2 -4
- package/{internals → components}/CloseButton/sgds-close-button.js +4 -10
- package/components/CloseButton/sgds-close-button.js.map +1 -0
- package/components/ComboBox/index.umd.min.js +18 -18
- package/components/ComboBox/index.umd.min.js.map +1 -1
- package/components/Datepicker/index.umd.min.js +1 -1
- package/components/Datepicker/index.umd.min.js.map +1 -1
- package/components/Drawer/index.umd.min.js +6 -11
- package/components/Drawer/index.umd.min.js.map +1 -1
- package/components/Drawer/sgds-drawer.d.ts +1 -1
- package/components/Drawer/sgds-drawer.js +1 -1
- package/components/Drawer/sgds-drawer.js.map +1 -1
- package/components/FileUpload/index.umd.min.js +26 -26
- package/components/FileUpload/index.umd.min.js.map +1 -1
- package/components/FileUpload/sgds-file-upload.d.ts +1 -1
- package/components/FileUpload/sgds-file-upload.js +1 -1
- package/components/FileUpload/sgds-file-upload.js.map +1 -1
- package/components/Footer/footer-item.js +1 -1
- package/components/Footer/footer.js +1 -1
- package/components/Footer/index.umd.min.js +17 -17
- package/components/Footer/index.umd.min.js.map +1 -1
- package/components/Footer/sgds-footer-item.d.ts +1 -0
- package/components/Footer/sgds-footer-item.js +11 -1
- package/components/Footer/sgds-footer-item.js.map +1 -1
- package/components/Footer/sgds-footer.js +7 -7
- package/components/Footer/sgds-footer.js.map +1 -1
- package/components/IconButton/index.umd.min.js +1 -1
- package/components/IconCard/index.umd.min.js.map +1 -1
- package/components/IconCard/sgds-icon-card.js.map +1 -1
- package/components/ImageCard/index.umd.min.js.map +1 -1
- package/components/ImageCard/sgds-image-card.js.map +1 -1
- package/components/Input/index.umd.min.js.map +1 -1
- package/components/Input/sgds-input.js.map +1 -1
- package/components/Link/index.umd.min.js +9 -9
- package/components/Link/index.umd.min.js.map +1 -1
- package/components/Link/link.js +1 -1
- package/components/Link/sgds-link.d.ts +7 -1
- package/components/Link/sgds-link.js +28 -2
- package/components/Link/sgds-link.js.map +1 -1
- package/components/Mainnav/index.umd.min.js +1 -1
- package/components/Modal/index.umd.min.js +4 -4
- package/components/Modal/index.umd.min.js.map +1 -1
- package/components/Modal/sgds-modal.d.ts +1 -1
- package/components/Modal/sgds-modal.js +2 -2
- package/components/Modal/sgds-modal.js.map +1 -1
- package/components/Pagination/index.umd.min.js +1 -1
- package/components/QuantityToggle/index.umd.min.js +1 -1
- package/components/QuantityToggle/index.umd.min.js.map +1 -1
- package/components/Subnav/index.umd.min.js +11 -9
- package/components/Subnav/index.umd.min.js.map +1 -1
- package/components/Subnav/sgds-subnav.d.ts +4 -0
- package/components/Subnav/sgds-subnav.js +18 -2
- package/components/Subnav/sgds-subnav.js.map +1 -1
- package/components/Subnav/subnav.js +1 -1
- package/components/SystemBanner/index.d.ts +6 -0
- package/components/SystemBanner/index.js +6 -0
- package/components/SystemBanner/index.js.map +1 -0
- package/components/SystemBanner/index.umd.min.js +2101 -0
- package/components/SystemBanner/index.umd.min.js.map +1 -0
- package/components/SystemBanner/sgds-system-banner-item.d.ts +24 -0
- package/components/SystemBanner/sgds-system-banner-item.js +93 -0
- package/components/SystemBanner/sgds-system-banner-item.js.map +1 -0
- package/components/SystemBanner/sgds-system-banner.d.ts +51 -0
- package/components/SystemBanner/sgds-system-banner.js +224 -0
- package/components/SystemBanner/sgds-system-banner.js.map +1 -0
- package/components/SystemBanner/system-banner-context.d.ts +3 -0
- package/components/SystemBanner/system-banner-context.js +6 -0
- package/components/SystemBanner/system-banner-context.js.map +1 -0
- package/components/SystemBanner/system-banner-item.js +6 -0
- package/components/SystemBanner/system-banner-item.js.map +1 -0
- package/components/SystemBanner/system-banner.js +6 -0
- package/components/SystemBanner/system-banner.js.map +1 -0
- package/components/Toast/index.umd.min.js +12 -12
- package/components/Toast/index.umd.min.js.map +1 -1
- package/components/Toast/sgds-toast.d.ts +1 -1
- package/components/Toast/sgds-toast.js +2 -2
- package/components/Toast/sgds-toast.js.map +1 -1
- package/components/index.d.ts +2 -0
- package/components/index.js +2 -0
- package/components/index.js.map +1 -1
- package/components/index.umd.min.js +168 -136
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +3 -0
- package/index.d.ts +3 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.umd.min.js +212 -161
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/react/base/button.cjs.js +1 -1
- package/react/base/button.js +1 -1
- package/react/close-button/index.cjs.js +40 -0
- package/react/close-button/index.cjs.js.map +1 -0
- package/react/close-button/index.d.ts +2 -0
- package/react/close-button/index.js +16 -0
- package/react/close-button/index.js.map +1 -0
- package/react/components/Alert/sgds-alert.cjs.js +2 -2
- package/react/components/Alert/sgds-alert.cjs.js.map +1 -1
- package/react/components/Alert/sgds-alert.js +2 -2
- package/react/components/Alert/sgds-alert.js.map +1 -1
- package/react/components/Badge/sgds-badge.cjs.js +2 -2
- package/react/components/Badge/sgds-badge.cjs.js.map +1 -1
- package/react/components/Badge/sgds-badge.js +2 -2
- package/react/components/Badge/sgds-badge.js.map +1 -1
- package/react/components/Breadcrumb/sgds-breadcrumb-item.cjs.js +5 -2
- package/react/components/Breadcrumb/sgds-breadcrumb-item.cjs.js.map +1 -1
- package/react/components/Breadcrumb/sgds-breadcrumb-item.js +5 -2
- package/react/components/Breadcrumb/sgds-breadcrumb-item.js.map +1 -1
- package/react/components/Card/sgds-card.cjs.js.map +1 -1
- package/react/components/Card/sgds-card.js.map +1 -1
- package/react/components/CloseButton/close-button.cjs.js +11 -0
- package/react/components/CloseButton/close-button.js +7 -0
- package/react/{internals → components}/CloseButton/sgds-close-button.cjs.js +4 -10
- package/react/components/CloseButton/sgds-close-button.cjs.js.map +1 -0
- package/react/{internals → components}/CloseButton/sgds-close-button.js +4 -10
- package/react/components/CloseButton/sgds-close-button.js.map +1 -0
- package/react/components/Drawer/sgds-drawer.cjs.js +1 -1
- package/react/components/Drawer/sgds-drawer.cjs.js.map +1 -1
- package/react/components/Drawer/sgds-drawer.js +1 -1
- package/react/components/Drawer/sgds-drawer.js.map +1 -1
- package/react/components/FileUpload/sgds-file-upload.cjs.js +1 -1
- package/react/components/FileUpload/sgds-file-upload.cjs.js.map +1 -1
- package/react/components/FileUpload/sgds-file-upload.js +1 -1
- package/react/components/FileUpload/sgds-file-upload.js.map +1 -1
- package/react/components/Footer/footer-item.cjs.js +1 -1
- package/react/components/Footer/footer-item.js +1 -1
- package/react/components/Footer/footer.cjs.js +1 -1
- package/react/components/Footer/footer.js +1 -1
- package/react/components/Footer/sgds-footer-item.cjs.js +11 -1
- package/react/components/Footer/sgds-footer-item.cjs.js.map +1 -1
- package/react/components/Footer/sgds-footer-item.js +11 -1
- package/react/components/Footer/sgds-footer-item.js.map +1 -1
- package/react/components/Footer/sgds-footer.cjs.js +7 -7
- package/react/components/Footer/sgds-footer.cjs.js.map +1 -1
- package/react/components/Footer/sgds-footer.js +7 -7
- package/react/components/Footer/sgds-footer.js.map +1 -1
- package/react/components/IconCard/sgds-icon-card.cjs.js.map +1 -1
- package/react/components/IconCard/sgds-icon-card.js.map +1 -1
- package/react/components/ImageCard/sgds-image-card.cjs.js.map +1 -1
- package/react/components/ImageCard/sgds-image-card.js.map +1 -1
- package/react/components/Input/sgds-input.cjs.js.map +1 -1
- package/react/components/Input/sgds-input.js.map +1 -1
- package/react/components/Link/link.cjs.js +1 -1
- package/react/components/Link/link.js +1 -1
- package/react/components/Link/sgds-link.cjs.js +28 -2
- package/react/components/Link/sgds-link.cjs.js.map +1 -1
- package/react/components/Link/sgds-link.js +28 -2
- package/react/components/Link/sgds-link.js.map +1 -1
- package/react/components/Modal/sgds-modal.cjs.js +2 -2
- package/react/components/Modal/sgds-modal.cjs.js.map +1 -1
- package/react/components/Modal/sgds-modal.js +2 -2
- package/react/components/Modal/sgds-modal.js.map +1 -1
- package/react/components/Subnav/sgds-subnav.cjs.js +17 -1
- package/react/components/Subnav/sgds-subnav.cjs.js.map +1 -1
- package/react/components/Subnav/sgds-subnav.js +18 -2
- package/react/components/Subnav/sgds-subnav.js.map +1 -1
- package/react/components/Subnav/subnav.cjs.js +1 -1
- package/react/components/Subnav/subnav.js +1 -1
- package/react/components/SystemBanner/sgds-system-banner-item.cjs.js +99 -0
- package/react/components/SystemBanner/sgds-system-banner-item.cjs.js.map +1 -0
- package/react/components/SystemBanner/sgds-system-banner-item.js +94 -0
- package/react/components/SystemBanner/sgds-system-banner-item.js.map +1 -0
- package/react/components/SystemBanner/sgds-system-banner.cjs.js +230 -0
- package/react/components/SystemBanner/sgds-system-banner.cjs.js.map +1 -0
- package/react/components/SystemBanner/sgds-system-banner.js +225 -0
- package/react/components/SystemBanner/sgds-system-banner.js.map +1 -0
- package/react/components/SystemBanner/system-banner-context.cjs.js +11 -0
- package/react/components/SystemBanner/system-banner-context.cjs.js.map +1 -0
- package/react/components/SystemBanner/system-banner-context.js +7 -0
- package/react/components/SystemBanner/system-banner-context.js.map +1 -0
- package/react/components/SystemBanner/system-banner-item.cjs.js +11 -0
- package/react/components/SystemBanner/system-banner-item.cjs.js.map +1 -0
- package/react/components/SystemBanner/system-banner-item.js +7 -0
- package/react/components/SystemBanner/system-banner-item.js.map +1 -0
- package/react/components/SystemBanner/system-banner.cjs.js +11 -0
- package/react/components/SystemBanner/system-banner.cjs.js.map +1 -0
- package/react/components/SystemBanner/system-banner.js +7 -0
- package/react/components/SystemBanner/system-banner.js.map +1 -0
- package/react/components/Toast/sgds-toast.cjs.js +2 -2
- package/react/components/Toast/sgds-toast.cjs.js.map +1 -1
- package/react/components/Toast/sgds-toast.js +2 -2
- package/react/components/Toast/sgds-toast.js.map +1 -1
- package/react/index.cjs.js +114 -108
- package/react/index.cjs.js.map +1 -1
- package/react/index.d.ts +3 -0
- package/react/index.js +3 -0
- package/react/index.js.map +1 -1
- package/react/system-banner/index.cjs.js +43 -0
- package/react/system-banner/index.cjs.js.map +1 -0
- package/react/system-banner/index.d.ts +2 -0
- package/react/system-banner/index.js +19 -0
- package/react/system-banner/index.js.map +1 -0
- package/react/system-banner-item/index.cjs.js +42 -0
- package/react/system-banner-item/index.cjs.js.map +1 -0
- package/react/system-banner-item/index.d.ts +2 -0
- package/react/system-banner-item/index.js +18 -0
- package/react/system-banner-item/index.js.map +1 -0
- package/themes/root.css +14 -2
- package/internals/CloseButton/close-button.js +0 -6
- package/internals/CloseButton/sgds-close-button.js.map +0 -1
- package/react/internals/CloseButton/close-button.cjs.js +0 -11
- package/react/internals/CloseButton/close-button.js +0 -7
- package/react/internals/CloseButton/sgds-close-button.cjs.js.map +0 -1
- package/react/internals/CloseButton/sgds-close-button.js.map +0 -1
- package/utils/test.d.ts +0 -28
- /package/{internals → components}/CloseButton/close-button.js.map +0 -0
- /package/{internals → components}/CloseButton/index.d.ts +0 -0
- /package/react/{internals → components}/CloseButton/close-button.cjs.js.map +0 -0
- /package/react/{internals → components}/CloseButton/close-button.js.map +0 -0
|
@@ -9,13 +9,13 @@ const e=globalThis,s=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/,{is:l,defineProperty:d,getOwnPropertyDescriptor:c,getOwnPropertyNames:h,getOwnPropertySymbols:p,getPrototypeOf:u}=Object,m=globalThis;let g;const f=m.trustedTypes,v=f?f.emptyScript:"",y=m.reactiveElementPolyfillSupportDevMode;{const t=m.litIssuedWarnings??=new Set;g=(e,s)=>{s+=` See https://lit.dev/msg/${e} for more information.`,t.has(s)||(console.warn(s),t.add(s))},g("dev-mode","Lit is in dev mode. Not recommended for production!"),m.ShadyDOM?.inUse&&void 0===y&&g("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")}const _=(t,e)=>t,b={toAttribute(t,e){switch(e){case Boolean:t=t?v:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},w=(t,e)=>!l(t,e),$={attribute:!0,type:String,converter:b,reflect:!1,hasChanged:w};Symbol.metadata??=Symbol("metadata"),m.litPropertyMetadata??=new WeakMap;class S extends HTMLElement{static addInitializer(t){this.__prepare(),(this._initializers??=[]).push(t)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(t,e=$){if(e.state&&(e.attribute=!1),this.__prepare(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol.for(`${String(t)} (@property() cache)`),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&d(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:r}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};if(null==i){if("value"in(c(this.prototype,t)??{}))throw new Error(`Field ${JSON.stringify(String(t))} 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.`);g("reactive-property-without-getter",`Field ${JSON.stringify(String(t))} 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 i?.call(this)},set(e){const o=i?.call(this);r.call(this,e),this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??$}static __prepare(){if(this.hasOwnProperty(_("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t._initializers&&(this._initializers=[...t._initializers]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(_("properties"))){const t=this.properties,e=[...h(t),...p(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this.__attributeToPropertyMap=new Map;for(const[t,e]of this.elementProperties){const s=this.__attributeNameForProperty(t,e);void 0!==s&&this.__attributeToPropertyMap.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&g("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&g("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static __attributeNameForProperty(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.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((t=>this.enableUpdating=t)),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach((t=>t(this)))}addController(t){(this.__controllers??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this.__controllers?.delete(t)}__saveInstanceProperties(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this.__instanceProperties=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{if(s)t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const s of i){const i=document.createElement("style"),r=e.litNonce;void 0!==r&&i.setAttribute("nonce",r),i.textContent=s.cssText,t.appendChild(i)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this.__controllers?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$attributeToProperty(t,s)}__propertyToAttribute(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor.__attributeNameForProperty(t,s);if(void 0!==i&&!0===s.reflect){const r=(void 0!==s.converter?.toAttribute?s.converter:b).toAttribute(e,s.type);this.constructor.enabledWarnings.includes("migration")&&void 0===r&&g("undefined-attribute-value",`The attribute value for the ${t} 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=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this.__reflectingProperty=null}}_$attributeToProperty(t,e){const s=this.constructor,i=s.__attributeToPropertyMap.get(t);if(void 0!==i&&this.__reflectingProperty!==i){const t=s.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:b;this.__reflectingProperty=i,this[i]=r.fromAttribute(e,t.type),this.__reflectingProperty=null}}requestUpdate(t,e,s){if(void 0!==t){t instanceof Event&&g("","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()"),s??=this.constructor.getPropertyOptions(t);if(!(s.hasChanged??w)(this[t],e))return;this._$changeProperty(t,e,s)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(t,e,s){this._$changedProperties.has(t)||this._$changedProperties.set(t,e),!0===s.reflect&&this.__reflectingProperty!==t&&(this.__reflectingProperties??=new Set).add(t)}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){const t=this.performUpdate();return this.constructor.enabledWarnings.includes("async-perform-update")&&"function"==typeof t?.then&&g("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.`),t}performUpdate(){if(!this.isUpdatePending)return;var t;if(t={kind:"update"},m.emitLitDebugLogEvents&&m.dispatchEvent(new CustomEvent("lit-debug",{detail:t})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const t=[...this.constructor.elementProperties.keys()].filter((t=>this.hasOwnProperty(t)&&t in u(this)));if(t.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${t.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[t,e]of this.__instanceProperties)this[t]=e;this.__instanceProperties=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$changedProperties.has(e)||void 0===this[e]||this._$changeProperty(e,this[e],s)}let e=!1;const s=this._$changedProperties;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this.__controllers?.forEach((t=>t.hostUpdate?.())),this.update(s)):this.__markUpdated()}catch(t){throw e=!1,this.__markUpdated(),t}e&&this._$didUpdate(s)}willUpdate(t){}_$didUpdate(t){this.__controllers?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t),this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update")&&g("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(t){return!0}update(t){this.__reflectingProperties&&=this.__reflectingProperties.forEach((t=>this.__propertyToAttribute(t,this[t]))),this.__markUpdated()}updated(t){}firstUpdated(t){}}S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[_("elementProperties")]=new Map,S[_("finalized")]=new Map,y?.({ReactiveElement:S});{S.enabledWarnings=["change-in-update","async-perform-update"];const t=function(t){t.hasOwnProperty(_("enabledWarnings"))||(t.enabledWarnings=t.enabledWarnings.slice())};S.enableWarning=function(e){t(this),this.enabledWarnings.includes(e)||this.enabledWarnings.push(e)},S.disableWarning=function(e){t(this);const s=this.enabledWarnings.indexOf(e);s>=0&&this.enabledWarnings.splice(s,1)}}(m.reactiveElementVersions??=[]).push("2.0.4"),m.reactiveElementVersions.length>1&&g("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");
|
|
12
|
+
*/,{is:l,defineProperty:d,getOwnPropertyDescriptor:c,getOwnPropertyNames:h,getOwnPropertySymbols:p,getPrototypeOf:u}=Object,m=globalThis;let f;const g=m.trustedTypes,v=g?g.emptyScript:"",y=m.reactiveElementPolyfillSupportDevMode;{const t=m.litIssuedWarnings??=new Set;f=(e,s)=>{s+=` See https://lit.dev/msg/${e} for more information.`,t.has(s)||(console.warn(s),t.add(s))},f("dev-mode","Lit is in dev mode. Not recommended for production!"),m.ShadyDOM?.inUse&&void 0===y&&f("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")}const _=(t,e)=>t,b={toAttribute(t,e){switch(e){case Boolean:t=t?v:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},w=(t,e)=>!l(t,e),$={attribute:!0,type:String,converter:b,reflect:!1,hasChanged:w};Symbol.metadata??=Symbol("metadata"),m.litPropertyMetadata??=new WeakMap;class S extends HTMLElement{static addInitializer(t){this.__prepare(),(this._initializers??=[]).push(t)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(t,e=$){if(e.state&&(e.attribute=!1),this.__prepare(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol.for(`${String(t)} (@property() cache)`),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&d(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:r}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};if(null==i){if("value"in(c(this.prototype,t)??{}))throw new Error(`Field ${JSON.stringify(String(t))} 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.`);f("reactive-property-without-getter",`Field ${JSON.stringify(String(t))} 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 i?.call(this)},set(e){const o=i?.call(this);r.call(this,e),this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??$}static __prepare(){if(this.hasOwnProperty(_("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t._initializers&&(this._initializers=[...t._initializers]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(_("properties"))){const t=this.properties,e=[...h(t),...p(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this.__attributeToPropertyMap=new Map;for(const[t,e]of this.elementProperties){const s=this.__attributeNameForProperty(t,e);void 0!==s&&this.__attributeToPropertyMap.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&f("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&f("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static __attributeNameForProperty(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.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((t=>this.enableUpdating=t)),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach((t=>t(this)))}addController(t){(this.__controllers??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this.__controllers?.delete(t)}__saveInstanceProperties(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this.__instanceProperties=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,i)=>{if(s)t.adoptedStyleSheets=i.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const s of i){const i=document.createElement("style"),r=e.litNonce;void 0!==r&&i.setAttribute("nonce",r),i.textContent=s.cssText,t.appendChild(i)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this.__controllers?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$attributeToProperty(t,s)}__propertyToAttribute(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor.__attributeNameForProperty(t,s);if(void 0!==i&&!0===s.reflect){const r=(void 0!==s.converter?.toAttribute?s.converter:b).toAttribute(e,s.type);this.constructor.enabledWarnings.includes("migration")&&void 0===r&&f("undefined-attribute-value",`The attribute value for the ${t} 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=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this.__reflectingProperty=null}}_$attributeToProperty(t,e){const s=this.constructor,i=s.__attributeToPropertyMap.get(t);if(void 0!==i&&this.__reflectingProperty!==i){const t=s.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:b;this.__reflectingProperty=i,this[i]=r.fromAttribute(e,t.type),this.__reflectingProperty=null}}requestUpdate(t,e,s){if(void 0!==t){t instanceof Event&&f("","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()"),s??=this.constructor.getPropertyOptions(t);if(!(s.hasChanged??w)(this[t],e))return;this._$changeProperty(t,e,s)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(t,e,s){this._$changedProperties.has(t)||this._$changedProperties.set(t,e),!0===s.reflect&&this.__reflectingProperty!==t&&(this.__reflectingProperties??=new Set).add(t)}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){const t=this.performUpdate();return this.constructor.enabledWarnings.includes("async-perform-update")&&"function"==typeof t?.then&&f("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.`),t}performUpdate(){if(!this.isUpdatePending)return;var t;if(t={kind:"update"},m.emitLitDebugLogEvents&&m.dispatchEvent(new CustomEvent("lit-debug",{detail:t})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const t=[...this.constructor.elementProperties.keys()].filter((t=>this.hasOwnProperty(t)&&t in u(this)));if(t.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${t.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[t,e]of this.__instanceProperties)this[t]=e;this.__instanceProperties=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$changedProperties.has(e)||void 0===this[e]||this._$changeProperty(e,this[e],s)}let e=!1;const s=this._$changedProperties;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this.__controllers?.forEach((t=>t.hostUpdate?.())),this.update(s)):this.__markUpdated()}catch(t){throw e=!1,this.__markUpdated(),t}e&&this._$didUpdate(s)}willUpdate(t){}_$didUpdate(t){this.__controllers?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t),this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update")&&f("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(t){return!0}update(t){this.__reflectingProperties&&=this.__reflectingProperties.forEach((t=>this.__propertyToAttribute(t,this[t]))),this.__markUpdated()}updated(t){}firstUpdated(t){}}S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[_("elementProperties")]=new Map,S[_("finalized")]=new Map,y?.({ReactiveElement:S});{S.enabledWarnings=["change-in-update","async-perform-update"];const t=function(t){t.hasOwnProperty(_("enabledWarnings"))||(t.enabledWarnings=t.enabledWarnings.slice())};S.enableWarning=function(e){t(this),this.enabledWarnings.includes(e)||this.enabledWarnings.push(e)},S.disableWarning=function(e){t(this);const s=this.enabledWarnings.indexOf(e);s>=0&&this.enabledWarnings.splice(s,1)}}(m.reactiveElementVersions??=[]).push("2.0.4"),m.reactiveElementVersions.length>1&&f("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
17
|
*/
|
|
18
|
-
const P=globalThis,C=t=>{P.emitLitDebugLogEvents&&P.dispatchEvent(new CustomEvent("lit-debug",{detail:t}))};let x,E=0;P.litIssuedWarnings??=new Set,x=(t,e)=>{e+=t?` See https://lit.dev/msg/${t} for more information.`:"",P.litIssuedWarnings.has(e)||(console.warn(e),P.litIssuedWarnings.add(e))},x("dev-mode","Lit is in dev mode. Not recommended for production!");const k=P.ShadyDOM?.inUse&&!0===P.ShadyDOM?.noPatch?P.ShadyDOM.wrap:t=>t,T=P.trustedTypes,U=T?T.createPolicy("lit-html",{createHTML:t=>t}):void 0,O=t=>t,N=(t,e,s)=>O,z=t=>{if(rt!==N)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");rt=t},M=()=>{rt=N},R=(t,e,s)=>rt(t,e,s),A="$lit$",L=`lit$${Math.random().toFixed(9).slice(2)}$`,V="?"+L,W=`<${V}>`,D=document,j=()=>D.createComment(""),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,q=Array.isArray,H="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,J=/>/g,Z=new RegExp(`>|${H}(?:([^\\s"'>=/]+)(${H}*=${H}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,X=/"/g,G=/^(?:script|style|textarea|title)$/i,K=(Q=1,(t,...e)=>(t.some((t=>void 0===t))&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),e.some((t=>t?._$litStatic$))&&x("","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:t,values:e}));var Q;const tt=Symbol.for("lit-noChange"),et=Symbol.for("lit-nothing"),st=new WeakMap,it=D.createTreeWalker(D,129);let rt=N;function ot(t,e){if(!q(t)||!t.hasOwnProperty("raw")){let t="invalid template strings array";throw t="\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(t)}return void 0!==U?U.createHTML(e):e}class nt{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[l,d]=((t,e)=>{const s=t.length-1,i=[];let r,o=2===e?"<svg>":3===e?"<math>":"",n=F;for(let e=0;e<s;e++){const s=t[e];let a,l,d=-1,c=0;for(;c<s.length&&(n.lastIndex=c,l=n.exec(s),null!==l);)if(c=n.lastIndex,n===F){if("!--"===l[1])n=B;else if(void 0!==l[1])n=J;else if(void 0!==l[2])G.test(l[2])&&(r=new RegExp(`</${l[2]}`,"g")),n=Z;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 n===Z?">"===l[0]?(n=r??F,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?Z:'"'===l[3]?X:Y):n===X||n===Y?n=Z:n===B||n===J?n=F:(n=Z,r=void 0);console.assert(-1===d||n===Z||n===Y||n===X,"unexpected parse state B");const h=n===Z&&t[e+1].startsWith("/>")?" ":"";o+=n===F?s+W:d>=0?(i.push(a),s.slice(0,d)+A+s.slice(d)+L+h):s+L+(-2===d?e:h)}return[ot(t,o+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]})(t,e);if(this.el=nt.createElement(l,s),it.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=it.nextNode())&&a.length<n;){if(1===i.nodeType){{const t=i.localName;if(/^(?:textarea|template)$/i.test(t)&&i.innerHTML.includes(L)){const e=`Expressions are not supported inside \`${t}\` elements. See https://lit.dev/msg/expression-in-${t} for more information.`;if("template"===t)throw new Error(e);x("",e)}}if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(A)){const e=d[o++],s=i.getAttribute(t).split(L),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:r,name:n[2],strings:s,ctor:"."===n[1]?ht:"?"===n[1]?pt:"@"===n[1]?ut:ct}),i.removeAttribute(t)}else t.startsWith(L)&&(a.push({type:6,index:r}),i.removeAttribute(t));if(G.test(i.tagName)){const t=i.textContent.split(L),e=t.length-1;if(e>0){i.textContent=T?T.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],j()),it.nextNode(),a.push({type:2,index:++r});i.append(t[e],j())}}}else if(8===i.nodeType){if(i.data===V)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(L,t+1));)a.push({type:7,index:r}),t+=L.length-1}}r++}if(d.length!==o)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`'+t.join("${...}")+"`");C&&C({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:t})}static createElement(t,e){const s=D.createElement("template");return s.innerHTML=t,s}}function at(t,e,s=t,i){if(e===tt)return e;let r=void 0!==i?s.__directives?.[i]:s.__directive;const o=I(e)?void 0:e._$litDirective$;return r?.constructor!==o&&(r?._$notifyDirectiveConnectionChanged?.(!1),void 0===o?r=void 0:(r=new o(t),r._$initialize(t,s,i)),void 0!==i?(s.__directives??=[])[i]=r:s.__directive=r),void 0!==r&&(e=at(t,r._$resolve(t,e.values),r,i)),e}class lt{constructor(t,e){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){const{el:{content:e},parts:s}=this._$template,i=(t?.creationScope??D).importNode(e,!0);it.currentNode=i;let r=it.nextNode(),o=0,n=0,a=s[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new dt(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new mt(r,this,t)),this._$parts.push(e),a=s[++n]}o!==a?.index&&(r=it.nextNode(),o++)}return it.currentNode=D,i}_update(t){let e=0;for(const s of this._$parts)void 0!==s&&(C&&C({kind:"set part",part:s,value:t[e],valueIndex:e,values:t,templateInstance:this}),void 0!==s.strings?(s._$setValue(t,s,e),e+=s.strings.length-2):s._$setValue(t[e])),e++}}class dt{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(t,e,s,i){this.type=2,this._$committedValue=et,this._$disconnectableChildren=void 0,this._$startNode=t,this._$endNode=e,this._$parent=s,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let t=k(this._$startNode).parentNode;const e=this._$parent;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=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(t=at(this,t,e),I(t))t===et||null==t||""===t?(this._$committedValue!==et&&(C&&C({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=et):t!==this._$committedValue&&t!==tt&&this._commitText(t);else if(void 0!==t._$litType$)this._commitTemplateResult(t);else if(void 0!==t.nodeType){if(this.options?.host===t)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",t,"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(t)}else(t=>q(t)||"function"==typeof t?.[Symbol.iterator])(t)?this._commitIterable(t):this._commitText(t)}_insert(t){return k(k(this._$startNode).parentNode).insertBefore(t,this._$endNode)}_commitNode(t){if(this._$committedValue!==t){if(this._$clear(),rt!==N){const t=this._$startNode.parentNode?.nodeName;if("STYLE"===t||"SCRIPT"===t){let e="Forbidden";throw e="STYLE"===t?"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(e)}}C&&C({kind:"commit node",start:this._$startNode,parent:this._$parent,value:t,options:this.options}),this._$committedValue=this._insert(t)}}_commitText(t){if(this._$committedValue!==et&&I(this._$committedValue)){const e=k(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=R(e,"data","property")),t=this._textSanitizer(t),C&&C({kind:"commit text",node:e,value:t,options:this.options}),e.data=t}else{const e=D.createTextNode("");this._commitNode(e),void 0===this._textSanitizer&&(this._textSanitizer=R(e,"data","property")),t=this._textSanitizer(t),C&&C({kind:"commit text",node:e,value:t,options:this.options}),e.data=t}this._$committedValue=t}_commitTemplateResult(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$getTemplate(t):(void 0===s.el&&(s.el=nt.createElement(ot(s.h,s.h[0]),this.options)),s);if(this._$committedValue?._$template===i)C&&C({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:e}),this._$committedValue._update(e);else{const t=new lt(i,this),s=t._clone(this.options);C&&C({kind:"template instantiated",template:i,instance:t,parts:t._$parts,options:this.options,fragment:s,values:e}),t._update(e),C&&C({kind:"template instantiated and updated",template:i,instance:t,parts:t._$parts,options:this.options,fragment:s,values:e}),this._commitNode(s),this._$committedValue=t}}_$getTemplate(t){let e=st.get(t.strings);return void 0===e&&st.set(t.strings,e=new nt(t)),e}_commitIterable(t){q(this._$committedValue)||(this._$committedValue=[],this._$clear());const e=this._$committedValue;let s,i=0;for(const r of t)i===e.length?e.push(s=new dt(this._insert(j()),this._insert(j()),this,this.options)):s=e[i],s._$setValue(r),i++;i<e.length&&(this._$clear(s&&k(s._$endNode).nextSibling,i),e.length=i)}_$clear(t=k(this._$startNode).nextSibling,e){for(this._$notifyConnectionChanged?.(!1,!0,e);t&&t!==this._$endNode;){const e=k(t).nextSibling;k(t).remove(),t=e}}setConnected(t){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=t,this._$notifyConnectionChanged?.(t)}}class ct{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(t,e,s,i,r){this.type=1,this._$committedValue=et,this._$disconnectableChildren=void 0,this.element=t,this.name=e,this._$parent=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$committedValue=new Array(s.length-1).fill(new String),this.strings=s):this._$committedValue=et,this._sanitizer=void 0}_$setValue(t,e=this,s,i){const r=this.strings;let o=!1;if(void 0===r)t=at(this,t,e,0),o=!I(t)||t!==this._$committedValue&&t!==tt,o&&(this._$committedValue=t);else{const i=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=at(this,i[s+n],e,n),a===tt&&(a=this._$committedValue[n]),o||=!I(a)||a!==this._$committedValue[n],a===et?t=et:t!==et&&(t+=(a??"")+r[n+1]),this._$committedValue[n]=a}o&&!i&&this._commitValue(t)}_commitValue(t){t===et?k(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=rt(this.element,this.name,"attribute")),t=this._sanitizer(t??""),C&&C({kind:"commit attribute",element:this.element,name:this.name,value:t,options:this.options}),k(this.element).setAttribute(this.name,t??""))}}class ht extends ct{constructor(){super(...arguments),this.type=3}_commitValue(t){void 0===this._sanitizer&&(this._sanitizer=rt(this.element,this.name,"property")),t=this._sanitizer(t),C&&C({kind:"commit property",element:this.element,name:this.name,value:t,options:this.options}),this.element[this.name]=t===et?void 0:t}}class pt extends ct{constructor(){super(...arguments),this.type=4}_commitValue(t){C&&C({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!t||t===et),options:this.options}),k(this.element).toggleAttribute(this.name,!!t&&t!==et)}}class ut extends ct{constructor(t,e,s,i,r){if(super(t,e,s,i,r),this.type=5,void 0!==this.strings)throw new Error(`A \`<${t.localName}>\` has a \`@${e}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(t,e=this){if((t=at(this,t,e,0)??et)===tt)return;const s=this._$committedValue,i=t===et&&s!==et||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==et&&(s===et||i);C&&C({kind:"commit event listener",element:this.element,name:this.name,value:t,options:this.options,removeListener:i,addListener:r,oldListener:s}),i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$committedValue=t}handleEvent(t){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,t):this._$committedValue.handleEvent(t)}}class mt{constructor(t,e,s){this.element=t,this.type=6,this._$disconnectableChildren=void 0,this._$parent=e,this.options=s}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){C&&C({kind:"commit to element binding",element:this.element,value:t,options:this.options}),at(this,t)}}const gt=P.litHtmlPolyfillSupportDevMode;gt?.(nt,dt),(P.litHtmlVersions??=[]).push("3.2.0"),P.litHtmlVersions.length>1&&x("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.");const ft=(t,e,s)=>{if(null==e)throw new TypeError(`The container to render into may not be ${e}`);const i=E++,r=s?.renderBefore??e;let o=r._$litPart$;if(C&&C({kind:"begin render",id:i,value:t,container:e,options:s,part:o}),void 0===o){const t=s?.renderBefore??null;r._$litPart$=o=new dt(e.insertBefore(j(),t),t,void 0,s??{})}return o._$setValue(t),C&&C({kind:"end render",id:i,value:t,container:e,options:s,part:o}),o};ft.setSanitizer=z,ft.createSanitizer=R,ft._testOnlyClearSanitizerFactoryDoNotCallOrElse=M;
|
|
18
|
+
const P=globalThis,x=t=>{P.emitLitDebugLogEvents&&P.dispatchEvent(new CustomEvent("lit-debug",{detail:t}))};let C,E=0;P.litIssuedWarnings??=new Set,C=(t,e)=>{e+=t?` See https://lit.dev/msg/${t} for more information.`:"",P.litIssuedWarnings.has(e)||(console.warn(e),P.litIssuedWarnings.add(e))},C("dev-mode","Lit is in dev mode. Not recommended for production!");const k=P.ShadyDOM?.inUse&&!0===P.ShadyDOM?.noPatch?P.ShadyDOM.wrap:t=>t,T=P.trustedTypes,U=T?T.createPolicy("lit-html",{createHTML:t=>t}):void 0,O=t=>t,N=(t,e,s)=>O,z=t=>{if(rt!==N)throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");rt=t},M=()=>{rt=N},R=(t,e,s)=>rt(t,e,s),A="$lit$",V=`lit$${Math.random().toFixed(9).slice(2)}$`,L="?"+V,W=`<${L}>`,D=document,j=()=>D.createComment(""),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,q=Array.isArray,H="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,J=/>/g,Z=new RegExp(`>|${H}(?:([^\\s"'>=/]+)(${H}*=${H}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,X=/"/g,G=/^(?:script|style|textarea|title)$/i,K=(Q=1,(t,...e)=>(t.some((t=>void 0===t))&&console.warn("Some template strings are undefined.\nThis is probably caused by illegal octal escape sequences."),e.some((t=>t?._$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:t,values:e}));var Q;const tt=Symbol.for("lit-noChange"),et=Symbol.for("lit-nothing"),st=new WeakMap,it=D.createTreeWalker(D,129);let rt=N;function ot(t,e){if(!q(t)||!t.hasOwnProperty("raw")){let t="invalid template strings array";throw t="\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(t)}return void 0!==U?U.createHTML(e):e}class nt{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[l,d]=((t,e)=>{const s=t.length-1,i=[];let r,o=2===e?"<svg>":3===e?"<math>":"",n=F;for(let e=0;e<s;e++){const s=t[e];let a,l,d=-1,c=0;for(;c<s.length&&(n.lastIndex=c,l=n.exec(s),null!==l);)if(c=n.lastIndex,n===F){if("!--"===l[1])n=B;else if(void 0!==l[1])n=J;else if(void 0!==l[2])G.test(l[2])&&(r=new RegExp(`</${l[2]}`,"g")),n=Z;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 n===Z?">"===l[0]?(n=r??F,d=-1):void 0===l[1]?d=-2:(d=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?Z:'"'===l[3]?X:Y):n===X||n===Y?n=Z:n===B||n===J?n=F:(n=Z,r=void 0);console.assert(-1===d||n===Z||n===Y||n===X,"unexpected parse state B");const h=n===Z&&t[e+1].startsWith("/>")?" ":"";o+=n===F?s+W:d>=0?(i.push(a),s.slice(0,d)+A+s.slice(d)+V+h):s+V+(-2===d?e:h)}return[ot(t,o+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]})(t,e);if(this.el=nt.createElement(l,s),it.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=it.nextNode())&&a.length<n;){if(1===i.nodeType){{const t=i.localName;if(/^(?:textarea|template)$/i.test(t)&&i.innerHTML.includes(V)){const e=`Expressions are not supported inside \`${t}\` elements. See https://lit.dev/msg/expression-in-${t} for more information.`;if("template"===t)throw new Error(e);C("",e)}}if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(A)){const e=d[o++],s=i.getAttribute(t).split(V),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:r,name:n[2],strings:s,ctor:"."===n[1]?ht:"?"===n[1]?pt:"@"===n[1]?ut:ct}),i.removeAttribute(t)}else t.startsWith(V)&&(a.push({type:6,index:r}),i.removeAttribute(t));if(G.test(i.tagName)){const t=i.textContent.split(V),e=t.length-1;if(e>0){i.textContent=T?T.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],j()),it.nextNode(),a.push({type:2,index:++r});i.append(t[e],j())}}}else if(8===i.nodeType){if(i.data===L)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(V,t+1));)a.push({type:7,index:r}),t+=V.length-1}}r++}if(d.length!==o)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`'+t.join("${...}")+"`");x&&x({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:t})}static createElement(t,e){const s=D.createElement("template");return s.innerHTML=t,s}}function at(t,e,s=t,i){if(e===tt)return e;let r=void 0!==i?s.__directives?.[i]:s.__directive;const o=I(e)?void 0:e._$litDirective$;return r?.constructor!==o&&(r?._$notifyDirectiveConnectionChanged?.(!1),void 0===o?r=void 0:(r=new o(t),r._$initialize(t,s,i)),void 0!==i?(s.__directives??=[])[i]=r:s.__directive=r),void 0!==r&&(e=at(t,r._$resolve(t,e.values),r,i)),e}class lt{constructor(t,e){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=t,this._$parent=e}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(t){const{el:{content:e},parts:s}=this._$template,i=(t?.creationScope??D).importNode(e,!0);it.currentNode=i;let r=it.nextNode(),o=0,n=0,a=s[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new dt(r,r.nextSibling,this,t):1===a.type?e=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(e=new mt(r,this,t)),this._$parts.push(e),a=s[++n]}o!==a?.index&&(r=it.nextNode(),o++)}return it.currentNode=D,i}_update(t){let e=0;for(const s of this._$parts)void 0!==s&&(x&&x({kind:"set part",part:s,value:t[e],valueIndex:e,values:t,templateInstance:this}),void 0!==s.strings?(s._$setValue(t,s,e),e+=s.strings.length-2):s._$setValue(t[e])),e++}}class dt{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(t,e,s,i){this.type=2,this._$committedValue=et,this._$disconnectableChildren=void 0,this._$startNode=t,this._$endNode=e,this._$parent=s,this.options=i,this.__isConnected=i?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let t=k(this._$startNode).parentNode;const e=this._$parent;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(t,e=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(t=at(this,t,e),I(t))t===et||null==t||""===t?(this._$committedValue!==et&&(x&&x({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear()),this._$committedValue=et):t!==this._$committedValue&&t!==tt&&this._commitText(t);else if(void 0!==t._$litType$)this._commitTemplateResult(t);else if(void 0!==t.nodeType){if(this.options?.host===t)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",t,"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(t)}else(t=>q(t)||"function"==typeof t?.[Symbol.iterator])(t)?this._commitIterable(t):this._commitText(t)}_insert(t){return k(k(this._$startNode).parentNode).insertBefore(t,this._$endNode)}_commitNode(t){if(this._$committedValue!==t){if(this._$clear(),rt!==N){const t=this._$startNode.parentNode?.nodeName;if("STYLE"===t||"SCRIPT"===t){let e="Forbidden";throw e="STYLE"===t?"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(e)}}x&&x({kind:"commit node",start:this._$startNode,parent:this._$parent,value:t,options:this.options}),this._$committedValue=this._insert(t)}}_commitText(t){if(this._$committedValue!==et&&I(this._$committedValue)){const e=k(this._$startNode).nextSibling;void 0===this._textSanitizer&&(this._textSanitizer=R(e,"data","property")),t=this._textSanitizer(t),x&&x({kind:"commit text",node:e,value:t,options:this.options}),e.data=t}else{const e=D.createTextNode("");this._commitNode(e),void 0===this._textSanitizer&&(this._textSanitizer=R(e,"data","property")),t=this._textSanitizer(t),x&&x({kind:"commit text",node:e,value:t,options:this.options}),e.data=t}this._$committedValue=t}_commitTemplateResult(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$getTemplate(t):(void 0===s.el&&(s.el=nt.createElement(ot(s.h,s.h[0]),this.options)),s);if(this._$committedValue?._$template===i)x&&x({kind:"template updating",template:i,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:e}),this._$committedValue._update(e);else{const t=new lt(i,this),s=t._clone(this.options);x&&x({kind:"template instantiated",template:i,instance:t,parts:t._$parts,options:this.options,fragment:s,values:e}),t._update(e),x&&x({kind:"template instantiated and updated",template:i,instance:t,parts:t._$parts,options:this.options,fragment:s,values:e}),this._commitNode(s),this._$committedValue=t}}_$getTemplate(t){let e=st.get(t.strings);return void 0===e&&st.set(t.strings,e=new nt(t)),e}_commitIterable(t){q(this._$committedValue)||(this._$committedValue=[],this._$clear());const e=this._$committedValue;let s,i=0;for(const r of t)i===e.length?e.push(s=new dt(this._insert(j()),this._insert(j()),this,this.options)):s=e[i],s._$setValue(r),i++;i<e.length&&(this._$clear(s&&k(s._$endNode).nextSibling,i),e.length=i)}_$clear(t=k(this._$startNode).nextSibling,e){for(this._$notifyConnectionChanged?.(!1,!0,e);t&&t!==this._$endNode;){const e=k(t).nextSibling;k(t).remove(),t=e}}setConnected(t){if(void 0!==this._$parent)throw new Error("part.setConnected() may only be called on a RootPart returned from render().");this.__isConnected=t,this._$notifyConnectionChanged?.(t)}}class ct{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(t,e,s,i,r){this.type=1,this._$committedValue=et,this._$disconnectableChildren=void 0,this.element=t,this.name=e,this._$parent=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$committedValue=new Array(s.length-1).fill(new String),this.strings=s):this._$committedValue=et,this._sanitizer=void 0}_$setValue(t,e=this,s,i){const r=this.strings;let o=!1;if(void 0===r)t=at(this,t,e,0),o=!I(t)||t!==this._$committedValue&&t!==tt,o&&(this._$committedValue=t);else{const i=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=at(this,i[s+n],e,n),a===tt&&(a=this._$committedValue[n]),o||=!I(a)||a!==this._$committedValue[n],a===et?t=et:t!==et&&(t+=(a??"")+r[n+1]),this._$committedValue[n]=a}o&&!i&&this._commitValue(t)}_commitValue(t){t===et?k(this.element).removeAttribute(this.name):(void 0===this._sanitizer&&(this._sanitizer=rt(this.element,this.name,"attribute")),t=this._sanitizer(t??""),x&&x({kind:"commit attribute",element:this.element,name:this.name,value:t,options:this.options}),k(this.element).setAttribute(this.name,t??""))}}class ht extends ct{constructor(){super(...arguments),this.type=3}_commitValue(t){void 0===this._sanitizer&&(this._sanitizer=rt(this.element,this.name,"property")),t=this._sanitizer(t),x&&x({kind:"commit property",element:this.element,name:this.name,value:t,options:this.options}),this.element[this.name]=t===et?void 0:t}}class pt extends ct{constructor(){super(...arguments),this.type=4}_commitValue(t){x&&x({kind:"commit boolean attribute",element:this.element,name:this.name,value:!(!t||t===et),options:this.options}),k(this.element).toggleAttribute(this.name,!!t&&t!==et)}}class ut extends ct{constructor(t,e,s,i,r){if(super(t,e,s,i,r),this.type=5,void 0!==this.strings)throw new Error(`A \`<${t.localName}>\` has a \`@${e}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(t,e=this){if((t=at(this,t,e,0)??et)===tt)return;const s=this._$committedValue,i=t===et&&s!==et||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==et&&(s===et||i);x&&x({kind:"commit event listener",element:this.element,name:this.name,value:t,options:this.options,removeListener:i,addListener:r,oldListener:s}),i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$committedValue=t}handleEvent(t){"function"==typeof this._$committedValue?this._$committedValue.call(this.options?.host??this.element,t):this._$committedValue.handleEvent(t)}}class mt{constructor(t,e,s){this.element=t,this.type=6,this._$disconnectableChildren=void 0,this._$parent=e,this.options=s}get _$isConnected(){return this._$parent._$isConnected}_$setValue(t){x&&x({kind:"commit to element binding",element:this.element,value:t,options:this.options}),at(this,t)}}const ft=P.litHtmlPolyfillSupportDevMode;ft?.(nt,dt),(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 gt=(t,e,s)=>{if(null==e)throw new TypeError(`The container to render into may not be ${e}`);const i=E++,r=s?.renderBefore??e;let o=r._$litPart$;if(x&&x({kind:"begin render",id:i,value:t,container:e,options:s,part:o}),void 0===o){const t=s?.renderBefore??null;r._$litPart$=o=new dt(e.insertBefore(j(),t),t,void 0,s??{})}return o._$setValue(t),x&&x({kind:"end render",id:i,value:t,container:e,options:s,part:o}),o};gt.setSanitizer=z,gt.createSanitizer=R,gt._testOnlyClearSanitizerFactoryDoNotCallOrElse=M;
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2019 Google LLC
|
|
@@ -26,12 +26,12 @@ const vt=globalThis,yt=vt.ShadowRoot&&(void 0===vt.ShadyCSS||vt.ShadyCSS.nativeS
|
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2017 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/,{is:Ct,defineProperty:xt,getOwnPropertyDescriptor:Et,getOwnPropertyNames:kt,getOwnPropertySymbols:Tt,getPrototypeOf:Ut}=Object,Ot=globalThis;let Nt;const zt=Ot.trustedTypes,Mt=zt?zt.emptyScript:"",Rt=Ot.reactiveElementPolyfillSupportDevMode;{const t=Ot.litIssuedWarnings??=new Set;Nt=(e,s)=>{s+=` See https://lit.dev/msg/${e} for more information.`,t.has(s)||(console.warn(s),t.add(s))},Nt("dev-mode","Lit is in dev mode. Not recommended for production!"),Ot.ShadyDOM?.inUse&&void 0===Rt&&Nt("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")}const At=(t,e)=>t,Lt={toAttribute(t,e){switch(e){case Boolean:t=t?Mt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},Vt=(t,e)=>!Ct(t,e),Wt={attribute:!0,type:String,converter:Lt,reflect:!1,hasChanged:Vt};Symbol.metadata??=Symbol("metadata"),Ot.litPropertyMetadata??=new WeakMap;class Dt extends HTMLElement{static addInitializer(t){this.__prepare(),(this._initializers??=[]).push(t)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(t,e=Wt){if(e.state&&(e.attribute=!1),this.__prepare(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol.for(`${String(t)} (@property() cache)`),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&xt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:r}=Et(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};if(null==i){if("value"in(Et(this.prototype,t)??{}))throw new Error(`Field ${JSON.stringify(String(t))} 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.`);Nt("reactive-property-without-getter",`Field ${JSON.stringify(String(t))} 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 i?.call(this)},set(e){const o=i?.call(this);r.call(this,e),this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Wt}static __prepare(){if(this.hasOwnProperty(At("elementProperties")))return;const t=Ut(this);t.finalize(),void 0!==t._initializers&&(this._initializers=[...t._initializers]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(At("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(At("properties"))){const t=this.properties,e=[...kt(t),...Tt(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this.__attributeToPropertyMap=new Map;for(const[t,e]of this.elementProperties){const s=this.__attributeNameForProperty(t,e);void 0!==s&&this.__attributeToPropertyMap.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&Nt("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&Nt("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(Pt(t))}else void 0!==t&&e.push(Pt(t));return e}static __attributeNameForProperty(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.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((t=>this.enableUpdating=t)),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach((t=>t(this)))}addController(t){(this.__controllers??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this.__controllers?.delete(t)}__saveInstanceProperties(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this.__instanceProperties=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(yt)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const s of e){const e=document.createElement("style"),i=vt.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=s.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this.__controllers?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$attributeToProperty(t,s)}__propertyToAttribute(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor.__attributeNameForProperty(t,s);if(void 0!==i&&!0===s.reflect){const r=(void 0!==s.converter?.toAttribute?s.converter:Lt).toAttribute(e,s.type);this.constructor.enabledWarnings.includes("migration")&&void 0===r&&Nt("undefined-attribute-value",`The attribute value for the ${t} 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=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this.__reflectingProperty=null}}_$attributeToProperty(t,e){const s=this.constructor,i=s.__attributeToPropertyMap.get(t);if(void 0!==i&&this.__reflectingProperty!==i){const t=s.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:Lt;this.__reflectingProperty=i,this[i]=r.fromAttribute(e,t.type),this.__reflectingProperty=null}}requestUpdate(t,e,s){if(void 0!==t){t instanceof Event&&Nt("","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()"),s??=this.constructor.getPropertyOptions(t);if(!(s.hasChanged??Vt)(this[t],e))return;this._$changeProperty(t,e,s)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(t,e,s){this._$changedProperties.has(t)||this._$changedProperties.set(t,e),!0===s.reflect&&this.__reflectingProperty!==t&&(this.__reflectingProperties??=new Set).add(t)}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){const t=this.performUpdate();return this.constructor.enabledWarnings.includes("async-perform-update")&&"function"==typeof t?.then&&Nt("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.`),t}performUpdate(){if(!this.isUpdatePending)return;var t;if(t={kind:"update"},Ot.emitLitDebugLogEvents&&Ot.dispatchEvent(new CustomEvent("lit-debug",{detail:t})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const t=[...this.constructor.elementProperties.keys()].filter((t=>this.hasOwnProperty(t)&&t in Ut(this)));if(t.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${t.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[t,e]of this.__instanceProperties)this[t]=e;this.__instanceProperties=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$changedProperties.has(e)||void 0===this[e]||this._$changeProperty(e,this[e],s)}let e=!1;const s=this._$changedProperties;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this.__controllers?.forEach((t=>t.hostUpdate?.())),this.update(s)):this.__markUpdated()}catch(t){throw e=!1,this.__markUpdated(),t}e&&this._$didUpdate(s)}willUpdate(t){}_$didUpdate(t){this.__controllers?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t),this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update")&&Nt("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(t){return!0}update(t){this.__reflectingProperties&&=this.__reflectingProperties.forEach((t=>this.__propertyToAttribute(t,this[t]))),this.__markUpdated()}updated(t){}firstUpdated(t){}}Dt.elementStyles=[],Dt.shadowRootOptions={mode:"open"},Dt[At("elementProperties")]=new Map,Dt[At("finalized")]=new Map,Rt?.({ReactiveElement:Dt});{Dt.enabledWarnings=["change-in-update","async-perform-update"];const t=function(t){t.hasOwnProperty(At("enabledWarnings"))||(t.enabledWarnings=t.enabledWarnings.slice())};Dt.enableWarning=function(e){t(this),this.enabledWarnings.includes(e)||this.enabledWarnings.push(e)},Dt.disableWarning=function(e){t(this);const s=this.enabledWarnings.indexOf(e);s>=0&&this.enabledWarnings.splice(s,1)}}(Ot.reactiveElementVersions??=[]).push("2.0.4"),Ot.reactiveElementVersions.length>1&&Nt("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")
|
|
29
|
+
*/,{is:xt,defineProperty:Ct,getOwnPropertyDescriptor:Et,getOwnPropertyNames:kt,getOwnPropertySymbols:Tt,getPrototypeOf:Ut}=Object,Ot=globalThis;let Nt;const zt=Ot.trustedTypes,Mt=zt?zt.emptyScript:"",Rt=Ot.reactiveElementPolyfillSupportDevMode;{const t=Ot.litIssuedWarnings??=new Set;Nt=(e,s)=>{s+=` See https://lit.dev/msg/${e} for more information.`,t.has(s)||(console.warn(s),t.add(s))},Nt("dev-mode","Lit is in dev mode. Not recommended for production!"),Ot.ShadyDOM?.inUse&&void 0===Rt&&Nt("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")}const At=(t,e)=>t,Vt={toAttribute(t,e){switch(e){case Boolean:t=t?Mt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},Lt=(t,e)=>!xt(t,e),Wt={attribute:!0,type:String,converter:Vt,reflect:!1,hasChanged:Lt};Symbol.metadata??=Symbol("metadata"),Ot.litPropertyMetadata??=new WeakMap;class Dt extends HTMLElement{static addInitializer(t){this.__prepare(),(this._initializers??=[]).push(t)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(t,e=Wt){if(e.state&&(e.attribute=!1),this.__prepare(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol.for(`${String(t)} (@property() cache)`),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&Ct(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:r}=Et(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};if(null==i){if("value"in(Et(this.prototype,t)??{}))throw new Error(`Field ${JSON.stringify(String(t))} 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.`);Nt("reactive-property-without-getter",`Field ${JSON.stringify(String(t))} 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 i?.call(this)},set(e){const o=i?.call(this);r.call(this,e),this.requestUpdate(t,o,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Wt}static __prepare(){if(this.hasOwnProperty(At("elementProperties")))return;const t=Ut(this);t.finalize(),void 0!==t._initializers&&(this._initializers=[...t._initializers]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(At("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(At("properties"))){const t=this.properties,e=[...kt(t),...Tt(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this.__attributeToPropertyMap=new Map;for(const[t,e]of this.elementProperties){const s=this.__attributeNameForProperty(t,e);void 0!==s&&this.__attributeToPropertyMap.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&Nt("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&Nt("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(Pt(t))}else void 0!==t&&e.push(Pt(t));return e}static __attributeNameForProperty(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.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((t=>this.enableUpdating=t)),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach((t=>t(this)))}addController(t){(this.__controllers??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this.__controllers?.delete(t)}__saveInstanceProperties(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this.__instanceProperties=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(yt)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const s of e){const e=document.createElement("style"),i=vt.litNonce;void 0!==i&&e.setAttribute("nonce",i),e.textContent=s.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this.__controllers?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$attributeToProperty(t,s)}__propertyToAttribute(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor.__attributeNameForProperty(t,s);if(void 0!==i&&!0===s.reflect){const r=(void 0!==s.converter?.toAttribute?s.converter:Vt).toAttribute(e,s.type);this.constructor.enabledWarnings.includes("migration")&&void 0===r&&Nt("undefined-attribute-value",`The attribute value for the ${t} 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=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this.__reflectingProperty=null}}_$attributeToProperty(t,e){const s=this.constructor,i=s.__attributeToPropertyMap.get(t);if(void 0!==i&&this.__reflectingProperty!==i){const t=s.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:Vt;this.__reflectingProperty=i,this[i]=r.fromAttribute(e,t.type),this.__reflectingProperty=null}}requestUpdate(t,e,s){if(void 0!==t){t instanceof Event&&Nt("","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()"),s??=this.constructor.getPropertyOptions(t);if(!(s.hasChanged??Lt)(this[t],e))return;this._$changeProperty(t,e,s)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(t,e,s){this._$changedProperties.has(t)||this._$changedProperties.set(t,e),!0===s.reflect&&this.__reflectingProperty!==t&&(this.__reflectingProperties??=new Set).add(t)}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){const t=this.performUpdate();return this.constructor.enabledWarnings.includes("async-perform-update")&&"function"==typeof t?.then&&Nt("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.`),t}performUpdate(){if(!this.isUpdatePending)return;var t;if(t={kind:"update"},Ot.emitLitDebugLogEvents&&Ot.dispatchEvent(new CustomEvent("lit-debug",{detail:t})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const t=[...this.constructor.elementProperties.keys()].filter((t=>this.hasOwnProperty(t)&&t in Ut(this)));if(t.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${t.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[t,e]of this.__instanceProperties)this[t]=e;this.__instanceProperties=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t)!0!==s.wrapped||this._$changedProperties.has(e)||void 0===this[e]||this._$changeProperty(e,this[e],s)}let e=!1;const s=this._$changedProperties;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this.__controllers?.forEach((t=>t.hostUpdate?.())),this.update(s)):this.__markUpdated()}catch(t){throw e=!1,this.__markUpdated(),t}e&&this._$didUpdate(s)}willUpdate(t){}_$didUpdate(t){this.__controllers?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t),this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update")&&Nt("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(t){return!0}update(t){this.__reflectingProperties&&=this.__reflectingProperties.forEach((t=>this.__propertyToAttribute(t,this[t]))),this.__markUpdated()}updated(t){}firstUpdated(t){}}Dt.elementStyles=[],Dt.shadowRootOptions={mode:"open"},Dt[At("elementProperties")]=new Map,Dt[At("finalized")]=new Map,Rt?.({ReactiveElement:Dt});{Dt.enabledWarnings=["change-in-update","async-perform-update"];const t=function(t){t.hasOwnProperty(At("enabledWarnings"))||(t.enabledWarnings=t.enabledWarnings.slice())};Dt.enableWarning=function(e){t(this),this.enabledWarnings.includes(e)||this.enabledWarnings.push(e)},Dt.disableWarning=function(e){t(this);const s=this.enabledWarnings.indexOf(e);s>=0&&this.enabledWarnings.splice(s,1)}}(Ot.reactiveElementVersions??=[]).push("2.0.4"),Ot.reactiveElementVersions.length>1&&Nt("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")
|
|
30
30
|
/**
|
|
31
31
|
* @license
|
|
32
32
|
* Copyright 2017 Google LLC
|
|
33
33
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
|
-
*/;let jt;{const t=globalThis.litIssuedWarnings??=new Set;jt=(e,s)=>{s+=` See https://lit.dev/msg/${e} for more information.`,t.has(s)||(console.warn(s),t.add(s))}}class It extends Dt{constructor(){super(...arguments),this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.__childPart=
|
|
34
|
+
*/;let jt;{const t=globalThis.litIssuedWarnings??=new Set;jt=(e,s)=>{s+=` See https://lit.dev/msg/${e} for more information.`,t.has(s)||(console.warn(s),t.add(s))}}class It extends Dt{constructor(){super(...arguments),this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.__childPart=gt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.__childPart?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.__childPart?.setConnected(!1)}render(){return tt}}var qt;It._$litElement$=!0,It[(qt="finalized",qt)]=!0,globalThis.litElementHydrateSupport?.({LitElement:It});const Ht=globalThis.litElementPolyfillSupportDevMode;
|
|
35
35
|
/**
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2017 Google LLC
|
|
@@ -47,11 +47,11 @@ let Ft;Ht?.({LitElement:It}),(globalThis.litElementVersions??=[]).push("4.1.0"),
|
|
|
47
47
|
* @license
|
|
48
48
|
* Copyright 2017 Google LLC
|
|
49
49
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
50
|
-
*/let Xt;{const t=globalThis.litIssuedWarnings??=new Set;Xt=(e,s)=>{s+=e?` See https://lit.dev/msg/${e} for more information.`:"",t.has(s)||(console.warn(s),t.add(s))}}var Gt=$t`: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 Kt extends It{emit(t,e){const s=new CustomEvent(t,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(s),s}static define(t,e=this,s={}){if(customElements.get(t));else try{customElements.define(t,e,s)}catch(i){customElements.define(t,class extends e{},s)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach((([t,e])=>{this.constructor.define(t,e)}))}firstUpdated(t){var e;super.firstUpdated(t),this.ssr&&(null===(e=this.shadowRoot)||void 0===e||e.querySelectorAll("slot").forEach((t=>{t.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))})))}}Kt.styles=[Gt],Kt.dependencies={},t([Zt({type:Boolean,reflect:!0})],Kt.prototype,"ssr",void 0);var Qt=$t`:host{--sgds-close-btn-border-radius:var(--sgds-border-radius-sm);display:inline-flex}:host([size=sm]) .btn-close{height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}:host([
|
|
51
|
-
<button class="btn-close" aria-label
|
|
50
|
+
*/let Xt;{const t=globalThis.litIssuedWarnings??=new Set;Xt=(e,s)=>{s+=e?` See https://lit.dev/msg/${e} for more information.`:"",t.has(s)||(console.warn(s),t.add(s))}}var Gt=$t`: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 Kt extends It{emit(t,e){const s=new CustomEvent(t,Object.assign({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(s),s}static define(t,e=this,s={}){if(customElements.get(t));else try{customElements.define(t,e,s)}catch(i){customElements.define(t,class extends e{},s)}}constructor(){super(),this.ssr=Boolean(this.shadowRoot),Object.entries(this.constructor.dependencies).forEach((([t,e])=>{this.constructor.define(t,e)}))}firstUpdated(t){var e;super.firstUpdated(t),this.ssr&&(null===(e=this.shadowRoot)||void 0===e||e.querySelectorAll("slot").forEach((t=>{t.dispatchEvent(new Event("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))})))}}Kt.styles=[Gt],Kt.dependencies={},t([Zt({type:Boolean,reflect:!0})],Kt.prototype,"ssr",void 0);var Qt=$t`:host{--sgds-close-btn-border-radius:var(--sgds-border-radius-sm);display:inline-flex}:host([size=sm]) .btn-close{height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}:host([tone=fixed-light]) .btn-close{color:var(--sgds-color-fixed-light)}:host([tone=fixed-dark]) .btn-close{color:var(--sgds-color-fixed-dark)}.btn-close{align-items:center;background-color:var(--sgds-bg-transparent);border:0;border:var(--sgds-border-width-1) solid var(--sgds-border-color-transparent);border-radius:var(--sgds-close-btn-border-radius);cursor:pointer;display:flex;height:var(--sgds-dimension-32);justify-content:center;padding:0;position:relative;width:var(--sgds-dimension-32)}.btn-close:focus,.btn-close:focus-visible,.btn-close:hover{background-color:var(--sgds-bg-translucent)}:host([tone=fixed-light]) .btn-close:focus,:host([tone=fixed-light]) .btn-close:focus-visible,:host([tone=fixed-light]) .btn-close:hover{background-color:var(--sgds-bg-translucent-fixed-light)}:host([tone=fixed-dark]) .btn-close:focus,:host([tone=fixed-dark]) .btn-close:focus-visible,:host([tone=fixed-dark]) .btn-close:hover{background-color:var(--sgds-bg-translucent-fixed-dark)}.btn-close:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.btn-close-sm{height:var(--sgds-dimension-24);width:var(--sgds-dimension-24)}.btn-close.btn-close-sm{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}`;function te(t,e){customElements.get(t)||customElements.define(t,e)}function ee(t){return!!function(t){return!!customElements.get(t)}(t)||(console.error(`Custom element of name : ${t} is not registered. Remember to import the component file for custom element registration`),!1)}class se extends Kt{constructor(){super(...arguments),this.size="md",this.tone="default",this._clickHandler=()=>{}}_handleClick(){this.removeEventListener("click",this._clickHandler),this.addEventListener("click",this._clickHandler)}firstUpdated(t){super.firstUpdated(t),ee("sgds-icon")}render(){return K`
|
|
51
|
+
<button class="btn-close" aria-label="Close button" @click=${this._handleClick}>
|
|
52
52
|
<sgds-icon name="cross" size=${this.size}></sgds-icon>
|
|
53
53
|
</button>
|
|
54
|
-
|
|
54
|
+
`}}function ie(t,e,s){return new Promise((i=>{if((null==s?void 0:s.duration)===1/0)throw new Error("Promise-based animations must be finite.");const r=t.animate(e,Object.assign(Object.assign({},s),{duration:re()?0:null==s?void 0:s.duration}));r.addEventListener("cancel",i,{once:!0}),r.addEventListener("finish",i,{once:!0})}))}function re(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}se.styles=[...Kt.styles,Qt],t([Zt({type:String,reflect:!0})],se.prototype,"size",void 0),t([Zt({type:String,reflect:!0})],se.prototype,"tone",void 0);const oe=new Map,ne=new WeakMap;function ae(t,e){const s=ne.get(t);if(null==s?void 0:s[e])return s[e];const i=oe.get(e);return i||{keyframes:[],options:{duration:0}}}function le(t,e){oe.set(t,function(t){return null!=t?t:{keyframes:[],options:{duration:0}}}(e))}function de(t,e){return new Promise((s=>{t.addEventListener(e,(function i(r){r.target===t&&(t.removeEventListener(e,i),s())}))}))}var ce,he,pe,ue=$t`:host([variant=info]) slot[name=icon]::slotted(*){color:var(--sgds-primary-color-default)}:host([variant=success]) slot[name=icon]::slotted(*){color:var(--sgds-success-color-default)}:host([variant=danger]) slot[name=icon]::slotted(*){color:var(--sgds-danger-color-default)}:host([variant=warning]) slot[name=icon]::slotted(*){color:var(--sgds-warning-color-fixed-light)}.toast{align-items:flex-start;background-clip:padding-box;background-color:var(--sgds-surface-default);border-radius:var(--sgds-border-radius-md);box-shadow:0 0 2px 0 rgba(0,0,0,.12),0 8px 16px 0 rgba(0,0,0,.14);display:flex;flex-direction:row;gap:var(--sgds-gap-xs);max-width:var(--sgds-dimension-480);min-width:var(--sgds-dimension-320);padding:var(--sgds-padding-md);pointer-events:auto;width:320px}.toast-content{word-wrap:break-word;gap:var(--sgds-gap-sm)}.toast-body,.toast-content{display:flex;flex-direction:column}.toast-body{gap:var(--sgds-gap-2-xs)}.toast-body strong{line-height:var(--sgds-line-height-20)}.toast-body span{color:var(--sgds-color-subtle)}.toast-action{word-wrap:break-word;color:var(--sgds-link-color-default)}.toast-header strong{margin-right:auto;word-break:break-all}.close-btn{margin-left:auto}.d-none{display:none}`;class me extends Kt{constructor(){super(...arguments),this.show=!1,this.title="Title",this.noAnimation=!1,this.autohide=!1,this.delay=5e3,this.variant="info",this.dismissible=!1}async showToast(){if(!this.show)return this.show=!0,de(this,"sgds-after-show")}async hideToast(){if(this.show)return this.show=!1,de(this,"sgds-after-hide")}handleCloseClick(){this.show=!1,this.emit("sgds-close")}async handleShowChange(){if(this.show){this.emit("sgds-show"),this.toast.classList.remove("d-none");const t=ae(this,"toast.show");this.noAnimation||await ie(this.toast,t.keyframes,t.options),this.emit("sgds-after-show")}else{this.emit("sgds-hide");const t=ae(this,"toast.hide");this.noAnimation||await ie(this.toast,t.keyframes,t.options),this.toast.classList.add("d-none"),this.emit("sgds-after-hide")}}firstUpdated(t){var e;if(super.firstUpdated(t),this.show||this.toast.classList.add("d-none"),0===this._actionNodes.length)return null===(e=this.shadowRoot.querySelector("slot[name='action']"))||void 0===e?void 0:e.classList.add("d-none")}render(){return this.autohide&&this.show&&setTimeout((()=>{this.show=!1}),this.delay),K`
|
|
55
55
|
<div
|
|
56
56
|
class="toast"
|
|
57
57
|
role="alert"
|
|
@@ -69,7 +69,7 @@ let Ft;Ht?.({LitElement:It}),(globalThis.litElementVersions??=[]).push("4.1.0"),
|
|
|
69
69
|
</div>
|
|
70
70
|
${this.dismissible?K`<sgds-close-button
|
|
71
71
|
class="close-btn"
|
|
72
|
-
|
|
72
|
+
aria-label="close toast"
|
|
73
73
|
@click=${this.handleCloseClick}
|
|
74
74
|
></sgds-close-button>`:et}
|
|
75
75
|
</div>
|
|
@@ -79,21 +79,21 @@ let Ft;Ht?.({LitElement:It}),(globalThis.litElementVersions??=[]).push("4.1.0"),
|
|
|
79
79
|
* Copyright 2017 Google LLC
|
|
80
80
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
81
81
|
*/
|
|
82
|
-
const
|
|
82
|
+
const fe=1;class ge{constructor(t){}get _$isConnected(){return this._$parent._$isConnected}_$initialize(t,e,s){this.__part=t,this._$parent=e,this.__attributeIndex=s}_$resolve(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
83
83
|
/**
|
|
84
84
|
* @license
|
|
85
85
|
* Copyright 2018 Google LLC
|
|
86
86
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
87
|
-
*/const ve=(ye=class extends
|
|
87
|
+
*/const ve=(ye=class extends ge{constructor(t){if(super(t),t.type!==fe||"class"!==t.name||t.strings?.length>2)throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(void 0===this._previousClasses){this._previousClasses=new Set,void 0!==t.strings&&(this._staticClasses=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!this._staticClasses?.has(t)&&this._previousClasses.add(t);return this.render(e)}const s=t.element.classList;for(const t of this._previousClasses)t in e||(s.remove(t),this._previousClasses.delete(t));for(const t in e){const i=!!e[t];i===this._previousClasses.has(t)||this._staticClasses?.has(t)||(i?(s.add(t),this._previousClasses.add(t)):(s.remove(t),this._previousClasses.delete(t)))}return tt}},(...t)=>({_$litDirective$:ye,values:t}));
|
|
88
88
|
/**
|
|
89
89
|
* @license
|
|
90
90
|
* Copyright 2020 Google LLC
|
|
91
91
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
92
|
-
*/var ye;const _e=Symbol.for(""),be=t=>{if(t?.r===_e)return t?._$litStatic$},we=new Map,$e=(Se=K,(t,...e)=>{const s=e.length;let i,r;const o=[],n=[];let a,l=0,d=!1;for(;l<s;){for(a=t[l];l<s&&void 0!==(r=e[l],i=be(r));)a+=i+t[++l],d=!0;l!==s&&n.push(r),o.push(a),l++}if(l===s&&o.push(t[s]),d){const s=o.join("$$lit$$");void 0===(t=we.get(s))&&(o.raw=o,we.set(s,t=o)),e=n}return Se(t,...e)});var Se,Pe=$t`.toast-container{max-width:100%;pointer-events:none;position:fixed;width:max-content;z-index:1090}.top-start{left:0;top:0}.top-center{left:50%;top:0;transform:translateX(-50%)}.top-end{right:0;top:0}.middle-start{left:0;top:50%;transform:translateY(-50%)}.middle-center{left:50%;top:50%;transform:translate(-50%,-50%)}.middle-end{right:0;top:50%;transform:translateY(-50%)}.bottom-start{bottom:0;left:0}.bottom-center{bottom:0;left:50%;transform:translateX(-50%)}.bottom-end{bottom:0;right:0}slot{display:flex;flex-direction:column;gap:.5rem}`;class
|
|
92
|
+
*/var ye;const _e=Symbol.for(""),be=t=>{if(t?.r===_e)return t?._$litStatic$},we=new Map,$e=(Se=K,(t,...e)=>{const s=e.length;let i,r;const o=[],n=[];let a,l=0,d=!1;for(;l<s;){for(a=t[l];l<s&&void 0!==(r=e[l],i=be(r));)a+=i+t[++l],d=!0;l!==s&&n.push(r),o.push(a),l++}if(l===s&&o.push(t[s]),d){const s=o.join("$$lit$$");void 0===(t=we.get(s))&&(o.raw=o,we.set(s,t=o)),e=n}return Se(t,...e)});var Se,Pe=$t`.toast-container{max-width:100%;pointer-events:none;position:fixed;width:max-content;z-index:1090}.top-start{left:0;top:0}.top-center{left:50%;top:0;transform:translateX(-50%)}.top-end{right:0;top:0}.middle-start{left:0;top:50%;transform:translateY(-50%)}.middle-center{left:50%;top:50%;transform:translate(-50%,-50%)}.middle-end{right:0;top:50%;transform:translateY(-50%)}.bottom-start{bottom:0;left:0}.bottom-center{bottom:0;left:50%;transform:translateX(-50%)}.bottom-end{bottom:0;right:0}slot{display:flex;flex-direction:column;gap:.5rem}`;class xe extends Kt{render(){return $e`
|
|
93
93
|
<div
|
|
94
94
|
class=${ve({"sgds toast-container":!0,[this.position]:this.position})}
|
|
95
95
|
>
|
|
96
96
|
<slot></slot>
|
|
97
97
|
</div>
|
|
98
|
-
`}}
|
|
98
|
+
`}}xe.styles=[Pe],t([Zt({type:String,reflect:!0})],xe.prototype,"position",void 0),te("sgds-toast",me),te("sgds-toast-container",xe)}));
|
|
99
99
|
//# sourceMappingURL=index.umd.min.js.map
|