cas-ds-web-components 1.2.52 → 1.2.53
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/build/cas-accordion-element.js +36 -30
- package/build/cas-accordion.js +36 -30
- package/build/cas-alert.js +54 -48
- package/build/cas-booking-box.js +21 -15
- package/build/cas-button.js +79 -73
- package/build/cas-checkbox.js +21 -15
- package/build/cas-date-picker-range.js +49 -43
- package/build/cas-date-picker.js +40 -34
- package/build/cas-ds-web-components.js +2409 -2191
- package/build/cas-header.js +2099 -1890
- package/build/cas-icon.js +305 -299
- package/build/cas-input-file.js +20 -14
- package/build/cas-input.js +55 -20
- package/build/cas-modal.js +19 -13
- package/build/cas-new-footer.js +37 -31
- package/build/cas-radio-button.js +214 -99
- package/build/cas-radio.js +20 -14
- package/build/cas-select.js +922 -721
- package/build/cas-share.js +40 -34
- package/build/cas-snackbar.js +38 -32
- package/build/cas-spinner.js +18 -12
- package/build/cas-text.js +22 -16
- package/build/cas-textfield.js +20 -14
- package/build/cas-theme-provider.js +15 -9
- package/build/cas-toggle.js +18 -12
- package/build/cas-tooltip.js +21 -15
- package/package.json +1 -1
package/build/cas-alert.js
CHANGED
|
@@ -1,28 +1,34 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(b,f){typeof exports=="object"&&typeof module<"u"?f(exports):typeof define=="function"&&define.amd?define(["exports"],f):(b=typeof globalThis<"u"?globalThis:b||self,f(b["cas-alert"]={}))})(this,function(b){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const f=window,F=f.ShadowRoot&&(f.ShadyCSS===void 0||f.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ot=Symbol(),nt=new WeakMap;class jt{constructor(t,e,i){if(this._$cssResult$=!0,i!==ot)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(F&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=nt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&nt.set(e,t))}return t}toString(){return this.cssText}}const zt=o=>new jt(typeof o=="string"?o:o+"",void 0,ot),Ft=(o,t)=>{F?o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),s=f.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,o.appendChild(i)})},rt=F?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return zt(e)})(o):o;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var D;const T=window,lt=T.trustedTypes,Dt=lt?lt.emptyScript:"",at=T.reactiveElementPolyfillSupport,I={toAttribute(o,t){switch(t){case Boolean:o=o?Dt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},ct=(o,t)=>t!==o&&(t==t||o==o),V={attribute:!0,type:String,converter:I,reflect:!1,hasChanged:ct},W="finalized";class x extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,i)=>{const s=this._$Ep(i,e);s!==void 0&&(this._$Ev.set(s,i),t.push(s))}),t}static createProperty(t,e=V){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const n=this[t];this[e]=s,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||V}static finalize(){if(this.hasOwnProperty(W))return!1;this[W]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const s of i)this.createProperty(s,e[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(rt(s))}else t!==void 0&&e.push(rt(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Ft(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=V){var s;const n=this.constructor._$Ep(t,i);if(n!==void 0&&i.reflect===!0){const r=(((s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?i.converter:I).toAttribute(e,i.type);this._$El=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,n=s._$Ev.get(t);if(n!==void 0&&this._$El!==n){const r=s.getPropertyOptions(n),c=typeof r.converter=="function"?{fromAttribute:r.converter}:((i=r.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?r.converter:I;this._$El=n,this[n]=c.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||ct)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((s,n)=>this[n]=s),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(s=>{var n;return(n=s.hostUpdate)===null||n===void 0?void 0:n.call(s)}),this.update(i)):this._$Ek()}catch(s){throw e=!1,this._$Ek(),s}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}x[W]=!0,x.elementProperties=new Map,x.elementStyles=[],x.shadowRootOptions={mode:"open"},at?.({ReactiveElement:x}),((D=T.reactiveElementVersions)!==null&&D!==void 0?D:T.reactiveElementVersions=[]).push("1.6.3");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
14
|
-
\f\r](?:([^\\s"'>=/]+)([
|
|
15
|
-
\f\r]
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
*/var q;const R=window,A=R.trustedTypes,ht=A?A.createPolicy("lit-html",{createHTML:o=>o}):void 0,J="$lit$",_=`lit$${(Math.random()+"").slice(9)}$`,dt="?"+_,It=`<${dt}>`,g=document,U=()=>g.createComment(""),P=o=>o===null||typeof o!="object"&&typeof o!="function",ut=Array.isArray,Vt=o=>ut(o)||typeof o?.[Symbol.iterator]=="function",K=`[
|
|
14
|
+
\f\r]`,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pt=/-->/g,$t=/>/g,y=RegExp(`>|${K}(?:([^\\s"'>=/]+)(${K}*=${K}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),vt=/'/g,ft=/"/g,_t=/^(?:script|style|textarea|title)$/i,Wt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),qt=Wt(1),m=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),gt=new WeakMap,E=g.createTreeWalker(g,129,null,!1);function yt(o,t){if(!Array.isArray(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return ht!==void 0?ht.createHTML(t):t}const Jt=(o,t)=>{const e=o.length-1,i=[];let s,n=t===2?"<svg>":"",r=M;for(let c=0;c<e;c++){const l=o[c];let a,u,d=-1,$=0;for(;$<l.length&&(r.lastIndex=$,u=r.exec(l),u!==null);)$=r.lastIndex,r===M?u[1]==="!--"?r=pt:u[1]!==void 0?r=$t:u[2]!==void 0?(_t.test(u[2])&&(s=RegExp("</"+u[2],"g")),r=y):u[3]!==void 0&&(r=y):r===y?u[0]===">"?(r=s??M,d=-1):u[1]===void 0?d=-2:(d=r.lastIndex-u[2].length,a=u[1],r=u[3]===void 0?y:u[3]==='"'?ft:vt):r===ft||r===vt?r=y:r===pt||r===$t?r=M:(r=y,s=void 0);const v=r===y&&o[c+1].startsWith("/>")?" ":"";n+=r===M?l+It:d>=0?(i.push(a),l.slice(0,d)+J+l.slice(d)+_+v):l+_+(d===-2?(i.push(void 0),c):v)}return[yt(o,n+(o[e]||"<?>")+(t===2?"</svg>":"")),i]};class O{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let n=0,r=0;const c=t.length-1,l=this.parts,[a,u]=Jt(t,e);if(this.el=O.createElement(a,i),E.currentNode=this.el.content,e===2){const d=this.el.content,$=d.firstChild;$.remove(),d.append(...$.childNodes)}for(;(s=E.nextNode())!==null&&l.length<c;){if(s.nodeType===1){if(s.hasAttributes()){const d=[];for(const $ of s.getAttributeNames())if($.endsWith(J)||$.startsWith(_)){const v=u[r++];if(d.push($),v!==void 0){const st=s.getAttribute(v.toLowerCase()+J).split(_),z=/([.?@])?(.*)/.exec(v);l.push({type:1,index:n,name:z[2],strings:st,ctor:z[1]==="."?Zt:z[1]==="?"?Gt:z[1]==="@"?Qt:L})}else l.push({type:6,index:n})}for(const $ of d)s.removeAttribute($)}if(_t.test(s.tagName)){const d=s.textContent.split(_),$=d.length-1;if($>0){s.textContent=A?A.emptyScript:"";for(let v=0;v<$;v++)s.append(d[v],U()),E.nextNode(),l.push({type:2,index:++n});s.append(d[$],U())}}}else if(s.nodeType===8)if(s.data===dt)l.push({type:2,index:n});else{let d=-1;for(;(d=s.data.indexOf(_,d+1))!==-1;)l.push({type:7,index:n}),d+=_.length-1}n++}}static createElement(t,e){const i=g.createElement("template");return i.innerHTML=t,i}}function S(o,t,e=o,i){var s,n,r,c;if(t===m)return t;let l=i!==void 0?(s=e._$Co)===null||s===void 0?void 0:s[i]:e._$Cl;const a=P(t)?void 0:t._$litDirective$;return l?.constructor!==a&&((n=l?._$AO)===null||n===void 0||n.call(l,!1),a===void 0?l=void 0:(l=new a(o),l._$AT(o,e,i)),i!==void 0?((r=(c=e)._$Co)!==null&&r!==void 0?r:c._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=S(o,l._$AS(o,t.values),l,i)),t}class Kt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,n=((e=t?.creationScope)!==null&&e!==void 0?e:g).importNode(i,!0);E.currentNode=n;let r=E.nextNode(),c=0,l=0,a=s[0];for(;a!==void 0;){if(c===a.index){let u;a.type===2?u=new k(r,r.nextSibling,this,t):a.type===1?u=new a.ctor(r,a.name,a.strings,this,t):a.type===6&&(u=new Xt(r,this,t)),this._$AV.push(u),a=s[++l]}c!==a?.index&&(r=E.nextNode(),c++)}return E.currentNode=g,n}v(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class k{constructor(t,e,i,s){var n;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=(n=s?.isConnected)===null||n===void 0||n}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),P(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==m&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Vt(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==p&&P(this._$AH)?this._$AA.nextSibling.data=t:this.$(g.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,n=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=O.createElement(yt(s.h,s.h[0]),this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===n)this._$AH.v(i);else{const r=new Kt(n,this),c=r.u(this.options);r.v(i),this.$(c),this._$AH=r}}_$AC(t){let e=gt.get(t.strings);return e===void 0&>.set(t.strings,e=new O(t)),e}T(t){ut(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const n of t)s===e.length?e.push(i=new k(this.k(U()),this.k(U()),this,this.options)):i=e[s],i._$AI(n),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class L{constructor(t,e,i,s,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=p}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const n=this.strings;let r=!1;if(n===void 0)t=S(this,t,e,0),r=!P(t)||t!==this._$AH&&t!==m,r&&(this._$AH=t);else{const c=t;let l,a;for(t=n[0],l=0;l<n.length-1;l++)a=S(this,c[i+l],e,l),a===m&&(a=this._$AH[l]),r||(r=!P(a)||a!==this._$AH[l]),a===p?t=p:t!==p&&(t+=(a??"")+n[l+1]),this._$AH[l]=a}r&&!s&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Zt extends L{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}const Yt=A?A.emptyScript:"";class Gt extends L{constructor(){super(...arguments),this.type=4}j(t){t&&t!==p?this.element.setAttribute(this.name,Yt):this.element.removeAttribute(this.name)}}class Qt extends L{constructor(t,e,i,s,n){super(t,e,i,s,n),this.type=5}_$AI(t,e=this){var i;if((t=(i=S(this,t,e,0))!==null&&i!==void 0?i:p)===m)return;const s=this._$AH,n=t===p&&s!==p||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==p&&(s===p||n);n&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}}class Xt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const mt=R.litHtmlPolyfillSupport;mt?.(O,k),((q=R.litHtmlVersions)!==null&&q!==void 0?q:R.litHtmlVersions=[]).push("2.8.0");const te=(o,t,e)=>{var i,s;const n=(i=e?.renderBefore)!==null&&i!==void 0?i:t;let r=n._$litPart$;if(r===void 0){const c=(s=e?.renderBefore)!==null&&s!==void 0?s:null;n._$litPart$=r=new k(t.insertBefore(U(),c),c,void 0,e??{})}return r._$AI(o),r};/**
|
|
16
|
+
* @license
|
|
17
|
+
* Copyright 2019 Google LLC
|
|
18
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
+
*/const N=window,Z=N.ShadowRoot&&(N.ShadyCSS===void 0||N.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Y=Symbol(),Et=new WeakMap;class bt{constructor(t,e,i){if(this._$cssResult$=!0,i!==Y)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Z&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=Et.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Et.set(e,t))}return t}toString(){return this.cssText}}const h=o=>new bt(typeof o=="string"?o:o+"",void 0,Y),ee=(o,...t)=>{const e=o.length===1?o[0]:t.reduce((i,s,n)=>i+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+o[n+1],o[0]);return new bt(e,o,Y)},ie=(o,t)=>{Z?o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),s=N.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,o.appendChild(i)})},At=Z?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return h(e)})(o):o;/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/var G;const H=window,St=H.trustedTypes,se=St?St.emptyScript:"",Ct=H.reactiveElementPolyfillSupport,Q={toAttribute(o,t){switch(t){case Boolean:o=o?se:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},wt=(o,t)=>t!==o&&(t==t||o==o),X={attribute:!0,type:String,converter:Q,reflect:!1,hasChanged:wt},tt="finalized";class C extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,i)=>{const s=this._$Ep(i,e);s!==void 0&&(this._$Ev.set(s,i),t.push(s))}),t}static createProperty(t,e=X){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);s!==void 0&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const n=this[t];this[e]=s,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||X}static finalize(){if(this.hasOwnProperty(tt))return!1;this[tt]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const s of i)this.createProperty(s,e[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const s of i)e.unshift(At(s))}else t!==void 0&&e.push(At(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return ie(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=X){var s;const n=this.constructor._$Ep(t,i);if(n!==void 0&&i.reflect===!0){const r=(((s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?i.converter:Q).toAttribute(e,i.type);this._$El=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,n=s._$Ev.get(t);if(n!==void 0&&this._$El!==n){const r=s.getPropertyOptions(n),c=typeof r.converter=="function"?{fromAttribute:r.converter}:((i=r.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?r.converter:Q;this._$El=n,this[n]=c.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||wt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((s,n)=>this[n]=s),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(s=>{var n;return(n=s.hostUpdate)===null||n===void 0?void 0:n.call(s)}),this.update(i)):this._$Ek()}catch(s){throw e=!1,this._$Ek(),s}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var s;return(s=i.hostUpdated)===null||s===void 0?void 0:s.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}C[tt]=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},Ct?.({ReactiveElement:C}),((G=H.reactiveElementVersions)!==null&&G!==void 0?G:H.reactiveElementVersions=[]).push("1.6.3");/**
|
|
18
24
|
* @license
|
|
19
25
|
* Copyright 2017 Google LLC
|
|
20
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/var
|
|
27
|
+
*/var et,it;class w extends C{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=te(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return m}}w.finalized=!0,w._$litElement$=!0,(et=globalThis.litElementHydrateSupport)===null||et===void 0||et.call(globalThis,{LitElement:w});const xt=globalThis.litElementPolyfillSupport;xt?.({LitElement:w}),((it=globalThis.litElementVersions)!==null&&it!==void 0?it:globalThis.litElementVersions=[]).push("3.3.3");/**
|
|
22
28
|
* @license
|
|
23
29
|
* Copyright 2020 Google LLC
|
|
24
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/const
|
|
31
|
+
*/const Ut=Symbol.for(""),oe=o=>{if(o?.r===Ut)return o?._$litStatic$},ne=o=>({_$litStatic$:o,r:Ut}),Pt=new Map,re=o=>(t,...e)=>{const i=e.length;let s,n;const r=[],c=[];let l,a=0,u=!1;for(;a<i;){for(l=t[a];a<i&&(n=e[a],(s=oe(n))!==void 0);)l+=s+t[++a],u=!0;a!==i&&c.push(n),r.push(l),a++}if(a===i&&r.push(t[i]),u){const d=r.join("$$lit$$");(t=Pt.get(d))===void 0&&(r.raw=r,Pt.set(d,t=r)),e=c}return o(t,...e)},B=re(qt),le="#5143D5",Mt="#392F95",j="#EEECFB",ae="#CBC7F2",Ot="#203442",kt="#364855",ce="#FFFFFF",Tt="#F2F5F9",he="#E53935",Rt="#FFEBEE",de="#B71C1C",ue="#FFCDD2",pe="#FFB300",Lt="#FFF8E1",$e="#FF8F00",ve="#FFECB3",fe="#7CB342",Nt="#F1F8E9",_e="#33691E",ge="#DCEDC8";var ye=ee`
|
|
26
32
|
* {
|
|
27
33
|
padding: 0;
|
|
28
34
|
margin: 0;
|
|
@@ -59,20 +65,20 @@
|
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
.text-container a {
|
|
62
|
-
color: ${h(
|
|
68
|
+
color: ${h(kt)};
|
|
63
69
|
}
|
|
64
70
|
|
|
65
71
|
cas-text:nth-child(1) {
|
|
66
|
-
color: ${h(
|
|
72
|
+
color: ${h(Ot)};
|
|
67
73
|
}
|
|
68
74
|
|
|
69
75
|
cas-text:nth-child(2) {
|
|
70
|
-
color: ${h(
|
|
76
|
+
color: ${h(kt)};
|
|
71
77
|
}
|
|
72
78
|
|
|
73
79
|
.icon-container .icon {
|
|
74
80
|
position: relative;
|
|
75
|
-
background-color: ${h(
|
|
81
|
+
background-color: ${h(ce)};
|
|
76
82
|
border-radius: 50%;
|
|
77
83
|
overflow: hidden;
|
|
78
84
|
--eloisa-ds-icon-color: currentColor;
|
|
@@ -90,70 +96,70 @@
|
|
|
90
96
|
}
|
|
91
97
|
|
|
92
98
|
.normal {
|
|
93
|
-
background: ${h(
|
|
94
|
-
border: 1px solid ${h(
|
|
99
|
+
background: ${h(Tt)};
|
|
100
|
+
border: 1px solid ${h(Tt)};
|
|
95
101
|
}
|
|
96
102
|
|
|
97
103
|
.info {
|
|
98
|
-
background: ${h(
|
|
99
|
-
border: 1px solid ${h(
|
|
104
|
+
background: ${h(j)};
|
|
105
|
+
border: 1px solid ${h(le)};
|
|
100
106
|
}
|
|
101
107
|
|
|
102
108
|
.success {
|
|
103
|
-
background: ${h(
|
|
104
|
-
border: 1px solid ${h(
|
|
109
|
+
background: ${h(Nt)};
|
|
110
|
+
border: 1px solid ${h(fe)};
|
|
105
111
|
}
|
|
106
112
|
|
|
107
113
|
.danger {
|
|
108
|
-
background: ${h(
|
|
109
|
-
border: 1px solid ${h(
|
|
114
|
+
background: ${h(Rt)};
|
|
115
|
+
border: 1px solid ${h(he)};
|
|
110
116
|
}
|
|
111
117
|
|
|
112
118
|
.warning {
|
|
113
|
-
background: ${h(
|
|
114
|
-
border: 1px solid ${h(
|
|
119
|
+
background: ${h(Lt)};
|
|
120
|
+
border: 1px solid ${h(pe)};
|
|
115
121
|
}
|
|
116
122
|
//variant soft, add 50% opacity to background color
|
|
117
123
|
:host([soft]) .normal {}
|
|
118
124
|
:host([soft]) .info {
|
|
119
|
-
background: ${h(
|
|
125
|
+
background: ${h(j+"80")};
|
|
120
126
|
border: none
|
|
121
127
|
}
|
|
122
128
|
|
|
123
129
|
:host([soft]) .success {
|
|
124
|
-
background: ${h(
|
|
130
|
+
background: ${h(Nt+"80")};
|
|
125
131
|
border: none
|
|
126
132
|
}
|
|
127
133
|
|
|
128
134
|
:host([soft]) .danger {
|
|
129
|
-
background: ${h(
|
|
135
|
+
background: ${h(Rt+"80")};
|
|
130
136
|
border: none
|
|
131
137
|
}
|
|
132
138
|
|
|
133
139
|
:host([soft]) .warning {
|
|
134
|
-
background: ${h(
|
|
140
|
+
background: ${h(Lt+"80")};
|
|
135
141
|
border: none
|
|
136
142
|
}
|
|
137
143
|
|
|
138
144
|
.danger .icon {
|
|
139
|
-
color: ${h(
|
|
145
|
+
color: ${h(de)};
|
|
140
146
|
}
|
|
141
147
|
|
|
142
148
|
.warning .icon {
|
|
143
|
-
color: ${h(
|
|
149
|
+
color: ${h($e)};
|
|
144
150
|
}
|
|
145
151
|
|
|
146
152
|
.info .icon {
|
|
147
|
-
color: ${h(
|
|
153
|
+
color: ${h(Mt)};
|
|
148
154
|
}
|
|
149
155
|
|
|
150
156
|
.normal .icon {
|
|
151
|
-
color: ${h(
|
|
152
|
-
background-color: ${h(
|
|
157
|
+
color: ${h(Mt)};
|
|
158
|
+
background-color: ${h(j)};
|
|
153
159
|
}
|
|
154
160
|
|
|
155
161
|
.success .icon {
|
|
156
|
-
color: ${h(
|
|
162
|
+
color: ${h(_e)};
|
|
157
163
|
}
|
|
158
164
|
|
|
159
165
|
.alert-small .inner-container {
|
|
@@ -170,24 +176,24 @@
|
|
|
170
176
|
}
|
|
171
177
|
|
|
172
178
|
.alert-big.normal .icon {
|
|
173
|
-
background-color: ${h(
|
|
174
|
-
color: ${h(
|
|
179
|
+
background-color: ${h(j)};
|
|
180
|
+
color: ${h(Ot)};
|
|
175
181
|
}
|
|
176
182
|
|
|
177
183
|
.alert-big.danger .icon {
|
|
178
|
-
background-color: ${h(
|
|
184
|
+
background-color: ${h(ue)};
|
|
179
185
|
}
|
|
180
186
|
|
|
181
187
|
.alert-big.warning .icon {
|
|
182
|
-
background-color: ${h(
|
|
188
|
+
background-color: ${h(ve)};
|
|
183
189
|
}
|
|
184
190
|
|
|
185
191
|
.alert-big.info .icon {
|
|
186
|
-
background-color: ${h(
|
|
192
|
+
background-color: ${h(ae)};
|
|
187
193
|
}
|
|
188
194
|
|
|
189
195
|
.alert-big.success .icon {
|
|
190
|
-
background-color: ${h(
|
|
196
|
+
background-color: ${h(ge)};
|
|
191
197
|
}
|
|
192
198
|
|
|
193
199
|
.alert-big .icon-container {
|
|
@@ -219,27 +225,27 @@
|
|
|
219
225
|
* @license
|
|
220
226
|
* Copyright 2017 Google LLC
|
|
221
227
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
222
|
-
*/const
|
|
228
|
+
*/const me={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ee=o=>(...t)=>({_$litDirective$:o,values:t});class be{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
|
|
223
229
|
* @license
|
|
224
230
|
* Copyright 2018 Google LLC
|
|
225
231
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
226
|
-
*/const
|
|
227
|
-
<div class=${
|
|
232
|
+
*/const Ht=Ee(class extends be{constructor(o){var t;if(super(o),o.type!==me.ATTRIBUTE||o.name!=="class"||((t=o.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(t=>o[t]).join(" ")+" "}update(o,[t]){var e,i;if(this.it===void 0){this.it=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!(!((e=this.nt)===null||e===void 0)&&e.has(n))&&this.it.add(n);return this.render(t)}const s=o.element.classList;this.it.forEach(n=>{n in t||(s.remove(n),this.it.delete(n))});for(const n in t){const r=!!t[n];r===this.it.has(n)||((i=this.nt)===null||i===void 0?void 0:i.has(n))||(r?(s.add(n),this.it.add(n)):(s.remove(n),this.it.delete(n)))}return m}});function Ae({size:o,variant:t,customIcon:e,fullWidth:i}){const s=Ht({"alert-container":!0,["alert-"+o]:!0,[t]:!0,"full-width":i}),n=Ht({icon:!0,[t]:!0}),r={big:"40",small:"24"},c={normal:"flat-question",info:"flat-info",danger:"flat-error",warning:"flat-alert",success:"flat-success"},l={big:{title:"headline3",text:"body1"},small:{title:"body2",text:"body1"},fullWidth:{title:"footnote1",text:"footnote2"}},a=i?l.fullWidth:l[o];return{alertStyle:s,alertIconStyle:n,iconName:e||c[t],iconSize:r[o],textVariants:a}}class Bt extends w{static styles=ye;static shadowRootOptions={...w.shadowRootOptions,mode:"open"};constructor(){super(),this.open=!0,this.title="",this.text="",this.showCloseButton=!1,this.variant="info",this.size="small",this.fullWidth=!1,this.customIcon=""}static properties={title:{type:String},text:{type:String},showCloseButton:{type:Boolean},variant:{type:String},size:{type:String},fullWidth:{type:Boolean},customIcon:{type:String}};closeHandler(){this.open=!1,this.dispatchEvent(new CustomEvent("close",{detail:{open:this.open}})),this.requestUpdate()}render(){const{open:t,title:e,text:i,showCloseButton:s,size:n,variant:r,fullWidth:c,closeHandler:l,customIcon:a}=this,{alertStyle:u,textVariants:d,iconName:$,iconSize:v}=Ae({size:n,variant:r,customIcon:a,fullWidth:c});if(!t)return null;const st=ne(i);return B`
|
|
233
|
+
<div class=${u}>
|
|
228
234
|
<div class="inner-container">
|
|
229
235
|
<div class="icon-container">
|
|
230
236
|
<div class="icon">
|
|
231
|
-
<cas-icon disabled name=${
|
|
237
|
+
<cas-icon disabled name=${$} size=${v}></cas-icon>
|
|
232
238
|
</div>
|
|
233
239
|
</div>
|
|
234
240
|
<div class="text-container">
|
|
235
|
-
${e!==""?
|
|
236
|
-
${i!==""?
|
|
241
|
+
${e!==""?B`<cas-text variant=${d?.title}>${e}</cas-text>`:""}
|
|
242
|
+
${i!==""?B`<cas-text variant=${d?.text}>${st}</cas-text>`:""}
|
|
237
243
|
</div>
|
|
238
|
-
${s?
|
|
244
|
+
${s?B`
|
|
239
245
|
<div class="close-icon-container">
|
|
240
246
|
<button @click=${l}>
|
|
241
247
|
<cas-icon name="flat-close" size="10"></cas-icon>
|
|
242
248
|
</button>
|
|
243
249
|
</div>`:""}
|
|
244
250
|
</div>
|
|
245
|
-
</div>`}}customElements.get("cas-alert")||customElements.define("cas-alert",
|
|
251
|
+
</div>`}}customElements.get("cas-alert")||customElements.define("cas-alert",Bt),b.CasAlert=Bt,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/build/cas-booking-box.js
CHANGED
|
@@ -1,28 +1,34 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(y,m){typeof exports=="object"&&typeof module<"u"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):(y=typeof globalThis<"u"?globalThis:y||self,m(y["cas-booking-box"]={}))})(this,function(y){"use strict";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const m=window,B=m.ShadowRoot&&(m.ShadyCSS===void 0||m.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,it=Symbol(),ot=new WeakMap;class Pt{constructor(t,e,i){if(this._$cssResult$=!0,i!==it)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(B&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=ot.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&ot.set(e,t))}return t}toString(){return this.cssText}}const Ut=s=>new Pt(typeof s=="string"?s:s+"",void 0,it),Tt=(s,t)=>{B?s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),o=m.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i)})},st=B?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Ut(e)})(s):s;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var
|
|
9
|
+
*/var L;const R=window,nt=R.trustedTypes,Rt=nt?nt.emptyScript:"",rt=R.reactiveElementPolyfillSupport,j={toAttribute(s,t){switch(t){case Boolean:s=s?Rt:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},at=(s,t)=>t!==s&&(t==t||s==s),z={attribute:!0,type:String,converter:j,reflect:!1,hasChanged:at},I="finalized";class S extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,i)=>{const o=this._$Ep(i,e);o!==void 0&&(this._$Ev.set(o,i),t.push(o))}),t}static createProperty(t,e=z){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);o!==void 0&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const n=this[t];this[e]=o,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||z}static finalize(){if(this.hasOwnProperty(I))return!1;this[I]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const o of i)this.createProperty(o,e[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const o of i)e.unshift(st(o))}else t!==void 0&&e.push(st(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Tt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=z){var o;const n=this.constructor._$Ep(t,i);if(n!==void 0&&i.reflect===!0){const r=(((o=i.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?i.converter:j).toAttribute(e,i.type);this._$El=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,n=o._$Ev.get(t);if(n!==void 0&&this._$El!==n){const r=o.getPropertyOptions(n),d=typeof r.converter=="function"?{fromAttribute:r.converter}:((i=r.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?r.converter:j;this._$El=n,this[n]=d.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||at)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((o,n)=>this[n]=o),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(o=>{var n;return(n=o.hostUpdate)===null||n===void 0?void 0:n.call(o)}),this.update(i)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var o;return(o=i.hostUpdated)===null||o===void 0?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}S[I]=!0,S.elementProperties=new Map,S.elementStyles=[],S.shadowRootOptions={mode:"open"},rt?.({ReactiveElement:S}),((L=R.reactiveElementVersions)!==null&&L!==void 0?L:R.reactiveElementVersions=[]).push("1.6.3");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var
|
|
14
|
-
\f\r](?:([^\\s"'>=/]+)([
|
|
15
|
-
\f\r]
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
*/var V;const O=window,A=O.trustedTypes,lt=A?A.createPolicy("lit-html",{createHTML:s=>s}):void 0,q="$lit$",$=`lit$${(Math.random()+"").slice(9)}$`,dt="?"+$,Ot=`<${dt}>`,f=document,k=()=>f.createComment(""),C=s=>s===null||typeof s!="object"&&typeof s!="function",ht=Array.isArray,Mt=s=>ht(s)||typeof s?.[Symbol.iterator]=="function",F=`[
|
|
14
|
+
\f\r]`,P=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ct=/-->/g,pt=/>/g,b=RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ut=/'/g,vt=/"/g,mt=/^(?:script|style|textarea|title)$/i,Ht=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),Dt=Ht(1),g=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),$t=new WeakMap,_=f.createTreeWalker(f,129,null,!1);function ft(s,t){if(!Array.isArray(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return lt!==void 0?lt.createHTML(t):t}const Nt=(s,t)=>{const e=s.length-1,i=[];let o,n=t===2?"<svg>":"",r=P;for(let d=0;d<e;d++){const a=s[d];let l,h,c=-1,u=0;for(;u<a.length&&(r.lastIndex=u,h=r.exec(a),h!==null);)u=r.lastIndex,r===P?h[1]==="!--"?r=ct:h[1]!==void 0?r=pt:h[2]!==void 0?(mt.test(h[2])&&(o=RegExp("</"+h[2],"g")),r=b):h[3]!==void 0&&(r=b):r===b?h[0]===">"?(r=o??P,c=-1):h[1]===void 0?c=-2:(c=r.lastIndex-h[2].length,l=h[1],r=h[3]===void 0?b:h[3]==='"'?vt:ut):r===vt||r===ut?r=b:r===ct||r===pt?r=P:(r=b,o=void 0);const v=r===b&&s[d+1].startsWith("/>")?" ":"";n+=r===P?a+Ot:c>=0?(i.push(l),a.slice(0,c)+q+a.slice(c)+$+v):a+$+(c===-2?(i.push(void 0),d):v)}return[ft(s,n+(s[e]||"<?>")+(t===2?"</svg>":"")),i]};class U{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,r=0;const d=t.length-1,a=this.parts,[l,h]=Nt(t,e);if(this.el=U.createElement(l,i),_.currentNode=this.el.content,e===2){const c=this.el.content,u=c.firstChild;u.remove(),c.append(...u.childNodes)}for(;(o=_.nextNode())!==null&&a.length<d;){if(o.nodeType===1){if(o.hasAttributes()){const c=[];for(const u of o.getAttributeNames())if(u.endsWith(q)||u.startsWith($)){const v=h[r++];if(c.push(u),v!==void 0){const ie=o.getAttribute(v.toLowerCase()+q).split($),N=/([.?@])?(.*)/.exec(v);a.push({type:1,index:n,name:N[2],strings:ie,ctor:N[1]==="."?Lt:N[1]==="?"?zt:N[1]==="@"?It:M})}else a.push({type:6,index:n})}for(const u of c)o.removeAttribute(u)}if(mt.test(o.tagName)){const c=o.textContent.split($),u=c.length-1;if(u>0){o.textContent=A?A.emptyScript:"";for(let v=0;v<u;v++)o.append(c[v],k()),_.nextNode(),a.push({type:2,index:++n});o.append(c[u],k())}}}else if(o.nodeType===8)if(o.data===dt)a.push({type:2,index:n});else{let c=-1;for(;(c=o.data.indexOf($,c+1))!==-1;)a.push({type:7,index:n}),c+=$.length-1}n++}}static createElement(t,e){const i=f.createElement("template");return i.innerHTML=t,i}}function E(s,t,e=s,i){var o,n,r,d;if(t===g)return t;let a=i!==void 0?(o=e._$Co)===null||o===void 0?void 0:o[i]:e._$Cl;const l=C(t)?void 0:t._$litDirective$;return a?.constructor!==l&&((n=a?._$AO)===null||n===void 0||n.call(a,!1),l===void 0?a=void 0:(a=new l(s),a._$AT(s,e,i)),i!==void 0?((r=(d=e)._$Co)!==null&&r!==void 0?r:d._$Co=[])[i]=a:e._$Cl=a),a!==void 0&&(t=E(s,a._$AS(s,t.values),a,i)),t}class Bt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,n=((e=t?.creationScope)!==null&&e!==void 0?e:f).importNode(i,!0);_.currentNode=n;let r=_.nextNode(),d=0,a=0,l=o[0];for(;l!==void 0;){if(d===l.index){let h;l.type===2?h=new T(r,r.nextSibling,this,t):l.type===1?h=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(h=new Vt(r,this,t)),this._$AV.push(h),l=o[++a]}d!==l?.index&&(r=_.nextNode(),d++)}return _.currentNode=f,n}v(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class T{constructor(t,e,i,o){var n;this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=(n=o?.isConnected)===null||n===void 0||n}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),C(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==g&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Mt(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==p&&C(this._$AH)?this._$AA.nextSibling.data=t:this.$(f.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=U.createElement(ft(o.h,o.h[0]),this.options)),o);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===n)this._$AH.v(i);else{const r=new Bt(n,this),d=r.u(this.options);r.v(i),this.$(d),this._$AH=r}}_$AC(t){let e=$t.get(t.strings);return e===void 0&&$t.set(t.strings,e=new U(t)),e}T(t){ht(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new T(this.k(k()),this.k(k()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class M{constructor(t,e,i,o,n){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=p}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let r=!1;if(n===void 0)t=E(this,t,e,0),r=!C(t)||t!==this._$AH&&t!==g,r&&(this._$AH=t);else{const d=t;let a,l;for(t=n[0],a=0;a<n.length-1;a++)l=E(this,d[i+a],e,a),l===g&&(l=this._$AH[a]),r||(r=!C(l)||l!==this._$AH[a]),l===p?t=p:t!==p&&(t+=(l??"")+n[a+1]),this._$AH[a]=l}r&&!o&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Lt extends M{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}}const jt=A?A.emptyScript:"";class zt extends M{constructor(){super(...arguments),this.type=4}j(t){t&&t!==p?this.element.setAttribute(this.name,jt):this.element.removeAttribute(this.name)}}class It extends M{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){var i;if((t=(i=E(this,t,e,0))!==null&&i!==void 0?i:p)===g)return;const o=this._$AH,n=t===p&&o!==p||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==p&&(o===p||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}}class Vt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}}const bt=O.litHtmlPolyfillSupport;bt?.(U,T),((V=O.litHtmlVersions)!==null&&V!==void 0?V:O.litHtmlVersions=[]).push("2.8.0");const qt=(s,t,e)=>{var i,o;const n=(i=e?.renderBefore)!==null&&i!==void 0?i:t;let r=n._$litPart$;if(r===void 0){const d=(o=e?.renderBefore)!==null&&o!==void 0?o:null;n._$litPart$=r=new T(t.insertBefore(k(),d),d,void 0,e??{})}return r._$AI(s),r};/**
|
|
16
|
+
* @license
|
|
17
|
+
* Copyright 2019 Google LLC
|
|
18
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
+
*/const H=window,W=H.ShadowRoot&&(H.ShadyCSS===void 0||H.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,K=Symbol(),gt=new WeakMap;class _t{constructor(t,e,i){if(this._$cssResult$=!0,i!==K)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(W&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=gt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&>.set(e,t))}return t}toString(){return this.cssText}}const Ft=s=>new _t(typeof s=="string"?s:s+"",void 0,K),Wt=(s,...t)=>{const e=s.length===1?s[0]:t.reduce((i,o,n)=>i+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+s[n+1],s[0]);return new _t(e,s,K)},Kt=(s,t)=>{W?s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),o=H.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i)})},yt=W?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Ft(e)})(s):s;/**
|
|
20
|
+
* @license
|
|
21
|
+
* Copyright 2017 Google LLC
|
|
22
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
+
*/var J;const D=window,At=D.trustedTypes,Jt=At?At.emptyScript:"",Et=D.reactiveElementPolyfillSupport,Z={toAttribute(s,t){switch(t){case Boolean:s=s?Jt:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},xt=(s,t)=>t!==s&&(t==t||s==s),X={attribute:!0,type:String,converter:Z,reflect:!1,hasChanged:xt},Q="finalized";class x extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,i)=>{const o=this._$Ep(i,e);o!==void 0&&(this._$Ev.set(o,i),t.push(o))}),t}static createProperty(t,e=X){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i=typeof t=="symbol"?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);o!==void 0&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const n=this[t];this[e]=o,this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||X}static finalize(){if(this.hasOwnProperty(Q))return!1;this[Q]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const o of i)this.createProperty(o,e[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const o of i)e.unshift(yt(o))}else t!==void 0&&e.push(yt(t));return e}static _$Ep(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Kt(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=X){var o;const n=this.constructor._$Ep(t,i);if(n!==void 0&&i.reflect===!0){const r=(((o=i.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?i.converter:Z).toAttribute(e,i.type);this._$El=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,n=o._$Ev.get(t);if(n!==void 0&&this._$El!==n){const r=o.getPropertyOptions(n),d=typeof r.converter=="function"?{fromAttribute:r.converter}:((i=r.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?r.converter:Z;this._$El=n,this[n]=d.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||xt)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((o,n)=>this[n]=o),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(o=>{var n;return(n=o.hostUpdate)===null||n===void 0?void 0:n.call(o)}),this.update(i)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var o;return(o=i.hostUpdated)===null||o===void 0?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}x[Q]=!0,x.elementProperties=new Map,x.elementStyles=[],x.shadowRootOptions={mode:"open"},Et?.({ReactiveElement:x}),((J=D.reactiveElementVersions)!==null&&J!==void 0?J:D.reactiveElementVersions=[]).push("1.6.3");/**
|
|
18
24
|
* @license
|
|
19
25
|
* Copyright 2017 Google LLC
|
|
20
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/var
|
|
27
|
+
*/var Y,G;class w extends x{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=qt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return g}}w.finalized=!0,w._$litElement$=!0,(Y=globalThis.litElementHydrateSupport)===null||Y===void 0||Y.call(globalThis,{LitElement:w});const wt=globalThis.litElementPolyfillSupport;wt?.({LitElement:w}),((G=globalThis.litElementVersions)!==null&&G!==void 0?G:globalThis.litElementVersions=[]).push("3.3.3");/**
|
|
22
28
|
* @license
|
|
23
29
|
* Copyright 2020 Google LLC
|
|
24
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/const
|
|
31
|
+
*/const Zt=Symbol.for(""),Xt=s=>{if(s?.r===Zt)return s?._$litStatic$},St=new Map,Qt=s=>(t,...e)=>{const i=e.length;let o,n;const r=[],d=[];let a,l=0,h=!1;for(;l<i;){for(a=t[l];l<i&&(n=e[l],(o=Xt(n))!==void 0);)a+=o+t[++l],h=!0;l!==i&&d.push(n),r.push(a),l++}if(l===i&&r.push(t[i]),h){const c=r.join("$$lit$$");(t=St.get(c))===void 0&&(r.raw=r,St.set(c,t=r)),e=d}return s(t,...e)},tt=Qt(Dt);var Yt=Wt`
|
|
26
32
|
:host {
|
|
27
33
|
position: absolute;
|
|
28
34
|
width: 100%;
|
|
@@ -260,11 +266,11 @@
|
|
|
260
266
|
* @license
|
|
261
267
|
* Copyright 2017 Google LLC
|
|
262
268
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
263
|
-
*/const
|
|
269
|
+
*/const Gt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},te=s=>(...t)=>({_$litDirective$:s,values:t});class ee{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
|
|
264
270
|
* @license
|
|
265
271
|
* Copyright 2018 Google LLC
|
|
266
272
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
267
|
-
*/const
|
|
273
|
+
*/const kt=te(class extends ee{constructor(s){var t;if(super(s),s.type!==Gt.ATTRIBUTE||s.name!=="class"||((t=s.strings)===null||t===void 0?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){var e,i;if(this.it===void 0){this.it=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(const n in t)t[n]&&!(!((e=this.nt)===null||e===void 0)&&e.has(n))&&this.it.add(n);return this.render(t)}const o=s.element.classList;this.it.forEach(n=>{n in t||(o.remove(n),this.it.delete(n))});for(const n in t){const r=!!t[n];r===this.it.has(n)||((i=this.nt)===null||i===void 0?void 0:i.has(n))||(r?(o.add(n),this.it.add(n)):(o.remove(n),this.it.delete(n)))}return g}});var et=[{name:"Consulta m\xE9dica",items:[{name:"Presencial",link:"https://reserva.alemana.cl/reserva/portal/busqueda"},{name:"Teleconsulta",link:"https://agenda.clinicaalemana.cl/paciente"},{name:"TeleUrgencia",link:"https://www.clinicaalemana.cl/telemedicina/teleurgencia"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio"}]},{name:"Ex\xE1menes y procedimientos",items:[{name:"Presencial",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"},{name:"A domicilio",link:"https://www.clinicaalemana.cl/servicios-clinicos/servicios-a-domicilio/examenes-laboratorio-domicilio"}]},{name:"Vacunas",items:[{name:"Pedi\xE1trica",link:"https://www.alemana.cl/ReservaDeHoras/resultado-busqueda-area.aspx?idEmp=2&horario=todas&su=-1&idioma=todas&valorArea=Vacunas&Am=203,0&Ai=-1&CentrosSalud=-1¢roNombre=&CenAm=-1&CenAi=-1&d=19-12-2023&idAgenda=undefined&fp=19-12-2023&rp=&ipac=0&idreserva=&buscar-nombre=&dispositivo=2&cal=1&linkPortal="},{name:"Adulto",link:"https://www.alemana.cl/ReservaDeHoras/resultado-busqueda-area.aspx?idEmp=2&horario=todas&su=-1&idioma=todas&valorArea=Vacunas+Adulto&Am=229,0&Ai=-1&CentrosSalud=-1¢roNombre=&CenAm=-1&CenAi=-1&d=20-12-2023&idAgenda=undefined&fp=20-12-2023&rp=&ipac=0&idreserva=&buscar-nombre=&dispositivo=2&cal=1&linkPortal="},{name:"Covid-19",link:"https://www.clinicaalemana.cl/covid-19"},{name:"Influenza",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/influenza-2023"},{name:"Viajeros",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/reserva-vacuna-fiebre-amarilla"},{name:"TeleAsesor\xEDa pedi\xE1trica",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/asesoria-en-vacunacion-pediatrica"}]}];class Ct extends w{static styles=Yt;static shadowRootOptions={...w.shadowRootOptions,mode:"open"};static properties={theme:{type:String},hidden:{type:Boolean},title:{type:String},tipoDeAtencion:{type:String},modalidad:{type:String},dataTipoDeAtencion:{type:Array},dataModalidad:{type:Array},focused:{type:Boolean},home:{type:Boolean},onlyView:{type:Boolean}};constructor(){super(),this.hidden=!1,this.tipoDeAtencion="",this.modalidad="",this.dataTipoDeAtencion=[],this.dataModalidad=[],this.focused=!1,this.refresh=!1,this.link=""}changeHandler(t){const e=t.target.name;if(this[e]=t.composedPath()[0].value,this.handleErrorTipoDeAtencion(!1),this.handleErrorModalidad(!1),e==="tipoDeAtencion"){this.modalidad="",this.refresh=!0,this.handleFocusModalidad(!0),this.handleFocusTipoDeAtencion(!1);const i=et.find(o=>o.name===this.tipoDeAtencion).items.map(o=>o.name);this.dataModalidad=[...i],this.requestUpdate(),setTimeout(()=>{this.refresh=!1,this.requestUpdate()},100)}e==="modalidad"&&this.handleFocusModalidad(!1),this.handleLink()}handleFocusTipoDeAtencion(t){this.shadowRoot.getElementById("tipoDeAtencion")?.setAttribute("active",t)}handleFocusModalidad(t){this.shadowRoot.getElementById("modalidad")?.setAttribute("active",t)}handleErrorTipoDeAtencion(t){const e=this.shadowRoot.getElementById("tipoDeAtencion");t?e?.setAttribute("isSelectError",!0):e?.removeAttribute("isSelectError")}handleErrorModalidad(t){const e=this.shadowRoot.getElementById("modalidad");t?e?.setAttribute("isSelectError",!0):e?.removeAttribute("isSelectError")}handleLink(){let t="";this.tipoDeAtencion!==""&&this.modalidad!==""&&(t=et.find(i=>i.name===this.tipoDeAtencion).items.find(i=>i.name===this.modalidad).link),this.link=t;const e=this.shadowRoot.querySelector(".btn-action");this.link!==""?e.setAttribute("href",this.link):e.removeAttribute("href")}submit(){this.link!==""?this.handleMark({category:"reservar_hora"}):this.tipoDeAtencion===""?(this.handleErrorTipoDeAtencion(!0),this.handleErrorModalidad(!0)):(this.handleFocusModalidad(!1),this.handleErrorModalidad(!0))}handleMark({category:t,action:e,label:i}){try{window.dataLayer.push({event:"evento-interactivo","evento-interactivo-categoria":t,"evento-interactivo-accion":e??this.tipoDeAtencion,"evento-interactivo-etiqueta":i??this.modalidad})}catch{console.log("event push failed")}}eventHandler(){this.removeAttribute("hidden");let t=this.shadowRoot.getElementById("backdrop");t.style.display="flex",this.hidden=!1,this.focused=!0,this.requestUpdate()}firstUpdated(){if(this.handleParameter(),this.onlyView||document.addEventListener("openBookingBox",()=>{this.eventHandler()}),window.innerWidth>1023){const t=this.shadowRoot.querySelector(".booking-box");let e=this.shadowRoot.getElementById("backdrop");t.addEventListener("focusin",()=>{this.focused=!0,e.style.display="flex",this.requestUpdate()})}}handleParameter(){new URLSearchParams(window.location.search).get("rsv")==="true"&&this.eventHandler()}closeHandler(){let t=this.shadowRoot.getElementById("backdrop");t.style.display="none",this.hidden=!1,this.focused=!1,this.requestUpdate()}handleOverrideTime(){this.handleMark({category:"anular_hora"})}render(){const t=kt({"booking-box":!0,hidden:this.hidden,home:this.home,focused:this.focused}),e=kt({backdrop:!0,hidden:this.hidden});return tt`
|
|
268
274
|
<div class="${e}" id="backdrop" @click="${this.closeHandler}"></div>
|
|
269
275
|
<div class="booking-box-main-cont" id="booking-box-main-cont">
|
|
270
276
|
<div class="${t}" id="booking-box" tabindex="0">
|
|
@@ -287,13 +293,13 @@
|
|
|
287
293
|
name="tipoDeAtencion"
|
|
288
294
|
id="tipoDeAtencion"
|
|
289
295
|
secondaryIcon="flat-doctor"
|
|
290
|
-
.data="${
|
|
296
|
+
.data="${et.map(i=>i.name)}"
|
|
291
297
|
></cas-select>
|
|
292
298
|
</div>
|
|
293
299
|
|
|
294
300
|
<div class="option-item">
|
|
295
301
|
<slot name="b-option-2"></slot>
|
|
296
|
-
${this.refresh?
|
|
302
|
+
${this.refresh?tt` <div class="skeleton-input"></div> `:tt`
|
|
297
303
|
<cas-select
|
|
298
304
|
theme="${this.theme}"
|
|
299
305
|
label="${this.tipoDeAtencion==="Vacunas"?"Tipo":"Modalidad"}"
|
|
@@ -323,4 +329,4 @@
|
|
|
323
329
|
</div>
|
|
324
330
|
</div>
|
|
325
331
|
</div>
|
|
326
|
-
</div>`}}customElements.get("cas-booking-box")||customElements.define("cas-booking-box",
|
|
332
|
+
</div>`}}customElements.get("cas-booking-box")||customElements.define("cas-booking-box",Ct),y.CasBookingBox=Ct,Object.defineProperties(y,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|