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QAAQ8J,GAAMA,EAAE7Z,KAAO2d,EAAiB3d,KAEtF,CACJ,CACA4d,cACI,OAAOza,OAAOC,KAAKoC,KAAK4X,WAC5B,CACAS,kBACI,MAAMza,EAAOoC,KAAKoY,cACZE,EAAY,GAIlB,OAHA1a,EAAKC,SAASsY,IACVmC,EAAUtZ,QAAQgB,KAAK4X,WAAWzB,GAAG,IAElCmC,CACX,E","sources":["webpack:///../node_modules/@ionic/react/dist/index.esm.js"],"sourcesContent":["import React, { useContext, useRef, useEffect, createElement, useState, Fragment, useMemo, useCallback } from 'react';\nimport { isPlatform as isPlatform$1, getPlatforms as getPlatforms$1, alertController, loadingController, toastController as toastController$1, pickerController, actionSheetController as actionSheetController$1, componentOnReady, createAnimation, modalController, popoverController, initialize } from '@ionic/core/components';\nexport { IonicSafeString, IonicSlides, IonicSwiper, createAnimation, createGesture, getTimeGivenProgression, iosTransitionAnimation, mdTransitionAnimation } from '@ionic/core/components';\nimport { __rest } from 'tslib';\nimport ReactDOM, { createPortal } from 'react-dom';\nimport { defineCustomElement as defineCustomElement$1 } from '@ionic/core/components/ion-accordion.js';\nimport { defineCustomElement as defineCustomElement$2 } from '@ionic/core/components/ion-accordion-group.js';\nimport { defineCustomElement as defineCustomElement$3 } from '@ionic/core/components/ion-avatar.js';\nimport { defineCustomElement as defineCustomElement$4 } from '@ionic/core/components/ion-backdrop.js';\nimport { defineCustomElement as defineCustomElement$5 } from '@ionic/core/components/ion-badge.js';\nimport { defineCustomElement as defineCustomElement$6 } from '@ionic/core/components/ion-breadcrumbs.js';\nimport { defineCustomElement as defineCustomElement$7 } from '@ionic/core/components/ion-buttons.js';\nimport { defineCustomElement as defineCustomElement$8 } from '@ionic/core/components/ion-card-content.js';\nimport { defineCustomElement as defineCustomElement$9 } from '@ionic/core/components/ion-card-header.js';\nimport { defineCustomElement as defineCustomElement$a } from '@ionic/core/components/ion-card-subtitle.js';\nimport { defineCustomElement as defineCustomElement$b } from '@ionic/core/components/ion-card-title.js';\nimport { defineCustomElement as defineCustomElement$c } from '@ionic/core/components/ion-checkbox.js';\nimport { defineCustomElement as defineCustomElement$d } from '@ionic/core/components/ion-chip.js';\nimport { defineCustomElement as defineCustomElement$e } from '@ionic/core/components/ion-col.js';\nimport { defineCustomElement as defineCustomElement$f } from '@ionic/core/components/ion-content.js';\nimport { defineCustomElement as defineCustomElement$g } from '@ionic/core/components/ion-datetime.js';\nimport { defineCustomElement as defineCustomElement$h } from '@ionic/core/components/ion-datetime-button.js';\nimport { defineCustomElement as defineCustomElement$i } from '@ionic/core/components/ion-fab.js';\nimport { defineCustomElement as defineCustomElement$j } from '@ionic/core/components/ion-fab-list.js';\nimport { defineCustomElement as defineCustomElement$k } from '@ionic/core/components/ion-footer.js';\nimport { defineCustomElement as defineCustomElement$l } from '@ionic/core/components/ion-grid.js';\nimport { defineCustomElement as defineCustomElement$m } from '@ionic/core/components/ion-header.js';\nimport { defineCustomElement as defineCustomElement$n } from '@ionic/core/components/ion-img.js';\nimport { defineCustomElement as defineCustomElement$o } from '@ionic/core/components/ion-infinite-scroll.js';\nimport { defineCustomElement as defineCustomElement$p } from '@ionic/core/components/ion-infinite-scroll-content.js';\nimport { defineCustomElement as defineCustomElement$q } from '@ionic/core/components/ion-input.js';\nimport { defineCustomElement as defineCustomElement$r } from '@ionic/core/components/ion-item-divider.js';\nimport { defineCustomElement as defineCustomElement$s } from '@ionic/core/components/ion-item-group.js';\nimport { defineCustomElement as defineCustomElement$t } from '@ionic/core/components/ion-item-options.js';\nimport { defineCustomElement as defineCustomElement$u } from '@ionic/core/components/ion-item-sliding.js';\nimport { defineCustomElement as defineCustomElement$v } from '@ionic/core/components/ion-label.js';\nimport { defineCustomElement as defineCustomElement$w } from '@ionic/core/components/ion-list.js';\nimport { defineCustomElement as defineCustomElement$x } from '@ionic/core/components/ion-list-header.js';\nimport { defineCustomElement as defineCustomElement$y } from '@ionic/core/components/ion-menu.js';\nimport { defineCustomElement as defineCustomElement$z } from '@ionic/core/components/ion-menu-button.js';\nimport { defineCustomElement as defineCustomElement$A } from '@ionic/core/components/ion-menu-toggle.js';\nimport { defineCustomElement as defineCustomElement$1g } from '@ionic/core/components/ion-nav.js';\nimport { defineCustomElement as defineCustomElement$B } from '@ionic/core/components/ion-nav-link.js';\nimport { defineCustomElement as defineCustomElement$C } from '@ionic/core/components/ion-note.js';\nimport { defineCustomElement as defineCustomElement$D } from '@ionic/core/components/ion-progress-bar.js';\nimport { defineCustomElement as defineCustomElement$E } from '@ionic/core/components/ion-radio.js';\nimport { defineCustomElement as defineCustomElement$F } from '@ionic/core/components/ion-radio-group.js';\nimport { defineCustomElement as defineCustomElement$G } from '@ionic/core/components/ion-range.js';\nimport { defineCustomElement as defineCustomElement$H } from '@ionic/core/components/ion-refresher.js';\nimport { defineCustomElement as defineCustomElement$I } from '@ionic/core/components/ion-refresher-content.js';\nimport { defineCustomElement as defineCustomElement$J } from '@ionic/core/components/ion-reorder.js';\nimport { defineCustomElement as defineCustomElement$K } from '@ionic/core/components/ion-reorder-group.js';\nimport { defineCustomElement as defineCustomElement$L } from '@ionic/core/components/ion-ripple-effect.js';\nimport { defineCustomElement as defineCustomElement$M } from '@ionic/core/components/ion-row.js';\nimport { defineCustomElement as defineCustomElement$N } from '@ionic/core/components/ion-searchbar.js';\nimport { defineCustomElement as defineCustomElement$O } from '@ionic/core/components/ion-segment.js';\nimport { defineCustomElement as defineCustomElement$P } from '@ionic/core/components/ion-segment-button.js';\nimport { defineCustomElement as defineCustomElement$Q } from '@ionic/core/components/ion-select.js';\nimport { defineCustomElement as defineCustomElement$R } from '@ionic/core/components/ion-select-option.js';\nimport { defineCustomElement as defineCustomElement$S } from '@ionic/core/components/ion-skeleton-text.js';\nimport { defineCustomElement as defineCustomElement$T } from '@ionic/core/components/ion-slide.js';\nimport { defineCustomElement as defineCustomElement$U } from '@ionic/core/components/ion-slides.js';\nimport { defineCustomElement as defineCustomElement$V } from '@ionic/core/components/ion-spinner.js';\nimport { defineCustomElement as defineCustomElement$W } from '@ionic/core/components/ion-split-pane.js';\nimport { defineCustomElement as defineCustomElement$X } from '@ionic/core/components/ion-tab.js';\nimport { defineCustomElement as defineCustomElement$Y } from '@ionic/core/components/ion-text.js';\nimport { defineCustomElement as defineCustomElement$Z } from '@ionic/core/components/ion-textarea.js';\nimport { defineCustomElement as defineCustomElement$_ } from '@ionic/core/components/ion-thumbnail.js';\nimport { defineCustomElement as defineCustomElement$$ } from '@ionic/core/components/ion-title.js';\nimport { defineCustomElement as defineCustomElement$10 } from '@ionic/core/components/ion-toggle.js';\nimport { defineCustomElement as defineCustomElement$11 } from '@ionic/core/components/ion-toolbar.js';\nimport { defineCustomElement as defineCustomElement$12 } from '@ionic/core/components/ion-virtual-scroll.js';\nimport { IonBreadcrumb as IonBreadcrumb$1 } from '@ionic/core/components/ion-breadcrumb.js';\nimport { IonButton as IonButton$1 } from '@ionic/core/components/ion-button.js';\nimport { IonCard as IonCard$1 } from '@ionic/core/components/ion-card.js';\nimport { IonFabButton as IonFabButton$1 } from '@ionic/core/components/ion-fab-button.js';\nimport { IonItemOption as IonItemOption$1 } from '@ionic/core/components/ion-item-option.js';\nimport { IonItem as IonItem$1 } from '@ionic/core/components/ion-item.js';\nimport { IonRouterLink as IonRouterLink$1 } from '@ionic/core/components/ion-router-link.js';\nimport { defineCustomElement as defineCustomElement$13 } from '@ionic/core/components/ion-alert.js';\nimport { defineCustomElement as defineCustomElement$14 } from '@ionic/core/components/ion-loading.js';\nimport { defineCustomElement as defineCustomElement$15 } from '@ionic/core/components/ion-toast.js';\nimport { defineCustomElement as defineCustomElement$16 } from '@ionic/core/components/ion-picker.js';\nimport { defineCustomElement as defineCustomElement$17 } from '@ionic/core/components/ion-action-sheet.js';\nimport { defineCustomElement as defineCustomElement$18 } from '@ionic/core/components/ion-modal.js';\nimport { defineCustomElement as defineCustomElement$19 } from '@ionic/core/components/ion-popover.js';\nimport { defineCustomElement as defineCustomElement$1f } from '@ionic/core/components/ion-app.js';\nimport { defineCustomElement as defineCustomElement$1e } from '@ionic/core/components/ion-back-button.js';\nimport { defineCustomElement as defineCustomElement$1b } from '@ionic/core/components/ion-router-outlet.js';\nimport { defineCustomElement as defineCustomElement$1a } from '@ionic/core/components/ion-tab-bar.js';\nimport { defineCustomElement as defineCustomElement$1d } from '@ionic/core/components/ion-tab-button.js';\nimport { defineCustomElement as defineCustomElement$1c } from 'ionicons/components/ion-icon.js';\n\nconst IonLifeCycleContext = /*@__PURE__*/ React.createContext({\n onIonViewWillEnter: () => {\n return;\n },\n ionViewWillEnter: () => {\n return;\n },\n onIonViewDidEnter: () => {\n return;\n },\n ionViewDidEnter: () => {\n return;\n },\n onIonViewWillLeave: () => {\n return;\n },\n ionViewWillLeave: () => {\n return;\n },\n onIonViewDidLeave: () => {\n return;\n },\n ionViewDidLeave: () => {\n return;\n },\n});\nconst DefaultIonLifeCycleContext = class {\n constructor() {\n this.ionViewWillEnterCallbacks = [];\n this.ionViewDidEnterCallbacks = [];\n this.ionViewWillLeaveCallbacks = [];\n this.ionViewDidLeaveCallbacks = [];\n }\n onIonViewWillEnter(callback) {\n if (callback.id) {\n const index = this.ionViewWillEnterCallbacks.findIndex((x) => x.id === callback.id);\n if (index > -1) {\n this.ionViewWillEnterCallbacks[index] = callback;\n }\n else {\n this.ionViewWillEnterCallbacks.push(callback);\n }\n }\n else {\n this.ionViewWillEnterCallbacks.push(callback);\n }\n }\n ionViewWillEnter() {\n this.ionViewWillEnterCallbacks.forEach((cb) => cb());\n }\n onIonViewDidEnter(callback) {\n if (callback.id) {\n const index = this.ionViewDidEnterCallbacks.findIndex((x) => x.id === callback.id);\n if (index > -1) {\n this.ionViewDidEnterCallbacks[index] = callback;\n }\n else {\n this.ionViewDidEnterCallbacks.push(callback);\n }\n }\n else {\n this.ionViewDidEnterCallbacks.push(callback);\n }\n }\n ionViewDidEnter() {\n this.ionViewDidEnterCallbacks.forEach((cb) => cb());\n }\n onIonViewWillLeave(callback) {\n if (callback.id) {\n const index = this.ionViewWillLeaveCallbacks.findIndex((x) => x.id === callback.id);\n if (index > -1) {\n this.ionViewWillLeaveCallbacks[index] = callback;\n }\n else {\n this.ionViewWillLeaveCallbacks.push(callback);\n }\n }\n else {\n this.ionViewWillLeaveCallbacks.push(callback);\n }\n }\n ionViewWillLeave() {\n this.ionViewWillLeaveCallbacks.forEach((cb) => cb());\n }\n onIonViewDidLeave(callback) {\n if (callback.id) {\n const index = this.ionViewDidLeaveCallbacks.findIndex((x) => x.id === callback.id);\n if (index > -1) {\n this.ionViewDidLeaveCallbacks[index] = callback;\n }\n else {\n this.ionViewDidLeaveCallbacks.push(callback);\n }\n }\n else {\n this.ionViewDidLeaveCallbacks.push(callback);\n }\n }\n ionViewDidLeave() {\n this.ionViewDidLeaveCallbacks.forEach((cb) => cb());\n this.componentCanBeDestroyed();\n }\n onComponentCanBeDestroyed(callback) {\n this.componentCanBeDestroyedCallback = callback;\n }\n componentCanBeDestroyed() {\n if (this.componentCanBeDestroyedCallback) {\n this.componentCanBeDestroyedCallback();\n }\n }\n};\n\n// TODO(FW-2959): types\nconst withIonLifeCycle = (WrappedComponent) => {\n return class IonLifeCycle extends React.Component {\n constructor(props) {\n super(props);\n this.componentRef = React.createRef();\n }\n componentDidMount() {\n const element = this.componentRef.current;\n this.context.onIonViewWillEnter(() => {\n if (element && element.ionViewWillEnter) {\n element.ionViewWillEnter();\n }\n });\n this.context.onIonViewDidEnter(() => {\n if (element && element.ionViewDidEnter) {\n element.ionViewDidEnter();\n }\n });\n this.context.onIonViewWillLeave(() => {\n if (element && element.ionViewWillLeave) {\n element.ionViewWillLeave();\n }\n });\n this.context.onIonViewDidLeave(() => {\n if (element && element.ionViewDidLeave) {\n element.ionViewDidLeave();\n }\n });\n }\n render() {\n return (React.createElement(IonLifeCycleContext.Consumer, null, (context) => {\n this.context = context;\n return React.createElement(WrappedComponent, Object.assign({ ref: this.componentRef }, this.props));\n }));\n }\n };\n};\n\nconst useIonViewWillEnter = (callback, deps = []) => {\n const context = useContext(IonLifeCycleContext);\n const id = useRef();\n id.current = id.current || Math.floor(Math.random() * 1000000);\n useEffect(() => {\n callback.id = id.current;\n context.onIonViewWillEnter(callback);\n }, deps);\n};\nconst useIonViewDidEnter = (callback, deps = []) => {\n const context = useContext(IonLifeCycleContext);\n const id = useRef();\n id.current = id.current || Math.floor(Math.random() * 1000000);\n useEffect(() => {\n callback.id = id.current;\n context.onIonViewDidEnter(callback);\n }, deps);\n};\nconst useIonViewWillLeave = (callback, deps = []) => {\n const context = useContext(IonLifeCycleContext);\n const id = useRef();\n id.current = id.current || Math.floor(Math.random() * 1000000);\n useEffect(() => {\n callback.id = id.current;\n context.onIonViewWillLeave(callback);\n }, deps);\n};\nconst useIonViewDidLeave = (callback, deps = []) => {\n const context = useContext(IonLifeCycleContext);\n const id = useRef();\n id.current = id.current || Math.floor(Math.random() * 1000000);\n useEffect(() => {\n callback.id = id.current;\n context.onIonViewDidLeave(callback);\n }, deps);\n};\n\nconst NavContext = /*@__PURE__*/ React.createContext({\n getIonRedirect: () => undefined,\n getIonRoute: () => undefined,\n getPageManager: () => undefined,\n getStackManager: () => undefined,\n goBack: (route) => {\n if (typeof window !== 'undefined') {\n if (typeof route === 'string') {\n window.location.pathname = route;\n }\n else {\n window.history.back();\n }\n }\n },\n navigate: (path) => {\n if (typeof window !== 'undefined') {\n window.location.pathname = path;\n }\n },\n hasIonicRouter: () => false,\n routeInfo: undefined,\n setCurrentTab: () => undefined,\n changeTab: (_tab, path) => {\n if (typeof window !== 'undefined') {\n window.location.pathname = path;\n }\n },\n resetTab: (_tab, path) => {\n if (typeof window !== 'undefined') {\n window.location.pathname = path;\n }\n },\n});\n\nconst dashToPascalCase = (str) => str\n .toLowerCase()\n .split('-')\n .map((segment) => segment.charAt(0).toUpperCase() + segment.slice(1))\n .join('');\nconst camelToDashCase = (str) => str.replace(/([A-Z])/g, (m) => `-${m[0].toLowerCase()}`);\n\nconst attachProps = (node, newProps, oldProps = {}) => {\n // some test frameworks don't render DOM elements, so we test here to make sure we are dealing with DOM first\n if (node instanceof Element) {\n // add any classes in className to the class list\n const className = getClassName(node.classList, newProps, oldProps);\n if (className !== '') {\n node.className = className;\n }\n Object.keys(newProps).forEach((name) => {\n if (name === 'children' ||\n name === 'style' ||\n name === 'ref' ||\n name === 'class' ||\n name === 'className' ||\n name === 'forwardedRef') {\n return;\n }\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2);\n const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);\n if (!isCoveredByReact(eventNameLc)) {\n syncEvent(node, eventNameLc, newProps[name]);\n }\n }\n else {\n node[name] = newProps[name];\n const propType = typeof newProps[name];\n if (propType === 'string') {\n node.setAttribute(camelToDashCase(name), newProps[name]);\n }\n }\n });\n }\n};\nconst getClassName = (classList, newProps, oldProps) => {\n const newClassProp = newProps.className || newProps.class;\n const oldClassProp = oldProps.className || oldProps.class;\n // map the classes to Maps for performance\n const currentClasses = arrayToMap(classList);\n const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);\n const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);\n const finalClassNames = [];\n // loop through each of the current classes on the component\n // to see if it should be a part of the classNames added\n currentClasses.forEach((currentClass) => {\n if (incomingPropClasses.has(currentClass)) {\n // add it as its already included in classnames coming in from newProps\n finalClassNames.push(currentClass);\n incomingPropClasses.delete(currentClass);\n }\n else if (!oldPropClasses.has(currentClass)) {\n // add it as it has NOT been removed by user\n finalClassNames.push(currentClass);\n }\n });\n incomingPropClasses.forEach((s) => finalClassNames.push(s));\n return finalClassNames.join(' ');\n};\n/**\n * Checks if an event is supported in the current execution environment.\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nconst isCoveredByReact = (eventNameSuffix) => {\n if (typeof document === 'undefined') {\n return true;\n }\n else {\n const eventName = 'on' + eventNameSuffix;\n let isSupported = eventName in document;\n if (!isSupported) {\n const element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n return isSupported;\n }\n};\nconst syncEvent = (node, eventName, newEventHandler) => {\n const eventStore = node.__events || (node.__events = {});\n const oldEventHandler = eventStore[eventName];\n // Remove old listener so they don't double up.\n if (oldEventHandler) {\n node.removeEventListener(eventName, oldEventHandler);\n }\n // Bind new listener.\n node.addEventListener(eventName, (eventStore[eventName] = function handler(e) {\n if (newEventHandler) {\n newEventHandler.call(this, e);\n }\n }));\n};\nconst arrayToMap = (arr) => {\n const map = new Map();\n arr.forEach((s) => map.set(s, s));\n return map;\n};\n\nconst setRef = (ref, value) => {\n if (typeof ref === 'function') {\n ref(value);\n }\n else if (ref != null) {\n // Cast as a MutableRef so we can assign current\n ref.current = value;\n }\n};\nconst mergeRefs = (...refs) => {\n return (value) => {\n refs.forEach(ref => {\n setRef(ref, value);\n });\n };\n};\nconst createForwardRef$1 = (ReactComponent, displayName) => {\n const forwardRef = (props, ref) => {\n return React.createElement(ReactComponent, Object.assign({}, props, { forwardedRef: ref }));\n };\n forwardRef.displayName = displayName;\n return React.forwardRef(forwardRef);\n};\nconst defineCustomElement = (tagName, customElement) => {\n if (customElement !== undefined &&\n typeof customElements !== 'undefined' &&\n !customElements.get(tagName)) {\n customElements.define(tagName, customElement);\n }\n};\n\nconst createReactComponent = (tagName, ReactComponentContext, manipulatePropsFunction, defineCustomElement) => {\n if (defineCustomElement !== undefined) {\n defineCustomElement();\n }\n const displayName = dashToPascalCase(tagName);\n const ReactComponent = class extends React.Component {\n constructor(props) {\n super(props);\n this.setComponentElRef = (element) => {\n this.componentEl = element;\n };\n }\n componentDidMount() {\n this.componentDidUpdate(this.props);\n }\n componentDidUpdate(prevProps) {\n attachProps(this.componentEl, this.props, prevProps);\n }\n render() {\n const _a = this.props, { children, forwardedRef, style, className, ref } = _a, cProps = __rest(_a, [\"children\", \"forwardedRef\", \"style\", \"className\", \"ref\"]);\n let propsToPass = Object.keys(cProps).reduce((acc, name) => {\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase();\n if (typeof document !== 'undefined' && isCoveredByReact(eventName)) {\n acc[name] = cProps[name];\n }\n }\n else {\n acc[name] = cProps[name];\n }\n return acc;\n }, {});\n if (manipulatePropsFunction) {\n propsToPass = manipulatePropsFunction(this.props, propsToPass);\n }\n const newProps = Object.assign(Object.assign({}, propsToPass), { ref: mergeRefs(forwardedRef, this.setComponentElRef), style });\n /**\n * We use createElement here instead of\n * React.createElement to work around a\n * bug in Vite (https://github.com/vitejs/vite/issues/6104).\n * React.createElement causes all elements to be rendered\n * as instead of the actual Web Component.\n */\n return createElement(tagName, newProps, children);\n }\n static get displayName() {\n return displayName;\n }\n };\n // If context was passed to createReactComponent then conditionally add it to the Component Class\n if (ReactComponentContext) {\n ReactComponent.contextType = ReactComponentContext;\n }\n return createForwardRef$1(ReactComponent, displayName);\n};\n\n/* eslint-disable */\nconst IonAccordion = /*@__PURE__*/ createReactComponent('ion-accordion', undefined, undefined, defineCustomElement$1);\nconst IonAccordionGroup = /*@__PURE__*/ createReactComponent('ion-accordion-group', undefined, undefined, defineCustomElement$2);\nconst IonAvatar = /*@__PURE__*/ createReactComponent('ion-avatar', undefined, undefined, defineCustomElement$3);\nconst IonBackdrop = /*@__PURE__*/ createReactComponent('ion-backdrop', undefined, undefined, defineCustomElement$4);\nconst IonBadge = /*@__PURE__*/ createReactComponent('ion-badge', undefined, undefined, defineCustomElement$5);\nconst IonBreadcrumbs = /*@__PURE__*/ createReactComponent('ion-breadcrumbs', undefined, undefined, defineCustomElement$6);\nconst IonButtons = /*@__PURE__*/ createReactComponent('ion-buttons', undefined, undefined, defineCustomElement$7);\nconst IonCardContent = /*@__PURE__*/ createReactComponent('ion-card-content', undefined, undefined, defineCustomElement$8);\nconst IonCardHeader = /*@__PURE__*/ createReactComponent('ion-card-header', undefined, undefined, defineCustomElement$9);\nconst IonCardSubtitle = /*@__PURE__*/ createReactComponent('ion-card-subtitle', undefined, undefined, defineCustomElement$a);\nconst IonCardTitle = /*@__PURE__*/ createReactComponent('ion-card-title', undefined, undefined, defineCustomElement$b);\nconst IonCheckbox = /*@__PURE__*/ createReactComponent('ion-checkbox', undefined, undefined, defineCustomElement$c);\nconst IonChip = /*@__PURE__*/ createReactComponent('ion-chip', undefined, undefined, defineCustomElement$d);\nconst IonCol = /*@__PURE__*/ createReactComponent('ion-col', undefined, undefined, defineCustomElement$e);\nconst IonContent = /*@__PURE__*/ createReactComponent('ion-content', undefined, undefined, defineCustomElement$f);\nconst IonDatetime = /*@__PURE__*/ createReactComponent('ion-datetime', undefined, undefined, defineCustomElement$g);\nconst IonDatetimeButton = /*@__PURE__*/ createReactComponent('ion-datetime-button', undefined, undefined, defineCustomElement$h);\nconst IonFab = /*@__PURE__*/ createReactComponent('ion-fab', undefined, undefined, defineCustomElement$i);\nconst IonFabList = /*@__PURE__*/ createReactComponent('ion-fab-list', undefined, undefined, defineCustomElement$j);\nconst IonFooter = /*@__PURE__*/ createReactComponent('ion-footer', undefined, undefined, defineCustomElement$k);\nconst IonGrid = /*@__PURE__*/ createReactComponent('ion-grid', undefined, undefined, defineCustomElement$l);\nconst IonHeader = /*@__PURE__*/ createReactComponent('ion-header', undefined, undefined, defineCustomElement$m);\nconst IonImg = /*@__PURE__*/ createReactComponent('ion-img', undefined, undefined, defineCustomElement$n);\nconst IonInfiniteScroll = /*@__PURE__*/ createReactComponent('ion-infinite-scroll', undefined, undefined, defineCustomElement$o);\nconst IonInfiniteScrollContent = /*@__PURE__*/ createReactComponent('ion-infinite-scroll-content', undefined, undefined, defineCustomElement$p);\nconst IonInput = /*@__PURE__*/ createReactComponent('ion-input', undefined, undefined, defineCustomElement$q);\nconst IonItemDivider = /*@__PURE__*/ createReactComponent('ion-item-divider', undefined, undefined, defineCustomElement$r);\nconst IonItemGroup = /*@__PURE__*/ createReactComponent('ion-item-group', undefined, undefined, defineCustomElement$s);\nconst IonItemOptions = /*@__PURE__*/ createReactComponent('ion-item-options', undefined, undefined, defineCustomElement$t);\nconst IonItemSliding = /*@__PURE__*/ createReactComponent('ion-item-sliding', undefined, undefined, defineCustomElement$u);\nconst IonLabel = /*@__PURE__*/ createReactComponent('ion-label', undefined, undefined, defineCustomElement$v);\nconst IonList = /*@__PURE__*/ createReactComponent('ion-list', undefined, undefined, defineCustomElement$w);\nconst IonListHeader = /*@__PURE__*/ createReactComponent('ion-list-header', undefined, undefined, defineCustomElement$x);\nconst IonMenu = /*@__PURE__*/ createReactComponent('ion-menu', undefined, undefined, defineCustomElement$y);\nconst IonMenuButton = /*@__PURE__*/ createReactComponent('ion-menu-button', undefined, undefined, defineCustomElement$z);\nconst IonMenuToggle = /*@__PURE__*/ createReactComponent('ion-menu-toggle', undefined, undefined, defineCustomElement$A);\nconst IonNavLink = /*@__PURE__*/ createReactComponent('ion-nav-link', undefined, undefined, defineCustomElement$B);\nconst IonNote = /*@__PURE__*/ createReactComponent('ion-note', undefined, undefined, defineCustomElement$C);\nconst IonProgressBar = /*@__PURE__*/ createReactComponent('ion-progress-bar', undefined, undefined, defineCustomElement$D);\nconst IonRadio = /*@__PURE__*/ createReactComponent('ion-radio', undefined, undefined, defineCustomElement$E);\nconst IonRadioGroup = /*@__PURE__*/ createReactComponent('ion-radio-group', undefined, undefined, defineCustomElement$F);\nconst IonRange = /*@__PURE__*/ createReactComponent('ion-range', undefined, undefined, defineCustomElement$G);\nconst IonRefresher = /*@__PURE__*/ createReactComponent('ion-refresher', undefined, undefined, defineCustomElement$H);\nconst IonRefresherContent = /*@__PURE__*/ createReactComponent('ion-refresher-content', undefined, undefined, defineCustomElement$I);\nconst IonReorder = /*@__PURE__*/ createReactComponent('ion-reorder', undefined, undefined, defineCustomElement$J);\nconst IonReorderGroup = /*@__PURE__*/ createReactComponent('ion-reorder-group', undefined, undefined, defineCustomElement$K);\nconst IonRippleEffect = /*@__PURE__*/ createReactComponent('ion-ripple-effect', undefined, undefined, defineCustomElement$L);\nconst IonRow = /*@__PURE__*/ createReactComponent('ion-row', undefined, undefined, defineCustomElement$M);\nconst IonSearchbar = /*@__PURE__*/ createReactComponent('ion-searchbar', undefined, undefined, defineCustomElement$N);\nconst IonSegment = /*@__PURE__*/ createReactComponent('ion-segment', undefined, undefined, defineCustomElement$O);\nconst IonSegmentButton = /*@__PURE__*/ createReactComponent('ion-segment-button', undefined, undefined, defineCustomElement$P);\nconst IonSelect = /*@__PURE__*/ createReactComponent('ion-select', undefined, undefined, defineCustomElement$Q);\nconst IonSelectOption = /*@__PURE__*/ createReactComponent('ion-select-option', undefined, undefined, defineCustomElement$R);\nconst IonSkeletonText = /*@__PURE__*/ createReactComponent('ion-skeleton-text', undefined, undefined, defineCustomElement$S);\nconst IonSlide = /*@__PURE__*/ createReactComponent('ion-slide', undefined, undefined, defineCustomElement$T);\nconst IonSlides = /*@__PURE__*/ createReactComponent('ion-slides', undefined, undefined, defineCustomElement$U);\nconst IonSpinner = /*@__PURE__*/ createReactComponent('ion-spinner', undefined, undefined, defineCustomElement$V);\nconst IonSplitPane = /*@__PURE__*/ createReactComponent('ion-split-pane', undefined, undefined, defineCustomElement$W);\nconst IonTab = /*@__PURE__*/ createReactComponent('ion-tab', undefined, undefined, defineCustomElement$X);\nconst IonText = /*@__PURE__*/ createReactComponent('ion-text', undefined, undefined, defineCustomElement$Y);\nconst IonTextarea = /*@__PURE__*/ createReactComponent('ion-textarea', undefined, undefined, defineCustomElement$Z);\nconst IonThumbnail = /*@__PURE__*/ createReactComponent('ion-thumbnail', undefined, undefined, defineCustomElement$_);\nconst IonTitle = /*@__PURE__*/ createReactComponent('ion-title', undefined, undefined, defineCustomElement$$);\nconst IonToggle = /*@__PURE__*/ createReactComponent('ion-toggle', undefined, undefined, defineCustomElement$10);\nconst IonToolbar = /*@__PURE__*/ createReactComponent('ion-toolbar', undefined, undefined, defineCustomElement$11);\nconst IonVirtualScroll = /*@__PURE__*/ createReactComponent('ion-virtual-scroll', undefined, undefined, defineCustomElement$12);\n\nconst createForwardRef = (ReactComponent, // TODO(FW-2959): type\ndisplayName) => {\n const forwardRef = (props, ref) => {\n return React.createElement(ReactComponent, Object.assign({}, props, { forwardedRef: ref }));\n };\n forwardRef.displayName = displayName;\n return React.forwardRef(forwardRef);\n};\nconst isPlatform = (platform) => {\n return isPlatform$1(window, platform);\n};\nconst getPlatforms = () => {\n return getPlatforms$1(window);\n};\nconst getConfig = () => {\n if (typeof window !== 'undefined') {\n const Ionic = window.Ionic;\n if (Ionic && Ionic.config) {\n return Ionic.config;\n }\n }\n return null;\n};\n\nconst createRoutingComponent = (tagName, customElement) => {\n defineCustomElement(tagName, customElement);\n const displayName = dashToPascalCase(tagName);\n const ReactComponent = class extends React.Component {\n constructor(props) {\n super(props);\n this.handleClick = (e) => {\n const { routerLink, routerDirection, routerOptions, routerAnimation } = this.props;\n if (routerLink !== undefined) {\n e.preventDefault();\n this.context.navigate(routerLink, routerDirection, undefined, routerAnimation, routerOptions);\n }\n };\n // Create a local ref to to attach props to the wrapped element.\n this.ref = React.createRef();\n // React refs must be stable (not created inline).\n this.stableMergedRefs = mergeRefs(this.ref, this.props.forwardedRef);\n }\n componentDidMount() {\n this.componentDidUpdate(this.props);\n }\n componentDidUpdate(prevProps) {\n const node = this.ref.current;\n attachProps(node, this.props, prevProps);\n }\n render() {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _a = this.props, { children, forwardedRef, style, className, ref } = _a, cProps = __rest(_a, [\"children\", \"forwardedRef\", \"style\", \"className\", \"ref\"]);\n const propsToPass = Object.keys(cProps).reduce((acc, name) => {\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase();\n if (isCoveredByReact(eventName)) {\n acc[name] = cProps[name];\n }\n }\n else if (['string', 'boolean', 'number'].includes(typeof cProps[name])) {\n acc[camelToDashCase(name)] = cProps[name];\n }\n return acc;\n }, {});\n const newProps = Object.assign(Object.assign({}, propsToPass), { ref: this.stableMergedRefs, style });\n if (this.props.routerLink && !this.props.href) {\n newProps.href = this.props.routerLink;\n }\n if (newProps.onClick) {\n const oldClick = newProps.onClick;\n newProps.onClick = (e) => {\n oldClick(e);\n if (!e.defaultPrevented) {\n this.handleClick(e);\n }\n };\n }\n else {\n newProps.onClick = this.handleClick;\n }\n return createElement(tagName, newProps, children);\n }\n static get displayName() {\n return displayName;\n }\n static get contextType() {\n return NavContext;\n }\n };\n return createForwardRef(ReactComponent, displayName);\n};\n\nconst IonRouterLink = /*@__PURE__*/ createRoutingComponent('ion-router-link', IonRouterLink$1);\nconst IonButton = /*@__PURE__*/ createRoutingComponent('ion-button', IonButton$1);\nconst IonCard = /*@__PURE__*/ createRoutingComponent('ion-card', IonCard$1);\nconst IonFabButton = /*@__PURE__*/ createRoutingComponent('ion-fab-button', IonFabButton$1);\nconst IonItem = /*@__PURE__*/ createRoutingComponent('ion-item', IonItem$1);\nconst IonItemOption = /*@__PURE__*/ createRoutingComponent('ion-item-option', IonItemOption$1);\nconst IonBreadcrumb = /*@__PURE__*/ createRoutingComponent('ion-breadcrumb', IonBreadcrumb$1);\n\nconst createControllerComponent = (tagName, controller, defineCustomElement) => {\n if (defineCustomElement) {\n defineCustomElement();\n }\n const displayName = dashToPascalCase(tagName);\n const didDismissEventName = `on${displayName}DidDismiss`;\n const didPresentEventName = `on${displayName}DidPresent`;\n const willDismissEventName = `on${displayName}WillDismiss`;\n const willPresentEventName = `on${displayName}WillPresent`;\n class Overlay extends React.Component {\n constructor(props) {\n super(props);\n this.willUnmount = false;\n this.handleDismiss = this.handleDismiss.bind(this);\n }\n static get displayName() {\n return displayName;\n }\n async componentDidMount() {\n /**\n * Starting in React v18, strict mode will unmount and remount a component.\n * See: https://reactjs.org/blog/2022/03/29/react-v18.html#new-strict-mode-behaviors\n *\n * We need to reset this flag when the component is re-mounted so that\n * overlay.present() will be called and the overlay will display.\n */\n this.willUnmount = false;\n const { isOpen } = this.props;\n if (isOpen) {\n this.present();\n }\n }\n componentWillUnmount() {\n this.willUnmount = true;\n if (this.overlay) {\n this.overlay.dismiss();\n }\n }\n async componentDidUpdate(prevProps) {\n if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {\n this.present(prevProps);\n }\n if (this.overlay && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false) {\n await this.overlay.dismiss();\n }\n }\n handleDismiss(event) {\n if (this.props.onDidDismiss) {\n this.props.onDidDismiss(event);\n }\n setRef(this.props.forwardedRef, null);\n }\n async present(prevProps) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _a = this.props, cProps = __rest(_a, [\"isOpen\", \"onDidDismiss\", \"onDidPresent\", \"onWillDismiss\", \"onWillPresent\"]);\n if (this.overlay) {\n this.overlay.remove();\n }\n this.overlay = await controller.create(Object.assign({}, cProps));\n attachProps(this.overlay, {\n [didDismissEventName]: this.handleDismiss,\n [didPresentEventName]: (e) => this.props.onDidPresent && this.props.onDidPresent(e),\n [willDismissEventName]: (e) => this.props.onWillDismiss && this.props.onWillDismiss(e),\n [willPresentEventName]: (e) => this.props.onWillPresent && this.props.onWillPresent(e),\n }, prevProps);\n // Check isOpen again since the value could have changed during the async call to controller.create\n // It's also possible for the component to have become unmounted.\n if (this.props.isOpen === true && this.willUnmount === false) {\n setRef(this.props.forwardedRef, this.overlay);\n await this.overlay.present();\n }\n }\n render() {\n return null;\n }\n }\n return React.forwardRef((props, ref) => {\n return React.createElement(Overlay, Object.assign({}, props, { forwardedRef: ref }));\n });\n};\n\nconst IonAlert = /*@__PURE__*/ createControllerComponent('ion-alert', alertController, defineCustomElement$13);\n\nconst IonLoading = /*@__PURE__*/ createControllerComponent('ion-loading', loadingController, defineCustomElement$14);\n\nconst toastController = {\n create: (options) => toastController$1.create(options),\n dismiss: (data, role, id) => toastController$1.dismiss(data, role, id),\n getTop: () => toastController$1.getTop(),\n};\nconst IonToast = /*@__PURE__*/ createControllerComponent('ion-toast', toastController, defineCustomElement$15);\n\nconst IonPicker = /*@__PURE__*/ createControllerComponent('ion-picker', pickerController, defineCustomElement$16);\n\nconst createOverlayComponent = (tagName, controller, defineCustomElement) => {\n if (defineCustomElement !== undefined) {\n defineCustomElement();\n }\n const displayName = dashToPascalCase(tagName);\n const didDismissEventName = `on${displayName}DidDismiss`;\n const didPresentEventName = `on${displayName}DidPresent`;\n const willDismissEventName = `on${displayName}WillDismiss`;\n const willPresentEventName = `on${displayName}WillPresent`;\n class Overlay extends React.Component {\n constructor(props) {\n super(props);\n this.isDismissing = false;\n if (typeof document !== 'undefined') {\n this.el = document.createElement('div');\n }\n this.handleDismiss = this.handleDismiss.bind(this);\n }\n static get displayName() {\n return displayName;\n }\n componentDidMount() {\n if (this.props.isOpen) {\n this.present();\n }\n }\n componentWillUnmount() {\n if (this.overlay) {\n this.overlay.dismiss();\n }\n }\n handleDismiss(event) {\n if (this.props.onDidDismiss) {\n this.props.onDidDismiss(event);\n }\n setRef(this.props.forwardedRef, null);\n }\n shouldComponentUpdate(nextProps) {\n // Check if the overlay component is about to dismiss\n if (this.overlay && nextProps.isOpen !== this.props.isOpen && nextProps.isOpen === false) {\n this.isDismissing = true;\n }\n return true;\n }\n async componentDidUpdate(prevProps) {\n if (this.overlay) {\n attachProps(this.overlay, this.props, prevProps);\n }\n if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {\n this.present(prevProps);\n }\n if (this.overlay && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false) {\n await this.overlay.dismiss();\n this.isDismissing = false;\n /**\n * Now that the overlay is dismissed\n * we need to render again so that any\n * inner components will be unmounted\n */\n this.forceUpdate();\n }\n }\n async present(prevProps) {\n /* eslint-disable @typescript-eslint/no-unused-vars */\n const _a = this.props, cProps = __rest(_a, [\"children\", \"isOpen\", \"onDidDismiss\", \"onDidPresent\", \"onWillDismiss\", \"onWillPresent\"]);\n const elementProps = Object.assign(Object.assign({}, cProps), { ref: this.props.forwardedRef, [didDismissEventName]: this.handleDismiss, [didPresentEventName]: (e) => this.props.onDidPresent && this.props.onDidPresent(e), [willDismissEventName]: (e) => this.props.onWillDismiss && this.props.onWillDismiss(e), [willPresentEventName]: (e) => this.props.onWillPresent && this.props.onWillPresent(e) });\n /* eslint-enable @typescript-eslint/no-unused-vars */\n this.overlay = await controller.create(Object.assign(Object.assign({}, elementProps), { component: this.el, componentProps: {} }));\n setRef(this.props.forwardedRef, this.overlay);\n attachProps(this.overlay, elementProps, prevProps);\n await this.overlay.present();\n }\n render() {\n /**\n * Continue to render the component even when\n * overlay is dismissing otherwise component\n * will be hidden before animation is done.\n */\n return ReactDOM.createPortal(this.props.isOpen || this.isDismissing ? this.props.children : null, this.el);\n }\n }\n return React.forwardRef((props, ref) => {\n return React.createElement(Overlay, Object.assign({}, props, { forwardedRef: ref }));\n });\n};\n\nconst actionSheetController = {\n // TODO(FW-2959): type\n create: (options) => actionSheetController$1.create(options),\n dismiss: (data, role, id) => actionSheetController$1.dismiss(data, role, id),\n getTop: () => actionSheetController$1.getTop(),\n};\nconst IonActionSheet = /*@__PURE__*/ createOverlayComponent('ion-action-sheet', actionSheetController, defineCustomElement$17);\n\n/**\n * The @stencil/react-output-target will bind event listeners for any\n * attached props that use the `on` prefix. This function will remove\n * those event listeners when the component is unmounted.\n *\n * This prevents memory leaks and React state updates on unmounted components.\n */\nconst detachProps = (node, props) => {\n if (node instanceof Element) {\n Object.keys(props).forEach((name) => {\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2);\n const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);\n if (!isCoveredByReact(eventNameLc)) {\n /**\n * Detach custom event bindings (not built-in React events)\n * that were added by the @stencil/react-output-target attachProps function.\n */\n detachEvent(node, eventNameLc);\n }\n }\n });\n }\n};\nconst detachEvent = (node, eventName) => {\n const eventStore = node.__events || (node.__events = {});\n /**\n * If the event listener was added by attachProps, it will\n * be stored in the __events object.\n */\n const eventHandler = eventStore[eventName];\n if (eventHandler) {\n node.removeEventListener(eventName, eventHandler);\n eventStore[eventName] = undefined;\n }\n};\n\nconst createInlineOverlayComponent = (tagName, defineCustomElement) => {\n if (defineCustomElement) {\n defineCustomElement();\n }\n const displayName = dashToPascalCase(tagName);\n const ReactComponent = class extends React.Component {\n constructor(props) {\n super(props);\n this.handleIonMount = () => {\n /**\n * Mount the inner component when the\n * overlay is about to open.\n *\n * For ion-popover, this is when `ionMount` is emitted.\n * For other overlays, this is when `willPresent` is emitted.\n */\n this.setState({ isOpen: true });\n };\n this.handleWillPresent = (evt) => {\n this.setState({ isOpen: true });\n /**\n * Manually call the onWillPresent\n * handler if present as setState will\n * cause the event handlers to be\n * destroyed and re-created.\n */\n this.props.onWillPresent && this.props.onWillPresent(evt);\n };\n this.handleDidDismiss = (evt) => {\n const wrapper = this.wrapperRef.current;\n const el = this.ref.current;\n /**\n * This component might be unmounted already, if the containing\n * element was removed while the overlay was still open. (For\n * example, if an item contains an inline overlay with a button\n * that removes the item.)\n */\n if (wrapper && el) {\n el.append(wrapper);\n this.setState({ isOpen: false });\n }\n this.props.onDidDismiss && this.props.onDidDismiss(evt);\n };\n // Create a local ref to to attach props to the wrapped element.\n this.ref = React.createRef();\n // React refs must be stable (not created inline).\n this.stableMergedRefs = mergeRefs(this.ref, this.props.forwardedRef);\n // Component is hidden by default\n this.state = { isOpen: false };\n // Create a local ref to the inner child element.\n this.wrapperRef = React.createRef();\n }\n componentDidMount() {\n var _a, _b, _c;\n this.componentDidUpdate(this.props);\n (_a = this.ref.current) === null || _a === void 0 ? void 0 : _a.addEventListener('ionMount', this.handleIonMount);\n (_b = this.ref.current) === null || _b === void 0 ? void 0 : _b.addEventListener('willPresent', this.handleWillPresent);\n (_c = this.ref.current) === null || _c === void 0 ? void 0 : _c.addEventListener('didDismiss', this.handleDidDismiss);\n }\n componentDidUpdate(prevProps) {\n const node = this.ref.current;\n attachProps(node, this.props, prevProps);\n }\n componentWillUnmount() {\n const node = this.ref.current;\n /**\n * If the overlay is being unmounted, but is still\n * open, this means the unmount was triggered outside\n * of the overlay being dismissed.\n *\n * This can happen with:\n * - The parent component being unmounted\n * - The overlay being conditionally rendered\n * - A route change (push/pop/replace)\n *\n * Unmounting the overlay at this stage should skip\n * the dismiss lifecycle, including skipping the transition.\n *\n */\n if (node && this.state.isOpen) {\n /**\n * Detach the local event listener that performs the state updates,\n * before dismissing the overlay, to prevent the callback handlers\n * executing after the component has been unmounted. This is to\n * avoid memory leaks.\n */\n node.removeEventListener('didDismiss', this.handleDidDismiss);\n node.remove();\n detachProps(node, this.props);\n }\n }\n render() {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _a = this.props, { children, forwardedRef, style, className, ref } = _a, cProps = __rest(_a, [\"children\", \"forwardedRef\", \"style\", \"className\", \"ref\"]);\n const propsToPass = Object.keys(cProps).reduce((acc, name) => {\n if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {\n const eventName = name.substring(2).toLowerCase();\n if (isCoveredByReact(eventName)) {\n acc[name] = cProps[name];\n }\n }\n else if (['string', 'boolean', 'number'].includes(typeof cProps[name])) {\n acc[camelToDashCase(name)] = cProps[name];\n }\n return acc;\n }, {});\n const newProps = Object.assign(Object.assign({}, propsToPass), { ref: this.stableMergedRefs, style });\n return createElement('template', {}, createElement(tagName, newProps, \n /**\n * We only want the inner component\n * to be mounted if the overlay is open,\n * so conditionally render the component\n * based on the isOpen state.\n */\n this.state.isOpen || this.props.keepContentsMounted\n ? createElement('div', {\n id: 'ion-react-wrapper',\n ref: this.wrapperRef,\n className: 'ion-delegate-host',\n style: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n }, children)\n : null));\n }\n static get displayName() {\n return displayName;\n }\n };\n return createForwardRef(ReactComponent, displayName);\n};\n\nconst IonModal = /*@__PURE__*/ createInlineOverlayComponent('ion-modal', defineCustomElement$18);\n\nconst IonPopover = /*@__PURE__*/ createInlineOverlayComponent('ion-popover', defineCustomElement$19);\n\nconst IonContext = React.createContext({\n addOverlay: () => {\n return;\n },\n removeOverlay: () => {\n return;\n },\n});\n\n/**\n * Manages overlays that are added via the useOverlay hook.\n * This is a standalone component so changes to its children don't cause other descendant\n * components to re-render when overlays are added. However, we need to communicate with the IonContext\n * that is set up in , so we register callbacks so when overlays are added to IonContext,\n * they ultimately added here.\n */\nconst IonOverlayManager = ({ onAddOverlay, onRemoveOverlay }) => {\n /**\n * Because of the way we're passing around the addOverlay and removeOverlay\n * callbacks, by the time they finally get called, they use a stale reference\n * to the state that only has the initial values. So if two overlays are opened\n * at the same time, both using useIonModal or similar (such as through nesting),\n * the second will erase the first from the overlays list. This causes the content\n * of the first overlay to unmount.\n *\n * We wrap the state in useRef to ensure the two callbacks always use the most\n * up-to-date version.\n *\n * Further reading: https://stackoverflow.com/a/56554056\n */\n const [overlays, setOverlays] = useState({});\n const overlaysRef = useRef({});\n overlaysRef.current = overlays;\n useEffect(() => {\n /* Setup the callbacks that get called from */\n onAddOverlay(addOverlay);\n onRemoveOverlay(removeOverlay);\n }, []);\n const addOverlay = (id, component, containerElement) => {\n const newOverlays = Object.assign({}, overlaysRef.current);\n newOverlays[id] = { component, containerElement };\n setOverlays(newOverlays);\n };\n const removeOverlay = (id) => {\n const newOverlays = Object.assign({}, overlaysRef.current);\n delete newOverlays[id];\n setOverlays(newOverlays);\n };\n const overlayKeys = Object.keys(overlays);\n return (React.createElement(React.Fragment, null, overlayKeys.map((key) => {\n const overlay = overlays[key];\n return ReactDOM.createPortal(overlay.component, overlay.containerElement, `overlay-${key}`);\n })));\n};\n\nconst IonTabButtonInner = /*@__PURE__*/ createReactComponent('ion-tab-button', undefined, undefined, defineCustomElement$1d);\nconst IonTabBarInner = /*@__PURE__*/ createReactComponent('ion-tab-bar', undefined, undefined, defineCustomElement$1a);\nconst IonBackButtonInner = /*@__PURE__*/ createReactComponent('ion-back-button', undefined, undefined, defineCustomElement$1e);\nconst IonRouterOutletInner = /*@__PURE__*/ createReactComponent('ion-router-outlet', undefined, undefined, defineCustomElement$1b);\nconst IonAppInner = /*@__PURE__*/ createReactComponent('ion-app', undefined, undefined, defineCustomElement$1f);\n// ionicons\nconst IonIconInner = /*@__PURE__*/ createReactComponent('ion-icon', undefined, undefined, defineCustomElement$1c);\n\nconst IonApp = /*@__PURE__*/ (() => class extends React.Component {\n constructor(props) {\n super(props);\n /*\n Wire up methods to call into IonOverlayManager\n */\n this.ionContext = {\n addOverlay: (id, overlay, containerElement) => {\n if (this.addOverlayCallback) {\n this.addOverlayCallback(id, overlay, containerElement);\n }\n },\n removeOverlay: (id) => {\n if (this.removeOverlayCallback) {\n this.removeOverlayCallback(id);\n }\n },\n };\n }\n render() {\n return (React.createElement(IonContext.Provider, { value: this.ionContext },\n React.createElement(IonAppInner, Object.assign({}, this.props), this.props.children),\n React.createElement(IonOverlayManager, { onAddOverlay: (callback) => {\n this.addOverlayCallback = callback;\n }, onRemoveOverlay: (callback) => {\n this.removeOverlayCallback = callback;\n } })));\n }\n static get displayName() {\n return 'IonApp';\n }\n})();\n\nconst StackContext = React.createContext({\n registerIonPage: () => undefined,\n isInOutlet: () => false,\n});\n\nclass PageManager extends React.PureComponent {\n constructor(props) {\n super(props);\n this.ionPageElementRef = React.createRef();\n // React refs must be stable (not created inline).\n this.stableMergedRefs = mergeRefs(this.ionPageElementRef, this.props.forwardedRef);\n }\n componentDidMount() {\n if (this.ionPageElementRef.current) {\n if (this.context.isInOutlet()) {\n this.ionPageElementRef.current.classList.add('ion-page-invisible');\n }\n this.context.registerIonPage(this.ionPageElementRef.current, this.props.routeInfo);\n this.ionPageElementRef.current.addEventListener('ionViewWillEnter', this.ionViewWillEnterHandler.bind(this));\n this.ionPageElementRef.current.addEventListener('ionViewDidEnter', this.ionViewDidEnterHandler.bind(this));\n this.ionPageElementRef.current.addEventListener('ionViewWillLeave', this.ionViewWillLeaveHandler.bind(this));\n this.ionPageElementRef.current.addEventListener('ionViewDidLeave', this.ionViewDidLeaveHandler.bind(this));\n }\n }\n componentWillUnmount() {\n if (this.ionPageElementRef.current) {\n this.ionPageElementRef.current.removeEventListener('ionViewWillEnter', this.ionViewWillEnterHandler.bind(this));\n this.ionPageElementRef.current.removeEventListener('ionViewDidEnter', this.ionViewDidEnterHandler.bind(this));\n this.ionPageElementRef.current.removeEventListener('ionViewWillLeave', this.ionViewWillLeaveHandler.bind(this));\n this.ionPageElementRef.current.removeEventListener('ionViewDidLeave', this.ionViewDidLeaveHandler.bind(this));\n }\n }\n ionViewWillEnterHandler() {\n this.ionLifeCycleContext.ionViewWillEnter();\n }\n ionViewDidEnterHandler() {\n this.ionLifeCycleContext.ionViewDidEnter();\n }\n ionViewWillLeaveHandler() {\n this.ionLifeCycleContext.ionViewWillLeave();\n }\n ionViewDidLeaveHandler() {\n this.ionLifeCycleContext.ionViewDidLeave();\n }\n render() {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _a = this.props, { className, children, routeInfo, forwardedRef } = _a, props = __rest(_a, [\"className\", \"children\", \"routeInfo\", \"forwardedRef\"]);\n return (React.createElement(IonLifeCycleContext.Consumer, null, (context) => {\n this.ionLifeCycleContext = context;\n return (React.createElement(\"div\", Object.assign({ className: className ? `${className} ion-page` : `ion-page`, ref: this.stableMergedRefs }, props), children));\n }));\n }\n static get contextType() {\n return StackContext;\n }\n}\n\nclass IonPageInternal extends React.Component {\n constructor(props) {\n super(props);\n }\n render() {\n const _a = this.props, { className, children, forwardedRef } = _a, props = __rest(_a, [\"className\", \"children\", \"forwardedRef\"]);\n return this.context.hasIonicRouter() ? (React.createElement(PageManager, Object.assign({ className: className ? `${className}` : '', routeInfo: this.context.routeInfo, forwardedRef: forwardedRef }, props), children)) : (React.createElement(\"div\", Object.assign({ className: className ? `ion-page ${className}` : 'ion-page', ref: forwardedRef }, props), children));\n }\n static get displayName() {\n return 'IonPage';\n }\n static get contextType() {\n return NavContext;\n }\n}\nconst IonPage = createForwardRef(IonPageInternal, 'IonPage');\n\nconst ReactDelegate = (addView, removeView) => {\n const refMap = new WeakMap();\n const attachViewToDom = async (parentElement, component, propsOrDataObj, cssClasses) => {\n const div = document.createElement('div');\n cssClasses && div.classList.add(...cssClasses);\n parentElement.appendChild(div);\n const componentWithProps = component(propsOrDataObj);\n const hostComponent = createPortal(componentWithProps, div);\n refMap.set(component, hostComponent);\n addView(hostComponent);\n return Promise.resolve(div);\n };\n const removeViewFromDom = (_container, component) => {\n const hostComponent = refMap.get(component);\n hostComponent && removeView(hostComponent);\n return Promise.resolve();\n };\n return {\n attachViewToDom,\n removeViewFromDom,\n };\n};\n\nconst IonNavInner = createReactComponent('ion-nav', undefined, undefined, defineCustomElement$1g);\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst IonNavInternal = (_a) => {\n var { children, forwardedRef } = _a, restOfProps = __rest(_a, [\"children\", \"forwardedRef\"]);\n const [views, setViews] = useState([]);\n /**\n * Allows us to create React components that are rendered within\n * the context of the IonNav component.\n */\n const addView = (view) => setViews([...views, view]);\n const removeView = (view) => setViews(views.filter((v) => v !== view));\n const delegate = ReactDelegate(addView, removeView);\n return (React.createElement(IonNavInner, Object.assign({ delegate: delegate, ref: forwardedRef }, restOfProps), views));\n};\nconst IonNav = createForwardRef(IonNavInternal, 'IonNav');\n\nconst IonTabsContext = React.createContext({\n activeTab: undefined,\n selectTab: () => false,\n});\n\nconst HTMLElementSSR = (typeof HTMLElement !== 'undefined' ? HTMLElement : class {\n});\n\nclass OutletPageManager extends React.Component {\n constructor(props) {\n super(props);\n this.outletIsReady = false;\n }\n componentDidMount() {\n if (this.ionRouterOutlet) {\n /**\n * This avoids multiple raf calls\n * when React unmounts + remounts components.\n */\n if (!this.outletIsReady) {\n componentOnReady(this.ionRouterOutlet, () => {\n this.outletIsReady = true;\n this.context.registerIonPage(this.ionRouterOutlet, this.props.routeInfo);\n });\n }\n this.ionRouterOutlet.addEventListener('ionViewWillEnter', this.ionViewWillEnterHandler.bind(this));\n this.ionRouterOutlet.addEventListener('ionViewDidEnter', this.ionViewDidEnterHandler.bind(this));\n this.ionRouterOutlet.addEventListener('ionViewWillLeave', this.ionViewWillLeaveHandler.bind(this));\n this.ionRouterOutlet.addEventListener('ionViewDidLeave', this.ionViewDidLeaveHandler.bind(this));\n }\n }\n componentWillUnmount() {\n if (this.ionRouterOutlet) {\n this.ionRouterOutlet.removeEventListener('ionViewWillEnter', this.ionViewWillEnterHandler.bind(this));\n this.ionRouterOutlet.removeEventListener('ionViewDidEnter', this.ionViewDidEnterHandler.bind(this));\n this.ionRouterOutlet.removeEventListener('ionViewWillLeave', this.ionViewWillLeaveHandler.bind(this));\n this.ionRouterOutlet.removeEventListener('ionViewDidLeave', this.ionViewDidLeaveHandler.bind(this));\n }\n }\n ionViewWillEnterHandler() {\n this.ionLifeCycleContext.ionViewWillEnter();\n }\n ionViewDidEnterHandler() {\n this.ionLifeCycleContext.ionViewDidEnter();\n }\n ionViewWillLeaveHandler() {\n this.ionLifeCycleContext.ionViewWillLeave();\n }\n ionViewDidLeaveHandler() {\n this.ionLifeCycleContext.ionViewDidLeave();\n }\n render() {\n const _a = this.props, { StackManager, children, routeInfo } = _a, props = __rest(_a, [\"StackManager\", \"children\", \"routeInfo\"]);\n return (React.createElement(IonLifeCycleContext.Consumer, null, (context) => {\n this.ionLifeCycleContext = context;\n return (React.createElement(StackManager, { routeInfo: routeInfo },\n React.createElement(IonRouterOutletInner, Object.assign({ setRef: (val) => (this.ionRouterOutlet = val) }, props), children)));\n }));\n }\n static get contextType() {\n return StackContext;\n }\n}\n\nclass IonRouterOutletContainer extends React.Component {\n constructor(props) {\n super(props);\n }\n render() {\n const StackManager = this.context.getStackManager();\n const _a = this.props, { children, forwardedRef } = _a, props = __rest(_a, [\"children\", \"forwardedRef\"]);\n return this.context.hasIonicRouter() ? (props.ionPage ? (React.createElement(OutletPageManager, Object.assign({ StackManager: StackManager, routeInfo: this.context.routeInfo }, props), children)) : (React.createElement(StackManager, { routeInfo: this.context.routeInfo },\n React.createElement(IonRouterOutletInner, Object.assign({}, props, { forwardedRef: forwardedRef }), children)))) : (React.createElement(IonRouterOutletInner, Object.assign({ ref: forwardedRef }, this.props), this.props.children));\n }\n static get contextType() {\n return NavContext;\n }\n}\nconst IonRouterOutlet = createForwardRef(IonRouterOutletContainer, 'IonRouterOutlet');\n\nconst IonTabButton = /*@__PURE__*/ (() => class extends React.Component {\n constructor(props) {\n super(props);\n this.handleIonTabButtonClick = this.handleIonTabButtonClick.bind(this);\n }\n handleIonTabButtonClick() {\n if (this.props.onClick) {\n this.props.onClick(new CustomEvent('ionTabButtonClick', {\n detail: {\n tab: this.props.tab,\n href: this.props.href,\n routeOptions: this.props.routerOptions,\n },\n }));\n }\n }\n render() {\n /**\n * onClick is excluded from the props, since it has a custom\n * implementation within IonTabBar.tsx. Calling onClick within this\n * component would result in duplicate handler calls.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _a = this.props, rest = __rest(_a, [\"onClick\"]);\n return React.createElement(IonTabButtonInner, Object.assign({ onIonTabButtonClick: this.handleIonTabButtonClick }, rest));\n }\n static get displayName() {\n return 'IonTabButton';\n }\n})();\n\n// TODO(FW-2959): types\nclass IonTabBarUnwrapped extends React.PureComponent {\n constructor(props) {\n super(props);\n // eslint-disable-next-line\n this.setActiveTabOnContext = (_tab) => { };\n const tabs = {};\n React.Children.forEach(props.children, (child) => {\n var _a, _b, _c, _d;\n if (child != null &&\n typeof child === 'object' &&\n child.props &&\n (child.type === IonTabButton || child.type.isTabButton)) {\n tabs[child.props.tab] = {\n originalHref: child.props.href,\n currentHref: child.props.href,\n originalRouteOptions: child.props.href === ((_a = props.routeInfo) === null || _a === void 0 ? void 0 : _a.pathname) ? (_b = props.routeInfo) === null || _b === void 0 ? void 0 : _b.routeOptions : undefined,\n currentRouteOptions: child.props.href === ((_c = props.routeInfo) === null || _c === void 0 ? void 0 : _c.pathname) ? (_d = props.routeInfo) === null || _d === void 0 ? void 0 : _d.routeOptions : undefined,\n };\n }\n });\n this.state = {\n tabs,\n };\n this.onTabButtonClick = this.onTabButtonClick.bind(this);\n this.renderTabButton = this.renderTabButton.bind(this);\n this.setActiveTabOnContext = this.setActiveTabOnContext.bind(this);\n this.selectTab = this.selectTab.bind(this);\n }\n componentDidMount() {\n const tabs = this.state.tabs;\n const tabKeys = Object.keys(tabs);\n const activeTab = tabKeys.find((key) => {\n const href = tabs[key].originalHref;\n return this.props.routeInfo.pathname.startsWith(href);\n });\n if (activeTab) {\n this.setState({\n activeTab,\n });\n }\n }\n componentDidUpdate() {\n if (this.state.activeTab) {\n this.setActiveTabOnContext(this.state.activeTab);\n }\n }\n selectTab(tab) {\n const tabUrl = this.state.tabs[tab];\n if (tabUrl) {\n this.onTabButtonClick(new CustomEvent('ionTabButtonClick', {\n detail: {\n href: tabUrl.currentHref,\n tab,\n selected: tab === this.state.activeTab,\n routeOptions: undefined,\n },\n }));\n return true;\n }\n return false;\n }\n static getDerivedStateFromProps(props, state) {\n var _a, _b, _c;\n const tabs = Object.assign({}, state.tabs);\n const tabKeys = Object.keys(state.tabs);\n const activeTab = tabKeys.find((key) => {\n const href = state.tabs[key].originalHref;\n return props.routeInfo.pathname.startsWith(href);\n });\n // Check to see if the tab button href has changed, and if so, update it in the tabs state\n React.Children.forEach(props.children, (child) => {\n if (child != null &&\n typeof child === 'object' &&\n child.props &&\n (child.type === IonTabButton || child.type.isTabButton)) {\n const tab = tabs[child.props.tab];\n if (!tab || tab.originalHref !== child.props.href) {\n tabs[child.props.tab] = {\n originalHref: child.props.href,\n currentHref: child.props.href,\n originalRouteOptions: child.props.routeOptions,\n currentRouteOptions: child.props.routeOptions,\n };\n }\n }\n });\n const { activeTab: prevActiveTab } = state;\n if (activeTab && prevActiveTab) {\n const prevHref = state.tabs[prevActiveTab].currentHref;\n const prevRouteOptions = state.tabs[prevActiveTab].currentRouteOptions;\n if (activeTab !== prevActiveTab ||\n prevHref !== ((_a = props.routeInfo) === null || _a === void 0 ? void 0 : _a.pathname) ||\n prevRouteOptions !== ((_b = props.routeInfo) === null || _b === void 0 ? void 0 : _b.routeOptions)) {\n tabs[activeTab] = {\n originalHref: tabs[activeTab].originalHref,\n currentHref: props.routeInfo.pathname + (props.routeInfo.search || ''),\n originalRouteOptions: tabs[activeTab].originalRouteOptions,\n currentRouteOptions: (_c = props.routeInfo) === null || _c === void 0 ? void 0 : _c.routeOptions,\n };\n if (props.routeInfo.routeAction === 'pop' && activeTab !== prevActiveTab) {\n // If navigating back and the tabs change, set the prev tab back to its original href\n tabs[prevActiveTab] = {\n originalHref: tabs[prevActiveTab].originalHref,\n currentHref: tabs[prevActiveTab].originalHref,\n originalRouteOptions: tabs[prevActiveTab].originalRouteOptions,\n currentRouteOptions: tabs[prevActiveTab].currentRouteOptions,\n };\n }\n }\n }\n activeTab && props.onSetCurrentTab(activeTab, props.routeInfo);\n return {\n activeTab,\n tabs,\n };\n }\n onTabButtonClick(e, onClickFn) {\n const tappedTab = this.state.tabs[e.detail.tab];\n const originalHref = tappedTab.originalHref;\n const currentHref = e.detail.href;\n const { activeTab: prevActiveTab } = this.state;\n if (onClickFn) {\n /**\n * If the user provides an onClick function, we call it\n * with the original event.\n */\n onClickFn(e);\n }\n // this.props.onSetCurrentTab(e.detail.tab, this.props.routeInfo);\n // Clicking the current tab will bring you back to the original href\n if (prevActiveTab === e.detail.tab) {\n if (originalHref !== currentHref) {\n this.context.resetTab(e.detail.tab, originalHref, tappedTab.originalRouteOptions);\n }\n }\n else {\n if (this.props.onIonTabsWillChange) {\n this.props.onIonTabsWillChange(new CustomEvent('ionTabWillChange', { detail: { tab: e.detail.tab } }));\n }\n if (this.props.onIonTabsDidChange) {\n this.props.onIonTabsDidChange(new CustomEvent('ionTabDidChange', { detail: { tab: e.detail.tab } }));\n }\n this.setActiveTabOnContext(e.detail.tab);\n this.context.changeTab(e.detail.tab, currentHref, e.detail.routeOptions);\n }\n }\n renderTabButton(activeTab) {\n return (child) => {\n var _a, _b;\n if (child != null && child.props && (child.type === IonTabButton || child.type.isTabButton)) {\n const href = child.props.tab === activeTab\n ? (_a = this.props.routeInfo) === null || _a === void 0 ? void 0 : _a.pathname : this.state.tabs[child.props.tab].currentHref;\n const routeOptions = child.props.tab === activeTab\n ? (_b = this.props.routeInfo) === null || _b === void 0 ? void 0 : _b.routeOptions : this.state.tabs[child.props.tab].currentRouteOptions;\n return React.cloneElement(child, {\n href,\n routeOptions,\n onClick: (ev) => this.onTabButtonClick(ev, child.props.onClick),\n });\n }\n return null;\n };\n }\n render() {\n const { activeTab } = this.state;\n return (React.createElement(IonTabBarInner, Object.assign({}, this.props, { selectedTab: activeTab }), React.Children.map(this.props.children, this.renderTabButton(activeTab))));\n }\n static get contextType() {\n return NavContext;\n }\n}\nconst IonTabBarContainer = React.memo((_a) => {\n var { forwardedRef } = _a, props = __rest(_a, [\"forwardedRef\"]);\n const context = useContext(NavContext);\n return (React.createElement(IonTabBarUnwrapped, Object.assign({ ref: forwardedRef }, props, { routeInfo: props.routeInfo || context.routeInfo || { pathname: window.location.pathname }, onSetCurrentTab: context.setCurrentTab }), props.children));\n});\nconst IonTabBar = createForwardRef(IonTabBarContainer, 'IonTabBar');\n\nclass IonTabsElement extends HTMLElementSSR {\n constructor() {\n super();\n }\n}\n// TODO(FW-2959): types\nif (typeof window !== 'undefined' && window.customElements) {\n const element = window.customElements.get('ion-tabs');\n if (!element) {\n window.customElements.define('ion-tabs', IonTabsElement);\n }\n}\nconst hostStyles = {\n display: 'flex',\n position: 'absolute',\n top: '0',\n left: '0',\n right: '0',\n bottom: '0',\n flexDirection: 'column',\n width: '100%',\n height: '100%',\n contain: 'layout size style',\n};\nconst tabsInner = {\n position: 'relative',\n flex: 1,\n contain: 'layout size style',\n};\nconst IonTabs = /*@__PURE__*/ (() => class extends React.Component {\n constructor(props) {\n super(props);\n this.routerOutletRef = React.createRef();\n this.tabBarRef = React.createRef();\n this.ionTabContextState = {\n activeTab: undefined,\n selectTab: () => false,\n };\n }\n componentDidMount() {\n if (this.tabBarRef.current) {\n // Grab initial value\n this.ionTabContextState.activeTab = this.tabBarRef.current.state.activeTab;\n // Override method\n this.tabBarRef.current.setActiveTabOnContext = (tab) => {\n this.ionTabContextState.activeTab = tab;\n };\n this.ionTabContextState.selectTab = this.tabBarRef.current.selectTab;\n }\n }\n render() {\n let outlet;\n let tabBar;\n const _a = this.props, { className, onIonTabsDidChange, onIonTabsWillChange } = _a, props = __rest(_a, [\"className\", \"onIonTabsDidChange\", \"onIonTabsWillChange\"]);\n const children = typeof this.props.children === 'function'\n ? this.props.children(this.ionTabContextState)\n : this.props.children;\n React.Children.forEach(children, (child) => {\n // eslint-disable-next-line no-prototype-builtins\n if (child == null || typeof child !== 'object' || !child.hasOwnProperty('type')) {\n return;\n }\n if (child.type === IonRouterOutlet || child.type.isRouterOutlet) {\n outlet = React.cloneElement(child);\n }\n else if (child.type === Fragment && child.props.children[0].type === IonRouterOutlet) {\n outlet = child.props.children[0];\n }\n let childProps = {\n ref: this.tabBarRef,\n };\n /**\n * Only pass these props\n * down from IonTabs to IonTabBar\n * if they are defined, otherwise\n * if you have a handler set on\n * IonTabBar it will be overridden.\n */\n if (onIonTabsDidChange !== undefined) {\n childProps = Object.assign(Object.assign({}, childProps), { onIonTabsDidChange });\n }\n if (onIonTabsWillChange !== undefined) {\n childProps = Object.assign(Object.assign({}, childProps), { onIonTabsWillChange });\n }\n if (child.type === IonTabBar || child.type.isTabBar) {\n tabBar = React.cloneElement(child, childProps);\n }\n else if (child.type === Fragment &&\n (child.props.children[1].type === IonTabBar || child.props.children[1].type.isTabBar)) {\n tabBar = React.cloneElement(child.props.children[1], childProps);\n }\n });\n if (!outlet) {\n throw new Error('IonTabs must contain an IonRouterOutlet');\n }\n if (!tabBar) {\n throw new Error('IonTabs needs a IonTabBar');\n }\n return (React.createElement(IonTabsContext.Provider, { value: this.ionTabContextState }, this.context.hasIonicRouter() ? (React.createElement(PageManager, Object.assign({ className: className ? `${className}` : '', routeInfo: this.context.routeInfo }, props),\n React.createElement(\"ion-tabs\", { className: \"ion-tabs\", style: hostStyles },\n tabBar.props.slot === 'top' ? tabBar : null,\n React.createElement(\"div\", { style: tabsInner, className: \"tabs-inner\" }, outlet),\n tabBar.props.slot === 'bottom' ? tabBar : null))) : (React.createElement(\"div\", Object.assign({ className: className ? `${className}` : 'ion-tabs' }, props, { style: hostStyles }),\n tabBar.props.slot === 'top' ? tabBar : null,\n React.createElement(\"div\", { style: tabsInner, className: \"tabs-inner\" }, outlet),\n tabBar.props.slot === 'bottom' ? tabBar : null))));\n }\n static get contextType() {\n return NavContext;\n }\n})();\n\nconst IonBackButton = /*@__PURE__*/ (() => class extends React.Component {\n constructor() {\n super(...arguments);\n this.clickButton = (e) => {\n /**\n * If ion-back-button is being used inside\n * of ion-nav then we should not interact with\n * the router.\n */\n if (e.target && e.target.closest('ion-nav') !== null) {\n return;\n }\n const { defaultHref, routerAnimation } = this.props;\n if (this.context.hasIonicRouter()) {\n e.stopPropagation();\n this.context.goBack(defaultHref, routerAnimation);\n }\n else if (defaultHref !== undefined) {\n window.location.href = defaultHref;\n }\n };\n }\n render() {\n return React.createElement(IonBackButtonInner, Object.assign({ onClick: this.clickButton }, this.props));\n }\n static get displayName() {\n return 'IonBackButton';\n }\n static get contextType() {\n return NavContext;\n }\n})();\n\nclass IonIconContainer extends React.PureComponent {\n constructor(props) {\n super(props);\n if (this.props.name) {\n console.warn('In Ionic React, you import icons from \"ionicons/icons\" and set the icon you imported to the \"icon\" property. Setting the \"name\" property has no effect.');\n }\n }\n render() {\n var _a, _b;\n const _c = this.props, { icon, ios, md, mode } = _c, rest = __rest(_c, [\"icon\", \"ios\", \"md\", \"mode\"]);\n let iconToUse;\n const config = getConfig();\n const iconMode = mode || (config === null || config === void 0 ? void 0 : config.get('mode'));\n if (ios || md) {\n if (iconMode === 'ios') {\n iconToUse = (_a = ios !== null && ios !== void 0 ? ios : md) !== null && _a !== void 0 ? _a : icon;\n }\n else {\n iconToUse = (_b = md !== null && md !== void 0 ? md : ios) !== null && _b !== void 0 ? _b : icon;\n }\n }\n else {\n iconToUse = icon;\n }\n return (React.createElement(IonIconInner, Object.assign({ ref: this.props.forwardedRef, icon: iconToUse }, rest), this.props.children));\n }\n static get contextType() {\n return NavContext;\n }\n}\nconst IonIcon = createForwardRef(IonIconContainer, 'IonIcon');\n\nclass IonRoute extends React.PureComponent {\n render() {\n const IonRouteInner = this.context.getIonRoute();\n if (!this.context.hasIonicRouter() || !IonRoute) {\n console.error('You either do not have an Ionic Router package, or your router does not support using ');\n return null;\n }\n return React.createElement(IonRouteInner, Object.assign({}, this.props));\n }\n static get contextType() {\n return NavContext;\n }\n}\n\nclass IonRedirect extends React.PureComponent {\n render() {\n const IonRedirectInner = this.context.getIonRedirect();\n if (!this.context.hasIonicRouter() || !IonRedirect) {\n console.error('You either do not have an Ionic Router package, or your router does not support using ');\n return null;\n }\n return React.createElement(IonRedirectInner, Object.assign({}, this.props));\n }\n static get contextType() {\n return NavContext;\n }\n}\n\nconst IonRouterContext = React.createContext({\n routeInfo: undefined,\n push: () => {\n throw new Error('An Ionic Router is required for IonRouterContext');\n },\n back: () => {\n throw new Error('An Ionic Router is required for IonRouterContext');\n },\n canGoBack: () => {\n throw new Error('An Ionic Router is required for IonRouterContext');\n },\n nativeBack: () => {\n throw new Error('An Ionic Router is required for IonRouterContext');\n },\n});\n/**\n * A hook for more direct control over routing in an Ionic React application. Allows you to pass additional meta-data to the router before the call to the native router.\n */\nfunction useIonRouter() {\n const context = useContext(IonRouterContext);\n return useMemo(() => ({\n back: context.back,\n push: context.push,\n goBack: context.back,\n canGoBack: context.canGoBack,\n routeInfo: context.routeInfo,\n }), [context.back, context.push, context.canGoBack, context.routeInfo]);\n}\n\nclass CreateAnimation extends React.PureComponent {\n constructor(props) {\n super(props);\n this.nodes = new Map();\n this.animation = createAnimation(props.id);\n }\n setupAnimation(props) {\n const animation = this.animation;\n if (this.nodes.size > 0) {\n animation.addElement(Array.from(this.nodes.values()));\n }\n checkConfig(animation, props);\n checkPlayback(animation, props);\n }\n componentDidMount() {\n const props = this.props;\n this.setupAnimation(props);\n }\n componentDidUpdate(prevProps) {\n const animation = this.animation;\n const props = this.props;\n checkConfig(animation, props, prevProps);\n checkProgress(animation, props, prevProps);\n checkPlayback(animation, props, prevProps);\n }\n render() {\n const { children } = this.props;\n return (React.createElement(React.Fragment, null, React.Children.map(children, (child, id) => React.cloneElement(child, { ref: (el) => this.nodes.set(id, el) }))));\n }\n}\nconst checkConfig = (animation, currentProps = {}, prevProps = {}) => {\n const reservedProps = [\n 'children',\n 'progressStart',\n 'progressStep',\n 'progressEnd',\n 'pause',\n 'stop',\n 'destroy',\n 'play',\n 'from',\n 'to',\n 'fromTo',\n 'onFinish',\n ];\n for (const key in currentProps) {\n if (\n // eslint-disable-next-line no-prototype-builtins\n currentProps.hasOwnProperty(key) &&\n !reservedProps.includes(key) &&\n currentProps[key] !== prevProps[key]) {\n animation[key](currentProps[key]);\n }\n }\n const fromValues = currentProps.from;\n if (fromValues && fromValues !== prevProps.from) {\n const values = Array.isArray(fromValues) ? fromValues : [fromValues];\n values.forEach((val) => animation.from(val.property, val.value));\n }\n const toValues = currentProps.to;\n if (toValues && toValues !== prevProps.to) {\n const values = Array.isArray(toValues) ? toValues : [toValues];\n values.forEach((val) => animation.to(val.property, val.value));\n }\n const fromToValues = currentProps.fromTo;\n if (fromToValues && fromToValues !== prevProps.fromTo) {\n const values = Array.isArray(fromToValues) ? fromToValues : [fromToValues];\n values.forEach((val) => animation.fromTo(val.property, val.fromValue, val.toValue));\n }\n const onFinishValues = currentProps.onFinish;\n if (onFinishValues && onFinishValues !== prevProps.onFinish) {\n const values = Array.isArray(onFinishValues) ? onFinishValues : [onFinishValues];\n values.forEach((val) => animation.onFinish(val.callback, val.opts));\n }\n};\nconst checkProgress = (animation, currentProps = {}, prevProps = {}) => {\n var _a, _b, _c, _d, _e;\n const { progressStart, progressStep, progressEnd } = currentProps;\n if (progressStart &&\n (((_a = prevProps.progressStart) === null || _a === void 0 ? void 0 : _a.forceLinearEasing) !== (progressStart === null || progressStart === void 0 ? void 0 : progressStart.forceLinearEasing) ||\n ((_b = prevProps.progressStart) === null || _b === void 0 ? void 0 : _b.step) !== (progressStart === null || progressStart === void 0 ? void 0 : progressStart.step))) {\n animation.progressStart(progressStart.forceLinearEasing, progressStart.step);\n }\n if (progressStep && ((_c = prevProps.progressStep) === null || _c === void 0 ? void 0 : _c.step) !== (progressStep === null || progressStep === void 0 ? void 0 : progressStep.step)) {\n animation.progressStep(progressStep.step);\n }\n if (progressEnd &&\n (((_d = prevProps.progressEnd) === null || _d === void 0 ? void 0 : _d.playTo) !== (progressEnd === null || progressEnd === void 0 ? void 0 : progressEnd.playTo) ||\n ((_e = prevProps.progressEnd) === null || _e === void 0 ? void 0 : _e.step) !== (progressEnd === null || progressEnd === void 0 ? void 0 : progressEnd.step) ||\n (prevProps === null || prevProps === void 0 ? void 0 : prevProps.dur) !== (progressEnd === null || progressEnd === void 0 ? void 0 : progressEnd.dur))) {\n animation.progressEnd(progressEnd.playTo, progressEnd.step, progressEnd.dur);\n }\n};\nconst checkPlayback = (animation, currentProps = {}, prevProps = {}) => {\n if (!prevProps.play && currentProps.play) {\n animation.play();\n }\n if (!prevProps.pause && currentProps.pause) {\n animation.pause();\n }\n if (!prevProps.stop && currentProps.stop) {\n animation.stop();\n }\n if (!prevProps.destroy && currentProps.destroy) {\n animation.destroy();\n }\n};\n\nfunction useController(displayName, controller, defineCustomElement) {\n const overlayRef = useRef();\n const didDismissEventName = useMemo(() => `on${displayName}DidDismiss`, [displayName]);\n const didPresentEventName = useMemo(() => `on${displayName}DidPresent`, [displayName]);\n const willDismissEventName = useMemo(() => `on${displayName}WillDismiss`, [displayName]);\n const willPresentEventName = useMemo(() => `on${displayName}WillPresent`, [displayName]);\n defineCustomElement();\n const present = useCallback(async (options) => {\n if (overlayRef.current) {\n return;\n }\n const { onDidDismiss, onWillDismiss, onDidPresent, onWillPresent } = options, rest = __rest(options, [\"onDidDismiss\", \"onWillDismiss\", \"onDidPresent\", \"onWillPresent\"]);\n const handleDismiss = (event) => {\n if (onDidDismiss) {\n onDidDismiss(event);\n }\n overlayRef.current = undefined;\n };\n overlayRef.current = await controller.create(Object.assign({}, rest));\n attachProps(overlayRef.current, {\n [didDismissEventName]: handleDismiss,\n [didPresentEventName]: (e) => onDidPresent && onDidPresent(e),\n [willDismissEventName]: (e) => onWillDismiss && onWillDismiss(e),\n [willPresentEventName]: (e) => onWillPresent && onWillPresent(e),\n });\n overlayRef.current.present();\n }, [controller]);\n const dismiss = useCallback(async () => {\n overlayRef.current && (await overlayRef.current.dismiss());\n overlayRef.current = undefined;\n }, []);\n return {\n present,\n dismiss,\n };\n}\n\n/**\n * A hook for presenting/dismissing an IonActionSheet component\n * @returns Returns the present and dismiss methods in an array\n */\nfunction useIonActionSheet() {\n const controller = useController('IonActionSheet', actionSheetController$1, defineCustomElement$17);\n const present = useCallback((buttonsOrOptions, header) => {\n if (Array.isArray(buttonsOrOptions)) {\n return controller.present({\n buttons: buttonsOrOptions,\n header,\n });\n }\n else {\n return controller.present(buttonsOrOptions);\n }\n }, [controller.present]);\n return [present, controller.dismiss];\n}\n\n/**\n * A hook for presenting/dismissing an IonAlert component\n * @returns Returns the present and dismiss methods in an array\n */\nfunction useIonAlert() {\n const controller = useController('IonAlert', alertController, defineCustomElement$13);\n const present = useCallback((messageOrOptions, buttons) => {\n if (typeof messageOrOptions === 'string') {\n return controller.present({\n message: messageOrOptions,\n buttons: buttons !== null && buttons !== void 0 ? buttons : [{ text: 'Ok' }],\n });\n }\n else {\n return controller.present(messageOrOptions);\n }\n }, [controller.present]);\n return [present, controller.dismiss];\n}\n\n/**\n * A hook for presenting/dismissing an IonToast component\n * @returns Returns the present and dismiss methods in an array\n */\nfunction useIonToast() {\n const controller = useController('IonToast', toastController$1, defineCustomElement$15);\n const present = useCallback((messageOrOptions, duration) => {\n if (typeof messageOrOptions === 'string') {\n return controller.present({\n message: messageOrOptions,\n duration,\n });\n }\n else {\n return controller.present(messageOrOptions);\n }\n }, [controller.present]);\n return [present, controller.dismiss];\n}\n\nconst ids = { main: 0 };\nconst generateId = (type = 'main') => {\n var _a;\n const id = ((_a = ids[type]) !== null && _a !== void 0 ? _a : 0) + 1;\n ids[type] = id;\n return id.toString();\n};\n\nfunction useOverlay(displayName, controller, defineCustomElement, component, componentProps) {\n const overlayRef = useRef();\n const containerElRef = useRef();\n const didDismissEventName = useMemo(() => `on${displayName}DidDismiss`, [displayName]);\n const didPresentEventName = useMemo(() => `on${displayName}DidPresent`, [displayName]);\n const willDismissEventName = useMemo(() => `on${displayName}WillDismiss`, [displayName]);\n const willPresentEventName = useMemo(() => `on${displayName}WillPresent`, [displayName]);\n const [isOpen, setIsOpen] = useState(false);\n const ionContext = useContext(IonContext);\n const [overlayId] = useState(generateId('overlay'));\n defineCustomElement();\n useEffect(() => {\n if (isOpen && component && containerElRef.current) {\n if (React.isValidElement(component)) {\n ionContext.addOverlay(overlayId, component, containerElRef.current);\n }\n else {\n const element = createElement(component, componentProps);\n ionContext.addOverlay(overlayId, element, containerElRef.current);\n }\n }\n }, [component, containerElRef.current, isOpen, componentProps]);\n const present = useCallback(async (options) => {\n if (overlayRef.current) {\n return;\n }\n const { onDidDismiss, onWillDismiss, onDidPresent, onWillPresent } = options, rest = __rest(options, [\"onDidDismiss\", \"onWillDismiss\", \"onDidPresent\", \"onWillPresent\"]);\n if (typeof document !== 'undefined') {\n containerElRef.current = document.createElement('div');\n }\n overlayRef.current = await controller.create(Object.assign(Object.assign({}, rest), { component: containerElRef.current }));\n attachProps(overlayRef.current, {\n [didDismissEventName]: handleDismiss,\n [didPresentEventName]: (e) => onDidPresent && onDidPresent(e),\n [willDismissEventName]: (e) => onWillDismiss && onWillDismiss(e),\n [willPresentEventName]: (e) => onWillPresent && onWillPresent(e),\n });\n overlayRef.current.present();\n setIsOpen(true);\n function handleDismiss(event) {\n if (onDidDismiss) {\n onDidDismiss(event);\n }\n overlayRef.current = undefined;\n containerElRef.current = undefined;\n setIsOpen(false);\n ionContext.removeOverlay(overlayId);\n }\n }, []);\n const dismiss = useCallback(async (data, role) => {\n overlayRef.current && (await overlayRef.current.dismiss(data, role));\n overlayRef.current = undefined;\n containerElRef.current = undefined;\n }, []);\n return {\n present,\n dismiss,\n };\n}\n\n// TODO(FW-2959): types\n/**\n * A hook for presenting/dismissing an IonModal component\n * @param component The component that the modal will show. Can be a React Component, a functional component, or a JSX Element\n * @param componentProps The props that will be passed to the component, if required\n * @returns Returns the present and dismiss methods in an array\n */\nfunction useIonModal(component, componentProps) {\n const controller = useOverlay('IonModal', modalController, defineCustomElement$18, component, componentProps);\n const present = useCallback((options = {}) => {\n controller.present(options);\n }, [controller.present]);\n return [present, controller.dismiss];\n}\n\n// TODO(FW-2959): types\n/**\n * A hook for presenting/dismissing an IonPicker component\n * @param component The component that the popover will show. Can be a React Component, a functional component, or a JSX Element\n * @param componentProps The props that will be passed to the component, if required\n * @returns Returns the present and dismiss methods in an array\n */\nfunction useIonPopover(component, componentProps) {\n const controller = useOverlay('IonPopover', popoverController, defineCustomElement$19, component, componentProps);\n const present = useCallback((options = {}) => {\n controller.present(options);\n }, [controller.present]);\n return [present, controller.dismiss];\n}\n\n/**\n * A hook for presenting/dismissing an IonPicker component\n * @returns Returns the present and dismiss methods in an array\n */\nfunction useIonPicker() {\n const controller = useController('IonPicker', pickerController, defineCustomElement$16);\n const present = useCallback((columnsOrOptions, buttons) => {\n if (Array.isArray(columnsOrOptions)) {\n return controller.present({\n columns: columnsOrOptions,\n buttons: buttons !== null && buttons !== void 0 ? buttons : [{ text: 'Ok' }],\n });\n }\n else {\n return controller.present(columnsOrOptions);\n }\n }, [controller.present]);\n return [present, controller.dismiss];\n}\n\n/**\n * A hook for presenting/dismissing an IonLoading component\n * @returns Returns the present and dismiss methods in an array\n */\nfunction useIonLoading() {\n const controller = useController('IonLoading', loadingController, defineCustomElement$14);\n const present = useCallback((messageOrOptions = {}, duration, spinner) => {\n if (typeof messageOrOptions === 'string') {\n return controller.present({\n message: messageOrOptions,\n duration,\n spinner,\n });\n }\n else {\n return controller.present(messageOrOptions);\n }\n }, [controller.present]);\n return [present, controller.dismiss];\n}\n\nconst setupIonicReact = (config = {}) => {\n /**\n * By default Ionic Framework hides elements that\n * are not hydrated, but in the CE build there is no\n * hydration.\n * TODO FW-2797: Remove when all integrations have been\n * migrated to CE build.\n */\n if (typeof document !== 'undefined') {\n document.documentElement.classList.add('ion-ce');\n }\n initialize(Object.assign({}, config));\n};\n\n// TODO(FW-2959): types\nconst RouteManagerContext = /*@__PURE__*/ React.createContext({\n addViewItem: () => undefined,\n canGoBack: () => undefined,\n clearOutlet: () => undefined,\n createViewItem: () => undefined,\n findViewItemByPathname: () => undefined,\n findLeavingViewItemByRouteInfo: () => undefined,\n findViewItemByRouteInfo: () => undefined,\n getChildrenToRender: () => undefined,\n goBack: () => undefined,\n unMountViewItem: () => undefined,\n});\n\nclass ViewLifeCycleManager extends React.Component {\n constructor(props) {\n super(props);\n this.ionLifeCycleContext = new DefaultIonLifeCycleContext();\n this._isMounted = false;\n this.ionLifeCycleContext.onComponentCanBeDestroyed(() => {\n if (!this.props.mount) {\n if (this._isMounted) {\n this.setState({\n show: false,\n }, () => this.props.removeView());\n }\n }\n });\n this.state = {\n show: true,\n };\n }\n componentDidMount() {\n this._isMounted = true;\n }\n componentWillUnmount() {\n this._isMounted = false;\n }\n render() {\n const { show } = this.state;\n return (React.createElement(IonLifeCycleContext.Provider, { value: this.ionLifeCycleContext }, show && this.props.children));\n }\n}\n\n// const RESTRICT_SIZE = 100;\nclass LocationHistory {\n constructor() {\n this.locationHistory = [];\n this.tabHistory = {};\n }\n add(routeInfo) {\n if (routeInfo.routeAction === 'push' || routeInfo.routeAction == null) {\n this._add(routeInfo);\n }\n else if (routeInfo.routeAction === 'pop') {\n this._pop(routeInfo);\n }\n else if (routeInfo.routeAction === 'replace') {\n this._replace(routeInfo);\n }\n if (routeInfo.routeDirection === 'root') {\n this._clear();\n this._add(routeInfo);\n }\n }\n clearTabStack(tab) {\n const routeInfos = this._getRouteInfosByKey(tab);\n if (routeInfos) {\n routeInfos.forEach((ri) => {\n this.locationHistory = this.locationHistory.filter((x) => x.id !== ri.id);\n });\n this.tabHistory[tab] = [];\n }\n }\n update(routeInfo) {\n const locationIndex = this.locationHistory.findIndex((x) => x.id === routeInfo.id);\n if (locationIndex > -1) {\n this.locationHistory.splice(locationIndex, 1, routeInfo);\n }\n const tabArray = this.tabHistory[routeInfo.tab || ''];\n if (tabArray) {\n const tabIndex = tabArray.findIndex((x) => x.id === routeInfo.id);\n if (tabIndex > -1) {\n tabArray.splice(tabIndex, 1, routeInfo);\n }\n else {\n tabArray.push(routeInfo);\n }\n }\n else if (routeInfo.tab) {\n this.tabHistory[routeInfo.tab] = [routeInfo];\n }\n }\n _add(routeInfo) {\n const routeInfos = this._getRouteInfosByKey(routeInfo.tab);\n if (routeInfos) {\n // If the latest routeInfo is the same (going back and forth between tabs), replace it\n if (this._areRoutesEqual(routeInfos[routeInfos.length - 1], routeInfo)) {\n routeInfos.pop();\n }\n routeInfos.push(routeInfo);\n }\n this.locationHistory.push(routeInfo);\n }\n _areRoutesEqual(route1, route2) {\n if (!route1 || !route2) {\n return false;\n }\n return route1.pathname === route2.pathname && route1.search === route2.search;\n }\n _pop(routeInfo) {\n const routeInfos = this._getRouteInfosByKey(routeInfo.tab);\n if (routeInfos) {\n // Pop the previous route\n routeInfos.pop();\n // Replace the current route with an updated version\n routeInfos.pop();\n routeInfos.push(routeInfo);\n }\n // Pop the previous route\n this.locationHistory.pop();\n // Replace the current route with an updated version\n this.locationHistory.pop();\n this.locationHistory.push(routeInfo);\n }\n _replace(routeInfo) {\n const routeInfos = this._getRouteInfosByKey(routeInfo.tab);\n routeInfos && routeInfos.pop();\n this.locationHistory.pop();\n this._add(routeInfo);\n }\n _clear() {\n const keys = Object.keys(this.tabHistory);\n keys.forEach((k) => (this.tabHistory[k] = []));\n this.locationHistory = [];\n }\n _getRouteInfosByKey(key) {\n let routeInfos;\n if (key) {\n routeInfos = this.tabHistory[key];\n if (!routeInfos) {\n routeInfos = this.tabHistory[key] = [];\n }\n }\n return routeInfos;\n }\n getFirstRouteInfoForTab(tab) {\n const routeInfos = this._getRouteInfosByKey(tab);\n if (routeInfos) {\n return routeInfos[0];\n }\n return undefined;\n }\n getCurrentRouteInfoForTab(tab) {\n const routeInfos = this._getRouteInfosByKey(tab);\n if (routeInfos) {\n return routeInfos[routeInfos.length - 1];\n }\n return undefined;\n }\n findLastLocation(routeInfo) {\n const routeInfos = this._getRouteInfosByKey(routeInfo.tab);\n if (routeInfos) {\n for (let i = routeInfos.length - 2; i >= 0; i--) {\n const ri = routeInfos[i];\n if (ri) {\n if (ri.pathname === routeInfo.pushedByRoute) {\n return ri;\n }\n }\n }\n }\n for (let i = this.locationHistory.length - 2; i >= 0; i--) {\n const ri = this.locationHistory[i];\n if (ri) {\n if (ri.pathname === routeInfo.pushedByRoute) {\n return ri;\n }\n }\n }\n return undefined;\n }\n previous() {\n return (this.locationHistory[this.locationHistory.length - 2] || this.locationHistory[this.locationHistory.length - 1]);\n }\n current() {\n return this.locationHistory[this.locationHistory.length - 1];\n }\n canGoBack() {\n return this.locationHistory.length > 1;\n }\n}\n\nclass NavManager extends React.PureComponent {\n constructor(props) {\n super(props);\n this.ionRouterContextValue = {\n push: (pathname, routerDirection, routeAction, routerOptions, animationBuilder) => {\n this.navigate(pathname, routerDirection, routeAction, animationBuilder, routerOptions);\n },\n back: (animationBuilder) => {\n this.goBack(undefined, animationBuilder);\n },\n canGoBack: () => this.props.locationHistory.canGoBack(),\n nativeBack: () => this.props.onNativeBack(),\n routeInfo: this.props.routeInfo,\n };\n this.state = {\n goBack: this.goBack.bind(this),\n hasIonicRouter: () => true,\n navigate: this.navigate.bind(this),\n getIonRedirect: this.getIonRedirect.bind(this),\n getIonRoute: this.getIonRoute.bind(this),\n getStackManager: this.getStackManager.bind(this),\n getPageManager: this.getPageManager.bind(this),\n routeInfo: this.props.routeInfo,\n setCurrentTab: this.props.onSetCurrentTab,\n changeTab: this.props.onChangeTab,\n resetTab: this.props.onResetTab,\n };\n }\n componentDidMount() {\n if (typeof document !== 'undefined') {\n this.handleHardwareBackButton = this.handleHardwareBackButton.bind(this);\n document.addEventListener('ionBackButton', this.handleHardwareBackButton);\n }\n }\n componentWillUnmount() {\n if (typeof document !== 'undefined') {\n document.removeEventListener('ionBackButton', this.handleHardwareBackButton);\n }\n }\n handleHardwareBackButton(e) {\n e.detail.register(0, (processNextHandler) => {\n this.nativeGoBack();\n processNextHandler();\n });\n }\n goBack(route, animationBuilder) {\n this.props.onNavigateBack(route, animationBuilder);\n }\n nativeGoBack() {\n this.props.onNativeBack();\n }\n navigate(path, direction = 'forward', action = 'push', animationBuilder, options, tab) {\n this.props.onNavigate(path, action, direction, animationBuilder, options, tab);\n }\n getPageManager() {\n return PageManager;\n }\n getIonRedirect() {\n return this.props.ionRedirect;\n }\n getIonRoute() {\n return this.props.ionRoute;\n }\n getStackManager() {\n return this.props.stackManager;\n }\n render() {\n return (React.createElement(NavContext.Provider, { value: Object.assign(Object.assign({}, this.state), { routeInfo: this.props.routeInfo }) },\n React.createElement(IonRouterContext.Provider, { value: Object.assign(Object.assign({}, this.ionRouterContextValue), { routeInfo: this.props.routeInfo }) }, this.props.children)));\n }\n}\n\nclass ViewStacks {\n constructor() {\n this.viewStacks = {};\n this.add = this.add.bind(this);\n this.clear = this.clear.bind(this);\n this.getViewItemsForOutlet = this.getViewItemsForOutlet.bind(this);\n this.remove = this.remove.bind(this);\n }\n add(viewItem) {\n const { outletId } = viewItem;\n if (!this.viewStacks[outletId]) {\n this.viewStacks[outletId] = [viewItem];\n }\n else {\n this.viewStacks[outletId].push(viewItem);\n }\n }\n clear(outletId) {\n // Give some time for the leaving views to transition before removing\n return setTimeout(() => {\n delete this.viewStacks[outletId];\n }, 500);\n }\n getViewItemsForOutlet(outletId) {\n return this.viewStacks[outletId] || [];\n }\n remove(viewItem) {\n const { outletId } = viewItem;\n const viewStack = this.viewStacks[outletId];\n if (viewStack) {\n const viewItemToRemove = viewStack.find((x) => x.id === viewItem.id);\n if (viewItemToRemove) {\n viewItemToRemove.mount = false;\n this.viewStacks[outletId] = viewStack.filter((x) => x.id !== viewItemToRemove.id);\n }\n }\n }\n getStackIds() {\n return Object.keys(this.viewStacks);\n }\n getAllViewItems() {\n const keys = this.getStackIds();\n const viewItems = [];\n keys.forEach((k) => {\n viewItems.push(...this.viewStacks[k]);\n });\n return viewItems;\n }\n}\n\nexport { CreateAnimation, DefaultIonLifeCycleContext, IonAccordion, IonAccordionGroup, IonActionSheet, IonAlert, IonApp, IonAvatar, IonBackButton, IonBackdrop, IonBadge, IonBreadcrumb, IonBreadcrumbs, IonButton, IonButtons, IonCard, IonCardContent, IonCardHeader, IonCardSubtitle, IonCardTitle, IonCheckbox, IonChip, IonCol, IonContent, IonDatetime, IonDatetimeButton, IonFab, IonFabButton, IonFabList, IonFooter, IonGrid, IonHeader, IonIcon, IonImg, IonInfiniteScroll, IonInfiniteScrollContent, IonInput, IonItem, IonItemDivider, IonItemGroup, IonItemOption, IonItemOptions, IonItemSliding, IonLabel, IonLifeCycleContext, IonList, IonListHeader, IonLoading, IonMenu, IonMenuButton, IonMenuToggle, IonModal, IonNav, IonNavLink, IonNote, IonPage, IonPicker, IonPopover, IonProgressBar, IonRadio, IonRadioGroup, IonRange, IonRedirect, IonRefresher, IonRefresherContent, IonReorder, IonReorderGroup, IonRippleEffect, IonRoute, IonRouterContext, IonRouterLink, IonRouterOutlet, IonRow, IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption, IonSkeletonText, IonSlide, IonSlides, IonSpinner, IonSplitPane, IonTab, IonTabBar, IonTabButton, IonTabs, IonTabsContext, IonText, IonTextarea, IonThumbnail, IonTitle, IonToast, IonToggle, IonToolbar, IonVirtualScroll, LocationHistory, NavContext, NavManager, RouteManagerContext, StackContext, ViewLifeCycleManager, ViewStacks, generateId, getConfig, getPlatforms, isPlatform, setupIonicReact, useIonActionSheet, useIonAlert, useIonLoading, useIonModal, useIonPicker, useIonPopover, useIonRouter, useIonToast, useIonViewDidEnter, useIonViewDidLeave, useIonViewWillEnter, useIonViewWillLeave, withIonLifeCycle };\n//# sourceMappingURL=index.esm.js.map\n"],"names":["IonLifeCycleContext","onIonViewWillEnter","ionViewWillEnter","onIonViewDidEnter","ionViewDidEnter","onIonViewWillLeave","ionViewWillLeave","onIonViewDidLeave","ionViewDidLeave","useIonViewWillEnter","callback","deps","context","useContext","id","useRef","current","Math","floor","random","useEffect","useIonViewDidEnter","useIonViewWillLeave","NavContext","getIonRedirect","getIonRoute","getPageManager","getStackManager","goBack","route","window","location","pathname","history","back","navigate","path","hasIonicRouter","routeInfo","undefined","setCurrentTab","changeTab","_tab","resetTab","dashToPascalCase","str","toLowerCase","split","map","segment","charAt","toUpperCase","slice","join","camelToDashCase","replace","m","attachProps","node","newProps","oldProps","Element","className","getClassName","classList","Object","keys","forEach","name","indexOf","eventName","substring","eventNameLc","isCoveredByReact","syncEvent","setAttribute","newClassProp","class","oldClassProp","currentClasses","arrayToMap","incomingPropClasses","oldPropClasses","finalClassNames","currentClass","has","push","delete","s","eventNameSuffix","document","isSupported","element","createElement","newEventHandler","eventStore","__events","oldEventHandler","removeEventListener","addEventListener","e","call","this","arr","Map","set","setRef","ref","value","mergeRefs","refs","createReactComponent","tagName","ReactComponentContext","manipulatePropsFunction","defineCustomElement","displayName","ReactComponent","constructor","props","super","setComponentElRef","componentEl","componentDidMount","componentDidUpdate","prevProps","render","_a","children","forwardedRef","style","cProps","propsToPass","reduce","acc","assign","contextType","forwardRef","createForwardRef$1","IonAvatar","IonContent","IonFooter","IonHeader","IonImg","IonInput","IonLabel","IonText","IonTitle","createForwardRef","isPlatform","platform","getPlatforms","g","getConfig","Ionic","config","createRoutingComponent","customElement","customElements","get","define","handleClick","routerLink","routerDirection","routerOptions","routerAnimation","preventDefault","stableMergedRefs","includes","href","onClick","oldClick","defaultPrevented","IonButton","IonItem","I","detachEvent","eventHandler","createInlineOverlayComponent","handleIonMount","setState","isOpen","handleWillPresent","evt","onWillPresent","handleDidDismiss","wrapper","wrapperRef","el","append","onDidDismiss","state","_b","_c","componentWillUnmount","remove","detachProps","keepContentsMounted","display","flexDirection","height","IonModal","IonContext","addOverlay","removeOverlay","IonOverlayManager","onAddOverlay","onRemoveOverlay","overlays","setOverlays","useState","overlaysRef","component","containerElement","newOverlays","overlayKeys","key","overlay","IonTabButtonInner","IonTabBarInner","IonRouterOutletInner","IonAppInner","IonIconInner","IonApp","ionContext","addOverlayCallback","removeOverlayCallback","Provider","StackContext","registerIonPage","isInOutlet","PageManager","ionPageElementRef","add","ionViewWillEnterHandler","bind","ionViewDidEnterHandler","ionViewWillLeaveHandler","ionViewDidLeaveHandler","ionLifeCycleContext","Consumer","IonPageInternal","IonPage","IonNavInner","IonTabsContext","restOfProps","views","setViews","delegate","addView","removeView","refMap","WeakMap","attachViewToDom","async","parentElement","propsOrDataObj","cssClasses","div","appendChild","componentWithProps","hostComponent","createPortal","Promise","resolve","removeViewFromDom","_container","ReactDelegate","view","filter","v","activeTab","selectTab","HTMLElementSSR","HTMLElement","OutletPageManager","outletIsReady","ionRouterOutlet","c","StackManager","val","IonRouterOutletContainer","ionPage","IonRouterOutlet","IonTabButton","handleIonTabButtonClick","CustomEvent","detail","tab","routeOptions","rest","onIonTabButtonClick","IonTabBarUnwrapped","setActiveTabOnContext","tabs","child","_d","type","isTabButton","originalHref","currentHref","originalRouteOptions","currentRouteOptions","onTabButtonClick","renderTabButton","find","startsWith","tabUrl","selected","static","prevActiveTab","prevHref","prevRouteOptions","search","routeAction","onSetCurrentTab","onClickFn","tappedTab","onIonTabsWillChange","onIonTabsDidChange","ev","selectedTab","IonTabBarContainer","IonTabBar","IonTabsElement","hostStyles","position","top","left","right","bottom","width","contain","tabsInner","flex","IonTabs","routerOutletRef","tabBarRef","ionTabContextState","outlet","tabBar","hasOwnProperty","isRouterOutlet","Fragment","childProps","isTabBar","Error","slot","IonIconContainer","console","warn","icon","ios","md","mode","iconToUse","iconMode","IonRoute","IonRouteInner","error","IonRedirect","IonRedirectInner","React","IonRouterContext","canGoBack","nativeBack","CreateAnimation","nodes","animation","setupAnimation","size","addElement","Array","from","values","checkConfig","checkPlayback","checkProgress","currentProps","reservedProps","fromValues","isArray","property","toValues","to","fromToValues","fromTo","fromValue","toValue","onFinishValues","onFinish","opts","_e","progressStart","progressStep","progressEnd","forceLinearEasing","step","playTo","dur","play","pause","stop","destroy","ids","main","generateId","toString","setupIonicReact","documentElement","i","RouteManagerContext","addViewItem","clearOutlet","createViewItem","findViewItemByPathname","findLeavingViewItemByRouteInfo","findViewItemByRouteInfo","getChildrenToRender","unMountViewItem","ViewLifeCycleManager","ionViewWillEnterCallbacks","ionViewDidEnterCallbacks","ionViewWillLeaveCallbacks","ionViewDidLeaveCallbacks","index","findIndex","x","cb","componentCanBeDestroyed","onComponentCanBeDestroyed","componentCanBeDestroyedCallback","_isMounted","mount","show","LocationHistory","locationHistory","tabHistory","_add","_pop","_replace","routeDirection","_clear","clearTabStack","routeInfos","_getRouteInfosByKey","ri","update","locationIndex","splice","tabArray","tabIndex","_areRoutesEqual","length","pop","route1","route2","k","getFirstRouteInfoForTab","getCurrentRouteInfoForTab","findLastLocation","pushedByRoute","previous","NavManager","ionRouterContextValue","animationBuilder","onNativeBack","onChangeTab","onResetTab","handleHardwareBackButton","register","processNextHandler","nativeGoBack","onNavigateBack","direction","action","options","onNavigate","ionRedirect","ionRoute","stackManager","ViewStacks","viewStacks","clear","getViewItemsForOutlet","viewItem","outletId","setTimeout","viewStack","viewItemToRemove","getStackIds","getAllViewItems","viewItems"],"sourceRoot":""}