(function(){ 'use strict';var MQ=function(){},NQ=function(a){if(null!=a&&null!=a.Sh)a=a.Sh(a);else{var b=NQ[$APP.qa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):b.call(null,a);else if(b=NQ._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Jb("IState.-resolved?",a);}return a},OQ=function(a){if(null!=a&&null!=a.Rh)a=a.Rh(a);else{var b=OQ[$APP.qa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):b.call(null,a);else if(b=OQ._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Jb("IState.-rejected?",a);}return a},PQ=function(a){if(null!= a&&null!=a.Qh)a=a.Qh(a);else{var b=PQ[$APP.qa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):b.call(null,a);else if(b=PQ._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Jb("IState.-pending?",a);}return a},QQ=function(a){if(null!=a&&null!=a.sf)a=a.sf(a);else{var b=QQ[$APP.qa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):b.call(null,a);else if(b=QQ._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Jb("IPromiseFactory.-promise",a);}return a},RQ=function(a){if(null!=a&&null!=a.wh)a=a.wh(a);else{var b= RQ[$APP.qa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):b.call(null,a);else if(b=RQ._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Jb("ICancellable.-cancel!",a);}return a},SQ=function(a){if(null!=a&&null!=a.xh)a=a.xh(a);else{var b=SQ[$APP.qa(null==a?null:a)];if(null!=b)a=b.g?b.g(a):b.call(null,a);else if(b=SQ._,null!=b)a=b.g?b.g(a):b.call(null,a);else throw $APP.Jb("ICancellable.-cancelled?",a);}return a},TQ=function(a,b){if(null!=a&&null!=a.zh)a=a.zh(a,b);else{var c=TQ[$APP.qa(null==a?null:a)]; if(null!=c)a=c.h?c.h(a,b):c.call(null,a,b);else if(c=TQ._,null!=c)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.Jb("ICompletable.-resolve!",a);}return a},UQ=function(a,b){if(null!=a&&null!=a.yh)a=a.yh(a,b);else{var c=UQ[$APP.qa(null==a?null:a)];if(null!=c)a=c.h?c.h(a,b):c.call(null,a,b);else if(c=UQ._,null!=c)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.Jb("ICompletable.-reject!",a);}return a},VQ=function(){},WQ=function(a,b){if(null!=a&&null!=a.wg)a=a.wg(a,b);else{var c=WQ[$APP.qa(null==a?null: a)];if(null!=c)a=c.h?c.h(a,b):c.call(null,a,b);else if(c=WQ._,null!=c)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.Jb("IExecutor.-run!",a);}return a},XQ=function(a,b){if(null!=a&&null!=a.xg)a=a.xg(a,b);else{var c=XQ[$APP.qa(null==a?null:a)];if(null!=c)a=c.h?c.h(a,b):c.call(null,a,b);else if(c=XQ._,null!=c)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.Jb("IExecutor.-submit!",a);}return a},YQ=function(a,b,c){if(null!=a&&null!=a.Nh)a=a.Nh(a,b,c);else{var d=YQ[$APP.qa(null==a?null:a)];if(null!=d)a= d.j?d.j(a,b,c):d.call(null,a,b,c);else if(d=YQ._,null!=d)a=d.j?d.j(a,b,c):d.call(null,a,b,c);else throw $APP.Jb("IScheduler.-schedule!",a);}return a},Oja=function(){if("undefined"===typeof ZQ||"undefined"===typeof Nja||"undefined"===typeof $Q)$Q=function(a){this.Ni=a;this.D=393216;this.K=0},$Q.prototype.U=function(a,b){return new $Q(b)},$Q.prototype.R=function(){return this.Ni},$Q.Rb=!0,$Q.Gb="promesa.util/t_promesa$util33487",$Q.Yb=function(a){return $APP.Tc(a,"promesa.util/t_promesa$util33487")}; return new $Q($APP.jg)},eR=function(a,b,c){a[aR]!==b&&a[aR]===bR&&(a[aR]=b,a[cR]=c,dR(a))},jR=function(a,b,c){void 0!==a.complete&&(c?a.complete(null,c):a.type===fR?a.complete(b,null):a.type===gR?b instanceof hR?iR(b,(d,e)=>{jR(a,d,e)}):$APP.ra(b)&&kR(b.then)?b.then(d=>{jR(a,d,null)},d=>{jR(a,null,d)}):a.complete(b,null):a.type===lR?b instanceof hR?iR(b,(d,e)=>{a.complete(d,e)}):$APP.ra(b)&&kR(b.then)?b.then(d=>{a.complete(d,null)},d=>{a.complete(null,d)}):a.complete(null,new TypeError("expected thenable")): a.complete(null,new TypeError("internal: invalid resolve type")))},dR=function(a){if(0!==a[mR].length)for(var b=a[aR],c=a[cR],d,e,f;a[mR].length;){d=a[mR].shift();try{b===nR?e=d.resolve(c):b===oR?e=d.reject(c):f=new TypeError("invalid state")}catch(g){f=g}jR(d,e,f)}},pR=function(a){a[aR]!==bR&&Pja(dR,a)},qR=function(a){return(b,c)=>{c?a.reject(c):a.resolve(b)}},kR=function(a){return"function"===typeof a},iR=function(a,b){var c=c??fR;a[mR].push({type:c,resolve:rR,reject:sR,complete:b});pR(a)},tR=function(a, b,c){const d=new hR;a[mR].push({type:fR,resolve:b??rR,reject:c??sR,complete:qR(d)});pR(a);return d},uR=function(a,b,c){const d=new hR;a[mR].push({type:lR,resolve:b??Qja,reject:c??sR,complete:qR(d)});pR(a);return d},vR=function(a){if(null===a)return Rja;const b=new hR;b[aR]=nR;b[cR]=a;return b},wR=function(a){const b=new hR;b[aR]=oR;b[cR]=a;return b},Sja=function(a){return a.reduce((b,c)=>b.then(d=>tR(xR(c),e=>{d.push(e);return d})),vR([]))},xR=function(a){if(a instanceof hR)return a;if($APP.ra(a)&& kR(a.then)){const b=new hR;a.then(c=>{b.resolve(c)},c=>{b.reject(c)});return b}return a instanceof Error?wR(a):vR(a)},yR=function(a){const b=new hR;a.forEach(c=>{iR(xR(c),(d,e)=>{e?b.reject(e):b.resolve(d)})});return b},AR=function(a){if(null==a)return $APP.u(zR);if(null!=a?$APP.Cd===a.Ah||(a.xd?0:$APP.Hb(VQ,a)):$APP.Hb(VQ,a))return a;if($APP.Wj(a))return AR($APP.u(a));switch(a instanceof $APP.N?a.ba:null){case "default":return $APP.u(zR);case "cached":return $APP.u(zR);case "thread":return $APP.u(zR); case "vthread":return $APP.u(zR);case "same-thread":return $APP.u(BR);case "current-thread":return $APP.u(BR);default:throw new TypeError("invalid executor");}},CR=function(a,b,c){a=null==a||$APP.A.h($APP.mo,a)?$APP.u(Tja):$APP.Wj(a)?$APP.u(a):a;return YQ(a,b,c)},GR=function(){if("undefined"===typeof ZQ||"undefined"===typeof DR||"undefined"===typeof ER)ER=function(a){this.Oi=a;this.D=393216;this.K=0},ER.prototype.U=function(a,b){return new ER(b)},ER.prototype.R=function(){return this.Oi},ER.prototype.Ah= $APP.Cd,ER.prototype.wg=function(a,b){try{return QQ($APP.is.h(FR,b))}catch(c){return QQ(c)}},ER.prototype.xg=function(a,b){try{return QQ(b.v?b.v():b.call(null))}catch(c){return QQ(c)}},ER.Rb=!0,ER.Gb="promesa.exec/t_promesa$exec33531",ER.Yb=function(a){return $APP.Tc(a,"promesa.exec/t_promesa$exec33531")};return new ER($APP.jg)},JR=function(){if("undefined"===typeof ZQ||"undefined"===typeof DR||"undefined"===typeof HR)HR=function(a){this.Pi=a;this.D=393216;this.K=0},HR.prototype.U=function(a,b){return new HR(b)}, HR.prototype.R=function(){return this.Pi},HR.prototype.Ah=$APP.Cd,HR.prototype.wg=function(a,b){return IR(IR(QQ(null),function(){try{return b.v?b.v():b.call(null)}catch(c){return null}}),FR)},HR.prototype.xg=function(a,b){return IR(QQ(null),function(){return b.v?b.v():b.call(null)})},HR.Rb=!0,HR.Gb="promesa.exec/t_promesa$exec33544",HR.Yb=function(a){return $APP.Tc(a,"promesa.exec/t_promesa$exec33544")};return new HR($APP.jg)},KR=function(){},LR=function(a){for(var b=[],c=arguments.length,d=0;;)if(d< c)b.push(arguments[d]),d+=1;else break;b=$APP.kg(0a,Qja=a=>vR(a),sR=a=>{throw a;},NV=class extends Error{},hR=class{constructor(a){this[mR]=[];this[aR]=bR;this[cR]=void 0;void 0!==a&&eR(this,nR,a)}get state(){return this[aR]}get value(){return this[cR]}then(a,b){const c=new hR;this[mR].push({type:gR,resolve:a?? rR,reject:b??sR,complete:qR(c)});pR(this);return c}catch(a){return this.then(null,a)}finally(a){this[mR].push({type:gR,resolve:()=>a(),reject:()=>a(),complete:()=>null});return this}resolve(a){this[aR]===bR&&eR(this,nR,a);return null}reject(a){this[aR]===bR&&eR(this,oR,a);return null}cancel(){this.reject(new NV("promise cancelled"))}},Pja=(()=>{if("function"===typeof $APP.ma.Promise){const a=Promise.resolve(null);return function(b,c){a.then(()=>b(c))}}return"function"===typeof $APP.ma.setImmediate? $APP.ma.setImmediate:"function"===typeof $APP.ma.setTimeout?(a,b)=>$APP.ma.setTimeout(a,0,b):(a,b)=>a.call(this,b)})(),Rja=new hR(null);var DR={},ER,HR,FR=$APP.Ig(null),Tja=new $APP.Vj(function(){return LR.v?LR.v():LR.call(null)},null),zR=new $APP.Vj(function(){return JR.v?JR.v():JR.call(null)},null),BR=new $APP.Vj(function(){return GR.v?GR.v():GR.call(null)},null),OV=function OV(a){switch(arguments.length){case 1:return OV.g(arguments[0]);case 2:return OV.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};OV.g=function(a){return WQ(AR(null),a)}; OV.h=function(a,b){return WQ(AR(a),b)};OV.o=2;KR.prototype.Nh=function(a,b,c){var d=new hR,e=setTimeout(function(){try{return TQ(d,c.v?c.v():c.call(null))}catch(f){return UQ(d,f)}},b);ZR(d,function(f,g){return $APP.p(g instanceof NV)?clearTimeout(e):null});return d};MR(Promise);MR(hR);$APP.l=hR.prototype;$APP.l.sf=function(){return this};$APP.l.ej=$APP.Cd;$APP.l.Bh=function(a,b){return tR(this,function(c){return b.g?b.g(c):b.call(null,c)})};$APP.l.Ch=function(a,b){return tR(this,function(c){return b.g?b.g(c):b.call(null,c)})};$APP.l.Hh=function(a,b){return uR(this,function(c){return b.g?b.g(c):b.call(null,c)})};$APP.l.Ih=function(a,b){return uR(this,function(c){return b.g?b.g(c):b.call(null,c)})}; $APP.l.Fh=function(a,b){return tR(this,function(c){return b.h?b.h(c,null):b.call(null,c,null)},function(c){return b.h?b.h(null,c):b.call(null,null,c)})};$APP.l.Gh=function(a,b){return tR(this,function(c){return b.h?b.h(c,null):b.call(null,c,null)},function(c){return b.h?b.h(null,c):b.call(null,null,c)})};$APP.l.Jh=function(a,b){return uR(this,QQ,function(c){return b.g?b.g(c):b.call(null,c)})};$APP.l.Kh=function(a,b){return uR(this,QQ,function(c){return b.g?b.g(c):b.call(null,c)})}; $APP.l.Dh=function(a,b){iR(this,b);return this};$APP.l.Eh=function(a,b){iR(this,b);return this};$APP.l.Lh=function(a,b){return this.then(function(c){return b.g?b.g(c):b.call(null,c)})};$APP.l.Mh=function(a,b){return this.then(function(c){return b.g?b.g(c):b.call(null,c)})};$APP.l.zh=function(a,b){return this.resolve(b)};$APP.l.yh=function(a,b){return this.reject(b)};$APP.l.wh=function(){return this.cancel()};$APP.l.xh=function(){const a=this[cR];return this[aR]===oR&&a instanceof NV};$APP.l.jd=$APP.Cd; $APP.l.sa=function(){var a=this.value;if($APP.p(this[aR]===oR))throw a;return a};$APP.l.Oh=function(){return this.value};$APP.l.Ph=function(a,b){return $APP.p(this[aR]===bR)?b:this.value};$APP.l.Sh=function(){return this[aR]===nR};$APP.l.Rh=function(){return this[aR]===oR};$APP.l.Qh=function(){return this[aR]===bR};Error.prototype.sf=function(){return wR(this)};QQ._=function(a){return vR(a)};Promise.prototype.na=$APP.Cd;Promise.prototype.S=function(a,b){return $APP.Tc(b,"#\x3cjs/Promise[~]\x3e")}; hR.prototype.na=$APP.Cd;hR.prototype.S=function(a,b){return $APP.Tc(b,["#\x3cPromise[",$APP.p(PQ(this))?"pending":$APP.p(SQ(this))?"cancelled":$APP.p(OQ(this))?"rejected":"resolved",":",$APP.t.g($APP.Dd(this)),"]\x3e"].join(""))};var PV=function PV(a){switch(arguments.length){case 1:return PV.g(arguments[0]);case 2:return PV.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};PV.g=function(a){return QQ(a)};PV.h=function(a,b){return IR(QQ(a),$APP.of,b)};PV.o=2;var eS=function eS(a){switch(arguments.length){case 1:return eS.g(arguments[0]);case 2:return eS.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}}; eS.g=function(a){var b=new hR;try{var c=function(e){return TQ(b,e)},d=function(e){return UQ(b,e)};a.h?a.h(c,d):a.call(null,c,d)}catch(e){UQ(b,e)}return b};eS.h=function(a,b){var c=new hR;OV.h(b,function(){try{var d=function(f){return TQ(c,f)},e=function(f){return UQ(c,f)};return a.h?a.h(d,e):a.call(null,d,e)}catch(f){return UQ(c,f)}});return c};eS.o=2; var QV=function QV(a){switch(arguments.length){case 1:return QV.g(arguments[0]);case 2:return QV.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};QV.g=function(a){return LV(a)};QV.h=function(a,b){return LV(a,b)};QV.o=2; var RV=function RV(a){switch(arguments.length){case 2:return RV.h(arguments[0],arguments[1]);case 3:return RV.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};RV.h=function(a,b){return JV(QQ(a),b)};RV.j=function(a,b,c){return JV(QQ(a),b,c)};RV.o=3; var SV=function SV(a){switch(arguments.length){case 2:return SV.h(arguments[0],arguments[1]);case 3:return SV.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};SV.h=function(a,b){return EV(QQ(a),b)};SV.j=function(a,b,c){return EV(QQ(a),b,c)};SV.o=3; var TV=function TV(a){switch(arguments.length){case 2:return TV.h(arguments[0],arguments[1]);case 3:return TV.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};TV.h=function(a,b){return IR(QQ(b),a)};TV.j=function(a,b,c){return IR(QQ(c),b,a)};TV.o=3; var UV=function UV(a){switch(arguments.length){case 2:return UV.h(arguments[0],arguments[1]);case 3:return UV.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};UV.h=function(a,b){return EV(QQ(b),a)};UV.j=function(a,b,c){return EV(QQ(c),b,a)};UV.o=3; var VV=function VV(a){switch(arguments.length){case 2:return VV.h(arguments[0],arguments[1]);default:for(var c=[],d=arguments.length,e=0;;)if(e