@jpahd/kalendus 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +406 -0
  3. package/custom-elements.json +4443 -0
  4. package/dist/components/Context.d.ts +9 -0
  5. package/dist/components/Context.d.ts.map +1 -0
  6. package/dist/components/Day.d.ts +11 -0
  7. package/dist/components/Day.d.ts.map +1 -0
  8. package/dist/components/Entry.d.ts +43 -0
  9. package/dist/components/Entry.d.ts.map +1 -0
  10. package/dist/components/Header.d.ts +16 -0
  11. package/dist/components/Header.d.ts.map +1 -0
  12. package/dist/components/Menu.d.ts +28 -0
  13. package/dist/components/Menu.d.ts.map +1 -0
  14. package/dist/components/Month.d.ts +21 -0
  15. package/dist/components/Month.d.ts.map +1 -0
  16. package/dist/components/Week.d.ts +36 -0
  17. package/dist/components/Week.d.ts.map +1 -0
  18. package/dist/components/Year.d.ts +20 -0
  19. package/dist/components/Year.d.ts.map +1 -0
  20. package/dist/generated/locale-codes.d.ts +14 -0
  21. package/dist/generated/locale-codes.d.ts.map +1 -0
  22. package/dist/generated/locales/ar.d.ts +33 -0
  23. package/dist/generated/locales/ar.d.ts.map +1 -0
  24. package/dist/generated/locales/bn.d.ts +33 -0
  25. package/dist/generated/locales/bn.d.ts.map +1 -0
  26. package/dist/generated/locales/de-DE.d.ts +33 -0
  27. package/dist/generated/locales/de-DE.d.ts.map +1 -0
  28. package/dist/generated/locales/de.d.ts +33 -0
  29. package/dist/generated/locales/de.d.ts.map +1 -0
  30. package/dist/generated/locales/es.d.ts +33 -0
  31. package/dist/generated/locales/es.d.ts.map +1 -0
  32. package/dist/generated/locales/fr.d.ts +33 -0
  33. package/dist/generated/locales/fr.d.ts.map +1 -0
  34. package/dist/generated/locales/hi.d.ts +33 -0
  35. package/dist/generated/locales/hi.d.ts.map +1 -0
  36. package/dist/generated/locales/id.d.ts +33 -0
  37. package/dist/generated/locales/id.d.ts.map +1 -0
  38. package/dist/generated/locales/it.d.ts +33 -0
  39. package/dist/generated/locales/it.d.ts.map +1 -0
  40. package/dist/generated/locales/ja.d.ts +33 -0
  41. package/dist/generated/locales/ja.d.ts.map +1 -0
  42. package/dist/generated/locales/ko.d.ts +33 -0
  43. package/dist/generated/locales/ko.d.ts.map +1 -0
  44. package/dist/generated/locales/nl.d.ts +33 -0
  45. package/dist/generated/locales/nl.d.ts.map +1 -0
  46. package/dist/generated/locales/pl.d.ts +33 -0
  47. package/dist/generated/locales/pl.d.ts.map +1 -0
  48. package/dist/generated/locales/pt.d.ts +33 -0
  49. package/dist/generated/locales/pt.d.ts.map +1 -0
  50. package/dist/generated/locales/ru.d.ts +33 -0
  51. package/dist/generated/locales/ru.d.ts.map +1 -0
  52. package/dist/generated/locales/th.d.ts +33 -0
  53. package/dist/generated/locales/th.d.ts.map +1 -0
  54. package/dist/generated/locales/tr.d.ts +33 -0
  55. package/dist/generated/locales/tr.d.ts.map +1 -0
  56. package/dist/generated/locales/uk.d.ts +33 -0
  57. package/dist/generated/locales/uk.d.ts.map +1 -0
  58. package/dist/generated/locales/vi.d.ts +33 -0
  59. package/dist/generated/locales/vi.d.ts.map +1 -0
  60. package/dist/generated/locales/zh-Hans.d.ts +33 -0
  61. package/dist/generated/locales/zh-Hans.d.ts.map +1 -0
  62. package/dist/kalendus.js +1806 -0
  63. package/dist/kalendus.js.map +1 -0
  64. package/dist/lib/DirectionalCalendarDateCalculator.d.ts +29 -0
  65. package/dist/lib/DirectionalCalendarDateCalculator.d.ts.map +1 -0
  66. package/dist/lib/LayoutCalculator.d.ts +47 -0
  67. package/dist/lib/LayoutCalculator.d.ts.map +1 -0
  68. package/dist/lib/SlotManager.d.ts +130 -0
  69. package/dist/lib/SlotManager.d.ts.map +1 -0
  70. package/dist/lib/ViewStateController.d.ts +22 -0
  71. package/dist/lib/ViewStateController.d.ts.map +1 -0
  72. package/dist/lib/allDayLayout.d.ts +24 -0
  73. package/dist/lib/allDayLayout.d.ts.map +1 -0
  74. package/dist/lib/catchError.d.ts +2 -0
  75. package/dist/lib/catchError.d.ts.map +1 -0
  76. package/dist/lib/getColorTextWithContrast.d.ts +8 -0
  77. package/dist/lib/getColorTextWithContrast.d.ts.map +1 -0
  78. package/dist/lib/getOverlappingEntitiesIndices.d.ts +8 -0
  79. package/dist/lib/getOverlappingEntitiesIndices.d.ts.map +1 -0
  80. package/dist/lib/getSortedGradingsByIndex.d.ts +2 -0
  81. package/dist/lib/getSortedGradingsByIndex.d.ts.map +1 -0
  82. package/dist/lib/localization.d.ts +34 -0
  83. package/dist/lib/localization.d.ts.map +1 -0
  84. package/dist/lib/messages.d.ts +4 -0
  85. package/dist/lib/messages.d.ts.map +1 -0
  86. package/dist/lib/partitionOverlappingIntervals.d.ts +6 -0
  87. package/dist/lib/partitionOverlappingIntervals.d.ts.map +1 -0
  88. package/dist/lib/weekDisplayContext.d.ts +31 -0
  89. package/dist/lib/weekDisplayContext.d.ts.map +1 -0
  90. package/dist/lib/weekStartHelper.d.ts +57 -0
  91. package/dist/lib/weekStartHelper.d.ts.map +1 -0
  92. package/dist/lms-calendar.d.ts +166 -0
  93. package/dist/lms-calendar.d.ts.map +1 -0
  94. package/package.json +118 -0
