@react-native/debugger-frontend
Version:
Debugger frontend for React Native based on Chrome DevTools
94 lines • 253 kB
JavaScript
var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};function t(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}function r(e,t,r,i){return new(r||(r=Promise))((function(n,s){function a(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,o)}c((i=i.apply(e,t||[])).next())}))}function i(e,t){var r,i,n,s,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(a=0)),a;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){a.label=o[1];break}if(6===o[0]&&a.label<n[1]){a.label=n[1],n=o;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(o);break}n[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{r=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}function n(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function s(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,s=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=s.next()).done;)a.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return a}function a(e,t,r){if(r||2===arguments.length)for(var i,n=0,s=t.length;n<s;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function o(e){return this instanceof o?(this.v=e,this):new o(e)}function c(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,n=r.apply(e,t||[]),s=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(e){n[e]&&(i[e]=function(t){return new Promise((function(r,i){s.push([e,t,r,i])>1||c(e,t)}))})}function c(e,t){try{(r=n[e](t)).value instanceof o?Promise.resolve(r.value.v).then(l,d):u(s[0][2],r)}catch(e){u(s[0][3],e)}var r}function l(e){c("next",e)}function d(e){c("throw",e)}function u(e,t){e(t),s.shift(),s.length&&c(s[0][0],s[0][1])}}function l(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=n(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(r){t[r]=e[r]&&function(t){return new Promise((function(i,n){(function(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)})(i,n,(t=e[r](t)).done,t.value)}))}}}function d(e){return"function"==typeof e}function u(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var h=u((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function p(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var f=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,i,o;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var l=n(c),u=l.next();!u.done;u=l.next()){u.value.remove(this)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}else c.remove(this);var p=this.initialTeardown;if(d(p))try{p()}catch(e){o=e instanceof h?e.errors:[e]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var m=n(f),y=m.next();!y.done;y=m.next()){var w=y.value;try{g(w)}catch(e){o=null!=o?o:[],e instanceof h?o=a(a([],s(o)),s(e.errors)):o.push(e)}}}catch(e){r={error:e}}finally{try{y&&!y.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}}if(o)throw new h(o)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)g(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&p(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&p(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),m=f.EMPTY;function y(e){return e instanceof f||e&&"closed"in e&&d(e.remove)&&d(e.add)&&d(e.unsubscribe)}function g(e){d(e)?e():e.unsubscribe()}var w={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},v={setTimeout:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var n=v.delegate;return(null==n?void 0:n.setTimeout)?n.setTimeout.apply(n,a([e,t],s(r))):setTimeout.apply(void 0,a([e,t],s(r)))},clearTimeout:function(e){var t=v.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function b(e){v.setTimeout((function(){var t=w.onUnhandledError;if(!t)throw e;t(e)}))}function k(){}var S=C("C",void 0,void 0);function C(e,t,r){return{kind:e,value:t,error:r}}var T=null;function E(e){if(w.useDeprecatedSynchronousErrorHandling){var t=!T;if(t&&(T={errorThrown:!1,error:null}),e(),t){var r=T,i=r.errorThrown,n=r.error;if(T=null,i)throw n}}else e()}var I=function(e){function r(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,y(t)&&t.add(r)):r.destination=M,r}return t(r,e),r.create=function(e,t,r){return new D(e,t,r)},r.prototype.next=function(e){this.isStopped?R(function(e){return C("N",e,void 0)}(e),this):this._next(e)},r.prototype.error=function(e){this.isStopped?R(C("E",void 0,e),this):(this.isStopped=!0,this._error(e))},r.prototype.complete=function(){this.isStopped?R(S,this):(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(e){this.destination.next(e)},r.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(f),x=Function.prototype.bind;function F(e,t){return x.call(e,t)}var _=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){P(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){P(e)}else P(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){P(e)}},e}(),D=function(e){function r(t,r,i){var n,s,a=e.call(this)||this;d(t)||!t?n={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=i?i:void 0}:a&&w.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return a.unsubscribe()},n={next:t.next&&F(t.next,s),error:t.error&&F(t.error,s),complete:t.complete&&F(t.complete,s)}):n=t;return a.destination=new _(n),a}return t(r,e),r}(I);function P(e){var t;w.useDeprecatedSynchronousErrorHandling?(t=e,w.useDeprecatedSynchronousErrorHandling&&T&&(T.errorThrown=!0,T.error=t)):b(e)}function R(e,t){var r=w.onStoppedNotification;r&&v.setTimeout((function(){return r(e,t)}))}var M={closed:!0,next:k,error:function(e){throw e},complete:k},A="function"==typeof Symbol&&Symbol.observable||"@@observable";function O(e){return e}function q(e){return 0===e.length?O:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var N=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var i,n=this,s=(i=e)&&i instanceof I||function(e){return e&&d(e.next)&&d(e.error)&&d(e.complete)}(i)&&y(i)?e:new D(e,t,r);return E((function(){var e=n,t=e.operator,r=e.source;s.add(t?t.call(s,r):r?n._subscribe(s):n._trySubscribe(s))})),s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=B(t))((function(t,i){var n=new D({next:function(t){try{e(t)}catch(e){i(e),n.unsubscribe()}},error:i,complete:t});r.subscribe(n)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[A]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=B(e))((function(e,r){var i;t.subscribe((function(e){return i=e}),(function(e){return r(e)}),(function(){return e(i)}))}))},e.create=function(t){return new e(t)},e}();function B(e){var t;return null!==(t=null!=e?e:w.Promise)&&void 0!==t?t:Promise}function L(e){return function(t){if(function(e){return d(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}function j(e,t,r,i,n){return new H(e,t,r,i,n)}var H=function(e){function r(t,r,i,n,s,a){var o=e.call(this,t)||this;return o.onFinalize=s,o.shouldUnsubscribe=a,o._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,o._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,o._complete=i?function(){try{i()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,o}return t(r,e),r.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},r}(I),$=u((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),K=function(e){function r(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t(r,e),r.prototype.lift=function(e){var t=new V(this,this);return t.operator=e,t},r.prototype._throwIfClosed=function(){if(this.closed)throw new $},r.prototype.next=function(e){var t=this;E((function(){var r,i;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var s=n(t.currentObservers),a=s.next();!a.done;a=s.next()){a.value.next(e)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}}}))},r.prototype.error=function(e){var t=this;E((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},r.prototype.complete=function(){var e=this;E((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},r.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(r.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),r.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},r.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},r.prototype._innerSubscribe=function(e){var t=this,r=this,i=r.hasError,n=r.isStopped,s=r.observers;return i||n?m:(this.currentObservers=null,s.push(e),new f((function(){t.currentObservers=null,p(s,e)})))},r.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,i=t.thrownError,n=t.isStopped;r?e.error(i):n&&e.complete()},r.prototype.asObservable=function(){var e=new N;return e.source=this,e},r.create=function(e,t){return new V(e,t)},r}(N),V=function(e){function r(t,r){var i=e.call(this)||this;return i.destination=t,i.source=r,i}return t(r,e),r.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},r.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},r.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},r.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:m},r}(K),W={now:function(){return(W.delegate||Date).now()},delegate:void 0},z=function(e){function r(t,r,i){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===i&&(i=W);var n=e.call(this)||this;return n._bufferSize=t,n._windowTime=r,n._timestampProvider=i,n._buffer=[],n._infiniteTimeWindow=!0,n._infiniteTimeWindow=r===1/0,n._bufferSize=Math.max(1,t),n._windowTime=Math.max(1,r),n}return t(r,e),r.prototype.next=function(t){var r=this,i=r.isStopped,n=r._buffer,s=r._infiniteTimeWindow,a=r._timestampProvider,o=r._windowTime;i||(n.push(t),!s&&n.push(a.now()+o)),this._trimBuffer(),e.prototype.next.call(this,t)},r.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,i=this._buffer.slice(),n=0;n<i.length&&!e.closed;n+=r?1:2)e.next(i[n]);return this._checkFinalizedStatuses(e),t},r.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,i=e._buffer,n=e._infiniteTimeWindow,s=(n?1:2)*t;if(t<1/0&&s<i.length&&i.splice(0,i.length-s),!n){for(var a=r.now(),o=0,c=1;c<i.length&&i[c]<=a;c+=2)o=c;o&&i.splice(0,o+1)}},r}(K),U=function(e){function r(t,r){return e.call(this)||this}return t(r,e),r.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},r}(f),G={setInterval:function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var n=G.delegate;return(null==n?void 0:n.setInterval)?n.setInterval.apply(n,a([e,t],s(r))):setInterval.apply(void 0,a([e,t],s(r)))},clearInterval:function(e){var t=G.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},Q=function(e){function r(t,r){var i=e.call(this,t,r)||this;return i.scheduler=t,i.work=r,i.pending=!1,i}return t(r,e),r.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var i=this.id,n=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(n,i,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(n,this.id,t),this},r.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),G.setInterval(e.flush.bind(e,this),r)},r.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&G.clearInterval(t)},r.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},r.prototype._execute=function(e,t){var r,i=!1;try{this.work(e)}catch(e){i=!0,r=e||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r},r.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,i=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,p(i,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},r}(U),J=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=W.now,e}(),X=new(function(e){function r(t,r){void 0===r&&(r=J.now);var i=e.call(this,t,r)||this;return i.actions=[],i._active=!1,i}return t(r,e),r.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},r}(J))(Q),Y=X,Z=new N((function(e){return e.complete()}));function ee(e){return e&&d(e.schedule)}function te(e){return e[e.length-1]}function re(e){return ee(te(e))?e.pop():void 0}var ie=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function ne(e){return d(null==e?void 0:e.then)}function se(e){return d(e[A])}function ae(e){return Symbol.asyncIterator&&d(null==e?void 0:e[Symbol.asyncIterator])}function oe(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var ce="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function le(e){return d(null==e?void 0:e[ce])}function de(e){return c(this,arguments,(function(){var t,r,n;return i(this,(function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,o(t.read())];case 3:return r=i.sent(),n=r.value,r.done?[4,o(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,o(n)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function ue(e){return d(null==e?void 0:e.getReader)}function he(e){if(e instanceof N)return e;if(null!=e){if(se(e))return s=e,new N((function(e){var t=s[A]();if(d(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(ie(e))return i=e,new N((function(e){for(var t=0;t<i.length&&!e.closed;t++)e.next(i[t]);e.complete()}));if(ne(e))return r=e,new N((function(e){r.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,b)}));if(ae(e))return pe(e);if(le(e))return t=e,new N((function(e){var r,i;try{for(var s=n(t),a=s.next();!a.done;a=s.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(e){r={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}e.complete()}));if(ue(e))return pe(de(e))}var t,r,i,s;throw oe(e)}function pe(e){return new N((function(t){(function(e,t){var n,s,a,o;return r(this,void 0,void 0,(function(){var r,c;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),n=l(e),i.label=1;case 1:return[4,n.next()];case 2:if((s=i.sent()).done)return[3,4];if(r=s.value,t.next(r),t.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=i.sent(),a={error:c},[3,11];case 6:return i.trys.push([6,,9,10]),s&&!s.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function fe(e,t,r,i,n){void 0===i&&(i=0),void 0===n&&(n=!1);var s=t.schedule((function(){r(),n?e.add(this.schedule(null,i)):this.unsubscribe()}),i);if(e.add(s),!n)return s}function me(e,t){return void 0===t&&(t=0),L((function(r,i){r.subscribe(j(i,(function(r){return fe(i,e,(function(){return i.next(r)}),t)}),(function(){return fe(i,e,(function(){return i.complete()}),t)}),(function(r){return fe(i,e,(function(){return i.error(r)}),t)})))}))}function ye(e,t){return void 0===t&&(t=0),L((function(r,i){i.add(e.schedule((function(){return r.subscribe(i)}),t))}))}function ge(e,t){if(!e)throw new Error("Iterable cannot be null");return new N((function(r){fe(r,t,(function(){var i=e[Symbol.asyncIterator]();fe(r,t,(function(){i.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))}function we(e,t){if(null!=e){if(se(e))return function(e,t){return he(e).pipe(ye(t),me(t))}(e,t);if(ie(e))return function(e,t){return new N((function(r){var i=0;return t.schedule((function(){i===e.length?r.complete():(r.next(e[i++]),r.closed||this.schedule())}))}))}(e,t);if(ne(e))return function(e,t){return he(e).pipe(ye(t),me(t))}(e,t);if(ae(e))return ge(e,t);if(le(e))return function(e,t){return new N((function(r){var i;return fe(r,t,(function(){i=e[ce](),fe(r,t,(function(){var e,t,n;try{t=(e=i.next()).value,n=e.done}catch(e){return void r.error(e)}n?r.complete():r.next(t)}),0,!0)})),function(){return d(null==i?void 0:i.return)&&i.return()}}))}(e,t);if(ue(e))return function(e,t){return ge(de(e),t)}(e,t)}throw oe(e)}function ve(e,t){return t?we(e,t):he(e)}function be(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ve(e,re(e))}var ke=u((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));function Se(e,t){var r="object"==typeof t;return new Promise((function(i,n){var s=new D({next:function(e){i(e),s.unsubscribe()},error:n,complete:function(){r?i(t.defaultValue):n(new ke)}});e.subscribe(s)}))}function Ce(e,t){return L((function(r,i){var n=0;r.subscribe(j(i,(function(r){i.next(e.call(t,r,n++))})))}))}var Te=Array.isArray;function Ee(e){return Ce((function(t){return function(e,t){return Te(t)?e.apply(void 0,a([],s(t))):e(t)}(e,t)}))}Array.isArray,Object.getPrototypeOf,Object.prototype,Object.keys;function Ie(e,t,r,i,n,s,a,o){var c=[],l=0,d=0,u=!1,h=function(){!u||c.length||l||t.complete()},p=function(e){return l<i?f(e):c.push(e)},f=function(e){s&&t.next(e),l++;var o=!1;he(r(e,d++)).subscribe(j(t,(function(e){null==n||n(e),s?p(e):t.next(e)}),(function(){o=!0}),void 0,(function(){if(o)try{l--;for(var e=function(){var e=c.shift();a?fe(t,a,(function(){return f(e)})):f(e)};c.length&&l<i;)e();h()}catch(e){t.error(e)}})))};return e.subscribe(j(t,p,(function(){u=!0,h()}))),function(){null==o||o()}}function xe(e,t,r){return void 0===r&&(r=1/0),d(t)?xe((function(r,i){return Ce((function(e,n){return t(r,e,i,n)}))(he(e(r,i)))}),r):("number"==typeof t&&(r=t),L((function(t,i){return Ie(t,i,e,r)})))}function Fe(e){return void 0===e&&(e=1/0),xe(O,e)}function _e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Fe(1)(ve(e,re(e)))}function De(e){return new N((function(t){he(e()).subscribe(t)}))}var Pe=["addListener","removeListener"],Re=["addEventListener","removeEventListener"],Me=["on","off"];function Ae(e,t,r,i){if(d(r)&&(i=r,r=void 0),i)return Ae(e,t,r).pipe(Ee(i));var n=s(function(e){return d(e.addEventListener)&&d(e.removeEventListener)}(e)?Re.map((function(i){return function(n){return e[i](t,n,r)}})):function(e){return d(e.addListener)&&d(e.removeListener)}(e)?Pe.map(Oe(e,t)):function(e){return d(e.on)&&d(e.off)}(e)?Me.map(Oe(e,t)):[],2),a=n[0],o=n[1];if(!a&&ie(e))return xe((function(e){return Ae(e,t,r)}))(he(e));if(!a)throw new TypeError("Invalid event target");return new N((function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return a(t),function(){return o(t)}}))}function Oe(e,t){return function(r){return function(i){return e[r](t,i)}}}function qe(e,t,r){void 0===e&&(e=0),void 0===r&&(r=Y);var i=-1;return null!=t&&(ee(t)?r=t:i=t),new N((function(t){var n,s=(n=e)instanceof Date&&!isNaN(n)?+e-r.now():e;s<0&&(s=0);var a=0;return r.schedule((function(){t.closed||(t.next(a++),0<=i?this.schedule(void 0,i):t.complete())}),s)}))}function Ne(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=re(e),i=function(e,t){return"number"==typeof te(e)?e.pop():t}(e,1/0),n=e;return n.length?1===n.length?he(n[0]):Fe(i)(ve(n,r)):Z}var Be=new N(k),Le=Array.isArray;function je(e){return 1===e.length&&Le(e[0])?e[0]:e}function He(e,t){return L((function(r,i){var n=0;r.subscribe(j(i,(function(r){return e.call(t,r,n++)&&i.next(r)})))}))}function $e(e){return function(t){for(var r=[],i=function(i){r.push(he(e[i]).subscribe(j(t,(function(e){if(r){for(var n=0;n<r.length;n++)n!==i&&r[n].unsubscribe();r=null}t.next(e)}))))},n=0;r&&!t.closed&&n<e.length;n++)i(n)}}function Ke(e){return L((function(t,r){var i,n=null,s=!1;n=t.subscribe(j(r,void 0,void 0,(function(a){i=he(e(a,Ke(e)(t))),n?(n.unsubscribe(),n=null,i.subscribe(r)):s=!0}))),s&&(n.unsubscribe(),n=null,i.subscribe(r))}))}function Ve(e){return L((function(t,r){var i=!1;t.subscribe(j(r,(function(e){i=!0,r.next(e)}),(function(){i||r.next(e),r.complete()})))}))}function We(e){return e<=0?function(){return Z}:L((function(t,r){var i=0;t.subscribe(j(r,(function(t){++i<=e&&(r.next(t),e<=i&&r.complete())})))}))}function ze(){return L((function(e,t){e.subscribe(j(t,k))}))}function Ue(e){return void 0===e&&(e=Ge),L((function(t,r){var i=!1;t.subscribe(j(r,(function(e){i=!0,r.next(e)}),(function(){return i?r.complete():r.error(e())})))}))}function Ge(){return new ke}function Qe(e,t){var r=arguments.length>=2;return function(i){return i.pipe(e?He((function(t,r){return e(t,r,i)})):O,We(1),r?Ve(t):Ue((function(){return new ke})))}}function Je(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?L((function(t,r){$e(a([t],s(e)))(r)})):O}function Xe(e){var t;void 0===e&&(e=1/0);var r=(t=e&&"object"==typeof e?e:{count:e}).count,i=void 0===r?1/0:r,n=t.delay,s=t.resetOnSuccess,a=void 0!==s&&s;return i<=0?O:L((function(e,t){var r,s=0,o=function(){var c=!1;r=e.subscribe(j(t,(function(e){a&&(s=0),t.next(e)}),void 0,(function(e){if(s++<i){var a=function(){r?(r.unsubscribe(),r=null,o()):c=!0};if(null!=n){var l="number"==typeof n?qe(n):he(n(e,s)),d=j(t,(function(){d.unsubscribe(),a()}),(function(){t.complete()}));l.subscribe(d)}else a()}else t.error(e)}))),c&&(r.unsubscribe(),r=null,o())};o()}))}function Ye(e,t,r){var i=d(e)||t||r?{next:e,error:t,complete:r}:e;return i?L((function(e,t){var r;null===(r=i.subscribe)||void 0===r||r.call(i);var n=!0;e.subscribe(j(t,(function(e){var r;null===(r=i.next)||void 0===r||r.call(i,e),t.next(e)}),(function(){var e;n=!1,null===(e=i.complete)||void 0===e||e.call(i),t.complete()}),(function(e){var r;n=!1,null===(r=i.error)||void 0===r||r.call(i,e),t.error(e)}),(function(){var e,t;n&&(null===(e=i.unsubscribe)||void 0===e||e.call(i)),null===(t=i.finalize)||void 0===t||t.call(i)})))})):O}
/**
* @license
* Copyright 2023 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
Symbol.dispose??=Symbol("dispose"),Symbol.asyncDispose??=Symbol("asyncDispose");const Ze=Symbol.dispose,et=Symbol.asyncDispose;class tt{#e=!1;#t=[];get disposed(){return this.#e}dispose(){if(!this.#e){this.#e=!0;for(const e of this.#t.reverse())e[Ze]()}}use(e){return e&&this.#t.push(e),e}adopt(e,t){return this.#t.push({[Ze](){t(e)}}),e}defer(e){this.#t.push({[Ze](){e()}})}move(){if(this.#e)throw new ReferenceError("a disposed stack can not use anything new");const e=new tt;return e.#t=this.#t,this.#e=!0,e}[Ze]=this.dispose;[Symbol.toStringTag]="DisposableStack"}class rt{#e=!1;#t=[];get disposed(){return this.#e}async dispose(){if(!this.#e){this.#e=!0;for(const e of this.#t.reverse())await e[et]()}}use(e){return e&&this.#t.push(e),e}adopt(e,t){return this.#t.push({[et]:()=>t(e)}),e}defer(e){this.#t.push({[et]:()=>e()})}move(){if(this.#e)throw new ReferenceError("a disposed stack can not use anything new");const e=new rt;return e.#t=this.#t,this.#e=!0,e}[et]=this.dispose;[Symbol.toStringTag]="AsyncDisposableStack"}
/**
* @license
* Copyright 2022 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/class it{#r;#i=new Map;constructor(e=function(e){return{all:e=e||new Map,on:function(t,r){var i=e.get(t);i?i.push(r):e.set(t,[r])},off:function(t,r){var i=e.get(t);i&&(r?i.splice(i.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var i=e.get(t);i&&i.slice().map((function(e){e(r)})),(i=e.get("*"))&&i.slice().map((function(e){e(t,r)}))}}}(new Map)){this.#r=e}on(e,t){const r=this.#i.get(e);return void 0===r?this.#i.set(e,[t]):r.push(t),this.#r.on(e,t),this}off(e,t){const r=this.#i.get(e)??[];if(void 0===t){for(const t of r)this.#r.off(e,t);return this.#i.delete(e),this}const i=r.lastIndexOf(t);return i>-1&&this.#r.off(e,...r.splice(i,1)),this}emit(e,t){return this.#r.emit(e,t),this.listenerCount(e)>0}once(e,t){const r=i=>{t(i),this.off(e,r)};return this.on(e,r)}listenerCount(e){return this.#i.get(e)?.length||0}removeAllListeners(e){return void 0!==e?this.off(e):(this[Ze](),this)}[Ze](){for(const[e,t]of this.#i)for(const r of t)this.#r.off(e,r);this.#i.clear()}}const nt=(e,t)=>{if(!e)throw new Error(t)},st=!("undefined"==typeof process||!process.version);
/**
* @license
* Copyright 2020 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @license
* Copyright 2020 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
let at=null;const ot=e=>st?async(...t)=>{lt&&ct.push(e+t),(await async function(){return at||(at=(await import("debug")).default),at}())(e)(t)}:(...t)=>{const r=globalThis.__PUPPETEER_DEBUG;if(!r)return;("*"===r||(r.endsWith("*")?e.startsWith(r):e===r))&&console.log(`${e}:`,...t)};let ct=[],lt=!1;
/**
* @license
* Copyright 2018 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
class dt extends Error{constructor(e,t){super(e,t),this.name=this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}class ut extends dt{}class ht extends dt{#n;#s="";set code(e){this.#n=e}get code(){return this.#n}set originalMessage(e){this.#s=e}get originalMessage(){return this.#s}}class pt extends dt{}class ft extends ht{}
/**
* @license
* Copyright 2020 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/const mt={letter:{width:8.5,height:11},legal:{width:8.5,height:14},tabloid:{width:11,height:17},ledger:{width:17,height:11},a0:{width:33.1,height:46.8},a1:{width:23.4,height:33.1},a2:{width:16.54,height:23.4},a3:{width:11.7,height:16.54},a4:{width:8.27,height:11.7},a5:{width:5.83,height:8.27},a6:{width:4.13,height:5.83}},yt=ot("puppeteer:error"),gt=(Object.freeze({width:800,height:600}),Symbol("Source URL for Puppeteer evaluation scripts"));
/**
* @license
* Copyright 2017 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/class wt{static INTERNAL_URL="pptr:internal";static fromCallSite(e,t){const r=new wt;return r.#a=e,r.#o=t.toString(),r}static parse=e=>{e=e.slice(5);const[t="",r=""]=e.split(";"),i=new wt;return i.#a=t,i.#o=decodeURIComponent(r),i};static isPuppeteerURL=e=>e.startsWith("pptr:");#a;#o;get functionName(){return this.#a}get siteString(){return this.#o}toString(){return`pptr:${[this.#a,encodeURIComponent(this.#o)].join(";")}`}}const vt=(e,t)=>{if(Object.prototype.hasOwnProperty.call(t,gt))return t;const r=Error.prepareStackTrace;Error.prepareStackTrace=(e,t)=>t[2];const i=(new Error).stack;return Error.prepareStackTrace=r,Object.assign(t,{[gt]:wt.fromCallSite(e,i)})},bt=e=>"string"==typeof e||e instanceof String,kt=e=>"number"==typeof e||e instanceof Number;function St(e,...t){if(bt(e))return nt(0===t.length,"Cannot evaluate a string with arguments"),e;return`(${e})(${t.map((function(e){return Object.is(e,void 0)?"undefined":JSON.stringify(e)})).join(",")})`}let Ct=null;async function Tt(){if(!Ct)try{Ct=await import("fs/promises")}catch(e){if(e instanceof TypeError)throw new Error("Cannot write to a path outside of a Node-like environment.");throw e}return Ct}async function Et(e,t){const r=[],i=e.getReader();if(t){const e=await Tt(),n=await e.open(t,"w+");try{for(;;){const{done:e,value:t}=await i.read();if(e)break;r.push(t),await n.writeFile(t)}}finally{await n.close()}}else for(;;){const{done:e,value:t}=await i.read();if(e)break;r.push(t)}try{return Buffer.concat(r)}catch(e){return yt(e),null}}async function It(e,t){return new ReadableStream({async pull(r){const{data:i,base64Encoded:n,eof:s}=await e.send("IO.read",{handle:t});r.enqueue(function(e,t){return t?Uint8Array.from(atob(e),(e=>e.codePointAt(0))):(new TextEncoder).encode(e)}(i,n??!1)),s&&(await e.send("IO.close",{handle:t}),r.close())}})}function xt(e,t){return 0===e?Be:qe(e).pipe(Ce((()=>{throw new ut(`Timed out after waiting ${e}ms`,{cause:t})})))}const Ft="__puppeteer_utility_world__22.13.1",_t=/^[\040\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$/m;const Dt=500;const Pt={px:1,in:96,cm:37.8,mm:3.78};function Rt(e,t="in"){if(void 0===e)return;let r;if(kt(e))r=e;else{if(!bt(e))throw new Error("page.pdf() Cannot handle parameter type: "+typeof e);{const t=e;let i=t.substring(t.length-2).toLowerCase(),n="";i in Pt?n=t.substring(0,t.length-2):(i="px",n=t);const s=Number(n);nt(!isNaN(s),"Failed to parse parameter value: "+t),r=s*Pt[i]}}return r/Pt[t]}function Mt(e,t){return new N((r=>{const i=e=>{r.next(e)};return e.on(t,i),()=>{e.off(t,i)}}))}function At(e,t){return e?Ae(e,"abort").pipe(Ce((()=>{if(e.reason instanceof Error)throw e.reason.cause=t,e.reason;throw new Error(e.reason,{cause:t})}))):Be}function Ot(e){return xe((t=>ve(Promise.resolve(e(t))).pipe(He((e=>e)),Ce((()=>t)))))}
/**
* @license
* Copyright 2017 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/const qt=new Map([["geolocation","geolocation"],["midi","midi"],["notifications","notifications"],["camera","videoCapture"],["microphone","audioCapture"],["background-sync","backgroundSync"],["ambient-light-sensor","sensors"],["accelerometer","sensors"],["gyroscope","sensors"],["magnetometer","sensors"],["accessibility-events","accessibilityEvents"],["clipboard-read","clipboardReadWrite"],["clipboard-write","clipboardReadWrite"],["clipboard-sanitized-write","clipboardSanitizedWrite"],["payment-handler","paymentHandler"],["persistent-storage","durableStorage"],["idle-detection","idleDetection"],["midi-sysex","midiSysex"]]);class Nt extends it{constructor(){super()}async waitForTarget(e,t={}){const{timeout:r=3e4}=t;return await Se(Ne(Mt(this,"targetcreated"),Mt(this,"targetchanged"),ve(this.targets())).pipe(Ot(e),Je(xt(r))))}async pages(){const e=await Promise.all(this.browserContexts().map((e=>e.pages())));return e.reduce(((e,t)=>e.concat(t)),[])}isConnected(){return this.connected}[Ze](){this.process()?this.close().catch(yt):this.disconnect().catch(yt)}[et](){return this.process()?this.close():this.disconnect()}}var Bt;!function(e){e.Disconnected=Symbol("CDPSession.Disconnected"),e.Swapped=Symbol("CDPSession.Swapped"),e.Ready=Symbol("CDPSession.Ready"),e.SessionAttached="sessionattached",e.SessionDetached="sessiondetached"}(Bt||(Bt={}));class Lt extends it{constructor(){super()}parentSession(){}}
/**
* @license
* Copyright 2024 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/class jt{static create(e){return new jt(e)}static async race(e){const t=new Set;try{const r=e.map((e=>e instanceof jt?(e.#c&&t.add(e),e.valueOrThrow()):e));return await Promise.race(r)}finally{for(const e of t)e.reject(new Error("Timeout cleared"))}}#l=!1;#d=!1;#u;#h;#p=new Promise((e=>{this.#h=e}));#c;#f;constructor(e){e&&e.timeout>0&&(this.#f=new ut(e.message),this.#c=setTimeout((()=>{this.reject(this.#f)}),e.timeout))}#m(e){clearTimeout(this.#c),this.#u=e,this.#h()}resolve(e){this.#d||this.#l||(this.#l=!0,this.#m(e))}reject(e){this.#d||this.#l||(this.#d=!0,this.#m(e))}resolved(){return this.#l}finished(){return this.#l||this.#d}value(){return this.#u}#y;valueOrThrow(){return this.#y||(this.#y=(async()=>{if(await this.#p,this.#d)throw this.#u;return this.#u})()),this.#y}}
/**
* @license
* Copyright 2024 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/class Ht{static Guard=class{#g;#w;constructor(e,t){this.#g=e,this.#w=t}[Ze](){return this.#w?.(),this.#g.release()}};#v=!1;#b=[];async acquire(e){if(!this.#v)return this.#v=!0,new Ht.Guard(this);const t=jt.create();return this.#b.push(t.resolve.bind(t)),await t.valueOrThrow(),new Ht.Guard(this,e)}release(){const e=this.#b.shift();e?e():this.#v=!1}}
/**
* @license
* Copyright 2017 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/class $t extends it{constructor(){super()}#k;#S=0;startScreenshot(){const e=this.#k||new Ht;return this.#k=e,this.#S++,e.acquire((()=>{this.#S--,0===this.#S&&(this.#k=void 0)}))}waitForScreenshotOperations(){return this.#k?.acquire()}async waitForTarget(e,t={}){const{timeout:r=3e4}=t;return await Se(Ne(Mt(this,"targetcreated"),Mt(this,"targetchanged"),ve(this.targets())).pipe(Ot(e),Je(xt(r))))}get closed(){return!this.browser().browserContexts().includes(this)}get id(){}[Ze](){this.close().catch(yt)}[et](){return this.close()}}
/**
* @license
* Copyright 2024 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/var Kt,Vt=self&&self.__addDisposableResource||function(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose]}if("function"!=typeof i)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:i,async:r})}else r&&e.stack.push({async:!0});return t},Wt=self&&self.__disposeResources||function(e){return function(t){function r(r){t.error=t.hasError?new e(r,t.error,"An error was suppressed during disposal."):r,t.hasError=!0}return function e(){for(;t.stack.length;){var i=t.stack.pop();try{var n=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(n).then(e,(function(t){return r(t),e()}))}catch(e){r(e)}}if(t.hasError)throw t.error}()}}("function"==typeof SuppressedError?SuppressedError:function(e,t,r){var i=new Error(r);return i.name="SuppressedError",i.error=e,i.suppressed=t,i});class zt extends $t{#C;#T;#E;constructor(e,t,r){super(),this.#C=e,this.#T=t,this.#E=r}get id(){return this.#E}targets(){return this.#T.targets().filter((e=>e.browserContext()===this))}async pages(){return(await Promise.all(this.targets().filter((e=>"page"===e.type()||"other"===e.type()&&this.#T._getIsPageTargetCallback()?.(e))).map((e=>e.page())))).filter((e=>!!e))}isIncognito(){return!!this.#E}async overridePermissions(e,t){const r=t.map((e=>{const t=qt.get(e);if(!t)throw new Error("Unknown permission: "+e);return t}));await this.#C.send("Browser.grantPermissions",{origin:e,browserContextId:this.#E||void 0,permissions:r})}async clearPermissionOverrides(){await this.#C.send("Browser.resetPermissions",{browserContextId:this.#E||void 0})}async newPage(){const e={stack:[],error:void 0,hasError:!1};try{Vt(e,await this.waitForScreenshotOperations(),!1);return await this.#T._createPageInContext(this.#E)}catch(t){e.error=t,e.hasError=!0}finally{Wt(e)}}browser(){return this.#T}async close(){nt(this.#E,"Non-incognito profiles cannot be closed!"),await this.#T._disposeContext(this.#E)}}
/**
* @license
* Copyright 2023 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/!function(e){e.PAGE="page",e.BACKGROUND_PAGE="background_page",e.SERVICE_WORKER="service_worker",e.SHARED_WORKER="shared_worker",e.BROWSER="browser",e.WEBVIEW="webview",e.OTHER="other",e.TAB="tab"}(Kt||(Kt={}));class Ut{constructor(){}async worker(){return null}async page(){return null}}
/**
* @license
* Copyright 2022 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/function Gt(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function Qt(e,t,r){return e.message=t,e.originalMessage=r??e.originalMessage,e}function Jt(e){let t=e.error.message;return e.error&&"object"==typeof e.error&&"data"in e.error&&(t+=` ${e.error.data}`),t}
/**
* @license
* Copyright 2023 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/class Xt{#I=new Map;#x=function(){let e=0;return()=>++e}
/**
* @license
* Copyright 2017 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/();create(e,t,r){const i=new Yt(this.#x(),e,t);this.#I.set(i.id,i);try{r(i.id)}catch(e){throw i.promise.catch(yt).finally((()=>{this.#I.delete(i.id)})),i.reject(e),e}return i.promise.finally((()=>{this.#I.delete(i.id)}))}reject(e,t,r){const i=this.#I.get(e);i&&this._reject(i,t,r)}_reject(e,t,r){let i,n;t instanceof ht?(i=t,i.cause=e.error,n=t.message):(i=e.error,n=t),e.reject(Qt(i,`Protocol error (${e.label}): ${n}`,r))}resolve(e,t){const r=this.#I.get(e);r&&r.resolve(t)}clear(){for(const e of this.#I.values())this._reject(e,new ft("Target closed"));this.#I.clear()}getPendingProtocolErrors(){const e=[];for(const t of this.#I.values())e.push(new Error(`${t.label} timed out. Trace: ${t.error.stack}`));return e}}class Yt{#E;#F=new ht;#_=jt.create();#D;#P;constructor(e,t,r){this.#E=e,this.#P=t,r&&(this.#D=setTimeout((()=>{this.#_.reject(Qt(this.#F,`${t} timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.`))}),r))}resolve(e){clearTimeout(this.#D),this.#_.resolve(e)}reject(e){clearTimeout(this.#D),this.#_.reject(e)}get id(){return this.#E}get promise(){return this.#_.valueOrThrow()}get error(){return this.#F}get label(){return this.#P}}class Zt extends Lt{#R;#M;#I=new Xt;#C;#A;#O;constructor(e,t,r,i){super(),this.#C=e,this.#M=t,this.#R=r,this.#A=i}_setTarget(e){this.#O=e}_target(){return nt(this.#O,"Target must exist"),this.#O}connection(){return this.#C}parentSession(){if(!this.#A)return this;const e=this.#C?.session(this.#A);return e??void 0}send(e,t,r){return this.#C?this.#C._rawSend(this.#I,e,t,this.#R,r):Promise.reject(new ft(`Protocol error (${e}): Session closed. Most likely the ${this.#M} has been closed.`))}_onMessage(e){e.id?e.error?this.#I.reject(e.id,Jt(e),e.error.message):this.#I.resolve(e.id,e.result):(nt(!e.id),this.emit(e.method,e.params))}async detach(){if(!this.#C)throw new Error(`Session already detached. Most likely the ${this.#M} has been closed.`);await this.#C.send("Target.detachFromTarget",{sessionId:this.#R})}_onClosed(){this.#I.clear(),this.#C=void 0,this.emit(Bt.Disconnected,void 0)}id(){return this.#R}getPendingProtocolErrors(){return this.#I.getPendingProtocolErrors()}}
/**
* @license
* Copyright 2019 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/class er{#q;#N;constructor(){this.#q=null,this.#N=null}setDefaultTimeout(e){this.#q=e}setDefaultNavigationTimeout(e){this.#N=e}navigationTimeout(){return null!==this.#N?this.#N:null!==this.#q?this.#q:3e4}timeout(){return null!==this.#q?this.#q:3e4}}
/**
* @license
* Copyright 2023 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/var tr=self&&self.__addDisposableResource||function(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose]}if("function"!=typeof i)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:i,async:r})}else r&&e.stack.push({async:!0});return t},rr=self&&self.__disposeResources||function(e){return function(t){function r(r){t.error=t.hasError?new e(r,t.error,"An error was suppressed during disposal."):r,t.hasError=!0}return function e(){for(;t.stack.length;){var i=t.stack.pop();try{var n=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(n).then(e,(function(t){return r(t),e()}))}catch(e){r(e)}}if(t.hasError)throw t.error}()}}("function"==typeof SuppressedError?SuppressedError:function(e,t,r){var i=new Error(r);return i.name="SuppressedError",i.error=e,i.suppressed=t,i});const ir=new WeakSet;function nr(e,t){let r=!1;if(e.prototype[Ze]){const t=e.prototype[Ze];e.prototype[Ze]=function(){if(!ir.has(this))return t.call(this);ir.delete(this)},r=!0}if(e.prototype[et]){const t=e.prototype[et];e.prototype[et]=function(){if(!ir.has(this))return t.call(this);ir.delete(this)},r=!0}return r&&(e.prototype.move=function(){return ir.add(this),this}),e}function sr(e=(e=>`Attempted to use disposed ${e.constructor.name}.`)){return(t,r)=>function(...r){if(this.disposed)throw new Error(e(this));return t.call(this,...r)}}function ar(e,t){const r=new WeakMap;let i=-1;return function(...t){if(-1===i&&(i=t.length),i!==t.length)throw new Error("Memoized method was called with the wrong number of arguments");let n=!1,s=r;for(const e of t)s.has(e)||(n=!0,s.set(e,new WeakMap)),s=s.get(e);if(n)return e.call(this,...t)}}function or(e=function(){return this}){return(t,r)=>{const i=new WeakMap;return async function(...r){const n={stack:[],error:void 0,hasError:!1};try{const s=e.call(this);let a=i.get(s);a||(a=new Ht,i.set(s,a));tr(n,await a.acquire(),!0);return await t.call(this,...r)}catch(e){n.error=e,n.hasError=!0}finally{const e=rr(n);e&&await e}}}}new WeakMap;var cr,lr=self&&self.__addDisposableResource||function(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose]}if("function"!=typeof i)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:i,async:r})}else r&&e.stack.push({async:!0});return t},dr=self&&self.__disposeResources||function(e){return function(t){function r(r){t.error=t.hasError?new e(r,t.error,"An error was suppressed during disposal."):r,t.hasError=!0}return function e(){for(;t.stack.length;){var i=t.stack.pop();try{var n=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(n).then(e,(function(t){return r(t),e()}))}catch(e){r(e)}}if(t.hasError)throw t.error}()}}("function"==typeof SuppressedError?SuppressedError:function(e,t,r){var i=new Error(r);return i.name="SuppressedError",i.error=e,i.suppressed=t,i});!function(e){e.Action="action"}(cr||(cr={}));class ur extends it{static race(e){return gr.create(e)}visibility=null;_timeout=3e4;#B=!0;#L=!0;#j=!0;operators={conditions:(e,t)=>xe((r=>Ne(...e.map((e=>e(r,t)))).pipe(Ve(r)))),retryAndRaceWithSignalAndTimer:(e,t)=>{const r=[];return e&&r.push(At(e,t)),r.push(xt(this._timeout,t)),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return q(e)}(Xe({delay:wr}),Je(...r))}};get timeout(){return this._timeout}setTimeout(e){const t=this._clone();return t._timeout=e,t}setVisibility(e){const t=this._clone();return t.visibility=e,t}setWaitForEnabled(e){const t=this._clone();return t.#L=e,t}setEnsureElementIsInTheViewport(e){const t=this._clone();return t.#B=e,t}setWaitForStableBoundingBox(e){const t=this._clone();return t.#j=e,t}copyOptions(e){return this._timeout=e._timeout,this.visibility=e.visibility,this.#L=e.#L,this.#B=e.#B,this.#j=e.#j,this}#H=(e,t)=>this.#L?ve(e.frame.waitForFunction((e=>{if(!(e instanceof HTMLElement))return!0;return!["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(e.nodeName)||!e.hasAttribute("disabled")}),{timeout:this._timeout,signal:t},e)).pipe(ze()):Z;#$=e=>this.#j?De((()=>ve(e.evaluate((e=>new Promise((t=>{window.requestAnimationFrame((()=>{const r=e.getBoundingClientRect();window.requestAnimationFrame((()=>{const i=e.getBoundingClientRect();t([{x:r.x,y:r.y,width:r.width,height:r.height},{x:i.x,y:i.y,width:i.width,height:i.height}])}))}))}))))))).pipe(Qe((([e,t])=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height)),Xe({delay:wr}),ze()):Z;#K=e=>this.#B?ve(e.isIntersectingViewport({threshold:0})).pipe(He((e=>!e)),xe((()=>ve(e.scrollIntoView()))),xe((()=>De((()=>ve(e.isIntersectingViewport({threshold:0})))).pipe(Qe(O),Xe({delay:wr}),ze())))):Z;#V(e){const t=e?.signal,r=new Error("Locator.click");return this._wait(e).pipe(this.operators.conditions([this.#K,this.#$,this.#H],t),Ye((()=>this.emit(cr.Action,void 0))),xe((t=>ve(t.click(e)).pipe(Ke((e=>{throw t.dispose().catch(yt),e}))))),this.operators.retryAndRaceWithSignalAndTimer(t,r))}#W(e,t){const r=t?.signal,i=new Error("Locator.fill");return this._wait(t).pipe(this.operators.conditions([this.#K,this.#$,this.#H],r),Ye((()=>this.emit(cr.Action,void 0))),xe((t=>ve(t.evaluate((e=>e instanceof HTMLSelectElement?"select":e instanceof HTMLTextAreaElement?"typeable-input":e instanceof HTMLInputElement?new Set(["textarea","text","url","tel","search","password","number","email"]).has(e.type)?"typeable-input":"other-input":e.isContentEditable?"contenteditable":"unknown"))).pipe(xe((r=>{switch(r){case"select":return ve(t.select(e).then(k));case"contenteditable":case"typeable-input":return ve(t.evaluate(((e,t)=>{const r=e.isContentEditable?e.innerText:e.value;if(t.length<=r.length||!t.startsWith(e.value))return e.isContentEditable?e.innerText="":e.value="",t;const i=e.isContentEditable?e.innerText:e.value;return e.isContentEditable?(e.innerText="",e.innerText=i):(e.value="",e.value=i),t.substring(i.length)}),e)).pipe(xe((e=>ve(t.type(e)))));case"other-input":return ve(t.focus()).pipe(xe((()=>ve(t.evaluate(((e,t)=>{e.value=t,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}),e)))));case"unknown":throw new Error("Element cannot be filled out.")}}))).pipe(Ke((e=>{throw t.dispose().catch(yt),e}))))),this.operators.retryAndRaceWithSignalAndTimer(r,i))}#z(e){const t=e?.signal,r=new Error("Locator.hover");return this._wait(e).pipe(this.operators.conditions([this.#K,this.