"use strict";(self.webpackChunkIPTV=self.webpackChunkIPTV||[]).push([[3991],{3991:(q,O,h)=>{h.r(O),h.d(O,{startInputShims:()=>Q});var y=h(5861),T=h(6038),m=h(2674),K=h(2433);h(6447),h(7693);const P=new WeakMap,b=(t,e,s,n=0,o=!1)=>{P.has(t)!==s&&(s?H(t,e,n,o):k(t,e))},H=(t,e,s,n=!1)=>{const o=e.parentNode,r=e.cloneNode(!1);r.classList.add("cloned-input"),r.tabIndex=-1,n&&(r.disabled=!0),o.appendChild(r),P.set(t,r);const c="rtl"===t.ownerDocument.dir?9999:-9999;t.style.pointerEvents="none",e.style.transform=`translate3d(${c}px,${s}px,0) scale(0)`},k=(t,e)=>{const s=P.get(t);s&&(P.delete(t),s.remove()),t.style.pointerEvents="",e.style.transform=""},M="input, textarea, [no-blur], [contenteditable]",N="$ionPaddingTimer",C=(t,e,s)=>{const n=t[N];n&&clearTimeout(n),e>0?t.style.setProperty("--keyboard-offset",`${e}px`):t[N]=setTimeout(()=>{t.style.setProperty("--keyboard-offset","0px"),s&&s()},120)},U=(t,e,s)=>{t.addEventListener("focusout",()=>{e&&C(e,0,s)},{once:!0})};let g=0;const w="data-ionic-skip-scroll-assist",z=(t,e,s,n,o,r,a,c=!1)=>{const i=r&&(void 0===a||a.mode===K.a.None),S=function(){var u=(0,y.Z)(function*(){e.hasAttribute(w)?e.removeAttribute(w):X(t,e,s,n,o,i,c)});return function(){return u.apply(this,arguments)}}();return t.addEventListener("focusin",S,!0),()=>{t.removeEventListener("focusin",S,!0)}},B=t=>{document.activeElement!==t&&(t.setAttribute(w,"true"),t.focus())},X=function(){var t=(0,y.Z)(function*(e,s,n,o,r,a,c=!1){if(!n&&!o)return;const i=((t,e,s)=>{var n;return((t,e,s,n)=>{const o=t.top,r=t.bottom,a=e.top,i=a+15,u=Math.min(e.bottom,n-s)-50-r,v=i-o,l=Math.round(u<0?-u:v>0?-v:0),_=Math.min(l,o-a),A=Math.abs(_)/.3;return{scrollAmount:_,scrollDuration:Math.min(400,Math.max(150,A)),scrollPadding:s,inputSafeY:4-(o-i)}})((null!==(n=t.closest("ion-item,[ion-item]"))&&void 0!==n?n:t).getBoundingClientRect(),e.getBoundingClientRect(),s,t.ownerDocument.defaultView.innerHeight)})(e,n||o,r);if(n&&Math.abs(i.scrollAmount)<4)return B(s),void(a&&null!==n&&(C(n,g),U(s,n,()=>g=0)));if(b(e,s,!0,i.inputSafeY,c),B(s),(0,m.r)(()=>e.click()),a&&n&&(g=i.scrollPadding,C(n,g)),typeof window<"u"){let S;const u=function(){var l=(0,y.Z)(function*(){void 0!==S&&clearTimeout(S),window.removeEventListener("ionKeyboardDidShow",v),window.removeEventListener("ionKeyboardDidShow",u),n&&(yield(0,T.c)(n,0,i.scrollAmount,i.scrollDuration)),b(e,s,!1,i.inputSafeY),B(s),a&&U(s,n,()=>g=0)});return function(){return l.apply(this,arguments)}}(),v=()=>{window.removeEventListener("ionKeyboardDidShow",v),window.addEventListener("ionKeyboardDidShow",u)};if(n){const l=yield(0,T.g)(n);if(i.scrollAmount>l.scrollHeight-l.clientHeight-l.scrollTop)return"password"===s.type?(i.scrollAmount+=50,window.addEventListener("ionKeyboardDidShow",v)):window.addEventListener("ionKeyboardDidShow",u),void(S=setTimeout(u,1e3))}u()}});return function(s,n,o,r,a,c){return t.apply(this,arguments)}}(),Q=function(){var t=(0,y.Z)(function*(e,s){const n=document,o="ios"===s,r="android"===s,a=e.getNumber("keyboardHeight",290),c=e.getBoolean("scrollAssist",!0),i=e.getBoolean("hideCaretOnScroll",o),S=e.getBoolean("inputBlurring",o),u=e.getBoolean("scrollPadding",!0),v=Array.from(n.querySelectorAll("ion-input, ion-textarea")),l=new WeakMap,_=new WeakMap,W=yield K.K.getResizeMode(),A=function(){var f=(0,y.Z)(function*(d){yield new Promise(I=>(0,m.c)(d,I));const x=d.shadowRoot||d,L=x.querySelector("input")||x.querySelector("textarea"),D=(0,T.f)(d),j=D?null:d.closest("ion-footer");if(L){if(D&&i&&!l.has(d)){const I=((t,e,s)=>{if(!s||!e)return()=>{};const n=c=>{(t=>t===t.getRootNode().activeElement)(e)&&b(t,e,c)},o=()=>b(t,e,!1),r=()=>n(!0),a=()=>n(!1);return(0,m.a)(s,"ionScrollStart",r),(0,m.a)(s,"ionScrollEnd",a),e.addEventListener("blur",o),()=>{(0,m.b)(s,"ionScrollStart",r),(0,m.b)(s,"ionScrollEnd",a),e.removeEventListener("blur",o)}})(d,L,D);l.set(d,I)}if("date"!==L.type&&"datetime-local"!==L.type&&(D||j)&&c&&!_.has(d)){const I=z(d,L,D,j,a,u,W,r);_.set(d,I)}}});return function(x){return f.apply(this,arguments)}}();S&&(()=>{let t=!0,e=!1;const s=document;(0,m.a)(s,"ionScrollStart",()=>{e=!0}),s.addEventListener("focusin",()=>{t=!0},!0),s.addEventListener("touchend",a=>{if(e)return void(e=!1);const c=s.activeElement;if(!c||c.matches(M))return;const i=a.target;i!==c&&(i.matches(M)||i.closest(M)||(t=!1,setTimeout(()=>{t||c.blur()},50)))},!1)})();for(const f of v)A(f);n.addEventListener("ionInputDidLoad",f=>{A(f.detail)}),n.addEventListener("ionInputDidUnload",f=>{(f=>{if(i){const d=l.get(f);d&&d(),l.delete(f)}if(c){const d=_.get(f);d&&d(),_.delete(f)}})(f.detail)})});return function(s,n){return t.apply(this,arguments)}}()}}]);