@glatam/calendar-ui 1.0.6 → 1.0.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-modal.d.ts","sourceRoot":"","sources":["../../src/components/calendar-modal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAgB,MAAM,uBAAuB,CAAC;AAGnE,qBACa,mBAAoB,SAAQ,UAAU;IACjD,MAAM,CAAC,MAAM,0BAAe;IAEC,IAAI,UAAS;IACd,UAAU,SAAM;IAChB,SAAS,SAAM;IACf,OAAO,SAAM;IACZ,OAAO,UAAS;IACjB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAQ;IAE5D,OAAO,CAAC,WAAW,CAAM;IACzB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,YAAY,CAAgB;IAE7C,UAAU,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IAqB9C,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IAa3C,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,UAAU;IAalB,OAAO,CAAC,YAAY;IAUpB,MAAM;CA+EP"}
1
+ {"version":3,"file":"calendar-modal.d.ts","sourceRoot":"","sources":["../../src/components/calendar-modal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAEvC,OAAO,EAAE,YAAY,EAAgB,MAAM,uBAAuB,CAAC;AAGnE,qBACa,mBAAoB,SAAQ,UAAU;IACjD,MAAM,CAAC,MAAM,0BAAe;IAEC,IAAI,UAAS;IACd,UAAU,SAAM;IAChB,SAAS,SAAM;IACf,OAAO,SAAM;IACZ,OAAO,UAAS;IACjB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAQ;IAE5D,OAAO,CAAC,WAAW,CAAM;IACzB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,YAAY,CAAgB;IAE7C,UAAU,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IAqB9C,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IAa3C,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,UAAU;IAalB,OAAO,CAAC,YAAY;IAUpB,MAAM;CAoGP"}
@@ -28,6 +28,11 @@ export declare class GlatamCalendarMini extends LitElement {
28
28
  private dropdownSelectedDateString;
29
29
  private touchStartX;
30
30
  private touchStartY;
31
+ connectedCallback(): void;
32
+ disconnectedCallback(): void;
33
+ private handleOutsideClick;
34
+ private handleKeyDown;
35
+ private toggleDropdown;
31
36
  private handlePrevMonth;
32
37
  private handleNextMonth;
33
38
  private handleTouchStart;
@@ -1 +1 @@
1
- {"version":3,"file":"glatam-calendar-mini.d.ts","sourceRoot":"","sources":["../src/glatam-calendar-mini.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAEvC,OAAO,EAAoC,YAAY,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAMjG,OAAO,uBAAuB,CAAC;AAE/B,qBACa,kBAAmB,SAAQ,UAAU;IAChD,MAAM,CAAC,MAAM,4BAAyD;IAE1C,IAAI,SAAW;IAA6B,MAAM,SAAQ;IAC1D,cAAc,SAAK;IAA4B,KAAK,EAAE,YAAY,EAAE,CAAM;IAC1E,aAAa,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAQ;IACjE,IAAI,SAAY;IAA6B,YAAY,SAAoB;IAC5F,cAAc,SAAW;IAA6B,OAAO,SAAM;IAA6B,OAAO,SAAM;IAC5G,oBAAoB,UAAQ;IACzB,aAAa,EAAE,CAAC,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC,GAAG,IAAI,CAAQ;IACzF,KAAK,EAAE,QAAQ,EAAE,CAI1C;IAEO,OAAO,CAAC,UAAU,CAAc;IAChC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,0BAA0B,CAAM;IAEjD,OAAO,CAAC,WAAW,CAAK;IAAC,OAAO,CAAC,WAAW,CAAK;IAEjD,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,sBAAsB;IAK9B,OAAO,CAAC,uBAAuB;IAI/B,OAAO,CAAC,kBAAkB;IAU1B,MAAM;CA0DP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAAG,sBAAsB,EAAE,kBAAkB,CAAC;KAAE;CAChF"}
1
+ {"version":3,"file":"glatam-calendar-mini.d.ts","sourceRoot":"","sources":["../src/glatam-calendar-mini.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,KAAK,CAAC;AAEvC,OAAO,EAAkD,YAAY,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAM/G,OAAO,uBAAuB,CAAC;AAE/B,qBACa,kBAAmB,SAAQ,UAAU;IAChD,MAAM,CAAC,MAAM,4BAAyD;IAE1C,IAAI,SAAW;IAA6B,MAAM,SAAQ;IAC1D,cAAc,SAAK;IAA4B,KAAK,EAAE,YAAY,EAAE,CAAM;IAC1E,aAAa,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAQ;IACjE,IAAI,SAAY;IAA6B,YAAY,SAAoB;IAC5F,cAAc,SAAW;IAA6B,OAAO,SAAM;IAA6B,OAAO,SAAM;IAC5G,oBAAoB,UAAQ;IACzB,aAAa,EAAE,CAAC,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC,GAAG,IAAI,CAAQ;IACzF,KAAK,EAAE,QAAQ,EAAE,CAI1C;IAEO,OAAO,CAAC,UAAU,CAAc;IAChC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,0BAA0B,CAAM;IAEjD,OAAO,CAAC,WAAW,CAAK;IAAC,OAAO,CAAC,WAAW,CAAK;IAEjD,iBAAiB;IAMjB,oBAAoB;IAMpB,OAAO,CAAC,kBAAkB,CAKxB;IAEF,OAAO,CAAC,aAAa,CAKnB;IAEF,OAAO,CAAC,cAAc;IAQtB,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,eAAe;IAKvB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,sBAAsB;IAK9B,OAAO,CAAC,uBAAuB;IAI/B,OAAO,CAAC,kBAAkB;IAU1B,MAAM;CA0DP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAAG,sBAAsB,EAAE,kBAAkB,CAAC;KAAE;CAChF"}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("lit"),i=require("lit/decorators.js"),m=require("@glatam/calendar-core"),R=require("lit/directives/class-map.js"),G=s.css`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("lit"),i=require("lit/decorators.js"),g=require("@glatam/calendar-core"),R=require("lit/directives/class-map.js"),E=s.css`
2
2
  :host {
3
3
  /* Fonts */
4
4
  --glatam-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
@@ -86,7 +86,7 @@
86
86
  --glatam-padding: 24px;
87
87
  font-size: 1.1rem;
88
88
  }
89
- `,E=s.css`
89
+ `,G=s.css`
90
90
  :host {
91
91
  display: grid;
92
92
  min-width: 0;
@@ -342,10 +342,10 @@
342
342
  min-width: 32px;
343
343
  }
344
344
  }
345
- `;function k(c,t,e){if(t===e)return 0;const a=(r,o)=>{const l={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1};o!=="local"&&(l.timeZone=o);const g=new Intl.DateTimeFormat("en-US",l).formatToParts(r),n=new Map(g.map(y=>[y.type,y.value])),p=Number(n.get("hour")),u=p===24?0:p;return new Date(Number(n.get("year")),Number(n.get("month"))-1,Number(n.get("day")),u,Number(n.get("minute")),Number(n.get("second")))};try{const r=a(c,t);return(a(c,e).getTime()-r.getTime())/(60*1e3)}catch{return 0}}function T(c,t){if(t===0)return{start:c.start,end:c.end,dayShift:0};const e=n=>{const[p,u]=n.split(":").map(Number);return p*60+u},a=n=>{let p=n%1440;p<0&&(p+=1440);const u=String(Math.floor(p/60)).padStart(2,"0"),y=String(p%60).padStart(2,"0");return`${u}:${y}`},r=e(c.start),o=e(c.end),l=r+t,d=o+t;let g=0;return l<0?g=-1:l>=1440&&(g=1),{start:a(l),end:a(d),dayShift:g}}function I(c,t,e){let a=null;return{updatedRules:c.map(o=>{if(o.id!==t)return o;a=o;const l=o.exceptions||[],d=l.includes(e)?l:[...l,e];return{...o,exceptions:d}}),targetRule:a}}function M(c,t){const e=c.find(r=>r.id===t)||null;return{updatedRules:c.filter(r=>r.id!==t),targetRule:e}}var V=Object.defineProperty,_=Object.getOwnPropertyDescriptor,x=(c,t,e,a)=>{for(var r=a>1?void 0:a?_(t,e):t,o=c.length-1,l;o>=0;o--)(l=c[o])&&(r=(a?l(t,e,r):l(r))||r);return a&&r&&V(t,e,r),r};exports.GlatamCalendarMonthView=class extends s.LitElement{constructor(){super(...arguments),this.days=[],this.locale="es",this.startOfWeekDay=0,this.selectedDates=[],this.role="provider",this.size="medium",this.minDate="",this.maxDate="",this.showNeighboringMonth=!0,this.tileClassName=null}getWeekdayNames(){const t=[],e=new Date(2026,6,12+this.startOfWeekDay),a=new Intl.DateTimeFormat(this.locale,{weekday:"short"});for(let r=0;r<7;r++)t.push(a.format(e)),e.setDate(e.getDate()+1);return t}handleDayClick(t){const e=this.minDate&&t.dateString<this.minDate||this.maxDate&&t.dateString>this.maxDate;this.role==="buyer"&&(t.isBlocked||e)||this.dispatchEvent(new CustomEvent("day-select",{detail:{dateString:t.dateString,isBlocked:t.isBlocked},bubbles:!0,composed:!0}))}render(){const t=this.getWeekdayNames();return s.html`
345
+ `;function k(c,t,e){if(t===e)return 0;const a=(r,o)=>{const l={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1};o!=="local"&&(l.timeZone=o);const m=new Intl.DateTimeFormat("en-US",l).formatToParts(r),n=new Map(m.map(y=>[y.type,y.value])),p=Number(n.get("hour")),u=p===24?0:p;return new Date(Number(n.get("year")),Number(n.get("month"))-1,Number(n.get("day")),u,Number(n.get("minute")),Number(n.get("second")))};try{const r=a(c,t);return(a(c,e).getTime()-r.getTime())/(60*1e3)}catch{return 0}}function T(c,t){if(t===0)return{start:c.start,end:c.end,dayShift:0};const e=n=>{const[p,u]=n.split(":").map(Number);return p*60+u},a=n=>{let p=n%1440;p<0&&(p+=1440);const u=String(Math.floor(p/60)).padStart(2,"0"),y=String(p%60).padStart(2,"0");return`${u}:${y}`},r=e(c.start),o=e(c.end),l=r+t,d=o+t;let m=0;return l<0?m=-1:l>=1440&&(m=1),{start:a(l),end:a(d),dayShift:m}}function I(c,t,e){let a=null;return{updatedRules:c.map(o=>{if(o.id!==t)return o;a=o;const l=o.exceptions||[],d=l.includes(e)?l:[...l,e];return{...o,exceptions:d}}),targetRule:a}}function M(c,t){const e=c.find(r=>r.id===t)||null;return{updatedRules:c.filter(r=>r.id!==t),targetRule:e}}var V=Object.defineProperty,_=Object.getOwnPropertyDescriptor,x=(c,t,e,a)=>{for(var r=a>1?void 0:a?_(t,e):t,o=c.length-1,l;o>=0;o--)(l=c[o])&&(r=(a?l(t,e,r):l(r))||r);return a&&r&&V(t,e,r),r};exports.GlatamCalendarMonthView=class extends s.LitElement{constructor(){super(...arguments),this.days=[],this.locale="es",this.startOfWeekDay=0,this.selectedDates=[],this.role="provider",this.size="medium",this.minDate="",this.maxDate="",this.showNeighboringMonth=!0,this.tileClassName=null}getWeekdayNames(){const t=[],e=new Date(2026,6,12+this.startOfWeekDay),a=new Intl.DateTimeFormat(this.locale,{weekday:"short"});for(let r=0;r<7;r++)t.push(a.format(e)),e.setDate(e.getDate()+1);return t}handleDayClick(t){const e=this.minDate&&t.dateString<this.minDate||this.maxDate&&t.dateString>this.maxDate;this.role==="buyer"&&(t.isBlocked||e)||this.dispatchEvent(new CustomEvent("day-select",{detail:{dateString:t.dateString,isBlocked:t.isBlocked},bubbles:!0,composed:!0}))}render(){const t=this.getWeekdayNames();return s.html`
346
346
  ${t.map(e=>s.html`<div class="weekday">${e}</div>`)}
347
347
 
348
- ${this.days.map(e=>{var g;if(!e.isCurrentMonth&&!this.showNeighboringMonth)return s.html`<div class="day-cell empty"></div>`;const a=e.dateString===m.formatISODate(new Date),r=this.selectedDates.includes(e.dateString),o=e.slots.filter(n=>n.isBlocked),l=this.minDate&&e.dateString<this.minDate||this.maxDate&&e.dateString>this.maxDate,d=this.tileClassName?this.tileClassName({date:e.date,dateString:e.dateString}):"";return s.html`
348
+ ${this.days.map(e=>{var m;if(!e.isCurrentMonth&&!this.showNeighboringMonth)return s.html`<div class="day-cell empty"></div>`;const a=e.dateString===g.formatISODate(new Date),r=this.selectedDates.includes(e.dateString),o=e.slots.filter(n=>n.isBlocked),l=this.minDate&&e.dateString<this.minDate||this.maxDate&&e.dateString>this.maxDate,d=this.tileClassName?this.tileClassName({date:e.date,dateString:e.dateString}):"";return s.html`
349
349
  <div
350
350
  class=${R.classMap({"day-cell":!0,padding:!e.isCurrentMonth,blocked:e.isBlocked,today:a,selected:r,disabled:!!l,[d]:!!d})}
351
351
  part="day-cell ${d}"
@@ -354,7 +354,7 @@
354
354
  <div class="day-number">${e.dayNumber}</div>
355
355
 
356
356
  <div class="slot-indicator">
357
- ${e.isBlocked?s.html`<div class="badge blocked-day">${((g=e.rule)==null?void 0:g.description)||"Bloqueado"}</div>`:o.slice(0,2).map(n=>{var p,u;return s.html`
357
+ ${e.isBlocked?s.html`<div class="badge blocked-day">${((m=e.rule)==null?void 0:m.description)||"Bloqueado"}</div>`:o.slice(0,2).map(n=>{var p,u;return s.html`
358
358
  <div class="badge blocked-slot" title=${((p=n.rule)==null?void 0:p.description)||""}>
359
359
  🚫 ${((u=n.rule)==null?void 0:u.description)||n.start}
360
360
  </div>
@@ -395,7 +395,7 @@
395
395
  .slot-indicator { display: none; }
396
396
  .day-number { margin-bottom: 0; font-size: 0.8rem; }
397
397
  }
398
- `;x([i.property({type:Array})],exports.GlatamCalendarMonthView.prototype,"days",2);x([i.property({type:String})],exports.GlatamCalendarMonthView.prototype,"locale",2);x([i.property({type:Number})],exports.GlatamCalendarMonthView.prototype,"startOfWeekDay",2);x([i.property({type:Array})],exports.GlatamCalendarMonthView.prototype,"selectedDates",2);x([i.property({type:String})],exports.GlatamCalendarMonthView.prototype,"role",2);x([i.property({type:String,reflect:!0})],exports.GlatamCalendarMonthView.prototype,"size",2);x([i.property({type:String})],exports.GlatamCalendarMonthView.prototype,"minDate",2);x([i.property({type:String})],exports.GlatamCalendarMonthView.prototype,"maxDate",2);x([i.property({type:Boolean})],exports.GlatamCalendarMonthView.prototype,"showNeighboringMonth",2);x([i.property({attribute:!1})],exports.GlatamCalendarMonthView.prototype,"tileClassName",2);exports.GlatamCalendarMonthView=x([i.customElement("glatam-calendar-month-view")],exports.GlatamCalendarMonthView);var B=Object.defineProperty,j=Object.getOwnPropertyDescriptor,v=(c,t,e,a)=>{for(var r=a>1?void 0:a?j(t,e):t,o=c.length-1,l;o>=0;o--)(l=c[o])&&(r=(a?l(t,e,r):l(r))||r);return a&&r&&B(t,e,r),r};exports.GlatamCalendarWeekView=class extends s.LitElement{constructor(){super(...arguments),this.days=[],this.slots=[],this.locale="es",this.selectedRange=null,this.role="provider",this.minDate="",this.maxDate="",this.isDragging=!1,this.dragDayIndex=null,this.dragStartSlotIndex=null,this.dragEndSlotIndex=null,this.handleMouseUp=()=>{if(!this.isDragging||this.dragDayIndex===null||this.dragStartSlotIndex===null||this.dragEndSlotIndex===null){this.isDragging=!1;return}this.isDragging=!1;const t=Math.min(this.dragStartSlotIndex,this.dragEndSlotIndex),e=Math.max(this.dragStartSlotIndex,this.dragEndSlotIndex),a=this.days[this.dragDayIndex],r=a.slots.slice(t,e+1);r.some(o=>o.isBlocked)||this.dispatchEvent(new CustomEvent("range-select",{detail:{dateString:a.dateString,start:r[0].start,end:r[r.length-1].end},bubbles:!0,composed:!0})),this.dragDayIndex=null,this.dragStartSlotIndex=null,this.dragEndSlotIndex=null}}connectedCallback(){super.connectedCallback(),window.addEventListener("mouseup",this.handleMouseUp)}disconnectedCallback(){window.removeEventListener("mouseup",this.handleMouseUp),super.disconnectedCallback()}handleMouseDown(t,e,a){var l;const r=(l=this.days[t])==null?void 0:l.dateString;if(!(this.minDate&&r<this.minDate||this.maxDate&&r>this.maxDate)){if(a){if(this.role==="buyer")return;this.dispatchEvent(new CustomEvent("slot-click",{detail:{dateString:this.days[t].dateString,slot:this.days[t].slots[e],isBlocked:!0},bubbles:!0,composed:!0}));return}this.isDragging=!0,this.dragDayIndex=t,this.dragStartSlotIndex=e,this.dragEndSlotIndex=e}}handleMouseEnter(t,e,a){this.isDragging&&t===this.dragDayIndex&&!a&&(this.dragEndSlotIndex=e)}isSlotSelected(t,e){return!this.selectedRange||this.selectedRange.dateString!==t?!1:e.start>=this.selectedRange.start&&e.end<=this.selectedRange.end}isSlotDragSelecting(t,e){if(!this.isDragging||t!==this.dragDayIndex)return!1;const a=Math.min(this.dragStartSlotIndex,this.dragEndSlotIndex),r=Math.max(this.dragStartSlotIndex,this.dragEndSlotIndex);return e>=a&&e<=r}render(){const t=m.formatISODate(new Date);return s.html`
398
+ `;x([i.property({type:Array})],exports.GlatamCalendarMonthView.prototype,"days",2);x([i.property({type:String})],exports.GlatamCalendarMonthView.prototype,"locale",2);x([i.property({type:Number})],exports.GlatamCalendarMonthView.prototype,"startOfWeekDay",2);x([i.property({type:Array})],exports.GlatamCalendarMonthView.prototype,"selectedDates",2);x([i.property({type:String})],exports.GlatamCalendarMonthView.prototype,"role",2);x([i.property({type:String,reflect:!0})],exports.GlatamCalendarMonthView.prototype,"size",2);x([i.property({type:String})],exports.GlatamCalendarMonthView.prototype,"minDate",2);x([i.property({type:String})],exports.GlatamCalendarMonthView.prototype,"maxDate",2);x([i.property({type:Boolean})],exports.GlatamCalendarMonthView.prototype,"showNeighboringMonth",2);x([i.property({attribute:!1})],exports.GlatamCalendarMonthView.prototype,"tileClassName",2);exports.GlatamCalendarMonthView=x([i.customElement("glatam-calendar-month-view")],exports.GlatamCalendarMonthView);var B=Object.defineProperty,j=Object.getOwnPropertyDescriptor,v=(c,t,e,a)=>{for(var r=a>1?void 0:a?j(t,e):t,o=c.length-1,l;o>=0;o--)(l=c[o])&&(r=(a?l(t,e,r):l(r))||r);return a&&r&&B(t,e,r),r};exports.GlatamCalendarWeekView=class extends s.LitElement{constructor(){super(...arguments),this.days=[],this.slots=[],this.locale="es",this.selectedRange=null,this.role="provider",this.minDate="",this.maxDate="",this.isDragging=!1,this.dragDayIndex=null,this.dragStartSlotIndex=null,this.dragEndSlotIndex=null,this.handleMouseUp=()=>{if(!this.isDragging||this.dragDayIndex===null||this.dragStartSlotIndex===null||this.dragEndSlotIndex===null){this.isDragging=!1;return}this.isDragging=!1;const t=Math.min(this.dragStartSlotIndex,this.dragEndSlotIndex),e=Math.max(this.dragStartSlotIndex,this.dragEndSlotIndex),a=this.days[this.dragDayIndex],r=a.slots.slice(t,e+1);r.some(o=>o.isBlocked)||this.dispatchEvent(new CustomEvent("range-select",{detail:{dateString:a.dateString,start:r[0].start,end:r[r.length-1].end},bubbles:!0,composed:!0})),this.dragDayIndex=null,this.dragStartSlotIndex=null,this.dragEndSlotIndex=null}}connectedCallback(){super.connectedCallback(),window.addEventListener("mouseup",this.handleMouseUp)}disconnectedCallback(){window.removeEventListener("mouseup",this.handleMouseUp),super.disconnectedCallback()}handleMouseDown(t,e,a){var l;const r=(l=this.days[t])==null?void 0:l.dateString;if(!(this.minDate&&r<this.minDate||this.maxDate&&r>this.maxDate)){if(a){if(this.role==="buyer")return;this.dispatchEvent(new CustomEvent("slot-click",{detail:{dateString:this.days[t].dateString,slot:this.days[t].slots[e],isBlocked:!0},bubbles:!0,composed:!0}));return}this.isDragging=!0,this.dragDayIndex=t,this.dragStartSlotIndex=e,this.dragEndSlotIndex=e}}handleMouseEnter(t,e,a){this.isDragging&&t===this.dragDayIndex&&!a&&(this.dragEndSlotIndex=e)}isSlotSelected(t,e){return!this.selectedRange||this.selectedRange.dateString!==t?!1:e.start>=this.selectedRange.start&&e.end<=this.selectedRange.end}isSlotDragSelecting(t,e){if(!this.isDragging||t!==this.dragDayIndex)return!1;const a=Math.min(this.dragStartSlotIndex,this.dragEndSlotIndex),r=Math.max(this.dragStartSlotIndex,this.dragEndSlotIndex);return e>=a&&e<=r}render(){const t=g.formatISODate(new Date);return s.html`
399
399
  <div class="time-col">
400
400
  <div class="header-cell">Hora</div>
401
401
  ${this.slots.map(e=>s.html`<div class="slot-cell time-slot-label">${e.start}</div>`)}
@@ -408,11 +408,11 @@
408
408
  <div class="day-num">${e.dayNumber}</div>
409
409
  </div>
410
410
 
411
- ${e.slots.map((d,g)=>{var y,f;const n=d.isBlocked,p=this.isSlotSelected(e.dateString,d),u=this.isSlotDragSelecting(a,g);return s.html`
411
+ ${e.slots.map((d,m)=>{var y,f;const n=d.isBlocked,p=this.isSlotSelected(e.dateString,d),u=this.isSlotDragSelecting(a,m);return s.html`
412
412
  <div
413
413
  class=${R.classMap({"slot-cell":!0,available:!n&&!l,blocked:n,selected:p,"drag-selecting":u,disabled:l})}
414
- @mousedown=${()=>this.handleMouseDown(a,g,n)}
415
- @mouseenter=${()=>this.handleMouseEnter(a,g,n)}
414
+ @mousedown=${()=>this.handleMouseDown(a,m,n)}
415
+ @mouseenter=${()=>this.handleMouseEnter(a,m,n)}
416
416
  title=${n&&((y=d.rule)!=null&&y.description)?d.rule.description:""}
417
417
  >
418
418
  ${n?((f=d.rule)==null?void 0:f.description)||"Ocupado":p?"Reservado":""}
@@ -473,7 +473,7 @@
473
473
  .slot-cell.selected { background-color: var(--glatam-selection-bg); border-left: 3px solid var(--glatam-selection-border); }
474
474
  .slot-cell.drag-selecting { background-color: var(--glatam-primary-light); }
475
475
  .slot-cell.disabled { opacity: 0.35; cursor: not-allowed; background-color: var(--glatam-surface); pointer-events: none; }
476
- `;v([i.property({type:Array})],exports.GlatamCalendarWeekView.prototype,"days",2);v([i.property({type:Array})],exports.GlatamCalendarWeekView.prototype,"slots",2);v([i.property({type:String})],exports.GlatamCalendarWeekView.prototype,"locale",2);v([i.property({type:Object})],exports.GlatamCalendarWeekView.prototype,"selectedRange",2);v([i.property({type:String})],exports.GlatamCalendarWeekView.prototype,"role",2);v([i.property({type:String})],exports.GlatamCalendarWeekView.prototype,"minDate",2);v([i.property({type:String})],exports.GlatamCalendarWeekView.prototype,"maxDate",2);v([i.state()],exports.GlatamCalendarWeekView.prototype,"isDragging",2);v([i.state()],exports.GlatamCalendarWeekView.prototype,"dragDayIndex",2);v([i.state()],exports.GlatamCalendarWeekView.prototype,"dragStartSlotIndex",2);v([i.state()],exports.GlatamCalendarWeekView.prototype,"dragEndSlotIndex",2);exports.GlatamCalendarWeekView=v([i.customElement("glatam-calendar-week-view")],exports.GlatamCalendarWeekView);var P=Object.defineProperty,N=Object.getOwnPropertyDescriptor,w=(c,t,e,a)=>{for(var r=a>1?void 0:a?N(t,e):t,o=c.length-1,l;o>=0;o--)(l=c[o])&&(r=(a?l(t,e,r):l(r))||r);return a&&r&&P(t,e,r),r};exports.GlatamCalendarDayView=class extends s.LitElement{constructor(){super(...arguments),this.day=null,this.slots=[],this.locale="es",this.selectedRange=null,this.role="provider",this.minDate="",this.maxDate="",this.isDragging=!1,this.dragStartSlotIndex=null,this.dragEndSlotIndex=null,this.handleMouseUp=()=>{if(!this.isDragging||!this.day||this.dragStartSlotIndex===null||this.dragEndSlotIndex===null){this.isDragging=!1;return}this.isDragging=!1;const t=Math.min(this.dragStartSlotIndex,this.dragEndSlotIndex),e=Math.max(this.dragStartSlotIndex,this.dragEndSlotIndex),a=this.day.slots.slice(t,e+1);a.some(r=>r.isBlocked)||this.dispatchEvent(new CustomEvent("range-select",{detail:{dateString:this.day.dateString,start:a[0].start,end:a[a.length-1].end},bubbles:!0,composed:!0})),this.dragStartSlotIndex=null,this.dragEndSlotIndex=null}}connectedCallback(){super.connectedCallback(),window.addEventListener("mouseup",this.handleMouseUp)}disconnectedCallback(){window.removeEventListener("mouseup",this.handleMouseUp),super.disconnectedCallback()}handleMouseDown(t,e){if(!this.day)return;const a=this.day.dateString;if(!(this.minDate&&a<this.minDate||this.maxDate&&a>this.maxDate)){if(e){if(this.role==="buyer")return;this.dispatchEvent(new CustomEvent("slot-click",{detail:{dateString:this.day.dateString,slot:this.day.slots[t],isBlocked:!0},bubbles:!0,composed:!0}));return}this.isDragging=!0,this.dragStartSlotIndex=t,this.dragEndSlotIndex=t}}handleMouseEnter(t,e){this.isDragging&&!e&&(this.dragEndSlotIndex=t)}isSlotSelected(t){return!this.day||!this.selectedRange||this.selectedRange.dateString!==this.day.dateString?!1:t.start>=this.selectedRange.start&&t.end<=this.selectedRange.end}isSlotDragSelecting(t){if(!this.isDragging)return!1;const e=Math.min(this.dragStartSlotIndex,this.dragEndSlotIndex),a=Math.max(this.dragStartSlotIndex,this.dragEndSlotIndex);return t>=e&&t<=a}render(){if(!this.day)return s.html`<div>Cargando...</div>`;const t=this.day.dateString===m.formatISODate(new Date),e=this.minDate&&this.day.dateString<this.minDate||this.maxDate&&this.day.dateString>this.maxDate,a=new Intl.DateTimeFormat(this.locale,{weekday:"long",day:"numeric",month:"long"}).format(this.day.date);return s.html`
476
+ `;v([i.property({type:Array})],exports.GlatamCalendarWeekView.prototype,"days",2);v([i.property({type:Array})],exports.GlatamCalendarWeekView.prototype,"slots",2);v([i.property({type:String})],exports.GlatamCalendarWeekView.prototype,"locale",2);v([i.property({type:Object})],exports.GlatamCalendarWeekView.prototype,"selectedRange",2);v([i.property({type:String})],exports.GlatamCalendarWeekView.prototype,"role",2);v([i.property({type:String})],exports.GlatamCalendarWeekView.prototype,"minDate",2);v([i.property({type:String})],exports.GlatamCalendarWeekView.prototype,"maxDate",2);v([i.state()],exports.GlatamCalendarWeekView.prototype,"isDragging",2);v([i.state()],exports.GlatamCalendarWeekView.prototype,"dragDayIndex",2);v([i.state()],exports.GlatamCalendarWeekView.prototype,"dragStartSlotIndex",2);v([i.state()],exports.GlatamCalendarWeekView.prototype,"dragEndSlotIndex",2);exports.GlatamCalendarWeekView=v([i.customElement("glatam-calendar-week-view")],exports.GlatamCalendarWeekView);var P=Object.defineProperty,N=Object.getOwnPropertyDescriptor,w=(c,t,e,a)=>{for(var r=a>1?void 0:a?N(t,e):t,o=c.length-1,l;o>=0;o--)(l=c[o])&&(r=(a?l(t,e,r):l(r))||r);return a&&r&&P(t,e,r),r};exports.GlatamCalendarDayView=class extends s.LitElement{constructor(){super(...arguments),this.day=null,this.slots=[],this.locale="es",this.selectedRange=null,this.role="provider",this.minDate="",this.maxDate="",this.isDragging=!1,this.dragStartSlotIndex=null,this.dragEndSlotIndex=null,this.handleMouseUp=()=>{if(!this.isDragging||!this.day||this.dragStartSlotIndex===null||this.dragEndSlotIndex===null){this.isDragging=!1;return}this.isDragging=!1;const t=Math.min(this.dragStartSlotIndex,this.dragEndSlotIndex),e=Math.max(this.dragStartSlotIndex,this.dragEndSlotIndex),a=this.day.slots.slice(t,e+1);a.some(r=>r.isBlocked)||this.dispatchEvent(new CustomEvent("range-select",{detail:{dateString:this.day.dateString,start:a[0].start,end:a[a.length-1].end},bubbles:!0,composed:!0})),this.dragStartSlotIndex=null,this.dragEndSlotIndex=null}}connectedCallback(){super.connectedCallback(),window.addEventListener("mouseup",this.handleMouseUp)}disconnectedCallback(){window.removeEventListener("mouseup",this.handleMouseUp),super.disconnectedCallback()}handleMouseDown(t,e){if(!this.day)return;const a=this.day.dateString;if(!(this.minDate&&a<this.minDate||this.maxDate&&a>this.maxDate)){if(e){if(this.role==="buyer")return;this.dispatchEvent(new CustomEvent("slot-click",{detail:{dateString:this.day.dateString,slot:this.day.slots[t],isBlocked:!0},bubbles:!0,composed:!0}));return}this.isDragging=!0,this.dragStartSlotIndex=t,this.dragEndSlotIndex=t}}handleMouseEnter(t,e){this.isDragging&&!e&&(this.dragEndSlotIndex=t)}isSlotSelected(t){return!this.day||!this.selectedRange||this.selectedRange.dateString!==this.day.dateString?!1:t.start>=this.selectedRange.start&&t.end<=this.selectedRange.end}isSlotDragSelecting(t){if(!this.isDragging)return!1;const e=Math.min(this.dragStartSlotIndex,this.dragEndSlotIndex),a=Math.max(this.dragStartSlotIndex,this.dragEndSlotIndex);return t>=e&&t<=a}render(){if(!this.day)return s.html`<div>Cargando...</div>`;const t=this.day.dateString===g.formatISODate(new Date),e=this.minDate&&this.day.dateString<this.minDate||this.maxDate&&this.day.dateString>this.maxDate,a=new Intl.DateTimeFormat(this.locale,{weekday:"long",day:"numeric",month:"long"}).format(this.day.date);return s.html`
477
477
  <div class="time-col">
478
478
  <div class="header-cell">Hora</div>
479
479
  ${this.slots.map(r=>s.html`<div class="slot-cell time-slot-label">${r.start}</div>`)}
@@ -484,9 +484,9 @@
484
484
  <div style="text-transform: capitalize;">${a}</div>
485
485
  </div>
486
486
 
487
- ${this.day.slots.map((r,o)=>{var n,p;const l=r.isBlocked,d=this.isSlotSelected(r),g=this.isSlotDragSelecting(o);return s.html`
487
+ ${this.day.slots.map((r,o)=>{var n,p;const l=r.isBlocked,d=this.isSlotSelected(r),m=this.isSlotDragSelecting(o);return s.html`
488
488
  <div
489
- class=${R.classMap({"slot-cell":!0,available:!l&&!e,blocked:l,selected:d,"drag-selecting":g,disabled:e})}
489
+ class=${R.classMap({"slot-cell":!0,available:!l&&!e,blocked:l,selected:d,"drag-selecting":m,disabled:e})}
490
490
  @mousedown=${()=>this.handleMouseDown(o,l)}
491
491
  @mouseenter=${()=>this.handleMouseEnter(o,l)}
492
492
  title=${l&&((n=r.rule)!=null&&n.description)?r.rule.description:""}
@@ -680,7 +680,7 @@
680
680
  .btn-danger:hover {
681
681
  background: rgba(255, 69, 58, 0.18);
682
682
  }
683
- `;var A=Object.defineProperty,L=Object.getOwnPropertyDescriptor,S=(c,t,e,a)=>{for(var r=a>1?void 0:a?L(t,e):t,o=c.length-1,l;o>=0;o--)(l=c[o])&&(r=(a?l(t,e,r):l(r))||r);return a&&r&&A(t,e,r),r};exports.GlatamCalendarModal=class extends s.LitElement{constructor(){super(...arguments),this.open=!1,this.dateString="",this.startTime="",this.endTime="",this.isRange=!1,this.existingRule=null,this.description="",this.blockAllDay=!0,this.isRecurring=!1,this.selectedDays=[]}willUpdate(t){if(t.has("open")&&this.open)if(this.existingRule)this.description=this.existingRule.description||"",this.blockAllDay=!this.existingRule.slots||this.existingRule.slots.length===0,this.isRecurring=this.existingRule.type==="weekly",this.selectedDays=this.existingRule.daysOfWeek||[],this.existingRule.slots&&this.existingRule.slots.length>0&&(this.startTime=this.existingRule.slots[0].start,this.endTime=this.existingRule.slots[0].end);else{this.description="",this.blockAllDay=!this.isRange,this.isRecurring=!1;const e=m.parseISODate(this.dateString);this.selectedDays=[e.getDay()]}}updated(t){var e;if(t.has("open")){const a=(e=this.shadowRoot)==null?void 0:e.getElementById("booking-dialog");a&&(this.open?a.open||a.showModal():a.open&&a.close())}}handleDialogClose(){this.open&&this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}toggleDay(t){const e=this.selectedDays.indexOf(t);this.selectedDays=e>-1?this.selectedDays.filter(a=>a!==t):[...this.selectedDays,t]}handleSave(){const t={title:this.description.trim(),blockAllDay:this.blockAllDay,isRecurring:this.isRecurring,selectedDays:this.selectedDays,dateString:this.dateString,startTime:this.startTime,endTime:this.endTime};this.dispatchEvent(new CustomEvent("save-rule",{detail:t,bubbles:!0,composed:!0}))}handleDelete(){this.existingRule&&this.dispatchEvent(new CustomEvent("delete-rule",{detail:{id:this.existingRule.id,dateString:this.dateString,rule:this.existingRule},bubbles:!0,composed:!0}))}render(){const t=["D","L","M","M","J","V","S"],e=this.isRange?`${this.dateString} (${this.startTime} - ${this.endTime})`:this.dateString;return s.html`
683
+ `;var A=Object.defineProperty,L=Object.getOwnPropertyDescriptor,D=(c,t,e,a)=>{for(var r=a>1?void 0:a?L(t,e):t,o=c.length-1,l;o>=0;o--)(l=c[o])&&(r=(a?l(t,e,r):l(r))||r);return a&&r&&A(t,e,r),r};exports.GlatamCalendarModal=class extends s.LitElement{constructor(){super(...arguments),this.open=!1,this.dateString="",this.startTime="",this.endTime="",this.isRange=!1,this.existingRule=null,this.description="",this.blockAllDay=!0,this.isRecurring=!1,this.selectedDays=[]}willUpdate(t){if(t.has("open")&&this.open)if(this.existingRule)this.description=this.existingRule.description||"",this.blockAllDay=!this.existingRule.slots||this.existingRule.slots.length===0,this.isRecurring=this.existingRule.type==="weekly",this.selectedDays=this.existingRule.daysOfWeek||[],this.existingRule.slots&&this.existingRule.slots.length>0&&(this.startTime=this.existingRule.slots[0].start,this.endTime=this.existingRule.slots[0].end);else{this.description="",this.blockAllDay=!this.isRange,this.isRecurring=!1;const e=g.parseISODate(this.dateString);this.selectedDays=[e.getDay()]}}updated(t){var e;if(t.has("open")){const a=(e=this.shadowRoot)==null?void 0:e.getElementById("booking-dialog");a&&(this.open?a.open||a.showModal():a.open&&a.close())}}handleDialogClose(){this.open&&this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}toggleDay(t){const e=this.selectedDays.indexOf(t);this.selectedDays=e>-1?this.selectedDays.filter(a=>a!==t):[...this.selectedDays,t]}handleSave(){const t={title:this.description.trim(),blockAllDay:this.blockAllDay,isRecurring:this.isRecurring,selectedDays:this.selectedDays,dateString:this.dateString,startTime:this.startTime,endTime:this.endTime};this.dispatchEvent(new CustomEvent("save-rule",{detail:t,bubbles:!0,composed:!0}))}handleDelete(){this.existingRule&&this.dispatchEvent(new CustomEvent("delete-rule",{detail:{id:this.existingRule.id,dateString:this.dateString,rule:this.existingRule},bubbles:!0,composed:!0}))}render(){const t=["D","L","M","M","J","V","S"],e=this.isRange?`${this.dateString} (${this.startTime} - ${this.endTime})`:this.dateString;return s.html`
684
684
  <dialog id="booking-dialog" @close=${this.handleDialogClose}>
685
685
  <div class="modal-content">
686
686
  <h3>${this.existingRule?"Gestionar Bloqueo":"Crear Bloqueo"}</h3>
@@ -711,6 +711,27 @@
711
711
  </label>
712
712
  </div>
713
713
 
714
+ ${this.blockAllDay?"":s.html`
715
+ <div style="display: flex; gap: 12px;" class="form-group">
716
+ <div style="flex: 1;">
717
+ <label>Hora Inicio</label>
718
+ <input
719
+ type="time"
720
+ .value=${this.startTime}
721
+ @input=${a=>this.startTime=a.target.value}
722
+ />
723
+ </div>
724
+ <div style="flex: 1;">
725
+ <label>Hora Fin</label>
726
+ <input
727
+ type="time"
728
+ .value=${this.endTime}
729
+ @input=${a=>this.endTime=a.target.value}
730
+ />
731
+ </div>
732
+ </div>
733
+ `}
734
+
714
735
  <div class="switch-row">
715
736
  <label>Repetir semanalmente</label>
716
737
  <label class="switch">
@@ -747,7 +768,7 @@
747
768
  </div>
748
769
  </div>
749
770
  </dialog>
750
- `}};exports.GlatamCalendarModal.styles=W;S([i.property({type:Boolean})],exports.GlatamCalendarModal.prototype,"open",2);S([i.property({type:String})],exports.GlatamCalendarModal.prototype,"dateString",2);S([i.property({type:String})],exports.GlatamCalendarModal.prototype,"startTime",2);S([i.property({type:String})],exports.GlatamCalendarModal.prototype,"endTime",2);S([i.property({type:Boolean})],exports.GlatamCalendarModal.prototype,"isRange",2);S([i.property({type:Object})],exports.GlatamCalendarModal.prototype,"existingRule",2);S([i.state()],exports.GlatamCalendarModal.prototype,"description",2);S([i.state()],exports.GlatamCalendarModal.prototype,"blockAllDay",2);S([i.state()],exports.GlatamCalendarModal.prototype,"isRecurring",2);S([i.state()],exports.GlatamCalendarModal.prototype,"selectedDays",2);exports.GlatamCalendarModal=S([i.customElement("glatam-calendar-modal")],exports.GlatamCalendarModal);const U=s.css`
771
+ `}};exports.GlatamCalendarModal.styles=W;D([i.property({type:Boolean})],exports.GlatamCalendarModal.prototype,"open",2);D([i.property({type:String})],exports.GlatamCalendarModal.prototype,"dateString",2);D([i.property({type:String})],exports.GlatamCalendarModal.prototype,"startTime",2);D([i.property({type:String})],exports.GlatamCalendarModal.prototype,"endTime",2);D([i.property({type:Boolean})],exports.GlatamCalendarModal.prototype,"isRange",2);D([i.property({type:Object})],exports.GlatamCalendarModal.prototype,"existingRule",2);D([i.state()],exports.GlatamCalendarModal.prototype,"description",2);D([i.state()],exports.GlatamCalendarModal.prototype,"blockAllDay",2);D([i.state()],exports.GlatamCalendarModal.prototype,"isRecurring",2);D([i.state()],exports.GlatamCalendarModal.prototype,"selectedDays",2);exports.GlatamCalendarModal=D([i.customElement("glatam-calendar-modal")],exports.GlatamCalendarModal);const U=s.css`
751
772
  :host {
752
773
  display: contents;
753
774
  font-family: var(--glatam-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
@@ -943,7 +964,7 @@
943
964
  </div>
944
965
  </div>
945
966
  </dialog>
946
- `}};exports.GlatamSeriesConfirmationModal.styles=U;C([i.property({type:Boolean})],exports.GlatamSeriesConfirmationModal.prototype,"open",2);C([i.property({type:String})],exports.GlatamSeriesConfirmationModal.prototype,"dateString",2);C([i.property({type:Object})],exports.GlatamSeriesConfirmationModal.prototype,"targetRule",2);exports.GlatamSeriesConfirmationModal=C([i.customElement("glatam-series-confirmation-modal")],exports.GlatamSeriesConfirmationModal);var Y=Object.defineProperty,H=Object.getOwnPropertyDescriptor,h=(c,t,e,a)=>{for(var r=a>1?void 0:a?H(t,e):t,o=c.length-1,l;o>=0;o--)(l=c[o])&&(r=(a?l(t,e,r):l(r))||r);return a&&r&&Y(t,e,r),r};const X=[{start:"09:00",end:"10:00"},{start:"10:00",end:"11:00"},{start:"11:00",end:"12:00"},{start:"12:00",end:"13:00"},{start:"13:00",end:"14:00"},{start:"14:00",end:"15:00"},{start:"15:00",end:"16:00"},{start:"16:00",end:"17:00"},{start:"17:00",end:"18:00"}];exports.GlatamCalendar=class extends s.LitElement{constructor(){super(...arguments),this.role="provider",this.size="medium",this.view="month",this.locale="es",this.startOfWeekDay=0,this.rules=[],this.selectedDates=[],this.selectedRange=null,this.hostTimezone="America/Bogota",this.activeTimezone="local",this.slots=X,this.minDate="",this.maxDate="",this.showNeighboringMonth=!0,this.tileClassName=null,this.enableSeriesConfirmation=!1,this.activeDate=new Date,this.localRules=[],this.darkMode=!1,this.modalOpen=!1,this.modalDateString="",this.modalStartTime="",this.modalEndTime="",this.modalIsRange=!1,this.modalExistingRule=null,this.seriesModalOpen=!1,this.seriesTargetRule=null,this.seriesTargetDateString=""}firstUpdated(){this.darkMode=window.matchMedia("(prefers-color-scheme: dark)").matches,this.localRules=[...this.rules]}willUpdate(t){t.has("rules")&&this.rules!==this.localRules&&(this.localRules=[...this.rules||[]])}updated(t){t.has("darkMode")&&this.classList.toggle("dark-mode",this.darkMode)}handlePrev(){const t=new Date(this.activeDate);this.view==="month"?t.setMonth(t.getMonth()-1):this.view==="week"?t.setDate(t.getDate()-7):t.setDate(t.getDate()-1),this.activeDate=t}handleNext(){const t=new Date(this.activeDate);this.view==="month"?t.setMonth(t.getMonth()+1):this.view==="week"?t.setDate(t.getDate()+7):t.setDate(t.getDate()+1),this.activeDate=t}getHeaderTitle(){const t=this.view==="month"?{month:"long",year:"numeric"}:this.view==="week"?{month:"short",year:"numeric"}:{day:"numeric",month:"long",year:"numeric"};return new Intl.DateTimeFormat(this.locale,t).format(this.activeDate)}handleDaySelect(t){const{dateString:e,isBlocked:a}=t.detail;this.role==="buyer"&&a||(this.activeDate=m.parseISODate(e),this.view="day",this.dispatchEvent(new CustomEvent("date-selected",{detail:{dateString:e},bubbles:!0,composed:!0})))}handleRangeSelect(t){var O,z;const{dateString:e,start:a,end:r}=t.detail,o=this.activeTimezone==="local"?k(this.activeDate,this.hostTimezone,"local"):0,l=m.formatISODate(new Date),d=this.minDate||(this.role==="buyer"?l:"");if(this.role==="buyer"&&(d&&e<d||this.maxDate&&e>this.maxDate))return;const g=this.getDisplaySlots(o),n=a.split(" ")[0],p=r.split(" ")[0],u=g.findIndex($=>$.start.startsWith(n)),y=g.findIndex($=>$.end.startsWith(p)),f=((O=this.slots[u])==null?void 0:O.start)||n,D=((z=this.slots[y])==null?void 0:z.end)||p;if(this.role==="buyer"){this.selectedRange={dateString:e,start:n,end:p},this.dispatchEvent(new CustomEvent("booking-selected",{detail:{dateString:e,start:n,end:p,hostStart:f,hostEnd:D},bubbles:!0,composed:!0}));return}this.openModal(e,f,D,!0,null)}handleSlotClick(t){const{dateString:e,slot:a}=t.detail,r=m.parseISODate(e),o=this.activeTimezone==="local"?k(this.activeDate,this.hostTimezone,"local"):0,l=m.formatISODate(new Date),d=this.minDate||(this.role==="buyer"?l:"");if(this.role==="buyer"&&(a.isBlocked||d&&e<d||this.maxDate&&e>this.maxDate))return;const g=this.getDisplaySlots(o),n=a.start.split(" ")[0],p=g.findIndex(f=>f.start.startsWith(n)),u=this.slots[p]||a;if(this.role==="buyer"){this.selectedRange={dateString:e,start:a.start,end:a.end},this.dispatchEvent(new CustomEvent("booking-selected",{detail:{dateString:e,start:a.start,end:a.end,hostStart:u.start,hostEnd:u.end},bubbles:!0,composed:!0}));return}const y=this.localRules.find(f=>m.isTimeBlocked(r,u,[f]));this.openModal(e,u.start,u.end,!0,y||null)}handleBlockDayAction(){const t=m.formatISODate(this.activeDate),e=this.localRules.find(a=>m.isTimeBlocked(this.activeDate,void 0,[a]));this.openModal(t,"","",!1,e||null)}openModal(t,e,a,r,o){this.modalDateString=t,this.modalStartTime=e,this.modalEndTime=a,this.modalIsRange=r,this.modalExistingRule=o,this.modalOpen=!0}handleSaveRule(t){var l;const e=t.detail,a=this.modalExistingRule?this.modalExistingRule.id:`rule-${Date.now()}`,r={id:a,type:e.isRecurring?"weekly":"date-range",slots:e.blockAllDay?void 0:[{start:e.startTime,end:e.endTime}],daysOfWeek:e.isRecurring?e.selectedDays:void 0,startDate:e.isRecurring?void 0:e.dateString,endDate:e.isRecurring?void 0:e.dateString,description:e.title,exceptions:(l=this.modalExistingRule)==null?void 0:l.exceptions},o=this.modalExistingRule?this.localRules.map(d=>d.id===a?r:d):[...this.localRules,r];this.localRules=o,this.rules=o,this.modalOpen=!1,this.dispatchEvent(new CustomEvent("rules-changed",{detail:{rules:o},bubbles:!0,composed:!0}))}handleDeleteRule(t){const e=t.detail.rule||this.localRules.find(l=>l.id===t.detail.id),a=t.detail.dateString||this.modalDateString;if(this.enableSeriesConfirmation&&e&&e.type==="weekly"){this.modalOpen=!1,this.seriesTargetRule=e,this.seriesTargetDateString=a,this.seriesModalOpen=!0;return}const{updatedRules:r,targetRule:o}=M(this.localRules,t.detail.id);if(this.localRules=r,this.rules=r,this.modalOpen=!1,o){const l={actionType:"delete_series",targetRule:o,dateString:a,updatedRules:r};this.dispatchEvent(new CustomEvent("rule-action-triggered",{detail:l,bubbles:!0,composed:!0}))}this.dispatchEvent(new CustomEvent("rules-changed",{detail:{rules:r},bubbles:!0,composed:!0}))}handleConfirmSeriesAction(t){const{actionType:e,dateString:a,targetRule:r}=t.detail,{updatedRules:o,targetRule:l}=e==="delete_instance"?I(this.localRules,r.id,a):M(this.localRules,r.id);if(this.localRules=o,this.rules=o,this.seriesModalOpen=!1,l){const d={actionType:e,targetRule:l,dateString:a,updatedRules:o};this.dispatchEvent(new CustomEvent("rule-action-triggered",{detail:d,bubbles:!0,composed:!0}))}this.dispatchEvent(new CustomEvent("rules-changed",{detail:{rules:o},bubbles:!0,composed:!0}))}getDisplaySlots(t){return t===0?this.slots:this.slots.map(e=>{const a=T(e,t),r=a.dayShift>0?" (+1d)":a.dayShift<0?" (-1d)":"";return{start:a.start+r,end:a.end+r}})}render(){var g;const t=this.activeDate.getFullYear(),e=this.activeDate.getMonth(),a=m.isTimeBlocked(this.activeDate,void 0,this.localRules),r=this.activeTimezone==="local"?k(this.activeDate,this.hostTimezone,"local"):0,o=this.getDisplaySlots(r),l=n=>n.map(p=>({...p,slots:p.slots.map((u,y)=>{var f,D;return{...u,start:((f=o[y])==null?void 0:f.start)||u.start,end:((D=o[y])==null?void 0:D.end)||u.end}})})),d=((g=this.hostTimezone.split("/").pop())==null?void 0:g.replace("_"," "))||"Anfitrión";return s.html`
967
+ `}};exports.GlatamSeriesConfirmationModal.styles=U;C([i.property({type:Boolean})],exports.GlatamSeriesConfirmationModal.prototype,"open",2);C([i.property({type:String})],exports.GlatamSeriesConfirmationModal.prototype,"dateString",2);C([i.property({type:Object})],exports.GlatamSeriesConfirmationModal.prototype,"targetRule",2);exports.GlatamSeriesConfirmationModal=C([i.customElement("glatam-series-confirmation-modal")],exports.GlatamSeriesConfirmationModal);var Y=Object.defineProperty,H=Object.getOwnPropertyDescriptor,h=(c,t,e,a)=>{for(var r=a>1?void 0:a?H(t,e):t,o=c.length-1,l;o>=0;o--)(l=c[o])&&(r=(a?l(t,e,r):l(r))||r);return a&&r&&Y(t,e,r),r};const X=[{start:"09:00",end:"10:00"},{start:"10:00",end:"11:00"},{start:"11:00",end:"12:00"},{start:"12:00",end:"13:00"},{start:"13:00",end:"14:00"},{start:"14:00",end:"15:00"},{start:"15:00",end:"16:00"},{start:"16:00",end:"17:00"},{start:"17:00",end:"18:00"}];exports.GlatamCalendar=class extends s.LitElement{constructor(){super(...arguments),this.role="provider",this.size="medium",this.view="month",this.locale="es",this.startOfWeekDay=0,this.rules=[],this.selectedDates=[],this.selectedRange=null,this.hostTimezone="America/Bogota",this.activeTimezone="local",this.slots=X,this.minDate="",this.maxDate="",this.showNeighboringMonth=!0,this.tileClassName=null,this.enableSeriesConfirmation=!1,this.activeDate=new Date,this.localRules=[],this.darkMode=!1,this.modalOpen=!1,this.modalDateString="",this.modalStartTime="",this.modalEndTime="",this.modalIsRange=!1,this.modalExistingRule=null,this.seriesModalOpen=!1,this.seriesTargetRule=null,this.seriesTargetDateString=""}firstUpdated(){this.darkMode=window.matchMedia("(prefers-color-scheme: dark)").matches,this.localRules=[...this.rules]}willUpdate(t){t.has("rules")&&this.rules!==this.localRules&&(this.localRules=[...this.rules||[]])}updated(t){t.has("darkMode")&&this.classList.toggle("dark-mode",this.darkMode)}handlePrev(){const t=new Date(this.activeDate);this.view==="month"?t.setMonth(t.getMonth()-1):this.view==="week"?t.setDate(t.getDate()-7):t.setDate(t.getDate()-1),this.activeDate=t}handleNext(){const t=new Date(this.activeDate);this.view==="month"?t.setMonth(t.getMonth()+1):this.view==="week"?t.setDate(t.getDate()+7):t.setDate(t.getDate()+1),this.activeDate=t}getHeaderTitle(){const t=this.view==="month"?{month:"long",year:"numeric"}:this.view==="week"?{month:"short",year:"numeric"}:{day:"numeric",month:"long",year:"numeric"};return new Intl.DateTimeFormat(this.locale,t).format(this.activeDate)}handleDaySelect(t){const{dateString:e,isBlocked:a}=t.detail;this.role==="buyer"&&a||(this.activeDate=g.parseISODate(e),this.view="day",this.dispatchEvent(new CustomEvent("date-selected",{detail:{dateString:e},bubbles:!0,composed:!0})))}handleRangeSelect(t){var O,z;const{dateString:e,start:a,end:r}=t.detail,o=this.activeTimezone==="local"?k(this.activeDate,this.hostTimezone,"local"):0,l=g.formatISODate(new Date),d=this.minDate||(this.role==="buyer"?l:"");if(this.role==="buyer"&&(d&&e<d||this.maxDate&&e>this.maxDate))return;const m=this.getDisplaySlots(o),n=a.split(" ")[0],p=r.split(" ")[0],u=m.findIndex($=>$.start.startsWith(n)),y=m.findIndex($=>$.end.startsWith(p)),f=((O=this.slots[u])==null?void 0:O.start)||n,S=((z=this.slots[y])==null?void 0:z.end)||p;if(this.role==="buyer"){this.selectedRange={dateString:e,start:n,end:p},this.dispatchEvent(new CustomEvent("booking-selected",{detail:{dateString:e,start:n,end:p,hostStart:f,hostEnd:S},bubbles:!0,composed:!0}));return}this.openModal(e,f,S,!0,null)}handleSlotClick(t){const{dateString:e,slot:a}=t.detail,r=g.parseISODate(e),o=this.activeTimezone==="local"?k(this.activeDate,this.hostTimezone,"local"):0,l=g.formatISODate(new Date),d=this.minDate||(this.role==="buyer"?l:"");if(this.role==="buyer"&&(a.isBlocked||d&&e<d||this.maxDate&&e>this.maxDate))return;const m=this.getDisplaySlots(o),n=a.start.split(" ")[0],p=m.findIndex(f=>f.start.startsWith(n)),u=this.slots[p]||a;if(this.role==="buyer"){this.selectedRange={dateString:e,start:a.start,end:a.end},this.dispatchEvent(new CustomEvent("booking-selected",{detail:{dateString:e,start:a.start,end:a.end,hostStart:u.start,hostEnd:u.end},bubbles:!0,composed:!0}));return}const y=this.localRules.find(f=>g.isTimeBlocked(r,u,[f]));this.openModal(e,u.start,u.end,!0,y||null)}handleBlockDayAction(){const t=g.formatISODate(this.activeDate),e=this.localRules.find(a=>g.isTimeBlocked(this.activeDate,void 0,[a]));this.openModal(t,"","",!1,e||null)}openModal(t,e,a,r,o){this.modalDateString=t,this.modalStartTime=e,this.modalEndTime=a,this.modalIsRange=r,this.modalExistingRule=o,this.modalOpen=!0}handleSaveRule(t){var l;const e=t.detail,a=this.modalExistingRule?this.modalExistingRule.id:`rule-${Date.now()}`,r={id:a,type:e.isRecurring?"weekly":"date-range",slots:e.blockAllDay?void 0:[{start:e.startTime,end:e.endTime}],daysOfWeek:e.isRecurring?e.selectedDays:void 0,startDate:e.isRecurring?void 0:e.dateString,endDate:e.isRecurring?void 0:e.dateString,description:e.title,exceptions:(l=this.modalExistingRule)==null?void 0:l.exceptions},o=this.modalExistingRule?this.localRules.map(d=>d.id===a?r:d):[...this.localRules,r];this.localRules=o,this.rules=o,this.modalOpen=!1,this.dispatchEvent(new CustomEvent("rules-changed",{detail:{rules:o},bubbles:!0,composed:!0}))}handleDeleteRule(t){const e=t.detail.rule||this.localRules.find(l=>l.id===t.detail.id),a=t.detail.dateString||this.modalDateString;if(this.enableSeriesConfirmation&&e&&e.type==="weekly"){this.modalOpen=!1,this.seriesTargetRule=e,this.seriesTargetDateString=a,this.seriesModalOpen=!0;return}const{updatedRules:r,targetRule:o}=M(this.localRules,t.detail.id);if(this.localRules=r,this.rules=r,this.modalOpen=!1,o){const l={actionType:"delete_series",targetRule:o,dateString:a,updatedRules:r};this.dispatchEvent(new CustomEvent("rule-action-triggered",{detail:l,bubbles:!0,composed:!0}))}this.dispatchEvent(new CustomEvent("rules-changed",{detail:{rules:r},bubbles:!0,composed:!0}))}handleConfirmSeriesAction(t){const{actionType:e,dateString:a,targetRule:r}=t.detail,{updatedRules:o,targetRule:l}=e==="delete_instance"?I(this.localRules,r.id,a):M(this.localRules,r.id);if(this.localRules=o,this.rules=o,this.seriesModalOpen=!1,l){const d={actionType:e,targetRule:l,dateString:a,updatedRules:o};this.dispatchEvent(new CustomEvent("rule-action-triggered",{detail:d,bubbles:!0,composed:!0}))}this.dispatchEvent(new CustomEvent("rules-changed",{detail:{rules:o},bubbles:!0,composed:!0}))}getDisplaySlots(t){return t===0?this.slots:this.slots.map(e=>{const a=T(e,t),r=a.dayShift>0?" (+1d)":a.dayShift<0?" (-1d)":"";return{start:a.start+r,end:a.end+r}})}render(){var m;const t=this.activeDate.getFullYear(),e=this.activeDate.getMonth(),a=g.isTimeBlocked(this.activeDate,void 0,this.localRules),r=this.activeTimezone==="local"?k(this.activeDate,this.hostTimezone,"local"):0,o=this.getDisplaySlots(r),l=n=>n.map(p=>({...p,slots:p.slots.map((u,y)=>{var f,S;return{...u,start:((f=o[y])==null?void 0:f.start)||u.start,end:((S=o[y])==null?void 0:S.end)||u.end}})})),d=((m=this.hostTimezone.split("/").pop())==null?void 0:m.replace("_"," "))||"Anfitrión";return s.html`
947
968
  <div class="calendar-header">
948
969
  <div class="nav-group">
949
970
  <button class="btn" @click=${()=>this.activeDate=new Date}>Hoy</button>
@@ -973,7 +994,7 @@
973
994
  </div>
974
995
 
975
996
  <div class="calendar-body">
976
- ${this.view==="month"?s.html`<glatam-calendar-month-view .days=${m.generateMonthDays(t,e,this.localRules,this.slots,this.startOfWeekDay)} .locale=${this.locale} .startOfWeekDay=${this.startOfWeekDay} .role=${this.role} .size=${this.size} .minDate=${this.minDate||(this.role==="buyer"?m.formatISODate(new Date):"")} .maxDate=${this.maxDate} .showNeighboringMonth=${this.showNeighboringMonth} .tileClassName=${this.tileClassName} @day-select=${this.handleDaySelect}></glatam-calendar-month-view>`:this.view==="week"?s.html`<glatam-calendar-week-view .days=${l(m.generateWeekDays(this.activeDate,this.localRules,this.slots,this.startOfWeekDay))} .slots=${o} .locale=${this.locale} .selectedRange=${this.selectedRange} .role=${this.role} .minDate=${this.minDate||(this.role==="buyer"?m.formatISODate(new Date):"")} .maxDate=${this.maxDate} @range-select=${this.handleRangeSelect} @slot-click=${this.handleSlotClick}></glatam-calendar-week-view>`:s.html`<glatam-calendar-day-view .day=${l(m.generateWeekDays(this.activeDate,this.localRules,this.slots,this.startOfWeekDay)).find(n=>n.dateString===m.formatISODate(this.activeDate))||null} .slots=${o} .locale=${this.locale} .selectedRange=${this.selectedRange} .role=${this.role} .minDate=${this.minDate||(this.role==="buyer"?m.formatISODate(new Date):"")} .maxDate=${this.maxDate} @range-select=${this.handleRangeSelect} @slot-click=${this.handleSlotClick}></glatam-calendar-day-view>`}
997
+ ${this.view==="month"?s.html`<glatam-calendar-month-view .days=${g.generateMonthDays(t,e,this.localRules,this.slots,this.startOfWeekDay)} .locale=${this.locale} .startOfWeekDay=${this.startOfWeekDay} .role=${this.role} .size=${this.size} .minDate=${this.minDate||(this.role==="buyer"?g.formatISODate(new Date):"")} .maxDate=${this.maxDate} .showNeighboringMonth=${this.showNeighboringMonth} .tileClassName=${this.tileClassName} @day-select=${this.handleDaySelect}></glatam-calendar-month-view>`:this.view==="week"?s.html`<glatam-calendar-week-view .days=${l(g.generateWeekDays(this.activeDate,this.localRules,this.slots,this.startOfWeekDay))} .slots=${o} .locale=${this.locale} .selectedRange=${this.selectedRange} .role=${this.role} .minDate=${this.minDate||(this.role==="buyer"?g.formatISODate(new Date):"")} .maxDate=${this.maxDate} @range-select=${this.handleRangeSelect} @slot-click=${this.handleSlotClick}></glatam-calendar-week-view>`:s.html`<glatam-calendar-day-view .day=${l(g.generateWeekDays(this.activeDate,this.localRules,this.slots,this.startOfWeekDay)).find(n=>n.dateString===g.formatISODate(this.activeDate))||null} .slots=${o} .locale=${this.locale} .selectedRange=${this.selectedRange} .role=${this.role} .minDate=${this.minDate||(this.role==="buyer"?g.formatISODate(new Date):"")} .maxDate=${this.maxDate} @range-select=${this.handleRangeSelect} @slot-click=${this.handleSlotClick}></glatam-calendar-day-view>`}
977
998
  </div>
978
999
 
979
1000
  <glatam-calendar-modal
@@ -986,7 +1007,7 @@
986
1007
  .open=${this.seriesModalOpen} .dateString=${this.seriesTargetDateString} .targetRule=${this.seriesTargetRule}
987
1008
  @confirm-action=${this.handleConfirmSeriesAction} @close=${()=>this.seriesModalOpen=!1}
988
1009
  ></glatam-series-confirmation-modal>
989
- `}};exports.GlatamCalendar.styles=[G,E];h([i.property({type:String})],exports.GlatamCalendar.prototype,"role",2);h([i.property({type:String,reflect:!0})],exports.GlatamCalendar.prototype,"size",2);h([i.property({type:String})],exports.GlatamCalendar.prototype,"view",2);h([i.property({type:String})],exports.GlatamCalendar.prototype,"locale",2);h([i.property({type:Number})],exports.GlatamCalendar.prototype,"startOfWeekDay",2);h([i.property({type:Array})],exports.GlatamCalendar.prototype,"rules",2);h([i.property({type:Array})],exports.GlatamCalendar.prototype,"selectedDates",2);h([i.property({type:Object})],exports.GlatamCalendar.prototype,"selectedRange",2);h([i.property({type:String})],exports.GlatamCalendar.prototype,"hostTimezone",2);h([i.property({type:String})],exports.GlatamCalendar.prototype,"activeTimezone",2);h([i.property({type:Array})],exports.GlatamCalendar.prototype,"slots",2);h([i.property({type:String})],exports.GlatamCalendar.prototype,"minDate",2);h([i.property({type:String})],exports.GlatamCalendar.prototype,"maxDate",2);h([i.property({type:Boolean})],exports.GlatamCalendar.prototype,"showNeighboringMonth",2);h([i.property({attribute:!1})],exports.GlatamCalendar.prototype,"tileClassName",2);h([i.property({type:Boolean,attribute:"enable-series-confirmation"})],exports.GlatamCalendar.prototype,"enableSeriesConfirmation",2);h([i.state()],exports.GlatamCalendar.prototype,"activeDate",2);h([i.state()],exports.GlatamCalendar.prototype,"localRules",2);h([i.state()],exports.GlatamCalendar.prototype,"darkMode",2);h([i.state()],exports.GlatamCalendar.prototype,"modalOpen",2);h([i.state()],exports.GlatamCalendar.prototype,"modalDateString",2);h([i.state()],exports.GlatamCalendar.prototype,"modalStartTime",2);h([i.state()],exports.GlatamCalendar.prototype,"modalEndTime",2);h([i.state()],exports.GlatamCalendar.prototype,"modalIsRange",2);h([i.state()],exports.GlatamCalendar.prototype,"modalExistingRule",2);h([i.state()],exports.GlatamCalendar.prototype,"seriesModalOpen",2);h([i.state()],exports.GlatamCalendar.prototype,"seriesTargetRule",2);h([i.state()],exports.GlatamCalendar.prototype,"seriesTargetDateString",2);exports.GlatamCalendar=h([i.customElement("glatam-calendar")],exports.GlatamCalendar);const Z=s.css`
1010
+ `}};exports.GlatamCalendar.styles=[E,G];h([i.property({type:String})],exports.GlatamCalendar.prototype,"role",2);h([i.property({type:String,reflect:!0})],exports.GlatamCalendar.prototype,"size",2);h([i.property({type:String})],exports.GlatamCalendar.prototype,"view",2);h([i.property({type:String})],exports.GlatamCalendar.prototype,"locale",2);h([i.property({type:Number})],exports.GlatamCalendar.prototype,"startOfWeekDay",2);h([i.property({type:Array})],exports.GlatamCalendar.prototype,"rules",2);h([i.property({type:Array})],exports.GlatamCalendar.prototype,"selectedDates",2);h([i.property({type:Object})],exports.GlatamCalendar.prototype,"selectedRange",2);h([i.property({type:String})],exports.GlatamCalendar.prototype,"hostTimezone",2);h([i.property({type:String})],exports.GlatamCalendar.prototype,"activeTimezone",2);h([i.property({type:Array})],exports.GlatamCalendar.prototype,"slots",2);h([i.property({type:String})],exports.GlatamCalendar.prototype,"minDate",2);h([i.property({type:String})],exports.GlatamCalendar.prototype,"maxDate",2);h([i.property({type:Boolean})],exports.GlatamCalendar.prototype,"showNeighboringMonth",2);h([i.property({attribute:!1})],exports.GlatamCalendar.prototype,"tileClassName",2);h([i.property({type:Boolean,attribute:"enable-series-confirmation"})],exports.GlatamCalendar.prototype,"enableSeriesConfirmation",2);h([i.state()],exports.GlatamCalendar.prototype,"activeDate",2);h([i.state()],exports.GlatamCalendar.prototype,"localRules",2);h([i.state()],exports.GlatamCalendar.prototype,"darkMode",2);h([i.state()],exports.GlatamCalendar.prototype,"modalOpen",2);h([i.state()],exports.GlatamCalendar.prototype,"modalDateString",2);h([i.state()],exports.GlatamCalendar.prototype,"modalStartTime",2);h([i.state()],exports.GlatamCalendar.prototype,"modalEndTime",2);h([i.state()],exports.GlatamCalendar.prototype,"modalIsRange",2);h([i.state()],exports.GlatamCalendar.prototype,"modalExistingRule",2);h([i.state()],exports.GlatamCalendar.prototype,"seriesModalOpen",2);h([i.state()],exports.GlatamCalendar.prototype,"seriesTargetRule",2);h([i.state()],exports.GlatamCalendar.prototype,"seriesTargetDateString",2);exports.GlatamCalendar=h([i.customElement("glatam-calendar")],exports.GlatamCalendar);const K=s.css`
990
1011
  :host {
991
1012
  display: inline-block;
992
1013
  background: transparent;
@@ -994,6 +1015,7 @@
994
1015
  padding: 0;
995
1016
  box-shadow: none;
996
1017
  width: 100%;
1018
+ overflow: visible !important;
997
1019
  }
998
1020
 
999
1021
  .mini-calendar-header {
@@ -1036,22 +1058,22 @@
1036
1058
  .mini-nav-btn:active:not(:disabled) {
1037
1059
  transform: scale(0.95);
1038
1060
  }
1039
- `;var J=Object.defineProperty,K=Object.getOwnPropertyDescriptor,b=(c,t,e,a)=>{for(var r=a>1?void 0:a?K(t,e):t,o=c.length-1,l;o>=0;o--)(l=c[o])&&(r=(a?l(t,e,r):l(r))||r);return a&&r&&J(t,e,r),r};exports.GlatamCalendarMini=class extends s.LitElement{constructor(){super(...arguments),this.role="buyer",this.locale="es",this.startOfWeekDay=0,this.rules=[],this.selectedRange=null,this.size="medium",this.hostTimezone="America/Bogota",this.activeTimezone="local",this.minDate="",this.maxDate="",this.showNeighboringMonth=!0,this.tileClassName=null,this.slots=[{start:"09:00",end:"10:00"},{start:"10:00",end:"11:00"},{start:"11:00",end:"12:00"},{start:"12:00",end:"13:00"},{start:"13:00",end:"14:00"},{start:"14:00",end:"15:00"},{start:"15:00",end:"16:00"},{start:"16:00",end:"17:00"},{start:"17:00",end:"18:00"}],this.activeDate=new Date,this.dropdownOpen=!1,this.dropdownSelectedDateString="",this.touchStartX=0,this.touchStartY=0}handlePrevMonth(t){t.stopPropagation();const e=new Date(this.activeDate);e.setMonth(e.getMonth()-1),this.activeDate=e}handleNextMonth(t){t.stopPropagation();const e=new Date(this.activeDate);e.setMonth(e.getMonth()+1),this.activeDate=e}handleTouchStart(t){t.touches&&t.touches.length>0&&(this.touchStartX=t.touches[0].clientX,this.touchStartY=t.touches[0].clientY)}handleTouchEnd(t){if(t.changedTouches&&t.changedTouches.length>0){const e=this.touchStartX-t.changedTouches[0].clientX,a=this.touchStartY-t.changedTouches[0].clientY;Math.abs(e)>50&&Math.abs(e)>Math.abs(a)&&(e>0?this.handleNextMonth(t):this.handlePrevMonth(t))}}getFormattedMonthTitle(){const t=this.activeDate.toLocaleDateString(this.locale||"es",{month:"long",year:"numeric"});return t.charAt(0).toUpperCase()+t.slice(1)}handleDropdownDaySelect(t){this.dropdownSelectedDateString=t.detail.dateString}selectDropdownSlot(t){const e={dateString:this.dropdownSelectedDateString,start:t.displayStart,end:t.displayEnd,hostStart:t.start,hostEnd:t.end};this.selectedRange={dateString:this.dropdownSelectedDateString,start:t.displayStart,end:t.displayEnd},this.dispatchEvent(new CustomEvent("booking-selected",{detail:e,bubbles:!0,composed:!0})),this.dropdownOpen=!1,this.dropdownSelectedDateString=""}render(){const t=this.selectedRange?`Reserva: ${this.selectedRange.dateString} (${this.selectedRange.start} - ${this.selectedRange.end})`:"Seleccionar Fecha y Hora",e=this.activeDate.getFullYear(),a=this.activeDate.getMonth(),r=this.dropdownSelectedDateString?new Date(this.dropdownSelectedDateString+"T00:00:00"):null,o=r&&this.activeTimezone==="local"?k(r,this.hostTimezone,"local"):0,l=r?this.slots.map(d=>{const g=m.isTimeBlocked(r,d,this.rules),n=T(d,o),p=n.dayShift>0?" (+1d)":n.dayShift<0?" (-1d)":"";return{...d,displayStart:n.start+p,displayEnd:n.end+p,isBlocked:g}}):[];return s.html`
1061
+ `;var Z=Object.defineProperty,J=Object.getOwnPropertyDescriptor,b=(c,t,e,a)=>{for(var r=a>1?void 0:a?J(t,e):t,o=c.length-1,l;o>=0;o--)(l=c[o])&&(r=(a?l(t,e,r):l(r))||r);return a&&r&&Z(t,e,r),r};exports.GlatamCalendarMini=class extends s.LitElement{constructor(){super(...arguments),this.role="buyer",this.locale="es",this.startOfWeekDay=0,this.rules=[],this.selectedRange=null,this.size="medium",this.hostTimezone="America/Bogota",this.activeTimezone="local",this.minDate="",this.maxDate="",this.showNeighboringMonth=!0,this.tileClassName=null,this.slots=[{start:"09:00",end:"10:00"},{start:"10:00",end:"11:00"},{start:"11:00",end:"12:00"},{start:"12:00",end:"13:00"},{start:"13:00",end:"14:00"},{start:"14:00",end:"15:00"},{start:"15:00",end:"16:00"},{start:"16:00",end:"17:00"},{start:"17:00",end:"18:00"}],this.activeDate=new Date,this.dropdownOpen=!1,this.dropdownSelectedDateString="",this.touchStartX=0,this.touchStartY=0,this.handleOutsideClick=t=>{this.dropdownOpen&&!t.composedPath().includes(this)&&(this.dropdownOpen=!1,this.dropdownSelectedDateString="")},this.handleKeyDown=t=>{t.key==="Escape"&&this.dropdownOpen&&(this.dropdownOpen=!1,this.dropdownSelectedDateString="")}}connectedCallback(){super.connectedCallback(),window.addEventListener("click",this.handleOutsideClick),window.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){window.removeEventListener("click",this.handleOutsideClick),window.removeEventListener("keydown",this.handleKeyDown),super.disconnectedCallback()}toggleDropdown(t){t.stopPropagation(),this.dropdownOpen=!this.dropdownOpen,this.dropdownOpen||(this.dropdownSelectedDateString="")}handlePrevMonth(t){t.stopPropagation();const e=new Date(this.activeDate);e.setMonth(e.getMonth()-1),this.activeDate=e}handleNextMonth(t){t.stopPropagation();const e=new Date(this.activeDate);e.setMonth(e.getMonth()+1),this.activeDate=e}handleTouchStart(t){t.touches&&t.touches.length>0&&(this.touchStartX=t.touches[0].clientX,this.touchStartY=t.touches[0].clientY)}handleTouchEnd(t){if(t.changedTouches&&t.changedTouches.length>0){const e=this.touchStartX-t.changedTouches[0].clientX,a=this.touchStartY-t.changedTouches[0].clientY;Math.abs(e)>50&&Math.abs(e)>Math.abs(a)&&(e>0?this.handleNextMonth(t):this.handlePrevMonth(t))}}getFormattedMonthTitle(){const t=this.activeDate.toLocaleDateString(this.locale||"es",{month:"long",year:"numeric"});return t.charAt(0).toUpperCase()+t.slice(1)}handleDropdownDaySelect(t){this.dropdownSelectedDateString=t.detail.dateString}selectDropdownSlot(t){const e={dateString:this.dropdownSelectedDateString,start:t.displayStart,end:t.displayEnd,hostStart:t.start,hostEnd:t.end};this.selectedRange={dateString:this.dropdownSelectedDateString,start:t.displayStart,end:t.displayEnd},this.dispatchEvent(new CustomEvent("booking-selected",{detail:e,bubbles:!0,composed:!0})),this.dropdownOpen=!1,this.dropdownSelectedDateString=""}render(){const t=this.selectedRange?`Reserva: ${this.selectedRange.dateString} (${this.selectedRange.start} - ${this.selectedRange.end})`:"Seleccionar Fecha y Hora",e=this.activeDate.getFullYear(),a=this.activeDate.getMonth(),r=this.dropdownSelectedDateString?g.parseISODate(this.dropdownSelectedDateString):null,o=r&&this.activeTimezone==="local"?k(r,this.hostTimezone,"local"):0,l=r?this.slots.map(d=>{const m=g.isTimeBlocked(r,d,this.rules),n=T(d,o),p=n.dayShift>0?" (+1d)":n.dayShift<0?" (-1d)":"";return{...d,displayStart:n.start+p,displayEnd:n.end+p,isBlocked:m}}):[];return s.html`
1040
1062
  <div class="dropdown-container">
1041
- <button class="btn btn-primary dropdown-toggle" @click=${()=>this.dropdownOpen=!this.dropdownOpen}>
1063
+ <button class="btn btn-primary dropdown-toggle" @click=${this.toggleDropdown}>
1042
1064
  <span>${t}</span> <span>${this.dropdownOpen?"▲":"▼"}</span>
1043
1065
  </button>
1044
1066
 
1045
1067
  ${this.dropdownOpen?s.html`
1046
1068
  <div class="dropdown-card" style="--glatam-day-min-height: 38px;">
1047
1069
  ${this.dropdownSelectedDateString?s.html`
1048
- <div style="display:flex; justify-space-between; align-items:center; border-bottom: 1px solid var(--glatam-border); padding-bottom:8px;">
1049
- <button class="btn" style="height:28px; padding:0 8px; font-size:0.75rem;" @click=${()=>this.dropdownSelectedDateString=""}>&lt; Volver</button>
1070
+ <div style="display:flex; justify-content:space-between; align-items:center; border-bottom: 1px solid var(--glatam-border); padding-bottom:8px;">
1071
+ <button type="button" class="btn" style="height:28px; padding:0 8px; font-size:0.75rem;" @click=${()=>this.dropdownSelectedDateString=""}>&lt; Volver</button>
1050
1072
  <span style="font-size:0.8rem; font-weight:600; color: var(--glatam-text);">${this.dropdownSelectedDateString}</span>
1051
1073
  </div>
1052
1074
  <div class="slot-list">
1053
1075
  ${l.map(d=>s.html`
1054
- <button class="slot-btn ${d.isBlocked?"blocked":""}" ?disabled=${d.isBlocked} @click=${()=>this.selectDropdownSlot(d)}>
1076
+ <button type="button" class="slot-btn ${d.isBlocked?"blocked":""}" ?disabled=${d.isBlocked} @click=${()=>this.selectDropdownSlot(d)}>
1055
1077
  ${d.displayStart} - ${d.displayEnd} ${d.isBlocked?"(Ocupado)":""}
1056
1078
  </button>
1057
1079
  `)}
@@ -1064,8 +1086,8 @@
1064
1086
  </div>
1065
1087
  <div class="mini-calendar-touch-wrapper" @touchstart=${this.handleTouchStart} @touchend=${this.handleTouchEnd}>
1066
1088
  <glatam-calendar-month-view
1067
- .days=${m.generateMonthDays(e,a,this.rules,this.slots,this.startOfWeekDay)}
1068
- .locale=${this.locale} .startOfWeekDay=${this.startOfWeekDay} .role=${this.role} size="small"
1089
+ .days=${g.generateMonthDays(e,a,this.rules,this.slots,this.startOfWeekDay)}
1090
+ .locale=${this.locale} .startOfWeekDay=${this.startOfWeekDay} .role=${this.role} .size=${"small"}
1069
1091
  .minDate=${this.minDate} .maxDate=${this.maxDate} .showNeighboringMonth=${this.showNeighboringMonth}
1070
1092
  .tileClassName=${this.tileClassName} @day-select=${this.handleDropdownDaySelect}
1071
1093
  ></glatam-calendar-month-view>
@@ -1074,4 +1096,4 @@
1074
1096
  </div>
1075
1097
  `:""}
1076
1098
  </div>
1077
- `}};exports.GlatamCalendarMini.styles=[G,E,Z];b([i.property({type:String})],exports.GlatamCalendarMini.prototype,"role",2);b([i.property({type:String})],exports.GlatamCalendarMini.prototype,"locale",2);b([i.property({type:Number})],exports.GlatamCalendarMini.prototype,"startOfWeekDay",2);b([i.property({type:Array})],exports.GlatamCalendarMini.prototype,"rules",2);b([i.property({type:Object})],exports.GlatamCalendarMini.prototype,"selectedRange",2);b([i.property({type:String,reflect:!0})],exports.GlatamCalendarMini.prototype,"size",2);b([i.property({type:String})],exports.GlatamCalendarMini.prototype,"hostTimezone",2);b([i.property({type:String})],exports.GlatamCalendarMini.prototype,"activeTimezone",2);b([i.property({type:String})],exports.GlatamCalendarMini.prototype,"minDate",2);b([i.property({type:String})],exports.GlatamCalendarMini.prototype,"maxDate",2);b([i.property({type:Boolean})],exports.GlatamCalendarMini.prototype,"showNeighboringMonth",2);b([i.property({attribute:!1})],exports.GlatamCalendarMini.prototype,"tileClassName",2);b([i.property({type:Array})],exports.GlatamCalendarMini.prototype,"slots",2);b([i.state()],exports.GlatamCalendarMini.prototype,"activeDate",2);b([i.state()],exports.GlatamCalendarMini.prototype,"dropdownOpen",2);b([i.state()],exports.GlatamCalendarMini.prototype,"dropdownSelectedDateString",2);exports.GlatamCalendarMini=b([i.customElement("glatam-calendar-mini")],exports.GlatamCalendarMini);Object.defineProperty(exports,"formatISODate",{enumerable:!0,get:()=>m.formatISODate});Object.defineProperty(exports,"isTimeBlocked",{enumerable:!0,get:()=>m.isTimeBlocked});Object.defineProperty(exports,"parseISODate",{enumerable:!0,get:()=>m.parseISODate});exports.calendarStyles=E;exports.deleteSeries=M;exports.deleteSingleInstance=I;exports.variablesStyles=G;
1099
+ `}};exports.GlatamCalendarMini.styles=[E,G,K];b([i.property({type:String})],exports.GlatamCalendarMini.prototype,"role",2);b([i.property({type:String})],exports.GlatamCalendarMini.prototype,"locale",2);b([i.property({type:Number})],exports.GlatamCalendarMini.prototype,"startOfWeekDay",2);b([i.property({type:Array})],exports.GlatamCalendarMini.prototype,"rules",2);b([i.property({type:Object})],exports.GlatamCalendarMini.prototype,"selectedRange",2);b([i.property({type:String,reflect:!0})],exports.GlatamCalendarMini.prototype,"size",2);b([i.property({type:String})],exports.GlatamCalendarMini.prototype,"hostTimezone",2);b([i.property({type:String})],exports.GlatamCalendarMini.prototype,"activeTimezone",2);b([i.property({type:String})],exports.GlatamCalendarMini.prototype,"minDate",2);b([i.property({type:String})],exports.GlatamCalendarMini.prototype,"maxDate",2);b([i.property({type:Boolean})],exports.GlatamCalendarMini.prototype,"showNeighboringMonth",2);b([i.property({attribute:!1})],exports.GlatamCalendarMini.prototype,"tileClassName",2);b([i.property({type:Array})],exports.GlatamCalendarMini.prototype,"slots",2);b([i.state()],exports.GlatamCalendarMini.prototype,"activeDate",2);b([i.state()],exports.GlatamCalendarMini.prototype,"dropdownOpen",2);b([i.state()],exports.GlatamCalendarMini.prototype,"dropdownSelectedDateString",2);exports.GlatamCalendarMini=b([i.customElement("glatam-calendar-mini")],exports.GlatamCalendarMini);Object.defineProperty(exports,"formatISODate",{enumerable:!0,get:()=>g.formatISODate});Object.defineProperty(exports,"isTimeBlocked",{enumerable:!0,get:()=>g.isTimeBlocked});Object.defineProperty(exports,"parseISODate",{enumerable:!0,get:()=>g.parseISODate});exports.calendarStyles=G;exports.deleteSeries=M;exports.deleteSingleInstance=I;exports.variablesStyles=E;
@@ -1,9 +1,9 @@
1
- import { css as M, LitElement as T, html as c } from "lit";
2
- import { property as l, customElement as O, state as m } from "lit/decorators.js";
3
- import { formatISODate as z, parseISODate as P, isTimeBlocked as _, generateMonthDays as Y, generateWeekDays as L } from "@glatam/calendar-core";
1
+ import { css as M, LitElement as O, html as c } from "lit";
2
+ import { property as l, customElement as C, state as m } from "lit/decorators.js";
3
+ import { formatISODate as z, parseISODate as N, isTimeBlocked as _, generateMonthDays as Y, generateWeekDays as U } from "@glatam/calendar-core";
4
4
  import { formatISODate as yt, isTimeBlocked as xt, parseISODate as wt } from "@glatam/calendar-core";
5
5
  import { classMap as A } from "lit/directives/class-map.js";
6
- const q = M`
6
+ const H = M`
7
7
  :host {
8
8
  /* Fonts */
9
9
  --glatam-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
@@ -91,7 +91,7 @@ const q = M`
91
91
  --glatam-padding: 24px;
92
92
  font-size: 1.1rem;
93
93
  }
94
- `, G = M`
94
+ `, q = M`
95
95
  :host {
96
96
  display: grid;
97
97
  min-width: 0;
@@ -378,7 +378,7 @@ function B(e, t, a) {
378
378
  return 0;
379
379
  }
380
380
  }
381
- function H(e, t) {
381
+ function G(e, t) {
382
382
  if (t === 0)
383
383
  return { start: e.start, end: e.end, dayShift: 0 };
384
384
  const a = (d) => {
@@ -413,12 +413,12 @@ function F(e, t) {
413
413
  const a = e.find((i) => i.id === t) || null;
414
414
  return { updatedRules: e.filter((i) => i.id !== t), targetRule: a };
415
415
  }
416
- var X = Object.defineProperty, Z = Object.getOwnPropertyDescriptor, $ = (e, t, a, r) => {
417
- for (var i = r > 1 ? void 0 : r ? Z(t, a) : t, s = e.length - 1, o; s >= 0; s--)
416
+ var X = Object.defineProperty, K = Object.getOwnPropertyDescriptor, $ = (e, t, a, r) => {
417
+ for (var i = r > 1 ? void 0 : r ? K(t, a) : t, s = e.length - 1, o; s >= 0; s--)
418
418
  (o = e[s]) && (i = (r ? o(t, a, i) : o(i)) || i);
419
419
  return r && i && X(t, a, i), i;
420
420
  };
421
- let w = class extends T {
421
+ let w = class extends O {
422
422
  constructor() {
423
423
  super(...arguments), this.days = [], this.locale = "es", this.startOfWeekDay = 0, this.selectedDates = [], this.role = "provider", this.size = "medium", this.minDate = "", this.maxDate = "", this.showNeighboringMonth = !0, this.tileClassName = null;
424
424
  }
@@ -543,14 +543,14 @@ $([
543
543
  l({ attribute: !1 })
544
544
  ], w.prototype, "tileClassName", 2);
545
545
  w = $([
546
- O("glatam-calendar-month-view")
546
+ C("glatam-calendar-month-view")
547
547
  ], w);
548
- var J = Object.defineProperty, K = Object.getOwnPropertyDescriptor, k = (e, t, a, r) => {
549
- for (var i = r > 1 ? void 0 : r ? K(t, a) : t, s = e.length - 1, o; s >= 0; s--)
548
+ var Z = Object.defineProperty, J = Object.getOwnPropertyDescriptor, k = (e, t, a, r) => {
549
+ for (var i = r > 1 ? void 0 : r ? J(t, a) : t, s = e.length - 1, o; s >= 0; s--)
550
550
  (o = e[s]) && (i = (r ? o(t, a, i) : o(i)) || i);
551
- return r && i && J(t, a, i), i;
551
+ return r && i && Z(t, a, i), i;
552
552
  };
553
- let x = class extends T {
553
+ let x = class extends O {
554
554
  constructor() {
555
555
  super(...arguments), this.days = [], this.slots = [], this.locale = "es", this.selectedRange = null, this.role = "provider", this.minDate = "", this.maxDate = "", this.isDragging = !1, this.dragDayIndex = null, this.dragStartSlotIndex = null, this.dragEndSlotIndex = null, this.handleMouseUp = () => {
556
556
  if (!this.isDragging || this.dragDayIndex === null || this.dragStartSlotIndex === null || this.dragEndSlotIndex === null) {
@@ -731,14 +731,14 @@ k([
731
731
  m()
732
732
  ], x.prototype, "dragEndSlotIndex", 2);
733
733
  x = k([
734
- O("glatam-calendar-week-view")
734
+ C("glatam-calendar-week-view")
735
735
  ], x);
736
736
  var Q = Object.defineProperty, tt = Object.getOwnPropertyDescriptor, R = (e, t, a, r) => {
737
737
  for (var i = r > 1 ? void 0 : r ? tt(t, a) : t, s = e.length - 1, o; s >= 0; s--)
738
738
  (o = e[s]) && (i = (r ? o(t, a, i) : o(i)) || i);
739
739
  return r && i && Q(t, a, i), i;
740
740
  };
741
- let S = class extends T {
741
+ let S = class extends O {
742
742
  constructor() {
743
743
  super(...arguments), this.day = null, this.slots = [], this.locale = "es", this.selectedRange = null, this.role = "provider", this.minDate = "", this.maxDate = "", this.isDragging = !1, this.dragStartSlotIndex = null, this.dragEndSlotIndex = null, this.handleMouseUp = () => {
744
744
  if (!this.isDragging || !this.day || this.dragStartSlotIndex === null || this.dragEndSlotIndex === null) {
@@ -888,7 +888,7 @@ R([
888
888
  m()
889
889
  ], S.prototype, "dragEndSlotIndex", 2);
890
890
  S = R([
891
- O("glatam-calendar-day-view")
891
+ C("glatam-calendar-day-view")
892
892
  ], S);
893
893
  const et = M`
894
894
  dialog {
@@ -1051,7 +1051,7 @@ var at = Object.defineProperty, it = Object.getOwnPropertyDescriptor, E = (e, t,
1051
1051
  (o = e[s]) && (i = (r ? o(t, a, i) : o(i)) || i);
1052
1052
  return r && i && at(t, a, i), i;
1053
1053
  };
1054
- let D = class extends T {
1054
+ let D = class extends O {
1055
1055
  constructor() {
1056
1056
  super(...arguments), this.open = !1, this.dateString = "", this.startTime = "", this.endTime = "", this.isRange = !1, this.existingRule = null, this.description = "", this.blockAllDay = !0, this.isRecurring = !1, this.selectedDays = [];
1057
1057
  }
@@ -1061,7 +1061,7 @@ let D = class extends T {
1061
1061
  this.description = this.existingRule.description || "", this.blockAllDay = !this.existingRule.slots || this.existingRule.slots.length === 0, this.isRecurring = this.existingRule.type === "weekly", this.selectedDays = this.existingRule.daysOfWeek || [], this.existingRule.slots && this.existingRule.slots.length > 0 && (this.startTime = this.existingRule.slots[0].start, this.endTime = this.existingRule.slots[0].end);
1062
1062
  else {
1063
1063
  this.description = "", this.blockAllDay = !this.isRange, this.isRecurring = !1;
1064
- const t = P(this.dateString);
1064
+ const t = N(this.dateString);
1065
1065
  this.selectedDays = [t.getDay()];
1066
1066
  }
1067
1067
  }
@@ -1131,6 +1131,27 @@ let D = class extends T {
1131
1131
  </label>
1132
1132
  </div>
1133
1133
 
1134
+ ${this.blockAllDay ? "" : c`
1135
+ <div style="display: flex; gap: 12px;" class="form-group">
1136
+ <div style="flex: 1;">
1137
+ <label>Hora Inicio</label>
1138
+ <input
1139
+ type="time"
1140
+ .value=${this.startTime}
1141
+ @input=${(a) => this.startTime = a.target.value}
1142
+ />
1143
+ </div>
1144
+ <div style="flex: 1;">
1145
+ <label>Hora Fin</label>
1146
+ <input
1147
+ type="time"
1148
+ .value=${this.endTime}
1149
+ @input=${(a) => this.endTime = a.target.value}
1150
+ />
1151
+ </div>
1152
+ </div>
1153
+ `}
1154
+
1134
1155
  <div class="switch-row">
1135
1156
  <label>Repetir semanalmente</label>
1136
1157
  <label class="switch">
@@ -1202,7 +1223,7 @@ E([
1202
1223
  m()
1203
1224
  ], D.prototype, "selectedDays", 2);
1204
1225
  D = E([
1205
- O("glatam-calendar-modal")
1226
+ C("glatam-calendar-modal")
1206
1227
  ], D);
1207
1228
  const rt = M`
1208
1229
  :host {
@@ -1345,12 +1366,12 @@ const rt = M`
1345
1366
  background: var(--glatam-border, #e5e5ea);
1346
1367
  }
1347
1368
  `;
1348
- var ot = Object.defineProperty, st = Object.getOwnPropertyDescriptor, N = (e, t, a, r) => {
1369
+ var ot = Object.defineProperty, st = Object.getOwnPropertyDescriptor, j = (e, t, a, r) => {
1349
1370
  for (var i = r > 1 ? void 0 : r ? st(t, a) : t, s = e.length - 1, o; s >= 0; s--)
1350
1371
  (o = e[s]) && (i = (r ? o(t, a, i) : o(i)) || i);
1351
1372
  return r && i && ot(t, a, i), i;
1352
1373
  };
1353
- let C = class extends T {
1374
+ let T = class extends O {
1354
1375
  constructor() {
1355
1376
  super(...arguments), this.open = !1, this.dateString = "", this.targetRule = null;
1356
1377
  }
@@ -1439,20 +1460,20 @@ let C = class extends T {
1439
1460
  `;
1440
1461
  }
1441
1462
  };
1442
- C.styles = rt;
1443
- N([
1463
+ T.styles = rt;
1464
+ j([
1444
1465
  l({ type: Boolean })
1445
- ], C.prototype, "open", 2);
1446
- N([
1466
+ ], T.prototype, "open", 2);
1467
+ j([
1447
1468
  l({ type: String })
1448
- ], C.prototype, "dateString", 2);
1449
- N([
1469
+ ], T.prototype, "dateString", 2);
1470
+ j([
1450
1471
  l({ type: Object })
1451
- ], C.prototype, "targetRule", 2);
1452
- C = N([
1453
- O("glatam-series-confirmation-modal")
1454
- ], C);
1455
- var lt = Object.defineProperty, nt = Object.getOwnPropertyDescriptor, p = (e, t, a, r) => {
1472
+ ], T.prototype, "targetRule", 2);
1473
+ T = j([
1474
+ C("glatam-series-confirmation-modal")
1475
+ ], T);
1476
+ var lt = Object.defineProperty, nt = Object.getOwnPropertyDescriptor, g = (e, t, a, r) => {
1456
1477
  for (var i = r > 1 ? void 0 : r ? nt(t, a) : t, s = e.length - 1, o; s >= 0; s--)
1457
1478
  (o = e[s]) && (i = (r ? o(t, a, i) : o(i)) || i);
1458
1479
  return r && i && lt(t, a, i), i;
@@ -1468,7 +1489,7 @@ const dt = [
1468
1489
  { start: "16:00", end: "17:00" },
1469
1490
  { start: "17:00", end: "18:00" }
1470
1491
  ];
1471
- let g = class extends T {
1492
+ let p = class extends O {
1472
1493
  constructor() {
1473
1494
  super(...arguments), this.role = "provider", this.size = "medium", this.view = "month", this.locale = "es", this.startOfWeekDay = 0, this.rules = [], this.selectedDates = [], this.selectedRange = null, this.hostTimezone = "America/Bogota", this.activeTimezone = "local", this.slots = dt, this.minDate = "", this.maxDate = "", this.showNeighboringMonth = !0, this.tileClassName = null, this.enableSeriesConfirmation = !1, this.activeDate = /* @__PURE__ */ new Date(), this.localRules = [], this.darkMode = !1, this.modalOpen = !1, this.modalDateString = "", this.modalStartTime = "", this.modalEndTime = "", this.modalIsRange = !1, this.modalExistingRule = null, this.seriesModalOpen = !1, this.seriesTargetRule = null, this.seriesTargetDateString = "";
1474
1495
  }
@@ -1495,13 +1516,13 @@ let g = class extends T {
1495
1516
  }
1496
1517
  handleDaySelect(e) {
1497
1518
  const { dateString: t, isBlocked: a } = e.detail;
1498
- this.role === "buyer" && a || (this.activeDate = P(t), this.view = "day", this.dispatchEvent(new CustomEvent("date-selected", { detail: { dateString: t }, bubbles: !0, composed: !0 })));
1519
+ this.role === "buyer" && a || (this.activeDate = N(t), this.view = "day", this.dispatchEvent(new CustomEvent("date-selected", { detail: { dateString: t }, bubbles: !0, composed: !0 })));
1499
1520
  }
1500
1521
  handleRangeSelect(e) {
1501
- var W, U;
1522
+ var W, L;
1502
1523
  const { dateString: t, start: a, end: r } = e.detail, i = this.activeTimezone === "local" ? B(this.activeDate, this.hostTimezone, "local") : 0, s = z(/* @__PURE__ */ new Date()), o = this.minDate || (this.role === "buyer" ? s : "");
1503
1524
  if (this.role === "buyer" && (o && t < o || this.maxDate && t > this.maxDate)) return;
1504
- const u = this.getDisplaySlots(i), n = a.split(" ")[0], d = r.split(" ")[0], h = u.findIndex((j) => j.start.startsWith(n)), y = u.findIndex((j) => j.end.startsWith(d)), f = ((W = this.slots[h]) == null ? void 0 : W.start) || n, I = ((U = this.slots[y]) == null ? void 0 : U.end) || d;
1525
+ const u = this.getDisplaySlots(i), n = a.split(" ")[0], d = r.split(" ")[0], h = u.findIndex((P) => P.start.startsWith(n)), y = u.findIndex((P) => P.end.startsWith(d)), f = ((W = this.slots[h]) == null ? void 0 : W.start) || n, I = ((L = this.slots[y]) == null ? void 0 : L.end) || d;
1505
1526
  if (this.role === "buyer") {
1506
1527
  this.selectedRange = { dateString: t, start: n, end: d }, this.dispatchEvent(new CustomEvent("booking-selected", { detail: { dateString: t, start: n, end: d, hostStart: f, hostEnd: I }, bubbles: !0, composed: !0 }));
1507
1528
  return;
@@ -1509,7 +1530,7 @@ let g = class extends T {
1509
1530
  this.openModal(t, f, I, !0, null);
1510
1531
  }
1511
1532
  handleSlotClick(e) {
1512
- const { dateString: t, slot: a } = e.detail, r = P(t), i = this.activeTimezone === "local" ? B(this.activeDate, this.hostTimezone, "local") : 0, s = z(/* @__PURE__ */ new Date()), o = this.minDate || (this.role === "buyer" ? s : "");
1533
+ const { dateString: t, slot: a } = e.detail, r = N(t), i = this.activeTimezone === "local" ? B(this.activeDate, this.hostTimezone, "local") : 0, s = z(/* @__PURE__ */ new Date()), o = this.minDate || (this.role === "buyer" ? s : "");
1513
1534
  if (this.role === "buyer" && (a.isBlocked || o && t < o || this.maxDate && t > this.maxDate)) return;
1514
1535
  const u = this.getDisplaySlots(i), n = a.start.split(" ")[0], d = u.findIndex((f) => f.start.startsWith(n)), h = this.slots[d] || a;
1515
1536
  if (this.role === "buyer") {
@@ -1563,7 +1584,7 @@ let g = class extends T {
1563
1584
  }
1564
1585
  getDisplaySlots(e) {
1565
1586
  return e === 0 ? this.slots : this.slots.map((t) => {
1566
- const a = H(t, e), r = a.dayShift > 0 ? " (+1d)" : a.dayShift < 0 ? " (-1d)" : "";
1587
+ const a = G(t, e), r = a.dayShift > 0 ? " (+1d)" : a.dayShift < 0 ? " (-1d)" : "";
1567
1588
  return { start: a.start + r, end: a.end + r };
1568
1589
  });
1569
1590
  }
@@ -1603,7 +1624,7 @@ let g = class extends T {
1603
1624
  </div>
1604
1625
 
1605
1626
  <div class="calendar-body">
1606
- ${this.view === "month" ? c`<glatam-calendar-month-view .days=${Y(e, t, this.localRules, this.slots, this.startOfWeekDay)} .locale=${this.locale} .startOfWeekDay=${this.startOfWeekDay} .role=${this.role} .size=${this.size} .minDate=${this.minDate || (this.role === "buyer" ? z(/* @__PURE__ */ new Date()) : "")} .maxDate=${this.maxDate} .showNeighboringMonth=${this.showNeighboringMonth} .tileClassName=${this.tileClassName} @day-select=${this.handleDaySelect}></glatam-calendar-month-view>` : this.view === "week" ? c`<glatam-calendar-week-view .days=${s(L(this.activeDate, this.localRules, this.slots, this.startOfWeekDay))} .slots=${i} .locale=${this.locale} .selectedRange=${this.selectedRange} .role=${this.role} .minDate=${this.minDate || (this.role === "buyer" ? z(/* @__PURE__ */ new Date()) : "")} .maxDate=${this.maxDate} @range-select=${this.handleRangeSelect} @slot-click=${this.handleSlotClick}></glatam-calendar-week-view>` : c`<glatam-calendar-day-view .day=${s(L(this.activeDate, this.localRules, this.slots, this.startOfWeekDay)).find((n) => n.dateString === z(this.activeDate)) || null} .slots=${i} .locale=${this.locale} .selectedRange=${this.selectedRange} .role=${this.role} .minDate=${this.minDate || (this.role === "buyer" ? z(/* @__PURE__ */ new Date()) : "")} .maxDate=${this.maxDate} @range-select=${this.handleRangeSelect} @slot-click=${this.handleSlotClick}></glatam-calendar-day-view>`}
1627
+ ${this.view === "month" ? c`<glatam-calendar-month-view .days=${Y(e, t, this.localRules, this.slots, this.startOfWeekDay)} .locale=${this.locale} .startOfWeekDay=${this.startOfWeekDay} .role=${this.role} .size=${this.size} .minDate=${this.minDate || (this.role === "buyer" ? z(/* @__PURE__ */ new Date()) : "")} .maxDate=${this.maxDate} .showNeighboringMonth=${this.showNeighboringMonth} .tileClassName=${this.tileClassName} @day-select=${this.handleDaySelect}></glatam-calendar-month-view>` : this.view === "week" ? c`<glatam-calendar-week-view .days=${s(U(this.activeDate, this.localRules, this.slots, this.startOfWeekDay))} .slots=${i} .locale=${this.locale} .selectedRange=${this.selectedRange} .role=${this.role} .minDate=${this.minDate || (this.role === "buyer" ? z(/* @__PURE__ */ new Date()) : "")} .maxDate=${this.maxDate} @range-select=${this.handleRangeSelect} @slot-click=${this.handleSlotClick}></glatam-calendar-week-view>` : c`<glatam-calendar-day-view .day=${s(U(this.activeDate, this.localRules, this.slots, this.startOfWeekDay)).find((n) => n.dateString === z(this.activeDate)) || null} .slots=${i} .locale=${this.locale} .selectedRange=${this.selectedRange} .role=${this.role} .minDate=${this.minDate || (this.role === "buyer" ? z(/* @__PURE__ */ new Date()) : "")} .maxDate=${this.maxDate} @range-select=${this.handleRangeSelect} @slot-click=${this.handleSlotClick}></glatam-calendar-day-view>`}
1607
1628
  </div>
1608
1629
 
1609
1630
  <glatam-calendar-modal
@@ -1619,94 +1640,94 @@ let g = class extends T {
1619
1640
  `;
1620
1641
  }
1621
1642
  };
1622
- g.styles = [q, G];
1623
- p([
1643
+ p.styles = [H, q];
1644
+ g([
1624
1645
  l({ type: String })
1625
- ], g.prototype, "role", 2);
1626
- p([
1646
+ ], p.prototype, "role", 2);
1647
+ g([
1627
1648
  l({ type: String, reflect: !0 })
1628
- ], g.prototype, "size", 2);
1629
- p([
1649
+ ], p.prototype, "size", 2);
1650
+ g([
1630
1651
  l({ type: String })
1631
- ], g.prototype, "view", 2);
1632
- p([
1652
+ ], p.prototype, "view", 2);
1653
+ g([
1633
1654
  l({ type: String })
1634
- ], g.prototype, "locale", 2);
1635
- p([
1655
+ ], p.prototype, "locale", 2);
1656
+ g([
1636
1657
  l({ type: Number })
1637
- ], g.prototype, "startOfWeekDay", 2);
1638
- p([
1658
+ ], p.prototype, "startOfWeekDay", 2);
1659
+ g([
1639
1660
  l({ type: Array })
1640
- ], g.prototype, "rules", 2);
1641
- p([
1661
+ ], p.prototype, "rules", 2);
1662
+ g([
1642
1663
  l({ type: Array })
1643
- ], g.prototype, "selectedDates", 2);
1644
- p([
1664
+ ], p.prototype, "selectedDates", 2);
1665
+ g([
1645
1666
  l({ type: Object })
1646
- ], g.prototype, "selectedRange", 2);
1647
- p([
1667
+ ], p.prototype, "selectedRange", 2);
1668
+ g([
1648
1669
  l({ type: String })
1649
- ], g.prototype, "hostTimezone", 2);
1650
- p([
1670
+ ], p.prototype, "hostTimezone", 2);
1671
+ g([
1651
1672
  l({ type: String })
1652
- ], g.prototype, "activeTimezone", 2);
1653
- p([
1673
+ ], p.prototype, "activeTimezone", 2);
1674
+ g([
1654
1675
  l({ type: Array })
1655
- ], g.prototype, "slots", 2);
1656
- p([
1676
+ ], p.prototype, "slots", 2);
1677
+ g([
1657
1678
  l({ type: String })
1658
- ], g.prototype, "minDate", 2);
1659
- p([
1679
+ ], p.prototype, "minDate", 2);
1680
+ g([
1660
1681
  l({ type: String })
1661
- ], g.prototype, "maxDate", 2);
1662
- p([
1682
+ ], p.prototype, "maxDate", 2);
1683
+ g([
1663
1684
  l({ type: Boolean })
1664
- ], g.prototype, "showNeighboringMonth", 2);
1665
- p([
1685
+ ], p.prototype, "showNeighboringMonth", 2);
1686
+ g([
1666
1687
  l({ attribute: !1 })
1667
- ], g.prototype, "tileClassName", 2);
1668
- p([
1688
+ ], p.prototype, "tileClassName", 2);
1689
+ g([
1669
1690
  l({ type: Boolean, attribute: "enable-series-confirmation" })
1670
- ], g.prototype, "enableSeriesConfirmation", 2);
1671
- p([
1691
+ ], p.prototype, "enableSeriesConfirmation", 2);
1692
+ g([
1672
1693
  m()
1673
- ], g.prototype, "activeDate", 2);
1674
- p([
1694
+ ], p.prototype, "activeDate", 2);
1695
+ g([
1675
1696
  m()
1676
- ], g.prototype, "localRules", 2);
1677
- p([
1697
+ ], p.prototype, "localRules", 2);
1698
+ g([
1678
1699
  m()
1679
- ], g.prototype, "darkMode", 2);
1680
- p([
1700
+ ], p.prototype, "darkMode", 2);
1701
+ g([
1681
1702
  m()
1682
- ], g.prototype, "modalOpen", 2);
1683
- p([
1703
+ ], p.prototype, "modalOpen", 2);
1704
+ g([
1684
1705
  m()
1685
- ], g.prototype, "modalDateString", 2);
1686
- p([
1706
+ ], p.prototype, "modalDateString", 2);
1707
+ g([
1687
1708
  m()
1688
- ], g.prototype, "modalStartTime", 2);
1689
- p([
1709
+ ], p.prototype, "modalStartTime", 2);
1710
+ g([
1690
1711
  m()
1691
- ], g.prototype, "modalEndTime", 2);
1692
- p([
1712
+ ], p.prototype, "modalEndTime", 2);
1713
+ g([
1693
1714
  m()
1694
- ], g.prototype, "modalIsRange", 2);
1695
- p([
1715
+ ], p.prototype, "modalIsRange", 2);
1716
+ g([
1696
1717
  m()
1697
- ], g.prototype, "modalExistingRule", 2);
1698
- p([
1718
+ ], p.prototype, "modalExistingRule", 2);
1719
+ g([
1699
1720
  m()
1700
- ], g.prototype, "seriesModalOpen", 2);
1701
- p([
1721
+ ], p.prototype, "seriesModalOpen", 2);
1722
+ g([
1702
1723
  m()
1703
- ], g.prototype, "seriesTargetRule", 2);
1704
- p([
1724
+ ], p.prototype, "seriesTargetRule", 2);
1725
+ g([
1705
1726
  m()
1706
- ], g.prototype, "seriesTargetDateString", 2);
1707
- g = p([
1708
- O("glatam-calendar")
1709
- ], g);
1727
+ ], p.prototype, "seriesTargetDateString", 2);
1728
+ p = g([
1729
+ C("glatam-calendar")
1730
+ ], p);
1710
1731
  const ct = M`
1711
1732
  :host {
1712
1733
  display: inline-block;
@@ -1715,6 +1736,7 @@ const ct = M`
1715
1736
  padding: 0;
1716
1737
  box-shadow: none;
1717
1738
  width: 100%;
1739
+ overflow: visible !important;
1718
1740
  }
1719
1741
 
1720
1742
  .mini-calendar-header {
@@ -1758,12 +1780,12 @@ const ct = M`
1758
1780
  transform: scale(0.95);
1759
1781
  }
1760
1782
  `;
1761
- var gt = Object.defineProperty, pt = Object.getOwnPropertyDescriptor, v = (e, t, a, r) => {
1762
- for (var i = r > 1 ? void 0 : r ? pt(t, a) : t, s = e.length - 1, o; s >= 0; s--)
1783
+ var pt = Object.defineProperty, gt = Object.getOwnPropertyDescriptor, v = (e, t, a, r) => {
1784
+ for (var i = r > 1 ? void 0 : r ? gt(t, a) : t, s = e.length - 1, o; s >= 0; s--)
1763
1785
  (o = e[s]) && (i = (r ? o(t, a, i) : o(i)) || i);
1764
- return r && i && gt(t, a, i), i;
1786
+ return r && i && pt(t, a, i), i;
1765
1787
  };
1766
- let b = class extends T {
1788
+ let b = class extends O {
1767
1789
  constructor() {
1768
1790
  super(...arguments), this.role = "buyer", this.locale = "es", this.startOfWeekDay = 0, this.rules = [], this.selectedRange = null, this.size = "medium", this.hostTimezone = "America/Bogota", this.activeTimezone = "local", this.minDate = "", this.maxDate = "", this.showNeighboringMonth = !0, this.tileClassName = null, this.slots = [
1769
1791
  { start: "09:00", end: "10:00" },
@@ -1775,7 +1797,20 @@ let b = class extends T {
1775
1797
  { start: "15:00", end: "16:00" },
1776
1798
  { start: "16:00", end: "17:00" },
1777
1799
  { start: "17:00", end: "18:00" }
1778
- ], this.activeDate = /* @__PURE__ */ new Date(), this.dropdownOpen = !1, this.dropdownSelectedDateString = "", this.touchStartX = 0, this.touchStartY = 0;
1800
+ ], this.activeDate = /* @__PURE__ */ new Date(), this.dropdownOpen = !1, this.dropdownSelectedDateString = "", this.touchStartX = 0, this.touchStartY = 0, this.handleOutsideClick = (e) => {
1801
+ this.dropdownOpen && !e.composedPath().includes(this) && (this.dropdownOpen = !1, this.dropdownSelectedDateString = "");
1802
+ }, this.handleKeyDown = (e) => {
1803
+ e.key === "Escape" && this.dropdownOpen && (this.dropdownOpen = !1, this.dropdownSelectedDateString = "");
1804
+ };
1805
+ }
1806
+ connectedCallback() {
1807
+ super.connectedCallback(), window.addEventListener("click", this.handleOutsideClick), window.addEventListener("keydown", this.handleKeyDown);
1808
+ }
1809
+ disconnectedCallback() {
1810
+ window.removeEventListener("click", this.handleOutsideClick), window.removeEventListener("keydown", this.handleKeyDown), super.disconnectedCallback();
1811
+ }
1812
+ toggleDropdown(e) {
1813
+ e.stopPropagation(), this.dropdownOpen = !this.dropdownOpen, this.dropdownOpen || (this.dropdownSelectedDateString = "");
1779
1814
  }
1780
1815
  handlePrevMonth(e) {
1781
1816
  e.stopPropagation();
@@ -1814,26 +1849,26 @@ let b = class extends T {
1814
1849
  this.selectedRange = { dateString: this.dropdownSelectedDateString, start: e.displayStart, end: e.displayEnd }, this.dispatchEvent(new CustomEvent("booking-selected", { detail: t, bubbles: !0, composed: !0 })), this.dropdownOpen = !1, this.dropdownSelectedDateString = "";
1815
1850
  }
1816
1851
  render() {
1817
- const e = this.selectedRange ? `Reserva: ${this.selectedRange.dateString} (${this.selectedRange.start} - ${this.selectedRange.end})` : "Seleccionar Fecha y Hora", t = this.activeDate.getFullYear(), a = this.activeDate.getMonth(), r = this.dropdownSelectedDateString ? /* @__PURE__ */ new Date(this.dropdownSelectedDateString + "T00:00:00") : null, i = r && this.activeTimezone === "local" ? B(r, this.hostTimezone, "local") : 0, s = r ? this.slots.map((o) => {
1818
- const u = _(r, o, this.rules), n = H(o, i), d = n.dayShift > 0 ? " (+1d)" : n.dayShift < 0 ? " (-1d)" : "";
1852
+ const e = this.selectedRange ? `Reserva: ${this.selectedRange.dateString} (${this.selectedRange.start} - ${this.selectedRange.end})` : "Seleccionar Fecha y Hora", t = this.activeDate.getFullYear(), a = this.activeDate.getMonth(), r = this.dropdownSelectedDateString ? N(this.dropdownSelectedDateString) : null, i = r && this.activeTimezone === "local" ? B(r, this.hostTimezone, "local") : 0, s = r ? this.slots.map((o) => {
1853
+ const u = _(r, o, this.rules), n = G(o, i), d = n.dayShift > 0 ? " (+1d)" : n.dayShift < 0 ? " (-1d)" : "";
1819
1854
  return { ...o, displayStart: n.start + d, displayEnd: n.end + d, isBlocked: u };
1820
1855
  }) : [];
1821
1856
  return c`
1822
1857
  <div class="dropdown-container">
1823
- <button class="btn btn-primary dropdown-toggle" @click=${() => this.dropdownOpen = !this.dropdownOpen}>
1858
+ <button class="btn btn-primary dropdown-toggle" @click=${this.toggleDropdown}>
1824
1859
  <span>${e}</span> <span>${this.dropdownOpen ? "▲" : "▼"}</span>
1825
1860
  </button>
1826
1861
 
1827
1862
  ${this.dropdownOpen ? c`
1828
1863
  <div class="dropdown-card" style="--glatam-day-min-height: 38px;">
1829
1864
  ${this.dropdownSelectedDateString ? c`
1830
- <div style="display:flex; justify-space-between; align-items:center; border-bottom: 1px solid var(--glatam-border); padding-bottom:8px;">
1831
- <button class="btn" style="height:28px; padding:0 8px; font-size:0.75rem;" @click=${() => this.dropdownSelectedDateString = ""}>&lt; Volver</button>
1865
+ <div style="display:flex; justify-content:space-between; align-items:center; border-bottom: 1px solid var(--glatam-border); padding-bottom:8px;">
1866
+ <button type="button" class="btn" style="height:28px; padding:0 8px; font-size:0.75rem;" @click=${() => this.dropdownSelectedDateString = ""}>&lt; Volver</button>
1832
1867
  <span style="font-size:0.8rem; font-weight:600; color: var(--glatam-text);">${this.dropdownSelectedDateString}</span>
1833
1868
  </div>
1834
1869
  <div class="slot-list">
1835
1870
  ${s.map((o) => c`
1836
- <button class="slot-btn ${o.isBlocked ? "blocked" : ""}" ?disabled=${o.isBlocked} @click=${() => this.selectDropdownSlot(o)}>
1871
+ <button type="button" class="slot-btn ${o.isBlocked ? "blocked" : ""}" ?disabled=${o.isBlocked} @click=${() => this.selectDropdownSlot(o)}>
1837
1872
  ${o.displayStart} - ${o.displayEnd} ${o.isBlocked ? "(Ocupado)" : ""}
1838
1873
  </button>
1839
1874
  `)}
@@ -1847,7 +1882,7 @@ let b = class extends T {
1847
1882
  <div class="mini-calendar-touch-wrapper" @touchstart=${this.handleTouchStart} @touchend=${this.handleTouchEnd}>
1848
1883
  <glatam-calendar-month-view
1849
1884
  .days=${Y(t, a, this.rules, this.slots, this.startOfWeekDay)}
1850
- .locale=${this.locale} .startOfWeekDay=${this.startOfWeekDay} .role=${this.role} size="small"
1885
+ .locale=${this.locale} .startOfWeekDay=${this.startOfWeekDay} .role=${this.role} .size=${"small"}
1851
1886
  .minDate=${this.minDate} .maxDate=${this.maxDate} .showNeighboringMonth=${this.showNeighboringMonth}
1852
1887
  .tileClassName=${this.tileClassName} @day-select=${this.handleDropdownDaySelect}
1853
1888
  ></glatam-calendar-month-view>
@@ -1859,7 +1894,7 @@ let b = class extends T {
1859
1894
  `;
1860
1895
  }
1861
1896
  };
1862
- b.styles = [q, G, ct];
1897
+ b.styles = [H, q, ct];
1863
1898
  v([
1864
1899
  l({ type: String })
1865
1900
  ], b.prototype, "role", 2);
@@ -1909,21 +1944,21 @@ v([
1909
1944
  m()
1910
1945
  ], b.prototype, "dropdownSelectedDateString", 2);
1911
1946
  b = v([
1912
- O("glatam-calendar-mini")
1947
+ C("glatam-calendar-mini")
1913
1948
  ], b);
1914
1949
  export {
1915
- g as GlatamCalendar,
1950
+ p as GlatamCalendar,
1916
1951
  S as GlatamCalendarDayView,
1917
1952
  b as GlatamCalendarMini,
1918
1953
  D as GlatamCalendarModal,
1919
1954
  w as GlatamCalendarMonthView,
1920
1955
  x as GlatamCalendarWeekView,
1921
- C as GlatamSeriesConfirmationModal,
1922
- G as calendarStyles,
1956
+ T as GlatamSeriesConfirmationModal,
1957
+ q as calendarStyles,
1923
1958
  F as deleteSeries,
1924
1959
  V as deleteSingleInstance,
1925
1960
  yt as formatISODate,
1926
1961
  xt as isTimeBlocked,
1927
1962
  wt as parseISODate,
1928
- q as variablesStyles
1963
+ H as variablesStyles
1929
1964
  };
@@ -1 +1 @@
1
- {"version":3,"file":"calendar-mini.css.d.ts","sourceRoot":"","sources":["../../src/styles/calendar-mini.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,yBAkD9B,CAAC"}
1
+ {"version":3,"file":"calendar-mini.css.d.ts","sourceRoot":"","sources":["../../src/styles/calendar-mini.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,yBAmD9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glatam/calendar-ui",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Componente web UI para el calendario @glatam/calendar",
5
5
  "type": "module",
6
6
  "author": "Santiago Hernández Saldarriaga",
@@ -40,7 +40,7 @@
40
40
  "dev": "vite"
41
41
  },
42
42
  "dependencies": {
43
- "@glatam/calendar-core": "^1.0.6",
43
+ "@glatam/calendar-core": "^1.0.7",
44
44
  "lit": "^3.1.2"
45
45
  },
46
46
  "devDependencies": {