"use strict";(self.webpackChunk_pixelpay_ui_core=self.webpackChunk_pixelpay_ui_core||[]).push([[9503],{"./dist/ui-stencil/p-a92d032f.entry.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{x_tooltip:()=>b});var _p_444192d7_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./dist/ui-stencil/p-444192d7.js"),_p_9c6e275c_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./dist/ui-stencil/p-9c6e275c.js"),_p_384ed661_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./dist/ui-stencil/p-384ed661.js");const c=["mouseenter","touchstart"],m=["mouseleave","blur","touchend"],b=class{constructor(o){(0,_p_444192d7_js__WEBPACK_IMPORTED_MODULE_0__.r)(this,o),this.content=void 0,this.align="top"}onPropChange(){b.activeElements.has(this.el)&&(this.hideHandler(),setTimeout((()=>{this.showHandler()}),10))}componentDidLoad(){this.tooltip=(0,_p_9c6e275c_js__WEBPACK_IMPORTED_MODULE_2__.h)(),c.forEach((t=>{this.el.addEventListener(t,this.showHandler.bind(this))})),m.forEach((t=>{this.el.addEventListener(t,this.hideHandler.bind(this))})),window.addEventListener("scroll",this.hideHandler,!0),window.addEventListener("resize",this.hideHandler,!0),document.addEventListener("visibilitychange",this.hideHandler,!0),document.addEventListener("touchmove",this.hideHandler,!0)}disconectedCallback(){this.hideHandler(),b.activeElements.delete(this.el),c.forEach((t=>{this.el.removeEventListener(t,this.showHandler)})),m.forEach((t=>{this.el.removeEventListener(t,this.hideHandler)})),window.removeEventListener("scroll",this.hideHandler,!0),window.removeEventListener("resize",this.hideHandler,!0),document.removeEventListener("visibilitychange",this.hideHandler,!0),document.removeEventListener("touchmove",this.hideHandler,!0)}showHandler(){b.activeElements.add(this.el),this.tooltip.setAttribute("data-show",""),this.tooltip.querySelector("span").innerHTML=(0,_p_9c6e275c_js__WEBPACK_IMPORTED_MODULE_2__.t)(this.content)||"";const t=this.tooltip.querySelector(".tooltip-arrow");(0,_p_384ed661_js__WEBPACK_IMPORTED_MODULE_1__.c)(this.el,this.tooltip,{placement:this.align,middleware:["auto"==this.align?(0,_p_384ed661_js__WEBPACK_IMPORTED_MODULE_1__.d)():(0,_p_384ed661_js__WEBPACK_IMPORTED_MODULE_1__.f)(),(0,_p_384ed661_js__WEBPACK_IMPORTED_MODULE_1__.s)({padding:10}),(0,_p_384ed661_js__WEBPACK_IMPORTED_MODULE_1__.o)(4),(0,_p_384ed661_js__WEBPACK_IMPORTED_MODULE_1__.e)({element:t})]}).then((({x:o,y:i,middlewareData:e,placement:s})=>{if(this.tooltip.style.left=`${o}px`,this.tooltip.style.top=`${i}px`,e.arrow){const{x:o,y:i}=e.arrow,a={top:"bottom",right:"left",bottom:"top",left:"right"}[s.split("-")[0]];Object.assign(t.style,{left:null!=o?`${o}px`:"",top:null!=i?`${i}px`:"",right:"",bottom:"",[a]:"-4px"})}}))}hideHandler(){b.activeElements.delete(this.el),0===b.activeElements.size&&this.tooltip&&(this.tooltip.setAttribute("data-show",""),this.tooltip.removeAttribute("data-show"),this.tooltip.querySelector("span").innerHTML="")}render(){return(0,_p_444192d7_js__WEBPACK_IMPORTED_MODULE_0__.h)(_p_444192d7_js__WEBPACK_IMPORTED_MODULE_0__.H,{key:"8acb5f55c7305bdc1985c6fa422b04719f68e6dd","aria-label":this.content})}get el(){return(0,_p_444192d7_js__WEBPACK_IMPORTED_MODULE_0__.g)(this)}static get watchers(){return{content:["onPropChange"],align:["onPropChange"]}}};b.activeElements=new Set,b.style='x-tooltip{display:inherit}x-tooltip-overlay{font-family:"Poppins", "Arial", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";background:var(--color-dark-tinted, #626262);color:var(--color-text-light, #FEFEFE);padding:4px 8px;font-size:0.9rem;border-radius:4px;display:none;-webkit-box-shadow:0 0 1em rgba(0, 0, 0, 0.2);box-shadow:0 0 1em rgba(0, 0, 0, 0.2);z-index:10000;position:absolute;text-align:inherit;top:0;left:0;width:-webkit-max-content;width:-moz-max-content;width:max-content}x-tooltip-overlay:empty{display:none}.is-dark-mode x-tooltip-overlay{background:var(--color-light-shade, #d8d8d8);color:var(--color-text, #4A4A4A)}x-tooltip-overlay[data-show]{display:block;-webkit-animation:0.4s fadeIn;animation:0.4s fadeIn}x-tooltip-overlay>p{margin:0px;font-family:"Poppins", "Arial", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"}x-tooltip-overlay .tooltip-arrow{position:absolute;background:var(--color-dark-tinted, #626262);width:8px;height:8px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.is-dark-mode x-tooltip-overlay .tooltip-arrow{background:var(--color-light-shade, #d8d8d8)}'}}]);