PageSourceSearch

https://calendarvision.app/assets/cally-0f6b8923.js

js calendarvision.app collected 2026-10-02 15:59:13 UTC 25,907 bytes, 71 lines download raw bytes

1// [email protected] downloaded from https://ga.jspm.io/npm:[email protected]/dist/cally.js
2
3class le{
4/**
5   * @type {T}
6   */
7#e;#t=new Set;
8/**
9   * @param {T} current
10   */
11constructor(e){this.#e=e}get current(){return this.#e}
12/**
13   * @param {T} value
14   */set current(e){this.#e!=e&&(this.#e=e,this.#t.forEach((t=>t(e)))
15/**
16   * @type {import("hooks").Ref["on"]}
17   */)}on(e){return this.#t.add(e),()=>this.#t.delete(e)}}const e=e=>new le(e),t=Symbol.for("atomico.hooks");globalThis[t]=globalThis[t]||{};let n=globalThis[t];const o=Symbol.for("Atomico.suspense"),r=Symbol.for("Atomico.effect"),a=Symbol.for("Atomico.layoutEffect"),s=Symbol.for("Atomico.insertionEffect"),c=(e,t,o)=>{const{i:r,hooks:a}=n.c,s=a[r]=a[r]||{};return s.value=e(s.value),s.effect=t,s.tag=o,n.c.i++,a[r].value},i=t=>c(((n=e(t))=>n)),l=()=>c(((t=e(n.c.host))=>t)),u=()=>n.c.update,d=(e,t,c=0)=>{let i={},l=!1;const u=()=>l,d=(e,t)=>{for(const n in i){const o=i[n];o.effect&&o.tag===e&&(o.value=o.effect(o.value,t))}};return{load:r=>{n.c={host:t,hooks:i,update:e,i:0,id:c};let a;try{l=!1,a=r()}catch(e){if(e!==o)throw e;l=!0}finally{n.c=null}return a},cleanEffects:e=>(d(s,e),()=>(d(a,e),()=>{d(r,e)})),isSuspense:u}},h=Symbol.for;function p(e,t){const n=e.length;if(n!==t.length)return!1;for(let o=0;o<n;o++){let n=e[o],r=t[o];if(n!==r)return!1}return!0}const m=e=>typeof e=="function",y=e=>typeof e=="object",{isArray:b}=Array,g=(e,t)=>(!t||e instanceof HTMLStyleElement)&&"hydrate"in(e?.dataset||{});function v(e,t){let n;const o=e=>{let{length:r}=e;for(let a=0;a<r;a++){const r=e[a];if(r&&Array.isArray(r))o(r);else{const e=typeof r;if(r==null||e==="function"||e==="boolean")continue;e==="string"||e==="number"?(n==null&&(n=""),n+=r):(n!=null&&(t(n),n=null),t(r))}}};o(e),n!=null&&t(n)}const w=(e,t,n)=>(e.addEventListener(t,n),()=>e.removeEventListener(t,n));class Bt{
18/**
19   *
20   * @param {HTMLElement} target
21   * @param {string} message
22   * @param {string} value
23   */
24constructor(e,t,n){this.message=t,this.target=e,this.value=n}}class qt extends Bt{}class me extends Bt{}const D="Custom",k=null,S={true:1,"":1,1:1};function x(e,t,n,o,r){const{type:a,reflect:s,event:c,value:i,attr:l=N(t)}=n?.name!=D&&y(n)&&n!=k?n:{type:n},u=a?.name===D&&a.map,d=i!=null?a!=Function&&m(i)?i:()=>i:null;Object.defineProperty(e,t,{configurable:!0,
25/**
26     * @this {import("dom").AtomicoThisInternal}
27     * @param {any} newValue
28     */
29set(e){const n=this[t];d&&a!=Boolean&&e==null&&(e=d());const{error:o,value:r}=(u?P:$)(a,e);if(o&&r!=null)throw new qt(this,`The value defined for prop '${t}' must be of type '${a.name}'`,r);n!=r&&(this._props[t]=r??void 0,this.update(),c&&T(this,c),this.updated.then((()=>{s&&(this._ignoreAttr=l,E(this,a,l,this[t]),this._ignoreAttr=null)})))},get(){return this._props[t]}}),d&&(r[t]=d()),o[l]={prop:t,type:a}}const T=(e,{type:t,base:n=CustomEvent,...o})=>e.dispatchEvent(new n(t,o)),N=e=>e.replace(/([A-Z])/g,"-$1").toLowerCase(),E=(e,t,n,o)=>o==null||t==Boolean&&!o?e.removeAttribute(n):e.setAttribute(n,t?.name===D&&t?.serialize?t?.serialize(o):y(o)?JSON.stringify(o):t==Boolean?"":o),M=(e,t)=>e==Boolean?!!S[t]:e==Number?Number(t):e==String?t:e==Array||e==Object?JSON.parse(t):e.name==D?t:new e(t),P=({map:e},t)=>{try{return{value:e(t),error:!1}}catch{return{value:t,error:!0}}},$=(e,t)=>e==null||t==null?{value:t,error:!1}:e!=String&&t===""?{value:void 0,error:!1}:e==Object||e==Array||e==Symbol?{value:t,error:{}.toString.call(t)!==`[object ${e.name}]`}:t instanceof e?{value:t,error:e==Number&&Number.isNaN(t.valueOf())}:e==String||e==Number||e==Boolean?{value:t,error:e==Number?typeof t!="number"||Number.isNaN(t):e==String?typeof t!="string":typeof t!="boolean"}:{value:t,error:!0};let A=0;const F=e=>{const t=(e?.dataset||{})?.hydrate||"";return t||"c"+A++},O=(e,t=HTMLElement)=>{const n={},o={},r="prototype"in t&&t.prototype instanceof Element,a=r?t:"base"in t?t.base:HTMLElement,{props:s,styles:c}=r?e:t;class f extends a{constructor(){super(),this._setup(),this._render=()=>e({...this._props});for(const e in o)this[e]=o[e]}
30/**
31     * @returns {import("core").Sheets[]}
32     */static get styles(){return[super.styles,c]}async _setup(){if(this._props)return;this._props={};let e,t;this.mounted=new Promise((n=>this.mount=()=>{n(),e!=this.parentNode&&(t!=e?this.unmounted.then(this.update):this.update()),e=this.parentNode})),this.unmounted=new Promise((o=>this.unmount=()=>{o(),(e!=this.parentNode||!this.isConnected)&&(n.cleanEffects(!0)()(),t=this.parentNode,e=null)})),this.symbolId=this.symbolId||Symbol(),this.symbolIdParent=Symbol();const n=d((()=>this.update()),this,F(this));let o,r=!0;const a=g(this);this.update=()=>(o||(o=!0,this.updated=(this.updated||this.mounted).then((()=>{try{const e=n.load(this._render),t=n.cleanEffects();return e&&e.render(this,this.symbolId,a),o=!1,r&&!n.isSuspense()&&(r=!1,!a&&Y(this)),t()}finally{o=!1}})).then((
33/**
34         * @param {import("internal/hooks.js").CleanUseEffects} [cleanUseEffect]
35         */
36e=>{e&&e()}))),this.updated),this.update()}connectedCallback(){this.mount(),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.unmount()
37/**
38     * @this {import("dom").AtomicoThisInternal}
39     * @param {string} attr
40     * @param {(string|null)} oldValue
41     * @param {(string|null)} value
42     */}attributeChangedCallback(e,t,o){if(n[e]){if(e===this._ignoreAttr||t===o)return;const{prop:r,type:a}=n[e];try{this[r]=M(a,o)}catch{throw new me(this,`The value defined as attr '${e}' cannot be parsed by type '${a.name}'`,o)}}else super.attributeChangedCallback(e,t,o)}static get props(){return{...super.props,...s}}static get observedAttributes(){const e=super.observedAttributes||[];for(const e in s)x(this.prototype,e,s[e],n,o);return Object.keys(n).concat(e)}}return f};function Y(e){const{styles:t}=e.constructor,{shadowRoot:n}=e;if(n&&t.length){const e=[];v(t,(t=>{t&&(t instanceof Element?n.appendChild(t.cloneNode(!0)):e.push(t))})),e.length&&(n.adoptedStyleSheets=e)}}const q=e=>(t,n)=>{c((
43/**
44     * Clean the effect hook
45     * @type {import("internal/hooks.js").CollectorEffect}
46     */
47([e,t]=[])=>
47((t||!t)&&(t&&p(t,n)?e=e||!0:(m(e)&&e(),e=null)),[e,n])
48/**
49     * @returns {any}
50     */),(([e,n],o)=>o?(m(e)&&e(),[]):[e||t(),n]),e)},B=q(r),W=q(s);class Wt extends Array{
51/**
52   *
53   * @param {any} initialState
54   * @param {(nextState: any, state:any[], mount: boolean )=>void} mapState
55   */
56constructor(e,t){let n=!0;const o=e=>{try{t(e,this,n)}finally{n=!1}};super(void 0,o,t),o(e)}}const j=e=>{const t=u();return c(((n=new Wt(e,((e,n,o)=>{e=m(e)?e(n[0]):e,e!==n[0]&&(n[0]=e,o||t())})))=>n))},z=(e,t)=>{const[n]=c((([n,o,r=0]=[])=>((!o||o&&!p(o,t))&&(n=e()),[n,t,r])));return n},L=e=>{const{current:t}=l();if(!(e in t))throw new qt(t,`For useProp("${e}"), the prop does not exist on the host.`,e);return c(((n=new Wt(t[e],((n,o)=>{n=m(n)?n(t[e]):n,t[e]=n})))=>(n[0]=t[e],n)))},_=(e,t={})=>{const n=l();return n[e]||(n[e]=(o=t.detail)=>T(n.current,{type:e,...t,detail:o})),n[e]},I=h("atomico/options");globalThis[I]=globalThis[I]||{sheet:!!document.adoptedStyleSheets};const R=globalThis[I],H=new Promise((e=>{R.ssr||(document.readyState==="loading"?w(document,"DOMContentLoaded",e):e())})),V={checked:1,value:1,selected:1},J={list:1,type:1,size:1,form:1,width:1,height:1,src:1,href:1,slot:1},K={shadowDom:1,staticNode:1,cloneNode:1,children:1,key:1},Z={},G=[];class ct extends Text{}const Q=h("atomico/id"),X=h("atomico/type"),ee=h("atomico/ref"),te=h("atomico/vnode"),ne=()=>{};function oe(e,t,n){return ae(this,e,t,n)}const re=(e,t,...n)=>{const o=t||Z;let{children:r}=o;if(r=r??(n.length?n:G),e===ne)return r;const a=e?e instanceof Node?1:e.prototype instanceof HTMLElement&&2:0;if(a===!1&&e instanceof Function)return e(r!=G?{children:r,...o}:o);const s=R.render||oe;return{[X]:te,type:e,props:o,children:r,key:o.key,shadow:o.shadowDom,static:o.staticNode,raw:a,is:o.is,clone:o.cloneNode,render:s}};function ae(e,t,n=Q,o,r){let a;if(t&&t[n]&&t[n].vnode==e||e[X]!=te)return t;(e||!t)&&(r=r||e.type=="svg",a=e.type!="host"&&(e.raw==1?(t&&e.clone?t[ee]:t)!=e.type:e.raw==2?!(t instanceof e.type):t?t[ee]||t.localName!=e.type:!t),a&&e.type!=null&&(e.raw==1&&e.clone?(o=!0,t=e.type.cloneNode(!0),t[ee]=e.type):t=e.raw==1?e.type:e.raw==2?new e.type:r?document.createElementNS("http://www.w3.org/2000/svg",e.type):document.createElement(e.type,e.is?{is:e.is}:void 0)));const s=t[n]?t[n]:Z,{vnode:c=Z,cycle:i=0}=s;let{fragment:l,handlers:u}=s;const{children:d=G,props:h=Z}=c;if(u=a?{}:u||{},e.static&&!a)return t;if(e.shadow&&!t.shadowRoot&&t.attachShadow({mode:"open",...e.shadow}),e.props!=h&&ie(t,h,e.props,u,r),e.children!==d){const a=e.shadow?t.shadowRoot:t;l=ce(e.children,l,a,n,!i&&o,(!r||e.type!="foreignObject")&&r)}return t[n]={vnode:e,handlers:u,fragment:l,cycle:i+1},t}function se(e,t){const n=new ct(""),o=new ct("");let r;if(e[t?"prepend":"append"](n),t){let{lastElementChild:t}=e;for(;t;){const{previousElementSibling:e}=t;if(g(t,!0)&&!g(e,!0)){r=t;break}t=e}}return r?r.before(o):e.append(o),{markStart:n,markEnd:o}}function ce(e,t,n,o,r,a){e=e==null?null:b(e)?e:[e];const s=t||se(n,r),{markStart:c,markEnd:i,keyes:l}=s;let u;const d=l&&new Set;let h=c;if(e&&v(e,(e=>{if(typeof e=="object"&&!e[X])return;const t=e[X]&&e.key,s=l&&t!=null&&l.get(t);h!=i&&h===s?d.delete(h):h=h==i?i:h.nextSibling;const c=l?s:h;let p=c;if(e[X])p=ae(e,c,o,r,a);else{const t=e+"";!(p instanceof Text)||p instanceof ct?p=new Text(t):p.data!=t&&(p.data=t)}p!=h&&(l&&d.delete(p),!c||l?(n.insertBefore(p,h),l&&h!=i&&d.add(h)):c==i?n.insertBefore(p,i):(n.replaceChild(p,c),h=p)),t!=null&&(u=u||new Map,u.set(t,p))})),h=h==i?i:h.nextSibling,t&&h!=i)for(;h!=i;){const e=h;h=h.nextSibling,e.remove()}return d&&d.forEach((e=>e.remove())),s.keyes=u,s}function ie(e,t,n,o,r){for(const a in t)!(a in n)&&ue(e,a,t[a],null,r,o);for(const a in n)ue(e,a,t[a],n[a],r,o)}function ue(e,t,n,o,r,a){if(t=t!="class"||r?t:"className",n=n??null,o=o??null,t in e&&V[t]&&(n=e[t]),!(o===n||K[t]||t[0]=="_"))if(e.localName==="slot"&&t==="assignNode"&&"assign"in e)e.assign(o);else if(t[0]=="o"&&t[1]=="n"&&(m(o)||m(n)))de(e,t.slice(2),o,a);else if(t=="ref")o&&(m(o)?o(e):o.current=e);else if(t=="style"){const{style:t}=e;n=n||"",o=o||"";const r=y(n),a=y(o);if(r)for(const e in n){if(!a)break;!(e in o)&&he(t,e,null)}if(a)for(const e in o){const a=o[e];r&&n[e]===a||he(t,e,a)}else t.cssText=o}else{const a=t[0]=="$"?t.slice(1):t;a===t&&(!r&&!J[t]&&t in e||m(o)||m(n))?e[t]=o??"":o==null?e.removeAttribute(a):e.setAttribute(a,y(o)?JSON.stringify(o):o)}}function de(e,t,n,o){if(o.handleEvent||(o.handleEvent=t=>o[t.type].call(e,t)),n){if(!o[t]){const r=n.capture||n.once||n.passive?Object.assign({},n):null;e.addEventListener(t,o,r)}o[t]=n}else o[t]&&(e.removeEventListener(t,o),delete o[t])}function he(e,t,n){let o="setProperty";n==null&&(o="removeProperty",n=null),~t.indexOf("-")?e[o](t,n):e[t]=n}const pe=re("host",{style:"display: contents"}),fe="value",ye=(e,t)=>{const n=l(),o=i();W((()=>w(n.current,"ConnectContext",(
57/**
58       * @param {CustomEvent<import("context").DetailConnectContext>} event
59       */
60t=>{t.composedPath().at(0)!==t.currentTarget&&e===t.detail.id&&(t.stopPropagation(),t.detail.connect(o))}))),[e]),o.current=t},be=e=>{const t=_("ConnectContext",{bubbles:!0,composed:!0}),[n,o]=j((()=>
60{if(R.ssr)return;let n;return t({id:e,
61/**
62       * @param {import("core").Ref} parentContext
63       */
64connect(e){n=e}}),n})),r=u();return B((()=>{H.then((()=>t({id:e,connect:o})))}),[e]),B((()=>{if(n)return n.on(r)}),[n]),n?.current||e[fe]},ge=e=>{const t=O((({value:e})=>(ye(t,e),pe)),{props:{value:{type:Object,value:()=>e}}});return t[fe]=e,t};ge({
65/**
66   *
67   * @param {string} type
68   * @param {string} id
69   */
70dispatch(e,t){}});const ve={};function we(e,...t){const n=(e.raw||e).reduce(((e,n,o)=>e+n+(t[o]||"")),"");return ve[n]=ve[n]||Ce(n)}function Ce(e){if(R.sheet){const t=new CSSStyleSheet;return t.replaceSync(e),t}{const t=document.createElement("style");return t.textContent=e,t}}const De=(e,t,n)=>(t==null?t={key:n}:t.key=n,re(e,t)),ke=De,Se=we`*,*:before,*:after{box-sizing:border-box}button{padding:0;touch-action:manipulation;cursor:pointer;user-select:none}`,xe=we`.vh{position:absolute;transform:scale(0)}`;function Te(){const e=new Date;return new C(e.getFullYear(),e.getMonth()+1,e.getDate())}const Ne=864e5;function Ee(e){const t=Oe(e);t.setUTCDate(t.getUTCDate()+3-(t.getUTCDay()+6)%7);const n=new Date(Date.UTC(t.getUTCFullYear(),0,4));return 1+Math.round(((t.getTime()-n.getTime())/Ne-3+(n.getUTCDay()+6)%7)/7)}function Me(e,t=0){const n=Oe(e),o=n.getUTCDay(),r=(o<t?7:0)+o-t;return n.setUTCDate(n.getUTCDate()-r),C.from(n)}function Ue(e,t=0){return Me(e,t).add({days:6})}function Pe(e){return C.from(new Date(Date.UTC(e.year,e.month,0)))}function $e(e,t,n){return t&&C.compare(e,t)<0?t:n&&C.compare(e,n)>0?n:e}const Ae={days:1};function Fe(e,t=0){let n=Me(e.toPlainDate(),t);const o=Ue(Pe(e),t),r=[];for(;C.compare(n,o)<0;){const e=[];for(let t=0;t<7;t++)e.push(n),n=n.add(Ae);r.push(e)}return r}function Oe(e){return new Date(Date.UTC(e.year,e.month-1,e.day??1))}const Ye=/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[0-1])$/,qe=(e,t)=>e.toString().padStart(t,"0");class C{constructor(e,t,n){this.year=e,this.month=t,this.day=n}add(e){const t=Oe(this);if("days"in e)return t.setUTCDate(this.day+e.days),C.from(t);let{year:n,month:o}=this;"months"in e?(o=this.month+e.months,t.setUTCMonth(o-1)):(n=this.year+e.years,t.setUTCFullYear(n));const r=C.from(Oe({year:n,month:o,day:1}));
70return $e(C.from(t),r,Pe(r))}toString(){return`${qe(this.year,4)}-${qe(this.month,2)}-${qe(this.day,2)}`}toPlainYearMonth(){return new U(this.year,this.month)}equals(e){return C.compare(this,e)===0}static compare(e,t){return e.year<t.year?-1:e.year>t.year?1:e.month<t.month?-1:e.month>t.month?1:e.day<t.day?-1:e.day>t.day?1:0}static from(e){if(typeof e=="string"){const t=e.match(Ye);if(!t)throw new TypeError(e);const[,n,o,r]=t;return new C(parseInt(n,10),parseInt(o,10),parseInt(r,10))}return new C(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate())}}class U{constructor(e,t){this.year=e,this.month=t}add(e){const t=Oe(this),n=(e.months??0)+(e.years??0)*12;return t.setUTCMonth(t.getUTCMonth()+n),new U(t.getUTCFullYear(),t.getUTCMonth()+1)}equals(e){return this.year===e.year&&this.month===e.month}toPlainDate(){return new C(this.year,this.month,1)}static compare(e,t){return e.year<t.year?-1:e.year>t.year?1:e.month<t.month?-1:e.month>t.month?1:0}}function Be(e,t){if(t)try{return e.from(t)}catch{}}function We(e){const[t,n]=L(e);return[z((()=>Be(C,t)),[t]),e=>n(e?.toString())]}function je(e){const[t="",n]=L(e);return[z((()=>{const[e,n]=t.split("/"),o=Be(C,e),r=Be(C,n);return o&&r?[o,r]:[]}),[t]),e=>n(`${e[0]}/${e[1]}`)]}function ze(e){const[t="",n]=L(e);return[z((()=>{const e=[];for(const n of t.trim().split(/\s+/)){const t=Be(C,n);t&&e.push(t)}return e}),[t]),e=>n(e.join(" "))]}function Le(e,t){return z((()=>new Intl.DateTimeFormat(t,{timeZone:"UTC",...e})),[t,e])}function _e(e,t,n){const o=Le(e,n);return z((()=>{const e=[],n=new Date;for(var r=0;r<7;r++){const r=(n.getUTCDay()-t+7)%7;e[r]=o.format(n),n.setUTCDate(n.getUTCDate()+1)}return e}),[t,o])}const Ie=(e,t,n)=>$e(e,t,n)===e,Re=e=>e.target.matches(":dir(ltr)"),He={month:"long",day:"numeric"},Ve={month:"long"},Je={weekday:"long"},Ke={bubbles:!0};function Ze({props:e,context:t}){const{offset:n}=e,{firstDayOfWeek:o,isDateDisallowed:r,min:a,max:s,today:c,page:i,locale:l,focusedDate:u,formatWeekday:d}=t,h=c??Te(),p=_e(Je,o,l),m=z((()=>({weekday:d})),[d]),y=_e(m,o,l),b=Le(He,l),g=Le(Ve,l),v=z((()=>i.start.add({months:n})),[i,n]),w=z((()=>Fe(v,o)),[v,o]),D=_("focusday",Ke),k=_("selectday",Ke),S=_("hoverday",Ke);function x(e){D($e(e,a,s))}function T(e){let t;switch(e.key){case"ArrowRight":t=u.add({days:Re(e)?1:-1});break;case"ArrowLeft":t=u.add({days:Re(e)?-1:1});break;case"ArrowDown":t=u.add({days:7});break;case"ArrowUp":t=u.add({days:-7});break;case"PageUp":t=u.add(e.shiftKey?{years:-1}:{months:-1});break;case"PageDown":t=u.add(e.shiftKey?{years:1}:{months:1});break;case"Home":t=Me(u,o);break;case"End":t=Ue(u,o);break;default:return}x(t),e.preventDefault()}function N(e){const n=v.equals(e);if(!t.showOutsideDays&&!n)return;const o=e.equals(u),c=e.equals(h),i=Oe(e),l=r?.(i),d=!Ie(e,a,s);let p,m="";if(t.type==="range"){const[n,o]=t.value,r=n?.equals(e),a=o?.equals(e);p=n&&o&&Ie(e,n,o),m=`${r?"range-start":""} ${a?"range-end":""} ${!p||r||a?"":"range-inner"}`}else p=t.type==="multi"?t.value.some((t=>t.equals(e))):t.value?.equals(e);return{part:`button day day-${i.getUTCDay()} ${n?p?"selected":"":"outside"} ${l?"disallowed":""} ${c?"today":""} ${t.getDayParts?.(i)??""} ${m}`,tabindex:n&&o?0:-1,disabled:d,"aria-disabled":l?"true":void 0,"aria-pressed":n&&p,"aria-current":c?"date":void 0,"aria-label":b.format(i),onkeydown:T,onclick(){l||k(e),x(e)},onmouseover(){!l&&!d&&S(e)}}}return{weeks:w,yearMonth:v,daysLong:p,daysVisible:y,formatter:g,getDayProps:N}}const Ge=Te(),Qe=ge({type:"date",firstDayOfWeek:1,focusedDate:Ge,page:{start:Ge.toPlainYearMonth(),end:Ge.toPlainYearMonth()}});customElements.define("calendar-ctx",Qe);const Xe=(e,t)=>(t+e)%7,et=O((e=>{const t=be(Qe),n=i(),o=Ze({props:e,context:t});function r(){n.current.querySelector("button[tabindex='0']")?.focus()}return ke("host",{shadowDom:!0,focus:r,children:[De("div",{id:"h",part:"heading",children:o.formatter.format(Oe(o.yearMonth))}),ke("table",{ref:n,"aria-labelledby":"h",part:"table",children:[ke("colgroup",{children:[t.showWeekNumbers&&De("col",{part:"col-weeknumber"}),De("col",{part:"col-1"}),De("col",{part:"col-2"}),De("col",{part:"col-3"}),De("col",{part:"col-4"}),De("col",{part:"col-5"}),De("col",{part:"col-6"}),De("col",{part:"col-7"})]}),De("thead",{children:ke("tr",{part:"tr head",children:[t.showWeekNumbers&&De("th",{part:"th weeknumber",children:ke("slot",{name:"weeknumber",children:[De("span",{class:"vh",children:"Week"}),De("span",{"aria-hidden":"true",children:"#"})]})}),o.daysLong.map(((e,n)=>ke("th",{part:`th day day-${Xe(t.firstDayOfWeek,n)}`,scope:"col",children:[De("span",{class:"vh",children:e}),De("span",{"aria-hidden":"true",children:o.daysVisible[n]})]})))]})}),De("tbody",{children:o.weeks.map(((e,n)=>ke("tr",{part:"tr week",children:[t.showWeekNumbers&&De("th",{class:"num",part:"th weeknumber",scope:"row",children:Ee(e[0])}),e.map(((e,t)=>{const n=o.getDayProps(e);return De("td",{part:"td",children:n&&De("button",{class:"num",...n,children:e.day})},t)}))]},n)))})]})]})}),{props:{offset:{type:Number,value:0}},styles:[Se,xe,we`:host{--color-accent: black;--color-text-on-accent: white;display:flex;flex-direction:column;gap:.25rem;text-align:center;inline-size:fit-content}table{border-collapse:collapse;font-size:.875rem}th{inline-size:2.25rem;block-size:2.25rem}td{padding-inline:0}.num{font-variant-numeric:tabular-nums}button{color:inherit;font-size:inherit;background:transparent;border:0;block-size:2.25rem;inline-size:2.25rem}
70button:hover:where(:not(:disabled,[aria-disabled])){background:#0000000d}button:is([aria-pressed=true],:focus-visible){background:var(--color-accent);color:var(--color-text-on-accent)}button:focus-visible{outline:1px solid var(--color-text-on-accent);outline-offset:-2px}button:disabled,:host::part(outside),:host::part(disallowed){cursor:default;opacity:.5}`]});customElements.define("calendar-month",et);function tt(e){return De("button",{part:`button ${e.name} ${e.onclick?"":"disabled"}`,onclick:e.onclick,"aria-disabled":e.onclick?null:"true",children:De("slot",{name:e.name,children:e.children})})}function nt(e){const t=Oe(e.page.start),n=Oe(e.page.end);return De(Qe,{value:e,onselectday:e.onSelect,onfocusday:e.onFocus,onhoverday:e.onHover,children:ke("div",{role:"group","aria-labelledby":"h",part:"container",children:[De("div",{id:"h",class:"vh","aria-live":"polite","aria-atomic":"true",children:e.formatVerbose.formatRange(t,n)}),ke("div",{part:"header",children:[De(tt,{name:"previous",onclick:e.previous,children:"Previous"}),De("slot",{part:"heading",name:"heading",children:De("div",{"aria-hidden":"true",children:e.format.formatRange(t,n)})}),De(tt,{name:"next",onclick:e.next,children:"Next"})]}),De("slot",{part:"months"})]})})}const ot={value:{type:String,value:""},min:{type:String,value:""},max:{type:String,value:""},today:{type:String,value:""},isDateDisallowed:{type:Function,value:e=>!1},formatWeekday:{type:String,value:()=>"narrow"},getDayParts:{type:Function,value:e=>""},firstDayOfWeek:{type:Number,value:()=>1},showOutsideDays:{type:Boolean,value:!1},locale:{type:String,value:()=>{}},months:{type:Number,value:1},focusedDate:{type:String,value:()=>{}},pageBy:{type:String,value:()=>"months"},showWeekNumbers:{type:Boolean,value:!1}},rt=[Se,xe,we`:host{display:block;inline-size:fit-content}:host::part(container){display:flex;flex-direction:column;gap:1em}:host::part(header){display:flex;align-items:center;justify-content:space-between}:host::part(heading){font-weight:700;font-size:1.25em}:host::part(button){display:flex;align-items:center;justify-content:center}:host::part(button disabled){cursor:default;opacity:.5}`],at={year:"numeric"},st={year:"numeric",month:"long"};function it(e,t){return 12*(t.year-e.year)+t.month-e.month}const lt=(e,t)=>(e=t===12?new U(e.year,1):e,{start:e,end:e.add({months:t-1})});function ut({pageBy:e,focusedDate:t,months:n,max:o,min:r,goto:a}){const s=e==="single"?1:n,[c,i]=j((()=>lt(t.toPlainYearMonth(),n))),l=e=>i(lt(c.start.add({months:e}),n)),u=e=>{const t=it(c.start,e.toPlainYearMonth());return t>=0&&t<n};return B((()=>{if(u(t))return;const e=it(t.toPlainYearMonth(),c.start);a(t.add({months:e}))}),[c.start]),B((()=>{if(u(t))return;const e=it(c.start,t.toPlainYearMonth());l(e===-1?-s:e===n?s:Math.floor(e/n)*n)}),[t,s,n]),{page:c,previous:r&&u(r)?void 0:()=>l(-s),next:o&&u(o)?void 0:()=>l(s)}}function dt({months:e,pageBy:t,locale:n,focusedDate:o,setFocusedDate:r}){const[a]=We("min"),[s]=We("max"),[c]=We("today"),i=_("focusday"),u=_("change"),d=z((()=>$e(o??c??Te(),a,s)),[o,c,a,s]);function h(e){r(e),i(Oe(e))}const{next:p,previous:m,page:y}=ut({pageBy:t,focusedDate:d,months:e,min:a,max:s,goto:h}),b=l();function g(e){const t=e?.target??"day";t==="day"?b.current.querySelectorAll("calendar-month").forEach((t=>t.focus(e))):b.current.shadowRoot.querySelector(`[part~='${t}']`).focus(e)}return{format:Le(at,n),formatVerbose:Le(st,n),page:y,focusedDate:d,dispatch:u,onFocus(e){e.stopPropagation(),h(e.detail),setTimeout(g)},min:a,max:s,today:c,next:p,previous:m,focus:g}}const ht=O((e=>{const[t,n]=We("value"),[o=t,r]=We("focusedDate"),a=dt({...e,focusedDate:o,setFocusedDate:r});function s(e){n(e.detail),a.dispatch()}return De("host",{shadowDom:!0,focus:a.focus,children:De(nt,{...e,...a,type:"date",value:t,onSelect:s})})}),{props:ot,styles:rt});customElements.define("calendar-date",ht);function pt(e){return ke(ne,{children:[De("label",{part:"label",for:"s",children:De("slot",{name:"label",children:e.label})}),De("select",{id:"s",part:"select",onchange:e.onChange,children:e.options.map((e=>De("option",{part:"option",...e})))})]})}const ft=[Se,xe];function mt(e,t){return Array.from({length:e},((e,n)=>t(n)))}function yt(e){const{min:t,max:n,focusedDate:o}=be(Qe),r=_("focusday",{bubbles:!0}),a=o.toPlainYearMonth(),s=a.year,c=Math.floor(e.maxYears/2),i=s-c,l=s+(e.maxYears-c-1),u=Math.max(i,t?.year??-1/0),d=Math.min(l,n?.year??1/0),h=mt(d-u+1,(e=>{const t=u+e;return{label:`${t}`,value:`${t}`,selected:t===a.year}}));function p(e){const t=parseInt(e.currentTarget.value)-a.year;r(o.add({years:t}))}return{options:h,onChange:p}}const bt=O((e=>{const t=yt(e);return De("host",{shadowDom:!0,children:De(pt,{label:"Year",...t})})}),{props:{maxYears:{type:Number,value:20}},styles:ft});customElements.define("calendar-select-year",bt);function gt(e){const{min:t,max:n,focusedDate:o,locale:r}=be(Qe),a=_("focusday",{bubbles:!0}),s=z((()=>({month:e.formatMonth})),[e.formatMonth]),c=Le(s,r),i=z((()=>{const e=[],t=new Date;t.setUTCDate(1);for(var n=0;n<12;n++){const n=(t.getUTCMonth()+12)%12;e[n]=c.format(t),t.setUTCMonth(t.getUTCMonth()+1)}return e}),[c]),l=o.toPlainYearMonth(),u=i.map(((e,o)=>{const r=o+1,a=l.add({months:r-l.month}),s=t!=null&&U.compare(a,t)<0||n!=null&&U.compare(a,n)>0;return{label:e,value:`${r}`,disabled:s,selected:r===l.month}}));function d(e){const t=parseInt(e.currentTarget.value)-l.month;a(o.add({months:t}))}return{options:u,onChange:d}}const vt=O((e=>{const t=gt(e);return De("host",{shadowDom:!0,children:De(pt,{label:"Month",...t})})}),{props:{formatMonth:{type:String,value:()=>"long"}},styles:ft});customElements.define("calendar-select-month",vt);const wt=(e,t)=>
70C.compare(e,t)<0?[e,t]:[t,e],Ct=O((e=>{const[t,n]=je("value"),[o=t[0],r]=We("focusedDate"),a=dt({...e,focusedDate:o,setFocusedDate:r}),s=_("rangestart"),c=_("rangeend"),[i,l]=We("tentative"),[u,d]=j();B((()=>d(void 0)),[i]);function h(e){a.onFocus(e),p(e)}function p(e){e.stopPropagation(),i&&d(e.detail)}function m(e){const t=e.detail;e.stopPropagation(),i?(n(wt(i,t)),l(void 0),c(Oe(t)),a.dispatch()):(l(t),s(Oe(t)))}const y=i?wt(i,u??i):t;return De("host",{shadowDom:!0,focus:a.focus,children:De(nt,{...e,...a,type:"range",value:y,onFocus:h,onHover:p,onSelect:m})})}),{props:{...ot,tentative:{type:String,value:""}},styles:rt});customElements.define("calendar-range",Ct);const Dt=O((e=>{const[t,n]=ze("value"),[o=t[0],r]=We("focusedDate"),a=dt({...e,focusedDate:o,setFocusedDate:r});function s(e){const o=[...t],r=t.findIndex((t=>t.equals(e.detail)));r<0?o.push(e.detail):o.splice(r,1),n(o),a.dispatch()}return De("host",{shadowDom:!0,focus:a.focus,children:De(nt,{...e,...a,type:"multi",value:t,onSelect:s})})}),{props:ot,styles:rt});customElements.define("calendar-multi",Dt);export{ht as CalendarDate,et as CalendarMonth,Dt as CalendarMulti,Ct as CalendarRange,vt as CalendarSelectMonth,bt as CalendarSelectYear};
71

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.