{"version":3,"sources":["webpack:///./node_modules/@ionic/core/dist/esm-es5/input-shims-a4fc53ac.js"],"names":["enableInputBlurring","onScroll","didScroll","onFocusin","focused","onTouchend","ev","active","doc","activeElement","matches","SKIP_SELECTOR","tapped","target","closest","setTimeout","blur","document","addEventListener","enableScrollAssist","componentEl","inputEl","contentEl","keyboardHeight","touchStart","coord","touchEnd","endCoord","hasPointerMoved","isFocused","preventDefault","stopPropagation","jsSetFocus","removeEventListener","enableScrollPadding","setScrollPadding","onFocusout","cloneMap","WeakMap","relocateInput","shouldRelocate","inputRelativeY","has","addClone","removeClone","input","getRootNode","parentEl","parentNode","clonedEl","cloneNode","classList","add","tabIndex","appendChild","set","tx","ownerDocument","dir","style","pointerEvents","transform","clone","get","delete","remove","SCROLL_ASSIST_SPEED","getScrollData","itemEl","calcScrollData","getBoundingClientRect","defaultView","innerHeight","inputRect","contentRect","platformHeight","inputTop","top","inputBottom","bottom","visibleAreaTop","safeAreaTop","distanceToBottom","Math","min","distanceToTop","desiredScrollAmount","round","scrollAmount","distance","abs","scrollDuration","max","scrollPadding","inputSafeY","scrollData","focus","scrollByPoint","then","threshold","startCoord","deltaX","x","deltaY","y","PADDING_TIMER_KEY","el","tagName","parentElement","timer","clearTimeout","setProperty","startInputShims","config","registerInput","scrollEl","scrollHideCaret","onBlur","hideCaret","showCaret","rmFn","shadowRoot","querySelector","hideCaretMap","shouldHideCaret","scrollAssist","scrollAssistMap","getNumber","getBoolean","inputBlurring","inputs","Array","from","querySelectorAll","_i","inputs_1","length","detail","fn"],"mappings":"+FAAA,qDAsE0B,SAAtBA,IAIe,SAAXC,IACAC,EAAY,EAChB,CACgB,SAAZC,IACAC,EAAU,EACd,CACiB,SAAbC,EAAuBC,GAEvB,IAIIC,EAJAL,EACAA,EAAY,GAIXK,EADDA,EAASC,EAAIC,gBAKbF,EAAOG,QAAQC,CAAa,IAI5BC,EAASN,EAAGO,UACDN,GAGXK,EAAOF,QAAQC,CAAa,GAAKC,EAAOE,QAA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AiB0F,EAAOc,UAAU,iBAAkB,GAAG,EACvDF,EAAeZ,EAAOe,WAAW,eAAgB,EAAI,EACrDV,EAAYL,EAAOe,WAAW,oBAAqB,EAAI,EACvDC,EAAgBhB,EAAOe,WAAW,gBAAiB,EAAI,EACvDnC,EAAgBoB,EAAOe,WAAW,gBAAiB,EAAI,EACvDE,EAASC,MAAMC,KAAK5H,EAAI6H,iBAAiB,yBAAyB,CAAC,EACnEV,EAAe,IAAIrF,QACnBwF,EAAkB,IAAIxF,QAgCtB2F,GACAjI,EAAoB,EAEpB6F,GACA3D,EAAoBX,CAAc,EAKtC,IAAK,IAAI+G,EAAK,EAAGC,EAAWL,EAAQI,EAAKC,EAASC,OAAQF,CAAE,GAAI,CAC5D,IAAIzF,EAAQ0F,EAASD,GACrBpB,EAAcrE,CAAK,CACvB,CACArC,EAAIU,iBAAiB,kBAAmB,SAAWZ,GAC/C4G,EAAc5G,EAAGmI,MAAM,CAC1B,CAAC,EACFjI,EAAIU,iBAAiB,oBAAqB,SAAWZ,GAhC/B,IASVoI,EAToBtH,EAiCZd,EAAGmI,OAhCfnB,KAEIoB,EADKf,EAAa5D,IAAI3C,CAAW,IAEjCsH,EAAG,EAEPf,EAAa3D,OAAO5C,CAAW,GAE/ByG,KAEIa,EADKZ,EAAgB/D,IAAI3C,CAAW,IAEpCsH,EAAG,EAEPZ,EAAgB9D,OAAO5C,CAAW,EAqBzC,CAAC,CACN,C","file":"js/chunk-2d0b1bd7.fc1b3895.js","sourcesContent":["import { p as pointerCoord } from './helpers-46f4a262.js';\nvar cloneMap = new WeakMap();\nvar relocateInput = function (componentEl, inputEl, shouldRelocate, inputRelativeY) {\n if (inputRelativeY === void 0) { inputRelativeY = 0; }\n if (cloneMap.has(componentEl) === shouldRelocate) {\n return;\n }\n if (shouldRelocate) {\n addClone(componentEl, inputEl, inputRelativeY);\n }\n else {\n removeClone(componentEl, inputEl);\n }\n};\nvar isFocused = function (input) {\n return input === input.getRootNode().activeElement;\n};\nvar addClone = function (componentEl, inputEl, inputRelativeY) {\n // this allows for the actual input to receive the focus from\n // the user's touch event, but before it receives focus, it\n // moves the actual input to a location that will not screw\n // up the app's layout, and does not allow the native browser\n // to attempt to scroll the input into place (messing up headers/footers)\n // the cloned input fills the area of where native input should be\n // while the native input fakes out the browser by relocating itself\n // before it receives the actual focus event\n // We hide the focused input (with the visible caret) invisible by making it scale(0),\n var parentEl = inputEl.parentNode;\n // DOM WRITES\n var clonedEl = inputEl.cloneNode(false);\n clonedEl.classList.add('cloned-input');\n clonedEl.tabIndex = -1;\n parentEl.appendChild(clonedEl);\n cloneMap.set(componentEl, clonedEl);\n var doc = componentEl.ownerDocument;\n var tx = doc.dir === 'rtl' ? 9999 : -9999;\n componentEl.style.pointerEvents = 'none';\n inputEl.style.transform = \"translate3d(\" + tx + \"px,\" + inputRelativeY + \"px,0) scale(0)\";\n};\nvar removeClone = function (componentEl, inputEl) {\n var clone = cloneMap.get(componentEl);\n if (clone) {\n cloneMap.delete(componentEl);\n clone.remove();\n }\n componentEl.style.pointerEvents = '';\n inputEl.style.transform = '';\n};\nvar enableHideCaretOnScroll = function (componentEl, inputEl, scrollEl) {\n if (!scrollEl || !inputEl) {\n return function () { return; };\n }\n var scrollHideCaret = function (shouldHideCaret) {\n if (isFocused(inputEl)) {\n relocateInput(componentEl, inputEl, shouldHideCaret);\n }\n };\n var onBlur = function () { return relocateInput(componentEl, inputEl, false); };\n var hideCaret = function () { return scrollHideCaret(true); };\n var showCaret = function () { return scrollHideCaret(false); };\n scrollEl.addEventListener('ionScrollStart', hideCaret);\n scrollEl.addEventListener('ionScrollEnd', showCaret);\n inputEl.addEventListener('blur', onBlur);\n return function () {\n scrollEl.removeEventListener('ionScrollStart', hideCaret);\n scrollEl.removeEventListener('ionScrollEnd', showCaret);\n inputEl.addEventListener('ionBlur', onBlur);\n };\n};\nvar SKIP_SELECTOR = 'input, textarea, [no-blur]';\nvar enableInputBlurring = function () {\n var focused = true;\n var didScroll = false;\n var doc = document;\n var onScroll = function () {\n didScroll = true;\n };\n var onFocusin = function () {\n focused = true;\n };\n var onTouchend = function (ev) {\n // if app did scroll return early\n if (didScroll) {\n didScroll = false;\n return;\n }\n var active = doc.activeElement;\n if (!active) {\n return;\n }\n // only blur if the active element is a text-input or a textarea\n if (active.matches(SKIP_SELECTOR)) {\n return;\n }\n // if the selected target is the active element, do not blur\n var tapped = ev.target;\n if (tapped === active) {\n return;\n }\n if (tapped.matches(SKIP_SELECTOR) || tapped.closest(SKIP_SELECTOR)) {\n return;\n }\n focused = false;\n // TODO: find a better way, why 50ms?\n setTimeout(function () {\n if (!focused) {\n active.blur();\n }\n }, 50);\n };\n doc.addEventListener('ionScrollStart', onScroll);\n doc.addEventListener('focusin', onFocusin, true);\n doc.addEventListener('touchend', onTouchend, false);\n return function () {\n doc.removeEventListener('ionScrollStart', onScroll, true);\n doc.removeEventListener('focusin', onFocusin, true);\n doc.removeEventListener('touchend', onTouchend, false);\n };\n};\nvar SCROLL_ASSIST_SPEED = 0.3;\nvar getScrollData = function (componentEl, contentEl, keyboardHeight) {\n var itemEl = componentEl.closest('ion-item,[ion-item]') || componentEl;\n return calcScrollData(itemEl.getBoundingClientRect(), contentEl.getBoundingClientRect(), keyboardHeight, componentEl.ownerDocument.defaultView.innerHeight);\n};\nvar calcScrollData = function (inputRect, contentRect, keyboardHeight, platformHeight) {\n // compute input's Y values relative to the body\n var inputTop = inputRect.top;\n var inputBottom = inputRect.bottom;\n // compute visible area\n var visibleAreaTop = contentRect.top;\n var visibleAreaBottom = Math.min(contentRect.bottom, platformHeight - keyboardHeight);\n // compute safe area\n var safeAreaTop = visibleAreaTop + 15;\n var safeAreaBottom = visibleAreaBottom * 0.5;\n // figure out if each edge of the input is within the safe area\n var distanceToBottom = safeAreaBottom - inputBottom;\n var distanceToTop = safeAreaTop - inputTop;\n // desiredScrollAmount is the negated distance to the safe area according to our calculations.\n var desiredScrollAmount = Math.round((distanceToBottom < 0)\n ? -distanceToBottom\n : (distanceToTop > 0)\n ? -distanceToTop\n : 0);\n // our calculations make some assumptions that aren't always true, like the keyboard being closed when an input\n // gets focus, so make sure we don't scroll the input above the visible area\n var scrollAmount = Math.min(desiredScrollAmount, inputTop - visibleAreaTop);\n var distance = Math.abs(scrollAmount);\n var duration = distance / SCROLL_ASSIST_SPEED;\n var scrollDuration = Math.min(400, Math.max(150, duration));\n return {\n scrollAmount: scrollAmount,\n scrollDuration: scrollDuration,\n scrollPadding: keyboardHeight,\n inputSafeY: -(inputTop - safeAreaTop) + 4\n };\n};\nvar enableScrollAssist = function (componentEl, inputEl, contentEl, keyboardHeight) {\n var coord;\n var touchStart = function (ev) {\n coord = pointerCoord(ev);\n };\n var touchEnd = function (ev) {\n // input cover touchend/mouseup\n if (!coord) {\n return;\n }\n // get where the touchend/mouseup ended\n var endCoord = pointerCoord(ev);\n // focus this input if the pointer hasn't moved XX pixels\n // and the input doesn't already have focus\n if (!hasPointerMoved(6, coord, endCoord) && !isFocused(inputEl)) {\n ev.preventDefault();\n ev.stopPropagation();\n // begin the input focus process\n jsSetFocus(componentEl, inputEl, contentEl, keyboardHeight);\n }\n };\n componentEl.addEventListener('touchstart', touchStart, true);\n componentEl.addEventListener('touchend', touchEnd, true);\n return function () {\n componentEl.removeEventListener('touchstart', touchStart, true);\n componentEl.removeEventListener('touchend', touchEnd, true);\n };\n};\nvar jsSetFocus = function (componentEl, inputEl, contentEl, keyboardHeight) {\n var scrollData = getScrollData(componentEl, contentEl, keyboardHeight);\n if (Math.abs(scrollData.scrollAmount) < 4) {\n // the text input is in a safe position that doesn't\n // require it to be scrolled into view, just set focus now\n inputEl.focus();\n return;\n }\n // temporarily move the focus to the focus holder so the browser\n // doesn't freak out while it's trying to get the input in place\n // at this point the native text input still does not have focus\n relocateInput(componentEl, inputEl, true, scrollData.inputSafeY);\n inputEl.focus();\n // scroll the input into place\n contentEl.scrollByPoint(0, scrollData.scrollAmount, scrollData.scrollDuration).then(function () {\n // the scroll view is in the correct position now\n // give the native text input focus\n relocateInput(componentEl, inputEl, false, scrollData.inputSafeY);\n // ensure this is the focused input\n inputEl.focus();\n });\n};\nvar hasPointerMoved = function (threshold, startCoord, endCoord) {\n if (startCoord && endCoord) {\n var deltaX = (startCoord.x - endCoord.x);\n var deltaY = (startCoord.y - endCoord.y);\n var distance = deltaX * deltaX + deltaY * deltaY;\n return distance > (threshold * threshold);\n }\n return false;\n};\nvar PADDING_TIMER_KEY = '$ionPaddingTimer';\nvar enableScrollPadding = function (keyboardHeight) {\n var doc = document;\n var onFocusin = function (ev) {\n setScrollPadding(ev.target, keyboardHeight);\n };\n var onFocusout = function (ev) {\n setScrollPadding(ev.target, 0);\n };\n doc.addEventListener('focusin', onFocusin);\n doc.addEventListener('focusout', onFocusout);\n return function () {\n doc.removeEventListener('focusin', onFocusin);\n doc.removeEventListener('focusout', onFocusout);\n };\n};\nvar setScrollPadding = function (input, keyboardHeight) {\n if (input.tagName !== 'INPUT') {\n return;\n }\n if (input.parentElement && input.parentElement.tagName === 'ION-INPUT') {\n return;\n }\n if (input.parentElement &&\n input.parentElement.parentElement &&\n input.parentElement.parentElement.tagName === 'ION-SEARCHBAR') {\n return;\n }\n var el = input.closest('ion-content');\n if (el === null) {\n return;\n }\n var timer = el[PADDING_TIMER_KEY];\n if (timer) {\n clearTimeout(timer);\n }\n if (keyboardHeight > 0) {\n el.style.setProperty('--keyboard-offset', keyboardHeight + \"px\");\n }\n else {\n el[PADDING_TIMER_KEY] = setTimeout(function () {\n el.style.setProperty('--keyboard-offset', '0px');\n }, 120);\n }\n};\nvar INPUT_BLURRING = true;\nvar SCROLL_PADDING = true;\nvar startInputShims = function (config) {\n var doc = document;\n var keyboardHeight = config.getNumber('keyboardHeight', 290);\n var scrollAssist = config.getBoolean('scrollAssist', true);\n var hideCaret = config.getBoolean('hideCaretOnScroll', true);\n var inputBlurring = config.getBoolean('inputBlurring', true);\n var scrollPadding = config.getBoolean('scrollPadding', true);\n var inputs = Array.from(doc.querySelectorAll('ion-input, ion-textarea'));\n var hideCaretMap = new WeakMap();\n var scrollAssistMap = new WeakMap();\n var registerInput = function (componentEl) {\n var inputEl = (componentEl.shadowRoot || componentEl).querySelector('input') || (componentEl.shadowRoot || componentEl).querySelector('textarea');\n var scrollEl = componentEl.closest('ion-content');\n if (!inputEl) {\n return;\n }\n if (!!scrollEl && hideCaret && !hideCaretMap.has(componentEl)) {\n var rmFn = enableHideCaretOnScroll(componentEl, inputEl, scrollEl);\n hideCaretMap.set(componentEl, rmFn);\n }\n if (!!scrollEl && scrollAssist && !scrollAssistMap.has(componentEl)) {\n var rmFn = enableScrollAssist(componentEl, inputEl, scrollEl, keyboardHeight);\n scrollAssistMap.set(componentEl, rmFn);\n }\n };\n var unregisterInput = function (componentEl) {\n if (hideCaret) {\n var fn = hideCaretMap.get(componentEl);\n if (fn) {\n fn();\n }\n hideCaretMap.delete(componentEl);\n }\n if (scrollAssist) {\n var fn = scrollAssistMap.get(componentEl);\n if (fn) {\n fn();\n }\n scrollAssistMap.delete(componentEl);\n }\n };\n if (inputBlurring && INPUT_BLURRING) {\n enableInputBlurring();\n }\n if (scrollPadding && SCROLL_PADDING) {\n enableScrollPadding(keyboardHeight);\n }\n // Input might be already loaded in the DOM before ion-device-hacks did.\n // At this point we need to look for all of the inputs not registered yet\n // and register them.\n for (var _i = 0, inputs_1 = inputs; _i < inputs_1.length; _i++) {\n var input = inputs_1[_i];\n registerInput(input);\n }\n doc.addEventListener('ionInputDidLoad', (function (ev) {\n registerInput(ev.detail);\n }));\n doc.addEventListener('ionInputDidUnload', (function (ev) {\n unregisterInput(ev.detail);\n }));\n};\nexport { startInputShims };\n"],"sourceRoot":""}