Innovenergy_trunk/frontend/node_modules/testcafe/lib/client/ui/index.min.js

1 line
28 KiB
JavaScript
Raw Normal View History

window["%hammerhead%"].utils.removeInjectedScript(),function Ue(Me){var Ae=Me.document;!function(s,o,t){var e="default"in s?s.default:s,i="default"in o?o.default:o;t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var u={uiRoot:null,element:function(){return this.uiRoot||(this.uiRoot=Ae.createElement("div"),s.shadowUI.getRoot().appendChild(this.uiRoot)),this.uiRoot},hide:function(){this.uiRoot&&(this.uiRoot.style.visibility="hidden")},show:function(){this.uiRoot&&(this.uiRoot.style.visibility="")},remove:function(){var t=s.shadowUI.getRoot();s.nativeMethods.nodeParentNodeGetter.call(t).removeChild(t)}},h=e.shadowUI,c=e.utils.browser,a=e.utils.featureDetection,d=e.nativeMethods,p=e.eventSandbox.eventSimulator,m=e.eventSandbox.listeners,f=i.positionUtils,g=i.domUtils,v=i.styleUtils,y=i.eventUtils,C=i.arrayUtils,E=i.selectController,_="tcOptionList",r="disabled",w=c.isIE?30:20;function S(t){var e=d.eventTargetGetter.call(t),i=E.currentEl;(e||t.srcElement)===i||g.containsElement(i,e)||g.containsElement(E.optionList,e)||I()}function x(t,e,i){var n,s=d.eventTargetGetter.call(t),o=C.indexOf(E.options,s);o<0||(i(),(n=-1<s.className.indexOf(r))&&c.isWebKit||function(t,e){var i=E.currentEl,n=i.selectedIndex,s=i.getElementsByTagName("option")[t],o=!e&&t!==n;o&&!c.isIE&&(i.selectedIndex=t),c.isFirefox||c.isIE||!o||(p.input(i),p.change(i)),(c.isFirefox||c.isIE)&&p.mousedown(c.isFirefox?s:i),a.isTouchDevice||p.mouseup(c.isFirefox?s:i),(c.isFirefox||c.isIE)&&o&&(c.isIE&&(i.selectedIndex=t),c.isIE||p.input(i),p.change(i)),a.isTouchDevice||p.click(c.isFirefox||c.isIE?s:i),e||I()}(o,n))}function I(){g.remove(E.optionList),y.unbind(Ae,"mousedown",S),E.clear()}var n=Object.freeze({__proto__:null,expandOptionList:function(t){var e=t.children;if(e.length&&!t.disabled){if(E.currentEl){var i=t===E.currentEl;if(I(),i)return}var n=E.currentEl=t,s=E.optionList=Ae.createElement("div");u.element().appendChild(s),h.addClass(s,_),E.createChildren(e,s),m.addInternalEventBeforeListener(Me,["click"],x),d.setTimeout.call(Me,function(){y.bind(Ae,"mousedown",S)},0),v.set(s,{position:"absolute",fontSize:v.get(n,"fontSize"),fontFamily:v.get(n,"fontFamily"),minWidth:v.getWidth(n)+"px",left:f.getOffsetPosition(n).left+"px",height:g.getSelectVisibleChildren(t).length>w?v.getOptionHeight(t)*w:""});var o,a=f.getOffsetPosition(n).top,r=v.getHeight(s),l=a+v.getHeight(n)+2;l+r>v.getScrollTop(Me)+v.getHeight(Me)&&(o=a-3-r)>=v.getScrollTop(Me)&&(l=o),v.set(s,"top",l+"px")}},collapseOptionList:I,scrollOptionListByChild:function(t){var e,i,n,s,o,a,r=g.getSelectParent(t);r&&(e=v.getSelectElementSize(r),i=v.getOptionHeight(r),n=0,o=(s=Math.max(v.getScrollTop(r)/i,0))+e-1,(a=g.getChildVisibleIndex(r,t))<s?(n=i*(s-a),v.setScrollTop(r,Math.max(v.getScrollTop(r)-n,0))):o<a&&(n=i*(a-o),v.setScrollTop(r,v.getScrollTop(r)+n)))},getSelectChildCenter:function(t){var e=g.getSelectParent(t);if(!e)return{x:0,y:0};var i=v.getOptionHeight(e),n=f.getElementRectangle(t);return{x:Math.round(n.left+n.width/2),y:Math.round(n.top+i/2)}},switchOptionsByKeys:function(t,e){var i=v.getSelectElementSize(t),n=!v.hasDimensions(h.select("."+_)[0]);if(/down|up/.test(e)||!c.isIE&&(i<=1||c.isFirefox)&&(n||c.isFirefox)&&/left|right/.test(e)){for(var s=t.querySelectorAll("option"),o=[],a=0;a<s.length;a++){var r=s[a].parentElement;s[a].disabled||"optgroup"===g.getTagName(r)&&r.disabled||o.push(s[a])}var l=C.indexOf(o,s[t.selectedIndex])+(/down|right/.test(e)?1:-1);0<=l&&l<o.length&&(t.selectedIndex=C.indexOf(s,o[l]),c.isIE||p.input(t),p.change(t))}}}),l="Loading page...",b="modal-background",B="loading-text",T="loading-icon",U=null,M=null,A=null,V=!1;function D(){function t(){var t=o.styleUtils.getHeight(Me),e=o.styleUtils.getWidth(Me);o.styleUtils.set(U,"width",e+"px"),o.styleUtils.set(U,"height",t+"px"),o.styleUtils.set(A,{left:Math.round((e-o.styleUtils.getWidth(A))/2)+"px",top:Math.round((t-o.styleUtils.getHeight(A))/2)+"px"})}t(),o.eventUtils.bind(Me,"resize",t)}function R(){var t,e,i,n;t=u.element(),U=Ae.createElement("div"),t.appendChild(U),s.shadowUI.addClass(U,b),M=Ae.createEleme