testcafe 2.0.2 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/lib/browser/provider/built-in/dedicated/chrome/cdp-client/index.js +10 -17
- package/lib/cli/argument-parser/index.js +2 -1
- package/lib/cli/cli.js +3 -2
- package/lib/client/automation/index.js +281 -165
- package/lib/client/automation/index.min.js +1 -1
- package/lib/client/browser/idle-page/index.js +1 -1
- package/lib/client/core/index.js +340 -58
- package/lib/client/core/index.min.js +1 -1
- package/lib/client/driver/command-executors/client-functions/selector-executor/filter.js +5 -3
- package/lib/client/driver/command-executors/client-functions/selector-executor/utils.js +2 -17
- package/lib/client/driver/index.js +471 -525
- package/lib/client/driver/index.min.js +1 -1
- package/lib/client/ui/index.js +13 -76
- package/lib/client/ui/index.min.js +1 -1
- package/lib/configuration/default-values.js +3 -2
- package/lib/configuration/option-names.js +2 -1
- package/lib/configuration/testcafe-configuration.js +4 -1
- package/lib/errors/test-run/templates.js +7 -4
- package/lib/errors/types.js +2 -1
- package/lib/proxyless/request-pipeline/constants.js +2 -4
- package/lib/proxyless/request-pipeline/index.js +29 -5
- package/lib/proxyless/request-pipeline/safe-api.js +52 -0
- package/lib/proxyless/request-pipeline/special-handlers.js +7 -18
- package/lib/proxyless/resource-injector.js +14 -15
- package/lib/proxyless/types.js +1 -1
- package/lib/proxyless/utils/cdp.js +6 -2
- package/lib/services/compiler/host.js +1 -1
- package/lib/shared/errors/element-hidden-reasons.js +49 -0
- package/lib/shared/errors/index.js +17 -10
- package/lib/shared/errors/selector-error-ctor-callback.js +1 -1
- package/lib/test-run/commands/options.js +2 -1
- package/package.json +4 -4
- package/ts-defs/index.d.ts +1 -0
- package/lib/client/core/deps/hammerhead.js +0 -24
- package/lib/client/core/utils/array.js +0 -76
- package/lib/client/core/utils/dom.js +0 -459
- package/lib/client/core/utils/position.js +0 -246
- package/lib/client/core/utils/style.js +0 -98
- package/lib/client/core/utils/values/axis-values.js +0 -43
- package/lib/client/core/utils/values/boundary-values.js +0 -41
- package/lib/client/core/utils/values/dimensions.js +0 -17
- package/lib/client/driver/deps/testcafe-ui.js +0 -24
- package/lib/shared/errors/automation-errors.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
window["%hammerhead%"].utils.removeInjectedScript(),function ps(ms){var gs=ms.document;!function(d,c){var f="default"in d?d.default:d;c=c&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c;var e=f.utils.browser,t={alt:18,ctrl:17,meta:91,shift:16},n={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=","{":"[","}":"]",":":";",'"':"'","|":"\\","<":",",">":".","?":"/","±":"§"},o={backspace:8,capslock:20,delete:46,down:40,end:35,enter:13,esc:27,home:36,ins:45,left:37,pagedown:34,pageup:33,right:39,space:32,tab:9,up:38},r={left:e.isIE?"Left":"ArrowLeft",down:e.isIE?"Down":"ArrowDown",right:e.isIE?"Right":"ArrowRight",up:e.isIE?"Up":"ArrowUp",backspace:"Backspace",capslock:"CapsLock",delete:"Delete",end:"End",enter:"Enter",esc:"Escape",home:"Home",ins:"Insert",pagedown:"PageDown",pageup:"PageUp",space:e.isIE?"Spacebar":" ",tab:"Tab",alt:"Alt",ctrl:"Control",meta:"Meta",shift:"Shift"};function i(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n}var s={modifiers:t,shiftMap:n,specialKeys:o,keyProperty:r,modifiersMap:{option:"alt"},symbolCharCodeToKeyCode:{96:192,91:219,93:221,92:220,59:186,39:222,44:188,45:e.isFirefox?173:189,46:190,47:191},symbolKeysCharCodes:{109:45,173:45,186:59,187:61,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,110:46,96:48,97:49,98:50,99:51,100:52,101:53,102:54,103:55,104:56,105:57,107:43,106:42,111:47},reversedModifiers:i(t),reversedShiftMap:i(n),reversedSpecialKeys:i(o),reversedKeyProperty:i(r)},a=f.Promise,l=f.nativeMethods;function u(t){return new a(function(e){return l.setTimeout.call(ms,e,t)})}var h=(p.prototype._startListening=function(){var t=this;this._emitter.onRequestSend(function(e){return t._onRequestSend(e)}),this._emitter.onRequestCompleted(function(e){return t._onRequestCompleted(e)}),this._emitter.onRequestError(function(e){return t._onRequestError(e)})},p.prototype._offListening=function(){this._emitter.offAll()},p.prototype._onRequestSend=function(e){this._collectingReqs&&this._requests.add(e)},p.prototype._onRequestCompleted=function(e){var t=this;u(this._delays.additionalRequestsCollection).then(function(){return t._onRequestFinished(e)})},p.prototype._onRequestFinished=function(e){this._requests.has(e)&&(this._requests.delete(e),this._collectingReqs||this._requests.size||!this._watchdog||this._finishWaiting())},p.prototype._onRequestError=function(e){this._onRequestFinished(e)},p.prototype._finishWaiting=function(){this._watchdog&&((0,d.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._requests.clear(),this._offListening(),this._waitResolve()},p.prototype.wait=function(e){var n=this;return u(e?this._delays.pageInitialRequestsCollection:this._delays.requestsCollection).then(function(){return new d.Promise(function(e){var t;n._collectingReqs=!1,n._waitResolve=e,n._requests.size?(t=d.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},p.TIMEOUT)):n._finishWaiting()})})},p.TIMEOUT=3e3,p);function p(e,t){var n,o,r;void 0===t&&(t={}),this._delays={requestsCollection:null!==(n=t.requestsCollection)&&void 0!==n?n:50,additionalRequestsCollection:null!==(o=t.additionalRequestsCollection)&&void 0!==o?o:50,pageInitialRequestsCollection:null!==(r=t.pageInitialRequestsCollection)&&void 0!==r?r:50},this._emitter=e,this._waitResolve=null,this._watchdog=null,this._requests=new Set,this._collectingReqs=!0,this._startListening()}var m=function(e,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function v(e,s,a,l){return new(a=a||c)(function(n,t){function o(e){try{i(l.next(e))}catch(e){t(e)}}function r(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(o,r)}i((l=l.apply(e,s||[])).next())})}function E(n,o){var r,i,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,i=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=o.call(n,a)}catch(e){t=[6,e],i=0}finally{r=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}function y(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||((o=o||Array.prototype.slice.call(t,0,r))[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var b=(w.prototype.on=function(e,t){this._eventsListeners[e]||(this._eventsListeners[e]=[]),this._eventsListeners[e].push(t)},w.prototype.once=function(n,o){var r=this;this.on(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.off(n,o),o.apply(void 0,e)})},w.prototype.off=function(e,t){var n=this._eventsListeners[e];n&&(this._eventsListeners[e]=d.nativeMethods.arrayFilter.call(n,function(e){return e!==t}))},w.prototype.offAll=function(e){e?this._eventsListeners[e]=[]:this._eventsListeners={}},w.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=this._eventsListeners[t];if(o)for(var r=0;r<o.length;r++)try{o[r].apply(this,e)}catch(e){if(!(e.message&&-1<e.message.indexOf("freed script")))throw e;this.off(t,o[r])}},w);function w(){this._eventsListeners={}}var _,S="request-send",C="request-completed",T="request-error",x=(g(M,_=b),M.prototype._addHammerheadListener=function(e,t){f.on(e,t),this._hammerheadListenersInfo.push({evt:e,listener:t})},M.prototype.onRequestSend=function(e){this.on(S,e)},M.prototype.onRequestCompleted=function(e){this.on(C,e)},M.prototype.onRequestError=function(e){this.on(T,e)},M.prototype.offAll=function(){_.prototype.offAll.call(this);for(var e=0,t=this._hammerheadListenersInfo;e<t.length;e++){var n=t[e];f.off.call(f,n.evt,n.listener)}},M);function M(){var n=_.call(this)||this;return n._hammerheadListenersInfo=[],n._addHammerheadListener(f.EVENTS.beforeXhrSend,function(e){var t=e.xhr;return n.emit(S,t)}),n._addHammerheadListener(f.EVENTS.xhrCompleted,function(e){var t=e.xhr;return n.emit(C,t)}),n._addHammerheadListener(f.EVENTS.xhrError,function(e){var t=e.xhr;return n.emit(T,t)}),n._addHammerheadListener(f.EVENTS.fetchSent,function(e){n.emit(S,e),e.then(function(){return n.emit(C,e)},function(){return n.emit(T,e)})}),n}var P=(N.prototype._startListening=function(){var t=this;this._emitter.onScriptAdded(function(e){return t._onScriptElementAdded(e)}),this._emitter.onScriptLoadedOrFailed(function(e){return t._onScriptLoadedOrFailed(e)})},N.prototype._offListening=function(){this._emitter.offAll()},N.prototype._onScriptElementAdded=function(e){var t=this,n=(0,d.nativeMethods.setTimeout)(function(){return t._onScriptLoadedOrFailed(e,!0)},N.LOADING_TIMEOUT);this._scripts.set(e,n)},N.prototype._onScriptLoadedOrFailed=function(e,t){var n=this;void 0===t&&(t=!1),this._scripts.has(e)&&(t||(0,d.nativeMethods.clearTimeout)(this._scripts.get(e)),this._scripts.delete(e),this._scripts.size||u(25).then(function(){n._waitResolve&&!n._scripts.size&&n._finishWaiting()}))},N.prototype._finishWaiting=function(){this._watchdog&&((0,d.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._scripts.clear(),this._offListening(),this._waitResolve(),this._waitResolve=null},N.prototype.wait=function(){var n=this;return new d.Promise(function(e){var t;n._waitResolve=e,n._scripts.size?(t=d.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},N.TIMEOUT)):n._finishWaiting()})},N.TIMEOUT=3e3,N.LOADING_TIMEOUT=2e3,N);function N(e){this._emitter=e,this._watchdog=null,this._waitResolve=null,this._scripts=new Map,this._startListening()}var I,O=f.nativeMethods,R="script-added",A="script-loaded-or-failed",L=(g(V,I=b),V.prototype._onScriptElementAdded=function(e){var t,n=this,o=O.scriptSrcGetter.call(e);void 0!==o&&""!==o&&(this.emit(R,e),t=function(){O.removeEventListener.call(e,"load",t),O.removeEventListener.call(e,"error",t),n.emit(A,e)},O.addEventListener.call(e,"load",t),O.addEventListener.call(e,"error",t))},V.prototype.onScriptAdded=function(e){this.on(R,e)},V.prototype.onScriptLoadedOrFailed=function(e){this.on(A,e)},V.prototype.offAll=function(){I.prototype.offAll.call(this),f.off(f.EVENTS.scriptElementAdded,this._onScriptElementAdded)},V);function V(){var n=I.call(this)||this;return n._scriptElementAddedListener=function(e){var t=e.el;return n._onScriptElementAdded(t)},f.on(f.EVENTS.scriptElementAdded,n._scriptElementAddedListener),n}function F(e){var t="array"+e.charAt(0).toUpperCase()+e.slice(1),n=d.nativeMethods[t];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.call.apply(n,e)}}var k=F("filter"),D=F("map"),W=F("slice"),q=F("splice"),U=F("unshift"),H=F("forEach"),G=F("indexOf"),B=F("some"),j=F("reverse"),z=F("reduce"),Y=F("concat"),K=F("join");function J(e,t){if(d.nativeMethods.arrayFind)return d.nativeMethods.arrayFind.call(e,t);for(var n=e.length,o=0;o<n;o++)if(t(e[o],o,e))return e[o];return null}var X=Object.freeze({__proto__:null,filter:k,map:D,slice:W,splice:q,unshift:U,forEach:H,indexOf:G,some:B,reverse:j,reduce:z,concat:Y,join:K,isArray:function(e){return"[object Array]"===d.nativeMethods.objectToString.call(e)},from:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(d.nativeMethods.arrayFrom)return d.nativeMethods.arrayFrom.apply(d.nativeMethods,y([e],t,!1));for(var o=[],r=e.length,i=0;i<r;i++)o.push(e[i]);return o},find:J,remove:function(e,t){var n=d.nativeMethods.arrayIndexOf.call(e,t);-1<n&&d.nativeMethods.arraySplice.call(e,n,1)},equals:function(e,t){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!1;return!0},getCommonElement:function(e,t){for(var n=0;n<e.length;n++)for(var o=0;o<t.length;o++)if(e[n]===t[o])return e[n];return null}}),$=f.utils.browser,Q=f.nativeMethods,Z=f.utils.style.get,ee=f.utils.dom.getActiveElement,te=f.utils.dom.findDocument,ne=f.utils.dom.find,oe=f.utils.dom.isElementInDocument,re=f.utils.dom.isElementInIframe,ie=f.utils.dom.getIframeByElement,se=f.utils.dom.isCrossDomainWindows,ae=f.utils.dom.getSelectParent,le=f.utils.dom.getChildVisibleIndex,ue=f.utils.dom.getSelectVisibleChildren,ce=f.utils.dom.isElementNode,de=f.utils.dom.isTextNode,fe=f.utils.dom.isRenderedNode,he=f.utils.dom.isIframeElement,pe=f.utils.dom.isInputElement,me=f.utils.dom.isButtonElement,ge=f.utils.dom.isFileInput,ve=f.utils.dom.isTextAreaElement,Ee=f.utils.dom.isAnchorElement,ye=f.utils.dom.isImgElement,be=f.utils.dom.isFormElement,we=f.utils.dom.isLabelElement,_e=f.utils.dom.isSelectElement,Se=f.utils.dom.isRadioButtonElement,Ce=f.utils.dom.isColorInputElement,Te=f.utils.dom.isCheckboxElement,xe=f.utils.dom.isOptionElement,Me=f.utils.dom.isSVGElement,Pe=f.utils.dom.isMapElement,Ne=f.utils.dom.isBodyElement,Ie=f.utils.dom.isHtmlElement,Oe=f.utils.dom.isDocument,Re=f.utils.dom.isWindow,Ae=f.utils.dom.isTextEditableInput,Le=f.utils.dom.isTextEditableElement,Ve=f.utils.dom.isTextEditableElementAndEditingAllowed,Fe=f.utils.dom.isContentEditableElement,ke=f.utils.dom.isDomElement,De=f.utils.dom.isShadowUIElement,We=f.utils.dom.isShadowRoot,qe=f.utils.dom.isElementFocusable,Ue=f.utils.dom.isHammerheadAttr,He=f.utils.dom.isElementReadOnly,Ge=f.utils.dom.getScrollbarSize,Be=f.utils.dom.getMapContainer,je=f.utils.dom.getTagName,ze=f.utils.dom.closest,Ye=f.utils.dom.getParents,Ke=f.utils.dom.findParent,Je=f.utils.dom.getTopSameDomainWindow,Xe=f.utils.dom.getParentExceptShadowRoot;function $e(e,t){var n,o={el:n=e,skip:n.shadowRoot&&n.tabIndex<0,children:{}};if(e=e.shadowRoot||e,he(e)&&(e=Q.contentDocumentGetter.call(e)),e&&(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE||e.nodeType===Node.DOCUMENT_NODE))for(var r=0,i=function(e){for(var t,n=e.querySelectorAll("*"),o=function(e){for(var t=[],n=0;n<e.length;n++)"none"===Z(e[n],"display")&&t.push(e[n]);return t}(n),r=/^(input|button|select|textarea)$/,i=[],s=null,a=null,l=null,u=!1,c=0;c<n.length;c++){s=n[c],a=je(s),l=Qe(s),u=!1,function(e,t,n){var o=null;return t.nodeType===Node.DOCUMENT_NODE&&(o=Q.documentActiveElementGetter.call(t)),e===o||!(e.disabled||"none"===Z(e,"display")||"hidden"===Z(e,"visibility")||($.isIE||$.isAndroid)&&xe(e)||null!==n&&n<0)}(s,e,l)&&(r.test(a)||s.shadowRoot||he(s)?u=!0:Ee(s)&&s.hasAttribute("href")&&(u=""!==s.getAttribute("href")||!$.isIE||null!==l),""!==(t=s.getAttribute("contenteditable"))&&"true"!==t||(u=!0),null!==l&&(u=!0),u&&i.push(s))}return k(i,function(e){return!Ze(o,e)})}(e);r<i.length;r++){var s=i[r],a=!t||s.tabIndex<=0?-1:s.tabIndex;o.children[a]=o.children[a]||[],o.children[a].push($e(s,t))}return o}function Qe(e){var t=Q.getAttribute.call(e,"tabindex");return null!==t&&(t=parseInt(t,10),t=isNaN(t)?null:t),t}function Ze(e,t){return e.contains?e.contains(t):B(e,function(e){return e.contains(t)})}function et(e,t){if(tt(t,e))return!0;for(var n=Q.nodeChildNodesGetter.call(e),o=it(n),r=0;r<o;r++){var i=n[r];if(!De(i)&&et(i,t))return!0}return!1}function tt(e,t){return e&&t&&e.isSameNode?e.isSameNode(t):e===t}function nt(t){if(!t.setTimeout)return!1;var e=null;try{e=t.frameElement}catch(e){return!!t.top}return!(!$.isFirefox&&!$.isWebKit||t.top===t||e)||!(!e||!Q.contentDocumentGetter.call(e))}function ot(e){try{return e.top===e}catch(e){return!1}}function rt(e){var t=[];ne(gs,"*",function(e){"IFRAME"===e.tagName&&t.push(e),e.shadowRoot&&ne(e.shadowRoot,"iframe",function(e){return t.push(e)})});for(var n=0;n<t.length;n++)if(Q.contentWindowGetter.call(t[n])===e)return t[n];return null}function it(e){return Q.nodeListLengthGetter.call(e)}function st(e){return Q.inputValueGetter.call(e)}function at(e){return Q.textAreaValueGetter.call(e)}function lt(e,t){return Q.inputValueSetter.call(e,t)}function ut(e,t){return Q.textAreaValueSetter.call(e,t)}function ct(e){return pe(e)?st(e):ve(e)?at(e):e.value}function dt(e){return e&&e.getRootNode&&te(e)!==e.getRootNode()}var ft=Object.freeze({__proto__:null,getActiveElement:ee,findDocument:te,find:ne,isElementInDocument:oe,isElementInIframe:re,getIframeByElement:ie,isCrossDomainWindows:se,getSelectParent:ae,getChildVisibleIndex:le,getSelectVisibleChildren:ue,isElementNode:ce,isTextNode:de,isRenderedNode:fe,isIframeElement:he,isInputElement:pe,isButtonElement:me,isFileInput:ge,isTextAreaElement:ve,isAnchorElement:Ee,isImgElement:ye,isFormElement:be,isLabelElement:we,isSelectElement:_e,isRadioButtonElement:Se,isColorInputElement:Ce,isCheckboxElement:Te,isOptionElement:xe,isSVGElement:Me,isMapElement:Pe,isBodyElement:Ne,isHtmlElement:Ie,isDocument:Oe,isWindow:Re,isTextEditableInput:Ae,isTextEditableElement:Le,isTextEditableElementAndEditingAllowed:Ve,isContentEditableElement:Fe,isDomElement:ke,isShadowUIElement:De,isShadowRoot:We,isElementFocusable:qe,isHammerheadAttr:Ue,isElementReadOnly:He,getScrollbarSize:Ge,getMapContainer:Be,getTagName:je,closest:ze,getParents:Ye,findParent:Ke,getTopSameDomainWindow:Je,getParentExceptShadowRoot:Xe,getFocusableElements:function(e,t){return void 0===t&&(t=!1),function e(t){var n,o=[];for(n in t.skip||t.el.nodeType===Node.DOCUMENT_NODE||he(t.el)||o.push(t.el),t.children)for(var r=0,i=t.children[n];r<i.length;r++){var s=i[r];o.push.apply(o,e(s))}return o}($e(e,t))},getTabIndexAttributeIntValue:Qe,containsElement:Ze,getTextareaIndentInLine:function(e,t){var n=at(e);if(!n)return 0;var o=n.substring(0,t);return t-(-1===o.lastIndexOf("\n")?0:o.lastIndexOf("\n")+1)},getTextareaLineNumberByPosition:function(e,t){for(var n=at(e).split("\n"),o=0,r=0,i=0;o<=t;i++){if(t<=o+n[i].length){r=i;break}o+=n[i].length+1}return r},getTextareaPositionByLineAndOffset:function(e,t,n){for(var o=at(e).split("\n"),r=0,i=0;i<t;i++)r+=o[i].length+1;return r+n},blocksImplicitSubmission:function(e){return($.isSafari?/^(text|password|color|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:$.isFirefox?/^(text|password|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:$.isIE?/^(text|password|color|date|time|datetime|datetime-local|email|file|month|number|search|tel|url|week|image)$/i:/^(text|password|datetime|email|number|search|tel|url|image)$/i).test(e.type)},isEditableElement:function(e,t){return t?Ve(e)||Fe(e):Le(e)||Fe(e)},isElementContainsNode:et,isOptionGroupElement:function(e){return"[object HTMLOptGroupElement]"===f.utils.dom.instanceToString(e)},getElementIndexInParent:function(e,t){var n=e.querySelectorAll(je(t));return G(n,t)},isTheSameNode:tt,getElementDescription:function(e){var t,n,o={id:"id",name:"name",class:"className"},r=[];for(t in r.push("<"),r.push(je(e)),o)!o.hasOwnProperty(t)||(n=e[o[t]])&&r.push(" "+t+'="'+n+'"');return r.push(">"),r.join("")},getFocusableParent:function(e){for(var t=Ye(e),n=0;n<t.length;n++)if(qe(t[n]))return t[n];return null},remove:function(e){e&&e.parentElement&&e.parentElement.removeChild(e)},isIFrameWindowInDOM:nt,isTopWindow:ot,findIframeByWindow:rt,isEditableFormElement:function(e){return Le(e)||_e(e)},getCommonAncestor:function(e,t){if(tt(e,t))return e;for(var n=[e].concat(Ye(e)),o=t;o;){if(-1<G(n,o))return o;o=Q.nodeParentNodeGetter.call(o)}return o},getChildrenLength:function(e){return Q.htmlCollectionLengthGetter.call(e)},getChildNodesLength:it,getInputValue:st,getTextAreaValue:at,setInputValue:lt,setTextAreaValue:ut,getElementValue:ct,setElementValue:function(e,t){return pe(e)?lt(e,t):ve(e)?ut(e,t):e.value=t},isShadowElement:dt,contains:function(t,e){return!(!t||!e)&&(t.contains?t.contains(e):!!Ke(e,!0,function(e){return e===t}))},isNodeEqual:function(e,t){return e===t},getNodeText:function(e){return Q.nodeTextContentGetter.call(e)},getImgMapName:function(e){return e.useMap.substring(1)},getDocumentElement:function(e){return e.document.documentElement},isDocumentElement:function(e){return e===gs.documentElement}}),ht=f.Promise,pt=f.nativeMethods,mt=f.eventSandbox.listeners,gt=f.utils.browser,vt=f.utils.event.BUTTON,Et=f.utils.event.BUTTONS_PARAMETER,yt=f.utils.event.DOM_EVENTS,bt=f.utils.event.WHICH_PARAMETER,wt=f.utils.event.preventDefault;function _t(e,t,n,o){gt.isIE11&&Re(e)?pt.windowAddEventListener.call(e,t,n,o):pt.addEventListener.call(e,t,n,o)}function St(e,t,n,o){gt.isIE11&&Re(e)?pt.windowRemoveEventListener.call(e,t,n,o):pt.removeEventListener.call(e,t,n,o)}function Ct(){var n=[],e=!1;function t(){e||(gs.body?(e=!0,n.forEach(function(e){return e()})):pt.setTimeout.call(ms,t,1))}function o(){(nt(ms)||ot(ms))&&(St(gs,"DOMContentLoaded",o),t())}return"complete"===gs.readyState?pt.setTimeout.call(ms,o,1):_t(gs,"DOMContentLoaded",o),{then:function(e){return t=e,new ht(function(e){return n.push(function(){return e(t())})});var t}}}var Tt,xt,Mt=Object.freeze({__proto__:null,BUTTON:vt,BUTTONS_PARAMETER:Et,DOM_EVENTS:yt,WHICH_PARAMETER:bt,preventDefault:wt,bind:_t,unbind:St,documentReady:function(e){return void 0===e&&(e=0),Ct().then(function(){return mt.getEventListeners(ms,"load").length?ht.race([new ht(function(e){return _t(ms,"load",e)}),u(e)]):null})}});(xt=Tt=Tt||{}).ready="ready",xt.readyForBrowserManipulation="ready-for-browser-manipulation",xt.waitForFileDownload="wait-for-file-download";var Pt=Tt,Nt=f.Promise,It=f.utils.browser,Ot=f.nativeMethods,Rt=f.transport,At=30,Lt=500,Vt=!1,Ft=null,kt=!1;function Dt(){if(It.isIE)return function(e){qt&&Ot.clearTimeout.call(ms,qt),Wt=!0,qt=Ot.setTimeout.call(ms,function(){qt=null,Wt=!1,Ut.forEach(function(e){return e()}),Ut=[]},e)}(At),void u(0).then(function(){var e;"loading"===gs.readyState&&((e=Ot.documentActiveElementGetter.call(gs))&&Ee(e)&&e.hasAttribute("download")||(Vt=!0))});Vt=!0}var Wt=!1,qt=null,Ut=[],Ht=Object.freeze({__proto__:null,init:function(){f.on(f.EVENTS.beforeUnload,Dt),_t(ms,"unload",function(){Vt=!0})},watchForPageNavigationTriggers:function(){Ft=function(){kt=!0},f.on(f.EVENTS.pageNavigationTriggered,Ft)},wait:function(e){void 0===e&&(e=!Ft||kt?400:0),Ft&&(f.off(f.EVENTS.pageNavigationTriggered,Ft),Ft=null);var t=u(e).then(function(){return Vt?u(Lt).then(function(){return Rt.queuedAsyncServiceMsg({cmd:Pt.waitForFileDownload})}).then(function(e){if(!e)return new Nt(function(){})}).then(function(){Vt=!1}):Wt?new Nt(function(e){return Ut.push(e)}):void 0}),n=u(15e3).then(function(){Vt=!1});return Nt.race([t,n])}}),Gt=b,Bt=Object.freeze({__proto__:null,EventEmitter:Gt,inherit:function(e,t){function n(){}n.prototype=t.prototype,f.utils.extend(e.prototype,new n),(e.prototype.constructor=e).base=t.prototype}}),jt=d.eventSandbox.listeners;function zt(){this.initialized=!1,this.stopPropagationFlag=!1,this.events=new Gt}var Yt=(zt.prototype._internalListener=function(e,t,n,o,r){this.events.emit("scroll",e),this.stopPropagationFlag&&(o(),r())},zt.prototype.init=function(){var n=this;this.initialized||(this.initialized=!0,jt.initElementListening(ms,["scroll"]),jt.addFirstInternalEventBeforeListener(ms,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n._internalListener.apply(n,e)}))},zt.prototype.waitForScroll=function(e){var t=this,n=null,o=new d.Promise(function(e){n=e});return o.cancel=function(){return t.events.off("scroll",n)},this.initialized?this.handleScrollEvents(e,n):n(),o},zt.prototype.handleScrollEvents=function(n,e){var o=this;this.events.once("scroll",e),dt(n)&&(jt.initElementListening(n,["scroll"]),jt.addFirstInternalEventBeforeListener(n,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o._internalListener.apply(o,e),jt.cancelElementListening(n)}))},zt.prototype.stopPropagation=function(){this.stopPropagationFlag=!0},zt.prototype.enablePropagation=function(){this.stopPropagationFlag=!1},new zt),Kt=(Jt.create=function(e){return new Jt(e.top,e.right,e.bottom,e.left)},Jt.prototype.add=function(e){return this.top+=e.top,this.right+=e.right,this.bottom+=e.bottom,this.left+=e.left,this},Jt.prototype.sub=function(e){return"top"in e&&(this.top-=e.top,this.left-=e.left),this.bottom-=e.bottom,this.right-=e.right,this},Jt.prototype.round=function(e,t){return void 0===e&&(e=Math.round),void 0===t&&(t=e),this.top=e(this.top),this.right=t(this.right),this.bottom=t(this.bottom),this.left=e(this.left),this},Jt.prototype.contains=function(e){return e.x>=this.left&&e.x<=this.right&&e.y>=this.top&&e.y<=this.bottom},Jt);function Jt(e,t,n,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===o&&(o=0),this.top=e,this.right=t,this.bottom=n,this.left=o}var Xt=f.utils.style,$t=f.utils.style.getBordersWidth,Qt=f.utils.style.getComputedStyle,Zt=f.utils.style.getElementMargin,en=f.utils.style.getElementPadding,tn=f.utils.style.getElementScroll,nn=f.utils.style.getOptionHeight,on=f.utils.style.getSelectElementSize,rn=f.utils.style.isElementVisible,sn=f.utils.style.isVisibleChild,an=f.utils.style.getWidth,ln=f.utils.style.getHeight,un=f.utils.style.getInnerWidth,cn=f.utils.style.getInnerHeight,dn=f.utils.style.getScrollLeft,fn=f.utils.style.getScrollTop,hn=f.utils.style.setScrollLeft,pn=f.utils.style.setScrollTop,mn=f.utils.style.get;function gn(e,t,n){return e<t?n:e<n?t:Math.max(n,t)}function vn(e){return!fe(e)||!!Ke(e,!0,function(e){return ce(e)&&"none"===Xt.get(e,"display")})||!!Ke(e,!0,function(e){return ce(e)&&"hidden"===Xt.get(e,"visibility")})}function En(e){return e&&!(e.offsetHeight<=0&&e.offsetWidth<=0)}function yn(e){return ce(e)&&"fixed"===Xt.get(e,"position")}var bn=Object.freeze({__proto__:null,getBordersWidth:$t,getComputedStyle:Qt,getElementMargin:Zt,getElementPadding:en,getElementScroll:tn,getOptionHeight:nn,getSelectElementSize:on,isElementVisible:rn,isSelectVisibleChild:sn,getWidth:an,getHeight:ln,getInnerWidth:un,getInnerHeight:cn,getScrollLeft:dn,getScrollTop:fn,setScrollLeft:hn,setScrollTop:pn,get:mn,set:function(e,t,n){for(var o in"string"==typeof t&&Xt.set(e,t,n),t)t.hasOwnProperty(o)&&Xt.set(e,o,t[o])},getViewportDimensions:function(){return{width:gn(ms.innerWidth,gs.documentElement.clientWidth,gs.body.clientWidth),height:gn(ms.innerHeight,gs.documentElement.clientHeight,gs.body.clientHeight)}},getWindowDimensions:function(e){return new Kt(0,an(e),ln(e),0)},isNotVisibleNode:vn,hasDimensions:En,isFixedElement:yn}),wn=d.utils.browser,_n=d.eventSandbox.listeners,Sn=d.eventSandbox.eventSimulator,Cn=["click","mousedown","mouseup","dblclick","contextmenu","mousemove","mouseover","mouseout","touchstart","touchmove","touchend","keydown","keypress","input","keyup","change","focus","blur","MSPointerDown","MSPointerMove","MSPointerOver","MSPointerOut","MSPointerUp","pointerdown","pointermove","pointerover","pointerout","pointerup"],Tn=123;function xn(e,t,n,o,r){var i,s=d.nativeMethods.eventTargetGetter.call(e)||e.srcElement;if(!t&&!De(s)){if(/^key/.test(e.type)&&((i=e).shiftKey&&i.ctrlKey||(i.altKey||i.metaKey)&&wn.isMacPlatform||i.keyCode===Tn))return void r();if("blur"===e.type)if(wn.isIE&&wn.version<12){var a,l=Re(s),u=!l&&"none"===mn(s,"display"),c=!1;l||u||(a=Ye(s),c=k(a,function(e){return"none"===mn(e,"display")})),(u||c.length)&&d.eventSandbox.timers.deferFunction(function(){Sn.blur(s)})}else if(s!==ms&&s!==ms.document&&!En(s))return;n()}}var Mn=(Pn.create=function(e){return"left"in e?new Pn(e.left,e.top):"right"in e?new Pn(e.right,e.bottom):new Pn(e.x,e.y)},Pn.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},Pn.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},Pn.prototype.round=function(e){return void 0===e&&(e=Math.round),this.x=e(this.x),this.y=e(this.y),this},Pn.prototype.eql=function(e){return this.x===e.x&&this.y===e.y},Pn.prototype.mul=function(e){return this.x*=e,this.y*=e,this},Pn.prototype.distance=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},Pn);function Pn(e,t){this.x=e,this.y=t}var Nn=/auto|scroll|hidden/i,In="visible";function On(e){var t,n=mn(e,"overflowX"),o=mn(e,"overflowY"),r=Nn.test(n),i=Nn.test(o),s=te(e).documentElement,a=e.scrollHeight;return(d.utils.browser.isChrome||d.utils.browser.isFirefox||d.utils.browser.isSafari)&&(t=e.getBoundingClientRect().top,a=a-s.getBoundingClientRect().top+t),(r||i)&&a>s.scrollHeight}function Rn(e){if(Ne(e))return On(e);if(Ie(e))return function(e){var t=mn(e,"overflowX"),n=mn(e,"overflowY");if("hidden"===t&&"hidden"===n)return!1;var o=e.scrollHeight>e.clientHeight,r=e.scrollWidth>e.clientWidth;if(o||r)return!0;var i=e.getElementsByTagName("body")[0];if(!i)return!1;if(On(i))return!1;var s=Math.min(e.clientWidth,i.clientWidth),a=Math.min(e.clientHeight,i.clientHeight);return i.scrollHeight>a||i.scrollWidth>s}(e);var t,n,o,r,i,s=(n=mn(t=e,"overflowX"),o=mn(t,"overflowY"),r=Nn.test(n),i=Nn.test(o),d.utils.browser.isIE&&(r=r||i&&n===In,i=i||r&&o===In),new Mn(r,i));if(!s.x&&!s.y)return!1;var a=s.y&&e.scrollHeight>e.clientHeight;return s.x&&e.scrollWidth>e.clientWidth||a}function An(e){var t,n,o=Ye(e);return!re(e)||(t=ie(e))&&(n=Ye(t),o.concat(n)),d.nativeMethods.arrayFilter.call(o,Rn)}var Ln=Object.freeze({__proto__:null,hasScroll:Rn,getScrollableParents:An}),Vn=function(e,t,n,o,r,i){this.width=e,this.height=t,this.left=n.x,this.top=n.y,this.right=n.x+e,this.bottom=n.y+t,this.border=o,this.scrollbar=i,this.scroll=r},Fn=f.utils.position.getElementRectangle,kn=f.utils.position.getOffsetPosition,Dn=f.utils.position.offsetToClientCoords;function Wn(e){var t,n,o,r,i=Ie(e),s=i?e.getElementsByTagName("body")[0]:null,a=e.getBoundingClientRect(),l=Kt.create($t(e)),u=tn(e),c=re(e),d="BackCompat"===e.ownerDocument.compatMode,f=i?new Mn(0,0):Mn.create(a),h=a.height,p=a.width;i&&(p=s&&d?(h=s.clientHeight,s.clientWidth):(h=e.clientHeight,e.clientWidth)),!c||(t=ie(e))&&(n=kn(t),o=Dn(Mn.create(n)),r=$t(t),f.add(o).add(Mn.create(r)),i&&l.add(r));var m=!i&&un(e)!==e.clientWidth,g=!i&&cn(e)!==e.clientHeight,v={right:m?Ge():0,bottom:g?Ge():0};return new Vn(p,h,f,l,u,v)}function qn(e){var t=e.x,n=e.y,o=gs.getElementFromPoint||gs.elementFromPoint,r=null;try{r=o.call(gs,t,n)}catch(e){return null}for(null===r&&(r=o.call(gs,t-1,n-1));r&&r.shadowRoot&&r.shadowRoot.elementFromPoint;){var i=r.shadowRoot.elementFromPoint(t,n);if(!i||r===i)break;r=i}return r}function Un(e,t){return Kt.create({top:e.top-t.top,left:e.left-t.left,right:t.right-e.right,bottom:t.bottom-e.bottom}).sub(t.border).sub(t.scrollbar).round(Math.ceil,Math.floor)}function Hn(e){var t=/^touch/.test(e.type)&&e.targetTouches?e.targetTouches[0]||e.changedTouches[0]:e,n=0===t.pageX&&0===t.pageY,o=0!==t.clientX||0!==t.clientY;if((null===t.pageX||n&&o)&&null!==t.clientX){var r=te(e.target||e.srcElement),i=r.documentElement,s=r.body;return new Mn(Math.round(t.clientX+(i&&i.scrollLeft||s&&s.scrollLeft||0)-(i.clientLeft||0)),Math.round(t.clientY+(i&&i.scrollTop||s&&s.scrollTop||0)-(i.clientTop||0)))}return new Mn(Math.round(t.pageX),Math.round(t.pageY))}function Gn(e){return"hidden"===mn(e,"visibility")||"none"===mn(e,"display")}function Bn(e){var t=Fn(e);return 0===t.width||0===t.height}var jn=Object.freeze({__proto__:null,getElementRectangle:Fn,getOffsetPosition:kn,offsetToClientCoords:Dn,getClientDimensions:Wn,getElementFromPoint:qn,calcRelativePosition:Un,getIframeClientCoordinates:function(e){var t=kn(e),n=t.left,o=t.top,r=Dn({x:n,y:o}),i=$t(e),s=en(e),a=r.x+i.left+s.left,l=r.y+i.top+s.top;return new Kt(l,a+an(e),l+ln(e),a)},containsOffset:function(e,t,n){var o=Wn(e),r=Math.max(e.scrollWidth,o.width),i=Math.max(e.scrollHeight,o.height),s=o.scrollbar.right+o.border.left+o.border.right+r,a=o.scrollbar.bottom+o.border.top+o.border.bottom+i;return(void 0===t||0<=t&&t<=s)&&(void 0===n||0<=n&&n<=a)},getEventAbsoluteCoordinates:function(e){var t,n,o,r=e.target||e.srcElement,i=Hn(e),s=te(r),a=0,l=0;return!re(s.documentElement)||(t=ie(s))&&(n=kn(t),o=$t(t),a=n.left+o.left,l=n.top+o.top),new Mn(i.x+a,i.y+l)},getEventPageCoordinates:Hn,getIframePointRelativeToParentFrame:function(e,t){var n=rt(t),o=kn(n),r=$t(n),i=en(n);return Dn({x:e.x+o.left+r.left+i.left,y:e.y+o.top+r.top+i.top})},findCenter:function(e){var t=Fn(e);return new Mn(Math.round(t.left+t.width/2),Math.round(t.top+t.height/2))},getClientPosition:function(e){var t=kn(e),n=t.left,o=t.top,r=Dn({x:n,y:o});return r.x=Math.round(r.x),r.y=Math.round(r.y),r},isInRectangle:function(e,t){var n=e.x,o=e.y;return n>=t.left&&n<=t.right&&o>=t.top&&o<=t.bottom},getWindowPosition:function(){var e=ms.screenLeft||ms.screenX,t=ms.screenTop||ms.screenY;return new Mn(e,t)},isIframeVisible:function(e){return!Gn(e)},isElementVisible:function e(t){if(de(t))return!vn(t);if(!Fe(t)&&!Me(t)&&Bn(t))return!1;if(Pe(t)){var n=Be(ze(t,"map"));return!!n&&e(n)}if(sn(t)){var o=ae(t),r=le(o,t),i=on(o),s=Math.max(fn(o)/nn(o),0),a=s+i-1,l=Math.max(r-s,0);return s<=l&&l<=a}return Me(t)?!Ke(t,!0,Gn)&&!Bn(t):En(t)&&!Gn(t)}});function zn(n,o){return v(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<n?[4,o(t)]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}var Yn=Object.freeze({__proto__:null,whilst:function(t,n){return v(this,void 0,void 0,function(){return E(this,function(e){switch(e.label){case 0:return t()?[4,n()]:[3,2];case 1:return e.sent(),[3,0];case 2:return[2]}})})},times:zn,each:function(r,i){return v(this,void 0,void 0,function(){var t,n,o;return E(this,function(e){switch(e.label){case 0:t=0,n=r,e.label=1;case 1:return t<n.length?(o=n[t],[4,i(o)]):[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}}),Kn=f.Promise,Jn=f.eventSandbox.message;function Xn(e,o,t){return new Kn(function(n){Jn.on(Jn.SERVICE_MSG_RECEIVED_EVENT,function e(t){t.message.cmd===o&&(Jn.off(Jn.SERVICE_MSG_RECEIVED_EVENT,e),n(t.message))}),Jn.sendServiceMsg(e,t)})}var $n=(Qn._isScrollValuesChanged=function(e,t){return dn(e)!==t.left||fn(e)!==t.top},Qn.prototype._setScroll=function(e,t){var n=this,o=t.left,r=t.top,i=Ie(e)?te(e):e,s={left:dn(i),top:fn(i)},o=Math.max(o,0),r=Math.max(r,0),a=Yt.waitForScroll(i);return hn(i,o),pn(i,r),Qn._isScrollValuesChanged(i,s)?a=a.then(function(){n._scrollWasPerformed||(n._scrollWasPerformed=Qn._isScrollValuesChanged(i,s))}):(a.cancel(),d.Promise.resolve())},Qn.prototype._getScrollToPoint=function(e,t,n){var o=Math.floor(e.width/2),r=Math.floor(e.height/2),i=this._scrollToCenter?o:Math.min(n.left,o),s=this._scrollToCenter?r:Math.min(n.top,r),a=e.scroll,l=a.left,u=a.top,c=t.x>=l+e.width-i,d=t.x<=l+i,f=t.y>=u+e.height-s,h=t.y<=u+s;return c?l=t.x-e.width+i:d&&(l=t.x-i),f?u=t.y-e.height+s:h&&(u=t.y-s),{left:l,top:u}},Qn.prototype._getScrollToFullChildView=function(e,t,n){var o,r,i,s,a={left:null,top:null},l=e.width>=t.width,u=e.height>=t.height,c=Un(t,e);return l&&(o=e.width-t.width,r=Math.min(n.left,o),this._scrollToCenter&&(r=o/2),c.left<r?a.left=Math.round(e.scroll.left+c.left-r):c.right<r&&(a.left=Math.round(e.scroll.left+Math.min(c.left,-c.right)+r))),u&&(i=e.height-t.height,s=Math.min(n.top,i),this._scrollToCenter&&(s=i/2),c.top<s?a.top=Math.round(e.scroll.top+c.top-s):c.bottom<s&&(a.top=Math.round(e.scroll.top+Math.min(c.top,-c.bottom)+s))),a},Qn._getChildPoint=function(e,t,n){return Mn.create(t).sub(Mn.create(e)).add(Mn.create(e.scroll)).add(Mn.create(t.border)).add(n)},Qn.prototype._getScrollPosition=function(e,t,n,o){var r=Qn._getChildPoint(e,t,n),i=this._getScrollToPoint(e,r,o),s=this._getScrollToFullChildView(e,t,o);return{left:Math.max(null===s.left?i.left:s.left,0),top:Math.max(null===s.top?i.top:s.top,0)}},Qn._getChildPointAfterScroll=function(e,t,n,o){return Mn.create(t).add(Mn.create(e.scroll)).sub(Mn.create(n)).add(o)},Qn.prototype._isChildFullyVisible=function(e,t,n){var o=Qn._getChildPointAfterScroll(e,t,e.scroll,n),r=this._getScrollPosition(e,t,n,{left:0,top:0}),i=r.left,s=r.top;return!this._isTargetElementObscuredInPoint(o)&&i===e.scroll.left&&s===e.scroll.top},Qn.prototype._scrollToChild=function(e,t,n){for(var o=Wn(e),r=Wn(t),i=un(ms),s=cn(ms),a=o.scroll,l=!this._isChildFullyVisible(o,r,n);l;){a=this._getScrollPosition(o,r,n,this._maxScrollMargin);var u=Qn._getChildPointAfterScroll(o,r,a,n),c=this._isTargetElementObscuredInPoint(u);this._maxScrollMargin.left+=20,this._maxScrollMargin.left>=i&&(this._maxScrollMargin.left=50,this._maxScrollMargin.top+=20),l=c&&this._maxScrollMargin.top<s}return this._maxScrollMargin={left:50,top:50},this._setScroll(e,a)},Qn.prototype._scrollElement=function(){if(!Rn(this._element))return d.Promise.resolve();var e=Wn(this._element),t=this._getScrollToPoint(e,this._offsets,this._maxScrollMargin);return this._setScroll(this._element,t)},Qn.prototype._scrollParents=function(){var t,n,o=this,r=An(this._element),i=this._element,e=dn(i),s=fn(i),a=Mn.create(this._offsets).sub(new Mn(e,s).round()),l=zn(r.length,function(e){return o._scrollToChild(r[e],i,a).then(function(){t=Wn(i),n=Wn(r[e]),a.add(Mn.create(t)).sub(Mn.create(n)).add(Mn.create(n.border)),i=r[e]})}),u={scrollWasPerformed:this._scrollWasPerformed,offsetX:a.x,offsetY:a.y,maxScrollMargin:this._maxScrollMargin};return l.then(function(){var e;if(!o._skipParentFrames&&(e=ms).top!==e)return u.cmd=Qn.SCROLL_REQUEST_CMD,Xn(u,Qn.SCROLL_RESPONSE_CMD,ms.parent)}).then(function(){return o._scrollWasPerformed})},Qn._getFixedAncestorOrSelf=function(e){return Ke(e,!0,yn)},Qn.prototype._isTargetElementObscuredInPoint=function(e){var t=qn(e);if(!t)return!1;var n=Qn._getFixedAncestorOrSelf(t);return!!n&&!n.contains(this._element)},Qn.prototype.run=function(){var e=this;return this._scrollElement().then(function(){return e._scrollParents()})},Qn.SCROLL_REQUEST_CMD="automation|scroll|request",Qn.SCROLL_RESPONSE_CMD="automation|scroll|response",Qn);function Qn(e,t,n){this._element=e,this._offsets=new Mn(t.offsetX,t.offsetY),this._scrollToCenter=!!t.scrollToCenter,this._skipParentFrames=!!t.skipParentFrames,this._maxScrollMargin=n||{left:50,top:50},this._scrollWasPerformed=!1}function Zn(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return!it(t)&&po(e)?e:J(t,po)}function eo(e){return J(d.nativeMethods.nodeChildNodesGetter.call(e),function(e){return po(e)||!mo(e)&&eo(e)})}function to(e){return de(e)||ce(e)&&rn(e)}function no(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return k(t,to)}function oo(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return B(t,to)}function ro(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return B(t,function(e){return Co(e,!0)})}function io(e,t){var n,o;if(!De(e)&&!De(t)){var r=d.nativeMethods.nodeChildNodesGetter.call(t);return!tt(t,e)&&it(r)&&/div|p/.test(je(t))&&(n=eo(e))&&!tt(t,n)&&(o=lo(n))&&!tt(t,o)&&Zn(t)}}function so(e,t){var n,o,r,i=fe(t);if(!De(e)&&!De(t)){var s=d.nativeMethods.nodeChildNodesGetter.call(t);if(!tt(t,e)&&(i&&ce(t)&&it(s)&&!/div|p/.test(je(t))||po(t)&&!tt(t,e)&&t.nodeValue.length)){if(i&&ce(t)){if(!(n=eo(e))||tt(t,n))return;if(!(o=lo(n))||tt(t,o))return}return(r=function(e){for(var t=null,n=e;!t&&(n=n.previousSibling);)if(!mo(n)&&!ho(n)){t=n;break}return t}(t))&&ce(r)&&/div|p/.test(je(r))&&Zn(r)}}}function ao(e,t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=it(r),s=null,a=t?po:de;if(!i&&a(e))return e;for(var l=0;l<i;l++){if(n=r[l],o=ce(n)&&!Fe(n),a(n))return n;if(fe(n)&&oo(n)&&!o&&(s=ao(n,t)))return s}return s}function lo(e){return ao(e,!0)}function uo(e,t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=it(r),s=null;if(!i&&po(e))return e;for(var a=i-1;0<=a;a--){if(n=r[a],o=ce(n)&&!Fe(n),de(n)&&(!t||!ho(n)))return n;if(fe(n)&&oo(n)&&!o&&(s=uo(n,!1)))return s}return s}function co(e,t){if(!e||!e.length)return 0;for(var n=e.length,o=t||0,r=o;r<n&&(10===e.charCodeAt(r)||32===e.charCodeAt(r));r++)o++;return o}function fo(e){if(!e||!e.length)return 0;for(var t=e.length,n=t,o=t-1;0<=o&&(10===e.charCodeAt(o)||32===e.charCodeAt(o));o--)n--;return n}function ho(e){if(!de(e))return!1;var t=e.nodeValue,n=co(t),o=fo(t);return n===t.length&&0===o}function po(e){return de(e)&&!ho(e)}function mo(e){return!fe(e)||De(e)}function go(e){var t=e.getAttribute?e.getAttribute("contenteditable"):null;return""===t||"true"===t}function vo(e){var t=Ye(e);if(go(e)&&Fe(e))return e;var n=te(e);return"on"===n.designMode?n.body:J(t,function(e){return go(e)&&Fe(e)})}function Eo(e,t){if(tt(e,t))return tt(t,vo(e))?e:d.nativeMethods.nodeParentNodeGetter.call(e);var n=[],o=vo(e),r=null;if(!et(o,t))return null;for(r=e;r!==o;r=d.nativeMethods.nodeParentNodeGetter.call(r))n.push(r);for(r=t;r!==o;r=d.nativeMethods.nodeParentNodeGetter.call(r))if(-1!==G(n,r))return r;return o}function yo(e,t){var n=null,o=null,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=it(r),s=i<=t;if(De(e))return{node:e,offset:t};if(s?n=r[i-1]:(n=r[t],o=0),De(n)){if(i<=1)return{node:e,offset:0};(s=i<=t-1)?n=r[i-2]:(n=r[t-1],o=0)}for(;!mo(n)&&ce(n);){var a=no(n);if(!a.length){o=0;break}n=a[s?a.length-1:0]}return 0===o||mo(n)||(o=n.nodeValue?n.nodeValue.length:0),{node:n,offset:o}}function bo(e,t,n){var o=n?t.focusNode:t.anchorNode,r=n?t.focusOffset:t.anchorOffset,i={node:o,offset:r};return(tt(e,o)||ce(o))&&ro(o)&&(i=yo(o,r)),{node:i.node,offset:i.offset}}function wo(e,t,n){var o=n?t.anchorNode:t.focusNode,r=n?t.anchorOffset:t.focusOffset,i={node:o,offset:r};return(tt(e,o)||ce(o))&&ro(o)&&(i=yo(o,r)),{node:i.node,offset:i.offset}}function _o(e,t,n){return xo(e,bo(e,t,n))}function So(e,t,n){return xo(e,wo(e,t,n))}function Co(e,t){if(vn(e))return!1;if(de(e))return!0;if(!ce(e))return!1;if(ro(e))return t;var n=d.nativeMethods.nodeParentNodeGetter.call(e),o=!Fe(n),r=no(e),i=B(r,function(e){return"br"===je(e)});return o||i}function To(a,e){var l={node:null,offset:e};return function e(t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(t),i=it(r);if(l.node)return l;if(mo(t))return l;if(de(t)){if(l.offset<=t.nodeValue.length)return l.node=t,l;t.nodeValue.length&&(!l.node&&so(a,t)&&l.offset--,l.offset-=t.nodeValue.length)}else if(ce(t)){if(!to(t))return l;if(0===l.offset&&Co(t,!1))return l.node=t,l.offset=(n=t,o=0,J(d.nativeMethods.nodeChildNodesGetter.call(n),function(e,t){return o=t,"br"===je(e)})?o:0),l;(l.node||!io(a,t)&&!so(a,t))&&(i||"br"!==je(t))||l.offset--}for(var s=0;s<i;s++)l=e(r[s]);return l}(a)}function xo(i,e){var s=e.node,a=e.offset,l=0,u=!1;return function e(t){var n=d.nativeMethods.nodeChildNodesGetter.call(t),o=it(n);if(u)return l;if(tt(s,t))return(io(i,t)||so(i,t))&&l++,u=!0,l+a;if(mo(t))return l;!o&&t.nodeValue&&t.nodeValue.length?(!u&&so(i,t)&&l++,l+=t.nodeValue.length):(!o&&ce(t)&&"br"===je(t)||!u&&(io(i,t)||so(i,t)))&&l++;for(var r=0;r<o;r++)l=e(n[r]);return l}(i)}function Mo(e){var t,n,o,r,i,s=de(e)?e:uo(e,!0);if(!s||(t=s,o=de(n=e)?n:ao(n,!1),r=t===o,i=t.nodeValue===String.fromCharCode(10),r&&i&&function(e,t){for(var n=["pre","pre-wrap","pre-line"];e!==t;)if(e=d.nativeMethods.nodeParentNodeGetter.call(e),-1<G(n,mn(e,"white-space")))return 1}(t,n)))return 0;var a=te(e).createRange();return a.selectNodeContents(s),xo(e,{node:s,offset:a.endOffset})}var Po=Object.freeze({__proto__:null,getFirstVisibleTextNode:lo,getLastTextNode:uo,getFirstNonWhitespaceSymbolIndex:co,getLastNonWhitespaceSymbolIndex:fo,isInvisibleTextNode:ho,findContentEditableParent:vo,getNearestCommonAncestor:Eo,getSelection:function(e,t,n){return{startPos:bo(e,t,n),endPos:wo(e,t,n)}},getSelectionStartPosition:_o,getSelectionEndPosition:So,calculateNodeAndOffsetByPosition:To,calculatePositionByNodeAndOffset:xo,getElementBySelection:function(e){var t=Eo(e.anchorNode,e.focusNode);return de(t)?t.parentElement:t},getFirstVisiblePosition:function(e){var t=de(e)?e:lo(e),n=te(e).createRange();return t?(n.selectNodeContents(t),xo(e,{node:t,offset:n.startOffset})):0},getLastVisiblePosition:Mo,getContentEditableValue:function(e){return D(function e(t){var n=[],o=d.nativeMethods.nodeChildNodesGetter.call(t),r=it(o);mo(t)||r||!de(t)||n.push(t);for(var i=0;i<r;i++)n=n.concat(e(o[i]));return n}(e),function(e){return e.nodeValue}).join("")}}),No=f.utils.browser,Io=f.nativeMethods,Oo=f.eventSandbox.selection,Ro="backward",Ao="forward",Lo="none",Vo=Lo,Fo=0,ko=0,Do=0,Wo=0,qo=0,Uo=0;function Ho(e,t,n,o){var r,i,s,a=null,l=null,u=!1;void 0!==t&&void 0!==n&&n<t&&(s=t,t=n,n=s,u=!0),void 0===t&&(l={node:(r=lo(e))||e,offset:r&&r.nodeValue?co(r.nodeValue):0}),void 0===n&&(a={node:(i=uo(e,!0))||e,offset:i&&i.nodeValue?fo(i.nodeValue):0}),l=l||To(e,t),a=a||To(e,n),l.node&&a.node&&(u?Ko(a,l,o):Ko(l,a,o))}function Go(e){var t=e?te(e):gs,n=t.getSelection(),o=null,r=!1;return n&&(n.isCollapsed||((o=t.createRange()).setStart(n.anchorNode,n.anchorOffset),o.setEnd(n.focusNode,n.focusOffset),r=o.collapsed,o.detach())),r}function Bo(e,t,n){var o=xo(e,t);return xo(e,n)<o}function jo(e){return Fe(e)?Jo(e)?_o(e,Yo(e),Go(e)):0:Oo.getSelection(e).start}function zo(e){return Fe(e)?Jo(e)?So(e,Yo(e),Go(e)):0:Oo.getSelection(e).end}function Yo(e){var t=te(e);return t?t.getSelection():ms.getSelection()}function Ko(e,t,n){var o=e.node,r=t.node,i=o.nodeValue?o.length:0,s=r.nodeValue?r.length:0,a=e.offset,l=t.offset;ce(o)&&a||(a=Math.min(i,e.offset)),ce(r)&&l||(l=Math.min(s,t.offset));var u=vo(o),c=Bo(u,e,t),d=Yo(u),f=te(u).createRange();Oo.wrapSetterSelection(u,function(){var e;d.removeAllRanges(),c?No.isIE?(f.setStart(r,l),f.setEnd(o,a),d.addRange(f)):(f.setStart(o,a),f.setEnd(o,a),d.addRange(f),e=function(e,t){try{d.extend(e,t)}catch(e){return!1}return!0},(No.isSafari||No.isChrome&&No.version<58)&&ho(r)?e(r,Math.min(l,1))||e(r,0):e(r,l)):(f.setStart(o,a),f.setEnd(r,l),d.addRange(f))},n,!0)}function Jo(e){var t=Yo(e);return!(!t.anchorNode||!t.focusNode)&&et(e,t.anchorNode)&&et(e,t.focusNode)}No.isIE&&_t(gs,"selectionchange",function(){var e=null,t=null,n=null;try{if(this.selection)t=this.selection.createRange();else{if(!(e=Io.documentActiveElementGetter.call(this))||!Le(e))return void(Vo=Lo);var o,r=jo(e),i=zo(e);e.createTextRange?((t=e.createTextRange()).collapse(!0),t.moveStart("character",r),t.moveEnd("character",i-r)):gs.createRange&&(t=gs.createRange(),o=f.nativeMethods.nodeFirstChildGetter.call(e),t.setStart(o,r),t.setEnd(o,i),n=t.getBoundingClientRect())}}catch(e){return void(Vo=Lo)}var s=n?Math.ceil(n.left):t.offsetLeft,a=n?Math.ceil(n.top):t.offsetTop,l=n?Math.ceil(n.height):t.boundingHeight,u=n?Math.ceil(n.width):t.boundingWidth,c=t.htmlText?t.htmlText.length:0;!function(e,t,n,o,r){if(r)switch(Vo){case Lo:t===Uo&&(e===Wo||Do<n)?Vo=Ao:(e<Wo||t<Uo)&&(Vo=Ro);break;case Ao:if(e===Wo&&t===Uo||e<Wo&&Do<n||t===Uo&&n===Do&&qo<r&&e+o!==Fo)break;(e<Wo||t<Uo)&&(Vo=Ro);break;case Ro:if((e<Wo||t<Uo)&&qo<r)break;t===ko&&(Fo<=e||Do<n)&&(Vo=Ao)}else Fo=e,ko=t,Vo=Lo;Do=n,Wo=e,qo=r,Uo=t}(s,a,l,u,n?t.toString().length:c)},!0);var Xo,$o,Qo=Object.freeze({__proto__:null,hasInverseSelectionContentEditable:Go,isInverseSelectionContentEditable:Bo,getSelectionStart:jo,getSelectionEnd:zo,hasInverseSelection:function(e){return Fe(e)?Go(e):(Oo.getSelection(e).direction||Vo)===Ro},getSelectionByElement:Yo,select:function(e,t,n){var o,r,i,s;Fe(e)?Ho(e,t,n,!0):(o=t||0,i=!1,s=null,(r=void 0===n?ct(e).length:n)<o&&(s=o,o=r,r=s,i=!0),Oo.setSelection(e,o,r,i?Ro:Ao),Vo=t===n?Lo:i?Ro:Ao)},selectByNodesAndOffsets:Ko,deleteSelectionContents:function(e,t){var n,o,r,i,s,a,l,u,c,d,f,h,p=jo(e),m=zo(e);t&&Ho(e),p!==m&&(n=Yo(e),o=n.anchorNode,r=n.focusNode,i=n.anchorOffset,s=n.focusOffset,a=co(o.nodeValue),l=fo(o.nodeValue),u=co(r.nodeValue),c=fo(r.nodeValue),f=d=null,de(o)&&(i<a&&0!==i?d=0:i!==o.nodeValue.length&&(ho(o)&&0!==i||l<i)&&(d=o.nodeValue.length)),de(r)&&(s<u&&0!==s?f=0:s!==r.nodeValue.length&&(ho(r)&&0!==s||c<s)&&(f=r.nodeValue.length)),(No.isWebKit||No.isIE&&11<No.version)&&(null!==d&&(o.nodeValue=0===d?o.nodeValue.substring(a):o.nodeValue.substring(0,l)),null!==f&&(r.nodeValue=0===f?r.nodeValue.substring(u):r.nodeValue.substring(0,c))),null===d&&null===f||Ko({node:o,offset:d=null!==d?0===d?d:o.nodeValue.length:i},{node:r,offset:f=null!==f?0===f?f:r.nodeValue.length:s}),function(e){var t=Yo(e),n=t.rangeCount;if(n)for(var o=0;o<n;o++)t.getRangeAt(o).deleteContents()}(e),(h=Yo(e)).rangeCount&&!h.getRangeAt(0).collapsed&&h.getRangeAt(0).collapse(!0))},setCursorToLastVisiblePosition:function(e){var t=Mo(e);Ho(e,t,t)},hasElementContainsSelection:Jo}),Zo=f.Promise,er=f.nativeMethods,tr="E1000",nr="E1001",or="E1002",rr="E1003",ir="E1004",sr="E1005",ar="E1006",lr="E1007",ur="E1008",cr="E1009",dr="E1010",fr="E1011",hr="E1012",pr="E1013",mr="E1014",gr="E1015",vr="E1016",Er="E1017",yr="E1018",br="E1019",wr="E1020",_r="E1021",Sr="E1022",Cr="E1023",Tr="E1024",xr="E1025",Mr="E1026",Pr="E1027",Nr="E1028",Ir="E1029",Or="E1030",Rr="E1031",Ar="E1032",Lr="E1033",Vr="E1034",Fr="E1035",kr="E1036",Dr="E1037",Wr="E1038",qr="E1039",Ur="E1040",Hr="E1041",Gr="E1043",Br="E1044",jr="E1045",zr="E1046",Yr="E1047",Kr="E1048",Jr="E1049",Xr="E1050",$r="E1051",Qr="E1052",Zr="E1053",ei="E1054",ti="E1057",ni="E1058",oi="E1059",ri="E1060",ii="E1061",si="E1062",ai="E1063",li="E1064",ui="E1065",ci="E1066",di="E1067",fi="E1068",hi="E1069",pi="E1070",mi="E1071",gi="E1072",vi="E1073",Ei="E1074",yi="E1075",bi="E1076",wi="E1077",_i="E1078";($o=Xo=Xo||{}).TooHighConcurrencyFactor="TooHighConcurrencyFactor",$o.UseBrowserInitOption="UseBrowserInitOption",$o.RestErrorCauses="RestErrorCauses";var Si,Ci,Ti,xi,Mi,Pi=Xo,Ni=", ",Ii='"';function Oi(e,t){return"".concat(t).concat(e).concat(t)}function Ri(e,t,n){void 0===t&&(t=Ni),void 0===n&&(n=Ii);var o=y([],e,!0);if(-1<t.indexOf("\n"))return o.map(function(e){return Oi(e,n)}).join(t);if(1===o.length)return Oi(o[0],n);if(2===o.length){var r=e[0],i=e[1];return"".concat(Oi(r,n)," and ").concat(Oi(i,n))}var s=o.pop(),a=o.map(function(e){return Oi(e,n)}).join(t);return"".concat(a,", and ").concat(Oi(s,n))}(Ci=Si=Si||{}).message="message",Ci.stack="stack",Ci.pageUrl="pageUrl",(xi=Ti=Ti||{}).fn="fn",xi.dependencies="dependencies";var Ai,Li="https://testcafe.io/documentation/402639/reference/command-line-interface#file-pathglob-pattern",Vi="https://testcafe.io/documentation/402638/reference/configuration-file#filter",Fi="https://testcafe.io/documentation/402828/guides/concepts/browsers#test-in-headless-mode",ki=((Mi={})[tr]="Cannot launch multiple live mode instances of the TestCafe test runner.",Mi[nr]="Cannot launch the same live mode instance of the TestCafe test runner multiple times.",Mi[or]="The {userAgent} browser disconnected. If you did not close the browser yourself, browser performance or network issues may be at fault.",Mi[rr]="The following browsers disconnected: {userAgents}. Cannot run further tests.",Mi[li]='"{browser}" disconnected during test execution.',Mi[ir]="Cannot establish one or more browser connections.",Mi[sr]='Cannot find the browser. "{browser}" is neither a known browser alias, nor a path to an executable file.',Mi[ar]='Cannot find the "{providerName}" browser provider.',Mi[lr]="You have not specified a browser.",Mi[ur]='Could not find test files at the following location: "{cwd}".\nCheck patterns for errors:\n\n{sourceList}\n\nor launch TestCafe from a different directory.\n'+"For more information on how to specify test locations, see ".concat(Li,"."),Mi[cr]="Source files do not contain valid 'fixture' and 'test' declarations.",Mi[Or]="No tests match your filter.\n"+"See ".concat(Vi,"."),Mi[dr]='The "{name}" reporter does not exist. Check the reporter parameter for errors.',Mi[fr]='Reporters cannot share output streams. The following reporters interfere with one another: "{reporters}".',Mi[hr]='The "{optionName}" option does not contain a valid regular expression.',Mi[pr]='The "{optionName}" option does not contain a valid key-value pair.',Mi[ui]='The "{optionName}" option does not exist. Specify "attemptLimit" and "successThreshold" to configure quarantine mode.',Mi[ci]='The value of "attemptLimit" ({attemptLimit}) should be greater then the value of "successThreshold" ({successThreshold}).',Mi[di]='The "{attemptLimit}" parameter only accepts values of {MIN_ATTEMPT_LIMIT} and up.',Mi[fi]='The "{successThreshold}" parameter only accepts values of {MIN_SUCCESS_THRESHOLD} and up.',Mi[mr]="Speed should be a number between 0.01 and 1.",Mi[gr]="The concurrency factor should be an integer greater than or equal to 1.",Mi[vr]="The number of remote browsers should be divisible by the concurrency factor.",Mi[hi]='The value of the "concurrency" option includes the CDP port.',Mi[Er]='The "--ports" argument accepts two values at a time.',Mi[yr]="Port {portNum} is occupied by another process.",Mi[br]='Cannot resolve hostname "{hostname}".',Mi[wr]='Cannot find a test file at "{path}".',Mi[_r]="Cannot initialize a ClientFunction because {#instantiationCallsiteName} is {type}, and not a function.",Mi[Sr]="Cannot initialize a Selector because {#instantiationCallsiteName} is {type}, and not one of the following: a CSS selector string, a Selector object, a node snapshot, a function, or a Promise returned by a Selector.",Mi[Cr]="{#instantiationCallsiteName} cannot implicitly resolve the test run in context of which it should be executed. If you need to call {#instantiationCallsiteName} from the Node.js API callback, pass the test controller manually via {#instantiationCallsiteName}'s `.with({ boundTestRun: t })` method first. Note that you cannot execute {#instantiationCallsiteName} outside the test code.",Mi[Ei]="'request' cannot implicitly resolve the test run in context of which it should be executed. Note that you cannot execute 'request' in the experimental debug mode.",Mi[Tr]='{#instantiationCallsiteName} code, arguments or dependencies cannot contain generators or "async/await" syntax (use Promises instead).',Mi[xr]='Cannot resolve the "boundTestRun" option because its value is not a test controller.',Mi[Mr]="{smthg} ({actual}) is not of expected type ({type}).",Mi[Pr]='Invalid {what}: "{url}". TestCafe cannot execute the test because the {what} includes the {protocol} protocol. TestCafe supports the following protocols: http://, https:// and file://.',Mi[Nr]="Cannot implicitly resolve the test run in the context of which the test controller action should be executed. Use test function's 't' argument instead.",Mi[Ir]="A Promise timed out.",Mi[Rr]="You cannot manage advanced video parameters when the video recording capability is off. Specify the root storage folder for video content to enable video recording.",Mi[Ar]='You cannot call the "{methodName}" method more than once. Specify an array of parameters instead.',Mi[Lr]="Specify a file name or a writable stream as the reporter's output target.",Mi[Vr]='Unable to read the file referenced by the "{option}" ssl option ("{path}"). Error details:\n\n{err}',Mi[Fr]="Cannot prepare tests due to the following error:\n\n{errMessage}",Mi[kr]='Cannot parse a raw test file at "{path}" due to the following error:\n\n{errMessage}',Mi[Dr]="The web application failed with the following error:\n\n{errMessage}",Mi[Wr]='Unable to open the "{alias}" browser due to the following error:\n\n{errMessage}',Mi[qr]="Attempt to configure a request hook resulted in the following error:\n\n{requestHookName}: {errMsg}",Mi[Ur]='There are forbidden characters in the "{screenshotPath}" {screenshotPathType}:\n {forbiddenCharsDescription}',Mi[Hr]="TestCafe cannot record videos because it cannot locate the FFmpeg executable. Try one of the following solutions:\n\n* add the path of the FFmpeg installation directory to the PATH environment variable,\n* specify the path of the FFmpeg executable in the FFMPEG_PATH environment variable or the ffmpegPath option,\n* install the @ffmpeg-installer/ffmpeg npm package.",Mi[Gr]='"{filePath}" is not a valid TypeScript configuration file.',Mi[Br]="Initialize your client script with one of the following: a JavaScript script, a JavaScript file path, or the name of a JavaScript module.",Mi[jr]="Specify the base path for the client script file.",Mi[zr]="Client scripts can only have one initializer: JavaScript code, a JavaScript file path, or the name of a JavaScript module.",Mi[Yr]="Cannot load a client script from {path}.\n{errorMessage}",Mi[Kr]="A client script tried to load a JavaScript module that TestCafe cannot locate:\n\n{errorMessage}.",Mi[Jr]="This method cannot be called on a service host.",Mi[Xr]="The specified payload is too large to form an IPC packet.",Mi[$r]="Cannot process a malformed IPC message.",Mi[Qr]="Cannot create an IPC message due to an unexpected IPC head packet.",Mi[Zr]="Cannot create an IPC message due to an unexpected IPC body packet.",Mi[ei]="Cannot create an IPC message due to an unexpected IPC tail packet.",Mi[ti]="Your Linux version does not have a graphic subsystem to run {browserAlias} with a GUI. You can launch the browser in headless mode. If you use a portable browser executable, specify the browser alias before the path instead of the 'path' prefix. "+"For more information, see ".concat(Fi),Mi[ni]='The "{methodName}" method of the "{reporterName}" reporter produced an uncaught error. Error details:\n{originalError}',Mi[oi]="You cannot specify relative login page URLs in the Role constructor. Use an absolute URL.",Mi[ri]="Cannot load the TypeScript compiler.\n{originErrorMessage}.",Mi[ii]="You cannot specify options for the {noncustomizableCompilerList} compiler{suffix}.",Mi[si]="Cannot enable the 'retryTestPages' option. Apply one of the following two solutions:\n-- set 'localhost' as the value of the 'hostname' option\n-- run TestCafe over HTTPS\n",Mi[ai]="{originErrorMessage}\n{numOfNotOpenedConnection} of {numOfAllConnections} browser connections have not been established:\n{listOfNotOpenedConnections}\n\nHints:\n{listOfHints}",Mi[Pi.TooHighConcurrencyFactor]="The host machine may not be powerful enough to handle the specified concurrency factor ({concurrencyFactor}). Try to decrease the concurrency factor or allocate more computing resources to the host machine.",Mi[Pi.UseBrowserInitOption]='Increase the value of the "browserInitTimeout" option if it is too low (currently: {browserInitTimeoutMsg}). This option determines how long TestCafe waits for browsers to be ready.',Mi[Pi.RestErrorCauses]="The error can also be caused by network issues or remote device failure. Make sure that your network connection is stable and you can reach the remote device.",Mi[pi]="Cannot locate a TestCafe configuration file at {filePath}. Either the file does not exist, or the path is invalid.",Mi[mi]="Insecure token declaration: cannot declare a Dashboard token in a JSON configuration file. Use a JavaScript configuration file, or declare a Dashboard token with one of the following: the CLI, the Test Runner API, the TESTCAFE_DASHBOARD_TOKEN environment variable.",Mi[yi]='The value of the baseUrl argument cannot be relative: "{baseUrl}"',Mi[gi]="Requested url isn't valid ({actualValue}).",Mi[vi]="The request was interrupted by an error:\n{message}",Mi[bi]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors: '.concat(Ri(Object.keys(Si)),"."),Mi[wi]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors callback: '.concat(Ri(Object.keys(Ti)),"."),Mi[_i]='TestCafe terminated the test run. The "{path}" file contains an unknown Chrome User Flow action "{action}". Remove the action to continue. Refer to the following article for the definitive list of supported Chrome User Flow actions: https://testcafe.io/documentation/403998/guides/experimental-capabilities/chrome-replay-support#supported-replay-actions',Mi[Ir]),Di=(g(Wi,Ai=Error),Wi);function Wi(){var e=Ai.call(this,ki)||this;return e.code=Ir,e}function qi(e){var t=e.replace(/^\+/g,"plus").replace(/\+\+/g,"+plus").split("+");return D(t,function(e){return e.replace("plus","+")})}function Ui(e){var t=1===e.length||"space"===e?e:e.toLowerCase();return s.modifiersMap[t]&&(t=s.modifiersMap[t]),t}var Hi,Gi,Bi=f.utils.trim,ji=f.utils.html,zi=f.nativeMethods,Yi={run:"run",idle:"idle"};(Gi=Hi=Hi||{}).ok="ok",Gi.closing="closing";var Ki=Hi,Ji=gs.location.href,Xi=gs.location.origin,$i=Xi+"/service-worker.js",Qi="file://",Zi=!1,es=null,ts=eval;function ns(t){return new c(function(e){return setTimeout(e,t)})}function os(e,r,t){var n=void 0===t?{}:t,o=n.method,i=void 0===o?"GET":o,s=n.data,a=void 0===s?null:s,l=n.parseResponse,u=void 0===l||l;return new c(function(t,n){var o=r();o.open(i,e,!0),o.onreadystatechange=function(){var e;4===o.readyState&&(200===o.status?((e=o.responseText||"")&&u&&(e=JSON.parse(o.responseText)),t(e)):n("disconnected"))},o.send(a)})}function rs(e){return Ji.toLowerCase()===e.toLowerCase()}function is(){Zi=!1}function ss(e,t,n){var o;is(),void 0===(o=e.url)&&(o=""),0===o.indexOf(Qi)?os(n,t,{method:"POST",data:JSON.stringify({url:e.url})}):gs.location=e.url}function as(e){return(e.cmd===Yi.run||e.cmd===Yi.idle)&&!rs(e.url)}function ls(e,r,t){var i=e.statusUrl,s=e.openFileProtocolUrl,n=void 0===t?{}:t,a=n.manualRedirect,l=n.proxyless;return v(this,void 0,void 0,function(){var n,o;return E(this,function(e){switch(e.label){case 0:return[4,os(i,r)];case 1:return n=e.sent(),(o=l?(t=n).cmd!==Yi.idle||as(t):as(n))&&!a&&ss(n,r,s),[2,{command:n,redirecting:o}]}var t})})}var us=Object.freeze({__proto__:null,delay:ns,sendXHR:os,startHeartbeat:function(e,t){function n(){os(e,t).then(function(e){e.code!==Ki.closing||rs(e.url)||(is(),gs.location=e.url)})}es=ms.setInterval(n,2e3),n()},stopHeartbeat:function(){ms.clearInterval(es)},startInitScriptExecution:function(e,t){Zi=!0,function e(t,n){Zi&&os(t,n).then(function(e){return e.code?os(t,n,{method:"POST",data:JSON.stringify(ts(e.code))}):null}).then(function(){ms.setTimeout(function(){return e(t,n)},1e3)})}(e,t)},stopInitScriptExecution:is,redirect:ss,checkStatus:function(){for(var r,i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return v(this,void 0,void 0,function(){var t,n,o;return E(this,function(e){switch(e.label){case 0:n=t=null,o=0,e.label=1;case 1:return o<5?[4,function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return v(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,ls.apply(void 0,n)];case 1:return[2,e.sent()];case 2:return t=e.sent(),console.error(t),[2,{error:t}];case 3:return[2]}})})}.apply(void 0,i)]:[3,5];case 2:return r=e.sent(),t=r.error,n=function(e,t){var n={};for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}(r,["error"]),t?[4,ns(1e3)]:[2,n];case 3:e.sent(),e.label=4;case 4:return o++,[3,1];case 5:throw t}})})},enableRetryingTestPages:function(){return v(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:if(!navigator.serviceWorker)return[2];e.label=1;case 1:return e.trys.push([1,4,,5]),[4,navigator.serviceWorker.register($i,{scope:Xi})];case 2:return e.sent(),[4,navigator.serviceWorker.ready];case 3:return e.sent(),[3,5];case 4:return t=e.sent(),console.error(t),[3,5];case 5:return[2]}})})},getActiveWindowId:function(e,t){return os(e,t)},setActiveWindowId:function(e,t,n){return os(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},closeWindow:function(e,t,n){return os(e,t,{method:"POST",data:JSON.stringify({windowId:n})})}}),cs={};cs.RequestBarrier=h,cs.ClientRequestEmitter=x,cs.ScriptExecutionBarrier=P,cs.ScriptExecutionEmitter=L,cs.pageUnloadBarrier=Ht,cs.preventRealEvents=function(){_n.initElementListening(ms,Cn),_n.addFirstInternalEventBeforeListener(ms,Cn,xn),Yt.init()},cs.disableRealEventsPreventing=function(){_n.removeInternalEventBeforeListener(ms,Cn,xn)},cs.scrollController=Yt,cs.ScrollAutomation=$n,cs.serviceUtils=Bt,cs.domUtils=ft,cs.contentEditable=Po,cs.positionUtils=jn,cs.styleUtils=bn,cs.scrollUtils=Ln,cs.eventUtils=Mt,cs.arrayUtils=X,cs.promiseUtils=Yn,cs.textSelection=Qo,cs.waitFor=function(i,s,a){return new Zo(function(e,t){var n,o,r=i();r?e(r):(n=er.setInterval.call(ms,function(){(r=i())&&(er.clearInterval.call(ms,n),er.clearTimeout.call(ms,o),e(r))},s),o=er.setTimeout.call(ms,function(){er.clearInterval.call(ms,n),t()},a))})},cs.delay=u,cs.getTimeLimitedPromise=function(e,t){return d.Promise.race([e,u(t).then(function(){return d.Promise.reject(new Di)})])},cs.noop=function(){},cs.getKeyArray=qi,cs.getSanitizedKey=Ui,cs.parseKeySequence=function(e){if("string"!=typeof e)return{error:!0};var t=(e=Bi(e).replace(/\s+/g," ")).length,n=e.charAt(t-1),o=e.charAt(t-2);1<t&&"+"===n&&!/[+ ]/.test(o)&&(e=e.substring(0,e.length-1));var r=e.split(" ");return{combinations:r,error:B(r,function(e){var t=qi(e);return B(t,function(e){var t=1===e.length||"space"===e,n=Ui(e),o=s.modifiers[n],r=s.specialKeys[n];return!(t||o||r)})}),keys:e}},cs.sendRequestToFrame=Xn,cs.KEY_MAPS=s,cs.browser=us,cs.stringifyElement=function(e){if(!e)return"";var t,n,o,r=zi.cloneNode.call(e),i=ji.cleanUpHtml(zi.elementOuterHTMLGetter.call(r)),s=(t=zi.nodeTextContentGetter.call(e),n=10,void 0===o&&(o="..."),t.length<n?t:t.substring(0,n-o.length)+o),a=zi.elementChildrenGetter.call(e);return 0<zi.htmlCollectionLengthGetter.call(a)?i.replace("></",">...</"):s?i.replace("></",">".concat(s,"</")):i},cs.selectorTextFilter=function o(e,r,i,s){function t(e){for(var t=e.childNodes.length,n=0;n<t;n++)if(o(e.childNodes[n],r,i,s))return!0;return!1}function n(e){return s instanceof RegExp?s.test(e):s===e.trim()}if(1===e.nodeType)return n(e.innerText||e.textContent);if(9!==e.nodeType)return 11===e.nodeType?t(e):n(e.textContent);var a=e.querySelector("head"),l=e.querySelector("body");return t(a)||t(l)},cs.selectorAttributeFilter=function(e,t,n,o,r){if(1!==e.nodeType)return!1;function i(e,t){return"string"==typeof t?t===e:t.test(e)}for(var s,a=e.attributes,l=0;l<a.length;l++)if(i((s=a[l]).nodeName,o)&&(!r||i(s.nodeValue,r)))return!0;return!1};var ds=f.nativeMethods,fs=f.EVENTS.evalIframeScript;ds.objectDefineProperty(ms,"%testCafeCore%",{configurable:!0,value:cs}),f.on(fs,function(e){return ps(ds.contentWindowGetter.call(e.iframe))});var hs=f.eventSandbox.message;hs.on(hs.SERVICE_MSG_RECEIVED_EVENT,function(e){var t,n,o,r,i;e.message.cmd===$n.SCROLL_REQUEST_CMD&&(n=(t=e.message).offsetX,o=t.offsetY,r=t.maxScrollMargin,i=rt(e.source),new $n(i,{offsetX:n,offsetY:o},r).run().then(function(){return hs.sendServiceMsg({cmd:$n.SCROLL_RESPONSE_CMD},e.source)}))})}(ms["%hammerhead%"],ms["%hammerhead%"].Promise)}(window);
|
|
1
|
+
window["%hammerhead%"].utils.removeInjectedScript(),function di(fi){var hi=fi.document;!function(d,u){var f="default"in d?d.default:d;u=u&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u;var e=f.utils.browser,t={alt:18,ctrl:17,meta:91,shift:16},n={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=","{":"[","}":"]",":":";",'"':"'","|":"\\","<":",",">":".","?":"/","±":"§"},o={backspace:8,capslock:20,delete:46,down:40,end:35,enter:13,esc:27,home:36,ins:45,left:37,pagedown:34,pageup:33,right:39,space:32,tab:9,up:38},r={left:e.isIE?"Left":"ArrowLeft",down:e.isIE?"Down":"ArrowDown",right:e.isIE?"Right":"ArrowRight",up:e.isIE?"Up":"ArrowUp",backspace:"Backspace",capslock:"CapsLock",delete:"Delete",end:"End",enter:"Enter",esc:"Escape",home:"Home",ins:"Insert",pagedown:"PageDown",pageup:"PageUp",space:e.isIE?"Spacebar":" ",tab:"Tab",alt:"Alt",ctrl:"Control",meta:"Meta",shift:"Shift"};function i(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n}var a={modifiers:t,shiftMap:n,specialKeys:o,keyProperty:r,modifiersMap:{option:"alt"},symbolCharCodeToKeyCode:{96:192,91:219,93:221,92:220,59:186,39:222,44:188,45:e.isFirefox?173:189,46:190,47:191},symbolKeysCharCodes:{109:45,173:45,186:59,187:61,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,110:46,96:48,97:49,98:50,99:51,100:52,101:53,102:54,103:55,104:56,105:57,107:43,106:42,111:47},reversedModifiers:i(t),reversedShiftMap:i(n),reversedSpecialKeys:i(o),reversedKeyProperty:i(r)},s=f.Promise,l=f.nativeMethods;function c(t){return new s(function(e){return l.setTimeout.call(fi,e,t)})}var h=(p.prototype._startListening=function(){var t=this;this._emitter.onRequestSend(function(e){return t._onRequestSend(e)}),this._emitter.onRequestCompleted(function(e){return t._onRequestCompleted(e)}),this._emitter.onRequestError(function(e){return t._onRequestError(e)})},p.prototype._offListening=function(){this._emitter.offAll()},p.prototype._onRequestSend=function(e){this._collectingReqs&&this._requests.add(e)},p.prototype._onRequestCompleted=function(e){var t=this;c(this._delays.additionalRequestsCollection).then(function(){return t._onRequestFinished(e)})},p.prototype._onRequestFinished=function(e){this._requests.has(e)&&(this._requests.delete(e),this._collectingReqs||this._requests.size||!this._watchdog||this._finishWaiting())},p.prototype._onRequestError=function(e){this._onRequestFinished(e)},p.prototype._finishWaiting=function(){this._watchdog&&((0,d.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._requests.clear(),this._offListening(),this._waitResolve()},p.prototype.wait=function(e){var n=this;return c(e?this._delays.pageInitialRequestsCollection:this._delays.requestsCollection).then(function(){return new d.Promise(function(e){var t;n._collectingReqs=!1,n._waitResolve=e,n._requests.size?(t=d.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},p.TIMEOUT)):n._finishWaiting()})})},p.TIMEOUT=3e3,p);function p(e,t){var n,o,r;void 0===t&&(t={}),this._delays={requestsCollection:null!==(n=t.requestsCollection)&&void 0!==n?n:50,additionalRequestsCollection:null!==(o=t.additionalRequestsCollection)&&void 0!==o?o:50,pageInitialRequestsCollection:null!==(r=t.pageInitialRequestsCollection)&&void 0!==r?r:50},this._emitter=e,this._waitResolve=null,this._watchdog=null,this._requests=new Set,this._collectingReqs=!0,this._startListening()}var m=function(e,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function E(e,a,s,l){return new(s=s||u)(function(n,t){function o(e){try{i(l.next(e))}catch(e){t(e)}}function r(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,r)}i((l=l.apply(e,a||[])).next())})}function v(n,o){var r,i,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function e(t){return function(e){return function(t){if(r)throw new TypeError("Generator is already executing.");for(;l&&t[l=0]&&(s=0),s;)try{if(r=1,i&&(a=2&t[0]?i.return:t[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,t[1])).done)return a;switch(i=0,a&&(t=[2&t[0],a.value]),t[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,i=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],i=0}finally{r=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}function y(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||((o=o||Array.prototype.slice.call(t,0,r))[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var b=(C.prototype.on=function(e,t){this._eventsListeners[e]||(this._eventsListeners[e]=[]),this._eventsListeners[e].push(t)},C.prototype.once=function(n,o){var r=this;this.on(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.off(n,o),o.apply(void 0,e)})},C.prototype.off=function(e,t){var n=this._eventsListeners[e];n&&(this._eventsListeners[e]=d.nativeMethods.arrayFilter.call(n,function(e){return e!==t}))},C.prototype.offAll=function(e){e?this._eventsListeners[e]=[]:this._eventsListeners={}},C.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=this._eventsListeners[t];if(o)for(var r=0;r<o.length;r++)try{o[r].apply(this,e)}catch(e){if(!(e.message&&-1<e.message.indexOf("freed script")))throw e;this.off(t,o[r])}},C);function C(){this._eventsListeners={}}var S,w="request-send",T="request-completed",_="request-error",I=(g(P,S=b),P.prototype._addHammerheadListener=function(e,t){f.on(e,t),this._hammerheadListenersInfo.push({evt:e,listener:t})},P.prototype.onRequestSend=function(e){this.on(w,e)},P.prototype.onRequestCompleted=function(e){this.on(T,e)},P.prototype.onRequestError=function(e){this.on(_,e)},P.prototype.offAll=function(){S.prototype.offAll.call(this);for(var e=0,t=this._hammerheadListenersInfo;e<t.length;e++){var n=t[e];f.off.call(f,n.evt,n.listener)}},P);function P(){var n=S.call(this)||this;return n._hammerheadListenersInfo=[],n._addHammerheadListener(f.EVENTS.beforeXhrSend,function(e){var t=e.xhr;return n.emit(w,t)}),n._addHammerheadListener(f.EVENTS.xhrCompleted,function(e){var t=e.xhr;return n.emit(T,t)}),n._addHammerheadListener(f.EVENTS.xhrError,function(e){var t=e.xhr;return n.emit(_,t)}),n._addHammerheadListener(f.EVENTS.fetchSent,function(e){n.emit(w,e),e.then(function(){return n.emit(T,e)},function(){return n.emit(_,e)})}),n}var N=(x.prototype._startListening=function(){var t=this;this._emitter.onScriptAdded(function(e){return t._onScriptElementAdded(e)}),this._emitter.onScriptLoadedOrFailed(function(e){return t._onScriptLoadedOrFailed(e)})},x.prototype._offListening=function(){this._emitter.offAll()},x.prototype._onScriptElementAdded=function(e){var t=this,n=(0,d.nativeMethods.setTimeout)(function(){return t._onScriptLoadedOrFailed(e,!0)},x.LOADING_TIMEOUT);this._scripts.set(e,n)},x.prototype._onScriptLoadedOrFailed=function(e,t){var n=this;void 0===t&&(t=!1),this._scripts.has(e)&&(t||(0,d.nativeMethods.clearTimeout)(this._scripts.get(e)),this._scripts.delete(e),this._scripts.size||c(25).then(function(){n._waitResolve&&!n._scripts.size&&n._finishWaiting()}))},x.prototype._finishWaiting=function(){this._watchdog&&((0,d.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._scripts.clear(),this._offListening(),this._waitResolve(),this._waitResolve=null},x.prototype.wait=function(){var n=this;return new d.Promise(function(e){var t;n._waitResolve=e,n._scripts.size?(t=d.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},x.TIMEOUT)):n._finishWaiting()})},x.TIMEOUT=3e3,x.LOADING_TIMEOUT=2e3,x);function x(e){this._emitter=e,this._watchdog=null,this._waitResolve=null,this._scripts=new Map,this._startListening()}var R,M=f.nativeMethods,O="script-added",F="script-loaded-or-failed",A=(g(L,R=b),L.prototype._onScriptElementAdded=function(e){var t,n=this,o=M.scriptSrcGetter.call(e);void 0!==o&&""!==o&&(this.emit(O,e),t=function(){M.removeEventListener.call(e,"load",t),M.removeEventListener.call(e,"error",t),n.emit(F,e)},M.addEventListener.call(e,"load",t),M.addEventListener.call(e,"error",t))},L.prototype.onScriptAdded=function(e){this.on(O,e)},L.prototype.onScriptLoadedOrFailed=function(e){this.on(F,e)},L.prototype.offAll=function(){R.prototype.offAll.call(this),f.off(f.EVENTS.scriptElementAdded,this._onScriptElementAdded)},L);function L(){var n=R.call(this)||this;return n._scriptElementAddedListener=function(e){var t=e.el;return n._onScriptElementAdded(t)},f.on(f.EVENTS.scriptElementAdded,n._scriptElementAddedListener),n}function V(e){var t="array"+e.charAt(0).toUpperCase()+e.slice(1),n=d.nativeMethods[t];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.call.apply(n,e)}}var W=V("filter"),k=V("map"),H=V("slice"),D=V("splice"),U=V("unshift"),q=V("forEach"),B=V("indexOf"),G=V("some"),j=V("reverse"),z=V("reduce"),J=V("concat"),K=V("join");function Y(e,t){if(d.nativeMethods.arrayFind)return d.nativeMethods.arrayFind.call(e,t);for(var n=e.length,o=0;o<n;o++)if(t(e[o],o,e))return e[o];return null}var X=Object.freeze({__proto__:null,filter:W,map:k,slice:H,splice:D,unshift:U,forEach:q,indexOf:B,some:G,reverse:j,reduce:z,concat:J,join:K,isArray:function(e){return"[object Array]"===d.nativeMethods.objectToString.call(e)},from:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(d.nativeMethods.arrayFrom)return d.nativeMethods.arrayFrom.apply(d.nativeMethods,y([e],t,!1));for(var o=[],r=e.length,i=0;i<r;i++)o.push(e[i]);return o},find:Y,remove:function(e,t){var n=d.nativeMethods.arrayIndexOf.call(e,t);-1<n&&d.nativeMethods.arraySplice.call(e,n,1)},equals:function(e,t){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!1;return!0},getCommonElement:function(e,t){for(var n=0;n<e.length;n++)for(var o=0;o<t.length;o++)if(e[n]===t[o])return e[n];return null}}),Q=f.utils.browser,$=f.nativeMethods,Z=f.utils.style.get,ee=f.utils.dom.getActiveElement,te=f.utils.dom.findDocument,ne=f.utils.dom.find,oe=f.utils.dom.isElementInDocument,re=f.utils.dom.isElementInIframe,ie=f.utils.dom.getIframeByElement,ae=f.utils.dom.isCrossDomainWindows,se=f.utils.dom.getSelectParent,le=f.utils.dom.getChildVisibleIndex,ce=f.utils.dom.getSelectVisibleChildren,ue=f.utils.dom.isElementNode,de=f.utils.dom.isTextNode,fe=f.utils.dom.isRenderedNode,he=f.utils.dom.isIframeElement,pe=f.utils.dom.isInputElement,me=f.utils.dom.isButtonElement,ge=f.utils.dom.isFileInput,Ee=f.utils.dom.isTextAreaElement,ve=f.utils.dom.isAnchorElement,ye=f.utils.dom.isImgElement,be=f.utils.dom.isFormElement,Ce=f.utils.dom.isLabelElement,Se=f.utils.dom.isSelectElement,we=f.utils.dom.isRadioButtonElement,Te=f.utils.dom.isColorInputElement,_e=f.utils.dom.isCheckboxElement,Ie=f.utils.dom.isOptionElement,Pe=f.utils.dom.isSVGElement,Ne=f.utils.dom.isMapElement,xe=f.utils.dom.isBodyElement,Re=f.utils.dom.isHtmlElement,Me=f.utils.dom.isDocument,Oe=f.utils.dom.isWindow,Fe=f.utils.dom.isTextEditableInput,Ae=f.utils.dom.isTextEditableElement,Le=f.utils.dom.isTextEditableElementAndEditingAllowed,Ve=f.utils.dom.isContentEditableElement,We=f.utils.dom.isDomElement,ke=f.utils.dom.isShadowUIElement,He=f.utils.dom.isShadowRoot,De=f.utils.dom.isElementFocusable,Ue=f.utils.dom.isHammerheadAttr,qe=f.utils.dom.isElementReadOnly,Be=f.utils.dom.getScrollbarSize,Ge=f.utils.dom.getMapContainer,je=f.utils.dom.getTagName,ze=f.utils.dom.closest,Je=f.utils.dom.getParents,Ke=f.utils.dom.findParent,Ye=f.utils.dom.getTopSameDomainWindow,Xe=f.utils.dom.getParentExceptShadowRoot;function Qe(e,t){var n,o={el:n=e,skip:n.shadowRoot&&n.tabIndex<0,children:{}};if(e=e.shadowRoot||e,he(e)&&(e=$.contentDocumentGetter.call(e)),e&&(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE||e.nodeType===Node.DOCUMENT_NODE))for(var r=0,i=function(e){for(var t,n=e.querySelectorAll("*"),o=function(e){for(var t=[],n=0;n<e.length;n++)"none"===Z(e[n],"display")&&t.push(e[n]);return t}(n),r=/^(input|button|select|textarea)$/,i=[],a=null,s=null,l=null,c=!1,u=0;u<n.length;u++){a=n[u],s=je(a),l=$e(a),c=!1,function(e,t,n){var o=null;return t.nodeType===Node.DOCUMENT_NODE&&(o=$.documentActiveElementGetter.call(t)),e===o||!(e.disabled||"none"===Z(e,"display")||"hidden"===Z(e,"visibility")||(Q.isIE||Q.isAndroid)&&Ie(e)||null!==n&&n<0)}(a,e,l)&&(r.test(s)||a.shadowRoot||he(a)?c=!0:ve(a)&&a.hasAttribute("href")&&(c=""!==a.getAttribute("href")||!Q.isIE||null!==l),""!==(t=a.getAttribute("contenteditable"))&&"true"!==t||(c=!0),null!==l&&(c=!0),c&&i.push(a))}return W(i,function(e){return!Ze(o,e)})}(e);r<i.length;r++){var a=i[r],s=!t||a.tabIndex<=0?-1:a.tabIndex;o.children[s]=o.children[s]||[],o.children[s].push(Qe(a,t))}return o}function $e(e){var t=$.getAttribute.call(e,"tabindex");return null!==t&&(t=parseInt(t,10),t=isNaN(t)?null:t),t}function Ze(e,t){return e.contains?e.contains(t):G(e,function(e){return e.contains(t)})}function et(e,t){if(nt(t,e))return!0;for(var n=$.nodeChildNodesGetter.call(e),o=st(n),r=0;r<o;r++){var i=n[r];if(!ke(i)&&et(i,t))return!0}return!1}function tt(e,t){var n=e.querySelectorAll(je(t));return B(n,t)}function nt(e,t){return e&&t&&e.isSameNode?e.isSameNode(t):e===t}function ot(t){if(!t.setTimeout)return!1;var e=null;try{e=t.frameElement}catch(e){return!!t.top}return!(!Q.isFirefox&&!Q.isWebKit||t.top===t||e)||!(!e||!$.contentDocumentGetter.call(e))}function rt(e){try{return e.top===e}catch(e){return!1}}function it(e){var t=[];ne(hi,"*",function(e){"IFRAME"===e.tagName&&t.push(e),e.shadowRoot&&ne(e.shadowRoot,"iframe",function(e){return t.push(e)})});for(var n=0;n<t.length;n++)if($.contentWindowGetter.call(t[n])===e)return t[n];return null}function at(e){return $.htmlCollectionLengthGetter.call(e)}function st(e){return $.nodeListLengthGetter.call(e)}function lt(e){return $.inputValueGetter.call(e)}function ct(e){return $.textAreaValueGetter.call(e)}function ut(e,t){return $.inputValueSetter.call(e,t)}function dt(e,t){return $.textAreaValueSetter.call(e,t)}function ft(e){return pe(e)?lt(e):Ee(e)?ct(e):e.value}function ht(e){return e&&e.getRootNode&&te(e)!==e.getRootNode()}var pt=Object.freeze({__proto__:null,getActiveElement:ee,findDocument:te,find:ne,isElementInDocument:oe,isElementInIframe:re,getIframeByElement:ie,isCrossDomainWindows:ae,getSelectParent:se,getChildVisibleIndex:le,getSelectVisibleChildren:ce,isElementNode:ue,isTextNode:de,isRenderedNode:fe,isIframeElement:he,isInputElement:pe,isButtonElement:me,isFileInput:ge,isTextAreaElement:Ee,isAnchorElement:ve,isImgElement:ye,isFormElement:be,isLabelElement:Ce,isSelectElement:Se,isRadioButtonElement:we,isColorInputElement:Te,isCheckboxElement:_e,isOptionElement:Ie,isSVGElement:Pe,isMapElement:Ne,isBodyElement:xe,isHtmlElement:Re,isDocument:Me,isWindow:Oe,isTextEditableInput:Fe,isTextEditableElement:Ae,isTextEditableElementAndEditingAllowed:Le,isContentEditableElement:Ve,isDomElement:We,isShadowUIElement:ke,isShadowRoot:He,isElementFocusable:De,isHammerheadAttr:Ue,isElementReadOnly:qe,getScrollbarSize:Be,getMapContainer:Ge,getTagName:je,closest:ze,getParents:Je,findParent:Ke,getTopSameDomainWindow:Ye,getParentExceptShadowRoot:Xe,getFocusableElements:function(e,t){return void 0===t&&(t=!1),function e(t){var n,o=[];for(n in t.skip||t.el.nodeType===Node.DOCUMENT_NODE||he(t.el)||o.push(t.el),t.children)for(var r=0,i=t.children[n];r<i.length;r++){var a=i[r];o.push.apply(o,e(a))}return o}(Qe(e,t))},getTabIndexAttributeIntValue:$e,containsElement:Ze,getTextareaIndentInLine:function(e,t){var n=ct(e);if(!n)return 0;var o=n.substring(0,t);return t-(-1===o.lastIndexOf("\n")?0:o.lastIndexOf("\n")+1)},getTextareaLineNumberByPosition:function(e,t){for(var n=ct(e).split("\n"),o=0,r=0,i=0;o<=t;i++){if(t<=o+n[i].length){r=i;break}o+=n[i].length+1}return r},getTextareaPositionByLineAndOffset:function(e,t,n){for(var o=ct(e).split("\n"),r=0,i=0;i<t;i++)r+=o[i].length+1;return r+n},blocksImplicitSubmission:function(e){return(Q.isSafari?/^(text|password|color|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:Q.isFirefox?/^(text|password|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:Q.isIE?/^(text|password|color|date|time|datetime|datetime-local|email|file|month|number|search|tel|url|week|image)$/i:/^(text|password|datetime|email|number|search|tel|url|image)$/i).test(e.type)},isEditableElement:function(e,t){return t?Le(e)||Ve(e):Ae(e)||Ve(e)},isElementContainsNode:et,isOptionGroupElement:function(e){return"[object HTMLOptGroupElement]"===f.utils.dom.instanceToString(e)},getElementIndexInParent:tt,isTheSameNode:nt,getElementDescription:function(e){var t,n,o={id:"id",name:"name",class:"className"},r=[];for(t in r.push("<"),r.push(je(e)),o)!o.hasOwnProperty(t)||(n=e[o[t]])&&r.push(" "+t+'="'+n+'"');return r.push(">"),r.join("")},getFocusableParent:function(e){for(var t=Je(e),n=0;n<t.length;n++)if(De(t[n]))return t[n];return null},remove:function(e){e&&e.parentElement&&e.parentElement.removeChild(e)},isIFrameWindowInDOM:ot,isTopWindow:rt,findIframeByWindow:it,isEditableFormElement:function(e){return Ae(e)||Se(e)},getCommonAncestor:function(e,t){if(nt(e,t))return e;for(var n=[e].concat(Je(e)),o=t;o;){if(-1<B(n,o))return o;o=$.nodeParentNodeGetter.call(o)}return o},getChildrenLength:at,getChildNodesLength:st,getInputValue:lt,getTextAreaValue:ct,setInputValue:ut,setTextAreaValue:dt,getElementValue:ft,setElementValue:function(e,t){return pe(e)?ut(e,t):Ee(e)?dt(e,t):e.value=t},isShadowElement:ht,contains:function(t,e){return!(!t||!e)&&(t.contains?t.contains(e):!!Ke(e,!0,function(e){return e===t}))},isNodeEqual:function(e,t){return e===t},getNodeText:function(e){return $.nodeTextContentGetter.call(e)},getImgMapName:function(e){return e.useMap.substring(1)},getDocumentElement:function(e){return e.document.documentElement},isDocumentElement:function(e){return e===hi.documentElement}}),mt=f.Promise,gt=f.nativeMethods,Et=f.eventSandbox.listeners,vt=f.utils.browser,yt=f.utils.event.BUTTON,bt=f.utils.event.BUTTONS_PARAMETER,Ct=f.utils.event.DOM_EVENTS,St=f.utils.event.WHICH_PARAMETER,wt=f.utils.event.preventDefault;function Tt(e,t,n,o){vt.isIE11&&Oe(e)?gt.windowAddEventListener.call(e,t,n,o):gt.addEventListener.call(e,t,n,o)}function _t(e,t,n,o){vt.isIE11&&Oe(e)?gt.windowRemoveEventListener.call(e,t,n,o):gt.removeEventListener.call(e,t,n,o)}function It(){var n=[],e=!1;function t(){e||(hi.body?(e=!0,n.forEach(function(e){return e()})):gt.setTimeout.call(fi,t,1))}function o(){(ot(fi)||rt(fi))&&(_t(hi,"DOMContentLoaded",o),t())}return"complete"===hi.readyState?gt.setTimeout.call(fi,o,1):Tt(hi,"DOMContentLoaded",o),{then:function(e){return t=e,new mt(function(e){return n.push(function(){return e(t())})});var t}}}var Pt,Nt,xt=Object.freeze({__proto__:null,BUTTON:yt,BUTTONS_PARAMETER:bt,DOM_EVENTS:Ct,WHICH_PARAMETER:St,preventDefault:wt,bind:Tt,unbind:_t,documentReady:function(e){return void 0===e&&(e=0),It().then(function(){return Et.getEventListeners(fi,"load").length?mt.race([new mt(function(e){return Tt(fi,"load",e)}),c(e)]):null})}});(Nt=Pt=Pt||{}).ready="ready",Nt.readyForBrowserManipulation="ready-for-browser-manipulation",Nt.waitForFileDownload="wait-for-file-download";var Rt=Pt,Mt=f.Promise,Ot=f.utils.browser,Ft=f.nativeMethods,At=f.transport,Lt=30,Vt=500,Wt=!1,kt=null,Ht=!1;function Dt(){if(Ot.isIE)return function(e){qt&&Ft.clearTimeout.call(fi,qt),Ut=!0,qt=Ft.setTimeout.call(fi,function(){qt=null,Ut=!1,Bt.forEach(function(e){return e()}),Bt=[]},e)}(Lt),void c(0).then(function(){var e;"loading"===hi.readyState&&((e=Ft.documentActiveElementGetter.call(hi))&&ve(e)&&e.hasAttribute("download")||(Wt=!0))});Wt=!0}var Ut=!1,qt=null,Bt=[],Gt=Object.freeze({__proto__:null,init:function(){f.on(f.EVENTS.beforeUnload,Dt),Tt(fi,"unload",function(){Wt=!0})},watchForPageNavigationTriggers:function(){kt=function(){Ht=!0},f.on(f.EVENTS.pageNavigationTriggered,kt)},wait:function(e){void 0===e&&(e=!kt||Ht?400:0),kt&&(f.off(f.EVENTS.pageNavigationTriggered,kt),kt=null);var t=c(e).then(function(){return Wt?c(Vt).then(function(){return At.queuedAsyncServiceMsg({cmd:Rt.waitForFileDownload})}).then(function(e){if(!e)return new Mt(function(){})}).then(function(){Wt=!1}):Ut?new Mt(function(e){return Bt.push(e)}):void 0}),n=c(15e3).then(function(){Wt=!1});return Mt.race([t,n])}}),jt=b,zt=Object.freeze({__proto__:null,EventEmitter:jt,inherit:function(e,t){function n(){}n.prototype=t.prototype,f.utils.extend(e.prototype,new n),(e.prototype.constructor=e).base=t.prototype}}),Jt=d.eventSandbox.listeners;function Kt(){this.initialized=!1,this.stopPropagationFlag=!1,this.events=new jt}var Yt=(Kt.prototype._internalListener=function(e,t,n,o,r){this.events.emit("scroll",e),this.stopPropagationFlag&&(o(),r())},Kt.prototype.init=function(){var n=this;this.initialized||(this.initialized=!0,Jt.initElementListening(fi,["scroll"]),Jt.addFirstInternalEventBeforeListener(fi,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n._internalListener.apply(n,e)}))},Kt.prototype.waitForScroll=function(e){var t=this,n=null,o=new d.Promise(function(e){n=e});return o.cancel=function(){return t.events.off("scroll",n)},this.initialized?this.handleScrollEvents(e,n):n(),o},Kt.prototype.handleScrollEvents=function(n,e){var o=this;this.events.once("scroll",e),ht(n)&&(Jt.initElementListening(n,["scroll"]),Jt.addFirstInternalEventBeforeListener(n,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o._internalListener.apply(o,e),Jt.cancelElementListening(n)}))},Kt.prototype.stopPropagation=function(){this.stopPropagationFlag=!0},Kt.prototype.enablePropagation=function(){this.stopPropagationFlag=!1},new Kt),Xt=(Qt.create=function(e){return new Qt(e.top,e.right,e.bottom,e.left)},Qt.prototype.add=function(e){return this.top+=e.top,this.right+=e.right,this.bottom+=e.bottom,this.left+=e.left,this},Qt.prototype.sub=function(e){return"top"in e&&(this.top-=e.top,this.left-=e.left),this.bottom-=e.bottom,this.right-=e.right,this},Qt.prototype.round=function(e,t){return void 0===e&&(e=Math.round),void 0===t&&(t=e),this.top=e(this.top),this.right=t(this.right),this.bottom=t(this.bottom),this.left=e(this.left),this},Qt.prototype.contains=function(e){return e.x>=this.left&&e.x<=this.right&&e.y>=this.top&&e.y<=this.bottom},Qt);function Qt(e,t,n,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===o&&(o=0),this.top=e,this.right=t,this.bottom=n,this.left=o}var $t=f.utils.style,Zt=f.utils.style.getBordersWidth,en=f.utils.style.getComputedStyle,tn=f.utils.style.getElementMargin,nn=f.utils.style.getElementPadding,on=f.utils.style.getElementScroll,rn=f.utils.style.getOptionHeight,an=f.utils.style.getSelectElementSize,sn=f.utils.style.isElementVisible,ln=f.utils.style.isVisibleChild,cn=f.utils.style.getWidth,un=f.utils.style.getHeight,dn=f.utils.style.getInnerWidth,fn=f.utils.style.getInnerHeight,hn=f.utils.style.getScrollLeft,pn=f.utils.style.getScrollTop,mn=f.utils.style.setScrollLeft,gn=f.utils.style.setScrollTop,En=f.utils.style.get;function vn(e,t,n){for(var o in"string"==typeof t&&$t.set(e,t,n),t)t.hasOwnProperty(o)&&$t.set(e,o,t[o])}function yn(e,t,n){return e<t?n:e<n?t:Math.max(n,t)}function bn(e){return!!Ke(e,!0,function(e){return ue(e)&&"hidden"===$t.get(e,"visibility")})}function Cn(e){return!!Ke(e,!0,function(e){return ue(e)&&"none"===$t.get(e,"display")})}function Sn(e){return!fe(e)||Cn(e)||bn(e)}function wn(e){return e&&!(e.offsetHeight<=0&&e.offsetWidth<=0)}function Tn(e){return ue(e)&&"fixed"===$t.get(e,"position")}var _n=Object.freeze({__proto__:null,getBordersWidth:Zt,getComputedStyle:en,getElementMargin:tn,getElementPadding:nn,getElementScroll:on,getOptionHeight:rn,getSelectElementSize:an,isElementVisible:sn,isSelectVisibleChild:ln,getWidth:cn,getHeight:un,getInnerWidth:dn,getInnerHeight:fn,getScrollLeft:hn,getScrollTop:pn,setScrollLeft:mn,setScrollTop:gn,get:En,set:vn,getViewportDimensions:function(){return{width:yn(fi.innerWidth,hi.documentElement.clientWidth,hi.body.clientWidth),height:yn(fi.innerHeight,hi.documentElement.clientHeight,hi.body.clientHeight)}},getWindowDimensions:function(e){return new Xt(0,cn(e),un(e),0)},isHiddenNode:bn,isNotDisplayedNode:Cn,isNotVisibleNode:Sn,hasDimensions:wn,isFixedElement:Tn}),In=d.utils.browser,Pn=d.eventSandbox.listeners,Nn=d.eventSandbox.eventSimulator,xn=["click","mousedown","mouseup","dblclick","contextmenu","mousemove","mouseover","mouseout","touchstart","touchmove","touchend","keydown","keypress","input","keyup","change","focus","blur","MSPointerDown","MSPointerMove","MSPointerOver","MSPointerOut","MSPointerUp","pointerdown","pointermove","pointerover","pointerout","pointerup"],Rn=123;function Mn(e,t,n,o,r){var i,a=d.nativeMethods.eventTargetGetter.call(e)||e.srcElement;if(!t&&!ke(a)){if(/^key/.test(e.type)&&((i=e).shiftKey&&i.ctrlKey||(i.altKey||i.metaKey)&&In.isMacPlatform||i.keyCode===Rn))return void r();if("blur"===e.type)if(In.isIE&&In.version<12){var s,l=Oe(a),c=!l&&"none"===En(a,"display"),u=!1;l||c||(s=Je(a),u=W(s,function(e){return"none"===En(e,"display")})),(c||u.length)&&d.eventSandbox.timers.deferFunction(function(){Nn.blur(a)})}else if(a!==fi&&a!==fi.document&&!wn(a))return;n()}}var On=(Fn.create=function(e){return"left"in e?new Fn(e.left,e.top):"right"in e?new Fn(e.right,e.bottom):new Fn(e.x,e.y)},Fn.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},Fn.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},Fn.prototype.round=function(e){return void 0===e&&(e=Math.round),this.x=e(this.x),this.y=e(this.y),this},Fn.prototype.eql=function(e){return this.x===e.x&&this.y===e.y},Fn.prototype.mul=function(e){return this.x*=e,this.y*=e,this},Fn.prototype.distance=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},Fn);function Fn(e,t){this.x=e,this.y=t}var An=/auto|scroll|hidden/i,Ln="visible";function Vn(e){var t,n=En(e,"overflowX"),o=En(e,"overflowY"),r=An.test(n),i=An.test(o),a=te(e).documentElement,s=e.scrollHeight;return(d.utils.browser.isChrome||d.utils.browser.isFirefox||d.utils.browser.isSafari)&&(t=e.getBoundingClientRect().top,s=s-a.getBoundingClientRect().top+t),(r||i)&&s>a.scrollHeight}function Wn(e){if(xe(e))return Vn(e);if(Re(e))return function(e){var t=En(e,"overflowX"),n=En(e,"overflowY");if("hidden"===t&&"hidden"===n)return!1;var o=e.scrollHeight>e.clientHeight,r=e.scrollWidth>e.clientWidth;if(o||r)return!0;var i=e.getElementsByTagName("body")[0];if(!i)return!1;if(Vn(i))return!1;var a=Math.min(e.clientWidth,i.clientWidth),s=Math.min(e.clientHeight,i.clientHeight);return i.scrollHeight>s||i.scrollWidth>a}(e);var t,n,o,r,i,a=(n=En(t=e,"overflowX"),o=En(t,"overflowY"),r=An.test(n),i=An.test(o),d.utils.browser.isIE&&(r=r||i&&n===Ln,i=i||r&&o===Ln),new On(r,i));if(!a.x&&!a.y)return!1;var s=a.y&&e.scrollHeight>e.clientHeight;return a.x&&e.scrollWidth>e.clientWidth||s}function kn(e){var t,n,o=Je(e);return!re(e)||(t=ie(e))&&(n=Je(t),o.concat(n)),d.nativeMethods.arrayFilter.call(o,Wn)}var Hn=Object.freeze({__proto__:null,hasScroll:Wn,getScrollableParents:kn}),Dn=f.shadowUI,Un=f.nativeMethods,qn="disabled";function Bn(){this.currentEl=null,this.optionList=null,this.groups=[],this.options=[]}var Gn=(Bn.prototype._createOption=function(e,t){var n=hi.createElement("div"),o=e.disabled||"optgroup"===je(e.parentElement)&&e.parentElement.disabled,r="option"===je(e)?e.text:"";Un.nodeTextContentSetter.call(n,r),t.appendChild(n),Dn.addClass(n,"tcOption"),o&&(Dn.addClass(n,qn),vn(n,"color",En(e,"color"))),this.options.push(n)},Bn.prototype._createGroup=function(e,t){var n=hi.createElement("div");Un.nodeTextContentSetter.call(n,e.label||" "),t.appendChild(n),Dn.addClass(n,"tcOptionGroup"),e.disabled&&(Dn.addClass(n,qn),vn(n,"color",En(e,"color"))),this.createChildren(e.children,n),this.groups.push(n)},Bn.prototype.clear=function(){this.optionList=null,this.currentEl=null,this.options=[],this.groups=[]},Bn.prototype.createChildren=function(e,t){for(var n=at(e),o=0;o<n;o++)Ie(e[o])?this._createOption(e[o],t):"optgroup"===je(e[o])&&this._createGroup(e[o],t)},Bn.prototype.getEmulatedChildElement=function(e){var t="optgroup"===je(e),n=tt(this.currentEl,e);return t?this.groups[n]:this.options[n]},Bn.prototype.isOptionListExpanded=function(e){return e?e===this.currentEl:!!this.currentEl},Bn.prototype.isOptionElementVisible=function(e){var t=se(e);if(!t)return!0;var n=this.isOptionListExpanded(t),o=an(t);return n||1<o},new Bn),jn=function(e,t,n,o,r,i){this.width=e,this.height=t,this.left=n.x,this.top=n.y,this.right=n.x+e,this.bottom=n.y+t,this.border=o,this.scrollbar=i,this.scroll=r},zn={notElementOrTextNode:function(e){return"\n The ".concat(e," is neither a DOM element nor a text node.\n ")},elOutsideBounds:function(e,t){return"\n The ".concat(t," (").concat(e,") is located outside the the layout viewport.\n ")},elHasWidthOrHeightZero:function(e,t,n,o){return"\n The ".concat(t," (").concat(e,") is too small to be visible: ").concat(n,"px x ").concat(o,"px.\n ")},elHasDisplayNone:function(e,t){return"\n The ".concat(t," (").concat(e,") is invisible. \n The value of its 'display' property is 'none'.\n ")},parentHasDisplayNone:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible. \n It descends from an element that has the 'display: none' property (").concat(n,").\n ")},elHasVisibilityHidden:function(e,t){return"\n The ".concat(t," (").concat(e,") is invisible.\n The value of its 'visibility' property is 'hidden'.\n ")},parentHasVisibilityHidden:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible.\n It descends from an element that has the 'visibility: hidden' property (").concat(n,").\n ")},elHasVisibilityCollapse:function(e,t){return"\n The ".concat(t," (").concat(e,") is invisible.\n The value of its 'visibility' property is 'collapse'.\n ")},parentHasVisibilityCollapse:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible.\n It descends from an element that has the 'visibility: collapse' property (").concat(n,").\n ")},elNotRendered:function(e,t){return"\n The ".concat(t," (").concat(e,") has not been rendered.\n ")},optionNotVisible:function(e,t,n){return"\n The ".concat(t," (").concat(e,") is invisible. \n The parent element (").concat(n,") is collapsed, and its length is shorter than 2.\n ")},mapContainerNotVisible:function(e,t){return"\n The action target (".concat(e,") is invisible because ").concat(t,"\n ")}},Jn=f.utils.html,Kn=f.nativeMethods,Yn=10;function Xn(e){if(!e)return"";var t,n,o,r=Kn.cloneNode.call(e),i=Jn.cleanUpHtml(Kn.elementOuterHTMLGetter.call(r)),a=(t=Kn.nodeTextContentGetter.call(e),n=Yn,void 0===o&&(o="..."),t.length<n?t:t.substring(0,n-o.length)+o),s=Kn.elementChildrenGetter.call(e);return 0<Kn.htmlCollectionLengthGetter.call(s)?i.replace("></",">...</"):a?i.replace("></",">".concat(a,"</")):i}var Qn=f.utils.position.getElementRectangle,$n=f.utils.position.getOffsetPosition,Zn=f.utils.position.offsetToClientCoords;function eo(e){var t,n,o,r,i=Re(e),a=i?e.getElementsByTagName("body")[0]:null,s=e.getBoundingClientRect(),l=Xt.create(Zt(e)),c=on(e),u=re(e),d="BackCompat"===e.ownerDocument.compatMode,f=i?new On(0,0):On.create(s),h=s.height,p=s.width;i&&(p=a&&d?(h=a.clientHeight,a.clientWidth):(h=e.clientHeight,e.clientWidth)),!u||(t=ie(e))&&(n=$n(t),o=Zn(On.create(n)),r=Zt(t),f.add(o).add(On.create(r)),i&&l.add(r));var m=!i&&dn(e)!==e.clientWidth,g=!i&&fn(e)!==e.clientHeight,E={right:m?Be():0,bottom:g?Be():0};return new jn(p,h,f,l,c,E)}function to(e){var t=e.x,n=e.y,o=hi.getElementFromPoint||hi.elementFromPoint,r=null;try{r=o.call(hi,t,n)}catch(e){return null}for(null===r&&(r=o.call(hi,t-1,n-1));r&&r.shadowRoot&&r.shadowRoot.elementFromPoint;){var i=r.shadowRoot.elementFromPoint(t,n);if(!i||r===i)break;r=i}return r}function no(e,t){return Xt.create({top:e.top-t.top,left:e.left-t.left,right:t.right-e.right,bottom:t.bottom-e.bottom}).sub(t.border).sub(t.scrollbar).round(Math.ceil,Math.floor)}function oo(e){var t=/^touch/.test(e.type)&&e.targetTouches?e.targetTouches[0]||e.changedTouches[0]:e,n=0===t.pageX&&0===t.pageY,o=0!==t.clientX||0!==t.clientY;if((null===t.pageX||n&&o)&&null!==t.clientX){var r=te(e.target||e.srcElement),i=r.documentElement,a=r.body;return new On(Math.round(t.clientX+(i&&i.scrollLeft||a&&a.scrollLeft||0)-(i.clientLeft||0)),Math.round(t.clientY+(i&&i.scrollTop||a&&a.scrollTop||0)-(i.clientTop||0)))}return new On(Math.round(t.pageX),Math.round(t.pageY))}function ro(e){return!lo(e)}function io(e){return"hidden"===En(e,"visibility")}function ao(e){return"collapse"===En(e,"visibility")}function so(e){return"none"===En(e,"display")}function lo(e){return io(e)||ao(e)||so(e)}function co(e){var t=Qn(e);return 0===t.width||0===t.height}function uo(e){return e.replace(/.*The/,"its")}var fo=Object.freeze({__proto__:null,getElementRectangle:Qn,getOffsetPosition:$n,offsetToClientCoords:Zn,getClientDimensions:eo,getElementFromPoint:to,calcRelativePosition:no,getIframeClientCoordinates:function(e){var t=$n(e),n=t.left,o=t.top,r=Zn({x:n,y:o}),i=Zt(e),a=nn(e),s=r.x+i.left+a.left,l=r.y+i.top+a.top;return new Xt(l,s+cn(e),l+un(e),s)},containsOffset:function(e,t,n){var o=eo(e),r=Math.max(e.scrollWidth,o.width),i=Math.max(e.scrollHeight,o.height),a=o.scrollbar.right+o.border.left+o.border.right+r,s=o.scrollbar.bottom+o.border.top+o.border.bottom+i;return(void 0===t||0<=t&&t<=a)&&(void 0===n||0<=n&&n<=s)},getEventAbsoluteCoordinates:function(e){var t,n,o,r=e.target||e.srcElement,i=oo(e),a=te(r),s=0,l=0;return!re(a.documentElement)||(t=ie(a))&&(n=$n(t),o=Zt(t),s=n.left+o.left,l=n.top+o.top),new On(i.x+s,i.y+l)},getEventPageCoordinates:oo,getIframePointRelativeToParentFrame:function(e,t){var n=it(t),o=$n(n),r=Zt(n),i=nn(n);return Zn({x:e.x+o.left+r.left+i.left,y:e.y+o.top+r.top+i.top})},findCenter:function(e){var t=Qn(e);return new On(Math.round(t.left+t.width/2),Math.round(t.top+t.height/2))},getClientPosition:function(e){var t=$n(e),n=t.left,o=t.top,r=Zn({x:n,y:o});return r.x=Math.round(r.x),r.y=Math.round(r.y),r},isInRectangle:function(e,t){var n=e.x,o=e.y;return n>=t.left&&n<=t.right&&o>=t.top&&o<=t.bottom},getWindowPosition:function(){var e=fi.screenLeft||fi.screenX,t=fi.screenTop||fi.screenY;return new On(e,t)},isIframeVisible:ro,isElementVisible:function e(t){if(!We(t)&&!de(t))return!1;if(Ie(t)||"optgroup"===je(t))return Gn.isOptionElementVisible(t);if(he(t))return ro(t);if(Pe(t))return!Ke(t,!0,lo)&&!co(t);if(de(t))return!Sn(t);if(!Ve(t)&&co(t))return!1;if(Ne(t)){var n=Ge(ze(t,"map"));return!!n&&e(n)}return wn(t)&&!lo(t)},getSubHiddenReason:uo,getHiddenReason:function e(t,n){if(void 0===n&&(n="action target"),!t)return null;var o=de(t);if(!We(t)&&!o)return zn.notElementOrTextNode(n);var r=o?t.data:Xn(t),i=t.offsetHeight,a=t.offsetWidth;if((Ie(t)||"optgroup"===je(t))&&!Gn.isOptionElementVisible(t)){var s=Xn(se(t));return zn.optionNotVisible(r,n,s)}if(Ne(t)){var l=uo(e(Ge(ze(t,"map")),"container")||"");return zn.mapContainerNotVisible(r,l)}var c=Ke(t,!1,io);if(c)return zn.parentHasVisibilityHidden(r,n,Xn(c));var u=Ke(t,!1,ao);if(u)return zn.parentHasVisibilityCollapse(r,n,Xn(u));var d=Ke(t,!1,so);return d?zn.parentHasDisplayNone(r,n,Xn(d)):io(t)?zn.elHasVisibilityHidden(r,n):ao(t)?zn.elHasVisibilityCollapse(r,n):so(t)?zn.elHasDisplayNone(r,n):de(t)&&!fe(t)?zn.elNotRendered(r,n):!Ve(t)&&co(t)||!wn(t)?zn.elHasWidthOrHeightZero(r,n,a,i):null},getElOutsideBoundsReason:function e(t,n){void 0===n&&(n="action target");var o=Xn(t);if(Ne(t)){var r=uo(e(Ge(ze(t,"map")),"container")||"");return zn.mapContainerNotVisible(o,r)}return zn.elOutsideBounds(o,n)}});function ho(n,o){return E(this,void 0,void 0,function(){var t;return v(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<n?[4,o(t)]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}var po=Object.freeze({__proto__:null,whilst:function(t,n){return E(this,void 0,void 0,function(){return v(this,function(e){switch(e.label){case 0:return t()?[4,n()]:[3,2];case 1:return e.sent(),[3,0];case 2:return[2]}})})},times:ho,each:function(r,i){return E(this,void 0,void 0,function(){var t,n,o;return v(this,function(e){switch(e.label){case 0:t=0,n=r,e.label=1;case 1:return t<n.length?(o=n[t],[4,i(o)]):[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}}),mo=f.Promise,go=f.eventSandbox.message;function Eo(e,o,t){return new mo(function(n){go.on(go.SERVICE_MSG_RECEIVED_EVENT,function e(t){t.message.cmd===o&&(go.off(go.SERVICE_MSG_RECEIVED_EVENT,e),n(t.message))}),go.sendServiceMsg(e,t)})}var vo=(yo._isScrollValuesChanged=function(e,t){return hn(e)!==t.left||pn(e)!==t.top},yo.prototype._setScroll=function(e,t){var n=this,o=t.left,r=t.top,i=Re(e)?te(e):e,a={left:hn(i),top:pn(i)},o=Math.max(o,0),r=Math.max(r,0),s=Yt.waitForScroll(i);return mn(i,o),gn(i,r),yo._isScrollValuesChanged(i,a)?s=s.then(function(){n._scrollWasPerformed||(n._scrollWasPerformed=yo._isScrollValuesChanged(i,a))}):(s.cancel(),d.Promise.resolve())},yo.prototype._getScrollToPoint=function(e,t,n){var o=Math.floor(e.width/2),r=Math.floor(e.height/2),i=this._scrollToCenter?o:Math.min(n.left,o),a=this._scrollToCenter?r:Math.min(n.top,r),s=e.scroll,l=s.left,c=s.top,u=t.x>=l+e.width-i,d=t.x<=l+i,f=t.y>=c+e.height-a,h=t.y<=c+a;return u?l=t.x-e.width+i:d&&(l=t.x-i),f?c=t.y-e.height+a:h&&(c=t.y-a),{left:l,top:c}},yo.prototype._getScrollToFullChildView=function(e,t,n){var o,r,i,a,s={left:null,top:null},l=e.width>=t.width,c=e.height>=t.height,u=no(t,e);return l&&(o=e.width-t.width,r=Math.min(n.left,o),this._scrollToCenter&&(r=o/2),u.left<r?s.left=Math.round(e.scroll.left+u.left-r):u.right<r&&(s.left=Math.round(e.scroll.left+Math.min(u.left,-u.right)+r))),c&&(i=e.height-t.height,a=Math.min(n.top,i),this._scrollToCenter&&(a=i/2),u.top<a?s.top=Math.round(e.scroll.top+u.top-a):u.bottom<a&&(s.top=Math.round(e.scroll.top+Math.min(u.top,-u.bottom)+a))),s},yo._getChildPoint=function(e,t,n){return On.create(t).sub(On.create(e)).add(On.create(e.scroll)).add(On.create(t.border)).add(n)},yo.prototype._getScrollPosition=function(e,t,n,o){var r=yo._getChildPoint(e,t,n),i=this._getScrollToPoint(e,r,o),a=this._getScrollToFullChildView(e,t,o);return{left:Math.max(null===a.left?i.left:a.left,0),top:Math.max(null===a.top?i.top:a.top,0)}},yo._getChildPointAfterScroll=function(e,t,n,o){return On.create(t).add(On.create(e.scroll)).sub(On.create(n)).add(o)},yo.prototype._isChildFullyVisible=function(e,t,n){var o=yo._getChildPointAfterScroll(e,t,e.scroll,n),r=this._getScrollPosition(e,t,n,{left:0,top:0}),i=r.left,a=r.top;return!this._isTargetElementObscuredInPoint(o)&&i===e.scroll.left&&a===e.scroll.top},yo.prototype._scrollToChild=function(e,t,n){for(var o=eo(e),r=eo(t),i=dn(fi),a=fn(fi),s=o.scroll,l=!this._isChildFullyVisible(o,r,n);l;){s=this._getScrollPosition(o,r,n,this._maxScrollMargin);var c=yo._getChildPointAfterScroll(o,r,s,n),u=this._isTargetElementObscuredInPoint(c);this._maxScrollMargin.left+=20,this._maxScrollMargin.left>=i&&(this._maxScrollMargin.left=50,this._maxScrollMargin.top+=20),l=u&&this._maxScrollMargin.top<a}return this._maxScrollMargin={left:50,top:50},this._setScroll(e,s)},yo.prototype._scrollElement=function(){if(!Wn(this._element))return d.Promise.resolve();var e=eo(this._element),t=this._getScrollToPoint(e,this._offsets,this._maxScrollMargin);return this._setScroll(this._element,t)},yo.prototype._scrollParents=function(){var t,n,o=this,r=kn(this._element),i=this._element,e=hn(i),a=pn(i),s=On.create(this._offsets).sub(new On(e,a).round()),l=ho(r.length,function(e){return o._scrollToChild(r[e],i,s).then(function(){t=eo(i),n=eo(r[e]),s.add(On.create(t)).sub(On.create(n)).add(On.create(n.border)),i=r[e]})}),c={scrollWasPerformed:this._scrollWasPerformed,offsetX:s.x,offsetY:s.y,maxScrollMargin:this._maxScrollMargin};return l.then(function(){var e;if(!o._skipParentFrames&&(e=fi).top!==e)return c.cmd=yo.SCROLL_REQUEST_CMD,Eo(c,yo.SCROLL_RESPONSE_CMD,fi.parent)}).then(function(){return o._scrollWasPerformed})},yo._getFixedAncestorOrSelf=function(e){return Ke(e,!0,Tn)},yo.prototype._isTargetElementObscuredInPoint=function(e){var t=to(e);if(!t)return!1;var n=yo._getFixedAncestorOrSelf(t);return!!n&&!n.contains(this._element)},yo.prototype.run=function(){var e=this;return this._scrollElement().then(function(){return e._scrollParents()})},yo.SCROLL_REQUEST_CMD="automation|scroll|request",yo.SCROLL_RESPONSE_CMD="automation|scroll|response",yo);function yo(e,t,n){this._element=e,this._offsets=new On(t.offsetX,t.offsetY),this._scrollToCenter=!!t.scrollToCenter,this._skipParentFrames=!!t.skipParentFrames,this._maxScrollMargin=n||{left:50,top:50},this._scrollWasPerformed=!1}function bo(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return!st(t)&&Ao(e)?e:Y(t,Ao)}function Co(e){return Y(d.nativeMethods.nodeChildNodesGetter.call(e),function(e){return Ao(e)||!Lo(e)&&Co(e)})}function So(e){return de(e)||ue(e)&&sn(e)}function wo(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return W(t,So)}function To(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return G(t,So)}function _o(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return G(t,function(e){return Go(e,!0)})}function Io(e,t){var n,o;if(!ke(e)&&!ke(t)){var r=d.nativeMethods.nodeChildNodesGetter.call(t);return!nt(t,e)&&st(r)&&/div|p/.test(je(t))&&(n=Co(e))&&!nt(t,n)&&(o=xo(n))&&!nt(t,o)&&bo(t)}}function Po(e,t){var n,o,r,i=fe(t);if(!ke(e)&&!ke(t)){var a=d.nativeMethods.nodeChildNodesGetter.call(t);if(!nt(t,e)&&(i&&ue(t)&&st(a)&&!/div|p/.test(je(t))||Ao(t)&&!nt(t,e)&&t.nodeValue.length)){if(i&&ue(t)){if(!(n=Co(e))||nt(t,n))return;if(!(o=xo(n))||nt(t,o))return}return(r=function(e){for(var t=null,n=e;!t&&(n=n.previousSibling);)if(!Lo(n)&&!Fo(n)){t=n;break}return t}(t))&&ue(r)&&/div|p/.test(je(r))&&bo(r)}}}function No(e,t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=st(r),a=null,s=t?Ao:de;if(!i&&s(e))return e;for(var l=0;l<i;l++){if(n=r[l],o=ue(n)&&!Ve(n),s(n))return n;if(fe(n)&&To(n)&&!o&&(a=No(n,t)))return a}return a}function xo(e){return No(e,!0)}function Ro(e,t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=st(r),a=null;if(!i&&Ao(e))return e;for(var s=i-1;0<=s;s--){if(n=r[s],o=ue(n)&&!Ve(n),de(n)&&(!t||!Fo(n)))return n;if(fe(n)&&To(n)&&!o&&(a=Ro(n,!1)))return a}return a}function Mo(e,t){if(!e||!e.length)return 0;for(var n=e.length,o=t||0,r=o;r<n&&(10===e.charCodeAt(r)||32===e.charCodeAt(r));r++)o++;return o}function Oo(e){if(!e||!e.length)return 0;for(var t=e.length,n=t,o=t-1;0<=o&&(10===e.charCodeAt(o)||32===e.charCodeAt(o));o--)n--;return n}function Fo(e){if(!de(e))return!1;var t=e.nodeValue,n=Mo(t),o=Oo(t);return n===t.length&&0===o}function Ao(e){return de(e)&&!Fo(e)}function Lo(e){return!fe(e)||ke(e)}function Vo(e){var t=e.getAttribute?e.getAttribute("contenteditable"):null;return""===t||"true"===t}function Wo(e){var t=Je(e);if(Vo(e)&&Ve(e))return e;var n=te(e);return"on"===n.designMode?n.body:Y(t,function(e){return Vo(e)&&Ve(e)})}function ko(e,t){if(nt(e,t))return nt(t,Wo(e))?e:d.nativeMethods.nodeParentNodeGetter.call(e);var n=[],o=Wo(e),r=null;if(!et(o,t))return null;for(r=e;r!==o;r=d.nativeMethods.nodeParentNodeGetter.call(r))n.push(r);for(r=t;r!==o;r=d.nativeMethods.nodeParentNodeGetter.call(r))if(-1!==B(n,r))return r;return o}function Ho(e,t){var n=null,o=null,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=st(r),a=i<=t;if(ke(e))return{node:e,offset:t};if(a?n=r[i-1]:(n=r[t],o=0),ke(n)){if(i<=1)return{node:e,offset:0};(a=i<=t-1)?n=r[i-2]:(n=r[t-1],o=0)}for(;!Lo(n)&&ue(n);){var s=wo(n);if(!s.length){o=0;break}n=s[a?s.length-1:0]}return 0===o||Lo(n)||(o=n.nodeValue?n.nodeValue.length:0),{node:n,offset:o}}function Do(e,t,n){var o=n?t.focusNode:t.anchorNode,r=n?t.focusOffset:t.anchorOffset,i={node:o,offset:r};return(nt(e,o)||ue(o))&&_o(o)&&(i=Ho(o,r)),{node:i.node,offset:i.offset}}function Uo(e,t,n){var o=n?t.anchorNode:t.focusNode,r=n?t.anchorOffset:t.focusOffset,i={node:o,offset:r};return(nt(e,o)||ue(o))&&_o(o)&&(i=Ho(o,r)),{node:i.node,offset:i.offset}}function qo(e,t,n){return zo(e,Do(e,t,n))}function Bo(e,t,n){return zo(e,Uo(e,t,n))}function Go(e,t){if(Sn(e))return!1;if(de(e))return!0;if(!ue(e))return!1;if(_o(e))return t;var n=d.nativeMethods.nodeParentNodeGetter.call(e),o=!Ve(n),r=wo(e),i=G(r,function(e){return"br"===je(e)});return o||i}function jo(s,e){var l={node:null,offset:e};return function e(t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(t),i=st(r);if(l.node)return l;if(Lo(t))return l;if(de(t)){if(l.offset<=t.nodeValue.length)return l.node=t,l;t.nodeValue.length&&(!l.node&&Po(s,t)&&l.offset--,l.offset-=t.nodeValue.length)}else if(ue(t)){if(!So(t))return l;if(0===l.offset&&Go(t,!1))return l.node=t,l.offset=(n=t,o=0,Y(d.nativeMethods.nodeChildNodesGetter.call(n),function(e,t){return o=t,"br"===je(e)})?o:0),l;(l.node||!Io(s,t)&&!Po(s,t))&&(i||"br"!==je(t))||l.offset--}for(var a=0;a<i;a++)l=e(r[a]);return l}(s)}function zo(i,e){var a=e.node,s=e.offset,l=0,c=!1;return function e(t){var n=d.nativeMethods.nodeChildNodesGetter.call(t),o=st(n);if(c)return l;if(nt(a,t))return(Io(i,t)||Po(i,t))&&l++,c=!0,l+s;if(Lo(t))return l;!o&&t.nodeValue&&t.nodeValue.length?(!c&&Po(i,t)&&l++,l+=t.nodeValue.length):(!o&&ue(t)&&"br"===je(t)||!c&&(Io(i,t)||Po(i,t)))&&l++;for(var r=0;r<o;r++)l=e(n[r]);return l}(i)}function Jo(e){var t,n,o,r,i,a=de(e)?e:Ro(e,!0);if(!a||(t=a,o=de(n=e)?n:No(n,!1),r=t===o,i=t.nodeValue===String.fromCharCode(10),r&&i&&function(e,t){for(var n=["pre","pre-wrap","pre-line"];e!==t;)if(e=d.nativeMethods.nodeParentNodeGetter.call(e),-1<B(n,En(e,"white-space")))return 1}(t,n)))return 0;var s=te(e).createRange();return s.selectNodeContents(a),zo(e,{node:a,offset:s.endOffset})}var Ko=Object.freeze({__proto__:null,getFirstVisibleTextNode:xo,getLastTextNode:Ro,getFirstNonWhitespaceSymbolIndex:Mo,getLastNonWhitespaceSymbolIndex:Oo,isInvisibleTextNode:Fo,findContentEditableParent:Wo,getNearestCommonAncestor:ko,getSelection:function(e,t,n){return{startPos:Do(e,t,n),endPos:Uo(e,t,n)}},getSelectionStartPosition:qo,getSelectionEndPosition:Bo,calculateNodeAndOffsetByPosition:jo,calculatePositionByNodeAndOffset:zo,getElementBySelection:function(e){var t=ko(e.anchorNode,e.focusNode);return de(t)?t.parentElement:t},getFirstVisiblePosition:function(e){var t=de(e)?e:xo(e),n=te(e).createRange();return t?(n.selectNodeContents(t),zo(e,{node:t,offset:n.startOffset})):0},getLastVisiblePosition:Jo,getContentEditableValue:function(e){return k(function e(t){var n=[],o=d.nativeMethods.nodeChildNodesGetter.call(t),r=st(o);Lo(t)||r||!de(t)||n.push(t);for(var i=0;i<r;i++)n=n.concat(e(o[i]));return n}(e),function(e){return e.nodeValue}).join("")}}),Yo=f.utils.browser,Xo=f.nativeMethods,Qo=f.eventSandbox.selection,$o="backward",Zo="forward",er="none",tr=er,nr=0,or=0,rr=0,ir=0,ar=0,sr=0;function lr(e,t,n,o){var r,i,a,s=null,l=null,c=!1;void 0!==t&&void 0!==n&&n<t&&(a=t,t=n,n=a,c=!0),void 0===t&&(l={node:(r=xo(e))||e,offset:r&&r.nodeValue?Mo(r.nodeValue):0}),void 0===n&&(s={node:(i=Ro(e,!0))||e,offset:i&&i.nodeValue?Oo(i.nodeValue):0}),l=l||jo(e,t),s=s||jo(e,n),l.node&&s.node&&(c?pr(s,l,o):pr(l,s,o))}function cr(e){var t=e?te(e):hi,n=t.getSelection(),o=null,r=!1;return n&&(n.isCollapsed||((o=t.createRange()).setStart(n.anchorNode,n.anchorOffset),o.setEnd(n.focusNode,n.focusOffset),r=o.collapsed,o.detach())),r}function ur(e,t,n){var o=zo(e,t);return zo(e,n)<o}function dr(e){return Ve(e)?mr(e)?qo(e,hr(e),cr(e)):0:Qo.getSelection(e).start}function fr(e){return Ve(e)?mr(e)?Bo(e,hr(e),cr(e)):0:Qo.getSelection(e).end}function hr(e){var t=te(e);return t?t.getSelection():fi.getSelection()}function pr(e,t,n){var o=e.node,r=t.node,i=o.nodeValue?o.length:0,a=r.nodeValue?r.length:0,s=e.offset,l=t.offset;ue(o)&&s||(s=Math.min(i,e.offset)),ue(r)&&l||(l=Math.min(a,t.offset));var c=Wo(o),u=ur(c,e,t),d=hr(c),f=te(c).createRange();Qo.wrapSetterSelection(c,function(){var e;d.removeAllRanges(),u?Yo.isIE?(f.setStart(r,l),f.setEnd(o,s),d.addRange(f)):(f.setStart(o,s),f.setEnd(o,s),d.addRange(f),e=function(e,t){try{d.extend(e,t)}catch(e){return!1}return!0},(Yo.isSafari||Yo.isChrome&&Yo.version<58)&&Fo(r)?e(r,Math.min(l,1))||e(r,0):e(r,l)):(f.setStart(o,s),f.setEnd(r,l),d.addRange(f))},n,!0)}function mr(e){var t=hr(e);return!(!t.anchorNode||!t.focusNode)&&et(e,t.anchorNode)&&et(e,t.focusNode)}Yo.isIE&&Tt(hi,"selectionchange",function(){var e=null,t=null,n=null;try{if(this.selection)t=this.selection.createRange();else{if(!(e=Xo.documentActiveElementGetter.call(this))||!Ae(e))return void(tr=er);var o,r=dr(e),i=fr(e);e.createTextRange?((t=e.createTextRange()).collapse(!0),t.moveStart("character",r),t.moveEnd("character",i-r)):hi.createRange&&(t=hi.createRange(),o=f.nativeMethods.nodeFirstChildGetter.call(e),t.setStart(o,r),t.setEnd(o,i),n=t.getBoundingClientRect())}}catch(e){return void(tr=er)}var a=n?Math.ceil(n.left):t.offsetLeft,s=n?Math.ceil(n.top):t.offsetTop,l=n?Math.ceil(n.height):t.boundingHeight,c=n?Math.ceil(n.width):t.boundingWidth,u=t.htmlText?t.htmlText.length:0;!function(e,t,n,o,r){if(r)switch(tr){case er:t===sr&&(e===ir||rr<n)?tr=Zo:(e<ir||t<sr)&&(tr=$o);break;case Zo:if(e===ir&&t===sr||e<ir&&rr<n||t===sr&&n===rr&&ar<r&&e+o!==nr)break;(e<ir||t<sr)&&(tr=$o);break;case $o:if((e<ir||t<sr)&&ar<r)break;t===or&&(nr<=e||rr<n)&&(tr=Zo)}else nr=e,or=t,tr=er;rr=n,ir=e,ar=r,sr=t}(a,s,l,c,n?t.toString().length:u)},!0);var gr,Er,vr=Object.freeze({__proto__:null,hasInverseSelectionContentEditable:cr,isInverseSelectionContentEditable:ur,getSelectionStart:dr,getSelectionEnd:fr,hasInverseSelection:function(e){return Ve(e)?cr(e):(Qo.getSelection(e).direction||tr)===$o},getSelectionByElement:hr,select:function(e,t,n){var o,r,i,a;Ve(e)?lr(e,t,n,!0):(o=t||0,i=!1,a=null,(r=void 0===n?ft(e).length:n)<o&&(a=o,o=r,r=a,i=!0),Qo.setSelection(e,o,r,i?$o:Zo),tr=t===n?er:i?$o:Zo)},selectByNodesAndOffsets:pr,deleteSelectionContents:function(e,t){var n,o,r,i,a,s,l,c,u,d,f,h,p=dr(e),m=fr(e);t&&lr(e),p!==m&&(n=hr(e),o=n.anchorNode,r=n.focusNode,i=n.anchorOffset,a=n.focusOffset,s=Mo(o.nodeValue),l=Oo(o.nodeValue),c=Mo(r.nodeValue),u=Oo(r.nodeValue),f=d=null,de(o)&&(i<s&&0!==i?d=0:i!==o.nodeValue.length&&(Fo(o)&&0!==i||l<i)&&(d=o.nodeValue.length)),de(r)&&(a<c&&0!==a?f=0:a!==r.nodeValue.length&&(Fo(r)&&0!==a||u<a)&&(f=r.nodeValue.length)),(Yo.isWebKit||Yo.isIE&&11<Yo.version)&&(null!==d&&(o.nodeValue=0===d?o.nodeValue.substring(s):o.nodeValue.substring(0,l)),null!==f&&(r.nodeValue=0===f?r.nodeValue.substring(c):r.nodeValue.substring(0,u))),null===d&&null===f||pr({node:o,offset:d=null!==d?0===d?d:o.nodeValue.length:i},{node:r,offset:f=null!==f?0===f?f:r.nodeValue.length:a}),function(e){var t=hr(e),n=t.rangeCount;if(n)for(var o=0;o<n;o++)t.getRangeAt(o).deleteContents()}(e),(h=hr(e)).rangeCount&&!h.getRangeAt(0).collapsed&&h.getRangeAt(0).collapse(!0))},setCursorToLastVisiblePosition:function(e){var t=Jo(e);lr(e,t,t)},hasElementContainsSelection:mr}),yr=f.Promise,br=f.nativeMethods,Cr={cannotCreateMultipleLiveModeRunners:"E1000",cannotRunLiveModeRunnerMultipleTimes:"E1001",browserDisconnected:"E1002",cannotRunAgainstDisconnectedBrowsers:"E1003",cannotEstablishBrowserConnection:"E1004",cannotFindBrowser:"E1005",browserProviderNotFound:"E1006",browserNotSet:"E1007",testFilesNotFound:"E1008",noTestsToRun:"E1009",cannotFindReporterForAlias:"E1010",multipleSameStreamReporters:"E1011",optionValueIsNotValidRegExp:"E1012",optionValueIsNotValidKeyValue:"E1013",invalidSpeedValue:"E1014",invalidConcurrencyFactor:"E1015",cannotDivideRemotesCountByConcurrency:"E1016",portsOptionRequiresTwoNumbers:"E1017",portIsNotFree:"E1018",invalidHostname:"E1019",cannotFindSpecifiedTestSource:"E1020",clientFunctionCodeIsNotAFunction:"E1021",selectorInitializedWithWrongType:"E1022",clientFunctionCannotResolveTestRun:"E1023",regeneratorInClientFunctionCode:"E1024",invalidClientFunctionTestRunBinding:"E1025",invalidValueType:"E1026",unsupportedUrlProtocol:"E1027",testControllerProxyCannotResolveTestRun:"E1028",timeLimitedPromiseTimeoutExpired:"E1029",noTestsToRunDueFiltering:"E1030",cannotSetVideoOptionsWithoutBaseVideoPathSpecified:"E1031",multipleAPIMethodCallForbidden:"E1032",invalidReporterOutput:"E1033",cannotReadSSLCertFile:"E1034",cannotPrepareTestsDueToError:"E1035",cannotParseRawFile:"E1036",testedAppFailedWithError:"E1037",unableToOpenBrowser:"E1038",requestHookConfigureAPIError:"E1039",forbiddenCharatersInScreenshotPath:"E1040",cannotFindFFMPEG:"E1041",compositeArgumentsError:"E1042",cannotFindTypescriptConfigurationFile:"E1043",clientScriptInitializerIsNotSpecified:"E1044",clientScriptBasePathIsNotSpecified:"E1045",clientScriptInitializerMultipleContentSources:"E1046",cannotLoadClientScriptFromPath:"E1047",clientScriptModuleEntryPointPathCalculationError:"E1048",methodIsNotAvailableForAnIPCHost:"E1049",tooLargeIPCPayload:"E1050",malformedIPCMessage:"E1051",unexpectedIPCHeadPacket:"E1052",unexpectedIPCBodyPacket:"E1053",unexpectedIPCTailPacket:"E1054",cannotRunLocalNonHeadlessBrowserWithoutDisplay:"E1057",uncaughtErrorInReporter:"E1058",roleInitializedWithRelativeUrl:"E1059",typeScriptCompilerLoadingError:"E1060",cannotCustomizeSpecifiedCompilers:"E1061",cannotEnableRetryTestPagesOption:"E1062",browserConnectionError:"E1063",testRunRequestInDisconnectedBrowser:"E1064",invalidQuarantineOption:"E1065",invalidQuarantineParametersRatio:"E1066",invalidAttemptLimitValue:"E1067",invalidSuccessThresholdValue:"E1068",cannotSetConcurrencyWithCDPPort:"E1069",cannotFindTestcafeConfigurationFile:"E1070",dashboardTokenInJSON:"E1071",requestUrlInvalidValueError:"E1072",requestRuntimeError:"E1073",requestCannotResolveTestRun:"E1074",relativeBaseUrl:"E1075",invalidSkipJsErrorsOptionsObjectProperty:"E1076",invalidSkipJsErrorsCallbackWithOptionsProperty:"E1077",invalidCommandInJsonCompiler:"E1078"};(Er=gr=gr||{}).TooHighConcurrencyFactor="TooHighConcurrencyFactor",Er.UseBrowserInitOption="UseBrowserInitOption",Er.RestErrorCauses="RestErrorCauses";var Sr,wr,Tr,_r,Ir,Pr=gr,Nr=", ",xr='"';function Rr(e,t){return"".concat(t).concat(e).concat(t)}function Mr(e,t,n){void 0===t&&(t=Nr),void 0===n&&(n=xr);var o=y([],e,!0);if(-1<t.indexOf("\n"))return o.map(function(e){return Rr(e,n)}).join(t);if(1===o.length)return Rr(o[0],n);if(2===o.length){var r=e[0],i=e[1];return"".concat(Rr(r,n)," and ").concat(Rr(i,n))}var a=o.pop(),s=o.map(function(e){return Rr(e,n)}).join(t);return"".concat(s,", and ").concat(Rr(a,n))}(wr=Sr=Sr||{}).message="message",wr.stack="stack",wr.pageUrl="pageUrl",(_r=Tr=Tr||{}).fn="fn",_r.dependencies="dependencies";var Or,Fr="https://testcafe.io/documentation/402639/reference/command-line-interface#file-pathglob-pattern",Ar="https://testcafe.io/documentation/402638/reference/configuration-file#filter",Lr="https://testcafe.io/documentation/402828/guides/concepts/browsers#test-in-headless-mode",Vr=((Ir={})[Cr.cannotCreateMultipleLiveModeRunners]="Cannot launch multiple live mode instances of the TestCafe test runner.",Ir[Cr.cannotRunLiveModeRunnerMultipleTimes]="Cannot launch the same live mode instance of the TestCafe test runner multiple times.",Ir[Cr.browserDisconnected]="The {userAgent} browser disconnected. If you did not close the browser yourself, browser performance or network issues may be at fault.",Ir[Cr.cannotRunAgainstDisconnectedBrowsers]="The following browsers disconnected: {userAgents}. Cannot run further tests.",Ir[Cr.testRunRequestInDisconnectedBrowser]='"{browser}" disconnected during test execution.',Ir[Cr.cannotEstablishBrowserConnection]="Cannot establish one or more browser connections.",Ir[Cr.cannotFindBrowser]='Cannot find the browser. "{browser}" is neither a known browser alias, nor a path to an executable file.',Ir[Cr.browserProviderNotFound]='Cannot find the "{providerName}" browser provider.',Ir[Cr.browserNotSet]="You have not specified a browser.",Ir[Cr.testFilesNotFound]='Could not find test files at the following location: "{cwd}".\nCheck patterns for errors:\n\n{sourceList}\n\nor launch TestCafe from a different directory.\n'+"For more information on how to specify test locations, see ".concat(Fr,"."),Ir[Cr.noTestsToRun]="Source files do not contain valid 'fixture' and 'test' declarations.",Ir[Cr.noTestsToRunDueFiltering]="No tests match your filter.\n"+"See ".concat(Ar,"."),Ir[Cr.cannotFindReporterForAlias]='The "{name}" reporter does not exist. Check the reporter parameter for errors.',Ir[Cr.multipleSameStreamReporters]='Reporters cannot share output streams. The following reporters interfere with one another: "{reporters}".',Ir[Cr.optionValueIsNotValidRegExp]='The "{optionName}" option does not contain a valid regular expression.',Ir[Cr.optionValueIsNotValidKeyValue]='The "{optionName}" option does not contain a valid key-value pair.',Ir[Cr.invalidQuarantineOption]='The "{optionName}" option does not exist. Specify "attemptLimit" and "successThreshold" to configure quarantine mode.',Ir[Cr.invalidQuarantineParametersRatio]='The value of "attemptLimit" ({attemptLimit}) should be greater then the value of "successThreshold" ({successThreshold}).',Ir[Cr.invalidAttemptLimitValue]='The "{attemptLimit}" parameter only accepts values of {MIN_ATTEMPT_LIMIT} and up.',Ir[Cr.invalidSuccessThresholdValue]='The "{successThreshold}" parameter only accepts values of {MIN_SUCCESS_THRESHOLD} and up.',Ir[Cr.invalidSpeedValue]="Speed should be a number between 0.01 and 1.",Ir[Cr.invalidConcurrencyFactor]="The concurrency factor should be an integer greater than or equal to 1.",Ir[Cr.cannotDivideRemotesCountByConcurrency]="The number of remote browsers should be divisible by the concurrency factor.",Ir[Cr.cannotSetConcurrencyWithCDPPort]='The value of the "concurrency" option includes the CDP port.',Ir[Cr.portsOptionRequiresTwoNumbers]='The "--ports" argument accepts two values at a time.',Ir[Cr.portIsNotFree]="Port {portNum} is occupied by another process.",Ir[Cr.invalidHostname]='Cannot resolve hostname "{hostname}".',Ir[Cr.cannotFindSpecifiedTestSource]='Cannot find a test file at "{path}".',Ir[Cr.clientFunctionCodeIsNotAFunction]="Cannot initialize a ClientFunction because {#instantiationCallsiteName} is {type}, and not a function.",Ir[Cr.selectorInitializedWithWrongType]="Cannot initialize a Selector because {#instantiationCallsiteName} is {type}, and not one of the following: a CSS selector string, a Selector object, a node snapshot, a function, or a Promise returned by a Selector.",Ir[Cr.clientFunctionCannotResolveTestRun]="{#instantiationCallsiteName} cannot implicitly resolve the test run in context of which it should be executed. If you need to call {#instantiationCallsiteName} from the Node.js API callback, pass the test controller manually via {#instantiationCallsiteName}'s `.with({ boundTestRun: t })` method first. Note that you cannot execute {#instantiationCallsiteName} outside the test code.",Ir[Cr.requestCannotResolveTestRun]="'request' cannot implicitly resolve the test run in context of which it should be executed. Note that you cannot execute 'request' in the experimental debug mode.",Ir[Cr.regeneratorInClientFunctionCode]='{#instantiationCallsiteName} code, arguments or dependencies cannot contain generators or "async/await" syntax (use Promises instead).',Ir[Cr.invalidClientFunctionTestRunBinding]='Cannot resolve the "boundTestRun" option because its value is not a test controller.',Ir[Cr.invalidValueType]="{smthg} ({actual}) is not of expected type ({type}).",Ir[Cr.unsupportedUrlProtocol]='Invalid {what}: "{url}". TestCafe cannot execute the test because the {what} includes the {protocol} protocol. TestCafe supports the following protocols: http://, https:// and file://.',Ir[Cr.testControllerProxyCannotResolveTestRun]="Cannot implicitly resolve the test run in the context of which the test controller action should be executed. Use test function's 't' argument instead.",Ir[Cr.timeLimitedPromiseTimeoutExpired]="A Promise timed out.",Ir[Cr.cannotSetVideoOptionsWithoutBaseVideoPathSpecified]="You cannot manage advanced video parameters when the video recording capability is off. Specify the root storage folder for video content to enable video recording.",Ir[Cr.multipleAPIMethodCallForbidden]='You cannot call the "{methodName}" method more than once. Specify an array of parameters instead.',Ir[Cr.invalidReporterOutput]="Specify a file name or a writable stream as the reporter's output target.",Ir[Cr.cannotReadSSLCertFile]='Unable to read the file referenced by the "{option}" ssl option ("{path}"). Error details:\n\n{err}',Ir[Cr.cannotPrepareTestsDueToError]="Cannot prepare tests due to the following error:\n\n{errMessage}",Ir[Cr.cannotParseRawFile]='Cannot parse a raw test file at "{path}" due to the following error:\n\n{errMessage}',Ir[Cr.testedAppFailedWithError]="The web application failed with the following error:\n\n{errMessage}",Ir[Cr.unableToOpenBrowser]='Unable to open the "{alias}" browser due to the following error:\n\n{errMessage}',Ir[Cr.requestHookConfigureAPIError]="Attempt to configure a request hook resulted in the following error:\n\n{requestHookName}: {errMsg}",Ir[Cr.forbiddenCharatersInScreenshotPath]='There are forbidden characters in the "{screenshotPath}" {screenshotPathType}:\n {forbiddenCharsDescription}',Ir[Cr.cannotFindFFMPEG]="TestCafe cannot record videos because it cannot locate the FFmpeg executable. Try one of the following solutions:\n\n* add the path of the FFmpeg installation directory to the PATH environment variable,\n* specify the path of the FFmpeg executable in the FFMPEG_PATH environment variable or the ffmpegPath option,\n* install the @ffmpeg-installer/ffmpeg npm package.",Ir[Cr.cannotFindTypescriptConfigurationFile]='"{filePath}" is not a valid TypeScript configuration file.',Ir[Cr.clientScriptInitializerIsNotSpecified]="Initialize your client script with one of the following: a JavaScript script, a JavaScript file path, or the name of a JavaScript module.",Ir[Cr.clientScriptBasePathIsNotSpecified]="Specify the base path for the client script file.",Ir[Cr.clientScriptInitializerMultipleContentSources]="Client scripts can only have one initializer: JavaScript code, a JavaScript file path, or the name of a JavaScript module.",Ir[Cr.cannotLoadClientScriptFromPath]="Cannot load a client script from {path}.\n{errorMessage}",Ir[Cr.clientScriptModuleEntryPointPathCalculationError]="A client script tried to load a JavaScript module that TestCafe cannot locate:\n\n{errorMessage}.",Ir[Cr.methodIsNotAvailableForAnIPCHost]="This method cannot be called on a service host.",Ir[Cr.tooLargeIPCPayload]="The specified payload is too large to form an IPC packet.",Ir[Cr.malformedIPCMessage]="Cannot process a malformed IPC message.",Ir[Cr.unexpectedIPCHeadPacket]="Cannot create an IPC message due to an unexpected IPC head packet.",Ir[Cr.unexpectedIPCBodyPacket]="Cannot create an IPC message due to an unexpected IPC body packet.",Ir[Cr.unexpectedIPCTailPacket]="Cannot create an IPC message due to an unexpected IPC tail packet.",Ir[Cr.cannotRunLocalNonHeadlessBrowserWithoutDisplay]="Your Linux version does not have a graphic subsystem to run {browserAlias} with a GUI. You can launch the browser in headless mode. If you use a portable browser executable, specify the browser alias before the path instead of the 'path' prefix. "+"For more information, see ".concat(Lr),Ir[Cr.uncaughtErrorInReporter]='The "{methodName}" method of the "{reporterName}" reporter produced an uncaught error. Error details:\n{originalError}',Ir[Cr.roleInitializedWithRelativeUrl]="You cannot specify relative login page URLs in the Role constructor. Use an absolute URL.",Ir[Cr.typeScriptCompilerLoadingError]="Cannot load the TypeScript compiler.\n{originErrorMessage}.",Ir[Cr.cannotCustomizeSpecifiedCompilers]="You cannot specify options for the {noncustomizableCompilerList} compiler{suffix}.",Ir[Cr.cannotEnableRetryTestPagesOption]="Cannot enable the 'retryTestPages' option. Apply one of the following two solutions:\n-- set 'localhost' as the value of the 'hostname' option\n-- run TestCafe over HTTPS\n",Ir[Cr.browserConnectionError]="{originErrorMessage}\n{numOfNotOpenedConnection} of {numOfAllConnections} browser connections have not been established:\n{listOfNotOpenedConnections}\n\nHints:\n{listOfHints}",Ir[Pr.TooHighConcurrencyFactor]="The host machine may not be powerful enough to handle the specified concurrency factor ({concurrencyFactor}). Try to decrease the concurrency factor or allocate more computing resources to the host machine.",Ir[Pr.UseBrowserInitOption]='Increase the value of the "browserInitTimeout" option if it is too low (currently: {browserInitTimeoutMsg}). This option determines how long TestCafe waits for browsers to be ready.',Ir[Pr.RestErrorCauses]="The error can also be caused by network issues or remote device failure. Make sure that your network connection is stable and you can reach the remote device.",Ir[Cr.cannotFindTestcafeConfigurationFile]="Cannot locate a TestCafe configuration file at {filePath}. Either the file does not exist, or the path is invalid.",Ir[Cr.dashboardTokenInJSON]="Insecure token declaration: cannot declare a Dashboard token in a JSON configuration file. Use a JavaScript configuration file, or declare a Dashboard token with one of the following: the CLI, the Test Runner API, the TESTCAFE_DASHBOARD_TOKEN environment variable.",Ir[Cr.relativeBaseUrl]='The value of the baseUrl argument cannot be relative: "{baseUrl}"',Ir[Cr.requestUrlInvalidValueError]="Requested url isn't valid ({actualValue}).",Ir[Cr.requestRuntimeError]="The request was interrupted by an error:\n{message}",Ir[Cr.invalidSkipJsErrorsOptionsObjectProperty]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors: '.concat(Mr(Object.keys(Sr)),"."),Ir[Cr.invalidSkipJsErrorsCallbackWithOptionsProperty]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors callback: '.concat(Mr(Object.keys(Tr)),"."),Ir[Cr.invalidCommandInJsonCompiler]='TestCafe terminated the test run. The "{path}" file contains an unknown Chrome User Flow action "{action}". Remove the action to continue. Refer to the following article for the definitive list of supported Chrome User Flow actions: https://testcafe.io/documentation/403998/guides/experimental-capabilities/chrome-replay-support#supported-replay-actions',Ir[Cr.timeLimitedPromiseTimeoutExpired]),Wr=(g(kr,Or=Error),kr);function kr(){var e=Or.call(this,Vr)||this;return e.code=Cr.timeLimitedPromiseTimeoutExpired,e}function Hr(e){var t=e.replace(/^\+/g,"plus").replace(/\+\+/g,"+plus").split("+");return k(t,function(e){return e.replace("plus","+")})}function Dr(e){var t=1===e.length||"space"===e?e:e.toLowerCase();return a.modifiersMap[t]&&(t=a.modifiersMap[t]),t}var Ur,qr,Br=f.utils.trim,Gr={run:"run",idle:"idle"};(qr=Ur=Ur||{}).ok="ok",qr.closing="closing";var jr=Ur,zr=hi.location.href,Jr=hi.location.origin,Kr=Jr+"/service-worker.js",Yr="file://",Xr=!1,Qr=null,$r=eval;function Zr(t){return new u(function(e){return setTimeout(e,t)})}function ei(e,r,t){var n=void 0===t?{}:t,o=n.method,i=void 0===o?"GET":o,a=n.data,s=void 0===a?null:a,l=n.parseResponse,c=void 0===l||l;return new u(function(t,n){var o=r();o.open(i,e,!0),o.onreadystatechange=function(){var e;4===o.readyState&&(200===o.status?((e=o.responseText||"")&&c&&(e=JSON.parse(o.responseText)),t(e)):n("disconnected"))},o.send(s)})}function ti(e){return zr.toLowerCase()===e.toLowerCase()}function ni(){Xr=!1}function oi(e,t,n){var o;ni(),void 0===(o=e.url)&&(o=""),0===o.indexOf(Yr)?ei(n,t,{method:"POST",data:JSON.stringify({url:e.url})}):hi.location=e.url}function ri(e){return(e.cmd===Gr.run||e.cmd===Gr.idle)&&!ti(e.url)}function ii(e,r,t){var i=e.statusUrl,a=e.openFileProtocolUrl,n=void 0===t?{}:t,s=n.manualRedirect,l=n.proxyless;return E(this,void 0,void 0,function(){var n,o;return v(this,function(e){switch(e.label){case 0:return[4,ei(i,r)];case 1:return n=e.sent(),(o=l?(t=n).cmd!==Gr.idle||ri(t):ri(n))&&!s&&oi(n,r,a),[2,{command:n,redirecting:o}]}var t})})}var ai=Object.freeze({__proto__:null,delay:Zr,sendXHR:ei,startHeartbeat:function(e,t){function n(){ei(e,t).then(function(e){e.code!==jr.closing||ti(e.url)||(ni(),hi.location=e.url)})}Qr=fi.setInterval(n,2e3),n()},stopHeartbeat:function(){fi.clearInterval(Qr)},startInitScriptExecution:function(e,t){Xr=!0,function e(t,n){Xr&&ei(t,n).then(function(e){return e.code?ei(t,n,{method:"POST",data:JSON.stringify($r(e.code))}):null}).then(function(){fi.setTimeout(function(){return e(t,n)},1e3)})}(e,t)},stopInitScriptExecution:ni,redirect:oi,checkStatus:function(){for(var r,i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return E(this,void 0,void 0,function(){var t,n,o;return v(this,function(e){switch(e.label){case 0:n=t=null,o=0,e.label=1;case 1:return o<5?[4,function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return E(this,void 0,void 0,function(){var t;return v(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,ii.apply(void 0,n)];case 1:return[2,e.sent()];case 2:return t=e.sent(),console.error(t),[2,{error:t}];case 3:return[2]}})})}.apply(void 0,i)]:[3,5];case 2:return r=e.sent(),t=r.error,n=function(e,t){var n={};for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}(r,["error"]),t?[4,Zr(1e3)]:[2,n];case 3:e.sent(),e.label=4;case 4:return o++,[3,1];case 5:throw t}})})},enableRetryingTestPages:function(){return E(this,void 0,void 0,function(){var t;return v(this,function(e){switch(e.label){case 0:if(!navigator.serviceWorker)return[2];e.label=1;case 1:return e.trys.push([1,4,,5]),[4,navigator.serviceWorker.register(Kr,{scope:Jr})];case 2:return e.sent(),[4,navigator.serviceWorker.ready];case 3:return e.sent(),[3,5];case 4:return t=e.sent(),console.error(t),[3,5];case 5:return[2]}})})},getActiveWindowId:function(e,t){return ei(e,t)},setActiveWindowId:function(e,t,n){return ei(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},closeWindow:function(e,t,n){return ei(e,t,{method:"POST",data:JSON.stringify({windowId:n})})}}),si={};si.RequestBarrier=h,si.ClientRequestEmitter=I,si.ScriptExecutionBarrier=N,si.ScriptExecutionEmitter=A,si.pageUnloadBarrier=Gt,si.preventRealEvents=function(){Pn.initElementListening(fi,xn),Pn.addFirstInternalEventBeforeListener(fi,xn,Mn),Yt.init()},si.disableRealEventsPreventing=function(){Pn.removeInternalEventBeforeListener(fi,xn,Mn)},si.scrollController=Yt,si.ScrollAutomation=vo,si.selectController=Gn,si.serviceUtils=zt,si.domUtils=pt,si.contentEditable=Ko,si.positionUtils=fo,si.styleUtils=_n,si.scrollUtils=Hn,si.eventUtils=xt,si.arrayUtils=X,si.promiseUtils=po,si.textSelection=vr,si.waitFor=function(i,a,s){return new yr(function(e,t){var n,o,r=i();r?e(r):(n=br.setInterval.call(fi,function(){(r=i())&&(br.clearInterval.call(fi,n),br.clearTimeout.call(fi,o),e(r))},a),o=br.setTimeout.call(fi,function(){br.clearInterval.call(fi,n),t()},s))})},si.delay=c,si.getTimeLimitedPromise=function(e,t){return d.Promise.race([e,c(t).then(function(){return d.Promise.reject(new Wr)})])},si.noop=function(){},si.getKeyArray=Hr,si.getSanitizedKey=Dr,si.parseKeySequence=function(e){if("string"!=typeof e)return{error:!0};var t=(e=Br(e).replace(/\s+/g," ")).length,n=e.charAt(t-1),o=e.charAt(t-2);1<t&&"+"===n&&!/[+ ]/.test(o)&&(e=e.substring(0,e.length-1));var r=e.split(" ");return{combinations:r,error:G(r,function(e){var t=Hr(e);return G(t,function(e){var t=1===e.length||"space"===e,n=Dr(e),o=a.modifiers[n],r=a.specialKeys[n];return!(t||o||r)})}),keys:e}},si.sendRequestToFrame=Eo,si.KEY_MAPS=a,si.browser=ai,si.stringifyElement=Xn,si.selectorTextFilter=function o(e,r,i,a){function t(e){for(var t=e.childNodes.length,n=0;n<t;n++)if(o(e.childNodes[n],r,i,a))return!0;return!1}function n(e){return a instanceof RegExp?a.test(e):a===e.trim()}if(1===e.nodeType)return n(e.innerText||e.textContent);if(9!==e.nodeType)return 11===e.nodeType?t(e):n(e.textContent);var s=e.querySelector("head"),l=e.querySelector("body");return t(s)||t(l)},si.selectorAttributeFilter=function(e,t,n,o,r){if(1!==e.nodeType)return!1;function i(e,t){return"string"==typeof t?t===e:t.test(e)}for(var a,s=e.attributes,l=0;l<s.length;l++)if(i((a=s[l]).nodeName,o)&&(!r||i(a.nodeValue,r)))return!0;return!1},si.TEST_RUN_ERRORS={uncaughtErrorOnPage:"E1",uncaughtErrorInTestCode:"E2",uncaughtNonErrorObjectInTestCode:"E3",uncaughtErrorInClientFunctionCode:"E4",uncaughtErrorInCustomDOMPropertyCode:"E5",unhandledPromiseRejection:"E6",uncaughtException:"E7",missingAwaitError:"E8",actionIntegerOptionError:"E9",actionPositiveIntegerOptionError:"E10",actionBooleanOptionError:"E11",actionSpeedOptionError:"E12",actionOptionsTypeError:"E14",actionBooleanArgumentError:"E15",actionStringArgumentError:"E16",actionNullableStringArgumentError:"E17",actionStringOrStringArrayArgumentError:"E18",actionStringArrayElementError:"E19",actionIntegerArgumentError:"E20",actionRoleArgumentError:"E21",actionPositiveIntegerArgumentError:"E22",actionSelectorError:"E23",actionElementNotFoundError:"E24",actionElementIsInvisibleError:"E26",actionSelectorMatchesWrongNodeTypeError:"E27",actionAdditionalElementNotFoundError:"E28",actionAdditionalElementIsInvisibleError:"E29",actionAdditionalSelectorMatchesWrongNodeTypeError:"E30",actionElementNonEditableError:"E31",actionElementNotTextAreaError:"E32",actionElementNonContentEditableError:"E33",actionElementIsNotFileInputError:"E34",actionRootContainerNotFoundError:"E35",actionIncorrectKeysError:"E36",actionCannotFindFileToUploadError:"E37",actionUnsupportedDeviceTypeError:"E38",actionIframeIsNotLoadedError:"E39",actionElementNotIframeError:"E40",actionInvalidScrollTargetError:"E41",currentIframeIsNotLoadedError:"E42",currentIframeNotFoundError:"E43",currentIframeIsInvisibleError:"E44",nativeDialogNotHandledError:"E45",uncaughtErrorInNativeDialogHandler:"E46",setTestSpeedArgumentError:"E47",setNativeDialogHandlerCodeWrongTypeError:"E48",clientFunctionExecutionInterruptionError:"E49",domNodeClientFunctionResultError:"E50",invalidSelectorResultError:"E51",cannotObtainInfoForElementSpecifiedBySelectorError:"E52",externalAssertionLibraryError:"E53",pageLoadError:"E54",windowDimensionsOverflowError:"E55",forbiddenCharactersInScreenshotPathError:"E56",invalidElementScreenshotDimensionsError:"E57",roleSwitchInRoleInitializerError:"E58",assertionExecutableArgumentError:"E59",assertionWithoutMethodCallError:"E60",assertionUnawaitedPromiseError:"E61",requestHookNotImplementedError:"E62",requestHookUnhandledError:"E63",uncaughtErrorInCustomClientScriptCode:"E64",uncaughtErrorInCustomClientScriptCodeLoadedFromModule:"E65",uncaughtErrorInCustomScript:"E66",uncaughtTestCafeErrorInCustomScript:"E67",childWindowIsNotLoadedError:"E68",childWindowNotFoundError:"E69",cannotSwitchToWindowError:"E70",closeChildWindowError:"E71",childWindowClosedBeforeSwitchingError:"E72",cannotCloseWindowWithChildrenError:"E73",targetWindowNotFoundError:"E74",parentWindowNotFoundError:"E76",previousWindowNotFoundError:"E77",switchToWindowPredicateError:"E78",actionFunctionArgumentError:"E79",multipleWindowsModeIsDisabledError:"E80",multipleWindowsModeIsNotSupportedInRemoteBrowserError:"E81",cannotCloseWindowWithoutParent:"E82",cannotRestoreChildWindowError:"E83",executionTimeoutExceeded:"E84",actionRequiredCookieArguments:"E85",actionCookieArgumentError:"E86",actionCookieArgumentsError:"E87",actionUrlCookieArgumentError:"E88",actionUrlsCookieArgumentError:"E89",actionStringOptionError:"E90",actionDateOptionError:"E91",actionNumberOptionError:"E92",actionUrlOptionError:"E93",actionUrlSearchParamsOptionError:"E94",actionObjectOptionError:"E95",actionUrlArgumentError:"E96",actionStringOrRegexOptionError:"E97",actionSkipJsErrorsArgumentError:"E98",actionFunctionOptionError:"E99",actionInvalidObjectPropertyError:"E100",actionElementIsNotTargetError:"E101"},si.RUNTIME_ERRORS=Cr;var li=f.nativeMethods,ci=f.EVENTS.evalIframeScript;li.objectDefineProperty(fi,"%testCafeCore%",{configurable:!0,value:si}),f.on(ci,function(e){return di(li.contentWindowGetter.call(e.iframe))});var ui=f.eventSandbox.message;ui.on(ui.SERVICE_MSG_RECEIVED_EVENT,function(e){var t,n,o,r,i;e.message.cmd===vo.SCROLL_REQUEST_CMD&&(n=(t=e.message).offsetX,o=t.offsetY,r=t.maxScrollMargin,i=it(e.source),new vo(i,{offsetX:n,offsetY:o},r).run().then(function(){return ui.sendServiceMsg({cmd:vo.SCROLL_RESPONSE_CMD},e.source)}))})}(fi["%hammerhead%"],fi["%hammerhead%"].Promise)}(window);
|
|
@@ -4,6 +4,8 @@ const index_1 = require("../../../../../shared/errors/index");
|
|
|
4
4
|
const utils_1 = require("./utils");
|
|
5
5
|
// @ts-ignore
|
|
6
6
|
const hammerhead_1 = require("../../../deps/hammerhead");
|
|
7
|
+
// @ts-ignore
|
|
8
|
+
const testcafe_core_1 = require("../../../deps/testcafe-core");
|
|
7
9
|
const SELECTOR_FILTER_ERROR = {
|
|
8
10
|
filterVisible: 1,
|
|
9
11
|
filterHidden: 2,
|
|
@@ -27,11 +29,11 @@ class SelectorFilter {
|
|
|
27
29
|
}
|
|
28
30
|
filter(nodes, options, apiInfo) {
|
|
29
31
|
if (options.filterVisible) {
|
|
30
|
-
nodes = nodes.filter(
|
|
32
|
+
nodes = nodes.filter(testcafe_core_1.positionUtils.isElementVisible);
|
|
31
33
|
this._assertFilterError(nodes, apiInfo, SELECTOR_FILTER_ERROR.filterVisible);
|
|
32
34
|
}
|
|
33
35
|
if (options.filterHidden) {
|
|
34
|
-
nodes = nodes.filter(n => !
|
|
36
|
+
nodes = nodes.filter(n => !testcafe_core_1.positionUtils.isElementVisible(n));
|
|
35
37
|
this._assertFilterError(nodes, apiInfo, SELECTOR_FILTER_ERROR.filterHidden);
|
|
36
38
|
}
|
|
37
39
|
if (options.counterMode) {
|
|
@@ -81,4 +83,4 @@ class SelectorFilter {
|
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
85
|
exports.default = new SelectorFilter();
|
|
84
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
86
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2NsaW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c1tpbmRleF07XG4gICAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBuZXcgU2VsZWN0b3JGaWx0ZXIoKTtcbiJdfQ==
|
|
@@ -1,23 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isArrayOfNodes = exports.castToArray = exports.isNodeCollection =
|
|
3
|
+
exports.isArrayOfNodes = exports.castToArray = exports.isNodeCollection = void 0;
|
|
4
4
|
// @ts-ignore
|
|
5
5
|
const hammerhead_1 = require("../../../deps/hammerhead");
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
const testcafe_core_1 = require("../../../deps/testcafe-core");
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
const testcafe_ui_1 = require("../../../deps/testcafe-ui");
|
|
10
|
-
const position_1 = require("../../../../core/utils/position");
|
|
11
|
-
function visible(el) {
|
|
12
|
-
if (testcafe_core_1.domUtils.isIframeElement(el))
|
|
13
|
-
return (0, position_1.isIframeVisible)(el);
|
|
14
|
-
if (!hammerhead_1.utils.dom.isDomElement(el) && !hammerhead_1.utils.dom.isTextNode(el))
|
|
15
|
-
return false;
|
|
16
|
-
if (testcafe_core_1.domUtils.isOptionElement(el) || testcafe_core_1.domUtils.getTagName(el) === 'optgroup')
|
|
17
|
-
return testcafe_ui_1.selectElement.isOptionElementVisible(el);
|
|
18
|
-
return (0, position_1.isElementVisible)(el);
|
|
19
|
-
}
|
|
20
|
-
exports.visible = visible;
|
|
21
6
|
function isNodeCollection(obj) {
|
|
22
7
|
return obj instanceof hammerhead_1.nativeMethods.HTMLCollection || obj instanceof hammerhead_1.nativeMethods.NodeList;
|
|
23
8
|
}
|
|
@@ -41,4 +26,4 @@ function isArrayOfNodes(obj) {
|
|
|
41
26
|
return true;
|
|
42
27
|
}
|
|
43
28
|
exports.isArrayOfNodes = isArrayOfNodes;
|
|
44
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
//# sourceMappingURL=data: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