@lekoala/slot-picker 0.1.0 → 0.1.2

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 (78) hide show
  1. package/README.md +85 -39
  2. package/custom-elements.json +0 -5
  3. package/dist/slot-picker.css +22 -0
  4. package/dist/slot-picker.js +160 -134
  5. package/dist/slot-picker.min.css +1 -1
  6. package/dist/slot-picker.min.js +24 -24
  7. package/dist/types/date.d.ts +8 -1
  8. package/dist/types/date.d.ts.map +1 -1
  9. package/dist/types/index.d.ts +2 -2
  10. package/dist/types/index.d.ts.map +1 -1
  11. package/dist/types/locales/ar.d.ts +0 -1
  12. package/dist/types/locales/ar.d.ts.map +1 -1
  13. package/dist/types/locales/de.d.ts +0 -1
  14. package/dist/types/locales/de.d.ts.map +1 -1
  15. package/dist/types/locales/en.d.ts +0 -1
  16. package/dist/types/locales/en.d.ts.map +1 -1
  17. package/dist/types/locales/es.d.ts +0 -1
  18. package/dist/types/locales/es.d.ts.map +1 -1
  19. package/dist/types/locales/fr.d.ts +0 -1
  20. package/dist/types/locales/fr.d.ts.map +1 -1
  21. package/dist/types/locales/hi.d.ts +0 -1
  22. package/dist/types/locales/hi.d.ts.map +1 -1
  23. package/dist/types/locales/id.d.ts +0 -1
  24. package/dist/types/locales/id.d.ts.map +1 -1
  25. package/dist/types/locales/it.d.ts +0 -1
  26. package/dist/types/locales/it.d.ts.map +1 -1
  27. package/dist/types/locales/ja.d.ts +0 -1
  28. package/dist/types/locales/ja.d.ts.map +1 -1
  29. package/dist/types/locales/ko.d.ts +0 -1
  30. package/dist/types/locales/ko.d.ts.map +1 -1
  31. package/dist/types/locales/nl.d.ts +0 -1
  32. package/dist/types/locales/nl.d.ts.map +1 -1
  33. package/dist/types/locales/pl.d.ts +0 -1
  34. package/dist/types/locales/pl.d.ts.map +1 -1
  35. package/dist/types/locales/pt-BR.d.ts +0 -1
  36. package/dist/types/locales/pt-BR.d.ts.map +1 -1
  37. package/dist/types/locales/pt-PT.d.ts +0 -1
  38. package/dist/types/locales/pt-PT.d.ts.map +1 -1
  39. package/dist/types/locales/ru.d.ts +0 -1
  40. package/dist/types/locales/ru.d.ts.map +1 -1
  41. package/dist/types/locales/tr.d.ts +0 -1
  42. package/dist/types/locales/tr.d.ts.map +1 -1
  43. package/dist/types/locales/zh-CN.d.ts +0 -1
  44. package/dist/types/locales/zh-CN.d.ts.map +1 -1
  45. package/dist/types/messages.d.ts +0 -3
  46. package/dist/types/messages.d.ts.map +1 -1
  47. package/dist/types/model.d.ts +58 -23
  48. package/dist/types/model.d.ts.map +1 -1
  49. package/dist/types/slot-picker.d.ts +25 -15
  50. package/dist/types/slot-picker.d.ts.map +1 -1
  51. package/dist/types/views/shared.d.ts +5 -4
  52. package/dist/types/views/shared.d.ts.map +1 -1
  53. package/docs/USE_CASES.md +24 -18
  54. package/package.json +1 -1
  55. package/src/date.js +11 -1
  56. package/src/index.js +13 -2
  57. package/src/locales/ar.js +0 -1
  58. package/src/locales/de.js +0 -1
  59. package/src/locales/en.js +0 -1
  60. package/src/locales/es.js +0 -1
  61. package/src/locales/fr.js +0 -1
  62. package/src/locales/hi.js +0 -1
  63. package/src/locales/id.js +0 -1
  64. package/src/locales/it.js +0 -1
  65. package/src/locales/ja.js +0 -1
  66. package/src/locales/ko.js +0 -1
  67. package/src/locales/nl.js +0 -1
  68. package/src/locales/pl.js +0 -1
  69. package/src/locales/pt-BR.js +0 -1
  70. package/src/locales/pt-PT.js +0 -1
  71. package/src/locales/ru.js +0 -1
  72. package/src/locales/tr.js +0 -1
  73. package/src/locales/zh-CN.js +0 -1
  74. package/src/messages.js +0 -1
  75. package/src/model.js +149 -55
  76. package/src/slot-picker.css +22 -0
  77. package/src/slot-picker.js +123 -100
  78. package/src/views/shared.js +10 -7
