@tabworthy/components 0.8.7 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-w-Wtojyv.js → index-B1s0tI-Z.js} +21 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/tabworthy-components.cjs.js +2 -2
- package/dist/cjs/tabworthy-dates-calendar_2.cjs.entry.js +1960 -8
- package/dist/cjs/tabworthy-dates.cjs.entry.js +11 -9
- package/dist/cjs/tabworthy-times-picker.cjs.entry.js +1 -1
- package/dist/cjs/tabworthy-times.cjs.entry.js +6 -5
- package/dist/collection/components/tabworthy-dates/tabworthy-dates.js +34 -8
- package/dist/collection/components/tabworthy-modal/tabworthy-dates-modal.css +4 -1
- package/dist/collection/components/tabworthy-modal/tabworthy-dates-modal.js +257 -5
- package/dist/collection/components/tabworthy-times/tabworthy-times.js +29 -4
- package/dist/components/index.js +1 -1
- package/dist/components/{p-DT8TK_a8.js → p-B8sG1vGD.js} +1 -1
- package/dist/components/{p-Bnmroodq.js → p-B9YA6avR.js} +1 -1
- package/dist/components/p-B9fGfjA-.js +1 -0
- package/dist/components/p-BiJ0HZVY.js +1 -0
- package/dist/components/tabworthy-dates-calendar.js +1 -1
- package/dist/components/tabworthy-dates-modal.js +1 -1
- package/dist/components/tabworthy-dates.js +1 -1
- package/dist/components/tabworthy-times-picker.js +1 -1
- package/dist/components/tabworthy-times.js +1 -1
- package/dist/esm/{index-CDFauf_3.js → index-CwtZ_Lud.js} +21 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/tabworthy-components.js +3 -3
- package/dist/esm/tabworthy-dates-calendar_2.entry.js +1960 -8
- package/dist/esm/tabworthy-dates.entry.js +11 -9
- package/dist/esm/tabworthy-times-picker.entry.js +1 -1
- package/dist/esm/tabworthy-times.entry.js +6 -5
- package/dist/tabworthy-components/{p-224503da.entry.js → p-0e77d058.entry.js} +1 -1
- package/dist/tabworthy-components/{p-8416e0a9.entry.js → p-4eec41e5.entry.js} +1 -1
- package/dist/tabworthy-components/p-CwtZ_Lud.js +2 -0
- package/dist/tabworthy-components/p-ee41beed.entry.js +1 -0
- package/dist/tabworthy-components/{p-dcb3ea8d.entry.js → p-fdb3b911.entry.js} +1 -1
- package/dist/tabworthy-components/tabworthy-components.esm.js +1 -1
- package/dist/themes/light.css +1 -1
- package/dist/types/components/tabworthy-dates/tabworthy-dates.d.ts +7 -1
- package/dist/types/components/tabworthy-modal/tabworthy-dates-modal.d.ts +27 -0
- package/dist/types/components/tabworthy-times/tabworthy-times.d.ts +7 -2
- package/dist/types/components.d.ts +54 -0
- package/package.json +2 -1
- package/dist/components/p-CGobNAdR.js +0 -1
- package/dist/components/p-Kr35QPhi.js +0 -1
- package/dist/tabworthy-components/p-CDFauf_3.js +0 -2
- package/dist/tabworthy-components/p-e66c010b.entry.js +0 -1
|
@@ -9,16 +9,22 @@ import { DatesLabels } from "./components/tabworthy-dates/tabworthy-dates";
|
|
|
9
9
|
import { DatesCalendarLabels, YearChangedEventDetails } from "./components/tabworthy-dates-calendar/tabworthy-dates-calendar";
|
|
10
10
|
import { ChronoOptions, ChronoParsedDateString } from "../shared/utils/chrono-parser/chrono-parser.type";
|
|
11
11
|
import { DatesCalendarLabels as DatesCalendarLabels1, MonthChangedEventDetails, YearChangedEventDetails as YearChangedEventDetails1 } from "./components/tabworthy-dates-calendar/tabworthy-dates-calendar";
|
|
12
|
+
import { Placement } from "@popperjs/core";
|
|
12
13
|
import { TimesLabels } from "./components/tabworthy-times/tabworthy-times";
|
|
13
14
|
import { InclusivekTimesPickerLabels, TimeValue } from "./components/tabworthy-times-picker/tabworthy-times-picker";
|
|
14
15
|
export { DatesLabels } from "./components/tabworthy-dates/tabworthy-dates";
|
|
15
16
|
export { DatesCalendarLabels, YearChangedEventDetails } from "./components/tabworthy-dates-calendar/tabworthy-dates-calendar";
|
|
16
17
|
export { ChronoOptions, ChronoParsedDateString } from "../shared/utils/chrono-parser/chrono-parser.type";
|
|
17
18
|
export { DatesCalendarLabels as DatesCalendarLabels1, MonthChangedEventDetails, YearChangedEventDetails as YearChangedEventDetails1 } from "./components/tabworthy-dates-calendar/tabworthy-dates-calendar";
|
|
19
|
+
export { Placement } from "@popperjs/core";
|
|
18
20
|
export { TimesLabels } from "./components/tabworthy-times/tabworthy-times";
|
|
19
21
|
export { InclusivekTimesPickerLabels, TimeValue } from "./components/tabworthy-times-picker/tabworthy-times-picker";
|
|
20
22
|
export namespace Components {
|
|
21
23
|
interface TabworthyDates {
|
|
24
|
+
/**
|
|
25
|
+
* Element to append the dropdown to. Use "body" to append to document.body, or pass a CSS selector or HTMLElement. Useful for escaping overflow:hidden containers.
|
|
26
|
+
*/
|
|
27
|
+
"appendTo"?: string | HTMLElement;
|
|
22
28
|
"calendarButtonContent"?: string;
|
|
23
29
|
"datesCalendarLabels"?: DatesCalendarLabels;
|
|
24
30
|
/**
|
|
@@ -207,6 +213,10 @@ export namespace Components {
|
|
|
207
213
|
"value"?: Date | Date[] | null;
|
|
208
214
|
}
|
|
209
215
|
interface TabworthyDatesModal {
|
|
216
|
+
/**
|
|
217
|
+
* Element to append the dropdown to. Use "body" to append to document.body, or pass a CSS selector or HTMLElement. When set, the dropdown will be portaled to escape overflow:hidden containers.
|
|
218
|
+
*/
|
|
219
|
+
"appendTo"?: string | HTMLElement;
|
|
210
220
|
/**
|
|
211
221
|
* Close the dialog.
|
|
212
222
|
*/
|
|
@@ -217,13 +227,31 @@ export namespace Components {
|
|
|
217
227
|
*/
|
|
218
228
|
"inline"?: boolean;
|
|
219
229
|
"label": string;
|
|
230
|
+
/**
|
|
231
|
+
* Offset from the trigger element [skidding, distance]
|
|
232
|
+
* @default [0, 8]
|
|
233
|
+
*/
|
|
234
|
+
"offset": [number, number];
|
|
220
235
|
/**
|
|
221
236
|
* Open the dialog.
|
|
222
237
|
*/
|
|
223
238
|
"open": () => Promise<void>;
|
|
239
|
+
/**
|
|
240
|
+
* Preferred placement of the dropdown (Popper.js placement)
|
|
241
|
+
* @default "bottom-start"
|
|
242
|
+
*/
|
|
243
|
+
"placement": Placement;
|
|
224
244
|
"setTriggerElement": (element: HTMLElement) => Promise<void>;
|
|
245
|
+
/**
|
|
246
|
+
* Force update the popper position
|
|
247
|
+
*/
|
|
248
|
+
"updatePosition": () => Promise<void>;
|
|
225
249
|
}
|
|
226
250
|
interface TabworthyTimes {
|
|
251
|
+
/**
|
|
252
|
+
* Element to append the dropdown to. Use "body" to append to document.body, or pass a CSS selector or HTMLElement. Useful for escaping overflow:hidden containers.
|
|
253
|
+
*/
|
|
254
|
+
"appendTo"?: string | HTMLElement;
|
|
227
255
|
"calendarButtonContent"?: string;
|
|
228
256
|
"clearValue": () => Promise<void>;
|
|
229
257
|
"datesCalendarLabels"?: DatesCalendarLabels;
|
|
@@ -477,6 +505,10 @@ declare namespace LocalJSX {
|
|
|
477
505
|
type OneOf<K extends string, PropT, AttrT = PropT> = { [P in K]: PropT } & { [P in `attr:${K}` | `prop:${K}`]?: never } | { [P in `attr:${K}`]: AttrT } & { [P in K | `prop:${K}`]?: never } | { [P in `prop:${K}`]: PropT } & { [P in K | `attr:${K}`]?: never };
|
|
478
506
|
|
|
479
507
|
interface TabworthyDates {
|
|
508
|
+
/**
|
|
509
|
+
* Element to append the dropdown to. Use "body" to append to document.body, or pass a CSS selector or HTMLElement. Useful for escaping overflow:hidden containers.
|
|
510
|
+
*/
|
|
511
|
+
"appendTo"?: string | HTMLElement;
|
|
480
512
|
"calendarButtonContent"?: string;
|
|
481
513
|
"datesCalendarLabels"?: DatesCalendarLabels;
|
|
482
514
|
/**
|
|
@@ -670,15 +702,33 @@ declare namespace LocalJSX {
|
|
|
670
702
|
"value"?: Date | Date[] | null;
|
|
671
703
|
}
|
|
672
704
|
interface TabworthyDatesModal {
|
|
705
|
+
/**
|
|
706
|
+
* Element to append the dropdown to. Use "body" to append to document.body, or pass a CSS selector or HTMLElement. When set, the dropdown will be portaled to escape overflow:hidden containers.
|
|
707
|
+
*/
|
|
708
|
+
"appendTo"?: string | HTMLElement;
|
|
673
709
|
/**
|
|
674
710
|
* @default false
|
|
675
711
|
*/
|
|
676
712
|
"inline"?: boolean;
|
|
677
713
|
"label": string;
|
|
714
|
+
/**
|
|
715
|
+
* Offset from the trigger element [skidding, distance]
|
|
716
|
+
* @default [0, 8]
|
|
717
|
+
*/
|
|
718
|
+
"offset"?: [number, number];
|
|
678
719
|
"onClosed"?: (event: TabworthyDatesModalCustomEvent<any>) => void;
|
|
679
720
|
"onOpened"?: (event: TabworthyDatesModalCustomEvent<any>) => void;
|
|
721
|
+
/**
|
|
722
|
+
* Preferred placement of the dropdown (Popper.js placement)
|
|
723
|
+
* @default "bottom-start"
|
|
724
|
+
*/
|
|
725
|
+
"placement"?: Placement;
|
|
680
726
|
}
|
|
681
727
|
interface TabworthyTimes {
|
|
728
|
+
/**
|
|
729
|
+
* Element to append the dropdown to. Use "body" to append to document.body, or pass a CSS selector or HTMLElement. Useful for escaping overflow:hidden containers.
|
|
730
|
+
*/
|
|
731
|
+
"appendTo"?: string | HTMLElement;
|
|
682
732
|
"calendarButtonContent"?: string;
|
|
683
733
|
"datesCalendarLabels"?: DatesCalendarLabels;
|
|
684
734
|
/**
|
|
@@ -841,6 +891,7 @@ declare namespace LocalJSX {
|
|
|
841
891
|
"showQuickButtons": boolean;
|
|
842
892
|
"disableFreeformInput": boolean;
|
|
843
893
|
"inputClass": string;
|
|
894
|
+
"appendTo": string | HTMLElement;
|
|
844
895
|
}
|
|
845
896
|
interface TabworthyDatesCalendarAttributes {
|
|
846
897
|
"clearButtonContent": string;
|
|
@@ -869,6 +920,8 @@ declare namespace LocalJSX {
|
|
|
869
920
|
interface TabworthyDatesModalAttributes {
|
|
870
921
|
"label": string;
|
|
871
922
|
"inline": boolean;
|
|
923
|
+
"placement": Placement;
|
|
924
|
+
"appendTo": string | HTMLElement;
|
|
872
925
|
}
|
|
873
926
|
interface TabworthyTimesAttributes {
|
|
874
927
|
"id": string;
|
|
@@ -896,6 +949,7 @@ declare namespace LocalJSX {
|
|
|
896
949
|
"inputShouldFormat": string;
|
|
897
950
|
"disableFreeformInput": boolean;
|
|
898
951
|
"inputClass": string;
|
|
952
|
+
"appendTo": string | HTMLElement;
|
|
899
953
|
}
|
|
900
954
|
interface TabworthyTimesPickerAttributes {
|
|
901
955
|
"hours": number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tabworthy/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Small, accessible datepicker and datetimepicker Web Components with natural language date input.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@a11y/focus-trap": "^1.0.5",
|
|
69
|
+
"@popperjs/core": "^2.11.8",
|
|
69
70
|
"@react-aria/live-announcer": "^3.1.2",
|
|
70
71
|
"aria-hidden": "^1.2.2",
|
|
71
72
|
"chrono-node": "^2.5.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t,H as e,c as i,h as n,d as s,t as a}from"./p-Kr35QPhi.js";function o(t,e,i,n=20,s=0){let a=[];if(s>=n)return a;const r=t=>{const a=t.assignedNodes().filter((t=>1===t.nodeType));return a.length>0?o(a[0].parentElement,e,i,n,s+1):[]},h=Array.from(t.children||[]);for(const t of h)e(t)||(i(t)&&a.push(t),null!=t.shadowRoot?a.push(...o(t.shadowRoot,e,i,n,s+1)):"SLOT"===t.tagName?a.push(...r(t)):a.push(...o(t,e,i,n,s+1)));return a}function r(t){return t.hasAttribute("hidden")||t.hasAttribute("aria-hidden")&&"false"!==t.getAttribute("aria-hidden")||"none"===t.style.display||"0"===t.style.opacity||"hidden"===t.style.visibility||"collapse"===t.style.visibility}function h(t){return"-1"!==t.getAttribute("tabindex")&&!r(t)&&!function(t){return t.hasAttribute("disabled")||t.hasAttribute("aria-disabled")&&"false"!==t.getAttribute("aria-disabled")}(t)&&(t.hasAttribute("tabindex")||(t instanceof HTMLAnchorElement||t instanceof HTMLAreaElement)&&t.hasAttribute("href")||t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t instanceof HTMLIFrameElement)}const c=new Map,d=document.createElement("template");d.innerHTML='\n\t<div id="start"></div>\n\t<div id="backup"></div>\n\t<slot></slot>\n\t<div id="end"></div>\n';class u extends HTMLElement{constructor(){super(),this.debounceId=Math.random().toString(),this._focused=!1;const t=this.attachShadow({mode:"open"});t.appendChild(d.content.cloneNode(!0)),this.$backup=t.querySelector("#backup"),this.$start=t.querySelector("#start"),this.$end=t.querySelector("#end"),this.focusLastElement=this.focusLastElement.bind(this),this.focusFirstElement=this.focusFirstElement.bind(this),this.onFocusIn=this.onFocusIn.bind(this),this.onFocusOut=this.onFocusOut.bind(this)}static get observedAttributes(){return["inactive"]}get inactive(){return this.hasAttribute("inactive")}set inactive(t){t?this.setAttribute("inactive",""):this.removeAttribute("inactive")}get focused(){return this._focused}connectedCallback(){this.$start.addEventListener("focus",this.focusLastElement),this.$end.addEventListener("focus",this.focusFirstElement),this.addEventListener("focusin",this.onFocusIn),this.addEventListener("focusout",this.onFocusOut),this.render()}disconnectedCallback(){this.$start.removeEventListener("focus",this.focusLastElement),this.$end.removeEventListener("focus",this.focusFirstElement),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut)}attributeChangedCallback(){this.render()}focusFirstElement(){this.trapFocus()}focusLastElement(){this.trapFocus(!0)}getFocusableElements(){return o(this,r,h)}trapFocus(t){if(this.inactive)return;let e=this.getFocusableElements();e.length>0?(t?e[e.length-1].focus():e[0].focus(),this.$backup.setAttribute("tabindex","-1")):(this.$backup.setAttribute("tabindex","0"),this.$backup.focus())}onFocusIn(){this.updateFocused(!0)}onFocusOut(){this.updateFocused(!1)}updateFocused(t){!function(t,e,i){const n=c.get(i);null!=n&&window.clearTimeout(n),c.set(i,window.setTimeout((()=>{t(),c.delete(i)}),0))}((()=>{this.focused!==t&&(this._focused=t,this.render())}),0,this.debounceId)}render(){this.$start.setAttribute("tabindex",!this.focused||this.inactive?"-1":"0"),this.$end.setAttribute("tabindex",!this.focused||this.inactive?"-1":"0"),this.focused?this.setAttribute("focused",""):this.removeAttribute("focused")}}window.customElements.define("focus-trap",u);var f=new WeakMap,l=new WeakMap,b={},p=0,m=function(t){return t&&(t.host||m(t.parentNode))},v=function(t,e,i){void 0===i&&(i="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=function(t){return"undefined"==typeof document?null:(Array.isArray(t)?t[0]:t).ownerDocument.body}(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),function(t,e,i,n){var s=function(t,e){return e.map((function(e){if(t.contains(e))return e;var i=m(e);return i&&t.contains(i)?i:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)})).filter((function(t){return Boolean(t)}))}(e,Array.isArray(t)?t:[t]);b[i]||(b[i]=new WeakMap);var a=b[i],o=[],r=new Set,h=new Set(s),c=function(t){t&&!r.has(t)&&(r.add(t),c(t.parentNode))};s.forEach(c);var d=function(t){t&&!h.has(t)&&Array.prototype.forEach.call(t.children,(function(t){if(r.has(t))d(t);else{var e=t.getAttribute(n),s=null!==e&&"false"!==e,h=(f.get(t)||0)+1,c=(a.get(t)||0)+1;f.set(t,h),a.set(t,c),o.push(t),1===h&&s&&l.set(t,!0),1===c&&t.setAttribute(i,"true"),s||t.setAttribute(n,"true")}}))};return d(e),r.clear(),p++,function(){o.forEach((function(t){var e=f.get(t)-1,s=a.get(t)-1;f.set(t,e),a.set(t,s),e||(l.has(t)||t.removeAttribute(n),l.delete(t)),s||t.removeAttribute(i)})),--p||(f=new WeakMap,f=new WeakMap,l=new WeakMap,b={})}}(n,s,i,"aria-hidden")):function(){return null}};const y=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.opened=i(this,"opened",7),this.closed=i(this,"closed",7),this.inline=!1,this.closing=!1,this.showing=this.inline||!1,this.onKeyDown=t=>{"Escape"===t.code&&this.close()}}async open(){this.inline||(this.showing=!0,this.undo=v(this.el),this.opened.emit(void 0))}async close(){this.inline||(this.showing=!1,this.closed.emit(void 0),this.undo(),this.triggerElement&&this.triggerElement.focus())}async getState(){return this.showing}async setTriggerElement(t){this.triggerElement=t}handleClick(t){this.showing&&!this.el.contains(t.target)&&this.close()}render(){return n(s,{key:"e5e440df97f5b2f51f742892ca591aff3a3e51a9",showing:this.showing,ref:t=>t&&(this.el=t)},!this.inline&&this.showing&&n("div",{key:"f3b5f92b0f3b8eb54f665a14fcaa1616d59b182b",part:"body",onKeyDown:this.onKeyDown,role:"dialog",tabindex:-1,"aria-hidden":!this.showing,"aria-label":this.label,"aria-modal":this.showing},n("focus-trap",{key:"f94c02a8db391d671adc08ac1742dc6fabca72d3"},n("div",{key:"888259505b6a2416674523d6a6924272b676daad",part:"content"},n("slot",{key:"e4e141ecae238f68fdde53baca66f478ebb93f88"})))),this.inline&&n("div",{key:"f2e7fb2614274d5dc7d03f10a0ee760363438435",part:"content"},n("slot",{key:"f845ef9c46b146ac916c90bb2fcec1f357aee5ee"})))}static get style(){return":host::part(body){position:absolute;width:-moz-fit-content;width:fit-content;z-index:1200;margin-top:0.5rem}:host::part(backdrop){}:host::part(content){}"}},[257,"tabworthy-dates-modal",{label:[1],inline:[4],closing:[32],showing:[32],open:[64],close:[64],getState:[64],setTriggerElement:[64]},[[10,"click","handleClick"]]]);function w(){"undefined"!=typeof customElements&&["tabworthy-dates-modal"].forEach((t=>{"tabworthy-dates-modal"===t&&(customElements.get(a(t))||customElements.define(a(t),y))}))}export{y as I,w as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t,n=(t,n)=>{var e;Object.entries(null!=(e=n.o.t)?e:{}).map((([e,[o]])=>{if(31&o||32&o){const o=t[e],l=function(t,n){for(;t;){const e=Object.getOwnPropertyDescriptor(t,n);if(null==e?void 0:e.get)return e;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);l&&Object.defineProperty(t,e,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),t[e]=n.l.has(e)?n.l.get(e):o}}))},e=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,n)=>n in t,l=(t,n)=>(0,console.error)(t,n),s=new Map,i="undefined"!=typeof window?window:{},r=i.HTMLElement||class{},c={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},f=(()=>{var t;let n=!1;try{null==(t=i.document)||t.addEventListener("e",null,Object.defineProperty({},"passive",{get(){n=!0}}))}catch(t){}return n})(),u=(()=>{try{return!!i.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),a=!!u&&(()=>!!i.document&&Object.getOwnPropertyDescriptor(i.document.adoptedStyleSheets,"length").writable)(),d=!1,p=[],h=[],v=(t,n)=>e=>{t.push(e),d||(d=!0,n&&4&c.i?y(m):c.raf(m))},b=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){l(t)}t.length=0},m=()=>{b(p),b(h),(d=p.length>0)&&c.raf(m)},y=t=>Promise.resolve(undefined).then(t),$=v(h,!0),g=t=>{const n=new URL(t,c.u);return n.origin!==i.location.origin?n.href:n.pathname},w=t=>c.u=t;function j(){const n=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(a?n.adoptedStyleSheets.push(t):n.adoptedStyleSheets=[...n.adoptedStyleSheets,t])}var O=t=>{const n=M(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&S(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!N(t,E(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&M(t,"childNodes").length&&O(t)}};function S(t,n,e){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&(!n||o["s-hn"]===n)&&(void 0===e||E(o)===e)&&(s.push(o),void 0!==e))return s;s=[...s,...S(o.childNodes,n,e)]}return s}var N=(t,n,e=!0)=>{const o=[];(e&&t["s-sr"]||!t["s-sr"])&&o.push(t);let l=t;for(;l=l.nextSibling;)E(l)!==n||!e&&l["s-sr"]||o.push(l);return o},k=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,E=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function M(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}var _,A,C,x=new WeakMap,R=t=>"sc-"+t.p,F=t=>"object"==(t=typeof t)||"function"===t,L=(t,n,...e)=>{let o=null,l=null,s=null,i=!1,r=!1;const c=[],f=n=>{for(let e=0;e<n.length;e++)o=n[e],Array.isArray(o)?f(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!F(o))&&(o=String(o)),i&&r?c[c.length-1].h+=o:c.push(i?D(null,o):o),r=i)};if(f(e),n){n.key&&(l=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}if("function"==typeof t)return t(null===n?{}:n,c,T);const u=D(t,null);return u.v=n,c.length>0&&(u.m=c),u.$=l,u.j=s,u},D=(t,n)=>({i:0,O:t,h:null!=n?n:null,S:null,m:null,v:null,$:null,j:null}),P={},T={forEach:(t,n)=>t.map(U).forEach(n),map:(t,n)=>t.map(U).map(n).map(W)},U=t=>({vattrs:t.v,vchildren:t.m,vkey:t.$,vname:t.j,vtag:t.O,vtext:t.h}),W=t=>{if("function"==typeof t.vtag){const n={...t.vattrs};return t.vkey&&(n.key=t.vkey),t.vname&&(n.name=t.vname),L(t.vtag,n,...t.vchildren||[])}const n=D(t.vtag,t.vtext);return n.v=t.vattrs,n.m=t.vchildren,n.$=t.vkey,n.j=t.vname,n},B=(t,n)=>null==t||F(t)?t:4&n?"false"!==t&&(""===t||!!t):2&n?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&n?String(t):t,H=(t,n,e)=>{const o=t;return{emit:t=>V(o,n,{bubbles:!!(4&e),composed:!!(2&e),cancelable:!!(1&e),detail:t})}},V=(t,n,e)=>{const o=c.ce(n,e);return t.dispatchEvent(o),o},q=(t,n,l,s,r,f)=>{if(l===s)return;let u=o(t,n),a=n.toLowerCase();if("class"===n){const n=t.classList,e=Y(l);let o=Y(s);n.remove(...e.filter((t=>t&&!o.includes(t)))),n.add(...o.filter((t=>t&&!e.includes(t))))}else if("key"===n);else if("ref"===n)s&&ht(s,t);else if(t.__lookupSetter__(n)||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const o=n.slice(5);let l;{const n=e(t);if(n&&n.o&&n.o.t){const t=n.o.t[o];t&&t[1]&&(l=t[1])}}return l||(l=o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===s?"":s))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=s}catch(t){}return}{const e=F(s);if((u||e&&null!==s)&&!r)try{if(t.tagName.includes("-"))t[n]!==s&&(t[n]=s);else{const e=null==s?"":s;"list"===n?u=!1:null!=l&&t[n]===e||("function"==typeof t.__lookupSetter__(n)?t[n]=e:t.setAttribute(n,e))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(n)||t.removeAttribute(n):(!u||4&f||r)&&!e&&1===t.nodeType&&t.setAttribute(n,s=!0===s?"":s)}}else if(n="-"===n[2]?n.slice(3):o(i,a)?a.slice(2):a[2]+n.slice(3),l||s){const e=n.endsWith(I);n=n.replace(Z,""),l&&c.rel(t,n,l,e),s&&c.ael(t,n,s,e)}},z=/\s/,Y=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(z):[]),I="Capture",Z=new RegExp(I+"$"),G=(t,n,e)=>{const o=11===n.S.nodeType&&n.S.host?n.S.host:n.S,l=t&&t.v||{},s=n.v||{};for(const t of J(Object.keys(l)))t in s||q(o,t,l[t],void 0,e,n.i);for(const t of J(Object.keys(s)))q(o,t,l[t],s[t],e,n.i)};function J(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var K=!1,Q=!1,X=!1,tt=!1,nt=[],et=[],ot=(t,n,e)=>{var o;const l=n.m[e];let s,r,c,f=0;if(K||(X=!0,"slot"===l.O&&(l.i|=l.m?2:1)),null!=l.h)s=l.S=i.document.createTextNode(l.h);else if(1&l.i)s=l.S=i.document.createTextNode(""),G(null,l,tt);else{if(tt||(tt="svg"===l.O),!i.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=l.S=i.document.createElementNS(tt?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!K&&2&l.i?"slot-fb":l.O),tt&&"foreignObject"===l.O&&(tt=!1),G(null,l,tt),null!=(u=_)&&void 0!==u&&s["s-si"]!==_&&s.classList.add(s["s-si"]=_),l.m){const n="template"===l.O?s.content:s;for(f=0;f<l.m.length;++f)r=ot(t,l,f),r&&n.appendChild(r)}"svg"===l.O?tt=!1:"foreignObject"===s.tagName&&(tt=!0)}var u;return s["s-hn"]=C,3&l.i&&(s["s-sr"]=!0,s["s-cr"]=A,s["s-sn"]=l.j||"",s["s-rf"]=null==(o=l.v)?void 0:o.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===E(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}(s),c=t&&t.m&&t.m[e],c&&c.O===l.O&&t.S&<(t.S),bt(A,s,n.S,null==t?void 0:t.S)),s},lt=t=>{c.i|=1;const n=t.closest(C.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of e?o.reverse():o)null!=t["s-sh"]&&(vt(n,t,null!=e?e:null),t["s-sh"]=void 0,X=!0)}c.i&=-2},st=(t,n)=>{c.i|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===C&&e.push(n)}for(let t=e.length-1;t>=0;t--){const o=e[t];o["s-hn"]!==C&&o["s-ol"]&&(vt(ft(o).parentNode,o,ft(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,X=!0),n&&st(o,n)}c.i&=-2},it=(t,n,e,o,l,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for(r.shadowRoot&&r.tagName===C&&(r=r.shadowRoot),"template"===e.O&&(r=r.content);l<=s;++l)o[l]&&(i=ot(null,e,l),i&&(o[l].S=i,vt(r,i,ft(n))))},rt=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.S;pt(n),t&&(Q=!0,t["s-ol"]?t["s-ol"].remove():st(t,!0),t.remove())}}},ct=(t,n,e=!1)=>t.O===n.O&&("slot"===t.O?t.j===n.j:e?(e&&!t.$&&n.$&&(t.$=n.$),!0):t.$===n.$),ft=t=>t&&t["s-ol"]||t,ut=(t,n,e=!1)=>{const o=n.S=t.S,l=t.m,s=n.m,i=n.O,r=n.h;let c;null==r?(tt="svg"===i||"foreignObject"!==i&&tt,"slot"!==i||K||t.j!==n.j&&(n.S["s-sn"]=n.j||"",lt(n.S.parentElement)),G(t,n,tt),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,i,r=0,c=0,f=0,u=0,a=n.length-1,d=n[0],p=n[a],h=o.length-1,v=o[0],b=o[h];const m="template"===e.O?t.content:t;for(;r<=a&&c<=h;)if(null==d)d=n[++r];else if(null==p)p=n[--a];else if(null==v)v=o[++c];else if(null==b)b=o[--h];else if(ct(d,v,l))ut(d,v,l),d=n[++r],v=o[++c];else if(ct(p,b,l))ut(p,b,l),p=n[--a],b=o[--h];else if(ct(d,b,l))"slot"!==d.O&&"slot"!==b.O||st(d.S.parentNode,!1),ut(d,b,l),vt(m,d.S,p.S.nextSibling),d=n[++r],b=o[--h];else if(ct(p,v,l))"slot"!==d.O&&"slot"!==b.O||st(p.S.parentNode,!1),ut(p,v,l),vt(m,p.S,d.S),p=n[--a],v=o[++c];else{for(f=-1,u=r;u<=a;++u)if(n[u]&&null!==n[u].$&&n[u].$===v.$){f=u;break}f>=0?(i=n[f],i.O!==v.O?s=ot(n&&n[c],e,f):(ut(i,v,l),n[f]=void 0,s=i.S),v=o[++c]):(s=ot(n&&n[c],e,c),v=o[++c]),s&&vt(ft(d.S).parentNode,s,ft(d.S))}r>a?it(t,null==o[h+1]?null:o[h+1].S,e,o,c,h):c>h&&rt(n,r,a)})(o,l,n,s,e):null!==s?(null!==t.h&&(o.textContent=""),it(o,null,n,s,0,s.length-1)):!e&&null!==l&&rt(l,0,l.length-1),tt&&"svg"===i&&(tt=!1)):(c=o["s-cr"])?c.parentNode.textContent=r:t.h!==r&&(o.data=r)},at=[],dt=t=>{let n,e,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const l=t["s-sn"];for(o=e.length-1;o>=0;o--)if(n=e[o],!(n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||n["s-sh"]&&n["s-sh"]===t["s-hn"]))if(k(n,l)){let e=at.find((t=>t.N===n));Q=!0,n["s-sn"]=n["s-sn"]||l,e?(e.N["s-sh"]=t["s-hn"],e.k=t):(n["s-sh"]=t["s-hn"],at.push({k:t,N:n})),n["s-sr"]&&at.map((t=>{k(t.N,n["s-sn"])&&(e=at.find((t=>t.N===n)),e&&!t.k&&(t.k=e.k))}))}else at.some((t=>t.N===n))||at.push({N:n})}1===t.nodeType&&dt(t)}},pt=t=>{t.v&&t.v.ref&&nt.push((()=>t.v.ref(null))),t.m&&t.m.map(pt)},ht=(t,n)=>{et.push((()=>t(n)))},vt=(t,n,e,o)=>{if("string"==typeof n["s-sn"]&&n["s-sr"]&&n["s-cr"])bt(n["s-cr"],n,t,n.parentElement);else if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:l}=function(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=E(t)||"";return{slotNode:S(M(n,"childNodes"),n.tagName,o)[0],slotName:o}}(n);return l&&!o&&l.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1})),n}return t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)};function bt(t,n,e,o){var l,s;let i;if(t&&"string"==typeof n["s-sn"]&&n["s-sr"]&&t.parentNode&&t.parentNode["s-sc"]&&(i=n["s-si"]||t.parentNode["s-sc"])){const t=n["s-sn"],r=n["s-hn"];if(null==(l=e.classList)||l.add(i+"-s"),o&&(null==(s=o.classList)?void 0:s.contains(i+"-s"))){let n=(o.__childNodes||o.childNodes)[0],e=!1;for(;n;){if(n["s-sn"]!==t&&n["s-hn"]===r&&n["s-sr"]){e=!0;break}n=n.nextSibling}e||o.classList.remove(i+"-s")}}}var mt=(t,n,e=!1)=>{var o,l,s,r,f;const u=t.$hostElement$,a=t.o,d=t.M||D(null,null);var p;const h=(p=n)&&p.O===P?n:L(null,null,n);if(C=u.tagName,a._&&(h.v=h.v||{},a._.forEach((([t,n])=>{h.v[n]=u[t]}))),e&&h.v)for(const t of Object.keys(h.v))u.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(h.v[t]=u[t]);if(h.O=null,h.i|=4,t.M=h,h.S=d.S=u.shadowRoot||u,_=u["s-sc"],K=!(!(1&a.i)||128&a.i),A=u["s-cr"],Q=!1,ut(d,h,e),c.i|=1,X){dt(h.S);for(const t of at){const n=t.N;if(!n["s-ol"]&&i.document){const t=i.document.createTextNode("");t["s-nr"]=n,vt(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of at){const n=t.N,c=t.k;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(o=n.hidden)&&o),c){const t=c.parentNode;let o=c.nextSibling;if(o&&1===o.nodeType){let e=null==(l=n["s-ol"])?void 0:l.previousSibling;for(;e;){let l=null!=(s=e["s-nr"])?s:null;if(l&&l["s-sn"]===n["s-sn"]&&t===(l.__parentNode||l.parentNode)){for(l=l.nextSibling;l===n||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){o=l;break}}e=e.previousSibling}}if((!o&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==o)&&n!==o){if(vt(t,n,o,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=i.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,vt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(r=n["s-ih"])&&r)}n&&"function"==typeof c["s-rf"]&&c["s-rf"](c)}else 1===n.nodeType&&(n.hidden=!0)}}if(Q&&O(h.S),c.i&=-2,at.length=0,!K&&!(1&a.i)&&u["s-cr"]){const t=h.S.__childNodes||h.S.childNodes;for(const n of t)if(n["s-hn"]!==C&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(f=n.hidden)&&f),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=i.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],vt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}A=void 0,nt.forEach((t=>t())),nt.length=0,et.forEach((t=>t())),et.length=0},yt=(t,n)=>{if(n&&!t.A&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.A=()=>{n["s-p"].splice(e-1,1),o()})))}},$t=(t,n)=>{if(t.i|=16,4&t.i)return void(t.i|=512);yt(t,t.C);const e=()=>gt(t,n);if(!n)return $(e);queueMicrotask((()=>{e()}))},gt=(t,n)=>{const e=t.$hostElement$,o=e;if(!o)throw new Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=Et(o,n?"componentWillLoad":"componentWillUpdate",void 0,e),l=wt(l,(()=>Et(o,"componentWillRender",void 0,e))),wt(l,(()=>Ot(t,o,n)))},wt=(t,n)=>jt(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),jt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ot=async(t,n,e)=>{var o;const l=t.$hostElement$,r=l["s-rc"];e&&(t=>{const n=t.o,e=t.$hostElement$,o=n.i,l=((t,n)=>{var e,o,l;const r=R(n),f=s.get(r);if(!i.document)return r;if(t=11===t.nodeType?t:i.document,f)if("string"==typeof f){let l,s=x.get(t=t.head||t);if(s||x.set(t,s=new Set),!s.has(r)){l=i.document.createElement("style"),l.textContent=f;const d=null!=(e=c.R)?e:function(){var t,n,e;return null!=(e=null==(n=null==(t=i.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?e:void 0}();if(null!=d&&l.setAttribute("nonce",d),!(1&n.i))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(u){const n=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(f),a?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=f+n.textContent:t.prepend(l)}else t.append(l);1&n.i&&t.insertBefore(l,null),4&n.i&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),s&&s.add(r)}}else{let n=x.get(t);if(n||x.set(t,n=new Set),!n.has(r)){const e=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(f.constructor===e.CSSStyleSheet)o=f;else{o=new e.CSSStyleSheet;for(let t=0;t<f.cssRules.length;t++)o.insertRule(f.cssRules[t].cssText,t)}a?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],n.add(r)}}return r})(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);10&o&&(e["s-sc"]=l,e.classList.add(l+"-h"))})(t);St(t,n,l,e),r&&(r.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>Nt(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.i|=4,n.length=0)}},St=(t,n,e,o)=>{try{n=n.render(),t.i&=-17,t.i|=2,mt(t,n,o)}catch(n){l(n,t.$hostElement$)}return null},Nt=t=>{const n=t.$hostElement$,e=n,o=t.C;Et(e,"componentDidRender",void 0,n),64&t.i?Et(e,"componentDidUpdate",void 0,n):(t.i|=64,Mt(n),Et(e,"componentDidLoad",void 0,n),t.F(n),o||kt()),t.A&&(t.A(),t.A=void 0),512&t.i&&y((()=>$t(t,!1))),t.i&=-517},kt=()=>{y((()=>V(i,"appload",{detail:{namespace:"tabworthy-components"}})))},Et=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){l(t,o)}},Mt=t=>t.classList.add("hydrated"),_t=(t,n,o,s)=>{const i=e(t);if(!i)return;const r=t,c=i.l.get(n),f=i.i,u=r;o=B(o,s.t[n][0]);const a=Number.isNaN(c)&&Number.isNaN(o);if(o!==c&&!a){if(i.l.set(n,o),s.L){const t=s.L[n];t&&t.map((t=>{try{const[[e,l]]=Object.entries(t);(128&f||1&l)&&(u?u[e](o,c,n):i.D.push((()=>{i.P[e](o,c,n)})))}catch(t){l(t,r)}}))}if(2&f){if(u.componentShouldUpdate&&!1===u.componentShouldUpdate(o,c,n)&&!(16&f))return;16&f||$t(i,!1)}}},At=(t,n)=>{var o,l;const s=t.prototype;{t.watchers&&!n.L&&(n.L=t.watchers),t.deserializers&&!n.T&&(n.T=t.deserializers),t.serializers&&!n.U&&(n.U=t.serializers);const i=Object.entries(null!=(o=n.t)?o:{});i.map((([t,[o]])=>{if(31&o||32&o){const{get:l,set:i}=Object.getOwnPropertyDescriptor(s,t)||{};l&&(n.t[t][0]|=2048),i&&(n.t[t][0]|=4096),Object.defineProperty(s,t,{get(){return l?l.apply(this):(n=t,e(this).l.get(n));var n},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(l){const s=e(this);if(s){if(i)return void 0===(32&o?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(l=s.l.get(t)),i.apply(this,[B(l,o)]),void _t(this,t,l=32&o?this[t]:s.$hostElement$[t],n);_t(this,t,l,n)}}})}}));{const o=new Map;s.attributeChangedCallback=function(t,l,r){c.jmp((()=>{var c;const f=o.get(t),u=e(this);if(this.hasOwnProperty(f),s.hasOwnProperty(f)&&"number"==typeof this[f]&&this[f]==r)return;if(null==f){const e=null==u?void 0:u.i;if(u&&e&&!(8&e)&&r!==l){const o=this,s=null==(c=n.L)?void 0:c[t];null==s||s.forEach((n=>{const[[s,i]]=Object.entries(n);null!=o[s]&&(128&e||1&i)&&o[s].call(o,r,l,t)}))}return}const a=i.find((([t])=>t===f));a&&4&a[1][0]&&(r=null!==r&&"false"!==r);const d=Object.getOwnPropertyDescriptor(s,f);r==this[f]||d.get&&!d.set||(this[f]=r)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n.L)?l:{}),...i.filter((([t,n])=>31&n[0])).map((([t,e])=>{var l;const s=e[1]||t;return o.set(s,t),512&e[0]&&(null==(l=n._)||l.push([t,s])),s}))]))}}return t},Ct=(t,o)=>{const r={i:o[0],p:o[1]};try{r.t=o[2],r.W=o[3],r.L=t.L,r.T=t.T,r.U=t.U,r._=[];const f=t.prototype.connectedCallback,a=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const o={i:0,$hostElement$:t,o:e,l:new Map,B:new Map};o.H=new Promise((t=>o.F=t)),t["s-p"]=[],t["s-rc"]=[];const l=o;t.__stencil__getHostRef=()=>l,512&e.i&&n(t,o)})(this,r)},connectedCallback(){if(!this.__hasHostListenerAttached){const t=e(this);if(!t)return;xt(this,t,r.W),this.__hasHostListenerAttached=!0}(t=>{if(!(1&c.i)){const n=e(t);if(!n)return;const o=n.o,r=()=>{};if(1&n.i)xt(t,n,o.W),(null==n?void 0:n.P)||(null==n?void 0:n.H)&&n.H.then((()=>{}));else{n.i|=1,12&o.i&&(t=>{if(!i.document)return;const n=t["s-cr"]=i.document.createComment("");n["s-cn"]=!0,vt(t,n,t.firstChild)})(t);{let e=t;for(;e=e.parentNode||e.host;)if(e["s-p"]){yt(n,n.C=e);break}}o.t&&Object.entries(o.t).map((([n,[e]])=>{if(31&e&&n in t&&t[n]!==Object.prototype[n]){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let o;try{if(!(32&n.i)&&(n.i|=32,o=t.constructor,customElements.whenDefined(t.localName).then((()=>n.i|=128)),o&&o.style)){let t;"string"==typeof o.style&&(t=o.style);const n=R(e);if(!s.has(n)){const o=()=>{};((t,n,e)=>{let o=s.get(t);u&&e?(o=o||new CSSStyleSheet,"string"==typeof o?o=n:o.replaceSync(n)):o=n,s.set(t,o)})(n,t,!!(1&e.i)),o()}}const l=n.C,i=()=>$t(n,!0);l&&l["s-rc"]?l["s-rc"].push(i):i()}catch(e){l(e,t),n.A&&(n.A(),n.A=void 0),n.F&&n.F(t)}})(t,n,o)}r()}})(this),f&&f.call(this)},disconnectedCallback(){(async t=>{if(!(1&c.i)){const n=e(t);(null==n?void 0:n.V)&&(n.V.map((t=>t())),n.V=void 0)}x.has(t)&&x.delete(t),t.shadowRoot&&x.has(t.shadowRoot)&&x.delete(t.shadowRoot)})(this),a&&a.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${r.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else j.call(this,r)}}),Object.defineProperty(t,"is",{value:r.p,configurable:!0}),At(t,r)}catch(n){return l(n),t}},xt=(t,n,e)=>{e&&i.document&&e.map((([e,o,l])=>{const s=Ft(i.document,t,e),r=Rt(n,l),f=Lt(e);c.ael(s,o,r,f),(n.V=n.V||[]).push((()=>c.rel(s,o,r,f)))}))},Rt=(t,n)=>e=>{try{t.$hostElement$[n](e)}catch(n){l(n,t.$hostElement$)}},Ft=(t,n,e)=>8&e?i:n,Lt=t=>f?{passive:!!(1&t),capture:!!(2&t)}:!!(2&t),Dt=t=>c.R=t,Pt=t=>Object.assign(c,t);function Tt(t,n){mt({o:{i:0,p:n.tagName},$hostElement$:n},t)}function Ut(t){return t}export{r as H,Dt as a,Pt as b,H as c,P as d,g,L as h,Ct as p,Tt as r,w as s,Ut as t}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var t,n=(t,n)=>{var e;Object.entries(null!=(e=n.o.t)?e:{}).map((([e,[o]])=>{if(31&o||32&o){const o=t[e],l=function(t,n){for(;t;){const e=Object.getOwnPropertyDescriptor(t,n);if(null==e?void 0:e.get)return e;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);l&&Object.defineProperty(t,e,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),t[e]=n.l.has(e)?n.l.get(e):o}}))},e=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},o=(t,e)=>{e&&(t.__stencil__getHostRef=()=>e,e.i=t,512&e.o.u&&n(t,e))},l=(t,n)=>n in t,s=(t,n)=>(0,console.error)(t,n),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},f={u:0,p:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},a=t=>Promise.resolve(t),d=(()=>{try{return!!u.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),p=!!d&&(()=>!!u.document&&Object.getOwnPropertyDescriptor(u.document.adoptedStyleSheets,"length").writable)(),v=!1,h=[],m=[],y=(t,n)=>e=>{t.push(e),v||(v=!0,n&&4&f.u?w($):f.raf($))},b=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){s(t)}t.length=0},$=()=>{b(h),b(m),(v=h.length>0)&&f.raf($)},w=t=>a().then(t),g=y(m,!0);function j(){const n=this.attachShadow({mode:"open"});void 0===t&&(t=null),t&&(p?n.adoptedStyleSheets.push(t):n.adoptedStyleSheets=[...n.adoptedStyleSheets,t])}var O=t=>{const n=E(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&S(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!k(t,C(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&E(t,"childNodes").length&&O(t)}};function S(t,n,e){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&(!n||o["s-hn"]===n)&&(void 0===e||C(o)===e)&&(s.push(o),void 0!==e))return s;s=[...s,...S(o.childNodes,n,e)]}return s}var k=(t,n,e=!0)=>{const o=[];(e&&t["s-sr"]||!t["s-sr"])&&o.push(t);let l=t;for(;l=l.nextSibling;)C(l)!==n||!e&&l["s-sr"]||o.push(l);return o},N=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,C=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function E(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}function M(t){var n,e,o;return null!=(o=null==(e=null==(n=t.head)?void 0:n.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?o:void 0}var R,x,T,A=new WeakMap,L=t=>"sc-"+t.v,F=t=>"object"==(t=typeof t)||"function"===t,P=(t,n,...e)=>{let o=null,l=null,s=null,i=!1,r=!1;const c=[],u=n=>{for(let e=0;e<n.length;e++)o=n[e],Array.isArray(o)?u(o):null!=o&&"boolean"!=typeof o&&((i="function"!=typeof t&&!F(o))&&(o+=""),i&&r?c[c.length-1].h+=o:c.push(i?D(null,o):o),r=i)};if(u(e),n){n.key&&(l=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}if("function"==typeof t)return t(null===n?{}:n,c,_);const f=D(t,null);return f.m=n,c.length>0&&(f.$=c),f.j=l,f.O=s,f},D=(t,n)=>({u:0,S:t,h:null!=n?n:null,k:null,$:null,m:null,j:null,O:null}),U={},_={forEach:(t,n)=>t.map(H).forEach(n),map:(t,n)=>t.map(H).map(n).map(W)},H=t=>({vattrs:t.m,vchildren:t.$,vkey:t.j,vname:t.O,vtag:t.S,vtext:t.h}),W=t=>{if("function"==typeof t.vtag){const n={...t.vattrs};return t.vkey&&(n.key=t.vkey),t.vname&&(n.name=t.vname),P(t.vtag,n,...t.vchildren||[])}const n=D(t.vtag,t.vtext);return n.m=t.vattrs,n.$=t.vchildren,n.j=t.vkey,n.O=t.vname,n},z=(t,n)=>null==t||F(t)?t:4&n?"false"!==t&&(""===t||!!t):2&n?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&n?t+"":t,B=t=>{var n;return null==(n=e(t))?void 0:n.$hostElement$},V=(t,n,e)=>{const o=B(t);return{emit:t=>q(o,n,{bubbles:!!(4&e),composed:!!(2&e),cancelable:!!(1&e),detail:t})}},q=(t,n,e)=>{const o=f.ce(n,e);return t.dispatchEvent(o),o},Y=(t,n,o,s,i,r)=>{if(o===s)return;let c=l(t,n),a=n.toLowerCase();if("class"===n){const n=t.classList,e=I(o);let l=I(s);n.remove(...e.filter((t=>t&&!l.includes(t)))),n.add(...l.filter((t=>t&&!e.includes(t))))}else if("key"===n);else if("ref"===n)s&&mt(s,t);else if(c||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const o=n.slice(5);let l;{const n=e(t);if(n&&n.o&&n.o.t){const t=n.o.t[o];t&&t[1]&&(l=t[1])}}return l||(l=o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==s||!1===s?!1===s&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===s?"":s))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=s}catch(t){}return}{const e=F(s);if((c||e&&null!==s)&&!i)try{if(t.tagName.includes("-"))t[n]!==s&&(t[n]=s);else{const e=null==s?"":s;"list"===n?c=!1:null!=o&&t[n]===e||("function"==typeof t.__lookupSetter__(n)?t[n]=e:t.setAttribute(n,e))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(n)||t.removeAttribute(n):(!c||4&r||i)&&!e&&1===t.nodeType&&t.setAttribute(n,s=!0===s?"":s)}}else if(n="-"===n[2]?n.slice(3):l(u,a)?a.slice(2):a[2]+n.slice(3),o||s){const e=n.endsWith(Z);n=n.replace(J,""),o&&f.rel(t,n,o,e),s&&f.ael(t,n,s,e)}},G=/\s/,I=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(G):[]),Z="Capture",J=RegExp(Z+"$"),K=(t,n,e)=>{const o=11===n.k.nodeType&&n.k.host?n.k.host:n.k,l=t&&t.m||{},s=n.m||{};for(const t of Q(Object.keys(l)))t in s||Y(o,t,l[t],void 0,e,n.u);for(const t of Q(Object.keys(s)))Y(o,t,l[t],s[t],e,n.u)};function Q(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var X=!1,tt=!1,nt=!1,et=!1,ot=[],lt=[],st=(t,n,e)=>{var o;const l=n.$[e];let s,i,r,c=0;if(X||(nt=!0,"slot"===l.S&&(l.u|=l.$?2:1)),null!=l.h)s=l.k=u.document.createTextNode(l.h);else if(1&l.u)s=l.k=u.document.createTextNode(""),K(null,l,et);else{if(et||(et="svg"===l.S),!u.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=l.k=u.document.createElementNS(et?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!X&&2&l.u?"slot-fb":l.S),et&&"foreignObject"===l.S&&(et=!1),K(null,l,et),null!=R&&void 0!==R&&s["s-si"]!==R&&s.classList.add(s["s-si"]=R),l.$){const n="template"===l.S?s.content:s;for(c=0;c<l.$.length;++c)i=st(t,l,c),i&&n.appendChild(i)}"svg"===l.S?et=!1:"foreignObject"===s.tagName&&(et=!0)}return s["s-hn"]=T,3&l.u&&(s["s-sr"]=!0,s["s-cr"]=x,s["s-sn"]=l.O||"",s["s-rf"]=null==(o=l.m)?void 0:o.ref,function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===C(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}(s),r=t&&t.$&&t.$[e],r&&r.S===l.S&&t.k&&it(t.k),bt(x,s,n.k,null==t?void 0:t.k)),s},it=t=>{f.u|=1;const n=t.closest(T.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of e?o.reverse():o)null!=t["s-sh"]&&(yt(n,t,null!=e?e:null),t["s-sh"]=void 0,nt=!0)}f.u&=-2},rt=(t,n)=>{f.u|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===T&&e.push(n)}for(let t=e.length-1;t>=0;t--){const o=e[t];o["s-hn"]!==T&&o["s-ol"]&&(yt(at(o).parentNode,o,at(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,nt=!0),n&&rt(o,n)}f.u&=-2},ct=(t,n,e,o,l,s)=>{let i,r=t["s-cr"]&&t["s-cr"].parentNode||t;for(r.shadowRoot&&r.tagName===T&&(r=r.shadowRoot),"template"===e.S&&(r=r.content);l<=s;++l)o[l]&&(i=st(null,e,l),i&&(o[l].k=i,yt(r,i,at(n))))},ut=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.k;ht(n),t&&(tt=!0,t["s-ol"]?t["s-ol"].remove():rt(t,!0),t.remove())}}},ft=(t,n,e=!1)=>t.S===n.S&&("slot"===t.S?t.O===n.O:e?(e&&!t.j&&n.j&&(t.j=n.j),!0):t.j===n.j),at=t=>t&&t["s-ol"]||t,dt=(t,n,e=!1)=>{const o=n.k=t.k,l=t.$,s=n.$,i=n.S,r=n.h;let c;null==r?(et="svg"===i||"foreignObject"!==i&&et,"slot"!==i||X||t.O!==n.O&&(n.k["s-sn"]=n.O||"",it(n.k.parentElement)),K(t,n,et),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,i,r=0,c=0,u=0,f=0,a=n.length-1,d=n[0],p=n[a],v=o.length-1,h=o[0],m=o[v];const y="template"===e.S?t.content:t;for(;r<=a&&c<=v;)if(null==d)d=n[++r];else if(null==p)p=n[--a];else if(null==h)h=o[++c];else if(null==m)m=o[--v];else if(ft(d,h,l))dt(d,h,l),d=n[++r],h=o[++c];else if(ft(p,m,l))dt(p,m,l),p=n[--a],m=o[--v];else if(ft(d,m,l))"slot"!==d.S&&"slot"!==m.S||rt(d.k.parentNode,!1),dt(d,m,l),yt(y,d.k,p.k.nextSibling),d=n[++r],m=o[--v];else if(ft(p,h,l))"slot"!==d.S&&"slot"!==m.S||rt(p.k.parentNode,!1),dt(p,h,l),yt(y,p.k,d.k),p=n[--a],h=o[++c];else{for(u=-1,f=r;f<=a;++f)if(n[f]&&null!==n[f].j&&n[f].j===h.j){u=f;break}u>=0?(i=n[u],i.S!==h.S?s=st(n&&n[c],e,u):(dt(i,h,l),n[u]=void 0,s=i.k),h=o[++c]):(s=st(n&&n[c],e,c),h=o[++c]),s&&yt(at(d.k).parentNode,s,at(d.k))}r>a?ct(t,null==o[v+1]?null:o[v+1].k,e,o,c,v):c>v&&ut(n,r,a)})(o,l,n,s,e):null!==s?(null!==t.h&&(o.textContent=""),ct(o,null,n,s,0,s.length-1)):!e&&null!==l&&ut(l,0,l.length-1),et&&"svg"===i&&(et=!1)):(c=o["s-cr"])?c.parentNode.textContent=r:t.h!==r&&(o.data=r)},pt=[],vt=t=>{let n,e,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const l=t["s-sn"];for(o=e.length-1;o>=0;o--)if(n=e[o],!(n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||n["s-sh"]&&n["s-sh"]===t["s-hn"]))if(N(n,l)){let e=pt.find((t=>t.N===n));tt=!0,n["s-sn"]=n["s-sn"]||l,e?(e.N["s-sh"]=t["s-hn"],e.C=t):(n["s-sh"]=t["s-hn"],pt.push({C:t,N:n})),n["s-sr"]&&pt.map((t=>{N(t.N,n["s-sn"])&&(e=pt.find((t=>t.N===n)),e&&!t.C&&(t.C=e.C))}))}else pt.some((t=>t.N===n))||pt.push({N:n})}1===t.nodeType&&vt(t)}},ht=t=>{t.m&&t.m.ref&&ot.push((()=>t.m.ref(null))),t.$&&t.$.map(ht)},mt=(t,n)=>{lt.push((()=>t(n)))},yt=(t,n,e,o)=>{if("string"==typeof n["s-sn"]&&n["s-sr"]&&n["s-cr"])bt(n["s-cr"],n,t,n.parentElement);else if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:l}=function(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=C(t)||"";return{slotNode:S(E(n,"childNodes"),n.tagName,o)[0],slotName:o}}(n);return l&&!o&&function(t){t.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1}))}(l),n}return t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)};function bt(t,n,e,o){var l,s;let i;if(t&&"string"==typeof n["s-sn"]&&n["s-sr"]&&t.parentNode&&t.parentNode["s-sc"]&&(i=n["s-si"]||t.parentNode["s-sc"])){const t=n["s-sn"],r=n["s-hn"];if(null==(l=e.classList)||l.add(i+"-s"),o&&(null==(s=o.classList)?void 0:s.contains(i+"-s"))){let n=(o.__childNodes||o.childNodes)[0],e=!1;for(;n;){if(n["s-sn"]!==t&&n["s-hn"]===r&&n["s-sr"]){e=!0;break}n=n.nextSibling}e||o.classList.remove(i+"-s")}}}var $t=(t,n)=>{if(n&&!t.M&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.M=()=>{n["s-p"].splice(e-1,1),o()})))}},wt=(t,n)=>{if(t.u|=16,4&t.u)return void(t.u|=512);$t(t,t.R);const e=()=>gt(t,n);if(!n)return g(e);queueMicrotask((()=>{e()}))},gt=(t,n)=>{const e=t.$hostElement$,o=t.i;if(!o)throw Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return n?(t.T&&(t.T=!1,Et(o,"connectedCallback",void 0,e)),t.u|=256,t.A&&(t.A.map((([t,n])=>Et(o,t,n,e))),t.A=void 0),t.L.length&&t.L.forEach((t=>t(e))),l=Et(o,"componentWillLoad",void 0,e)):l=Et(o,"componentWillUpdate",void 0,e),l=jt(l,(()=>Et(o,"componentWillRender",void 0,e))),jt(l,(()=>St(t,o,n)))},jt=(t,n)=>Ot(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),Ot=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,St=async(t,n,e)=>{var o;const l=t.$hostElement$,s=l["s-rc"];e&&(t=>{const n=t.o,e=t.$hostElement$,o=n.u,l=((t,n)=>{var e,o,l;const s=L(n),i=r.get(s);if(!u.document)return s;if(t=11===t.nodeType?t:u.document,i)if("string"==typeof i){let l,r=A.get(t=t.head||t);if(r||A.set(t,r=new Set),!r.has(s)){l=u.document.createElement("style"),l.textContent=i;const a=null!=(e=f.F)?e:M(u.document);if(null!=a&&l.setAttribute("nonce",a),!(1&n.u))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(d){const n=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(i),p?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=i+n.textContent:t.prepend(l)}else t.append(l);1&n.u&&t.insertBefore(l,null),4&n.u&&(l.textContent+=c),r&&r.add(s)}}else{let n=A.get(t);if(n||A.set(t,n=new Set),!n.has(s)){const e=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(i.constructor===e.CSSStyleSheet)o=i;else{o=new e.CSSStyleSheet;for(let t=0;t<i.cssRules.length;t++)o.insertRule(i.cssRules[t].cssText,t)}p?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],n.add(s)}}return s})(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);10&o&&(e["s-sc"]=l,e.classList.add(l+"-h"))})(t);kt(t,n,l,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>Nt(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.u|=4,n.length=0)}},kt=(t,n,e,o)=>{try{n=n.render(),t.u&=-17,t.u|=2,((t,n,e=!1)=>{var o,l,s,i,r;const c=t.$hostElement$,a=t.o,d=t.P||D(null,null),p=(t=>t&&t.S===U)(n)?n:P(null,null,n);if(T=c.tagName,a.D&&(p.m=p.m||{},a.D.forEach((([t,n])=>{p.m[n]=c[t]}))),e&&p.m)for(const t of Object.keys(p.m))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(p.m[t]=c[t]);if(p.S=null,p.u|=4,t.P=p,p.k=d.k=c.shadowRoot||c,R=c["s-sc"],X=!(!(1&a.u)||128&a.u),x=c["s-cr"],tt=!1,dt(d,p,e),f.u|=1,nt){vt(p.k);for(const t of pt){const n=t.N;if(!n["s-ol"]&&u.document){const t=u.document.createTextNode("");t["s-nr"]=n,yt(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of pt){const n=t.N,r=t.C;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(o=n.hidden)&&o),r){const t=r.parentNode;let o=r.nextSibling;if(o&&1===o.nodeType){let e=null==(l=n["s-ol"])?void 0:l.previousSibling;for(;e;){let l=null!=(s=e["s-nr"])?s:null;if(l&&l["s-sn"]===n["s-sn"]&&t===(l.__parentNode||l.parentNode)){for(l=l.nextSibling;l===n||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){o=l;break}}e=e.previousSibling}}if((!o&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==o)&&n!==o){if(yt(t,n,o,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=u.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,yt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(i=n["s-ih"])&&i)}n&&"function"==typeof r["s-rf"]&&r["s-rf"](r)}else 1===n.nodeType&&(n.hidden=!0)}}if(tt&&O(p.k),f.u&=-2,pt.length=0,!X&&!(1&a.u)&&c["s-cr"]){const t=p.k.__childNodes||p.k.childNodes;for(const n of t)if(n["s-hn"]!==T&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(r=n.hidden)&&r),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=u.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],yt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}x=void 0,ot.forEach((t=>t())),ot.length=0,lt.forEach((t=>t())),lt.length=0})(t,n,o)}catch(n){s(n,t.$hostElement$)}return null},Nt=t=>{const n=t.$hostElement$,e=t.i,o=t.R;Et(e,"componentDidRender",void 0,n),64&t.u?Et(e,"componentDidUpdate",void 0,n):(t.u|=64,Mt(n),Et(e,"componentDidLoad",void 0,n),t.U(n),o||Ct()),t._(n),t.M&&(t.M(),t.M=void 0),512&t.u&&w((()=>wt(t,!1))),t.u&=-517},Ct=()=>{w((()=>q(u,"appload",{detail:{namespace:"tabworthy-components"}})))},Et=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){s(t,o)}},Mt=t=>t.classList.add("hydrated"),Rt=(t,n,o,l)=>{const i=e(t);if(!i)return;if(!i)throw Error(`Couldn't find host element for "${l.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`);const r=i.$hostElement$,c=i.l.get(n),u=i.u,f=i.i;if(o=z(o,l.t[n][0]),!(8&u&&void 0!==c||o===c||Number.isNaN(c)&&Number.isNaN(o))){if(i.l.set(n,o),l.H){const t=l.H[n];t&&t.map((t=>{try{const[[e,l]]=Object.entries(t);(128&u||1&l)&&(f?f[e](o,c,n):i.L.push((()=>{i.i[e](o,c,n)})))}catch(t){s(t,r)}}))}if(2&u){if(f.componentShouldUpdate&&!1===f.componentShouldUpdate(o,c,n)&&!(16&u))return;16&u||wt(i,!1)}}},xt=(t,n,o)=>{var l,s;const i=t.prototype;{t.watchers&&!n.H&&(n.H=t.watchers),t.deserializers&&!n.W&&(n.W=t.deserializers),t.serializers&&!n.B&&(n.B=t.serializers);const r=Object.entries(null!=(l=n.t)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(n.t[t][0]|=2048),r&&(n.t[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&n.t[t][0]))return((t,n)=>e(this).l.get(n))(0,t);const o=e(this),l=o?o.i:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=e(this);if(i){if(r)return void 0===(32&l?this[t]:i.$hostElement$[t])&&i.l.get(t)&&(s=i.l.get(t)),r.call(this,z(s,l)),void Rt(this,t,s=32&l?this[t]:i.$hostElement$[t],n);{if(!(1&o&&4096&n.t[t][0]))return Rt(this,t,s,n),void(1&o&&!i.i&&i.L.push((()=>{4096&n.t[t][0]&&i.i[t]!==i.l.get(t)&&(i.i[t]=s)})));const e=()=>{const e=i.i[t];!i.l.get(t)&&e&&i.l.set(t,e),i.i[t]=z(s,l),Rt(this,t,i.i[t],n)};i.i?e():i.L.push((()=>{e()}))}}}})}else 1&o&&64&l&&Object.defineProperty(i,t,{value(...n){var o;const l=e(this);return null==(o=null==l?void 0:l.V)?void 0:o.then((()=>{var e;return null==(e=l.i)?void 0:e[t](...n)}))}})})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){f.jmp((()=>{var c;const u=o.get(t),f=e(this);if(this.hasOwnProperty(u)&&(s=this[u],delete this[u]),i.hasOwnProperty(u)&&"number"==typeof this[u]&&this[u]==s)return;if(null==u){const e=null==f?void 0:f.u;if(f&&e&&!(8&e)&&s!==l){const o=f.i,i=null==(c=n.H)?void 0:c[t];null==i||i.forEach((n=>{const[[i,r]]=Object.entries(n);null!=o[i]&&(128&e||1&r)&&o[i].call(o,s,l,t)}))}return}const a=r.find((([t])=>t===u));a&&4&a[1][0]&&(s=null!==s&&"false"!==s);const d=Object.getOwnPropertyDescriptor(i,u);s==this[u]||d.get&&!d.set||(this[u]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=n.H)?s:{}),...r.filter((([t,n])=>31&n[0])).map((([t,e])=>{var l;const s=e[1]||t;return o.set(s,t),512&e[0]&&(null==(l=n.D)||l.push([t,s])),s}))]))}}return t},Tt=(t,n)=>{Et(t,"connectedCallback",void 0,n)},At=(t,n)=>{Et(t,"disconnectedCallback",void 0,n||t)},Lt=(t,n={})=>{var o;if(!u.document)return void console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");const l=[],a=n.exclude||[],p=u.customElements,v=u.document.head,h=v.querySelector("meta[charset]"),m=u.document.createElement("style"),y=[];let b,$=!0;Object.assign(f,n),f.p=new URL(n.resourcesUrl||"./",u.document.baseURI).href;let w=!1;if(t.map((t=>{t[1].map((n=>{var o,c,v;const h={u:n[0],v:n[1],t:n[2],q:n[3]};4&h.u&&(w=!0),h.t=n[2],h.q=n[3],h.D=[],h.H=null!=(o=n[4])?o:{},h.B=null!=(c=n[5])?c:{},h.W=null!=(v=n[6])?v:{};const m=h.v,g=class extends HTMLElement{"s-p";"s-rc";hasRegisteredEventListeners=!1;constructor(t){if(super(t),((t,n)=>{const e={u:0,$hostElement$:t,o:n,l:new Map,Y:new Map};e.V=new Promise((t=>e._=t)),e.G=new Promise((t=>e.U=t)),t["s-p"]=[],t["s-rc"]=[],e.L=[];const o=e;t.__stencil__getHostRef=()=>o})(t=this,h),1&h.u)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${h.v}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else j.call(t,h)}connectedCallback(){const t=e(this);t&&(this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,Ft(this,t,h.q)),b&&(clearTimeout(b),b=null),$?y.push(this):f.jmp((()=>(t=>{if(!(1&f.u)){const n=e(t);if(!n)return;const o=n.o,l=()=>{};if(1&n.u)Ft(t,n,o.q),(null==n?void 0:n.i)?Tt(n.i,t):(null==n?void 0:n.G)&&n.G.then((()=>Tt(n.i,t)));else{n.u|=1,12&o.u&&(t=>{if(!u.document)return;const n=t["s-cr"]=u.document.createComment("");n["s-cn"]=!0,yt(t,n,t.firstChild)})(t);{let e=t;for(;e=e.parentNode||e.host;)if(e["s-p"]){$t(n,n.R=e);break}}o.t&&Object.entries(o.t).map((([n,[e]])=>{if(31&e&&n in t&&t[n]!==Object.prototype[n]){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let o;try{if(!(32&n.u)){if(n.u|=32,e.I){const l=((t,n)=>{const e=t.v.replace(/-/g,"_"),o=t.I;if(!o)return;const l=i.get(o);return l?l[e]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[e])),(t=>{s(t,n.$hostElement$)}))
|
|
2
|
-
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(e,n);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${e.v}#${n.Z}" was not found`);o.isProxied||(e.H=o.watchers,e.B=o.serializers,e.W=o.deserializers,xt(o,e,2),o.isProxied=!0);const r=()=>{};n.u|=8;try{new o(n)}catch(n){s(n,t)}n.u&=-9,n.u|=128,r(),4&e.u?n.T=!0:Tt(n.i,t)}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>n.u|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const n=L(e);if(!r.has(n)){const o=()=>{};((t,n,e)=>{let o=r.get(t);d&&e?(o=o||new CSSStyleSheet,"string"==typeof o?o=n:o.replaceSync(n)):o=n,r.set(t,o)})(n,t,!!(1&e.u)),o()}}}const l=n.R,c=()=>wt(n,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()}catch(e){s(e,t),n.M&&(n.M(),n.M=void 0),n.U&&n.U(t)}})(t,n,o)}l()}})(this))))}disconnectedCallback(){f.jmp((()=>(async t=>{if(!(1&f.u)){const n=e(t);(null==n?void 0:n.J)&&(n.J.map((t=>t())),n.J=void 0),(null==n?void 0:n.i)?At(n.i,t):(null==n?void 0:n.G)&&n.G.then((()=>At(n.i,t)))}A.has(t)&&A.delete(t),t.shadowRoot&&A.has(t.shadowRoot)&&A.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const n=e(this);if(!n)return;const o=y.findIndex((t=>t===this));o>-1&&y.splice(o,1),(null==(t=null==n?void 0:n.P)?void 0:t.k)instanceof Node&&!n.P.k.isConnected&&delete n.P.k}))}componentOnReady(){var t;return null==(t=e(this))?void 0:t.G}};h.I=t[0],a.includes(m)||p.get(m)||(l.push(m),p.define(m,xt(g,h,1)))}))})),l.length>0&&(w&&(m.textContent+=c),m.innerHTML.length)){m.setAttribute("data-styles","");const t=null!=(o=f.F)?o:M(u.document);null!=t&&m.setAttribute("nonce",t),v.insertBefore(m,h?h.nextSibling:v.firstChild)}$=!1,y.length?y.map((t=>t.connectedCallback())):f.jmp((()=>b=setTimeout(Ct,30)))},Ft=(t,n,e)=>{e&&u.document&&e.map((([e,o,l])=>{const s=Dt(u.document,t,e),i=Pt(n,l),r=Ut(e);f.ael(s,o,i,r),(n.J=n.J||[]).push((()=>f.rel(s,o,i,r)))}))},Pt=(t,n)=>e=>{var o;try{256&t.u?null==(o=t.i)||o[n](e):(t.A=t.A||[]).push([n,e])}catch(n){s(n,t.$hostElement$)}},Dt=(t,n,e)=>8&e?u:n,Ut=t=>({passive:!!(1&t),capture:!!(2&t)}),_t=t=>f.F=t;export{U as H,Lt as b,V as c,B as g,P as h,a as p,o as r,_t as s}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as s,g as a}from"./p-CDFauf_3.js";import{g as h,r as n,a as o,b as d,c as r,d as c,e as l,f as u,h as b,s as f,i as v,j as y,k as p,l as k,m as w,n as m,o as g,p as D,q as M,t as x,u as C,v as A,w as L}from"./p-BVHu5CWV.js";const H={clearButton:"Clear value",monthSelect:"Select month",nextMonthButton:"Next month",nextYearButton:"Next year",picker:"Choose date",previousMonthButton:"Previous month",previousYearButton:"Previous year",todayButton:"Show today",yearSelect:"Select year",keyboardHint:"Keyboard commands",selected:"Selected date",chooseAsStartDate:"choose as start date",chooseAsEndDate:"choose as end date"},T=class{constructor(i){t(this,i),this.selectDate=e(this,"selectDate",3),this.changeMonth=e(this,"changeMonth",3),this.changeYear=e(this,"changeYear",3),this.disabled=!1,this.modalIsOpen=!1,this.disableDate=()=>!1,this.elementClassName="tabworthy-dates-calendar",this.firstDayOfWeek=0,this.range=!1,this.labels=H,this.locale=(null===navigator||void 0===navigator?void 0:navigator.language)||"en-US",this.inline=!1,this.showClearButton=!1,this.showMonthStepper=!0,this.showTodayButton=!0,this.showYearStepper=!1,this.showKeyboardHint=!1,this.showHiddenTitle=!0,this.startDate=h(new Date),this.init=()=>{this.currentDate=this.startDate?n(new Date(this.startDate)):new Date,this.updateWeekdays()},this.nextMonth=()=>{this.updateCurrentDate(o(this.currentDate))},this.nextYear=()=>{this.updateCurrentDate(d(this.currentDate),!1,!0)},this.previousMonth=()=>{this.updateCurrentDate(r(this.currentDate))},this.previousYear=()=>{this.updateCurrentDate(c(this.currentDate),!1,!0)},this.showToday=()=>{this.updateCurrentDate(new Date,!0)},this.clear=()=>{var t;this.value=void 0,null===(t=this.selectDate)||void 0===t||t.emit(void 0)},this.onClick=t=>{if(this.disabled)return;const e=t.target.closest("[data-date]");if(!Boolean(e))return;const i=n(new Date(e.dataset.date));this.updateCurrentDate(i),this.onSelectDate(i)},this.onMonthSelect=t=>{const e=+t.target.value-1,i=new Date(this.currentDate);l(i,this.minDate,this.maxDate)&&(i.setMonth(e),this.updateCurrentDate(i))},this.onYearSelect=t=>{var e;const i=+t.target.value,s=new Date(this.currentDate);l(s,this.minDate,this.maxDate)&&(s.setFullYear(i),null===(e=this.changeYear)||void 0===e||e.emit({year:i}),this.updateCurrentDate(s))},this.onKeyDown=t=>{this.disabled||("ArrowLeft"===t.code?(t.preventDefault(),this.updateCurrentDate(u(this.currentDate),!0)):"ArrowRight"===t.code?(t.preventDefault(),this.updateCurrentDate(b(this.currentDate),!0)):"ArrowUp"===t.code?(t.preventDefault(),this.updateCurrentDate(f(this.currentDate,7),!0)):"ArrowDown"===t.code?(t.preventDefault(),this.updateCurrentDate(v(this.currentDate,7),!0)):"PageUp"===t.code?(t.preventDefault(),this.updateCurrentDate(t.shiftKey?c(this.currentDate):r(this.currentDate),!0)):"PageDown"===t.code?(t.preventDefault(),this.updateCurrentDate(t.shiftKey?d(this.currentDate):o(this.currentDate),!0)):"Home"===t.code?(t.preventDefault(),this.updateCurrentDate(y(this.currentDate),!0)):"End"===t.code?(t.preventDefault(),this.updateCurrentDate(p(this.currentDate),!0)):"Space"!==t.code&&"Enter"!==t.code||(t.preventDefault(),this.onSelectDate(this.currentDate)))},this.onMouseEnter=t=>{var e;if(this.disabled)return;const i=n(new Date(null===(e=t.target.closest("td"))||void 0===e?void 0:e.dataset.date));this.hoveredDate=i},this.onMouseLeave=()=>{this.hoveredDate=void 0}}componentWillLoad(){this.init()}watchModalIsOpen(){!0===this.modalIsOpen&&(this.moveFocusOnModalOpen=!0)}watchFirstDayOfWeek(){this.updateWeekdays()}watchLocale(){Boolean(this.locale)||(this.locale=(null===navigator||void 0===navigator?void 0:navigator.language)||"en-US"),this.updateWeekdays()}watchRange(){var t;this.value=void 0,null===(t=this.selectDate)||void 0===t||t.emit(void 0)}watchStartDate(){this.currentDate=this.startDate?n(new Date(this.startDate)):new Date}watchValue(){Boolean(this.value)&&(Array.isArray(this.value)&&this.value.length>=1?this.currentDate=this.value[0]:this.value instanceof Date&&(this.currentDate=this.value))}componentDidRender(){this.moveFocusAfterMonthChanged&&(this.focusDate(this.currentDate),this.moveFocusAfterMonthChanged=!1),this.moveFocusOnModalOpen&&setTimeout((()=>{this.focusDate(this.currentDate),this.moveFocusOnModalOpen=!1}),100)}updateWeekdays(){this.weekdays=k(this.firstDayOfWeek,this.locale)}getClassName(t){return Boolean(t)?`${this.elementClassName}__${t}`:this.elementClassName}getCalendarRows(){const t=w(this.currentDate,!0,0===this.firstDayOfWeek?7:this.firstDayOfWeek),e=[];for(let i=0;i<t.length;i+=7){const s=t.slice(i,i+7);e.push(s)}return e}getTitle(){if(Boolean(this.currentDate))return Intl.DateTimeFormat(this.locale,{month:"long",year:"numeric"}).format(this.currentDate)}focusDate(t){var e;t&&(null===(e=this.el.querySelector(`[data-date="${h(t)}"]`))||void 0===e||e.focus())}updateCurrentDate(t,e,i=!1){var s,a,h;const n=t.getMonth(),o=t.getFullYear();m(t,this.minDate)||(t=new Date(this.minDate)),g(t,this.maxDate)||(t=new Date(this.maxDate)),(n!==(null===(s=this.currentDate)||void 0===s?void 0:s.getMonth())||o!==this.currentDate.getFullYear())&&(null===(a=this.changeMonth)||void 0===a||a.emit({month:M(t),year:D(t)}),e&&(this.moveFocusAfterMonthChanged=!0)),this.currentDate=t,e&&this.focusDate(this.currentDate),i&&(null===(h=this.changeYear)||void 0===h||h.emit({year:D(t)}))}onSelectDate(t){var e,i,s,a;if(!this.disableDate(t)&&l(t,this.minDate,this.maxDate))if(this.isRangeValue(this.value)){const s=void 0===(null===(e=this.value)||void 0===e?void 0:e[0])||2===this.value.length?[t]:[this.value[0],t];2===s.length&&s[0]>s[1]&&s.reverse();const a=void 0===s[1]?[h(s[0])]:[h(s[0]),h(s[1])];this.value=s,null===(i=this.selectDate)||void 0===i||i.emit(a)}else{if((null===(s=this.value)||void 0===s?void 0:s.getTime())===t.getTime())return;this.value=t,null===(a=this.selectDate)||void 0===a||a.emit(h(t))}}isRangeValue(t){return!!this.range}render(){var t;const e=this.showTodayButton||this.showClearButton||this.showKeyboardHint,a={year:{prev:this.disabled||!!this.minDate&&new Date(this.minDate).getFullYear()>c(this.currentDate).getFullYear(),next:this.disabled||!!this.maxDate&&new Date(this.maxDate).getFullYear()<d(this.currentDate).getFullYear()},month:{prev:this.disabled||x(r(this.currentDate).getMonth(),r(this.currentDate).getFullYear(),this.minDate,this.maxDate),next:this.disabled||x(o(this.currentDate).getMonth(),o(this.currentDate).getFullYear(),this.minDate,this.maxDate)}};return i(s,{key:"cc8676fdeec05b5635c367353e7bb1b8c997dedd"},i("div",{key:"4a4efc949f954772a55dad16e507a938b0308130",class:{[`${this.getClassName()}-wrapper`]:!0,[`${this.getClassName()}-wrapper--inline`]:this.inline}},i("div",{key:"de0afeccacba5e76162a4d22041f3b65983e77fe",class:{[this.getClassName()]:!0,[`${this.getClassName()}--disabled`]:this.disabled}},i("div",{key:"e8ed89a15cd32f629e559c9e9922c97816aff70c",class:this.getClassName("header")},this.showHiddenTitle&&i("span",{key:"8a922cf4df9ee3f87a673cfaf2d04fe539305bbe","aria-atomic":"true","aria-live":"polite",class:"visually-hidden"},this.getTitle()),this.showYearStepper&&i("button",{key:"225e73d3b12646781661d28057f4d9611e624c69","aria-label":this.labels.previousYearButton,class:this.getClassName("previous-year-button"),"aria-disabled":a.year.prev,innerHTML:this.previousYearButtonContent||void 0,onClick:this.previousYear,type:"button"},i("svg",{key:"e0fd3f0d41f596b450642eb9c27c5958feb7ba30",fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},i("polyline",{key:"85735b11b068015e671f550639ded6193dfbab28",points:"11 17 6 12 11 7"}),i("polyline",{key:"19c3ffcbb7b98261be4b309a2bbbaa826ea1ad73",points:"18 17 13 12 18 7"}))),this.showMonthStepper&&i("button",{key:"4b687ad0f92198cb9a324b8c0d380ae0a31f2346","aria-label":this.labels.previousMonthButton,class:this.getClassName("previous-month-button"),"aria-disabled":a.month.prev,innerHTML:this.previousMonthButtonContent||void 0,onClick:this.previousMonth,type:"button"},i("svg",{key:"a1931a36fddf8a84cc8f4d367b34b8b59d03cc09",fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},i("polyline",{key:"e053a2405fb992e9eaeddf114b8da460b41ade13",points:"15 18 9 12 15 6"}))),i("span",{key:"fbf8feee129211cf10f611c879288d76f7456c9d",class:this.getClassName("current-month")},i("select",{key:"ca2826280a1ab8065551fa908d40f96cc04d5464","aria-label":this.labels.monthSelect,class:this.getClassName("month-select"),"aria-disabled":this.disabled,name:"month",onChange:this.onMonthSelect},C(this.locale).map(((t,e)=>i("option",{key:t,selected:this.currentDate.getMonth()===e,value:e+1,disabled:x(e,this.currentDate.getFullYear(),this.minDate,this.maxDate)},t)))),i("input",{key:"b3f5b2dabeb38734d3602ac8aaff56a7d5a49393","aria-label":this.labels.yearSelect,class:this.getClassName("year-select"),"aria-disabled":this.disabled,max:this.maxDate?this.maxDate.slice(0,4):9999,min:this.minDate?this.minDate.slice(0,4):1,name:"year",onChange:this.onYearSelect,type:"number",value:this.currentDate.getFullYear()})),this.showMonthStepper&&i("button",{key:"9312dc20b70fbda5bd86f25b230665a8f7f75386","aria-label":this.labels.nextMonthButton,class:this.getClassName("next-month-button"),"aria-disabled":a.month.next,innerHTML:this.nextMonthButtonContent||void 0,onClick:this.nextMonth,type:"button"},i("svg",{key:"82f1f31e919a2e316941824c0b0d59c5a1852f73",fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},i("polyline",{key:"3365487b15f4149b5ae035ca1f1364396c133ef0",points:"9 18 15 12 9 6"}))),this.showYearStepper&&i("button",{key:"e83b33e034ee0fbd49e8aab90e1716ada40d2f19","aria-label":this.labels.nextYearButton,class:this.getClassName("next-year-button"),"aria-disabled":a.year.next,innerHTML:this.nextYearButtonContent||void 0,onClick:this.nextYear,type:"button"},i("svg",{key:"32b65eb085653d5c62e60262fc87f59b6d105e57",fill:"none",height:"24","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24",width:"24"},i("polyline",{key:"eaa98641ba48a322fd7b3ac953d13104bb63aad3",points:"13 17 18 12 13 7"}),i("polyline",{key:"89b7de7ec2e24a01a808e885ac68a11c3779f9c2",points:"6 17 11 12 6 7"})))),i("div",{key:"a21c8a94b1ae0e5b66074d2ca956afac456f366f",class:this.getClassName("body")},i("table",{key:"2968d8355122e3eb18de35b4c72d2404794f62e6",class:this.getClassName("calendar"),onKeyDown:this.onKeyDown,role:"grid","aria-label":this.getTitle()},i("thead",{key:"568a00357a3e64e692c80d90739c560513239c1d",class:this.getClassName("calendar-header")},i("tr",{key:"4e80bf075ad630237b5ea156267a0c0d9d4f0423",class:this.getClassName("weekday-row")},null===(t=this.weekdays)||void 0===t?void 0:t.map((t=>i("th",{role:"columnheader",abbr:t[1],class:this.getClassName("weekday"),key:t[0],scope:"col"},i("span",{"aria-hidden":"true"},t[0]),i("span",{class:"visually-hidden"},t[1])))))),i("tbody",{key:"26dfbb76ab92d065ab5f38b7135fced7738ca4a7"},this.getCalendarRows().map((t=>{const e=`row-${t[0].getMonth()}-${t[0].getDate()}`;return i("tr",{class:this.getClassName("calendar-row"),key:e},t.map((t=>{var e,s,a;const n=A(t,this.currentDate),o=t.getMonth()!==(null===(e=this.currentDate)||void 0===e?void 0:e.getMonth()),d=Array.isArray(this.value)?A(t,this.value[0])||this.value[1]&&l(t,h(this.value[0]),h(this.value[1])):A(t,this.value),r=this.disableDate(t)||!l(t,this.minDate,this.maxDate),c=!!this.isRangeValue(this.value)&&L(t,{from:null===(s=this.value)||void 0===s?void 0:s[0],to:(null===(a=this.value)||void 0===a?void 0:a[1])||this.hoveredDate||this.currentDate})&&!r,u=A(t,new Date),b=`cell-${t.getMonth()}-${t.getDate()}`,f={[this.getClassName("date")]:!0,[this.getClassName("date--current")]:n,[this.getClassName("date--disabled")]:r,[this.getClassName("date--overflowing")]:o,[this.getClassName("date--today")]:u,[this.getClassName("date--selected")]:d,[this.getClassName("date--in-range")]:c},v=d?"strong":u?"em":"span";return i("td",{"aria-disabled":String(r),"aria-selected":d?"true":void 0,class:f,"data-date":h(t),key:b,onClick:this.onClick,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,role:"gridcell",tabIndex:A(t,this.currentDate)&&!this.disabled?0:-1},i(v,{"aria-hidden":"true"},t.getDate()),i("span",{class:"visually-hidden"},(()=>{if(this.range){let e=this.value?"":`, ${this.labels.chooseAsStartDate}.`;return Array.isArray(this.value)&&(e={1:`, ${this.labels.chooseAsEndDate}.`,2:`, ${this.labels.chooseAsStartDate}.`}[this.value.length]),`${d?`${this.labels.selected}, `:""}${Intl.DateTimeFormat(this.locale,{day:"numeric",month:"long",year:"numeric"}).format(t)}${e}`}return`${d?`${this.labels.selected}, `:""}${Intl.DateTimeFormat(this.locale,{day:"numeric",month:"long",year:"numeric"}).format(t)}`})()))})))}))))),e&&i("div",{key:"102ea99b292e7a028692615c68be2e8c5720913c",class:this.getClassName("footer")},i("div",{key:"6e1d52da734e986a9044847edd7ace16460605f2",class:this.getClassName("footer-buttons")},this.showTodayButton&&i("button",{key:"9508eadf9835bea2e1640e6ac622665bd19da4d8",class:this.getClassName("today-button"),disabled:this.disabled,innerHTML:this.todayButtonContent||void 0,onClick:this.showToday,type:"button"},this.labels.todayButton),this.showClearButton&&i("button",{key:"262b926076309bc44d5b36dd64217196b4d6e8e2",class:this.getClassName("clear-button"),disabled:this.disabled,innerHTML:this.clearButtonContent||void 0,onClick:this.clear,type:"button"},this.labels.clearButton)),this.showKeyboardHint&&!window.matchMedia("(pointer: coarse)").matches&&i("button",{key:"09c974e2b246f57381e0461dbb27eb83e523812d",type:"button",onClick:()=>alert("Todo: Add Keyboard helper!"),class:this.getClassName("keyboard-hint")},i("svg",{key:"4dd5a8ce6e5c96e79adf6d8b0308b56fae5be361",xmlns:"http://www.w3.org/2000/svg",height:"1em",width:"1em",viewBox:"0 0 48 48",fill:"currentColor"},i("path",{key:"f3378678d6a0dc9fe7ea9ffd42dc083c3dca5ec8",d:"M7 38q-1.2 0-2.1-.925Q4 36.15 4 35V13q0-1.2.9-2.1.9-.9 2.1-.9h34q1.2 0 2.1.9.9.9.9 2.1v22q0 1.15-.9 2.075Q42.2 38 41 38Zm0-3h34V13H7v22Zm8-3.25h18v-3H15Zm-4.85-6.25h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm-24.7-6.25h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3Zm6.2 0h3v-3h-3Zm6.15 0h3v-3h-3ZM7 35V13v22Z"})),this.labels.keyboardHint))),i("slot",{key:"ec9b51b9aaf6c48e643120115dbc7f418e9fb8e4",name:"after-calendar"})))}get el(){return a(this)}static get watchers(){return{modalIsOpen:[{watchModalIsOpen:0}],firstDayOfWeek:[{watchFirstDayOfWeek:0}],locale:[{watchLocale:0}],range:[{watchRange:0}],startDate:[{watchStartDate:0}],value:[{watchValue:0}]}}};function $(t,e,i,s=20,a=0){let h=[];if(a>=s)return h;const n=t=>{const h=t.assignedNodes().filter((t=>1===t.nodeType));return h.length>0?$(h[0].parentElement,e,i,s,a+1):[]},o=Array.from(t.children||[]);for(const t of o)e(t)||(i(t)&&h.push(t),null!=t.shadowRoot?h.push(...$(t.shadowRoot,e,i,s,a+1)):"SLOT"===t.tagName?h.push(...n(t)):h.push(...$(t,e,i,s,a+1)));return h}function B(t){return t.hasAttribute("hidden")||t.hasAttribute("aria-hidden")&&"false"!==t.getAttribute("aria-hidden")||"none"===t.style.display||"0"===t.style.opacity||"hidden"===t.style.visibility||"collapse"===t.style.visibility}function S(t){return"-1"!==t.getAttribute("tabindex")&&!B(t)&&!function(t){return t.hasAttribute("disabled")||t.hasAttribute("aria-disabled")&&"false"!==t.getAttribute("aria-disabled")}(t)&&(t.hasAttribute("tabindex")||(t instanceof HTMLAnchorElement||t instanceof HTMLAreaElement)&&t.hasAttribute("href")||t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||t instanceof HTMLIFrameElement)}T.style=".visually-hidden.sc-tabworthy-dates-calendar{position:absolute;overflow:hidden;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%)}";const E=new Map,Z=document.createElement("template");Z.innerHTML='\n\t<div id="start"></div>\n\t<div id="backup"></div>\n\t<slot></slot>\n\t<div id="end"></div>\n';class W extends HTMLElement{constructor(){super(),this.debounceId=Math.random().toString(),this._focused=!1;const t=this.attachShadow({mode:"open"});t.appendChild(Z.content.cloneNode(!0)),this.$backup=t.querySelector("#backup"),this.$start=t.querySelector("#start"),this.$end=t.querySelector("#end"),this.focusLastElement=this.focusLastElement.bind(this),this.focusFirstElement=this.focusFirstElement.bind(this),this.onFocusIn=this.onFocusIn.bind(this),this.onFocusOut=this.onFocusOut.bind(this)}static get observedAttributes(){return["inactive"]}get inactive(){return this.hasAttribute("inactive")}set inactive(t){t?this.setAttribute("inactive",""):this.removeAttribute("inactive")}get focused(){return this._focused}connectedCallback(){this.$start.addEventListener("focus",this.focusLastElement),this.$end.addEventListener("focus",this.focusFirstElement),this.addEventListener("focusin",this.onFocusIn),this.addEventListener("focusout",this.onFocusOut),this.render()}disconnectedCallback(){this.$start.removeEventListener("focus",this.focusLastElement),this.$end.removeEventListener("focus",this.focusFirstElement),this.removeEventListener("focusin",this.onFocusIn),this.removeEventListener("focusout",this.onFocusOut)}attributeChangedCallback(){this.render()}focusFirstElement(){this.trapFocus()}focusLastElement(){this.trapFocus(!0)}getFocusableElements(){return $(this,B,S)}trapFocus(t){if(this.inactive)return;let e=this.getFocusableElements();e.length>0?(t?e[e.length-1].focus():e[0].focus(),this.$backup.setAttribute("tabindex","-1")):(this.$backup.setAttribute("tabindex","0"),this.$backup.focus())}onFocusIn(){this.updateFocused(!0)}onFocusOut(){this.updateFocused(!1)}updateFocused(t){!function(t,e,i){const s=E.get(i);null!=s&&window.clearTimeout(s),E.set(i,window.setTimeout((()=>{t(),E.delete(i)}),0))}((()=>{this.focused!==t&&(this._focused=t,this.render())}),0,this.debounceId)}render(){this.$start.setAttribute("tabindex",!this.focused||this.inactive?"-1":"0"),this.$end.setAttribute("tabindex",!this.focused||this.inactive?"-1":"0"),this.focused?this.setAttribute("focused",""):this.removeAttribute("focused")}}window.customElements.define("focus-trap",W);var F=new WeakMap,I=new WeakMap,O={},V=0,j=function(t){return t&&(t.host||j(t.parentNode))},_=function(t,e,i){void 0===i&&(i="data-aria-hidden");var s=Array.from(Array.isArray(t)?t:[t]),a=function(t){return"undefined"==typeof document?null:(Array.isArray(t)?t[0]:t).ownerDocument.body}(t);return a?(s.push.apply(s,Array.from(a.querySelectorAll("[aria-live]"))),function(t,e,i,s){var a=function(t,e){return e.map((function(e){if(t.contains(e))return e;var i=j(e);return i&&t.contains(i)?i:(console.error("aria-hidden",e,"in not contained inside",t,". Doing nothing"),null)})).filter((function(t){return Boolean(t)}))}(e,Array.isArray(t)?t:[t]);O[i]||(O[i]=new WeakMap);var h=O[i],n=[],o=new Set,d=new Set(a),r=function(t){t&&!o.has(t)&&(o.add(t),r(t.parentNode))};a.forEach(r);var c=function(t){t&&!d.has(t)&&Array.prototype.forEach.call(t.children,(function(t){if(o.has(t))c(t);else{var e=t.getAttribute(s),a=null!==e&&"false"!==e,d=(F.get(t)||0)+1,r=(h.get(t)||0)+1;F.set(t,d),h.set(t,r),n.push(t),1===d&&a&&I.set(t,!0),1===r&&t.setAttribute(i,"true"),a||t.setAttribute(s,"true")}}))};return c(e),o.clear(),V++,function(){n.forEach((function(t){var e=F.get(t)-1,a=h.get(t)-1;F.set(t,e),h.set(t,a),e||(I.has(t)||t.removeAttribute(s),I.delete(t)),a||t.removeAttribute(i)})),--V||(F=new WeakMap,F=new WeakMap,I=new WeakMap,O={})}}(s,a,i,"aria-hidden")):function(){return null}};const R=class{constructor(i){t(this,i),this.opened=e(this,"opened",7),this.closed=e(this,"closed",7),this.inline=!1,this.closing=!1,this.showing=this.inline||!1,this.onKeyDown=t=>{"Escape"===t.code&&this.close()}}async open(){this.inline||(this.showing=!0,this.undo=_(this.el),this.opened.emit(void 0))}async close(){this.inline||(this.showing=!1,this.closed.emit(void 0),this.undo(),this.triggerElement&&this.triggerElement.focus())}async getState(){return this.showing}async setTriggerElement(t){this.triggerElement=t}handleClick(t){this.showing&&!this.el.contains(t.target)&&this.close()}render(){return i(s,{key:"e5e440df97f5b2f51f742892ca591aff3a3e51a9",showing:this.showing,ref:t=>t&&(this.el=t)},!this.inline&&this.showing&&i("div",{key:"f3b5f92b0f3b8eb54f665a14fcaa1616d59b182b",part:"body",onKeyDown:this.onKeyDown,role:"dialog",tabindex:-1,"aria-hidden":!this.showing,"aria-label":this.label,"aria-modal":this.showing},i("focus-trap",{key:"f94c02a8db391d671adc08ac1742dc6fabca72d3"},i("div",{key:"888259505b6a2416674523d6a6924272b676daad",part:"content"},i("slot",{key:"e4e141ecae238f68fdde53baca66f478ebb93f88"})))),this.inline&&i("div",{key:"f2e7fb2614274d5dc7d03f10a0ee760363438435",part:"content"},i("slot",{key:"f845ef9c46b146ac916c90bb2fcec1f357aee5ee"})))}};R.style=":host::part(body){position:absolute;width:-moz-fit-content;width:fit-content;z-index:1200;margin-top:0.5rem}:host::part(backdrop){}:host::part(content){}";export{T as tabworthy_dates_calendar,R as tabworthy_dates_modal}
|