cas-ds-web-components 1.3.24 → 1.3.26
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 +31 -18
- package/build/cas-accordion.js +31 -18
- package/build/cas-booking-box.js +1 -1
- package/build/cas-ds-web-components.js +28 -11
- package/build/cas-ds-web-components.mjs +28 -11
- package/build/cas-header.js +2 -2
- package/package.json +1 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
(function(A,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("@eloisa-ds/base-styles")):typeof define=="function"&&define.amd?define(["exports","@eloisa-ds/base-styles"],p):(A=typeof globalThis<"u"?globalThis:A||self,p(A["cas-accordion"]={},A.baseStyles))})(this,function(A,p){"use strict";var
|
|
1
|
+
(function(A,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("@eloisa-ds/base-styles")):typeof define=="function"&&define.amd?define(["exports","@eloisa-ds/base-styles"],p):(A=typeof globalThis<"u"?globalThis:A||self,p(A["cas-accordion"]={},A.baseStyles))})(this,function(A,p){"use strict";var Te=Object.defineProperty;var Me=(A,p,g)=>p in A?Te(A,p,{enumerable:!0,configurable:!0,writable:!0,value:g}):A[p]=g;var Q=(A,p,g)=>(Me(A,typeof p!="symbol"?p+"":p,g),g);/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const g=window,X=g.ShadowRoot&&(g.ShadyCSS===void 0||g.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,tt=Symbol(),vt=new WeakMap;let _t=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==tt)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(X&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=vt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&vt.set(e,t))}return t}toString(){return this.cssText}};const f=n=>new _t(typeof n=="string"?n:n+"",void 0,tt),
|
|
5
|
+
*/const g=window,X=g.ShadowRoot&&(g.ShadyCSS===void 0||g.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,tt=Symbol(),vt=new WeakMap;let _t=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==tt)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(X&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=vt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&vt.set(e,t))}return t}toString(){return this.cssText}};const f=n=>new _t(typeof n=="string"?n:n+"",void 0,tt),Yt=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((i,s,o)=>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)+n[o+1],n[0]);return new _t(e,n,tt)},Ft=(n,t)=>{X?n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),s=g.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,n.appendChild(i)})},At=X?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return f(e)})(n):n;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var et;const q=window,ft=q.trustedTypes,
|
|
9
|
+
*/var et;const q=window,ft=q.trustedTypes,Qt=ft?ft.emptyScript:"",gt=q.reactiveElementPolyfillSupport,it={toAttribute(n,t){switch(t){case Boolean:n=n?Qt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},mt=(n,t)=>t!==n&&(t==t||n==n),st={attribute:!0,type:String,converter:it,reflect:!1,hasChanged:mt},nt="finalized";let T=class 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=st){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 o=this[t];this[e]=s,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||st}static finalize(){if(this.hasOwnProperty(nt))return!1;this[nt]=!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 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=st){var s;const o=this.constructor._$Ep(t,i);if(o!==void 0&&i.reflect===!0){const r=(((s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?i.converter:it).toAttribute(e,i.type);this._$El=t,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,o=s._$Ev.get(t);if(o!==void 0&&this._$El!==o){const r=s.getPropertyOptions(o),a=typeof r.converter=="function"?{fromAttribute:r.converter}:((i=r.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?r.converter:it;this._$El=o,this[o]=a.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||mt)(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,o)=>this[o]=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 o;return(o=s.hostUpdate)===null||o===void 0?void 0:o.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){}};T[nt]=!0,T.elementProperties=new Map,T.elementStyles=[],T.shadowRootOptions={mode:"open"},gt==null||gt({ReactiveElement:T}),((et=q.reactiveElementVersions)!==null&&et!==void 0?et:q.reactiveElementVersions=[]).push("1.6.3");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var ot;const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),wt=/'/g,Ct=/"/g,Ht=/^(?:script|style|textarea|title)$/i,
|
|
13
|
+
*/var ot;const G=window,M=G.trustedTypes,yt=M?M.createPolicy("lit-html",{createHTML:n=>n}):void 0,rt="$lit$",y=`lit$${(Math.random()+"").slice(9)}$`,xt="?"+y,Xt=`<${xt}>`,b=document,J=()=>b.createComment(""),I=n=>n===null||typeof n!="object"&&typeof n!="function",bt=Array.isArray,te=n=>bt(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",lt=`[
|
|
14
|
+
\f\r]`,B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Et=/-->/g,St=/>/g,E=RegExp(`>|${lt}(?:([^\\s"'>=/]+)(${lt}*=${lt}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),wt=/'/g,Ct=/"/g,Ht=/^(?:script|style|textarea|title)$/i,ee=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),ie=ee(1),N=Symbol.for("lit-noChange"),v=Symbol.for("lit-nothing"),Tt=new WeakMap,S=b.createTreeWalker(b,129,null,!1);function Mt(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return yt!==void 0?yt.createHTML(t):t}const se=(n,t)=>{const e=n.length-1,i=[];let s,o=t===2?"<svg>":"",r=B;for(let a=0;a<e;a++){const l=n[a];let h,c,d=-1,u=0;for(;u<l.length&&(r.lastIndex=u,c=r.exec(l),c!==null);)u=r.lastIndex,r===B?c[1]==="!--"?r=Et:c[1]!==void 0?r=St:c[2]!==void 0?(Ht.test(c[2])&&(s=RegExp("</"+c[2],"g")),r=E):c[3]!==void 0&&(r=E):r===E?c[0]===">"?(r=s??B,d=-1):c[1]===void 0?d=-2:(d=r.lastIndex-c[2].length,h=c[1],r=c[3]===void 0?E:c[3]==='"'?Ct:wt):r===Ct||r===wt?r=E:r===Et||r===St?r=B:(r=E,s=void 0);const $=r===E&&n[a+1].startsWith("/>")?" ":"";o+=r===B?l+Xt:d>=0?(i.push(h),l.slice(0,d)+rt+l.slice(d)+y+$):l+y+(d===-2?(i.push(void 0),a):$)}return[Mt(n,o+(n[e]||"<?>")+(t===2?"</svg>":"")),i]};let ht=class Jt{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const a=t.length-1,l=this.parts,[h,c]=se(t,e);if(this.el=Jt.createElement(h,i),S.currentNode=this.el.content,e===2){const d=this.el.content,u=d.firstChild;u.remove(),d.append(...u.childNodes)}for(;(s=S.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes()){const d=[];for(const u of s.getAttributeNames())if(u.endsWith(rt)||u.startsWith(y)){const $=c[r++];if(d.push(u),$!==void 0){const $t=s.getAttribute($.toLowerCase()+rt).split(y),m=/([.?@])?(.*)/.exec($);l.push({type:1,index:o,name:m[2],strings:$t,ctor:m[1]==="."?oe:m[1]==="?"?le:m[1]==="@"?he:K})}else l.push({type:6,index:o})}for(const u of d)s.removeAttribute(u)}if(Ht.test(s.tagName)){const d=s.textContent.split(y),u=d.length-1;if(u>0){s.textContent=M?M.emptyScript:"";for(let $=0;$<u;$++)s.append(d[$],J()),S.nextNode(),l.push({type:2,index:++o});s.append(d[u],J())}}}else if(s.nodeType===8)if(s.data===xt)l.push({type:2,index:o});else{let d=-1;for(;(d=s.data.indexOf(y,d+1))!==-1;)l.push({type:7,index:o}),d+=y.length-1}o++}}static createElement(t,e){const i=b.createElement("template");return i.innerHTML=t,i}};function U(n,t,e=n,i){var s,o,r,a;if(t===N)return t;let l=i!==void 0?(s=e._$Co)===null||s===void 0?void 0:s[i]:e._$Cl;const h=I(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),h===void 0?l=void 0:(l=new h(n),l._$AT(n,e,i)),i!==void 0?((r=(a=e)._$Co)!==null&&r!==void 0?r:a._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=U(n,l._$AS(n,t.values),l,i)),t}let ne=class{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,o=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:b).importNode(i,!0);S.currentNode=o;let r=S.nextNode(),a=0,l=0,h=s[0];for(;h!==void 0;){if(a===h.index){let c;h.type===2?c=new Nt(r,r.nextSibling,this,t):h.type===1?c=new h.ctor(r,h.name,h.strings,this,t):h.type===6&&(c=new ae(r,this,t)),this._$AV.push(c),h=s[++l]}a!==(h==null?void 0:h.index)&&(r=S.nextNode(),a++)}return S.currentNode=b,o}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++}},Nt=class Kt{constructor(t,e,i,s){var o;this.type=2,this._$AH=v,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=(o=s==null?void 0:s.isConnected)===null||o===void 0||o}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==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=U(this,t,e),I(t)?t===v||t==null||t===""?(this._$AH!==v&&this._$AR(),this._$AH=v):t!==this._$AH&&t!==N&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):te(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!==v&&I(this._$AH)?this._$AA.nextSibling.data=t:this.$(b.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=ht.createElement(Mt(s.h,s.h[0]),this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.v(i);else{const r=new ne(o,this),a=r.u(this.options);r.v(i),this.$(a),this._$AH=r}}_$AC(t){let e=Tt.get(t.strings);return e===void 0&&Tt.set(t.strings,e=new ht(t)),e}T(t){bt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new Kt(this.k(J()),this.k(J()),this,this.options)):i=e[s],i._$AI(o),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))}},K=class{constructor(t,e,i,s,o){this.type=1,this._$AH=v,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=v}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(o===void 0)t=U(this,t,e,0),r=!I(t)||t!==this._$AH&&t!==N,r&&(this._$AH=t);else{const a=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=U(this,a[i+l],e,l),h===N&&(h=this._$AH[l]),r||(r=!I(h)||h!==this._$AH[l]),h===v?t=v:t!==v&&(t+=(h??"")+o[l+1]),this._$AH[l]=h}r&&!s&&this.j(t)}j(t){t===v?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},oe=class extends K{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===v?void 0:t}};const re=M?M.emptyScript:"";let le=class extends K{constructor(){super(...arguments),this.type=4}j(t){t&&t!==v?this.element.setAttribute(this.name,re):this.element.removeAttribute(this.name)}},he=class extends K{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=(i=U(this,t,e,0))!==null&&i!==void 0?i:v)===N)return;const s=this._$AH,o=t===v&&s!==v||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==v&&(s===v||o);o&&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)}},ae=class{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){U(this,t)}};const Ut=G.litHtmlPolyfillSupport;Ut==null||Ut(ht,Nt),((ot=G.litHtmlVersions)!==null&&ot!==void 0?ot:G.litHtmlVersions=[]).push("2.8.0");/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/var at;const
|
|
20
|
-
\f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
21
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
19
|
+
*/var at;const Y=window,P=Y.trustedTypes,Pt=P?P.createPolicy("lit-html",{createHTML:n=>n}):void 0,ct="$lit$",x=`lit$${(Math.random()+"").slice(9)}$`,Rt="?"+x,ce=`<${Rt}>`,w=document,j=()=>w.createComment(""),z=n=>n===null||typeof n!="object"&&typeof n!="function",kt=Array.isArray,de=n=>kt(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",dt=`[
|
|
20
|
+
\f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Lt=/-->/g,Ot=/>/g,C=RegExp(`>|${dt}(?:([^\\s"'>=/]+)(${dt}*=${dt}*(?:[^
|
|
21
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),It=/'/g,Bt=/"/g,jt=/^(?:script|style|textarea|title)$/i,R=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),zt=new WeakMap,H=w.createTreeWalker(w,129,null,!1);function Dt(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Pt!==void 0?Pt.createHTML(t):t}const ue=(n,t)=>{const e=n.length-1,i=[];let s,o=t===2?"<svg>":"",r=D;for(let a=0;a<e;a++){const l=n[a];let h,c,d=-1,u=0;for(;u<l.length&&(r.lastIndex=u,c=r.exec(l),c!==null);)u=r.lastIndex,r===D?c[1]==="!--"?r=Lt:c[1]!==void 0?r=Ot:c[2]!==void 0?(jt.test(c[2])&&(s=RegExp("</"+c[2],"g")),r=C):c[3]!==void 0&&(r=C):r===C?c[0]===">"?(r=s??D,d=-1):c[1]===void 0?d=-2:(d=r.lastIndex-c[2].length,h=c[1],r=c[3]===void 0?C:c[3]==='"'?Bt:It):r===Bt||r===It?r=C:r===Lt||r===Ot?r=D:(r=C,s=void 0);const $=r===C&&n[a+1].startsWith("/>")?" ":"";o+=r===D?l+ce:d>=0?(i.push(h),l.slice(0,d)+ct+l.slice(d)+x+$):l+x+(d===-2?(i.push(void 0),a):$)}return[Dt(n,o+(n[e]||"<?>")+(t===2?"</svg>":"")),i]};class V{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const a=t.length-1,l=this.parts,[h,c]=ue(t,e);if(this.el=V.createElement(h,i),H.currentNode=this.el.content,e===2){const d=this.el.content,u=d.firstChild;u.remove(),d.append(...u.childNodes)}for(;(s=H.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes()){const d=[];for(const u of s.getAttributeNames())if(u.endsWith(ct)||u.startsWith(x)){const $=c[r++];if(d.push(u),$!==void 0){const $t=s.getAttribute($.toLowerCase()+ct).split(x),m=/([.?@])?(.*)/.exec($);l.push({type:1,index:o,name:m[2],strings:$t,ctor:m[1]==="."?$e:m[1]==="?"?_e:m[1]==="@"?Ae:F})}else l.push({type:6,index:o})}for(const u of d)s.removeAttribute(u)}if(jt.test(s.tagName)){const d=s.textContent.split(x),u=d.length-1;if(u>0){s.textContent=P?P.emptyScript:"";for(let $=0;$<u;$++)s.append(d[$],j()),H.nextNode(),l.push({type:2,index:++o});s.append(d[u],j())}}}else if(s.nodeType===8)if(s.data===Rt)l.push({type:2,index:o});else{let d=-1;for(;(d=s.data.indexOf(x,d+1))!==-1;)l.push({type:7,index:o}),d+=x.length-1}o++}}static createElement(t,e){const i=w.createElement("template");return i.innerHTML=t,i}}function k(n,t,e=n,i){var s,o,r,a;if(t===R)return t;let l=i!==void 0?(s=e._$Co)===null||s===void 0?void 0:s[i]:e._$Cl;const h=z(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),h===void 0?l=void 0:(l=new h(n),l._$AT(n,e,i)),i!==void 0?((r=(a=e)._$Co)!==null&&r!==void 0?r:a._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=k(n,l._$AS(n,t.values),l,i)),t}class pe{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,o=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:w).importNode(i,!0);H.currentNode=o;let r=H.nextNode(),a=0,l=0,h=s[0];for(;h!==void 0;){if(a===h.index){let c;h.type===2?c=new W(r,r.nextSibling,this,t):h.type===1?c=new h.ctor(r,h.name,h.strings,this,t):h.type===6&&(c=new fe(r,this,t)),this._$AV.push(c),h=s[++l]}a!==(h==null?void 0:h.index)&&(r=H.nextNode(),a++)}return H.currentNode=w,o}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 W{constructor(t,e,i,s){var o;this.type=2,this._$AH=_,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=(o=s==null?void 0:s.isConnected)===null||o===void 0||o}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==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=k(this,t,e),z(t)?t===_||t==null||t===""?(this._$AH!==_&&this._$AR(),this._$AH=_):t!==this._$AH&&t!==R&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):de(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!==_&&z(this._$AH)?this._$AA.nextSibling.data=t:this.$(w.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=V.createElement(Dt(s.h,s.h[0]),this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.v(i);else{const r=new pe(o,this),a=r.u(this.options);r.v(i),this.$(a),this._$AH=r}}_$AC(t){let e=zt.get(t.strings);return e===void 0&&zt.set(t.strings,e=new V(t)),e}T(t){kt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new W(this.k(j()),this.k(j()),this,this.options)):i=e[s],i._$AI(o),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 F{constructor(t,e,i,s,o){this.type=1,this._$AH=_,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=_}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(o===void 0)t=k(this,t,e,0),r=!z(t)||t!==this._$AH&&t!==R,r&&(this._$AH=t);else{const a=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=k(this,a[i+l],e,l),h===R&&(h=this._$AH[l]),r||(r=!z(h)||h!==this._$AH[l]),h===_?t=_:t!==_&&(t+=(h??"")+o[l+1]),this._$AH[l]=h}r&&!s&&this.j(t)}j(t){t===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class $e extends F{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_?void 0:t}}const ve=P?P.emptyScript:"";class _e extends F{constructor(){super(...arguments),this.type=4}j(t){t&&t!==_?this.element.setAttribute(this.name,ve):this.element.removeAttribute(this.name)}}class Ae extends F{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=(i=k(this,t,e,0))!==null&&i!==void 0?i:_)===R)return;const s=this._$AH,o=t===_&&s!==_||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==_&&(s===_||o);o&&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 fe{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){k(this,t)}}const Vt=Y.litHtmlPolyfillSupport;Vt==null||Vt(V,W),((at=Y.litHtmlVersions)!==null&&at!==void 0?at:Y.litHtmlVersions=[]).push("2.8.0");const ge=(n,t,e)=>{var i,s;const o=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:t;let r=o._$litPart$;if(r===void 0){const a=(s=e==null?void 0:e.renderBefore)!==null&&s!==void 0?s:null;o._$litPart$=r=new W(t.insertBefore(j(),a),a,void 0,e??{})}return r._$AI(n),r};/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/var ut,pt;let
|
|
25
|
+
*/var ut,pt;let L=class extends T{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=ge(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 R}};L.finalized=!0,L._$litElement$=!0,(ut=globalThis.litElementHydrateSupport)===null||ut===void 0||ut.call(globalThis,{LitElement:L});const Wt=globalThis.litElementPolyfillSupport;Wt==null||Wt({LitElement:L}),((pt=globalThis.litElementVersions)!==null&&pt!==void 0?pt:globalThis.litElementVersions=[]).push("3.3.3");/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2020 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/const
|
|
29
|
+
*/const Zt=Symbol.for(""),me=n=>{if((n==null?void 0:n.r)===Zt)return n==null?void 0:n._$litStatic$},qt=n=>({_$litStatic$:n,r:Zt}),Gt=new Map,ye=n=>(t,...e)=>{const i=e.length;let s,o;const r=[],a=[];let l,h=0,c=!1;for(;h<i;){for(l=t[h];h<i&&(o=e[h],(s=me(o))!==void 0);)l+=s+t[++h],c=!0;h!==i&&a.push(o),r.push(l),h++}if(h===i&&r.push(t[i]),c){const d=r.join("$$lit$$");(t=Gt.get(d))===void 0&&(r.raw=r,Gt.set(d,t=r)),e=a}return n(t,...e)},Z=ye(ie),xe=Yt`
|
|
30
30
|
.accordion-container {
|
|
31
31
|
position: relative;
|
|
32
32
|
box-sizing: border-box;
|
|
@@ -93,6 +93,17 @@
|
|
|
93
93
|
background: transparent;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
header .title, header .title > * {
|
|
97
|
+
color: var(--Tertiary-Tertiary_1, #203442);
|
|
98
|
+
|
|
99
|
+
font-family: Rubik;
|
|
100
|
+
font-size: 18px;
|
|
101
|
+
font-style: normal;
|
|
102
|
+
font-weight: 500;
|
|
103
|
+
line-height: 28px;
|
|
104
|
+
letter-spacing: 0.217px;
|
|
105
|
+
}
|
|
106
|
+
|
|
96
107
|
header cas-text:nth-child(2) {
|
|
97
108
|
color: ${f(p.casColorTertiary3ModeLight)};
|
|
98
109
|
}
|
|
@@ -147,18 +158,20 @@
|
|
|
147
158
|
* @license
|
|
148
159
|
* Copyright 2017 Google LLC
|
|
149
160
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
150
|
-
*/const
|
|
161
|
+
*/const be={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ee=n=>(...t)=>({_$litDirective$:n,values:t});class Se{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)}}/**
|
|
151
162
|
* @license
|
|
152
163
|
* Copyright 2018 Google LLC
|
|
153
164
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
154
|
-
*/const
|
|
155
|
-
<article part="article" class=${
|
|
165
|
+
*/const we=Ee(class extends Se{constructor(n){var t;if(super(n),n.type!==be.ATTRIBUTE||n.name!=="class"||((t=n.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(n){return" "+Object.keys(n).filter(t=>n[t]).join(" ")+" "}update(n,[t]){var e,i;if(this.it===void 0){this.it=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in t)t[o]&&!(!((e=this.nt)===null||e===void 0)&&e.has(o))&&this.it.add(o);return this.render(t)}const s=n.element.classList;this.it.forEach(o=>{o in t||(s.remove(o),this.it.delete(o))});for(const o in t){const r=!!t[o];r===this.it.has(o)||!((i=this.nt)===null||i===void 0)&&i.has(o)||(r?(s.add(o),this.it.add(o)):(s.remove(o),this.it.delete(o)))}return N}});function Ce({variant:n,open:t}){const e=we({"accordion-container":!0,[n]:!0,open:t}),s=(()=>{if(window.matchMedia("(min-width: 768px)").matches)return"desktop";if(window.matchMedia("(max-width: 767px)").matches)return"mobile"})();return{accordionStyle:e,iconSize:{desktop:"24",mobile:"16"}[s]}}const He=["h1","h2","h3","h4","h5","h6"];class O extends L{constructor(){super(),this.open=!1,this.variant="simple",this.title="",this.text="",this.headingLevel="h3"}toggleAccordion(){this.open=!this.open,this.requestUpdate()}render(){const{open:t,title:e,text:i,content:s,headingLevel:o}=this,{accordionStyle:r,iconSize:a}=Ce({variant:this.variant,open:this.open}),l={true:"flat-minus",false:"flat-plus"},h=He.includes(o)?o:"h2";return Z`
|
|
166
|
+
<article part="article" class=${r}>
|
|
156
167
|
<header part="header" @click="${this.toggleAccordion}">
|
|
157
168
|
<div class="left">
|
|
158
|
-
|
|
159
|
-
|
|
169
|
+
<slot name="title" class="title">
|
|
170
|
+
${e?Z`<${qt(h)}>${e}</${qt(h)}>`:""}
|
|
171
|
+
</slot>
|
|
172
|
+
${i?Z` <cas-text variant="footnote2">${i}</cas-text>`:""}
|
|
160
173
|
</div>
|
|
161
|
-
<cas-icon name="${
|
|
174
|
+
<cas-icon name="${l[t]}" size="${a}"></cas-icon>
|
|
162
175
|
</header>
|
|
163
176
|
${t?Z`
|
|
164
177
|
<div part="content" class="content">
|
|
@@ -167,4 +180,4 @@
|
|
|
167
180
|
</div>
|
|
168
181
|
`:""}
|
|
169
182
|
</article>
|
|
170
|
-
`}}Q(
|
|
183
|
+
`}}Q(O,"styles",xe),Q(O,"shadowRootOptions",{...L.shadowRootOptions,mode:"open"}),Q(O,"properties",{open:{type:Boolean},variant:{type:String},title:{type:String},text:{type:String},content:{type:String},headingLevel:{type:String,attribute:"heading-level"}}),customElements.get("cas-accordion")||customElements.define("cas-accordion",O),customElements.get("cas-accordion-element")||customElements.define("cas-accordion-element",class extends O{}),A.CasAccordion=O,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
package/build/cas-accordion.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
(function(A,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("@eloisa-ds/base-styles")):typeof define=="function"&&define.amd?define(["exports","@eloisa-ds/base-styles"],p):(A=typeof globalThis<"u"?globalThis:A||self,p(A["cas-accordion"]={},A.baseStyles))})(this,function(A,p){"use strict";var
|
|
1
|
+
(function(A,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("@eloisa-ds/base-styles")):typeof define=="function"&&define.amd?define(["exports","@eloisa-ds/base-styles"],p):(A=typeof globalThis<"u"?globalThis:A||self,p(A["cas-accordion"]={},A.baseStyles))})(this,function(A,p){"use strict";var Te=Object.defineProperty;var Me=(A,p,g)=>p in A?Te(A,p,{enumerable:!0,configurable:!0,writable:!0,value:g}):A[p]=g;var Q=(A,p,g)=>(Me(A,typeof p!="symbol"?p+"":p,g),g);/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const g=window,X=g.ShadowRoot&&(g.ShadyCSS===void 0||g.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,tt=Symbol(),vt=new WeakMap;let _t=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==tt)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(X&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=vt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&vt.set(e,t))}return t}toString(){return this.cssText}};const f=n=>new _t(typeof n=="string"?n:n+"",void 0,tt),
|
|
5
|
+
*/const g=window,X=g.ShadowRoot&&(g.ShadyCSS===void 0||g.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,tt=Symbol(),vt=new WeakMap;let _t=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==tt)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(X&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=vt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&vt.set(e,t))}return t}toString(){return this.cssText}};const f=n=>new _t(typeof n=="string"?n:n+"",void 0,tt),Yt=(n,...t)=>{const e=n.length===1?n[0]:t.reduce((i,s,o)=>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)+n[o+1],n[0]);return new _t(e,n,tt)},Ft=(n,t)=>{X?n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const i=document.createElement("style"),s=g.litNonce;s!==void 0&&i.setAttribute("nonce",s),i.textContent=e.cssText,n.appendChild(i)})},At=X?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return f(e)})(n):n;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/var et;const q=window,ft=q.trustedTypes,
|
|
9
|
+
*/var et;const q=window,ft=q.trustedTypes,Qt=ft?ft.emptyScript:"",gt=q.reactiveElementPolyfillSupport,it={toAttribute(n,t){switch(t){case Boolean:n=n?Qt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},mt=(n,t)=>t!==n&&(t==t||n==n),st={attribute:!0,type:String,converter:it,reflect:!1,hasChanged:mt},nt="finalized";let T=class 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=st){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 o=this[t];this[e]=s,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||st}static finalize(){if(this.hasOwnProperty(nt))return!1;this[nt]=!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 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=st){var s;const o=this.constructor._$Ep(t,i);if(o!==void 0&&i.reflect===!0){const r=(((s=i.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?i.converter:it).toAttribute(e,i.type);this._$El=t,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,o=s._$Ev.get(t);if(o!==void 0&&this._$El!==o){const r=s.getPropertyOptions(o),a=typeof r.converter=="function"?{fromAttribute:r.converter}:((i=r.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?r.converter:it;this._$El=o,this[o]=a.fromAttribute(e,r.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||mt)(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,o)=>this[o]=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 o;return(o=s.hostUpdate)===null||o===void 0?void 0:o.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){}};T[nt]=!0,T.elementProperties=new Map,T.elementStyles=[],T.shadowRootOptions={mode:"open"},gt==null||gt({ReactiveElement:T}),((et=q.reactiveElementVersions)!==null&&et!==void 0?et:q.reactiveElementVersions=[]).push("1.6.3");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/var ot;const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),wt=/'/g,Ct=/"/g,Ht=/^(?:script|style|textarea|title)$/i,
|
|
13
|
+
*/var ot;const G=window,M=G.trustedTypes,yt=M?M.createPolicy("lit-html",{createHTML:n=>n}):void 0,rt="$lit$",y=`lit$${(Math.random()+"").slice(9)}$`,xt="?"+y,Xt=`<${xt}>`,b=document,J=()=>b.createComment(""),I=n=>n===null||typeof n!="object"&&typeof n!="function",bt=Array.isArray,te=n=>bt(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",lt=`[
|
|
14
|
+
\f\r]`,B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Et=/-->/g,St=/>/g,E=RegExp(`>|${lt}(?:([^\\s"'>=/]+)(${lt}*=${lt}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),wt=/'/g,Ct=/"/g,Ht=/^(?:script|style|textarea|title)$/i,ee=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),ie=ee(1),N=Symbol.for("lit-noChange"),v=Symbol.for("lit-nothing"),Tt=new WeakMap,S=b.createTreeWalker(b,129,null,!1);function Mt(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return yt!==void 0?yt.createHTML(t):t}const se=(n,t)=>{const e=n.length-1,i=[];let s,o=t===2?"<svg>":"",r=B;for(let a=0;a<e;a++){const l=n[a];let h,c,d=-1,u=0;for(;u<l.length&&(r.lastIndex=u,c=r.exec(l),c!==null);)u=r.lastIndex,r===B?c[1]==="!--"?r=Et:c[1]!==void 0?r=St:c[2]!==void 0?(Ht.test(c[2])&&(s=RegExp("</"+c[2],"g")),r=E):c[3]!==void 0&&(r=E):r===E?c[0]===">"?(r=s??B,d=-1):c[1]===void 0?d=-2:(d=r.lastIndex-c[2].length,h=c[1],r=c[3]===void 0?E:c[3]==='"'?Ct:wt):r===Ct||r===wt?r=E:r===Et||r===St?r=B:(r=E,s=void 0);const $=r===E&&n[a+1].startsWith("/>")?" ":"";o+=r===B?l+Xt:d>=0?(i.push(h),l.slice(0,d)+rt+l.slice(d)+y+$):l+y+(d===-2?(i.push(void 0),a):$)}return[Mt(n,o+(n[e]||"<?>")+(t===2?"</svg>":"")),i]};let ht=class Jt{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const a=t.length-1,l=this.parts,[h,c]=se(t,e);if(this.el=Jt.createElement(h,i),S.currentNode=this.el.content,e===2){const d=this.el.content,u=d.firstChild;u.remove(),d.append(...u.childNodes)}for(;(s=S.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes()){const d=[];for(const u of s.getAttributeNames())if(u.endsWith(rt)||u.startsWith(y)){const $=c[r++];if(d.push(u),$!==void 0){const $t=s.getAttribute($.toLowerCase()+rt).split(y),m=/([.?@])?(.*)/.exec($);l.push({type:1,index:o,name:m[2],strings:$t,ctor:m[1]==="."?oe:m[1]==="?"?le:m[1]==="@"?he:K})}else l.push({type:6,index:o})}for(const u of d)s.removeAttribute(u)}if(Ht.test(s.tagName)){const d=s.textContent.split(y),u=d.length-1;if(u>0){s.textContent=M?M.emptyScript:"";for(let $=0;$<u;$++)s.append(d[$],J()),S.nextNode(),l.push({type:2,index:++o});s.append(d[u],J())}}}else if(s.nodeType===8)if(s.data===xt)l.push({type:2,index:o});else{let d=-1;for(;(d=s.data.indexOf(y,d+1))!==-1;)l.push({type:7,index:o}),d+=y.length-1}o++}}static createElement(t,e){const i=b.createElement("template");return i.innerHTML=t,i}};function U(n,t,e=n,i){var s,o,r,a;if(t===N)return t;let l=i!==void 0?(s=e._$Co)===null||s===void 0?void 0:s[i]:e._$Cl;const h=I(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),h===void 0?l=void 0:(l=new h(n),l._$AT(n,e,i)),i!==void 0?((r=(a=e)._$Co)!==null&&r!==void 0?r:a._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=U(n,l._$AS(n,t.values),l,i)),t}let ne=class{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,o=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:b).importNode(i,!0);S.currentNode=o;let r=S.nextNode(),a=0,l=0,h=s[0];for(;h!==void 0;){if(a===h.index){let c;h.type===2?c=new Nt(r,r.nextSibling,this,t):h.type===1?c=new h.ctor(r,h.name,h.strings,this,t):h.type===6&&(c=new ae(r,this,t)),this._$AV.push(c),h=s[++l]}a!==(h==null?void 0:h.index)&&(r=S.nextNode(),a++)}return S.currentNode=b,o}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++}},Nt=class Kt{constructor(t,e,i,s){var o;this.type=2,this._$AH=v,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=(o=s==null?void 0:s.isConnected)===null||o===void 0||o}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==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=U(this,t,e),I(t)?t===v||t==null||t===""?(this._$AH!==v&&this._$AR(),this._$AH=v):t!==this._$AH&&t!==N&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):te(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!==v&&I(this._$AH)?this._$AA.nextSibling.data=t:this.$(b.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=ht.createElement(Mt(s.h,s.h[0]),this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.v(i);else{const r=new ne(o,this),a=r.u(this.options);r.v(i),this.$(a),this._$AH=r}}_$AC(t){let e=Tt.get(t.strings);return e===void 0&&Tt.set(t.strings,e=new ht(t)),e}T(t){bt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new Kt(this.k(J()),this.k(J()),this,this.options)):i=e[s],i._$AI(o),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))}},K=class{constructor(t,e,i,s,o){this.type=1,this._$AH=v,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=v}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(o===void 0)t=U(this,t,e,0),r=!I(t)||t!==this._$AH&&t!==N,r&&(this._$AH=t);else{const a=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=U(this,a[i+l],e,l),h===N&&(h=this._$AH[l]),r||(r=!I(h)||h!==this._$AH[l]),h===v?t=v:t!==v&&(t+=(h??"")+o[l+1]),this._$AH[l]=h}r&&!s&&this.j(t)}j(t){t===v?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},oe=class extends K{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===v?void 0:t}};const re=M?M.emptyScript:"";let le=class extends K{constructor(){super(...arguments),this.type=4}j(t){t&&t!==v?this.element.setAttribute(this.name,re):this.element.removeAttribute(this.name)}},he=class extends K{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=(i=U(this,t,e,0))!==null&&i!==void 0?i:v)===N)return;const s=this._$AH,o=t===v&&s!==v||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==v&&(s===v||o);o&&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)}},ae=class{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){U(this,t)}};const Ut=G.litHtmlPolyfillSupport;Ut==null||Ut(ht,Nt),((ot=G.litHtmlVersions)!==null&&ot!==void 0?ot:G.litHtmlVersions=[]).push("2.8.0");/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/var at;const
|
|
20
|
-
\f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
21
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
19
|
+
*/var at;const Y=window,P=Y.trustedTypes,Pt=P?P.createPolicy("lit-html",{createHTML:n=>n}):void 0,ct="$lit$",x=`lit$${(Math.random()+"").slice(9)}$`,Rt="?"+x,ce=`<${Rt}>`,w=document,j=()=>w.createComment(""),z=n=>n===null||typeof n!="object"&&typeof n!="function",kt=Array.isArray,de=n=>kt(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",dt=`[
|
|
20
|
+
\f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Lt=/-->/g,Ot=/>/g,C=RegExp(`>|${dt}(?:([^\\s"'>=/]+)(${dt}*=${dt}*(?:[^
|
|
21
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),It=/'/g,Bt=/"/g,jt=/^(?:script|style|textarea|title)$/i,R=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),zt=new WeakMap,H=w.createTreeWalker(w,129,null,!1);function Dt(n,t){if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Pt!==void 0?Pt.createHTML(t):t}const ue=(n,t)=>{const e=n.length-1,i=[];let s,o=t===2?"<svg>":"",r=D;for(let a=0;a<e;a++){const l=n[a];let h,c,d=-1,u=0;for(;u<l.length&&(r.lastIndex=u,c=r.exec(l),c!==null);)u=r.lastIndex,r===D?c[1]==="!--"?r=Lt:c[1]!==void 0?r=Ot:c[2]!==void 0?(jt.test(c[2])&&(s=RegExp("</"+c[2],"g")),r=C):c[3]!==void 0&&(r=C):r===C?c[0]===">"?(r=s??D,d=-1):c[1]===void 0?d=-2:(d=r.lastIndex-c[2].length,h=c[1],r=c[3]===void 0?C:c[3]==='"'?Bt:It):r===Bt||r===It?r=C:r===Lt||r===Ot?r=D:(r=C,s=void 0);const $=r===C&&n[a+1].startsWith("/>")?" ":"";o+=r===D?l+ce:d>=0?(i.push(h),l.slice(0,d)+ct+l.slice(d)+x+$):l+x+(d===-2?(i.push(void 0),a):$)}return[Dt(n,o+(n[e]||"<?>")+(t===2?"</svg>":"")),i]};class V{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const a=t.length-1,l=this.parts,[h,c]=ue(t,e);if(this.el=V.createElement(h,i),H.currentNode=this.el.content,e===2){const d=this.el.content,u=d.firstChild;u.remove(),d.append(...u.childNodes)}for(;(s=H.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes()){const d=[];for(const u of s.getAttributeNames())if(u.endsWith(ct)||u.startsWith(x)){const $=c[r++];if(d.push(u),$!==void 0){const $t=s.getAttribute($.toLowerCase()+ct).split(x),m=/([.?@])?(.*)/.exec($);l.push({type:1,index:o,name:m[2],strings:$t,ctor:m[1]==="."?$e:m[1]==="?"?_e:m[1]==="@"?Ae:F})}else l.push({type:6,index:o})}for(const u of d)s.removeAttribute(u)}if(jt.test(s.tagName)){const d=s.textContent.split(x),u=d.length-1;if(u>0){s.textContent=P?P.emptyScript:"";for(let $=0;$<u;$++)s.append(d[$],j()),H.nextNode(),l.push({type:2,index:++o});s.append(d[u],j())}}}else if(s.nodeType===8)if(s.data===Rt)l.push({type:2,index:o});else{let d=-1;for(;(d=s.data.indexOf(x,d+1))!==-1;)l.push({type:7,index:o}),d+=x.length-1}o++}}static createElement(t,e){const i=w.createElement("template");return i.innerHTML=t,i}}function k(n,t,e=n,i){var s,o,r,a;if(t===R)return t;let l=i!==void 0?(s=e._$Co)===null||s===void 0?void 0:s[i]:e._$Cl;const h=z(t)?void 0:t._$litDirective$;return(l==null?void 0:l.constructor)!==h&&((o=l==null?void 0:l._$AO)===null||o===void 0||o.call(l,!1),h===void 0?l=void 0:(l=new h(n),l._$AT(n,e,i)),i!==void 0?((r=(a=e)._$Co)!==null&&r!==void 0?r:a._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=k(n,l._$AS(n,t.values),l,i)),t}class pe{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,o=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:w).importNode(i,!0);H.currentNode=o;let r=H.nextNode(),a=0,l=0,h=s[0];for(;h!==void 0;){if(a===h.index){let c;h.type===2?c=new W(r,r.nextSibling,this,t):h.type===1?c=new h.ctor(r,h.name,h.strings,this,t):h.type===6&&(c=new fe(r,this,t)),this._$AV.push(c),h=s[++l]}a!==(h==null?void 0:h.index)&&(r=H.nextNode(),a++)}return H.currentNode=w,o}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 W{constructor(t,e,i,s){var o;this.type=2,this._$AH=_,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=(o=s==null?void 0:s.isConnected)===null||o===void 0||o}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==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=k(this,t,e),z(t)?t===_||t==null||t===""?(this._$AH!==_&&this._$AR(),this._$AH=_):t!==this._$AH&&t!==R&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):de(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!==_&&z(this._$AH)?this._$AA.nextSibling.data=t:this.$(w.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=V.createElement(Dt(s.h,s.h[0]),this.options)),s);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.v(i);else{const r=new pe(o,this),a=r.u(this.options);r.v(i),this.$(a),this._$AH=r}}_$AC(t){let e=zt.get(t.strings);return e===void 0&&zt.set(t.strings,e=new V(t)),e}T(t){kt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new W(this.k(j()),this.k(j()),this,this.options)):i=e[s],i._$AI(o),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 F{constructor(t,e,i,s,o){this.type=1,this._$AH=_,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=_}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(o===void 0)t=k(this,t,e,0),r=!z(t)||t!==this._$AH&&t!==R,r&&(this._$AH=t);else{const a=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=k(this,a[i+l],e,l),h===R&&(h=this._$AH[l]),r||(r=!z(h)||h!==this._$AH[l]),h===_?t=_:t!==_&&(t+=(h??"")+o[l+1]),this._$AH[l]=h}r&&!s&&this.j(t)}j(t){t===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class $e extends F{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_?void 0:t}}const ve=P?P.emptyScript:"";class _e extends F{constructor(){super(...arguments),this.type=4}j(t){t&&t!==_?this.element.setAttribute(this.name,ve):this.element.removeAttribute(this.name)}}class Ae extends F{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=(i=k(this,t,e,0))!==null&&i!==void 0?i:_)===R)return;const s=this._$AH,o=t===_&&s!==_||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==_&&(s===_||o);o&&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 fe{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){k(this,t)}}const Vt=Y.litHtmlPolyfillSupport;Vt==null||Vt(V,W),((at=Y.litHtmlVersions)!==null&&at!==void 0?at:Y.litHtmlVersions=[]).push("2.8.0");const ge=(n,t,e)=>{var i,s;const o=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:t;let r=o._$litPart$;if(r===void 0){const a=(s=e==null?void 0:e.renderBefore)!==null&&s!==void 0?s:null;o._$litPart$=r=new W(t.insertBefore(j(),a),a,void 0,e??{})}return r._$AI(n),r};/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/var ut,pt;let
|
|
25
|
+
*/var ut,pt;let L=class extends T{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=ge(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 R}};L.finalized=!0,L._$litElement$=!0,(ut=globalThis.litElementHydrateSupport)===null||ut===void 0||ut.call(globalThis,{LitElement:L});const Wt=globalThis.litElementPolyfillSupport;Wt==null||Wt({LitElement:L}),((pt=globalThis.litElementVersions)!==null&&pt!==void 0?pt:globalThis.litElementVersions=[]).push("3.3.3");/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2020 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/const
|
|
29
|
+
*/const Zt=Symbol.for(""),me=n=>{if((n==null?void 0:n.r)===Zt)return n==null?void 0:n._$litStatic$},qt=n=>({_$litStatic$:n,r:Zt}),Gt=new Map,ye=n=>(t,...e)=>{const i=e.length;let s,o;const r=[],a=[];let l,h=0,c=!1;for(;h<i;){for(l=t[h];h<i&&(o=e[h],(s=me(o))!==void 0);)l+=s+t[++h],c=!0;h!==i&&a.push(o),r.push(l),h++}if(h===i&&r.push(t[i]),c){const d=r.join("$$lit$$");(t=Gt.get(d))===void 0&&(r.raw=r,Gt.set(d,t=r)),e=a}return n(t,...e)},Z=ye(ie),xe=Yt`
|
|
30
30
|
.accordion-container {
|
|
31
31
|
position: relative;
|
|
32
32
|
box-sizing: border-box;
|
|
@@ -93,6 +93,17 @@
|
|
|
93
93
|
background: transparent;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
+
header .title, header .title > * {
|
|
97
|
+
color: var(--Tertiary-Tertiary_1, #203442);
|
|
98
|
+
|
|
99
|
+
font-family: Rubik;
|
|
100
|
+
font-size: 18px;
|
|
101
|
+
font-style: normal;
|
|
102
|
+
font-weight: 500;
|
|
103
|
+
line-height: 28px;
|
|
104
|
+
letter-spacing: 0.217px;
|
|
105
|
+
}
|
|
106
|
+
|
|
96
107
|
header cas-text:nth-child(2) {
|
|
97
108
|
color: ${f(p.casColorTertiary3ModeLight)};
|
|
98
109
|
}
|
|
@@ -147,18 +158,20 @@
|
|
|
147
158
|
* @license
|
|
148
159
|
* Copyright 2017 Google LLC
|
|
149
160
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
150
|
-
*/const
|
|
161
|
+
*/const be={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ee=n=>(...t)=>({_$litDirective$:n,values:t});class Se{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)}}/**
|
|
151
162
|
* @license
|
|
152
163
|
* Copyright 2018 Google LLC
|
|
153
164
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
154
|
-
*/const
|
|
155
|
-
<article part="article" class=${
|
|
165
|
+
*/const we=Ee(class extends Se{constructor(n){var t;if(super(n),n.type!==be.ATTRIBUTE||n.name!=="class"||((t=n.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(n){return" "+Object.keys(n).filter(t=>n[t]).join(" ")+" "}update(n,[t]){var e,i;if(this.it===void 0){this.it=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(const o in t)t[o]&&!(!((e=this.nt)===null||e===void 0)&&e.has(o))&&this.it.add(o);return this.render(t)}const s=n.element.classList;this.it.forEach(o=>{o in t||(s.remove(o),this.it.delete(o))});for(const o in t){const r=!!t[o];r===this.it.has(o)||!((i=this.nt)===null||i===void 0)&&i.has(o)||(r?(s.add(o),this.it.add(o)):(s.remove(o),this.it.delete(o)))}return N}});function Ce({variant:n,open:t}){const e=we({"accordion-container":!0,[n]:!0,open:t}),s=(()=>{if(window.matchMedia("(min-width: 768px)").matches)return"desktop";if(window.matchMedia("(max-width: 767px)").matches)return"mobile"})();return{accordionStyle:e,iconSize:{desktop:"24",mobile:"16"}[s]}}const He=["h1","h2","h3","h4","h5","h6"];class O extends L{constructor(){super(),this.open=!1,this.variant="simple",this.title="",this.text="",this.headingLevel="h3"}toggleAccordion(){this.open=!this.open,this.requestUpdate()}render(){const{open:t,title:e,text:i,content:s,headingLevel:o}=this,{accordionStyle:r,iconSize:a}=Ce({variant:this.variant,open:this.open}),l={true:"flat-minus",false:"flat-plus"},h=He.includes(o)?o:"h2";return Z`
|
|
166
|
+
<article part="article" class=${r}>
|
|
156
167
|
<header part="header" @click="${this.toggleAccordion}">
|
|
157
168
|
<div class="left">
|
|
158
|
-
|
|
159
|
-
|
|
169
|
+
<slot name="title" class="title">
|
|
170
|
+
${e?Z`<${qt(h)}>${e}</${qt(h)}>`:""}
|
|
171
|
+
</slot>
|
|
172
|
+
${i?Z` <cas-text variant="footnote2">${i}</cas-text>`:""}
|
|
160
173
|
</div>
|
|
161
|
-
<cas-icon name="${
|
|
174
|
+
<cas-icon name="${l[t]}" size="${a}"></cas-icon>
|
|
162
175
|
</header>
|
|
163
176
|
${t?Z`
|
|
164
177
|
<div part="content" class="content">
|
|
@@ -167,4 +180,4 @@
|
|
|
167
180
|
</div>
|
|
168
181
|
`:""}
|
|
169
182
|
</article>
|
|
170
|
-
`}}Q(
|
|
183
|
+
`}}Q(O,"styles",xe),Q(O,"shadowRootOptions",{...L.shadowRootOptions,mode:"open"}),Q(O,"properties",{open:{type:Boolean},variant:{type:String},title:{type:String},text:{type:String},content:{type:String},headingLevel:{type:String,attribute:"heading-level"}}),customElements.get("cas-accordion")||customElements.define("cas-accordion",O),customElements.get("cas-accordion-element")||customElements.define("cas-accordion-element",class extends O{}),A.CasAccordion=O,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
package/build/cas-booking-box.js
CHANGED
|
@@ -306,7 +306,7 @@
|
|
|
306
306
|
* @license
|
|
307
307
|
* Copyright 2018 Google LLC
|
|
308
308
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
309
|
-
*/const qt=ke(class extends Ee{constructor(n){var t;if(super(n),n.type!==we.ATTRIBUTE||n.name!=="class"||((t=n.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(n){return" "+Object.keys(n).filter(t=>n[t]).join(" ")+" "}update(n,[t]){var e,i;if(this.it===void 0){this.it=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in t)t[a]&&!(!((e=this.nt)===null||e===void 0)&&e.has(a))&&this.it.add(a);return this.render(t)}const o=n.element.classList;this.it.forEach(a=>{a in t||(o.remove(a),this.it.delete(a))});for(const a in t){const s=!!t[a];s===this.it.has(a)||!((i=this.nt)===null||i===void 0)&&i.has(a)||(s?(o.add(a),this.it.add(a)):(o.remove(a),this.it.delete(a)))}return H}}),Se=[{name:"Consulta médica",items:[{name:"Consulta pediátrica",link:"https://www.clinicaalemana.cl/consulta-pediatrica-2026"},{name:"Presencial",link:"https://reserva.alemana.cl/reserva/portal/busqueda"},{name:"
|
|
309
|
+
*/const qt=ke(class extends Ee{constructor(n){var t;if(super(n),n.type!==we.ATTRIBUTE||n.name!=="class"||((t=n.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(n){return" "+Object.keys(n).filter(t=>n[t]).join(" ")+" "}update(n,[t]){var e,i;if(this.it===void 0){this.it=new Set,n.strings!==void 0&&(this.nt=new Set(n.strings.join(" ").split(/\s/).filter(a=>a!=="")));for(const a in t)t[a]&&!(!((e=this.nt)===null||e===void 0)&&e.has(a))&&this.it.add(a);return this.render(t)}const o=n.element.classList;this.it.forEach(a=>{a in t||(o.remove(a),this.it.delete(a))});for(const a in t){const s=!!t[a];s===this.it.has(a)||!((i=this.nt)===null||i===void 0)&&i.has(a)||(s?(o.add(a),this.it.add(a)):(o.remove(a),this.it.delete(a)))}return H}}),Se=[{name:"Consulta médica",items:[{name:"Consulta pediátrica",link:"https://www.clinicaalemana.cl/consulta-pediatrica-2026"},{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:"Teledermatología",link:"https://teledermatologia.clinicaalemana.cl/"}]},{name:"Rehabilitación y bienestar",items:[{name:"Kinesiología",link:"https://agenda.clinicaalemana.cl/rehabilitacion-y-bienestar/seleccion-categoria"},{name:"Masoterapia",link:"https://agenda.clinicaalemana.cl/examenes-y-procedimientos/masoterapia/masoterapia-masaje-deportivo/disponibilidad"}]},{name:"Exámenes 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:"Viajeros",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/reserva-vacuna-fiebre-amarilla"},{name:"TeleAsesoría pediátrica",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/asesoria-en-vacunacion-pediatrica"}]}],Ce=[{name:"Consulta médica",link:"https://reserva.clinicaalemana.cl/alemana-integral"},{name:"Exámenes y procedimientos",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"}],pt=Se,Wt=Ce;class V extends R{constructor(){super(),this.hidden=!1,this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.dataTipoDeAtencion=[],this.dataModalidad=[],this.opcionSelecionada="Paciente",this.focused=!1,this.refresh=!1,this.link=""}changeHandler(t){var i,o;const e=t.target.name;if(this[e]=t.composedPath()[0].value,this.handleErrorTipoDeAtencion(!1),this.handleErrorModalidad(!1),e==="tipoDeAtencionIntegral"&&(this.tipoDeAtencion="",this.modalidad=""),e==="tipoDeAtencion"){this.modalidad="",this.refresh=!0,this.handleFocusModalidad(!0),this.handleFocusTipoDeAtencion(!1);const a=((o=(i=pt.find(s=>s.name===this.tipoDeAtencion))==null?void 0:i.items)==null?void 0:o.map(s=>s.name))||[];t.target.value==="Consulta pediátrica"&&this.handleLink(),this.dataModalidad=[...a],this.requestUpdate(),setTimeout(()=>{this.refresh=!1,this.requestUpdate()},100)}e==="modalidad"&&this.handleFocusModalidad(!1),this.handleLink()}handleFocusTipoDeAtencion(t){const e=this.shadowRoot.getElementById("tipoDeAtencion");e==null||e.setAttribute("active",t)}handleFocusModalidad(t){const e=this.shadowRoot.getElementById("modalidad");e==null||e.setAttribute("active",t)}handleErrorTipoDeAtencion(t){const e=this.shadowRoot.getElementById("tipoDeAtencion");t?e==null||e.setAttribute("isSelectError",!0):e==null||e.removeAttribute("isSelectError")}handleErrorModalidad(t){const e=this.shadowRoot.getElementById("modalidad");t?e==null||e.setAttribute("isSelectError",!0):e==null||e.removeAttribute("isSelectError")}handleLink(){let t="";this.tipoDeAtencionIntegral!==""&&(t=Wt.find(i=>i.name===this.tipoDeAtencionIntegral).link),this.tipoDeAtencion!==""&&this.modalidad!==""&&(t=pt.find(i=>i.name===this.tipoDeAtencion).items.find(i=>i.name===this.modalidad).link),this.tipoDeAtencion==="Consulta pediátrica"&&(t="https://www.clinicaalemana.cl/consulta-pediatrica-2025"),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}){const o={event:"evento-interactivo","evento-interactivo-categoria":t,"evento-interactivo-accion":e||this.tipoDeAtencion||this.tipoDeAtencionIntegral||"reservar_hora","evento-interactivo-etiqueta":i||this.modalidad,opcion_seleccionada:this.opcionSelecionada};console.log("devLayer_ ",o);try{window.dataLayer.push(o)}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(),setTimeout(()=>{this.handleTab()},1e3),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()})}}handleTab(t){this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.handleLink();const e={1:"Paciente",2:"Alemana Integral"};this.opcionSelecionada=e[t]??"Paciente";const i=this.shadowRoot.querySelectorAll("[data-view]");if(t){const o=this.shadowRoot.querySelectorAll(".top .item");this.shadowRoot.querySelector(".option-box").setAttribute("current-view",t.toString()),i.forEach(s=>{s.getAttribute("data-view")===t.toString()?s.style.display="flex":s.style.display="none"}),o.forEach(s=>{s.getAttribute("data-tab")===t.toString()?s.querySelector("cas-radio").setAttribute("checked",!0):s.querySelector("cas-radio").removeAttribute("checked")})}else Array.from(i).filter(a=>a.getAttribute("data-view")==="2").forEach(a=>{a.style.display="none"})}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=qt({"booking-box":!0,hidden:this.hidden,home:this.home,focused:this.focused}),e=qt({backdrop:!0,hidden:this.hidden});return ct`
|
|
310
310
|
<div class="${e}" id="backdrop" @click="${this.closeHandler}"></div>
|
|
311
311
|
<div class="booking-box-main-cont" id="booking-box-main-cont">
|
|
312
312
|
<div class="${t}" id="booking-box" tabindex="0">
|
|
@@ -16,7 +16,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16
16
|
document.head.appendChild(font2);
|
|
17
17
|
})();
|
|
18
18
|
const name = "@eloisa-ds/all-components";
|
|
19
|
-
const version$1 = "1.3.
|
|
19
|
+
const version$1 = "1.3.26";
|
|
20
20
|
const dependencies = {};
|
|
21
21
|
const main = "./index.js";
|
|
22
22
|
const module$1 = "./index.mjs";
|
|
@@ -2812,10 +2812,10 @@ var __publicField = (obj, key, value) => {
|
|
|
2812
2812
|
name: "Presencial",
|
|
2813
2813
|
link: "https://reserva.alemana.cl/reserva/portal/busqueda"
|
|
2814
2814
|
},
|
|
2815
|
-
{
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
},
|
|
2815
|
+
// {
|
|
2816
|
+
// name: 'Maitencillo',
|
|
2817
|
+
// link: 'https://www.clinicaalemana.cl/sucursales/centros-medicos/centro-medico-maitencillo',
|
|
2818
|
+
// },
|
|
2819
2819
|
{
|
|
2820
2820
|
name: "Teleconsulta",
|
|
2821
2821
|
link: "https://agenda.clinicaalemana.cl/paciente"
|
|
@@ -25091,7 +25091,7 @@ var __publicField = (obj, key, value) => {
|
|
|
25091
25091
|
devMode: { type: String }
|
|
25092
25092
|
});
|
|
25093
25093
|
customElements.get("cas-header") || customElements.define("cas-header", CasHeader);
|
|
25094
|
-
customElements.get("cas-header-pre-head
|
|
25094
|
+
customElements.get("cas-header-pre-head") || customElements.define("cas-header-pre-head", PreHead);
|
|
25095
25095
|
customElements.get("cas-header-head") || customElements.define("cas-header-head", Head);
|
|
25096
25096
|
customElements.get("cas-header-search") || customElements.define("cas-header-search", Search);
|
|
25097
25097
|
customElements.get("cas-header-taxonomy") || customElements.define("cas-header-taxonomy", Taxonomy$1);
|
|
@@ -26012,6 +26012,17 @@ var __publicField = (obj, key, value) => {
|
|
|
26012
26012
|
background: transparent;
|
|
26013
26013
|
}
|
|
26014
26014
|
|
|
26015
|
+
header .title, header .title > * {
|
|
26016
|
+
color: var(--Tertiary-Tertiary_1, #203442);
|
|
26017
|
+
|
|
26018
|
+
font-family: Rubik;
|
|
26019
|
+
font-size: 18px;
|
|
26020
|
+
font-style: normal;
|
|
26021
|
+
font-weight: 500;
|
|
26022
|
+
line-height: 28px;
|
|
26023
|
+
letter-spacing: 0.217px;
|
|
26024
|
+
}
|
|
26025
|
+
|
|
26015
26026
|
header cas-text:nth-child(2) {
|
|
26016
26027
|
color: ${r$a(casColorTertiary3ModeLight)};
|
|
26017
26028
|
}
|
|
@@ -26086,6 +26097,7 @@ var __publicField = (obj, key, value) => {
|
|
|
26086
26097
|
iconSize: iconSize[match]
|
|
26087
26098
|
};
|
|
26088
26099
|
}
|
|
26100
|
+
const ALLOWED_HEADING_TAGS = ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
26089
26101
|
class CasAccordion extends s$8 {
|
|
26090
26102
|
constructor() {
|
|
26091
26103
|
super();
|
|
@@ -26093,13 +26105,14 @@ var __publicField = (obj, key, value) => {
|
|
|
26093
26105
|
this.variant = "simple";
|
|
26094
26106
|
this.title = "";
|
|
26095
26107
|
this.text = "";
|
|
26108
|
+
this.headingLevel = "h3";
|
|
26096
26109
|
}
|
|
26097
26110
|
toggleAccordion() {
|
|
26098
26111
|
this.open = !this.open;
|
|
26099
26112
|
this.requestUpdate();
|
|
26100
26113
|
}
|
|
26101
26114
|
render() {
|
|
26102
|
-
const { open, title, text, content } = this;
|
|
26115
|
+
const { open, title, text, content, headingLevel } = this;
|
|
26103
26116
|
const { accordionStyle, iconSize } = useAccordion({
|
|
26104
26117
|
variant: this.variant,
|
|
26105
26118
|
open: this.open
|
|
@@ -26108,12 +26121,15 @@ var __publicField = (obj, key, value) => {
|
|
|
26108
26121
|
true: "flat-minus",
|
|
26109
26122
|
false: "flat-plus"
|
|
26110
26123
|
};
|
|
26124
|
+
const titleTag = ALLOWED_HEADING_TAGS.includes(headingLevel) ? headingLevel : "h2";
|
|
26111
26125
|
return n$8`
|
|
26112
26126
|
<article part="article" class=${accordionStyle}>
|
|
26113
26127
|
<header part="header" @click="${this.toggleAccordion}">
|
|
26114
26128
|
<div class="left">
|
|
26115
|
-
|
|
26116
|
-
|
|
26129
|
+
<slot name="title" class="title">
|
|
26130
|
+
${title ? n$8`<${o$c(titleTag)}>${title}</${o$c(titleTag)}>` : ""}
|
|
26131
|
+
</slot>
|
|
26132
|
+
${text ? n$8` <cas-text variant="footnote2">${text}</cas-text>` : ""}
|
|
26117
26133
|
</div>
|
|
26118
26134
|
<cas-icon name="${icon[open]}" size="${iconSize}"></cas-icon>
|
|
26119
26135
|
</header>
|
|
@@ -26134,9 +26150,10 @@ var __publicField = (obj, key, value) => {
|
|
|
26134
26150
|
variant: { type: String },
|
|
26135
26151
|
title: { type: String },
|
|
26136
26152
|
text: { type: String },
|
|
26137
|
-
content: { type: String }
|
|
26153
|
+
content: { type: String },
|
|
26154
|
+
headingLevel: { type: String, attribute: "heading-level" }
|
|
26138
26155
|
});
|
|
26139
|
-
customElements.define("cas-accordion", CasAccordion);
|
|
26156
|
+
customElements.get("cas-accordion") || customElements.define("cas-accordion", CasAccordion);
|
|
26140
26157
|
customElements.get("cas-accordion-element") || customElements.define("cas-accordion-element", class extends CasAccordion {
|
|
26141
26158
|
});
|
|
26142
26159
|
const styles$d = i$d`
|
|
@@ -13,7 +13,7 @@ import { x as x$1, i as i$b, r as r$7, s as s$8, a as x$2, T as T$6, o as o$d, D
|
|
|
13
13
|
document.head.appendChild(font2);
|
|
14
14
|
})();
|
|
15
15
|
const name = "@eloisa-ds/all-components";
|
|
16
|
-
const version$1 = "1.3.
|
|
16
|
+
const version$1 = "1.3.26";
|
|
17
17
|
const dependencies = {};
|
|
18
18
|
const main = "./index.js";
|
|
19
19
|
const module$1 = "./index.mjs";
|
|
@@ -1996,10 +1996,10 @@ const dataPatient = [
|
|
|
1996
1996
|
name: "Presencial",
|
|
1997
1997
|
link: "https://reserva.alemana.cl/reserva/portal/busqueda"
|
|
1998
1998
|
},
|
|
1999
|
-
{
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
},
|
|
1999
|
+
// {
|
|
2000
|
+
// name: 'Maitencillo',
|
|
2001
|
+
// link: 'https://www.clinicaalemana.cl/sucursales/centros-medicos/centro-medico-maitencillo',
|
|
2002
|
+
// },
|
|
2003
2003
|
{
|
|
2004
2004
|
name: "Teleconsulta",
|
|
2005
2005
|
link: "https://agenda.clinicaalemana.cl/paciente"
|
|
@@ -24275,7 +24275,7 @@ __publicField(CasHeader, "properties", {
|
|
|
24275
24275
|
devMode: { type: String }
|
|
24276
24276
|
});
|
|
24277
24277
|
customElements.get("cas-header") || customElements.define("cas-header", CasHeader);
|
|
24278
|
-
customElements.get("cas-header-pre-head
|
|
24278
|
+
customElements.get("cas-header-pre-head") || customElements.define("cas-header-pre-head", PreHead);
|
|
24279
24279
|
customElements.get("cas-header-head") || customElements.define("cas-header-head", Head);
|
|
24280
24280
|
customElements.get("cas-header-search") || customElements.define("cas-header-search", Search);
|
|
24281
24281
|
customElements.get("cas-header-taxonomy") || customElements.define("cas-header-taxonomy", Taxonomy$1);
|
|
@@ -25196,6 +25196,17 @@ const styles$e = i$b`
|
|
|
25196
25196
|
background: transparent;
|
|
25197
25197
|
}
|
|
25198
25198
|
|
|
25199
|
+
header .title, header .title > * {
|
|
25200
|
+
color: var(--Tertiary-Tertiary_1, #203442);
|
|
25201
|
+
|
|
25202
|
+
font-family: Rubik;
|
|
25203
|
+
font-size: 18px;
|
|
25204
|
+
font-style: normal;
|
|
25205
|
+
font-weight: 500;
|
|
25206
|
+
line-height: 28px;
|
|
25207
|
+
letter-spacing: 0.217px;
|
|
25208
|
+
}
|
|
25209
|
+
|
|
25199
25210
|
header cas-text:nth-child(2) {
|
|
25200
25211
|
color: ${r$7(casColorTertiary3ModeLight)};
|
|
25201
25212
|
}
|
|
@@ -25270,6 +25281,7 @@ function useAccordion({ variant, open }) {
|
|
|
25270
25281
|
iconSize: iconSize[match]
|
|
25271
25282
|
};
|
|
25272
25283
|
}
|
|
25284
|
+
const ALLOWED_HEADING_TAGS = ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
25273
25285
|
class CasAccordion extends s$8 {
|
|
25274
25286
|
constructor() {
|
|
25275
25287
|
super();
|
|
@@ -25277,13 +25289,14 @@ class CasAccordion extends s$8 {
|
|
|
25277
25289
|
this.variant = "simple";
|
|
25278
25290
|
this.title = "";
|
|
25279
25291
|
this.text = "";
|
|
25292
|
+
this.headingLevel = "h3";
|
|
25280
25293
|
}
|
|
25281
25294
|
toggleAccordion() {
|
|
25282
25295
|
this.open = !this.open;
|
|
25283
25296
|
this.requestUpdate();
|
|
25284
25297
|
}
|
|
25285
25298
|
render() {
|
|
25286
|
-
const { open, title, text, content } = this;
|
|
25299
|
+
const { open, title, text, content, headingLevel } = this;
|
|
25287
25300
|
const { accordionStyle, iconSize } = useAccordion({
|
|
25288
25301
|
variant: this.variant,
|
|
25289
25302
|
open: this.open
|
|
@@ -25292,12 +25305,15 @@ class CasAccordion extends s$8 {
|
|
|
25292
25305
|
true: "flat-minus",
|
|
25293
25306
|
false: "flat-plus"
|
|
25294
25307
|
};
|
|
25308
|
+
const titleTag = ALLOWED_HEADING_TAGS.includes(headingLevel) ? headingLevel : "h2";
|
|
25295
25309
|
return n$8`
|
|
25296
25310
|
<article part="article" class=${accordionStyle}>
|
|
25297
25311
|
<header part="header" @click="${this.toggleAccordion}">
|
|
25298
25312
|
<div class="left">
|
|
25299
|
-
|
|
25300
|
-
|
|
25313
|
+
<slot name="title" class="title">
|
|
25314
|
+
${title ? n$8`<${o$c(titleTag)}>${title}</${o$c(titleTag)}>` : ""}
|
|
25315
|
+
</slot>
|
|
25316
|
+
${text ? n$8` <cas-text variant="footnote2">${text}</cas-text>` : ""}
|
|
25301
25317
|
</div>
|
|
25302
25318
|
<cas-icon name="${icon[open]}" size="${iconSize}"></cas-icon>
|
|
25303
25319
|
</header>
|
|
@@ -25318,9 +25334,10 @@ __publicField(CasAccordion, "properties", {
|
|
|
25318
25334
|
variant: { type: String },
|
|
25319
25335
|
title: { type: String },
|
|
25320
25336
|
text: { type: String },
|
|
25321
|
-
content: { type: String }
|
|
25337
|
+
content: { type: String },
|
|
25338
|
+
headingLevel: { type: String, attribute: "heading-level" }
|
|
25322
25339
|
});
|
|
25323
|
-
customElements.define("cas-accordion", CasAccordion);
|
|
25340
|
+
customElements.get("cas-accordion") || customElements.define("cas-accordion", CasAccordion);
|
|
25324
25341
|
customElements.get("cas-accordion-element") || customElements.define("cas-accordion-element", class extends CasAccordion {
|
|
25325
25342
|
});
|
|
25326
25343
|
const styles$d = i$b`
|
package/build/cas-header.js
CHANGED
|
@@ -1068,7 +1068,7 @@
|
|
|
1068
1068
|
* @license
|
|
1069
1069
|
* Copyright 2018 Google LLC
|
|
1070
1070
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1071
|
-
*/const pe=Wa(class extends _r{constructor(s){var t;if(super(s),s.type!==fr.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(h=>h!=="")));for(const h in t)t[h]&&!(!((e=this.nt)===null||e===void 0)&&e.has(h))&&this.it.add(h);return this.render(t)}const a=s.element.classList;this.it.forEach(h=>{h in t||(a.remove(h),this.it.delete(h))});for(const h in t){const o=!!t[h];o===this.it.has(h)||!((i=this.nt)===null||i===void 0)&&i.has(h)||(o?(a.add(h),this.it.add(h)):(a.remove(h),this.it.delete(h)))}return Lt}}),Mr=[{name:"Consulta médica",items:[{name:"Consulta pediátrica",link:"https://www.clinicaalemana.cl/consulta-pediatrica-2026"},{name:"Presencial",link:"https://reserva.alemana.cl/reserva/portal/busqueda"},{name:"
|
|
1071
|
+
*/const pe=Wa(class extends _r{constructor(s){var t;if(super(s),s.type!==fr.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(h=>h!=="")));for(const h in t)t[h]&&!(!((e=this.nt)===null||e===void 0)&&e.has(h))&&this.it.add(h);return this.render(t)}const a=s.element.classList;this.it.forEach(h=>{h in t||(a.remove(h),this.it.delete(h))});for(const h in t){const o=!!t[h];o===this.it.has(h)||!((i=this.nt)===null||i===void 0)&&i.has(h)||(o?(a.add(h),this.it.add(h)):(a.remove(h),this.it.delete(h)))}return Lt}}),Mr=[{name:"Consulta médica",items:[{name:"Consulta pediátrica",link:"https://www.clinicaalemana.cl/consulta-pediatrica-2026"},{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:"Teledermatología",link:"https://teledermatologia.clinicaalemana.cl/"}]},{name:"Rehabilitación y bienestar",items:[{name:"Kinesiología",link:"https://agenda.clinicaalemana.cl/rehabilitacion-y-bienestar/seleccion-categoria"},{name:"Masoterapia",link:"https://agenda.clinicaalemana.cl/examenes-y-procedimientos/masoterapia/masoterapia-masaje-deportivo/disponibilidad"}]},{name:"Exámenes 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:"Viajeros",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/reserva-vacuna-fiebre-amarilla"},{name:"TeleAsesoría pediátrica",link:"https://www.clinicaalemana.cl/especialidades/vacunatorio/asesoria-en-vacunacion-pediatrica"}]}],zr=[{name:"Consulta médica",link:"https://reserva.clinicaalemana.cl/alemana-integral"},{name:"Exámenes y procedimientos",link:"https://www.clinicaalemana.cl/examenes-y-procedimientos"}],S1=Mr,Za=zr;class ve extends b{constructor(){super(),this.hidden=!1,this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.dataTipoDeAtencion=[],this.dataModalidad=[],this.opcionSelecionada="Paciente",this.focused=!1,this.refresh=!1,this.link=""}changeHandler(t){var i,a;const e=t.target.name;if(this[e]=t.composedPath()[0].value,this.handleErrorTipoDeAtencion(!1),this.handleErrorModalidad(!1),e==="tipoDeAtencionIntegral"&&(this.tipoDeAtencion="",this.modalidad=""),e==="tipoDeAtencion"){this.modalidad="",this.refresh=!0,this.handleFocusModalidad(!0),this.handleFocusTipoDeAtencion(!1);const h=((a=(i=S1.find(o=>o.name===this.tipoDeAtencion))==null?void 0:i.items)==null?void 0:a.map(o=>o.name))||[];t.target.value==="Consulta pediátrica"&&this.handleLink(),this.dataModalidad=[...h],this.requestUpdate(),setTimeout(()=>{this.refresh=!1,this.requestUpdate()},100)}e==="modalidad"&&this.handleFocusModalidad(!1),this.handleLink()}handleFocusTipoDeAtencion(t){const e=this.shadowRoot.getElementById("tipoDeAtencion");e==null||e.setAttribute("active",t)}handleFocusModalidad(t){const e=this.shadowRoot.getElementById("modalidad");e==null||e.setAttribute("active",t)}handleErrorTipoDeAtencion(t){const e=this.shadowRoot.getElementById("tipoDeAtencion");t?e==null||e.setAttribute("isSelectError",!0):e==null||e.removeAttribute("isSelectError")}handleErrorModalidad(t){const e=this.shadowRoot.getElementById("modalidad");t?e==null||e.setAttribute("isSelectError",!0):e==null||e.removeAttribute("isSelectError")}handleLink(){let t="";this.tipoDeAtencionIntegral!==""&&(t=Za.find(i=>i.name===this.tipoDeAtencionIntegral).link),this.tipoDeAtencion!==""&&this.modalidad!==""&&(t=S1.find(i=>i.name===this.tipoDeAtencion).items.find(i=>i.name===this.modalidad).link),this.tipoDeAtencion==="Consulta pediátrica"&&(t="https://www.clinicaalemana.cl/consulta-pediatrica-2025"),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}){const a={event:"evento-interactivo","evento-interactivo-categoria":t,"evento-interactivo-accion":e||this.tipoDeAtencion||this.tipoDeAtencionIntegral||"reservar_hora","evento-interactivo-etiqueta":i||this.modalidad,opcion_seleccionada:this.opcionSelecionada};console.log("devLayer_ ",a);try{window.dataLayer.push(a)}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(),setTimeout(()=>{this.handleTab()},1e3),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()})}}handleTab(t){this.tipoDeAtencion="",this.tipoDeAtencionIntegral="",this.modalidad="",this.handleLink();const e={1:"Paciente",2:"Alemana Integral"};this.opcionSelecionada=e[t]??"Paciente";const i=this.shadowRoot.querySelectorAll("[data-view]");if(t){const a=this.shadowRoot.querySelectorAll(".top .item");this.shadowRoot.querySelector(".option-box").setAttribute("current-view",t.toString()),i.forEach(o=>{o.getAttribute("data-view")===t.toString()?o.style.display="flex":o.style.display="none"}),a.forEach(o=>{o.getAttribute("data-tab")===t.toString()?o.querySelector("cas-radio").setAttribute("checked",!0):o.querySelector("cas-radio").removeAttribute("checked")})}else Array.from(i).filter(h=>h.getAttribute("data-view")==="2").forEach(h=>{h.style.display="none"})}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=pe({"booking-box":!0,hidden:this.hidden,home:this.home,focused:this.focused}),e=pe({backdrop:!0,hidden:this.hidden});return f`
|
|
1072
1072
|
<div class="${e}" id="backdrop" @click="${this.closeHandler}"></div>
|
|
1073
1073
|
<div class="booking-box-main-cont" id="booking-box-main-cont">
|
|
1074
1074
|
<div class="${t}" id="booking-box" tabindex="0">
|
|
@@ -6445,4 +6445,4 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
6445
6445
|
</header>
|
|
6446
6446
|
${e===B.HOME?f`<cas-booking-box theme="${a}" .home=${h} showAlert=${this.showAlert}></cas-booking-box>`:null}
|
|
6447
6447
|
<div style="height: ${this.spaceHeight}px"></div>
|
|
6448
|
-
`}}M(G0,"styles",Pn),M(G0,"shadowRootOptions",{...b.shadowRootOptions,mode:"open"}),M(G0,"properties",{alert:{type:Object},type:{type:String},bookingBox:{type:String},darkMode:{type:String},disableMode:{type:String},disableDarkModeDefault:{type:String},devMode:{type:String}}),customElements.get("cas-header")||customElements.define("cas-header",G0),customElements.get("cas-header-pre-head
|
|
6448
|
+
`}}M(G0,"styles",Pn),M(G0,"shadowRootOptions",{...b.shadowRootOptions,mode:"open"}),M(G0,"properties",{alert:{type:Object},type:{type:String},bookingBox:{type:String},darkMode:{type:String},disableMode:{type:String},disableDarkModeDefault:{type:String},devMode:{type:String}}),customElements.get("cas-header")||customElements.define("cas-header",G0),customElements.get("cas-header-pre-head")||customElements.define("cas-header-pre-head",i1),customElements.get("cas-header-head")||customElements.define("cas-header-head",Qe),customElements.get("cas-header-search")||customElements.define("cas-header-search",Y0),customElements.get("cas-header-taxonomy")||customElements.define("cas-header-taxonomy",Xe),customElements.get("cas-header-menu-mobile")||customElements.define("cas-header-menu-mobile",t1),customElements.get("cas-header-card")||customElements.define("cas-header-card",e1),F.CasHeader=G0,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});
|