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IACP,MAAMC,IAAI,GAAGjD,4DAAU,CAAC,IAAD,CAAvB;IACA,OAAQN,qDAAC,CAACI,iDAAD,EAAO;MAAEoD,IAAI,EAAE,cAAR;MAAwBC,KAAK,EAAE;QAC3C,CAACF,IAAD,GAAQ,IADmC;QAE3C3B,SAAS,EAAE,KAAKA;MAF2B;IAA/B,CAAP,CAAT;EAID;;EACK,IAAFV,EAAE,GAAG;IAAE,OAAOhB,qDAAU,CAAC,IAAD,CAAjB;EAA0B;;AAvEZ,CAA3B;;AAyEA,MAAMmD,YAAY,GAAIK,MAAD,IAAY;EAC/BA,MAAM,CAACb,SAAP,CAAiBC,GAAjB,CAAqB,UAArB;EACAM,UAAU,CAAC,MAAM;IACfM,MAAM,CAACC,MAAP;EACD,CAFS,EAEP,GAFO,CAAV;AAGD,CALD;;AAMA,MAAM9B,OAAO,GAAG,EAAhB;AACA,MAAMG,oBAAoB,GAAG,GAA7B;AACAxB,YAAY,CAACuC,KAAb,GAAqBxC,eAArB","sources":["./node_modules/@ionic/core/dist/esm/ion-ripple-effect.entry.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { r as registerInstance, f as readTask, c as writeTask, h, i as getElement, H as Host } from './index-8e692445.js';\nimport { b as getIonMode } from './ionic-global-c95cf239.js';\n\nconst rippleEffectCss = \":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:strict;pointer-events:none}:host(.unbounded){contain:layout size style}.ripple-effect{border-radius:50%;position:absolute;background-color:currentColor;color:inherit;contain:strict;opacity:0;-webkit-animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;will-change:transform, opacity;pointer-events:none}.fade-out{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1));-webkit-animation:150ms fadeOutAnimation forwards;animation:150ms fadeOutAnimation forwards}@-webkit-keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@-webkit-keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:0.16}}@keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:0.16}}@-webkit-keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}@keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}\";\n\nconst RippleEffect = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n /**\n * Sets the type of ripple-effect:\n *\n * - `bounded`: the ripple effect expands from the user's click position\n * - `unbounded`: the ripple effect expands from the center of the button and overflows the container.\n *\n * NOTE: Surfaces for bounded ripples should have the overflow property set to hidden,\n * while surfaces for unbounded ripples should have it set to visible.\n */\n this.type = 'bounded';\n }\n /**\n * Adds the ripple effect to the parent element.\n *\n * @param x The horizontal coordinate of where the ripple should start.\n * @param y The vertical coordinate of where the ripple should start.\n */\n async addRipple(x, y) {\n return new Promise((resolve) => {\n readTask(() => {\n const rect = this.el.getBoundingClientRect();\n const width = rect.width;\n const height = rect.height;\n const hypotenuse = Math.sqrt(width * width + height * height);\n const maxDim = Math.max(height, width);\n const maxRadius = this.unbounded ? maxDim : hypotenuse + PADDING;\n const initialSize = Math.floor(maxDim * INITIAL_ORIGIN_SCALE);\n const finalScale = maxRadius / initialSize;\n let posX = x - rect.left;\n let posY = y - rect.top;\n if (this.unbounded) {\n posX = width * 0.5;\n posY = height * 0.5;\n }\n const styleX = posX - initialSize * 0.5;\n const styleY = posY - initialSize * 0.5;\n const moveX = width * 0.5 - posX;\n const moveY = height * 0.5 - posY;\n writeTask(() => {\n const div = document.createElement('div');\n div.classList.add('ripple-effect');\n const style = div.style;\n style.top = styleY + 'px';\n style.left = styleX + 'px';\n style.width = style.height = initialSize + 'px';\n style.setProperty('--final-scale', `${finalScale}`);\n style.setProperty('--translate-end', `${moveX}px, ${moveY}px`);\n const container = this.el.shadowRoot || this.el;\n container.appendChild(div);\n setTimeout(() => {\n resolve(() => {\n removeRipple(div);\n });\n }, 225 + 100);\n });\n });\n });\n }\n get unbounded() {\n return this.type === 'unbounded';\n }\n render() {\n const mode = getIonMode(this);\n return (h(Host, { role: \"presentation\", class: {\n [mode]: true,\n unbounded: this.unbounded,\n } }));\n }\n get el() { return getElement(this); }\n};\nconst removeRipple = (ripple) => {\n ripple.classList.add('fade-out');\n setTimeout(() => {\n ripple.remove();\n }, 200);\n};\nconst PADDING = 10;\nconst INITIAL_ORIGIN_SCALE = 0.5;\nRippleEffect.style = rippleEffectCss;\n\nexport { RippleEffect as ion_ripple_effect };\n"],"names":["r","registerInstance","f","readTask","c","writeTask","h","i","getElement","H","Host","b","getIonMode","rippleEffectCss","RippleEffect","constructor","hostRef","type","addRipple","x","y","Promise","resolve","rect","el","getBoundingClientRect","width","height","hypotenuse","Math","sqrt","maxDim","max","maxRadius","unbounded","PADDING","initialSize","floor","INITIAL_ORIGIN_SCALE","finalScale","posX","left","posY","top","styleX","styleY","moveX","moveY","div","document","createElement","classList","add","style","setProperty","container","shadowRoot","appendChild","setTimeout","removeRipple","render","mode","role","class","ripple","remove","ion_ripple_effect"],"sourceRoot":"webpack:///","x_google_ignoreList":[0]}