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AG,EAAGpB,EAAE,IAAM,IAAI,CAACvB,YAAY,GAAGuB;MAAI,CAAC,EAAErG,qDAAC,CAAC,MAAM,EAAE;QAAEoH,GAAG,EAAE,0CAA0C;QAAEM,IAAI,EAAE;MAAc,CAAC,EAAElE,QAAQ,CAAC,EAAE2D,IAAI,KAAK,IAAI,IAAInH,qDAAC,CAAC,mBAAmB,EAAE;QAAEoH,GAAG,EAAE;MAA2C,CAAC,CAAC,CAAE,EAAE3D,QAAQ,IAAKzD,qDAAC,CAAC,QAAQ,EAAE;QAAEoH,GAAG,EAAE,0CAA0C;QAAEC,KAAK,EAAE,iBAAiB;QAAEC,EAAE,EAAE,aAAa;QAAE,eAAe,EAAEvB,cAAc,GAAG,MAAM,GAAG,OAAO;QAAEwB,OAAO,EAAE,IAAI,CAACrC,eAAe;QAAEe,QAAQ,EAAEA,QAAQ;QAAEuB,IAAI,EAAE,QAAQ;QAAEC,GAAG,EAAGpB,EAAE,IAAM,IAAI,CAAClB,YAAY,GAAGkB;MAAI,CAAC,EAAErG,qDAAC,CAAC,MAAM,EAAE;QAAEoH,GAAG,EAAE,0CAA0C;QAAEM,IAAI,EAAE;MAAc,CAAC,EAAEjE,QAAQ,CAAC,EAAE0D,IAAI,KAAK,IAAI,IAAInH,qDAAC,CAAC,mBAAmB,EAAE;QAAEoH,GAAG,EAAE;MAA2C,CAAC,CAAC,CAAE,CAAC;IAC77B;IACA,IAAIf,EAAEA,CAAA,EAAG;MAAE,OAAOjG,qDAAU,CAAC,IAAI,CAAC;IAAE;EACxC,CAAC;EACDuB,cAAc,CAACgG,KAAK,GAAG;IACnBC,GAAG,EAAEpG,0BAA0B;IAC/BqG,EAAE,EAAEnG;EACR,CAAC;EAAC,OA3UIC,cAAc;AAAA,IAuUnB","sources":["./node_modules/@ionic/core/dist/esm/ion-datetime-button.entry.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { r as registerInstance, h, H as Host, f as getElement } from './index-a1a47f01.js';\nimport { a as addEventListener, c as componentOnReady } from './helpers-be245865.js';\nimport { a as printIonError } from './index-9b0d46f4.js';\nimport { c as createColorClasses } from './theme-01f3f29c.js';\nimport { b as getIonMode } from './ionic-global-94f25d1b.js';\nimport { s as parseDate, x as getToday, L as getHourCycle, N as getLocalizedDateTime, M as getLocalizedTime } from './data-bb424ba8.js';\n\nconst iosDatetimeButtonCss = \":host{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host button{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;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;margin-top:0px;margin-bottom:0px;position:relative;-webkit-transition:150ms color ease-in-out;transition:150ms color ease-in-out;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:1rem;cursor:pointer;overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host(.time-active) #time-button,:host(.date-active) #date-button{color:var(--ion-color-base)}:host(.datetime-button-disabled){pointer-events:none}:host(.datetime-button-disabled) button{opacity:0.4}\";\nconst IonDatetimeButtonIosStyle0 = iosDatetimeButtonCss;\n\nconst mdDatetimeButtonCss = \":host{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host button{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;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px;margin-top:0px;margin-bottom:0px;position:relative;-webkit-transition:150ms color ease-in-out;transition:150ms color ease-in-out;border:none;background:var(--ion-color-step-300, #edeef0);color:var(--ion-text-color, #000);font-family:inherit;font-size:1rem;cursor:pointer;overflow:hidden;-webkit-appearance:none;-moz-appearance:none;appearance:none}:host(.time-active) #time-button,:host(.date-active) #date-button{color:var(--ion-color-base)}:host(.datetime-button-disabled){pointer-events:none}:host(.datetime-button-disabled) button{opacity:0.4}\";\nconst IonDatetimeButtonMdStyle0 = mdDatetimeButtonCss;\n\nconst DatetimeButton = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.datetimeEl = null;\n this.overlayEl = null;\n /**\n * Accepts one or more string values and converts\n * them to DatetimeParts. This is done so datetime-button\n * can work with an array internally and not need\n * to keep checking if the datetime value is `string` or `string[]`.\n */\n this.getParsedDateValues = (value) => {\n if (value === undefined || value === null) {\n return [];\n }\n if (Array.isArray(value)) {\n return value;\n }\n return [value];\n };\n /**\n * Check the value property on the linked\n * ion-datetime and then format it according\n * to the locale specified on ion-datetime.\n */\n this.setDateTimeText = () => {\n var _a, _b, _c, _d, _e;\n const { datetimeEl, datetimePresentation } = this;\n if (!datetimeEl) {\n return;\n }\n const { value, locale, formatOptions, hourCycle, preferWheel, multiple, titleSelectedDatesFormatter } = datetimeEl;\n const parsedValues = this.getParsedDateValues(value);\n /**\n * Both ion-datetime and ion-datetime-button default\n * to today's date and time if no value is set.\n */\n const parsedDatetimes = parseDate(parsedValues.length > 0 ? parsedValues : [getToday()]);\n if (!parsedDatetimes) {\n return;\n }\n /**\n * If developers incorrectly use multiple=\"true\"\n * with non \"date\" datetimes, then just select\n * the first value so the interface does\n * not appear broken. Datetime will provide a\n * warning in the console.\n */\n const firstParsedDatetime = parsedDatetimes[0];\n const computedHourCycle = getHourCycle(locale, hourCycle);\n this.dateText = this.timeText = undefined;\n switch (datetimePresentation) {\n case 'date-time':\n case 'time-date':\n const dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_a = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _a !== void 0 ? _a : { month: 'short', day: 'numeric', year: 'numeric' });\n const timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time);\n if (preferWheel) {\n this.dateText = `${dateText} ${timeText}`;\n }\n else {\n this.dateText = dateText;\n this.timeText = timeText;\n }\n break;\n case 'date':\n if (multiple && parsedValues.length !== 1) {\n let headerText = `${parsedValues.length} days`; // default/fallback for multiple selection\n if (titleSelectedDatesFormatter !== undefined) {\n try {\n headerText = titleSelectedDatesFormatter(parsedValues);\n }\n catch (e) {\n printIonError('Exception in provided `titleSelectedDatesFormatter`: ', e);\n }\n }\n this.dateText = headerText;\n }\n else {\n this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_b = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _b !== void 0 ? _b : { month: 'short', day: 'numeric', year: 'numeric' });\n }\n break;\n case 'time':\n this.timeText = getLocalizedTime(locale, firstParsedDatetime, computedHourCycle, formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time);\n break;\n case 'month-year':\n this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_c = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.date) !== null && _c !== void 0 ? _c : { month: 'long', year: 'numeric' });\n break;\n case 'month':\n this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_d = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) !== null && _d !== void 0 ? _d : { month: 'long' });\n break;\n case 'year':\n this.dateText = getLocalizedDateTime(locale, firstParsedDatetime, (_e = formatOptions === null || formatOptions === void 0 ? void 0 : formatOptions.time) !== null && _e !== void 0 ? _e : { year: 'numeric' });\n break;\n }\n };\n /**\n * Waits for the ion-datetime to re-render.\n * This is needed in order to correctly position\n * a popover relative to the trigger element.\n */\n this.waitForDatetimeChanges = async () => {\n const { datetimeEl } = this;\n if (!datetimeEl) {\n return Promise.resolve();\n }\n return new Promise((resolve) => {\n addEventListener(datetimeEl, 'ionRender', resolve, { once: true });\n });\n };\n this.handleDateClick = async (ev) => {\n const { datetimeEl, datetimePresentation } = this;\n if (!datetimeEl) {\n return;\n }\n let needsPresentationChange = false;\n /**\n * When clicking the date button,\n * we need to make sure that only a date\n * picker is displayed. For presentation styles\n * that display content other than a date picker,\n * we need to update the presentation style.\n */\n switch (datetimePresentation) {\n case 'date-time':\n case 'time-date':\n const needsChange = datetimeEl.presentation !== 'date';\n /**\n * The date+time wheel picker\n * shows date and time together,\n * so do not adjust the presentation\n * in that case.\n */\n if (!datetimeEl.preferWheel && needsChange) {\n datetimeEl.presentation = 'date';\n needsPresentationChange = true;\n }\n break;\n }\n /**\n * Track which button was clicked\n * so that it can have the correct\n * activated styles applied when\n * the modal/popover containing\n * the datetime is opened.\n */\n this.selectedButton = 'date';\n this.presentOverlay(ev, needsPresentationChange, this.dateTargetEl);\n };\n this.handleTimeClick = (ev) => {\n const { datetimeEl, datetimePresentation } = this;\n if (!datetimeEl) {\n return;\n }\n let needsPresentationChange = false;\n /**\n * When clicking the time button,\n * we need to make sure that only a time\n * picker is displayed. For presentation styles\n * that display content other than a time picker,\n * we need to update the presentation style.\n */\n switch (datetimePresentation) {\n case 'date-time':\n case 'time-date':\n const needsChange = datetimeEl.presentation !== 'time';\n if (needsChange) {\n datetimeEl.presentation = 'time';\n needsPresentationChange = true;\n }\n break;\n }\n /**\n * Track which button was clicked\n * so that it can have the correct\n * activated styles applied when\n * the modal/popover containing\n * the datetime is opened.\n */\n this.selectedButton = 'time';\n this.presentOverlay(ev, needsPresentationChange, this.timeTargetEl);\n };\n /**\n * If the datetime is presented in an\n * overlay, the datetime and overlay\n * should be appropriately sized.\n * These classes provide default sizing values\n * that developers can customize.\n * The goal is to provide an overlay that is\n * reasonably sized with a datetime that\n * fills the entire container.\n */\n this.presentOverlay = async (ev, needsPresentationChange, triggerEl) => {\n const { overlayEl } = this;\n if (!overlayEl) {\n return;\n }\n if (overlayEl.tagName === 'ION-POPOVER') {\n /**\n * When the presentation on datetime changes,\n * we need to wait for the component to re-render\n * otherwise the computed width/height of the\n * popover content will be wrong, causing\n * the popover to not align with the trigger element.\n */\n if (needsPresentationChange) {\n await this.waitForDatetimeChanges();\n }\n /**\n * We pass the trigger button element\n * so that the popover aligns with the individual\n * button that was clicked, not the component container.\n */\n overlayEl.present(Object.assign(Object.assign({}, ev), { detail: {\n ionShadowTarget: triggerEl,\n } }));\n }\n else {\n overlayEl.present();\n }\n };\n this.datetimePresentation = 'date-time';\n this.dateText = undefined;\n this.timeText = undefined;\n this.datetimeActive = false;\n this.selectedButton = undefined;\n this.color = 'primary';\n this.disabled = false;\n this.datetime = undefined;\n }\n async componentWillLoad() {\n const { datetime } = this;\n if (!datetime) {\n printIonError('An ID associated with an ion-datetime instance is required for ion-datetime-button to function properly.', this.el);\n return;\n }\n const datetimeEl = (this.datetimeEl = document.getElementById(datetime));\n if (!datetimeEl) {\n printIonError(`No ion-datetime instance found for ID '${datetime}'.`, this.el);\n return;\n }\n /**\n * The element reference must be an ion-datetime. Print an error\n * if a non-datetime element was provided.\n */\n if (datetimeEl.tagName !== 'ION-DATETIME') {\n printIonError(`Expected an ion-datetime instance for ID '${datetime}' but received '${datetimeEl.tagName.toLowerCase()}' instead.`, datetimeEl);\n return;\n }\n /**\n * Since the datetime can be used in any context (overlays, accordion, etc)\n * we track when it is visible to determine when it is active.\n * This informs which button is highlighted as well as the\n * aria-expanded state.\n */\n const io = new IntersectionObserver((entries) => {\n const ev = entries[0];\n this.datetimeActive = ev.isIntersecting;\n }, {\n threshold: 0.01,\n });\n io.observe(datetimeEl);\n /**\n * Get a reference to any modal/popover\n * the datetime is being used in so we can\n * correctly size it when it is presented.\n */\n const overlayEl = (this.overlayEl = datetimeEl.closest('ion-modal, ion-popover'));\n /**\n * The .ion-datetime-button-overlay class contains\n * styles that allow any modal/popover to be\n * sized according to the dimensions of the datetime.\n * If developers want a smaller/larger overlay all they need\n * to do is change the width/height of the datetime.\n * Additionally, this lets us avoid having to set\n * explicit widths on each variant of datetime.\n */\n if (overlayEl) {\n overlayEl.classList.add('ion-datetime-button-overlay');\n }\n componentOnReady(datetimeEl, () => {\n const datetimePresentation = (this.datetimePresentation = datetimeEl.presentation || 'date-time');\n /**\n * Set the initial display\n * in the rendered buttons.\n *\n * From there, we need to listen\n * for ionChange to be emitted\n * from datetime so we know when\n * to re-render the displayed\n * text in the buttons.\n */\n this.setDateTimeText();\n addEventListener(datetimeEl, 'ionValueChange', this.setDateTimeText);\n /**\n * Configure the initial selected button\n * in the event that the datetime is displayed\n * without clicking one of the datetime buttons.\n * For example, a datetime could be expanded\n * in an accordion. In this case users only\n * need to click the accordion header to show\n * the datetime.\n */\n switch (datetimePresentation) {\n case 'date-time':\n case 'date':\n case 'month-year':\n case 'month':\n case 'year':\n this.selectedButton = 'date';\n break;\n case 'time-date':\n case 'time':\n this.selectedButton = 'time';\n break;\n }\n });\n }\n render() {\n const { color, dateText, timeText, selectedButton, datetimeActive, disabled } = this;\n const mode = getIonMode(this);\n return (h(Host, { key: 'ab6c21a4c185dee71c8f14cafad82e38831c68d0', class: createColorClasses(color, {\n [mode]: true,\n [`${selectedButton}-active`]: datetimeActive,\n ['datetime-button-disabled']: disabled,\n }) }, dateText && (h(\"button\", { key: 'cbda6f3386c3714567a04b5a97a96c71d59822c8', class: \"ion-activatable\", id: \"date-button\", \"aria-expanded\": datetimeActive ? 'true' : 'false', onClick: this.handleDateClick, disabled: disabled, part: \"native\", ref: (el) => (this.dateTargetEl = el) }, h(\"slot\", { key: 'a00ff431512827bfef8c02982ef37099b2f21508', name: \"date-target\" }, dateText), mode === 'md' && h(\"ion-ripple-effect\", { key: '67935989628a2ed0492edb813fb0475bfd88abe7' }))), timeText && (h(\"button\", { key: '4207c94de5bece91b8388332e0192d1756403e62', class: \"ion-activatable\", id: \"time-button\", \"aria-expanded\": datetimeActive ? 'true' : 'false', onClick: this.handleTimeClick, disabled: disabled, part: \"native\", ref: (el) => (this.timeTargetEl = el) }, h(\"slot\", { key: '9ffa7ef4417571933bd1757950ec805c49704759', name: \"time-target\" }, timeText), mode === 'md' && h(\"ion-ripple-effect\", { key: 'fbcad00cf828c9719074d1d06f4e13246b28903e' })))));\n }\n get el() { return getElement(this); }\n};\nDatetimeButton.style = {\n ios: IonDatetimeButtonIosStyle0,\n md: IonDatetimeButtonMdStyle0\n};\n\nexport { DatetimeButton as ion_datetime_button };\n"],"names":["r","registerInstance","h","H","Host","f","getElement","a","addEventListener","c","componentOnReady","printIonError","createColorClasses","b","getIonMode","s","parseDate","x","getToday","L","getHourCycle","N","getLocalizedDateTime","M","getLocalizedTime","iosDatetimeButtonCss","IonDatetimeButtonIosStyle0","mdDatetimeButtonCss","IonDatetimeButtonMdStyle0","DatetimeButton","constructor","hostRef","_this","datetimeEl","overlayEl","getParsedDateValues","value","undefined","Array","isArray","setDateTimeText","_a","_b","_c","_d","_e","datetimePresentation","locale","formatOptions","hourCycle","preferWheel","multiple","titleSelectedDatesFormatter","parsedValues","parsedDatetimes","length","firstParsedDatetime","computedHourCycle","dateText","timeText","date","month","day","year","time","headerText","e","waitForDatetimeChanges","_asyncToGenerator","Promise","resolve","once","handleDateClick","_ref2","ev","needsPresentationChange","needsChange","presentation","selectedButton","presentOverlay","dateTargetEl","_x","apply","arguments","handleTimeClick","timeTargetEl","_ref3","triggerEl","tagName","present","Object","assign","detail","ionShadowTarget","_x2","_x3","_x4","datetimeActive","color","disabled","datetime","componentWillLoad","_this2","el","document","getElementById","toLowerCase","io","IntersectionObserver","entries","isIntersecting","threshold","observe","closest","classList","add","render","mode","key","class","id","onClick","part","ref","name","style","ios","md","ion_datetime_button"],"sourceRoot":"webpack:///","x_google_ignoreList":[0]}