testcafe 3.4.0 → 3.5.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.
Files changed (65) hide show
  1. package/lib/api/skip-js-errors/index.js +1 -1
  2. package/lib/api/test-controller/index.js +4 -4
  3. package/lib/browser/connection/gateway/index.js +10 -1
  4. package/lib/browser/connection/index.js +9 -1
  5. package/lib/browser/connection/service-routes.js +2 -1
  6. package/lib/browser/provider/built-in/dedicated/base.js +7 -3
  7. package/lib/browser/provider/built-in/dedicated/chrome/build-chrome-args.js +5 -3
  8. package/lib/browser/provider/built-in/dedicated/chrome/cdp-client/index.js +44 -28
  9. package/lib/browser/provider/built-in/dedicated/chrome/cdp-client/utils.js +31 -0
  10. package/lib/browser/provider/built-in/dedicated/chrome/index.js +18 -15
  11. package/lib/browser/provider/built-in/dedicated/chrome/local-chrome.js +3 -3
  12. package/lib/browser/provider/index.js +14 -3
  13. package/lib/browser/provider/plugin-host.js +5 -2
  14. package/lib/cli/argument-parser/index.js +4 -1
  15. package/lib/client/automation/index.js +28 -5
  16. package/lib/client/automation/index.min.js +1 -1
  17. package/lib/client/browser/idle-page/index.js +1 -0
  18. package/lib/client/core/index.js +21 -5
  19. package/lib/client/core/index.min.js +1 -1
  20. package/lib/client/core/utils/style.js +6 -2
  21. package/lib/client/driver/generate-id.js +4 -2
  22. package/lib/client/driver/index.js +94 -24
  23. package/lib/client/driver/index.min.js +1 -1
  24. package/lib/client/test-run/iframe.js.mustache +11 -1
  25. package/lib/client/test-run/index.js.mustache +25 -18
  26. package/lib/client/ui/index.js +41 -16
  27. package/lib/client/ui/index.min.js +1 -1
  28. package/lib/client/ui/styles.css +1 -0
  29. package/lib/client-functions/client-function-builder.js +3 -3
  30. package/lib/client-functions/selectors/selector-builder.js +3 -3
  31. package/lib/configuration/default-values.js +3 -2
  32. package/lib/configuration/option-names.js +3 -1
  33. package/lib/configuration/run-option-names.js +2 -1
  34. package/lib/configuration/screenshot-option-names.js +2 -1
  35. package/lib/configuration/testcafe-configuration.js +3 -1
  36. package/lib/configuration/types.js +1 -1
  37. package/lib/native-automation/index.js +40 -6
  38. package/lib/native-automation/request-pipeline/index.js +9 -5
  39. package/lib/native-automation/request-pipeline/special-handlers.js +19 -5
  40. package/lib/native-automation/request-pipeline/test-run-bridge.js +4 -3
  41. package/lib/native-automation/types.js +1 -1
  42. package/lib/notifications/warning-message.js +2 -1
  43. package/lib/reporter/command/command-formatter.js +5 -5
  44. package/lib/runner/browser-job.js +3 -2
  45. package/lib/runner/fixture-hook-controller.js +14 -5
  46. package/lib/runner/index.js +13 -6
  47. package/lib/runner/task/index.js +3 -2
  48. package/lib/runner/test-run-controller.js +5 -1
  49. package/lib/screenshots/capturer.js +7 -5
  50. package/lib/screenshots/index.js +4 -3
  51. package/lib/test-run/bookmark.js +1 -1
  52. package/lib/test-run/browser-manipulation-queue.js +2 -1
  53. package/lib/test-run/commands/actions.js +3 -3
  54. package/lib/test-run/commands/browser-manipulation.js +2 -1
  55. package/lib/test-run/commands/execute-client-function.js +47 -0
  56. package/lib/test-run/commands/observation.js +10 -38
  57. package/lib/test-run/commands/service.js +3 -2
  58. package/lib/test-run/commands/validations/initializers.js +3 -3
  59. package/lib/test-run/index.js +20 -11
  60. package/lib/test-run/session-controller.js +3 -3
  61. package/lib/utils/path-pattern.js +8 -5
  62. package/package.json +3 -3
  63. package/ts-defs/index.d.ts +4 -0
  64. package/ts-defs/selectors.d.ts +4 -0
  65. package/ts-defs/testcafe-scripts.d.ts +4 -0
@@ -379,6 +379,7 @@
379
379
  idle: '/browser/idle',
380
380
  idleForced: '/browser/idle-forced',
381
381
  activeWindowId: '/browser/active-window-id',
382
+ ensureWindowInNativeAutomation: '/browser/ensure-window-in-native-automation',
382
383
  closeWindow: '/browser/close-window',
383
384
  serviceWorker: '/service-worker.js',
384
385
  openFileProtocol: '/browser/open-file-protocol',
@@ -1471,6 +1471,9 @@ window['%hammerhead%'].utils.removeInjectedScript();
1471
1471
  }
1472
1472
  function isFixedElement(node) {
1473
1473
  return isElementNode(node) && styleUtils.get(node, 'position') === 'fixed';
1474
+ }
1475
+ function isStickyElement(node) {
1476
+ return isElementNode(node) && styleUtils.get(node, 'position') === 'sticky';
1474
1477
  }
1475
1478
 
1476
1479
  var styleUtils$1 = /*#__PURE__*/Object.freeze({
@@ -1502,7 +1505,8 @@ window['%hammerhead%'].utils.removeInjectedScript();
1502
1505
  isNotDisplayedNode: isNotDisplayedNode,
1503
1506
  isNotVisibleNode: isNotVisibleNode,
1504
1507
  hasDimensions: hasDimensions,
1505
- isFixedElement: isFixedElement
1508
+ isFixedElement: isFixedElement,
1509
+ isStickyElement: isStickyElement
1506
1510
  });
1507
1511
 
1508
1512
  var browserUtils$2 = hammerhead.utils.browser;
@@ -2367,15 +2371,19 @@ window['%hammerhead%'].utils.removeInjectedScript();
2367
2371
  })
2368
2372
  .then(function () { return _this._scrollWasPerformed; });
2369
2373
  };
2370
- ScrollAutomation._getFixedAncestorOrSelf = function (element) {
2371
- return findParent(element, true, isFixedElement);
2374
+ ScrollAutomation._getPinnedElementAncestorOrSelf = function (element, styleUtilsMethod) {
2375
+ return findParent(element, true, styleUtilsMethod);
2376
+ };
2377
+ ScrollAutomation.prototype._isTargetElementObscuredInPointByElement = function (element, styleUtilsMethod) {
2378
+ var pinnedElement = ScrollAutomation._getPinnedElementAncestorOrSelf(element, styleUtilsMethod);
2379
+ return !!pinnedElement && !pinnedElement.contains(this._element);
2372
2380
  };
2373
2381
  ScrollAutomation.prototype._isTargetElementObscuredInPoint = function (point) {
2374
2382
  var elementInPoint = getElementFromPoint(point);
2375
2383
  if (!elementInPoint)
2376
2384
  return false;
2377
- var fixedElement = ScrollAutomation._getFixedAncestorOrSelf(elementInPoint);
2378
- return !!fixedElement && !fixedElement.contains(this._element);
2385
+ return this._isTargetElementObscuredInPointByElement(elementInPoint, isFixedElement) ||
2386
+ this._isTargetElementObscuredInPointByElement(elementInPoint, isStickyElement);
2379
2387
  };
2380
2388
  ScrollAutomation.prototype.run = function () {
2381
2389
  var _this = this;
@@ -3619,6 +3627,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
3619
3627
  idle: '/browser/idle',
3620
3628
  idleForced: '/browser/idle-forced',
3621
3629
  activeWindowId: '/browser/active-window-id',
3630
+ ensureWindowInNativeAutomation: '/browser/ensure-window-in-native-automation',
3622
3631
  closeWindow: '/browser/close-window',
3623
3632
  serviceWorker: '/service-worker.js',
3624
3633
  openFileProtocol: '/browser/open-file-protocol',
@@ -3856,6 +3865,12 @@ window['%hammerhead%'].utils.removeInjectedScript();
3856
3865
  data: JSON.stringify({ windowId: windowId }), //eslint-disable-line no-restricted-globals
3857
3866
  });
3858
3867
  }
