mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
1 line
5.7 KiB
JavaScript
1 line
5.7 KiB
JavaScript
|
|
!function(){function e(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(s){return void n(s)}u.done?t(c):Promise.resolve(c).then(r,o)}function t(t){return function(){var n=this,r=arguments;return new Promise(function(o,i){var a=t.apply(n,r);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)})}}(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[8780],{98780:function(e,n,r){"use strict";r.r(n),r.d(n,{startInputShims:function(){return f}});var o=r(13772),i=new WeakMap,a=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;i.has(e)!==n&&(n?c(e,t,r):s(e,t))},u=function(e){return e===e.getRootNode().activeElement},c=function(e,t,n){var r=t.parentNode,o=t.cloneNode(!1);o.classList.add("cloned-input"),o.tabIndex=-1,r.appendChild(o),i.set(e,o);var a="rtl"===e.ownerDocument.dir?9999:-9999;e.style.pointerEvents="none",t.style.transform="translate3d(".concat(a,"px,").concat(n,"px,0) scale(0)")},s=function(e,t){var n=i.get(e);n&&(i.delete(e),n.remove()),e.style.pointerEvents="",t.style.transform=""},l="input, textarea, [no-blur], [contenteditable]",d=function(e,t){if("INPUT"===e.tagName&&!(e.parentElement&&"ION-INPUT"===e.parentElement.tagName||e.parentElement&&e.parentElement.parentElement&&"ION-SEARCHBAR"===e.parentElement.parentElement.tagName)){var n=e.closest("ion-content");if(null!==n){var r=n.$ionPaddingTimer;r&&clearTimeout(r),t>0?n.style.setProperty("--keyboard-offset","".concat(t,"px")):n.$ionPaddingTimer=setTimeout(function(){n.style.setProperty("--keyboard-offset","0px")},120)}}},f=function(e){var n=document,r=e.getNumber("keyboardHeight",290),i=e.getBoolean("scrollAssist",!0),c=e.getBoolean("hideCaretOnScroll",!0),s=e.getBoolean("inputBlurring",!0),f=e.getBoolean("scrollPadding",!0),p=Array.from(n.querySelectorAll("ion-input, ion-textarea")),v=new WeakMap,m=new WeakMap,h=function(){var e=t(regeneratorRuntime.mark(function e(n){var s,l,d,f,p,h;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=n.componentOnReady,!e.t0){e.next=4;break}return e.next=4,n.componentOnReady();case 4:s=n.shadowRoot||n,l=s.querySelector("input")||s.querySelector("textarea"),d=n.closest("ion-content"),f=d?null:n.closest("ion-footer"),l&&(d&&c&&!v.has(n)&&(p=function(e,t,n){if(!n||!t)return function(){};var r=function(n){u(t)&&a(e,t,n)},i=function(){return a(e,t,!1)},c=function(){return r(!0)},s=function(){return r(!1)};return(0,o.a)(n,"ionScrollStart",c),(0,o.a)(n,"ionScrollEnd",s),t.addEventListener("blur",i),function(){(0,o.b)(n,"ionScrollStart",c),(0,o.b)(n,"ionScrollEnd",s),t.addEventListener("ionBlur",i)}}(n,l,d),v.set(n,p)),(d||f)&&i&&!m.has(n)&&(h=function(e,n,r,i,c){var s,l=function(e){s=(0,o.p)(e)},d=function(l){if(s){var d,f=(0,o.p)(l);(function(e,t,n){if(t&&n){var r=t.x-n.x,o=t.y-n.y;return r*r+o*o>36}return!1})(0,s,f)||u(n)||(l.stopPropagation(),(d=t(regeneratorRuntime.mark(function e(n,r,i,u,c){var s,l,d,f,p;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i||u){e.next=2;break}return e.abrupt("return");case 2:if(s=function(e,t,n){return function(e,t,n,r){var o=e.top,i=e.bottom,a=t.top,u=a+15,c=.75*Math.min(t.bottom,r-n)-i,s=u-o,l=Math.round(c<0?-c:s>0?-s:0),d=Math.min(l,o-a),f=Math.abs(d);return{scrollAmount:d,scrollDuration:Math.min(400,Math.max(150,f/.3)),scrollPadding:n,inputSafeY:4-(o-u)}}((e.closest("ion-item,[ion-item]")||e).getBoundingClientRect(),t.getBoundingClientRect(),n,e.ownerDocument.defaultView.innerHeight)}(n,i||u,c),!(i&&Math.abs(s.scrollAmount)<4)){e.next=7;break}r.focus(),e.next=16;break;case 7:if(a(n,r,!0,s.inputSafeY),r.focus(),(0,o.r)(function(){return n.click()}),"undefined"==typeof window){e.next=16;break}if(d=function(){var e=t(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==l&&clearTimeout(l),window.removeEventListener("ionKeyboardDidShow",f),window.removeEventListener("ionKeyboardDidShow",d),e.t0=i,!e.t0){e.next=7;break}return e.next=7,i.scrollByPoint(0,s.scrollAmount,s.scrol
|