@ionic/core 9.0.7-dev.11791381676.118a7a15 → 9.0.7-dev.11791478996.1b854592
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/components/index.js +1 -1
- package/components/ion-datetime.js +1 -1
- package/components/ion-modal.js +1 -1
- package/components/ion-nav.js +1 -1
- package/components/ion-popover.js +1 -1
- package/components/ion-router-outlet.js +1 -1
- package/components/ion-select.js +1 -1
- package/components/p-Bd8hg9FK.js +4 -0
- package/components/{p-BG2lMobd.js → p-CJdQ1u7W.js} +1 -1
- package/components/{p-D64Tyi-z.js → p-CQKWzUsE.js} +1 -1
- package/components/{p-Dvyv9SMk.js → p-D0nwlsl_.js} +1 -1
- package/components/p-DfDIY2oP.js +4 -0
- package/dist/cjs/{index-DUiuw_fH.js → index-DCfr5hz-.js} +14 -2
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/ion-app_8.cjs.entry.js +31 -3
- package/dist/cjs/ion-modal.cjs.entry.js +1 -1
- package/dist/cjs/ion-nav_2.cjs.entry.js +24 -2
- package/dist/cjs/ion-popover.cjs.entry.js +1 -1
- package/dist/cjs/{ios.transition-D85_rHf5.js → ios.transition-Ca6XODo9.js} +1 -1
- package/dist/cjs/{md.transition-Ce9X1WXr.js → md.transition-D8SfNYEp.js} +1 -1
- package/dist/collection/components/nav/nav.js +24 -2
- package/dist/collection/components/router-outlet/router-outlet.js +31 -3
- package/dist/collection/utils/transition/index.js +11 -0
- package/dist/docs.json +1 -1
- package/dist/esm/{index-BBASprVu.js → index-z9vdZN7I.js} +14 -3
- package/dist/esm/index.js +3 -3
- package/dist/esm/ion-app_8.entry.js +31 -3
- package/dist/esm/ion-modal.entry.js +1 -1
- package/dist/esm/ion-nav_2.entry.js +24 -2
- package/dist/esm/ion-popover.entry.js +1 -1
- package/dist/esm/{ios.transition-B8netzsb.js → ios.transition-BkUGiDUz.js} +1 -1
- package/dist/esm/{md.transition-DNCSSiXk.js → md.transition-B6hlrWjR.js} +1 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-52a16f94.entry.js +4 -0
- package/dist/ionic/{p-Bppj2PE0.js → p-BZTgGzGK.js} +1 -1
- package/dist/ionic/{p-Bnc1L7Rk.js → p-CgcGX08t.js} +1 -1
- package/dist/ionic/p-Dk4Mdaru.js +4 -0
- package/dist/ionic/{p-f6fcd4f8.entry.js → p-c97e4c00.entry.js} +1 -1
- package/dist/ionic/{p-2124fd4f.entry.js → p-d2406889.entry.js} +1 -1
- package/dist/ionic/{p-af56702e.entry.js → p-f2116a54.entry.js} +1 -1
- package/dist/types/components/nav/nav.d.ts +1 -0
- package/dist/types/components/router-outlet/router-outlet.d.ts +1 -0
- package/dist/types/utils/transition/index.d.ts +6 -0
- package/hydrate/index.js +64 -3
- package/hydrate/index.mjs +64 -3
- package/package.json +1 -1
- package/components/p-C7r5Gja6.js +0 -4
- package/components/p-Uk13YgEc.js +0 -4
- package/dist/ionic/p-DQXtveHv.js +0 -4
- package/dist/ionic/p-fcb04fb5.entry.js +0 -4
package/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
export{L as LogLevel,g as getAssetPath,c as printIonError,p as printIonWarning,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-Ct2aBEue.js";export{c as createAnimation}from"./p-ChsJlFCQ.js";export{a as LIFECYCLE_DID_ENTER,c as LIFECYCLE_DID_LEAVE,L as LIFECYCLE_WILL_ENTER,b as LIFECYCLE_WILL_LEAVE,d as LIFECYCLE_WILL_UNLOAD,g as getIonPageElement}from"./p-
|
|
4
|
+
export{L as LogLevel,g as getAssetPath,c as printIonError,p as printIonWarning,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-Ct2aBEue.js";export{c as createAnimation}from"./p-ChsJlFCQ.js";export{a as LIFECYCLE_DID_ENTER,c as LIFECYCLE_DID_LEAVE,L as LIFECYCLE_WILL_ENTER,b as LIFECYCLE_WILL_LEAVE,d as LIFECYCLE_WILL_UNLOAD,g as getIonPageElement}from"./p-DfDIY2oP.js";export{iosTransitionAnimation}from"./p-D0nwlsl_.js";export{mdTransitionAnimation}from"./p-Bd8hg9FK.js";export{g as getTimeGivenProgression}from"./p-hHmYLOfE.js";export{createGesture}from"./p-D0YpjgON.js";export{g as getPlatforms,i as initialize,a as isPlatform}from"./p-HthJZjZ6.js";export{c as componentOnReady}from"./p-B4IBdPVJ.js";export{I as IonicSafeString}from"./p-DHo45oj7.js";export{g as getMode,s as setupConfig}from"./p-DWCzVL3Y.js";export{o as openURL}from"./p-byZM6qHV.js";export{m as menuController}from"./p-ODGeXc3M.js";export{b as actionSheetController,a as alertController,l as loadingController,m as modalController,p as popoverController,t as toastController}from"./p-B02CcbPD.js";const e=e=>{const{swiper:o,extendParams:s}=e,t={effect:void 0,direction:"horizontal",initialSlide:0,loop:!1,parallax:!1,slidesPerView:1,spaceBetween:0,speed:300,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,touchEventsTarget:"container",freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,zoom:{maxRatio:3,minRatio:1,toggle:!1},touchRatio:1,touchAngle:45,simulateTouch:!0,touchStartPreventDefault:!1,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loopAdditionalSlides:0,noSwiping:!0,runCallbacksOnInit:!0,coverflowEffect:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flipEffect:{slideShadows:!0,limitRotation:!0},cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fadeEffect:{crossFade:!1},a11y:{prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide"}};o.pagination&&(t.pagination={type:"bullets",clickable:!1,hideOnClick:!1}),o.scrollbar&&(t.scrollbar={hide:!0}),s(t)};export{e as IonicSlides}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{c as t,p as e,d as a,H as i,i as o,w as n,e as r,h as s,f as d,t as l}from"./p-Ct2aBEue.js";import{startFocusVisible as c}from"./p-BmVRXR1y.js";import{r as h,g as p,d as m}from"./p-B4IBdPVJ.js";import{F as u}from"./p-B02CcbPD.js";import{i as y}from"./p-Dojwmvde.js";import{c as b}from"./p-byZM6qHV.js";import{c as g,f,g as x,h as v,a as w}from"./p-LpMHEu3v.js";import{b as k}from"./p-HthJZjZ6.js";import{r as C,g as P,a as D,b as j,c as $,d as z,e as V,f as T,h as A,i as E,j as O,k as I,l as S,m as M,n as W,o as B,p as L,v as R,q as F,s as H,t as Z,u as q,w as G,x as U,y as Y,z as N,A as J,B as K,C as Q,D as X,E as _,F as tt,G as et,H as at,I as it,J as ot,K as nt,L as rt,M as st,N as dt,O as lt,P as ct,Q as ht}from"./p-CdrNHfZl.js";import{d as pt}from"./p-DMPsc_0r.js";import{d as mt}from"./p-DDI6VLW9.js";import{d as ut}from"./p-CvyvLbPe.js";import{d as yt}from"./p-ChkSQqfP.js";import{d as bt}from"./p-BqyLLYLm.js";import{d as gt}from"./p-GpqwNbxf.js";import{d as ft}from"./p-r59A3wQk.js";import{d as xt}from"./p-D64Tyi-z.js";import{d as vt}from"./p-7KepMw9O.js";const wt=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59],kt=[0,1,2,3,4,5,6,7,8,9,10,11],Ct=[0,1,2,3,4,5,6,7,8,9,10,11],Pt=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],Dt=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,0],jt=(t,e,a="h12",i,o,n,r)=>{const s=z(t,a),d=M(s);let l=(t=>{switch(t){case"h11":return kt;case"h12":return Ct;case"h23":return Pt;case"h24":return Dt;default:throw Error(`Invalid hour cycle "${t}"`)}})(s),c=wt,h=!0,p=!0;if(n&&(l=l.filter((t=>n.includes(t)))),r&&(c=c.filter((t=>r.includes(t)))),i)if(I(e,i)){if(void 0!==i.hour&&(l=l.filter((t=>(d?t:"pm"===e.ampm?(t+12)%24:t)>=i.hour)),h=i.hour<13),void 0!==i.minute){let t=!1;void 0!==i.hour&&void 0!==e.hour&&e.hour>i.hour&&(t=!0),c=c.filter((e=>!!t||e>=i.minute))}}else O(e,i)&&(l=[],c=[],h=p=!1);return o&&(I(e,o)?(void 0!==o.hour&&(l=l.filter((t=>(d?t:"pm"===e.ampm?(t+12)%24:t)<=o.hour)),p=o.hour>=12),void 0!==o.minute&&e.hour===o.hour&&(c=c.filter((t=>t<=o.minute)))):S(e,o)&&(l=[],c=[],h=p=!1)),{hours:l,minutes:c,am:h,pm:p}},$t=(t,e)=>{const a={month:t.month,year:t.year,day:t.day};if(void 0!==e&&(t.month!==e.month||t.year!==e.year)){const i={month:e.month,year:e.year,day:e.day};return O(i,a)?[i,a,P(t)]:[D(t),a,i]}return[D(t),a,P(t)]},zt=(t,e,a,i,o,n={day:"numeric"})=>{const{month:r,year:s}=e,d=[],l=W(r,s),c=null!=i?.day&&i.year===s&&i.month===r?i.day:l,h=null!=a?.day&&a.year===s&&a.month===r?a.day:1;if(void 0!==o){let e=o;e=e.filter((t=>t>=h&&t<=c)),e.forEach((e=>{const a=new Date(`${r}/${e}/${s} GMT+0000`),i=new Intl.DateTimeFormat(t,{...n,timeZone:"UTC"}).format(a);d.push({text:i,value:e})}))}else for(let e=h;e<=c;e++){const a=new Date(`${r}/${e}/${s} GMT+0000`),i=new Intl.DateTimeFormat(t,{...n,timeZone:"UTC"}).format(a);d.push({text:i,value:e})}return d},Vt=(t,e)=>t.month===e.month&&t.year===e.year?[t]:[t,...Vt(P(t),e)],Tt=(t,e,a,i)=>null===t.day||void 0!==i&&!i.includes(t.day)||!(!e||!O(t,e))||!(!a||!S(t,a)),At=(t,e,a,i,o,n,r)=>{const s=void 0!==(Array.isArray(a)?a:[a]).find((t=>I(e,t))),d=I(e,i);return{disabled:Tt(e,o,n,r),isActive:s,isToday:d,ariaSelected:s?"true":null,ariaLabel:L(t,d,e),text:null!=e.day?B(t,e):null}},Et=(t,{minParts:e,maxParts:a})=>!!((t,e,a)=>!!(e&&e.year>t)||!!(a&&a.year<t))(t.year,e,a)||!!(e&&O(t,e)||a&&S(t,a)),Ot=(t,a)=>{(a?.date?.timeZone||a?.date?.timeZoneName||a?.time?.timeZone||a?.time?.timeZoneName)&&e('[ion-datetime] - "timeZone" and "timeZoneName" are not supported in "formatOptions".',t)},It=(t,a,i)=>{if(i)switch(a){case"date":case"month-year":case"month":case"year":void 0===i.date&&e(`[ion-datetime] - The '${a}' presentation requires a date object in formatOptions.`,t);break;case"time":void 0===i.time&&e("[ion-datetime] - The 'time' presentation requires a time object in formatOptions.",t);break;case"date-time":case"time-date":void 0===i.date&&void 0===i.time&&e(`[ion-datetime] - The '${a}' presentation requires either a date or time object (or both) in formatOptions.`,t)}},St=a(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.ionCancel=o(this,"ionCancel",7),this.ionChange=o(this,"ionChange",7),this.ionValueChange=o(this,"ionValueChange",7),this.ionFocus=o(this,"ionFocus",7),this.ionBlur=o(this,"ionBlur",7),this.ionStyle=o(this,"ionStyle",7),this.ionRender=o(this,"ionRender",7),this.inputId="ion-dt-"+Mt++,this.prevPresentation=null,this.showMonthAndYear=!1,this.activeParts=[],this.workingParts={month:5,day:28,year:2021,hour:13,minute:52,ampm:"pm",isAdjacentDay:!1},this.isTimePopoverOpen=!1,this.name=this.inputId,this.disabled=!1,this.readonly=!1,this.showAdjacentDays=!1,this.presentation="date-time",this.cancelText="Cancel",this.doneText="Done",this.clearText="Clear",this.locale="default",this.firstDayOfWeek=0,this.multiple=!1,this.showDefaultTitle=!1,this.showDefaultButtons=!1,this.showClearButton=!1,this.showDefaultTimeLabel=!0,this.size="fixed",this.preferWheel=!1,this.warnIfIncorrectValueUsage=()=>{const{multiple:t,value:a}=this;!t&&Array.isArray(a)&&e(`[ion-datetime] - An array of values was passed, but multiple is "false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".\n\n Value Passed: [${a.map((t=>`'${t}'`)).join(", ")}]\n`,this.el)},this.setValue=t=>{this.value=t,this.ionChange.emit({value:t})},this.getActivePartsWithFallback=()=>{const{defaultParts:t}=this;return this.getActivePart()??t},this.getActivePart=()=>{const{activeParts:t}=this;return Array.isArray(t)?t[0]:t},this.closeParentOverlay=t=>{const e=this.el.closest("ion-modal, ion-popover");e&&e.dismiss(void 0,t)},this.setWorkingParts=t=>{this.workingParts={...t}},this.setActiveParts=(t,e=!1)=>{if(this.readonly)return;const{multiple:a,minParts:i,maxParts:o,activeParts:n}=this,r=R(t,i,o);if(this.setWorkingParts(r),a){const t=Array.isArray(n)?n:[n];this.activeParts=e?t.filter((t=>!I(t,r))):[...t,r]}else this.activeParts={...r};null!==this.el.querySelector('[slot="buttons"]')||this.showDefaultButtons||this.confirm()},this.initializeKeyboardListeners=()=>{const t=this.calendarBodyRef;if(!t)return;const e=this.el.shadowRoot,a=t.querySelector(".calendar-month:nth-of-type(2)"),i=new MutationObserver((e=>{const i=e[0];!i.oldValue?.includes("ion-focused")&&t.classList.contains("ion-focused")&&this.focusWorkingDay(a)}));i.observe(t,{attributeFilter:["class"],attributeOldValue:!0}),this.destroyKeyboardMO=()=>{i?.disconnect()},t.addEventListener("keydown",(t=>{const i=e.activeElement;if(!i||!i.classList.contains("calendar-day"))return;const o=F(i);let n;switch(t.key){case"ArrowDown":t.preventDefault(),n=J(o);break;case"ArrowUp":t.preventDefault(),n=N(o);break;case"ArrowRight":t.preventDefault(),n=Y(o);break;case"ArrowLeft":t.preventDefault(),n=U(o);break;case"Home":t.preventDefault(),n=G(o);break;case"End":t.preventDefault(),n=q(o);break;case"PageUp":t.preventDefault(),n=t.shiftKey?Z(o):D(o);break;case"PageDown":t.preventDefault(),n=t.shiftKey?H(o):P(o);break;default:return}Tt(n,this.minParts,this.maxParts)||(this.setWorkingParts({...this.workingParts,...n}),requestAnimationFrame((()=>this.focusWorkingDay(a))))}))},this.focusWorkingDay=t=>{const{day:e,month:a,year:i}=this.workingParts,o=new Date(`${a}/1/${i}`).getDay();if(null===e)return;const n=t.querySelector(`.calendar-day-wrapper:nth-of-type(${(o>=this.firstDayOfWeek?o-this.firstDayOfWeek:7-(this.firstDayOfWeek-o))+e}) .calendar-day`);n&&n.focus()},this.processMinParts=()=>{const{min:t,defaultParts:e}=this;this.minParts=void 0!==t?K(t,e):void 0},this.processMaxParts=()=>{const{max:t,defaultParts:e}=this;this.maxParts=void 0!==t?Q(t,e):void 0},this.initializeCalendarListener=()=>{const t=this.calendarBodyRef;if(!t)return;const e=t.querySelectorAll(".calendar-month"),a=e[0],i=e[1],o=e[2],r="ios"===k(this)&&"undefined"!=typeof navigator&&navigator.maxTouchPoints>1;n((()=>{t.scrollLeft=a.clientWidth*(y(this.el)?-1:1);const e=e=>{const i=t.getBoundingClientRect(),n=(y(this.el)?t.scrollLeft>=-2:t.scrollLeft<=2)?a:o,r=n.getBoundingClientRect();if(Math.abs(r.x-i.x)>2)return;const{forceRenderDate:s}=this;return void 0!==s?{month:s.month,year:s.year,day:s.day}:n===a?D(e):n===o?P(e):void 0},s=()=>{r&&(t.style.removeProperty("pointer-events"),l=!1);const a=e(this.workingParts);if(!a)return;const{month:o,day:s,year:d}=a;Et({month:o,year:d,day:null},{minParts:{...this.minParts,day:null},maxParts:{...this.maxParts,day:null}})||(t.style.setProperty("overflow","hidden"),n((()=>{this.setWorkingParts({...this.workingParts,month:o,day:s,year:d}),t.scrollLeft=i.clientWidth*(y(this.el)?-1:1),t.style.removeProperty("overflow"),this.resolveForceDateScrolling&&this.resolveForceDateScrolling();const e=this.el.shadowRoot.activeElement;e&&e.classList.contains("calendar-day")&&e.closest(".calendar-body")?.focus()})))};let d,l=!1;const c=()=>{d&&clearTimeout(d),!l&&r&&(t.style.setProperty("pointer-events","none"),l=!0),d=setTimeout(s,50)};t.addEventListener("scroll",c),this.destroyCalendarListener=()=>{t.removeEventListener("scroll",c)}}))},this.destroyInteractionListeners=()=>{const{destroyCalendarListener:t,destroyKeyboardMO:e}=this;void 0!==t&&t(),void 0!==e&&e()},this.ensureReadyIfVisible=()=>{this.el.classList.contains("datetime-ready")||this.hasLayoutBox()&&this.markReady()},this.hasLayoutBox=()=>{const{width:t,height:e}=this.el.getBoundingClientRect();return t>0&&e>0},this.markReady=()=>{this.el.classList.contains("datetime-ready")||(this.initializeListeners(),n((()=>{this.el.classList.add("datetime-ready")})))},this.loadTimeoutCleanup=()=>{this.loadTimeout&&(clearTimeout(this.loadTimeout),this.loadTimeout=void 0)},this.processValue=t=>{const e=null!=t&&""!==t&&(!Array.isArray(t)||t.length>0),a=e?X(t):this.defaultParts,{minParts:i,maxParts:o,workingParts:n,el:r}=this;if(this.warnIfIncorrectValueUsage(),!a)return;e&&_(a,i,o);const s=et(Array.isArray(a)?a[a.length-1]:a,i,o),{month:d,day:l,year:c,hour:h,minute:p}=s,m=tt(h);this.activeParts=e?Array.isArray(a)?[...a]:{month:d,day:l,year:c,hour:h,minute:p,ampm:m}:[];const u=void 0!==d&&d!==n.month||void 0!==c&&c!==n.year,y=r.classList.contains("datetime-ready"),{isGridStyle:b,showMonthAndYear:g}=this;b&&u&&y&&!g?this.animateToDate(s):this.setWorkingParts({month:d,day:l,year:c,hour:h,minute:p,ampm:m})},this.animateToDate=async t=>{const{workingParts:e}=this;this.forceRenderDate=t;const a=new Promise((t=>{this.resolveForceDateScrolling=t}));O(t,e)?this.prevMonth():this.nextMonth(),await a,this.resolveForceDateScrolling=void 0,this.forceRenderDate=void 0},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()},this.hasValue=()=>null!=this.value,this.nextMonth=()=>{const t=this.calendarBodyRef;if(!t)return;const e=t.querySelector(".calendar-month:last-of-type");if(!e)return;const a=2*e.offsetWidth,i=r.getBoolean("animated",!0)?"smooth":"instant";t.scrollTo({top:0,left:a*(y(this.el)?-1:1),behavior:i})},this.prevMonth=()=>{const t=this.calendarBodyRef;if(!t)return;const e=t.querySelector(".calendar-month:first-of-type");if(!e)return;const a=2*e.offsetWidth,i=r.getBoolean("animated",!0)?"smooth":"instant";t.scrollTo({top:0,left:a*(y(this.el)?1:-1),behavior:i})},this.toggleMonthAndYearView=()=>{this.showMonthAndYear=!this.showMonthAndYear}}formatOptionsChanged(){const{el:t,formatOptions:e,presentation:a}=this;It(t,a,e),Ot(t,e)}disabledChanged(){this.emitStyle()}minChanged(){this.processMinParts()}maxChanged(){this.processMaxParts()}presentationChanged(){const{el:t,formatOptions:e,presentation:a}=this;It(t,a,e)}get isGridStyle(){const{presentation:t,preferWheel:e}=this;return("date"===t||"date-time"===t||"time-date"===t)&&!e}yearValuesChanged(){this.parsedYearValues=at(this.yearValues)}monthValuesChanged(){this.parsedMonthValues=at(this.monthValues)}dayValuesChanged(){this.parsedDayValues=at(this.dayValues)}hourValuesChanged(){this.parsedHourValues=at(this.hourValues)}minuteValuesChanged(){this.parsedMinuteValues=at(this.minuteValues)}async valueChanged(){const{value:t}=this;this.hasValue()&&this.processValue(t),this.emitStyle(),this.ionValueChange.emit({value:t})}async confirm(t=!1){const{isCalendarPicker:e,activeParts:a,preferWheel:i,workingParts:o}=this;void 0===a&&e||this.setValue(Array.isArray(a)&&0===a.length?i?it(o):void 0:it(a)),t&&this.closeParentOverlay(Bt)}async reset(t){this.processValue(t)}async cancel(t=!1){this.ionCancel.emit(),t&&this.closeParentOverlay(Wt)}async getDefaultPart(){return this.defaultParts}get isCalendarPicker(){const{presentation:t}=this;return"date"===t||"date-time"===t||"time-date"===t}connectedCallback(){this.clearFocusVisible=c(this.el).destroy,this.loadTimeout=setTimeout((()=>{this.ensureReadyIfVisible()}),100)}disconnectedCallback(){this.clearFocusVisible&&(this.clearFocusVisible(),this.clearFocusVisible=void 0),this.loadTimeoutCleanup()}initializeListeners(){this.initializeCalendarListener(),this.initializeKeyboardListeners()}componentDidLoad(){const{el:t,intersectionTrackerRef:e}=this,a=new IntersectionObserver((t=>{t[t.length-1].isIntersecting&&this.markReady()}),{threshold:.01,root:t});h((()=>a?.observe(e))),this.loadTimeoutCleanup(),this.loadTimeout=setTimeout((()=>{this.ensureReadyIfVisible()}),100);const i=new IntersectionObserver((t=>{t[t.length-1].isIntersecting||this.hasLayoutBox()||(this.destroyInteractionListeners(),this.showMonthAndYear=!1,n((()=>{this.el.classList.remove("datetime-ready")})))}),{threshold:0,root:t});h((()=>i?.observe(e)));const o=p(this.el);o.addEventListener("ionFocus",(t=>t.stopPropagation())),o.addEventListener("ionBlur",(t=>t.stopPropagation()))}componentDidRender(){const{presentation:t,prevPresentation:e,calendarBodyRef:a,minParts:i,preferWheel:o,forceRenderDate:n}=this;if(void 0!==i&&!o&&["date-time","time-date","date"].includes(t)&&a){const t=a.querySelector(".calendar-month:nth-of-type(1)");t&&void 0===n&&(a.scrollLeft=t.clientWidth*(y(this.el)?-1:1))}null!==e?t!==e&&(this.prevPresentation=t,this.destroyInteractionListeners(),this.initializeListeners(),this.showMonthAndYear=!1,h((()=>{this.ionRender.emit()}))):this.prevPresentation=t}componentWillLoad(){const{el:t,formatOptions:a,highlightedDates:i,multiple:o,presentation:n,preferWheel:r}=this;o&&("date"!==n&&e('[ion-datetime] - Multiple date selection is only supported for presentation="date".',t),r&&e('[ion-datetime] - Multiple date selection is not supported with preferWheel="true".',t)),void 0!==i&&("date"!==n&&"date-time"!==n&&"time-date"!==n&&e("[ion-datetime] - The highlightedDates property is only supported with the date, date-time, and time-date presentations.",t),r&&e('[ion-datetime] - The highlightedDates property is not supported with preferWheel="true".',t)),a&&(It(t,n,a),Ot(t,a));const s=this.parsedHourValues=at(this.hourValues),d=this.parsedMinuteValues=at(this.minuteValues),l=this.parsedMonthValues=at(this.monthValues),c=this.parsedYearValues=at(this.yearValues),h=this.parsedDayValues=at(this.dayValues),p=this.todayParts=X(C(new Date).toISOString());this.processMinParts(),this.processMaxParts(),this.defaultParts=ot({refParts:p,monthValues:l,dayValues:h,yearValues:c,hourValues:s,minuteValues:d,minParts:this.minParts,maxParts:this.maxParts}),this.processValue(this.value),this.emitStyle()}emitStyle(){this.ionStyle.emit({interactive:!0,datetime:!0,"interactive-disabled":this.disabled})}renderFooter(){const{disabled:t,readonly:e,showDefaultButtons:a,showClearButton:i}=this,o=t||e;if(null===this.el.querySelector('[slot="buttons"]')&&!a&&!i)return;const n=()=>{this.reset(),this.setValue(void 0)};return s("div",{class:"datetime-footer"},s("div",{class:"datetime-buttons"},s("div",{class:{"datetime-action-buttons":!0,"has-clear-button":this.showClearButton}},s("slot",{name:"buttons"},s("ion-buttons",null,a&&s("ion-button",{id:"cancel-button",color:this.color,onClick:()=>this.cancel(!0),disabled:o},this.cancelText),s("div",{class:"datetime-action-buttons-container"},i&&s("ion-button",{id:"clear-button",color:this.color,onClick:()=>n(),disabled:o},this.clearText),a&&s("ion-button",{id:"confirm-button",color:this.color,onClick:()=>this.confirm(!0),disabled:o},this.doneText)))))))}renderWheelPicker(t=this.presentation){const e="time-date"===t?[this.renderTimePickerColumns(t),this.renderDatePickerColumns(t)]:[this.renderDatePickerColumns(t),this.renderTimePickerColumns(t)];return s("ion-picker",{class:u},e)}renderDatePickerColumns(t){return"date-time"===t||"time-date"===t?this.renderCombinedDatePickerColumn():this.renderIndividualDatePickerColumns(t)}renderCombinedDatePickerColumn(){const{defaultParts:e,disabled:a,workingParts:i,locale:o,minParts:n,maxParts:r,todayParts:d,isDateEnabled:l}=this,c=$t(i),h=c[c.length-1];c[0].day=1,h.day=W(h.month,h.year);const p=((t,e,a,i,o,n)=>{let r=[],s=[],d=Vt(a,i);return n&&(d=d.filter((({month:t})=>n.includes(t)))),d.forEach((n=>{const d={month:n.month,day:null,year:n.year},l=zt(t,d,a,i,o,{month:"short",day:"numeric",weekday:"short"}),c=[],h=[];l.forEach((a=>{const i=I({...d,day:a.value},e);h.push({text:i?j(t):a.text,value:`${d.year}-${d.month}-${a.value}`}),c.push({month:d.month,year:d.year,day:a.value})})),s=[...s,...c],r=[...r,...h]})),{parts:s,items:r}})(o,d,void 0!==n&&S(n,c[0])?n:c[0],void 0!==r&&O(r,h)?r:h,this.parsedDayValues,this.parsedMonthValues);let m=p.items;const u=p.parts;l&&(m=m.map(((e,a)=>{const i=u[a];let o;try{o=!l(it(i))}catch(e){t("[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",e)}return{...e,disabled:o}})));const y=null!==i.day?`${i.year}-${i.month}-${i.day}`:`${e.year}-${e.month}-${e.day}`;return s("ion-picker-column",{part:Lt,"aria-label":"Select a date",class:"date-column",color:this.color,disabled:a,value:y,onIonChange:t=>{const{value:e}=t.detail,a=u.find((({month:t,day:a,year:i})=>e===`${i}-${t}-${a}`)),i=this.getActivePartsWithFallback();this.setWorkingParts({...this.workingParts,...a}),this.setActiveParts({...i,...a}),t.stopPropagation()}},m.map((t=>s("ion-picker-column-option",{color:this.color,part:t.value===y?`${Rt} ${Ft}`:Rt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderIndividualDatePickerColumns(e){const{workingParts:a,isDateEnabled:i}=this,o="year"!==e&&"time"!==e?((t,e,a,i,o,n={month:"long"})=>{const{year:r}=e,s=[];if(void 0!==o){let e=o;void 0!==i?.month&&(e=e.filter((t=>t<=i.month))),void 0!==a?.month&&(e=e.filter((t=>t>=a.month))),e.forEach((e=>{const a=new Date(`${e}/1/${r} GMT+0000`),i=new Intl.DateTimeFormat(t,{...n,timeZone:"UTC"}).format(a);s.push({text:i,value:e})}))}else{const e=i&&i.year===r?i.month:12;for(let i=a&&a.year===r?a.month:1;i<=e;i++){const e=new Date(`${i}/1/${r} GMT+0000`),a=new Intl.DateTimeFormat(t,{...n,timeZone:"UTC"}).format(e);s.push({text:a,value:i})}}return s})(this.locale,a,this.minParts,this.maxParts,this.parsedMonthValues):[];let n="date"===e?zt(this.locale,a,this.minParts,this.maxParts,this.parsedDayValues):[];i&&(n=n.map((e=>{const{value:o}=e,n={month:a.month,day:"string"==typeof o?parseInt(o):o,year:a.year};let r;try{r=!i(it(n))}catch(e){t("[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",e)}return{...e,disabled:r}})));const r="month"!==e&&"time"!==e?((t,e,a,i,o)=>{let n=[];if(void 0!==o)n=o,void 0!==i?.year&&(n=n.filter((t=>t<=i.year))),void 0!==a?.year&&(n=n.filter((t=>t>=a.year)));else{const{year:t}=e,o=i?.year??t;for(let e=a?.year??t-100;e<=o;e++)n.push(e)}return n.map((a=>({text:$(t,{year:a,month:e.month,day:e.day}),value:a})))})(this.locale,this.defaultParts,this.minParts,this.maxParts,this.parsedYearValues):[];let s=[];return s=nt(this.locale,{month:"numeric",day:"numeric"})?[this.renderMonthPickerColumn(o),this.renderDayPickerColumn(n),this.renderYearPickerColumn(r)]:[this.renderDayPickerColumn(n),this.renderMonthPickerColumn(o),this.renderYearPickerColumn(r)],s}renderDayPickerColumn(t){if(0===t.length)return[];const{disabled:e,workingParts:a}=this,i=(null!==a.day?a.day:this.defaultParts.day)??void 0;return s("ion-picker-column",{part:Lt,"aria-label":"Select a day",class:"day-column",color:this.color,disabled:e,value:i,onIonChange:t=>{const e=this.getActivePartsWithFallback();this.setWorkingParts({...this.workingParts,day:t.detail.value}),this.setActiveParts({...e,day:t.detail.value}),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{color:this.color,part:t.value===i?`${Rt} ${Ft}`:Rt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderMonthPickerColumn(t){if(0===t.length)return[];const{disabled:e,workingParts:a}=this;return s("ion-picker-column",{part:Lt,"aria-label":"Select a month",class:"month-column",color:this.color,disabled:e,value:a.month,onIonChange:t=>{const e=this.getActivePartsWithFallback();this.setWorkingParts({...this.workingParts,month:t.detail.value}),this.multiple||this.setActiveParts({...e,month:t.detail.value}),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{color:this.color,part:t.value===a.month?`${Rt} ${Ft}`:Rt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderYearPickerColumn(t){if(0===t.length)return[];const{disabled:e,workingParts:a}=this;return s("ion-picker-column",{part:Lt,"aria-label":"Select a year",class:"year-column",color:this.color,disabled:e,value:a.year,onIonChange:t=>{const e=this.getActivePartsWithFallback();this.setWorkingParts({...this.workingParts,year:t.detail.value}),this.multiple||this.setActiveParts({...e,year:t.detail.value}),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{color:this.color,part:t.value===a.year?`${Rt} ${Ft}`:Rt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderTimePickerColumns(t){if(["date","month","month-year","year"].includes(t))return[];const e=void 0!==this.getActivePart(),{hoursData:a,minutesData:i,dayPeriodData:o}=((t,e,a,i,o,n,r)=>{const s=z(t,this.hourCycle),d=M(s),{hours:l,minutes:c,am:h,pm:p}=jt(t,e,s,i,o,n,r),m=l.map((t=>({text:T(t,s),value:V(t,d,e.ampm)}))),u=c.map((t=>({text:A(t),value:t}))),y=[];return h&&!d&&y.push({text:E(t,"am"),value:"am"}),p&&!d&&y.push({text:E(t,"pm"),value:"pm"}),{minutesData:u,hoursData:m,dayPeriodData:y}})(this.locale,this.workingParts,0,e?this.minParts:void 0,e?this.maxParts:void 0,this.parsedHourValues,this.parsedMinuteValues);return[this.renderHourPickerColumn(a),this.renderMinutePickerColumn(i),this.renderDayPeriodPickerColumn(o)]}renderHourPickerColumn(t){const{disabled:e}=this;if(0===t.length)return[];const a=this.getActivePartsWithFallback();return s("ion-picker-column",{part:Lt,"aria-label":"Select an hour",color:this.color,disabled:e,value:a.hour,numericInput:!0,onIonChange:t=>{this.setWorkingParts({...this.workingParts,hour:t.detail.value}),this.setActiveParts({...this.getActivePartsWithFallback(),hour:t.detail.value}),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{color:this.color,part:t.value===a.hour?`${Rt} ${Ft}`:Rt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderMinutePickerColumn(t){const{disabled:e}=this;if(0===t.length)return[];const a=this.getActivePartsWithFallback();return s("ion-picker-column",{part:Lt,"aria-label":"Select a minute",color:this.color,disabled:e,value:a.minute,numericInput:!0,onIonChange:t=>{this.setWorkingParts({...this.workingParts,minute:t.detail.value}),this.setActiveParts({...this.getActivePartsWithFallback(),minute:t.detail.value}),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{color:this.color,part:t.value===a.minute?`${Rt} ${Ft}`:Rt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderDayPeriodPickerColumn(t){const{disabled:e}=this;if(0===t.length)return[];const a=this.getActivePartsWithFallback(),i=rt(this.locale);return s("ion-picker-column",{part:Lt,"aria-label":"Select a day period",style:i?{order:"-1"}:{},color:this.color,disabled:e,value:a.ampm,onIonChange:t=>{const e=this.workingParts,a=ht(e,t.detail.value);this.setWorkingParts({...e,ampm:t.detail.value,hour:a}),this.setActiveParts({...this.getActivePartsWithFallback(),ampm:t.detail.value,hour:a}),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{color:this.color,part:t.value===a.ampm?`${Rt} ${Ft}`:Rt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderWheelView(t){const{locale:e}=this,a=nt(e)?"month-first":"year-first";return s("div",{class:{["wheel-order-"+a]:!0}},this.renderWheelPicker(t))}renderCalendarHeader(t){const{disabled:e}=this,a="ios"===t?g:f,i="ios"===t?x:v,o=e||((t,e,a)=>{const i={...D(this.workingParts),day:null};return Et(i,{minParts:e,maxParts:a})})(0,this.minParts,this.maxParts),n=e||((t,e)=>{const a={...P(this.workingParts),day:null};return Et(a,{maxParts:e})})(0,this.maxParts),r=this.el.getAttribute("dir")||void 0;return s("div",{class:"calendar-header",part:"calendar-header"},s("div",{class:"calendar-action-buttons"},s("div",{class:"calendar-month-year"},s("button",{class:{"calendar-month-year-toggle":!0,"ion-activatable":!0,"ion-focusable":!0},part:"month-year-button",disabled:e,"aria-label":this.showMonthAndYear?"Hide year picker":"Show year picker",onClick:()=>this.toggleMonthAndYearView()},s("span",{id:"toggle-wrapper"},st(this.locale,this.workingParts),s("ion-icon",{"aria-hidden":"true",icon:this.showMonthAndYear?a:i,lazy:!1,flipRtl:!0})),"md"===t&&s("ion-ripple-effect",null))),s("div",{class:"calendar-next-prev"},s("ion-buttons",null,s("ion-button",{"aria-label":"Previous month",disabled:o,onClick:()=>this.prevMonth(),part:"navigation-button previous-button"},s("ion-icon",{dir:r,"aria-hidden":"true",slot:"icon-only",icon:w,lazy:!1,flipRtl:!0})),s("ion-button",{"aria-label":"Next month",disabled:n,onClick:()=>this.nextMonth(),part:"navigation-button next-button"},s("ion-icon",{dir:r,"aria-hidden":"true",slot:"icon-only",icon:x,lazy:!1,flipRtl:!0}))))),s("div",{class:"calendar-days-of-week","aria-hidden":"true",part:"calendar-days-of-week"},((t,e,a=0)=>{const i=new Intl.DateTimeFormat(this.locale,{weekday:"ios"===e?"short":"narrow"}),o=new Date("11/01/2020"),n=[];for(let t=a;t<a+7;t++){const e=new Date(o);e.setDate(e.getDate()+t),n.push(i.format(e))}return n})(0,t,this.firstDayOfWeek%7).map((t=>s("div",{class:"day-of-week"},t)))))}renderMonth(e,a){const{disabled:i,readonly:o}=this,n=void 0===this.parsedYearValues||this.parsedYearValues.includes(a),r=void 0===this.parsedMonthValues||this.parsedMonthValues.includes(e),d=!n||!r,l=i||o,c=i||Et({month:e,year:a,day:null},{minParts:{...this.minParts,day:null},maxParts:{...this.maxParts,day:null}}),h=this.workingParts.month===e&&this.workingParts.year===a,p=this.getActivePartsWithFallback();return s("div",{"aria-hidden":h?null:"true",class:{"calendar-month":!0,"calendar-month-disabled":!h&&c}},s("div",{class:"calendar-month-grid"},((t,e,a,i=!1)=>{const o=W(t,e);let n;n=1===t?W(12,e-1):W(t-1,e);const r=new Date(`${t}/1/${e}`).getDay(),s=r>=a?r-(a+1):6-(a-r);let d=[];for(let t=1;t<=o;t++)d.push({day:t,dayOfWeek:(s+t)%7,isAdjacentDay:!1});if(i){for(let t=0;t<=s;t++)d=[{day:n-t,dayOfWeek:(n-t)%7,isAdjacentDay:!0},...d];const t=41-(o+s);for(let e=0;e<t;e++)d.push({day:e+1,dayOfWeek:(o+s+e)%7,isAdjacentDay:!0})}else for(let t=0;t<=s;t++)d=[{day:null,dayOfWeek:null,isAdjacentDay:!1},...d];return d})(e,a,this.firstDayOfWeek%7,this.showAdjacentDays).map(((i,o)=>{const{day:n,dayOfWeek:r,isAdjacentDay:c}=i,{el:h,highlightedDates:m,isDateEnabled:u,multiple:y,showAdjacentDays:b}=this;let g=e,f=a;b&&c&&null!==n&&(n>20?1===e?(f=a-1,g=12):g=e-1:n<15&&(12===e?(f=a+1,g=1):g=e+1));const x={month:g,day:n,year:f,isAdjacentDay:c},v=null===n,{isActive:w,isToday:k,ariaLabel:C,ariaSelected:P,disabled:D,text:j}=At(this.locale,x,this.activeParts,this.todayParts,this.minParts,this.maxParts,this.parsedDayValues),$=it(x);let z=d||D;if(!z&&void 0!==u)try{z=!u($)}catch(e){t("[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",h,e)}const V=z&&l,T=z||l;let A,E;return void 0===m||w||null===n||c||(A=((e,a,i)=>{if(Array.isArray(e)){const t=a.split("T")[0],i=e.find((e=>e.date===t));if(i)return{textColor:i.textColor,backgroundColor:i.backgroundColor,border:i.border}}else try{return e(a)}catch(e){t("[ion-datetime] - Exception thrown from provided `highlightedDates` callback. Please check your function and try again.",i,e)}})(m,$,h)),v||c?c&&(E="calendar-day"+(z?" disabled":"")):E=`calendar-day${w?" active":""}${k?" today":""}${z?" disabled":""}`,s("div",{class:"calendar-day-wrapper"},s("button",{ref:t=>{t&&(t.style.setProperty("color",""+(A?A.textColor:""),"important"),t.style.setProperty("background-color",""+(A?A.backgroundColor:""),"important"),t.style.setProperty("border",""+(A?A.border:""),"important"))},tabindex:"-1","data-day":n,"data-month":g,"data-year":f,"data-index":o,"data-day-of-week":r,disabled:T,class:{"calendar-day-padding":v,"calendar-day":!0,"calendar-day-active":w,"calendar-day-constrained":V,"calendar-day-today":k,"calendar-day-adjacent-day":c},part:E,"aria-hidden":v?"true":null,"aria-selected":P,"aria-label":C,onClick:()=>{v||(c?(this.el.blur(),this.activeParts={...p,...x},this.animateToDate(x),this.confirm()):(this.setWorkingParts({...this.workingParts,...x}),y?this.setActiveParts(x,w):this.setActiveParts({...p,...x})))}},j))}))))}renderCalendarBody(){return s("div",{class:"calendar-body ion-focusable",ref:t=>this.calendarBodyRef=t,tabindex:"0"},$t(this.workingParts,this.forceRenderDate).map((({month:t,year:e})=>this.renderMonth(t,e))))}renderCalendar(t){return s("div",{class:"datetime-calendar",key:"datetime-calendar"},this.renderCalendarHeader(t),this.renderCalendarBody())}renderTimeLabel(){if(null!==this.el.querySelector('[slot="time-label"]')||this.showDefaultTimeLabel)return s("slot",{name:"time-label"},"Time")}renderTimeOverlay(){const{disabled:t,hourCycle:e,isTimePopoverOpen:a,locale:i,formatOptions:o}=this,n=z(i,e),r=this.getActivePartsWithFallback();return[s("div",{class:"time-header"},this.renderTimeLabel()),s("button",{class:{"time-body":!0,"time-body-active":a},part:"time-button"+(a?" active":""),"aria-expanded":"false","aria-haspopup":"true",disabled:t,onClick:async t=>{const{popoverRef:e}=this;e&&(this.isTimePopoverOpen=!0,e.present(new CustomEvent("ionShadowTarget",{detail:{ionShadowTarget:t.target}})),await e.onWillDismiss(),this.isTimePopoverOpen=!1)}},dt(i,r,n,o?.time)),s("ion-popover",{alignment:"center",translucent:!0,overlayIndex:1,arrow:!1,onWillPresent:t=>{t.target.querySelectorAll("ion-picker-column").forEach((t=>t.scrollActiveItemIntoView()))},style:{"--offset-y":"-10px","--min-width":"fit-content"},keyboardEvents:!0,ref:t=>this.popoverRef=t},this.renderWheelPicker("time"))]}getHeaderSelectedDateText(){const{activeParts:e,formatOptions:a,multiple:i,titleSelectedDatesFormatter:o}=this;let n;if(i&&Array.isArray(e)&&1!==e.length){if(n=e.length+" days",void 0!==o)try{n=o(it(e))}catch(e){t("[ion-datetime] - Exception in provided `titleSelectedDatesFormatter`:",e)}}else n=lt(this.locale,this.getActivePartsWithFallback(),a?.date??{weekday:"short",month:"short",day:"numeric"});return n}renderHeader(t=!0){if(null!==this.el.querySelector('[slot="title"]')||this.showDefaultTitle)return s("div",{class:"datetime-header",part:"datetime-header"},s("div",{class:"datetime-title",part:"datetime-title"},s("slot",{name:"title"},"Select Date")),t&&s("div",{class:"datetime-selected-date",part:"datetime-selected-date"},this.getHeaderSelectedDateText()))}renderTime(){const{presentation:t}=this;return s("div",{class:"datetime-time"},"time"===t?this.renderWheelPicker():this.renderTimeOverlay())}renderCalendarViewMonthYearPicker(){return s("div",{class:"datetime-year"},this.renderWheelView("month-year"))}renderDatetime(t){const{presentation:e,preferWheel:a}=this;if(a&&("date"===e||"date-time"===e||"time-date"===e))return[this.renderHeader(!1),this.renderWheelView(),this.renderFooter()];switch(e){case"date-time":return[this.renderHeader(),this.renderCalendar(t),this.renderCalendarViewMonthYearPicker(),this.renderTime(),this.renderFooter()];case"time-date":return[this.renderHeader(),this.renderTime(),this.renderCalendar(t),this.renderCalendarViewMonthYearPicker(),this.renderFooter()];case"time":return[this.renderHeader(!1),this.renderTime(),this.renderFooter()];case"month":case"month-year":case"year":return[this.renderHeader(!1),this.renderWheelView(),this.renderFooter()];default:return[this.renderHeader(),this.renderCalendar(t),this.renderCalendarViewMonthYearPicker(),this.renderFooter()]}}render(){const{name:t,value:e,disabled:a,el:i,color:o,readonly:n,showMonthAndYear:r,preferWheel:l,presentation:c,size:h,isGridStyle:p}=this,u=k(this),y="year"===c||"month"===c||"month-year"===c,g=r||y,f=r&&!y,x=("date"===c||"date-time"===c||"time-date"===c)&&l;return m(!0,i,t,ct(e),a),s(d,{key:"a9128b5c55464e30a269daf9d725bf430c8c655c","aria-disabled":a?"true":null,onFocus:this.onFocus,onBlur:this.onBlur,class:{...b(o,{[u]:!0,"datetime-readonly":n,"datetime-disabled":a,"show-month-and-year":g,"month-year-picker-open":f,["datetime-presentation-"+c]:!0,["datetime-size-"+h]:!0,"datetime-prefer-wheel":x,"datetime-grid":p})}},s("div",{key:"b49f3a98db2b7cf535d7ea894d518f75f8a1fefb",class:"intersection-tracker",ref:t=>this.intersectionTrackerRef=t}),this.renderDatetime(u))}get el(){return this}static get watchers(){return{formatOptions:[{formatOptionsChanged:0}],disabled:[{disabledChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],presentation:[{presentationChanged:0}],yearValues:[{yearValuesChanged:0}],monthValues:[{monthValuesChanged:0}],dayValues:[{dayValuesChanged:0}],hourValues:[{hourValuesChanged:0}],minuteValues:[{minuteValuesChanged:0}],value:[{valueChanged:0}]}}static get style(){return{ios:':host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons ion-button{--color:var(--ion-color-primary, #0054e9)}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2)}:host(.ion-color) .calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-primary, #0054e9)}:host(.ion-color.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-light, #f4f5f8);--background-rgb:var(--ion-color-light-rgb, 244, 245, 248);--title-color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),:host(.datetime-presentation-date:not(.datetime-prefer-wheel)){min-height:350px}:host .datetime-header{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc));font-size:min(0.875rem, 22.4px)}:host .datetime-header .datetime-title{color:var(--title-color)}:host .datetime-header .datetime-selected-date{margin-top:10px}.calendar-month-year-toggle{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;min-height:44px;font-size:min(1rem, 25.6px);font-weight:600}.calendar-month-year-toggle.ion-focused::after{opacity:0.15}.calendar-month-year-toggle #toggle-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:10px;margin-bottom:10px}:host .calendar-action-buttons .calendar-month-year-toggle ion-icon,:host .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-action-buttons .calendar-month-year-toggle ion-icon,:host(.ion-color) .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-buttons{-ms-flex-align:stretch;align-items:stretch;height:100%}:host .calendar-action-buttons ion-buttons ion-button{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host .calendar-days-of-week{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3));font-size:min(0.75rem, 19.2px);font-weight:600;line-height:24px;text-transform:uppercase}@supports (border-radius: mod(1px, 1px)){.calendar-days-of-week .day-of-week{width:clamp(20px, calc(mod(min(1rem, 24px), 24px) * 10), 100%);height:24px;overflow:hidden}.calendar-day{border-radius:max(8px, mod(min(1rem, 24px), 24px) * 10)}}@supports ((border-radius: mod(1px, 1px)) and (background: -webkit-named-image(apple-pay-logo-black)) and (not (contain-intrinsic-size: none))) or (not (border-radius: mod(1px, 1px))){.calendar-days-of-week .day-of-week{width:auto;height:auto;overflow:initial}.calendar-day{border-radius:32px}}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-ms-flex-align:center;align-items:center;height:calc(100% - 16px)}:host .calendar-day-wrapper{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;height:0;min-height:1rem}:host .calendar-day{width:40px;min-width:40px;height:40px;font-size:min(1.25rem, 32px)}.calendar-day.calendar-day-active{background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);font-size:min(1.375rem, 35.2px)}:host(.ion-color) .calendar-day.calendar-day-active{background:rgba(var(--ion-color-base-rgb), 0.2)}:host .calendar-day.calendar-day-today{color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-active,:host .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-primary, #0054e9);font-weight:600}:host(.ion-color) .calendar-day.calendar-day-active,:host(.ion-color) .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-base)}:host .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-primary, #0054e9);color:var(--ion-color-primary-contrast, #fff)}:host(.ion-color) .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3))}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:16px;font-size:min(1rem, 25.6px)}:host .datetime-time .time-header{font-weight:600}:host .datetime-buttons{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc))}:host .datetime-buttons ::slotted(ion-buttons),:host .datetime-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons{width:100%}',md:':host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons ion-button{--color:var(--ion-color-primary, #0054e9)}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2)}:host(.ion-color) .calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-primary, #0054e9)}:host(.ion-color.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #ffffff));--title-color:var(--ion-color-primary-contrast, #fff)}:host(.ion-color){--title-color:var(--ion-color-contrast)}:host .datetime-header{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:20px;padding-bottom:20px;background:var(--ion-color-primary, #0054e9);color:var(--title-color)}:host(.ion-color) .datetime-header{background:var(--ion-color-base)}:host .datetime-header .datetime-title{font-size:0.75rem;text-transform:uppercase}:host .datetime-header .datetime-selected-date{margin-top:30px;font-size:2.125rem}:host .calendar-action-buttons ion-button{--color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}.calendar-month-year-toggle{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:12px;min-height:48px;background:transparent;color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959));z-index:1}.calendar-month-year-toggle.ion-focused::after{opacity:0.04}.calendar-month-year-toggle ion-ripple-effect{color:currentColor}@media (any-hover: hover){.calendar-month-year-toggle.ion-activatable:not(.ion-focused):hover::after{background:currentColor;opacity:0.04}}:host .calendar-days-of-week{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:0px;padding-bottom:0px;color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray));font-size:0.875rem;line-height:36px}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:4px;padding-bottom:4px;grid-template-rows:repeat(6, 1fr)}:host .calendar-day{width:42px;min-width:42px;height:42px;font-size:0.875rem}:host .calendar-day.calendar-day-today{border:1px solid var(--ion-color-primary, #0054e9);color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-day.calendar-day-today{border:1px solid var(--ion-color-base);color:var(--ion-color-base)}:host .calendar-day.calendar-day-active,:host .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-primary-contrast, #fff)}:host(.ion-color) .calendar-day.calendar-day-active,:host(.ion-color) .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-contrast)}.calendar-day.calendar-day-active,.calendar-day.calendar-day-active:focus{border:1px solid var(--ion-color-primary, #0054e9);background:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-day.calendar-day-active,:host(.ion-color) .calendar-day.calendar-day-active:focus{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray))}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:8px}:host .time-header{color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}:host(.datetime-presentation-month) .datetime-year,:host(.datetime-presentation-year) .datetime-year,:host(.datetime-presentation-month-year) .datetime-year{margin-top:20px;margin-bottom:20px}:host .datetime-buttons{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}'}}},[289,"ion-datetime",{color:[1],name:[1],disabled:[4],formatOptions:[16],readonly:[4],isDateEnabled:[16],showAdjacentDays:[4,"show-adjacent-days"],min:[1025],max:[1025],presentation:[1],cancelText:[1,"cancel-text"],doneText:[1,"done-text"],clearText:[1,"clear-text"],yearValues:[8,"year-values"],monthValues:[8,"month-values"],dayValues:[8,"day-values"],hourValues:[8,"hour-values"],minuteValues:[8,"minute-values"],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],titleSelectedDatesFormatter:[16],multiple:[4],highlightedDates:[16],value:[1025],showDefaultTitle:[4,"show-default-title"],showDefaultButtons:[4,"show-default-buttons"],showClearButton:[4,"show-clear-button"],showDefaultTimeLabel:[4,"show-default-time-label"],hourCycle:[1,"hour-cycle"],size:[1],preferWheel:[4,"prefer-wheel"],showMonthAndYear:[32],activeParts:[32],workingParts:[32],isTimePopoverOpen:[32],forceRenderDate:[32],confirm:[64],reset:[64],cancel:[64],getDefaultPart:[64]},void 0,{formatOptions:[{formatOptionsChanged:0}],disabled:[{disabledChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],presentation:[{presentationChanged:0}],yearValues:[{yearValuesChanged:0}],monthValues:[{monthValuesChanged:0}],dayValues:[{dayValuesChanged:0}],hourValues:[{hourValuesChanged:0}],minuteValues:[{minuteValuesChanged:0}],value:[{valueChanged:0}]}]);let Mt=0;const Wt="datetime-cancel",Bt="datetime-confirm",Lt="wheel",Rt="wheel-item",Ft="active",Ht=St,Zt=function(){"undefined"!=typeof customElements&&["ion-datetime","ion-backdrop","ion-button","ion-buttons","ion-icon","ion-picker","ion-picker-column","ion-picker-column-option","ion-popover","ion-ripple-effect"].forEach((t=>{switch(t){case"ion-datetime":customElements.get(l(t))||customElements.define(l(t),St);break;case"ion-backdrop":customElements.get(l(t))||pt();break;case"ion-button":customElements.get(l(t))||mt();break;case"ion-buttons":customElements.get(l(t))||ut();break;case"ion-icon":customElements.get(l(t))||yt();break;case"ion-picker":customElements.get(l(t))||bt();break;case"ion-picker-column":customElements.get(l(t))||gt();break;case"ion-picker-column-option":customElements.get(l(t))||ft();break;case"ion-popover":customElements.get(l(t))||xt();break;case"ion-ripple-effect":customElements.get(l(t))||vt()}}))};export{Ht as IonDatetime,Zt as defineCustomElement}
|
|
4
|
+
import{c as t,p as e,d as a,H as i,i as o,w as n,e as r,h as s,f as d,t as l}from"./p-Ct2aBEue.js";import{startFocusVisible as c}from"./p-BmVRXR1y.js";import{r as h,g as p,d as m}from"./p-B4IBdPVJ.js";import{F as u}from"./p-B02CcbPD.js";import{i as y}from"./p-Dojwmvde.js";import{c as b}from"./p-byZM6qHV.js";import{c as g,f,g as x,h as v,a as w}from"./p-LpMHEu3v.js";import{b as k}from"./p-HthJZjZ6.js";import{r as C,g as P,a as D,b as j,c as $,d as z,e as V,f as T,h as A,i as E,j as O,k as I,l as S,m as M,n as W,o as B,p as L,v as R,q as F,s as H,t as Z,u as q,w as G,x as U,y as Y,z as N,A as K,B as Q,C as J,D as X,E as _,F as tt,G as et,H as at,I as it,J as ot,K as nt,L as rt,M as st,N as dt,O as lt,P as ct,Q as ht}from"./p-CdrNHfZl.js";import{d as pt}from"./p-DMPsc_0r.js";import{d as mt}from"./p-DDI6VLW9.js";import{d as ut}from"./p-CvyvLbPe.js";import{d as yt}from"./p-ChkSQqfP.js";import{d as bt}from"./p-BqyLLYLm.js";import{d as gt}from"./p-GpqwNbxf.js";import{d as ft}from"./p-r59A3wQk.js";import{d as xt}from"./p-CQKWzUsE.js";import{d as vt}from"./p-7KepMw9O.js";const wt=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59],kt=[0,1,2,3,4,5,6,7,8,9,10,11],Ct=[0,1,2,3,4,5,6,7,8,9,10,11],Pt=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],Dt=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,0],jt=(t,e,a="h12",i,o,n,r)=>{const s=z(t,a),d=M(s);let l=(t=>{switch(t){case"h11":return kt;case"h12":return Ct;case"h23":return Pt;case"h24":return Dt;default:throw Error(`Invalid hour cycle "${t}"`)}})(s),c=wt,h=!0,p=!0;if(n&&(l=l.filter((t=>n.includes(t)))),r&&(c=c.filter((t=>r.includes(t)))),i)if(I(e,i)){if(void 0!==i.hour&&(l=l.filter((t=>(d?t:"pm"===e.ampm?(t+12)%24:t)>=i.hour)),h=i.hour<13),void 0!==i.minute){let t=!1;void 0!==i.hour&&void 0!==e.hour&&e.hour>i.hour&&(t=!0),c=c.filter((e=>!!t||e>=i.minute))}}else O(e,i)&&(l=[],c=[],h=p=!1);return o&&(I(e,o)?(void 0!==o.hour&&(l=l.filter((t=>(d?t:"pm"===e.ampm?(t+12)%24:t)<=o.hour)),p=o.hour>=12),void 0!==o.minute&&e.hour===o.hour&&(c=c.filter((t=>t<=o.minute)))):S(e,o)&&(l=[],c=[],h=p=!1)),{hours:l,minutes:c,am:h,pm:p}},$t=(t,e)=>{const a={month:t.month,year:t.year,day:t.day};if(void 0!==e&&(t.month!==e.month||t.year!==e.year)){const i={month:e.month,year:e.year,day:e.day};return O(i,a)?[i,a,P(t)]:[D(t),a,i]}return[D(t),a,P(t)]},zt=(t,e,a,i,o,n={day:"numeric"})=>{const{month:r,year:s}=e,d=[],l=W(r,s),c=null!=i?.day&&i.year===s&&i.month===r?i.day:l,h=null!=a?.day&&a.year===s&&a.month===r?a.day:1;if(void 0!==o){let e=o;e=e.filter((t=>t>=h&&t<=c)),e.forEach((e=>{const a=new Date(`${r}/${e}/${s} GMT+0000`),i=new Intl.DateTimeFormat(t,{...n,timeZone:"UTC"}).format(a);d.push({text:i,value:e})}))}else for(let e=h;e<=c;e++){const a=new Date(`${r}/${e}/${s} GMT+0000`),i=new Intl.DateTimeFormat(t,{...n,timeZone:"UTC"}).format(a);d.push({text:i,value:e})}return d},Vt=(t,e)=>t.month===e.month&&t.year===e.year?[t]:[t,...Vt(P(t),e)],Tt=(t,e,a,i)=>null===t.day||void 0!==i&&!i.includes(t.day)||!(!e||!O(t,e))||!(!a||!S(t,a)),At=(t,e,a,i,o,n,r)=>{const s=void 0!==(Array.isArray(a)?a:[a]).find((t=>I(e,t))),d=I(e,i);return{disabled:Tt(e,o,n,r),isActive:s,isToday:d,ariaSelected:s?"true":null,ariaLabel:L(t,d,e),text:null!=e.day?B(t,e):null}},Et=(t,{minParts:e,maxParts:a})=>!!((t,e,a)=>!!(e&&e.year>t)||!!(a&&a.year<t))(t.year,e,a)||!!(e&&O(t,e)||a&&S(t,a)),Ot=(t,a)=>{(a?.date?.timeZone||a?.date?.timeZoneName||a?.time?.timeZone||a?.time?.timeZoneName)&&e('[ion-datetime] - "timeZone" and "timeZoneName" are not supported in "formatOptions".',t)},It=(t,a,i)=>{if(i)switch(a){case"date":case"month-year":case"month":case"year":void 0===i.date&&e(`[ion-datetime] - The '${a}' presentation requires a date object in formatOptions.`,t);break;case"time":void 0===i.time&&e("[ion-datetime] - The 'time' presentation requires a time object in formatOptions.",t);break;case"date-time":case"time-date":void 0===i.date&&void 0===i.time&&e(`[ion-datetime] - The '${a}' presentation requires either a date or time object (or both) in formatOptions.`,t)}},St=a(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.ionCancel=o(this,"ionCancel",7),this.ionChange=o(this,"ionChange",7),this.ionValueChange=o(this,"ionValueChange",7),this.ionFocus=o(this,"ionFocus",7),this.ionBlur=o(this,"ionBlur",7),this.ionStyle=o(this,"ionStyle",7),this.ionRender=o(this,"ionRender",7),this.inputId="ion-dt-"+Mt++,this.prevPresentation=null,this.showMonthAndYear=!1,this.activeParts=[],this.workingParts={month:5,day:28,year:2021,hour:13,minute:52,ampm:"pm",isAdjacentDay:!1},this.isTimePopoverOpen=!1,this.name=this.inputId,this.disabled=!1,this.readonly=!1,this.showAdjacentDays=!1,this.presentation="date-time",this.cancelText="Cancel",this.doneText="Done",this.clearText="Clear",this.locale="default",this.firstDayOfWeek=0,this.multiple=!1,this.showDefaultTitle=!1,this.showDefaultButtons=!1,this.showClearButton=!1,this.showDefaultTimeLabel=!0,this.size="fixed",this.preferWheel=!1,this.warnIfIncorrectValueUsage=()=>{const{multiple:t,value:a}=this;!t&&Array.isArray(a)&&e(`[ion-datetime] - An array of values was passed, but multiple is "false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".\n\n Value Passed: [${a.map((t=>`'${t}'`)).join(", ")}]\n`,this.el)},this.setValue=t=>{this.value=t,this.ionChange.emit({value:t})},this.getActivePartsWithFallback=()=>{const{defaultParts:t}=this;return this.getActivePart()??t},this.getActivePart=()=>{const{activeParts:t}=this;return Array.isArray(t)?t[0]:t},this.closeParentOverlay=t=>{const e=this.el.closest("ion-modal, ion-popover");e&&e.dismiss(void 0,t)},this.setWorkingParts=t=>{this.workingParts={...t}},this.setActiveParts=(t,e=!1)=>{if(this.readonly)return;const{multiple:a,minParts:i,maxParts:o,activeParts:n}=this,r=R(t,i,o);if(this.setWorkingParts(r),a){const t=Array.isArray(n)?n:[n];this.activeParts=e?t.filter((t=>!I(t,r))):[...t,r]}else this.activeParts={...r};null!==this.el.querySelector('[slot="buttons"]')||this.showDefaultButtons||this.confirm()},this.initializeKeyboardListeners=()=>{const t=this.calendarBodyRef;if(!t)return;const e=this.el.shadowRoot,a=t.querySelector(".calendar-month:nth-of-type(2)"),i=new MutationObserver((e=>{const i=e[0];!i.oldValue?.includes("ion-focused")&&t.classList.contains("ion-focused")&&this.focusWorkingDay(a)}));i.observe(t,{attributeFilter:["class"],attributeOldValue:!0}),this.destroyKeyboardMO=()=>{i?.disconnect()},t.addEventListener("keydown",(t=>{const i=e.activeElement;if(!i||!i.classList.contains("calendar-day"))return;const o=F(i);let n;switch(t.key){case"ArrowDown":t.preventDefault(),n=K(o);break;case"ArrowUp":t.preventDefault(),n=N(o);break;case"ArrowRight":t.preventDefault(),n=Y(o);break;case"ArrowLeft":t.preventDefault(),n=U(o);break;case"Home":t.preventDefault(),n=G(o);break;case"End":t.preventDefault(),n=q(o);break;case"PageUp":t.preventDefault(),n=t.shiftKey?Z(o):D(o);break;case"PageDown":t.preventDefault(),n=t.shiftKey?H(o):P(o);break;default:return}Tt(n,this.minParts,this.maxParts)||(this.setWorkingParts({...this.workingParts,...n}),requestAnimationFrame((()=>this.focusWorkingDay(a))))}))},this.focusWorkingDay=t=>{const{day:e,month:a,year:i}=this.workingParts,o=new Date(`${a}/1/${i}`).getDay();if(null===e)return;const n=t.querySelector(`.calendar-day-wrapper:nth-of-type(${(o>=this.firstDayOfWeek?o-this.firstDayOfWeek:7-(this.firstDayOfWeek-o))+e}) .calendar-day`);n&&n.focus()},this.processMinParts=()=>{const{min:t,defaultParts:e}=this;this.minParts=void 0!==t?Q(t,e):void 0},this.processMaxParts=()=>{const{max:t,defaultParts:e}=this;this.maxParts=void 0!==t?J(t,e):void 0},this.initializeCalendarListener=()=>{const t=this.calendarBodyRef;if(!t)return;const e=t.querySelectorAll(".calendar-month"),a=e[0],i=e[1],o=e[2],r="ios"===k(this)&&"undefined"!=typeof navigator&&navigator.maxTouchPoints>1;n((()=>{t.scrollLeft=a.clientWidth*(y(this.el)?-1:1);const e=e=>{const i=t.getBoundingClientRect(),n=(y(this.el)?t.scrollLeft>=-2:t.scrollLeft<=2)?a:o,r=n.getBoundingClientRect();if(Math.abs(r.x-i.x)>2)return;const{forceRenderDate:s}=this;return void 0!==s?{month:s.month,year:s.year,day:s.day}:n===a?D(e):n===o?P(e):void 0},s=()=>{r&&(t.style.removeProperty("pointer-events"),l=!1);const a=e(this.workingParts);if(!a)return;const{month:o,day:s,year:d}=a;Et({month:o,year:d,day:null},{minParts:{...this.minParts,day:null},maxParts:{...this.maxParts,day:null}})||(t.style.setProperty("overflow","hidden"),n((()=>{this.setWorkingParts({...this.workingParts,month:o,day:s,year:d}),t.scrollLeft=i.clientWidth*(y(this.el)?-1:1),t.style.removeProperty("overflow"),this.resolveForceDateScrolling&&this.resolveForceDateScrolling();const e=this.el.shadowRoot.activeElement;e&&e.classList.contains("calendar-day")&&e.closest(".calendar-body")?.focus()})))};let d,l=!1;const c=()=>{d&&clearTimeout(d),!l&&r&&(t.style.setProperty("pointer-events","none"),l=!0),d=setTimeout(s,50)};t.addEventListener("scroll",c),this.destroyCalendarListener=()=>{t.removeEventListener("scroll",c)}}))},this.destroyInteractionListeners=()=>{const{destroyCalendarListener:t,destroyKeyboardMO:e}=this;void 0!==t&&t(),void 0!==e&&e()},this.ensureReadyIfVisible=()=>{this.el.classList.contains("datetime-ready")||this.hasLayoutBox()&&this.markReady()},this.hasLayoutBox=()=>{const{width:t,height:e}=this.el.getBoundingClientRect();return t>0&&e>0},this.markReady=()=>{this.el.classList.contains("datetime-ready")||(this.initializeListeners(),n((()=>{this.el.classList.add("datetime-ready")})))},this.loadTimeoutCleanup=()=>{this.loadTimeout&&(clearTimeout(this.loadTimeout),this.loadTimeout=void 0)},this.processValue=t=>{const e=null!=t&&""!==t&&(!Array.isArray(t)||t.length>0),a=e?X(t):this.defaultParts,{minParts:i,maxParts:o,workingParts:n,el:r}=this;if(this.warnIfIncorrectValueUsage(),!a)return;e&&_(a,i,o);const s=et(Array.isArray(a)?a[a.length-1]:a,i,o),{month:d,day:l,year:c,hour:h,minute:p}=s,m=tt(h);this.activeParts=e?Array.isArray(a)?[...a]:{month:d,day:l,year:c,hour:h,minute:p,ampm:m}:[];const u=void 0!==d&&d!==n.month||void 0!==c&&c!==n.year,y=r.classList.contains("datetime-ready"),{isGridStyle:b,showMonthAndYear:g}=this;b&&u&&y&&!g?this.animateToDate(s):this.setWorkingParts({month:d,day:l,year:c,hour:h,minute:p,ampm:m})},this.animateToDate=async t=>{const{workingParts:e}=this;this.forceRenderDate=t;const a=new Promise((t=>{this.resolveForceDateScrolling=t}));O(t,e)?this.prevMonth():this.nextMonth(),await a,this.resolveForceDateScrolling=void 0,this.forceRenderDate=void 0},this.onFocus=()=>{this.ionFocus.emit()},this.onBlur=()=>{this.ionBlur.emit()},this.hasValue=()=>null!=this.value,this.nextMonth=()=>{const t=this.calendarBodyRef;if(!t)return;const e=t.querySelector(".calendar-month:last-of-type");if(!e)return;const a=2*e.offsetWidth,i=r.getBoolean("animated",!0)?"smooth":"instant";t.scrollTo({top:0,left:a*(y(this.el)?-1:1),behavior:i})},this.prevMonth=()=>{const t=this.calendarBodyRef;if(!t)return;const e=t.querySelector(".calendar-month:first-of-type");if(!e)return;const a=2*e.offsetWidth,i=r.getBoolean("animated",!0)?"smooth":"instant";t.scrollTo({top:0,left:a*(y(this.el)?1:-1),behavior:i})},this.toggleMonthAndYearView=()=>{this.showMonthAndYear=!this.showMonthAndYear}}formatOptionsChanged(){const{el:t,formatOptions:e,presentation:a}=this;It(t,a,e),Ot(t,e)}disabledChanged(){this.emitStyle()}minChanged(){this.processMinParts()}maxChanged(){this.processMaxParts()}presentationChanged(){const{el:t,formatOptions:e,presentation:a}=this;It(t,a,e)}get isGridStyle(){const{presentation:t,preferWheel:e}=this;return("date"===t||"date-time"===t||"time-date"===t)&&!e}yearValuesChanged(){this.parsedYearValues=at(this.yearValues)}monthValuesChanged(){this.parsedMonthValues=at(this.monthValues)}dayValuesChanged(){this.parsedDayValues=at(this.dayValues)}hourValuesChanged(){this.parsedHourValues=at(this.hourValues)}minuteValuesChanged(){this.parsedMinuteValues=at(this.minuteValues)}async valueChanged(){const{value:t}=this;this.hasValue()&&this.processValue(t),this.emitStyle(),this.ionValueChange.emit({value:t})}async confirm(t=!1){const{isCalendarPicker:e,activeParts:a,preferWheel:i,workingParts:o}=this;void 0===a&&e||this.setValue(Array.isArray(a)&&0===a.length?i?it(o):void 0:it(a)),t&&this.closeParentOverlay(Bt)}async reset(t){this.processValue(t)}async cancel(t=!1){this.ionCancel.emit(),t&&this.closeParentOverlay(Wt)}async getDefaultPart(){return this.defaultParts}get isCalendarPicker(){const{presentation:t}=this;return"date"===t||"date-time"===t||"time-date"===t}connectedCallback(){this.clearFocusVisible=c(this.el).destroy,this.loadTimeout=setTimeout((()=>{this.ensureReadyIfVisible()}),100)}disconnectedCallback(){this.clearFocusVisible&&(this.clearFocusVisible(),this.clearFocusVisible=void 0),this.loadTimeoutCleanup()}initializeListeners(){this.initializeCalendarListener(),this.initializeKeyboardListeners()}componentDidLoad(){const{el:t,intersectionTrackerRef:e}=this,a=new IntersectionObserver((t=>{t[t.length-1].isIntersecting&&this.markReady()}),{threshold:.01,root:t});h((()=>a?.observe(e))),this.loadTimeoutCleanup(),this.loadTimeout=setTimeout((()=>{this.ensureReadyIfVisible()}),100);const i=new IntersectionObserver((t=>{t[t.length-1].isIntersecting||this.hasLayoutBox()||(this.destroyInteractionListeners(),this.showMonthAndYear=!1,n((()=>{this.el.classList.remove("datetime-ready")})))}),{threshold:0,root:t});h((()=>i?.observe(e)));const o=p(this.el);o.addEventListener("ionFocus",(t=>t.stopPropagation())),o.addEventListener("ionBlur",(t=>t.stopPropagation()))}componentDidRender(){const{presentation:t,prevPresentation:e,calendarBodyRef:a,minParts:i,preferWheel:o,forceRenderDate:n}=this;if(void 0!==i&&!o&&["date-time","time-date","date"].includes(t)&&a){const t=a.querySelector(".calendar-month:nth-of-type(1)");t&&void 0===n&&(a.scrollLeft=t.clientWidth*(y(this.el)?-1:1))}null!==e?t!==e&&(this.prevPresentation=t,this.destroyInteractionListeners(),this.initializeListeners(),this.showMonthAndYear=!1,h((()=>{this.ionRender.emit()}))):this.prevPresentation=t}componentWillLoad(){const{el:t,formatOptions:a,highlightedDates:i,multiple:o,presentation:n,preferWheel:r}=this;o&&("date"!==n&&e('[ion-datetime] - Multiple date selection is only supported for presentation="date".',t),r&&e('[ion-datetime] - Multiple date selection is not supported with preferWheel="true".',t)),void 0!==i&&("date"!==n&&"date-time"!==n&&"time-date"!==n&&e("[ion-datetime] - The highlightedDates property is only supported with the date, date-time, and time-date presentations.",t),r&&e('[ion-datetime] - The highlightedDates property is not supported with preferWheel="true".',t)),a&&(It(t,n,a),Ot(t,a));const s=this.parsedHourValues=at(this.hourValues),d=this.parsedMinuteValues=at(this.minuteValues),l=this.parsedMonthValues=at(this.monthValues),c=this.parsedYearValues=at(this.yearValues),h=this.parsedDayValues=at(this.dayValues),p=this.todayParts=X(C(new Date).toISOString());this.processMinParts(),this.processMaxParts(),this.defaultParts=ot({refParts:p,monthValues:l,dayValues:h,yearValues:c,hourValues:s,minuteValues:d,minParts:this.minParts,maxParts:this.maxParts}),this.processValue(this.value),this.emitStyle()}emitStyle(){this.ionStyle.emit({interactive:!0,datetime:!0,"interactive-disabled":this.disabled})}renderFooter(){const{disabled:t,readonly:e,showDefaultButtons:a,showClearButton:i}=this,o=t||e;if(null===this.el.querySelector('[slot="buttons"]')&&!a&&!i)return;const n=()=>{this.reset(),this.setValue(void 0)};return s("div",{class:"datetime-footer"},s("div",{class:"datetime-buttons"},s("div",{class:{"datetime-action-buttons":!0,"has-clear-button":this.showClearButton}},s("slot",{name:"buttons"},s("ion-buttons",null,a&&s("ion-button",{id:"cancel-button",color:this.color,onClick:()=>this.cancel(!0),disabled:o},this.cancelText),s("div",{class:"datetime-action-buttons-container"},i&&s("ion-button",{id:"clear-button",color:this.color,onClick:()=>n(),disabled:o},this.clearText),a&&s("ion-button",{id:"confirm-button",color:this.color,onClick:()=>this.confirm(!0),disabled:o},this.doneText)))))))}renderWheelPicker(t=this.presentation){const e="time-date"===t?[this.renderTimePickerColumns(t),this.renderDatePickerColumns(t)]:[this.renderDatePickerColumns(t),this.renderTimePickerColumns(t)];return s("ion-picker",{class:u},e)}renderDatePickerColumns(t){return"date-time"===t||"time-date"===t?this.renderCombinedDatePickerColumn():this.renderIndividualDatePickerColumns(t)}renderCombinedDatePickerColumn(){const{defaultParts:e,disabled:a,workingParts:i,locale:o,minParts:n,maxParts:r,todayParts:d,isDateEnabled:l}=this,c=$t(i),h=c[c.length-1];c[0].day=1,h.day=W(h.month,h.year);const p=((t,e,a,i,o,n)=>{let r=[],s=[],d=Vt(a,i);return n&&(d=d.filter((({month:t})=>n.includes(t)))),d.forEach((n=>{const d={month:n.month,day:null,year:n.year},l=zt(t,d,a,i,o,{month:"short",day:"numeric",weekday:"short"}),c=[],h=[];l.forEach((a=>{const i=I({...d,day:a.value},e);h.push({text:i?j(t):a.text,value:`${d.year}-${d.month}-${a.value}`}),c.push({month:d.month,year:d.year,day:a.value})})),s=[...s,...c],r=[...r,...h]})),{parts:s,items:r}})(o,d,void 0!==n&&S(n,c[0])?n:c[0],void 0!==r&&O(r,h)?r:h,this.parsedDayValues,this.parsedMonthValues);let m=p.items;const u=p.parts;l&&(m=m.map(((e,a)=>{const i=u[a];let o;try{o=!l(it(i))}catch(e){t("[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",e)}return{...e,disabled:o}})));const y=null!==i.day?`${i.year}-${i.month}-${i.day}`:`${e.year}-${e.month}-${e.day}`;return s("ion-picker-column",{part:Lt,"aria-label":"Select a date",class:"date-column",color:this.color,disabled:a,value:y,onIonChange:t=>{const{value:e}=t.detail,a=u.find((({month:t,day:a,year:i})=>e===`${i}-${t}-${a}`)),i=this.getActivePartsWithFallback();this.setWorkingParts({...this.workingParts,...a}),this.setActiveParts({...i,...a}),t.stopPropagation()}},m.map((t=>s("ion-picker-column-option",{color:this.color,part:t.value===y?`${Rt} ${Ft}`:Rt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderIndividualDatePickerColumns(e){const{workingParts:a,isDateEnabled:i}=this,o="year"!==e&&"time"!==e?((t,e,a,i,o,n={month:"long"})=>{const{year:r}=e,s=[];if(void 0!==o){let e=o;void 0!==i?.month&&(e=e.filter((t=>t<=i.month))),void 0!==a?.month&&(e=e.filter((t=>t>=a.month))),e.forEach((e=>{const a=new Date(`${e}/1/${r} GMT+0000`),i=new Intl.DateTimeFormat(t,{...n,timeZone:"UTC"}).format(a);s.push({text:i,value:e})}))}else{const e=i&&i.year===r?i.month:12;for(let i=a&&a.year===r?a.month:1;i<=e;i++){const e=new Date(`${i}/1/${r} GMT+0000`),a=new Intl.DateTimeFormat(t,{...n,timeZone:"UTC"}).format(e);s.push({text:a,value:i})}}return s})(this.locale,a,this.minParts,this.maxParts,this.parsedMonthValues):[];let n="date"===e?zt(this.locale,a,this.minParts,this.maxParts,this.parsedDayValues):[];i&&(n=n.map((e=>{const{value:o}=e,n={month:a.month,day:"string"==typeof o?parseInt(o):o,year:a.year};let r;try{r=!i(it(n))}catch(e){t("[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",e)}return{...e,disabled:r}})));const r="month"!==e&&"time"!==e?((t,e,a,i,o)=>{let n=[];if(void 0!==o)n=o,void 0!==i?.year&&(n=n.filter((t=>t<=i.year))),void 0!==a?.year&&(n=n.filter((t=>t>=a.year)));else{const{year:t}=e,o=i?.year??t;for(let e=a?.year??t-100;e<=o;e++)n.push(e)}return n.map((a=>({text:$(t,{year:a,month:e.month,day:e.day}),value:a})))})(this.locale,this.defaultParts,this.minParts,this.maxParts,this.parsedYearValues):[];let s=[];return s=nt(this.locale,{month:"numeric",day:"numeric"})?[this.renderMonthPickerColumn(o),this.renderDayPickerColumn(n),this.renderYearPickerColumn(r)]:[this.renderDayPickerColumn(n),this.renderMonthPickerColumn(o),this.renderYearPickerColumn(r)],s}renderDayPickerColumn(t){if(0===t.length)return[];const{disabled:e,workingParts:a}=this,i=(null!==a.day?a.day:this.defaultParts.day)??void 0;return s("ion-picker-column",{part:Lt,"aria-label":"Select a day",class:"day-column",color:this.color,disabled:e,value:i,onIonChange:t=>{const e=this.getActivePartsWithFallback();this.setWorkingParts({...this.workingParts,day:t.detail.value}),this.setActiveParts({...e,day:t.detail.value}),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{color:this.color,part:t.value===i?`${Rt} ${Ft}`:Rt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderMonthPickerColumn(t){if(0===t.length)return[];const{disabled:e,workingParts:a}=this;return s("ion-picker-column",{part:Lt,"aria-label":"Select a month",class:"month-column",color:this.color,disabled:e,value:a.month,onIonChange:t=>{const e=this.getActivePartsWithFallback();this.setWorkingParts({...this.workingParts,month:t.detail.value}),this.multiple||this.setActiveParts({...e,month:t.detail.value}),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{color:this.color,part:t.value===a.month?`${Rt} ${Ft}`:Rt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderYearPickerColumn(t){if(0===t.length)return[];const{disabled:e,workingParts:a}=this;return s("ion-picker-column",{part:Lt,"aria-label":"Select a year",class:"year-column",color:this.color,disabled:e,value:a.year,onIonChange:t=>{const e=this.getActivePartsWithFallback();this.setWorkingParts({...this.workingParts,year:t.detail.value}),this.multiple||this.setActiveParts({...e,year:t.detail.value}),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{color:this.color,part:t.value===a.year?`${Rt} ${Ft}`:Rt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderTimePickerColumns(t){if(["date","month","month-year","year"].includes(t))return[];const e=void 0!==this.getActivePart(),{hoursData:a,minutesData:i,dayPeriodData:o}=((t,e,a,i,o,n,r)=>{const s=z(t,this.hourCycle),d=M(s),{hours:l,minutes:c,am:h,pm:p}=jt(t,e,s,i,o,n,r),m=l.map((t=>({text:T(t,s),value:V(t,d,e.ampm)}))),u=c.map((t=>({text:A(t),value:t}))),y=[];return h&&!d&&y.push({text:E(t,"am"),value:"am"}),p&&!d&&y.push({text:E(t,"pm"),value:"pm"}),{minutesData:u,hoursData:m,dayPeriodData:y}})(this.locale,this.workingParts,0,e?this.minParts:void 0,e?this.maxParts:void 0,this.parsedHourValues,this.parsedMinuteValues);return[this.renderHourPickerColumn(a),this.renderMinutePickerColumn(i),this.renderDayPeriodPickerColumn(o)]}renderHourPickerColumn(t){const{disabled:e}=this;if(0===t.length)return[];const a=this.getActivePartsWithFallback();return s("ion-picker-column",{part:Lt,"aria-label":"Select an hour",color:this.color,disabled:e,value:a.hour,numericInput:!0,onIonChange:t=>{this.setWorkingParts({...this.workingParts,hour:t.detail.value}),this.setActiveParts({...this.getActivePartsWithFallback(),hour:t.detail.value}),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{color:this.color,part:t.value===a.hour?`${Rt} ${Ft}`:Rt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderMinutePickerColumn(t){const{disabled:e}=this;if(0===t.length)return[];const a=this.getActivePartsWithFallback();return s("ion-picker-column",{part:Lt,"aria-label":"Select a minute",color:this.color,disabled:e,value:a.minute,numericInput:!0,onIonChange:t=>{this.setWorkingParts({...this.workingParts,minute:t.detail.value}),this.setActiveParts({...this.getActivePartsWithFallback(),minute:t.detail.value}),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{color:this.color,part:t.value===a.minute?`${Rt} ${Ft}`:Rt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderDayPeriodPickerColumn(t){const{disabled:e}=this;if(0===t.length)return[];const a=this.getActivePartsWithFallback(),i=rt(this.locale);return s("ion-picker-column",{part:Lt,"aria-label":"Select a day period",style:i?{order:"-1"}:{},color:this.color,disabled:e,value:a.ampm,onIonChange:t=>{const e=this.workingParts,a=ht(e,t.detail.value);this.setWorkingParts({...e,ampm:t.detail.value,hour:a}),this.setActiveParts({...this.getActivePartsWithFallback(),ampm:t.detail.value,hour:a}),t.stopPropagation()}},t.map((t=>s("ion-picker-column-option",{color:this.color,part:t.value===a.ampm?`${Rt} ${Ft}`:Rt,key:t.value,disabled:t.disabled,value:t.value},t.text))))}renderWheelView(t){const{locale:e}=this,a=nt(e)?"month-first":"year-first";return s("div",{class:{["wheel-order-"+a]:!0}},this.renderWheelPicker(t))}renderCalendarHeader(t){const{disabled:e}=this,a="ios"===t?g:f,i="ios"===t?x:v,o=e||((t,e,a)=>{const i={...D(this.workingParts),day:null};return Et(i,{minParts:e,maxParts:a})})(0,this.minParts,this.maxParts),n=e||((t,e)=>{const a={...P(this.workingParts),day:null};return Et(a,{maxParts:e})})(0,this.maxParts),r=this.el.getAttribute("dir")||void 0;return s("div",{class:"calendar-header",part:"calendar-header"},s("div",{class:"calendar-action-buttons"},s("div",{class:"calendar-month-year"},s("button",{class:{"calendar-month-year-toggle":!0,"ion-activatable":!0,"ion-focusable":!0},part:"month-year-button",disabled:e,"aria-label":this.showMonthAndYear?"Hide year picker":"Show year picker",onClick:()=>this.toggleMonthAndYearView()},s("span",{id:"toggle-wrapper"},st(this.locale,this.workingParts),s("ion-icon",{"aria-hidden":"true",icon:this.showMonthAndYear?a:i,lazy:!1,flipRtl:!0})),"md"===t&&s("ion-ripple-effect",null))),s("div",{class:"calendar-next-prev"},s("ion-buttons",null,s("ion-button",{"aria-label":"Previous month",disabled:o,onClick:()=>this.prevMonth(),part:"navigation-button previous-button"},s("ion-icon",{dir:r,"aria-hidden":"true",slot:"icon-only",icon:w,lazy:!1,flipRtl:!0})),s("ion-button",{"aria-label":"Next month",disabled:n,onClick:()=>this.nextMonth(),part:"navigation-button next-button"},s("ion-icon",{dir:r,"aria-hidden":"true",slot:"icon-only",icon:x,lazy:!1,flipRtl:!0}))))),s("div",{class:"calendar-days-of-week","aria-hidden":"true",part:"calendar-days-of-week"},((t,e,a=0)=>{const i=new Intl.DateTimeFormat(this.locale,{weekday:"ios"===e?"short":"narrow"}),o=new Date("11/01/2020"),n=[];for(let t=a;t<a+7;t++){const e=new Date(o);e.setDate(e.getDate()+t),n.push(i.format(e))}return n})(0,t,this.firstDayOfWeek%7).map((t=>s("div",{class:"day-of-week"},t)))))}renderMonth(e,a){const{disabled:i,readonly:o}=this,n=void 0===this.parsedYearValues||this.parsedYearValues.includes(a),r=void 0===this.parsedMonthValues||this.parsedMonthValues.includes(e),d=!n||!r,l=i||o,c=i||Et({month:e,year:a,day:null},{minParts:{...this.minParts,day:null},maxParts:{...this.maxParts,day:null}}),h=this.workingParts.month===e&&this.workingParts.year===a,p=this.getActivePartsWithFallback();return s("div",{"aria-hidden":h?null:"true",class:{"calendar-month":!0,"calendar-month-disabled":!h&&c}},s("div",{class:"calendar-month-grid"},((t,e,a,i=!1)=>{const o=W(t,e);let n;n=1===t?W(12,e-1):W(t-1,e);const r=new Date(`${t}/1/${e}`).getDay(),s=r>=a?r-(a+1):6-(a-r);let d=[];for(let t=1;t<=o;t++)d.push({day:t,dayOfWeek:(s+t)%7,isAdjacentDay:!1});if(i){for(let t=0;t<=s;t++)d=[{day:n-t,dayOfWeek:(n-t)%7,isAdjacentDay:!0},...d];const t=41-(o+s);for(let e=0;e<t;e++)d.push({day:e+1,dayOfWeek:(o+s+e)%7,isAdjacentDay:!0})}else for(let t=0;t<=s;t++)d=[{day:null,dayOfWeek:null,isAdjacentDay:!1},...d];return d})(e,a,this.firstDayOfWeek%7,this.showAdjacentDays).map(((i,o)=>{const{day:n,dayOfWeek:r,isAdjacentDay:c}=i,{el:h,highlightedDates:m,isDateEnabled:u,multiple:y,showAdjacentDays:b}=this;let g=e,f=a;b&&c&&null!==n&&(n>20?1===e?(f=a-1,g=12):g=e-1:n<15&&(12===e?(f=a+1,g=1):g=e+1));const x={month:g,day:n,year:f,isAdjacentDay:c},v=null===n,{isActive:w,isToday:k,ariaLabel:C,ariaSelected:P,disabled:D,text:j}=At(this.locale,x,this.activeParts,this.todayParts,this.minParts,this.maxParts,this.parsedDayValues),$=it(x);let z=d||D;if(!z&&void 0!==u)try{z=!u($)}catch(e){t("[ion-datetime] - Exception thrown from provided `isDateEnabled` function. Please check your function and try again.",h,e)}const V=z&&l,T=z||l;let A,E;return void 0===m||w||null===n||c||(A=((e,a,i)=>{if(Array.isArray(e)){const t=a.split("T")[0],i=e.find((e=>e.date===t));if(i)return{textColor:i.textColor,backgroundColor:i.backgroundColor,border:i.border}}else try{return e(a)}catch(e){t("[ion-datetime] - Exception thrown from provided `highlightedDates` callback. Please check your function and try again.",i,e)}})(m,$,h)),v||c?c&&(E="calendar-day"+(z?" disabled":"")):E=`calendar-day${w?" active":""}${k?" today":""}${z?" disabled":""}`,s("div",{class:"calendar-day-wrapper"},s("button",{ref:t=>{t&&(t.style.setProperty("color",""+(A?A.textColor:""),"important"),t.style.setProperty("background-color",""+(A?A.backgroundColor:""),"important"),t.style.setProperty("border",""+(A?A.border:""),"important"))},tabindex:"-1","data-day":n,"data-month":g,"data-year":f,"data-index":o,"data-day-of-week":r,disabled:T,class:{"calendar-day-padding":v,"calendar-day":!0,"calendar-day-active":w,"calendar-day-constrained":V,"calendar-day-today":k,"calendar-day-adjacent-day":c},part:E,"aria-hidden":v?"true":null,"aria-selected":P,"aria-label":C,onClick:()=>{v||(c?(this.el.blur(),this.activeParts={...p,...x},this.animateToDate(x),this.confirm()):(this.setWorkingParts({...this.workingParts,...x}),y?this.setActiveParts(x,w):this.setActiveParts({...p,...x})))}},j))}))))}renderCalendarBody(){return s("div",{class:"calendar-body ion-focusable",ref:t=>this.calendarBodyRef=t,tabindex:"0"},$t(this.workingParts,this.forceRenderDate).map((({month:t,year:e})=>this.renderMonth(t,e))))}renderCalendar(t){return s("div",{class:"datetime-calendar",key:"datetime-calendar"},this.renderCalendarHeader(t),this.renderCalendarBody())}renderTimeLabel(){if(null!==this.el.querySelector('[slot="time-label"]')||this.showDefaultTimeLabel)return s("slot",{name:"time-label"},"Time")}renderTimeOverlay(){const{disabled:t,hourCycle:e,isTimePopoverOpen:a,locale:i,formatOptions:o}=this,n=z(i,e),r=this.getActivePartsWithFallback();return[s("div",{class:"time-header"},this.renderTimeLabel()),s("button",{class:{"time-body":!0,"time-body-active":a},part:"time-button"+(a?" active":""),"aria-expanded":"false","aria-haspopup":"true",disabled:t,onClick:async t=>{const{popoverRef:e}=this;e&&(this.isTimePopoverOpen=!0,e.present(new CustomEvent("ionShadowTarget",{detail:{ionShadowTarget:t.target}})),await e.onWillDismiss(),this.isTimePopoverOpen=!1)}},dt(i,r,n,o?.time)),s("ion-popover",{alignment:"center",translucent:!0,overlayIndex:1,arrow:!1,onWillPresent:t=>{t.target.querySelectorAll("ion-picker-column").forEach((t=>t.scrollActiveItemIntoView()))},style:{"--offset-y":"-10px","--min-width":"fit-content"},keyboardEvents:!0,ref:t=>this.popoverRef=t},this.renderWheelPicker("time"))]}getHeaderSelectedDateText(){const{activeParts:e,formatOptions:a,multiple:i,titleSelectedDatesFormatter:o}=this;let n;if(i&&Array.isArray(e)&&1!==e.length){if(n=e.length+" days",void 0!==o)try{n=o(it(e))}catch(e){t("[ion-datetime] - Exception in provided `titleSelectedDatesFormatter`:",e)}}else n=lt(this.locale,this.getActivePartsWithFallback(),a?.date??{weekday:"short",month:"short",day:"numeric"});return n}renderHeader(t=!0){if(null!==this.el.querySelector('[slot="title"]')||this.showDefaultTitle)return s("div",{class:"datetime-header",part:"datetime-header"},s("div",{class:"datetime-title",part:"datetime-title"},s("slot",{name:"title"},"Select Date")),t&&s("div",{class:"datetime-selected-date",part:"datetime-selected-date"},this.getHeaderSelectedDateText()))}renderTime(){const{presentation:t}=this;return s("div",{class:"datetime-time"},"time"===t?this.renderWheelPicker():this.renderTimeOverlay())}renderCalendarViewMonthYearPicker(){return s("div",{class:"datetime-year"},this.renderWheelView("month-year"))}renderDatetime(t){const{presentation:e,preferWheel:a}=this;if(a&&("date"===e||"date-time"===e||"time-date"===e))return[this.renderHeader(!1),this.renderWheelView(),this.renderFooter()];switch(e){case"date-time":return[this.renderHeader(),this.renderCalendar(t),this.renderCalendarViewMonthYearPicker(),this.renderTime(),this.renderFooter()];case"time-date":return[this.renderHeader(),this.renderTime(),this.renderCalendar(t),this.renderCalendarViewMonthYearPicker(),this.renderFooter()];case"time":return[this.renderHeader(!1),this.renderTime(),this.renderFooter()];case"month":case"month-year":case"year":return[this.renderHeader(!1),this.renderWheelView(),this.renderFooter()];default:return[this.renderHeader(),this.renderCalendar(t),this.renderCalendarViewMonthYearPicker(),this.renderFooter()]}}render(){const{name:t,value:e,disabled:a,el:i,color:o,readonly:n,showMonthAndYear:r,preferWheel:l,presentation:c,size:h,isGridStyle:p}=this,u=k(this),y="year"===c||"month"===c||"month-year"===c,g=r||y,f=r&&!y,x=("date"===c||"date-time"===c||"time-date"===c)&&l;return m(!0,i,t,ct(e),a),s(d,{key:"a9128b5c55464e30a269daf9d725bf430c8c655c","aria-disabled":a?"true":null,onFocus:this.onFocus,onBlur:this.onBlur,class:{...b(o,{[u]:!0,"datetime-readonly":n,"datetime-disabled":a,"show-month-and-year":g,"month-year-picker-open":f,["datetime-presentation-"+c]:!0,["datetime-size-"+h]:!0,"datetime-prefer-wheel":x,"datetime-grid":p})}},s("div",{key:"b49f3a98db2b7cf535d7ea894d518f75f8a1fefb",class:"intersection-tracker",ref:t=>this.intersectionTrackerRef=t}),this.renderDatetime(u))}get el(){return this}static get watchers(){return{formatOptions:[{formatOptionsChanged:0}],disabled:[{disabledChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],presentation:[{presentationChanged:0}],yearValues:[{yearValuesChanged:0}],monthValues:[{monthValuesChanged:0}],dayValues:[{dayValuesChanged:0}],hourValues:[{hourValuesChanged:0}],minuteValues:[{minuteValuesChanged:0}],value:[{valueChanged:0}]}}static get style(){return{ios:':host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons ion-button{--color:var(--ion-color-primary, #0054e9)}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2)}:host(.ion-color) .calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-primary, #0054e9)}:host(.ion-color.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-light, #f4f5f8);--background-rgb:var(--ion-color-light-rgb, 244, 245, 248);--title-color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666))}:host(.datetime-presentation-date-time:not(.datetime-prefer-wheel)),:host(.datetime-presentation-time-date:not(.datetime-prefer-wheel)),:host(.datetime-presentation-date:not(.datetime-prefer-wheel)){min-height:350px}:host .datetime-header{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:16px;padding-bottom:16px;border-bottom:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc));font-size:min(0.875rem, 22.4px)}:host .datetime-header .datetime-title{color:var(--title-color)}:host .datetime-header .datetime-selected-date{margin-top:10px}.calendar-month-year-toggle{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0px;padding-bottom:0px;min-height:44px;font-size:min(1rem, 25.6px);font-weight:600}.calendar-month-year-toggle.ion-focused::after{opacity:0.15}.calendar-month-year-toggle #toggle-wrapper{-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:8px;margin-inline-end:8px;margin-top:10px;margin-bottom:10px}:host .calendar-action-buttons .calendar-month-year-toggle ion-icon,:host .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-action-buttons .calendar-month-year-toggle ion-icon,:host(.ion-color) .calendar-action-buttons ion-buttons ion-button{color:var(--ion-color-base)}:host .calendar-action-buttons ion-buttons{-ms-flex-align:stretch;align-items:stretch;height:100%}:host .calendar-action-buttons ion-buttons ion-button{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}:host .calendar-days-of-week{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:0;padding-bottom:0;color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3));font-size:min(0.75rem, 19.2px);font-weight:600;line-height:24px;text-transform:uppercase}@supports (border-radius: mod(1px, 1px)){.calendar-days-of-week .day-of-week{width:clamp(20px, calc(mod(min(1rem, 24px), 24px) * 10), 100%);height:24px;overflow:hidden}.calendar-day{border-radius:max(8px, mod(min(1rem, 24px), 24px) * 10)}}@supports ((border-radius: mod(1px, 1px)) and (background: -webkit-named-image(apple-pay-logo-black)) and (not (contain-intrinsic-size: none))) or (not (border-radius: mod(1px, 1px))){.calendar-days-of-week .day-of-week{width:auto;height:auto;overflow:initial}.calendar-day{border-radius:32px}}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;-ms-flex-align:center;align-items:center;height:calc(100% - 16px)}:host .calendar-day-wrapper{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;height:0;min-height:1rem}:host .calendar-day{width:40px;min-width:40px;height:40px;font-size:min(1.25rem, 32px)}.calendar-day.calendar-day-active{background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);font-size:min(1.375rem, 35.2px)}:host(.ion-color) .calendar-day.calendar-day-active{background:rgba(var(--ion-color-base-rgb), 0.2)}:host .calendar-day.calendar-day-today{color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-day.calendar-day-today{color:var(--ion-color-base)}:host .calendar-day.calendar-day-active,:host .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-primary, #0054e9);font-weight:600}:host(.ion-color) .calendar-day.calendar-day-active,:host(.ion-color) .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-base)}:host .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-primary, #0054e9);color:var(--ion-color-primary-contrast, #fff)}:host(.ion-color) .calendar-day.calendar-day-today.calendar-day-active{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-300, var(--ion-text-color-step-700, #b3b3b3))}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:16px;font-size:min(1rem, 25.6px)}:host .datetime-time .time-header{font-weight:600}:host .datetime-buttons{-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px;padding-top:8px;padding-bottom:8px;border-top:0.55px solid var(--ion-color-step-200, var(--ion-background-color-step-200, #cccccc))}:host .datetime-buttons ::slotted(ion-buttons),:host .datetime-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons{width:100%}',md:':host{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;background:var(--background);overflow:hidden}:host(.datetime-size-fixed){width:auto;height:auto}:host(.datetime-size-fixed:not(.datetime-prefer-wheel)){max-width:350px}:host(.datetime-size-fixed.datetime-prefer-wheel){min-width:350px;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}:host(.datetime-size-cover){width:100%}:host .calendar-body,:host .datetime-year{opacity:0}:host(:not(.datetime-ready)) .datetime-year{position:absolute;pointer-events:none}:host(.datetime-ready) .calendar-body{opacity:1}:host(.datetime-ready) .datetime-year{display:none;opacity:1}:host .wheel-order-year-first .day-column{-ms-flex-order:3;order:3;text-align:end}:host .wheel-order-year-first .month-column{-ms-flex-order:2;order:2;text-align:end}:host .wheel-order-year-first .year-column{-ms-flex-order:1;order:1;text-align:start}:host .datetime-calendar,:host .datetime-year{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-flow:column;flex-flow:column}:host(.show-month-and-year) .datetime-year{display:-ms-flexbox;display:flex}:host(.show-month-and-year) .calendar-next-prev,:host(.show-month-and-year) .calendar-days-of-week,:host(.show-month-and-year) .calendar-body,:host(.show-month-and-year) .datetime-time{display:none}:host(.month-year-picker-open) .datetime-footer{display:none}:host(.datetime-disabled){pointer-events:none}:host(.datetime-disabled) .calendar-days-of-week,:host(.datetime-disabled) .datetime-time{opacity:0.4}:host(.datetime-readonly){pointer-events:none;}:host(.datetime-readonly) .calendar-action-buttons,:host(.datetime-readonly) .calendar-body,:host(.datetime-readonly) .datetime-year{pointer-events:initial}:host(.datetime-readonly) .calendar-day[disabled]:not(.calendar-day-constrained),:host(.datetime-readonly) .datetime-action-buttons ion-button[disabled]{opacity:1}:host .datetime-header .datetime-title{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}:host .datetime-action-buttons.has-clear-button{width:100%}:host .datetime-action-buttons ion-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .datetime-action-buttons ion-button{--color:var(--ion-color-primary, #0054e9)}.datetime-action-buttons .datetime-action-buttons-container{display:-ms-flexbox;display:flex}:host .calendar-action-buttons{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host .calendar-action-buttons ion-button{--background:transparent}:host .calendar-days-of-week{display:grid;grid-template-columns:repeat(7, 1fr);text-align:center}.calendar-days-of-week .day-of-week{-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;margin-top:0;margin-bottom:0}:host .calendar-body{display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;overflow-x:scroll;overflow-y:hidden;scrollbar-width:none;outline:none}:host .calendar-body .calendar-month{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;scroll-snap-align:start;scroll-snap-stop:always;-ms-flex-negative:0;flex-shrink:0;width:100%}:host .calendar-body .calendar-month-disabled{scroll-snap-align:none}:host .calendar-body::-webkit-scrollbar{display:none}:host .calendar-body .calendar-month-grid{display:grid;grid-template-columns:repeat(7, 1fr)}:host .calendar-day-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;min-width:0;min-height:0;overflow:visible}.calendar-day{border-radius:50%;-webkit-padding-start:0px;padding-inline-start:0px;-webkit-padding-end:0px;padding-inline-end:0px;padding-top:0px;padding-bottom:0px;-webkit-margin-start:0px;margin-inline-start:0px;-webkit-margin-end:0px;margin-inline-end:0px;margin-top:0px;margin-bottom:0px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;outline:none;background:none;color:currentColor;font-family:var(--ion-font-family, inherit);cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;z-index:0}:host .calendar-day[disabled]{pointer-events:none;opacity:0.4}.calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-primary-rgb, 0, 84, 233), 0.2)}:host(.ion-color) .calendar-day:not(.calendar-day-adjacent-day):focus{background:rgba(var(--ion-color-base-rgb), 0.2);-webkit-box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2);box-shadow:0px 0px 0px 4px rgba(var(--ion-color-base-rgb), 0.2)}:host .datetime-time{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}:host(.datetime-presentation-time) .datetime-time{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host ion-popover{--height:200px}:host .time-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .time-body{border-radius:8px;-webkit-padding-start:12px;padding-inline-start:12px;-webkit-padding-end:12px;padding-inline-end:12px;padding-top:6px;padding-bottom:6px;display:-ms-flexbox;display:flex;border:none;background:var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));color:var(--ion-text-color, #000);font-family:inherit;font-size:inherit;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host .time-body-active{color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .time-body-active{color:var(--ion-color-base)}:host(.in-item){position:static}:host(.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-primary, #0054e9)}:host(.ion-color.show-month-and-year) .calendar-action-buttons .calendar-month-year-toggle{color:var(--ion-color-base)}.calendar-month-year{min-width:0}.calendar-month-year-toggle{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;position:relative;border:0;outline:none;background:transparent;cursor:pointer;z-index:1}.calendar-month-year-toggle::after{left:0;right:0;top:0;bottom:0;position:absolute;content:"";opacity:0;-webkit-transition:opacity 15ms linear, background-color 15ms linear;transition:opacity 15ms linear, background-color 15ms linear;z-index:-1}.calendar-month-year-toggle.ion-focused::after{background:currentColor}.calendar-month-year-toggle:disabled{opacity:0.3;pointer-events:none}.calendar-month-year-toggle ion-icon{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:0;padding-inline-end:0;padding-top:0;padding-bottom:0;-ms-flex-negative:0;flex-shrink:0}.calendar-month-year-toggle #toggle-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}ion-picker{--highlight-background:var(--wheel-highlight-background);--highlight-border-radius:var(--wheel-highlight-border-radius);--fade-background-rgb:var(--wheel-fade-background-rgb)}:host{--background:var(--ion-color-step-100, var(--ion-background-color-step-100, #ffffff));--title-color:var(--ion-color-primary-contrast, #fff)}:host(.ion-color){--title-color:var(--ion-color-contrast)}:host .datetime-header{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:20px;padding-bottom:20px;background:var(--ion-color-primary, #0054e9);color:var(--title-color)}:host(.ion-color) .datetime-header{background:var(--ion-color-base)}:host .datetime-header .datetime-title{font-size:0.75rem;text-transform:uppercase}:host .datetime-header .datetime-selected-date{margin-top:30px;font-size:2.125rem}:host .calendar-action-buttons ion-button{--color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}.calendar-month-year-toggle{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:12px;padding-bottom:12px;min-height:48px;background:transparent;color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959));z-index:1}.calendar-month-year-toggle.ion-focused::after{opacity:0.04}.calendar-month-year-toggle ion-ripple-effect{color:currentColor}@media (any-hover: hover){.calendar-month-year-toggle.ion-activatable:not(.ion-focused):hover::after{background:currentColor;opacity:0.04}}:host .calendar-days-of-week{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:0px;padding-bottom:0px;color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray));font-size:0.875rem;line-height:36px}:host .calendar-body .calendar-month .calendar-month-grid{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:4px;padding-bottom:4px;grid-template-rows:repeat(6, 1fr)}:host .calendar-day{width:42px;min-width:42px;height:42px;font-size:0.875rem}:host .calendar-day.calendar-day-today{border:1px solid var(--ion-color-primary, #0054e9);color:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-day.calendar-day-today{border:1px solid var(--ion-color-base);color:var(--ion-color-base)}:host .calendar-day.calendar-day-active,:host .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-primary-contrast, #fff)}:host(.ion-color) .calendar-day.calendar-day-active,:host(.ion-color) .calendar-day.calendar-day-adjacent-day.calendar-day-active{color:var(--ion-color-contrast)}.calendar-day.calendar-day-active,.calendar-day.calendar-day-active:focus{border:1px solid var(--ion-color-primary, #0054e9);background:var(--ion-color-primary, #0054e9)}:host(.ion-color) .calendar-day.calendar-day-active,:host(.ion-color) .calendar-day.calendar-day-active:focus{border:1px solid var(--ion-color-base);background:var(--ion-color-base)}:host .calendar-day.calendar-day-adjacent-day{color:var(--ion-color-step-500, var(--ion-text-color-step-500, gray))}:host .datetime-time{-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:8px;padding-bottom:8px}:host .time-header{color:var(--ion-color-step-650, var(--ion-text-color-step-350, #595959))}:host(.datetime-presentation-month) .datetime-year,:host(.datetime-presentation-year) .datetime-year,:host(.datetime-presentation-month-year) .datetime-year{margin-top:20px;margin-bottom:20px}:host .datetime-buttons{-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px;padding-top:10px;padding-bottom:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}'}}},[289,"ion-datetime",{color:[1],name:[1],disabled:[4],formatOptions:[16],readonly:[4],isDateEnabled:[16],showAdjacentDays:[4,"show-adjacent-days"],min:[1025],max:[1025],presentation:[1],cancelText:[1,"cancel-text"],doneText:[1,"done-text"],clearText:[1,"clear-text"],yearValues:[8,"year-values"],monthValues:[8,"month-values"],dayValues:[8,"day-values"],hourValues:[8,"hour-values"],minuteValues:[8,"minute-values"],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],titleSelectedDatesFormatter:[16],multiple:[4],highlightedDates:[16],value:[1025],showDefaultTitle:[4,"show-default-title"],showDefaultButtons:[4,"show-default-buttons"],showClearButton:[4,"show-clear-button"],showDefaultTimeLabel:[4,"show-default-time-label"],hourCycle:[1,"hour-cycle"],size:[1],preferWheel:[4,"prefer-wheel"],showMonthAndYear:[32],activeParts:[32],workingParts:[32],isTimePopoverOpen:[32],forceRenderDate:[32],confirm:[64],reset:[64],cancel:[64],getDefaultPart:[64]},void 0,{formatOptions:[{formatOptionsChanged:0}],disabled:[{disabledChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],presentation:[{presentationChanged:0}],yearValues:[{yearValuesChanged:0}],monthValues:[{monthValuesChanged:0}],dayValues:[{dayValuesChanged:0}],hourValues:[{hourValuesChanged:0}],minuteValues:[{minuteValuesChanged:0}],value:[{valueChanged:0}]}]);let Mt=0;const Wt="datetime-cancel",Bt="datetime-confirm",Lt="wheel",Rt="wheel-item",Ft="active",Ht=St,Zt=function(){"undefined"!=typeof customElements&&["ion-datetime","ion-backdrop","ion-button","ion-buttons","ion-icon","ion-picker","ion-picker-column","ion-picker-column-option","ion-popover","ion-ripple-effect"].forEach((t=>{switch(t){case"ion-datetime":customElements.get(l(t))||customElements.define(l(t),St);break;case"ion-backdrop":customElements.get(l(t))||pt();break;case"ion-button":customElements.get(l(t))||mt();break;case"ion-buttons":customElements.get(l(t))||ut();break;case"ion-icon":customElements.get(l(t))||yt();break;case"ion-picker":customElements.get(l(t))||bt();break;case"ion-picker-column":customElements.get(l(t))||gt();break;case"ion-picker-column-option":customElements.get(l(t))||ft();break;case"ion-popover":customElements.get(l(t))||xt();break;case"ion-ripple-effect":customElements.get(l(t))||vt()}}))};export{Ht as IonDatetime,Zt as defineCustomElement}
|
package/components/ion-modal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{M as o,d as s}from"./p-
|
|
4
|
+
import{M as o,d as s}from"./p-CJdQ1u7W.js";const p=o,r=s;export{p as IonModal,r as defineCustomElement}
|
package/components/ion-nav.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{d as t,H as s,i,e,p as o,h as n,t as r}from"./p-Ct2aBEue.js";import{g as a}from"./p-hHmYLOfE.js";import{o as h}from"./p-B4IBdPVJ.js";import{l as c,t as d,s as u,d as v,b as l,c as p}from"./p-C7r5Gja6.js";import{b as m}from"./p-HthJZjZ6.js";import{a as f}from"./p-Ba9_OzSY.js";class w{constructor(t,s){this.component=t,this.params=s,this.state=1}async init(t){if(this.state=2,!this.element){const s=this.component;this.element=await f(this.delegate,t,s,["ion-page","ion-page-invisible"],this.params)}}_destroy(){h(3!==this.state,"view state must be ATTACHED");const t=this.element;t&&(this.delegate?this.delegate.removeViewFromDom(t.parentElement,t):t.remove()),this.nav=void 0,this.state=3}}const g=(t,s)=>t?t instanceof w?t:new w(t,s):null,y=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.ionNavWillLoad=i(this,"ionNavWillLoad",7),this.ionNavWillChange=i(this,"ionNavWillChange",3),this.ionNavDidChange=i(this,"ionNavDidChange",3),this.transInstr=[],this.gestureOrAnimationInProgress=!1,this.isTransitioning=!1,this.destroyed=!1,this.views=[],this.didLoad=!1,this.animated=!0}swipeGestureChanged(){this.gesture&&this.gesture.enable(!0===this.swipeGesture)}rootChanged(){void 0!==this.root&&!1!==this.didLoad&&this.setRoot(this.root,this.rootParams)}componentWillLoad(){if(void 0===this.swipeGesture){const t=m(this);this.swipeGesture=e.getBoolean("swipeBackEnabled","ios"===t)}this.ionNavWillLoad.emit()}async componentDidLoad(){this.didLoad=!0,this.rootChanged(),this.gesture=(await import("./p-BVNUhOOf.js")).createSwipeBackGesture(this.el,this.canStart.bind(this),this.onStart.bind(this),this.onMove.bind(this),this.onEnd.bind(this)),this.swipeGestureChanged()}connectedCallback(){this.destroyed=!1}disconnectedCallback(){for(const t of this.views)c(t.element,v),t._destroy();this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.transInstr.length=0,this.views.length=0,this.destroyed=!0}push(t,s,i,e){return this.insert(-1,t,s,i,e)}insert(t,s,i,e,o){return this.insertPages(t,[{component:s,componentProps:i}],e,o)}insertPages(t,s,i,e){return this.queueTrns({insertStart:t,insertViews:s,opts:i},e)}pop(t,s){return this.removeIndex(-1,1,t,s)}popTo(t,s,i){const e={removeStart:-1,removeCount:-1,opts:s};return"object"==typeof t&&t.component?(e.removeView=t,e.removeStart=1):"number"==typeof t&&(e.removeStart=t+1),this.queueTrns(e,i)}popToRoot(t,s){return this.removeIndex(1,-1,t,s)}removeIndex(t,s=1,i,e){return this.queueTrns({removeStart:t,removeCount:s,opts:i},e)}setRoot(t,s,i,e){return this.setPages([{component:t,componentProps:s}],i,e)}setPages(t,s,i){return s??={},!0!==s.animated&&(s.animated=!1),this.queueTrns({insertStart:0,insertViews:t,removeStart:0,removeCount:-1,opts:s},i)}async getActive(){return this.getActiveSync()}async getByIndex(t){return this.views[t]}async canGoBack(t){return this.canGoBackSync(t)}async getPrevious(t){return this.getPreviousSync(t)}async getLength(){return Promise.resolve(this.views.length)}getActiveSync(){return this.views[this.views.length-1]}canGoBackSync(t=this.getActiveSync()){return!(!t||!this.getPreviousSync(t))}getPreviousSync(t=this.getActiveSync()){if(!t)return;const s=this.views,i=s.indexOf(t);return i>0?s[i-1]:void 0}async queueTrns(t,s){if(this.isTransitioning&&t.opts?.skipIfBusy)return!1;const i=new Promise(((s,i)=>{t.resolve=s,t.reject=i}));return t.done=s,0===t.insertViews?.length&&(t.insertViews=void 0),this.transInstr.push(t),this.nextTrns(),i}success(t,s){this.destroyed?this.fireError("nav controller was destroyed",s):(s.done&&s.done(t.hasCompleted,t.requiresTransition,t.enteringView,t.leavingView,t.direction),s.resolve(t.hasCompleted))}failed(t,s){this.destroyed?this.fireError("nav controller was destroyed",s):(this.transInstr.length=0,this.fireError(t,s))}fireError(t,s){s.done&&s.done(!1,!1,t),s.reject&&!this.destroyed?s.reject(t):s.resolve(!1)}nextTrns(){if(this.isTransitioning)return!1;const t=this.transInstr.shift();return!!t&&(this.runTransition(t),!0)}async runTransition(t){try{this.ionNavWillChange.emit(),this.isTransitioning=!0,this.prepareTI(t);const s=this.getActiveSync(),i=this.getEnteringView(t,s);if(!s&&!i)throw Error("no views in the stack to be removed");i&&1===i.state&&await i.init(this.el),this.postViewInit(i,s,t);const e=(t.enteringRequiresTransition||t.leavingRequiresTransition)&&i!==s;let o;e&&t.opts&&s&&("back"===t.opts.direction&&(t.opts.animationBuilder=t.opts.animationBuilder||i?.animationBuilder),s.animationBuilder=t.opts.animationBuilder),o=e?await this.transition(i,s,t):{hasCompleted:!0,requiresTransition:!1},this.success(o,t),this.ionNavDidChange.emit()}catch(s){this.failed(s,t)}this.isTransitioning=!1,this.nextTrns()}prepareTI(t){const s=this.views.length;if(t.opts??={},t.opts.delegate??=this.delegate,void 0!==t.removeView){h(void 0!==t.removeStart,"removeView needs removeStart"),h(void 0!==t.removeCount,"removeView needs removeCount");const s=this.views.indexOf(t.removeView);if(s<0)throw Error("removeView was not found");t.removeStart+=s}void 0!==t.removeStart&&(t.removeStart<0&&(t.removeStart=s-1),t.removeCount<0&&(t.removeCount=s-t.removeStart),t.leavingRequiresTransition=t.removeCount>0&&t.removeStart+t.removeCount===s),t.insertViews&&((t.insertStart<0||t.insertStart>s)&&(t.insertStart=s),t.enteringRequiresTransition=t.insertStart===s);const i=t.insertViews;if(!i)return;h(i.length>0,"length can not be zero");const e=(t=>t.map((t=>t instanceof w?t:"component"in t?g(t.component,null===t.componentProps?void 0:t.componentProps):g(t,void 0))).filter((t=>null!==t)))(i);if(0===e.length)throw Error("invalid views to insert");for(const s of e){s.delegate=t.opts.delegate;const i=s.nav;if(i&&i!==this)throw Error("inserted view was already inserted");if(3===s.state)throw Error("inserted view was already destroyed")}t.insertViews=e}getEnteringView(t,s){const i=t.insertViews;if(void 0!==i)return i[i.length-1];const e=t.removeStart;if(void 0!==e){const i=this.views,o=e+t.removeCount;for(let t=i.length-1;t>=0;t--){const n=i[t];if((t<e||t>=o)&&n!==s)return n}}}postViewInit(t,s,i){h(s||t,"Both leavingView and enteringView are null"),h(i.resolve,"resolve must be valid"),h(i.reject,"reject must be valid");const e=i.opts,{insertViews:n,removeStart:r,removeCount:a}=i;let d;if(void 0!==r&&void 0!==a){h(r>=0,"removeStart can not be negative"),h(a>=0,"removeCount can not be negative"),d=[];for(let i=r;i<r+a;i++){const e=this.views[i];void 0!==e&&e!==t&&e!==s&&d.push(e)}e.direction??="back"}const u=this.views.length+(n?.length??0)-(a??0);if(h(u>=0,"final balance can not be negative"),0===u)throw o("[ion-nav] - You can't remove all the pages in the navigation stack. nav.pop() is probably called too many times.",this,this.el),Error("navigation stack needs at least one root page");if(n){let t=i.insertStart;for(const s of n)this.insertViewAt(s,t),t++;i.enteringRequiresTransition&&(e.direction??="forward")}if(d&&d.length>0){for(const t of d)c(t.element,l),c(t.element,p),c(t.element,v);for(const t of d)this.destroyView(t)}}async transition(t,s,i){const o=i.opts,n=o.progressAnimation?t=>{void 0===t||this.gestureOrAnimationInProgress?this.sbAni=t:(this.gestureOrAnimationInProgress=!0,t.onFinish((()=>{this.gestureOrAnimationInProgress=!1}),{oneTimeCallback:!0}),t.progressEnd(0,0,0))}:void 0,r=m(this),a=t.element,h=s&&s.element,c={mode:r,showGoBack:this.canGoBackSync(t),baseEl:this.el,progressCallback:n,animated:this.animated&&e.getBoolean("animated",!0),enteringEl:a,leavingEl:h,...o,animationBuilder:o.animationBuilder||this.animation||e.get("navAnimation")},{hasCompleted:u}=await d(c);return this.transitionFinish(u,t,s,o)}transitionFinish(t,s,i,e){const o=t?s:i;return o&&this.unmountInactiveViews(o),{hasCompleted:t,requiresTransition:!0,enteringView:s,leavingView:i,direction:e.direction}}insertViewAt(t,s){const i=this.views,e=i.indexOf(t);e>-1?(h(t.nav===this,"view is not part of the nav"),i.splice(e,1),i.splice(s,0,t)):(h(!t.nav,"nav is used"),t.nav=this,i.splice(s,0,t))}removeView(t){h(2===t.state||3===t.state,"view state should be loaded or destroyed");const s=this.views,i=s.indexOf(t);h(i>-1,"view must be part of the stack"),i>=0&&s.splice(i,1)}destroyView(t){t._destroy(),this.removeView(t)}unmountInactiveViews(t){if(this.destroyed)return;const s=this.views,i=s.indexOf(t);for(let t=s.length-1;t>=0;t--){const e=s[t],o=e.element;o&&(t>i?(c(o,v),this.destroyView(e)):t<i&&u(o,!0))}}canStart(){return!this.gestureOrAnimationInProgress&&!!this.swipeGesture&&!this.isTransitioning&&0===this.transInstr.length&&this.canGoBackSync()}onStart(){this.gestureOrAnimationInProgress=!0,this.pop({direction:"back",progressAnimation:!0})}onMove(t){this.sbAni&&this.sbAni.progressStep(t)}onEnd(t,s,i){if(this.sbAni){this.sbAni.onFinish((()=>{this.gestureOrAnimationInProgress=!1}),{oneTimeCallback:!0});let e=t?-.001:.001;t?e+=a([0,0],[.32,.72],[0,1],[1,1],s)[0]:(this.sbAni.easing("cubic-bezier(1, 0, 0.68, 0.28)"),e+=a([0,0],[1,0],[.68,.28],[1,1],s)[0]),this.sbAni.progressEnd(t?1:0,e,i)}else this.gestureOrAnimationInProgress=!1}render(){return n("slot",{key:"1886154d3c2fa8511af4d641d269aaa4c0f45c05"})}get el(){return this}static get watchers(){return{swipeGesture:[{swipeGestureChanged:0}],root:[{rootChanged:0}]}}static get style(){return":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;z-index:0}"}},[257,"ion-nav",{delegate:[16],swipeGesture:[1028,"swipe-gesture"],animated:[4],animation:[16],rootParams:[16],root:[1],push:[64],insert:[64],insertPages:[64],pop:[64],popTo:[64],popToRoot:[64],removeIndex:[64],setRoot:[64],setPages:[64],getActive:[64],getByIndex:[64],canGoBack:[64],getPrevious:[64],getLength:[64]},void 0,{swipeGesture:[{swipeGestureChanged:0}],root:[{rootChanged:0}]}]),b=y,C=function(){"undefined"!=typeof customElements&&["ion-nav"].forEach((t=>{"ion-nav"===t&&(customElements.get(r(t))||customElements.define(r(t),y))}))};export{b as IonNav,C as defineCustomElement}
|
|
4
|
+
import{d as t,H as i,i as s,e,p as o,h as n,t as r}from"./p-Ct2aBEue.js";import{g as h}from"./p-hHmYLOfE.js";import{o as a}from"./p-B4IBdPVJ.js";import{l as c,t as d,s as u,f as v,d as l,b as p,c as m}from"./p-DfDIY2oP.js";import{b as f}from"./p-HthJZjZ6.js";import{a as w}from"./p-Ba9_OzSY.js";class g{constructor(t,i){this.component=t,this.params=i,this.state=1}async init(t){if(this.state=2,!this.element){const i=this.component;this.element=await w(this.delegate,t,i,["ion-page","ion-page-invisible"],this.params)}}_destroy(){a(3!==this.state,"view state must be ATTACHED");const t=this.element;t&&(this.delegate?this.delegate.removeViewFromDom(t.parentElement,t):t.remove()),this.nav=void 0,this.state=3}}const b=(t,i)=>t?t instanceof g?t:new g(t,i):null,y=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.ionNavWillLoad=s(this,"ionNavWillLoad",7),this.ionNavWillChange=s(this,"ionNavWillChange",3),this.ionNavDidChange=s(this,"ionNavDidChange",3),this.transInstr=[],this.gestureOrAnimationInProgress=!1,this.isTransitioning=!1,this.destroyed=!1,this.views=[],this.didLoad=!1,this.animated=!0}swipeGestureChanged(){this.gesture&&this.gesture.enable(!0===this.swipeGesture)}rootChanged(){void 0!==this.root&&!1!==this.didLoad&&this.setRoot(this.root,this.rootParams)}componentWillLoad(){if(void 0===this.swipeGesture){const t=f(this);this.swipeGesture=e.getBoolean("swipeBackEnabled","ios"===t)}this.ionNavWillLoad.emit()}async componentDidLoad(){this.didLoad=!0,this.rootChanged(),this.gesture=(await import("./p-BVNUhOOf.js")).createSwipeBackGesture(this.el,this.canStart.bind(this),this.onStart.bind(this),this.onMove.bind(this),this.onEnd.bind(this)),this.swipeGestureChanged()}connectedCallback(){this.destroyed=!1}disconnectedCallback(){for(const t of this.views)c(t.element,l),t._destroy();this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.unblockSwipeClicks&&(this.unblockSwipeClicks(),this.unblockSwipeClicks=void 0,this.gestureOrAnimationInProgress=!1),this.transInstr.length=0,this.views.length=0,this.destroyed=!0}push(t,i,s,e){return this.insert(-1,t,i,s,e)}insert(t,i,s,e,o){return this.insertPages(t,[{component:i,componentProps:s}],e,o)}insertPages(t,i,s,e){return this.queueTrns({insertStart:t,insertViews:i,opts:s},e)}pop(t,i){return this.removeIndex(-1,1,t,i)}popTo(t,i,s){const e={removeStart:-1,removeCount:-1,opts:i};return"object"==typeof t&&t.component?(e.removeView=t,e.removeStart=1):"number"==typeof t&&(e.removeStart=t+1),this.queueTrns(e,s)}popToRoot(t,i){return this.removeIndex(1,-1,t,i)}removeIndex(t,i=1,s,e){return this.queueTrns({removeStart:t,removeCount:i,opts:s},e)}setRoot(t,i,s,e){return this.setPages([{component:t,componentProps:i}],s,e)}setPages(t,i,s){return i??={},!0!==i.animated&&(i.animated=!1),this.queueTrns({insertStart:0,insertViews:t,removeStart:0,removeCount:-1,opts:i},s)}async getActive(){return this.getActiveSync()}async getByIndex(t){return this.views[t]}async canGoBack(t){return this.canGoBackSync(t)}async getPrevious(t){return this.getPreviousSync(t)}async getLength(){return Promise.resolve(this.views.length)}getActiveSync(){return this.views[this.views.length-1]}canGoBackSync(t=this.getActiveSync()){return!(!t||!this.getPreviousSync(t))}getPreviousSync(t=this.getActiveSync()){if(!t)return;const i=this.views,s=i.indexOf(t);return s>0?i[s-1]:void 0}async queueTrns(t,i){if(this.isTransitioning&&t.opts?.skipIfBusy)return!1;const s=new Promise(((i,s)=>{t.resolve=i,t.reject=s}));return t.done=i,0===t.insertViews?.length&&(t.insertViews=void 0),this.transInstr.push(t),this.nextTrns(),s}success(t,i){this.destroyed?this.fireError("nav controller was destroyed",i):(i.done&&i.done(t.hasCompleted,t.requiresTransition,t.enteringView,t.leavingView,t.direction),i.resolve(t.hasCompleted))}failed(t,i){this.destroyed?this.fireError("nav controller was destroyed",i):(this.transInstr.length=0,this.fireError(t,i))}fireError(t,i){i.done&&i.done(!1,!1,t),i.reject&&!this.destroyed?i.reject(t):i.resolve(!1)}nextTrns(){if(this.isTransitioning)return!1;const t=this.transInstr.shift();return!!t&&(this.runTransition(t),!0)}async runTransition(t){try{this.ionNavWillChange.emit(),this.isTransitioning=!0,this.prepareTI(t);const i=this.getActiveSync(),s=this.getEnteringView(t,i);if(!i&&!s)throw Error("no views in the stack to be removed");s&&1===s.state&&await s.init(this.el),this.postViewInit(s,i,t);const e=(t.enteringRequiresTransition||t.leavingRequiresTransition)&&s!==i;let o;e&&t.opts&&i&&("back"===t.opts.direction&&(t.opts.animationBuilder=t.opts.animationBuilder||s?.animationBuilder),i.animationBuilder=t.opts.animationBuilder),o=e?await this.transition(s,i,t):{hasCompleted:!0,requiresTransition:!1},this.success(o,t),this.ionNavDidChange.emit()}catch(i){this.failed(i,t)}this.isTransitioning=!1,this.nextTrns()}prepareTI(t){const i=this.views.length;if(t.opts??={},t.opts.delegate??=this.delegate,void 0!==t.removeView){a(void 0!==t.removeStart,"removeView needs removeStart"),a(void 0!==t.removeCount,"removeView needs removeCount");const i=this.views.indexOf(t.removeView);if(i<0)throw Error("removeView was not found");t.removeStart+=i}void 0!==t.removeStart&&(t.removeStart<0&&(t.removeStart=i-1),t.removeCount<0&&(t.removeCount=i-t.removeStart),t.leavingRequiresTransition=t.removeCount>0&&t.removeStart+t.removeCount===i),t.insertViews&&((t.insertStart<0||t.insertStart>i)&&(t.insertStart=i),t.enteringRequiresTransition=t.insertStart===i);const s=t.insertViews;if(!s)return;a(s.length>0,"length can not be zero");const e=(t=>t.map((t=>t instanceof g?t:"component"in t?b(t.component,null===t.componentProps?void 0:t.componentProps):b(t,void 0))).filter((t=>null!==t)))(s);if(0===e.length)throw Error("invalid views to insert");for(const i of e){i.delegate=t.opts.delegate;const s=i.nav;if(s&&s!==this)throw Error("inserted view was already inserted");if(3===i.state)throw Error("inserted view was already destroyed")}t.insertViews=e}getEnteringView(t,i){const s=t.insertViews;if(void 0!==s)return s[s.length-1];const e=t.removeStart;if(void 0!==e){const s=this.views,o=e+t.removeCount;for(let t=s.length-1;t>=0;t--){const n=s[t];if((t<e||t>=o)&&n!==i)return n}}}postViewInit(t,i,s){a(i||t,"Both leavingView and enteringView are null"),a(s.resolve,"resolve must be valid"),a(s.reject,"reject must be valid");const e=s.opts,{insertViews:n,removeStart:r,removeCount:h}=s;let d;if(void 0!==r&&void 0!==h){a(r>=0,"removeStart can not be negative"),a(h>=0,"removeCount can not be negative"),d=[];for(let s=r;s<r+h;s++){const e=this.views[s];void 0!==e&&e!==t&&e!==i&&d.push(e)}e.direction??="back"}const u=this.views.length+(n?.length??0)-(h??0);if(a(u>=0,"final balance can not be negative"),0===u)throw o("[ion-nav] - You can't remove all the pages in the navigation stack. nav.pop() is probably called too many times.",this,this.el),Error("navigation stack needs at least one root page");if(n){let t=s.insertStart;for(const i of n)this.insertViewAt(i,t),t++;s.enteringRequiresTransition&&(e.direction??="forward")}if(d&&d.length>0){for(const t of d)c(t.element,p),c(t.element,m),c(t.element,l);for(const t of d)this.destroyView(t)}}async transition(t,i,s){const o=s.opts,n=o.progressAnimation?t=>{void 0===t||this.gestureOrAnimationInProgress?this.sbAni=t:(this.gestureOrAnimationInProgress=!0,t.onFinish((()=>{this.gestureOrAnimationInProgress=!1}),{oneTimeCallback:!0}),t.progressEnd(0,0,0))}:void 0,r=f(this),h=t.element,a=i&&i.element,c={mode:r,showGoBack:this.canGoBackSync(t),baseEl:this.el,progressCallback:n,animated:this.animated&&e.getBoolean("animated",!0),enteringEl:h,leavingEl:a,...o,animationBuilder:o.animationBuilder||this.animation||e.get("navAnimation")},{hasCompleted:u}=await d(c);return this.transitionFinish(u,t,i,o)}transitionFinish(t,i,s,e){const o=t?i:s;return o&&this.unmountInactiveViews(o),{hasCompleted:t,requiresTransition:!0,enteringView:i,leavingView:s,direction:e.direction}}insertViewAt(t,i){const s=this.views,e=s.indexOf(t);e>-1?(a(t.nav===this,"view is not part of the nav"),s.splice(e,1),s.splice(i,0,t)):(a(!t.nav,"nav is used"),t.nav=this,s.splice(i,0,t))}removeView(t){a(2===t.state||3===t.state,"view state should be loaded or destroyed");const i=this.views,s=i.indexOf(t);a(s>-1,"view must be part of the stack"),s>=0&&i.splice(s,1)}destroyView(t){t._destroy(),this.removeView(t)}unmountInactiveViews(t){if(this.destroyed)return;const i=this.views,s=i.indexOf(t);for(let t=i.length-1;t>=0;t--){const e=i[t],o=e.element;o&&(t>s?(c(o,l),this.destroyView(e)):t<s&&u(o,!0))}}canStart(){return!this.gestureOrAnimationInProgress&&!!this.swipeGesture&&!this.isTransitioning&&0===this.transInstr.length&&this.canGoBackSync()}onStart(){this.gestureOrAnimationInProgress=!0,this.animated&&e.getBoolean("animated",!0)?this.pop({direction:"back",progressAnimation:!0}):this.unblockSwipeClicks=v(this.el)}onMove(t){this.sbAni&&this.sbAni.progressStep(t)}onEnd(t,i,s){if(this.sbAni){this.sbAni.onFinish((()=>{this.gestureOrAnimationInProgress=!1}),{oneTimeCallback:!0});let e=t?-.001:.001;t?e+=h([0,0],[.32,.72],[0,1],[1,1],i)[0]:(this.sbAni.easing("cubic-bezier(1, 0, 0.68, 0.28)"),e+=h([0,0],[1,0],[.68,.28],[1,1],i)[0]),this.sbAni.progressEnd(t?1:0,e,s)}else{this.gestureOrAnimationInProgress=!1;const{unblockSwipeClicks:i}=this;i&&(this.unblockSwipeClicks=void 0,t&&this.pop({direction:"back"}),i())}}render(){return n("slot",{key:"0aea554c0cf00dd3829757ec74c3855eccf1e068"})}get el(){return this}static get watchers(){return{swipeGesture:[{swipeGestureChanged:0}],root:[{rootChanged:0}]}}static get style(){return":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;z-index:0}"}},[257,"ion-nav",{delegate:[16],swipeGesture:[1028,"swipe-gesture"],animated:[4],animation:[16],rootParams:[16],root:[1],push:[64],insert:[64],insertPages:[64],pop:[64],popTo:[64],popToRoot:[64],removeIndex:[64],setRoot:[64],setPages:[64],getActive:[64],getByIndex:[64],canGoBack:[64],getPrevious:[64],getLength:[64]},void 0,{swipeGesture:[{swipeGestureChanged:0}],root:[{rootChanged:0}]}]),C=y,k=function(){"undefined"!=typeof customElements&&["ion-nav"].forEach((t=>{"ion-nav"===t&&(customElements.get(r(t))||customElements.define(r(t),y))}))};export{C as IonNav,k as defineCustomElement}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{P as
|
|
4
|
+
import{P as s,d as o}from"./p-CQKWzUsE.js";const p=s,r=o;export{p as IonPopover,r as defineCustomElement}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{d as t,H as i,i as s,e,c as a,h as o,t as n}from"./p-Ct2aBEue.js";import{g as h}from"./p-hHmYLOfE.js";import{a as r,d}from"./p-Ba9_OzSY.js";import{u as l,l as c}from"./p-B4IBdPVJ.js";import{c as u}from"./p-B-hirT0v.js";import{t as m}from"./p-
|
|
4
|
+
import{d as t,H as i,i as s,e,c as a,h as o,t as n}from"./p-Ct2aBEue.js";import{g as h}from"./p-hHmYLOfE.js";import{a as r,d}from"./p-Ba9_OzSY.js";import{u as l,l as c}from"./p-B4IBdPVJ.js";import{c as u}from"./p-B-hirT0v.js";import{t as m,f as p}from"./p-DfDIY2oP.js";import{b as w}from"./p-HthJZjZ6.js";const g=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.ionNavWillLoad=s(this,"ionNavWillLoad",7),this.ionNavWillChange=s(this,"ionNavWillChange",3),this.ionNavDidChange=s(this,"ionNavDidChange",3),this.lockController=u(),this.gestureOrAnimationInProgress=!1,this.mode=w(this),this.animated=!0}swipeGestureChanged(){this.updateGestureEnabled()}swipeHandlerChanged(){this.updateGestureEnabled()}async connectedCallback(){const t=()=>{this.gestureOrAnimationInProgress=!0,this.animated&&e.getBoolean("animated",!0)?this.swipeHandler&&this.swipeHandler.onStart():this.unblockSwipeClicks=p(this.el)};this.gesture=(await import("./p-BVNUhOOf.js")).createSwipeBackGesture(this.el,(()=>!this.gestureOrAnimationInProgress&&!!this.swipeHandler&&this.swipeHandler.canStart()),(()=>t()),(t=>this.ani?.progressStep(t)),((t,i,s)=>{if(this.ani){this.ani.onFinish((()=>{this.gestureOrAnimationInProgress=!1,this.swipeHandler&&this.swipeHandler.onEnd(t)}),{oneTimeCallback:!0});let e=t?-.001:.001;t?e+=h([0,0],[.32,.72],[0,1],[1,1],i)[0]:(this.ani.easing("cubic-bezier(1, 0, 0.68, 0.28)"),e+=h([0,0],[1,0],[.68,.28],[1,1],i)[0]),this.ani.progressEnd(t?1:0,e,s)}else{const{swipeHandler:i,unblockSwipeClicks:s}=this;this.unblockSwipeClicks=void 0,s&&t&&i?.canStart()?new Promise((t=>t(i.onStart()))).then((()=>i.onEnd(!0))).finally((()=>{this.gestureOrAnimationInProgress=!1,s()})):(this.gestureOrAnimationInProgress=!1,s?.())}})),void 0===this.swipeGesture?this.swipeGesture=e.getBoolean("swipeBackEnabled","ios"===this.mode):this.updateGestureEnabled()}componentWillLoad(){this.ionNavWillLoad.emit()}updateGestureEnabled(){this.gesture&&this.gesture.enable(void 0!==this.swipeHandler&&!0===this.swipeGesture)}disconnectedCallback(){this.gesture&&(this.gesture.destroy(),this.gesture=void 0),this.unblockSwipeClicks&&(this.unblockSwipeClicks(),this.unblockSwipeClicks=void 0,this.gestureOrAnimationInProgress=!1)}async commit(t,i,s){const e=await this.lockController.lock();let o=!1;try{o=await this.transition(t,i,s)}catch(t){a("[ion-router-outlet] - Exception in commit:",t)}return e(),o}async setRouteId(t,i,s,e){return{changed:await this.setRoot(t,i,{duration:"root"===s?0:void 0,direction:"back"===s?"back":"forward",animationBuilder:e}),element:this.activeEl}}async getRouteId(){const t=this.activeEl;return t?{id:t.tagName,element:t,params:this.activeParams}:void 0}async setRoot(t,i,s){if(this.activeComponent===t&&l(i,this.activeParams))return!1;const e=this.activeEl,a=await r(this.delegate,this.el,t,["ion-page","ion-page-invisible"],i);return this.activeComponent=t,this.activeEl=a,this.activeParams=i,await this.commit(a,e,s),await d(this.delegate,e),!0}async transition(t,i,s={}){if(i===t)return!1;this.ionNavWillChange.emit();const{el:a,mode:o}=this,n=this.animated&&e.getBoolean("animated",!0),h=s.animationBuilder||this.animation||e.get("navAnimation");return await m({mode:o,animated:n,enteringEl:t,leavingEl:i,baseEl:a,deepWait:c(a),progressCallback:s.progressAnimation?t=>{void 0===t||this.gestureOrAnimationInProgress?this.ani=t:(this.gestureOrAnimationInProgress=!0,t.onFinish((()=>{this.gestureOrAnimationInProgress=!1,this.swipeHandler&&this.swipeHandler.onEnd(!1)}),{oneTimeCallback:!0}),t.progressEnd(0,0,0))}:void 0,...s,animationBuilder:h}),this.ionNavDidChange.emit(),!0}render(){return o("slot",{key:"078cdc7a63b98570746409fc08c4af80f8d7da4d"})}get el(){return this}static get watchers(){return{swipeGesture:[{swipeGestureChanged:0}],swipeHandler:[{swipeHandlerChanged:0}]}}static get style(){return":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;z-index:0}"}},[257,"ion-router-outlet",{mode:[1025],delegate:[16],animated:[4],animation:[16],swipeGesture:[1028,"swipe-gesture"],swipeHandler:[16],commit:[64],setRouteId:[64],getRouteId:[64]},void 0,{swipeGesture:[{swipeGestureChanged:0}],swipeHandler:[{swipeHandlerChanged:0}]}]),f=g,b=function(){"undefined"!=typeof customElements&&["ion-router-outlet"].forEach((t=>{"ion-router-outlet"===t&&(customElements.get(n(t))||customElements.define(n(t),g))}))};export{f as IonRouterOutlet,b as defineCustomElement}
|