3868
+ function ensureWindowInNativeAutomation(ensureWindowInNativeAutomationUrl, createXHR, windowId) {
3869
+ return sendXHR(ensureWindowInNativeAutomationUrl, createXHR, {
3870
+ method: 'POST',
3871
+ data: JSON.stringify({ windowId: windowId }), //eslint-disable-line no-restricted-globals
3872
+ });
3873
+ }
3859
3874
  function closeWindow(closeWindowUrl, createXHR, windowId) {
3860
3875
  return sendXHR(closeWindowUrl, createXHR, {
3861
3876
  method: 'POST',
@@ -3919,6 +3934,7 @@ window['%hammerhead%'].utils.removeInjectedScript();
3919
3934
  enableRetryingTestPages: enableRetryingTestPages,
3920
3935
  getActiveWindowId: getActiveWindowId,
3921
3936
  setActiveWindowId: setActiveWindowId,
3937
+ ensureWindowInNativeAutomation: ensureWindowInNativeAutomation,
3922
3938
  closeWindow: closeWindow,
3923
3939
  dispatchNativeAutomationEvent: dispatchNativeAutomationEvent,
3924
3940
  dispatchNativeAutomationEventSequence: dispatchNativeAutomationEventSequence,
@@ -1 +1 @@
1
- window["%hammerhead%"].utils.removeInjectedScript(),function Qr($r){var Zr=$r.document;!function(u,d){var o="default"in u?u.default:u;d=d&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d;var e={alt:18,ctrl:17,meta:91,shift:16},t={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=","{":"[","}":"]",":":";",'"':"'","|":"\\","<":",",">":".","?":"/","±":"§"},n={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:"ArrowLeft",down:"ArrowDown",right:"ArrowRight",up:"ArrowUp",backspace:"Backspace",capslock:"CapsLock",delete:"Delete",end:"End",enter:"Enter",esc:"Escape",home:"Home",ins:"Insert",pagedown:"PageDown",pageup:"PageUp",space:" ",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:e,shiftMap:t,specialKeys:n,keyProperty:r,modifiersMap:{option:"alt"},symbolCharCodeToKeyCode:{96:192,91:219,93:221,92:220,59:186,39:222,44:188,45:o.utils.browser.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(e),reversedShiftMap:i(t),reversedSpecialKeys:i(n),reversedKeyProperty:i(r),newLineKeys:["enter","\n","\r"]},s=o.Promise,l=o.nativeMethods;function c(t){return new s(function(e){return l.setTimeout.call($r,e,t)})}var f=(h.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)})},h.prototype._offListening=function(){this._emitter.offAll()},h.prototype._onRequestSend=function(e){this._collectingReqs&&this._requests.add(e)},h.prototype._onRequestCompleted=function(e){var t=this;c(this._delays.additionalRequestsCollection).then(function(){return t._onRequestFinished(e)})},h.prototype._onRequestFinished=function(e){this._requests.has(e)&&(this._requests.delete(e),this._collectingReqs||this._requests.size||!this._watchdog||this._finishWaiting())},h.prototype._onRequestError=function(e){this._onRequestFinished(e)},h.prototype._finishWaiting=function(){this._watchdog&&((0,u.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._requests.clear(),this._offListening(),this._waitResolve()},h.prototype.wait=function(e){var n=this;return c(e?this._delays.pageInitialRequestsCollection:this._delays.requestsCollection).then(function(){return new u.Promise(function(e){var t;n._collectingReqs=!1,n._waitResolve=e,n._requests.size?(t=u.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},h.TIMEOUT)):n._finishWaiting()})})},h.TIMEOUT=3e3,h);function h(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 p=function(e,t){return(p=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 m(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}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function g(e,a,s,l){return new(s=s||d)(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 E(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 v(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 y=(b.prototype.on=function(e,t){this._eventsListeners[e]||(this._eventsListeners[e]=[]),this._eventsListeners[e].push(t)},b.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)})},b.prototype.off=function(e,t){var n=this._eventsListeners[e];n&&(this._eventsListeners[e]=u.nativeMethods.arrayFilter.call(n,function(e){return e!==t}))},b.prototype.offAll=function(e){e?this._eventsListeners[e]=[]:this._eventsListeners={}},b.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=this._eventsListeners[e];if(o)for(var r=0;r<o.length;r++)o[r].apply(this,t)},b);function b(){this._eventsListeners={}}var C,S="request-send",w="request-completed",T="request-error",_=(m(P,C=y),P.prototype._addHammerheadListener=function(e,t){o.on(e,t),this._hammerheadListenersInfo.push({evt:e,listener:t})},P.prototype.onRequestSend=function(e){this.on(S,e)},P.prototype.onRequestCompleted=function(e){this.on(w,e)},P.prototype.onRequestError=function(e){this.on(T,e)},P.prototype.offAll=function(){C.prototype.offAll.call(this);for(var e=0,t=this._hammerheadListenersInfo;e<t.length;e++){var n=t[e];o.off.call(o,n.evt,n.listener)}},P);function P(){var n=C.call(this)||this;return n._hammerheadListenersInfo=[],n._addHammerheadListener(o.EVENTS.beforeXhrSend,function(e){var t=e.xhr;return n.emit(S,t)}),n._addHammerheadListener(o.EVENTS.xhrCompleted,function(e){var t=e.xhr;return n.emit(w,t)}),n._addHammerheadListener(o.EVENTS.xhrError,function(e){var t=e.xhr;return n.emit(T,t)}),n._addHammerheadListener(o.EVENTS.fetchSent,function(e){n.emit(S,e),e.then(function(){return n.emit(w,e)},function(){return n.emit(T,e)})}),n}var I=(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,u.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,u.nativeMethods.clearTimeout)(this._scripts.get(e)),this._scripts.delete(e),this._scripts.size||c(25).then(function(){n._waitResolve&&!n._scripts.size&&n._finishWaiting()}))},N.prototype._finishWaiting=function(){this._watchdog&&((0,u.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 u.Promise(function(e){var t;n._waitResolve=e,n._scripts.size?(t=u.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 R,M=o.nativeMethods,x="script-added",O="script-loaded-or-failed",F=(m(A,R=y),A.prototype._onScriptElementAdded=function(e){var t,n=this,o=M.scriptSrcGetter.call(e);void 0!==o&&""!==o&&(this.emit(x,e),t=function(){M.removeEventListener.call(e,"load",t),M.removeEventListener.call(e,"error",t),n.emit(O,e)},M.addEventListener.call(e,"load",t),M.addEventListener.call(e,"error",t))},A.prototype.onScriptAdded=function(e){this.on(x,e)},A.prototype.onScriptLoadedOrFailed=function(e){this.on(O,e)},A.prototype.offAll=function(){R.prototype.offAll.call(this),o.off(o.EVENTS.scriptElementAdded,this._onScriptElementAdded)},A);function A(){var n=R.call(this)||this;return n._scriptElementAddedListener=function(e){var t=e.el;return n._onScriptElementAdded(t)},o.on(o.EVENTS.scriptElementAdded,n._scriptElementAddedListener),n}function L(e){var t="array"+e.charAt(0).toUpperCase()+e.slice(1),n=u.nativeMethods[t];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.call.apply(n,e)}}var V=L("filter"),W=L("map"),H=L("slice"),D=L("splice"),k=L("unshift"),U=L("forEach"),B=L("indexOf"),q=L("some"),G=L("reverse"),j=L("reduce"),z=L("concat"),J=L("join"),K=L("every");function Y(e,t){return u.nativeMethods.arrayFind.call(e,t)}var X=Object.freeze({__proto__:null,filter:V,map:W,slice:H,splice:D,unshift:k,forEach:U,indexOf:B,some:q,reverse:G,reduce:j,concat:z,join:J,every:K,isArray:function(e){return"[object Array]"===u.nativeMethods.objectToString.call(e)},from:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return u.nativeMethods.arrayFrom.apply(u.nativeMethods,v([e],t,!1))},find:Y,remove:function(e,t){var n=u.nativeMethods.arrayIndexOf.call(e,t);-1<n&&u.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=o.utils.browser,$=o.nativeMethods,Z=o.utils.style.get,ee=o.utils.dom.getActiveElement,te=o.utils.dom.findDocument,ne=o.utils.dom.find,oe=o.utils.dom.isElementInDocument,re=o.utils.dom.isElementInIframe,ie=o.utils.dom.getIframeByElement,ae=o.utils.dom.isCrossDomainWindows,se=o.utils.dom.getSelectParent,le=o.utils.dom.getChildVisibleIndex,ce=o.utils.dom.getSelectVisibleChildren,ue=o.utils.dom.isElementNode,de=o.utils.dom.isTextNode,fe=o.utils.dom.isRenderedNode,he=o.utils.dom.isIframeElement,pe=o.utils.dom.isInputElement,me=o.utils.dom.isButtonElement,ge=o.utils.dom.isFileInput,Ee=o.utils.dom.isTextAreaElement,ve=o.utils.dom.isAnchorElement,ye=o.utils.dom.isImgElement,be=o.utils.dom.isFormElement,Ce=o.utils.dom.isLabelElement,Se=o.utils.dom.isSelectElement,we=o.utils.dom.isRadioButtonElement,Te=o.utils.dom.isColorInputElement,_e=o.utils.dom.isCheckboxElement,Pe=o.utils.dom.isOptionElement,Ie=o.utils.dom.isSVGElement,Ne=o.utils.dom.isMapElement,Re=o.utils.dom.isBodyElement,Me=o.utils.dom.isHtmlElement,xe=o.utils.dom.isDocument,Oe=o.utils.dom.isTextEditableInput,Fe=o.utils.dom.isTextEditableElement,Ae=o.utils.dom.isTextEditableElementAndEditingAllowed,Le=o.utils.dom.isContentEditableElement,Ve=o.utils.dom.isDomElement,We=o.utils.dom.isShadowUIElement,He=o.utils.dom.isShadowRoot,De=o.utils.dom.isElementFocusable,ke=o.utils.dom.isHammerheadAttr,Ue=o.utils.dom.isElementReadOnly,Be=o.utils.dom.getScrollbarSize,qe=o.utils.dom.getMapContainer,Ge=o.utils.dom.getTagName,je=o.utils.dom.closest,ze=o.utils.dom.getParents,Je=o.utils.dom.findParent,Ke=o.utils.dom.getTopSameDomainWindow,Ye=o.utils.dom.getParentExceptShadowRoot;function Xe(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=0;c<n.length;c++){a=n[c],s=Ge(a),l=Qe(a),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.isAndroid&&Pe(e)||null!==n&&n<0)}(a,e,l)&&(t=a.getAttribute("contenteditable"),(r.test(s)||a.shadowRoot||he(a)||ve(a)&&a.hasAttribute("href")||""===t||"true"===t||null!==l)&&i.push(a))}return V(i,function(e){return!$e(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(Xe(a,t))}return o}function Qe(e){var t=$.getAttribute.call(e,"tabindex");return null!==t&&(t=parseInt(t,10),t=isNaN(t)?null:t),t}function $e(e,t){return e.contains?e.contains(t):q(e,function(e){return e.contains(t)})}function Ze(e,t){if(tt(t,e))return!0;for(var n=$.nodeChildNodesGetter.call(e),o=at(n),r=0;r<o;r++){var i=n[r];if(!We(i)&&Ze(i,t))return!0}return!1}function et(e,t){var n=e.querySelectorAll(Ge(t));return B(n,t)}function tt(e,t){return e&&t&&e.isSameNode?e.isSameNode(t):e===t}function nt(t){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 ot(e){return e.top===e}function rt(e){var t=[];ne(Zr,"*",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 it(e){return $.htmlCollectionLengthGetter.call(e)}function at(e){return $.nodeListLengthGetter.call(e)}function st(e){return $.inputValueGetter.call(e)}function lt(e){return $.textAreaValueGetter.call(e)}function ct(e,t){return $.inputValueSetter.call(e,t)}function ut(e,t){return $.textAreaValueSetter.call(e,t)}function dt(e){return pe(e)?st(e):Ee(e)?lt(e):e.value}function ft(e){return e&&e.getRootNode&&te(e)!==e.getRootNode()}var ht=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:Pe,isSVGElement:Ie,isMapElement:Ne,isBodyElement:Re,isHtmlElement:Me,isDocument:xe,isTextEditableInput:Oe,isTextEditableElement:Fe,isTextEditableElementAndEditingAllowed:Ae,isContentEditableElement:Le,isDomElement:Ve,isShadowUIElement:We,isShadowRoot:He,isElementFocusable:De,isHammerheadAttr:ke,isElementReadOnly:Ue,getScrollbarSize:Be,getMapContainer:qe,getTagName:Ge,closest:je,getParents:ze,findParent:Je,getTopSameDomainWindow:Ke,getParentExceptShadowRoot:Ye,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}(Xe(e,t))},getTabIndexAttributeIntValue:Qe,containsElement:$e,getTextareaIndentInLine:function(e,t){var n=lt(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=lt(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=lt(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:/^(text|password|datetime|email|number|search|tel|url|image)$/i).test(e.type)},isEditableElement:function(e,t){return t?Ae(e)||Le(e):Fe(e)||Le(e)},isElementContainsNode:Ze,isOptionGroupElement:function(e){return"[object HTMLOptGroupElement]"===o.utils.dom.instanceToString(e)},getElementIndexInParent:et,isTheSameNode:tt,getElementDescription:function(e){var t,n,o={id:"id",name:"name",class:"className"},r=[];for(t in r.push("<"),r.push(Ge(e)),o)!o.hasOwnProperty(t)||(n=e[o[t]])&&r.push(" "+t+'="'+n+'"');return r.push(">"),r.join("")},getFocusableParent:function(e){for(var t=ze(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:nt,isTopWindow:ot,findIframeByWindow:rt,isEditableFormElement:function(e){return Fe(e)||Se(e)},getCommonAncestor:function(e,t){if(tt(e,t))return e;for(var n=[e].concat(ze(e)),o=t;o;){if(-1<B(n,o))return o;o=$.nodeParentNodeGetter.call(o)}return o},getChildrenLength:it,getChildNodesLength:at,getInputValue:st,getTextAreaValue:lt,setInputValue:ct,setTextAreaValue:ut,getElementValue:dt,setElementValue:function(e,t){return pe(e)?ct(e,t):Ee(e)?ut(e,t):e.value=t},isShadowElement:ft,contains:function(t,e){return!(!t||!e)&&(t.contains?t.contains(e):!!Je(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===Zr.documentElement}}),pt=o.Promise,mt=o.nativeMethods,gt=o.eventSandbox.listeners,Et=o.utils.event.BUTTON,vt=o.utils.event.BUTTONS_PARAMETER,yt=o.utils.event.DOM_EVENTS,bt=o.utils.event.WHICH_PARAMETER,Ct=o.utils.event.preventDefault;function St(e,t,n,o){mt.addEventListener.call(e,t,n,o)}function wt(e,t,n,o){mt.removeEventListener.call(e,t,n,o)}function Tt(){var n=[],e=!1;function t(){e||(Zr.body?(e=!0,n.forEach(function(e){return e()})):mt.setTimeout.call($r,t,1))}function o(){(nt($r)||ot($r))&&(wt(Zr,"DOMContentLoaded",o),t())}return"complete"===Zr.readyState?mt.setTimeout.call($r,o,1):St(Zr,"DOMContentLoaded",o),{then:function(e){return t=e,new pt(function(e){return n.push(function(){return e(t())})});var t}}}var _t,Pt,It=Object.freeze({__proto__:null,BUTTON:Et,BUTTONS_PARAMETER:vt,DOM_EVENTS:yt,WHICH_PARAMETER:bt,preventDefault:Ct,bind:St,unbind:wt,documentReady:function(e){return void 0===e&&(e=0),Tt().then(function(){return gt.getEventListeners($r,"load").length?pt.race([new pt(function(e){return St($r,"load",e)}),c(e)]):null})}});(Pt=_t=_t||{}).ready="ready",Pt.readyForBrowserManipulation="ready-for-browser-manipulation",Pt.waitForFileDownload="wait-for-file-download";var Nt=_t,Rt=o.Promise,Mt=o.transport,xt=500,Ot=!1,Ft=null,At=!1;function Lt(){Ot=!0}var Vt=Object.freeze({__proto__:null,init:function(){o.on(o.EVENTS.beforeUnload,Lt),St($r,"unload",function(){Ot=!0})},watchForPageNavigationTriggers:function(){Ft=function(){At=!0},o.on(o.EVENTS.pageNavigationTriggered,Ft)},wait:function(e){void 0===e&&(e=!Ft||At?400:0),Ft&&(o.off(o.EVENTS.pageNavigationTriggered,Ft),Ft=null);var t=c(e).then(function(){if(Ot)return c(xt).then(function(){return Mt.queuedAsyncServiceMsg({cmd:Nt.waitForFileDownload})}).then(function(e){if(!e)return new Rt(function(){})}).then(function(){Ot=!1})}),n=c(15e3).then(function(){Ot=!1});return Rt.race([t,n])}}),Wt=y,Ht=Object.freeze({__proto__:null,EventEmitter:Wt,inherit:function(e,t){function n(){}n.prototype=t.prototype,o.utils.extend(e.prototype,new n),(e.prototype.constructor=e).base=t.prototype}}),Dt=u.eventSandbox.listeners;function kt(){this.initialized=!1,this.stopPropagationFlag=!1,this.events=new Wt}var Ut=(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,Dt.initElementListening($r,["scroll"]),Dt.addFirstInternalEventBeforeListener($r,["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 u.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),ft(n)&&(Dt.initElementListening(n,["scroll"]),Dt.addFirstInternalEventBeforeListener(n,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o._internalListener.apply(o,e),Dt.cancelElementListening(n)}))},kt.prototype.stopPropagation=function(){this.stopPropagationFlag=!0},kt.prototype.enablePropagation=function(){this.stopPropagationFlag=!1},new kt),Bt=(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 Gt=o.utils.style,jt=o.utils.style.getBordersWidth,zt=o.utils.style.getComputedStyle,Jt=o.utils.style.getElementMargin,Kt=o.utils.style.getElementPadding,Yt=o.utils.style.getElementScroll,Xt=o.utils.style.getOptionHeight,Qt=o.utils.style.getSelectElementSize,$t=o.utils.style.isElementVisible,Zt=o.utils.style.isVisibleChild,en=o.utils.style.getWidth,tn=o.utils.style.getHeight,nn=o.utils.style.getInnerWidth,on=o.utils.style.getInnerHeight,rn=o.utils.style.getScrollLeft,an=o.utils.style.getScrollTop,sn=o.utils.style.setScrollLeft,ln=o.utils.style.setScrollTop,cn=o.utils.style.get,un=o.utils.style.getBordersWidthFloat,dn=o.utils.style.getElementPaddingFloat;function fn(e,t,n){for(var o in"string"==typeof t&&Gt.set(e,t,n),t)t.hasOwnProperty(o)&&Gt.set(e,o,t[o])}function hn(e,t,n){return e<t?n:e<n?t:Math.max(n,t)}function pn(e){return!!Je(e,!0,function(e){return ue(e)&&"hidden"===Gt.get(e,"visibility")})}function mn(e){return!!Je(e,!0,function(e){return ue(e)&&"none"===Gt.get(e,"display")})}function gn(e){return!fe(e)||mn(e)||pn(e)}function En(e){return e&&!(e.offsetHeight<=0&&e.offsetWidth<=0)}function vn(e){return ue(e)&&"fixed"===Gt.get(e,"position")}var yn=Object.freeze({__proto__:null,getBordersWidth:jt,getComputedStyle:zt,getElementMargin:Jt,getElementPadding:Kt,getElementScroll:Yt,getOptionHeight:Xt,getSelectElementSize:Qt,isElementVisible:$t,isSelectVisibleChild:Zt,getWidth:en,getHeight:tn,getInnerWidth:nn,getInnerHeight:on,getScrollLeft:rn,getScrollTop:an,setScrollLeft:sn,setScrollTop:ln,get:cn,getBordersWidthFloat:un,getElementPaddingFloat:dn,set:fn,getViewportDimensions:function(){return{width:hn($r.innerWidth,Zr.documentElement.clientWidth,Zr.body.clientWidth),height:hn($r.innerHeight,Zr.documentElement.clientHeight,Zr.body.clientHeight)}},getWindowDimensions:function(e){return new Bt(0,en(e),tn(e),0)},isHiddenNode:pn,isNotDisplayedNode:mn,isNotVisibleNode:gn,hasDimensions:En,isFixedElement:vn}),bn=u.utils.browser,Cn=u.eventSandbox.listeners,Sn=["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"],wn=123;function Tn(e,t,n,o,r){var i,a=u.nativeMethods.eventTargetGetter.call(e)||e.srcElement;if(!t&&!We(a)){if(/^key/.test(e.type)&&((i=e).shiftKey&&i.ctrlKey||(i.altKey||i.metaKey)&&bn.isMacPlatform||i.keyCode===wn))return void r();if("blur"===e.type&&a!==$r&&a!==$r.document&&!En(a))return;n()}}var _n=(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 In=/auto|scroll|hidden/i;function Nn(e){var t,n=cn(e,"overflowX"),o=cn(e,"overflowY"),r=In.test(n),i=In.test(o),a=te(e).documentElement,s=e.scrollHeight;return(u.utils.browser.isChrome||u.utils.browser.isFirefox||u.utils.browser.isSafari)&&(t=e.getBoundingClientRect().top,s=s-a.getBoundingClientRect().top+t),(r||i)&&s>a.scrollHeight}function Rn(e){if(Re(e))return Nn(e);if(Me(e))return function(e){var t=cn(e,"overflowX"),n=cn(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(Nn(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=cn(t=e,"overflowX"),o=cn(t,"overflowY"),r=In.test(n),i=In.test(o),new _n(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 Mn(e){var t,n,o=ze(e);return!re(e)||(t=ie(e))&&(n=ze(t),o.concat(n)),u.nativeMethods.arrayFilter.call(o,Rn)}var xn=Object.freeze({__proto__:null,hasScroll:Rn,getScrollableParents:Mn}),On=o.shadowUI,Fn=o.nativeMethods,An="disabled";function Ln(){this.currentEl=null,this.optionList=null,this.groups=[],this.options=[]}var Vn=(Ln.prototype._createOption=function(e,t){var n=Zr.createElement("div"),o=e.disabled||"optgroup"===Ge(e.parentElement)&&e.parentElement.disabled,r="option"===Ge(e)?e.text:"";Fn.nodeTextContentSetter.call(n,r),t.appendChild(n),On.addClass(n,"tcOption"),o&&(On.addClass(n,An),fn(n,"color",cn(e,"color"))),this.options.push(n)},Ln.prototype._createGroup=function(e,t){var n=Zr.createElement("div");Fn.nodeTextContentSetter.call(n,e.label||" "),t.appendChild(n),On.addClass(n,"tcOptionGroup"),e.disabled&&(On.addClass(n,An),fn(n,"color",cn(e,"color"))),this.createChildren(e.children,n),this.groups.push(n)},Ln.prototype.clear=function(){this.optionList=null,this.currentEl=null,this.options=[],this.groups=[]},Ln.prototype.createChildren=function(e,t){for(var n=it(e),o=0;o<n;o++)Pe(e[o])?this._createOption(e[o],t):"optgroup"===Ge(e[o])&&this._createGroup(e[o],t)},Ln.prototype.getEmulatedChildElement=function(e){var t="optgroup"===Ge(e),n=et(this.currentEl,e);return t?this.groups[n]:this.options[n]},Ln.prototype.isOptionListExpanded=function(e){return e?e===this.currentEl:!!this.currentEl},Ln.prototype.isOptionElementVisible=function(e){var t=se(e);if(!t)return!0;var n=this.isOptionListExpanded(t),o=Qt(t);return n||1<o},new Ln),Wn=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},Hn={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 ")}},Dn=o.utils.html,kn=o.nativeMethods,Un=10;function Bn(e){if(!e)return"";var t,n,o,r=kn.cloneNode.call(e),i=Dn.cleanUpHtml(kn.elementOuterHTMLGetter.call(r)),a=(t=kn.nodeTextContentGetter.call(e),n=Un,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=o.utils.position.getElementRectangle,Gn=o.utils.position.getOffsetPosition,jn=o.utils.position.offsetToClientCoords;function zn(e){var t,n,o,r,i=Me(e),a=i?e.getElementsByTagName("body")[0]:null,s=e.getBoundingClientRect(),l=Bt.create(jt(e)),c=Yt(e),u=re(e),d="BackCompat"===e.ownerDocument.compatMode,f=i?new _n(0,0):_n.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=Gn(t),o=jn(_n.create(n)),r=jt(t),f.add(o).add(_n.create(r)),i&&l.add(r));var m=!i&&nn(e)!==e.clientWidth,g=!i&&on(e)!==e.clientHeight,E={right:m?Be():0,bottom:g?Be():0};return new Wn(p,h,f,l,c,E)}function Jn(e){var t=e.x,n=e.y,o=Zr.elementFromPoint,r=null;try{r=o.call(Zr,t,n)}catch(e){return null}for(null===r&&(r=o.call(Zr,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 Kn(e,t){return Bt.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 Yn(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 _n(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 _n(Math.round(t.pageX),Math.round(t.pageY))}function Xn(e){return!eo(e)}function Qn(e){return"hidden"===cn(e,"visibility")}function $n(e){return"collapse"===cn(e,"visibility")}function Zn(e){return"none"===cn(e,"display")}function eo(e){return!ft(e)&&(Qn(e)||$n(e)||Zn(e))}function to(e){var t=qn(e);return 0===t.width||0===t.height}function no(e){return e.replace(/.*The/,"its")}var oo=Object.freeze({__proto__:null,getElementRectangle:qn,getOffsetPosition:Gn,offsetToClientCoords:jn,getClientDimensions:zn,getElementFromPoint:Jn,calcRelativePosition:Kn,getIframeClientCoordinates:function(e){var t=Gn(e),n=t.left,o=t.top,r=jn({x:n,y:o}),i=jt(e),a=Kt(e),s=r.x+i.left+a.left,l=r.y+i.top+a.top;return new Bt(l,s+en(e),l+tn(e),s)},containsOffset:function(e,t,n){var o=zn(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=Yn(e),a=te(r),s=0,l=0;return!re(a.documentElement)||(t=ie(a))&&(n=Gn(t),o=jt(t),s=n.left+o.left,l=n.top+o.top),new _n(i.x+s,i.y+l)},getEventPageCoordinates:Yn,getIframePointRelativeToParentFrame:function(e,t){var n=rt(t),o=Gn(n),r=jt(n),i=Kt(n);return jn({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 _n(Math.round(t.left+t.width/2),Math.round(t.top+t.height/2))},getClientPosition:function(e){var t=Gn(e),n=t.left,o=t.top,r=jn({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=$r.screenLeft||$r.screenX,t=$r.screenTop||$r.screenY;return new _n(e,t)},isIframeVisible:Xn,isElementVisible:function e(t){if(!Ve(t)&&!de(t))return!1;if(Pe(t)||"optgroup"===Ge(t))return Vn.isOptionElementVisible(t);if(he(t))return Xn(t);if(Ie(t))return!Je(t,!0,eo)&&!to(t);if(de(t))return!gn(t);if(!Le(t)&&to(t))return!1;if(Ne(t)){var n=qe(je(t,"map"));return!!n&&e(n)}return En(t)&&!eo(t)},getSubHiddenReason:no,getHiddenReason:function e(t,n){if(void 0===n&&(n="action target"),!t)return null;var o=de(t);if(!Ve(t)&&!o)return Hn.notElementOrTextNode(n);var r=o?t.data:Bn(t),i=t.offsetHeight,a=t.offsetWidth;if((Pe(t)||"optgroup"===Ge(t))&&!Vn.isOptionElementVisible(t)){var s=Bn(se(t));return Hn.optionNotVisible(r,n,s)}if(Ne(t)){var l=no(e(qe(je(t,"map")),"container")||"");return Hn.mapContainerNotVisible(r,l)}var c=Je(t,!1,Qn);if(c)return Hn.parentHasVisibilityHidden(r,n,Bn(c));var u=Je(t,!1,$n);if(u)return Hn.parentHasVisibilityCollapse(r,n,Bn(u));var d=Je(t,!1,Zn);return d?Hn.parentHasDisplayNone(r,n,Bn(d)):Qn(t)?Hn.elHasVisibilityHidden(r,n):$n(t)?Hn.elHasVisibilityCollapse(r,n):Zn(t)?Hn.elHasDisplayNone(r,n):de(t)&&!fe(t)?Hn.elNotRendered(r,n):!Le(t)&&to(t)||!En(t)?Hn.elHasWidthOrHeightZero(r,n,a,i):null},getElOutsideBoundsReason:function e(t,n){void 0===n&&(n="action target");var o=Bn(t);if(Ne(t)){var r=no(e(qe(je(t,"map")),"container")||"");return Hn.mapContainerNotVisible(o,r)}return Hn.elOutsideBounds(o,n)}});function ro(n,o){return g(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 io=Object.freeze({__proto__:null,whilst:function(t,n){return g(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:ro,each:function(r,i){return g(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]}})})}}),ao=o.Promise,so=o.eventSandbox.message;function lo(e,o,t){return new ao(function(n){so.on(so.SERVICE_MSG_RECEIVED_EVENT,function e(t){t.message.cmd===o&&(so.off(so.SERVICE_MSG_RECEIVED_EVENT,e),n(t.message))}),so.sendServiceMsg(e,t)})}var co=(uo._isScrollValuesChanged=function(e,t){return rn(e)!==t.left||an(e)!==t.top},uo.prototype._setScroll=function(e,t){var n=this,o=t.left,r=t.top,i=Me(e)?te(e):e,a={left:rn(i),top:an(i)},o=Math.max(o,0),r=Math.max(r,0),s=Ut.waitForScroll(i);return sn(i,o),ln(i,r),uo._isScrollValuesChanged(i,a)?s=s.then(function(){n._scrollWasPerformed||(n._scrollWasPerformed=uo._isScrollValuesChanged(i,a))}):(s.cancel(),u.Promise.resolve())},uo.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}},uo.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=Kn(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},uo._getChildPoint=function(e,t,n){return _n.create(t).sub(_n.create(e)).add(_n.create(e.scroll)).add(_n.create(t.border)).add(n)},uo.prototype._getScrollPosition=function(e,t,n,o){var r=uo._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)}},uo._getChildPointAfterScroll=function(e,t,n,o){return _n.create(t).add(_n.create(e.scroll)).sub(_n.create(n)).add(o)},uo.prototype._isChildFullyVisible=function(e,t,n){var o=uo._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},uo.prototype._scrollToChild=function(e,t,n){for(var o=zn(e),r=zn(t),i=nn($r),a=on($r),s=o.scroll,l=!this._isChildFullyVisible(o,r,n);l;){s=this._getScrollPosition(o,r,n,this._maxScrollMargin);var c=uo._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)},uo.prototype._scrollElement=function(){if(!Rn(this._element))return u.Promise.resolve();var e=zn(this._element),t=this._getScrollToPoint(e,this._offsets,this._maxScrollMargin);return this._setScroll(this._element,t)},uo.prototype._scrollParents=function(){var t,n,o=this,r=Mn(this._element),i=this._element,e=rn(i),a=an(i),s=_n.create(this._offsets).sub(new _n(e,a).round()),l=ro(r.length,function(e){return o._scrollToChild(r[e],i,s).then(function(){t=zn(i),n=zn(r[e]),s.add(_n.create(t)).sub(_n.create(n)).add(_n.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=$r).top!==e)return c.cmd=uo.SCROLL_REQUEST_CMD,lo(c,uo.SCROLL_RESPONSE_CMD,$r.parent)}).then(function(){return o._scrollWasPerformed})},uo._getFixedAncestorOrSelf=function(e){return Je(e,!0,vn)},uo.prototype._isTargetElementObscuredInPoint=function(e){var t=Jn(e);if(!t)return!1;var n=uo._getFixedAncestorOrSelf(t);return!!n&&!n.contains(this._element)},uo.prototype.run=function(){var e=this;return this._scrollElement().then(function(){return e._scrollParents()})},uo.SCROLL_REQUEST_CMD="automation|scroll|request",uo.SCROLL_RESPONSE_CMD="automation|scroll|response",uo);function uo(e,t,n){this._element=e,this._offsets=new _n(t.offsetX,t.offsetY),this._scrollToCenter=!!t.scrollToCenter,this._skipParentFrames=!!t.skipParentFrames,this._maxScrollMargin=n||{left:50,top:50},this._scrollWasPerformed=!1}function fo(e){var t=u.nativeMethods.nodeChildNodesGetter.call(e);return!at(t)&&Po(e)?e:Y(t,Po)}function ho(e){return Y(u.nativeMethods.nodeChildNodesGetter.call(e),function(e){return Po(e)||!Io(e)&&ho(e)})}function po(e){return de(e)||ue(e)&&$t(e)}function mo(e){var t=u.nativeMethods.nodeChildNodesGetter.call(e);return V(t,po)}function go(e){var t=u.nativeMethods.nodeChildNodesGetter.call(e);return q(t,po)}function Eo(e){var t=u.nativeMethods.nodeChildNodesGetter.call(e);return q(t,function(e){return Vo(e,!0)})}function vo(e,t){var n,o;if(!We(e)&&!We(t)){var r=u.nativeMethods.nodeChildNodesGetter.call(t);return!tt(t,e)&&at(r)&&/div|p/.test(Ge(t))&&(n=ho(e))&&!tt(t,n)&&(o=Co(n))&&!tt(t,o)&&fo(t)}}function yo(e,t){var n,o,r,i=fe(t);if(!We(e)&&!We(t)){var a=u.nativeMethods.nodeChildNodesGetter.call(t);if(!tt(t,e)&&(i&&ue(t)&&at(a)&&!/div|p/.test(Ge(t))||Po(t)&&!tt(t,e)&&t.nodeValue.length)){if(i&&ue(t)){if(!(n=ho(e))||tt(t,n))return;if(!(o=Co(n))||tt(t,o))return}return(r=function(e){for(var t=null,n=e;!t&&(n=n.previousSibling);)if(!Io(n)&&!_o(n)){t=n;break}return t}(t))&&ue(r)&&/div|p/.test(Ge(r))&&fo(r)}}}function bo(e,t){var n,o,r=u.nativeMethods.nodeChildNodesGetter.call(e),i=at(r),a=null,s=t?Po:de;if(!i&&s(e))return e;for(var l=0;l<i;l++){if(n=r[l],o=ue(n)&&!Le(n),s(n))return n;if(fe(n)&&go(n)&&!o&&(a=bo(n,t)))return a}return a}function Co(e){return bo(e,!0)}function So(e,t){var n,o,r=u.nativeMethods.nodeChildNodesGetter.call(e),i=at(r),a=null;if(!i&&Po(e))return e;for(var s=i-1;0<=s;s--){if(n=r[s],o=ue(n)&&!Le(n),de(n)&&(!t||!_o(n)))return n;if(fe(n)&&go(n)&&!o&&(a=So(n,!1)))return a}return a}function wo(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 To(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 _o(e){if(!de(e))return!1;var t=e.nodeValue,n=wo(t),o=To(t);return n===t.length&&0===o}function Po(e){return de(e)&&!_o(e)}function Io(e){return!fe(e)||We(e)}function No(e){var t=e.getAttribute?e.getAttribute("contenteditable"):null;return""===t||"true"===t}function Ro(e){var t=ze(e);if(No(e)&&Le(e))return e;var n=te(e);return"on"===n.designMode?n.body:Y(t,function(e){return No(e)&&Le(e)})}function Mo(e,t){if(tt(e,t))return tt(t,Ro(e))?e:u.nativeMethods.nodeParentNodeGetter.call(e);var n=[],o=Ro(e),r=null;if(!Ze(o,t))return null;for(r=e;r!==o;r=u.nativeMethods.nodeParentNodeGetter.call(r))n.push(r);for(r=t;r!==o;r=u.nativeMethods.nodeParentNodeGetter.call(r))if(-1!==B(n,r))return r;return o}function xo(e,t){if(We(e))return{node:e,offset:t};var n=u.nativeMethods.nodeChildNodesGetter.call(e),o=at(n),r=o<=t,i=n[t],a=0;if(We(i)){if(o<=1)return{node:e,offset:0};(r=o<=t-1)?i=n[o-2]:(i=n[t-1],a=0)}for(;!Io(i)&&ue(i);){var s=mo(i);if(!s.length){a=0;break}i=s[r?s.length-1:0]}return 0===a||Io(i)||(a=i.nodeValue?i.nodeValue.length:0),{node:i,offset:a}}function Oo(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)||ue(o))&&Eo(o)&&(i=xo(o,r)),{node:i.node,offset:i.offset}}function Fo(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)||ue(o))&&Eo(o)&&(i=xo(o,r)),{node:i.node,offset:i.offset}}function Ao(e,t,n){return Ho(e,Oo(e,t,n))}function Lo(e,t,n){return Ho(e,Fo(e,t,n))}function Vo(e,t){if(gn(e))return!1;if(de(e))return!0;if(!ue(e))return!1;if(Eo(e))return t;var n=u.nativeMethods.nodeParentNodeGetter.call(e),o=!Le(n),r=mo(e),i=q(r,function(e){return"br"===Ge(e)});return o||i}function Wo(s,e){var l={node:null,offset:e};return function e(t){var n,o,r=u.nativeMethods.nodeChildNodesGetter.call(t),i=at(r);if(l.node)return l;if(Io(t))return l;if(de(t)){if(l.offset<=t.nodeValue.length)return l.node=t,l;t.nodeValue.length&&(!l.node&&yo(s,t)&&l.offset--,l.offset-=t.nodeValue.length)}else if(ue(t)){if(!po(t))return l;if(0===l.offset&&Vo(t,!1))return l.node=t,l.offset=(n=t,o=0,Y(u.nativeMethods.nodeChildNodesGetter.call(n),function(e,t){return o=t,"br"===Ge(e)})?o:0),l;(l.node||!vo(s,t)&&!yo(s,t))&&(i||"br"!==Ge(t))||l.offset--}for(var a=0;a<i;a++)l=e(r[a]);return l}(s)}function Ho(i,e){var a=e.node,s=e.offset,l=0,c=!1;return function e(t){var n=u.nativeMethods.nodeChildNodesGetter.call(t),o=at(n);if(c)return l;if(tt(a,t))return(vo(i,t)||yo(i,t))&&l++,c=!0,l+s;if(Io(t))return l;!o&&t.nodeValue&&t.nodeValue.length?(!c&&yo(i,t)&&l++,l+=t.nodeValue.length):(!o&&ue(t)&&"br"===Ge(t)||!c&&(vo(i,t)||yo(i,t)))&&l++;for(var r=0;r<o;r++)l=e(n[r]);return l}(i)}function Do(e){var t,n,o,r,i,a=de(e)?e:So(e,!0);if(!a||(t=a,o=de(n=e)?n:bo(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=u.nativeMethods.nodeParentNodeGetter.call(e),-1<B(n,cn(e,"white-space")))return 1}(t,n)))return 0;var s=te(e).createRange();return s.selectNodeContents(a),Ho(e,{node:a,offset:s.endOffset})}var ko=Object.freeze({__proto__:null,getFirstVisibleTextNode:Co,getLastTextNode:So,getFirstNonWhitespaceSymbolIndex:wo,getLastNonWhitespaceSymbolIndex:To,isInvisibleTextNode:_o,findContentEditableParent:Ro,getNearestCommonAncestor:Mo,getSelection:function(e,t,n){return{startPos:Oo(e,t,n),endPos:Fo(e,t,n)}},getSelectionStartPosition:Ao,getSelectionEndPosition:Lo,calculateNodeAndOffsetByPosition:Wo,calculatePositionByNodeAndOffset:Ho,getElementBySelection:function(e){var t=Mo(e.anchorNode,e.focusNode);return de(t)?t.parentElement:t},getFirstVisiblePosition:function(e){var t=de(e)?e:Co(e),n=te(e).createRange();return t?(n.selectNodeContents(t),Ho(e,{node:t,offset:n.startOffset})):0},getLastVisiblePosition:Do,getContentEditableValue:function(e){return W(function e(t){var n=[],o=u.nativeMethods.nodeChildNodesGetter.call(t),r=at(o);Io(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("")}}),Uo=o.utils.browser,Bo=o.eventSandbox.selection,qo="backward",Go="forward",jo="none";function zo(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=Co(e))||e,offset:r&&r.nodeValue?wo(r.nodeValue):0}),void 0===n&&(s={node:(i=So(e,!0))||e,offset:i&&i.nodeValue?To(i.nodeValue):0}),l=l||Wo(e,t),s=s||Wo(e,n),l.node&&s.node&&(c?$o(s,l,o):$o(l,s,o))}function Jo(e){var t=e?te(e):Zr,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 Ko(e,t,n){var o=Ho(e,t);return Ho(e,n)<o}function Yo(e){return Le(e)?Zo(e)?Ao(e,Qo(e),Jo(e)):0:Bo.getSelection(e).start}function Xo(e){return Le(e)?Zo(e)?Lo(e,Qo(e),Jo(e)):0:Bo.getSelection(e).end}function Qo(e){var t=te(e);return t?t.getSelection():$r.getSelection()}function $o(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=Ro(o),u=Ko(c,e,t),d=Qo(c),f=te(c).createRange();Bo.wrapSetterSelection(c,function(){var e;d.removeAllRanges(),u?(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},(Uo.isSafari||Uo.isChrome&&Uo.version<58)&&_o(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 Zo(e){var t=Qo(e);return!(!t.anchorNode||!t.focusNode)&&Ze(e,t.anchorNode)&&Ze(e,t.focusNode)}var er,tr,nr=Object.freeze({__proto__:null,hasInverseSelectionContentEditable:Jo,isInverseSelectionContentEditable:Ko,getSelectionStart:Yo,getSelectionEnd:Xo,hasInverseSelection:function(e){return Le(e)?Jo(e):(Bo.getSelection(e).direction||jo)===qo},getSelectionByElement:Qo,select:function(e,t,n){var o,r,i,a;Le(e)?zo(e,t,n,!0):(o=t||0,i=!1,a=null,(r=void 0===n?dt(e).length:n)<o&&(a=o,o=r,r=a,i=!0),Bo.setSelection(e,o,r,i?qo:Go),jo=t===n?"none":i?qo:Go)},selectByNodesAndOffsets:$o,deleteSelectionContents:function(e,t){var n,o,r,i,a,s,l,c,u,d,f,h,p=Yo(e),m=Xo(e);t&&zo(e),p!==m&&(n=Qo(e),o=n.anchorNode,r=n.focusNode,i=n.anchorOffset,a=n.focusOffset,s=wo(o.nodeValue),l=To(o.nodeValue),c=wo(r.nodeValue),u=To(r.nodeValue),f=d=null,de(o)&&(i<s&&0!==i?d=0:i!==o.nodeValue.length&&(_o(o)&&0!==i||l<i)&&(d=o.nodeValue.length)),de(r)&&(a<c&&0!==a?f=0:a!==r.nodeValue.length&&(_o(r)&&0!==a||u<a)&&(f=r.nodeValue.length)),Uo.isWebKit&&(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||$o({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=Qo(e),n=t.rangeCount;if(n)for(var o=0;o<n;o++)t.getRangeAt(o).deleteContents()}(e),(h=Qo(e)).rangeCount&&!h.getRangeAt(0).collapsed&&h.getRangeAt(0).collapse(!0))},setCursorToLastVisiblePosition:function(e){var t=Do(e);zo(e,t,t)},hasElementContainsSelection:Zo}),or=o.Promise,rr=o.nativeMethods,ir={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",requestUrlInvalidValueError:"E1072",requestRuntimeError:"E1073",requestCannotResolveTestRun:"E1074",relativeBaseUrl:"E1075",invalidSkipJsErrorsOptionsObjectProperty:"E1076",invalidSkipJsErrorsCallbackWithOptionsProperty:"E1077",invalidCommandInJsonCompiler:"E1078",invalidCustomActionsOptionType:"E1079",invalidCustomActionType:"E1080",cannotImportESMInCommonsJS:"E1081",setNativeAutomationForUnsupportedBrowsers:"E1082",cannotReadConfigFile:"E1083",cannotParseConfigFile:"E1084",cannotRunLegacyTestsInNativeAutomationMode:"E1085",setUserProfileInNativeAutomation:"E1086"};(tr=er=er||{}).TooHighConcurrencyFactor="TooHighConcurrencyFactor",tr.UseBrowserInitOption="UseBrowserInitOption",tr.RestErrorCauses="RestErrorCauses";var ar,sr,lr,cr,ur,dr=er,fr=", ",hr='"';function pr(e,t){return"".concat(t).concat(e).concat(t)}function mr(e,t,n){void 0===t&&(t=fr),void 0===n&&(n=hr);var o=v([],e,!0);if(-1<t.indexOf("\n"))return o.map(function(e){return pr(e,n)}).join(t);if(1===o.length)return pr(o[0],n);if(2===o.length){var r=e[0],i=e[1];return"".concat(pr(r,n)," and ").concat(pr(i,n))}var a=o.pop(),s=o.map(function(e){return pr(e,n)}).join(t);return"".concat(s,", and ").concat(pr(a,n))}(sr=ar=ar||{}).message="message",sr.stack="stack",sr.pageUrl="pageUrl",(cr=lr=lr||{}).fn="fn",cr.dependencies="dependencies";var gr,Er="https://testcafe.io/documentation/402639/reference/command-line-interface#file-pathglob-pattern",vr="https://testcafe.io/documentation/402638/reference/configuration-file#filter",yr="https://testcafe.io/documentation/402828/guides/concepts/browsers#test-in-headless-mode",br="https://testcafe.io/documentation/404150/guides/advanced-guides/custom-test-actions",Cr=((ur={})[ir.cannotCreateMultipleLiveModeRunners]="Cannot launch multiple live mode instances of the TestCafe test runner.",ur[ir.cannotRunLiveModeRunnerMultipleTimes]="Cannot launch the same live mode instance of the TestCafe test runner multiple times.",ur[ir.browserDisconnected]="The {userAgent} browser disconnected. If you did not close the browser yourself, browser performance or network issues may be at fault.",ur[ir.cannotRunAgainstDisconnectedBrowsers]="The following browsers disconnected: {userAgents}. Cannot run further tests.",ur[ir.testRunRequestInDisconnectedBrowser]='"{browser}" disconnected during test execution.',ur[ir.cannotEstablishBrowserConnection]="Cannot establish one or more browser connections.",ur[ir.cannotFindBrowser]='Cannot find the browser. "{browser}" is neither a known browser alias, nor a path to an executable file.',ur[ir.browserProviderNotFound]='Cannot find the "{providerName}" browser provider.',ur[ir.browserNotSet]="You have not specified a browser.",ur[ir.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(Er,"."),ur[ir.noTestsToRun]="Source files do not contain valid 'fixture' and 'test' declarations.",ur[ir.noTestsToRunDueFiltering]="No tests match your filter.\n"+"See ".concat(vr,"."),ur[ir.multipleSameStreamReporters]='Reporters cannot share output streams. The following reporters interfere with one another: "{reporters}".',ur[ir.optionValueIsNotValidRegExp]='The "{optionName}" option does not contain a valid regular expression.',ur[ir.optionValueIsNotValidKeyValue]='The "{optionName}" option does not contain a valid key-value pair.',ur[ir.invalidQuarantineOption]='The "{optionName}" option does not exist. Specify "attemptLimit" and "successThreshold" to configure quarantine mode.',ur[ir.invalidQuarantineParametersRatio]='The value of "attemptLimit" ({attemptLimit}) should be greater then the value of "successThreshold" ({successThreshold}).',ur[ir.invalidAttemptLimitValue]='The "{attemptLimit}" parameter only accepts values of {MIN_ATTEMPT_LIMIT} and up.',ur[ir.invalidSuccessThresholdValue]='The "{successThreshold}" parameter only accepts values of {MIN_SUCCESS_THRESHOLD} and up.',ur[ir.invalidSpeedValue]="Speed should be a number between 0.01 and 1.",ur[ir.invalidConcurrencyFactor]="The concurrency factor should be an integer greater than or equal to 1.",ur[ir.cannotDivideRemotesCountByConcurrency]="The number of remote browsers should be divisible by the concurrency factor.",ur[ir.cannotSetConcurrencyWithCDPPort]='The value of the "concurrency" option includes the CDP port.',ur[ir.portsOptionRequiresTwoNumbers]='The "--ports" option requires two arguments.',ur[ir.portIsNotFree]="Port {portNum} is occupied by another process.",ur[ir.invalidHostname]='Cannot resolve hostname "{hostname}".',ur[ir.cannotFindSpecifiedTestSource]='Cannot find a test file at "{path}".',ur[ir.clientFunctionCodeIsNotAFunction]="Cannot initialize a ClientFunction because {#instantiationCallsiteName} is {type}, and not a function.",ur[ir.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.",ur[ir.clientFunctionCannotResolveTestRun]="{#instantiationCallsiteName} does not have test controller access. To execute {#instantiationCallsiteName} from a Node.js API callback, bind the test controller object to the function with the `.with({ boundTestRun: t })` method. Note that you cannot execute {#instantiationCallsiteName} outside test code.",ur[ir.requestCannotResolveTestRun]='"request" does not have test controller access.',ur[ir.regeneratorInClientFunctionCode]='{#instantiationCallsiteName} code, arguments or dependencies cannot contain generators or "async/await" syntax (use Promises instead).',ur[ir.invalidClientFunctionTestRunBinding]='Cannot resolve the "boundTestRun" option because its value is not a test controller.',ur[ir.invalidValueType]="{smthg} ({actual}) is not of expected type ({type}).",ur[ir.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://.',ur[ir.testControllerProxyCannotResolveTestRun]="The action does not have implicit test controller access. Reference the 't' object to gain it.",ur[ir.timeLimitedPromiseTimeoutExpired]="A Promise timed out.",ur[ir.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.",ur[ir.multipleAPIMethodCallForbidden]='You cannot call the "{methodName}" method more than once. Specify an array of parameters instead.',ur[ir.invalidReporterOutput]="Specify a file name or a writable stream as the reporter's output target.",ur[ir.cannotReadSSLCertFile]='Unable to read the file referenced by the "{option}" ssl option ("{path}"). Error details:\n\n{err}',ur[ir.cannotPrepareTestsDueToError]="Cannot prepare tests due to the following error:\n\n{errMessage}",ur[ir.cannotParseRawFile]='Cannot parse a raw test file at "{path}" due to the following error:\n\n{errMessage}',ur[ir.testedAppFailedWithError]="The web application failed with the following error:\n\n{errMessage}",ur[ir.unableToOpenBrowser]='Unable to open the "{alias}" browser due to the following error:\n\n{errMessage}',ur[ir.requestHookConfigureAPIError]="Attempt to configure a request hook resulted in the following error:\n\n{requestHookName}: {errMsg}",ur[ir.forbiddenCharatersInScreenshotPath]='There are forbidden characters in the "{screenshotPath}" {screenshotPathType}:\n {forbiddenCharsDescription}',ur[ir.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.",ur[ir.cannotReadConfigFile]='Failed to read the "{path}" configuration file from disk. Error details:\n\n{err}',ur[ir.cannotParseConfigFile]='Failed to parse the "{path}" configuration file. The file contains invalid JSON syntax. \n\nError details:\n\n{err}',ur[ir.cannotFindReporterForAlias]='Failed to load the "{name}" reporter. Please check the parameter for errors. Error details:\n\n{err}',ur[ir.cannotFindTypescriptConfigurationFile]='"{filePath}" is not a valid TypeScript configuration file.',ur[ir.clientScriptInitializerIsNotSpecified]="Initialize your client script with one of the following: a JavaScript script, a JavaScript file path, or the name of a JavaScript module.",ur[ir.clientScriptBasePathIsNotSpecified]="Specify the base path for the client script file.",ur[ir.clientScriptInitializerMultipleContentSources]="Client scripts can only have one initializer: JavaScript code, a JavaScript file path, or the name of a JavaScript module.",ur[ir.cannotLoadClientScriptFromPath]="Cannot load a client script from {path}.\n{errorMessage}",ur[ir.clientScriptModuleEntryPointPathCalculationError]="A client script tried to load a JavaScript module that TestCafe cannot locate:\n\n{errorMessage}.",ur[ir.methodIsNotAvailableForAnIPCHost]="This method cannot be called on a service host.",ur[ir.tooLargeIPCPayload]="The specified payload is too large to form an IPC packet.",ur[ir.malformedIPCMessage]="Cannot process a malformed IPC message.",ur[ir.unexpectedIPCHeadPacket]="Cannot create an IPC message due to an unexpected IPC head packet.",ur[ir.unexpectedIPCBodyPacket]="Cannot create an IPC message due to an unexpected IPC body packet.",ur[ir.unexpectedIPCTailPacket]="Cannot create an IPC message due to an unexpected IPC tail packet.",ur[ir.cannotRunLocalNonHeadlessBrowserWithoutDisplay]="Your Linux installation 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(yr),ur[ir.uncaughtErrorInReporter]='The "{methodName}" method of the "{reporterName}" reporter produced an uncaught error. Error details:\n{originalError}',ur[ir.roleInitializedWithRelativeUrl]='Your Role includes a relative login page URL, but the "baseUrl" option is not set.\nUse an absolute URL or add the baseUrl option to your configuration file or CLI launch string.',ur[ir.typeScriptCompilerLoadingError]="Cannot load the TypeScript compiler.\n{originErrorMessage}.",ur[ir.cannotCustomizeSpecifiedCompilers]="You cannot specify options for the {noncustomizableCompilerList} compiler{suffix}.",ur[ir.cannotEnableRetryTestPagesOption]="Cannot enable the 'retryTestPages' option. Apply one of the following two solutions:\n-- set the 'hostname' option to 'localhost'\n-- run TestCafe over HTTPS\n",ur[ir.browserConnectionError]="{originErrorMessage}\n{numOfNotOpenedConnection} of {numOfAllConnections} browser connections have not been established:\n{listOfNotOpenedConnections}\n\nHints:\n{listOfHints}",ur[dr.TooHighConcurrencyFactor]="The host machine may not be powerful enough to handle the specified concurrency factor ({concurrencyFactor}). Decrease the concurrency factor or allocate more computing resources to the host machine.",ur[dr.UseBrowserInitOption]="Increase the Browser Initialization Timeout if its value is too low (currently: {browserInitTimeoutMsg}). The timeout determines how long TestCafe waits for browsers to be ready.",ur[dr.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.",ur[ir.cannotFindTestcafeConfigurationFile]="Cannot locate a TestCafe configuration file at {filePath}. Either the file does not exist, or the path is invalid.",ur[ir.relativeBaseUrl]='The value of the baseUrl argument cannot be relative: "{baseUrl}"',ur[ir.requestUrlInvalidValueError]="The request url is invalid ({actualValue}).",ur[ir.requestRuntimeError]="The request was interrupted by an error:\n{message}",ur[ir.invalidSkipJsErrorsOptionsObjectProperty]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors: '.concat(mr(Object.keys(ar)),"."),ur[ir.invalidSkipJsErrorsCallbackWithOptionsProperty]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors callbacks: '.concat(mr(Object.keys(lr)),"."),ur[ir.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',ur[ir.invalidCustomActionsOptionType]="The value of the customActions option does not belong to type Object. Refer to the following article for custom action setup instructions: ".concat(br),ur[ir.invalidCustomActionType]='TestCafe cannot parse the "{actionName}" action, because the action definition is invalid. Format the definition in accordance with the custom actions guide: '.concat(br),ur[ir.cannotImportESMInCommonsJS]="Cannot import the {esModule} ECMAScript module from {targetFile}. Use a dynamic import() statement or enable the --esm CLI flag.",ur[ir.setNativeAutomationForUnsupportedBrowsers]='The "{browser}" do not support the Native Automation mode. Use the "disable native automation" option to continue.',ur[ir.cannotRunLegacyTestsInNativeAutomationMode]="TestCafe cannot run legacy tests in Native Automation mode. Disable native automation to continue.",ur[ir.setUserProfileInNativeAutomation]='Cannot initialize the test run. When TestCafe uses native automation, it can only launch browsers with an empty user profile. Disable native automation, or remove the "userProfile" suffix from the following browser aliases: "{browsers}".',ur[ir.timeLimitedPromiseTimeoutExpired]),Sr=(m(wr,gr=Error),wr);function wr(){var e=gr.call(this,Cr)||this;return e.code=ir.timeLimitedPromiseTimeoutExpired,e}function Tr(e){var t=e.replace(/^\+/g,"plus").replace(/\+\+/g,"+plus").split("+");return W(t,function(e){return e.replace("plus","+")})}function _r(e){var t=1===e.length||"space"===e?e:e.toLowerCase();return a.modifiersMap[t]&&(t=a.modifiersMap[t]),t}var Pr,Ir,Nr=o.utils.trim,Rr={run:"run",idle:"idle"};(Ir=Pr=Pr||{}).ok="ok",Ir.closing="closing";var Mr=Pr,xr="file://",Or=Zr.location.href,Fr=Zr.location.origin,Ar=Fr+"/service-worker.js",Lr=!1,Vr=null,Wr=eval;function Hr(t){return new d(function(e){return setTimeout(e,t)})}function Dr(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 d(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 kr(e){return Or.toLowerCase()===e.toLowerCase()}function Ur(){Lr=!1}function Br(e,t){Dr(t.openFileProtocolUrl,t.createXHR,{method:"POST",data:JSON.stringify({url:e.url})})}function qr(e,t){var n,o,r,i,a;Ur(),void 0===(a=e.url)&&(a=""),0===a.indexOf(xr)?Br(e,t):(o=t,r=(n=e).url.indexOf("#"),i=-1!==r&&n.url.slice(0,r)===Or.slice(0,r),Zr.location=n.url,o.nativeAutomation&&i&&Zr.location.reload())}function Gr(e){return(e.cmd===Rr.run||e.cmd===Rr.idle)&&!kr(e.url)}function jr(e,r,t){var i=e.statusUrl,a=e.openFileProtocolUrl,n=void 0===t?{}:t,s=n.manualRedirect,l=n.nativeAutomation;return g(this,void 0,void 0,function(){var n,o;return E(this,function(e){switch(e.label){case 0:return[4,Dr(i,r)];case 1:return n=e.sent(),(o=l?(t=n).cmd!==Rr.idle||Gr(t):Gr(n))&&!s&&qr(n,{createXHR:r,openFileProtocolUrl:a,nativeAutomation:l}),[2,{command:n,redirecting:o}]}var t})})}var zr=Object.freeze({__proto__:null,delay:Hr,sendXHR:Dr,startHeartbeat:function(e,t){function n(){Dr(e,t).then(function(e){e.code!==Mr.closing||kr(e.url)||(Ur(),Zr.location=e.url)})}Vr=$r.setInterval(n,2e3),n()},stopHeartbeat:function(){$r.clearInterval(Vr)},startInitScriptExecution:function(e,t){Lr=!0,function e(t,n){Lr&&Dr(t,n).then(function(e){return e.code?Dr(t,n,{method:"POST",data:JSON.stringify(Wr(e.code))}):null}).then(function(){$r.setTimeout(function(){return e(t,n)},1e3)})}(e,t)},stopInitScriptExecution:Ur,redirectUsingCdp:Br,redirect:qr,checkStatus:function(){for(var r,i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return g(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 g(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,jr.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,Hr(1e3)]:[2,n];case 3:e.sent(),e.label=4;case 4:return o++,[3,1];case 5:throw t}})})},enableRetryingTestPages:function(){return g(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(Ar,{scope:Fr})];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 Dr(e,t)},setActiveWindowId:function(e,t,n){return Dr(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},closeWindow:function(e,t,n){return Dr(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},dispatchNativeAutomationEvent:function(n,o,r,i){return g(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:return t=JSON.stringify({type:r,options:i}),[4,Dr(n,o,{method:"POST",data:t})];case 1:return e.sent(),[2]}})})},dispatchNativeAutomationEventSequence:function(t,n,o){return g(this,void 0,void 0,function(){return E(this,function(e){switch(e.label){case 0:return[4,Dr(t,n,{method:"POST",data:JSON.stringify(o)})];case 1:return e.sent(),[2]}})})},parseSelector:function(e,t,n){return Dr(e,t,{method:"POST",data:JSON.stringify({selector:n})})}}),Jr={};Jr.RequestBarrier=f,Jr.ClientRequestEmitter=_,Jr.ScriptExecutionBarrier=I,Jr.ScriptExecutionEmitter=F,Jr.pageUnloadBarrier=Vt,Jr.preventRealEvents=function(){Cn.initElementListening($r,Sn),Cn.addFirstInternalEventBeforeListener($r,Sn,Tn),Ut.init()},Jr.disableRealEventsPreventing=function(){Cn.removeInternalEventBeforeListener($r,Sn,Tn)},Jr.scrollController=Ut,Jr.ScrollAutomation=co,Jr.selectController=Vn,Jr.serviceUtils=Ht,Jr.domUtils=ht,Jr.contentEditable=ko,Jr.positionUtils=oo,Jr.styleUtils=yn,Jr.scrollUtils=xn,Jr.eventUtils=It,Jr.arrayUtils=X,Jr.promiseUtils=io,Jr.textSelection=nr,Jr.waitFor=function(i,a,s){return new or(function(e,t){var n,o,r=i();r?e(r):(n=rr.setInterval.call($r,function(){(r=i())&&(rr.clearInterval.call($r,n),rr.clearTimeout.call($r,o),e(r))},a),o=rr.setTimeout.call($r,function(){rr.clearInterval.call($r,n),t()},s))})},Jr.delay=c,Jr.getTimeLimitedPromise=function(e,t){return u.Promise.race([e,c(t).then(function(){return u.Promise.reject(new Sr)})])},Jr.noop=function(){},Jr.getKeyArray=Tr,Jr.getSanitizedKey=_r,Jr.parseKeySequence=function(e){if("string"!=typeof e)return{error:!0};var t=(e=Nr(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:q(r,function(e){var t=Tr(e);return q(t,function(e){var t=1===e.length||"space"===e,n=_r(e),o=a.modifiers[n],r=a.specialKeys[n];return!(t||o||r)})}),keys:e}},Jr.sendRequestToFrame=lo,Jr.KEY_MAPS=a,Jr.browser=zr,Jr.stringifyElement=Bn,Jr.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)},Jr.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},Jr.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",multipleWindowsModeIsNotSupportedInNativeAutomationError:"E102"},Jr.RUNTIME_ERRORS=ir;var Kr=o.nativeMethods,Yr=o.EVENTS.evalIframeScript;Kr.objectDefineProperty($r,"%testCafeCore%",{configurable:!0,value:Jr}),o.on(Yr,function(e){return Qr(Kr.contentWindowGetter.call(e.iframe))});var Xr=o.eventSandbox.message;Xr.on(Xr.SERVICE_MSG_RECEIVED_EVENT,function(e){var t,n,o,r,i;e.message.cmd===co.SCROLL_REQUEST_CMD&&(n=(t=e.message).offsetX,o=t.offsetY,r=t.maxScrollMargin,i=rt(e.source),new co(i,{offsetX:n,offsetY:o},r).run().then(function(){return Xr.sendServiceMsg({cmd:co.SCROLL_RESPONSE_CMD},e.source)}))})}($r["%hammerhead%"],$r["%hammerhead%"].Promise)}(window);
1
+ window["%hammerhead%"].utils.removeInjectedScript(),function $r(Zr){var ei=Zr.document;!function(u,d){var o="default"in u?u.default:u;d=d&&Object.prototype.hasOwnProperty.call(d,"default")?d.default:d;var e={alt:18,ctrl:17,meta:91,shift:16},t={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=","{":"[","}":"]",":":";",'"':"'","|":"\\","<":",",">":".","?":"/","±":"§"},n={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:"ArrowLeft",down:"ArrowDown",right:"ArrowRight",up:"ArrowUp",backspace:"Backspace",capslock:"CapsLock",delete:"Delete",end:"End",enter:"Enter",esc:"Escape",home:"Home",ins:"Insert",pagedown:"PageDown",pageup:"PageUp",space:" ",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:e,shiftMap:t,specialKeys:n,keyProperty:r,modifiersMap:{option:"alt"},symbolCharCodeToKeyCode:{96:192,91:219,93:221,92:220,59:186,39:222,44:188,45:o.utils.browser.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(e),reversedShiftMap:i(t),reversedSpecialKeys:i(n),reversedKeyProperty:i(r),newLineKeys:["enter","\n","\r"]},s=o.Promise,l=o.nativeMethods;function c(t){return new s(function(e){return l.setTimeout.call(Zr,e,t)})}var f=(h.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)})},h.prototype._offListening=function(){this._emitter.offAll()},h.prototype._onRequestSend=function(e){this._collectingReqs&&this._requests.add(e)},h.prototype._onRequestCompleted=function(e){var t=this;c(this._delays.additionalRequestsCollection).then(function(){return t._onRequestFinished(e)})},h.prototype._onRequestFinished=function(e){this._requests.has(e)&&(this._requests.delete(e),this._collectingReqs||this._requests.size||!this._watchdog||this._finishWaiting())},h.prototype._onRequestError=function(e){this._onRequestFinished(e)},h.prototype._finishWaiting=function(){this._watchdog&&((0,u.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._requests.clear(),this._offListening(),this._waitResolve()},h.prototype.wait=function(e){var n=this;return c(e?this._delays.pageInitialRequestsCollection:this._delays.requestsCollection).then(function(){return new u.Promise(function(e){var t;n._collectingReqs=!1,n._waitResolve=e,n._requests.size?(t=u.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},h.TIMEOUT)):n._finishWaiting()})})},h.TIMEOUT=3e3,h);function h(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 p=function(e,t){return(p=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 m(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}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function g(e,a,s,l){return new(s=s||d)(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 E(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 v(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 y=(b.prototype.on=function(e,t){this._eventsListeners[e]||(this._eventsListeners[e]=[]),this._eventsListeners[e].push(t)},b.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)})},b.prototype.off=function(e,t){var n=this._eventsListeners[e];n&&(this._eventsListeners[e]=u.nativeMethods.arrayFilter.call(n,function(e){return e!==t}))},b.prototype.offAll=function(e){e?this._eventsListeners[e]=[]:this._eventsListeners={}},b.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=this._eventsListeners[e];if(o)for(var r=0;r<o.length;r++)o[r].apply(this,t)},b);function b(){this._eventsListeners={}}var C,S="request-send",w="request-completed",T="request-error",_=(m(P,C=y),P.prototype._addHammerheadListener=function(e,t){o.on(e,t),this._hammerheadListenersInfo.push({evt:e,listener:t})},P.prototype.onRequestSend=function(e){this.on(S,e)},P.prototype.onRequestCompleted=function(e){this.on(w,e)},P.prototype.onRequestError=function(e){this.on(T,e)},P.prototype.offAll=function(){C.prototype.offAll.call(this);for(var e=0,t=this._hammerheadListenersInfo;e<t.length;e++){var n=t[e];o.off.call(o,n.evt,n.listener)}},P);function P(){var n=C.call(this)||this;return n._hammerheadListenersInfo=[],n._addHammerheadListener(o.EVENTS.beforeXhrSend,function(e){var t=e.xhr;return n.emit(S,t)}),n._addHammerheadListener(o.EVENTS.xhrCompleted,function(e){var t=e.xhr;return n.emit(w,t)}),n._addHammerheadListener(o.EVENTS.xhrError,function(e){var t=e.xhr;return n.emit(T,t)}),n._addHammerheadListener(o.EVENTS.fetchSent,function(e){n.emit(S,e),e.then(function(){return n.emit(w,e)},function(){return n.emit(T,e)})}),n}var I=(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,u.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,u.nativeMethods.clearTimeout)(this._scripts.get(e)),this._scripts.delete(e),this._scripts.size||c(25).then(function(){n._waitResolve&&!n._scripts.size&&n._finishWaiting()}))},N.prototype._finishWaiting=function(){this._watchdog&&((0,u.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 u.Promise(function(e){var t;n._waitResolve=e,n._scripts.size?(t=u.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 R,M=o.nativeMethods,O="script-added",x="script-loaded-or-failed",A=(m(F,R=y),F.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(x,e)},M.addEventListener.call(e,"load",t),M.addEventListener.call(e,"error",t))},F.prototype.onScriptAdded=function(e){this.on(O,e)},F.prototype.onScriptLoadedOrFailed=function(e){this.on(x,e)},F.prototype.offAll=function(){R.prototype.offAll.call(this),o.off(o.EVENTS.scriptElementAdded,this._onScriptElementAdded)},F);function F(){var n=R.call(this)||this;return n._scriptElementAddedListener=function(e){var t=e.el;return n._onScriptElementAdded(t)},o.on(o.EVENTS.scriptElementAdded,n._scriptElementAddedListener),n}function L(e){var t="array"+e.charAt(0).toUpperCase()+e.slice(1),n=u.nativeMethods[t];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.call.apply(n,e)}}var V=L("filter"),W=L("map"),H=L("slice"),D=L("splice"),k=L("unshift"),U=L("forEach"),B=L("indexOf"),q=L("some"),G=L("reverse"),j=L("reduce"),z=L("concat"),J=L("join"),K=L("every");function Y(e,t){return u.nativeMethods.arrayFind.call(e,t)}var X=Object.freeze({__proto__:null,filter:V,map:W,slice:H,splice:D,unshift:k,forEach:U,indexOf:B,some:q,reverse:G,reduce:j,concat:z,join:J,every:K,isArray:function(e){return"[object Array]"===u.nativeMethods.objectToString.call(e)},from:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return u.nativeMethods.arrayFrom.apply(u.nativeMethods,v([e],t,!1))},find:Y,remove:function(e,t){var n=u.nativeMethods.arrayIndexOf.call(e,t);-1<n&&u.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=o.utils.browser,$=o.nativeMethods,Z=o.utils.style.get,ee=o.utils.dom.getActiveElement,te=o.utils.dom.findDocument,ne=o.utils.dom.find,oe=o.utils.dom.isElementInDocument,re=o.utils.dom.isElementInIframe,ie=o.utils.dom.getIframeByElement,ae=o.utils.dom.isCrossDomainWindows,se=o.utils.dom.getSelectParent,le=o.utils.dom.getChildVisibleIndex,ce=o.utils.dom.getSelectVisibleChildren,ue=o.utils.dom.isElementNode,de=o.utils.dom.isTextNode,fe=o.utils.dom.isRenderedNode,he=o.utils.dom.isIframeElement,pe=o.utils.dom.isInputElement,me=o.utils.dom.isButtonElement,ge=o.utils.dom.isFileInput,Ee=o.utils.dom.isTextAreaElement,ve=o.utils.dom.isAnchorElement,ye=o.utils.dom.isImgElement,be=o.utils.dom.isFormElement,Ce=o.utils.dom.isLabelElement,Se=o.utils.dom.isSelectElement,we=o.utils.dom.isRadioButtonElement,Te=o.utils.dom.isColorInputElement,_e=o.utils.dom.isCheckboxElement,Pe=o.utils.dom.isOptionElement,Ie=o.utils.dom.isSVGElement,Ne=o.utils.dom.isMapElement,Re=o.utils.dom.isBodyElement,Me=o.utils.dom.isHtmlElement,Oe=o.utils.dom.isDocument,xe=o.utils.dom.isTextEditableInput,Ae=o.utils.dom.isTextEditableElement,Fe=o.utils.dom.isTextEditableElementAndEditingAllowed,Le=o.utils.dom.isContentEditableElement,Ve=o.utils.dom.isDomElement,We=o.utils.dom.isShadowUIElement,He=o.utils.dom.isShadowRoot,De=o.utils.dom.isElementFocusable,ke=o.utils.dom.isHammerheadAttr,Ue=o.utils.dom.isElementReadOnly,Be=o.utils.dom.getScrollbarSize,qe=o.utils.dom.getMapContainer,Ge=o.utils.dom.getTagName,je=o.utils.dom.closest,ze=o.utils.dom.getParents,Je=o.utils.dom.findParent,Ke=o.utils.dom.getTopSameDomainWindow,Ye=o.utils.dom.getParentExceptShadowRoot;function Xe(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=0;c<n.length;c++){a=n[c],s=Ge(a),l=Qe(a),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.isAndroid&&Pe(e)||null!==n&&n<0)}(a,e,l)&&(t=a.getAttribute("contenteditable"),(r.test(s)||a.shadowRoot||he(a)||ve(a)&&a.hasAttribute("href")||""===t||"true"===t||null!==l)&&i.push(a))}return V(i,function(e){return!$e(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(Xe(a,t))}return o}function Qe(e){var t=$.getAttribute.call(e,"tabindex");return null!==t&&(t=parseInt(t,10),t=isNaN(t)?null:t),t}function $e(e,t){return e.contains?e.contains(t):q(e,function(e){return e.contains(t)})}function Ze(e,t){if(tt(t,e))return!0;for(var n=$.nodeChildNodesGetter.call(e),o=at(n),r=0;r<o;r++){var i=n[r];if(!We(i)&&Ze(i,t))return!0}return!1}function et(e,t){var n=e.querySelectorAll(Ge(t));return B(n,t)}function tt(e,t){return e&&t&&e.isSameNode?e.isSameNode(t):e===t}function nt(t){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 ot(e){return e.top===e}function rt(e){var t=[];ne(ei,"*",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 it(e){return $.htmlCollectionLengthGetter.call(e)}function at(e){return $.nodeListLengthGetter.call(e)}function st(e){return $.inputValueGetter.call(e)}function lt(e){return $.textAreaValueGetter.call(e)}function ct(e,t){return $.inputValueSetter.call(e,t)}function ut(e,t){return $.textAreaValueSetter.call(e,t)}function dt(e){return pe(e)?st(e):Ee(e)?lt(e):e.value}function ft(e){return e&&e.getRootNode&&te(e)!==e.getRootNode()}var ht=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:Pe,isSVGElement:Ie,isMapElement:Ne,isBodyElement:Re,isHtmlElement:Me,isDocument:Oe,isTextEditableInput:xe,isTextEditableElement:Ae,isTextEditableElementAndEditingAllowed:Fe,isContentEditableElement:Le,isDomElement:Ve,isShadowUIElement:We,isShadowRoot:He,isElementFocusable:De,isHammerheadAttr:ke,isElementReadOnly:Ue,getScrollbarSize:Be,getMapContainer:qe,getTagName:Ge,closest:je,getParents:ze,findParent:Je,getTopSameDomainWindow:Ke,getParentExceptShadowRoot:Ye,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}(Xe(e,t))},getTabIndexAttributeIntValue:Qe,containsElement:$e,getTextareaIndentInLine:function(e,t){var n=lt(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=lt(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=lt(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:/^(text|password|datetime|email|number|search|tel|url|image)$/i).test(e.type)},isEditableElement:function(e,t){return t?Fe(e)||Le(e):Ae(e)||Le(e)},isElementContainsNode:Ze,isOptionGroupElement:function(e){return"[object HTMLOptGroupElement]"===o.utils.dom.instanceToString(e)},getElementIndexInParent:et,isTheSameNode:tt,getElementDescription:function(e){var t,n,o={id:"id",name:"name",class:"className"},r=[];for(t in r.push("<"),r.push(Ge(e)),o)!o.hasOwnProperty(t)||(n=e[o[t]])&&r.push(" "+t+'="'+n+'"');return r.push(">"),r.join("")},getFocusableParent:function(e){for(var t=ze(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:nt,isTopWindow:ot,findIframeByWindow:rt,isEditableFormElement:function(e){return Ae(e)||Se(e)},getCommonAncestor:function(e,t){if(tt(e,t))return e;for(var n=[e].concat(ze(e)),o=t;o;){if(-1<B(n,o))return o;o=$.nodeParentNodeGetter.call(o)}return o},getChildrenLength:it,getChildNodesLength:at,getInputValue:st,getTextAreaValue:lt,setInputValue:ct,setTextAreaValue:ut,getElementValue:dt,setElementValue:function(e,t){return pe(e)?ct(e,t):Ee(e)?ut(e,t):e.value=t},isShadowElement:ft,contains:function(t,e){return!(!t||!e)&&(t.contains?t.contains(e):!!Je(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===ei.documentElement}}),pt=o.Promise,mt=o.nativeMethods,gt=o.eventSandbox.listeners,Et=o.utils.event.BUTTON,vt=o.utils.event.BUTTONS_PARAMETER,yt=o.utils.event.DOM_EVENTS,bt=o.utils.event.WHICH_PARAMETER,Ct=o.utils.event.preventDefault;function St(e,t,n,o){mt.addEventListener.call(e,t,n,o)}function wt(e,t,n,o){mt.removeEventListener.call(e,t,n,o)}function Tt(){var n=[],e=!1;function t(){e||(ei.body?(e=!0,n.forEach(function(e){return e()})):mt.setTimeout.call(Zr,t,1))}function o(){(nt(Zr)||ot(Zr))&&(wt(ei,"DOMContentLoaded",o),t())}return"complete"===ei.readyState?mt.setTimeout.call(Zr,o,1):St(ei,"DOMContentLoaded",o),{then:function(e){return t=e,new pt(function(e){return n.push(function(){return e(t())})});var t}}}var _t,Pt,It=Object.freeze({__proto__:null,BUTTON:Et,BUTTONS_PARAMETER:vt,DOM_EVENTS:yt,WHICH_PARAMETER:bt,preventDefault:Ct,bind:St,unbind:wt,documentReady:function(e){return void 0===e&&(e=0),Tt().then(function(){return gt.getEventListeners(Zr,"load").length?pt.race([new pt(function(e){return St(Zr,"load",e)}),c(e)]):null})}});(Pt=_t=_t||{}).ready="ready",Pt.readyForBrowserManipulation="ready-for-browser-manipulation",Pt.waitForFileDownload="wait-for-file-download";var Nt=_t,Rt=o.Promise,Mt=o.transport,Ot=500,xt=!1,At=null,Ft=!1;function Lt(){xt=!0}var Vt=Object.freeze({__proto__:null,init:function(){o.on(o.EVENTS.beforeUnload,Lt),St(Zr,"unload",function(){xt=!0})},watchForPageNavigationTriggers:function(){At=function(){Ft=!0},o.on(o.EVENTS.pageNavigationTriggered,At)},wait:function(e){void 0===e&&(e=!At||Ft?400:0),At&&(o.off(o.EVENTS.pageNavigationTriggered,At),At=null);var t=c(e).then(function(){if(xt)return c(Ot).then(function(){return Mt.queuedAsyncServiceMsg({cmd:Nt.waitForFileDownload})}).then(function(e){if(!e)return new Rt(function(){})}).then(function(){xt=!1})}),n=c(15e3).then(function(){xt=!1});return Rt.race([t,n])}}),Wt=y,Ht=Object.freeze({__proto__:null,EventEmitter:Wt,inherit:function(e,t){function n(){}n.prototype=t.prototype,o.utils.extend(e.prototype,new n),(e.prototype.constructor=e).base=t.prototype}}),Dt=u.eventSandbox.listeners;function kt(){this.initialized=!1,this.stopPropagationFlag=!1,this.events=new Wt}var Ut=(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,Dt.initElementListening(Zr,["scroll"]),Dt.addFirstInternalEventBeforeListener(Zr,["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 u.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),ft(n)&&(Dt.initElementListening(n,["scroll"]),Dt.addFirstInternalEventBeforeListener(n,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o._internalListener.apply(o,e),Dt.cancelElementListening(n)}))},kt.prototype.stopPropagation=function(){this.stopPropagationFlag=!0},kt.prototype.enablePropagation=function(){this.stopPropagationFlag=!1},new kt),Bt=(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 Gt=o.utils.style,jt=o.utils.style.getBordersWidth,zt=o.utils.style.getComputedStyle,Jt=o.utils.style.getElementMargin,Kt=o.utils.style.getElementPadding,Yt=o.utils.style.getElementScroll,Xt=o.utils.style.getOptionHeight,Qt=o.utils.style.getSelectElementSize,$t=o.utils.style.isElementVisible,Zt=o.utils.style.isVisibleChild,en=o.utils.style.getWidth,tn=o.utils.style.getHeight,nn=o.utils.style.getInnerWidth,on=o.utils.style.getInnerHeight,rn=o.utils.style.getScrollLeft,an=o.utils.style.getScrollTop,sn=o.utils.style.setScrollLeft,ln=o.utils.style.setScrollTop,cn=o.utils.style.get,un=o.utils.style.getBordersWidthFloat,dn=o.utils.style.getElementPaddingFloat;function fn(e,t,n){for(var o in"string"==typeof t&&Gt.set(e,t,n),t)t.hasOwnProperty(o)&&Gt.set(e,o,t[o])}function hn(e,t,n){return e<t?n:e<n?t:Math.max(n,t)}function pn(e){return!!Je(e,!0,function(e){return ue(e)&&"hidden"===Gt.get(e,"visibility")})}function mn(e){return!!Je(e,!0,function(e){return ue(e)&&"none"===Gt.get(e,"display")})}function gn(e){return!fe(e)||mn(e)||pn(e)}function En(e){return e&&!(e.offsetHeight<=0&&e.offsetWidth<=0)}function vn(e){return ue(e)&&"fixed"===Gt.get(e,"position")}function yn(e){return ue(e)&&"sticky"===Gt.get(e,"position")}var bn=Object.freeze({__proto__:null,getBordersWidth:jt,getComputedStyle:zt,getElementMargin:Jt,getElementPadding:Kt,getElementScroll:Yt,getOptionHeight:Xt,getSelectElementSize:Qt,isElementVisible:$t,isSelectVisibleChild:Zt,getWidth:en,getHeight:tn,getInnerWidth:nn,getInnerHeight:on,getScrollLeft:rn,getScrollTop:an,setScrollLeft:sn,setScrollTop:ln,get:cn,getBordersWidthFloat:un,getElementPaddingFloat:dn,set:fn,getViewportDimensions:function(){return{width:hn(Zr.innerWidth,ei.documentElement.clientWidth,ei.body.clientWidth),height:hn(Zr.innerHeight,ei.documentElement.clientHeight,ei.body.clientHeight)}},getWindowDimensions:function(e){return new Bt(0,en(e),tn(e),0)},isHiddenNode:pn,isNotDisplayedNode:mn,isNotVisibleNode:gn,hasDimensions:En,isFixedElement:vn,isStickyElement:yn}),Cn=u.utils.browser,Sn=u.eventSandbox.listeners,wn=["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 _n(e,t,n,o,r){var i,a=u.nativeMethods.eventTargetGetter.call(e)||e.srcElement;if(!t&&!We(a)){if(/^key/.test(e.type)&&((i=e).shiftKey&&i.ctrlKey||(i.altKey||i.metaKey)&&Cn.isMacPlatform||i.keyCode===Tn))return void r();if("blur"===e.type&&a!==Zr&&a!==Zr.document&&!En(a))return;n()}}var Pn=(In.create=function(e){return"left"in e?new In(e.left,e.top):"right"in e?new In(e.right,e.bottom):new In(e.x,e.y)},In.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},In.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},In.prototype.round=function(e){return void 0===e&&(e=Math.round),this.x=e(this.x),this.y=e(this.y),this},In.prototype.eql=function(e){return this.x===e.x&&this.y===e.y},In.prototype.mul=function(e){return this.x*=e,this.y*=e,this},In.prototype.distance=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},In);function In(e,t){this.x=e,this.y=t}var Nn=/auto|scroll|hidden/i;function Rn(e){var t,n=cn(e,"overflowX"),o=cn(e,"overflowY"),r=Nn.test(n),i=Nn.test(o),a=te(e).documentElement,s=e.scrollHeight;return(u.utils.browser.isChrome||u.utils.browser.isFirefox||u.utils.browser.isSafari)&&(t=e.getBoundingClientRect().top,s=s-a.getBoundingClientRect().top+t),(r||i)&&s>a.scrollHeight}function Mn(e){if(Re(e))return Rn(e);if(Me(e))return function(e){var t=cn(e,"overflowX"),n=cn(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(Rn(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=cn(t=e,"overflowX"),o=cn(t,"overflowY"),r=Nn.test(n),i=Nn.test(o),new Pn(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 On(e){var t,n,o=ze(e);return!re(e)||(t=ie(e))&&(n=ze(t),o.concat(n)),u.nativeMethods.arrayFilter.call(o,Mn)}var xn=Object.freeze({__proto__:null,hasScroll:Mn,getScrollableParents:On}),An=o.shadowUI,Fn=o.nativeMethods,Ln="disabled";function Vn(){this.currentEl=null,this.optionList=null,this.groups=[],this.options=[]}var Wn=(Vn.prototype._createOption=function(e,t){var n=ei.createElement("div"),o=e.disabled||"optgroup"===Ge(e.parentElement)&&e.parentElement.disabled,r="option"===Ge(e)?e.text:"";Fn.nodeTextContentSetter.call(n,r),t.appendChild(n),An.addClass(n,"tcOption"),o&&(An.addClass(n,Ln),fn(n,"color",cn(e,"color"))),this.options.push(n)},Vn.prototype._createGroup=function(e,t){var n=ei.createElement("div");Fn.nodeTextContentSetter.call(n,e.label||" "),t.appendChild(n),An.addClass(n,"tcOptionGroup"),e.disabled&&(An.addClass(n,Ln),fn(n,"color",cn(e,"color"))),this.createChildren(e.children,n),this.groups.push(n)},Vn.prototype.clear=function(){this.optionList=null,this.currentEl=null,this.options=[],this.groups=[]},Vn.prototype.createChildren=function(e,t){for(var n=it(e),o=0;o<n;o++)Pe(e[o])?this._createOption(e[o],t):"optgroup"===Ge(e[o])&&this._createGroup(e[o],t)},Vn.prototype.getEmulatedChildElement=function(e){var t="optgroup"===Ge(e),n=et(this.currentEl,e);return t?this.groups[n]:this.options[n]},Vn.prototype.isOptionListExpanded=function(e){return e?e===this.currentEl:!!this.currentEl},Vn.prototype.isOptionElementVisible=function(e){var t=se(e);if(!t)return!0;var n=this.isOptionListExpanded(t),o=Qt(t);return n||1<o},new Vn),Hn=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},Dn={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 ")}},kn=o.utils.html,Un=o.nativeMethods,Bn=10;function qn(e){if(!e)return"";var t,n,o,r=Un.cloneNode.call(e),i=kn.cleanUpHtml(Un.elementOuterHTMLGetter.call(r)),a=(t=Un.nodeTextContentGetter.call(e),n=Bn,void 0===o&&(o="..."),t.length<n?t:t.substring(0,n-o.length)+o),s=Un.elementChildrenGetter.call(e);return 0<Un.htmlCollectionLengthGetter.call(s)?i.replace("></",">...</"):a?i.replace("></",">".concat(a,"</")):i}var Gn=o.utils.position.getElementRectangle,jn=o.utils.position.getOffsetPosition,zn=o.utils.position.offsetToClientCoords;function Jn(e){var t,n,o,r,i=Me(e),a=i?e.getElementsByTagName("body")[0]:null,s=e.getBoundingClientRect(),l=Bt.create(jt(e)),c=Yt(e),u=re(e),d="BackCompat"===e.ownerDocument.compatMode,f=i?new Pn(0,0):Pn.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=jn(t),o=zn(Pn.create(n)),r=jt(t),f.add(o).add(Pn.create(r)),i&&l.add(r));var m=!i&&nn(e)!==e.clientWidth,g=!i&&on(e)!==e.clientHeight,E={right:m?Be():0,bottom:g?Be():0};return new Hn(p,h,f,l,c,E)}function Kn(e){var t=e.x,n=e.y,o=ei.elementFromPoint,r=null;try{r=o.call(ei,t,n)}catch(e){return null}for(null===r&&(r=o.call(ei,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 Yn(e,t){return Bt.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 Xn(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 Pn(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 Pn(Math.round(t.pageX),Math.round(t.pageY))}function Qn(e){return!to(e)}function $n(e){return"hidden"===cn(e,"visibility")}function Zn(e){return"collapse"===cn(e,"visibility")}function eo(e){return"none"===cn(e,"display")}function to(e){return!ft(e)&&($n(e)||Zn(e)||eo(e))}function no(e){var t=Gn(e);return 0===t.width||0===t.height}function oo(e){return e.replace(/.*The/,"its")}var ro=Object.freeze({__proto__:null,getElementRectangle:Gn,getOffsetPosition:jn,offsetToClientCoords:zn,getClientDimensions:Jn,getElementFromPoint:Kn,calcRelativePosition:Yn,getIframeClientCoordinates:function(e){var t=jn(e),n=t.left,o=t.top,r=zn({x:n,y:o}),i=jt(e),a=Kt(e),s=r.x+i.left+a.left,l=r.y+i.top+a.top;return new Bt(l,s+en(e),l+tn(e),s)},containsOffset:function(e,t,n){var o=Jn(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=Xn(e),a=te(r),s=0,l=0;return!re(a.documentElement)||(t=ie(a))&&(n=jn(t),o=jt(t),s=n.left+o.left,l=n.top+o.top),new Pn(i.x+s,i.y+l)},getEventPageCoordinates:Xn,getIframePointRelativeToParentFrame:function(e,t){var n=rt(t),o=jn(n),r=jt(n),i=Kt(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=Gn(e);return new Pn(Math.round(t.left+t.width/2),Math.round(t.top+t.height/2))},getClientPosition:function(e){var t=jn(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=Zr.screenLeft||Zr.screenX,t=Zr.screenTop||Zr.screenY;return new Pn(e,t)},isIframeVisible:Qn,isElementVisible:function e(t){if(!Ve(t)&&!de(t))return!1;if(Pe(t)||"optgroup"===Ge(t))return Wn.isOptionElementVisible(t);if(he(t))return Qn(t);if(Ie(t))return!Je(t,!0,to)&&!no(t);if(de(t))return!gn(t);if(!Le(t)&&no(t))return!1;if(Ne(t)){var n=qe(je(t,"map"));return!!n&&e(n)}return En(t)&&!to(t)},getSubHiddenReason:oo,getHiddenReason:function e(t,n){if(void 0===n&&(n="action target"),!t)return null;var o=de(t);if(!Ve(t)&&!o)return Dn.notElementOrTextNode(n);var r=o?t.data:qn(t),i=t.offsetHeight,a=t.offsetWidth;if((Pe(t)||"optgroup"===Ge(t))&&!Wn.isOptionElementVisible(t)){var s=qn(se(t));return Dn.optionNotVisible(r,n,s)}if(Ne(t)){var l=oo(e(qe(je(t,"map")),"container")||"");return Dn.mapContainerNotVisible(r,l)}var c=Je(t,!1,$n);if(c)return Dn.parentHasVisibilityHidden(r,n,qn(c));var u=Je(t,!1,Zn);if(u)return Dn.parentHasVisibilityCollapse(r,n,qn(u));var d=Je(t,!1,eo);return d?Dn.parentHasDisplayNone(r,n,qn(d)):$n(t)?Dn.elHasVisibilityHidden(r,n):Zn(t)?Dn.elHasVisibilityCollapse(r,n):eo(t)?Dn.elHasDisplayNone(r,n):de(t)&&!fe(t)?Dn.elNotRendered(r,n):!Le(t)&&no(t)||!En(t)?Dn.elHasWidthOrHeightZero(r,n,a,i):null},getElOutsideBoundsReason:function e(t,n){void 0===n&&(n="action target");var o=qn(t);if(Ne(t)){var r=oo(e(qe(je(t,"map")),"container")||"");return Dn.mapContainerNotVisible(o,r)}return Dn.elOutsideBounds(o,n)}});function io(n,o){return g(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 ao=Object.freeze({__proto__:null,whilst:function(t,n){return g(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:io,each:function(r,i){return g(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]}})})}}),so=o.Promise,lo=o.eventSandbox.message;function co(e,o,t){return new so(function(n){lo.on(lo.SERVICE_MSG_RECEIVED_EVENT,function e(t){t.message.cmd===o&&(lo.off(lo.SERVICE_MSG_RECEIVED_EVENT,e),n(t.message))}),lo.sendServiceMsg(e,t)})}var uo=(fo._isScrollValuesChanged=function(e,t){return rn(e)!==t.left||an(e)!==t.top},fo.prototype._setScroll=function(e,t){var n=this,o=t.left,r=t.top,i=Me(e)?te(e):e,a={left:rn(i),top:an(i)},o=Math.max(o,0),r=Math.max(r,0),s=Ut.waitForScroll(i);return sn(i,o),ln(i,r),fo._isScrollValuesChanged(i,a)?s=s.then(function(){n._scrollWasPerformed||(n._scrollWasPerformed=fo._isScrollValuesChanged(i,a))}):(s.cancel(),u.Promise.resolve())},fo.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}},fo.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=Yn(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},fo._getChildPoint=function(e,t,n){return Pn.create(t).sub(Pn.create(e)).add(Pn.create(e.scroll)).add(Pn.create(t.border)).add(n)},fo.prototype._getScrollPosition=function(e,t,n,o){var r=fo._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)}},fo._getChildPointAfterScroll=function(e,t,n,o){return Pn.create(t).add(Pn.create(e.scroll)).sub(Pn.create(n)).add(o)},fo.prototype._isChildFullyVisible=function(e,t,n){var o=fo._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},fo.prototype._scrollToChild=function(e,t,n){for(var o=Jn(e),r=Jn(t),i=nn(Zr),a=on(Zr),s=o.scroll,l=!this._isChildFullyVisible(o,r,n);l;){s=this._getScrollPosition(o,r,n,this._maxScrollMargin);var c=fo._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)},fo.prototype._scrollElement=function(){if(!Mn(this._element))return u.Promise.resolve();var e=Jn(this._element),t=this._getScrollToPoint(e,this._offsets,this._maxScrollMargin);return this._setScroll(this._element,t)},fo.prototype._scrollParents=function(){var t,n,o=this,r=On(this._element),i=this._element,e=rn(i),a=an(i),s=Pn.create(this._offsets).sub(new Pn(e,a).round()),l=io(r.length,function(e){return o._scrollToChild(r[e],i,s).then(function(){t=Jn(i),n=Jn(r[e]),s.add(Pn.create(t)).sub(Pn.create(n)).add(Pn.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=Zr).top!==e)return c.cmd=fo.SCROLL_REQUEST_CMD,co(c,fo.SCROLL_RESPONSE_CMD,Zr.parent)}).then(function(){return o._scrollWasPerformed})},fo._getPinnedElementAncestorOrSelf=function(e,t){return Je(e,!0,t)},fo.prototype._isTargetElementObscuredInPointByElement=function(e,t){var n=fo._getPinnedElementAncestorOrSelf(e,t);return!!n&&!n.contains(this._element)},fo.prototype._isTargetElementObscuredInPoint=function(e){var t=Kn(e);return!!t&&(this._isTargetElementObscuredInPointByElement(t,vn)||this._isTargetElementObscuredInPointByElement(t,yn))},fo.prototype.run=function(){var e=this;return this._scrollElement().then(function(){return e._scrollParents()})},fo.SCROLL_REQUEST_CMD="automation|scroll|request",fo.SCROLL_RESPONSE_CMD="automation|scroll|response",fo);function fo(e,t,n){this._element=e,this._offsets=new Pn(t.offsetX,t.offsetY),this._scrollToCenter=!!t.scrollToCenter,this._skipParentFrames=!!t.skipParentFrames,this._maxScrollMargin=n||{left:50,top:50},this._scrollWasPerformed=!1}function ho(e){var t=u.nativeMethods.nodeChildNodesGetter.call(e);return!at(t)&&Io(e)?e:Y(t,Io)}function po(e){return Y(u.nativeMethods.nodeChildNodesGetter.call(e),function(e){return Io(e)||!No(e)&&po(e)})}function mo(e){return de(e)||ue(e)&&$t(e)}function go(e){var t=u.nativeMethods.nodeChildNodesGetter.call(e);return V(t,mo)}function Eo(e){var t=u.nativeMethods.nodeChildNodesGetter.call(e);return q(t,mo)}function vo(e){var t=u.nativeMethods.nodeChildNodesGetter.call(e);return q(t,function(e){return Wo(e,!0)})}function yo(e,t){var n,o;if(!We(e)&&!We(t)){var r=u.nativeMethods.nodeChildNodesGetter.call(t);return!tt(t,e)&&at(r)&&/div|p/.test(Ge(t))&&(n=po(e))&&!tt(t,n)&&(o=So(n))&&!tt(t,o)&&ho(t)}}function bo(e,t){var n,o,r,i=fe(t);if(!We(e)&&!We(t)){var a=u.nativeMethods.nodeChildNodesGetter.call(t);if(!tt(t,e)&&(i&&ue(t)&&at(a)&&!/div|p/.test(Ge(t))||Io(t)&&!tt(t,e)&&t.nodeValue.length)){if(i&&ue(t)){if(!(n=po(e))||tt(t,n))return;if(!(o=So(n))||tt(t,o))return}return(r=function(e){for(var t=null,n=e;!t&&(n=n.previousSibling);)if(!No(n)&&!Po(n)){t=n;break}return t}(t))&&ue(r)&&/div|p/.test(Ge(r))&&ho(r)}}}function Co(e,t){var n,o,r=u.nativeMethods.nodeChildNodesGetter.call(e),i=at(r),a=null,s=t?Io:de;if(!i&&s(e))return e;for(var l=0;l<i;l++){if(n=r[l],o=ue(n)&&!Le(n),s(n))return n;if(fe(n)&&Eo(n)&&!o&&(a=Co(n,t)))return a}return a}function So(e){return Co(e,!0)}function wo(e,t){var n,o,r=u.nativeMethods.nodeChildNodesGetter.call(e),i=at(r),a=null;if(!i&&Io(e))return e;for(var s=i-1;0<=s;s--){if(n=r[s],o=ue(n)&&!Le(n),de(n)&&(!t||!Po(n)))return n;if(fe(n)&&Eo(n)&&!o&&(a=wo(n,!1)))return a}return a}function To(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 _o(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 Po(e){if(!de(e))return!1;var t=e.nodeValue,n=To(t),o=_o(t);return n===t.length&&0===o}function Io(e){return de(e)&&!Po(e)}function No(e){return!fe(e)||We(e)}function Ro(e){var t=e.getAttribute?e.getAttribute("contenteditable"):null;return""===t||"true"===t}function Mo(e){var t=ze(e);if(Ro(e)&&Le(e))return e;var n=te(e);return"on"===n.designMode?n.body:Y(t,function(e){return Ro(e)&&Le(e)})}function Oo(e,t){if(tt(e,t))return tt(t,Mo(e))?e:u.nativeMethods.nodeParentNodeGetter.call(e);var n=[],o=Mo(e),r=null;if(!Ze(o,t))return null;for(r=e;r!==o;r=u.nativeMethods.nodeParentNodeGetter.call(r))n.push(r);for(r=t;r!==o;r=u.nativeMethods.nodeParentNodeGetter.call(r))if(-1!==B(n,r))return r;return o}function xo(e,t){if(We(e))return{node:e,offset:t};var n=u.nativeMethods.nodeChildNodesGetter.call(e),o=at(n),r=o<=t,i=n[t],a=0;if(We(i)){if(o<=1)return{node:e,offset:0};(r=o<=t-1)?i=n[o-2]:(i=n[t-1],a=0)}for(;!No(i)&&ue(i);){var s=go(i);if(!s.length){a=0;break}i=s[r?s.length-1:0]}return 0===a||No(i)||(a=i.nodeValue?i.nodeValue.length:0),{node:i,offset:a}}function Ao(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)||ue(o))&&vo(o)&&(i=xo(o,r)),{node:i.node,offset:i.offset}}function Fo(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)||ue(o))&&vo(o)&&(i=xo(o,r)),{node:i.node,offset:i.offset}}function Lo(e,t,n){return Do(e,Ao(e,t,n))}function Vo(e,t,n){return Do(e,Fo(e,t,n))}function Wo(e,t){if(gn(e))return!1;if(de(e))return!0;if(!ue(e))return!1;if(vo(e))return t;var n=u.nativeMethods.nodeParentNodeGetter.call(e),o=!Le(n),r=go(e),i=q(r,function(e){return"br"===Ge(e)});return o||i}function Ho(s,e){var l={node:null,offset:e};return function e(t){var n,o,r=u.nativeMethods.nodeChildNodesGetter.call(t),i=at(r);if(l.node)return l;if(No(t))return l;if(de(t)){if(l.offset<=t.nodeValue.length)return l.node=t,l;t.nodeValue.length&&(!l.node&&bo(s,t)&&l.offset--,l.offset-=t.nodeValue.length)}else if(ue(t)){if(!mo(t))return l;if(0===l.offset&&Wo(t,!1))return l.node=t,l.offset=(n=t,o=0,Y(u.nativeMethods.nodeChildNodesGetter.call(n),function(e,t){return o=t,"br"===Ge(e)})?o:0),l;(l.node||!yo(s,t)&&!bo(s,t))&&(i||"br"!==Ge(t))||l.offset--}for(var a=0;a<i;a++)l=e(r[a]);return l}(s)}function Do(i,e){var a=e.node,s=e.offset,l=0,c=!1;return function e(t){var n=u.nativeMethods.nodeChildNodesGetter.call(t),o=at(n);if(c)return l;if(tt(a,t))return(yo(i,t)||bo(i,t))&&l++,c=!0,l+s;if(No(t))return l;!o&&t.nodeValue&&t.nodeValue.length?(!c&&bo(i,t)&&l++,l+=t.nodeValue.length):(!o&&ue(t)&&"br"===Ge(t)||!c&&(yo(i,t)||bo(i,t)))&&l++;for(var r=0;r<o;r++)l=e(n[r]);return l}(i)}function ko(e){var t,n,o,r,i,a=de(e)?e:wo(e,!0);if(!a||(t=a,o=de(n=e)?n:Co(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=u.nativeMethods.nodeParentNodeGetter.call(e),-1<B(n,cn(e,"white-space")))return 1}(t,n)))return 0;var s=te(e).createRange();return s.selectNodeContents(a),Do(e,{node:a,offset:s.endOffset})}var Uo=Object.freeze({__proto__:null,getFirstVisibleTextNode:So,getLastTextNode:wo,getFirstNonWhitespaceSymbolIndex:To,getLastNonWhitespaceSymbolIndex:_o,isInvisibleTextNode:Po,findContentEditableParent:Mo,getNearestCommonAncestor:Oo,getSelection:function(e,t,n){return{startPos:Ao(e,t,n),endPos:Fo(e,t,n)}},getSelectionStartPosition:Lo,getSelectionEndPosition:Vo,calculateNodeAndOffsetByPosition:Ho,calculatePositionByNodeAndOffset:Do,getElementBySelection:function(e){var t=Oo(e.anchorNode,e.focusNode);return de(t)?t.parentElement:t},getFirstVisiblePosition:function(e){var t=de(e)?e:So(e),n=te(e).createRange();return t?(n.selectNodeContents(t),Do(e,{node:t,offset:n.startOffset})):0},getLastVisiblePosition:ko,getContentEditableValue:function(e){return W(function e(t){var n=[],o=u.nativeMethods.nodeChildNodesGetter.call(t),r=at(o);No(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("")}}),Bo=o.utils.browser,qo=o.eventSandbox.selection,Go="backward",jo="forward",zo="none";function Jo(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=So(e))||e,offset:r&&r.nodeValue?To(r.nodeValue):0}),void 0===n&&(s={node:(i=wo(e,!0))||e,offset:i&&i.nodeValue?_o(i.nodeValue):0}),l=l||Ho(e,t),s=s||Ho(e,n),l.node&&s.node&&(c?Zo(s,l,o):Zo(l,s,o))}function Ko(e){var t=e?te(e):ei,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 Yo(e,t,n){var o=Do(e,t);return Do(e,n)<o}function Xo(e){return Le(e)?er(e)?Lo(e,$o(e),Ko(e)):0:qo.getSelection(e).start}function Qo(e){return Le(e)?er(e)?Vo(e,$o(e),Ko(e)):0:qo.getSelection(e).end}function $o(e){var t=te(e);return t?t.getSelection():Zr.getSelection()}function Zo(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=Mo(o),u=Yo(c,e,t),d=$o(c),f=te(c).createRange();qo.wrapSetterSelection(c,function(){var e;d.removeAllRanges(),u?(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},(Bo.isSafari||Bo.isChrome&&Bo.version<58)&&Po(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 er(e){var t=$o(e);return!(!t.anchorNode||!t.focusNode)&&Ze(e,t.anchorNode)&&Ze(e,t.focusNode)}var tr,nr,or=Object.freeze({__proto__:null,hasInverseSelectionContentEditable:Ko,isInverseSelectionContentEditable:Yo,getSelectionStart:Xo,getSelectionEnd:Qo,hasInverseSelection:function(e){return Le(e)?Ko(e):(qo.getSelection(e).direction||zo)===Go},getSelectionByElement:$o,select:function(e,t,n){var o,r,i,a;Le(e)?Jo(e,t,n,!0):(o=t||0,i=!1,a=null,(r=void 0===n?dt(e).length:n)<o&&(a=o,o=r,r=a,i=!0),qo.setSelection(e,o,r,i?Go:jo),zo=t===n?"none":i?Go:jo)},selectByNodesAndOffsets:Zo,deleteSelectionContents:function(e,t){var n,o,r,i,a,s,l,c,u,d,f,h,p=Xo(e),m=Qo(e);t&&Jo(e),p!==m&&(n=$o(e),o=n.anchorNode,r=n.focusNode,i=n.anchorOffset,a=n.focusOffset,s=To(o.nodeValue),l=_o(o.nodeValue),c=To(r.nodeValue),u=_o(r.nodeValue),f=d=null,de(o)&&(i<s&&0!==i?d=0:i!==o.nodeValue.length&&(Po(o)&&0!==i||l<i)&&(d=o.nodeValue.length)),de(r)&&(a<c&&0!==a?f=0:a!==r.nodeValue.length&&(Po(r)&&0!==a||u<a)&&(f=r.nodeValue.length)),Bo.isWebKit&&(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||Zo({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=$o(e),n=t.rangeCount;if(n)for(var o=0;o<n;o++)t.getRangeAt(o).deleteContents()}(e),(h=$o(e)).rangeCount&&!h.getRangeAt(0).collapsed&&h.getRangeAt(0).collapse(!0))},setCursorToLastVisiblePosition:function(e){var t=ko(e);Jo(e,t,t)},hasElementContainsSelection:er}),rr=o.Promise,ir=o.nativeMethods,ar={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",requestUrlInvalidValueError:"E1072",requestRuntimeError:"E1073",requestCannotResolveTestRun:"E1074",relativeBaseUrl:"E1075",invalidSkipJsErrorsOptionsObjectProperty:"E1076",invalidSkipJsErrorsCallbackWithOptionsProperty:"E1077",invalidCommandInJsonCompiler:"E1078",invalidCustomActionsOptionType:"E1079",invalidCustomActionType:"E1080",cannotImportESMInCommonsJS:"E1081",setNativeAutomationForUnsupportedBrowsers:"E1082",cannotReadConfigFile:"E1083",cannotParseConfigFile:"E1084",cannotRunLegacyTestsInNativeAutomationMode:"E1085",setUserProfileInNativeAutomation:"E1086"};(nr=tr=tr||{}).TooHighConcurrencyFactor="TooHighConcurrencyFactor",nr.UseBrowserInitOption="UseBrowserInitOption",nr.RestErrorCauses="RestErrorCauses";var sr,lr,cr,ur,dr,fr=tr,hr=", ",pr='"';function mr(e,t){return"".concat(t).concat(e).concat(t)}function gr(e,t,n){void 0===t&&(t=hr),void 0===n&&(n=pr);var o=v([],e,!0);if(-1<t.indexOf("\n"))return o.map(function(e){return mr(e,n)}).join(t);if(1===o.length)return mr(o[0],n);if(2===o.length){var r=e[0],i=e[1];return"".concat(mr(r,n)," and ").concat(mr(i,n))}var a=o.pop(),s=o.map(function(e){return mr(e,n)}).join(t);return"".concat(s,", and ").concat(mr(a,n))}(lr=sr=sr||{}).message="message",lr.stack="stack",lr.pageUrl="pageUrl",(ur=cr=cr||{}).fn="fn",ur.dependencies="dependencies";var Er,vr="https://testcafe.io/documentation/402639/reference/command-line-interface#file-pathglob-pattern",yr="https://testcafe.io/documentation/402638/reference/configuration-file#filter",br="https://testcafe.io/documentation/402828/guides/concepts/browsers#test-in-headless-mode",Cr="https://testcafe.io/documentation/404150/guides/advanced-guides/custom-test-actions",Sr=((dr={})[ar.cannotCreateMultipleLiveModeRunners]="Cannot launch multiple live mode instances of the TestCafe test runner.",dr[ar.cannotRunLiveModeRunnerMultipleTimes]="Cannot launch the same live mode instance of the TestCafe test runner multiple times.",dr[ar.browserDisconnected]="The {userAgent} browser disconnected. If you did not close the browser yourself, browser performance or network issues may be at fault.",dr[ar.cannotRunAgainstDisconnectedBrowsers]="The following browsers disconnected: {userAgents}. Cannot run further tests.",dr[ar.testRunRequestInDisconnectedBrowser]='"{browser}" disconnected during test execution.',dr[ar.cannotEstablishBrowserConnection]="Cannot establish one or more browser connections.",dr[ar.cannotFindBrowser]='Cannot find the browser. "{browser}" is neither a known browser alias, nor a path to an executable file.',dr[ar.browserProviderNotFound]='Cannot find the "{providerName}" browser provider.',dr[ar.browserNotSet]="You have not specified a browser.",dr[ar.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(vr,"."),dr[ar.noTestsToRun]="Source files do not contain valid 'fixture' and 'test' declarations.",dr[ar.noTestsToRunDueFiltering]="No tests match your filter.\n"+"See ".concat(yr,"."),dr[ar.multipleSameStreamReporters]='Reporters cannot share output streams. The following reporters interfere with one another: "{reporters}".',dr[ar.optionValueIsNotValidRegExp]='The "{optionName}" option does not contain a valid regular expression.',dr[ar.optionValueIsNotValidKeyValue]='The "{optionName}" option does not contain a valid key-value pair.',dr[ar.invalidQuarantineOption]='The "{optionName}" option does not exist. Specify "attemptLimit" and "successThreshold" to configure quarantine mode.',dr[ar.invalidQuarantineParametersRatio]='The value of "attemptLimit" ({attemptLimit}) should be greater then the value of "successThreshold" ({successThreshold}).',dr[ar.invalidAttemptLimitValue]='The "{attemptLimit}" parameter only accepts values of {MIN_ATTEMPT_LIMIT} and up.',dr[ar.invalidSuccessThresholdValue]='The "{successThreshold}" parameter only accepts values of {MIN_SUCCESS_THRESHOLD} and up.',dr[ar.invalidSpeedValue]="Speed should be a number between 0.01 and 1.",dr[ar.invalidConcurrencyFactor]="The concurrency factor should be an integer greater than or equal to 1.",dr[ar.cannotDivideRemotesCountByConcurrency]="The number of remote browsers should be divisible by the concurrency factor.",dr[ar.cannotSetConcurrencyWithCDPPort]='The value of the "concurrency" option includes the CDP port.',dr[ar.portsOptionRequiresTwoNumbers]='The "--ports" option requires two arguments.',dr[ar.portIsNotFree]="Port {portNum} is occupied by another process.",dr[ar.invalidHostname]='Cannot resolve hostname "{hostname}".',dr[ar.cannotFindSpecifiedTestSource]='Cannot find a test file at "{path}".',dr[ar.clientFunctionCodeIsNotAFunction]="Cannot initialize a ClientFunction because {#instantiationCallsiteName} is {type}, and not a function.",dr[ar.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.",dr[ar.clientFunctionCannotResolveTestRun]="{#instantiationCallsiteName} does not have test controller access. To execute {#instantiationCallsiteName} from a Node.js API callback, bind the test controller object to the function with the `.with({ boundTestRun: t })` method. Note that you cannot execute {#instantiationCallsiteName} outside test code.",dr[ar.requestCannotResolveTestRun]='"request" does not have test controller access.',dr[ar.regeneratorInClientFunctionCode]='{#instantiationCallsiteName} code, arguments or dependencies cannot contain generators or "async/await" syntax (use Promises instead).',dr[ar.invalidClientFunctionTestRunBinding]='Cannot resolve the "boundTestRun" option because its value is not a test controller.',dr[ar.invalidValueType]="{smthg} ({actual}) is not of expected type ({type}).",dr[ar.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://.',dr[ar.testControllerProxyCannotResolveTestRun]="The action does not have implicit test controller access. Reference the 't' object to gain it.",dr[ar.timeLimitedPromiseTimeoutExpired]="A Promise timed out.",dr[ar.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.",dr[ar.multipleAPIMethodCallForbidden]='You cannot call the "{methodName}" method more than once. Specify an array of parameters instead.',dr[ar.invalidReporterOutput]="Specify a file name or a writable stream as the reporter's output target.",dr[ar.cannotReadSSLCertFile]='Unable to read the file referenced by the "{option}" ssl option ("{path}"). Error details:\n\n{err}',dr[ar.cannotPrepareTestsDueToError]="Cannot prepare tests due to the following error:\n\n{errMessage}",dr[ar.cannotParseRawFile]='Cannot parse a raw test file at "{path}" due to the following error:\n\n{errMessage}',dr[ar.testedAppFailedWithError]="The web application failed with the following error:\n\n{errMessage}",dr[ar.unableToOpenBrowser]='Unable to open the "{alias}" browser due to the following error:\n\n{errMessage}',dr[ar.requestHookConfigureAPIError]="Attempt to configure a request hook resulted in the following error:\n\n{requestHookName}: {errMsg}",dr[ar.forbiddenCharatersInScreenshotPath]='There are forbidden characters in the "{screenshotPath}" {screenshotPathType}:\n {forbiddenCharsDescription}',dr[ar.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.",dr[ar.cannotReadConfigFile]='Failed to read the "{path}" configuration file from disk. Error details:\n\n{err}',dr[ar.cannotParseConfigFile]='Failed to parse the "{path}" configuration file. The file contains invalid JSON syntax. \n\nError details:\n\n{err}',dr[ar.cannotFindReporterForAlias]='Failed to load the "{name}" reporter. Please check the parameter for errors. Error details:\n\n{err}',dr[ar.cannotFindTypescriptConfigurationFile]='"{filePath}" is not a valid TypeScript configuration file.',dr[ar.clientScriptInitializerIsNotSpecified]="Initialize your client script with one of the following: a JavaScript script, a JavaScript file path, or the name of a JavaScript module.",dr[ar.clientScriptBasePathIsNotSpecified]="Specify the base path for the client script file.",dr[ar.clientScriptInitializerMultipleContentSources]="Client scripts can only have one initializer: JavaScript code, a JavaScript file path, or the name of a JavaScript module.",dr[ar.cannotLoadClientScriptFromPath]="Cannot load a client script from {path}.\n{errorMessage}",dr[ar.clientScriptModuleEntryPointPathCalculationError]="A client script tried to load a JavaScript module that TestCafe cannot locate:\n\n{errorMessage}.",dr[ar.methodIsNotAvailableForAnIPCHost]="This method cannot be called on a service host.",dr[ar.tooLargeIPCPayload]="The specified payload is too large to form an IPC packet.",dr[ar.malformedIPCMessage]="Cannot process a malformed IPC message.",dr[ar.unexpectedIPCHeadPacket]="Cannot create an IPC message due to an unexpected IPC head packet.",dr[ar.unexpectedIPCBodyPacket]="Cannot create an IPC message due to an unexpected IPC body packet.",dr[ar.unexpectedIPCTailPacket]="Cannot create an IPC message due to an unexpected IPC tail packet.",dr[ar.cannotRunLocalNonHeadlessBrowserWithoutDisplay]="Your Linux installation 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(br),dr[ar.uncaughtErrorInReporter]='The "{methodName}" method of the "{reporterName}" reporter produced an uncaught error. Error details:\n{originalError}',dr[ar.roleInitializedWithRelativeUrl]='Your Role includes a relative login page URL, but the "baseUrl" option is not set.\nUse an absolute URL or add the baseUrl option to your configuration file or CLI launch string.',dr[ar.typeScriptCompilerLoadingError]="Cannot load the TypeScript compiler.\n{originErrorMessage}.",dr[ar.cannotCustomizeSpecifiedCompilers]="You cannot specify options for the {noncustomizableCompilerList} compiler{suffix}.",dr[ar.cannotEnableRetryTestPagesOption]="Cannot enable the 'retryTestPages' option. Apply one of the following two solutions:\n-- set the 'hostname' option to 'localhost'\n-- run TestCafe over HTTPS\n",dr[ar.browserConnectionError]="{originErrorMessage}\n{numOfNotOpenedConnection} of {numOfAllConnections} browser connections have not been established:\n{listOfNotOpenedConnections}\n\nHints:\n{listOfHints}",dr[fr.TooHighConcurrencyFactor]="The host machine may not be powerful enough to handle the specified concurrency factor ({concurrencyFactor}). Decrease the concurrency factor or allocate more computing resources to the host machine.",dr[fr.UseBrowserInitOption]="Increase the Browser Initialization Timeout if its value is too low (currently: {browserInitTimeoutMsg}). The timeout determines how long TestCafe waits for browsers to be ready.",dr[fr.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.",dr[ar.cannotFindTestcafeConfigurationFile]="Cannot locate a TestCafe configuration file at {filePath}. Either the file does not exist, or the path is invalid.",dr[ar.relativeBaseUrl]='The value of the baseUrl argument cannot be relative: "{baseUrl}"',dr[ar.requestUrlInvalidValueError]="The request url is invalid ({actualValue}).",dr[ar.requestRuntimeError]="The request was interrupted by an error:\n{message}",dr[ar.invalidSkipJsErrorsOptionsObjectProperty]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors: '.concat(gr(Object.keys(sr)),"."),dr[ar.invalidSkipJsErrorsCallbackWithOptionsProperty]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors callbacks: '.concat(gr(Object.keys(cr)),"."),dr[ar.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',dr[ar.invalidCustomActionsOptionType]="The value of the customActions option does not belong to type Object. Refer to the following article for custom action setup instructions: ".concat(Cr),dr[ar.invalidCustomActionType]='TestCafe cannot parse the "{actionName}" action, because the action definition is invalid. Format the definition in accordance with the custom actions guide: '.concat(Cr),dr[ar.cannotImportESMInCommonsJS]="Cannot import the {esModule} ECMAScript module from {targetFile}. Use a dynamic import() statement or enable the --esm CLI flag.",dr[ar.setNativeAutomationForUnsupportedBrowsers]='The "{browser}" do not support the Native Automation mode. Use the "disable native automation" option to continue.',dr[ar.cannotRunLegacyTestsInNativeAutomationMode]="TestCafe cannot run legacy tests in Native Automation mode. Disable native automation to continue.",dr[ar.setUserProfileInNativeAutomation]='Cannot initialize the test run. When TestCafe uses native automation, it can only launch browsers with an empty user profile. Disable native automation, or remove the "userProfile" suffix from the following browser aliases: "{browsers}".',dr[ar.timeLimitedPromiseTimeoutExpired]),wr=(m(Tr,Er=Error),Tr);function Tr(){var e=Er.call(this,Sr)||this;return e.code=ar.timeLimitedPromiseTimeoutExpired,e}function _r(e){var t=e.replace(/^\+/g,"plus").replace(/\+\+/g,"+plus").split("+");return W(t,function(e){return e.replace("plus","+")})}function Pr(e){var t=1===e.length||"space"===e?e:e.toLowerCase();return a.modifiersMap[t]&&(t=a.modifiersMap[t]),t}var Ir,Nr,Rr=o.utils.trim,Mr={run:"run",idle:"idle"};(Nr=Ir=Ir||{}).ok="ok",Nr.closing="closing";var Or=Ir,xr="file://",Ar=ei.location.href,Fr=ei.location.origin,Lr=Fr+"/service-worker.js",Vr=!1,Wr=null,Hr=eval;function Dr(t){return new d(function(e){return setTimeout(e,t)})}function kr(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 d(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 Ur(e){return Ar.toLowerCase()===e.toLowerCase()}function Br(){Vr=!1}function qr(e,t){kr(t.openFileProtocolUrl,t.createXHR,{method:"POST",data:JSON.stringify({url:e.url})})}function Gr(e,t){var n,o,r,i,a;Br(),void 0===(a=e.url)&&(a=""),0===a.indexOf(xr)?qr(e,t):(o=t,r=(n=e).url.indexOf("#"),i=-1!==r&&n.url.slice(0,r)===Ar.slice(0,r),ei.location=n.url,o.nativeAutomation&&i&&ei.location.reload())}function jr(e){return(e.cmd===Mr.run||e.cmd===Mr.idle)&&!Ur(e.url)}function zr(e,r,t){var i=e.statusUrl,a=e.openFileProtocolUrl,n=void 0===t?{}:t,s=n.manualRedirect,l=n.nativeAutomation;return g(this,void 0,void 0,function(){var n,o;return E(this,function(e){switch(e.label){case 0:return[4,kr(i,r)];case 1:return n=e.sent(),(o=l?(t=n).cmd!==Mr.idle||jr(t):jr(n))&&!s&&Gr(n,{createXHR:r,openFileProtocolUrl:a,nativeAutomation:l}),[2,{command:n,redirecting:o}]}var t})})}var Jr=Object.freeze({__proto__:null,delay:Dr,sendXHR:kr,startHeartbeat:function(e,t){function n(){kr(e,t).then(function(e){e.code!==Or.closing||Ur(e.url)||(Br(),ei.location=e.url)})}Wr=Zr.setInterval(n,2e3),n()},stopHeartbeat:function(){Zr.clearInterval(Wr)},startInitScriptExecution:function(e,t){Vr=!0,function e(t,n){Vr&&kr(t,n).then(function(e){return e.code?kr(t,n,{method:"POST",data:JSON.stringify(Hr(e.code))}):null}).then(function(){Zr.setTimeout(function(){return e(t,n)},1e3)})}(e,t)},stopInitScriptExecution:Br,redirectUsingCdp:qr,redirect:Gr,checkStatus:function(){for(var r,i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return g(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 g(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,zr.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,Dr(1e3)]:[2,n];case 3:e.sent(),e.label=4;case 4:return o++,[3,1];case 5:throw t}})})},enableRetryingTestPages:function(){return g(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(Lr,{scope:Fr})];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 kr(e,t)},setActiveWindowId:function(e,t,n){return kr(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},ensureWindowInNativeAutomation:function(e,t,n){return kr(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},closeWindow:function(e,t,n){return kr(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},dispatchNativeAutomationEvent:function(n,o,r,i){return g(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:return t=JSON.stringify({type:r,options:i}),[4,kr(n,o,{method:"POST",data:t})];case 1:return e.sent(),[2]}})})},dispatchNativeAutomationEventSequence:function(t,n,o){return g(this,void 0,void 0,function(){return E(this,function(e){switch(e.label){case 0:return[4,kr(t,n,{method:"POST",data:JSON.stringify(o)})];case 1:return e.sent(),[2]}})})},parseSelector:function(e,t,n){return kr(e,t,{method:"POST",data:JSON.stringify({selector:n})})}}),Kr={};Kr.RequestBarrier=f,Kr.ClientRequestEmitter=_,Kr.ScriptExecutionBarrier=I,Kr.ScriptExecutionEmitter=A,Kr.pageUnloadBarrier=Vt,Kr.preventRealEvents=function(){Sn.initElementListening(Zr,wn),Sn.addFirstInternalEventBeforeListener(Zr,wn,_n),Ut.init()},Kr.disableRealEventsPreventing=function(){Sn.removeInternalEventBeforeListener(Zr,wn,_n)},Kr.scrollController=Ut,Kr.ScrollAutomation=uo,Kr.selectController=Wn,Kr.serviceUtils=Ht,Kr.domUtils=ht,Kr.contentEditable=Uo,Kr.positionUtils=ro,Kr.styleUtils=bn,Kr.scrollUtils=xn,Kr.eventUtils=It,Kr.arrayUtils=X,Kr.promiseUtils=ao,Kr.textSelection=or,Kr.waitFor=function(i,a,s){return new rr(function(e,t){var n,o,r=i();r?e(r):(n=ir.setInterval.call(Zr,function(){(r=i())&&(ir.clearInterval.call(Zr,n),ir.clearTimeout.call(Zr,o),e(r))},a),o=ir.setTimeout.call(Zr,function(){ir.clearInterval.call(Zr,n),t()},s))})},Kr.delay=c,Kr.getTimeLimitedPromise=function(e,t){return u.Promise.race([e,c(t).then(function(){return u.Promise.reject(new wr)})])},Kr.noop=function(){},Kr.getKeyArray=_r,Kr.getSanitizedKey=Pr,Kr.parseKeySequence=function(e){if("string"!=typeof e)return{error:!0};var t=(e=Rr(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:q(r,function(e){var t=_r(e);return q(t,function(e){var t=1===e.length||"space"===e,n=Pr(e),o=a.modifiers[n],r=a.specialKeys[n];return!(t||o||r)})}),keys:e}},Kr.sendRequestToFrame=co,Kr.KEY_MAPS=a,Kr.browser=Jr,Kr.stringifyElement=qn,Kr.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)},Kr.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},Kr.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",multipleWindowsModeIsNotSupportedInNativeAutomationError:"E102"},Kr.RUNTIME_ERRORS=ar;var Yr=o.nativeMethods,Xr=o.EVENTS.evalIframeScript;Yr.objectDefineProperty(Zr,"%testCafeCore%",{configurable:!0,value:Kr}),o.on(Xr,function(e){return $r(Yr.contentWindowGetter.call(e.iframe))});var Qr=o.eventSandbox.message;Qr.on(Qr.SERVICE_MSG_RECEIVED_EVENT,function(e){var t,n,o,r,i;e.message.cmd===uo.SCROLL_REQUEST_CMD&&(n=(t=e.message).offsetX,o=t.offsetY,r=t.maxScrollMargin,i=rt(e.source),new uo(i,{offsetX:n,offsetY:o},r).run().then(function(){return Qr.sendServiceMsg({cmd:uo.SCROLL_RESPONSE_CMD},e.source)}))})}(Zr["%hammerhead%"],Zr["%hammerhead%"].Promise)}(window);
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.isFixedElement = exports.hasDimensions = exports.isNotVisibleNode = exports.isNotDisplayedNode = exports.isHiddenNode = exports.getWindowDimensions = exports.getViewportDimensions = exports.set = exports.getElementPaddingFloat = exports.getBordersWidthFloat = exports.get = exports.setScrollTop = exports.setScrollLeft = exports.getScrollTop = exports.getScrollLeft = exports.getInnerHeight = exports.getInnerWidth = exports.getHeight = exports.getWidth = exports.isSelectVisibleChild = exports.isElementVisible = exports.getSelectElementSize = exports.getOptionHeight = exports.getElementScroll = exports.getElementPadding = exports.getElementMargin = exports.getComputedStyle = exports.getBordersWidth = void 0;
29
+ exports.isStickyElement = exports.isFixedElement = exports.hasDimensions = exports.isNotVisibleNode = exports.isNotDisplayedNode = exports.isHiddenNode = exports.getWindowDimensions = exports.getViewportDimensions = exports.set = exports.getElementPaddingFloat = exports.getBordersWidthFloat = exports.get = exports.setScrollTop = exports.setScrollLeft = exports.getScrollTop = exports.getScrollLeft = exports.getInnerHeight = exports.getInnerWidth = exports.getHeight = exports.getWidth = exports.isSelectVisibleChild = exports.isElementVisible = exports.getSelectElementSize = exports.getOptionHeight = exports.getElementScroll = exports.getElementPadding = exports.getElementMargin = exports.getComputedStyle = exports.getBordersWidth = void 0;
30
30
  const hammerhead_1 = __importDefault(require("../deps/hammerhead"));
31
31
  const boundary_values_1 = __importDefault(require("./values/boundary-values"));
32
32
  const domUtils = __importStar(require("./dom"));
@@ -99,4 +99,8 @@ function isFixedElement(node) {
99
99
  return domUtils.isElementNode(node) && styleUtils.get(node, 'position') === 'fixed';
100
100
  }
101
101
  exports.isFixedElement = isFixedElement;
102
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3R5bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY2xpZW50L2NvcmUvdXRpbHMvc3R5bGUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxvRUFBNEM7QUFDNU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sZVV0aWxzLmdldChhbmNlc3RvciwgJ2Rpc3BsYXknKSA9PT0gJ25vbmUnKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGlzTm90VmlzaWJsZU5vZGUgKG5vZGUpIHtcbiAgICByZXR1cm4gIWRvbVV0aWxzLmlzUmVuZGVyZWROb2RlKG5vZGUpIHx8IGlzTm90RGlzcGxheWVkTm9kZShub2RlKSB8fCBpc0hpZGRlbk5vZGUobm9kZSk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBoYXNEaW1lbnNpb25zIChlbCkge1xuICAgIC8vTk9URTogaXQncyBsaWtlIGpxdWVyeSAnOnZpc2libGUnIHNlbGVjdG9yIChodHRwOi8vYmxvZy5qcXVlcnkuY29tLzIwMDkvMDIvMjAvanF1ZXJ5LTEtMy0yLXJlbGVhc2VkLylcbiAgICByZXR1cm4gZWwgJiYgIShlbC5vZmZzZXRIZWlnaHQgPD0gMCAmJiBlbC5vZmZzZXRXaWR0aCA8PSAwKTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGlzRml4ZWRFbGVtZW50IChub2RlKSB7XG4gICAgcmV0dXJuIGRvbVV0aWxzLmlzRWxlbWVudE5vZGUobm9kZSkgJiYgc3R5bGVVdGlscy5nZXQobm9kZSwgJ3Bvc2l0aW9uJykgPT09ICdmaXhlZCc7XG59XG4iXX0=
102
+ function isStickyElement(node) {
103
+ return domUtils.isElementNode(node) && styleUtils.get(node, 'position') === 'sticky';
104
+ }
105
+ exports.isStickyElement = isStickyElement;
106
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3R5bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY2xpZW50L2NvcmUvdXRpbHMvc3R5bGUuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxvR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pICYmIHN0eWxlVXRpbHMuZ2V0KG5vZGUsICdwb3NpdGlvbicpID09PSAnc3RpY2t5Jztcbn1cbiJdfQ==
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const hammerhead_1 = require("./deps/hammerhead");
4
+ // NOTE: We need the additional 'Math.random' part to ensure that the
5
+ // method does not generate identical IDs when executed within an array
4
6
  function default_1() {
5
- return hammerhead_1.nativeMethods.performanceNow().toString();
7
+ return `${hammerhead_1.nativeMethods.performanceNow()}.${Math.floor(Math.random() * 100000)}`;
6
8
  }
7
9
  exports.default = default_1;
8
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXJhdGUtaWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY2xpZW50L2RyaXZlci9nZW5lcmF0ZS1pZC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLGtEQUFrRDtBQUVsRDtJQUNJLE9BQU8sMEJBQWEsQ0FBQyxjQUFjLEVBQUUsQ0FBQyxRQUFRLEVBQUUsQ0FBQztBQUNyRCxDQUFDO0FBRkQsNEJBRUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBuYXRpdmVNZXRob2RzIH0gZnJvbSAnLi9kZXBzL2hhbW1lcmhlYWQnO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiAoKSB7XG4gICAgcmV0dXJuIG5hdGl2ZU1ldGhvZHMucGVyZm9ybWFuY2VOb3coKS50b1N0cmluZygpO1xufVxuIl19
10
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXJhdGUtaWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY2xpZW50L2RyaXZlci9nZW5lcmF0ZS1pZC5qcyJdLCJuY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