@@ -0,0 +1,1806 @@
1
+ import{AsyncDirective as e}from"lit-html/async-directive.js";import{directive as t}from"lit-html/directive.js";import{isServer as a}from"lit-html/is-server.js";import{css as n,LitElement as r,html as i,nothing as o}from"lit";import{property as s,customElement as d,state as l}from"lit/decorators.js";import{ifDefined as c}from"lit/directives/if-defined.js";import{styleMap as h}from"lit/directives/style-map.js";import{DateTime as u,Interval as f}from"luxon";import{Interval as y}from"luxon";import{classMap as p}from"lit/directives/class-map.js";let m=class{constructor(e,{target:t,config:n,callback:r,skipInitial:i}){this.t=/* @__PURE__ */new Set,this.o=!1,this.i=!1,this.h=e,null!==t&&this.t.add(t??e),this.l=n,this.o=i??this.o,this.callback=r,a||(window.ResizeObserver?(this.u=new ResizeObserver(e=>{this.handleChanges(e),this.h.requestUpdate()}),e.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver."))}handleChanges(e){this.value=this.callback?.(e,this.u)}hostConnected(){for(const e of this.t)this.observe(e)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(e){this.t.add(e),this.u.observe(e,this.l),this.i=!0,this.h.requestUpdate()}unobserve(e){this.t.delete(e),this.u.unobserve(e)}disconnect(){this.u.disconnect()}target(e){return b(this,e)}};const b=t(class extends e{constructor(){super(...arguments),this.observing=!1}render(e,t){}update(e,[t,a]){this.controller=t,this.part=e,this.observe=a,!1===a?(t.unobserve(e.element),this.observing=!1):!1===this.observing&&(t.observe(e.element),this.observing=!0)}disconnected(){this.controller?.unobserve(this.part.element),this.observing=!1}reconnected(){!1!==this.observe&&!1===this.observing&&(this.controller?.observe(this.part.element),this.observing=!0)}});function g(e,t,a){let n=e.length-t.length;if(0===n)return e(...t);if(1===n)return function(e,t,a){let n=a=>e(a,...t);return void 0===a?n:Object.assign(n,{lazy:a,lazyArgs:t})}(e,t,a);throw Error("Wrong number of arguments")}const v={done:!1,hasNext:!1};function w(e,...t){let a=e,n=t.map(e=>"lazy"in e?function(e){let{lazy:t,lazyArgs:a}=e,n=t(...a);return Object.assign(n,{isSingle:t.single??!1,index:0,items:[]})}(e):void 0),r=0;for(;r<t.length;){if(void 0===n[r]||!k(a)){a=(0,t[r])(a),r+=1;continue}let e=[];for(let a=r;a<t.length;a++){let t=n[a];if(void 0===t||(e.push(t),t.isSingle))break}let i=[];for(let t of a)if(D(t,i,e))break;let{isSingle:o}=e.at(-1);a=o?i[0]:i,r+=e.length}return a}function D(e,t,a){if(0===a.length)return t.push(e),!1;let n=e,r=v,i=!1;for(let[o,s]of a.entries()){let{index:e,items:d}=s;if(d.push(n),r=s(n,e,d),s.index+=1,r.hasNext){if(r.hasMany){for(let e of r.next)if(D(e,t,a.slice(o+1)))return!0;return i}n=r.next}if(!r.hasNext)break;r.done&&(i=!0)}return r.hasNext&&t.push(n),i}function k(e){return"string"==typeof e||"object"==typeof e&&!!e&&Symbol.iterator in e}const x={asc:(e,t)=>e>t,desc:(e,t)=>e<t};function $(e,t){let[a,...n]=t;if(!function(e){if(S(e))return!0;if("object"!=typeof e||!Array.isArray(e))return!1;let[t,a,...n]=e;return S(t)&&"string"==typeof a&&a in x&&0===n.length}(a))return e(a,E(...n));let r=E(a,...n);return t=>e(t,r)}function E(e,t,...a){let n="function"==typeof e?e:e[0],r="function"==typeof e?"asc":e[1],{[r]:i}=x,o=void 0===t?void 0:E(t,...a);return(e,t)=>{let a=n(e),r=n(t);return i(a,r)?1:i(r,a)?-1:o?.(e,t)??0}}const S=e=>"function"==typeof e&&1===e.length;const _=(e,t)=>e.filter(t),T=e=>(t,a,n)=>e(t,a,n)?{done:!1,hasNext:!0,next:t}:v;const M=(e,t)=>{let a=/* @__PURE__ */Object.create(null);for(let n=0;n<e.length;n++){let r=e[n],i=t(r,n,e);if(void 0!==i){let e=a[i];void 0===e?a[i]=[r]:e.push(r)}}return Object.setPrototypeOf(a,Object.prototype),a};const C=(e,t)=>e.map(t),A=e=>(t,a,n)=>({done:!1,hasNext:!0,next:e(t,a,n)});function O(...e){return g(I,e)}const I=(e,t)=>({...e,...t});function R(e,t){let a=[...e];return a.sort(t),a}const N=(e,t)=>[...e].sort(t),z=/* @__PURE__ */Symbol.for("@ts-pattern/matcher"),L=/* @__PURE__ */Symbol.for("@ts-pattern/isVariadic"),Y="@ts-pattern/anonymous-select-key",j=e=>Boolean(e&&"object"==typeof e),W=e=>e&&!!e[z],P=(e,t,a)=>{if(W(e)){const n=e[z](),{matched:r,selections:i}=n.match(t);return r&&i&&Object.keys(i).forEach(e=>a(e,i[e])),r}if(j(e)){if(!j(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],r=[],i=[];for(const t of e.keys()){const a=e[t];W(a)&&a[L]?i.push(a):i.length?r.push(a):n.push(a)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+r.length)return!1;const e=t.slice(0,n.length),o=0===r.length?[]:t.slice(-r.length),s=t.slice(n.length,0===r.length?1/0:-r.length);return n.every((t,n)=>P(t,e[n],a))&&r.every((e,t)=>P(e,o[t],a))&&(0===i.length||P(i[0],s,a))}return e.length===t.length&&e.every((e,n)=>P(e,t[n],a))}return Reflect.ownKeys(e).every(n=>{const r=e[n];return(n in t||W(i=r)&&"optional"===i[z]().matcherType)&&P(r,t[n],a);var i})}return Object.is(t,e)},F=e=>{var t,a,n;return j(e)?W(e)?null!=(t=null==(a=(n=e[z]()).getSelectionKeys)?void 0:a.call(n))?t:[]:Array.isArray(e)?B(e,F):B(Object.values(e),F):[]},B=(e,t)=>e.reduce((e,a)=>e.concat(t(a)),[]);function H(e){return Object.assign(e,{optional:()=>{return t=e,H({[z]:()=>({match:e=>{let a={};const n=(e,t)=>{a[e]=t};return void 0===e?(F(t).forEach(e=>n(e,void 0)),{matched:!0,selections:a}):{matched:P(t,e,n),selections:a}},getSelectionKeys:()=>F(t),matcherType:"optional"})});var t},and:t=>U(e,t),or:t=>function(...e){return H({[z]:()=>({match:t=>{let a={};const n=(e,t)=>{a[e]=t};return B(e,F).forEach(e=>n(e,void 0)),{matched:e.some(e=>P(e,t,n)),selections:a}},getSelectionKeys:()=>B(e,F),matcherType:"or"})})}(e,t),select:t=>void 0===t?K(e):K(t,e)})}function U(...e){return H({[z]:()=>({match:t=>{let a={};const n=(e,t)=>{a[e]=t};return{matched:e.every(e=>P(e,t,n)),selections:a}},getSelectionKeys:()=>B(e,F),matcherType:"and"})})}function V(e){return{[z]:()=>({match:t=>({matched:Boolean(e(t))})})}}function K(...e){const t="string"==typeof e[0]?e[0]:void 0,a=2===e.length?e[1]:"string"==typeof e[0]?void 0:e[0];return H({[z]:()=>({match:e=>{let n={[null!=t?t:Y]:e};return{matched:void 0===a||P(a,e,(e,t)=>{n[e]=t}),selections:n}},getSelectionKeys:()=>[null!=t?t:Y].concat(void 0===a?[]:F(a))})})}function q(e){return!0}function G(e){return"number"==typeof e}function Z(e){return"string"==typeof e}function J(e){return"bigint"==typeof e}H(V(q)),H(V(q));const X=e=>Object.assign(H(e),{startsWith:t=>{return X(U(e,(a=t,V(e=>Z(e)&&e.startsWith(a)))));var a},endsWith:t=>{return X(U(e,(a=t,V(e=>Z(e)&&e.endsWith(a)))));var a},minLength:t=>{return X(U(e,(a=t,V(e=>Z(e)&&e.length>=a))));var a},length:t=>{return X(U(e,(a=t,V(e=>Z(e)&&e.length===a))));var a},maxLength:t=>{return X(U(e,(a=t,V(e=>Z(e)&&e.length<=a))));var a},includes:t=>{return X(U(e,(a=t,V(e=>Z(e)&&e.includes(a)))));var a},regex:t=>{return X(U(e,(a=t,V(e=>Z(e)&&Boolean(e.match(a))))));var a}});X(V(Z));const Q=e=>Object.assign(H(e),{between:(t,a)=>{return Q(U(e,(n=t,r=a,V(e=>G(e)&&n<=e&&r>=e))));var n,r},lt:t=>{return Q(U(e,(a=t,V(e=>G(e)&&e<a))));var a},gt:t=>{return Q(U(e,(a=t,V(e=>G(e)&&e>a))));var a},lte:t=>{return Q(U(e,(a=t,V(e=>G(e)&&e<=a))));var a},gte:t=>{return Q(U(e,(a=t,V(e=>G(e)&&e>=a))));var a},int:()=>Q(U(e,V(e=>G(e)&&Number.isInteger(e)))),finite:()=>Q(U(e,V(e=>G(e)&&Number.isFinite(e)))),positive:()=>Q(U(e,V(e=>G(e)&&e>0))),negative:()=>Q(U(e,V(e=>G(e)&&e<0)))}),ee=Q(V(G)),te=e=>Object.assign(H(e),{between:(t,a)=>{return te(U(e,(n=t,r=a,V(e=>J(e)&&n<=e&&r>=e))));var n,r},lt:t=>{return te(U(e,(a=t,V(e=>J(e)&&e<a))));var a},gt:t=>{return te(U(e,(a=t,V(e=>J(e)&&e>a))));var a},lte:t=>{return te(U(e,(a=t,V(e=>J(e)&&e<=a))));var a},gte:t=>{return te(U(e,(a=t,V(e=>J(e)&&e>=a))));var a},positive:()=>te(U(e,V(e=>J(e)&&e>0))),negative:()=>te(U(e,V(e=>J(e)&&e<0)))});te(V(J)),H(V(function(e){return"boolean"==typeof e})),H(V(function(e){return"symbol"==typeof e}));const ae=H(V(function(e){return null==e}));H(V(function(e){return null!=e}));var ne={__proto__:null,number:ee,nullish:ae};class re extends Error{constructor(e){let t;try{t=JSON.stringify(e)}catch(a){t=e}super(`Pattern matching error: no pattern matches value ${t}`),this.input=void 0,this.input=e}}const ie={matched:!1,value:void 0};function oe(e){return new se(e,ie)}let se=class e{constructor(e,t){this.input=void 0,this.state=void 0,this.input=e,this.state=t}with(...t){if(this.state.matched)return this;const a=t[t.length-1],n=[t[0]];let r;3===t.length&&"function"==typeof t[1]?r=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,o={};const s=(e,t)=>{i=!0,o[e]=t},d=!n.some(e=>P(e,this.input,s))||r&&!Boolean(r(this.input))?ie:{matched:!0,value:a(i?Y in o?o[Y]:o:this.input,this.input)};return new e(this.input,d)}when(t,a){if(this.state.matched)return this;const n=Boolean(t(this.input));return new e(this.input,n?{matched:!0,value:a(this.input,this.input)}:ie)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(e=de){return this.state.matched?this.state.value:e(this.input)}run(){return this.exhaustive()}returnType(){return this}narrow(){return this}};function de(e){throw new re(e)}const le={"zh-Hans":"zh-CN","zh-Hant":"zh-TW"};function ce(e){return le[e]||e}const he=/* @__PURE__ */new Map;const ue=/* @__PURE__ */new Map;const fe=/* @__PURE__ */new Map;function ye(e,t="en"){return function(e){const t=ce(e);let a=he.get(t);return a||(a=Object.freeze(Array.from({length:12},(e,a)=>u.local().set({month:a+1}).setLocale(t).toFormat("MMM"))),he.set(t,a)),a}(t)[e-1]}function pe(e,t,a,n="en"){const r=new Date(a,t-1,e);return function(e){const t=ce(e);let a=fe.get(t);return a||(a=new Intl.DateTimeFormat(t,{day:"numeric",month:"short"}),fe.set(t,a)),a}(n).format(r)}function me(e,t="en"){return function(e){const t=ce(e);let a=ue.get(t);return a||(a=Object.freeze(Array.from({length:7},(e,a)=>u.local().set({weekday:a+1}).setLocale(t).toFormat("ccc"))),ue.set(t,a)),a}(t)[e-1]}const be=/* @__PURE__ */new Map;function ge(e,t,a="en"){const n=new Date(2e3,0,1,e,t);return function(e){const t=ce(e);let a=be.get(t);return a||(a=new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}),be.set(t,a)),a}(a).format(n)}function ve(e,t){return((e-t)%7+7)%7}function we(e,t){const a=new Date(e.year,e.month-1,e.day),n=ve(a.getDay(),t),r=new Date(a);return r.setDate(a.getDate()-n),Array.from({length:7},(e,t)=>{const a=new Date(r);return a.setDate(r.getDate()+t),{day:a.getDate(),month:a.getMonth()+1,year:a.getFullYear()}})}function De(e,t){return ve(new Date(e.year,e.month-1,1).getDay(),t)}function ke(e){const t=0===e?7:e;return Array.from({length:7},(e,a)=>(t-1+a)%7+1)}var xe=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,Ee=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?$e(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&xe(t,a,i),i};let Se=class extends r{constructor(){super(...arguments),this.firstDayOfWeek=1,this.locale="en"}render(){const e=ke(this.firstDayOfWeek);return i` <div>
2
+ ${e.map(e=>i`<span>${me(e,this.locale)}</span>`)}
3
+ </div>`}};Se.styles=n`
4
+ :host {
5
+ display: block;
6
+ flex-shrink: 0;
7
+ }
8
+
9
+ div {
10
+ height: var(--context-height, 1.75em);
11
+ display: grid;
12
+ grid-template-columns: repeat(7, 1fr);
13
+ }
14
+ span {
15
+ /* Match the month indicator's margin (0.25em) + padding (0.25em) */
16
+ padding: var(--context-padding, 0.25em) var(--context-padding-inline, 0.5em);
17
+ text-align: var(--context-text-align, left);
18
+ }
19
+ `,Ee([s({type:Number})],Se.prototype,"firstDayOfWeek",2),Ee([s({type:String})],Se.prototype,"locale",2),Se=Ee([d("lms-calendar-context")],Se);var _e=Object.defineProperty,Te=Object.getOwnPropertyDescriptor,Me=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?Te(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&_e(t,a,i),i};let Ce=class extends r{constructor(){super(...arguments),this._hours=[...Array(25).keys()],this._hasActiveSidebar=!1,this.allDayRowCount=0,this.locale="en"}_renderIndicatorValue(e){return ge(e,0,this.locale)}render(){const e=this.allDayRowCount>0,t=e?`calc(100% - 3.5em - ${24*this.allDayRowCount}px)`:"100%";return i` <div class="wrapper">
20
+ ${e?i`
21
+ <div class="all-day-wrapper">
22
+ <div class="all-day">
23
+ <slot name="all-day" id="all-day" class="entry"></slot>
24
+ </div>
25
+ </div>
26
+ `:o}
27
+ <div class="container" style="height: ${t}">
28
+ <div
29
+ class="main ${p({"w-100":!this._hasActiveSidebar,"w-70":this._hasActiveSidebar})}"
30
+ >
31
+ <div class="time-labels">
32
+ ${this._hours.map(e=>i`
33
+ <div
34
+ class="hour-label"
35
+ style="top: calc(${e} * var(--hour-height))"
36
+ >
37
+ <span class="indicator">
38
+ ${this._renderIndicatorValue(e)}
39
+ </span>
40
+ </div>
41
+ `)}
42
+ </div>
43
+ <div class="timed-content">
44
+ <slot name="timed"></slot>
45
+ </div>
46
+ </div>
47
+ <div
48
+ class="sidebar w-30"
49
+ ?hidden=${!this._hasActiveSidebar}
50
+ ></div>
51
+ </div>
52
+ </div>`}};Ce.styles=n`
53
+ :host {
54
+ display: block;
55
+ height: 100%;
56
+ width: 100%;
57
+ }
58
+
59
+ .wrapper {
60
+ display: flex;
61
+ flex-direction: column;
62
+ height: var(--view-container-height);
63
+ width: 100%;
64
+ overflow: hidden;
65
+ }
66
+
67
+ .container {
68
+ display: flex;
69
+ flex: 1;
70
+ width: 100%;
71
+ }
72
+
73
+ .main {
74
+ display: grid;
75
+ grid-template-columns: var(--day-grid-columns, var(--calendar-grid-columns-day));
76
+ grid-template-rows: 1fr;
77
+ height: var(--main-content-height);
78
+ gap: var(--day-gap, 1px);
79
+ overflow-y: scroll;
80
+ text-align: var(--day-text-align, center);
81
+ padding: var(--day-padding, 0.5em);
82
+ position: relative;
83
+ contain: content;
84
+ }
85
+
86
+ .time-labels {
87
+ grid-column: 1;
88
+ position: relative;
89
+ height: var(--day-total-height);
90
+ display: var(--day-show-time-column, block);
91
+ border-right: var(--sidebar-border, 1px solid var(--separator-light));
92
+ }
93
+
94
+ .hour-label {
95
+ position: absolute;
96
+ left: 0;
97
+ right: 0;
98
+ text-align: var(--hour-text-align, center);
99
+ font-size: var(--hour-indicator-font-size);
100
+ color: var(--hour-indicator-color);
101
+ }
102
+
103
+ .hour-label .indicator {
104
+ position: relative;
105
+ top: var(--indicator-top, -0.6em);
106
+ }
107
+
108
+ .timed-content {
109
+ grid-column: 2;
110
+ position: relative;
111
+ height: var(--day-total-height);
112
+ background-image: repeating-linear-gradient(
113
+ to bottom,
114
+ transparent 0,
115
+ transparent calc(var(--hour-height) - 1px),
116
+ var(--separator-light) calc(var(--hour-height) - 1px),
117
+ var(--separator-light) var(--hour-height)
118
+ );
119
+ background-size: 100% var(--hour-height);
120
+ }
121
+
122
+ .sidebar {
123
+ height: 100%;
124
+ border-left: var(--sidebar-border, 1px solid var(--separator-light));
125
+ }
126
+
127
+ .w-100 {
128
+ width: 100%;
129
+ }
130
+
131
+ .w-70 {
132
+ width: 70%;
133
+ }
134
+
135
+ .w-30 {
136
+ width: 30%;
137
+ }
138
+
139
+ .w-0 {
140
+ width: 0;
141
+ }
142
+
143
+ .all-day-wrapper {
144
+ display: grid;
145
+ grid-template-rows: 1fr;
146
+ border-bottom: 1px solid var(--separator-light, rgba(0, 0, 0, 0.1));
147
+ /* Isolate repaint from the hour-grid scroller beneath */
148
+ contain: paint;
149
+ }
150
+
151
+ .all-day {
152
+ font-size: var(--day-all-day-font-size, 16px);
153
+ margin: var(--day-all-day-margin, 0 1.25em 0 4.25em);
154
+ overflow: hidden;
155
+ min-height: 0;
156
+ padding: 0.5em 0;
157
+ }
158
+ `,Me([l()],Ce.prototype,"_hours",2),Me([l()],Ce.prototype,"_hasActiveSidebar",2),Me([s({type:Number})],Ce.prototype,"allDayRowCount",2),Me([s({type:String})],Ce.prototype,"locale",2),Ce=Me([d("lms-calendar-day")],Ce);const Ae={ar:{s005053d82b712e0a:"ملاحظات",s090f2107b5a69a7f:"أ",s15ba5784a11e0b88:"الشهر الحالي",s22380c7fc798a44f:"بدون محتوى",s2bc4d1196bce49dc:"تصدير كملف ICS",s3c44e22d1af5693e:"سنة",s48e186fb300e5464:"الوقت",s58ab939b42a026a6:"طوال اليوم",s5e8250fb85d64c23:"إغلاق",s63d040e37887f17e:"اليوم",s680f01021b5e339d:"أسبوع",s98b32ef4a0856c08:"بدون عنوان",s99f110d27e30b289:"العنوان",sa0fd990c985f24bd:"تفاصيل الحدث",sac8252732f2edb19:"التاريخ",sb47daaf9e1c4a905:"شهر",se0955919920ee87d:"يوم",sfce4bfbe0f911aa7:"بدون وقت",sa1b2c3d4e5f60001:"السابق",sa1b2c3d4e5f60002:"التالي",sa1b2c3d4e5f60003:"أحداث",sa1b2c3d4e5f60004:"حدث تقويمي",sa1b2c3d4e5f60005:"اضغط Enter أو Space لفتح التفاصيل",sa1b2c3d4e5f60006:"إلى",sa1b2c3d4e5f60007:"التبديل إلى عرض اليوم لـ",sa1b2c3d4e5f60008:"عرض الأيام السابقة",sa1b2c3d4e5f60009:"عرض الأيام التالية",sa1b2c3d4e5f60010:"المزيد",sa1b2c3d4e5f60011:"عرض التقويم",sa1b2c3d4e5f60012:"عرض"},bn:{s005053d82b712e0a:"নোট",s090f2107b5a69a7f:"স",s15ba5784a11e0b88:"বর্তমান মাস",s22380c7fc798a44f:"বিষয়বস্তু নেই",s2bc4d1196bce49dc:"ICS হিসাবে রপ্তানি",s3c44e22d1af5693e:"বছর",s48e186fb300e5464:"সময়",s58ab939b42a026a6:"সারাদিন",s5e8250fb85d64c23:"বন্ধ",s63d040e37887f17e:"আজ",s680f01021b5e339d:"সপ্তাহ",s98b32ef4a0856c08:"শিরোনাম নেই",s99f110d27e30b289:"শিরোনাম",sa0fd990c985f24bd:"ইভেন্টের বিবরণ",sac8252732f2edb19:"তারিখ",sb47daaf9e1c4a905:"মাস",se0955919920ee87d:"দিন",sfce4bfbe0f911aa7:"সময় নেই",sa1b2c3d4e5f60001:"আগের",sa1b2c3d4e5f60002:"পরের",sa1b2c3d4e5f60003:"ইভেন্ট",sa1b2c3d4e5f60004:"ক্যালেন্ডার ইভেন্ট",sa1b2c3d4e5f60005:"বিস্তারিত দেখতে Enter বা Space চাপুন",sa1b2c3d4e5f60006:"থেকে",sa1b2c3d4e5f60007:"দিনের ভিউতে যান",sa1b2c3d4e5f60008:"আগের দিনগুলি দেখান",sa1b2c3d4e5f60009:"পরের দিনগুলি দেখান",sa1b2c3d4e5f60010:"আরও",sa1b2c3d4e5f60011:"ক্যালেন্ডার ভিউ",sa1b2c3d4e5f60012:"ভিউ"},de:{s005053d82b712e0a:"Notizen",s090f2107b5a69a7f:"KW",s15ba5784a11e0b88:"Aktueller Monat",s22380c7fc798a44f:"Kein Inhalt",s2bc4d1196bce49dc:"Als ICS exportieren",s3c44e22d1af5693e:"Jahr",s48e186fb300e5464:"Zeit",s58ab939b42a026a6:"Ganztägig",s5e8250fb85d64c23:"Schließen",s63d040e37887f17e:"Heute",s680f01021b5e339d:"Woche",s98b32ef4a0856c08:"Kein Titel",s99f110d27e30b289:"Titel",sa0fd990c985f24bd:"Termindetails",sac8252732f2edb19:"Datum",sb47daaf9e1c4a905:"Monat",se0955919920ee87d:"Tag",sfce4bfbe0f911aa7:"Keine Zeit",sa1b2c3d4e5f60001:"Zurück",sa1b2c3d4e5f60002:"Weiter",sa1b2c3d4e5f60003:"Termine",sa1b2c3d4e5f60004:"Kalenderereignis",sa1b2c3d4e5f60005:"Enter oder Leertaste drücken für Details",sa1b2c3d4e5f60006:"bis",sa1b2c3d4e5f60007:"Zur Tagesansicht wechseln für",sa1b2c3d4e5f60008:"Frühere Tage anzeigen",sa1b2c3d4e5f60009:"Spätere Tage anzeigen",sa1b2c3d4e5f60010:"mehr",sa1b2c3d4e5f60011:"Kalenderansicht",sa1b2c3d4e5f60012:"Ansicht"},"de-DE":{s005053d82b712e0a:"Notizen",s090f2107b5a69a7f:"KW",s15ba5784a11e0b88:"Aktueller Monat",s22380c7fc798a44f:"Kein Inhalt",s2bc4d1196bce49dc:"Als ICS exportieren",s3c44e22d1af5693e:"Jahr",s48e186fb300e5464:"Zeit",s58ab939b42a026a6:"Ganztägig",s5e8250fb85d64c23:"Schließen",s63d040e37887f17e:"Heute",s680f01021b5e339d:"Woche",s98b32ef4a0856c08:"Kein Titel",s99f110d27e30b289:"Titel",sa0fd990c985f24bd:"Termindetails",sac8252732f2edb19:"Datum",sb47daaf9e1c4a905:"Monat",se0955919920ee87d:"Tag",sfce4bfbe0f911aa7:"Keine Zeit",sa1b2c3d4e5f60001:"Zurück",sa1b2c3d4e5f60002:"Weiter",sa1b2c3d4e5f60003:"Termine",sa1b2c3d4e5f60004:"Kalenderereignis",sa1b2c3d4e5f60005:"Enter oder Leertaste drücken für Details",sa1b2c3d4e5f60006:"bis",sa1b2c3d4e5f60007:"Zur Tagesansicht wechseln für",sa1b2c3d4e5f60008:"Frühere Tage anzeigen",sa1b2c3d4e5f60009:"Spätere Tage anzeigen",sa1b2c3d4e5f60010:"mehr",sa1b2c3d4e5f60011:"Kalenderansicht",sa1b2c3d4e5f60012:"Ansicht"},es:{s005053d82b712e0a:"Notas",s090f2107b5a69a7f:"S",s15ba5784a11e0b88:"Mes actual",s22380c7fc798a44f:"Sin contenido",s2bc4d1196bce49dc:"Exportar como ICS",s3c44e22d1af5693e:"Año",s48e186fb300e5464:"Hora",s58ab939b42a026a6:"Todo el día",s5e8250fb85d64c23:"Cerrar",s63d040e37887f17e:"Hoy",s680f01021b5e339d:"Semana",s98b32ef4a0856c08:"Sin título",s99f110d27e30b289:"Título",sa0fd990c985f24bd:"Detalles del evento",sac8252732f2edb19:"Fecha",sb47daaf9e1c4a905:"Mes",se0955919920ee87d:"Día",sfce4bfbe0f911aa7:"Sin hora",sa1b2c3d4e5f60001:"Anterior",sa1b2c3d4e5f60002:"Siguiente",sa1b2c3d4e5f60003:"eventos",sa1b2c3d4e5f60004:"Evento del calendario",sa1b2c3d4e5f60005:"Pulsa Enter o Espacio para abrir detalles",sa1b2c3d4e5f60006:"a",sa1b2c3d4e5f60007:"Cambiar a vista diaria para",sa1b2c3d4e5f60008:"Mostrar días anteriores",sa1b2c3d4e5f60009:"Mostrar días posteriores",sa1b2c3d4e5f60010:"más",sa1b2c3d4e5f60011:"Vista del calendario",sa1b2c3d4e5f60012:"vista"},fr:{s005053d82b712e0a:"Notes",s090f2107b5a69a7f:"S",s15ba5784a11e0b88:"Mois en cours",s22380c7fc798a44f:"Aucun contenu",s2bc4d1196bce49dc:"Exporter en ICS",s3c44e22d1af5693e:"Année",s48e186fb300e5464:"Heure",s58ab939b42a026a6:"Toute la journée",s5e8250fb85d64c23:"Fermer",s63d040e37887f17e:"Aujourd'hui",s680f01021b5e339d:"Semaine",s98b32ef4a0856c08:"Sans titre",s99f110d27e30b289:"Titre",sa0fd990c985f24bd:"Détails de l'événement",sac8252732f2edb19:"Date",sb47daaf9e1c4a905:"Mois",se0955919920ee87d:"Jour",sfce4bfbe0f911aa7:"Aucune heure",sa1b2c3d4e5f60001:"Précédent",sa1b2c3d4e5f60002:"Suivant",sa1b2c3d4e5f60003:"événements",sa1b2c3d4e5f60004:"Événement du calendrier",sa1b2c3d4e5f60005:"Appuyez sur Entrée ou Espace pour ouvrir les détails",sa1b2c3d4e5f60006:"à",sa1b2c3d4e5f60007:"Passer à la vue journalière pour",sa1b2c3d4e5f60008:"Afficher les jours précédents",sa1b2c3d4e5f60009:"Afficher les jours suivants",sa1b2c3d4e5f60010:"plus",sa1b2c3d4e5f60011:"Vue du calendrier",sa1b2c3d4e5f60012:"vue"},hi:{s005053d82b712e0a:"टिप्पणियाँ",s090f2107b5a69a7f:"स",s15ba5784a11e0b88:"वर्तमान महीना",s22380c7fc798a44f:"कोई सामग्री नहीं",s2bc4d1196bce49dc:"ICS के रूप में निर्यात करें",s3c44e22d1af5693e:"वर्ष",s48e186fb300e5464:"समय",s58ab939b42a026a6:"पूरा दिन",s5e8250fb85d64c23:"बंद करें",s63d040e37887f17e:"आज",s680f01021b5e339d:"सप्ताह",s98b32ef4a0856c08:"कोई शीर्षक नहीं",s99f110d27e30b289:"शीर्षक",sa0fd990c985f24bd:"कार्यक्रम विवरण",sac8252732f2edb19:"तारीख",sb47daaf9e1c4a905:"महीना",se0955919920ee87d:"दिन",sfce4bfbe0f911aa7:"कोई समय नहीं",sa1b2c3d4e5f60001:"पिछला",sa1b2c3d4e5f60002:"अगला",sa1b2c3d4e5f60003:"इवेंट",sa1b2c3d4e5f60004:"कैलेंडर इवेंट",sa1b2c3d4e5f60005:"विवरण खोलने के लिए Enter या Space दबाएं",sa1b2c3d4e5f60006:"से",sa1b2c3d4e5f60007:"दिन दृश्य पर जाएं",sa1b2c3d4e5f60008:"पहले के दिन दिखाएं",sa1b2c3d4e5f60009:"बाद के दिन दिखाएं",sa1b2c3d4e5f60010:"अधिक",sa1b2c3d4e5f60011:"कैलेंडर दृश्य",sa1b2c3d4e5f60012:"दृश्य"},id:{s005053d82b712e0a:"Catatan",s090f2107b5a69a7f:"M",s15ba5784a11e0b88:"Bulan Ini",s22380c7fc798a44f:"Tanpa Konten",s2bc4d1196bce49dc:"Ekspor sebagai ICS",s3c44e22d1af5693e:"Tahun",s48e186fb300e5464:"Waktu",s58ab939b42a026a6:"Sepanjang Hari",s5e8250fb85d64c23:"Tutup",s63d040e37887f17e:"Hari Ini",s680f01021b5e339d:"Minggu",s98b32ef4a0856c08:"Tanpa Judul",s99f110d27e30b289:"Judul",sa0fd990c985f24bd:"Detail Acara",sac8252732f2edb19:"Tanggal",sb47daaf9e1c4a905:"Bulan",se0955919920ee87d:"Hari",sfce4bfbe0f911aa7:"Tanpa Waktu",sa1b2c3d4e5f60001:"Sebelumnya",sa1b2c3d4e5f60002:"Berikutnya",sa1b2c3d4e5f60003:"acara",sa1b2c3d4e5f60004:"Acara kalender",sa1b2c3d4e5f60005:"Tekan Enter atau Spasi untuk membuka detail",sa1b2c3d4e5f60006:"sampai",sa1b2c3d4e5f60007:"Beralih ke tampilan hari untuk",sa1b2c3d4e5f60008:"Tampilkan hari sebelumnya",sa1b2c3d4e5f60009:"Tampilkan hari berikutnya",sa1b2c3d4e5f60010:"lainnya",sa1b2c3d4e5f60011:"Tampilan kalender",sa1b2c3d4e5f60012:"tampilan"},it:{s005053d82b712e0a:"Note",s090f2107b5a69a7f:"S",s15ba5784a11e0b88:"Mese corrente",s22380c7fc798a44f:"Nessun contenuto",s2bc4d1196bce49dc:"Esporta come ICS",s3c44e22d1af5693e:"Anno",s48e186fb300e5464:"Ora",s58ab939b42a026a6:"Tutto il giorno",s5e8250fb85d64c23:"Chiudi",s63d040e37887f17e:"Oggi",s680f01021b5e339d:"Settimana",s98b32ef4a0856c08:"Senza titolo",s99f110d27e30b289:"Titolo",sa0fd990c985f24bd:"Dettagli evento",sac8252732f2edb19:"Data",sb47daaf9e1c4a905:"Mese",se0955919920ee87d:"Giorno",sfce4bfbe0f911aa7:"Nessun orario",sa1b2c3d4e5f60001:"Precedente",sa1b2c3d4e5f60002:"Successivo",sa1b2c3d4e5f60003:"eventi",sa1b2c3d4e5f60004:"Evento del calendario",sa1b2c3d4e5f60005:"Premi Invio o Spazio per aprire i dettagli",sa1b2c3d4e5f60006:"a",sa1b2c3d4e5f60007:"Passa alla vista giornaliera per",sa1b2c3d4e5f60008:"Mostra giorni precedenti",sa1b2c3d4e5f60009:"Mostra giorni successivi",sa1b2c3d4e5f60010:"altro",sa1b2c3d4e5f60011:"Vista calendario",sa1b2c3d4e5f60012:"vista"},ja:{s005053d82b712e0a:"メモ",s090f2107b5a69a7f:"週",s15ba5784a11e0b88:"今月",s22380c7fc798a44f:"内容なし",s2bc4d1196bce49dc:"ICSとして書き出す",s3c44e22d1af5693e:"年",s48e186fb300e5464:"時間",s58ab939b42a026a6:"終日",s5e8250fb85d64c23:"閉じる",s63d040e37887f17e:"今日",s680f01021b5e339d:"週",s98b32ef4a0856c08:"タイトルなし",s99f110d27e30b289:"タイトル",sa0fd990c985f24bd:"予定の詳細",sac8252732f2edb19:"日付",sb47daaf9e1c4a905:"月",se0955919920ee87d:"日",sfce4bfbe0f911aa7:"時間なし",sa1b2c3d4e5f60001:"前へ",sa1b2c3d4e5f60002:"次へ",sa1b2c3d4e5f60003:"件",sa1b2c3d4e5f60004:"カレンダーイベント",sa1b2c3d4e5f60005:"EnterまたはSpaceキーで詳細を開く",sa1b2c3d4e5f60006:"から",sa1b2c3d4e5f60007:"日表示に切り替え",sa1b2c3d4e5f60008:"前の日を表示",sa1b2c3d4e5f60009:"次の日を表示",sa1b2c3d4e5f60010:"もっと",sa1b2c3d4e5f60011:"カレンダー表示",sa1b2c3d4e5f60012:"表示"},ko:{s005053d82b712e0a:"메모",s090f2107b5a69a7f:"주",s15ba5784a11e0b88:"이번 달",s22380c7fc798a44f:"내용 없음",s2bc4d1196bce49dc:"ICS로 내보내기",s3c44e22d1af5693e:"년",s48e186fb300e5464:"시간",s58ab939b42a026a6:"종일",s5e8250fb85d64c23:"닫기",s63d040e37887f17e:"오늘",s680f01021b5e339d:"주",s98b32ef4a0856c08:"제목 없음",s99f110d27e30b289:"제목",sa0fd990c985f24bd:"일정 상세",sac8252732f2edb19:"날짜",sb47daaf9e1c4a905:"월",se0955919920ee87d:"일",sfce4bfbe0f911aa7:"시간 없음",sa1b2c3d4e5f60001:"이전",sa1b2c3d4e5f60002:"다음",sa1b2c3d4e5f60003:"일정",sa1b2c3d4e5f60004:"캘린더 이벤트",sa1b2c3d4e5f60005:"Enter 또는 Space를 눌러 세부 정보 열기",sa1b2c3d4e5f60006:"부터",sa1b2c3d4e5f60007:"일 보기로 전환",sa1b2c3d4e5f60008:"이전 날 표시",sa1b2c3d4e5f60009:"다음 날 표시",sa1b2c3d4e5f60010:"더보기",sa1b2c3d4e5f60011:"캘린더 보기",sa1b2c3d4e5f60012:"보기"},nl:{s005053d82b712e0a:"Notities",s090f2107b5a69a7f:"W",s15ba5784a11e0b88:"Huidige maand",s22380c7fc798a44f:"Geen inhoud",s2bc4d1196bce49dc:"Exporteren als ICS",s3c44e22d1af5693e:"Jaar",s48e186fb300e5464:"Tijd",s58ab939b42a026a6:"Hele dag",s5e8250fb85d64c23:"Sluiten",s63d040e37887f17e:"Vandaag",s680f01021b5e339d:"Week",s98b32ef4a0856c08:"Geen titel",s99f110d27e30b289:"Titel",sa0fd990c985f24bd:"Details evenement",sac8252732f2edb19:"Datum",sb47daaf9e1c4a905:"Maand",se0955919920ee87d:"Dag",sfce4bfbe0f911aa7:"Geen tijd",sa1b2c3d4e5f60001:"Vorige",sa1b2c3d4e5f60002:"Volgende",sa1b2c3d4e5f60003:"evenementen",sa1b2c3d4e5f60004:"Agendagebeurtenis",sa1b2c3d4e5f60005:"Druk op Enter of Spatie om details te openen",sa1b2c3d4e5f60006:"tot",sa1b2c3d4e5f60007:"Naar dagweergave voor",sa1b2c3d4e5f60008:"Eerdere dagen tonen",sa1b2c3d4e5f60009:"Latere dagen tonen",sa1b2c3d4e5f60010:"meer",sa1b2c3d4e5f60011:"Agendaweergave",sa1b2c3d4e5f60012:"weergave"},pl:{s005053d82b712e0a:"Notatki",s090f2107b5a69a7f:"T",s15ba5784a11e0b88:"Bieżący miesiąc",s22380c7fc798a44f:"Brak treści",s2bc4d1196bce49dc:"Eksportuj jako ICS",s3c44e22d1af5693e:"Rok",s48e186fb300e5464:"Czas",s58ab939b42a026a6:"Cały dzień",s5e8250fb85d64c23:"Zamknij",s63d040e37887f17e:"Dziś",s680f01021b5e339d:"Tydzień",s98b32ef4a0856c08:"Brak tytułu",s99f110d27e30b289:"Tytuł",sa0fd990c985f24bd:"Szczegóły wydarzenia",sac8252732f2edb19:"Data",sb47daaf9e1c4a905:"Miesiąc",se0955919920ee87d:"Dzień",sfce4bfbe0f911aa7:"Brak czasu",sa1b2c3d4e5f60001:"Poprzedni",sa1b2c3d4e5f60002:"Następny",sa1b2c3d4e5f60003:"wydarzeń",sa1b2c3d4e5f60004:"Wydarzenie kalendarza",sa1b2c3d4e5f60005:"Naciśnij Enter lub Spację, aby otworzyć szczegóły",sa1b2c3d4e5f60006:"do",sa1b2c3d4e5f60007:"Przełącz na widok dnia dla",sa1b2c3d4e5f60008:"Pokaż wcześniejsze dni",sa1b2c3d4e5f60009:"Pokaż późniejsze dni",sa1b2c3d4e5f60010:"więcej",sa1b2c3d4e5f60011:"Widok kalendarza",sa1b2c3d4e5f60012:"widok"},pt:{s005053d82b712e0a:"Notas",s090f2107b5a69a7f:"S",s15ba5784a11e0b88:"Mês atual",s22380c7fc798a44f:"Sem conteúdo",s2bc4d1196bce49dc:"Exportar como ICS",s3c44e22d1af5693e:"Ano",s48e186fb300e5464:"Hora",s58ab939b42a026a6:"O dia todo",s5e8250fb85d64c23:"Fechar",s63d040e37887f17e:"Hoje",s680f01021b5e339d:"Semana",s98b32ef4a0856c08:"Sem título",s99f110d27e30b289:"Título",sa0fd990c985f24bd:"Detalhes do evento",sac8252732f2edb19:"Data",sb47daaf9e1c4a905:"Mês",se0955919920ee87d:"Dia",sfce4bfbe0f911aa7:"Sem horário",sa1b2c3d4e5f60001:"Anterior",sa1b2c3d4e5f60002:"Próximo",sa1b2c3d4e5f60003:"eventos",sa1b2c3d4e5f60004:"Evento do calendário",sa1b2c3d4e5f60005:"Pressione Enter ou Espaço para abrir detalhes",sa1b2c3d4e5f60006:"até",sa1b2c3d4e5f60007:"Mudar para visualização diária de",sa1b2c3d4e5f60008:"Mostrar dias anteriores",sa1b2c3d4e5f60009:"Mostrar dias posteriores",sa1b2c3d4e5f60010:"mais",sa1b2c3d4e5f60011:"Visualização do calendário",sa1b2c3d4e5f60012:"visualização"},ru:{s005053d82b712e0a:"Заметки",s090f2107b5a69a7f:"Н",s15ba5784a11e0b88:"Текущий месяц",s22380c7fc798a44f:"Нет содержимого",s2bc4d1196bce49dc:"Экспорт в ICS",s3c44e22d1af5693e:"Год",s48e186fb300e5464:"Время",s58ab939b42a026a6:"Весь день",s5e8250fb85d64c23:"Закрыть",s63d040e37887f17e:"Сегодня",s680f01021b5e339d:"Неделя",s98b32ef4a0856c08:"Без названия",s99f110d27e30b289:"Название",sa0fd990c985f24bd:"Детали события",sac8252732f2edb19:"Дата",sb47daaf9e1c4a905:"Месяц",se0955919920ee87d:"День",sfce4bfbe0f911aa7:"Нет времени",sa1b2c3d4e5f60001:"Назад",sa1b2c3d4e5f60002:"Вперёд",sa1b2c3d4e5f60003:"событий",sa1b2c3d4e5f60004:"Событие календаря",sa1b2c3d4e5f60005:"Нажмите Enter или Пробел для открытия деталей",sa1b2c3d4e5f60006:"до",sa1b2c3d4e5f60007:"Переключиться на дневной вид для",sa1b2c3d4e5f60008:"Показать предыдущие дни",sa1b2c3d4e5f60009:"Показать следующие дни",sa1b2c3d4e5f60010:"ещё",sa1b2c3d4e5f60011:"Вид календаря",sa1b2c3d4e5f60012:"вид"},th:{s005053d82b712e0a:"บันทึก",s090f2107b5a69a7f:"ส",s15ba5784a11e0b88:"เดือนปัจจุบัน",s22380c7fc798a44f:"ไม่มีเนื้อหา",s2bc4d1196bce49dc:"ส่งออกเป็น ICS",s3c44e22d1af5693e:"ปี",s48e186fb300e5464:"เวลา",s58ab939b42a026a6:"ทั้งวัน",s5e8250fb85d64c23:"ปิด",s63d040e37887f17e:"วันนี้",s680f01021b5e339d:"สัปดาห์",s98b32ef4a0856c08:"ไม่มีชื่อ",s99f110d27e30b289:"ชื่อ",sa0fd990c985f24bd:"รายละเอียดกิจกรรม",sac8252732f2edb19:"วันที่",sb47daaf9e1c4a905:"เดือน",se0955919920ee87d:"วัน",sfce4bfbe0f911aa7:"ไม่มีเวลา",sa1b2c3d4e5f60001:"ก่อนหน้า",sa1b2c3d4e5f60002:"ถัดไป",sa1b2c3d4e5f60003:"กิจกรรม",sa1b2c3d4e5f60004:"กิจกรรมปฏิทิน",sa1b2c3d4e5f60005:"กด Enter หรือ Space เพื่อเปิดรายละเอียด",sa1b2c3d4e5f60006:"ถึง",sa1b2c3d4e5f60007:"สลับไปมุมมองรายวันสำหรับ",sa1b2c3d4e5f60008:"แสดงวันก่อนหน้า",sa1b2c3d4e5f60009:"แสดงวันถัดไป",sa1b2c3d4e5f60010:"เพิ่มเติม",sa1b2c3d4e5f60011:"มุมมองปฏิทิน",sa1b2c3d4e5f60012:"มุมมอง"},tr:{s005053d82b712e0a:"Notlar",s090f2107b5a69a7f:"H",s15ba5784a11e0b88:"Bu Ay",s22380c7fc798a44f:"İçerik Yok",s2bc4d1196bce49dc:"ICS Olarak Dışa Aktar",s3c44e22d1af5693e:"Yıl",s48e186fb300e5464:"Zaman",s58ab939b42a026a6:"Tüm Gün",s5e8250fb85d64c23:"Kapat",s63d040e37887f17e:"Bugün",s680f01021b5e339d:"Hafta",s98b32ef4a0856c08:"Başlıksız",s99f110d27e30b289:"Başlık",sa0fd990c985f24bd:"Etkinlik Detayları",sac8252732f2edb19:"Tarih",sb47daaf9e1c4a905:"Ay",se0955919920ee87d:"Gün",sfce4bfbe0f911aa7:"Zaman Yok",sa1b2c3d4e5f60001:"Önceki",sa1b2c3d4e5f60002:"Sonraki",sa1b2c3d4e5f60003:"etkinlik",sa1b2c3d4e5f60004:"Takvim etkinliği",sa1b2c3d4e5f60005:"Ayrıntıları açmak için Enter veya Boşluk tuşuna basın",sa1b2c3d4e5f60006:"ile",sa1b2c3d4e5f60007:"Gün görünümüne geç",sa1b2c3d4e5f60008:"Önceki günleri göster",sa1b2c3d4e5f60009:"Sonraki günleri göster",sa1b2c3d4e5f60010:"daha fazla",sa1b2c3d4e5f60011:"Takvim görünümü",sa1b2c3d4e5f60012:"görünüm"},uk:{s005053d82b712e0a:"Нотатки",s090f2107b5a69a7f:"Т",s15ba5784a11e0b88:"Поточний місяць",s22380c7fc798a44f:"Без вмісту",s2bc4d1196bce49dc:"Експорт в ICS",s3c44e22d1af5693e:"Рік",s48e186fb300e5464:"Час",s58ab939b42a026a6:"Увесь день",s5e8250fb85d64c23:"Закрити",s63d040e37887f17e:"Сьогодні",s680f01021b5e339d:"Тиждень",s98b32ef4a0856c08:"Без назви",s99f110d27e30b289:"Назва",sa0fd990c985f24bd:"Деталі події",sac8252732f2edb19:"Дата",sb47daaf9e1c4a905:"Місяць",se0955919920ee87d:"День",sfce4bfbe0f911aa7:"Без часу",sa1b2c3d4e5f60001:"Попередній",sa1b2c3d4e5f60002:"Наступний",sa1b2c3d4e5f60003:"подій",sa1b2c3d4e5f60004:"Подія календаря",sa1b2c3d4e5f60005:"Натисніть Enter або Пробіл для відкриття деталей",sa1b2c3d4e5f60006:"до",sa1b2c3d4e5f60007:"Перейти до денного перегляду для",sa1b2c3d4e5f60008:"Показати попередні дні",sa1b2c3d4e5f60009:"Показати наступні дні",sa1b2c3d4e5f60010:"ще",sa1b2c3d4e5f60011:"Перегляд календаря",sa1b2c3d4e5f60012:"перегляд"},vi:{s005053d82b712e0a:"Ghi chú",s090f2107b5a69a7f:"T",s15ba5784a11e0b88:"Tháng hiện tại",s22380c7fc798a44f:"Không có nội dung",s2bc4d1196bce49dc:"Xuất dưới dạng ICS",s3c44e22d1af5693e:"Năm",s48e186fb300e5464:"Thời gian",s58ab939b42a026a6:"Cả ngày",s5e8250fb85d64c23:"Đóng",s63d040e37887f17e:"Hôm nay",s680f01021b5e339d:"Tuần",s98b32ef4a0856c08:"Không có tiêu đề",s99f110d27e30b289:"Tiêu đề",sa0fd990c985f24bd:"Chi tiết sự kiện",sac8252732f2edb19:"Ngày",sb47daaf9e1c4a905:"Tháng",se0955919920ee87d:"Ngày",sfce4bfbe0f911aa7:"Không có thời gian",sa1b2c3d4e5f60001:"Trước",sa1b2c3d4e5f60002:"Sau",sa1b2c3d4e5f60003:"sự kiện",sa1b2c3d4e5f60004:"Sự kiện lịch",sa1b2c3d4e5f60005:"Nhấn Enter hoặc Space để mở chi tiết",sa1b2c3d4e5f60006:"đến",sa1b2c3d4e5f60007:"Chuyển sang xem theo ngày cho",sa1b2c3d4e5f60008:"Hiển thị ngày trước đó",sa1b2c3d4e5f60009:"Hiển thị ngày tiếp theo",sa1b2c3d4e5f60010:"thêm",sa1b2c3d4e5f60011:"Xem lịch",sa1b2c3d4e5f60012:"xem"},"zh-Hans":{s005053d82b712e0a:"备注",s090f2107b5a69a7f:"周",s15ba5784a11e0b88:"本月",s22380c7fc798a44f:"无内容",s2bc4d1196bce49dc:"导出为 ICS",s3c44e22d1af5693e:"年",s48e186fb300e5464:"时间",s58ab939b42a026a6:"全天",s5e8250fb85d64c23:"关闭",s63d040e37887f17e:"今天",s680f01021b5e339d:"周",s98b32ef4a0856c08:"无标题",s99f110d27e30b289:"标题",sa0fd990c985f24bd:"事件详情",sac8252732f2edb19:"日期",sb47daaf9e1c4a905:"月",se0955919920ee87d:"日",sfce4bfbe0f911aa7:"无时间",sa1b2c3d4e5f60001:"上一个",sa1b2c3d4e5f60002:"下一个",sa1b2c3d4e5f60003:"事件",sa1b2c3d4e5f60004:"日历事件",sa1b2c3d4e5f60005:"按 Enter 或空格键打开详情",sa1b2c3d4e5f60006:"至",sa1b2c3d4e5f60007:"切换到日视图",sa1b2c3d4e5f60008:"显示更早的日期",sa1b2c3d4e5f60009:"显示更晚的日期",sa1b2c3d4e5f60010:"更多",sa1b2c3d4e5f60011:"日历视图",sa1b2c3d4e5f60012:"视图"}},Oe=[["day","se0955919920ee87d","Day"],["week","s680f01021b5e339d","Week"],["month","sb47daaf9e1c4a905","Month"],["currentMonth","s15ba5784a11e0b88","Current Month"],["allDay","s58ab939b42a026a6","All Day"],["today","s63d040e37887f17e","Today"],["noTitle","s98b32ef4a0856c08","No Title"],["noContent","s22380c7fc798a44f","No Content"],["noTime","sfce4bfbe0f911aa7","No Time"],["eventDetails","sa0fd990c985f24bd","Event Details"],["exportAsICS","s2bc4d1196bce49dc","Export as ICS"],["title","s99f110d27e30b289","Title"],["time","s48e186fb300e5464","Time"],["date","sac8252732f2edb19","Date"],["notes","s005053d82b712e0a","Notes"],["close","s5e8250fb85d64c23","Close"],["calendarWeek","s090f2107b5a69a7f","CW"],["year","s3c44e22d1af5693e","Year"],["previous","sa1b2c3d4e5f60001","Previous"],["next","sa1b2c3d4e5f60002","Next"],["events","sa1b2c3d4e5f60003","events"],["calendarEvent","sa1b2c3d4e5f60004","Calendar event"],["pressToOpen","sa1b2c3d4e5f60005","Press Enter or Space to open details"],["to","sa1b2c3d4e5f60006","to"],["switchToDayView","sa1b2c3d4e5f60007","Switch to day view for"],["showEarlierDays","sa1b2c3d4e5f60008","Show earlier days"],["showLaterDays","sa1b2c3d4e5f60009","Show later days"],["more","sa1b2c3d4e5f60010","more"],["calendarView","sa1b2c3d4e5f60011","Calendar view"],["viewLabel","sa1b2c3d4e5f60012","view"]],Ie=/* @__PURE__ */new Map;function Re(e){let t=Ie.get(e);if(t)return t;const a=function(e){if("en"!==e)return Ae[e]??Ae[e.split("-")[0]]}(e),n={};for(const[r,i,o]of Oe)n[r]=a?.[i]??o;return t=Object.freeze(n),Ie.set(e,t),t}var Ne=Object.defineProperty,ze=Object.getOwnPropertyDescriptor,Le=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?ze(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&Ne(t,a,i),i};let Ye=class extends r{constructor(){super(),this.heading="",this.isContinuation=!1,this.density="standard",this.displayMode="default",this.floatText=!1,this.locale="en",this._sumReducer=(e,t)=>e+t,this.addEventListener("click",this._handleInteraction),this.addEventListener("keydown",this._handleInteraction),this.addEventListener("focus",this._handleFocus)}_renderTitle(){return oe(this.content).with(ne.nullish,()=>this.heading).otherwise(()=>`${this.heading}: ${this.content}`)}_renderTime(){const e=Re(this.locale);if("month-dot"===this.displayMode){if(this.isContinuation)return i`<span class="time">${e.allDay}</span>`;const t=this._displayInterval(this.time);return t?i`<span class="time">${t}</span>`:o}if("compact"===this.density)return o;if(this.isContinuation)return i`<span class="time">${e.allDay}</span>`;const t=this._displayInterval(this.time);return t?i`<span class="time">${t}</span>`:o}_renderContent(){return"full"===this.density&&this.content?i`<span class="content">${this.content}</span>`:o}_shouldShowTime(){return"compact"!==this.density&&(!!this.isContinuation||("standard"===this.density||"full"===this.density))}_getAriaLabel(){const e=Re(this.locale),t=this.time?`${ge(this.time.start.hour,this.time.start.minute,this.locale)} ${e.to} ${ge(this.time.end.hour,this.time.end.minute,this.locale)}`:e.allDay,a=this.content?`, ${this.content}`:"";return`${e.calendarEvent}: ${this.heading}${a}, ${t}. ${e.pressToOpen}`}updated(){this.floatText||(this.tabIndex=this.accessibility?.tabIndex??0,this.setAttribute("role","button"),this.setAttribute("aria-label",this.accessibility?.ariaLabel??this._getAriaLabel()),this.setAttribute("aria-selected",this._highlighted?"true":"false"))}render(){const e=`main ${this.density}`;if("month-dot"===this.displayMode){const t=this.isContinuation;return i`
159
+ <div
160
+ class=${e}
161
+ title=${this._renderTitle()}
162
+ data-full-content=${this.content||""}
163
+ ?data-extended=${this._extended}
164
+ ?data-is-multi-day=${t}
165
+ >
166
+ ${t?"":i`
167
+ <span class="color-dot"></span>
168
+ `}
169
+ <span class="title">${this.heading}</span>
170
+ ${this._renderTime()}
171
+ </div>
172
+ `}return this.floatText?i`
173
+ <div
174
+ class=${e}
175
+ style="background-color: var(--entry-background-color); height: 100%; position: relative; overflow: visible;"
176
+ >
177
+ <div class="text-content">
178
+ <span style="font-weight: 500;">${this.heading}</span>
179
+ ${this._renderTime()}
180
+ </div>
181
+ </div>
182
+ `:i`
183
+ <div
184
+ class=${e}
185
+ title=${this._renderTitle()}
186
+ data-full-content=${this.content||""}
187
+ ?data-extended=${this._extended}
188
+ >
189
+ <span class="title">${this.heading}</span>
190
+ ${this._shouldShowTime()?this._renderTime():o}
191
+ ${this._renderContent()}
192
+ </div>
193
+ `}_displayInterval(e){if(!e)return o;const t=[e.start.hour,e.start.minute,e.end.hour,e.end.minute];return 24===t[2]&&t.reduce(this._sumReducer,0)%24==0?Re(this.locale).allDay:function(e,t,a,n,r="en"){return`${ge(e,t,r)} – ${ge(a,n,r)}`}(e.start.hour,e.start.minute,e.end.hour,e.end.minute,this.locale)}clearSelection(){this._highlighted=!1}_handleFocus(e){const t=new CustomEvent("clear-other-selections",{detail:{exceptEntry:this},bubbles:!0,composed:!0});this.dispatchEvent(t)}_handleInteraction(e){if(!(e instanceof KeyboardEvent&&"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.stopPropagation(),this._highlighted))){if(this._highlighted=!0,!this.date)return;const e=Re(this.locale),t={heading:this.heading||e.noTitle,content:this.content||e.noContent,time:this.time,displayTime:this.time?this._displayInterval(this.time):e.noTime,date:this.date?.start,anchorRect:this.getBoundingClientRect()},a=new CustomEvent("open-menu",{detail:t,bubbles:!0,composed:!0});this.dispatchEvent(a);const n=()=>{this._highlighted=!1,this.removeEventListener("menu-close",n)};this.addEventListener("menu-close",n)}}};Ye.styles=n`
194
+ :host {
195
+ /* Use shared design tokens from root component */
196
+ font-size: var(--entry-font-size);
197
+ line-height: var(--entry-line-height);
198
+ font-family: var(--system-ui);
199
+ contain: layout style;
200
+
201
+ grid-column: 2;
202
+ display: block;
203
+ cursor: pointer;
204
+ user-select: none;
205
+ border-radius: var(--entry-border-radius);
206
+ grid-row: var(--start-slot);
207
+ width: var(--entry-width, 100%);
208
+ margin-left: var(--entry-margin-left, 0);
209
+ background-color: var(--entry-background-color);
210
+ color: var(--entry-color);
211
+ border: var(--entry-border, none);
212
+ /* z-index of separators in day view is 0 */
213
+ z-index: var(--entry-z-index, 1);
214
+ opacity: var(--entry-opacity, 1);
215
+ box-sizing: border-box;
216
+ padding-bottom: 1px;
217
+ min-height: var(--entry-min-height);
218
+ overflow: hidden;
219
+ position: relative;
220
+ }
221
+
222
+ /* Color handle indicator on the left - only for day/week views */
223
+ :host::before {
224
+ content: '';
225
+ position: absolute;
226
+ left: 0;
227
+ top: 0;
228
+ bottom: 0;
229
+ width: var(--entry-handle-width, 0px);
230
+ background-color: var(--entry-handle-color, transparent);
231
+ border-radius: var(--entry-border-radius) 0 0 var(--entry-border-radius);
232
+ display: var(--entry-handle-display, none);
233
+ }
234
+
235
+ :host(:last-child) {
236
+ padding-bottom: 0;
237
+ }
238
+
239
+ :host([data-highlighted]) {
240
+ background: var(--entry-highlight-color);
241
+ }
242
+
243
+ /* ARIA-compliant highlighted border for active menu entries */
244
+ :host([aria-selected='true']) {
245
+ outline: 3px solid var(--entry-focus-color);
246
+ outline-offset: 2px;
247
+ position: relative;
248
+ z-index: 999 !important; /* Ensure highlighted entry appears above others */
249
+ }
250
+
251
+ /* Keyboard-only focus styles — mouse clicks won't trigger the outline */
252
+ :host(:focus-visible) {
253
+ outline: 2px solid var(--entry-focus-color);
254
+ outline-offset: 2px;
255
+ position: relative;
256
+ z-index: 999 !important;
257
+ }
258
+
259
+ :host([data-extended]) {
260
+ background: var(--entry-extended-background-color, var(--background-color));
261
+ }
262
+
263
+ .main {
264
+ padding: var(--entry-padding);
265
+ padding-top: calc(var(--entry-padding-top, 0) + 0.15em);
266
+ border-radius: var(--entry-border-radius);
267
+ background-color: inherit;
268
+ text-align: left;
269
+ height: 100%;
270
+ box-sizing: border-box;
271
+ display: flex;
272
+ flex-direction: var(--entry-layout);
273
+ align-items: var(--entry-align); /* Use shared design token */
274
+ justify-content: flex-start; /* Always align content to left */
275
+ gap: var(--entry-gap);
276
+ overflow: visible;
277
+ position: relative;
278
+ }
279
+
280
+ /* Compact grouped content - don't stretch to fill height */
281
+ .main.compact,
282
+ .main.standard {
283
+ align-self: flex-start; /* Don't stretch vertically */
284
+ height: auto; /* Use natural content height instead of 100% */
285
+ min-height: var(--entry-min-height, 1.2em);
286
+ }
287
+
288
+ /* When handle design is used, adjust padding for the colored handle */
289
+ .main {
290
+ padding-left: var(--entry-padding-left, 0.25em);
291
+ }
292
+
293
+ .text-content {
294
+ position: absolute;
295
+ top: var(--entry-text-top, -20px);
296
+ left: var(--entry-text-left, 0);
297
+ background: rgba(255, 255, 255, 0.95);
298
+ padding: 2px 6px;
299
+ border-radius: 3px;
300
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
301
+ font-size: 0.7rem;
302
+ z-index: 1000;
303
+ white-space: nowrap;
304
+ pointer-events: auto;
305
+ line-height: 1.2;
306
+ }
307
+
308
+ /* Compact mode: single line with title only */
309
+ .main.compact {
310
+ flex-direction: row;
311
+ align-items: flex-start; /* Top-left alignment for better overlapping visibility */
312
+ gap: 0;
313
+ }
314
+
315
+ /* Standard mode: title + time in various layouts */
316
+ .main.standard {
317
+ flex-direction: var(--entry-layout, row);
318
+ align-items: flex-start;
319
+ gap: 0.25em;
320
+ }
321
+
322
+ /* Full mode: multi-line with all content */
323
+ .main.full {
324
+ flex-direction: column;
325
+ align-items: flex-start;
326
+ gap: 0.1em;
327
+ }
328
+
329
+ .title {
330
+ flex: 1;
331
+ min-width: 0;
332
+ overflow: hidden;
333
+ text-overflow: ellipsis;
334
+ white-space: var(--entry-title-wrap);
335
+ font-weight: var(--entry-title-weight);
336
+ }
337
+
338
+ .time {
339
+ font-family: var(--entry-font-family, var(--system-ui));
340
+ font-size: var(--entry-time-font-size);
341
+ opacity: var(--entry-time-opacity);
342
+ white-space: nowrap;
343
+ flex-shrink: 0;
344
+ margin-left: 0; /* Ensure time stays on the left, don't auto-align to right */
345
+ }
346
+
347
+ /* Row layout: optimized for side-by-side content */
348
+ .main[style*='--entry-layout: row'] {
349
+ align-items: center; /* Center align for single-line layout */
350
+ gap: 0.5em; /* Gap between title and time */
351
+ flex-wrap: nowrap; /* Prevent wrapping */
352
+ min-height: 1.4em; /* Ensure consistent height */
353
+ }
354
+
355
+ .main[style*='--entry-layout: row'] .title {
356
+ flex: 1 1 auto; /* Allow title to grow but not beyond container */
357
+ min-width: 0; /* Allow title to shrink below content size */
358
+ max-width: 65%; /* Reserve space for time, but allow more for title */
359
+ overflow: hidden;
360
+ text-overflow: ellipsis;
361
+ white-space: nowrap;
362
+ }
363
+
364
+ .main[style*='--entry-layout: row'] .time {
365
+ flex: 0 0 auto; /* Fixed size, don't grow or shrink */
366
+ min-width: fit-content; /* Ensure time always fits */
367
+ font-size: 0.8em; /* Slightly smaller in row layout */
368
+ opacity: 0.9;
369
+ }
370
+
371
+ /* Column layout: optimized for stacked content */
372
+ .main[style*='--entry-layout: column'] {
373
+ align-items: flex-start;
374
+ gap: 0.15em; /* Tighter spacing for stacked layout */
375
+ padding-top: 0.2em; /* Slight top padding for better visual balance */
376
+ }
377
+
378
+ .main[style*='--entry-layout: column'] .title {
379
+ width: 100%;
380
+ font-weight: 500; /* Slightly bolder in column layout */
381
+ line-height: 1.2;
382
+ margin-bottom: 0.1em;
383
+ }
384
+
385
+ .main[style*='--entry-layout: column'] .time {
386
+ width: 100%;
387
+ font-size: 0.85em;
388
+ opacity: 0.8;
389
+ line-height: 1.1;
390
+ }
391
+
392
+ /* Month view dot indicator styles */
393
+ :host([data-display-mode='month-dot']) {
394
+ background: var(--entry-month-background);
395
+ padding: var(--entry-month-padding);
396
+ border-radius: 0;
397
+ color: var(--entry-month-text-color);
398
+ position: relative;
399
+ z-index: 1;
400
+ width: 100%;
401
+ min-width: 0;
402
+ box-sizing: border-box;
403
+ overflow: visible;
404
+ contain: style;
405
+ min-height: auto;
406
+ }
407
+
408
+ /* Multi-day events keep their background in month view */
409
+ :host([data-display-mode='month-dot'][data-is-continuation='true']),
410
+ :host([data-display-mode='month-dot']) .main[data-is-multi-day='true'] {
411
+ background: var(--entry-background-color);
412
+ border-radius: var(--border-radius-sm);
413
+ color: var(--entry-color);
414
+ }
415
+
416
+ :host([data-display-mode='month-dot']) .main {
417
+ padding: 0;
418
+ align-items: center;
419
+ gap: var(--entry-dot-margin);
420
+ flex-wrap: nowrap;
421
+ overflow: visible;
422
+ flex-direction: row !important;
423
+ }
424
+
425
+ :host([data-display-mode='month-dot']) .title {
426
+ color: inherit;
427
+ white-space: nowrap;
428
+ overflow: hidden;
429
+ text-overflow: ellipsis;
430
+ flex: 1;
431
+ min-width: 0;
432
+ }
433
+
434
+ :host([data-display-mode='month-dot']) .time {
435
+ font-family: var(--entry-time-font);
436
+ text-align: var(--entry-time-align);
437
+ min-width: 0;
438
+ margin-left: auto;
439
+ color: inherit;
440
+ opacity: 0.8;
441
+ flex-shrink: 1;
442
+ overflow: hidden;
443
+ text-overflow: ellipsis;
444
+ }
445
+
446
+ .color-dot {
447
+ width: var(--entry-dot-size);
448
+ height: var(--entry-dot-size);
449
+ border-radius: 50%;
450
+ background-color: var(--entry-color);
451
+ flex-shrink: 0;
452
+ aspect-ratio: 1;
453
+ }
454
+
455
+ .content {
456
+ font-size: 0.9em;
457
+ opacity: 0.9;
458
+ overflow: hidden;
459
+ text-overflow: ellipsis;
460
+ white-space: nowrap;
461
+ }
462
+
463
+ /* Responsive behavior based on available height */
464
+ :host([data-height='compact']) .main {
465
+ flex-direction: row;
466
+ align-items: center;
467
+ }
468
+
469
+ :host([data-height='compact']) .time {
470
+ display: var(--entry-compact-show-time, none);
471
+ }
472
+
473
+ :host([data-height='standard']) .main {
474
+ flex-direction: row;
475
+ align-items: flex-start;
476
+ }
477
+
478
+ :host([data-height='full']) .main {
479
+ flex-direction: column;
480
+ align-items: flex-start;
481
+ }
482
+
483
+ :host([data-height='full']) .title {
484
+ white-space: normal;
485
+ word-wrap: break-word;
486
+ }
487
+ `,Le([s({attribute:!1})],Ye.prototype,"time",2),Le([s()],Ye.prototype,"heading",2),Le([s()],Ye.prototype,"content",2),Le([s({type:Boolean})],Ye.prototype,"isContinuation",2),Le([s({type:Object})],Ye.prototype,"date",2),Le([s({type:String,reflect:!0,attribute:"data-density"})],Ye.prototype,"density",2),Le([s({type:String,reflect:!0,attribute:"data-display-mode"})],Ye.prototype,"displayMode",2),Le([s({type:Boolean,reflect:!0,attribute:"data-float-text"})],Ye.prototype,"floatText",2),Le([s({type:Object,attribute:!1})],Ye.prototype,"accessibility",2),Le([s({type:String})],Ye.prototype,"locale",2),Le([l()],Ye.prototype,"_highlighted",2),Le([l()],Ye.prototype,"_extended",2),Ye=Le([d("lms-calendar-entry")],Ye);var je=Object.defineProperty,We=Object.getOwnPropertyDescriptor,Pe=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?We(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&je(t,a,i),i};let Fe=class extends r{constructor(){super(...arguments),this.viewMode="month",this.locale="en"}_getWeekInfo(e){const t=u.fromObject({year:e.year,month:e.month,day:e.day});return{weekNumber:t.weekNumber,weekYear:t.weekYear}}render(){const e=this.activeDate,t=Re(this.locale);return i`<div class="controls">
488
+ <div class="info">
489
+ <span>
490
+ <strong>${this.heading||t.currentMonth}</strong>
491
+ </span>
492
+ <div class="view-detail${"day"===this.viewMode?" active":""}">
493
+ <span class="day">${e.day}</span>
494
+ <span class="month"
495
+ >${ye(e.month,this.locale)}</span
496
+ >
497
+ <span class="year">${e.year}</span>
498
+ </div>
499
+ <div class="view-detail${"week"===this.viewMode?" active":""}">
500
+ <span class="week"
501
+ >${t.calendarWeek}
502
+ ${this._getWeekInfo(e).weekNumber}</span
503
+ >
504
+ <span class="month"
505
+ >${ye(e.month,this.locale)}</span
506
+ >
507
+ <span class="year"
508
+ >${this._getWeekInfo(e).weekYear}</span
509
+ >
510
+ </div>
511
+ <div class="view-detail${"month"===this.viewMode?" active":""}">
512
+ <span class="month"
513
+ >${ye(e.month,this.locale)}</span
514
+ >
515
+ <span class="year">${e.year}</span>
516
+ </div>
517
+ <div class="view-detail${"year"===this.viewMode?" active":""}">
518
+ <span class="year">${e.year}</span>
519
+ </div>
520
+ </div>
521
+ <nav class="context" aria-label="${t.calendarView}" @click=${this._dispatchSwitchView}>
522
+ <button
523
+ type="button"
524
+ ?data-active=${"day"===this.viewMode}
525
+ aria-pressed=${"day"===this.viewMode?"true":"false"}
526
+ data-context="day"
527
+ class="btn-change-view"
528
+ >
529
+ ${t.day}
530
+ </button>
531
+ <button
532
+ type="button"
533
+ ?data-active=${"week"===this.viewMode}
534
+ aria-pressed=${"week"===this.viewMode?"true":"false"}
535
+ data-context="week"
536
+ class="btn-change-view"
537
+ >
538
+ ${t.week}
539
+ </button>
540
+ <button
541
+ type="button"
542
+ ?data-active=${"month"===this.viewMode}
543
+ aria-pressed=${"month"===this.viewMode?"true":"false"}
544
+ data-context="month"
545
+ class="btn-change-view"
546
+ >
547
+ ${t.month}
548
+ </button>
549
+ <button
550
+ type="button"
551
+ ?data-active=${"year"===this.viewMode}
552
+ aria-pressed=${"year"===this.viewMode?"true":"false"}
553
+ data-context="year"
554
+ class="btn-change-view"
555
+ >
556
+ ${t.year}
557
+ </button>
558
+ </nav>
559
+ <div class="buttons" @click=${this._dispatchSwitchDate}>
560
+ <button type="button" name="previous" aria-label="${t.previous}">«</button>
561
+ <button type="button" name="next" aria-label="${t.next}">»</button>
562
+ <span class="separator"></span>
563
+ <button type="button" name="today" @click=${this._handleTodayClick}>
564
+ ${t.today}
565
+ </button>
566
+ </div>
567
+ </div>`}_handleTodayClick(e){e.stopPropagation();const t=/* @__PURE__ */new Date,a={day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()},n=new CustomEvent("jumptoday",{detail:{date:a},bubbles:!0,composed:!0});this.dispatchEvent(n)}_dispatchSwitchDate(e){const t=e.target;if(!(t instanceof HTMLButtonElement))return;const a=e.target===e.currentTarget?"container":t.name,n=new CustomEvent("switchdate",{detail:{direction:a},bubbles:!0,composed:!0});this.dispatchEvent(n)}_dispatchSwitchView(e){const t=e.target;if(!(t instanceof HTMLElement))return;const a=e.target===e.currentTarget?"container":t.dataset.context,n=new CustomEvent("switchview",{detail:{view:a},bubbles:!0,composed:!0});this.dispatchEvent(n)}};Fe.styles=n`
568
+ :host {
569
+ display: block;
570
+ container-type: inline-size;
571
+ }
572
+
573
+ .controls {
574
+ height: var(--header-height, 3.5em);
575
+ width: 100%;
576
+ display: grid;
577
+ grid-template-columns: 1fr auto 1fr;
578
+ align-items: center;
579
+ border-bottom: 1px solid var(--separator-light);
580
+ }
581
+
582
+ .info {
583
+ padding-left: var(--header-info-padding-left, 1em);
584
+ text-align: right;
585
+ display: grid;
586
+ justify-self: start;
587
+ min-width: 0;
588
+ overflow: hidden;
589
+ }
590
+
591
+ @container (max-width: 600px) {
592
+ .controls {
593
+ font-size: small;
594
+ height: auto;
595
+ display: flex;
596
+ flex-wrap: wrap;
597
+ justify-content: center;
598
+ align-items: center;
599
+ padding: 0.35em 0.5em;
600
+ gap: 0.25em 0.5em;
601
+ }
602
+ .info {
603
+ flex-basis: 100%;
604
+ display: flex;
605
+ align-items: baseline;
606
+ justify-content: center;
607
+ gap: 0.4em;
608
+ padding-left: 0;
609
+ }
610
+ .view-detail {
611
+ grid-row: unset;
612
+ grid-column: unset;
613
+ display: none;
614
+ }
615
+ .view-detail.active {
616
+ display: inline;
617
+ }
618
+ .buttons {
619
+ padding-right: 0;
620
+ }
621
+ }
622
+
623
+ .view-detail {
624
+ grid-row: 2;
625
+ grid-column: 1;
626
+ visibility: hidden;
627
+ }
628
+
629
+ .view-detail.active {
630
+ visibility: visible;
631
+ }
632
+ .day,
633
+ .week,
634
+ .month,
635
+ .year {
636
+ color: var(--header-text-color, rgba(0, 0, 0, 0.6));
637
+ }
638
+ button {
639
+ padding: 0.4em 0.7em;
640
+ margin: 0;
641
+ border: none;
642
+ background: none;
643
+ font: inherit;
644
+ font-size: 0.85em;
645
+ color: var(--header-text-color, rgba(0, 0, 0, 0.6));
646
+ cursor: pointer;
647
+ border-radius: var(--border-radius-sm, 5px);
648
+ transition:
649
+ background-color 0.15s ease,
650
+ color 0.15s ease;
651
+ }
652
+
653
+ button:hover {
654
+ background: var(--separator-light, rgba(0, 0, 0, 0.1));
655
+ }
656
+
657
+ .context {
658
+ display: flex;
659
+ align-items: center;
660
+ gap: 0;
661
+ background: var(--separator-light, rgba(0, 0, 0, 0.06));
662
+ border-radius: var(--border-radius-sm, 5px);
663
+ padding: 0.15em;
664
+ }
665
+
666
+ .context button {
667
+ border-radius: calc(var(--border-radius-sm, 5px) - 1px);
668
+ }
669
+
670
+ .context button[data-active] {
671
+ background: var(--background-color, white);
672
+ color: var(--separator-dark, rgba(0, 0, 0, 0.7));
673
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
674
+ }
675
+
676
+ .buttons {
677
+ display: flex;
678
+ align-items: center;
679
+ padding-right: var(--header-buttons-padding-right, 1em);
680
+ gap: 0.15em;
681
+ justify-self: end;
682
+ }
683
+
684
+ .buttons .separator {
685
+ width: 1px;
686
+ height: 1.2em;
687
+ background: var(--separator-light, rgba(0, 0, 0, 0.15));
688
+ margin: 0 0.2em;
689
+ }
690
+ `,Pe([s({type:String})],Fe.prototype,"heading",2),Pe([s({type:Object})],Fe.prototype,"activeDate",2),Pe([s({type:String})],Fe.prototype,"viewMode",2),Pe([s({type:Object})],Fe.prototype,"expandedDate",2),Pe([s({type:String})],Fe.prototype,"locale",2),Fe=Pe([d("lms-calendar-header")],Fe);var Be=e=>Object.fromEntries(Object.entries(e).map(([e,t])=>[t,e])),He={action:"ACTION",description:"DESCRIPTION",duration:"DURATION",repeat:"REPEAT",summary:"SUMMARY",trigger:"TRIGGER",attachments:"ATTACH",attendees:"ATTENDEE"};Be(He);Be({method:"METHOD",prodId:"PRODID",version:"VERSION",name:"X-WR-CALNAME"});var Ue={alarms:"ALARM",categories:"CATEGORIES",created:"CREATED",description:"DESCRIPTION",lastModified:"LAST-MODIFIED",location:"LOCATION",exceptionDates:"EXDATE",recurrenceRule:"RRULE",stamp:"DTSTAMP",start:"DTSTART",summary:"SUMMARY",uid:"UID",timeTransparent:"TRANSP",url:"URL",end:"DTEND",duration:"DURATION",geo:"GEO",class:"CLASS",organizer:"ORGANIZER",priority:"PRIORITY",sequence:"SEQUENCE",status:"STATUS",attach:"ATTACH",recurrenceId:"RECURRENCE-ID",attendees:"ATTENDEE",comment:"COMMENT"};Be(Ue);Be({id:"TZID",lastModified:"LAST-MODIFIED",url:"TZURL"});Be({comment:"COMMENT",name:"TZNAME",offsetFrom:"TZOFFSETFROM",offsetTo:"TZOFFSETTO",recurrenceDate:"RDATE",recurrenceRule:"RRULE",start:"DTSTART"});Be({byDay:"BYDAY",byHour:"BYHOUR",byMinute:"BYMINUTE",byMonth:"BYMONTH",byMonthday:"BYMONTHDAY",bySecond:"BYSECOND",bySetPos:"BYSETPOS",byWeekNo:"BYWEEKNO",byYearday:"BYYEARDAY",count:"COUNT",frequency:"FREQ",interval:"INTERVAL",until:"UNTIL",workweekStart:"WKST"});Be({categories:"CATEGORIES",created:"CREATED",description:"DESCRIPTION",lastModified:"LAST-MODIFIED",location:"LOCATION",exceptionDates:"EXDATE",recurrenceRule:"RRULE",stamp:"DTSTAMP",start:"DTSTART",summary:"SUMMARY",uid:"UID",url:"URL",duration:"DURATION",geo:"GEO",class:"CLASS",organizer:"ORGANIZER",priority:"PRIORITY",sequence:"SEQUENCE",status:"STATUS",attach:"ATTACH",recurrenceId:"RECURRENCE-ID",attendees:"ATTENDEE",comment:"COMMENT",completed:"COMPLETED",due:"DUE",percentComplete:"PERCENT-COMPLETE"});Be({categories:"CATEGORIES",created:"CREATED",description:"DESCRIPTION",lastModified:"LAST-MODIFIED",exceptionDates:"EXDATE",recurrenceRule:"RRULE",stamp:"DTSTAMP",start:"DTSTART",summary:"SUMMARY",uid:"UID",url:"URL",geo:"GEO",class:"CLASS",organizer:"ORGANIZER",sequence:"SEQUENCE",status:"STATUS",attach:"ATTACH",recurrenceId:"RECURRENCE-ID",attendees:"ATTENDEE",comment:"COMMENT"});Be({stamp:"DTSTAMP",start:"DTSTART",uid:"UID",url:"URL",organizer:"ORGANIZER",attendees:"ATTENDEE",comment:"COMMENT",end:"DTEND",freeBusy:"FREEBUSY"});var Ve=/\r\n/,Ke=e=>`${e}\r\n`,qe=(e,t,a)=>a?null==t?"":Ke(`${e};${a}:${t}`):Ke(`${e}:${t}`),Ge=e=>{if(!(e.length<1))return`${e.map(e=>`${e.key}=${e.value}`).join(";")}`},Ze=(e,t)=>t?`"MAILTO:${e}"`:`MAILTO:${e}`,Je=(e,t)=>{let a=Ge([e.dir&&{key:"DIR",value:`"${e.dir}"`},e.delegatedFrom&&{key:"DELEGATED-FROM",value:Ze(e.delegatedFrom,!0)},e.member&&{key:"MEMBER",value:Ze(e.member,!0)},e.role&&{key:"ROLE",value:e.role},e.name&&{key:"CN",value:e.name},e.partstat&&{key:"PARTSTAT",value:e.partstat},e.sentBy&&{key:"SENT-BY",value:Ze(e.sentBy,!0)},void 0!==e.rsvp&&(!0===e.rsvp||!1===e.rsvp)&&{key:"RSVP",value:!0===e.rsvp?"TRUE":"FALSE"}].filter(e=>!!e));return qe(t,Ze(e.email),a)},Xe=e=>{if(0===Object.values(e).filter(e=>"number"==typeof e).length)return;let t="";return e.before&&(t+="-"),t+="P",void 0!==e.weeks&&(t+=`${e.weeks}W`),void 0!==e.days&&(t+=`${e.days}D`),(void 0!==e.hours||void 0!==e.minutes||void 0!==e.seconds)&&(t+="T",void 0!==e.hours&&(t+=`${e.hours}H`),void 0!==e.minutes&&(t+=`${e.minutes}M`),void 0!==e.seconds&&(t+=`${e.seconds}S`)),t},Qe=36e5,et=/* @__PURE__ */Symbol.for("constructDateFrom");function tt(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&et in e?e[et](t):e instanceof Date?new e.constructor(t):new Date(t)}function at(e,t){return tt(t||e,e)}function nt(e,t,a){let n=at(e,null==a?void 0:a.in);return isNaN(t)?tt((null==a?void 0:a.in)||e,NaN):(t&&n.setDate(n.getDate()+t),n)}function rt(e,t,a){let n=at(e,void 0);if(isNaN(t))return tt(e,NaN);if(!t)return n;let r=n.getDate(),i=tt(e,n.getTime());return i.setMonth(n.getMonth()+t+1,0),r>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),r),n)}function it(e,t,a){return tt(e,+at(e)+t)}function ot(e,t,a){return it(e,t*Qe)}var st={};function dt(){return st}function lt(e,t){var a,n,r,i;let o=dt(),s=(null==t?void 0:t.weekStartsOn)??(null==(n=null==(a=null==t?void 0:t.locale)?void 0:a.options)?void 0:n.weekStartsOn)??o.weekStartsOn??(null==(i=null==(r=o.locale)?void 0:r.options)?void 0:i.weekStartsOn)??0,d=at(e,null==t?void 0:t.in),l=d.getDay(),c=(l<s?7:0)+l-s;return d.setDate(d.getDate()-c),d.setHours(0,0,0,0),d}function ct(e,t,a){let n=at(e,void 0);return n.setTime(n.getTime()+6e4*t),n}function ht(e,t,a){return it(e,1e3*t)}function ut(e,t,a){return nt(e,7*t,a)}function ft(e,t,a){return rt(e,12*t)}function yt(e,t){let a=+at(e)-+at(t);return a<0?-1:a>0?1:a}function pt(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function mt(e,t){let a=at(e,void 0),n=a.getMonth();return a.setFullYear(a.getFullYear(),n+1,0),a.setHours(23,59,59,999),a}function bt(e,t){let[a,n]=function(e,...t){let a=tt.bind(null,t.find(e=>"object"==typeof e));return t.map(a)}(0,t.start,t.end);return{start:a,end:n}}function gt(e,t){let a=at(e,void 0);return a.setDate(1),a.setHours(0,0,0,0),a}function vt(e,t){var a,n,r,i;let o=dt(),s=(null==t?void 0:t.firstWeekContainsDate)??(null==(n=null==(a=null==t?void 0:t.locale)?void 0:a.options)?void 0:n.firstWeekContainsDate)??o.firstWeekContainsDate??(null==(i=null==(r=o.locale)?void 0:r.options)?void 0:i.firstWeekContainsDate)??1,d=function(e,t){var a,n,r,i;let o=at(e,null==t?void 0:t.in),s=o.getFullYear(),d=dt(),l=(null==t?void 0:t.firstWeekContainsDate)??(null==(n=null==(a=null==t?void 0:t.locale)?void 0:a.options)?void 0:n.firstWeekContainsDate)??d.firstWeekContainsDate??(null==(i=null==(r=d.locale)?void 0:r.options)?void 0:i.firstWeekContainsDate)??1,c=tt((null==t?void 0:t.in)||e,0);c.setFullYear(s+1,0,l),c.setHours(0,0,0,0);let h=lt(c,t),u=tt((null==t?void 0:t.in)||e,0);u.setFullYear(s,0,l),u.setHours(0,0,0,0);let f=lt(u,t);return+o>=+h?s+1:+o>=+f?s:s-1}(e,t),l=tt((null==t?void 0:t.in)||e,0);return l.setFullYear(d,0,s),l.setHours(0,0,0,0),lt(l,t)}function wt(e,t){return at(e,void 0).getDay()}function Dt(e,t){let a=at(e,void 0),n=a.getFullYear(),r=a.getMonth(),i=tt(a,0);return i.setFullYear(n,r+1,0),i.setHours(0,0,0,0),i.getDate()}function kt(e,t){return at(e,void 0).getMonth()}function xt(e,t,a){let n=at(e,null==a?void 0:a.in),r=function(e,t){let a=at(e,null==t?void 0:t.in),n=+lt(a,t)-+vt(a,t);return Math.round(n/6048e5)+1}(n,a)-t;return n.setDate(n.getDate()-7*r),at(n,null==a?void 0:a.in)}function $t(e,t,a){var n,r,i,o;let s=dt(),d=(null==a?void 0:a.weekStartsOn)??(null==(r=null==(n=null==a?void 0:a.locale)?void 0:n.options)?void 0:r.weekStartsOn)??s.weekStartsOn??(null==(o=null==(i=s.locale)?void 0:i.options)?void 0:o.weekStartsOn)??0,l=at(e,null==a?void 0:a.in),c=l.getDay(),h=7-d;return nt(l,t<0||t>6?t-(c+h)%7:((t%7+7)%7+h)%7-(c+h)%7,a)}function Et(e,t,a){let n=+at(e,void 0),[r,i]=[+at(t.start,void 0),+at(t.end,void 0)].sort((e,t)=>e-t);return n>=r&&n<=i}var St=["SU","MO","TU","WE","TH","FR","SA"],_t=(e,t)=>void 0!==t&&e>=t,Tt=(e,t,a,n)=>{let r=a.map(({day:e,occurrence:t})=>({occurrence:t,day:St.indexOf(e)}));return"YEARLY"===e.frequency?e.byYearday||e.byMonthday?t.map(e=>e.filter(e=>r.find(({day:t})=>t===wt(e)))):e.byWeekNo?t.map(e=>e.flatMap(e=>r.map(({day:t})=>$t(e,t,{weekStartsOn:n})))):e.byMonth?t.map(e=>e.flatMap(e=>r.flatMap(({day:t,occurrence:a})=>Mt(Ct(gt(e)),Ct(mt(e)),t,n,a)))):t.map(e=>e.flatMap(e=>r.flatMap(({day:t,occurrence:a})=>Mt(Ct(function(e){let t=at(e,void 0);return t.setFullYear(t.getFullYear(),0,1),t.setHours(0,0,0,0),t}(e)),Ct(function(e){let t=at(e,void 0),a=t.getFullYear();return t.setFullYear(a+1,0,0),t.setHours(23,59,59,999),t}(e)),t,n,a)))):"MONTHLY"===e.frequency?e.byMonthday?t.map(e=>e.filter(e=>r.find(({day:t})=>t===wt(e)))):t.map(e=>e.flatMap(e=>r.flatMap(({day:t,occurrence:a})=>Mt(Ct(gt(e)),Ct(mt(e)),t,n,a)))):"WEEKLY"===e.frequency?t.map(e=>e.flatMap(e=>r.map(({day:t})=>$t(e,t,{weekStartsOn:n})))):t.map(e=>e.filter(e=>r.find(({day:t})=>t===wt(e))))},Mt=(e,t,a,n,r)=>{if(void 0!==r){if(!(r<0)){let t=$t(e,a,{weekStartsOn:n});return ut(t,(r||1)-1+(e>t?1:0))}let i=$t(t,a,{weekStartsOn:n});return Ct(function(e){let t=at(e,void 0);return t.setHours(0,0,0,0),t}(function(e,t,a){return ut(e,-t,a)}(i,-(r||1)-1+(t<i?1:0))))}return function(e){let{start:t,end:a}=bt(0,e),n=+t>+a,r=n?+t:+a,i=n?a:t;i.setHours(0,0,0,0);let o=[];for(;+i<=r;)o.push(tt(t,i)),i.setDate(i.getDate()+1),i.setHours(0,0,0,0);return n?o.reverse():o}({start:e,end:t}).map(e=>Ct(e)).filter(a=>Et(a,{start:e,end:t})).filter(e=>a===wt(e))},Ct=e=>ct(e,-e.getTimezoneOffset()),At=(e,t,a)=>"YEARLY"===e.frequency||"MONTHLY"===e.frequency||"WEEKLY"===e.frequency||"DAILY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>function(e,t){let a=at(e,void 0);return a.setHours(t),a}(e,t)))):t.map(e=>e.filter(e=>a.includes(function(e){return at(e,void 0).getHours()}(e)))),Ot=(e,t,a)=>"YEARLY"===e.frequency||"MONTHLY"===e.frequency||"WEEKLY"===e.frequency||"DAILY"===e.frequency||"HOURLY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>function(e,t){let a=at(e,void 0);return a.setMinutes(t),a}(e,t)))):t.map(e=>e.filter(e=>a.includes(function(e){return at(e,void 0).getMinutes()}(e)))),It=(e,t,a)=>"YEARLY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>function(e,t){let a=at(e,void 0),n=a.getFullYear(),r=a.getDate(),i=tt(e,0);i.setFullYear(n,t,15),i.setHours(0,0,0,0);let o=Dt(i);return a.setMonth(t,Math.min(r,o)),a}(e,t)))):t.map(e=>e.filter(e=>a.includes(kt(e)))),Rt=(e,t,a)=>"YEARLY"===e.frequency||"MONTHLY"===e.frequency?t.map(e=>e.flatMap(e=>{let t=Dt(e);return a.map(a=>a>t?void 0:function(e,t){let a=at(e,void 0);return a.setDate(t),a}(e,a)).filter(e=>!!e)})):"WEEKLY"===e.frequency?t:t.map(e=>e.filter(e=>a.includes(kt(e)))),Nt=(e,t,a)=>"YEARLY"===e.frequency||"MONTHLY"===e.frequency||"WEEKLY"===e.frequency||"DAILY"===e.frequency||"HOURLY"===e.frequency||"MINUTELY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>function(e,t){let a=at(e,void 0);return a.setSeconds(t),a}(e,t)))):t.map(e=>e.filter(e=>a.includes(function(e){return at(e).getSeconds()}(e)))),zt=(e,t,a)=>"YEARLY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>function(e,t){let a=at(e,void 0);return a.setMonth(0),a.setDate(t),a}(e,t)))):"MONTHLY"===e.frequency||"WEEKLY"===e.frequency||"DAILY"===e.frequency?t:t.map(e=>e.filter(e=>a.includes(function(e){return at(e,void 0).getFullYear()}(e)))),Lt=(e,t,a)=>{let n=a;return e.byMonth&&(n=It(e,n,e.byMonth)),e.byWeekNo&&(n=((e,t,a,n)=>"YEARLY"===e.frequency?t.map(e=>e.flatMap(e=>a.map(t=>xt(e,t,{weekStartsOn:n})))):t)(e,n,e.byWeekNo,t.weekStartsOn)),e.byYearday&&(n=zt(e,n,e.byYearday)),e.byMonthday&&(n=Rt(e,n,e.byMonthday)),e.byDay&&(n=Tt(e,n,e.byDay,t.weekStartsOn)),e.byHour&&(n=At(e,n,e.byHour)),e.byMinute&&(n=Ot(e,n,e.byMinute)),e.bySecond&&(n=Nt(e,n,e.bySecond)),e.bySetPos&&(n=((e,t,a)=>e.byYearday||e.byWeekNo||e.byMonthday||e.byMonth||e.byDay||e.byHour||e.byMinute||e.bySecond?t.map(e=>e.sort(yt).filter((t,n)=>a.some(t=>t>0?0!==n&&n%t===0:0===n?e.length-1+t===0:n%(e.length-1+t)===0))):t)(e,n,e.bySetPos)),n.map(e=>e.sort(yt).filter(e=>!(t.exceptions.length>0&&t.exceptions.some(t=>function(e,t){return+at(e)==+at(t)}(t,e))||!Et(e,{start:t.start,end:t.end}))))},Yt=(e,t)=>{var a;let n=t.start,r=(null==(a=e.until)?void 0:a.date)||(null==t?void 0:t.end)||ft(n,2),i=t.exceptions||[],o=(e.workweekStart?St.indexOf(e.workweekStart):1)%7,s=[[n]];((e,{start:t,end:a},n)=>{if(_t(n.length,e.count))return;let r=e.frequency,i=e.interval||1;if(!r)return;let o=t;if("SECONDLY"!==r)if("MINUTELY"!==r)if("HOURLY"!==r)if("DAILY"!==r)if("WEEKLY"!==r)if("MONTHLY"!==r)if("YEARLY"!==r);else for(;o<a;)o=ft(o,i),n.push([o]);else for(;o<a;)o=rt(o,i),n.push([o]);else for(;o<a;){if(_t(n.length,e.count))return;o=ut(o,i),n.push([o])}else for(;o<a;){if(_t(n.length,e.count))return;o=nt(o,i),n.push([o])}else for(;o<a;){if(_t(n.length,e.count))return;o=ot(o,i),n.push([o])}else for(;o<a;){if(_t(n.length,e.count))return;o=ct(o,i),n.push([o])}else for(;o<a;){if(_t(n.length,e.count))return;o=ht(o,i),n.push([o])}})(e,{start:n,end:r},s);let d=Lt(e,{start:n,end:r,exceptions:i,weekStartsOn:o},s);return e.count?d.flat().splice(0,e.count):d.flat()},jt=e=>{let t="+"===e[0]?1:-1;return 1e3*(60*(60*Number(e.slice(1,3))+(e.length>3?Number(e.slice(3,5)):0))+(e.length>5?Number(e.slice(5,7)):0))*t},Wt=(e,t,a)=>{let n=null==a?void 0:a.find(e=>e.id===t);if(n){let t=((e,t)=>t.flatMap(t=>!t.recurrenceRule||t.recurrenceRule.until&&t.recurrenceRule.until.date<e?t:Yt(t.recurrenceRule,{start:t.start,end:e}).map(e=>({...t,start:e}))))(e,n.props).sort((e,t)=>yt(e.start,t.start));for(let n=0;n<t.length;n+=1)if(e<t[n].start){let e=t[n-1]?t[n-1].offsetTo:t[n].offsetFrom,a=e.length>5?e.substring(0,5):e;return{offset:a,milliseconds:jt(a)}}let a=t[t.length-1].offsetTo,r=a.length>5?a.substring(0,5):a;return{offset:r,milliseconds:jt(r)}}let r=((e,t)=>{let a="en-US",n=new Date(t.toLocaleString(a,{timeZone:"UTC"}));try{return new Date(t.toLocaleString(a,{timeZone:e})).getTime()-n.getTime()}catch{return t.getTime()-n.getTime()}})(t,e);if(!Number.isNaN(r)){let e=r<0,t=Math.abs(function(e){let t=e/Qe;return Math.trunc(t)}(r)),a=Math.abs(function(e){let t=e/6e4;return Math.trunc(t)}(r))-60*t;return{offset:`${e?"-":"+"}${1===t.toString().length?`0${t}`:t.toString()}${1===a.toString().length?`0${a}`:a.toString()}`,milliseconds:r}}},Pt=e=>{if(!pt(e))throw Error(`Incorrect date object: ${e}`);let t=e.toISOString();return`${t.slice(0,4)}${t.slice(5,7)}${t.slice(8,10)}`},Ft=e=>{if(!pt(e))throw Error(`Incorrect date object: ${e}`);return Bt(e)},Bt=(e,t)=>{let a=e.toISOString();return`${a.slice(0,4)}${a.slice(5,7)}${a.slice(8,10)}T${a.slice(11,13)}${a.slice(14,16)}${a.slice(17,19)}${t?"":"Z"}`},Ht=e=>Object.keys(e),Ut=e=>{let t="X-";for(let a of e)a===a.toUpperCase()&&(t+="-"),t+=a.toUpperCase();return t},Vt=(e,t)=>{let a=[],n="",r=0;for(let i=0;i<e.length;i++){let o=e[i],s="\n"===o?2:1;r+s>t?(a.push(0===a.length?n:` ${n}`),n=o,r=s):(n+=o,r+=s)}return n&&a.push(0===a.length?n:` ${n}`),a},Kt=(e,t)=>{let a=Ht(e),n=t.childComponents,r=n?Ht(n):[],i=t.generateArrayValues,o=i?Ht(i):[],s="";return s+=(e=>Ke(`BEGIN:${e}`))(t.icsComponent),a.forEach(a=>{if(r.includes(a)||o.includes(a)||"nonStandard"===a)return;let n=t.icsKeyMap[a];if(!n)return;let i=e[a];if(null==i)return;let d=t.generateValues[a];s+=d?d({icsKey:n,value:i,key:a}):qe(n,String(i))}),n&&r&&r.length>0&&r.forEach(t=>{let a=e[t];!a||!Array.isArray(a)||0===a.length||a.forEach(e=>{let a=n[t];a&&(s+=a(e))})}),i&&o&&o.length>0&&o.forEach(a=>{let n=i[a];if(!n)return;let r=t.icsKeyMap[a];if(!r)return;let o=e[a];!o||!Array.isArray(o)||0===o.length||o.forEach(e=>{s+=n({icsKey:r,value:e})})}),e.nonStandard&&(s+=((e,t)=>{if(!e)return"";let a="";return Object.entries(e).forEach(([e,n])=>{let r=null==t?void 0:t[e];if(!r)return void(a+=qe(Ut(e),null==n?void 0:n.toString()));let i=r.generate(n);i&&(a+=qe(r.name,i.value,i.options?Ge(Object.entries(i.options).map(([e,t])=>({key:e,value:t}))):void 0))}),a})(e.nonStandard,null==t?void 0:t.nonStandard)),s+=(e=>Ke(`END:${e}`))(t.icsComponent),null!=t&&t.skipFormatLines?s:(e=>{let t=e.split(Ve),a=[];return t.forEach(e=>{(e=>{let t=(e.match(/\n/g)||[]).length;return e.length+t})(e)<75?a.push(e):Vt(e,75).forEach(e=>{a.push(e)})}),a.join("\r\n")})(s)},qt=(e,t)=>qe(e,Math.trunc(t).toString()),Gt=(e,t)=>Kt(e,{icsComponent:"VALARM",icsKeyMap:He,generateValues:{trigger:({value:e})=>(e=>{var t,a;let n=Ge([(null==(t=e.options)?void 0:t.related)&&{key:"RELATED",value:e.options.related}].filter(e=>!!e));return"absolute"===e.type?qe("TRIGGER",Ft(null==(a=e.value)?void 0:a.date)):"relative"===e.type?qe("TRIGGER",Xe(e.value),n):void 0})(e),duration:({icsKey:e,value:t})=>qe(e,Xe(t)),repeat:({icsKey:e,value:t})=>qt(e,t)},generateArrayValues:{attendees:({value:e})=>Je(e,"ATTENDEE"),attachments:({value:e})=>(e=>{if("uri"===e.type){let t=Ge([e.formatType&&{key:"FMTTYPE",value:e.formatType}].filter(e=>!!e));return qe("ATTACH",e.url,t)}if("binary"===e.type){let t=Ge([e.value&&{key:"VALUE",value:e.value},e.encoding&&{key:"ENCODING",value:e.encoding}].filter(e=>!!e));return qe("ATTACH",e.binary,t)}throw Error(`IcsAttachment has no type! ${JSON.stringify(e)}`)})(e)},nonStandard:null==t?void 0:t.nonStandard,skipFormatLines:null==t?void 0:t.skipFormatLines}),Zt=(e,t,a=[],n)=>{let r=Ge([t.type&&{key:"VALUE",value:t.type},t.local&&!(null!=n&&n.forceUtc)&&{key:"TZID",value:t.local.timezone},...a].filter(e=>!!e)),i="DATE"===t.type?Pt(t.date):!t.local||null!=n&&n.forceUtc?Ft(t.date):((e,t,a)=>{let n=t.date;if(!pt(n))throw Error(`Incorrect date object: ${n}`);return Wt(n,t.timezone,a)?Bt(n,!0):Ft(e)})(t.date,t.local,null==n?void 0:n.timezones);return qe(e,i,r)},Jt=(e,t,a)=>qe(e,(e=>e.replace(/([\\;,])|(\n)/g,(e,t)=>t?`\\${t}`:"\\n"))(t),a?Ge(a):void 0),Xt=(e,t)=>Kt(e,{icsComponent:"VEVENT",icsKeyMap:Ue,generateValues:{stamp:({icsKey:e,value:t})=>Zt(e,t,void 0,{timezones:void 0,forceUtc:!0}),start:({icsKey:e,value:t})=>Zt(e,t,void 0,{timezones:void 0}),end:({icsKey:e,value:t})=>Zt(e,t,void 0,{timezones:void 0}),created:({icsKey:e,value:t})=>Zt(e,t,void 0,{timezones:void 0}),lastModified:({icsKey:e,value:t})=>Zt(e,t,void 0,{timezones:void 0}),categories:({icsKey:e,value:t})=>qe(e,t.join(",")),description:({icsKey:t,value:a})=>Jt(t,a,e.descriptionAltRep?[{key:"ALTREP",value:`"${e.descriptionAltRep}"`}]:void 0),location:({icsKey:e,value:t})=>Jt(e,t),comment:({icsKey:e,value:t})=>Jt(e,t),summary:({icsKey:e,value:t})=>Jt(e,t),recurrenceRule:({value:e})=>(e=>{var t;let a="",n=Ge([e.frequency&&{key:"FREQ",value:e.frequency},e.byDay&&{key:"BYDAY",value:e.byDay.map(e=>(e=>e.occurrence?`${e.occurrence}${e.day}`:e.day)(e)).join(",")},e.byHour&&{key:"BYHOUR",value:e.byHour.join(",")},e.byMinute&&{key:"BYMINUTE",value:e.byMinute.join(",")},e.byMonth&&{key:"BYMONTH",value:e.byMonth.map(e=>e+1).join(",")},e.byMonthday&&{key:"BYMONTHDAY",value:e.byMonthday.join(",")},e.bySecond&&{key:"BYSECOND",value:e.bySecond.join(",")},e.bySetPos&&{key:"BYSETPOS",value:e.bySetPos.join(",")},e.byWeekNo&&{key:"BYWEEKNO",value:e.byWeekNo.join(",")},e.byYearday&&{key:"BYYEARDAY",value:e.byYearday.join(",")},e.count&&{key:"COUNT",value:e.count.toString()},e.interval&&{key:"INTERVAL",value:e.interval.toString()},e.until&&{key:"UNTIL",value:"DATE"===e.until.type?Pt(e.until.date):Ft((null==(t=e.until.local)?void 0:t.date)||e.until.date)},e.workweekStart&&{key:"WKST",value:e.workweekStart}].filter(e=>!!e));return a+=qe("RRULE",n),a})(e),duration:({icsKey:e,value:t})=>qe(e,Xe(t)),organizer:({value:e})=>(e=>{let t=Ge([e.dir&&{key:"DIR",value:`"${e.dir}"`},e.name&&{key:"CN",value:e.name},e.sentBy&&{key:"SENT-BY",value:Ze(e.sentBy)}].filter(e=>!!e));return qe("ORGANIZER",Ze(e.email),t)})(e),sequence:({icsKey:e,value:t})=>qt(e,t),recurrenceId:({value:e})=>((e,t)=>{let a="";return a+=Zt("RECURRENCE-ID",e.value,e.range?[{key:"RANGE",value:e.range}]:void 0,t),a})(e,{timezones:void 0})},generateArrayValues:{attendees:({value:e})=>Je(e,"ATTENDEE"),exceptionDates:({value:e})=>((e,t,a)=>Zt(t,e,void 0,a))(e,"EXDATE",{timezones:void 0})},childComponents:{alarms:e=>Gt(e,{nonStandard:void 0,skipFormatLines:!0})},nonStandard:void 0,skipFormatLines:void 0}),Qt=Object.defineProperty,ea=Object.getOwnPropertyDescriptor,ta=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?ea(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&Qt(t,a,i),i};let aa=class extends r{constructor(){super(...arguments),this.open=!1,this.eventDetails={heading:"",content:"",displayTime:""},this.locale="en",this._cardTop=0,this._cardLeft=0,this._positioned=!1,this._handleKeydown=e=>{if("Tab"!==e.key)return;const t=Array.from(this.renderRoot.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));if(0===t.length)return;const a=t[0],n=t[t.length-1],r=this.renderRoot;e.shiftKey?r.activeElement===a&&(e.preventDefault(),n.focus()):r.activeElement===n&&(e.preventDefault(),a.focus())},this._handleClose=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("menu-close",{bubbles:!0,composed:!0}))},this._handleExport=()=>{const{heading:e,content:t,time:a,date:n}=this.eventDetails,r=n?.year??2025,i=(n?.month??4)-1,o=n?.day??18;let s,d;a&&(s={date:new Date(r,i,o,a.start.hour,a.start.minute)},d={date:new Date(r,i,o,a.end.hour,a.end.minute)});const l={start:{date:s&&s.date||new Date(r,i,o,0,0)},end:{date:d&&d.date||new Date(r,i,o,23,59)},summary:e,description:t,status:"CONFIRMED",uid:`${Date.now()}@lms-calendar`,stamp:{date:/* @__PURE__ */new Date}},c=["BEGIN:VCALENDAR","VERSION:2.0","PRODID:-//LMS Calendar//EN",Xt(l).trim(),"END:VCALENDAR"].join("\r\n"),h=new Blob([c],{type:"text/calendar"}),u=URL.createObjectURL(h),f=document.createElement("a");f.href=u,f.download=`${e||"event"}.ics`,document.body.appendChild(f),f.click(),setTimeout(()=>{document.body.removeChild(f),URL.revokeObjectURL(u)},0)}}updated(e){(e.has("open")||e.has("anchorRect"))&&this.open&&this.anchorRect&&(this._positioned=!1,this._computePosition(),requestAnimationFrame(()=>{const e=this.renderRoot.querySelector(".close-btn");e?.focus()}))}_computePosition(){requestAnimationFrame(()=>{const e=this.renderRoot.querySelector(".card"),t=this.parentElement;if(!e||!t||!this.anchorRect)return;const a=t.getBoundingClientRect(),n=e.getBoundingClientRect(),r=this.anchorRect.top-a.top,i=this.anchorRect.left-a.left,o=i+this.anchorRect.width,s=r+this.anchorRect.height/2,d=n.width||260,l=n.height||200;let c;c=o+8+d<=a.width?o+8:i-8-d>=0?i-8-d:Math.max(8,(a.width-d)/2);let h=s-l/2;h=Math.max(8,Math.min(h,a.height-l-8)),this._cardTop=h,this._cardLeft=c,this._positioned=!0})}_formatDate(e){return function(e,t,a,n="en"){const r=ce(n),i=new Date(a,t-1,e);return new Intl.DateTimeFormat(r,{day:"numeric",month:"short",year:"numeric"}).format(i)}(e.day,e.month,e.year,this.locale)}render(){const e=Re(this.locale),t="card"+(this._positioned?" visible":""),a=this.eventDetails.content&&this.eventDetails.content!==e.noContent;return i`
691
+ <div
692
+ class=${t}
693
+ role="dialog"
694
+ aria-modal="true"
695
+ aria-label=${e.eventDetails}
696
+ style="top: ${this._cardTop}px; left: ${this._cardLeft}px;"
697
+ @keydown=${this._handleKeydown}
698
+ >
699
+ <div class="header">
700
+ <span class="title"
701
+ >${this.eventDetails.heading||e.noTitle}</span
702
+ >
703
+ <button
704
+ type="button"
705
+ class="close-btn"
706
+ @click=${this._handleClose}
707
+ title=${e.close}
708
+ aria-label=${e.close}
709
+ >
710
+ &times;
711
+ </button>
712
+ </div>
713
+ <div class="meta">
714
+ ${this.eventDetails.displayTime||e.noTime}
715
+ </div>
716
+ ${this.eventDetails.date?i`<div class="meta">
717
+ ${this._formatDate(this.eventDetails.date)}
718
+ </div>`:o}
719
+ ${a?i`<div class="notes">${this.eventDetails.content}</div>`:o}
720
+ <div class="actions">
721
+ <button
722
+ type="button"
723
+ class="export-btn"
724
+ @click=${this._handleExport}
725
+ title=${e.exportAsICS}
726
+ >
727
+ ${e.exportAsICS}
728
+ </button>
729
+ </div>
730
+ </div>
731
+ `}};aa.styles=n`
732
+ :host {
733
+ position: absolute;
734
+ inset: 0;
735
+ z-index: 10000;
736
+ pointer-events: none;
737
+ display: none;
738
+ }
739
+ :host([open]) {
740
+ display: block;
741
+ }
742
+ .card {
743
+ position: absolute;
744
+ pointer-events: auto;
745
+ background: var(--background-color);
746
+ border-radius: var(--border-radius-md);
747
+ box-shadow: var(--shadow-lg);
748
+ border: 1px solid var(--separator-light);
749
+ font-family: var(--system-ui);
750
+ min-width: 16em;
751
+ max-width: 22em;
752
+ padding: 0.875em 1em;
753
+ opacity: 0;
754
+ transform: scale(0.95);
755
+ transition:
756
+ opacity 0.15s ease,
757
+ transform 0.15s ease;
758
+ }
759
+ .card.visible {
760
+ opacity: 1;
761
+ transform: scale(1);
762
+ }
763
+ .header {
764
+ display: flex;
765
+ align-items: flex-start;
766
+ gap: 0.5em;
767
+ margin-bottom: 0.25em;
768
+ }
769
+ .title {
770
+ flex: 1;
771
+ font-size: 1em;
772
+ font-weight: 600;
773
+ color: var(--separator-dark);
774
+ line-height: 1.3;
775
+ word-break: break-word;
776
+ }
777
+ .close-btn {
778
+ flex-shrink: 0;
779
+ background: none;
780
+ border: none;
781
+ cursor: pointer;
782
+ font-size: 1.125em;
783
+ line-height: 1;
784
+ padding: 0.15em 0.25em;
785
+ margin: -0.15em -0.25em 0 0;
786
+ border-radius: var(--border-radius-sm);
787
+ color: var(--header-text-color);
788
+ transition: background-color 0.15s;
789
+ }
790
+ .close-btn:hover {
791
+ background-color: var(--separator-light);
792
+ }
793
+ .meta {
794
+ font-size: 0.8125em;
795
+ color: var(--header-text-color);
796
+ line-height: 1.5;
797
+ }
798
+ .notes {
799
+ margin-top: 0.5em;
800
+ padding-top: 0.625em;
801
+ border-top: 1px solid var(--separator-light);
802
+ font-size: 0.8125em;
803
+ color: var(--separator-dark);
804
+ word-break: break-word;
805
+ line-height: 1.4;
806
+ }
807
+ .actions {
808
+ padding-top: 0.625em;
809
+ }
810
+ .export-btn {
811
+ background: none;
812
+ border: none;
813
+ cursor: pointer;
814
+ font-family: var(--system-ui);
815
+ font-size: 0.8125em;
816
+ font-weight: 500;
817
+ color: var(--primary-color);
818
+ padding: 0;
819
+ transition: opacity 0.15s;
820
+ }
821
+ .export-btn:hover {
822
+ opacity: 0.7;
823
+ }
824
+ `,ta([s({type:Boolean,reflect:!0})],aa.prototype,"open",2),ta([s({type:Object})],aa.prototype,"eventDetails",2),ta([s({attribute:!1})],aa.prototype,"anchorRect",2),ta([s({type:String})],aa.prototype,"locale",2),ta([l()],aa.prototype,"_cardTop",2),ta([l()],aa.prototype,"_cardLeft",2),ta([l()],aa.prototype,"_positioned",2),aa=ta([d("lms-menu")],aa);class na{constructor({date:e,direction:t}){e&&(this.date=e),this._direction=t}set date(e){const t=u.fromObject(e);if(!t.isValid)throw new Error("date couldn't be converted to DateTime object");this._date=t}set direction(e){this._direction=e}_toCalendarDate(e){return{day:e.day,month:e.month,year:e.year}}getDateByDayInDirection(){if(!this._date||!this._date.isValid)throw new Error("date is not set or invalid");if(!this._direction)throw new Error("direction is not set");const e=this._date.plus({days:"next"===this._direction?1:-1});if(!e.isValid)throw new Error("generated date is invalid");return this._date=e,this._toCalendarDate(e)}getDateByMonthInDirection(){if(!this._date||!this._date.isValid)throw new Error("date is not set");if(!this._direction)throw new Error("direction is not set");const e=this._date.plus({months:"next"===this._direction?1:-1});if(!e.isValid)throw new Error("generated date is invalid");return this._date=e,this._toCalendarDate(e)}}var ra=Object.defineProperty,ia=Object.getOwnPropertyDescriptor,oa=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?ia(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&ra(t,a,i),i};let sa=class extends r{constructor(){super(...arguments),this.currentDate=/* @__PURE__ */new Date,this.activeDate={day:this.currentDate.getDate(),month:this.currentDate.getMonth()+1,year:this.currentDate.getFullYear()},this.firstDayOfWeek=1,this.locale="en"}connectedCallback(){super.connectedCallback(),this.addEventListener("open-menu",e=>{const t=e;if(e.target!==this){e.stopPropagation();const a=new CustomEvent("open-menu",{detail:t.detail,bubbles:!0,composed:!0});this.dispatchEvent(a)}}),this._setupScrollDetection()}_setupScrollDetection(){let e=null;this.updateComplete.then(()=>{const t=this.shadowRoot?.querySelectorAll(".day");t?.forEach(t=>{const a=t;a.addEventListener("scroll",()=>(t=>{e||(e=requestAnimationFrame(()=>{t.scrollTop>5?t.classList.add("scrolled"):t.classList.remove("scrolled"),e=null}))})(a),{passive:!0})})})}_isCurrentDate(e){return new Date(e).toDateString()===this.currentDate.toDateString()}_renderIndicator({year:e,month:t,day:a}){const n=this._isCurrentDate(`${e}/${t}/${a}`);return i` <div
825
+ class="indicator ${p({current:n})}"
826
+ >
827
+ ${1===a?pe(a,t,e,this.locale):a}
828
+ </div>`}render(){return i`
829
+ <div class="month">
830
+ ${this._getCalendarArray()?.map(({year:e,month:t,day:a})=>i`<div
831
+ class="day"
832
+ data-date="${e}-${t}-${a}"
833
+ @click=${this._dispatchExpand}
834
+ @keydown=${this._handleKeydown}
835
+ tabindex="0"
836
+ >
837
+ ${this._renderIndicator({year:e,month:t,day:a})}
838
+ <slot name="${e}-${t}-${a}"></slot>
839
+ </div>`)}
840
+ </div>
841
+ `}_dispatchExpand(e){const t=e.target;if(!(t instanceof HTMLElement))return;if(t.closest("lms-calendar-entry"))return;const{date:a}=t.dataset;if(!a)return;const[n,r,i]=a.split("-").map(e=>parseInt(e,10)),o=new CustomEvent("expand",{detail:{date:{day:i,month:r,year:n}},bubbles:!0,composed:!0});this.dispatchEvent(o)}_handleKeydown(e){const t=e.key;"Space"!==t&&"Enter"!==t||this._dispatchExpand(e)}_getDaysInMonth(e){return oe(e).with({year:ne.number,month:ne.number,day:ne.number},({year:e,month:t})=>{const a=new Date(e,t,0).getDate();return a>0?a:0}).otherwise(()=>0)}_getOffsetOfFirstDayInMonth(e){return De(e,this.firstDayOfWeek)}_getDatesInMonthAsArray(e,t){return oe(this._getDaysInMonth(e)).with(0,()=>[]).otherwise(a=>Array.from(Array(a).keys(),(t,a)=>({year:e.year,month:e.month,day:a+1})).slice(...t||[0]))}_getCalendarArray(){if(!this.activeDate)return[];const e=new na({date:this.activeDate});try{e.direction="previous";const t=this._getOffsetOfFirstDayInMonth(this.activeDate),a=t>0?this._getDatesInMonthAsArray(e.getDateByMonthInDirection(),[-t]):[],n=this._getDatesInMonthAsArray(this.activeDate,[]);e.date=this.activeDate,e.direction="next";const r=42-(a.length+n.length),i=r>0?this._getDatesInMonthAsArray(e.getDateByMonthInDirection(),[0,r]):[];return a.concat(n,i)}catch(t){return console.error("Error generating calendar array:",t),[]}}};sa.styles=n`
842
+ :host {
843
+ display: block;
844
+ flex: 1;
845
+ min-height: 0;
846
+ }
847
+
848
+ .month {
849
+ height: 100%;
850
+ display: grid;
851
+ grid-template-columns: repeat(7, 1fr);
852
+ border-top: 1px solid var(--separator-light);
853
+ }
854
+
855
+ .month > div {
856
+ border-bottom: 1px solid var(--separator-light);
857
+ border-right: 1px solid var(--separator-light);
858
+ }
859
+
860
+ .month > div:nth-child(7n + 7) {
861
+ border-right: none;
862
+ }
863
+
864
+ .month > div:nth-last-child(-n + 7) {
865
+ border-bottom: none;
866
+ }
867
+
868
+ .day {
869
+ width: 100%;
870
+ position: relative;
871
+ display: flex;
872
+ flex-direction: column;
873
+ overflow-x: hidden;
874
+ overflow-y: auto;
875
+ gap: var(--month-day-gap, 1px);
876
+ min-width: 0;
877
+ /* Let Blink skip layout/paint for off-screen day cells */
878
+ content-visibility: auto;
879
+ contain-intrinsic-size: auto 6em;
880
+ }
881
+
882
+ /* Ensure consistent multi-day event layering */
883
+ ::slotted(lms-calendar-entry) {
884
+ position: relative;
885
+ margin-left: 1em;
886
+ width: calc(100% - 1em);
887
+ }
888
+
889
+ .indicator.current {
890
+ color: var(--indicator-color, var(--primary-color));
891
+ font-weight: var(--indicator-font-weight, bold);
892
+ }
893
+
894
+ .indicator {
895
+ position: sticky;
896
+ top: 0.25em;
897
+ left: 0.25em;
898
+ z-index: 500;
899
+ background: transparent;
900
+ backdrop-filter: var(--indicator-backdrop-filter, blur(10px));
901
+ -webkit-backdrop-filter: var(--indicator-backdrop-filter, blur(10px));
902
+ text-align: left;
903
+ min-height: 2em;
904
+ line-height: 2em;
905
+ margin: 0.25em;
906
+ border-radius: 1em;
907
+ align-self: flex-start;
908
+ transition: opacity 0.2s ease-in-out;
909
+ opacity: 1;
910
+ padding: 0 0.25em;
911
+ white-space: nowrap;
912
+ }
913
+
914
+ .day.scrolled .indicator {
915
+ opacity: 0;
916
+ }
917
+ `,oa([s({attribute:!1})],sa.prototype,"activeDate",2),oa([s({type:Number})],sa.prototype,"firstDayOfWeek",2),oa([s({type:String})],sa.prototype,"locale",2),sa=oa([d("lms-calendar-month")],sa);var da=Object.defineProperty,la=Object.getOwnPropertyDescriptor,ca=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?la(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&da(t,a,i),i};let ha=class extends r{constructor(){super(...arguments),this.activeDate={day:/* @__PURE__ */(new Date).getDate(),month:/* @__PURE__ */(new Date).getMonth()+1,year:/* @__PURE__ */(new Date).getFullYear()},this.allDayRowCount=0,this.firstDayOfWeek=1,this.locale="en",this.visibleStartIndex=0,this.visibleLength=7}connectedCallback(){super.connectedCallback()}_getWeekDates(){return we(this.activeDate,this.firstDayOfWeek)}_getDatesToRender(){return this.visibleDates??this._getWeekDates()}_getVisibleWeekdayOrder(){const e=ke(this.firstDayOfWeek);return this.visibleDates&&this.visibleLength<7?e.slice(this.visibleStartIndex,this.visibleStartIndex+this.visibleLength):e}_isCurrentDate(e){const t=/* @__PURE__ */new Date;return e.day===t.getDate()&&e.month===t.getMonth()+1&&e.year===t.getFullYear()}get _isCondensed(){return void 0!==this.visibleDates&&this.visibleLength<7}render(){const e=this._getDatesToRender(),t=this._getVisibleWeekdayOrder(),a=this.allDayRowCount>0,n=a?Math.max(2.5,2*this.allDayRowCount)+1:0,r=a?`calc(var(--main-content-height) - ${n}em)`:"var(--main-content-height)",s=this._isCondensed&&this.visibleStartIndex>0,d=this._isCondensed&&this.visibleStartIndex+this.visibleLength<7;return i`
918
+ <div class="week-container">
919
+ <div class="week-header">
920
+ <div class="time-header"></div>
921
+ ${e.map((e,a)=>{const n=Re(this.locale);return i`
922
+ <div
923
+ class="day-label ${p({current:this._isCurrentDate(e)})}"
924
+ tabindex="0"
925
+ role="button"
926
+ aria-label="${n.switchToDayView} ${me(t[a],this.locale)}, ${e.day}"
927
+ @click=${()=>this._handleDayLabelClick(e)}
928
+ @keydown=${t=>this._handleDayLabelKeydown(t,e)}
929
+ >
930
+ <span class="day-name">${me(t[a],this.locale)}</span>
931
+ <span class="day-number">${e.day}</span>
932
+ </div>
933
+ `})}
934
+ </div>
935
+
936
+ <!-- Peek indicators for condensed view -->
937
+ ${this._isCondensed?(()=>{const e=Re(this.locale);return i`
938
+ <div class="peek-indicators">
939
+ <span
940
+ class="peek-indicator ${p({"peek-indicator--hidden":!s})}"
941
+ role="button"
942
+ tabindex=${s?"0":"-1"}
943
+ aria-label="${e.showEarlierDays}"
944
+ @click=${()=>this._handlePeekNavigate("previous")}
945
+ @keydown=${e=>this._handlePeekKeydown(e,"previous")}
946
+ >\u2039 ${e.more}</span>
947
+ <span
948
+ class="peek-indicator ${p({"peek-indicator--hidden":!d})}"
949
+ role="button"
950
+ tabindex=${d?"0":"-1"}
951
+ aria-label="${e.showLaterDays}"
952
+ @click=${()=>this._handlePeekNavigate("next")}
953
+ @keydown=${e=>this._handlePeekKeydown(e,"next")}
954
+ >${e.more} \u203A</span>
955
+ </div>
956
+ `})():o}
957
+
958
+ <!-- All-day events section -->
959
+ ${a?i`
960
+ <div class="all-day-wrapper">
961
+ <div class="all-day-container">
962
+ <div class="all-day-time-header">${Re(this.locale).allDay}</div>
963
+ ${e.map(e=>i`
964
+ <div class="all-day-day-column">
965
+ <slot
966
+ name="all-day-${e.year}-${e.month}-${e.day}"
967
+ ></slot>
968
+ </div>
969
+ `)}
970
+ </div>
971
+ </div>
972
+ `:o}
973
+ <div class="week-scroll" style="height: ${r}">
974
+ <div class="time-labels">
975
+ ${Array.from({length:25}).map((e,t)=>i`
976
+ <div
977
+ class="hour-label"
978
+ style="top: calc(${t} * var(--hour-height))"
979
+ >
980
+ ${this._renderIndicatorValue(t)}
981
+ </div>
982
+ `)}
983
+ </div>
984
+ ${e.map(e=>i`
985
+ <div class="day-column">
986
+ <slot
987
+ name="timed-${e.year}-${e.month}-${e.day}"
988
+ ></slot>
989
+ </div>
990
+ `)}
991
+ </div>
992
+ </div>
993
+ `}_renderIndicatorValue(e){return ge(e,0,this.locale)}_handleDayLabelClick(e){const t=new CustomEvent("expand",{detail:{date:e},bubbles:!0,composed:!0});this.dispatchEvent(t)}_handleDayLabelKeydown(e,t){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._handleDayLabelClick(t))}_handlePeekNavigate(e){const t=this._getWeekDates();let a;"previous"===e&&this.visibleStartIndex>0?a=t[this.visibleStartIndex-1]:"next"===e&&this.visibleStartIndex+this.visibleLength<7&&(a=t[this.visibleStartIndex+this.visibleLength]),a&&this.dispatchEvent(new CustomEvent("peek-navigate",{detail:{date:a,direction:e},bubbles:!0,composed:!0}))}_handlePeekKeydown(e,t){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this._handlePeekNavigate(t))}};ha.styles=n`
994
+ :host {
995
+ display: block;
996
+ height: 100%;
997
+ width: 100%;
998
+ }
999
+
1000
+ .week-container {
1001
+ display: flex;
1002
+ flex-direction: column;
1003
+ height: var(--view-container-height);
1004
+ overflow: hidden;
1005
+ position: relative;
1006
+ }
1007
+
1008
+ .week-header {
1009
+ display: grid;
1010
+ grid-template-columns: var(--calendar-grid-columns-week);
1011
+ height: var(--day-header-height, 3.5em);
1012
+ flex-shrink: 0;
1013
+ border-bottom: var(--separator-border);
1014
+ gap: var(--day-gap, 1px);
1015
+ padding: var(--day-padding, 0.5em);
1016
+ position: relative;
1017
+ }
1018
+
1019
+ .time-header {
1020
+ border-right: 1px solid var(--separator-light);
1021
+ }
1022
+
1023
+ .day-label {
1024
+ text-align: center;
1025
+ padding: var(--day-padding, 0.5em);
1026
+ font-weight: var(--day-label-font-weight);
1027
+ border-right: var(--separator-border);
1028
+ display: flex;
1029
+ flex-direction: column;
1030
+ justify-content: center;
1031
+ align-items: center;
1032
+ gap: var(--day-label-gap, 0.15em);
1033
+ cursor: pointer;
1034
+ transition: background-color 0.2s ease;
1035
+ }
1036
+
1037
+ .day-name {
1038
+ font-size: var(--day-label-name-font-size, 0.75em);
1039
+ text-transform: uppercase;
1040
+ letter-spacing: 0.03em;
1041
+ opacity: 0.7;
1042
+ }
1043
+
1044
+ .day-number {
1045
+ font-size: var(--day-label-number-font-size, 1.125em);
1046
+ font-weight: var(--day-label-number-font-weight, 600);
1047
+ line-height: 1;
1048
+ }
1049
+
1050
+ .day-label:hover {
1051
+ background-color: var(--separator-light);
1052
+ }
1053
+
1054
+ .day-label:focus {
1055
+ outline: 2px solid var(--entry-focus-color, var(--primary-color));
1056
+ outline-offset: 2px;
1057
+ background-color: var(--separator-light);
1058
+ }
1059
+
1060
+ .day-label:last-child {
1061
+ border-right: none;
1062
+ }
1063
+
1064
+ .day-label.current {
1065
+ color: var(--indicator-color, var(--primary-color));
1066
+ font-weight: var(--indicator-font-weight, bold);
1067
+ }
1068
+
1069
+ .week-scroll {
1070
+ flex: 1;
1071
+ overflow-y: auto;
1072
+ display: grid;
1073
+ grid-template-columns: var(--calendar-grid-columns-week);
1074
+ grid-template-rows: 1fr;
1075
+ gap: var(--day-gap, 1px);
1076
+ padding: var(--day-padding, 0.5em);
1077
+ min-height: 0;
1078
+ position: relative;
1079
+ contain: content;
1080
+ }
1081
+
1082
+ .time-labels {
1083
+ grid-column: 1;
1084
+ position: relative;
1085
+ height: var(--day-total-height);
1086
+ border-right: var(--sidebar-border, 1px solid var(--separator-light));
1087
+ background: var(--background-color, white);
1088
+ }
1089
+
1090
+ .hour-label {
1091
+ position: absolute;
1092
+ left: 0;
1093
+ right: 0;
1094
+ text-align: var(--hour-text-align, center);
1095
+ font-size: var(--hour-indicator-font-size);
1096
+ color: var(--hour-indicator-color);
1097
+ transform: translateY(var(--indicator-top, -0.55em));
1098
+ pointer-events: none;
1099
+ }
1100
+
1101
+ .day-column {
1102
+ position: relative;
1103
+ height: var(--day-total-height);
1104
+ border-right: var(--sidebar-border, 1px solid var(--separator-light));
1105
+ background-image: repeating-linear-gradient(
1106
+ to bottom,
1107
+ transparent 0,
1108
+ transparent calc(var(--hour-height) - 1px),
1109
+ var(--separator-light) calc(var(--hour-height) - 1px),
1110
+ var(--separator-light) var(--hour-height)
1111
+ );
1112
+ background-size: 100% var(--hour-height);
1113
+ }
1114
+
1115
+ .day-column:last-child {
1116
+ border-right: none;
1117
+ }
1118
+
1119
+ /* All-day events section */
1120
+ .all-day-wrapper {
1121
+ display: grid;
1122
+ grid-template-rows: 1fr;
1123
+ border-bottom: var(--separator-border);
1124
+ background: var(--background-color);
1125
+ z-index: 2;
1126
+ position: relative;
1127
+ /* Isolate repaint from the hour-grid scroller beneath */
1128
+ contain: paint;
1129
+ }
1130
+
1131
+ .all-day-container {
1132
+ display: grid;
1133
+ grid-template-columns: var(--calendar-grid-columns-week);
1134
+ gap: var(--day-gap, 1px);
1135
+ padding: var(--day-padding, 0.5em);
1136
+ min-height: 0;
1137
+ overflow: hidden;
1138
+ }
1139
+
1140
+ .all-day-day-column {
1141
+ position: relative;
1142
+ min-height: 2em;
1143
+ padding: 0.25em 0;
1144
+ overflow: hidden;
1145
+ }
1146
+
1147
+ /* Stack all-day events vertically with consistent positioning */
1148
+ .all-day-container .all-day-day-column ::slotted(lms-calendar-entry) {
1149
+ position: relative !important;
1150
+ display: block !important;
1151
+ margin-bottom: 0.25em !important;
1152
+ z-index: var(--entry-z-index, 1) !important;
1153
+ }
1154
+
1155
+ /* Enhanced multi-day spanning styles with consistent ordering */
1156
+ .all-day-container .all-day-day-column ::slotted(lms-calendar-entry.first-day) {
1157
+ border-top-right-radius: 0 !important;
1158
+ border-bottom-right-radius: 0 !important;
1159
+ border-top-left-radius: var(--entry-border-radius) !important;
1160
+ border-bottom-left-radius: var(--entry-border-radius) !important;
1161
+ position: relative !important;
1162
+ }
1163
+
1164
+ .all-day-container .all-day-day-column ::slotted(lms-calendar-entry.middle-day) {
1165
+ border-top-left-radius: 0 !important;
1166
+ border-top-right-radius: 0 !important;
1167
+ border-bottom-left-radius: 0 !important;
1168
+ border-bottom-right-radius: 0 !important;
1169
+ position: relative !important;
1170
+ border-left: 3px solid rgba(255, 255, 255, 0.4) !important;
1171
+ margin-left: -2px !important;
1172
+ }
1173
+
1174
+ .all-day-container .all-day-day-column ::slotted(lms-calendar-entry.last-day) {
1175
+ border-top-left-radius: 0 !important;
1176
+ border-bottom-left-radius: 0 !important;
1177
+ border-top-right-radius: var(--entry-border-radius) !important;
1178
+ border-bottom-right-radius: var(--entry-border-radius) !important;
1179
+ position: relative !important;
1180
+ border-left: 3px solid rgba(255, 255, 255, 0.4) !important;
1181
+ margin-left: -2px !important;
1182
+ }
1183
+
1184
+ .all-day-container .all-day-day-column ::slotted(lms-calendar-entry.single-day) {
1185
+ border-radius: var(--entry-border-radius) !important;
1186
+ position: relative !important;
1187
+ }
1188
+
1189
+ .all-day-time-header {
1190
+ display: flex;
1191
+ align-items: center;
1192
+ justify-content: center;
1193
+ font-size: var(--hour-indicator-font-size);
1194
+ color: var(--hour-indicator-color);
1195
+ font-weight: var(--day-label-font-weight);
1196
+ border-right: var(--separator-border);
1197
+ }
1198
+
1199
+ /* Peek indicators for condensed view */
1200
+ .peek-indicators {
1201
+ display: flex;
1202
+ justify-content: space-between;
1203
+ align-items: center;
1204
+ padding: 0 0.25em;
1205
+ height: 1.5em;
1206
+ flex-shrink: 0;
1207
+ border-bottom: var(--separator-border);
1208
+ }
1209
+
1210
+ .peek-indicator {
1211
+ display: flex;
1212
+ align-items: center;
1213
+ gap: 0.25em;
1214
+ color: var(--hour-indicator-color, rgba(0, 0, 0, 0.5));
1215
+ font-size: 0.75em;
1216
+ cursor: pointer;
1217
+ user-select: none;
1218
+ padding: 0.1em 0.35em;
1219
+ border-radius: var(--border-radius-sm, 4px);
1220
+ transition:
1221
+ background-color 0.15s ease,
1222
+ color 0.15s ease;
1223
+ }
1224
+
1225
+ .peek-indicator:hover {
1226
+ background-color: var(--separator-light, rgba(0, 0, 0, 0.06));
1227
+ color: var(--separator-dark, rgba(0, 0, 0, 0.7));
1228
+ }
1229
+
1230
+ .peek-indicator:active {
1231
+ background-color: var(--separator-mid, rgba(0, 0, 0, 0.12));
1232
+ }
1233
+
1234
+ .peek-indicator--hidden {
1235
+ visibility: hidden;
1236
+ pointer-events: none;
1237
+ }
1238
+ `,ca([s({attribute:!1})],ha.prototype,"activeDate",2),ca([s({type:Number})],ha.prototype,"allDayRowCount",2),ca([s({type:Number})],ha.prototype,"firstDayOfWeek",2),ca([s({type:String})],ha.prototype,"locale",2),ca([s({attribute:!1})],ha.prototype,"visibleDates",2),ca([s({type:Number})],ha.prototype,"visibleStartIndex",2),ca([s({type:Number})],ha.prototype,"visibleLength",2),ha=ca([d("lms-calendar-week")],ha);var ua=Object.defineProperty,fa=Object.getOwnPropertyDescriptor,ya=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?fa(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&ua(t,a,i),i};let pa=class extends r{constructor(){super(...arguments),this.activeDate=(()=>{const e=/* @__PURE__ */new Date;return{day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()}})(),this.firstDayOfWeek=1,this.locale="en",this.entrySumByDay={},this.drillTarget="month",this.densityMode="dot"}render(){const e=this.activeDate.year,t=/* @__PURE__ */new Date,a=t.getDate(),n=t.getMonth()+1,r=t.getFullYear(),o=ke(this.firstDayOfWeek);return i`
1239
+ <div class="year-grid" role="grid" aria-label="${Re(this.locale).year} ${e}">
1240
+ ${Array.from({length:12},(t,i)=>{const s=i+1;return this._renderMiniMonth(e,s,a,n,r,o)})}
1241
+ </div>
1242
+ `}_renderMiniMonth(e,t,a,n,r,o){const s=new Date(e,t,0).getDate(),d=De({year:e,month:t},this.firstDayOfWeek),l=Re(this.locale),c=[];let h=Array.from({length:d},()=>null);for(let i=1;i<=s;i++)h.push(i),7===h.length&&(c.push(h),h=[]);if(h.length>0){for(;h.length<7;)h.push(null);c.push(h)}return i`
1243
+ <div class="mini-month">
1244
+ <button
1245
+ type="button"
1246
+ class="month-label"
1247
+ @click=${()=>this._handleMonthClick(e,t)}
1248
+ >
1249
+ ${ye(t,this.locale)}
1250
+ </button>
1251
+ <div class="weekday-header">
1252
+ <span></span>
1253
+ ${o.map(e=>i`<span>${me(e,this.locale).charAt(0)}</span>`)}
1254
+ </div>
1255
+ <div class="day-grid">
1256
+ ${c.map(o=>{const s=o.find(e=>null!==e),d=s?u.fromObject({year:e,month:t,day:s}).weekNumber:null;return i`
1257
+ ${null!==d?i`<button
1258
+ type="button"
1259
+ class="cw-label"
1260
+ aria-label="${l.calendarWeek} ${d}"
1261
+ @click=${()=>this._handleWeekClick(e,t,s)}
1262
+ >${d}</button>`:i`
1263
+ <span class="empty-cell"></span>
1264
+ `}
1265
+ ${o.map(o=>null!==o?this._renderDayCell(e,t,o,o===a&&t===n&&e===r,o===this.activeDate.day&&t===this.activeDate.month&&e===this.activeDate.year,this.entrySumByDay[`${e}-${t}-${o}`]??0):i`
1266
+ <span class="empty-cell"></span>
1267
+ `)}
1268
+ `})}
1269
+ </div>
1270
+ </div>
1271
+ `}_renderDayCell(e,t,a,n,r,s){const d=["day-cell"];n&&d.push("current"),r&&!n&&d.push("selected");let l="";if("dot"===this.densityMode&&s>0)d.push("has-events");else if("heatmap"===this.densityMode&&s>0){l=`${s<=2?1:s<=5?2:s<=9?3:4}`}return i`
1272
+ <button
1273
+ type="button"
1274
+ class=${d.join(" ")}
1275
+ data-density=${l||o}
1276
+ data-date="${e}-${t}-${a}"
1277
+ @click=${()=>this._handleDayClick(e,t,a)}
1278
+ aria-label="${a} ${ye(t,this.locale)} ${e}${s>0?`, ${s} ${Re(this.locale).events}`:""}"
1279
+ >
1280
+ ${a}
1281
+ ${"count"===this.densityMode&&s>0?i`<span class="event-count">${s}</span>`:o}
1282
+ </button>
1283
+ `}_handleDayClick(e,t,a){this.dispatchEvent(new CustomEvent("expand",{detail:{date:{year:e,month:t,day:a},drillTarget:this.drillTarget},bubbles:!0,composed:!0}))}_handleWeekClick(e,t,a){this.dispatchEvent(new CustomEvent("expand",{detail:{date:{year:e,month:t,day:a},drillTarget:"week"},bubbles:!0,composed:!0}))}_handleMonthClick(e,t){this.dispatchEvent(new CustomEvent("expand",{detail:{date:{year:e,month:t,day:1},drillTarget:"month"},bubbles:!0,composed:!0}))}};function ma(e){let t=0,a=0,n=0;if(!e||!e.trim())return["rgb(255,255,255)","rgb(0,0,0)"];const r=(e.startsWith("#")?e:`#${e}`).replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,a,n)=>`#${t}${t}${a}${a}${n}${n}`).substring(1).match(/.{2}/g);if(!r||3!==r.length)return["rgb(255,255,255)","rgb(0,0,0)"];try{if([t,a,n]=r.map(e=>parseInt(e,16)),isNaN(t)||isNaN(a)||isNaN(n))return["rgb(255,255,255)","rgb(0,0,0)"]}catch{return["rgb(255,255,255)","rgb(0,0,0)"]}const i=(299*t+587*a+114*n)/1e3;return[`rgb(${t},${a},${n})`,Math.abs(i-255)>Math.abs(i-0)?"rgb(255, 255, 255)":"rgb(0, 0, 0)"]}pa.styles=n`
1284
+ :host {
1285
+ display: block;
1286
+ contain: content;
1287
+ overflow-y: auto;
1288
+ container-type: inline-size;
1289
+ }
1290
+
1291
+ .year-grid {
1292
+ display: grid;
1293
+ grid-template-columns: repeat(var(--year-grid-columns, 3), 1fr);
1294
+ gap: 1.25em 1em;
1295
+ padding: 1em;
1296
+ }
1297
+
1298
+ /* Container queries — respond to component width, not viewport */
1299
+ @container (max-width: 400px) {
1300
+ .year-grid {
1301
+ grid-template-columns: repeat(var(--year-grid-columns-mobile, 1), 1fr);
1302
+ gap: 1em 0.75em;
1303
+ padding: 0.75em;
1304
+ }
1305
+ }
1306
+
1307
+ @container (min-width: 401px) and (max-width: 700px) {
1308
+ .year-grid {
1309
+ grid-template-columns: repeat(var(--year-grid-columns-tablet, 2), 1fr);
1310
+ }
1311
+ }
1312
+
1313
+ .mini-month {
1314
+ display: flex;
1315
+ flex-direction: column;
1316
+ gap: 0.15em;
1317
+ min-width: 0; /* prevent grid blowout */
1318
+ }
1319
+
1320
+ .month-label {
1321
+ font-size: var(--year-month-label-font-size, 0.875em);
1322
+ font-weight: 600;
1323
+ color: var(--separator-dark, rgba(0, 0, 0, 0.7));
1324
+ cursor: pointer;
1325
+ padding: 0.3em 0;
1326
+ border: none;
1327
+ background: none;
1328
+ text-align: left;
1329
+ border-radius: 0;
1330
+ font-family: inherit;
1331
+ border-bottom: 1px solid var(--separator-light, rgba(0, 0, 0, 0.1));
1332
+ margin-bottom: 0.15em;
1333
+ }
1334
+
1335
+ .month-label:hover {
1336
+ color: var(--primary-color, dodgerblue);
1337
+ }
1338
+
1339
+ .weekday-header {
1340
+ display: grid;
1341
+ grid-template-columns: var(--year-cw-width, 1.8em) repeat(7, 1fr);
1342
+ text-align: center;
1343
+ }
1344
+
1345
+ .weekday-header span {
1346
+ font-size: 0.65em;
1347
+ color: var(--header-text-color, rgba(0, 0, 0, 0.45));
1348
+ padding: 0.2em 0;
1349
+ font-weight: 500;
1350
+ overflow: hidden;
1351
+ }
1352
+
1353
+ .day-grid {
1354
+ display: grid;
1355
+ grid-template-columns: var(--year-cw-width, 1.8em) repeat(7, 1fr);
1356
+ grid-auto-rows: calc(var(--year-cell-size, 1.8em) + 0.6em);
1357
+ justify-items: center;
1358
+ align-items: start;
1359
+ }
1360
+
1361
+ .cw-label {
1362
+ display: flex;
1363
+ align-items: center;
1364
+ justify-content: center;
1365
+ font-size: var(--year-cw-font-size, 0.55em);
1366
+ color: var(--year-cw-color, var(--header-text-color, rgba(0, 0, 0, 0.45)));
1367
+ cursor: pointer;
1368
+ border: none;
1369
+ background: none;
1370
+ border-radius: var(--border-radius-sm, 4px);
1371
+ font-family: inherit;
1372
+ padding: 0;
1373
+ line-height: 1;
1374
+ }
1375
+
1376
+ .cw-label:hover {
1377
+ color: var(--primary-color, dodgerblue);
1378
+ background: var(--separator-light, rgba(0, 0, 0, 0.06));
1379
+ }
1380
+
1381
+ .day-cell {
1382
+ display: flex;
1383
+ flex-direction: column;
1384
+ align-items: center;
1385
+ justify-content: center;
1386
+ font-size: var(--year-day-font-size, 0.7em);
1387
+ border: none;
1388
+ background: none;
1389
+ border-radius: 50%;
1390
+ cursor: pointer;
1391
+ position: relative;
1392
+ width: var(--year-cell-size, 1.8em);
1393
+ height: var(--year-cell-size, 1.8em);
1394
+ padding: 0;
1395
+ color: var(--separator-dark, rgba(0, 0, 0, 0.7));
1396
+ font-family: inherit;
1397
+ line-height: 1;
1398
+ overflow: visible;
1399
+ }
1400
+
1401
+ .day-cell:hover {
1402
+ background: var(--separator-light, rgba(0, 0, 0, 0.08));
1403
+ }
1404
+
1405
+ .day-cell.current {
1406
+ background: var(--primary-color, dodgerblue);
1407
+ color: white;
1408
+ font-weight: bold;
1409
+ }
1410
+
1411
+ .day-cell.current:hover {
1412
+ opacity: 0.85;
1413
+ }
1414
+
1415
+ .day-cell.selected {
1416
+ outline: 2px solid var(--primary-color, dodgerblue);
1417
+ outline-offset: -2px;
1418
+ }
1419
+
1420
+ /* ── Dot density mode ── */
1421
+ .day-cell.has-events::after {
1422
+ content: '';
1423
+ position: absolute;
1424
+ bottom: 1px;
1425
+ left: 50%;
1426
+ transform: translateX(-50%);
1427
+ width: 3px;
1428
+ height: 3px;
1429
+ border-radius: 50%;
1430
+ background: var(--year-dot-color, var(--indicator-color, var(--primary-color, dodgerblue)));
1431
+ }
1432
+
1433
+ .day-cell.current.has-events::after {
1434
+ background: rgba(255, 255, 255, 0.9);
1435
+ }
1436
+
1437
+ /* ── Heatmap density mode ── */
1438
+ .day-cell[data-density='1'] {
1439
+ background: var(--year-heatmap-1, rgba(30, 144, 255, 0.15));
1440
+ }
1441
+ .day-cell[data-density='2'] {
1442
+ background: var(--year-heatmap-2, rgba(30, 144, 255, 0.35));
1443
+ }
1444
+ .day-cell[data-density='3'] {
1445
+ background: var(--year-heatmap-3, rgba(30, 144, 255, 0.55));
1446
+ }
1447
+ .day-cell[data-density='4'] {
1448
+ background: var(--year-heatmap-4, rgba(30, 144, 255, 0.75));
1449
+ color: white;
1450
+ }
1451
+
1452
+ .day-cell.current[data-density] {
1453
+ background: var(--primary-color, dodgerblue);
1454
+ }
1455
+
1456
+ /* ── Count density mode ── */
1457
+ .event-count {
1458
+ position: absolute;
1459
+ bottom: -0.55em;
1460
+ left: 50%;
1461
+ transform: translateX(-50%);
1462
+ font-size: 0.55em;
1463
+ color: var(--header-text-color, rgba(0, 0, 0, 0.5));
1464
+ line-height: 1;
1465
+ }
1466
+
1467
+ .day-cell.current .event-count {
1468
+ color: rgba(255, 255, 255, 0.8);
1469
+ }
1470
+
1471
+ .empty-cell {
1472
+ /* Grid auto-rows handles height; no explicit size needed */
1473
+ }
1474
+ `,ya([s({type:Object})],pa.prototype,"activeDate",2),ya([s({type:Number})],pa.prototype,"firstDayOfWeek",2),ya([s({type:String})],pa.prototype,"locale",2),ya([s({type:Object})],pa.prototype,"entrySumByDay",2),ya([s({type:String})],pa.prototype,"drillTarget",2),ya([s({type:String})],pa.prototype,"densityMode",2),pa=ya([d("lms-calendar-year")],pa);class ba{constructor(e={}){this.config={minuteHeight:e.minuteHeight??1,eventMinHeight:e.eventMinHeight??20}}calculateLayout(e){const t=this.eventsToIntervals(e),a=this.calculateGrading(t);return{boxes:this.calculateBoxes(e,a)}}eventsToIntervals(e){return e.map(e=>({start:60*e.startTime.hour+e.startTime.minute,end:60*e.endTime.hour+e.endTime.minute}))}calculateGrading(e){const t=[];return this.findOverlapGroups(e).forEach((a,n)=>{if(1===a.length)t.push({index:a[0],depth:0,group:n});else{const r=a.map(t=>({...e[t],originalIndex:t})),i=r.reduce((e,t)=>t.end-t.start>e.end-e.start?t:e);let o=1;r.forEach(e=>{const a=e.originalIndex===i.originalIndex?0:o++;t.push({index:e.originalIndex,depth:a,group:n})})}}),t.sort((e,t)=>e.index-t.index),t}findOverlapGroups(e){const t=[],a=/* @__PURE__ */new Set;return e.forEach((n,r)=>{if(a.has(r))return;const i=[r];a.add(r);let o=!0;for(;o;)o=!1,e.forEach((t,n)=>{if(a.has(n))return;i.some(a=>this.intervalsOverlap(e[a],t))&&(i.push(n),a.add(n),o=!0)});t.push(i)}),t}intervalsOverlap(e,t){return e.start<t.end&&t.start<e.end}calculateBoxes(e,t){const a=/* @__PURE__ */new Map;return e.forEach((e,n)=>{const r=t[n]||{depth:0,group:n};a.has(r.group)||a.set(r.group,[]),a.get(r.group).push({event:e,index:n,grade:r})}),e.map((e,n)=>{const r=t[n]||{depth:0,group:n},i=60*e.startTime.hour+e.startTime.minute,o=60*e.endTime.hour+e.endTime.minute-i,s=a.get(r.group)||[],d=Math.max(...s.map(e=>e.grade.depth));let l,c;if(1===s.length)l=100,c=0;else{const e=100-65;0===r.depth?(c=0,l=100):(c=d>0?r.depth/d*e:0,l=100-c)}const h=100+r.depth;return{id:e.id,x:c,y:i*this.config.minuteHeight,width:l,height:Math.max(o*this.config.minuteHeight,this.config.eventMinHeight),depth:r.depth,group:r.group,opacity:0===r.depth?.95:Math.max(.85,.95-.05*r.depth),zIndex:h}})}}const ga=new class{constructor(){this._weekIndexCache=null}calculatePosition(e){const{viewMode:t,date:a,time:n,isAllDay:r}=e;switch(t){case"day":return this._calculateDayPosition(a,n,r);case"week":return this._calculateWeekPosition(a,e.activeDate,n,r,e.firstDayOfWeek,e.weekDates);case"month":return this._calculateMonthPosition(a);default:throw new Error(`Unsupported view mode: ${t}`)}}generatePositionCSS(e,t,a){if(e.useAbsolutePosition&&a){const e=60*a.start.hour+a.start.minute,n=60*a.end.hour+a.end.minute;return["position: absolute",`top: calc(${e} * var(--minute-height))`,`height: calc(${Math.max(n-e,20)} * var(--minute-height))`,`width: ${t.width}%`,`left: ${t.x}%`,`z-index: ${t.zIndex}`,`opacity: ${t.opacity}`,"margin-left: 0","grid-column: unset","grid-row: unset"].join("; ")}if(e.useDirectGrid)return`grid-column: ${e.gridColumn||2}; grid-row: ${e.gridRow||"1"}; --entry-width: ${t.width}%; --entry-margin-left: ${t.x}%; --entry-z-index: ${t.zIndex}; --entry-opacity: ${t.opacity};`;return`--start-slot: ${a?this._getGridSlotByTime(a):"1"}; --entry-width: ${t.width}%; --entry-margin-left: ${t.x}%; --entry-z-index: ${t.zIndex}; --entry-opacity: ${t.opacity};`}_calculateDayPosition(e,t,a){if(a)return{slotName:"all-day",useDirectGrid:!1};if(!t)throw new Error("Day view entries must have time information");return{slotName:"timed",useDirectGrid:!1,useAbsolutePosition:!0}}_calculateWeekPosition(e,t,a,n,r,i){const o=i?this.getIndexInDates(e,i):this.getWeekDayIndex(e,t,r??1),s=o+2;if(n)return{slotName:`all-day-${e.year}-${e.month}-${e.day}`,gridColumn:s,gridRow:"1 / 60",useDirectGrid:!1,isAllDay:!0,dayIndex:o};if(!a)throw new Error("Week view timed entries must have time information");return{slotName:`timed-${e.year}-${e.month}-${e.day}`,useDirectGrid:!1,useAbsolutePosition:!0,dayIndex:o}}_calculateMonthPosition(e){return{slotName:`${e.year}-${e.month}-${e.day}`,useDirectGrid:!1}}pxToTime(e,t){const a=parseFloat(getComputedStyle(t).getPropertyValue("--minute-height"))||.8,n=Math.round(e/a),r=Math.max(0,Math.min(n,1439));return{hour:Math.floor(r/60),minute:r%60}}getWeekDayIndex(e,t,a=1){const n=`${t.year}-${t.month}-${t.day}-${a}`;if(!this._weekIndexCache||this._weekIndexCache.key!==n){const e=we(t,a),r=/* @__PURE__ */new Map;e.forEach((e,t)=>r.set(`${e.year}-${e.month}-${e.day}`,t)),this._weekIndexCache={key:n,map:r}}return this._weekIndexCache.map.get(`${e.year}-${e.month}-${e.day}`)??0}getIndexInDates(e,t){const a=t.findIndex(t=>t.year===e.year&&t.month===e.month&&t.day===e.day);return a>=0?a:0}_getGridSlotByTime({start:e,end:t}){const a=60*e.hour+(e.minute+1),n=a+(60*t.hour+t.minute-a);return a===n?`${a}/${n+1}`:`${a}/${n}`}calculateAccessibility(e){const{viewMode:t,date:a,time:n,isAllDay:r,firstDayOfWeek:i}=e;let o=0;if("week"===t&&n&&!r){o=1e4+1e4*this.getWeekDayIndex(a,e.activeDate,i??1)+100*n.start.hour+n.start.minute}else if("day"===t&&n&&!r)o=60*n.start.hour+n.start.minute;else if(r)if("week"===t){o=1e3+this.getWeekDayIndex(a,e.activeDate,i??1)}else o=0;return{tabIndex:o,role:"button",ariaLabel:this._generateAriaLabel(e)}}_generateAriaLabel(e){const{date:t,time:a,isAllDay:n}=e;return`Calendar event on ${`${t.month}/${t.day}/${t.year}`}, ${n||!a?"All day":`${String(a.start.hour).padStart(2,"0")}:${String(a.start.minute).padStart(2,"0")} to ${String(a.end.hour).padStart(2,"0")}:${String(a.end.minute).padStart(2,"0")}`}. Press Enter or Space to open details.`}getPositionDescription(e){const t=this.calculatePosition(e);return t.useDirectGrid?`Direct grid: column ${t.gridColumn}, row ${t.gridRow}`:`Slot: "${t.slotName}"`}validatePosition(e){try{return this.calculatePosition(e),{valid:!0}}catch(t){return{valid:!1,error:t instanceof Error?t.message:"Unknown validation error"}}}};class va{constructor(e){this._viewMode="month",this._host=e,e.addController(this);const t=/* @__PURE__ */new Date;this._activeDate={day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()}}hostConnected(){}get viewMode(){return this._viewMode}get activeDate(){return this._activeDate}get expandedDate(){return"day"===this._viewMode?this._activeDate:void 0}setViewMode(e){this._viewMode=e,this._host.requestUpdate()}setActiveDate(e){this._activeDate=e,this._host.requestUpdate()}navigateNext(){const e=this._activeDate;if("month"===this._viewMode){const t=new Date(e.year,e.month,1);this.setActiveDate({day:1,month:t.getMonth()+1,year:t.getFullYear()})}else if("week"===this._viewMode){const t=new Date(e.year,e.month-1,e.day);t.setDate(t.getDate()+7),this.setActiveDate({day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()})}else if("day"===this._viewMode){const t=new Date(e.year,e.month-1,e.day+1);this.setActiveDate({day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()})}else if("year"===this._viewMode){const t=new Date(e.year+1,e.month-1,1),a=new Date(t.getFullYear(),e.month-1,e.day);a.getMonth()!==e.month-1&&a.setDate(0),this.setActiveDate({day:a.getDate(),month:a.getMonth()+1,year:a.getFullYear()})}}navigatePrevious(){const e=this._activeDate;if("month"===this._viewMode){const t=new Date(e.year,e.month-2,1);this.setActiveDate({day:1,month:t.getMonth()+1,year:t.getFullYear()})}else if("week"===this._viewMode){const t=new Date(e.year,e.month-1,e.day);t.setDate(t.getDate()-7),this.setActiveDate({day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()})}else if("day"===this._viewMode){const t=new Date(e.year,e.month-1,e.day-1);this.setActiveDate({day:t.getDate(),month:t.getMonth()+1,year:t.getFullYear()})}else if("year"===this._viewMode){const t=new Date(e.year-1,e.month-1,1),a=new Date(t.getFullYear(),e.month-1,e.day);a.getMonth()!==e.month-1&&a.setDate(0),this.setActiveDate({day:a.getDate(),month:a.getMonth()+1,year:a.getFullYear()})}}jumpToToday(){const e=/* @__PURE__ */new Date;this.setActiveDate({day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()})}switchToMonthView(){this.setViewMode("month")}switchToWeekView(){this.setViewMode("week")}switchToDayView(){this.setViewMode("day")}switchToYearView(){this.setViewMode("year")}}function wa(e,t,a){return getComputedStyle(e).getPropertyValue(t).trim()||a}function Da(e,t,a){return Math.max(t,Math.min(a,e))}function ka(e,t,a,n){const r=parseInt(wa(n,"--week-day-count","7"),10),i=Da(Number.isNaN(r)?7:r,1,7),o=parseInt(wa(n,"--week-mobile-day-count","3"),10),s=Da(Number.isNaN(o)?3:o,1,7),d=parseInt(wa(n,"--week-mobile-breakpoint","768"),10),l=a<(Number.isNaN(d)?768:d)?s:i,c=we(e,t);if(l>=7)return{weekDates:c,visibleDates:c,visibleStartIndex:0,visibleLength:7,isCondensed:!1,gridColumns:"var(--time-column-width) repeat(7, 1fr)"};const h=function(e,t){const a=e.findIndex(e=>e.year===t.year&&e.month===t.month&&e.day===t.day);return a>=0?a:0}(c,e),u=function(e,t){return Da(e-Math.floor((t-1)/2),0,7-t)}(h,l),f=c.slice(u,u+l);return{weekDates:c,visibleDates:f,visibleStartIndex:u,visibleLength:l,isCondensed:!0,gridColumns:`var(--time-column-width) repeat(${l}, 1fr)`}}var xa=Object.defineProperty,$a=Object.getOwnPropertyDescriptor,Ea=(e,t,a,n)=>{for(var r,i=n>1?void 0:n?$a(t,a):t,o=e.length-1;o>=0;o--)(r=e[o])&&(i=(n?r(t,a,i):r(i))||i);return n&&i&&xa(t,a,i),i};let Sa=class extends r{constructor(){super(...arguments),this.firstDayOfWeek=1,this.locale="undefined"!=typeof document&&document.documentElement.lang||"en",this.yearDrillTarget="month",this.yearDensityMode="dot",this._viewState=new va(this),this.entries=[],this.color="#000000",this._calendarWidth="undefined"!=typeof window&&window.innerWidth||1024,this._menuOpen=!1,this._processedEntries=[],this._expandedEntries=[],this._monthViewSorted=[],this._entrySumByDay={},this._expandedByISODate=/* @__PURE__ */new Map,this._layoutCache=/* @__PURE__ */new Map,this._allDayLayoutCache=/* @__PURE__ */new Map,this._layoutCalculator=new ba({timeColumnWidth:80,minuteHeight:1,eventMinHeight:20,cascadeOffset:15,paddingLeft:10}),this._handleResize=e=>{const[t]=e;this._calendarWidth=t.contentRect.width||this._calendarWidth},this._resizeController=new m(this,{target:null,callback:this._handleResize,skipInitial:!0}),this._handleClickOutside=e=>{if(!this._menuOpen)return;const t=e.composedPath(),a=this.shadowRoot?.querySelector("lms-menu"),n=a&&t.includes(a),r=t.some(e=>e instanceof HTMLElement&&"LMS-CALENDAR-ENTRY"===e.tagName);n||r||this._closeMenuAndClearSelections()},this._handleEscape=e=>{"Escape"===e.key&&this._menuOpen&&this._closeMenuAndClearSelections()}}get activeDate(){return this._viewState.activeDate}set activeDate(e){this._viewState.setActiveDate(e)}get _expandedDate(){return this._viewState.expandedDate}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutside,!0),document.removeEventListener("keydown",this._handleEscape)}updated(e){e.has("_menuOpen")&&(this._menuOpen?(document.addEventListener("click",this._handleClickOutside,!0),document.addEventListener("keydown",this._handleEscape)):(document.removeEventListener("click",this._handleClickOutside,!0),document.removeEventListener("keydown",this._handleEscape)))}_closeMenuAndClearSelections(){this._menuOpen=!1,this._menuEventDetails=void 0,this._returnFocusToTrigger(),this.shadowRoot?.querySelectorAll("lms-calendar-entry").forEach(e=>{e.clearSelection()})}_returnFocusToTrigger(){this._menuTriggerEntry&&(this._menuTriggerEntry.focus(),this._menuTriggerEntry=void 0)}firstUpdated(e){const t=this.shadowRoot?.firstElementChild;t&&this._resizeController.observe(t)}willUpdate(e){if(e.has("entries")){if(!this.entries.length)return this._processedEntries=[],void this._clearEntryCaches();this._processedEntries=w(this.entries,function(...e){return g(_,e,T)}(e=>!e.time||f.fromDateTimes(u.fromObject(O(e.date.start,e.time.start)),u.fromObject(O(e.date.end,e.time.end))).isValid),function(...e){return g(R,e)}((e,t)=>{const a=e.time?.start.hour??0,n=t.time?.start.hour??0,r=e.time?.start.minute??0,i=t.time?.start.minute??0;return a-n||r-i})),this._computeEntryCaches()}}_clearEntryCaches(){this._expandedEntries=[],this._monthViewSorted=[],this._entrySumByDay={},this._expandedByISODate.clear(),this._layoutCache.clear(),this._allDayLayoutCache.clear()}_computeEntryCaches(){this._expandedEntries=this._processedEntries.flatMap((e,t)=>this._expandEntryMaybe({entry:e,range:this._getDaysRange(e.date),originalIndex:t})),this._expandedByISODate.clear();for(const e of this._expandedEntries){const{year:t,month:a,day:n}=e.date.start,r=`${t}-${String(a).padStart(2,"0")}-${String(n).padStart(2,"0")}`;let i=this._expandedByISODate.get(r);i||(i=[],this._expandedByISODate.set(r,i)),i.push(e)}this._monthViewSorted=w(this._expandedEntries,function(...e){return $(N,e)}(e=>e.continuation?.has||!1?e.originalIndex-1e3:e.originalIndex),function(...e){return g(C,e,A)}(e=>{const[t]=ma(e.color);return{entry:e,background:t,originalIndex:e.originalIndex}})),this._entrySumByDay={};for(const e of this._expandedEntries){const t=`${e.date.start.year}-${e.date.start.month}-${e.date.start.day}`;this._entrySumByDay[t]=(this._entrySumByDay[t]??0)+1}this._layoutCache.clear(),this._allDayLayoutCache.clear()}render(){const e=this._viewState.viewMode,t=this._viewState.activeDate;return i`
1475
+ <div class="calendar-container">
1476
+ <header>
1477
+ <lms-calendar-header
1478
+ @switchdate=${this._handleSwitchDate}
1479
+ @switchview=${this._handleSwitchView}
1480
+ @jumptoday=${this._handleJumpToday}
1481
+ .heading=${this.heading}
1482
+ .activeDate=${t}
1483
+ .viewMode=${e}
1484
+ .expandedDate=${"day"===e?t:void 0}
1485
+ .locale=${this.locale}
1486
+ >
1487
+ </lms-calendar-header>
1488
+ </header>
1489
+
1490
+ <main role="region" aria-live="polite" aria-label="${Re(this.locale)[e]} ${Re(this.locale).viewLabel}" style=${c("year"===e?"overflow-y: auto":void 0)}>
1491
+ ${"month"===e?i`
1492
+ <lms-calendar-context
1493
+ .firstDayOfWeek=${this.firstDayOfWeek}
1494
+ .locale=${this.locale}
1495
+ > </lms-calendar-context>
1496
+
1497
+ <lms-calendar-month
1498
+ @expand=${this._handleExpand}
1499
+ @open-menu=${this._handleOpenMenu}
1500
+ @clear-other-selections=${this._handleClearOtherSelections}
1501
+ .activeDate=${t}
1502
+ .firstDayOfWeek=${this.firstDayOfWeek}
1503
+ .locale=${this.locale}
1504
+ >
1505
+ ${this._calendarWidth<768?this._renderEntriesSumByDay():this._renderEntries()}
1506
+ </lms-calendar-month>
1507
+ `:o}
1508
+ ${"week"===e?(()=>{const e=ka(t,this.firstDayOfWeek,this._calendarWidth,this),a=this._renderEntriesByDate(e);return i`
1509
+ <lms-calendar-week
1510
+ @expand=${this._handleExpand}
1511
+ @peek-navigate=${this._handlePeekNavigate}
1512
+ @open-menu=${this._handleOpenMenu}
1513
+ @clear-other-selections=${this._handleClearOtherSelections}
1514
+ .activeDate=${t}
1515
+ .allDayRowCount=${a.allDayRowCount}
1516
+ .firstDayOfWeek=${this.firstDayOfWeek}
1517
+ .locale=${this.locale}
1518
+ .visibleDates=${e.visibleDates}
1519
+ .visibleStartIndex=${e.visibleStartIndex}
1520
+ .visibleLength=${e.visibleLength}
1521
+ style=${h({"--calendar-grid-columns-week":e.gridColumns})}
1522
+ >
1523
+ ${a.elements}
1524
+ </lms-calendar-week>
1525
+ `})():o}
1526
+ ${"day"===e?(()=>{const e=this._renderEntriesByDate();return i`
1527
+ <lms-calendar-day
1528
+ @open-menu=${this._handleOpenMenu}
1529
+ @clear-other-selections=${this._handleClearOtherSelections}
1530
+ .allDayRowCount=${e.allDayRowCount}
1531
+ .locale=${this.locale}
1532
+ >
1533
+ ${e.elements}
1534
+ </lms-calendar-day>
1535
+ `})():o}
1536
+ ${"year"===e?i`
1537
+ <lms-calendar-year
1538
+ @expand=${this._handleExpand}
1539
+ .activeDate=${t}
1540
+ .firstDayOfWeek=${this.firstDayOfWeek}
1541
+ .locale=${this.locale}
1542
+ .entrySumByDay=${this._entrySumByDay}
1543
+ .drillTarget=${this.yearDrillTarget}
1544
+ .densityMode=${this.yearDensityMode}
1545
+ ></lms-calendar-year>
1546
+ `:o}
1547
+ </main>
1548
+
1549
+ <lms-menu
1550
+ ?open=${this._menuOpen}
1551
+ .eventDetails=${this._menuEventDetails||{heading:"",content:"",displayTime:""}}
1552
+ .anchorRect=${this._menuEventDetails?.anchorRect}
1553
+ .locale=${this.locale}
1554
+ @menu-close=${this._handleMenuClose}
1555
+ ></lms-menu>
1556
+ </div>
1557
+ `}_handleSwitchDate(e){"next"===e.detail.direction?this._viewState.navigateNext():"previous"===e.detail.direction&&this._viewState.navigatePrevious()}_handleSwitchView(e){return oe(e.detail.view).with("day",()=>this._viewState.switchToDayView()).with("week",()=>this._viewState.switchToWeekView()).with("month",()=>this._viewState.switchToMonthView()).with("year",()=>this._viewState.switchToYearView()).otherwise(()=>{})}_handleJumpToday(e){this._viewState.jumpToToday()}_handlePeekNavigate(e){this._viewState.setActiveDate(e.detail.date)}_handleExpand(e){this._viewState.setActiveDate(e.detail.date);const t=e.detail.drillTarget||"day";"month"===t?this._viewState.switchToMonthView():"week"===t?this._viewState.switchToWeekView():this._viewState.switchToDayView()}_handleOpenMenu(e){const t=e.target;this.shadowRoot?.querySelectorAll("lms-calendar-entry").forEach(e=>{e!==t&&e.clearSelection()}),this._menuTriggerEntry=t,this.openMenu(e.detail)}_handleClearOtherSelections(e){const t=e.detail.exceptEntry;this.shadowRoot?.querySelectorAll("lms-calendar-entry").forEach(e=>{e!==t&&e.clearSelection()})}_handleMenuClose(){this._menuOpen=!1,this._menuEventDetails=void 0,this._returnFocusToTrigger()}openMenu(e){this._menuEventDetails=e,this._menuOpen=!0}_composeEntry({index:e,slot:t,inlineStyle:a,entry:n,isContinuation:r=!1,density:o,displayMode:s="default",floatText:d=!1,spanClass:l}){const c=o||this._determineDensity(n,void 0,void 0);return i`
1558
+ <lms-calendar-entry
1559
+ class=${`_${e}${l?` ${l}`:""}`}
1560
+ slot=${t}
1561
+ style=${a}
1562
+ .time=${n.time}
1563
+ .heading=${n.heading??""}
1564
+ .content=${n.content}
1565
+ .isContinuation=${r??!1}
1566
+ .date=${n.date}
1567
+ .density=${c}
1568
+ .displayMode=${s}
1569
+ .floatText=${d}
1570
+ .accessibility=${n.accessibility}
1571
+ .locale=${this.locale}
1572
+ >
1573
+ </lms-calendar-entry>
1574
+ `}_determineDensity(e,t,a){if(!e.time)return"compact";if(t&&void 0!==a&&t[a])return"standard";const n=60*(e.time.end.hour-e.time.start.hour)+(e.time.end.minute-e.time.start.minute);return n<30?"compact":n>120&&e.content?"full":"standard"}_expandEntryMaybe({entry:e,range:t,originalIndex:a}){return Array.from({length:t[2]},(n,r)=>{const i=u.fromJSDate(t[0]).plus({days:r}),o=i.plus({days:1}).minus({seconds:1});return{...e,date:{start:i.toObject(),end:o.toObject()},isContinuation:r>0,continuation:{has:t[2]>1,is:r>0,index:r,total:t[2]},originalStartDate:e.date?.start,originalIndex:a}})}_createConsistentEventId(e){const t=e.originalStartDate||e.date?.start;return t?`${e.heading||"unknown"}-${t.year}-${t.month}-${t.day}-${e.time?.start.hour||0}-${e.time?.start.minute||0}`:`${e.heading||"unknown"}-fallback`}_renderEntries(){return this._monthViewSorted.length?this._monthViewSorted.map(({entry:e,background:t,originalIndex:a})=>{const n=e.isContinuation||e.continuation?.has||!1?"all-day-":"";return this._composeEntry({index:a,slot:`${n}${e.date.start.year}-${e.date.start.month}-${e.date.start.day}`,inlineStyle:`--entry-color: ${t}; --entry-background-color: ${t}; z-index: ${100+a}`,entry:{time:e.time,heading:e.heading,content:e.content,date:e.date,isContinuation:e.isContinuation||!1,continuation:e.continuation},density:this._determineDensity({time:e.time,heading:e.heading,content:e.content},void 0,void 0),displayMode:"month-dot"})}):o}_renderEntriesByDate(e){const t=this._viewState.activeDate,a=this._viewState.viewMode;if("day"!==a&&"week"!==a)return{elements:o,allDayRowCount:0};let n;if("day"===a){const e=`${t.year}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`;n=this._expandedByISODate.get(e)??[]}else{n=(e?.visibleDates??we(t,this.firstDayOfWeek)).flatMap(e=>{const t=`${e.year}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")}`;return this._expandedByISODate.get(t)??[]})}const r=[],i=[];for(const o of n)(this._isEffectivelyAllDay(o)?r:i).push(o);return i.length||r.length?this._renderEntriesWithSlotManager(a,t,r,i,e):{elements:o,allDayRowCount:0}}_renderEntriesWithSlotManager(e,t,a,n,r){const i=[];if(n.length>0){const a=new Map(n.map((e,t)=>[e,t]));if("week"===e){const o=function(...e){return g(M,e)}(n,e=>`${e.date.start.year}-${e.date.start.month}-${e.date.start.day}`),s=r?.isCondensed?r.visibleDates:void 0,d=s??we(t,this.firstDayOfWeek);for(const n of d){const r=o[`${n.year}-${n.month}-${n.day}`];if(!r?.length)continue;const d=this._renderDayEntriesWithSlotManager(r,e,t,a,s);i.push(...d)}}else{const r=this._renderDayEntriesWithSlotManager(n,e,t,a);i.push(...r)}}const o=r?.isCondensed?r.visibleDates:void 0,s="week"===e?`${t.year}-${t.month}-${t.day}-${this.firstDayOfWeek}-${r?.visibleStartIndex??0}-${r?.visibleLength??7}`:`day-${t.year}-${t.month}-${t.day}`;let d=this._allDayLayoutCache.get(s);if(!d){const n=a.map(a=>({id:this._createConsistentEventId(a),days:["week"===e?o?ga.getIndexInDates(a.date.start,o):ga.getWeekDayIndex(a.date.start,t,this.firstDayOfWeek):0],isMultiDay:a.continuation?.is||a.continuation?.has||!1})),r=/* @__PURE__ */new Map;n.forEach(e=>{const t=r.get(e.id);t?t.days.push(...e.days):r.set(e.id,{...e,days:[...e.days]})});const{rowAssignments:i,totalRows:l}=function(e){const t=/* @__PURE__ */new Map;if(0===e.length)return{rowAssignments:t,totalRows:0};const a=[],n=[];e.forEach(e=>{e.isMultiDay?a.push(e):n.push(e)}),a.sort((e,t)=>{const a=Math.min(...e.days),n=Math.min(...t.days);return a!==n?a-n:e.id.localeCompare(t.id)}),n.sort((e,t)=>Math.min(...e.days)-Math.min(...t.days));const r=/* @__PURE__ */new Map;for(let o=0;o<7;o++)r.set(o,/* @__PURE__ */new Set);a.forEach(e=>{let a=0,n=!1;for(;!n;){let i=!0;for(const t of e.days)if(r.get(t)?.has(a)){i=!1;break}if(i){n=!0,t.set(e.id,a);for(const t of e.days)r.get(t)?.add(a)}else a++}}),n.forEach(e=>{const a=e.days[0];let n=0;for(;r.get(a)?.has(n);)n++;t.set(e.id,n),r.get(a)?.add(n)});let i=0;return r.forEach(e=>{i=Math.max(i,e.size)}),{rowAssignments:t,totalRows:i}}(Array.from(r.values()));d={rowAssignments:i,mergedEvents:r,totalRows:l},this._allDayLayoutCache.set(s,d)}const{rowAssignments:l,mergedEvents:c,totalRows:h}=d;return{elements:[...a.map((a,r)=>{const[i,s]=ma(a.color),d=this._createConsistentEventId(a),h={viewMode:e,date:a.date.start,isAllDay:!0,activeDate:t,firstDayOfWeek:this.firstDayOfWeek,weekDates:o},u=ga.calculatePosition(h),f=ga.calculateAccessibility(h),y=l.get(d)??0,p={width:100,x:0,zIndex:100+y,opacity:1},m=ga.generatePositionCSS(u,p),b=a.continuation;let g="single-day";if((b?.has||b?.is||!1)&&b){const n=c.get(d),r=[...n?.days??[]].sort((e,t)=>e-t),i="week"===e?o?ga.getIndexInDates(a.date.start,o):ga.getWeekDayIndex(a.date.start,t,this.firstDayOfWeek):0;g=function(e){const{continuationIndex:t,totalDays:a,visibleStartIndex:n,visibleEndIndex:r}=e;if(a<=1)return"single-day";const i=t===n,o=t===r;return i&&o?"single-day":i?"first-day":o?"last-day":"middle-day"}({continuationIndex:i,totalDays:b.total,visibleStartIndex:r[0]??i,visibleEndIndex:r[r.length-1]??i})}return this._composeEntry({index:r+n.length,slot:u.slotName,inlineStyle:`--entry-background-color: ${i}; --entry-color: ${s}; order: ${y}; ${m}`,entry:{...a,accessibility:f},density:"standard",floatText:!1,spanClass:g})}),...i],allDayRowCount:h}}_renderDayEntriesWithSlotManager(e,t,a,n,r){const i=e[0],o=`${i.date.start.year}-${String(i.date.start.month).padStart(2,"0")}-${String(i.date.start.day).padStart(2,"0")}`;let s=this._layoutCache.get(o);if(!s){const t=e.map((e,t)=>({id:String(t),heading:e.heading||"",startTime:{hour:e.time.start.hour,minute:e.time.start.minute},endTime:{hour:e.time.end.hour,minute:e.time.end.minute},color:e.color||"#1976d2"}));s=this._layoutCalculator.calculateLayout(t),this._layoutCache.set(o,s)}return e.map((e,i)=>{const o=s.boxes[i],d=n.get(e)??i,l={viewMode:t,date:e.date.start,time:e.time,activeDate:a,isAllDay:e.isContinuation||this._isAllDayEvent(e),firstDayOfWeek:this.firstDayOfWeek,weekDates:r},c=ga.calculatePosition(l),h=ga.calculateAccessibility(l),u={width:o.width,x:o.x,zIndex:o.zIndex,opacity:o.opacity,height:o.height},f=ga.generatePositionCSS(c,u,e.time),y=this._getSmartLayout(e,o.height,o.width,{depth:o.depth,opacity:o.opacity});return this._composeEntry({index:d,slot:c.slotName,inlineStyle:`--entry-background-color: rgba(250, 250, 250, 0.8); --entry-color: #333; --entry-border: 1px solid rgba(0, 0, 0, 0.15); --entry-handle-color: ${e.color||"#1976d2"}; --entry-handle-width: 4px; --entry-handle-display: block; --entry-padding-left: calc(4px + 0.35em); --entry-layout: ${y}; ${f}`,entry:{...e,accessibility:h},density:"standard",floatText:!1})})}_renderEntriesSumByDay(){const e=Object.entries(this._entrySumByDay);return e.length?e.map(([e,t],a)=>this._composeEntry({index:a,slot:e,inlineStyle:"--entry-color: var(--separator-mid); text-align: center",entry:{heading:`${t} ${Re(this.locale).events}`},displayMode:"month-dot"})):o}_getSmartLayout(e,t,a,n){if(!e.time)return"row";if(!(n&&n.depth>0))return"row";return t>=40?"column":"row"}_getDaysRange(e){const{start:t,end:a}=e,n=new Date(t.year,t.month-1,t.day),r=new Date(a.year,a.month-1,a.day);return[n,r,(r.getTime()-n.getTime())/864e5+1]}_isEffectivelyAllDay(e){return!e.time||(Number(e.time.end.hour)-Number(e.time.start.hour)>=23||!(!e.continuation?.is&&!e.continuation?.has))}_isAllDayEvent(e){if(!e.time)return!0;const{start:t,end:a}=e.time;return 0===t.hour&&0===t.minute&&23===a.hour&&59===a.minute}};Sa.styles=n`
1575
+ :host {
1576
+ display: block;
1577
+ contain: layout style paint;
1578
+ content-visibility: auto;
1579
+ contain-intrinsic-size: auto 600px 800px;
1580
+
1581
+ --shadow-sm: rgba(0, 0, 0, 0.18) 0px 2px 4px;
1582
+ --shadow-md: rgba(0, 0, 0, 0.15) 0px 3px 3px 0px;
1583
+ --shadow-lg: rgba(0, 0, 0, 0.15) 0px 2px 8px;
1584
+ --shadow-hv: rgba(0, 0, 0, 0.08) 0px 4px 12px;
1585
+
1586
+ --breakpoint-xs: 425px;
1587
+ --breakpoint-sm: 768px;
1588
+ --breakpoint-md: 1024px;
1589
+
1590
+ --separator-light: rgba(0, 0, 0, 0.1);
1591
+ --separator-mid: rgba(0, 0, 0, 0.4);
1592
+ --separator-dark: rgba(0, 0, 0, 0.7);
1593
+
1594
+ --system-ui:
1595
+ system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji',
1596
+ 'Segoe UI Emoji', 'Segoe UI Symbol';
1597
+ --monospace-ui:
1598
+ 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
1599
+
1600
+ --border-radius-sm: 5px;
1601
+ --border-radius-md: 7px;
1602
+ --border-radius-lg: 12px;
1603
+
1604
+ --background-color: white;
1605
+ --primary-color: dodgerblue;
1606
+
1607
+ --height: 100%;
1608
+ --width: 100%;
1609
+
1610
+ /* Entry design tokens - responsive and density-aware */
1611
+ --entry-font-size: 0.8rem;
1612
+ --entry-line-height: 1.3;
1613
+ --entry-min-height: 1.2em;
1614
+ --entry-border-radius: var(--border-radius-sm);
1615
+ --entry-background-color: var(--background-color);
1616
+ --entry-color: var(--primary-color);
1617
+ --entry-highlight-color: var(--separator-light);
1618
+ --entry-focus-color: var(--primary-color);
1619
+ --entry-padding: 0.2em 0.35em;
1620
+ --entry-font-family: system-ui;
1621
+ --entry-gap: 0.25em;
1622
+
1623
+ /* Month view dot indicator tokens */
1624
+ --entry-dot-size: 6px;
1625
+ --entry-dot-margin: 0.25em;
1626
+ --entry-month-background: transparent;
1627
+ --entry-month-padding: 0.1em 0.3em 0.1em 0;
1628
+ --entry-time-font: var(--monospace-ui);
1629
+ --entry-time-align: right;
1630
+ --entry-month-text-color: var(--separator-dark);
1631
+
1632
+ /* Entry typography tokens */
1633
+ --entry-title-weight: 500;
1634
+ --entry-title-wrap: nowrap;
1635
+ --entry-time-font-size: 0.85em;
1636
+ --entry-time-opacity: 0.8;
1637
+
1638
+ /* Entry density mode tokens */
1639
+ --entry-compact-show-time: none;
1640
+ --entry-layout: row;
1641
+ --entry-align: flex-start;
1642
+
1643
+ /* Responsive scaling for different viewport sizes */
1644
+ --entry-font-size-sm: 0.7rem;
1645
+ --entry-font-size-md: 0.75rem;
1646
+ --entry-font-size-lg: 0.8rem;
1647
+
1648
+ --context-height: 1.75em;
1649
+ --context-padding: 0.25em;
1650
+ --context-text-align: left;
1651
+
1652
+ /* Core layout tokens */
1653
+ --time-column-width: 4em;
1654
+ --view-container-height-offset: 0px;
1655
+ --main-content-height-offset: 1em;
1656
+
1657
+ /* Time grid sizing — replaces 1440-row grid */
1658
+ --minute-height: 0.8px;
1659
+ --hour-height: calc(60 * var(--minute-height));
1660
+ --day-total-height: calc(1440 * var(--minute-height));
1661
+
1662
+ /* Deprecated: kept for consumers who read them, no longer used internally */
1663
+ --grid-rows-per-day: 1440;
1664
+ --calendar-grid-rows-time: repeat(var(--grid-rows-per-day), 1fr);
1665
+
1666
+ /* Week view condensed tokens */
1667
+ --week-day-count: 7;
1668
+ --week-mobile-day-count: 3;
1669
+ --week-mobile-breakpoint: 768px;
1670
+
1671
+ /* Grid template tokens */
1672
+ --calendar-grid-columns-day: var(--time-column-width) 1fr;
1673
+ --calendar-grid-columns-week: var(--time-column-width) repeat(7, 1fr);
1674
+ --calendar-grid-columns-month: repeat(7, 1fr);
1675
+
1676
+ /* Calculated heights */
1677
+ --view-container-height: calc(100% - var(--view-container-height-offset));
1678
+ --main-content-height: calc(100% - var(--main-content-height-offset));
1679
+
1680
+ /* Legacy tokens (for backward compatibility) */
1681
+ --day-header-height: 3.5em;
1682
+ --day-main-offset: var(--main-content-height-offset);
1683
+ --day-gap: 1px;
1684
+ --day-text-align: center;
1685
+ --day-padding: 0.5em;
1686
+ --day-all-day-font-size: 0.875rem;
1687
+ --day-all-day-margin: 0 1.25em 0 4.25em;
1688
+ --hour-text-align: center;
1689
+ --indicator-top: -0.55em;
1690
+ --separator-border: 1px solid var(--separator-light);
1691
+ --sidebar-border: 1px solid var(--separator-light);
1692
+
1693
+ /* Typography tokens */
1694
+ --hour-indicator-font-size: 0.8125em;
1695
+ --hour-indicator-color: var(--header-text-color, rgba(0, 0, 0, 0.6));
1696
+ --day-label-font-weight: 500;
1697
+ --day-label-name-font-size: 0.75em;
1698
+ --day-label-number-font-size: 1.125em;
1699
+ --day-label-number-font-weight: 600;
1700
+ --day-label-gap: 0.15em;
1701
+
1702
+ --header-height: 3.5em;
1703
+ --header-height-mobile: 4.5em;
1704
+ --header-info-padding-left: 1em;
1705
+ --header-text-color: rgba(0, 0, 0, 0.6);
1706
+ --header-buttons-padding-right: 1em;
1707
+ --button-padding: 0.75em;
1708
+ --button-border-radius: var(--border-radius-sm);
1709
+
1710
+ --month-day-gap: 1px;
1711
+ --indicator-color: var(--primary-color);
1712
+ --indicator-font-weight: bold;
1713
+ --indicator-padding: 0.25em;
1714
+ --indicator-margin-bottom: 0.25em;
1715
+
1716
+ --menu-min-width: 17.5em;
1717
+ --menu-max-width: 20em;
1718
+ --menu-header-padding: 0.75em 1em;
1719
+ --menu-content-padding: 1em;
1720
+ --menu-item-padding: 0.75em;
1721
+ --menu-item-margin-bottom: 0.75em;
1722
+ --menu-item-font-weight: 500;
1723
+ --menu-button-size: 2em;
1724
+ --menu-button-padding: 0.5em;
1725
+ --menu-title-font-size: 0.875em;
1726
+ --menu-title-font-weight: 500;
1727
+ --menu-content-font-size: 0.875em;
1728
+ --menu-detail-label-min-width: 4em;
1729
+ --menu-detail-label-font-size: 0.8125em;
1730
+ --menu-detail-gap: 0.5em;
1731
+
1732
+ /* Year view tokens */
1733
+ --year-grid-columns: 3;
1734
+ --year-grid-columns-tablet: 2;
1735
+ --year-grid-columns-mobile: 1;
1736
+ --year-month-label-font-size: 0.875em;
1737
+ --year-day-font-size: 0.7em;
1738
+ --year-cell-size: 1.8em;
1739
+ --year-dot-color: var(--indicator-color, var(--primary-color));
1740
+ --year-heatmap-1: rgba(30, 144, 255, 0.15);
1741
+ --year-heatmap-2: rgba(30, 144, 255, 0.35);
1742
+ --year-heatmap-3: rgba(30, 144, 255, 0.55);
1743
+ --year-heatmap-4: rgba(30, 144, 255, 0.75);
1744
+
1745
+ /* Year view — calendar week column */
1746
+ --year-cw-width: 1.8em;
1747
+ --year-cw-font-size: 0.55em;
1748
+ --year-cw-color: var(--header-text-color, rgba(0, 0, 0, 0.45));
1749
+ }
1750
+ .calendar-container {
1751
+ box-sizing: border-box;
1752
+ width: var(--width);
1753
+ height: var(--height);
1754
+ background-color: var(--background-color);
1755
+ border-radius: var(--calendar-border-radius, var(--border-radius-lg));
1756
+ border: 1px solid var(--separator-light);
1757
+ font-family: var(--system-ui);
1758
+ color: var(--separator-dark);
1759
+ box-shadow: var(--calendar-shadow, none);
1760
+ contain: layout style;
1761
+ position: relative;
1762
+ overflow: var(--calendar-overflow, hidden);
1763
+ display: flex;
1764
+ flex-direction: column;
1765
+ }
1766
+ header {
1767
+ flex-shrink: 0;
1768
+ }
1769
+ main {
1770
+ flex: 1;
1771
+ min-height: 0;
1772
+ overflow: hidden;
1773
+ display: flex;
1774
+ flex-direction: column;
1775
+ }
1776
+
1777
+ /* Responsive entry scaling based on viewport width */
1778
+ @media (max-width: 480px) {
1779
+ :host {
1780
+ --entry-font-size: var(--entry-font-size-sm);
1781
+ --entry-padding: 0.1em 0.2em;
1782
+ --entry-gap: 0.15em;
1783
+ --entry-line-height: 1.15;
1784
+ --entry-min-height: 1.1em;
1785
+ --entry-compact-show-time: none;
1786
+ }
1787
+ }
1788
+
1789
+ @media (min-width: 481px) and (max-width: 768px) {
1790
+ :host {
1791
+ --entry-font-size: var(--entry-font-size-md);
1792
+ --entry-padding: 0.15em 0.25em;
1793
+ --entry-gap: 0.2em;
1794
+ --entry-line-height: 1.2;
1795
+ --entry-compact-show-time: none;
1796
+ }
1797
+ }
1798
+
1799
+ @media (min-width: 769px) {
1800
+ :host {
1801
+ --entry-font-size: var(--entry-font-size-lg);
1802
+ --entry-compact-show-time: inline;
1803
+ }
1804
+ }
1805
+ `,Ea([s({type:String})],Sa.prototype,"heading",2),Ea([s({type:Number,attribute:"first-day-of-week"})],Sa.prototype,"firstDayOfWeek",2),Ea([s({type:String})],Sa.prototype,"locale",2),Ea([s({type:String,attribute:"year-drill-target"})],Sa.prototype,"yearDrillTarget",2),Ea([s({type:String,attribute:"year-density-mode"})],Sa.prototype,"yearDensityMode",2),Ea([s({type:Array})],Sa.prototype,"entries",2),Ea([s({type:String})],Sa.prototype,"color",2),Ea([l()],Sa.prototype,"_calendarWidth",2),Ea([l()],Sa.prototype,"_menuOpen",2),Ea([l()],Sa.prototype,"_menuEventDetails",2),Sa=Ea([d("lms-calendar")],Sa);export{y as Interval,Sa as default};
1806
+ //# sourceMappingURL=kalendus.js.map