testcafe 1.20.2-alpha.1 → 2.0.0-rc.3

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 (231) hide show
  1. package/lib/api/request-hooks/assert-type.js +2 -2
  2. package/lib/api/request-hooks/hook.js +2 -2
  3. package/lib/api/request-hooks/request-logger.js +2 -2
  4. package/lib/api/skip-js-errors/index.js +62 -0
  5. package/lib/api/structure/base-unit.js +2 -2
  6. package/lib/api/structure/fixture.js +13 -13
  7. package/lib/api/structure/test.js +18 -17
  8. package/lib/api/structure/testing-unit.js +26 -16
  9. package/lib/api/test-controller/assertion.js +5 -5
  10. package/lib/api/test-controller/execution-context.js +2 -2
  11. package/lib/api/test-controller/index.js +33 -30
  12. package/lib/api/test-controller/proxy.js +2 -2
  13. package/lib/api/test-page-url.js +4 -4
  14. package/lib/api/test-run-tracker.js +2 -2
  15. package/lib/api/wrap-test-function.js +3 -3
  16. package/lib/assertions/executor.js +4 -4
  17. package/lib/assertions/get-fn.js +3 -3
  18. package/lib/browser/connection/gateway.js +18 -18
  19. package/lib/browser/connection/get-hints.js +8 -8
  20. package/lib/browser/connection/index.js +11 -11
  21. package/lib/browser/connection/remotes-queue.js +4 -4
  22. package/lib/browser/provider/built-in/dedicated/base.js +6 -6
  23. package/lib/browser/provider/built-in/dedicated/chrome/cdp-client/index.js +10 -10
  24. package/lib/browser/provider/built-in/dedicated/chrome/config.js +17 -17
  25. package/lib/browser/provider/built-in/dedicated/chrome/create-temp-profile.js +4 -4
  26. package/lib/browser/provider/built-in/dedicated/chrome/index.js +6 -6
  27. package/lib/browser/provider/built-in/dedicated/chrome/local-chrome.js +6 -6
  28. package/lib/browser/provider/built-in/dedicated/chrome/runtime-info.js +4 -4
  29. package/lib/browser/provider/built-in/dedicated/edge/runtime-info.js +2 -2
  30. package/lib/browser/provider/built-in/dedicated/firefox/config.js +8 -8
  31. package/lib/browser/provider/built-in/dedicated/firefox/create-temp-profile.js +3 -3
  32. package/lib/browser/provider/built-in/dedicated/firefox/index.js +5 -5
  33. package/lib/browser/provider/built-in/dedicated/firefox/local-firefox.js +2 -2
  34. package/lib/browser/provider/built-in/dedicated/firefox/marionette-client/index.js +7 -7
  35. package/lib/browser/provider/built-in/dedicated/firefox/runtime-info.js +3 -3
  36. package/lib/browser/provider/built-in/path.js +2 -2
  37. package/lib/browser/provider/built-in/remote.js +3 -3
  38. package/lib/browser/provider/index.js +5 -5
  39. package/lib/browser/provider/plugin-host.js +5 -6
  40. package/lib/browser/provider/pool.js +4 -4
  41. package/lib/browser/provider/utils/argument-parsing.js +3 -3
  42. package/lib/browser/provider/utils/browser-starter.js +2 -2
  43. package/lib/cli/argument-parser/index.js +52 -41
  44. package/lib/cli/argument-parser/parse-utils.js +2 -2
  45. package/lib/cli/authentication-helper.js +3 -3
  46. package/lib/cli/cli.js +8 -8
  47. package/lib/cli/correct-browsers-and-sources.js +2 -2
  48. package/lib/cli/index.js +2 -2
  49. package/lib/cli/log.js +3 -3
  50. package/lib/cli/remotes-wizard.js +3 -3
  51. package/lib/client/automation/index.js +120 -34
  52. package/lib/client/automation/index.min.js +1 -1
  53. package/lib/client/browser/idle-page/index.js +321 -317
  54. package/lib/client/browser/service-worker.js +244 -290
  55. package/lib/client/core/deps/hammerhead.js +12 -4
  56. package/lib/client/core/index.js +145 -55
  57. package/lib/client/core/index.min.js +1 -1
  58. package/lib/client/core/utils/dom.js +33 -28
  59. package/lib/client/core/utils/position.js +18 -14
  60. package/lib/client/core/utils/style.js +8 -4
  61. package/lib/client/driver/command-executors/client-functions/selector-executor/filter.js +5 -5
  62. package/lib/client/driver/command-executors/client-functions/selector-executor/utils.js +3 -3
  63. package/lib/client/driver/deps/hammerhead.js +12 -4
  64. package/lib/client/driver/deps/testcafe-core.js +12 -4
  65. package/lib/client/driver/deps/testcafe-ui.js +12 -4
  66. package/lib/client/driver/index.js +654 -630
  67. package/lib/client/driver/index.min.js +1 -1
  68. package/lib/client/driver/status.js +2 -2
  69. package/lib/client/ui/index.js +10 -8
  70. package/lib/client/ui/index.min.js +1 -1
  71. package/lib/client-functions/builder-symbol.js +1 -2
  72. package/lib/client-functions/client-function-builder.js +12 -12
  73. package/lib/client-functions/replicator.js +2 -2
  74. package/lib/client-functions/selector-api-execution-mode.js +2 -2
  75. package/lib/client-functions/selectors/add-api.js +48 -48
  76. package/lib/client-functions/selectors/selector-builder.js +17 -17
  77. package/lib/compiler/compile-client-function.js +6 -6
  78. package/lib/compiler/index.js +9 -9
  79. package/lib/compiler/test-file/api-based.js +8 -8
  80. package/lib/compiler/test-file/base.js +6 -6
  81. package/lib/compiler/test-file/exportble-lib-path.js +2 -2
  82. package/lib/compiler/test-file/formats/coffeescript/compiler.js +2 -2
  83. package/lib/compiler/test-file/formats/coffeescript/get-test-list.js +2 -2
  84. package/lib/compiler/test-file/formats/es-next/compiler.js +4 -4
  85. package/lib/compiler/test-file/formats/es-next/get-test-list.js +4 -4
  86. package/lib/compiler/test-file/formats/raw.js +2 -2
  87. package/lib/compiler/test-file/formats/typescript/compiler.js +11 -11
  88. package/lib/compiler/test-file/formats/typescript/get-test-list.js +3 -3
  89. package/lib/compiler/test-file/test-file-parser-base.js +3 -3
  90. package/lib/configuration/configuration-base.js +15 -15
  91. package/lib/configuration/interfaces.js +1 -1
  92. package/lib/configuration/skip-js-errors-option-names.js +11 -0
  93. package/lib/configuration/testcafe-configuration.js +21 -16
  94. package/lib/configuration/types.js +1 -1
  95. package/lib/configuration/typescript-configuration.js +4 -4
  96. package/lib/custom-client-scripts/assert-type.js +2 -2
  97. package/lib/custom-client-scripts/client-script.js +6 -6
  98. package/lib/custom-client-scripts/get-code.js +2 -2
  99. package/lib/custom-client-scripts/routing.js +3 -3
  100. package/lib/custom-client-scripts/utils.js +3 -3
  101. package/lib/dashboard/connector.js +4 -4
  102. package/lib/dashboard/get-default-project-link.js +2 -2
  103. package/lib/dashboard/index.js +26 -26
  104. package/lib/errors/create-stack-filter.js +2 -2
  105. package/lib/errors/error-list.js +2 -2
  106. package/lib/errors/get-callsite.js +2 -2
  107. package/lib/errors/is-internal-stack-frame.js +5 -5
  108. package/lib/errors/process-test-fn-error.js +2 -2
  109. package/lib/errors/runtime/index.js +10 -10
  110. package/lib/errors/runtime/templates.js +5 -2
  111. package/lib/errors/runtime/type-assertions.js +6 -6
  112. package/lib/errors/stack-cleaning-hook.js +2 -2
  113. package/lib/errors/test-run/formattable-adapter.js +7 -7
  114. package/lib/errors/test-run/index.js +25 -5
  115. package/lib/errors/test-run/render-error-template/index.js +6 -6
  116. package/lib/errors/test-run/render-error-template/utils.js +2 -2
  117. package/lib/errors/test-run/templates.js +40 -31
  118. package/lib/errors/test-run/utils.js +7 -7
  119. package/lib/errors/types.js +5 -1
  120. package/lib/index.js +1 -1
  121. package/lib/live/file-watcher/index.js +2 -2
  122. package/lib/live/keyboard-observer.js +3 -3
  123. package/lib/live/test-run-controller.js +3 -3
  124. package/lib/live/test-run.js +3 -2
  125. package/lib/live/test-runner.js +2 -2
  126. package/lib/load-assets.js +2 -2
  127. package/lib/notifications/add-rendered-warning.js +4 -4
  128. package/lib/notifications/debug-logger.js +6 -6
  129. package/lib/notifications/deprecated.js +2 -2
  130. package/lib/notifications/information-message.js +4 -3
  131. package/lib/proxyless/resource-injector.js +4 -4
  132. package/lib/reporter/command/command-formatter.js +4 -4
  133. package/lib/reporter/index.js +10 -10
  134. package/lib/reporter/plugin-host.js +7 -7
  135. package/lib/role/index.js +8 -8
  136. package/lib/role/role.js +2 -2
  137. package/lib/runner/bootstrapper.js +20 -20
  138. package/lib/runner/browser-job.js +3 -3
  139. package/lib/runner/browser-set.js +12 -12
  140. package/lib/runner/fixture-hook-controller.js +5 -5
  141. package/lib/runner/index.js +43 -33
  142. package/lib/runner/task/index.js +10 -6
  143. package/lib/runner/test-run-hook-controller.js +5 -5
  144. package/lib/runner/tested-app.js +7 -7
  145. package/lib/screenshots/capturer.js +17 -17
  146. package/lib/screenshots/crop.js +8 -8
  147. package/lib/screenshots/index.js +6 -10
  148. package/lib/screenshots/utils.js +4 -4
  149. package/lib/services/compiler/host.js +8 -8
  150. package/lib/services/compiler/service.js +13 -13
  151. package/lib/services/compiler/test-run-proxy.js +8 -8
  152. package/lib/services/serialization/replicator/transforms/callsite-record-transform.js +2 -2
  153. package/lib/services/serialization/replicator/transforms/command-base-trasform/command-constructors.js +2 -1
  154. package/lib/services/serialization/replicator/transforms/command-base-trasform/index.js +3 -3
  155. package/lib/services/serialization/replicator/transforms/raw-command-callsite-record-transform.js +2 -2
  156. package/lib/services/serialization/test-structure.js +4 -4
  157. package/lib/services/utils/ipc/interfaces.js +1 -3
  158. package/lib/services/utils/ipc/io.js +3 -3
  159. package/lib/services/utils/ipc/message.js +2 -2
  160. package/lib/services/utils/ipc/proxy.js +4 -4
  161. package/lib/services/utils/ipc/transport.js +2 -2
  162. package/lib/shared/errors/index.js +9 -2
  163. package/lib/shared/errors/selector-error-ctor-callback.js +7 -3
  164. package/lib/test-run/bookmark.js +1 -1
  165. package/lib/test-run/browser-manipulation-queue.js +3 -3
  166. package/lib/test-run/commands/actions.js +66 -46
  167. package/lib/test-run/commands/assertion.js +3 -3
  168. package/lib/test-run/commands/base.js +2 -2
  169. package/lib/test-run/commands/browser-manipulation.js +8 -8
  170. package/lib/test-run/commands/observation.js +4 -4
  171. package/lib/test-run/commands/options.js +27 -12
  172. package/lib/test-run/commands/type.js +2 -1
  173. package/lib/test-run/commands/utils.js +3 -2
  174. package/lib/test-run/commands/validations/argument.js +19 -10
  175. package/lib/test-run/commands/validations/factories.js +10 -2
  176. package/lib/test-run/commands/validations/initializers.js +4 -4
  177. package/lib/test-run/debug-log.js +4 -4
  178. package/lib/test-run/execute-js-expression/index.js +4 -4
  179. package/lib/test-run/index.js +48 -41
  180. package/lib/test-run/request/create-request-options.js +9 -9
  181. package/lib/test-run/request/process-response-data.js +2 -2
  182. package/lib/test-run/request/send.js +5 -5
  183. package/lib/testcafe.js +8 -4
  184. package/lib/utils/check-file-path.js +2 -2
  185. package/lib/utils/check-url.js +2 -2
  186. package/lib/utils/correct-file-path.js +4 -4
  187. package/lib/utils/delegated-api.js +1 -1
  188. package/lib/utils/detect-ffmpeg.js +3 -3
  189. package/lib/utils/diff/colors.js +2 -2
  190. package/lib/utils/diff/index.js +11 -7
  191. package/lib/utils/diff/util.js +5 -5
  192. package/lib/utils/diff.js +4 -4
  193. package/lib/utils/escape-user-agent.js +2 -2
  194. package/lib/utils/execute-fn-with-timeout.js +2 -2
  195. package/lib/utils/get-browser.js +2 -2
  196. package/lib/utils/get-filter-fn.js +4 -4
  197. package/lib/utils/get-options/base.js +2 -2
  198. package/lib/utils/get-options/compiler.js +2 -2
  199. package/lib/utils/get-options/dashboard.js +2 -2
  200. package/lib/utils/get-options/get-assertion-timeout.js +1 -1
  201. package/lib/utils/get-options/index.js +4 -2
  202. package/lib/utils/get-options/meta.js +2 -2
  203. package/lib/utils/get-options/quarantine.js +8 -6
  204. package/lib/utils/get-options/screenshot.js +2 -2
  205. package/lib/utils/get-options/skip-js-errors.js +35 -0
  206. package/lib/utils/get-options/ssl.js +6 -6
  207. package/lib/utils/get-options/video.js +2 -2
  208. package/lib/utils/is-password-input.js +1 -1
  209. package/lib/utils/log-entry.js +2 -2
  210. package/lib/utils/make-reg-exp.js +19 -6
  211. package/lib/utils/moment-loader.js +2 -2
  212. package/lib/utils/parse-file-list.js +7 -7
  213. package/lib/utils/path-pattern.js +4 -4
  214. package/lib/utils/prepare-reporters.js +2 -2
  215. package/lib/utils/prerender-callsite.js +6 -6
  216. package/lib/utils/process.js +7 -7
  217. package/lib/utils/promisified-functions.js +14 -14
  218. package/lib/utils/raw-command-callsite-record.js +2 -2
  219. package/lib/utils/resolve-path-relatively-cwd.js +2 -2
  220. package/lib/utils/string.js +3 -3
  221. package/lib/utils/temp-directory/cleanup-process/index.js +6 -6
  222. package/lib/utils/temp-directory/cleanup-process/worker.js +4 -4
  223. package/lib/utils/temp-directory/index.js +6 -6
  224. package/lib/utils/temp-directory/lockfile.js +2 -2
  225. package/lib/video-recorder/process.js +6 -6
  226. package/lib/video-recorder/recorder.js +9 -9
  227. package/lib/video-recorder/test-run-video-recorder.js +2 -2
  228. package/package.json +8 -7
  229. package/ts-defs/index.d.ts +46 -7
  230. package/ts-defs/selectors.d.ts +39 -0
  231. package/ts-defs/testcafe-scripts.d.ts +39 -0