@@ -1,36 +1,36 @@
1
- /*** @lekoala/slot-picker v0.1.0 - https://github.com/lekoala/slot-picker ***/
2
- (()=>{var Ct=/^\d{4}-\d{2}-\d{2}$/;function u(t){if(!Ct.test(t))return!1;let[e,s,n]=t.split("-").map(Number),o=new Date(Date.UTC(e,s-1,n));return o.getUTCFullYear()===e&&o.getUTCMonth()===s-1&&o.getUTCDate()===n}function ot(t){if(!u(t))throw TypeError(`Invalid civil date: ${t}`);let[e,s,n]=t.split("-").map(Number);return{year:e,month:s,day:n}}function M(t,e){let{year:s,month:n,day:o}=ot(t),i=new Date(Date.UTC(s,n-1,o+e));return[String(i.getUTCFullYear()).padStart(4,"0"),String(i.getUTCMonth()+1).padStart(2,"0"),String(i.getUTCDate()).padStart(2,"0")].join("-")}function f(t,e){return t.localeCompare(e)}function rt(t,e){return Math.round((D(e).getTime()-D(t).getTime())/86400000)}function Y(t,e){return M(t,Math.max(1,e)-1)}function D(t){let{year:e,month:s,day:n}=ot(t);return new Date(Date.UTC(e,s-1,n))}function B(){let t=new Date;return[String(t.getFullYear()).padStart(4,"0"),String(t.getMonth()+1).padStart(2,"0"),String(t.getDate()).padStart(2,"0")].join("-")}var Et={previous:"Previous days",next:"Next days",home:"Back to start",nextAvailability:"Next availability",showMore:"Show more availability",showLess:"Show less",loading:"Loading availability",empty:"No availability",closed:"Closed",closedRange:"Closed during this period",rangeEmptyTitle:"No availability in this period",rangeEmptyDescription:"From {start} to {end}",rangeEmptyNext:"See the next period",oneSlot:"1 slot",manySlots:"{n} slots",days:"Days"},$t={...Et};function lt(t){return{...$t,...t??{}}}var Tt=/^(?:[01]\d|2[0-3]):[0-5]\d$/,O=Object.freeze([Object.freeze({minWidth:600,dayCount:5}),Object.freeze({minWidth:480,dayCount:4}),Object.freeze({minWidth:360,dayCount:3}),Object.freeze({minWidth:260,dayCount:2}),Object.freeze({minWidth:0,dayCount:1})]),St=/^(\d{4}-\d{2}-\d{2})T((?:[01]\d|2[0-3]):[0-5]\d)$/;function U(t){return Tt.test(t)}function q(t){let e=St.exec(t);return e!==null&&u(e[1])&&U(e[2])}function g(t,e){if(!u(t)||!U(e))throw TypeError("Invalid slot date/time");return`${t}T${e}`}function _(t){if(!Array.isArray(t))throw TypeError("days must be an array");let e=new Set;return t.map((s)=>{if(!s||!u(s.date))throw TypeError("Each day needs a YYYY-MM-DD date");if(e.has(s.date))throw TypeError(`Duplicate day: ${s.date}`);e.add(s.date);let n=Array.isArray(s.slots)?s.slots:[],o=new Set,i=n.map((r)=>{if(!r||!U(r.start))throw TypeError(`Invalid slot start on ${s.date}`);if(r.end&&!U(r.end))throw TypeError(`Invalid slot end on ${s.date}`);if(r.tone!==void 0&&(typeof r.tone!=="string"||r.tone.trim()===""))throw TypeError(`Invalid slot tone on ${s.date}`);if(o.has(r.start))throw TypeError(`Duplicate slot: ${s.date}T${r.start}`);return o.add(r.start),{...r}}).sort((r,l)=>r.start.localeCompare(l.start)),a=s.notice&&typeof s.notice.label==="string"?{...s.notice}:void 0;if(s.closed!==void 0&&typeof s.closed!=="boolean")throw TypeError(`Invalid day closed on ${s.date}`);if(s.closed===!0&&i.length>0)throw TypeError(`Closed day cannot have slots: ${s.date}`);return{date:s.date,slots:i,...s.closed?{closed:!0}:{},...a?{notice:a}:{}}}).sort((s,n)=>s.date.localeCompare(n.date))}function J(t,e,s){let n=_(t),o=new Map(n.map((i)=>[i.date,i]));return Array.from({length:s},(i,a)=>{let r=M(e,a);return o.get(r)??{date:r,slots:[]}})}function P(t,e,s){let n=Math.max(0,...t.map((i)=>i.slots.length)),o=s?n:Math.min(n,e);return{rows:o,hasOverflow:n>e,days:t.map((i)=>({...i,slots:i.slots.slice(0,o)}))}}function dt(t,e){return!t||!e||f(t,e)<=0}function ut(t,e,s){let n=Math.max(1,Number(t)||1);if(!e||!s)return n;if(f(e,s)>0)return 0;return Math.min(n,rt(e,s)+1)}function ht(t){return t.map((e)=>({minWidth:Math.max(0,Number(e?.minWidth)||0),dayCount:Math.max(1,Math.min(14,Number(e?.dayCount)||1))})).sort((e,s)=>s.minWidth-e.minWidth)}function pt(t,e,s=O){let n=Math.max(0,Number(t)||0);if(n===0)return 0;let o=s.length?s:O,i=Number.isFinite(e)?e:0,a=o.find((r)=>i>=r.minWidth)??o[o.length-1];return Math.min(n,a.dayCount)}function j(t,e,s,n){let o=t;if(e&&f(o,e)<0)o=e;let i=Math.max(1,n);if(s){let a=M(s,-(i-1));if(f(a,e||o)<0)o=e||a;else if(f(o,a)>0)o=a}return o}function tt(t,e,s,n,o){let i=Math.max(1,e),a=j(t,n,o,i);if(!u(s))return a;let r=Y(a,i);if(f(s,a)>=0&&f(s,r)<=0)return a;let l=f(s,a)<0?s:M(s,-(i-1));return j(l,n,o,i)}function ft(t){return t.some((e)=>Array.isArray(e.slots)&&e.slots.length>0||Boolean(e.notice)||Boolean(e.closed))}function mt(t,e){return{start:t,end:Y(t,e),dayCount:e}}function k(t,e,s){if(!u(s))return t;if(f(s,t)<0)return t;let n=Y(t,e);if(f(s,n)>0)return n;return s}function ct(t){return t.slots.findIndex((e)=>!e.disabled)}function Mt(t){for(let e=t.slots.length-1;e>=0;e--)if(!t.slots[e].disabled)return e;return-1}function yt(t,e,s){let n=t[e.dayIndex];if(!n)return e;if(s==="home"){let i=ct(n);return i<0?e:{dayIndex:e.dayIndex,slotIndex:i}}if(s==="end"){let i=Mt(n);return i<0?e:{dayIndex:e.dayIndex,slotIndex:i}}if(s==="up"||s==="down"){let i=s==="up"?-1:1,a=e.slotIndex+i;while(a>=0&&a<n.slots.length){if(!n.slots[a].disabled)return{dayIndex:e.dayIndex,slotIndex:a};a+=i}return e}let o=s==="left"?-1:1;for(let i=e.dayIndex+o;i>=0&&i<t.length;i+=o){let a=t[i];if(!a.slots.length||ct(a)<0)continue;let r=Math.min(e.slotIndex,a.slots.length-1);if(!a.slots[r].disabled)return{dayIndex:i,slotIndex:r};for(let l=1;l<a.slots.length;l++){let c=r-l,h=r+l;if(c>=0&&!a.slots[c].disabled)return{dayIndex:i,slotIndex:c};if(h<a.slots.length&&!a.slots[h].disabled)return{dayIndex:i,slotIndex:h}}}return e}class et{#e=null;#t=null;#i=null;#n=0;#s=0;set source(t){let e=typeof t==="function",s=t!==null&&typeof t==="object"&&typeof t.load==="function";if(t!==null&&!e&&!s)throw TypeError("source must be a function or an object with a load() method");this.abort(),this.#e=t}get source(){return this.#e}get hasNext(){let t=this.#e;return Boolean(t&&typeof t==="object"&&typeof t.next==="function")}abort(){this.#t?.abort(),this.#t=null,this.#i?.abort(),this.#i=null}async load(t){let e=this.#e;if(!e)return null;let s=typeof e==="function"?e:e.load;this.abort();let n=new AbortController;this.#t=n;let o=++this.#n;try{let i=await s({...t,signal:n.signal});if(o!==this.#n||n.signal.aborted)return null;return i}finally{if(this.#t===n)this.#t=null}}async next({after:t}){let e=this.#e;if(!e||typeof e!=="object"||typeof e.next!=="function")return null;this.#i?.abort();let s=new AbortController;this.#i=s;let n=++this.#s;try{let o=await e.next({after:t,signal:s.signal});if(n!==this.#s||s.signal.aborted)return null;return typeof o==="string"?o:null}finally{if(this.#i===s)this.#i=null}}}var It={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function p(t){return String(t).replace(/[&<>"']/g,(e)=>It[e]||e)}function b(t){return p(t)}function bt(t){let e=[];for(let s of t)for(let n of s.slots)if(!n.disabled)e.push(g(s.date,n.start));return e}function W(t,...e){for(let s of e)if(s&&t.includes(s))return s;return t[0]||""}function K({date:t,slot:e,dayIndex:s,slotIndex:n,selected:o,tabbed:i}){let a=g(t,e.start),r=e.description?` aria-description="${b(e.description)}"`:"",l=e.disabled?' disabled aria-disabled="true"':"",c=e.tone?` data-tone="${b(e.tone)}"`:"";return`<button type="button" role="option" class="sp-slot" data-day-index="${s}" data-slot-index="${n}" data-value="${b(a)}"${c} aria-selected="${o?"true":"false"}" tabindex="${i?0:-1}"${l}${r}>${p(e.start)}</button>`}function Z(t={}){if(t.interactive){let e=t.description||t.label||"",s=t.label?` title="${b(t.label)}"`:"";return`<button type="button" class="sp-notice" data-day-index="${t.dayIndex??0}" aria-label="${b(e)}"${s}><span class="sp-notice-dot" aria-hidden="true"></span></button>`}return'<span class="sp-notice" aria-hidden="true"><span class="sp-notice-dot"></span></span>'}function G({label:t,description:e}){return`<div class="sp-day-notice">${`<strong class="sp-day-notice-label">${p(t)}</strong>${e?`<span class="sp-day-notice-description">${p(e)}</span>`:""}`}</div>`}function Q(t){return`<div class="sp-day-empty">${p(t)}</div>`}function vt(t,e){if(t<=0)return"–";if(t===1)return e.oneSlot;return e.manySlots.replace("{n}",String(t))}function xt({start:t,end:e,invalid:s,canNext:n,nextAvailability:o,closed:i,locale:a,messages:r}){let l=!s&&Boolean(t),c="";if(l){let m=new Intl.DateTimeFormat(a,{day:"numeric",month:"short",timeZone:"UTC"}),A=r.rangeEmptyDescription.replace("{start}",m.format(D(t))).replace("{end}",m.format(D(e)));c=`<p class="sp-range-empty-description">${p(A)}</p>`}let h=[];if(n)h.push(`<button type="button" class="sp-range-empty-next">${p(r.rangeEmptyNext)}</button>`);if(o&&!s)h.push(`<button type="button" class="sp-range-empty-availability">${p(r.nextAvailability)}</button>`);let x=h.length?`<div class="sp-range-empty-actions">${h.join("")}</div>`:"",d=i?r.closedRange:r.rangeEmptyTitle;return`<div class="sp-range-empty">
3
- <strong class="sp-range-empty-title">${p(d)}</strong>
4
- ${c}
5
- ${x}
6
- </div>`}var gt={timeZone:"UTC"};function wt({visible:t,value:e,focusedValue:s,maxVisibleRows:n,expanded:o,noticeDisplay:i,messages:a,locale:r}){let l=new Intl.DateTimeFormat(r,{weekday:"short",...gt}),c=new Intl.DateTimeFormat(r,{day:"numeric",month:"short",...gt}),{days:h,rows:x,hasOverflow:d}=P(t,n,o),m=bt(h),A=m[0]||"",N=W(m,s,e,A);return{html:`<div class="sp-grid" role="presentation">${h.map((v,E)=>{let w=D(v.date),R=l.format(w),L=c.format(w),I=i==="inline",it=i==="action",y=v.notice&&(I||it)?Z({interactive:!0,dayIndex:E,...v.notice}):"",T=v.notice&&I?G(v.notice):"",S=Boolean(v.closed),C;if(v.slots.length===0)C=`${T}${Q(S?a.closed:a.empty)}`;else{let F=v.slots,z=F.map((X,At)=>{let at=g(v.date,X.start);return K({date:v.date,slot:X,dayIndex:E,slotIndex:At,selected:at===e,tabbed:at===N&&!X.disabled})}).join(""),H=Array.from({length:Math.max(0,x-F.length)},()=>'<span class="sp-empty" aria-hidden="true">–</span>').join("");C=`${T}<div class="sp-slots" role="listbox" aria-label="${b(`${R} ${L}`)}">${z}${H}</div>`}return`<section class="sp-day" data-date="${b(v.date)}"${S?" data-closed":""}>
1
+ /*** @lekoala/slot-picker v0.1.2 - https://github.com/lekoala/slot-picker ***/
2
+ (()=>{var Ct=/^\d{4}-\d{2}-\d{2}$/;function d(t){if(!Ct.test(t))return!1;let[e,s,n]=t.split("-").map(Number),i=new Date(Date.UTC(e,s-1,n));return i.getUTCFullYear()===e&&i.getUTCMonth()===s-1&&i.getUTCDate()===n}function ut(t){if(!d(t))throw TypeError(`Invalid civil date: ${t}`);let[e,s,n]=t.split("-").map(Number);return{year:e,month:s,day:n}}function R(t,e){let{year:s,month:n,day:i}=ut(t),a=new Date(Date.UTC(s,n-1,i+e));return[String(a.getUTCFullYear()).padStart(4,"0"),String(a.getUTCMonth()+1).padStart(2,"0"),String(a.getUTCDate()).padStart(2,"0")].join("-")}function v(t,e){return t.localeCompare(e)}function dt(t){return E(t).getUTCDay()}function E(t){let{year:e,month:s,day:n}=ut(t);return new Date(Date.UTC(e,s-1,n))}function k(){let t=new Date;return[String(t.getFullYear()).padStart(4,"0"),String(t.getMonth()+1).padStart(2,"0"),String(t.getDate()).padStart(2,"0")].join("-")}var St={previous:"Previous days",next:"Next days",home:"Back to start",nextAvailability:"Next availability",showMore:"Show more availability",showLess:"Show less",loading:"Loading availability",empty:"No availability",closed:"Closed",rangeEmptyTitle:"No availability in this period",rangeEmptyDescription:"From {start} to {end}",rangeEmptyNext:"See the next period",oneSlot:"1 slot",manySlots:"{n} slots",days:"Days"},Tt={...St};function ht(t){return{...Tt,...t??{}}}var Mt=/^(?:[01]\d|2[0-3]):[0-5]\d$/,L=Object.freeze([Object.freeze({minWidth:600,dayCount:5}),Object.freeze({minWidth:480,dayCount:4}),Object.freeze({minWidth:360,dayCount:3}),Object.freeze({minWidth:260,dayCount:2}),Object.freeze({minWidth:0,dayCount:1})]),It=/^(\d{4}-\d{2}-\d{2})T((?:[01]\d|2[0-3]):[0-5]\d)$/;function _(t){return Mt.test(t)}function P(t){let e=It.exec(t);return e!==null&&d(e[1])&&_(e[2])}function g(t,e){if(!d(t)||!_(e))throw TypeError("Invalid slot date/time");return`${t}T${e}`}function W(t){if(!Array.isArray(t))throw TypeError("days must be an array");let e=new Set;return t.map((s)=>{if(!s||!d(s.date))throw TypeError("Each day needs a YYYY-MM-DD date");if(e.has(s.date))throw TypeError(`Duplicate day: ${s.date}`);e.add(s.date);let n=Array.isArray(s.slots)?s.slots:[],i=new Set,a=n.map((o)=>{if(!o||!_(o.start))throw TypeError(`Invalid slot start on ${s.date}`);if(o.end&&!_(o.end))throw TypeError(`Invalid slot end on ${s.date}`);if(o.tone!==void 0&&(typeof o.tone!=="string"||o.tone.trim()===""))throw TypeError(`Invalid slot tone on ${s.date}`);if(i.has(o.start))throw TypeError(`Duplicate slot: ${s.date}T${o.start}`);return i.add(o.start),{...o}}).sort((o,l)=>o.start.localeCompare(l.start)),r=s.notice&&typeof s.notice.label==="string"?{...s.notice}:void 0;if(s.closed!==void 0&&typeof s.closed!=="boolean")throw TypeError(`Invalid day closed on ${s.date}`);if(s.closed===!0&&a.length>0)throw TypeError(`Closed day cannot have slots: ${s.date}`);return{date:s.date,slots:a,...s.closed?{closed:!0}:{},...r?{notice:r}:{}}}).sort((s,n)=>s.date.localeCompare(n.date))}function st(t,e){let s=W(t),n=new Map(s.map((i)=>[i.date,i]));return e.map((i)=>n.get(i)??{date:i,slots:[]})}function K(t,e,s){let n=Math.max(0,...t.map((a)=>a.slots.length)),i=s?n:Math.min(n,e);return{rows:i,hasOverflow:n>e,days:t.map((a)=>({...a,slots:a.slots.slice(0,i)}))}}function kt(t,e){return!t||!e||v(t,e)<=0}function Y(t,e,s){if(e&&v(t,e)<0)return e;if(s&&v(t,s)>0)return s;return t}function B(t){if(t===null||t===void 0)return[];if(!Array.isArray(t))throw TypeError("hiddenDays must be an array of weekday indexes");let e=t.map((n)=>{let i=Number(n);if(!Number.isInteger(i)||i<0||i>6)throw TypeError("hiddenDays entries must be integers from 0 (Sunday) to 6 (Saturday)");return i}),s=[...new Set(e)].sort((n,i)=>n-i);if(s.length===7)throw TypeError("hiddenDays cannot hide every weekday");return s}function j(t,e,s,n,i){let a=[],r=t;while(a.length<e){if(i&&(n>0?v(r,i)>0:v(r,i)<0))break;if(!s.includes(dt(r)))a.push(r);r=R(r,n)}return a}function D(t,e,s=[],n="",i=""){let a=Math.max(0,Math.trunc(Number(e)||0));if(!a||!d(t)||!kt(n,i))return[];let r=B(s),o=Y(t,n,i),l=j(o,a,r,1,i);if(l.length===a)return l;return[...j(R(l[0]??o,-1),a-l.length,r,-1,n).reverse(),...l]}function Z(t,e,s=[],n="",i=""){if(!t.length)return"";let a=B(s),r=t.length;if(e>0)return D(R(t[r-1],1),r,a,n,i)[0]??t[0];let o=j(R(t[0],-1),r,a,-1,n);return D(o[o.length-1]??t[0],r,a,n,i)[0]??t[0]}function ft(t){return t.map((e)=>({minWidth:Math.max(0,Number(e?.minWidth)||0),dayCount:Math.max(1,Math.min(14,Number(e?.dayCount)||1))})).sort((e,s)=>s.minWidth-e.minWidth)}function mt(t,e,s=L){let n=Math.max(0,Number(t)||0);if(n===0)return 0;let i=s.length?s:L,a=Number.isFinite(e)?e:0,r=i.find((o)=>a>=o.minWidth)??i[i.length-1];return Math.min(n,r.dayCount)}function yt(t,e,s,n,i=[]){return D(t,n,i,e,s)[0]??Y(t,e,s)}function nt(t,e,s,n,i,a=[]){let r=B(a),o=Math.max(1,e),l=D(t,o,r,n,i);if(!l.length)return Y(t,n,i);let c=l[0];if(!d(s))return c;if(v(s,c)<0)return D(s,o,r,n,i)[0]??c;if(v(s,l[l.length-1])<=0)return c;let h=j(s,1,r,1,i)[0];if(!h)return c;let f=j(h,o,r,-1,n);return D(f[f.length-1]??h,o,r,n,i)[0]??c}function bt(t){return t.some((e)=>Array.isArray(e.slots)&&e.slots.length>0||Boolean(e.notice)||Boolean(e.closed))}function it(t){if(!t.length)return{start:"",end:"",dayCount:0};return{start:t[0],end:t[t.length-1],dayCount:t.length}}function O(t,e){if(!t.length)return"";let s=t[t.length-1];if(!d(e))return t[0];if(v(e,t[0])<=0)return t[0];if(v(e,s)>=0)return s;return t.find((n)=>v(n,e)>=0)??s}function pt(t){return t.slots.findIndex((e)=>!e.disabled)}function Yt(t){for(let e=t.slots.length-1;e>=0;e--)if(!t.slots[e].disabled)return e;return-1}function vt(t,e,s){let n=t[e.dayIndex];if(!n)return e;if(s==="home"){let a=pt(n);return a<0?e:{dayIndex:e.dayIndex,slotIndex:a}}if(s==="end"){let a=Yt(n);return a<0?e:{dayIndex:e.dayIndex,slotIndex:a}}if(s==="up"||s==="down"){let a=s==="up"?-1:1,r=e.slotIndex+a;while(r>=0&&r<n.slots.length){if(!n.slots[r].disabled)return{dayIndex:e.dayIndex,slotIndex:r};r+=a}return e}let i=s==="left"?-1:1;for(let a=e.dayIndex+i;a>=0&&a<t.length;a+=i){let r=t[a];if(!r.slots.length||pt(r)<0)continue;let o=Math.min(e.slotIndex,r.slots.length-1);if(!r.slots[o].disabled)return{dayIndex:a,slotIndex:o};for(let l=1;l<r.slots.length;l++){let c=o-l,h=o+l;if(c>=0&&!r.slots[c].disabled)return{dayIndex:a,slotIndex:c};if(h<r.slots.length&&!r.slots[h].disabled)return{dayIndex:a,slotIndex:h}}}return e}class at{#s=null;#t=null;#e=null;#h=0;#n=0;set source(t){let e=typeof t==="function",s=t!==null&&typeof t==="object"&&typeof t.load==="function";if(t!==null&&!e&&!s)throw TypeError("source must be a function or an object with a load() method");this.abort(),this.#s=t}get source(){return this.#s}get hasNext(){let t=this.#s;return Boolean(t&&typeof t==="object"&&typeof t.next==="function")}abort(){this.#t?.abort(),this.#t=null,this.#e?.abort(),this.#e=null}async load(t){let e=this.#s;if(!e)return null;let s=typeof e==="function"?e:e.load;this.abort();let n=new AbortController;this.#t=n;let i=++this.#h;try{let a=await s({...t,signal:n.signal});if(i!==this.#h||n.signal.aborted)return null;return a}finally{if(this.#t===n)this.#t=null}}async next({after:t}){let e=this.#s;if(!e||typeof e!=="object"||typeof e.next!=="function")return null;this.#e?.abort();let s=new AbortController;this.#e=s;let n=++this.#n;try{let i=await e.next({after:t,signal:s.signal});if(n!==this.#n||s.signal.aborted)return null;return typeof i==="string"?i:null}finally{if(this.#e===s)this.#e=null}}}var Bt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function p(t){return String(t).replace(/[&<>"']/g,(e)=>Bt[e]||e)}function b(t){return p(t)}function gt(t){let e=[];for(let s of t)for(let n of s.slots)if(!n.disabled)e.push(g(s.date,n.start));return e}function G(t,...e){for(let s of e)if(s&&t.includes(s))return s;return t[0]||""}function Q({date:t,slot:e,dayIndex:s,slotIndex:n,selected:i,tabbed:a}){let r=g(t,e.start),o=e.description?` aria-description="${b(e.description)}"`:"",l=e.disabled?' disabled aria-disabled="true"':"",c=e.tone?` data-tone="${b(e.tone)}"`:"";return`<button type="button" role="option" class="sp-slot" data-day-index="${s}" data-slot-index="${n}" data-value="${b(r)}"${c} aria-selected="${i?"true":"false"}" tabindex="${a?0:-1}"${l}${o}><span class="sp-slot-time">${p(e.start)}</span></button>`}function X(t={}){if(t.interactive){let e=t.description||t.label||"",s=t.label?` title="${b(t.label)}"`:"";return`<button type="button" class="sp-notice" data-day-index="${t.dayIndex??0}" aria-label="${b(e)}"${s}><span class="sp-notice-dot" aria-hidden="true"></span></button>`}return'<span class="sp-notice" aria-hidden="true"><span class="sp-notice-dot"></span></span>'}function J({label:t,description:e}){return`<div class="sp-day-notice">${`<strong class="sp-day-notice-label">${p(t)}</strong>${e?`<span class="sp-day-notice-description">${p(e)}</span>`:""}`}</div>`}function tt(t){return`<div class="sp-day-empty">${p(t)}</div>`}function xt(t,e){if(t<=0)return"–";if(t===1)return e.oneSlot;return e.manySlots.replace("{n}",String(t))}function wt({start:t,end:e,invalid:s,canNext:n,nextAvailability:i,locale:a,messages:r}){let o=!s&&Boolean(t),l="";if(o){let f=new Intl.DateTimeFormat(a,{day:"numeric",month:"short",timeZone:"UTC"}),u=r.rangeEmptyDescription.replace("{start}",f.format(E(t))).replace("{end}",f.format(E(e)));l=`<p class="sp-range-empty-description">${p(u)}</p>`}let c=[];if(n)c.push(`<button type="button" class="sp-range-empty-next">${p(r.rangeEmptyNext)}</button>`);if(i&&!s)c.push(`<button type="button" class="sp-range-empty-availability">${p(r.nextAvailability)}</button>`);let h=c.length?`<div class="sp-range-empty-actions">${c.join("")}</div>`:"";return`<div class="sp-range-empty">
3
+ <strong class="sp-range-empty-title">${p(r.rangeEmptyTitle)}</strong>
4
+ ${l}
5
+ ${h}
6
+ </div>`}var Dt={timeZone:"UTC"};function At({visible:t,value:e,focusedValue:s,maxVisibleRows:n,expanded:i,noticeDisplay:a,messages:r,locale:o}){let l=new Intl.DateTimeFormat(o,{weekday:"short",...Dt}),c=new Intl.DateTimeFormat(o,{day:"numeric",month:"short",...Dt}),{days:h,rows:f,hasOverflow:u}=K(t,n,i),x=gt(h),T=x[0]||"",M=G(x,s,e,T);return{html:`<div class="sp-grid" role="presentation">${h.map((m,w)=>{let F=E(m.date),N=l.format(F),V=c.format(F),I=a==="inline",lt=a==="action",y=m.notice&&(I||lt)?X({interactive:!0,dayIndex:w,...m.notice}):"",C=m.notice&&I?J(m.notice):"",S=Boolean(m.closed),A;if(m.slots.length===0)A=`${C}${tt(S?r.closed:r.empty)}`;else{let H=m.slots,U=H.map((et,$t)=>{let ct=g(m.date,et.start);return Q({date:m.date,slot:et,dayIndex:w,slotIndex:$t,selected:ct===e,tabbed:ct===M&&!et.disabled})}).join(""),q=Array.from({length:Math.max(0,f-H.length)},()=>'<span class="sp-empty" aria-hidden="true">–</span>').join("");A=`${C}<div class="sp-slots" role="listbox" aria-label="${b(`${N} ${V}`)}">${U}${q}</div>`}return`<section class="sp-day" data-date="${b(m.date)}"${S?" data-closed":""}>
7
7
  <header class="sp-day-header">
8
- <span class="sp-weekday">${p(R)}</span>
9
- <strong class="sp-date">${p(L)}</strong>
8
+ <span class="sp-weekday">${p(N)}</span>
9
+ <strong class="sp-date">${p(V)}</strong>
10
10
  ${y}
11
11
  </header>
12
- ${C}
13
- </section>`}).join("")}</div>`,hasOverflow:d}}var st={timeZone:"UTC"};function Dt({visible:t,activeDate:e,today:s,value:n,focusedValue:o,noticeDisplay:i,messages:a,locale:r}){let l=new Intl.DateTimeFormat(r,{weekday:"short",...st}),c=new Intl.DateTimeFormat(r,{day:"numeric",month:"short",...st}),h=new Intl.DateTimeFormat(r,{weekday:"long",day:"numeric",month:"long",...st}),x=Math.max(0,t.findIndex((y)=>y.date===e)),d=t[x],m=t.map((y,T)=>{let S=D(y.date),C=y.date===d.date,F=y.date===s,z=Boolean(y.closed),H=z?a.closed:vt(y.slots.length,a);return`<button type="button" class="sp-strip-day" data-date="${b(y.date)}" data-day-index="${T}" aria-pressed="${C?"true":"false"}"${F?" data-today":""}${z?" data-closed":""} tabindex="${C?0:-1}">
12
+ ${A}
13
+ </section>`}).join("")}</div>`,hasOverflow:u}}var rt={timeZone:"UTC"};function Et({visible:t,activeDate:e,today:s,value:n,focusedValue:i,noticeDisplay:a,messages:r,locale:o}){let l=new Intl.DateTimeFormat(o,{weekday:"short",...rt}),c=new Intl.DateTimeFormat(o,{day:"numeric",month:"short",...rt}),h=new Intl.DateTimeFormat(o,{weekday:"long",day:"numeric",month:"long",...rt}),f=Math.max(0,t.findIndex((y)=>y.date===e)),u=t[f],x=t.map((y,C)=>{let S=E(y.date),A=y.date===u.date,H=y.date===s,U=Boolean(y.closed),q=U?r.closed:xt(y.slots.length,r);return`<button type="button" class="sp-strip-day" data-date="${b(y.date)}" data-day-index="${C}" aria-pressed="${A?"true":"false"}"${H?" data-today":""}${U?" data-closed":""} tabindex="${A?0:-1}">
14
14
  <span class="sp-strip-weekday">${p(l.format(S))}</span>
15
15
  <strong class="sp-strip-date">${p(c.format(S))}</strong>
16
- <span class="sp-strip-count" aria-hidden="true">${p(H)}</span>
17
- <span class="sp-visually-hidden">${p(`${h.format(S)}: ${H}`)}</span>
18
- </button>`}).join(""),A=d.slots.filter((y)=>!y.disabled).map((y)=>g(d.date,y.start)),N=A[0]||"",V=W(A,o,n,N),v=i==="inline",E=d.notice&&v?G(d.notice):"",w=d.notice&&i==="action"?Z({interactive:!0,dayIndex:x,...d.notice}):"",R=h.format(D(d.date)),L=Boolean(d.closed),I;if(d.slots.length===0)I=`${E}${Q(L?a.closed:a.empty)}`;else{let y=d.slots.map((T,S)=>{let C=g(d.date,T.start);return K({date:d.date,slot:T,dayIndex:x,slotIndex:S,selected:C===n,tabbed:C===V&&!T.disabled})}).join("");I=`${E}<div class="sp-panel-slots" role="listbox" aria-label="${b(R)}">${y}</div>`}return{html:`<div class="sp-daystrip" role="group" aria-label="${b(a.days)}">${m}</div>
19
- <section class="sp-panel" data-date="${b(d.date)}"${L?" data-closed":""}>
16
+ <span class="sp-strip-count" aria-hidden="true">${p(q)}</span>
17
+ <span class="sp-visually-hidden">${p(`${h.format(S)}: ${q}`)}</span>
18
+ </button>`}).join(""),T=u.slots.filter((y)=>!y.disabled).map((y)=>g(u.date,y.start)),M=T[0]||"",z=G(T,i,n,M),m=a==="inline",w=u.notice&&m?J(u.notice):"",F=u.notice&&a==="action"?X({interactive:!0,dayIndex:f,...u.notice}):"",N=h.format(E(u.date)),V=Boolean(u.closed),I;if(u.slots.length===0)I=`${w}${tt(V?r.closed:r.empty)}`;else{let y=u.slots.map((C,S)=>{let A=g(u.date,C.start);return Q({date:u.date,slot:C,dayIndex:f,slotIndex:S,selected:A===n,tabbed:A===z&&!C.disabled})}).join("");I=`${w}<div class="sp-panel-slots" role="listbox" aria-label="${b(N)}">${y}</div>`}return{html:`<div class="sp-daystrip" role="group" aria-label="${b(r.days)}">${x}</div>
19
+ <section class="sp-panel" data-date="${b(u.date)}"${V?" data-closed":""}>
20
20
  <header class="sp-panel-header">
21
- <strong class="sp-panel-title">${p(R)}</strong>
22
- ${w}
21
+ <strong class="sp-panel-title">${p(N)}</strong>
22
+ ${F}
23
23
  </header>
24
24
  ${I}
25
- </section>`}}var Yt='<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M12.5 4 6.5 10l6 6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',Bt='<svg viewBox="0 0 20 20" aria-hidden="true"><path d="m7.5 4 6 6-6 6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',kt=new Set(["start","min","max","day-count","responsive"]);class nt extends HTMLElement{static observedAttributes=["start","day-count","min","max","value","active-date","layout","max-visible-rows","expanded","responsive","home-date","next-availability","notice-display","closed-days","locale","lang"];#e=[];#t=new et;#i=null;#n=!1;#s=null;#l="";#y=!1;#b=!1;#a=!1;#o="";#h=null;#p=null;#v=null;#x=null;#f=null;#m=null;#c=0;constructor(){super();this.addEventListener("click",(t)=>this.#N(t)),this.addEventListener("keydown",(t)=>this.#V(t))}connectedCallback(){if(this.#b=!0,!this.hasAttribute("start"))this.setAttribute("start",B());if(!this.hasAttribute("day-count"))this.setAttribute("day-count","5");if(!this.hasAttribute("layout"))this.setAttribute("layout","columns");if(this.#b=!1,this.#p=typeof ResizeObserver>"u"?this.getBoundingClientRect().width:null,!this.#h&&typeof ResizeObserver<"u")this.#h=new ResizeObserver((t)=>this.#I(t));this.#h?.observe(this),this.#d({pinActive:!1})}disconnectedCallback(){this.#t.abort(),this.#h?.disconnect(),this.#m=null}attributeChangedCallback(t,e,s){if(e===s)return;if(this.#b||this.#a)return;if(kt.has(t))this.#d({pinActive:t!=="start"});else this.#r()}get start(){let t=this.getAttribute("start")||B();return u(t)?t:B()}set start(t){if(!u(t))throw TypeError("start must be YYYY-MM-DD");let e=this.visibleDayCount;this.setAttribute("start",e>0?j(t,this.min,this.max,e):t)}get dayCount(){let t=Number.parseInt(this.getAttribute("day-count")||"5",10);return Number.isFinite(t)?Math.max(1,Math.min(14,t)):5}set dayCount(t){let e=Math.max(1,Math.min(14,Number(t)||5));this.setAttribute("day-count",String(e))}get visibleDayCount(){if(!dt(this.min,this.max))return 0;let t=ut(this.dayCount,this.min,this.max);if(!this.responsive||this.#p===null)return t;return pt(t,this.#p,this.#v??O)}get responsive(){return this.hasAttribute("responsive")}set responsive(t){this.toggleAttribute("responsive",Boolean(t))}get responsiveBreakpoints(){return this.#v??O}set responsiveBreakpoints(t){if(this.#v=t?.length?ht(t):null,!this.isConnected||this.#a)return;this.#d({pinActive:!0})}get min(){let t=this.getAttribute("min");return t&&u(t)?t:""}set min(t){if(!t)this.removeAttribute("min");else if(u(t))this.setAttribute("min",t);else throw TypeError("min must be YYYY-MM-DD")}get max(){let t=this.getAttribute("max");return t&&u(t)?t:""}set max(t){if(!t)this.removeAttribute("max");else if(u(t))this.setAttribute("max",t);else throw TypeError("max must be YYYY-MM-DD")}get value(){let t=this.getAttribute("value")||"";return q(t)?t:""}set value(t){if(!t){this.removeAttribute("value");return}if(q(t))this.setAttribute("value",t);else throw TypeError("value must be a valid YYYY-MM-DDTHH:mm or empty")}get activeDate(){let t=this.visibleDayCount;if(!t)return"";let e=this.getAttribute("active-date")||"",s=u(e)?e:this.start;return k(this.start,t,s)}set activeDate(t){if(!t)this.removeAttribute("active-date");else if(u(t))this.setAttribute("active-date",t);else throw TypeError("active-date must be YYYY-MM-DD or empty")}get homeDate(){let t=this.getAttribute("home-date")||"";if(u(t))return t;return this.min||B()}set homeDate(t){if(!t)this.removeAttribute("home-date");else if(u(t))this.setAttribute("home-date",t);else throw TypeError("home-date must be YYYY-MM-DD or empty")}get layout(){return(this.getAttribute("layout")||"columns")==="day"?"day":"columns"}set layout(t){if(t!=="columns"&&t!=="day")throw TypeError('layout must be "columns" or "day"');this.setAttribute("layout",t)}get noticeDisplay(){let t=this.getAttribute("notice-display");return t==="inline"||t==="none"?t:"action"}set noticeDisplay(t){if(t!=="inline"&&t!=="action"&&t!=="none")throw TypeError('notice-display must be "inline", "action" or "none"');this.setAttribute("notice-display",t)}get closedDays(){return this.getAttribute("closed-days")==="hide"?"hide":"show"}set closedDays(t){if(t!=="show"&&t!=="hide")throw TypeError('closed-days must be "show" or "hide"');this.setAttribute("closed-days",t)}get expanded(){return this.hasAttribute("expanded")}set expanded(t){this.toggleAttribute("expanded",Boolean(t))}get maxVisibleRows(){let t=Number.parseInt(this.getAttribute("max-visible-rows")||"5",10);return Number.isFinite(t)?Math.max(1,t):5}set maxVisibleRows(t){this.setAttribute("max-visible-rows",String(Math.max(1,Number(t)||5)))}get days(){return this.#e.map((t)=>({...t,slots:t.slots.map((e)=>({...e}))}))}set days(t){this.#e=_(t),this.#s=null,this.#r()}set source(t){if(this.#t.source=t,this.isConnected)this.#A()}get source(){return this.#t.source}set messages(t){this.#i=t?{...t}:null,this.#r()}get locale(){return this.getAttribute("locale")||this.lang||document.documentElement.lang||navigator.language||"en"}set locale(t){if(!t)this.removeAttribute("locale");else this.setAttribute("locale",t)}get range(){let t=this.visibleDayCount;if(!t)return{start:"",end:"",dayCount:0};return mt(this.start,t)}previous(){this.#E(-this.visibleDayCount)}next(){this.#E(this.visibleDayCount)}goTo(t){let e=this.visibleDayCount;if(!e)return"";let s=u(t)?this.#M(t):this.start;return this.#g(()=>this.#S(s,e)),this.#w(),this.activeDate}goHome(){return this.goTo(this.homeDate)}async goToNextAvailability(t={}){if(!this.visibleDayCount)return null;let e=t.after??this.range.end;if(this.#t.hasNext){let s=await this.#t.next({after:e});if(s&&u(s))return this.goTo(s)||null;return null}return this.dispatchEvent(new CustomEvent("nextrequest",{detail:{after:e}})),null}configure(t={}){this.#T(t),this.#g(()=>{if(t.min!==void 0)this.min=t.min;if(t.max!==void 0)this.max=t.max;if(t.start!==void 0)this.start=t.start;if(t.dayCount!==void 0)this.dayCount=t.dayCount;if(t.layout!==void 0)this.layout=t.layout;if(t.value!==void 0)this.value=t.value;if(t.maxVisibleRows!==void 0)this.maxVisibleRows=t.maxVisibleRows;if(t.responsive!==void 0)this.responsive=t.responsive;if(t.homeDate!==void 0)this.homeDate=t.homeDate??"";if(t.responsiveBreakpoints!==void 0)this.responsiveBreakpoints=t.responsiveBreakpoints;if(t.closedDays!==void 0)this.closedDays=t.closedDays}),this.#d({pinActive:t.start===void 0})}#T(t){if(t.min&&!u(t.min))throw TypeError("min must be YYYY-MM-DD");if(t.max&&!u(t.max))throw TypeError("max must be YYYY-MM-DD");if(t.start!==void 0&&!u(t.start))throw TypeError("start must be YYYY-MM-DD");if(t.layout!==void 0&&t.layout!=="columns"&&t.layout!=="day")throw TypeError('layout must be "columns" or "day"');if(t.value&&!q(t.value))throw TypeError("value must be a valid YYYY-MM-DDTHH:mm or empty");if(t.homeDate&&!u(t.homeDate))throw TypeError("homeDate must be YYYY-MM-DD or empty");if(t.responsiveBreakpoints!=null&&!Array.isArray(t.responsiveBreakpoints))throw TypeError("responsiveBreakpoints must be an array or null");if(t.closedDays!==void 0&&t.closedDays!=="show"&&t.closedDays!=="hide")throw TypeError('closedDays must be "show" or "hide"')}async reload(){await this.#A()}#E(t){let e=this.visibleDayCount;if(!e)return;let s=j(M(this.start,t),this.min,this.max,e);if(s===this.start)return;this.#g(()=>this.setAttribute("start",s)),this.#w()}#S(t,e){let s=tt(this.start,e,t,this.min,this.max);if(s!==this.getAttribute("start"))this.setAttribute("start",s);let n=k(s,e,t);if(this.getAttribute("active-date")!==n)this.setAttribute("active-date",n)}#M(t){let e=t;if(this.min&&f(e,this.min)<0)e=this.min;if(this.max&&f(e,this.max)>0)e=this.max;return e}#g(t){let e=this.#a;this.#a=!0;try{t()}finally{this.#a=e}}#d(t={}){let e=t.pinActive??!0,s=t.reload??!0,n=this.#a;this.#a=!0;try{let o=this.visibleDayCount,i=o===0;if(this.toggleAttribute("data-invalid-range",i),!i){let a=this.getAttribute("active-date")||"",r=this.#x,l=this.start;if(e){if(r?.dayCount&&u(a))l=k(r.start,r.dayCount,a);else if(u(a))l=a;else if(r?.start)l=r.start}let c=tt(this.start,o,l,this.min,this.max);if(c!==this.getAttribute("start"))this.setAttribute("start",c);if(e&&u(l)){let h=k(c,o,l);if(this.getAttribute("active-date")!==h)this.setAttribute("active-date",h)}}}finally{this.#a=n}if(n)return;this.#w({reload:s})}#w(t={}){let e=t.reload??!0,s=this.range,n=this.visibleDayCount,o=n?this.activeDate:"",i=this.#x,a=i===null,r=a||s.start!==i.start||s.end!==i.end||s.dayCount!==i.dayCount,l=!a&&this.#f!==null&&o!==this.#f;if(this.#x=s,this.#f=o,this.#r(),!a&&r)this.dispatchEvent(new CustomEvent("rangechange",{detail:s}));if(!a&&l)this.dispatchEvent(new CustomEvent("daychange",{detail:{activeDate:o}}));if(!n)this.#t.abort(),this.#c+=1,this.#m=null,this.#n=!1,this.#s=null;else if(e&&this.#m!==this.#$(s))this.#A()}#$(t){return`${t.start}|${t.end}|${t.dayCount}`}#I(t){let e=t[t.length-1],s=e?.contentBoxSize?.[0],n=s?s.inlineSize:e?.contentRect.width??0,o=this.#Y()??n,i=this.visibleDayCount;if(this.#p=o,this.visibleDayCount!==i)this.#d({pinActive:!0})}#Y(){let t=this.querySelector(".sp-content");return t?t.getBoundingClientRect().width:null}#D(t,e=!0){let s=this.visibleDayCount;if(!s)return;let n=k(this.start,s,t),o=this.activeDate;if(n===o&&this.getAttribute("active-date")===n)return;if(this.setAttribute("active-date",n),this.#f=n,e&&n!==o)this.dispatchEvent(new CustomEvent("daychange",{detail:{activeDate:n}}))}async#A(){let t=++this.#c;if(!this.source||!this.visibleDayCount){this.#n=!1,this.#s=null,this.#r();return}let e=this.range;this.#m=this.#$(e),this.#n=!0,this.#s=null,this.#r(),this.dispatchEvent(new CustomEvent("loadstart",{detail:e}));try{let s=await this.#t.load(e);if(t!==this.#c||s===null)return;let n=Array.isArray(s)?s:s&&typeof s==="object"&&("days"in s)?s.days:[];if(this.#e=_(n),t!==this.#c)return;this.dispatchEvent(new CustomEvent("loadend",{detail:{...e,days:this.days}}))}catch(s){if(t!==this.#c)return;if(s instanceof DOMException&&s.name==="AbortError")return;this.#s=s,this.dispatchEvent(new CustomEvent("loaderror",{detail:{...e,error:s}}))}finally{if(t===this.#c)this.#n=!1,this.#r()}}#r(){if(this.#y)return;this.#y=!0,queueMicrotask(()=>{if(this.#y=!1,this.isConnected)this.#C()})}#B(t){if(t.classList.contains("sp-slot")){let e=t.getAttribute("data-value")||"";return e?`.sp-slot[data-value="${CSS.escape(e)}"]`:""}if(t.classList.contains("sp-strip-day")){let e=t.getAttribute("data-date")||"";return e?`.sp-strip-day[data-date="${CSS.escape(e)}"]`:""}if(t.classList.contains("sp-nav-prev"))return".sp-nav-prev";if(t.classList.contains("sp-nav-next"))return".sp-nav-next";if(t.classList.contains("sp-home"))return".sp-home";if(t.classList.contains("sp-range-empty-availability"))return".sp-range-empty-availability";if(t.classList.contains("sp-range-empty-next"))return".sp-range-empty-next";if(t.classList.contains("sp-more-button"))return".sp-more-button";if(t.classList.contains("sp-notice")){let e=t.getAttribute("data-day-index")||"";return e?`.sp-notice[data-day-index="${CSS.escape(e)}"]`:""}return""}#k(){return this.querySelector('.sp-slot[tabindex="0"]')??this.querySelector('.sp-strip-day[tabindex="0"]')}#u(){let t=this.visibleDayCount;if(!t)return[];let e=J(this.#e,this.start,t);if(this.closedDays!=="hide")return e;let s=this.activeDate;return e.filter((n)=>!n.closed||this.layout==="day"&&n.date===s)}#C(){let t=document.activeElement,e=t instanceof Element&&this.contains(t)?this.#B(t):"",s=this.#o;this.#o="";let n=this.visibleDayCount,o=n===0,i=n?J(this.#e,this.start,n):[],a=this.#u(),r=i.length>0&&i.every((w)=>w.closed),l=lt(this.#i),c=this.locale,h=!o&&(!this.min||f(this.start,this.min)>0),x=!o&&(!this.max||f(Y(this.start,n),this.max)<0),d=!this.#n&&!this.#s&&!ft(a),m,A=!1;if(d)m=xt({start:this.range.start,end:this.range.end,invalid:o,canNext:x,nextAvailability:this.hasAttribute("next-availability"),closed:r,locale:c,messages:l});else if(this.layout==="day")m=Dt({visible:a,activeDate:this.activeDate,today:B(),value:this.value,focusedValue:this.#l,noticeDisplay:this.noticeDisplay,messages:l,locale:c}).html;else{let w=wt({visible:a,value:this.value,focusedValue:this.#l,maxVisibleRows:this.maxVisibleRows,expanded:this.expanded,noticeDisplay:this.noticeDisplay,messages:l,locale:c});m=w.html,A=w.hasOverflow}let N=this.#n?`<div class="sp-status sp-visually-hidden" role="status">${p(l.loading)}</div>`:this.#s?`<div class="sp-status sp-status-error" role="status">${p(String(this.#s))}</div>`:"",V=this.hasAttribute("home-date")&&!o,v=V&&f(this.homeDate,this.range.start)>=0&&f(this.homeDate,this.range.end)<=0;if(this.style.setProperty("--_sp-day-count",String(Math.max(1,a.length))),this.style.setProperty("--_sp-max-visible-rows",String(this.maxVisibleRows)),this.#n)this.setAttribute("aria-busy","true");else this.removeAttribute("aria-busy");this.innerHTML=`<div class="sp-shell" data-layout="${this.layout}">
25
+ </section>`}}var Nt='<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M12.5 4 6.5 10l6 6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',Vt='<svg viewBox="0 0 20 20" aria-hidden="true"><path d="m7.5 4 6 6-6 6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>',Rt=new Set(["start","min","max","day-count","responsive"]);class ot extends HTMLElement{static observedAttributes=["start","day-count","min","max","value","active-date","layout","max-visible-rows","expanded","responsive","home-date","next-availability","notice-display","locale","lang"];#s=[];#t=[];#e=new at;#h=null;#n=!1;#a=null;#c="";#v=!1;#g=!1;#i=!1;#r="";#p=null;#f=null;#x=null;#w=null;#m=null;#y=null;#u=0;constructor(){super();this.addEventListener("click",(t)=>this.#R(t)),this.addEventListener("keydown",(t)=>this.#L(t))}connectedCallback(){if(this.#g=!0,!this.hasAttribute("start"))this.setAttribute("start",k());if(!this.hasAttribute("day-count"))this.setAttribute("day-count","5");if(!this.hasAttribute("layout"))this.setAttribute("layout","columns");if(this.#g=!1,this.#f=typeof ResizeObserver>"u"?this.getBoundingClientRect().width:null,!this.#p&&typeof ResizeObserver<"u")this.#p=new ResizeObserver((t)=>this.#Y(t));this.#p?.observe(this),this.#d({pinActive:!1})}disconnectedCallback(){this.#e.abort(),this.#p?.disconnect(),this.#y=null}attributeChangedCallback(t,e,s){if(e===s)return;if(this.#g||this.#i)return;if(Rt.has(t))this.#d({pinActive:t!=="start"});else this.#l()}get start(){let t=this.getAttribute("start")||k();return d(t)?t:k()}set start(t){if(!d(t))throw TypeError("start must be YYYY-MM-DD");let e=this.visibleDayCount;this.setAttribute("start",e>0?yt(t,this.min,this.max,e,this.#t):t)}get dayCount(){let t=Number.parseInt(this.getAttribute("day-count")||"5",10);return Number.isFinite(t)?Math.max(1,Math.min(14,t)):5}set dayCount(t){let e=Math.max(1,Math.min(14,Number(t)||5));this.setAttribute("day-count",String(e))}get hiddenDays(){return[...this.#t]}set hiddenDays(t){if(this.#t=B(t),!this.isConnected||this.#i)return;this.#d({pinActive:!0})}#D(){if(!this.responsive||this.#f===null)return this.dayCount;return mt(this.dayCount,this.#f,this.#x??L)}#o(){return D(this.start,this.#D(),this.#t,this.min,this.max)}get visibleDayCount(){return this.#o().length}get responsive(){return this.hasAttribute("responsive")}set responsive(t){this.toggleAttribute("responsive",Boolean(t))}get responsiveBreakpoints(){return this.#x??L}set responsiveBreakpoints(t){if(this.#x=t?.length?ft(t):null,!this.isConnected||this.#i)return;this.#d({pinActive:!0})}get min(){let t=this.getAttribute("min");return t&&d(t)?t:""}set min(t){if(!t)this.removeAttribute("min");else if(d(t))this.setAttribute("min",t);else throw TypeError("min must be YYYY-MM-DD")}get max(){let t=this.getAttribute("max");return t&&d(t)?t:""}set max(t){if(!t)this.removeAttribute("max");else if(d(t))this.setAttribute("max",t);else throw TypeError("max must be YYYY-MM-DD")}get value(){let t=this.getAttribute("value")||"";return P(t)?t:""}set value(t){if(!t){this.removeAttribute("value");return}if(P(t))this.setAttribute("value",t);else throw TypeError("value must be a valid YYYY-MM-DDTHH:mm or empty")}get activeDate(){let t=this.#o();if(!t.length)return"";return O(t,this.getAttribute("active-date")||"")}set activeDate(t){if(!t)this.removeAttribute("active-date");else if(d(t))this.setAttribute("active-date",t);else throw TypeError("active-date must be YYYY-MM-DD or empty")}get homeDate(){let t=this.getAttribute("home-date")||"";if(d(t))return t;return this.min||k()}set homeDate(t){if(!t)this.removeAttribute("home-date");else if(d(t))this.setAttribute("home-date",t);else throw TypeError("home-date must be YYYY-MM-DD or empty")}get layout(){return(this.getAttribute("layout")||"columns")==="day"?"day":"columns"}set layout(t){if(t!=="columns"&&t!=="day")throw TypeError('layout must be "columns" or "day"');this.setAttribute("layout",t)}get noticeDisplay(){let t=this.getAttribute("notice-display");return t==="inline"||t==="none"?t:"action"}set noticeDisplay(t){if(t!=="inline"&&t!=="action"&&t!=="none")throw TypeError('notice-display must be "inline", "action" or "none"');this.setAttribute("notice-display",t)}get expanded(){return this.hasAttribute("expanded")}set expanded(t){this.toggleAttribute("expanded",Boolean(t))}get maxVisibleRows(){let t=Number.parseInt(this.getAttribute("max-visible-rows")||"5",10);return Number.isFinite(t)?Math.max(1,t):5}set maxVisibleRows(t){this.setAttribute("max-visible-rows",String(Math.max(1,Number(t)||5)))}get days(){return this.#s.map((t)=>({...t,slots:t.slots.map((e)=>({...e}))}))}set days(t){this.#s=W(t),this.#a=null,this.#l()}set source(t){if(this.#e.source=t,this.isConnected)this.#C()}get source(){return this.#e.source}set messages(t){this.#h=t?{...t}:null,this.#l()}get locale(){return this.getAttribute("locale")||this.lang||document.documentElement.lang||navigator.language||"en"}set locale(t){if(!t)this.removeAttribute("locale");else this.setAttribute("locale",t)}get range(){return it(this.#o())}previous(){this.#T(-1)}next(){this.#T(1)}goTo(t){if(!this.visibleDayCount)return"";let e=d(t)?Y(t,this.min,this.max):this.start;return this.#A(()=>this.#k(e)),this.#E(),this.activeDate}goHome(){return this.goTo(this.homeDate)}async goToNextAvailability(t={}){if(!this.visibleDayCount)return null;let e=t.after??this.range.end;if(this.#e.hasNext){let s=await this.#e.next({after:e});if(s&&d(s))return this.goTo(s)||null;return null}return this.dispatchEvent(new CustomEvent("nextrequest",{detail:{after:e}})),null}configure(t={}){this.#I(t),this.#A(()=>{if(t.min!==void 0)this.min=t.min;if(t.max!==void 0)this.max=t.max;if(t.start!==void 0)this.start=t.start;if(t.dayCount!==void 0)this.dayCount=t.dayCount;if(t.layout!==void 0)this.layout=t.layout;if(t.value!==void 0)this.value=t.value;if(t.maxVisibleRows!==void 0)this.maxVisibleRows=t.maxVisibleRows;if(t.responsive!==void 0)this.responsive=t.responsive;if(t.homeDate!==void 0)this.homeDate=t.homeDate??"";if(t.responsiveBreakpoints!==void 0)this.responsiveBreakpoints=t.responsiveBreakpoints;if(t.hiddenDays!==void 0)this.hiddenDays=t.hiddenDays}),this.#d({pinActive:t.start===void 0})}#I(t){if(t.min&&!d(t.min))throw TypeError("min must be YYYY-MM-DD");if(t.max&&!d(t.max))throw TypeError("max must be YYYY-MM-DD");if(t.start!==void 0&&!d(t.start))throw TypeError("start must be YYYY-MM-DD");if(t.layout!==void 0&&t.layout!=="columns"&&t.layout!=="day")throw TypeError('layout must be "columns" or "day"');if(t.value&&!P(t.value))throw TypeError("value must be a valid YYYY-MM-DDTHH:mm or empty");if(t.homeDate&&!d(t.homeDate))throw TypeError("homeDate must be YYYY-MM-DD or empty");if(t.responsiveBreakpoints!=null&&!Array.isArray(t.responsiveBreakpoints))throw TypeError("responsiveBreakpoints must be an array or null");if(t.hiddenDays!==void 0)B(t.hiddenDays)}async reload(){await this.#C()}#T(t){let e=this.#o();if(!e.length)return;let s=Z(e,t,this.#t,this.min,this.max);if(!s||s===this.start)return;this.#A(()=>this.setAttribute("start",s)),this.#E()}#k(t){let e=this.#D(),s=nt(this.start,e,t,this.min,this.max,this.#t);if(s!==this.getAttribute("start"))this.setAttribute("start",s);let n=D(s,e,this.#t,this.min,this.max),i=O(n,t);if(this.getAttribute("active-date")!==i)this.setAttribute("active-date",i)}#A(t){let e=this.#i;this.#i=!0;try{t()}finally{this.#i=e}}#d(t={}){let e=t.pinActive??!0,s=t.reload??!0,n=this.#i;this.#i=!0;try{let i=this.#D(),a=this.visibleDayCount===0;if(this.toggleAttribute("data-invalid-range",a),!a){let r=this.getAttribute("active-date")||"",o=this.#w,l=this.start;if(e){if(o?.dayCount&&d(r))l=Y(r,o.start,o.end);else if(d(r))l=r;else if(o?.start)l=o.start}let c=nt(this.start,i,l,this.min,this.max,this.#t);if(c!==this.getAttribute("start"))this.setAttribute("start",c);if(e&&d(l)){let h=D(c,i,this.#t,this.min,this.max),f=O(h,l);if(this.getAttribute("active-date")!==f)this.setAttribute("active-date",f)}}}finally{this.#i=n}if(n)return;this.#E({reload:s})}#E(t={}){let e=t.reload??!0,s=this.range,n=this.visibleDayCount,i=n?this.activeDate:"",a=this.#w,r=a===null,o=r||s.start!==a.start||s.end!==a.end||s.dayCount!==a.dayCount,l=!r&&this.#m!==null&&i!==this.#m;if(this.#w=s,this.#m=i,this.#l(),!r&&o)this.dispatchEvent(new CustomEvent("rangechange",{detail:s}));if(!r&&l)this.dispatchEvent(new CustomEvent("daychange",{detail:{activeDate:i}}));if(!n)this.#e.abort(),this.#u+=1,this.#y=null,this.#n=!1,this.#a=null;else if(e&&this.#y!==this.#M(s))this.#C()}#M(t){return`${t.start}|${t.end}|${t.dayCount}`}#Y(t){let e=t[t.length-1],s=e?.contentBoxSize?.[0],n=s?s.inlineSize:e?.contentRect.width??0,i=this.#B()??n,a=this.visibleDayCount;if(this.#f=i,this.visibleDayCount!==a)this.#d({pinActive:!0})}#B(){let t=this.querySelector(".sp-content");return t?t.getBoundingClientRect().width:null}#$(t,e=!0){let s=this.#o();if(!s.length)return;let n=O(s,t),i=this.activeDate;if(n===i&&this.getAttribute("active-date")===n)return;if(this.setAttribute("active-date",n),this.#m=n,e&&n!==i)this.dispatchEvent(new CustomEvent("daychange",{detail:{activeDate:n}}))}async#C(){let t=++this.#u;if(!this.source||!this.visibleDayCount){this.#n=!1,this.#a=null,this.#l();return}let e=this.range;this.#y=this.#M(e),this.#n=!0,this.#a=null,this.#l(),this.dispatchEvent(new CustomEvent("loadstart",{detail:e}));try{let s=await this.#e.load(e);if(t!==this.#u||s===null)return;let n=Array.isArray(s)?s:s&&typeof s==="object"&&("days"in s)?s.days:[];if(this.#s=W(n),t!==this.#u)return;this.dispatchEvent(new CustomEvent("loadend",{detail:{...e,days:this.days}}))}catch(s){if(t!==this.#u)return;if(s instanceof DOMException&&s.name==="AbortError")return;this.#a=s,this.dispatchEvent(new CustomEvent("loaderror",{detail:{...e,error:s}}))}finally{if(t===this.#u)this.#n=!1,this.#l()}}#l(){if(this.#v)return;this.#v=!0,queueMicrotask(()=>{if(this.#v=!1,this.isConnected)this.#S()})}#N(t){if(t.classList.contains("sp-slot")){let e=t.getAttribute("data-value")||"";return e?`.sp-slot[data-value="${CSS.escape(e)}"]`:""}if(t.classList.contains("sp-strip-day")){let e=t.getAttribute("data-date")||"";return e?`.sp-strip-day[data-date="${CSS.escape(e)}"]`:""}if(t.classList.contains("sp-nav-prev"))return".sp-nav-prev";if(t.classList.contains("sp-nav-next"))return".sp-nav-next";if(t.classList.contains("sp-home"))return".sp-home";if(t.classList.contains("sp-range-empty-availability"))return".sp-range-empty-availability";if(t.classList.contains("sp-range-empty-next"))return".sp-range-empty-next";if(t.classList.contains("sp-more-button"))return".sp-more-button";if(t.classList.contains("sp-notice")){let e=t.getAttribute("data-day-index")||"";return e?`.sp-notice[data-day-index="${CSS.escape(e)}"]`:""}return""}#V(){return this.querySelector('.sp-slot[tabindex="0"]')??this.querySelector('.sp-strip-day[tabindex="0"]')}#b(){return st(this.#s,this.#o())}#S(){let t=document.activeElement,e=t instanceof Element&&this.contains(t)?this.#N(t):"",s=this.#r;this.#r="";let n=this.#o(),i=it(n),a=i.dayCount===0,r=st(this.#s,n),o=ht(this.#h),l=this.locale,c=!a&&Z(n,-1,this.#t,this.min,this.max)!==i.start,h=!a&&Z(n,1,this.#t,this.min,this.max)!==i.start,f=!this.#n&&!this.#a&&!bt(r),u,x=!1;if(f)u=wt({start:i.start,end:i.end,invalid:a,canNext:h,nextAvailability:this.hasAttribute("next-availability"),locale:l,messages:o});else if(this.layout==="day")u=Et({visible:r,activeDate:this.activeDate,today:k(),value:this.value,focusedValue:this.#c,noticeDisplay:this.noticeDisplay,messages:o,locale:l}).html;else{let w=At({visible:r,value:this.value,focusedValue:this.#c,maxVisibleRows:this.maxVisibleRows,expanded:this.expanded,noticeDisplay:this.noticeDisplay,messages:o,locale:l});u=w.html,x=w.hasOverflow}let T=this.#n?`<div class="sp-status sp-visually-hidden" role="status">${p(o.loading)}</div>`:this.#a?`<div class="sp-status sp-status-error" role="status">${p(String(this.#a))}</div>`:"",M=this.hasAttribute("home-date")&&!a,z=M&&v(this.homeDate,i.start)>=0&&v(this.homeDate,i.end)<=0;if(this.style.setProperty("--_sp-day-count",String(Math.max(1,r.length))),this.style.setProperty("--_sp-max-visible-rows",String(this.maxVisibleRows)),this.#n)this.setAttribute("aria-busy","true");else this.removeAttribute("aria-busy");this.innerHTML=`<div class="sp-shell" data-layout="${this.layout}">
26
26
  <div class="sp-projection">
27
- <button type="button" class="sp-nav sp-nav-prev" aria-label="${b(l.previous)}"${h?"":" disabled"}>${Yt}</button>
27
+ <button type="button" class="sp-nav sp-nav-prev" aria-label="${b(o.previous)}"${c?"":" disabled"}>${Nt}</button>
28
28
  <div class="sp-content">
29
- ${N}
30
- ${m}
31
- ${A?`<div class="sp-more"><button type="button" class="sp-more-button">${p(this.expanded?l.showLess:l.showMore)}</button></div>`:""}
29
+ ${T}
30
+ ${u}
31
+ ${x?`<div class="sp-more"><button type="button" class="sp-more-button">${p(this.expanded?o.showLess:o.showMore)}</button></div>`:""}
32
32
  </div>
33
- <button type="button" class="sp-nav sp-nav-next" aria-label="${b(l.next)}"${x?"":" disabled"}>${Bt}</button>
33
+ <button type="button" class="sp-nav sp-nav-next" aria-label="${b(o.next)}"${h?"":" disabled"}>${Vt}</button>
34
34
  </div>
35
- ${V?`<div class="sp-shortcuts">${v?"":`<button type="button" class="sp-home">${p(l.home)}</button>`}</div>`:""}
36
- </div>`;let E=s||e;if(E){let w=this.querySelector(E)??this.#k();if(w instanceof HTMLElement)w.focus({preventScroll:!0})}}#N(t){let e=t.target instanceof Element?t.target:null;if(!e)return;if(e.closest(".sp-nav-prev"))return this.previous();if(e.closest(".sp-nav-next"))return this.next();if(e.closest(".sp-home"))return this.#o='.sp-slot[tabindex="0"]',this.goHome();if(e.closest(".sp-nav-availability")){this.goToNextAvailability();return}if(e.closest(".sp-range-empty-availability")){this.goToNextAvailability();return}if(e.closest(".sp-range-empty-next"))return this.next();if(e.closest(".sp-more-button")){this.expanded=!this.expanded;return}let n=e.closest(".sp-strip-day");if(n instanceof HTMLButtonElement){let a=n.getAttribute("data-date")||"";if(u(a))this.#o=`.sp-strip-day[data-date="${CSS.escape(a)}"]`,this.#D(a);return}let o=e.closest(".sp-notice[data-day-index]");if(o instanceof HTMLElement){let a=Number(o.getAttribute("data-day-index")),r=this.#u()[a];if(r?.notice)this.dispatchEvent(new CustomEvent("noticeactivate",{detail:{day:r,notice:r.notice,anchor:o},bubbles:!0}));return}let i=e.closest(".sp-slot");if(i instanceof HTMLButtonElement)this.#O(i)}#V(t){if(!(t.target instanceof HTMLButtonElement))return;let e=t.target;if(e.classList.contains("sp-strip-day"))return this.#R(t);if(!e.classList.contains("sp-slot"))return;let n={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Home:"home",End:"end"}[t.key];if(!n)return;t.preventDefault();let o=this.#u();if(this.layout==="day"){this.#L(t,o,n);return}let{days:i}=P(o,this.maxVisibleRows,this.expanded),a={dayIndex:Number(e.dataset.dayIndex),slotIndex:Number(e.dataset.slotIndex)},r=yt(i,a,n),l=i[r.dayIndex],c=l?.slots[r.slotIndex];if(!c||c.disabled)return;let h=g(l.date,c.start);this.#l=h,this.#o=`.sp-slot[data-value="${CSS.escape(h)}"]`,this.#C()}#R(t){let s={ArrowLeft:-1,ArrowRight:1,Home:"home",End:"end"}[t.key];if(s===void 0)return;t.preventDefault();let n=this.#u(),o=Math.max(0,n.findIndex((r)=>r.date===this.activeDate)),i=o;if(s==="home")i=0;else if(s==="end")i=n.length-1;else if(typeof s==="number")i=Math.max(0,Math.min(n.length-1,o+s));let a=n[i];if(!a||a.date===this.activeDate){let r=this.querySelector(`.sp-strip-day[data-date="${CSS.escape(this.activeDate)}"]`);if(r instanceof HTMLButtonElement)r.focus();return}this.#o=`.sp-strip-day[data-date="${CSS.escape(a.date)}"]`,this.#D(a.date)}#L(t,e,s){if(!(t.target instanceof HTMLButtonElement))return;let n=t.target,o=Math.max(0,e.findIndex((d)=>d.date===this.activeDate)),i=e[o];if(!i)return;let a=i.slots.map((d,m)=>({slot:d,slotIndex:m})).filter(({slot:d})=>!d.disabled);if(!a.length)return;let r=Number(n.dataset.slotIndex),l=a.findIndex(({slotIndex:d})=>d===r);if(l<0){let d=n.getAttribute("data-value")||"";l=Math.max(0,a.findIndex(({slot:m})=>g(i.date,m.start)===(this.#l||this.value||d)))}let c=l;if(s==="home")c=0;else if(s==="end")c=a.length-1;else if(s==="left"||s==="up")c=Math.max(0,l-1);else c=Math.min(a.length-1,l+1);let h=a[c];if(!h)return;let x=g(i.date,h.slot.start);this.#l=x,this.#o=`.sp-slot[data-value="${CSS.escape(x)}"]`,this.#C()}#O(t){if(t.disabled)return;let e=Number(t.dataset.dayIndex),s=Number(t.dataset.slotIndex),n=this.#u()[e],o=n?.slots[s];if(!n||!o||o.disabled)return;let i=g(n.date,o.start);this.#o=`.sp-slot[data-value="${CSS.escape(i)}"]`,this.#D(n.date),this.value=i,this.#l=i,this.dispatchEvent(new CustomEvent("slotactivate",{detail:{value:i,day:n,slot:o},bubbles:!0}))}}if(!customElements.get("slot-picker"))customElements.define("slot-picker",nt);})();
35
+ ${M?`<div class="sp-shortcuts">${z?"":`<button type="button" class="sp-home">${p(o.home)}</button>`}</div>`:""}
36
+ </div>`;let m=s||e;if(m){let w=this.querySelector(m)??this.#V();if(w instanceof HTMLElement)w.focus({preventScroll:!0})}}#R(t){let e=t.target instanceof Element?t.target:null;if(!e)return;if(e.closest(".sp-nav-prev"))return this.previous();if(e.closest(".sp-nav-next"))return this.next();if(e.closest(".sp-home"))return this.#r='.sp-slot[tabindex="0"]',this.goHome();if(e.closest(".sp-nav-availability")){this.goToNextAvailability();return}if(e.closest(".sp-range-empty-availability")){this.goToNextAvailability();return}if(e.closest(".sp-range-empty-next"))return this.next();if(e.closest(".sp-more-button")){this.expanded=!this.expanded;return}let n=e.closest(".sp-strip-day");if(n instanceof HTMLButtonElement){let r=n.getAttribute("data-date")||"";if(d(r))this.#r=`.sp-strip-day[data-date="${CSS.escape(r)}"]`,this.#$(r);return}let i=e.closest(".sp-notice[data-day-index]");if(i instanceof HTMLElement){let r=Number(i.getAttribute("data-day-index")),o=this.#b()[r];if(o?.notice)this.dispatchEvent(new CustomEvent("noticeactivate",{detail:{day:o,notice:o.notice,anchor:i},bubbles:!0}));return}let a=e.closest(".sp-slot");if(a instanceof HTMLButtonElement)this.#z(a)}#L(t){if(!(t.target instanceof HTMLButtonElement))return;let e=t.target;if(e.classList.contains("sp-strip-day"))return this.#j(t);if(!e.classList.contains("sp-slot"))return;let n={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right",Home:"home",End:"end"}[t.key];if(!n)return;t.preventDefault();let i=this.#b();if(this.layout==="day"){this.#O(t,i,n);return}let{days:a}=K(i,this.maxVisibleRows,this.expanded),r={dayIndex:Number(e.dataset.dayIndex),slotIndex:Number(e.dataset.slotIndex)},o=vt(a,r,n),l=a[o.dayIndex],c=l?.slots[o.slotIndex];if(!c||c.disabled)return;let h=g(l.date,c.start);this.#c=h,this.#r=`.sp-slot[data-value="${CSS.escape(h)}"]`,this.#S()}#j(t){let s={ArrowLeft:-1,ArrowRight:1,Home:"home",End:"end"}[t.key];if(s===void 0)return;t.preventDefault();let n=this.#b(),i=Math.max(0,n.findIndex((o)=>o.date===this.activeDate)),a=i;if(s==="home")a=0;else if(s==="end")a=n.length-1;else if(typeof s==="number")a=Math.max(0,Math.min(n.length-1,i+s));let r=n[a];if(!r||r.date===this.activeDate){let o=this.querySelector(`.sp-strip-day[data-date="${CSS.escape(this.activeDate)}"]`);if(o instanceof HTMLButtonElement)o.focus();return}this.#r=`.sp-strip-day[data-date="${CSS.escape(r.date)}"]`,this.#$(r.date)}#O(t,e,s){if(!(t.target instanceof HTMLButtonElement))return;let n=t.target,i=Math.max(0,e.findIndex((u)=>u.date===this.activeDate)),a=e[i];if(!a)return;let r=a.slots.map((u,x)=>({slot:u,slotIndex:x})).filter(({slot:u})=>!u.disabled);if(!r.length)return;let o=Number(n.dataset.slotIndex),l=r.findIndex(({slotIndex:u})=>u===o);if(l<0){let u=n.getAttribute("data-value")||"";l=Math.max(0,r.findIndex(({slot:x})=>g(a.date,x.start)===(this.#c||this.value||u)))}let c=l;if(s==="home")c=0;else if(s==="end")c=r.length-1;else if(s==="left"||s==="up")c=Math.max(0,l-1);else c=Math.min(r.length-1,l+1);let h=r[c];if(!h)return;let f=g(a.date,h.slot.start);this.#c=f,this.#r=`.sp-slot[data-value="${CSS.escape(f)}"]`,this.#S()}#z(t){if(t.disabled)return;let e=Number(t.dataset.dayIndex),s=Number(t.dataset.slotIndex),n=this.#b()[e],i=n?.slots[s];if(!n||!i||i.disabled)return;let a=g(n.date,i.start);this.#r=`.sp-slot[data-value="${CSS.escape(a)}"]`,this.#$(n.date),this.value=a,this.#c=a,this.dispatchEvent(new CustomEvent("slotactivate",{detail:{value:a,day:n,slot:i},bubbles:!0}))}}if(!customElements.get("slot-picker"))customElements.define("slot-picker",ot);})();
@@ -11,11 +11,18 @@ export declare function compareDates(a: string, b: string): number;
11
11
  */
12
12
  export declare function daysBetween(a: string, b: string): number;
13
13
  /**
14
- * Inclusive visible civil range.
14
+ * Inclusive end of `dayCount` consecutive civil days.
15
+ * This is plain civil math, not the picker's range rule: a projection may
16
+ * skip weekdays, so its civil envelope can be wider than its column count.
15
17
  * @param {string} start
16
18
  * @param {number} dayCount
17
19
  */
18
20
  export declare function rangeEnd(start: string, dayCount: number): string;
21
+ /**
22
+ * Civil weekday index, 0 = Sunday, matching `Date#getDay`.
23
+ * @param {string} value
24
+ */
25
+ export declare function weekdayIndex(value: string): number;
19
26
  /** @param {string} value */
20
27
  export declare function toUtcDate(value: string): Date;
21
28
  /** Local civil "today" without timezone conversion of public values. */
@@ -1 +1 @@
1
- {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/date.js"],"names":[],"mappings":"AAEA,4BAA4B;AAC5B,wBAAgB,WAAW,CAAC,KAAK,EADrB,MACqB,WAKhC;AASD,mDAAmD;AACnD,wBAAgB,OAAO,CAAC,KAAK,EADjB,MACiB,EAAE,MAAM,EADH,MACG,UAQpC;AAED,0CAA0C;AAC1C,wBAAgB,YAAY,CAAC,CAAC,EADlB,MACkB,EAAE,CAAC,EADH,MACG,UAEhC;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAHlB,MAGkB,EAAE,CAAC,EAFrB,MAEqB,UAE/B;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAHnB,MAGmB,EAAE,QAAQ,EAF7B,MAE6B,UAEvC;AAED,4BAA4B;AAC5B,wBAAgB,SAAS,CAAC,KAAK,EADnB,MACmB,QAG9B;AAED,wEAAwE;AACxE,wBAAgB,UAAU,WAOzB"}
1
+ {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/date.js"],"names":[],"mappings":"AAEA,4BAA4B;AAC5B,wBAAgB,WAAW,CAAC,KAAK,EADrB,MACqB,WAKhC;AASD,mDAAmD;AACnD,wBAAgB,OAAO,CAAC,KAAK,EADjB,MACiB,EAAE,MAAM,EADH,MACG,UAQpC;AAED,0CAA0C;AAC1C,wBAAgB,YAAY,CAAC,CAAC,EADlB,MACkB,EAAE,CAAC,EADH,MACG,UAEhC;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAHlB,MAGkB,EAAE,CAAC,EAFrB,MAEqB,UAE/B;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAHnB,MAGmB,EAAE,QAAQ,EAF7B,MAE6B,UAEvC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAFvB,MAEuB,UAEjC;AAED,4BAA4B;AAC5B,wBAAgB,SAAS,CAAC,KAAK,EADnB,MACmB,QAG9B;AAED,wEAAwE;AACxE,wBAAgB,UAAU,WAOzB"}
@@ -1,6 +1,6 @@
1
- export { addDays, compareDates, daysBetween, isDateValue, rangeEnd, todayValue } from "./date.js";
1
+ export { addDays, compareDates, daysBetween, isDateValue, rangeEnd, todayValue, weekdayIndex, } from "./date.js";
2
2
  export { DEFAULT_MESSAGES, getDefaultMessages, resolveMessages, setDefaultMessages } from "./messages.js";
3
- export { boundedDayCount, clampStart, collapsedDays, ensureVisible, focusableSlots, hasDayContent, hasSlots, isSlotValue, isTimeValue, isValidRange, moveFocus, normalizeBreakpoints, normalizeDays, RESPONSIVE_BREAKPOINTS, rangeDetail, resolveActiveDate, resolveVisibleDayCount, slotValue, visibleDays, } from "./model.js";
3
+ export { clampDate, clampStart, collapsedDays, ensureVisible, focusableSlots, hasDayContent, hasSlots, isSlotValue, isTimeValue, isValidRange, moveFocus, normalizeBreakpoints, normalizeDays, normalizeHiddenDays, projectDates, RESPONSIVE_BREAKPOINTS, rangeDetail, resolveActiveDate, resolveVisibleDayCount, slotValue, stepStart, visibleDays, } from "./model.js";
4
4
  export { SlotPickerElement } from "./slot-picker.js";
5
5
  export { SlotSourceController } from "./source.js";
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC1G,OAAO,EACL,eAAe,EACf,UAAU,EACV,aAAa,EACb,aAAa,EACb,cAAc,EACd,aAAa,EACb,QAAQ,EACR,WAAW,EACX,WAAW,EACX,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,SAAS,EACT,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,YAAY,EACZ,WAAW,EACX,WAAW,EACX,QAAQ,EACR,UAAU,EACV,YAAY,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC1G,OAAO,EACL,SAAS,EACT,UAAU,EACV,aAAa,EACb,aAAa,EACb,cAAc,EACd,aAAa,EACb,QAAQ,EACR,WAAW,EACX,WAAW,EACX,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,sBAAsB,EACtB,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,SAAS,EACT,SAAS,EACT,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ar.d.ts","sourceRoot":"","sources":["../../../src/locales/ar.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"ar.d.ts","sourceRoot":"","sources":["../../../src/locales/ar.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../src/locales/de.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"de.d.ts","sourceRoot":"","sources":["../../../src/locales/de.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/locales/en.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/locales/en.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../src/locales/es.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"es.d.ts","sourceRoot":"","sources":["../../../src/locales/es.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../src/locales/fr.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../../src/locales/fr.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"hi.d.ts","sourceRoot":"","sources":["../../../src/locales/hi.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"hi.d.ts","sourceRoot":"","sources":["../../../src/locales/hi.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../../src/locales/id.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../../src/locales/id.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"it.d.ts","sourceRoot":"","sources":["../../../src/locales/it.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"it.d.ts","sourceRoot":"","sources":["../../../src/locales/it.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ja.d.ts","sourceRoot":"","sources":["../../../src/locales/ja.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"ja.d.ts","sourceRoot":"","sources":["../../../src/locales/ja.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ko.d.ts","sourceRoot":"","sources":["../../../src/locales/ko.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"ko.d.ts","sourceRoot":"","sources":["../../../src/locales/ko.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"nl.d.ts","sourceRoot":"","sources":["../../../src/locales/nl.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"nl.d.ts","sourceRoot":"","sources":["../../../src/locales/nl.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"pl.d.ts","sourceRoot":"","sources":["../../../src/locales/pl.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"pl.d.ts","sourceRoot":"","sources":["../../../src/locales/pl.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"pt-BR.d.ts","sourceRoot":"","sources":["../../../src/locales/pt-BR.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"pt-BR.d.ts","sourceRoot":"","sources":["../../../src/locales/pt-BR.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"pt-PT.d.ts","sourceRoot":"","sources":["../../../src/locales/pt-PT.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"pt-PT.d.ts","sourceRoot":"","sources":["../../../src/locales/pt-PT.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"ru.d.ts","sourceRoot":"","sources":["../../../src/locales/ru.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"ru.d.ts","sourceRoot":"","sources":["../../../src/locales/ru.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../../src/locales/tr.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../../src/locales/tr.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const _default: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"zh-CN.d.ts","sourceRoot":"","sources":["../../../src/locales/zh-CN.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
1
+ {"version":3,"file":"zh-CN.d.ts","sourceRoot":"","sources":["../../../src/locales/zh-CN.js"],"names":[],"mappings":";IACE,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI"}
@@ -8,7 +8,6 @@ declare const DEFAULT_MESSAGES: {
8
8
  loading: string;
9
9
  empty: string;
10
10
  closed: string;
11
- closedRange: string;
12
11
  rangeEmptyTitle: string;
13
12
  rangeEmptyDescription: string;
14
13
  rangeEmptyNext: string;
@@ -27,7 +26,6 @@ export declare function getDefaultMessages(): {
27
26
  loading: string;
28
27
  empty: string;
29
28
  closed: string;
30
- closedRange: string;
31
29
  rangeEmptyTitle: string;
32
30
  rangeEmptyDescription: string;
33
31
  rangeEmptyNext: string;
@@ -55,7 +53,6 @@ export declare function resolveMessages(messages: Partial<typeof DEFAULT_MESSAGE
55
53
  loading: string;
56
54
  empty: string;
57
55
  closed: string;
58
- closedRange: string;
59
56
  rangeEmptyTitle: string;
60
57
  rangeEmptyDescription: string;
61
58
  rangeEmptyNext: string;
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/messages.js"],"names":[],"mappings":"AAAA,QAAA,MAAM,gBAAgB;IACpB,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI;CACL,CAAC;AAIF,mDAAmD;AACnD,wBAAgB,kBAAkB;;;;;;;;;;;;;;;;;EAEjC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAFhC,OAAO,CAAC,OAAO,gBAAgB,CAAC,GAAC,IAAI,GAAC,SAEN,QAE1C;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAF7B,OAAO,CAAC,OAAO,gBAAgB,CAAC,GAAC,IAAI,GAAC,SAET;;;;;;;;;;;;;;;;;EAEvC;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/messages.js"],"names":[],"mappings":"AAAA,QAAA,MAAM,gBAAgB;IACpB,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,gBAAgB;IAChB,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,KAAK;IACL,MAAM;IACN,eAAe;IACf,qBAAqB;IACrB,cAAc;IACd,OAAO;IACP,SAAS;IACT,IAAI;CACL,CAAC;AAIF,mDAAmD;AACnD,wBAAgB,kBAAkB;;;;;;;;;;;;;;;;EAEjC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAFhC,OAAO,CAAC,OAAO,gBAAgB,CAAC,GAAC,IAAI,GAAC,SAEN,QAE1C;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAF7B,OAAO,CAAC,OAAO,gBAAgB,CAAC,GAAC,IAAI,GAAC,SAET;;;;;;;;;;;;;;;;EAEvC;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}