{"version":3,"names":["transitionEndAsync","el","expectedDuration","Promise","resolve","transitionEnd","callback","unRegTrans","animationTimeout","opts","passive","ANIMATION_FALLBACK_TIMEOUT","unregister","onTransitionEnd","ev","undefined","target","addEventListener","setTimeout","clearTimeout","removeEventListener","componentOnReady","then","resolvedEl","raf","hasLazyBuild","stencilEl","inheritAttributes","attributes","attributeObject","forEach","attr","hasAttribute","value","getAttribute","removeAttribute","ariaAttributes","inheritAriaAttributes","ignoreList","attributesToInherit","length","filter","includes","eventName","_a","window","win","config","Ionic","ael","get","_ael","rel","_rel","getElementRoot","fallback","shadowRoot","h","__zone_symbol__requestAnimationFrame","requestAnimationFrame","hasShadowDom","attachShadow","focusVisibleElement","focus","classList","contains","app","closest","setFocus","renderHiddenInput","always","container","name","disabled","input","querySelector","ownerDocument","createElement","type","add","appendChild","clamp","min","n","max","Math","assert","actual","reason","message","console","error","Error","pointerCoord","changedTouches","touch","x","clientX","y","clientY","pageX","pageY","isEndSide","side","isRTL","document","dir","debounceEvent","event","wait","original","_original","emit","debounce","bind","func","timer","args","shallowEqualStringMap","map1","map2","keys1","Object","keys","k1"],"sources":["node_modules/@ionic/core/dist/collection/utils/helpers.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nexport const transitionEndAsync = (el, expectedDuration = 0) => {\n return new Promise((resolve) => {\n transitionEnd(el, expectedDuration, resolve);\n });\n};\n/**\n * Allows developer to wait for a transition\n * to finish and fallback to a timer if the\n * transition is cancelled or otherwise\n * never finishes. Also see transitionEndAsync\n * which is an await-able version of this.\n */\nconst transitionEnd = (el, expectedDuration = 0, callback) => {\n let unRegTrans;\n let animationTimeout;\n const opts = { passive: true };\n const ANIMATION_FALLBACK_TIMEOUT = 500;\n const unregister = () => {\n if (unRegTrans) {\n unRegTrans();\n }\n };\n const onTransitionEnd = (ev) => {\n if (ev === undefined || el === ev.target) {\n unregister();\n callback(ev);\n }\n };\n if (el) {\n el.addEventListener('webkitTransitionEnd', onTransitionEnd, opts);\n el.addEventListener('transitionend', onTransitionEnd, opts);\n animationTimeout = setTimeout(onTransitionEnd, expectedDuration + ANIMATION_FALLBACK_TIMEOUT);\n unRegTrans = () => {\n if (animationTimeout !== undefined) {\n clearTimeout(animationTimeout);\n animationTimeout = undefined;\n }\n el.removeEventListener('webkitTransitionEnd', onTransitionEnd, opts);\n el.removeEventListener('transitionend', onTransitionEnd, opts);\n };\n }\n return unregister;\n};\n/**\n * Waits for a component to be ready for\n * both custom element and non-custom element builds.\n * If non-custom element build, el.componentOnReady\n * will be used.\n * For custom element builds, we wait a frame\n * so that the inner contents of the component\n * have a chance to render.\n *\n * Use this utility rather than calling\n * el.componentOnReady yourself.\n */\nexport const componentOnReady = (el, callback) => {\n if (el.componentOnReady) {\n // eslint-disable-next-line custom-rules/no-component-on-ready-method\n el.componentOnReady().then((resolvedEl) => callback(resolvedEl));\n }\n else {\n raf(() => callback(el));\n }\n};\n/**\n * This functions checks if a Stencil component is using\n * the lazy loaded build of Stencil. Returns `true` if\n * the component is lazy loaded. Returns `false` otherwise.\n */\nexport const hasLazyBuild = (stencilEl) => {\n return stencilEl.componentOnReady !== undefined;\n};\n/**\n * Elements inside of web components sometimes need to inherit global attributes\n * set on the host. For example, the inner input in `ion-input` should inherit\n * the `title` attribute that developers set directly on `ion-input`. This\n * helper function should be called in componentWillLoad and assigned to a variable\n * that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nexport const inheritAttributes = (el, attributes = []) => {\n const attributeObject = {};\n attributes.forEach((attr) => {\n if (el.hasAttribute(attr)) {\n const value = el.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = el.getAttribute(attr);\n }\n el.removeAttribute(attr);\n }\n });\n return attributeObject;\n};\n/**\n * List of available ARIA attributes + `role`.\n * Removed deprecated attributes.\n * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes\n */\nconst ariaAttributes = [\n 'role',\n 'aria-activedescendant',\n 'aria-atomic',\n 'aria-autocomplete',\n 'aria-braillelabel',\n 'aria-brailleroledescription',\n 'aria-busy',\n 'aria-checked',\n 'aria-colcount',\n 'aria-colindex',\n 'aria-colindextext',\n 'aria-colspan',\n 'aria-controls',\n 'aria-current',\n 'aria-describedby',\n 'aria-description',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-flowto',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-level',\n 'aria-live',\n 'aria-multiline',\n 'aria-multiselectable',\n 'aria-orientation',\n 'aria-owns',\n 'aria-placeholder',\n 'aria-posinset',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-relevant',\n 'aria-required',\n 'aria-roledescription',\n 'aria-rowcount',\n 'aria-rowindex',\n 'aria-rowindextext',\n 'aria-rowspan',\n 'aria-selected',\n 'aria-setsize',\n 'aria-sort',\n 'aria-valuemax',\n 'aria-valuemin',\n 'aria-valuenow',\n 'aria-valuetext',\n];\n/**\n * Returns an array of aria attributes that should be copied from\n * the shadow host element to a target within the light DOM.\n * @param el The element that the attributes should be copied from.\n * @param ignoreList The list of aria-attributes to ignore reflecting and removing from the host.\n * Use this in instances where we manually specify aria attributes on the `` element.\n */\nexport const inheritAriaAttributes = (el, ignoreList) => {\n let attributesToInherit = ariaAttributes;\n if (ignoreList && ignoreList.length > 0) {\n attributesToInherit = attributesToInherit.filter((attr) => !ignoreList.includes(attr));\n }\n return inheritAttributes(el, attributesToInherit);\n};\nexport const addEventListener = (el, eventName, callback, opts) => {\n var _a;\n if (typeof window !== 'undefined') {\n const win = window;\n const config = (_a = win === null || win === void 0 ? void 0 : win.Ionic) === null || _a === void 0 ? void 0 : _a.config;\n if (config) {\n const ael = config.get('_ael');\n if (ael) {\n return ael(el, eventName, callback, opts);\n }\n else if (config._ael) {\n return config._ael(el, eventName, callback, opts);\n }\n }\n }\n return el.addEventListener(eventName, callback, opts);\n};\nexport const removeEventListener = (el, eventName, callback, opts) => {\n var _a;\n if (typeof window !== 'undefined') {\n const win = window;\n const config = (_a = win === null || win === void 0 ? void 0 : win.Ionic) === null || _a === void 0 ? void 0 : _a.config;\n if (config) {\n const rel = config.get('_rel');\n if (rel) {\n return rel(el, eventName, callback, opts);\n }\n else if (config._rel) {\n return config._rel(el, eventName, callback, opts);\n }\n }\n }\n return el.removeEventListener(eventName, callback, opts);\n};\n/**\n * Gets the root context of a shadow dom element\n * On newer browsers this will be the shadowRoot,\n * but for older browser this may just be the\n * element itself.\n *\n * Useful for whenever you need to explicitly\n * do \"myElement.shadowRoot!.querySelector(...)\".\n */\nexport const getElementRoot = (el, fallback = el) => {\n return el.shadowRoot || fallback;\n};\n/**\n * Patched version of requestAnimationFrame that avoids ngzone\n * Use only when you know ngzone should not run\n */\nexport const raf = (h) => {\n if (typeof __zone_symbol__requestAnimationFrame === 'function') {\n return __zone_symbol__requestAnimationFrame(h);\n }\n if (typeof requestAnimationFrame === 'function') {\n return requestAnimationFrame(h);\n }\n return setTimeout(h);\n};\nexport const hasShadowDom = (el) => {\n return !!el.shadowRoot && !!el.attachShadow;\n};\nexport const focusVisibleElement = (el) => {\n el.focus();\n /**\n * When programmatically focusing an element,\n * the focus-visible utility will not run because\n * it is expecting a keyboard event to have triggered this;\n * however, there are times when we need to manually control\n * this behavior so we call the `setFocus` method on ion-app\n * which will let us explicitly set the elements to focus.\n */\n if (el.classList.contains('ion-focusable')) {\n const app = el.closest('ion-app');\n if (app) {\n app.setFocus([el]);\n }\n }\n};\n/**\n * This method is used to add a hidden input to a host element that contains\n * a Shadow DOM. It does not add the input inside of the Shadow root which\n * allows it to be picked up inside of forms. It should contain the same\n * values as the host element.\n *\n * @param always Add a hidden input even if the container does not use Shadow\n * @param container The element where the input will be added\n * @param name The name of the input\n * @param value The value of the input\n * @param disabled If true, the input is disabled\n */\nexport const renderHiddenInput = (always, container, name, value, disabled) => {\n if (always || hasShadowDom(container)) {\n let input = container.querySelector('input.aux-input');\n if (!input) {\n input = container.ownerDocument.createElement('input');\n input.type = 'hidden';\n input.classList.add('aux-input');\n container.appendChild(input);\n }\n input.disabled = disabled;\n input.name = name;\n input.value = value || '';\n }\n};\nexport const clamp = (min, n, max) => {\n return Math.max(min, Math.min(n, max));\n};\nexport const assert = (actual, reason) => {\n if (!actual) {\n const message = 'ASSERT: ' + reason;\n console.error(message);\n debugger; // eslint-disable-line\n throw new Error(message);\n }\n};\nexport const now = (ev) => {\n return ev.timeStamp || Date.now();\n};\nexport const pointerCoord = (ev) => {\n // get X coordinates for either a mouse click\n // or a touch depending on the given event\n if (ev) {\n const changedTouches = ev.changedTouches;\n if (changedTouches && changedTouches.length > 0) {\n const touch = changedTouches[0];\n return { x: touch.clientX, y: touch.clientY };\n }\n if (ev.pageX !== undefined) {\n return { x: ev.pageX, y: ev.pageY };\n }\n }\n return { x: 0, y: 0 };\n};\n/**\n * @hidden\n * Given a side, return if it should be on the end\n * based on the value of dir\n * @param side the side\n * @param isRTL whether the application dir is rtl\n */\nexport const isEndSide = (side) => {\n const isRTL = document.dir === 'rtl';\n switch (side) {\n case 'start':\n return isRTL;\n case 'end':\n return !isRTL;\n default:\n throw new Error(`\"${side}\" is not a valid value for [side]. Use \"start\" or \"end\" instead.`);\n }\n};\nexport const deferEvent = (event) => {\n return debounceEvent(event, 0);\n};\nexport const debounceEvent = (event, wait) => {\n const original = event._original || event;\n return {\n _original: event,\n emit: debounce(original.emit.bind(original), wait),\n };\n};\nexport const debounce = (func, wait = 0) => {\n let timer;\n return (...args) => {\n clearTimeout(timer);\n timer = setTimeout(func, wait, ...args);\n };\n};\n/**\n * Check whether the two string maps are shallow equal.\n *\n * undefined is treated as an empty map.\n *\n * @returns whether the keys are the same and the values are shallow equal.\n */\nexport const shallowEqualStringMap = (map1, map2) => {\n map1 !== null && map1 !== void 0 ? map1 : (map1 = {});\n map2 !== null && map2 !== void 0 ? map2 : (map2 = {});\n if (map1 === map2) {\n return true;\n }\n const keys1 = Object.keys(map1);\n if (keys1.length !== Object.keys(map2).length) {\n return false;\n }\n for (const k1 of keys1) {\n if (!(k1 in map2)) {\n return false;\n }\n if (map1[k1] !== map2[k1]) {\n return false;\n }\n }\n return true;\n};\n"],"mappings":";;;AAGY,MAACA,EAAqB,CAACC,EAAIC,EAAmB,IAC/C,IAAIC,SAASC,IAChBC,EAAcJ,EAAIC,EAAkBE,EAAQ,IAUpD,MAAMC,EAAgB,CAACJ,EAAIC,EAAmB,EAAGI,KAC7C,IAAIC,EACJ,IAAIC,EACJ,MAAMC,EAAO,CAAEC,QAAS,MACxB,MAAMC,EAA6B,IACnC,MAAMC,EAAa,KACf,GAAIL,EAAY,CACZA,GACZ,GAEI,MAAMM,EAAmBC,IACrB,GAAIA,IAAOC,WAAad,IAAOa,EAAGE,OAAQ,CACtCJ,IACAN,EAASQ,EACrB,GAEI,GAAIb,EAAI,CACJA,EAAGgB,iBAAiB,sBAAuBJ,EAAiBJ,GAC5DR,EAAGgB,iBAAiB,gBAAiBJ,EAAiBJ,GACtDD,EAAmBU,WAAWL,EAAiBX,EAAmBS,GAClEJ,EAAa,KACT,GAAIC,IAAqBO,UAAW,CAChCI,aAAaX,GACbA,EAAmBO,SACnC,CACYd,EAAGmB,oBAAoB,sBAAuBP,EAAiBJ,GAC/DR,EAAGmB,oBAAoB,gBAAiBP,EAAiBJ,EAAK,CAE1E,CACI,OAAOG,CAAU,EAcT,MAACS,EAAmB,CAACpB,EAAIK,KACjC,GAAIL,EAAGoB,iBAAkB,CAErBpB,EAAGoB,mBAAmBC,MAAMC,GAAejB,EAASiB,IAC5D,KACS,CACDC,GAAI,IAAMlB,EAASL,IAC3B,GAOY,MAACwB,EAAgBC,GAClBA,EAAUL,mBAAqBN,UAY9B,MAACY,EAAoB,CAAC1B,EAAI2B,EAAa,MAC/C,MAAMC,EAAkB,GACxBD,EAAWE,SAASC,IAChB,GAAI9B,EAAG+B,aAAaD,GAAO,CACvB,MAAME,EAAQhC,EAAGiC,aA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