@@ -1 +1 @@
1
- window["%hammerhead%"].utils.removeInjectedScript(),function Qi(Zi){var es=Zi.document;!function(d,c){var f="default"in d?d.default:d;c=c&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c;var e=f.utils.browser,t={alt:18,ctrl:17,meta:91,shift:16},n={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=","{":"[","}":"]",":":";",'"':"'","|":"\\","<":",",">":".","?":"/","±":"§"},o={backspace:8,capslock:20,delete:46,down:40,end:35,enter:13,esc:27,home:36,ins:45,left:37,pagedown:34,pageup:33,right:39,space:32,tab:9,up:38},r={left:e.isIE?"Left":"ArrowLeft",down:e.isIE?"Down":"ArrowDown",right:e.isIE?"Right":"ArrowRight",up:e.isIE?"Up":"ArrowUp",backspace:"Backspace",capslock:"CapsLock",delete:"Delete",end:"End",enter:"Enter",esc:"Escape",home:"Home",ins:"Insert",pagedown:"PageDown",pageup:"PageUp",space:e.isIE?"Spacebar":" ",tab:"Tab",alt:"Alt",ctrl:"Control",meta:"Meta",shift:"Shift"};function i(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n}var s={modifiers:t,shiftMap:n,specialKeys:o,keyProperty:r,modifiersMap:{option:"alt"},symbolCharCodeToKeyCode:{96:192,91:219,93:221,92:220,59:186,39:222,44:188,45:e.isFirefox?173:189,46:190,47:191},symbolKeysCharCodes:{109:45,173:45,186:59,187:61,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,110:46,96:48,97:49,98:50,99:51,100:52,101:53,102:54,103:55,104:56,105:57,107:43,106:42,111:47},reversedModifiers:i(t),reversedShiftMap:i(n),reversedSpecialKeys:i(o),reversedKeyProperty:i(r)},a=f.Promise,l=f.nativeMethods;function u(t){return new a(function(e){return l.setTimeout.call(Zi,e,t)})}var h=(p.prototype._startListening=function(){var t=this;this._emitter.onRequestSend(function(e){return t._onRequestSend(e)}),this._emitter.onRequestCompleted(function(e){return t._onRequestCompleted(e)}),this._emitter.onRequestError(function(e){return t._onRequestError(e)})},p.prototype._offListening=function(){this._emitter.offAll()},p.prototype._onRequestSend=function(e){this._collectingReqs&&this._requests.add(e)},p.prototype._onRequestCompleted=function(e){var t=this;u(this._delays.additionalRequestsCollection).then(function(){return t._onRequestFinished(e)})},p.prototype._onRequestFinished=function(e){this._requests.has(e)&&(this._requests.delete(e),this._collectingReqs||this._requests.size||!this._watchdog||this._finishWaiting())},p.prototype._onRequestError=function(e){this._onRequestFinished(e)},p.prototype._finishWaiting=function(){this._watchdog&&((0,d.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._requests.clear(),this._offListening(),this._waitResolve()},p.prototype.wait=function(e){var n=this;return u(e?this._delays.pageInitialRequestsCollection:this._delays.requestsCollection).then(function(){return new d.Promise(function(e){var t;n._collectingReqs=!1,n._waitResolve=e,n._requests.size?(t=d.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},p.TIMEOUT)):n._finishWaiting()})})},p.TIMEOUT=3e3,p);function p(e,t){var n,o,r;void 0===t&&(t={}),this._delays={requestsCollection:null!==(n=t.requestsCollection)&&void 0!==n?n:50,additionalRequestsCollection:null!==(o=t.additionalRequestsCollection)&&void 0!==o?o:50,pageInitialRequestsCollection:null!==(r=t.pageInitialRequestsCollection)&&void 0!==r?r:50},this._emitter=e,this._waitResolve=null,this._watchdog=null,this._requests=new Set,this._collectingReqs=!0,this._startListening()}var m=function(e,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function g(e,t){function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function v(e,s,a,l){return new(a=a||c)(function(n,t){function o(e){try{i(l.next(e))}catch(e){t(e)}}function r(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(o,r)}i((l=l.apply(e,s||[])).next())})}function E(n,o){var r,i,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,i=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=o.call(n,a)}catch(e){t=[6,e],i=0}finally{r=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}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]=d.nativeMethods.arrayFilter.call(n,function(e){return e!==t}))},b.prototype.offAll=function(e){e?this._eventsListeners[e]=[]:this._eventsListeners={}},b.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=this._eventsListeners[t];if(o)for(var r=0;r<o.length;r++)try{o[r].apply(this,e)}catch(e){if(!(e.message&&-1<e.message.indexOf("freed script")))throw e;this.off(t,o[r])}},b);function b(){this._eventsListeners={}}var w,_="request-send",S="request-completed",C="request-error",T=(g(M,w=y),M.prototype._addHammerheadListener=function(e,t){f.on(e,t),this._hammerheadListenersInfo.push({evt:e,listener:t})},M.prototype.onRequestSend=function(e){this.on(_,e)},M.prototype.onRequestCompleted=function(e){this.on(S,e)},M.prototype.onRequestError=function(e){this.on(C,e)},M.prototype.offAll=function(){w.prototype.offAll.call(this);for(var e=0,t=this._hammerheadListenersInfo;e<t.length;e++){var n=t[e];f.off.call(f,n.evt,n.listener)}},M);function M(){var n=w.call(this)||this;return n._hammerheadListenersInfo=[],n._addHammerheadListener(f.EVENTS.beforeXhrSend,function(e){var t=e.xhr;return n.emit(_,t)}),n._addHammerheadListener(f.EVENTS.xhrCompleted,function(e){var t=e.xhr;return n.emit(S,t)}),n._addHammerheadListener(f.EVENTS.xhrError,function(e){var t=e.xhr;return n.emit(C,t)}),n._addHammerheadListener(f.EVENTS.fetchSent,function(e){n.emit(_,e),e.then(function(){return n.emit(S,e)},function(){return n.emit(C,e)})}),n}var x=(P.prototype._startListening=function(){var t=this;this._emitter.onScriptAdded(function(e){return t._onScriptElementAdded(e)}),this._emitter.onScriptLoadedOrFailed(function(e){return t._onScriptLoadedOrFailed(e)})},P.prototype._offListening=function(){this._emitter.offAll()},P.prototype._onScriptElementAdded=function(e){var t=this,n=(0,d.nativeMethods.setTimeout)(function(){return t._onScriptLoadedOrFailed(e,!0)},P.LOADING_TIMEOUT);this._scripts.set(e,n)},P.prototype._onScriptLoadedOrFailed=function(e,t){var n=this;void 0===t&&(t=!1),this._scripts.has(e)&&(t||(0,d.nativeMethods.clearTimeout)(this._scripts.get(e)),this._scripts.delete(e),this._scripts.size||u(25).then(function(){n._waitResolve&&!n._scripts.size&&n._finishWaiting()}))},P.prototype._finishWaiting=function(){this._watchdog&&((0,d.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._scripts.clear(),this._offListening(),this._waitResolve(),this._waitResolve=null},P.prototype.wait=function(){var n=this;return new d.Promise(function(e){var t;n._waitResolve=e,n._scripts.size?(t=d.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},P.TIMEOUT)):n._finishWaiting()})},P.TIMEOUT=3e3,P.LOADING_TIMEOUT=2e3,P);function P(e){this._emitter=e,this._watchdog=null,this._waitResolve=null,this._scripts=new Map,this._startListening()}var I,N=f.nativeMethods,R="script-added",O="script-loaded-or-failed",A=(g(L,I=y),L.prototype._onScriptElementAdded=function(e){var t,n=this,o=N.scriptSrcGetter.call(e);void 0!==o&&""!==o&&(this.emit(R,e),t=function(){N.removeEventListener.call(e,"load",t),N.removeEventListener.call(e,"error",t),n.emit(O,e)},N.addEventListener.call(e,"load",t),N.addEventListener.call(e,"error",t))},L.prototype.onScriptAdded=function(e){this.on(R,e)},L.prototype.onScriptLoadedOrFailed=function(e){this.on(O,e)},L.prototype.offAll=function(){I.prototype.offAll.call(this),f.off(f.EVENTS.scriptElementAdded,this._onScriptElementAdded)},L);function L(){var n=I.call(this)||this;return n._scriptElementAddedListener=function(e){var t=e.el;return n._onScriptElementAdded(t)},f.on(f.EVENTS.scriptElementAdded,n._scriptElementAddedListener),n}function V(e){var t="array"+e.charAt(0).toUpperCase()+e.slice(1),n=d.nativeMethods[t];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.call.apply(n,e)}}var F=V("filter"),k=V("map"),D=V("slice"),W=V("splice"),q=V("unshift"),H=V("forEach"),G=V("indexOf"),U=V("some"),B=V("reverse"),j=V("reduce"),z=V("concat"),Y=V("join");function K(e,t){if(d.nativeMethods.arrayFind)return d.nativeMethods.arrayFind.call(e,t);for(var n=e.length,o=0;o<n;o++)if(t(e[o],o,e))return e[o];return null}var X=Object.freeze({__proto__:null,filter:F,map:k,slice:D,splice:W,unshift:q,forEach:H,indexOf:G,some:U,reverse:B,reduce:j,concat:z,join:Y,isArray:function(e){return"[object Array]"===d.nativeMethods.objectToString.call(e)},from:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(d.nativeMethods.arrayFrom)return d.nativeMethods.arrayFrom.apply(d.nativeMethods,function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var o=Array(e),r=0,t=0;t<n;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,r++)o[r]=i[s];return o}([e],t));for(var o=[],r=e.length,i=0;i<r;i++)o.push(e[i]);return o},find:K,remove:function(e,t){var n=d.nativeMethods.arrayIndexOf.call(e,t);-1<n&&d.nativeMethods.arraySplice.call(e,n,1)},equals:function(e,t){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!1;return!0},getCommonElement:function(e,t){for(var n=0;n<e.length;n++)for(var o=0;o<t.length;o++)if(e[n]===t[o])return e[n];return null}}),J=f.utils.browser,$=f.nativeMethods,Q=f.utils.style.get,Z=f.utils.dom.getActiveElement,ee=f.utils.dom.findDocument,te=f.utils.dom.find,ne=f.utils.dom.isElementInDocument,oe=f.utils.dom.isElementInIframe,re=f.utils.dom.getIframeByElement,ie=f.utils.dom.isCrossDomainWindows,se=f.utils.dom.getSelectParent,ae=f.utils.dom.getChildVisibleIndex,le=f.utils.dom.getSelectVisibleChildren,ue=f.utils.dom.isElementNode,ce=f.utils.dom.isTextNode,de=f.utils.dom.isRenderedNode,fe=f.utils.dom.isIframeElement,he=f.utils.dom.isInputElement,pe=f.utils.dom.isButtonElement,me=f.utils.dom.isFileInput,ge=f.utils.dom.isTextAreaElement,ve=f.utils.dom.isAnchorElement,Ee=f.utils.dom.isImgElement,ye=f.utils.dom.isFormElement,be=f.utils.dom.isLabelElement,we=f.utils.dom.isSelectElement,_e=f.utils.dom.isRadioButtonElement,Se=f.utils.dom.isColorInputElement,Ce=f.utils.dom.isCheckboxElement,Te=f.utils.dom.isOptionElement,Me=f.utils.dom.isSVGElement,xe=f.utils.dom.isMapElement,Pe=f.utils.dom.isBodyElement,Ie=f.utils.dom.isHtmlElement,Ne=f.utils.dom.isDocument,Re=f.utils.dom.isWindow,Oe=f.utils.dom.isTextEditableInput,Ae=f.utils.dom.isTextEditableElement,Le=f.utils.dom.isTextEditableElementAndEditingAllowed,Ve=f.utils.dom.isContentEditableElement,Fe=f.utils.dom.isDomElement,ke=f.utils.dom.isShadowUIElement,De=f.utils.dom.isShadowRoot,We=f.utils.dom.isElementFocusable,qe=f.utils.dom.isHammerheadAttr,He=f.utils.dom.isElementReadOnly,Ge=f.utils.dom.getScrollbarSize,Ue=f.utils.dom.getMapContainer,Be=f.utils.dom.getTagName,je=f.utils.dom.closest,ze=f.utils.dom.getParents,Ye=f.utils.dom.findParent,Ke=f.utils.dom.getTopSameDomainWindow,Xe=f.utils.dom.getParentExceptShadowRoot;function Je(e,t){var n,o={el:n=e,skip:n.shadowRoot&&n.tabIndex<0,children:{}};if(e=e.shadowRoot||e,fe(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"===Q(e[n],"display")&&t.push(e[n]);return t}(n),r=/^(input|button|select|textarea)$/,i=[],s=null,a=null,l=null,u=!1,c=0;c<n.length;c++){s=n[c],a=Be(s),l=$e(s),u=!1,function(e,t,n){var o=null;return t.nodeType===Node.DOCUMENT_NODE&&(o=$.documentActiveElementGetter.call(t)),e===o||!(e.disabled||"none"===Q(e,"display")||"hidden"===Q(e,"visibility")||(J.isIE||J.isAndroid)&&Te(e)||null!==n&&n<0)}(s,e,l)&&(r.test(a)||s.shadowRoot||fe(s)?u=!0:ve(s)&&s.hasAttribute("href")&&(u=""!==s.getAttribute("href")||!J.isIE||null!==l),""!==(t=s.getAttribute("contenteditable"))&&"true"!==t||(u=!0),null!==l&&(u=!0),u&&i.push(s))}return F(i,function(e){return!Qe(o,e)})}(e);r<i.length;r++){var s=i[r],a=!t||s.tabIndex<=0?-1:s.tabIndex;o.children[a]=o.children[a]||[],o.children[a].push(Je(s,t))}return o}function $e(e){var t=$.getAttribute.call(e,"tabindex");return null!==t&&(t=parseInt(t,10),t=isNaN(t)?null:t),t}function Qe(e,t){return e.contains?e.contains(t):U(e,function(e){return e.contains(t)})}function Ze(e,t){if(et(t,e))return!0;for(var n=$.nodeChildNodesGetter.call(e),o=rt(n),r=0;r<o;r++){var i=n[r];if(!ke(i)&&Ze(i,t))return!0}return!1}function et(e,t){return e&&t&&e.isSameNode?e.isSameNode(t):e===t}function tt(t){if(!t.setTimeout)return!1;var e=null;try{e=t.frameElement}catch(e){return!!t.top}return!(!J.isFirefox&&!J.isWebKit||t.top===t||e)||!(!e||!$.contentDocumentGetter.call(e))}function nt(e){try{return e.top===e}catch(e){return!1}}function ot(e){var t=[];te(es,"*",function(e){"IFRAME"===e.tagName&&t.push(e),e.shadowRoot&&te(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 rt(e){return $.nodeListLengthGetter.call(e)}function it(e){return $.inputValueGetter.call(e)}function st(e){return $.textAreaValueGetter.call(e)}function at(e,t){return $.inputValueSetter.call(e,t)}function lt(e,t){return $.textAreaValueSetter.call(e,t)}function ut(e){return he(e)?it(e):ge(e)?st(e):e.value}function ct(e){return e&&e.getRootNode&&ee(e)!==e.getRootNode()}var dt=Object.freeze({__proto__:null,getActiveElement:Z,findDocument:ee,find:te,isElementInDocument:ne,isElementInIframe:oe,getIframeByElement:re,isCrossDomainWindows:ie,getSelectParent:se,getChildVisibleIndex:ae,getSelectVisibleChildren:le,isElementNode:ue,isTextNode:ce,isRenderedNode:de,isIframeElement:fe,isInputElement:he,isButtonElement:pe,isFileInput:me,isTextAreaElement:ge,isAnchorElement:ve,isImgElement:Ee,isFormElement:ye,isLabelElement:be,isSelectElement:we,isRadioButtonElement:_e,isColorInputElement:Se,isCheckboxElement:Ce,isOptionElement:Te,isSVGElement:Me,isMapElement:xe,isBodyElement:Pe,isHtmlElement:Ie,isDocument:Ne,isWindow:Re,isTextEditableInput:Oe,isTextEditableElement:Ae,isTextEditableElementAndEditingAllowed:Le,isContentEditableElement:Ve,isDomElement:Fe,isShadowUIElement:ke,isShadowRoot:De,isElementFocusable:We,isHammerheadAttr:qe,isElementReadOnly:He,getScrollbarSize:Ge,getMapContainer:Ue,getTagName:Be,closest:je,getParents:ze,findParent:Ye,getTopSameDomainWindow:Ke,getParentExceptShadowRoot:Xe,getFocusableElements:function(e,t){return void 0===t&&(t=!1),function e(t){var n,o=[];for(n in t.skip||t.el.nodeType===Node.DOCUMENT_NODE||fe(t.el)||o.push(t.el),t.children)for(var r=0,i=t.children[n];r<i.length;r++){var s=i[r];o.push.apply(o,e(s))}return o}(Je(e,t))},getTabIndexAttributeIntValue:$e,containsElement:Qe,getTextareaIndentInLine:function(e,t){var n=st(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=st(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=st(e).split("\n"),r=0,i=0;i<t;i++)r+=o[i].length+1;return r+n},blocksImplicitSubmission:function(e){return(J.isSafari?/^(text|password|color|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:J.isFirefox?/^(text|password|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:J.isIE?/^(text|password|color|date|time|datetime|datetime-local|email|file|month|number|search|tel|url|week|image)$/i:/^(text|password|datetime|email|number|search|tel|url|image)$/i).test(e.type)},isEditableElement:function(e,t){return t?Le(e)||Ve(e):Ae(e)||Ve(e)},isElementContainsNode:Ze,isOptionGroupElement:function(e){return"[object HTMLOptGroupElement]"===f.utils.dom.instanceToString(e)},getElementIndexInParent:function(e,t){var n=e.querySelectorAll(Be(t));return G(n,t)},isTheSameNode:et,getElementDescription:function(e){var t,n,o={id:"id",name:"name",class:"className"},r=[];for(t in r.push("<"),r.push(Be(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(We(t[n]))return t[n];return null},remove:function(e){e&&e.parentElement&&e.parentElement.removeChild(e)},isIFrameWindowInDOM:tt,isTopWindow:nt,findIframeByWindow:ot,isEditableFormElement:function(e){return Ae(e)||we(e)},getCommonAncestor:function(e,t){if(et(e,t))return e;for(var n=[e].concat(ze(e)),o=t;o;){if(-1<G(n,o))return o;o=$.nodeParentNodeGetter.call(o)}return o},getChildrenLength:function(e){return $.htmlCollectionLengthGetter.call(e)},getChildNodesLength:rt,getInputValue:it,getTextAreaValue:st,setInputValue:at,setTextAreaValue:lt,getElementValue:ut,setElementValue:function(e,t){return he(e)?at(e,t):ge(e)?lt(e,t):e.value=t},isShadowElement:ct,contains:function(t,e){return!(!t||!e)&&(t.contains?t.contains(e):!!Ye(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===es.documentElement}}),ft=f.Promise,ht=f.nativeMethods,pt=f.eventSandbox.listeners,mt=f.utils.browser,gt=f.utils.event.BUTTON,vt=f.utils.event.BUTTONS_PARAMETER,Et=f.utils.event.DOM_EVENTS,yt=f.utils.event.WHICH_PARAMETER,bt=f.utils.event.preventDefault;function wt(e,t,n,o){mt.isIE11&&Re(e)?ht.windowAddEventListener.call(e,t,n,o):ht.addEventListener.call(e,t,n,o)}function _t(e,t,n,o){mt.isIE11&&Re(e)?ht.windowRemoveEventListener.call(e,t,n,o):ht.removeEventListener.call(e,t,n,o)}function St(){var n=[],e=!1;function t(){e||(es.body?(e=!0,n.forEach(function(e){return e()})):ht.setTimeout.call(Zi,t,1))}function o(){(tt(Zi)||nt(Zi))&&(_t(es,"DOMContentLoaded",o),t())}return"complete"===es.readyState?ht.setTimeout.call(Zi,o,1):wt(es,"DOMContentLoaded",o),{then:function(e){return t=e,new ft(function(e){return n.push(function(){return e(t())})});var t}}}var Ct,Tt,Mt=Object.freeze({__proto__:null,BUTTON:gt,BUTTONS_PARAMETER:vt,DOM_EVENTS:Et,WHICH_PARAMETER:yt,preventDefault:bt,bind:wt,unbind:_t,documentReady:function(e){return void 0===e&&(e=0),St().then(function(){return pt.getEventListeners(Zi,"load").length?ft.race([new ft(function(e){return wt(Zi,"load",e)}),u(e)]):null})}});(Tt=Ct=Ct||{}).ready="ready",Tt.readyForBrowserManipulation="ready-for-browser-manipulation",Tt.waitForFileDownload="wait-for-file-download";var xt=Ct,Pt=f.Promise,It=f.utils.browser,Nt=f.nativeMethods,Rt=f.transport,Ot=30,At=500,Lt=!1,Vt=null,Ft=!1;function kt(){if(It.isIE)return function(e){Wt&&Nt.clearTimeout.call(Zi,Wt),Dt=!0,Wt=Nt.setTimeout.call(Zi,function(){Wt=null,Dt=!1,qt.forEach(function(e){return e()}),qt=[]},e)}(Ot),void u(0).then(function(){var e;"loading"===es.readyState&&((e=Nt.documentActiveElementGetter.call(es))&&ve(e)&&e.hasAttribute("download")||(Lt=!0))});Lt=!0}var Dt=!1,Wt=null,qt=[],Ht=Object.freeze({__proto__:null,init:function(){f.on(f.EVENTS.beforeUnload,kt),wt(Zi,"unload",function(){Lt=!0})},watchForPageNavigationTriggers:function(){Vt=function(){Ft=!0},f.on(f.EVENTS.pageNavigationTriggered,Vt)},wait:function(e){void 0===e&&(e=!Vt||Ft?400:0),Vt&&(f.off(f.EVENTS.pageNavigationTriggered,Vt),Vt=null);var t=u(e).then(function(){return Lt?u(At).then(function(){return Rt.queuedAsyncServiceMsg({cmd:xt.waitForFileDownload})}).then(function(e){if(!e)return new Pt(function(){})}).then(function(){Lt=!1}):Dt?new Pt(function(e){return qt.push(e)}):void 0}),n=u(15e3).then(function(){Lt=!1});return Pt.race([t,n])}}),Gt=y,Ut=Object.freeze({__proto__:null,EventEmitter:Gt,inherit:function(e,t){function n(){}n.prototype=t.prototype,f.utils.extend(e.prototype,new n),(e.prototype.constructor=e).base=t.prototype}}),Bt=d.eventSandbox.listeners;function jt(){this.initialized=!1,this.stopPropagationFlag=!1,this.events=new Gt}var zt=(jt.prototype._internalListener=function(e,t,n,o,r){this.events.emit("scroll",e),this.stopPropagationFlag&&(o(),r())},jt.prototype.init=function(){var n=this;this.initialized||(this.initialized=!0,Bt.initElementListening(Zi,["scroll"]),Bt.addFirstInternalEventBeforeListener(Zi,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n._internalListener.apply(n,e)}))},jt.prototype.waitForScroll=function(e){var t=this,n=null,o=new d.Promise(function(e){n=e});return o.cancel=function(){return t.events.off("scroll",n)},this.initialized?this.handleScrollEvents(e,n):n(),o},jt.prototype.handleScrollEvents=function(n,e){var o=this;this.events.once("scroll",e),ct(n)&&(Bt.initElementListening(n,["scroll"]),Bt.addFirstInternalEventBeforeListener(n,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o._internalListener.apply(o,e),Bt.cancelElementListening(n)}))},jt.prototype.stopPropagation=function(){this.stopPropagationFlag=!0},jt.prototype.enablePropagation=function(){this.stopPropagationFlag=!1},new jt),Yt=(Kt.create=function(e){return new Kt(e.top,e.right,e.bottom,e.left)},Kt.prototype.add=function(e){return this.top+=e.top,this.right+=e.right,this.bottom+=e.bottom,this.left+=e.left,this},Kt.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},Kt.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},Kt.prototype.contains=function(e){return e.x>=this.left&&e.x<=this.right&&e.y>=this.top&&e.y<=this.bottom},Kt);function Kt(e,t,n,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===o&&(o=0),this.top=e,this.right=t,this.bottom=n,this.left=o}var Xt=f.utils.style,Jt=f.utils.style.getBordersWidth,$t=f.utils.style.getComputedStyle,Qt=f.utils.style.getElementMargin,Zt=f.utils.style.getElementPadding,en=f.utils.style.getElementScroll,tn=f.utils.style.getOptionHeight,nn=f.utils.style.getSelectElementSize,on=f.utils.style.isElementVisible,rn=f.utils.style.isVisibleChild,sn=f.utils.style.getWidth,an=f.utils.style.getHeight,ln=f.utils.style.getInnerWidth,un=f.utils.style.getInnerHeight,cn=f.utils.style.getScrollLeft,dn=f.utils.style.getScrollTop,fn=f.utils.style.setScrollLeft,hn=f.utils.style.setScrollTop,pn=f.utils.style.get;function mn(e,t,n){return e<t?n:e<n?t:Math.max(n,t)}function gn(e){return!de(e)||!!Ye(e,!0,function(e){return ue(e)&&"none"===Xt.get(e,"display")})||!!Ye(e,!0,function(e){return ue(e)&&"hidden"===Xt.get(e,"visibility")})}function vn(e){return e&&!(e.offsetHeight<=0&&e.offsetWidth<=0)}function En(e){return ue(e)&&"fixed"===Xt.get(e,"position")}var yn=Object.freeze({__proto__:null,getBordersWidth:Jt,getComputedStyle:$t,getElementMargin:Qt,getElementPadding:Zt,getElementScroll:en,getOptionHeight:tn,getSelectElementSize:nn,isElementVisible:on,isSelectVisibleChild:rn,getWidth:sn,getHeight:an,getInnerWidth:ln,getInnerHeight:un,getScrollLeft:cn,getScrollTop:dn,setScrollLeft:fn,setScrollTop:hn,get:pn,set:function(e,t,n){for(var o in"string"==typeof t&&Xt.set(e,t,n),t)t.hasOwnProperty(o)&&Xt.set(e,o,t[o])},getViewportDimensions:function(){return{width:mn(Zi.innerWidth,es.documentElement.clientWidth,es.body.clientWidth),height:mn(Zi.innerHeight,es.documentElement.clientHeight,es.body.clientHeight)}},getWindowDimensions:function(e){return new Yt(0,sn(e),an(e),0)},isNotVisibleNode:gn,hasDimensions:vn,isFixedElement:En}),bn=d.utils.browser,wn=d.eventSandbox.listeners,_n=d.eventSandbox.eventSimulator,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"],Cn=123;function Tn(e,t,n,o,r){var i,s=d.nativeMethods.eventTargetGetter.call(e)||e.srcElement;if(!t&&!ke(s)){if(/^key/.test(e.type)&&((i=e).shiftKey&&i.ctrlKey||(i.altKey||i.metaKey)&&bn.isMacPlatform||i.keyCode===Cn))return void r();if("blur"===e.type)if(bn.isIE&&bn.version<12){var a,l=Re(s),u=!l&&"none"===pn(s,"display"),c=!1;l||u||(a=ze(s),c=F(a,function(e){return"none"===pn(e,"display")})),(u||c.length)&&d.eventSandbox.timers.deferFunction(function(){_n.blur(s)})}else if(s!==Zi&&s!==Zi.document&&!vn(s))return;n()}}var Mn=(xn.create=function(e){return"left"in e?new xn(e.left,e.top):"right"in e?new xn(e.right,e.bottom):new xn(e.x,e.y)},xn.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},xn.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},xn.prototype.round=function(e){return void 0===e&&(e=Math.round),this.x=e(this.x),this.y=e(this.y),this},xn.prototype.eql=function(e){return this.x===e.x&&this.y===e.y},xn.prototype.mul=function(e){return this.x*=e,this.y*=e,this},xn.prototype.distance=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},xn);function xn(e,t){this.x=e,this.y=t}var Pn=/auto|scroll|hidden/i,In="visible";function Nn(e){var t,n=pn(e,"overflowX"),o=pn(e,"overflowY"),r=Pn.test(n),i=Pn.test(o),s=ee(e).documentElement,a=e.scrollHeight;return(d.utils.browser.isChrome||d.utils.browser.isFirefox||d.utils.browser.isSafari)&&(t=e.getBoundingClientRect().top,a=a-s.getBoundingClientRect().top+t),(r||i)&&a>s.scrollHeight}function Rn(e){if(Pe(e))return Nn(e);if(Ie(e))return function(e){var t=pn(e,"overflowX"),n=pn(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 s=Math.min(e.clientWidth,i.clientWidth),a=Math.min(e.clientHeight,i.clientHeight);return i.scrollHeight>a||i.scrollWidth>s}(e);var t,n,o,r,i,s=(n=pn(t=e,"overflowX"),o=pn(t,"overflowY"),r=Pn.test(n),i=Pn.test(o),d.utils.browser.isIE&&(r=r||i&&n===In,i=i||r&&o===In),new Mn(r,i));if(!s.x&&!s.y)return!1;var a=s.y&&e.scrollHeight>e.clientHeight;return s.x&&e.scrollWidth>e.clientWidth||a}function On(e){var t,n,o=ze(e);return!oe(e)||(t=re(e))&&(n=ze(t),o.concat(n)),d.nativeMethods.arrayFilter.call(o,Rn)}var An=Object.freeze({__proto__:null,hasScroll:Rn,getScrollableParents:On}),Ln=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},Vn=f.utils.position.getElementRectangle,Fn=f.utils.position.getOffsetPosition,kn=f.utils.position.offsetToClientCoords;function Dn(e){var t,n,o,r,i=Ie(e),s=i?e.getElementsByTagName("body")[0]:null,a=e.getBoundingClientRect(),l=Yt.create(Jt(e)),u=en(e),c=oe(e),d="BackCompat"===e.ownerDocument.compatMode,f=i?new Mn(0,0):Mn.create(a),h=a.height,p=a.width;i&&(p=s&&d?(h=s.clientHeight,s.clientWidth):(h=e.clientHeight,e.clientWidth)),!c||(t=re(e))&&(n=Fn(t),o=kn(Mn.create(n)),r=Jt(t),f.add(o).add(Mn.create(r)),i&&l.add(r));var m=!i&&ln(e)!==e.clientWidth,g=!i&&un(e)!==e.clientHeight,v={right:m?Ge():0,bottom:g?Ge():0};return new Ln(p,h,f,l,u,v)}function Wn(e){var t=e.x,n=e.y,o=es.getElementFromPoint||es.elementFromPoint,r=null;try{r=o.call(es,t,n)}catch(e){return null}for(null===r&&(r=o.call(es,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 qn(e,t){return Yt.create({top:e.top-t.top,left:e.left-t.left,right:t.right-e.right,bottom:t.bottom-e.bottom}).sub(t.border).sub(t.scrollbar).round(Math.ceil,Math.floor)}function Hn(e){var t=/^touch/.test(e.type)&&e.targetTouches?e.targetTouches[0]||e.changedTouches[0]:e,n=0===t.pageX&&0===t.pageY,o=0!==t.clientX||0!==t.clientY;if((null===t.pageX||n&&o)&&null!==t.clientX){var r=ee(e.target||e.srcElement),i=r.documentElement,s=r.body;return new Mn(Math.round(t.clientX+(i&&i.scrollLeft||s&&s.scrollLeft||0)-(i.clientLeft||0)),Math.round(t.clientY+(i&&i.scrollTop||s&&s.scrollTop||0)-(i.clientTop||0)))}return new Mn(Math.round(t.pageX),Math.round(t.pageY))}function Gn(e){return"hidden"===pn(e,"visibility")||"none"===pn(e,"display")}function Un(e){var t=Vn(e);return 0===t.width||0===t.height}var Bn=Object.freeze({__proto__:null,getElementRectangle:Vn,getOffsetPosition:Fn,offsetToClientCoords:kn,getClientDimensions:Dn,getElementFromPoint:Wn,calcRelativePosition:qn,getIframeClientCoordinates:function(e){var t=Fn(e),n=t.left,o=t.top,r=kn({x:n,y:o}),i=Jt(e),s=Zt(e),a=r.x+i.left+s.left,l=r.y+i.top+s.top;return new Yt(l,a+sn(e),l+an(e),a)},containsOffset:function(e,t,n){var o=Dn(e),r=Math.max(e.scrollWidth,o.width),i=Math.max(e.scrollHeight,o.height),s=o.scrollbar.right+o.border.left+o.border.right+r,a=o.scrollbar.bottom+o.border.top+o.border.bottom+i;return(void 0===t||0<=t&&t<=s)&&(void 0===n||0<=n&&n<=a)},getEventAbsoluteCoordinates:function(e){var t,n,o,r=e.target||e.srcElement,i=Hn(e),s=ee(r),a=0,l=0;return!oe(s.documentElement)||(t=re(s))&&(n=Fn(t),o=Jt(t),a=n.left+o.left,l=n.top+o.top),new Mn(i.x+a,i.y+l)},getEventPageCoordinates:Hn,getIframePointRelativeToParentFrame:function(e,t){var n=ot(t),o=Fn(n),r=Jt(n),i=Zt(n);return kn({x:e.x+o.left+r.left+i.left,y:e.y+o.top+r.top+i.top})},findCenter:function(e){var t=Vn(e);return new Mn(Math.round(t.left+t.width/2),Math.round(t.top+t.height/2))},getClientPosition:function(e){var t=Fn(e),n=t.left,o=t.top,r=kn({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=Zi.screenLeft||Zi.screenX,t=Zi.screenTop||Zi.screenY;return new Mn(e,t)},isIframeVisible:function(e){return!Gn(e)},isElementVisible:function e(t){if(ce(t))return!gn(t);if(!Ve(t)&&!Me(t)&&Un(t))return!1;if(xe(t)){var n=Ue(je(t,"map"));return!!n&&e(n)}if(rn(t)){var o=se(t),r=ae(o,t),i=nn(o),s=Math.max(dn(o)/tn(o),0),a=s+i-1,l=Math.max(r-s,0);return s<=l&&l<=a}return Me(t)?!Ye(t,!0,Gn)&&!Un(t):vn(t)&&!Gn(t)}});function jn(n,o){return v(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<n?[4,o(t)]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}var zn=Object.freeze({__proto__:null,whilst:function(t,n){return v(this,void 0,void 0,function(){return E(this,function(e){switch(e.label){case 0:return t()?[4,n()]:[3,2];case 1:return e.sent(),[3,0];case 2:return[2]}})})},times:jn,each:function(r,i){return v(this,void 0,void 0,function(){var t,n,o;return E(this,function(e){switch(e.label){case 0:t=0,n=r,e.label=1;case 1:return t<n.length?(o=n[t],[4,i(o)]):[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}}),Yn=f.Promise,Kn=f.eventSandbox.message;function Xn(e,o,t){return new Yn(function(n){Kn.on(Kn.SERVICE_MSG_RECEIVED_EVENT,function e(t){t.message.cmd===o&&(Kn.off(Kn.SERVICE_MSG_RECEIVED_EVENT,e),n(t.message))}),Kn.sendServiceMsg(e,t)})}var Jn=($n._isScrollValuesChanged=function(e,t){return cn(e)!==t.left||dn(e)!==t.top},$n.prototype._setScroll=function(e,t){var n=this,o=t.left,r=t.top,i=Ie(e)?ee(e):e,s={left:cn(i),top:dn(i)},o=Math.max(o,0),r=Math.max(r,0),a=zt.waitForScroll(i);return fn(i,o),hn(i,r),$n._isScrollValuesChanged(i,s)?a=a.then(function(){n._scrollWasPerformed||(n._scrollWasPerformed=$n._isScrollValuesChanged(i,s))}):(a.cancel(),d.Promise.resolve())},$n.prototype._getScrollToPoint=function(e,t,n){var o=Math.floor(e.width/2),r=Math.floor(e.height/2),i=this._scrollToCenter?o:Math.min(n.left,o),s=this._scrollToCenter?r:Math.min(n.top,r),a=e.scroll,l=a.left,u=a.top,c=t.x>=l+e.width-i,d=t.x<=l+i,f=t.y>=u+e.height-s,h=t.y<=u+s;return c?l=t.x-e.width+i:d&&(l=t.x-i),f?u=t.y-e.height+s:h&&(u=t.y-s),{left:l,top:u}},$n.prototype._getScrollToFullChildView=function(e,t,n){var o,r,i,s,a={left:null,top:null},l=e.width>=t.width,u=e.height>=t.height,c=qn(t,e);return l&&(o=e.width-t.width,r=Math.min(n.left,o),this._scrollToCenter&&(r=o/2),c.left<r?a.left=Math.round(e.scroll.left+c.left-r):c.right<r&&(a.left=Math.round(e.scroll.left+Math.min(c.left,-c.right)+r))),u&&(i=e.height-t.height,s=Math.min(n.top,i),this._scrollToCenter&&(s=i/2),c.top<s?a.top=Math.round(e.scroll.top+c.top-s):c.bottom<s&&(a.top=Math.round(e.scroll.top+Math.min(c.top,-c.bottom)+s))),a},$n._getChildPoint=function(e,t,n){return Mn.create(t).sub(Mn.create(e)).add(Mn.create(e.scroll)).add(Mn.create(t.border)).add(n)},$n.prototype._getScrollPosition=function(e,t,n,o){var r=$n._getChildPoint(e,t,n),i=this._getScrollToPoint(e,r,o),s=this._getScrollToFullChildView(e,t,o);return{left:Math.max(null===s.left?i.left:s.left,0),top:Math.max(null===s.top?i.top:s.top,0)}},$n._getChildPointAfterScroll=function(e,t,n,o){return Mn.create(t).add(Mn.create(e.scroll)).sub(Mn.create(n)).add(o)},$n.prototype._isChildFullyVisible=function(e,t,n){var o=$n._getChildPointAfterScroll(e,t,e.scroll,n),r=this._getScrollPosition(e,t,n,{left:0,top:0}),i=r.left,s=r.top;return!this._isTargetElementObscuredInPoint(o)&&i===e.scroll.left&&s===e.scroll.top},$n.prototype._scrollToChild=function(e,t,n){for(var o=Dn(e),r=Dn(t),i=ln(Zi),s=un(Zi),a=o.scroll,l=!this._isChildFullyVisible(o,r,n);l;){a=this._getScrollPosition(o,r,n,this._maxScrollMargin);var u=$n._getChildPointAfterScroll(o,r,a,n),c=this._isTargetElementObscuredInPoint(u);this._maxScrollMargin.left+=20,this._maxScrollMargin.left>=i&&(this._maxScrollMargin.left=50,this._maxScrollMargin.top+=20),l=c&&this._maxScrollMargin.top<s}return this._maxScrollMargin={left:50,top:50},this._setScroll(e,a)},$n.prototype._scrollElement=function(){if(!Rn(this._element))return d.Promise.resolve();var e=Dn(this._element),t=this._getScrollToPoint(e,this._offsets,this._maxScrollMargin);return this._setScroll(this._element,t)},$n.prototype._scrollParents=function(){var t,n,o=this,r=On(this._element),i=this._element,e=cn(i),s=dn(i),a=Mn.create(this._offsets).sub(new Mn(e,s).round()),l=jn(r.length,function(e){return o._scrollToChild(r[e],i,a).then(function(){t=Dn(i),n=Dn(r[e]),a.add(Mn.create(t)).sub(Mn.create(n)).add(Mn.create(n.border)),i=r[e]})}),u={scrollWasPerformed:this._scrollWasPerformed,offsetX:a.x,offsetY:a.y,maxScrollMargin:this._maxScrollMargin};return l.then(function(){var e;if(!o._skipParentFrames&&(e=Zi).top!==e)return u.cmd=$n.SCROLL_REQUEST_CMD,Xn(u,$n.SCROLL_RESPONSE_CMD,Zi.parent)}).then(function(){return o._scrollWasPerformed})},$n._getFixedAncestorOrSelf=function(e){return Ye(e,!0,En)},$n.prototype._isTargetElementObscuredInPoint=function(e){var t=Wn(e);if(!t)return!1;var n=$n._getFixedAncestorOrSelf(t);return!!n&&!n.contains(this._element)},$n.prototype.run=function(){var e=this;return this._scrollElement().then(function(){return e._scrollParents()})},$n.SCROLL_REQUEST_CMD="automation|scroll|request",$n.SCROLL_RESPONSE_CMD="automation|scroll|response",$n);function $n(e,t,n){this._element=e,this._offsets=new Mn(t.offsetX,t.offsetY),this._scrollToCenter=!!t.scrollToCenter,this._skipParentFrames=!!t.skipParentFrames,this._maxScrollMargin=n||{left:50,top:50},this._scrollWasPerformed=!1}function Qn(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return!rt(t)&&ho(e)?e:K(t,ho)}function Zn(e){return K(d.nativeMethods.nodeChildNodesGetter.call(e),function(e){return ho(e)||!po(e)&&Zn(e)})}function eo(e){return ce(e)||ue(e)&&on(e)}function to(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return F(t,eo)}function no(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return U(t,eo)}function oo(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return U(t,function(e){return So(e,!0)})}function ro(e,t){var n,o;if(!ke(e)&&!ke(t)){var r=d.nativeMethods.nodeChildNodesGetter.call(t);return!et(t,e)&&rt(r)&&/div|p/.test(Be(t))&&(n=Zn(e))&&!et(t,n)&&(o=ao(n))&&!et(t,o)&&Qn(t)}}function io(e,t){var n,o,r,i=de(t);if(!ke(e)&&!ke(t)){var s=d.nativeMethods.nodeChildNodesGetter.call(t);if(!et(t,e)&&(i&&ue(t)&&rt(s)&&!/div|p/.test(Be(t))||ho(t)&&!et(t,e)&&t.nodeValue.length)){if(i&&ue(t)){if(!(n=Zn(e))||et(t,n))return;if(!(o=ao(n))||et(t,o))return}return(r=function(e){for(var t=null,n=e;!t&&(n=n.previousSibling);)if(!po(n)&&!fo(n)){t=n;break}return t}(t))&&ue(r)&&/div|p/.test(Be(r))&&Qn(r)}}}function so(e,t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=rt(r),s=null,a=t?ho:ce;if(!i&&a(e))return e;for(var l=0;l<i;l++){if(n=r[l],o=ue(n)&&!Ve(n),a(n))return n;if(de(n)&&no(n)&&!o&&(s=so(n,t)))return s}return s}function ao(e){return so(e,!0)}function lo(e,t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=rt(r),s=null;if(!i&&ho(e))return e;for(var a=i-1;0<=a;a--){if(n=r[a],o=ue(n)&&!Ve(n),ce(n)&&(!t||!fo(n)))return n;if(de(n)&&no(n)&&!o&&(s=lo(n,!1)))return s}return s}function uo(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 co(e){if(!e||!e.length)return 0;for(var t=e.length,n=t,o=t-1;0<=o&&(10===e.charCodeAt(o)||32===e.charCodeAt(o));o--)n--;return n}function fo(e){if(!ce(e))return!1;var t=e.nodeValue,n=uo(t),o=co(t);return n===t.length&&0===o}function ho(e){return ce(e)&&!fo(e)}function po(e){return!de(e)||ke(e)}function mo(e){var t=e.getAttribute?e.getAttribute("contenteditable"):null;return""===t||"true"===t}function go(e){var t=ze(e);if(mo(e)&&Ve(e))return e;var n=ee(e);return"on"===n.designMode?n.body:K(t,function(e){return mo(e)&&Ve(e)})}function vo(e,t){if(et(e,t))return et(t,go(e))?e:d.nativeMethods.nodeParentNodeGetter.call(e);var n=[],o=go(e),r=null;if(!Ze(o,t))return null;for(r=e;r!==o;r=d.nativeMethods.nodeParentNodeGetter.call(r))n.push(r);for(r=t;r!==o;r=d.nativeMethods.nodeParentNodeGetter.call(r))if(-1!==G(n,r))return r;return o}function Eo(e,t){var n=null,o=null,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=rt(r),s=i<=t;if(ke(e))return{node:e,offset:t};if(s?n=r[i-1]:(n=r[t],o=0),ke(n)){if(i<=1)return{node:e,offset:0};(s=i<=t-1)?n=r[i-2]:(n=r[t-1],o=0)}for(;!po(n)&&ue(n);){var a=to(n);if(!a.length){o=0;break}n=a[s?a.length-1:0]}return 0===o||po(n)||(o=n.nodeValue?n.nodeValue.length:0),{node:n,offset:o}}function yo(e,t,n){var o=n?t.focusNode:t.anchorNode,r=n?t.focusOffset:t.anchorOffset,i={node:o,offset:r};return(et(e,o)||ue(o))&&oo(o)&&(i=Eo(o,r)),{node:i.node,offset:i.offset}}function bo(e,t,n){var o=n?t.anchorNode:t.focusNode,r=n?t.anchorOffset:t.focusOffset,i={node:o,offset:r};return(et(e,o)||ue(o))&&oo(o)&&(i=Eo(o,r)),{node:i.node,offset:i.offset}}function wo(e,t,n){return To(e,yo(e,t,n))}function _o(e,t,n){return To(e,bo(e,t,n))}function So(e,t){if(gn(e))return!1;if(ce(e))return!0;if(!ue(e))return!1;if(oo(e))return t;var n=d.nativeMethods.nodeParentNodeGetter.call(e),o=!Ve(n),r=to(e),i=U(r,function(e){return"br"===Be(e)});return o||i}function Co(a,e){var l={node:null,offset:e};return function e(t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(t),i=rt(r);if(l.node)return l;if(po(t))return l;if(ce(t)){if(l.offset<=t.nodeValue.length)return l.node=t,l;t.nodeValue.length&&(!l.node&&io(a,t)&&l.offset--,l.offset-=t.nodeValue.length)}else if(ue(t)){if(!eo(t))return l;if(0===l.offset&&So(t,!1))return l.node=t,l.offset=(n=t,o=0,K(d.nativeMethods.nodeChildNodesGetter.call(n),function(e,t){return o=t,"br"===Be(e)})?o:0),l;(l.node||!ro(a,t)&&!io(a,t))&&(i||"br"!==Be(t))||l.offset--}for(var s=0;s<i;s++)l=e(r[s]);return l}(a)}function To(i,e){var s=e.node,a=e.offset,l=0,u=!1;return function e(t){var n=d.nativeMethods.nodeChildNodesGetter.call(t),o=rt(n);if(u)return l;if(et(s,t))return(ro(i,t)||io(i,t))&&l++,u=!0,l+a;if(po(t))return l;!o&&t.nodeValue&&t.nodeValue.length?(!u&&io(i,t)&&l++,l+=t.nodeValue.length):(!o&&ue(t)&&"br"===Be(t)||!u&&(ro(i,t)||io(i,t)))&&l++;for(var r=0;r<o;r++)l=e(n[r]);return l}(i)}function Mo(e){var t,n,o,r,i,s=ce(e)?e:lo(e,!0);if(!s||(t=s,o=ce(n=e)?n:so(n,!1),r=t===o,i=t.nodeValue===String.fromCharCode(10),r&&i&&function(e,t){for(var n=["pre","pre-wrap","pre-line"];e!==t;)if(e=d.nativeMethods.nodeParentNodeGetter.call(e),-1<G(n,pn(e,"white-space")))return 1}(t,n)))return 0;var a=ee(e).createRange();return a.selectNodeContents(s),To(e,{node:s,offset:a.endOffset})}var xo=Object.freeze({__proto__:null,getFirstVisibleTextNode:ao,getLastTextNode:lo,getFirstNonWhitespaceSymbolIndex:uo,getLastNonWhitespaceSymbolIndex:co,isInvisibleTextNode:fo,findContentEditableParent:go,getNearestCommonAncestor:vo,getSelection:function(e,t,n){return{startPos:yo(e,t,n),endPos:bo(e,t,n)}},getSelectionStartPosition:wo,getSelectionEndPosition:_o,calculateNodeAndOffsetByPosition:Co,calculatePositionByNodeAndOffset:To,getElementBySelection:function(e){var t=vo(e.anchorNode,e.focusNode);return ce(t)?t.parentElement:t},getFirstVisiblePosition:function(e){var t=ce(e)?e:ao(e),n=ee(e).createRange();return t?(n.selectNodeContents(t),To(e,{node:t,offset:n.startOffset})):0},getLastVisiblePosition:Mo,getContentEditableValue:function(e){return k(function e(t){var n=[],o=d.nativeMethods.nodeChildNodesGetter.call(t),r=rt(o);po(t)||r||!ce(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("")}}),Po=f.utils.browser,Io=f.nativeMethods,No=f.eventSandbox.selection,Ro="backward",Oo="forward",Ao="none",Lo=Ao,Vo=0,Fo=0,ko=0,Do=0,Wo=0,qo=0;function Ho(e,t,n,o){var r,i,s,a=null,l=null,u=!1;void 0!==t&&void 0!==n&&n<t&&(s=t,t=n,n=s,u=!0),void 0===t&&(l={node:(r=ao(e))||e,offset:r&&r.nodeValue?uo(r.nodeValue):0}),void 0===n&&(a={node:(i=lo(e,!0))||e,offset:i&&i.nodeValue?co(i.nodeValue):0}),l=l||Co(e,t),a=a||Co(e,n),l.node&&a.node&&(u?Yo(a,l,o):Yo(l,a,o))}function Go(e){var t=e?ee(e):es,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 Uo(e,t,n){var o=To(e,t);return To(e,n)<o}function Bo(e){return Ve(e)?Ko(e)?wo(e,zo(e),Go(e)):0:No.getSelection(e).start}function jo(e){return Ve(e)?Ko(e)?_o(e,zo(e),Go(e)):0:No.getSelection(e).end}function zo(e){var t=ee(e);return t?t.getSelection():Zi.getSelection()}function Yo(e,t,n){var o=e.node,r=t.node,i=o.nodeValue?o.length:0,s=r.nodeValue?r.length:0,a=e.offset,l=t.offset;ue(o)&&a||(a=Math.min(i,e.offset)),ue(r)&&l||(l=Math.min(s,t.offset));var u=go(o),c=Uo(u,e,t),d=zo(u),f=ee(u).createRange();No.wrapSetterSelection(u,function(){var e;d.removeAllRanges(),c?Po.isIE?(f.setStart(r,l),f.setEnd(o,a),d.addRange(f)):(f.setStart(o,a),f.setEnd(o,a),d.addRange(f),e=function(e,t){try{d.extend(e,t)}catch(e){return!1}return!0},(Po.isSafari||Po.isChrome&&Po.version<58)&&fo(r)?e(r,Math.min(l,1))||e(r,0):e(r,l)):(f.setStart(o,a),f.setEnd(r,l),d.addRange(f))},n,!0)}function Ko(e){var t=zo(e);return!(!t.anchorNode||!t.focusNode)&&Ze(e,t.anchorNode)&&Ze(e,t.focusNode)}Po.isIE&&wt(es,"selectionchange",function(){var e=null,t=null,n=null;try{if(this.selection)t=this.selection.createRange();else{if(!(e=Io.documentActiveElementGetter.call(this))||!Ae(e))return void(Lo=Ao);var o,r=Bo(e),i=jo(e);e.createTextRange?((t=e.createTextRange()).collapse(!0),t.moveStart("character",r),t.moveEnd("character",i-r)):es.createRange&&(t=es.createRange(),o=f.nativeMethods.nodeFirstChildGetter.call(e),t.setStart(o,r),t.setEnd(o,i),n=t.getBoundingClientRect())}}catch(e){return void(Lo=Ao)}var s=n?Math.ceil(n.left):t.offsetLeft,a=n?Math.ceil(n.top):t.offsetTop,l=n?Math.ceil(n.height):t.boundingHeight,u=n?Math.ceil(n.width):t.boundingWidth,c=t.htmlText?t.htmlText.length:0;!function(e,t,n,o,r){if(r)switch(Lo){case Ao:t===qo&&(e===Do||ko<n)?Lo=Oo:(e<Do||t<qo)&&(Lo=Ro);break;case Oo:if(e===Do&&t===qo||e<Do&&ko<n||t===qo&&n===ko&&Wo<r&&e+o!==Vo)break;(e<Do||t<qo)&&(Lo=Ro);break;case Ro:if((e<Do||t<qo)&&Wo<r)break;t===Fo&&(Vo<=e||ko<n)&&(Lo=Oo)}else Vo=e,Fo=t,Lo=Ao;ko=n,Do=e,Wo=r,qo=t}(s,a,l,u,n?t.toString().length:c)},!0);var Xo,Jo,$o=Object.freeze({__proto__:null,hasInverseSelectionContentEditable:Go,isInverseSelectionContentEditable:Uo,getSelectionStart:Bo,getSelectionEnd:jo,hasInverseSelection:function(e){return Ve(e)?Go(e):(No.getSelection(e).direction||Lo)===Ro},getSelectionByElement:zo,select:function(e,t,n){var o,r,i,s;Ve(e)?Ho(e,t,n,!0):(o=t||0,i=!1,s=null,(r=void 0===n?ut(e).length:n)<o&&(s=o,o=r,r=s,i=!0),No.setSelection(e,o,r,i?Ro:Oo),Lo=t===n?Ao:i?Ro:Oo)},selectByNodesAndOffsets:Yo,deleteSelectionContents:function(e,t){var n,o,r,i,s,a,l,u,c,d,f,h,p=Bo(e),m=jo(e);t&&Ho(e),p!==m&&(n=zo(e),o=n.anchorNode,r=n.focusNode,i=n.anchorOffset,s=n.focusOffset,a=uo(o.nodeValue),l=co(o.nodeValue),u=uo(r.nodeValue),c=co(r.nodeValue),f=d=null,ce(o)&&(i<a&&0!==i?d=0:i!==o.nodeValue.length&&(fo(o)&&0!==i||l<i)&&(d=o.nodeValue.length)),ce(r)&&(s<u&&0!==s?f=0:s!==r.nodeValue.length&&(fo(r)&&0!==s||c<s)&&(f=r.nodeValue.length)),(Po.isWebKit||Po.isIE&&11<Po.version)&&(null!==d&&(o.nodeValue=0===d?o.nodeValue.substring(a):o.nodeValue.substring(0,l)),null!==f&&(r.nodeValue=0===f?r.nodeValue.substring(u):r.nodeValue.substring(0,c))),null===d&&null===f||Yo({node:o,offset:d=null!==d?0===d?d:o.nodeValue.length:i},{node:r,offset:f=null!==f?0===f?f:r.nodeValue.length:s}),function(e){var t=zo(e),n=t.rangeCount;if(n)for(var o=0;o<n;o++)t.getRangeAt(o).deleteContents()}(e),(h=zo(e)).rangeCount&&!h.getRangeAt(0).collapsed&&h.getRangeAt(0).collapse(!0))},setCursorToLastVisiblePosition:function(e){var t=Mo(e);Ho(e,t,t)},hasElementContainsSelection:Ko}),Qo=f.Promise,Zo=f.nativeMethods,er="E1000",tr="E1001",nr="E1002",or="E1003",rr="E1004",ir="E1005",sr="E1006",ar="E1007",lr="E1008",ur="E1009",cr="E1010",dr="E1011",fr="E1012",hr="E1013",pr="E1014",mr="E1015",gr="E1016",vr="E1017",Er="E1018",yr="E1019",br="E1020",wr="E1021",_r="E1022",Sr="E1023",Cr="E1024",Tr="E1025",Mr="E1026",xr="E1027",Pr="E1028",Ir="E1029",Nr="E1030",Rr="E1031",Or="E1032",Ar="E1033",Lr="E1034",Vr="E1035",Fr="E1036",kr="E1037",Dr="E1038",Wr="E1039",qr="E1040",Hr="E1041",Gr="E1043",Ur="E1044",Br="E1045",jr="E1046",zr="E1047",Yr="E1048",Kr="E1049",Xr="E1050",Jr="E1051",$r="E1052",Qr="E1053",Zr="E1054",ei="E1057",ti="E1058",ni="E1059",oi="E1060",ri="E1061",ii="E1062",si="E1063",ai="E1064",li="E1065",ui="E1066",ci="E1067",di="E1068",fi="E1069",hi="E1070",pi="E1071",mi="E1072",gi="E1073",vi="E1074",Ei="E1075";(Jo=Xo=Xo||{}).TooHighConcurrencyFactor="TooHighConcurrencyFactor",Jo.UseBrowserInitOption="UseBrowserInitOption",Jo.RestErrorCauses="RestErrorCauses";var yi,bi,wi=Xo,_i="https://testcafe.io/documentation/402639/reference/command-line-interface#file-pathglob-pattern",Si="https://testcafe.io/documentation/402638/reference/configuration-file#filter",Ci="https://testcafe.io/documentation/402828/guides/concepts/browsers#test-in-headless-mode",Ti=((yi={})[er]="Cannot launch multiple live mode instances of the TestCafe test runner.",yi[tr]="Cannot launch the same live mode instance of the TestCafe test runner multiple times.",yi[nr]="The {userAgent} browser disconnected. If you did not close the browser yourself, browser performance or network issues may be at fault.",yi[or]="The following browsers disconnected: {userAgents}. Cannot run further tests.",yi[ai]='"{browser}" disconnected during test execution.',yi[rr]="Cannot establish one or more browser connections.",yi[ir]='Cannot find the browser. "{browser}" is neither a known browser alias, nor a path to an executable file.',yi[sr]='Cannot find the "{providerName}" browser provider.',yi[ar]="You have not specified a browser.",yi[lr]='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.\nFor more information on how to specify test locations, see '+_i+".",yi[ur]="Source files do not contain valid 'fixture' and 'test' declarations.",yi[Nr]="No tests match your filter.\nSee "+Si+".",yi[cr]='The "{name}" reporter does not exist. Check the reporter parameter for errors.',yi[dr]='Reporters cannot share output streams. The following reporters interfere with one another: "{reporters}".',yi[fr]='The "{optionName}" option does not contain a valid regular expression.',yi[hr]='The "{optionName}" option does not contain a valid key-value pair.',yi[li]='The "{optionName}" option does not exist. Specify "attemptLimit" and "successThreshold" to configure quarantine mode.',yi[ui]='The value of "attemptLimit" ({attemptLimit}) should be greater then the value of "successThreshold" ({successThreshold}).',yi[ci]='The "{attemptLimit}" parameter only accepts values of {MIN_ATTEMPT_LIMIT} and up.',yi[di]='The "{successThreshold}" parameter only accepts values of {MIN_SUCCESS_THRESHOLD} and up.',yi[pr]="Speed should be a number between 0.01 and 1.",yi[mr]="The concurrency factor should be an integer greater than or equal to 1.",yi[gr]="The number of remote browsers should be divisible by the concurrency factor.",yi[fi]='The value of the "concurrency" option includes the CDP port.',yi[vr]='The "--ports" argument accepts two values at a time.',yi[Er]="Port {portNum} is occupied by another process.",yi[yr]='Cannot resolve hostname "{hostname}".',yi[br]='Cannot find a test file at "{path}".',yi[wr]="Cannot initialize a ClientFunction because {#instantiationCallsiteName} is {type}, and not a function.",yi[_r]="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.",yi[Sr]="{#instantiationCallsiteName} cannot implicitly resolve the test run in context of which it should be executed. If you need to call {#instantiationCallsiteName} from the Node.js API callback, pass the test controller manually via {#instantiationCallsiteName}'s `.with({ boundTestRun: t })` method first. Note that you cannot execute {#instantiationCallsiteName} outside the test code.",yi[vi]="'request' cannot implicitly resolve the test run in context of which it should be executed. Note that you cannot execute 'request' in the experimental debug mode.",yi[Cr]='{#instantiationCallsiteName} code, arguments or dependencies cannot contain generators or "async/await" syntax (use Promises instead).',yi[Tr]='Cannot resolve the "boundTestRun" option because its value is not a test controller.',yi[Mr]="{smthg} ({actual}) is not of expected type ({type}).",yi[xr]='Invalid {what}: "{url}". TestCafe cannot execute the test because the {what} includes the {protocol} protocol. TestCafe supports the following protocols: http://, https:// and file://.',yi[Pr]="Cannot implicitly resolve the test run in the context of which the test controller action should be executed. Use test function's 't' argument instead.",yi[Ir]="A Promise timed out.",yi[Rr]="You cannot manage advanced video parameters when the video recording capability is off. Specify the root storage folder for video content to enable video recording.",yi[Or]='You cannot call the "{methodName}" method more than once. Specify an array of parameters instead.',yi[Ar]="Specify a file name or a writable stream as the reporter's output target.",yi[Lr]='Unable to read the file referenced by the "{option}" ssl option ("{path}"). Error details:\n\n{err}',yi[Vr]="Cannot prepare tests due to the following error:\n\n{errMessage}",yi[Fr]='Cannot parse a raw test file at "{path}" due to the following error:\n\n{errMessage}',yi[kr]="The web application failed with the following error:\n\n{errMessage}",yi[Dr]='Unable to open the "{alias}" browser due to the following error:\n\n{errMessage}',yi[Wr]="Attempt to configure a request hook resulted in the following error:\n\n{requestHookName}: {errMsg}",yi[qr]='There are forbidden characters in the "{screenshotPath}" {screenshotPathType}:\n {forbiddenCharsDescription}',yi[Hr]="TestCafe cannot record videos because it cannot locate the FFmpeg executable. Try one of the following solutions:\n\n* add the path of the FFmpeg installation directory to the PATH environment variable,\n* specify the path of the FFmpeg executable in the FFMPEG_PATH environment variable or the ffmpegPath option,\n* install the @ffmpeg-installer/ffmpeg npm package.",yi[Gr]='"{filePath}" is not a valid TypeScript configuration file.',yi[Ur]="Initialize your client script with one of the following: a JavaScript script, a JavaScript file path, or the name of a JavaScript module.",yi[Br]="Specify the base path for the client script file.",yi[jr]="Client scripts can only have one initializer: JavaScript code, a JavaScript file path, or the name of a JavaScript module.",yi[zr]="Cannot load a client script from {path}.\n{errorMessage}",yi[Yr]="A client script tried to load a JavaScript module that TestCafe cannot locate:\n\n{errorMessage}.",yi[Kr]="This method cannot be called on a service host.",yi[Xr]="The specified payload is too large to form an IPC packet.",yi[Jr]="Cannot process a malformed IPC message.",yi[$r]="Cannot create an IPC message due to an unexpected IPC head packet.",yi[Qr]="Cannot create an IPC message due to an unexpected IPC body packet.",yi[Zr]="Cannot create an IPC message due to an unexpected IPC tail packet.",yi[ei]="Your Linux version does not have a graphic subsystem to run {browserAlias} with a GUI. You can launch the browser in headless mode. If you use a portable browser executable, specify the browser alias before the path instead of the 'path' prefix. For more information, see "+Ci,yi[ti]='The "{methodName}" method of the "{reporterName}" reporter produced an uncaught error. Error details:\n{originalError}',yi[ni]="You cannot specify relative login page URLs in the Role constructor. Use an absolute URL.",yi[oi]="Cannot load the TypeScript compiler.\n{originErrorMessage}.",yi[ri]="You cannot specify options for the {noncustomizableCompilerList} compiler{suffix}.",yi[ii]="Cannot enable the 'retryTestPages' option. Apply one of the following two solutions:\n-- set 'localhost' as the value of the 'hostname' option\n-- run TestCafe over HTTPS\n",yi[si]="{originErrorMessage}\n{numOfNotOpenedConnection} of {numOfAllConnections} browser connections have not been established:\n{listOfNotOpenedConnections}\n\nHints:\n{listOfHints}",yi[wi.TooHighConcurrencyFactor]="The host machine may not be powerful enough to handle the specified concurrency factor ({concurrencyFactor}). Try to decrease the concurrency factor or allocate more computing resources to the host machine.",yi[wi.UseBrowserInitOption]='Increase the value of the "browserInitTimeout" option if it is too low (currently: {browserInitTimeoutMsg}). This option determines how long TestCafe waits for browsers to be ready.',yi[wi.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.",yi[hi]="Cannot locate a TestCafe configuration file at {filePath}. Either the file does not exist, or the path is invalid.",yi[pi]="Insecure token declaration: cannot declare a Dashboard token in a JSON configuration file. Use a JavaScript configuration file, or declare a Dashboard token with one of the following: the CLI, the Test Runner API, the TESTCAFE_DASHBOARD_TOKEN environment variable.",yi[Ei]='The value of the baseUrl argument cannot be relative: "{baseUrl}"',yi[mi]="Requested url isn't valid ({actualValue}).",yi[gi]="Requested was interrupted with error:\n{message}",yi[Ir]),Mi=(g(xi,bi=Error),xi);function xi(){var e=bi.call(this,Ti)||this;return e.code=Ir,e}function Pi(e){var t=e.replace(/^\+/g,"plus").replace(/\+\+/g,"+plus").split("+");return k(t,function(e){return e.replace("plus","+")})}function Ii(e){var t=1===e.length||"space"===e?e:e.toLowerCase();return s.modifiersMap[t]&&(t=s.modifiersMap[t]),t}var Ni,Ri,Oi=f.utils.trim,Ai={run:"run",idle:"idle"};(Ri=Ni=Ni||{}).ok="ok",Ri.closing="closing";var Li=Ni,Vi=es.location.href,Fi=es.location.origin,ki=Fi+"/service-worker.js",Di=!1,Wi=null,qi=eval;function Hi(t){return new c(function(e){return setTimeout(e,t)})}function Gi(e,r,t){var n=void 0===t?{}:t,o=n.method,i=void 0===o?"GET":o,s=n.data,a=void 0===s?null:s,l=n.parseResponse,u=void 0===l||l;return new c(function(t,n){var o=r();o.open(i,e,!0),o.onreadystatechange=function(){var e;4===o.readyState&&(200===o.status?((e=o.responseText||"")&&u&&(e=JSON.parse(o.responseText)),t(e)):n("disconnected"))},o.send(a)})}function Ui(e){return Vi.toLowerCase()===e.toLowerCase()}function Bi(){Di=!1}function ji(e){Bi(),es.location=e.url}function zi(e,l,t){var u=e.statusUrl,c=e.idlePageUrl,n=void 0===t?{}:t,d=n.manualRedirect,f=n.proxyless;return v(this,void 0,void 0,function(){var s,a;return E(this,function(e){switch(e.label){case 0:return[4,Gi(u,l)];case 1:return s=e.sent(),(a=f?(o=c,r=(n=s).cmd===Ai.idle&&n.url===o&&Ui(o),i=n.cmd===Ai.idle&&n.url===o&&!Ui(n.url),!r||n.cmd===Ai.run||i):((t=s).cmd===Ai.run||t.cmd===Ai.idle)&&!Ui(t.url))&&!d&&ji(s),[2,{command:s,redirecting:a}]}var t,n,o,r,i})})}var Yi=Object.freeze({__proto__:null,delay:Hi,sendXHR:Gi,startHeartbeat:function(e,t){function n(){Gi(e,t).then(function(e){e.code!==Li.closing||Ui(e.url)||(Bi(),es.location=e.url)})}Wi=Zi.setInterval(n,2e3),n()},stopHeartbeat:function(){Zi.clearInterval(Wi)},startInitScriptExecution:function(e,t){Di=!0,function e(t,n){Di&&Gi(t,n).then(function(e){return e.code?Gi(t,n,{method:"POST",data:JSON.stringify(qi(e.code))}):null}).then(function(){Zi.setTimeout(function(){return e(t,n)},1e3)})}(e,t)},stopInitScriptExecution:Bi,redirect:ji,checkStatus:function(){for(var r,i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return v(this,void 0,void 0,function(){var t,n,o;return E(this,function(e){switch(e.label){case 0:n=t=null,o=0,e.label=1;case 1:return o<5?[4,function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return v(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,zi.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,Hi(1e3)]:[2,n];case 3:e.sent(),e.label=4;case 4:return o++,[3,1];case 5:throw t}})})},enableRetryingTestPages:function(){return v(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:if(!navigator.serviceWorker)return[2];e.label=1;case 1:return e.trys.push([1,4,,5]),[4,navigator.serviceWorker.register(ki,{scope:Fi})];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 Gi(e,t)},setActiveWindowId:function(e,t,n){return Gi(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},closeWindow:function(e,t,n){return Gi(e,t,{method:"POST",data:JSON.stringify({windowId:n})})}}),Ki={};Ki.RequestBarrier=h,Ki.ClientRequestEmitter=T,Ki.ScriptExecutionBarrier=x,Ki.ScriptExecutionEmitter=A,Ki.pageUnloadBarrier=Ht,Ki.preventRealEvents=function(){wn.initElementListening(Zi,Sn),wn.addFirstInternalEventBeforeListener(Zi,Sn,Tn),zt.init()},Ki.disableRealEventsPreventing=function(){wn.removeInternalEventBeforeListener(Zi,Sn,Tn)},Ki.scrollController=zt,Ki.ScrollAutomation=Jn,Ki.serviceUtils=Ut,Ki.domUtils=dt,Ki.contentEditable=xo,Ki.positionUtils=Bn,Ki.styleUtils=yn,Ki.scrollUtils=An,Ki.eventUtils=Mt,Ki.arrayUtils=X,Ki.promiseUtils=zn,Ki.textSelection=$o,Ki.waitFor=function(i,s,a){return new Qo(function(e,t){var n,o,r=i();r?e(r):(n=Zo.setInterval.call(Zi,function(){(r=i())&&(Zo.clearInterval.call(Zi,n),Zo.clearTimeout.call(Zi,o),e(r))},s),o=Zo.setTimeout.call(Zi,function(){Zo.clearInterval.call(Zi,n),t()},a))})},Ki.delay=u,Ki.getTimeLimitedPromise=function(e,t){return d.Promise.race([e,u(t).then(function(){return d.Promise.reject(new Mi)})])},Ki.noop=function(){},Ki.getKeyArray=Pi,Ki.getSanitizedKey=Ii,Ki.parseKeySequence=function(e){if("string"!=typeof e)return{error:!0};var t=(e=Oi(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:U(r,function(e){var t=Pi(e);return U(t,function(e){var t=1===e.length||"space"===e,n=Ii(e),o=s.modifiers[n],r=s.specialKeys[n];return!(t||o||r)})}),keys:e}},Ki.sendRequestToFrame=Xn,Ki.KEY_MAPS=s,Ki.browser=Yi,Ki.selectorTextFilter=function o(e,r,i,s){function t(e){for(var t=e.childNodes.length,n=0;n<t;n++)if(o(e.childNodes[n],r,i,s))return!0;return!1}function n(e){return s instanceof RegExp?s.test(e):s===e.trim()}if(1===e.nodeType)return n(e.innerText||e.textContent);if(9!==e.nodeType)return 11===e.nodeType?t(e):n(e.textContent);var a=e.querySelector("head"),l=e.querySelector("body");return t(a)||t(l)},Ki.selectorAttributeFilter=function(e,t,n,o,r){if(1!==e.nodeType)return!1;function i(e,t){return"string"==typeof t?t===e:t.test(e)}for(var s,a=e.attributes,l=0;l<a.length;l++)if(i((s=a[l]).nodeName,o)&&(!r||i(s.nodeValue,r)))return!0;return!1};var Xi=f.nativeMethods,Ji=f.EVENTS.evalIframeScript;Xi.objectDefineProperty(Zi,"%testCafeCore%",{configurable:!0,value:Ki}),f.on(Ji,function(e){return Qi(Xi.contentWindowGetter.call(e.iframe))});var $i=f.eventSandbox.message;$i.on($i.SERVICE_MSG_RECEIVED_EVENT,function(e){var t,n,o,r,i;e.message.cmd===Jn.SCROLL_REQUEST_CMD&&(n=(t=e.message).offsetX,o=t.offsetY,r=t.maxScrollMargin,i=ot(e.source),new Jn(i,{offsetX:n,offsetY:o},r).run().then(function(){return $i.sendServiceMsg({cmd:Jn.SCROLL_RESPONSE_CMD},e.source)}))})}(Zi["%hammerhead%"],Zi["%hammerhead%"].Promise)}(window);
1
+ window["%hammerhead%"].utils.removeInjectedScript(),function ss(as){var ls=as.document;!function(d,c){var f="default"in d?d.default:d;c=c&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c;var e=f.utils.browser,t={alt:18,ctrl:17,meta:91,shift:16},n={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=","{":"[","}":"]",":":";",'"':"'","|":"\\","<":",",">":".","?":"/","±":"§"},o={backspace:8,capslock:20,delete:46,down:40,end:35,enter:13,esc:27,home:36,ins:45,left:37,pagedown:34,pageup:33,right:39,space:32,tab:9,up:38},r={left:e.isIE?"Left":"ArrowLeft",down:e.isIE?"Down":"ArrowDown",right:e.isIE?"Right":"ArrowRight",up:e.isIE?"Up":"ArrowUp",backspace:"Backspace",capslock:"CapsLock",delete:"Delete",end:"End",enter:"Enter",esc:"Escape",home:"Home",ins:"Insert",pagedown:"PageDown",pageup:"PageUp",space:e.isIE?"Spacebar":" ",tab:"Tab",alt:"Alt",ctrl:"Control",meta:"Meta",shift:"Shift"};function i(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n}var s={modifiers:t,shiftMap:n,specialKeys:o,keyProperty:r,modifiersMap:{option:"alt"},symbolCharCodeToKeyCode:{96:192,91:219,93:221,92:220,59:186,39:222,44:188,45:e.isFirefox?173:189,46:190,47:191},symbolKeysCharCodes:{109:45,173:45,186:59,187:61,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39,110:46,96:48,97:49,98:50,99:51,100:52,101:53,102:54,103:55,104:56,105:57,107:43,106:42,111:47},reversedModifiers:i(t),reversedShiftMap:i(n),reversedSpecialKeys:i(o),reversedKeyProperty:i(r)},a=f.Promise,l=f.nativeMethods;function u(t){return new a(function(e){return l.setTimeout.call(as,e,t)})}var h=(p.prototype._startListening=function(){var t=this;this._emitter.onRequestSend(function(e){return t._onRequestSend(e)}),this._emitter.onRequestCompleted(function(e){return t._onRequestCompleted(e)}),this._emitter.onRequestError(function(e){return t._onRequestError(e)})},p.prototype._offListening=function(){this._emitter.offAll()},p.prototype._onRequestSend=function(e){this._collectingReqs&&this._requests.add(e)},p.prototype._onRequestCompleted=function(e){var t=this;u(this._delays.additionalRequestsCollection).then(function(){return t._onRequestFinished(e)})},p.prototype._onRequestFinished=function(e){this._requests.has(e)&&(this._requests.delete(e),this._collectingReqs||this._requests.size||!this._watchdog||this._finishWaiting())},p.prototype._onRequestError=function(e){this._onRequestFinished(e)},p.prototype._finishWaiting=function(){this._watchdog&&((0,d.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._requests.clear(),this._offListening(),this._waitResolve()},p.prototype.wait=function(e){var n=this;return u(e?this._delays.pageInitialRequestsCollection:this._delays.requestsCollection).then(function(){return new d.Promise(function(e){var t;n._collectingReqs=!1,n._waitResolve=e,n._requests.size?(t=d.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},p.TIMEOUT)):n._finishWaiting()})})},p.TIMEOUT=3e3,p);function p(e,t){var n,o,r;void 0===t&&(t={}),this._delays={requestsCollection:null!==(n=t.requestsCollection)&&void 0!==n?n:50,additionalRequestsCollection:null!==(o=t.additionalRequestsCollection)&&void 0!==o?o:50,pageInitialRequestsCollection:null!==(r=t.pageInitialRequestsCollection)&&void 0!==r?r:50},this._emitter=e,this._waitResolve=null,this._watchdog=null,this._requests=new Set,this._collectingReqs=!0,this._startListening()}var m=function(e,t){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function v(e,s,a,l){return new(a=a||c)(function(n,t){function o(e){try{i(l.next(e))}catch(e){t(e)}}function r(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(o,r)}i((l=l.apply(e,s||[])).next())})}function E(n,o){var r,i,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return function(t){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(s=2&t[0]?i.return:t[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,t[1])).done)return s;switch(i=0,s&&(t=[2&t[0],s.value]),t[0]){case 0:case 1:s=t;break;case 4:return a.label++,{value:t[1],done:!1};case 5:a.label++,i=t[1],t=[0];continue;case 7:t=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===t[0]||2===t[0])){a=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3])){a.label=t[1];break}if(6===t[0]&&a.label<s[1]){a.label=s[1],s=t;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(t);break}s[2]&&a.ops.pop(),a.trys.pop();continue}t=o.call(n,a)}catch(e){t=[6,e],i=0}finally{r=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}([t,e])}}}function y(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||((o=o||Array.prototype.slice.call(t,0,r))[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var b=(w.prototype.on=function(e,t){this._eventsListeners[e]||(this._eventsListeners[e]=[]),this._eventsListeners[e].push(t)},w.prototype.once=function(n,o){var r=this;this.on(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.off(n,o),o.apply(void 0,e)})},w.prototype.off=function(e,t){var n=this._eventsListeners[e];n&&(this._eventsListeners[e]=d.nativeMethods.arrayFilter.call(n,function(e){return e!==t}))},w.prototype.offAll=function(e){e?this._eventsListeners[e]=[]:this._eventsListeners={}},w.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=this._eventsListeners[t];if(o)for(var r=0;r<o.length;r++)try{o[r].apply(this,e)}catch(e){if(!(e.message&&-1<e.message.indexOf("freed script")))throw e;this.off(t,o[r])}},w);function w(){this._eventsListeners={}}var _,S="request-send",C="request-completed",T="request-error",x=(g(M,_=b),M.prototype._addHammerheadListener=function(e,t){f.on(e,t),this._hammerheadListenersInfo.push({evt:e,listener:t})},M.prototype.onRequestSend=function(e){this.on(S,e)},M.prototype.onRequestCompleted=function(e){this.on(C,e)},M.prototype.onRequestError=function(e){this.on(T,e)},M.prototype.offAll=function(){_.prototype.offAll.call(this);for(var e=0,t=this._hammerheadListenersInfo;e<t.length;e++){var n=t[e];f.off.call(f,n.evt,n.listener)}},M);function M(){var n=_.call(this)||this;return n._hammerheadListenersInfo=[],n._addHammerheadListener(f.EVENTS.beforeXhrSend,function(e){var t=e.xhr;return n.emit(S,t)}),n._addHammerheadListener(f.EVENTS.xhrCompleted,function(e){var t=e.xhr;return n.emit(C,t)}),n._addHammerheadListener(f.EVENTS.xhrError,function(e){var t=e.xhr;return n.emit(T,t)}),n._addHammerheadListener(f.EVENTS.fetchSent,function(e){n.emit(S,e),e.then(function(){return n.emit(C,e)},function(){return n.emit(T,e)})}),n}var P=(I.prototype._startListening=function(){var t=this;this._emitter.onScriptAdded(function(e){return t._onScriptElementAdded(e)}),this._emitter.onScriptLoadedOrFailed(function(e){return t._onScriptLoadedOrFailed(e)})},I.prototype._offListening=function(){this._emitter.offAll()},I.prototype._onScriptElementAdded=function(e){var t=this,n=(0,d.nativeMethods.setTimeout)(function(){return t._onScriptLoadedOrFailed(e,!0)},I.LOADING_TIMEOUT);this._scripts.set(e,n)},I.prototype._onScriptLoadedOrFailed=function(e,t){var n=this;void 0===t&&(t=!1),this._scripts.has(e)&&(t||(0,d.nativeMethods.clearTimeout)(this._scripts.get(e)),this._scripts.delete(e),this._scripts.size||u(25).then(function(){n._waitResolve&&!n._scripts.size&&n._finishWaiting()}))},I.prototype._finishWaiting=function(){this._watchdog&&((0,d.nativeMethods.clearTimeout)(this._watchdog),this._watchdog=null),this._scripts.clear(),this._offListening(),this._waitResolve(),this._waitResolve=null},I.prototype.wait=function(){var n=this;return new d.Promise(function(e){var t;n._waitResolve=e,n._scripts.size?(t=d.nativeMethods.setTimeout,n._watchdog=t(function(){return n._finishWaiting()},I.TIMEOUT)):n._finishWaiting()})},I.TIMEOUT=3e3,I.LOADING_TIMEOUT=2e3,I);function I(e){this._emitter=e,this._watchdog=null,this._waitResolve=null,this._scripts=new Map,this._startListening()}var N,R=f.nativeMethods,O="script-added",A="script-loaded-or-failed",L=(g(V,N=b),V.prototype._onScriptElementAdded=function(e){var t,n=this,o=R.scriptSrcGetter.call(e);void 0!==o&&""!==o&&(this.emit(O,e),t=function(){R.removeEventListener.call(e,"load",t),R.removeEventListener.call(e,"error",t),n.emit(A,e)},R.addEventListener.call(e,"load",t),R.addEventListener.call(e,"error",t))},V.prototype.onScriptAdded=function(e){this.on(O,e)},V.prototype.onScriptLoadedOrFailed=function(e){this.on(A,e)},V.prototype.offAll=function(){N.prototype.offAll.call(this),f.off(f.EVENTS.scriptElementAdded,this._onScriptElementAdded)},V);function V(){var n=N.call(this)||this;return n._scriptElementAddedListener=function(e){var t=e.el;return n._onScriptElementAdded(t)},f.on(f.EVENTS.scriptElementAdded,n._scriptElementAddedListener),n}function F(e){var t="array"+e.charAt(0).toUpperCase()+e.slice(1),n=d.nativeMethods[t];return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.call.apply(n,e)}}var k=F("filter"),D=F("map"),W=F("slice"),q=F("splice"),H=F("unshift"),U=F("forEach"),G=F("indexOf"),B=F("some"),j=F("reverse"),z=F("reduce"),Y=F("concat"),K=F("join");function X(e,t){if(d.nativeMethods.arrayFind)return d.nativeMethods.arrayFind.call(e,t);for(var n=e.length,o=0;o<n;o++)if(t(e[o],o,e))return e[o];return null}var J=Object.freeze({__proto__:null,filter:k,map:D,slice:W,splice:q,unshift:H,forEach:U,indexOf:G,some:B,reverse:j,reduce:z,concat:Y,join:K,isArray:function(e){return"[object Array]"===d.nativeMethods.objectToString.call(e)},from:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(d.nativeMethods.arrayFrom)return d.nativeMethods.arrayFrom.apply(d.nativeMethods,y([e],t,!1));for(var o=[],r=e.length,i=0;i<r;i++)o.push(e[i]);return o},find:X,remove:function(e,t){var n=d.nativeMethods.arrayIndexOf.call(e,t);-1<n&&d.nativeMethods.arraySplice.call(e,n,1)},equals:function(e,t){if(e.length!==t.length)return!1;for(var n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!1;return!0},getCommonElement:function(e,t){for(var n=0;n<e.length;n++)for(var o=0;o<t.length;o++)if(e[n]===t[o])return e[n];return null}}),$=f.utils.browser,Q=f.nativeMethods,Z=f.utils.style.get,ee=f.utils.dom.getActiveElement,te=f.utils.dom.findDocument,ne=f.utils.dom.find,oe=f.utils.dom.isElementInDocument,re=f.utils.dom.isElementInIframe,ie=f.utils.dom.getIframeByElement,se=f.utils.dom.isCrossDomainWindows,ae=f.utils.dom.getSelectParent,le=f.utils.dom.getChildVisibleIndex,ue=f.utils.dom.getSelectVisibleChildren,ce=f.utils.dom.isElementNode,de=f.utils.dom.isTextNode,fe=f.utils.dom.isRenderedNode,he=f.utils.dom.isIframeElement,pe=f.utils.dom.isInputElement,me=f.utils.dom.isButtonElement,ge=f.utils.dom.isFileInput,ve=f.utils.dom.isTextAreaElement,Ee=f.utils.dom.isAnchorElement,ye=f.utils.dom.isImgElement,be=f.utils.dom.isFormElement,we=f.utils.dom.isLabelElement,_e=f.utils.dom.isSelectElement,Se=f.utils.dom.isRadioButtonElement,Ce=f.utils.dom.isColorInputElement,Te=f.utils.dom.isCheckboxElement,xe=f.utils.dom.isOptionElement,Me=f.utils.dom.isSVGElement,Pe=f.utils.dom.isMapElement,Ie=f.utils.dom.isBodyElement,Ne=f.utils.dom.isHtmlElement,Re=f.utils.dom.isDocument,Oe=f.utils.dom.isWindow,Ae=f.utils.dom.isTextEditableInput,Le=f.utils.dom.isTextEditableElement,Ve=f.utils.dom.isTextEditableElementAndEditingAllowed,Fe=f.utils.dom.isContentEditableElement,ke=f.utils.dom.isDomElement,De=f.utils.dom.isShadowUIElement,We=f.utils.dom.isShadowRoot,qe=f.utils.dom.isElementFocusable,He=f.utils.dom.isHammerheadAttr,Ue=f.utils.dom.isElementReadOnly,Ge=f.utils.dom.getScrollbarSize,Be=f.utils.dom.getMapContainer,je=f.utils.dom.getTagName,ze=f.utils.dom.closest,Ye=f.utils.dom.getParents,Ke=f.utils.dom.findParent,Xe=f.utils.dom.getTopSameDomainWindow,Je=f.utils.dom.getParentExceptShadowRoot;function $e(e,t){var n,o={el:n=e,skip:n.shadowRoot&&n.tabIndex<0,children:{}};if(e=e.shadowRoot||e,he(e)&&(e=Q.contentDocumentGetter.call(e)),e&&(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE||e.nodeType===Node.DOCUMENT_NODE))for(var r=0,i=function(e){for(var t,n=e.querySelectorAll("*"),o=function(e){for(var t=[],n=0;n<e.length;n++)"none"===Z(e[n],"display")&&t.push(e[n]);return t}(n),r=/^(input|button|select|textarea)$/,i=[],s=null,a=null,l=null,u=!1,c=0;c<n.length;c++){s=n[c],a=je(s),l=Qe(s),u=!1,function(e,t,n){var o=null;return t.nodeType===Node.DOCUMENT_NODE&&(o=Q.documentActiveElementGetter.call(t)),e===o||!(e.disabled||"none"===Z(e,"display")||"hidden"===Z(e,"visibility")||($.isIE||$.isAndroid)&&xe(e)||null!==n&&n<0)}(s,e,l)&&(r.test(a)||s.shadowRoot||he(s)?u=!0:Ee(s)&&s.hasAttribute("href")&&(u=""!==s.getAttribute("href")||!$.isIE||null!==l),""!==(t=s.getAttribute("contenteditable"))&&"true"!==t||(u=!0),null!==l&&(u=!0),u&&i.push(s))}return k(i,function(e){return!Ze(o,e)})}(e);r<i.length;r++){var s=i[r],a=!t||s.tabIndex<=0?-1:s.tabIndex;o.children[a]=o.children[a]||[],o.children[a].push($e(s,t))}return o}function Qe(e){var t=Q.getAttribute.call(e,"tabindex");return null!==t&&(t=parseInt(t,10),t=isNaN(t)?null:t),t}function Ze(e,t){return e.contains?e.contains(t):B(e,function(e){return e.contains(t)})}function et(e,t){if(tt(t,e))return!0;for(var n=Q.nodeChildNodesGetter.call(e),o=it(n),r=0;r<o;r++){var i=n[r];if(!De(i)&&et(i,t))return!0}return!1}function tt(e,t){return e&&t&&e.isSameNode?e.isSameNode(t):e===t}function nt(t){if(!t.setTimeout)return!1;var e=null;try{e=t.frameElement}catch(e){return!!t.top}return!(!$.isFirefox&&!$.isWebKit||t.top===t||e)||!(!e||!Q.contentDocumentGetter.call(e))}function ot(e){try{return e.top===e}catch(e){return!1}}function rt(e){var t=[];ne(ls,"*",function(e){"IFRAME"===e.tagName&&t.push(e),e.shadowRoot&&ne(e.shadowRoot,"iframe",function(e){return t.push(e)})});for(var n=0;n<t.length;n++)if(Q.contentWindowGetter.call(t[n])===e)return t[n];return null}function it(e){return Q.nodeListLengthGetter.call(e)}function st(e){return Q.inputValueGetter.call(e)}function at(e){return Q.textAreaValueGetter.call(e)}function lt(e,t){return Q.inputValueSetter.call(e,t)}function ut(e,t){return Q.textAreaValueSetter.call(e,t)}function ct(e){return pe(e)?st(e):ve(e)?at(e):e.value}function dt(e){return e&&e.getRootNode&&te(e)!==e.getRootNode()}var ft=Object.freeze({__proto__:null,getActiveElement:ee,findDocument:te,find:ne,isElementInDocument:oe,isElementInIframe:re,getIframeByElement:ie,isCrossDomainWindows:se,getSelectParent:ae,getChildVisibleIndex:le,getSelectVisibleChildren:ue,isElementNode:ce,isTextNode:de,isRenderedNode:fe,isIframeElement:he,isInputElement:pe,isButtonElement:me,isFileInput:ge,isTextAreaElement:ve,isAnchorElement:Ee,isImgElement:ye,isFormElement:be,isLabelElement:we,isSelectElement:_e,isRadioButtonElement:Se,isColorInputElement:Ce,isCheckboxElement:Te,isOptionElement:xe,isSVGElement:Me,isMapElement:Pe,isBodyElement:Ie,isHtmlElement:Ne,isDocument:Re,isWindow:Oe,isTextEditableInput:Ae,isTextEditableElement:Le,isTextEditableElementAndEditingAllowed:Ve,isContentEditableElement:Fe,isDomElement:ke,isShadowUIElement:De,isShadowRoot:We,isElementFocusable:qe,isHammerheadAttr:He,isElementReadOnly:Ue,getScrollbarSize:Ge,getMapContainer:Be,getTagName:je,closest:ze,getParents:Ye,findParent:Ke,getTopSameDomainWindow:Xe,getParentExceptShadowRoot:Je,getFocusableElements:function(e,t){return void 0===t&&(t=!1),function e(t){var n,o=[];for(n in t.skip||t.el.nodeType===Node.DOCUMENT_NODE||he(t.el)||o.push(t.el),t.children)for(var r=0,i=t.children[n];r<i.length;r++){var s=i[r];o.push.apply(o,e(s))}return o}($e(e,t))},getTabIndexAttributeIntValue:Qe,containsElement:Ze,getTextareaIndentInLine:function(e,t){var n=at(e);if(!n)return 0;var o=n.substring(0,t);return t-(-1===o.lastIndexOf("\n")?0:o.lastIndexOf("\n")+1)},getTextareaLineNumberByPosition:function(e,t){for(var n=at(e).split("\n"),o=0,r=0,i=0;o<=t;i++){if(t<=o+n[i].length){r=i;break}o+=n[i].length+1}return r},getTextareaPositionByLineAndOffset:function(e,t,n){for(var o=at(e).split("\n"),r=0,i=0;i<t;i++)r+=o[i].length+1;return r+n},blocksImplicitSubmission:function(e){return($.isSafari?/^(text|password|color|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:$.isFirefox?/^(text|password|date|time|datetime|datetime-local|email|month|number|search|tel|url|week|image)$/i:$.isIE?/^(text|password|color|date|time|datetime|datetime-local|email|file|month|number|search|tel|url|week|image)$/i:/^(text|password|datetime|email|number|search|tel|url|image)$/i).test(e.type)},isEditableElement:function(e,t){return t?Ve(e)||Fe(e):Le(e)||Fe(e)},isElementContainsNode:et,isOptionGroupElement:function(e){return"[object HTMLOptGroupElement]"===f.utils.dom.instanceToString(e)},getElementIndexInParent:function(e,t){var n=e.querySelectorAll(je(t));return G(n,t)},isTheSameNode:tt,getElementDescription:function(e){var t,n,o={id:"id",name:"name",class:"className"},r=[];for(t in r.push("<"),r.push(je(e)),o)!o.hasOwnProperty(t)||(n=e[o[t]])&&r.push(" "+t+'="'+n+'"');return r.push(">"),r.join("")},getFocusableParent:function(e){for(var t=Ye(e),n=0;n<t.length;n++)if(qe(t[n]))return t[n];return null},remove:function(e){e&&e.parentElement&&e.parentElement.removeChild(e)},isIFrameWindowInDOM:nt,isTopWindow:ot,findIframeByWindow:rt,isEditableFormElement:function(e){return Le(e)||_e(e)},getCommonAncestor:function(e,t){if(tt(e,t))return e;for(var n=[e].concat(Ye(e)),o=t;o;){if(-1<G(n,o))return o;o=Q.nodeParentNodeGetter.call(o)}return o},getChildrenLength:function(e){return Q.htmlCollectionLengthGetter.call(e)},getChildNodesLength:it,getInputValue:st,getTextAreaValue:at,setInputValue:lt,setTextAreaValue:ut,getElementValue:ct,setElementValue:function(e,t){return pe(e)?lt(e,t):ve(e)?ut(e,t):e.value=t},isShadowElement:dt,contains:function(t,e){return!(!t||!e)&&(t.contains?t.contains(e):!!Ke(e,!0,function(e){return e===t}))},isNodeEqual:function(e,t){return e===t},getNodeText:function(e){return Q.nodeTextContentGetter.call(e)},getImgMapName:function(e){return e.useMap.substring(1)},getDocumentElement:function(e){return e.document.documentElement},isDocumentElement:function(e){return e===ls.documentElement}}),ht=f.Promise,pt=f.nativeMethods,mt=f.eventSandbox.listeners,gt=f.utils.browser,vt=f.utils.event.BUTTON,Et=f.utils.event.BUTTONS_PARAMETER,yt=f.utils.event.DOM_EVENTS,bt=f.utils.event.WHICH_PARAMETER,wt=f.utils.event.preventDefault;function _t(e,t,n,o){gt.isIE11&&Oe(e)?pt.windowAddEventListener.call(e,t,n,o):pt.addEventListener.call(e,t,n,o)}function St(e,t,n,o){gt.isIE11&&Oe(e)?pt.windowRemoveEventListener.call(e,t,n,o):pt.removeEventListener.call(e,t,n,o)}function Ct(){var n=[],e=!1;function t(){e||(ls.body?(e=!0,n.forEach(function(e){return e()})):pt.setTimeout.call(as,t,1))}function o(){(nt(as)||ot(as))&&(St(ls,"DOMContentLoaded",o),t())}return"complete"===ls.readyState?pt.setTimeout.call(as,o,1):_t(ls,"DOMContentLoaded",o),{then:function(e){return t=e,new ht(function(e){return n.push(function(){return e(t())})});var t}}}var Tt,xt,Mt=Object.freeze({__proto__:null,BUTTON:vt,BUTTONS_PARAMETER:Et,DOM_EVENTS:yt,WHICH_PARAMETER:bt,preventDefault:wt,bind:_t,unbind:St,documentReady:function(e){return void 0===e&&(e=0),Ct().then(function(){return mt.getEventListeners(as,"load").length?ht.race([new ht(function(e){return _t(as,"load",e)}),u(e)]):null})}});(xt=Tt=Tt||{}).ready="ready",xt.readyForBrowserManipulation="ready-for-browser-manipulation",xt.waitForFileDownload="wait-for-file-download";var Pt=Tt,It=f.Promise,Nt=f.utils.browser,Rt=f.nativeMethods,Ot=f.transport,At=30,Lt=500,Vt=!1,Ft=null,kt=!1;function Dt(){if(Nt.isIE)return function(e){qt&&Rt.clearTimeout.call(as,qt),Wt=!0,qt=Rt.setTimeout.call(as,function(){qt=null,Wt=!1,Ht.forEach(function(e){return e()}),Ht=[]},e)}(At),void u(0).then(function(){var e;"loading"===ls.readyState&&((e=Rt.documentActiveElementGetter.call(ls))&&Ee(e)&&e.hasAttribute("download")||(Vt=!0))});Vt=!0}var Wt=!1,qt=null,Ht=[],Ut=Object.freeze({__proto__:null,init:function(){f.on(f.EVENTS.beforeUnload,Dt),_t(as,"unload",function(){Vt=!0})},watchForPageNavigationTriggers:function(){Ft=function(){kt=!0},f.on(f.EVENTS.pageNavigationTriggered,Ft)},wait:function(e){void 0===e&&(e=!Ft||kt?400:0),Ft&&(f.off(f.EVENTS.pageNavigationTriggered,Ft),Ft=null);var t=u(e).then(function(){return Vt?u(Lt).then(function(){return Ot.queuedAsyncServiceMsg({cmd:Pt.waitForFileDownload})}).then(function(e){if(!e)return new It(function(){})}).then(function(){Vt=!1}):Wt?new It(function(e){return Ht.push(e)}):void 0}),n=u(15e3).then(function(){Vt=!1});return It.race([t,n])}}),Gt=b,Bt=Object.freeze({__proto__:null,EventEmitter:Gt,inherit:function(e,t){function n(){}n.prototype=t.prototype,f.utils.extend(e.prototype,new n),(e.prototype.constructor=e).base=t.prototype}}),jt=d.eventSandbox.listeners;function zt(){this.initialized=!1,this.stopPropagationFlag=!1,this.events=new Gt}var Yt=(zt.prototype._internalListener=function(e,t,n,o,r){this.events.emit("scroll",e),this.stopPropagationFlag&&(o(),r())},zt.prototype.init=function(){var n=this;this.initialized||(this.initialized=!0,jt.initElementListening(as,["scroll"]),jt.addFirstInternalEventBeforeListener(as,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n._internalListener.apply(n,e)}))},zt.prototype.waitForScroll=function(e){var t=this,n=null,o=new d.Promise(function(e){n=e});return o.cancel=function(){return t.events.off("scroll",n)},this.initialized?this.handleScrollEvents(e,n):n(),o},zt.prototype.handleScrollEvents=function(n,e){var o=this;this.events.once("scroll",e),dt(n)&&(jt.initElementListening(n,["scroll"]),jt.addFirstInternalEventBeforeListener(n,["scroll"],function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o._internalListener.apply(o,e),jt.cancelElementListening(n)}))},zt.prototype.stopPropagation=function(){this.stopPropagationFlag=!0},zt.prototype.enablePropagation=function(){this.stopPropagationFlag=!1},new zt),Kt=(Xt.create=function(e){return new Xt(e.top,e.right,e.bottom,e.left)},Xt.prototype.add=function(e){return this.top+=e.top,this.right+=e.right,this.bottom+=e.bottom,this.left+=e.left,this},Xt.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},Xt.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},Xt.prototype.contains=function(e){return e.x>=this.left&&e.x<=this.right&&e.y>=this.top&&e.y<=this.bottom},Xt);function Xt(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 Jt=f.utils.style,$t=f.utils.style.getBordersWidth,Qt=f.utils.style.getComputedStyle,Zt=f.utils.style.getElementMargin,en=f.utils.style.getElementPadding,tn=f.utils.style.getElementScroll,nn=f.utils.style.getOptionHeight,on=f.utils.style.getSelectElementSize,rn=f.utils.style.isElementVisible,sn=f.utils.style.isVisibleChild,an=f.utils.style.getWidth,ln=f.utils.style.getHeight,un=f.utils.style.getInnerWidth,cn=f.utils.style.getInnerHeight,dn=f.utils.style.getScrollLeft,fn=f.utils.style.getScrollTop,hn=f.utils.style.setScrollLeft,pn=f.utils.style.setScrollTop,mn=f.utils.style.get;function gn(e,t,n){return e<t?n:e<n?t:Math.max(n,t)}function vn(e){return!fe(e)||!!Ke(e,!0,function(e){return ce(e)&&"none"===Jt.get(e,"display")})||!!Ke(e,!0,function(e){return ce(e)&&"hidden"===Jt.get(e,"visibility")})}function En(e){return e&&!(e.offsetHeight<=0&&e.offsetWidth<=0)}function yn(e){return ce(e)&&"fixed"===Jt.get(e,"position")}var bn=Object.freeze({__proto__:null,getBordersWidth:$t,getComputedStyle:Qt,getElementMargin:Zt,getElementPadding:en,getElementScroll:tn,getOptionHeight:nn,getSelectElementSize:on,isElementVisible:rn,isSelectVisibleChild:sn,getWidth:an,getHeight:ln,getInnerWidth:un,getInnerHeight:cn,getScrollLeft:dn,getScrollTop:fn,setScrollLeft:hn,setScrollTop:pn,get:mn,set:function(e,t,n){for(var o in"string"==typeof t&&Jt.set(e,t,n),t)t.hasOwnProperty(o)&&Jt.set(e,o,t[o])},getViewportDimensions:function(){return{width:gn(as.innerWidth,ls.documentElement.clientWidth,ls.body.clientWidth),height:gn(as.innerHeight,ls.documentElement.clientHeight,ls.body.clientHeight)}},getWindowDimensions:function(e){return new Kt(0,an(e),ln(e),0)},isNotVisibleNode:vn,hasDimensions:En,isFixedElement:yn}),wn=d.utils.browser,_n=d.eventSandbox.listeners,Sn=d.eventSandbox.eventSimulator,Cn=["click","mousedown","mouseup","dblclick","contextmenu","mousemove","mouseover","mouseout","touchstart","touchmove","touchend","keydown","keypress","input","keyup","change","focus","blur","MSPointerDown","MSPointerMove","MSPointerOver","MSPointerOut","MSPointerUp","pointerdown","pointermove","pointerover","pointerout","pointerup"],Tn=123;function xn(e,t,n,o,r){var i,s=d.nativeMethods.eventTargetGetter.call(e)||e.srcElement;if(!t&&!De(s)){if(/^key/.test(e.type)&&((i=e).shiftKey&&i.ctrlKey||(i.altKey||i.metaKey)&&wn.isMacPlatform||i.keyCode===Tn))return void r();if("blur"===e.type)if(wn.isIE&&wn.version<12){var a,l=Oe(s),u=!l&&"none"===mn(s,"display"),c=!1;l||u||(a=Ye(s),c=k(a,function(e){return"none"===mn(e,"display")})),(u||c.length)&&d.eventSandbox.timers.deferFunction(function(){Sn.blur(s)})}else if(s!==as&&s!==as.document&&!En(s))return;n()}}var Mn=(Pn.create=function(e){return"left"in e?new Pn(e.left,e.top):"right"in e?new Pn(e.right,e.bottom):new Pn(e.x,e.y)},Pn.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},Pn.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},Pn.prototype.round=function(e){return void 0===e&&(e=Math.round),this.x=e(this.x),this.y=e(this.y),this},Pn.prototype.eql=function(e){return this.x===e.x&&this.y===e.y},Pn.prototype.mul=function(e){return this.x*=e,this.y*=e,this},Pn.prototype.distance=function(e){return Math.sqrt(Math.pow(this.x-e.x,2)+Math.pow(this.y-e.y,2))},Pn);function Pn(e,t){this.x=e,this.y=t}var In=/auto|scroll|hidden/i,Nn="visible";function Rn(e){var t,n=mn(e,"overflowX"),o=mn(e,"overflowY"),r=In.test(n),i=In.test(o),s=te(e).documentElement,a=e.scrollHeight;return(d.utils.browser.isChrome||d.utils.browser.isFirefox||d.utils.browser.isSafari)&&(t=e.getBoundingClientRect().top,a=a-s.getBoundingClientRect().top+t),(r||i)&&a>s.scrollHeight}function On(e){if(Ie(e))return Rn(e);if(Ne(e))return function(e){var t=mn(e,"overflowX"),n=mn(e,"overflowY");if("hidden"===t&&"hidden"===n)return!1;var o=e.scrollHeight>e.clientHeight,r=e.scrollWidth>e.clientWidth;if(o||r)return!0;var i=e.getElementsByTagName("body")[0];if(!i)return!1;if(Rn(i))return!1;var s=Math.min(e.clientWidth,i.clientWidth),a=Math.min(e.clientHeight,i.clientHeight);return i.scrollHeight>a||i.scrollWidth>s}(e);var t,n,o,r,i,s=(n=mn(t=e,"overflowX"),o=mn(t,"overflowY"),r=In.test(n),i=In.test(o),d.utils.browser.isIE&&(r=r||i&&n===Nn,i=i||r&&o===Nn),new Mn(r,i));if(!s.x&&!s.y)return!1;var a=s.y&&e.scrollHeight>e.clientHeight;return s.x&&e.scrollWidth>e.clientWidth||a}function An(e){var t,n,o=Ye(e);return!re(e)||(t=ie(e))&&(n=Ye(t),o.concat(n)),d.nativeMethods.arrayFilter.call(o,On)}var Ln=Object.freeze({__proto__:null,hasScroll:On,getScrollableParents:An}),Vn=function(e,t,n,o,r,i){this.width=e,this.height=t,this.left=n.x,this.top=n.y,this.right=n.x+e,this.bottom=n.y+t,this.border=o,this.scrollbar=i,this.scroll=r},Fn=f.utils.position.getElementRectangle,kn=f.utils.position.getOffsetPosition,Dn=f.utils.position.offsetToClientCoords;function Wn(e){var t,n,o,r,i=Ne(e),s=i?e.getElementsByTagName("body")[0]:null,a=e.getBoundingClientRect(),l=Kt.create($t(e)),u=tn(e),c=re(e),d="BackCompat"===e.ownerDocument.compatMode,f=i?new Mn(0,0):Mn.create(a),h=a.height,p=a.width;i&&(p=s&&d?(h=s.clientHeight,s.clientWidth):(h=e.clientHeight,e.clientWidth)),!c||(t=ie(e))&&(n=kn(t),o=Dn(Mn.create(n)),r=$t(t),f.add(o).add(Mn.create(r)),i&&l.add(r));var m=!i&&un(e)!==e.clientWidth,g=!i&&cn(e)!==e.clientHeight,v={right:m?Ge():0,bottom:g?Ge():0};return new Vn(p,h,f,l,u,v)}function qn(e){var t=e.x,n=e.y,o=ls.getElementFromPoint||ls.elementFromPoint,r=null;try{r=o.call(ls,t,n)}catch(e){return null}for(null===r&&(r=o.call(ls,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 Hn(e,t){return Kt.create({top:e.top-t.top,left:e.left-t.left,right:t.right-e.right,bottom:t.bottom-e.bottom}).sub(t.border).sub(t.scrollbar).round(Math.ceil,Math.floor)}function Un(e){var t=/^touch/.test(e.type)&&e.targetTouches?e.targetTouches[0]||e.changedTouches[0]:e,n=0===t.pageX&&0===t.pageY,o=0!==t.clientX||0!==t.clientY;if((null===t.pageX||n&&o)&&null!==t.clientX){var r=te(e.target||e.srcElement),i=r.documentElement,s=r.body;return new Mn(Math.round(t.clientX+(i&&i.scrollLeft||s&&s.scrollLeft||0)-(i.clientLeft||0)),Math.round(t.clientY+(i&&i.scrollTop||s&&s.scrollTop||0)-(i.clientTop||0)))}return new Mn(Math.round(t.pageX),Math.round(t.pageY))}function Gn(e){return"hidden"===mn(e,"visibility")||"none"===mn(e,"display")}function Bn(e){var t=Fn(e);return 0===t.width||0===t.height}var jn=Object.freeze({__proto__:null,getElementRectangle:Fn,getOffsetPosition:kn,offsetToClientCoords:Dn,getClientDimensions:Wn,getElementFromPoint:qn,calcRelativePosition:Hn,getIframeClientCoordinates:function(e){var t=kn(e),n=t.left,o=t.top,r=Dn({x:n,y:o}),i=$t(e),s=en(e),a=r.x+i.left+s.left,l=r.y+i.top+s.top;return new Kt(l,a+an(e),l+ln(e),a)},containsOffset:function(e,t,n){var o=Wn(e),r=Math.max(e.scrollWidth,o.width),i=Math.max(e.scrollHeight,o.height),s=o.scrollbar.right+o.border.left+o.border.right+r,a=o.scrollbar.bottom+o.border.top+o.border.bottom+i;return(void 0===t||0<=t&&t<=s)&&(void 0===n||0<=n&&n<=a)},getEventAbsoluteCoordinates:function(e){var t,n,o,r=e.target||e.srcElement,i=Un(e),s=te(r),a=0,l=0;return!re(s.documentElement)||(t=ie(s))&&(n=kn(t),o=$t(t),a=n.left+o.left,l=n.top+o.top),new Mn(i.x+a,i.y+l)},getEventPageCoordinates:Un,getIframePointRelativeToParentFrame:function(e,t){var n=rt(t),o=kn(n),r=$t(n),i=en(n);return Dn({x:e.x+o.left+r.left+i.left,y:e.y+o.top+r.top+i.top})},findCenter:function(e){var t=Fn(e);return new Mn(Math.round(t.left+t.width/2),Math.round(t.top+t.height/2))},getClientPosition:function(e){var t=kn(e),n=t.left,o=t.top,r=Dn({x:n,y:o});return r.x=Math.round(r.x),r.y=Math.round(r.y),r},isInRectangle:function(e,t){var n=e.x,o=e.y;return n>=t.left&&n<=t.right&&o>=t.top&&o<=t.bottom},getWindowPosition:function(){var e=as.screenLeft||as.screenX,t=as.screenTop||as.screenY;return new Mn(e,t)},isIframeVisible:function(e){return!Gn(e)},isElementVisible:function e(t){if(de(t))return!vn(t);if(!Fe(t)&&!Me(t)&&Bn(t))return!1;if(Pe(t)){var n=Be(ze(t,"map"));return!!n&&e(n)}if(sn(t)){var o=ae(t),r=le(o,t),i=on(o),s=Math.max(fn(o)/nn(o),0),a=s+i-1,l=Math.max(r-s,0);return s<=l&&l<=a}return Me(t)?!Ke(t,!0,Gn)&&!Bn(t):En(t)&&!Gn(t)}});function zn(n,o){return v(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<n?[4,o(t)]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}var Yn=Object.freeze({__proto__:null,whilst:function(t,n){return v(this,void 0,void 0,function(){return E(this,function(e){switch(e.label){case 0:return t()?[4,n()]:[3,2];case 1:return e.sent(),[3,0];case 2:return[2]}})})},times:zn,each:function(r,i){return v(this,void 0,void 0,function(){var t,n,o;return E(this,function(e){switch(e.label){case 0:t=0,n=r,e.label=1;case 1:return t<n.length?(o=n[t],[4,i(o)]):[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})})}}),Kn=f.Promise,Xn=f.eventSandbox.message;function Jn(e,o,t){return new Kn(function(n){Xn.on(Xn.SERVICE_MSG_RECEIVED_EVENT,function e(t){t.message.cmd===o&&(Xn.off(Xn.SERVICE_MSG_RECEIVED_EVENT,e),n(t.message))}),Xn.sendServiceMsg(e,t)})}var $n=(Qn._isScrollValuesChanged=function(e,t){return dn(e)!==t.left||fn(e)!==t.top},Qn.prototype._setScroll=function(e,t){var n=this,o=t.left,r=t.top,i=Ne(e)?te(e):e,s={left:dn(i),top:fn(i)},o=Math.max(o,0),r=Math.max(r,0),a=Yt.waitForScroll(i);return hn(i,o),pn(i,r),Qn._isScrollValuesChanged(i,s)?a=a.then(function(){n._scrollWasPerformed||(n._scrollWasPerformed=Qn._isScrollValuesChanged(i,s))}):(a.cancel(),d.Promise.resolve())},Qn.prototype._getScrollToPoint=function(e,t,n){var o=Math.floor(e.width/2),r=Math.floor(e.height/2),i=this._scrollToCenter?o:Math.min(n.left,o),s=this._scrollToCenter?r:Math.min(n.top,r),a=e.scroll,l=a.left,u=a.top,c=t.x>=l+e.width-i,d=t.x<=l+i,f=t.y>=u+e.height-s,h=t.y<=u+s;return c?l=t.x-e.width+i:d&&(l=t.x-i),f?u=t.y-e.height+s:h&&(u=t.y-s),{left:l,top:u}},Qn.prototype._getScrollToFullChildView=function(e,t,n){var o,r,i,s,a={left:null,top:null},l=e.width>=t.width,u=e.height>=t.height,c=Hn(t,e);return l&&(o=e.width-t.width,r=Math.min(n.left,o),this._scrollToCenter&&(r=o/2),c.left<r?a.left=Math.round(e.scroll.left+c.left-r):c.right<r&&(a.left=Math.round(e.scroll.left+Math.min(c.left,-c.right)+r))),u&&(i=e.height-t.height,s=Math.min(n.top,i),this._scrollToCenter&&(s=i/2),c.top<s?a.top=Math.round(e.scroll.top+c.top-s):c.bottom<s&&(a.top=Math.round(e.scroll.top+Math.min(c.top,-c.bottom)+s))),a},Qn._getChildPoint=function(e,t,n){return Mn.create(t).sub(Mn.create(e)).add(Mn.create(e.scroll)).add(Mn.create(t.border)).add(n)},Qn.prototype._getScrollPosition=function(e,t,n,o){var r=Qn._getChildPoint(e,t,n),i=this._getScrollToPoint(e,r,o),s=this._getScrollToFullChildView(e,t,o);return{left:Math.max(null===s.left?i.left:s.left,0),top:Math.max(null===s.top?i.top:s.top,0)}},Qn._getChildPointAfterScroll=function(e,t,n,o){return Mn.create(t).add(Mn.create(e.scroll)).sub(Mn.create(n)).add(o)},Qn.prototype._isChildFullyVisible=function(e,t,n){var o=Qn._getChildPointAfterScroll(e,t,e.scroll,n),r=this._getScrollPosition(e,t,n,{left:0,top:0}),i=r.left,s=r.top;return!this._isTargetElementObscuredInPoint(o)&&i===e.scroll.left&&s===e.scroll.top},Qn.prototype._scrollToChild=function(e,t,n){for(var o=Wn(e),r=Wn(t),i=un(as),s=cn(as),a=o.scroll,l=!this._isChildFullyVisible(o,r,n);l;){a=this._getScrollPosition(o,r,n,this._maxScrollMargin);var u=Qn._getChildPointAfterScroll(o,r,a,n),c=this._isTargetElementObscuredInPoint(u);this._maxScrollMargin.left+=20,this._maxScrollMargin.left>=i&&(this._maxScrollMargin.left=50,this._maxScrollMargin.top+=20),l=c&&this._maxScrollMargin.top<s}return this._maxScrollMargin={left:50,top:50},this._setScroll(e,a)},Qn.prototype._scrollElement=function(){if(!On(this._element))return d.Promise.resolve();var e=Wn(this._element),t=this._getScrollToPoint(e,this._offsets,this._maxScrollMargin);return this._setScroll(this._element,t)},Qn.prototype._scrollParents=function(){var t,n,o=this,r=An(this._element),i=this._element,e=dn(i),s=fn(i),a=Mn.create(this._offsets).sub(new Mn(e,s).round()),l=zn(r.length,function(e){return o._scrollToChild(r[e],i,a).then(function(){t=Wn(i),n=Wn(r[e]),a.add(Mn.create(t)).sub(Mn.create(n)).add(Mn.create(n.border)),i=r[e]})}),u={scrollWasPerformed:this._scrollWasPerformed,offsetX:a.x,offsetY:a.y,maxScrollMargin:this._maxScrollMargin};return l.then(function(){var e;if(!o._skipParentFrames&&(e=as).top!==e)return u.cmd=Qn.SCROLL_REQUEST_CMD,Jn(u,Qn.SCROLL_RESPONSE_CMD,as.parent)}).then(function(){return o._scrollWasPerformed})},Qn._getFixedAncestorOrSelf=function(e){return Ke(e,!0,yn)},Qn.prototype._isTargetElementObscuredInPoint=function(e){var t=qn(e);if(!t)return!1;var n=Qn._getFixedAncestorOrSelf(t);return!!n&&!n.contains(this._element)},Qn.prototype.run=function(){var e=this;return this._scrollElement().then(function(){return e._scrollParents()})},Qn.SCROLL_REQUEST_CMD="automation|scroll|request",Qn.SCROLL_RESPONSE_CMD="automation|scroll|response",Qn);function Qn(e,t,n){this._element=e,this._offsets=new Mn(t.offsetX,t.offsetY),this._scrollToCenter=!!t.scrollToCenter,this._skipParentFrames=!!t.skipParentFrames,this._maxScrollMargin=n||{left:50,top:50},this._scrollWasPerformed=!1}function Zn(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return!it(t)&&po(e)?e:X(t,po)}function eo(e){return X(d.nativeMethods.nodeChildNodesGetter.call(e),function(e){return po(e)||!mo(e)&&eo(e)})}function to(e){return de(e)||ce(e)&&rn(e)}function no(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return k(t,to)}function oo(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return B(t,to)}function ro(e){var t=d.nativeMethods.nodeChildNodesGetter.call(e);return B(t,function(e){return Co(e,!0)})}function io(e,t){var n,o;if(!De(e)&&!De(t)){var r=d.nativeMethods.nodeChildNodesGetter.call(t);return!tt(t,e)&&it(r)&&/div|p/.test(je(t))&&(n=eo(e))&&!tt(t,n)&&(o=lo(n))&&!tt(t,o)&&Zn(t)}}function so(e,t){var n,o,r,i=fe(t);if(!De(e)&&!De(t)){var s=d.nativeMethods.nodeChildNodesGetter.call(t);if(!tt(t,e)&&(i&&ce(t)&&it(s)&&!/div|p/.test(je(t))||po(t)&&!tt(t,e)&&t.nodeValue.length)){if(i&&ce(t)){if(!(n=eo(e))||tt(t,n))return;if(!(o=lo(n))||tt(t,o))return}return(r=function(e){for(var t=null,n=e;!t&&(n=n.previousSibling);)if(!mo(n)&&!ho(n)){t=n;break}return t}(t))&&ce(r)&&/div|p/.test(je(r))&&Zn(r)}}}function ao(e,t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=it(r),s=null,a=t?po:de;if(!i&&a(e))return e;for(var l=0;l<i;l++){if(n=r[l],o=ce(n)&&!Fe(n),a(n))return n;if(fe(n)&&oo(n)&&!o&&(s=ao(n,t)))return s}return s}function lo(e){return ao(e,!0)}function uo(e,t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=it(r),s=null;if(!i&&po(e))return e;for(var a=i-1;0<=a;a--){if(n=r[a],o=ce(n)&&!Fe(n),de(n)&&(!t||!ho(n)))return n;if(fe(n)&&oo(n)&&!o&&(s=uo(n,!1)))return s}return s}function co(e,t){if(!e||!e.length)return 0;for(var n=e.length,o=t||0,r=o;r<n&&(10===e.charCodeAt(r)||32===e.charCodeAt(r));r++)o++;return o}function fo(e){if(!e||!e.length)return 0;for(var t=e.length,n=t,o=t-1;0<=o&&(10===e.charCodeAt(o)||32===e.charCodeAt(o));o--)n--;return n}function ho(e){if(!de(e))return!1;var t=e.nodeValue,n=co(t),o=fo(t);return n===t.length&&0===o}function po(e){return de(e)&&!ho(e)}function mo(e){return!fe(e)||De(e)}function go(e){var t=e.getAttribute?e.getAttribute("contenteditable"):null;return""===t||"true"===t}function vo(e){var t=Ye(e);if(go(e)&&Fe(e))return e;var n=te(e);return"on"===n.designMode?n.body:X(t,function(e){return go(e)&&Fe(e)})}function Eo(e,t){if(tt(e,t))return tt(t,vo(e))?e:d.nativeMethods.nodeParentNodeGetter.call(e);var n=[],o=vo(e),r=null;if(!et(o,t))return null;for(r=e;r!==o;r=d.nativeMethods.nodeParentNodeGetter.call(r))n.push(r);for(r=t;r!==o;r=d.nativeMethods.nodeParentNodeGetter.call(r))if(-1!==G(n,r))return r;return o}function yo(e,t){var n=null,o=null,r=d.nativeMethods.nodeChildNodesGetter.call(e),i=it(r),s=i<=t;if(De(e))return{node:e,offset:t};if(s?n=r[i-1]:(n=r[t],o=0),De(n)){if(i<=1)return{node:e,offset:0};(s=i<=t-1)?n=r[i-2]:(n=r[t-1],o=0)}for(;!mo(n)&&ce(n);){var a=no(n);if(!a.length){o=0;break}n=a[s?a.length-1:0]}return 0===o||mo(n)||(o=n.nodeValue?n.nodeValue.length:0),{node:n,offset:o}}function bo(e,t,n){var o=n?t.focusNode:t.anchorNode,r=n?t.focusOffset:t.anchorOffset,i={node:o,offset:r};return(tt(e,o)||ce(o))&&ro(o)&&(i=yo(o,r)),{node:i.node,offset:i.offset}}function wo(e,t,n){var o=n?t.anchorNode:t.focusNode,r=n?t.anchorOffset:t.focusOffset,i={node:o,offset:r};return(tt(e,o)||ce(o))&&ro(o)&&(i=yo(o,r)),{node:i.node,offset:i.offset}}function _o(e,t,n){return xo(e,bo(e,t,n))}function So(e,t,n){return xo(e,wo(e,t,n))}function Co(e,t){if(vn(e))return!1;if(de(e))return!0;if(!ce(e))return!1;if(ro(e))return t;var n=d.nativeMethods.nodeParentNodeGetter.call(e),o=!Fe(n),r=no(e),i=B(r,function(e){return"br"===je(e)});return o||i}function To(a,e){var l={node:null,offset:e};return function e(t){var n,o,r=d.nativeMethods.nodeChildNodesGetter.call(t),i=it(r);if(l.node)return l;if(mo(t))return l;if(de(t)){if(l.offset<=t.nodeValue.length)return l.node=t,l;t.nodeValue.length&&(!l.node&&so(a,t)&&l.offset--,l.offset-=t.nodeValue.length)}else if(ce(t)){if(!to(t))return l;if(0===l.offset&&Co(t,!1))return l.node=t,l.offset=(n=t,o=0,X(d.nativeMethods.nodeChildNodesGetter.call(n),function(e,t){return o=t,"br"===je(e)})?o:0),l;(l.node||!io(a,t)&&!so(a,t))&&(i||"br"!==je(t))||l.offset--}for(var s=0;s<i;s++)l=e(r[s]);return l}(a)}function xo(i,e){var s=e.node,a=e.offset,l=0,u=!1;return function e(t){var n=d.nativeMethods.nodeChildNodesGetter.call(t),o=it(n);if(u)return l;if(tt(s,t))return(io(i,t)||so(i,t))&&l++,u=!0,l+a;if(mo(t))return l;!o&&t.nodeValue&&t.nodeValue.length?(!u&&so(i,t)&&l++,l+=t.nodeValue.length):(!o&&ce(t)&&"br"===je(t)||!u&&(io(i,t)||so(i,t)))&&l++;for(var r=0;r<o;r++)l=e(n[r]);return l}(i)}function Mo(e){var t,n,o,r,i,s=de(e)?e:uo(e,!0);if(!s||(t=s,o=de(n=e)?n:ao(n,!1),r=t===o,i=t.nodeValue===String.fromCharCode(10),r&&i&&function(e,t){for(var n=["pre","pre-wrap","pre-line"];e!==t;)if(e=d.nativeMethods.nodeParentNodeGetter.call(e),-1<G(n,mn(e,"white-space")))return 1}(t,n)))return 0;var a=te(e).createRange();return a.selectNodeContents(s),xo(e,{node:s,offset:a.endOffset})}var Po=Object.freeze({__proto__:null,getFirstVisibleTextNode:lo,getLastTextNode:uo,getFirstNonWhitespaceSymbolIndex:co,getLastNonWhitespaceSymbolIndex:fo,isInvisibleTextNode:ho,findContentEditableParent:vo,getNearestCommonAncestor:Eo,getSelection:function(e,t,n){return{startPos:bo(e,t,n),endPos:wo(e,t,n)}},getSelectionStartPosition:_o,getSelectionEndPosition:So,calculateNodeAndOffsetByPosition:To,calculatePositionByNodeAndOffset:xo,getElementBySelection:function(e){var t=Eo(e.anchorNode,e.focusNode);return de(t)?t.parentElement:t},getFirstVisiblePosition:function(e){var t=de(e)?e:lo(e),n=te(e).createRange();return t?(n.selectNodeContents(t),xo(e,{node:t,offset:n.startOffset})):0},getLastVisiblePosition:Mo,getContentEditableValue:function(e){return D(function e(t){var n=[],o=d.nativeMethods.nodeChildNodesGetter.call(t),r=it(o);mo(t)||r||!de(t)||n.push(t);for(var i=0;i<r;i++)n=n.concat(e(o[i]));return n}(e),function(e){return e.nodeValue}).join("")}}),Io=f.utils.browser,No=f.nativeMethods,Ro=f.eventSandbox.selection,Oo="backward",Ao="forward",Lo="none",Vo=Lo,Fo=0,ko=0,Do=0,Wo=0,qo=0,Ho=0;function Uo(e,t,n,o){var r,i,s,a=null,l=null,u=!1;void 0!==t&&void 0!==n&&n<t&&(s=t,t=n,n=s,u=!0),void 0===t&&(l={node:(r=lo(e))||e,offset:r&&r.nodeValue?co(r.nodeValue):0}),void 0===n&&(a={node:(i=uo(e,!0))||e,offset:i&&i.nodeValue?fo(i.nodeValue):0}),l=l||To(e,t),a=a||To(e,n),l.node&&a.node&&(u?Ko(a,l,o):Ko(l,a,o))}function Go(e){var t=e?te(e):ls,n=t.getSelection(),o=null,r=!1;return n&&(n.isCollapsed||((o=t.createRange()).setStart(n.anchorNode,n.anchorOffset),o.setEnd(n.focusNode,n.focusOffset),r=o.collapsed,o.detach())),r}function Bo(e,t,n){var o=xo(e,t);return xo(e,n)<o}function jo(e){return Fe(e)?Xo(e)?_o(e,Yo(e),Go(e)):0:Ro.getSelection(e).start}function zo(e){return Fe(e)?Xo(e)?So(e,Yo(e),Go(e)):0:Ro.getSelection(e).end}function Yo(e){var t=te(e);return t?t.getSelection():as.getSelection()}function Ko(e,t,n){var o=e.node,r=t.node,i=o.nodeValue?o.length:0,s=r.nodeValue?r.length:0,a=e.offset,l=t.offset;ce(o)&&a||(a=Math.min(i,e.offset)),ce(r)&&l||(l=Math.min(s,t.offset));var u=vo(o),c=Bo(u,e,t),d=Yo(u),f=te(u).createRange();Ro.wrapSetterSelection(u,function(){var e;d.removeAllRanges(),c?Io.isIE?(f.setStart(r,l),f.setEnd(o,a),d.addRange(f)):(f.setStart(o,a),f.setEnd(o,a),d.addRange(f),e=function(e,t){try{d.extend(e,t)}catch(e){return!1}return!0},(Io.isSafari||Io.isChrome&&Io.version<58)&&ho(r)?e(r,Math.min(l,1))||e(r,0):e(r,l)):(f.setStart(o,a),f.setEnd(r,l),d.addRange(f))},n,!0)}function Xo(e){var t=Yo(e);return!(!t.anchorNode||!t.focusNode)&&et(e,t.anchorNode)&&et(e,t.focusNode)}Io.isIE&&_t(ls,"selectionchange",function(){var e=null,t=null,n=null;try{if(this.selection)t=this.selection.createRange();else{if(!(e=No.documentActiveElementGetter.call(this))||!Le(e))return void(Vo=Lo);var o,r=jo(e),i=zo(e);e.createTextRange?((t=e.createTextRange()).collapse(!0),t.moveStart("character",r),t.moveEnd("character",i-r)):ls.createRange&&(t=ls.createRange(),o=f.nativeMethods.nodeFirstChildGetter.call(e),t.setStart(o,r),t.setEnd(o,i),n=t.getBoundingClientRect())}}catch(e){return void(Vo=Lo)}var s=n?Math.ceil(n.left):t.offsetLeft,a=n?Math.ceil(n.top):t.offsetTop,l=n?Math.ceil(n.height):t.boundingHeight,u=n?Math.ceil(n.width):t.boundingWidth,c=t.htmlText?t.htmlText.length:0;!function(e,t,n,o,r){if(r)switch(Vo){case Lo:t===Ho&&(e===Wo||Do<n)?Vo=Ao:(e<Wo||t<Ho)&&(Vo=Oo);break;case Ao:if(e===Wo&&t===Ho||e<Wo&&Do<n||t===Ho&&n===Do&&qo<r&&e+o!==Fo)break;(e<Wo||t<Ho)&&(Vo=Oo);break;case Oo:if((e<Wo||t<Ho)&&qo<r)break;t===ko&&(Fo<=e||Do<n)&&(Vo=Ao)}else Fo=e,ko=t,Vo=Lo;Do=n,Wo=e,qo=r,Ho=t}(s,a,l,u,n?t.toString().length:c)},!0);var Jo,$o,Qo=Object.freeze({__proto__:null,hasInverseSelectionContentEditable:Go,isInverseSelectionContentEditable:Bo,getSelectionStart:jo,getSelectionEnd:zo,hasInverseSelection:function(e){return Fe(e)?Go(e):(Ro.getSelection(e).direction||Vo)===Oo},getSelectionByElement:Yo,select:function(e,t,n){var o,r,i,s;Fe(e)?Uo(e,t,n,!0):(o=t||0,i=!1,s=null,(r=void 0===n?ct(e).length:n)<o&&(s=o,o=r,r=s,i=!0),Ro.setSelection(e,o,r,i?Oo:Ao),Vo=t===n?Lo:i?Oo:Ao)},selectByNodesAndOffsets:Ko,deleteSelectionContents:function(e,t){var n,o,r,i,s,a,l,u,c,d,f,h,p=jo(e),m=zo(e);t&&Uo(e),p!==m&&(n=Yo(e),o=n.anchorNode,r=n.focusNode,i=n.anchorOffset,s=n.focusOffset,a=co(o.nodeValue),l=fo(o.nodeValue),u=co(r.nodeValue),c=fo(r.nodeValue),f=d=null,de(o)&&(i<a&&0!==i?d=0:i!==o.nodeValue.length&&(ho(o)&&0!==i||l<i)&&(d=o.nodeValue.length)),de(r)&&(s<u&&0!==s?f=0:s!==r.nodeValue.length&&(ho(r)&&0!==s||c<s)&&(f=r.nodeValue.length)),(Io.isWebKit||Io.isIE&&11<Io.version)&&(null!==d&&(o.nodeValue=0===d?o.nodeValue.substring(a):o.nodeValue.substring(0,l)),null!==f&&(r.nodeValue=0===f?r.nodeValue.substring(u):r.nodeValue.substring(0,c))),null===d&&null===f||Ko({node:o,offset:d=null!==d?0===d?d:o.nodeValue.length:i},{node:r,offset:f=null!==f?0===f?f:r.nodeValue.length:s}),function(e){var t=Yo(e),n=t.rangeCount;if(n)for(var o=0;o<n;o++)t.getRangeAt(o).deleteContents()}(e),(h=Yo(e)).rangeCount&&!h.getRangeAt(0).collapsed&&h.getRangeAt(0).collapse(!0))},setCursorToLastVisiblePosition:function(e){var t=Mo(e);Uo(e,t,t)},hasElementContainsSelection:Xo}),Zo=f.Promise,er=f.nativeMethods,tr="E1000",nr="E1001",or="E1002",rr="E1003",ir="E1004",sr="E1005",ar="E1006",lr="E1007",ur="E1008",cr="E1009",dr="E1010",fr="E1011",hr="E1012",pr="E1013",mr="E1014",gr="E1015",vr="E1016",Er="E1017",yr="E1018",br="E1019",wr="E1020",_r="E1021",Sr="E1022",Cr="E1023",Tr="E1024",xr="E1025",Mr="E1026",Pr="E1027",Ir="E1028",Nr="E1029",Rr="E1030",Or="E1031",Ar="E1032",Lr="E1033",Vr="E1034",Fr="E1035",kr="E1036",Dr="E1037",Wr="E1038",qr="E1039",Hr="E1040",Ur="E1041",Gr="E1043",Br="E1044",jr="E1045",zr="E1046",Yr="E1047",Kr="E1048",Xr="E1049",Jr="E1050",$r="E1051",Qr="E1052",Zr="E1053",ei="E1054",ti="E1057",ni="E1058",oi="E1059",ri="E1060",ii="E1061",si="E1062",ai="E1063",li="E1064",ui="E1065",ci="E1066",di="E1067",fi="E1068",hi="E1069",pi="E1070",mi="E1071",gi="E1072",vi="E1073",Ei="E1074",yi="E1075",bi="E1076";($o=Jo=Jo||{}).TooHighConcurrencyFactor="TooHighConcurrencyFactor",$o.UseBrowserInitOption="UseBrowserInitOption",$o.RestErrorCauses="RestErrorCauses";var wi,_i,Si=Jo,Ci=", ",Ti='"';function xi(e,t){return"".concat(t).concat(e).concat(t)}(_i=wi=wi||{}).message="message",_i.stack="stack",_i.pageUrl="pageUrl";var Mi,Pi,Ii=wi,Ni="https://testcafe.io/documentation/402639/reference/command-line-interface#file-pathglob-pattern",Ri="https://testcafe.io/documentation/402638/reference/configuration-file#filter",Oi="https://testcafe.io/documentation/402828/guides/concepts/browsers#test-in-headless-mode",Ai=((Mi={})[tr]="Cannot launch multiple live mode instances of the TestCafe test runner.",Mi[nr]="Cannot launch the same live mode instance of the TestCafe test runner multiple times.",Mi[or]="The {userAgent} browser disconnected. If you did not close the browser yourself, browser performance or network issues may be at fault.",Mi[rr]="The following browsers disconnected: {userAgents}. Cannot run further tests.",Mi[li]='"{browser}" disconnected during test execution.',Mi[ir]="Cannot establish one or more browser connections.",Mi[sr]='Cannot find the browser. "{browser}" is neither a known browser alias, nor a path to an executable file.',Mi[ar]='Cannot find the "{providerName}" browser provider.',Mi[lr]="You have not specified a browser.",Mi[ur]='Could not find test files at the following location: "{cwd}".\nCheck patterns for errors:\n\n{sourceList}\n\nor launch TestCafe from a different directory.\n'+"For more information on how to specify test locations, see ".concat(Ni,"."),Mi[cr]="Source files do not contain valid 'fixture' and 'test' declarations.",Mi[Rr]="No tests match your filter.\n"+"See ".concat(Ri,"."),Mi[dr]='The "{name}" reporter does not exist. Check the reporter parameter for errors.',Mi[fr]='Reporters cannot share output streams. The following reporters interfere with one another: "{reporters}".',Mi[hr]='The "{optionName}" option does not contain a valid regular expression.',Mi[pr]='The "{optionName}" option does not contain a valid key-value pair.',Mi[ui]='The "{optionName}" option does not exist. Specify "attemptLimit" and "successThreshold" to configure quarantine mode.',Mi[ci]='The value of "attemptLimit" ({attemptLimit}) should be greater then the value of "successThreshold" ({successThreshold}).',Mi[di]='The "{attemptLimit}" parameter only accepts values of {MIN_ATTEMPT_LIMIT} and up.',Mi[fi]='The "{successThreshold}" parameter only accepts values of {MIN_SUCCESS_THRESHOLD} and up.',Mi[mr]="Speed should be a number between 0.01 and 1.",Mi[gr]="The concurrency factor should be an integer greater than or equal to 1.",Mi[vr]="The number of remote browsers should be divisible by the concurrency factor.",Mi[hi]='The value of the "concurrency" option includes the CDP port.',Mi[Er]='The "--ports" argument accepts two values at a time.',Mi[yr]="Port {portNum} is occupied by another process.",Mi[br]='Cannot resolve hostname "{hostname}".',Mi[wr]='Cannot find a test file at "{path}".',Mi[_r]="Cannot initialize a ClientFunction because {#instantiationCallsiteName} is {type}, and not a function.",Mi[Sr]="Cannot initialize a Selector because {#instantiationCallsiteName} is {type}, and not one of the following: a CSS selector string, a Selector object, a node snapshot, a function, or a Promise returned by a Selector.",Mi[Cr]="{#instantiationCallsiteName} cannot implicitly resolve the test run in context of which it should be executed. If you need to call {#instantiationCallsiteName} from the Node.js API callback, pass the test controller manually via {#instantiationCallsiteName}'s `.with({ boundTestRun: t })` method first. Note that you cannot execute {#instantiationCallsiteName} outside the test code.",Mi[Ei]="'request' cannot implicitly resolve the test run in context of which it should be executed. Note that you cannot execute 'request' in the experimental debug mode.",Mi[Tr]='{#instantiationCallsiteName} code, arguments or dependencies cannot contain generators or "async/await" syntax (use Promises instead).',Mi[xr]='Cannot resolve the "boundTestRun" option because its value is not a test controller.',Mi[Mr]="{smthg} ({actual}) is not of expected type ({type}).",Mi[Pr]='Invalid {what}: "{url}". TestCafe cannot execute the test because the {what} includes the {protocol} protocol. TestCafe supports the following protocols: http://, https:// and file://.',Mi[Ir]="Cannot implicitly resolve the test run in the context of which the test controller action should be executed. Use test function's 't' argument instead.",Mi[Nr]="A Promise timed out.",Mi[Or]="You cannot manage advanced video parameters when the video recording capability is off. Specify the root storage folder for video content to enable video recording.",Mi[Ar]='You cannot call the "{methodName}" method more than once. Specify an array of parameters instead.',Mi[Lr]="Specify a file name or a writable stream as the reporter's output target.",Mi[Vr]='Unable to read the file referenced by the "{option}" ssl option ("{path}"). Error details:\n\n{err}',Mi[Fr]="Cannot prepare tests due to the following error:\n\n{errMessage}",Mi[kr]='Cannot parse a raw test file at "{path}" due to the following error:\n\n{errMessage}',Mi[Dr]="The web application failed with the following error:\n\n{errMessage}",Mi[Wr]='Unable to open the "{alias}" browser due to the following error:\n\n{errMessage}',Mi[qr]="Attempt to configure a request hook resulted in the following error:\n\n{requestHookName}: {errMsg}",Mi[Hr]='There are forbidden characters in the "{screenshotPath}" {screenshotPathType}:\n {forbiddenCharsDescription}',Mi[Ur]="TestCafe cannot record videos because it cannot locate the FFmpeg executable. Try one of the following solutions:\n\n* add the path of the FFmpeg installation directory to the PATH environment variable,\n* specify the path of the FFmpeg executable in the FFMPEG_PATH environment variable or the ffmpegPath option,\n* install the @ffmpeg-installer/ffmpeg npm package.",Mi[Gr]='"{filePath}" is not a valid TypeScript configuration file.',Mi[Br]="Initialize your client script with one of the following: a JavaScript script, a JavaScript file path, or the name of a JavaScript module.",Mi[jr]="Specify the base path for the client script file.",Mi[zr]="Client scripts can only have one initializer: JavaScript code, a JavaScript file path, or the name of a JavaScript module.",Mi[Yr]="Cannot load a client script from {path}.\n{errorMessage}",Mi[Kr]="A client script tried to load a JavaScript module that TestCafe cannot locate:\n\n{errorMessage}.",Mi[Xr]="This method cannot be called on a service host.",Mi[Jr]="The specified payload is too large to form an IPC packet.",Mi[$r]="Cannot process a malformed IPC message.",Mi[Qr]="Cannot create an IPC message due to an unexpected IPC head packet.",Mi[Zr]="Cannot create an IPC message due to an unexpected IPC body packet.",Mi[ei]="Cannot create an IPC message due to an unexpected IPC tail packet.",Mi[ti]="Your Linux version does not have a graphic subsystem to run {browserAlias} with a GUI. You can launch the browser in headless mode. If you use a portable browser executable, specify the browser alias before the path instead of the 'path' prefix. "+"For more information, see ".concat(Oi),Mi[ni]='The "{methodName}" method of the "{reporterName}" reporter produced an uncaught error. Error details:\n{originalError}',Mi[oi]="You cannot specify relative login page URLs in the Role constructor. Use an absolute URL.",Mi[ri]="Cannot load the TypeScript compiler.\n{originErrorMessage}.",Mi[ii]="You cannot specify options for the {noncustomizableCompilerList} compiler{suffix}.",Mi[si]="Cannot enable the 'retryTestPages' option. Apply one of the following two solutions:\n-- set 'localhost' as the value of the 'hostname' option\n-- run TestCafe over HTTPS\n",Mi[ai]="{originErrorMessage}\n{numOfNotOpenedConnection} of {numOfAllConnections} browser connections have not been established:\n{listOfNotOpenedConnections}\n\nHints:\n{listOfHints}",Mi[Si.TooHighConcurrencyFactor]="The host machine may not be powerful enough to handle the specified concurrency factor ({concurrencyFactor}). Try to decrease the concurrency factor or allocate more computing resources to the host machine.",Mi[Si.UseBrowserInitOption]='Increase the value of the "browserInitTimeout" option if it is too low (currently: {browserInitTimeoutMsg}). This option determines how long TestCafe waits for browsers to be ready.',Mi[Si.RestErrorCauses]="The error can also be caused by network issues or remote device failure. Make sure that your network connection is stable and you can reach the remote device.",Mi[pi]="Cannot locate a TestCafe configuration file at {filePath}. Either the file does not exist, or the path is invalid.",Mi[mi]="Insecure token declaration: cannot declare a Dashboard token in a JSON configuration file. Use a JavaScript configuration file, or declare a Dashboard token with one of the following: the CLI, the Test Runner API, the TESTCAFE_DASHBOARD_TOKEN environment variable.",Mi[yi]='The value of the baseUrl argument cannot be relative: "{baseUrl}"',Mi[gi]="Requested url isn't valid ({actualValue}).",Mi[vi]="The request was interrupted by an error:\n{message}",Mi[bi]='The "{optionName}" option does not exist. Use the following options to configure skipJsErrors: '.concat(function(e,t,n){void 0===t&&(t=Ci),void 0===n&&(n=Ti);var o=y([],e,!0);if("\n"===t)return o.map(function(e){return xi(e,n)}).join(t);if(1===o.length)return xi(o[0],n);if(2===o.length){var r=e[0],i=e[1];return"".concat(xi(r,n)," and ").concat(xi(i,n))}var s=o.pop(),a=o.map(function(e){return xi(e,n)}).join(t);return"".concat(a,", and ").concat(xi(s,n))}(Object.keys(Ii))),Mi[Nr]),Li=(g(Vi,Pi=Error),Vi);function Vi(){var e=Pi.call(this,Ai)||this;return e.code=Nr,e}function Fi(e){var t=e.replace(/^\+/g,"plus").replace(/\+\+/g,"+plus").split("+");return D(t,function(e){return e.replace("plus","+")})}function ki(e){var t=1===e.length||"space"===e?e:e.toLowerCase();return s.modifiersMap[t]&&(t=s.modifiersMap[t]),t}var Di,Wi,qi=f.utils.trim,Hi={run:"run",idle:"idle"};(Wi=Di=Di||{}).ok="ok",Wi.closing="closing";var Ui=Di,Gi=ls.location.href,Bi=ls.location.origin,ji=Bi+"/service-worker.js",zi=!1,Yi=null,Ki=eval;function Xi(t){return new c(function(e){return setTimeout(e,t)})}function Ji(e,r,t){var n=void 0===t?{}:t,o=n.method,i=void 0===o?"GET":o,s=n.data,a=void 0===s?null:s,l=n.parseResponse,u=void 0===l||l;return new c(function(t,n){var o=r();o.open(i,e,!0),o.onreadystatechange=function(){var e;4===o.readyState&&(200===o.status?((e=o.responseText||"")&&u&&(e=JSON.parse(o.responseText)),t(e)):n("disconnected"))},o.send(a)})}function $i(e){return Gi.toLowerCase()===e.toLowerCase()}function Qi(){zi=!1}function Zi(e){Qi(),ls.location=e.url}function es(e,l,t){var u=e.statusUrl,c=e.idlePageUrl,n=void 0===t?{}:t,d=n.manualRedirect,f=n.proxyless;return v(this,void 0,void 0,function(){var s,a;return E(this,function(e){switch(e.label){case 0:return[4,Ji(u,l)];case 1:return s=e.sent(),(a=f?(o=c,r=(n=s).cmd===Hi.idle&&n.url===o&&$i(o),i=n.cmd===Hi.idle&&n.url===o&&!$i(n.url),!r||n.cmd===Hi.run||i):((t=s).cmd===Hi.run||t.cmd===Hi.idle)&&!$i(t.url))&&!d&&Zi(s),[2,{command:s,redirecting:a}]}var t,n,o,r,i})})}var ts=Object.freeze({__proto__:null,delay:Xi,sendXHR:Ji,startHeartbeat:function(e,t){function n(){Ji(e,t).then(function(e){e.code!==Ui.closing||$i(e.url)||(Qi(),ls.location=e.url)})}Yi=as.setInterval(n,2e3),n()},stopHeartbeat:function(){as.clearInterval(Yi)},startInitScriptExecution:function(e,t){zi=!0,function e(t,n){zi&&Ji(t,n).then(function(e){return e.code?Ji(t,n,{method:"POST",data:JSON.stringify(Ki(e.code))}):null}).then(function(){as.setTimeout(function(){return e(t,n)},1e3)})}(e,t)},stopInitScriptExecution:Qi,redirect:Zi,checkStatus:function(){for(var r,i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];return v(this,void 0,void 0,function(){var t,n,o;return E(this,function(e){switch(e.label){case 0:n=t=null,o=0,e.label=1;case 1:return o<5?[4,function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return v(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,es.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,Xi(1e3)]:[2,n];case 3:e.sent(),e.label=4;case 4:return o++,[3,1];case 5:throw t}})})},enableRetryingTestPages:function(){return v(this,void 0,void 0,function(){var t;return E(this,function(e){switch(e.label){case 0:if(!navigator.serviceWorker)return[2];e.label=1;case 1:return e.trys.push([1,4,,5]),[4,navigator.serviceWorker.register(ji,{scope:Bi})];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 Ji(e,t)},setActiveWindowId:function(e,t,n){return Ji(e,t,{method:"POST",data:JSON.stringify({windowId:n})})},closeWindow:function(e,t,n){return Ji(e,t,{method:"POST",data:JSON.stringify({windowId:n})})}}),ns={};ns.RequestBarrier=h,ns.ClientRequestEmitter=x,ns.ScriptExecutionBarrier=P,ns.ScriptExecutionEmitter=L,ns.pageUnloadBarrier=Ut,ns.preventRealEvents=function(){_n.initElementListening(as,Cn),_n.addFirstInternalEventBeforeListener(as,Cn,xn),Yt.init()},ns.disableRealEventsPreventing=function(){_n.removeInternalEventBeforeListener(as,Cn,xn)},ns.scrollController=Yt,ns.ScrollAutomation=$n,ns.serviceUtils=Bt,ns.domUtils=ft,ns.contentEditable=Po,ns.positionUtils=jn,ns.styleUtils=bn,ns.scrollUtils=Ln,ns.eventUtils=Mt,ns.arrayUtils=J,ns.promiseUtils=Yn,ns.textSelection=Qo,ns.waitFor=function(i,s,a){return new Zo(function(e,t){var n,o,r=i();r?e(r):(n=er.setInterval.call(as,function(){(r=i())&&(er.clearInterval.call(as,n),er.clearTimeout.call(as,o),e(r))},s),o=er.setTimeout.call(as,function(){er.clearInterval.call(as,n),t()},a))})},ns.delay=u,ns.getTimeLimitedPromise=function(e,t){return d.Promise.race([e,u(t).then(function(){return d.Promise.reject(new Li)})])},ns.noop=function(){},ns.getKeyArray=Fi,ns.getSanitizedKey=ki,ns.parseKeySequence=function(e){if("string"!=typeof e)return{error:!0};var t=(e=qi(e).replace(/\s+/g," ")).length,n=e.charAt(t-1),o=e.charAt(t-2);1<t&&"+"===n&&!/[+ ]/.test(o)&&(e=e.substring(0,e.length-1));var r=e.split(" ");return{combinations:r,error:B(r,function(e){var t=Fi(e);return B(t,function(e){var t=1===e.length||"space"===e,n=ki(e),o=s.modifiers[n],r=s.specialKeys[n];return!(t||o||r)})}),keys:e}},ns.sendRequestToFrame=Jn,ns.KEY_MAPS=s,ns.browser=ts,ns.selectorTextFilter=function o(e,r,i,s){function t(e){for(var t=e.childNodes.length,n=0;n<t;n++)if(o(e.childNodes[n],r,i,s))return!0;return!1}function n(e){return s instanceof RegExp?s.test(e):s===e.trim()}if(1===e.nodeType)return n(e.innerText||e.textContent);if(9!==e.nodeType)return 11===e.nodeType?t(e):n(e.textContent);var a=e.querySelector("head"),l=e.querySelector("body");return t(a)||t(l)},ns.selectorAttributeFilter=function(e,t,n,o,r){if(1!==e.nodeType)return!1;function i(e,t){return"string"==typeof t?t===e:t.test(e)}for(var s,a=e.attributes,l=0;l<a.length;l++)if(i((s=a[l]).nodeName,o)&&(!r||i(s.nodeValue,r)))return!0;return!1};var os=f.nativeMethods,rs=f.EVENTS.evalIframeScript;os.objectDefineProperty(as,"%testCafeCore%",{configurable:!0,value:ns}),f.on(rs,function(e){return ss(os.contentWindowGetter.call(e.iframe))});var is=f.eventSandbox.message;is.on(is.SERVICE_MSG_RECEIVED_EVENT,function(e){var t,n,o,r,i;e.message.cmd===$n.SCROLL_REQUEST_CMD&&(n=(t=e.message).offsetX,o=t.offsetY,r=t.maxScrollMargin,i=rt(e.source),new $n(i,{offsetX:n,offsetY:o},r).run().then(function(){return is.sendServiceMsg({cmd:$n.SCROLL_RESPONSE_CMD},e.source)}))})}(as["%hammerhead%"],as["%hammerhead%"].Promise)}(window);