import{b as n}from"./p-9a866be1.js";
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const e=(n,e)=>n.month===e.month&&n.day===e.day&&n.year===e.year;const t=(n,e)=>n.year<e.year||n.year===e.year&&n.month<e.month||n.year===e.year&&n.month===e.month&&n.day&&n.day<e.day;const o=(n,e)=>n.year>e.year||n.year===e.year&&n.month>e.month||n.year===e.year&&n.month===e.month&&n.day&&n.day>e.day;const r=(e,r,s)=>{const a=Array.isArray(e)?e:[e];for(const i of a){if(r&&t(i,r)||s&&o(i,s)){n("The value provided to ion-datetime is out of bounds.\n\n"+`Min: ${JSON.stringify(r)}\n`+`Max: ${JSON.stringify(s)}\n`+`Value: ${JSON.stringify(e)}`);break}}};
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const s=n=>n%4===0&&n%100!==0||n%400===0;const a=(n,e)=>{if(e!==undefined){return e==="h23"}const t=new Intl.DateTimeFormat(n,{hour:"numeric"});const o=t.resolvedOptions();if(o.hourCycle!==undefined){return o.hourCycle==="h23"}const r=new Date("5/18/2021 00:00");const s=t.formatToParts(r);const a=s.find((n=>n.type==="hour"));if(!a){throw new Error("Hour value not found from DateTimeFormat")}return a.value==="00"};const i=(n,e)=>n===4||n===6||n===9||n===11?30:n===2?s(e)?29:28:31;const c=n=>{const e=new Intl.DateTimeFormat(n,{month:"numeric",year:"numeric"}).formatToParts(new Date);return e[0].type==="month"};const u=n=>{const e=new Intl.DateTimeFormat(n,{hour:"numeric"}).formatToParts(new Date);return e[0].type==="dayPeriod"};
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const d=n=>("0"+(n!==undefined?Math.abs(n):"0")).slice(-2);const f=n=>("000"+(n!==undefined?Math.abs(n):"0")).slice(-4);function l(n){if(Array.isArray(n)){return n.map((n=>l(n)))}let e="";if(n.year!==undefined){e=f(n.year);if(n.month!==undefined){e+="-"+d(n.month);if(n.day!==undefined){e+="-"+d(n.day);if(n.hour!==undefined){e+=`T${d(n.hour)}:${d(n.minute)}:00`;if(n.tzOffset===undefined){e+="Z"}else{e+=(n.tzOffset>0?"+":"-")+d(Math.floor(Math.abs(n.tzOffset/60)))+":"+d(n.tzOffset%60)}}}}}else if(n.hour!==undefined){e=d(n.hour)+":"+d(n.minute)}return e}const m=(n,e)=>{if(e===undefined){return n}if(e==="am"){if(n===12){return 0}return n}if(n===12){return 12}return n+12};const y=n=>{const{dayOfWeek:e}=n;if(e===null||e===undefined){throw new Error("No day of week provided")}return T(n,e)};const h=n=>{const{dayOfWeek:e}=n;if(e===null||e===undefined){throw new Error("No day of week provided")}return I(n,6-e)};const w=n=>I(n,1);const $=n=>T(n,1);const v=n=>T(n,7);const p=n=>I(n,7);const T=(n,e)=>{const{month:t,day:o,year:r}=n;if(o===null){throw new Error("No day provided")}const s={month:t,day:o,year:r};s.day=o-e;if(s.day<1){s.month-=1}if(s.month<1){s.month=12;s.year-=1}if(s.day<1){const n=i(s.month,s.year);s.day=n+s.day}return s};const I=(n,e)=>{const{month:t,day:o,year:r}=n;if(o===null){throw new Error("No day provided")}const s={month:t,day:o,year:r};const a=i(t,r);s.day=o+e;if(s.day>a){s.day-=a;s.month+=1}if(s.month>12){s.month=1;s.year+=1}return s};const D=n=>{const e=n.month===1?12:n.month-1;const t=n.month===1?n.year-1:n.year;const o=i(e,t);const r=o<n.day?o:n.day;return{month:e,year:t,day:r}};const O=n=>{const e=n.month===12?1:n.month+1;const t=n.month===12?n.year+1:n.year;const o=i(e,t);const r=o<n.day?o:n.day;return{month:e,year:t,day:r}};const b=(n,e)=>{const t=n.month;const o=n.year+e;const r=i(t,o);const s=r<n.day?r:n.day;return{month:t,year:o,day:s}};const M=n=>b(n,-1);const j=n=>b(n,1);const k=(n,e,t)=>{if(e){return n}return m(n,t)};const x=(n,e)=>{const{ampm:t,hour:o}=n;let r=o;if(t==="am"&&e==="pm"){r=m(r,"pm")}else if(t==="pm"&&e==="am"){r=Math.abs(r-12)}return r};
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const Z=n=>{if(n===undefined){return""}return n.toUpperCase()};const C=(n,e,t)=>{if(e.hour===undefined||e.minute===undefined){return"Invalid Time"}return new Intl.DateTimeFormat(n,{hour:"numeric",minute:"numeric",timeZone:"UTC",hour12:!t}).format(new Date(l(e)))};const U=n=>{const e=n.toString();if(e.length>1){return e}return`0${e}`};const G=(n,e)=>{if(!e){return n.toString()}return U(n)};const N=(n,e,t)=>{if(t.day===null){return null}const o=new Date(`${t.month}/${t.day}/${t.year} GMT+0000`);const r=new Intl.DateTimeFormat(n,{weekday:"long",month:"long",day:"numeric",timeZone:"UTC"}).format(o);return e?`Today, ${r}`:r};const g=(n,e)=>{const t=new Date(`${e.month}/${e.day}/${e.year} GMT+0000`);return new Intl.DateTimeFormat(n,{weekday:"short",month:"short",day:"numeric",timeZone:"UTC"}).format(t)};const A=(n,e)=>{const t=new Date(`${e.month}/${e.day}/${e.year} GMT+0000`);return new Intl.DateTimeFormat(n,{month:"long",year:"numeric",timeZone:"UTC"}).format(t)};const E=(n,e)=>W(n,e,{month:"short",day:"numeric",year:"numeric"});const W=(n,e,t)=>{const o=!!e.hour&&!!e.minute?` ${e.hour}:${e.minute}`:"";const r=new Date(`${e.month}/${e.day}/${e.year}${o} GMT+0000`);return new Intl.DateTimeFormat(n,Object.assign(Object.assign({},t),{timeZone:"UTC"})).format(r)};const F=n=>{if("RelativeTimeFormat"in Intl){const e=new Intl.RelativeTimeFormat(n,{numeric:"auto"}).format(0,"day");return e.charAt(0).toUpperCase()+e.slice(1)}else{return"Today"}};const J=n=>{const e=n.getTimezoneOffset();n.setMinutes(n.getMinutes()-e);return n};const P=J(new Date("2022T01:00"));const S=J(new Date("2022T13:00"));const z=(n,e)=>{const t=e==="am"?P:S;const o=new Intl.DateTimeFormat(n,{hour:"numeric",timeZone:"UTC"}).formatToParts(t).find((n=>n.type==="dayPeriod"));if(o){return o.value}return Z(e)};const H=n=>Array.isArray(n)?n.join(","):n;
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const q=()=>J(new Date).toISOString();const B=[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];const K=[12,1,2,3,4,5,6,7,8,9,10,11];const L=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23];const R=(n,e,t=0)=>{const o=e==="ios"?"short":"narrow";const r=new Intl.DateTimeFormat(n,{weekday:o});const s=new Date("11/01/2020");const a=[];for(let n=t;n<t+7;n++){const e=new Date(s);e.setDate(e.getDate()+n);a.push(r.format(e))}return a};const V=(n,e,t)=>{const o=i(n,e);const r=new Date(`${n}/1/${e}`).getDay();const s=r>=t?r-(t+1):6-(t-r);let a=[];for(let n=1;n<=o;n++){a.push({day:n,dayOfWeek:(s+n)%7})}for(let n=0;n<=s;n++){a=[{day:null,dayOfWeek:null},...a]}return a};const Q=(n,r="h12",s,a,i,c)=>{const u=r==="h23";let d=u?L:K;let f=B;let l=true;let m=true;if(i){d=d.filter((n=>i.includes(n)))}if(c){f=f.filter((n=>c.includes(n)))}if(s){if(e(n,s)){if(s.hour!==undefined){d=d.filter((e=>{const t=n.ampm==="pm"?(e+12)%24:e;return(u?e:t)>=s.hour}));l=s.hour<13}if(s.minute!==undefined){let e=false;if(s.hour!==undefined&&n.hour!==undefined){if(n.hour>s.hour){e=true}}f=f.filter((n=>{if(e){return true}return n>=s.minute}))}}else if(t(n,s)){d=[];f=[];l=m=false}}if(a){if(e(n,a)){if(a.hour!==undefined){d=d.filter((e=>{const t=n.ampm==="pm"?(e+12)%24:e;return(u?e:t)<=a.hour}));m=a.hour>=13}if(a.minute!==undefined&&n.hour===a.hour){f=f.filter((n=>n<=a.minute))}}else if(o(n,a)){d=[];f=[];l=m=false}}return{hours:d,minutes:f,am:l,pm:m}};const X=n=>[D(n),{month:n.month,year:n.year,day:n.day},O(n)];const Y=(n,e,t,o,r,s={month:"long"})=>{const{year:a}=e;const i=[];if(r!==undefined){let e=r;if((o===null||o===void 0?void 0:o.month)!==undefined){e=e.filter((n=>n<=o.month))}if((t===null||t===void 0?void 0:t.month)!==undefined){e=e.filter((n=>n>=t.month))}e.forEach((e=>{const t=new Date(`${e}/1/${a} GMT+0000`);const o=new Intl.DateTimeFormat(n,Object.assign(Object.assign({},s),{timeZone:"UTC"})).format(t);i.push({text:o,value:e})}))}else{const e=o&&o.year===a?o.month:12;const r=t&&t.year===a?t.month:1;for(let t=r;t<=e;t++){const e=new Date(`${t}/1/${a} GMT+0000`);const o=new Intl.DateTimeFormat(n,Object.assign(Object.assign({},s),{timeZone:"UTC"})).format(e);i.push({text:o,value:t})}}return i};const _=(n,e,t,o,r,s={day:"numeric"})=>{const{month:a,year:c}=e;const u=[];const d=i(a,c);const f=(o===null||o===void 0?void 0:o.day)&&o.year===c&&o.month===a?o.day:d;const l=(t===null||t===void 0?void 0:t.day)&&t.year===c&&t.month===a?t.day:1;if(r!==undefined){let e=r;e=e.filter((n=>n>=l&&n<=f));e.forEach((e=>{const t=new Date(`${a}/${e}/${c} GMT+0000`);const o=new Intl.DateTimeFormat(n,Object.assign(Object.assign({},s),{timeZone:"UTC"})).format(t);u.push({text:o,value:e})}))}else{for(let e=l;e<=f;e++){const t=new Date(`${a}/${e}/${c} GMT+0000`);const o=new Intl.DateTimeFormat(n,Object.assign(Object.assign({},s),{timeZone:"UTC"})).format(t);u.push({text:o,value:e})}}return u};const nn=(n,e,t,o)=>{let r=[];if(o!==undefined){r=o;if((t===null||t===void 0?void 0:t.year)!==undefined){r=r.filter((n=>n<=t.year))}if((e===null||e===void 0?void 0:e.year)!==undefined){r=r.filter((n=>n>=e.year))}}else{const{year:o}=n;const s=(t===null||t===void 0?void 0:t.year)||o;const a=(e===null||e===void 0?void 0:e.year)||o-100;for(let n=s;n>=a;n--){r.push(n)}}return r.map((n=>({text:`${n}`,value:n})))};const en=(n,e)=>{if(n.month===e.month&&n.year===e.year){return[n]}return[n,...en(O(n),e)]};const tn=(n,t,o,r,s,a,i)=>{let c=[];let u=[];let d=en(r,s);if(i){d=d.filter((({month:n})=>i.includes(n)))}d.forEach((i=>{const d={month:i.month,day:null,year:t.year};const f=_(n,d,r,s,a,{month:"short",day:"numeric",weekday:"short"});const l=[];const m=[];f.forEach((r=>{const s=e(Object.assign(Object.assign({},d),{day:r.value}),o);m.push({text:s?F(n):r.text,value:`${t.year}-${i.month}-${r.value}`});l.push({month:i.month,year:t.year,day:r.value})}));u=[...u,...l];c=[...c,...m]}));return{parts:u,items:c}};const on=(n,e,t,o,r,s,i)=>{const c=a(n,t);const{hours:u,minutes:d,am:f,pm:l}=Q(e,c?"h23":"h12",o,r,s,i);const m=u.map((n=>({text:G(n,c),value:k(n,c,e.ampm)})));const y=d.map((n=>({text:U(n),value:n})));const h=[];if(f&&!c){h.push({text:z(n,"am"),value:"am"})}if(l&&!c){h.push({text:z(n,"pm"),value:"pm"})}return{minutesData:y,hoursData:m,dayPeriodData:h}};
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */const rn=/^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/;const sn=/^((\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/;const an=n=>{if(n===undefined){return}let e=n;if(typeof n==="string"){e=n.replace(/\[|\]|\s/g,"").split(",")}let t;if(Array.isArray(e)){t=e.map((n=>parseInt(n,10))).filter(isFinite)}else{t=[e]}return t};const cn=n=>({month:parseInt(n.getAttribute("data-month"),10),day:parseInt(n.getAttribute("data-day"),10),year:parseInt(n.getAttribute("data-year"),10),dayOfWeek:parseInt(n.getAttribute("data-day-of-week"),10)});function un(n){if(Array.isArray(n)){return n.map((n=>un(n)))}let e=null;if(n!=null&&n!==""){e=sn.exec(n);if(e){e.unshift(undefined,undefined);e[2]=e[3]=undefined}else{e=rn.exec(n)}}if(e===null){return undefined}for(let n=1;n<8;n++){e[n]=e[n]!==undefined?parseInt(e[n],10):undefined}let t=0;if(e[9]&&e[10]){t=parseInt(e[10],10)*60;if(e[11]){t+=parseInt(e[11],10)}if(e[9]==="-"){t*=-1}}return{year:e[1],month:e[2],day:e[3],hour:e[4],minute:e[5],tzOffset:t}}const dn=(n,e,r)=>{if(e&&t(n,e)){return e}else if(r&&o(n,r)){return r}return n};const fn=n=>n>=12?"pm":"am";export{A,V as B,X as C,a as D,C as E,g as F,H as G,j as H,M as I,dn as J,fn as K,x as L,W as M,E as N,o as a,e as b,D as c,O as d,q as e,cn as f,N as g,h,t as i,y as j,$ as k,w as l,v as m,p as n,an as o,un as p,l as q,tn as r,Y as s,_ as t,nn as u,on as v,r as w,u as x,c as y,R as z};
//# sourceMappingURL=p-44a2e556.js.map