(function(){ 'use strict';var U4=function(){},V4=function(a){if(a!=null&&a.Xh!=null)a=a.Xh(a);else{var b=V4[$APP.la(a==null?null:a)];if(b!=null)a=b.g?b.g(a):b.call(null,a);else if(b=V4._,b!=null)a=b.g?b.g(a):b.call(null,a);else throw $APP.Hb("IState.-resolved?",a);}return a},W4=function(a){if(a!=null&&a.Wh!=null)a=a.Wh(a);else{var b=W4[$APP.la(a==null?null:a)];if(b!=null)a=b.g?b.g(a):b.call(null,a);else if(b=W4._,b!=null)a=b.g?b.g(a):b.call(null,a);else throw $APP.Hb("IState.-rejected?",a);}return a},X4=function(a){if(a!= null&&a.Vh!=null)a=a.Vh(a);else{var b=X4[$APP.la(a==null?null:a)];if(b!=null)a=b.g?b.g(a):b.call(null,a);else if(b=X4._,b!=null)a=b.g?b.g(a):b.call(null,a);else throw $APP.Hb("IState.-pending?",a);}return a},Y4=function(a){if(a!=null&&a.Bf!=null)a=a.Bf(a);else{var b=Y4[$APP.la(a==null?null:a)];if(b!=null)a=b.g?b.g(a):b.call(null,a);else if(b=Y4._,b!=null)a=b.g?b.g(a):b.call(null,a);else throw $APP.Hb("IPromiseFactory.-promise",a);}return a},Z4=function(a){if(a!=null&&a.Bh!=null)a=a.Bh(a);else{var b= Z4[$APP.la(a==null?null:a)];if(b!=null)a=b.g?b.g(a):b.call(null,a);else if(b=Z4._,b!=null)a=b.g?b.g(a):b.call(null,a);else throw $APP.Hb("ICancellable.-cancel!",a);}return a},$4=function(a){if(a!=null&&a.Ch!=null)a=a.Ch(a);else{var b=$4[$APP.la(a==null?null:a)];if(b!=null)a=b.g?b.g(a):b.call(null,a);else if(b=$4._,b!=null)a=b.g?b.g(a):b.call(null,a);else throw $APP.Hb("ICancellable.-cancelled?",a);}return a},a5=function(a,b){if(a!=null&&a.Eh!=null)a=a.Eh(a,b);else{var c=a5[$APP.la(a==null?null:a)]; if(c!=null)a=c.h?c.h(a,b):c.call(null,a,b);else if(c=a5._,c!=null)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.Hb("ICompletable.-resolve!",a);}return a},b5=function(a,b){if(a!=null&&a.Dh!=null)a=a.Dh(a,b);else{var c=b5[$APP.la(a==null?null:a)];if(c!=null)a=c.h?c.h(a,b):c.call(null,a,b);else if(c=b5._,c!=null)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.Hb("ICompletable.-reject!",a);}return a},c5=function(){},d5=function(a,b){if(a!=null&&a.Cg!=null)a=a.Cg(a,b);else{var c=d5[$APP.la(a==null?null: a)];if(c!=null)a=c.h?c.h(a,b):c.call(null,a,b);else if(c=d5._,c!=null)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.Hb("IExecutor.-run!",a);}return a},e5=function(a,b){if(a!=null&&a.Dg!=null)a=a.Dg(a,b);else{var c=e5[$APP.la(a==null?null:a)];if(c!=null)a=c.h?c.h(a,b):c.call(null,a,b);else if(c=e5._,c!=null)a=c.h?c.h(a,b):c.call(null,a,b);else throw $APP.Hb("IExecutor.-submit!",a);}return a},f5=function(a,b,c){if(a!=null&&a.Sh!=null)a=a.Sh(a,b,c);else{var d=f5[$APP.la(a==null?null:a)];if(d!=null)a= d.j?d.j(a,b,c):d.call(null,a,b,c);else if(d=f5._,d!=null)a=d.j?d.j(a,b,c):d.call(null,a,b,c);else throw $APP.Hb("IScheduler.-schedule!",a);}return a},g5=function(a){this.yj=a;this.F=393216;this.M=0},l5=function(a,b,c){a[h5]!==b&&a[h5]===i5&&(a[h5]=b,a[j5]=c,k5(a))},p5=function(a,b,c){a.complete!==void 0&&(c?a.complete(null,c):a.type===m5?a.complete(b,null):a.type===n5?b instanceof o5?b.handle((d,e)=>{p5(a,d,e)}):$APP.na(b)&&q5(b.then)?b.then(d=>{p5(a,d,null)},d=>{p5(a,null,d)}):a.complete(b,null): a.type===r5?b instanceof o5?b.handle((d,e)=>{a.complete(d,e)}):$APP.na(b)&&q5(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")))},k5=function(a){if(a[s5].length!==0)for(var b=a[h5],c=a[j5],d,e,f;a[s5].length;){d=a[s5].shift();try{b===t5?e=d.resolve(c):b===u5?e=d.reject(c):f=new TypeError("invalid state")}catch(g){f=g}p5(d,e,f)}},v5=function(a){a[h5]!==i5&&hwa(k5,a)},w5= function(a){return(b,c)=>{c?a.reject(c):a.resolve(b)}},q5=function(a){return typeof a==="function"},z5=function(a,b,c){const d=new o5;a[s5].push({type:m5,resolve:b??x5,reject:c??y5,complete:w5(d)});v5(a);return d},A5=function(a,b,c){const d=new o5;a[s5].push({type:r5,resolve:b??iwa,reject:c??y5,complete:w5(d)});v5(a);return d},B5=function(a){if(a===null)return jwa;const b=new o5;b[h5]=t5;b[j5]=a;return b},C5=function(a){const b=new o5;b[h5]=u5;b[j5]=a;return b},kwa=function(a){return a.reduce((b, c)=>b.then(d=>z5(D5(c),e=>{d.push(e);return d})),B5([]))},D5=function(a){if(a instanceof o5)return a;if($APP.na(a)&&q5(a.then)){const b=new o5;a.then(c=>{b.resolve(c)},c=>{b.reject(c)});return b}return a instanceof Error?C5(a):B5(a)},lwa=function(a){const b=new o5;a.forEach(c=>{D5(c).handle((d,e)=>{e?b.reject(e):b.resolve(d)})});return b},F5=function(a){if(a==null)return $APP.u(E5);if(a!=null?$APP.Cd===a.Fh||(a.zd?0:$APP.Fb(c5,a)):$APP.Fb(c5,a))return a;if($APP.ek(a))return F5($APP.u(a));switch(a instanceof $APP.J?a.ca:null){case "default":return $APP.u(E5);case "cached":return $APP.u(E5);case "thread":return $APP.u(E5);case "vthread":return $APP.u(E5);case "same-thread":return $APP.u(G5);case "current-thread":return $APP.u(G5);default:throw new TypeError("invalid executor");}},H5=function(a,b,c){a=a==null||$APP.C.h($APP.Ao,a)?$APP.u(mwa):$APP.ek(a)?$APP.u(a):a;return f5(a,b,c)},I5=function(a){this.zj=a;this.F=393216;this.M=0},J5=function(){return new I5($APP.lg)},K5=function(a){this.Aj=a;this.F=393216; this.M=0},L5=function(){return new K5($APP.lg)},M5=function(){},N5=function(a){for(var b=[],c=arguments.length,d=0;;)if(d0){var d=$APP.rk.g(b);$APP.jk(function(e){return $5(e,function(){return $APP.C.h(0,$APP.sk.h(d,$APP.qf))?a5(c,null):null})},a)}else a5(c,null);return c},f6=function(a,b){return b5(a, b)},h6=function(a){return function(){function b(d){var e=null;if(arguments.length>0){e=0;for(var f=Array(arguments.length-0);ea,iwa=a=>B5(a),y5=a=>{throw a;},H7=class extends Error{},o5=class{constructor(a){this[s5]=[];this[h5]=i5;this[j5]=void 0;a!==void 0&&l5(this,t5,a)}get state(){return this[h5]}get value(){return this[j5]}then(a,b){const c=new o5;this[s5].push({type:n5,resolve:a?? x5,reject:b??y5,complete:w5(c)});v5(this);return c}catch(a){return this.then(null,a)}finally(a){this[s5].push({type:n5,resolve:()=>a(),reject:()=>a(),complete:()=>null});return this}handle(a,b){b=b??m5;this[s5].push({type:b,resolve:x5,reject:y5,complete:a});v5(this)}resolve(a){this[h5]===i5&&l5(this,t5,a);return null}reject(a){this[h5]===i5&&l5(this,u5,a);return null}cancel(){this.reject(new H7("promise cancelled"))}},hwa=(()=>{if(typeof $APP.ya.Promise==="function"){const a=Promise.resolve(null); return function(b,c){a.then(()=>b(c))}}return typeof $APP.ya.setImmediate==="function"?$APP.ya.setImmediate:typeof $APP.ya.setTimeout==="function"?(a,b)=>$APP.ya.setTimeout(a,0,b):(a,b)=>a.call(this,b)})(),jwa=new o5(null);var I7=$APP.Kg(null),mwa=new $APP.dk(function(){return N5.A?N5.A():N5.call(null)},null),E5=new $APP.dk(function(){return L5.A?L5.A():L5.call(null)},null),G5=new $APP.dk(function(){return J5.A?J5.A():J5.call(null)},null),J7=function J7(a){switch(arguments.length){case 1:return J7.g(arguments[0]);case 2:return J7.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};J7.g=function(a){return d5(F5(null),a)};J7.h=function(a,b){return d5(F5(a),b)}; J7.o=2;$APP.h=I5.prototype;$APP.h.V=function(a,b){return new I5(b)};$APP.h.S=function(){return this.zj};$APP.h.Fh=$APP.Cd;$APP.h.Cg=function(a,b){try{return Y4($APP.et.h(I7,b))}catch(c){return Y4(c)}};$APP.h.Dg=function(a,b){try{return Y4(b.A?b.A():b.call(null))}catch(c){return Y4(c)}};$APP.h=K5.prototype;$APP.h.V=function(a,b){return new K5(b)};$APP.h.S=function(){return this.Aj};$APP.h.Fh=$APP.Cd; $APP.h.Cg=function(a,b){return b6(b6(Y4(null),function(){try{return b.A?b.A():b.call(null)}catch(c){return null}}),I7)};$APP.h.Dg=function(a,b){return b6(Y4(null),function(){return b.A?b.A():b.call(null)})};M5.prototype.Sh=function(a,b,c){var d=new o5,e=setTimeout(function(){try{return a5(d,c.A?c.A():c.call(null))}catch(f){return b5(d,f)}},b);$5(d,function(f,g){return $APP.r(g instanceof H7)?clearTimeout(e):null});return d};O5(Promise);O5(o5);$APP.h=o5.prototype;$APP.h.Bf=function(){return this};$APP.h.Jj=$APP.Cd;$APP.h.Gh=function(a,b){return z5(this,function(c){return b.g?b.g(c):b.call(null,c)})};$APP.h.Hh=function(a,b){return z5(this,function(c){return b.g?b.g(c):b.call(null,c)})};$APP.h.Mh=function(a,b){return A5(this,function(c){return b.g?b.g(c):b.call(null,c)})};$APP.h.Nh=function(a,b){return A5(this,function(c){return b.g?b.g(c):b.call(null,c)})}; $APP.h.Kh=function(a,b){return z5(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.h.Lh=function(a,b){return z5(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.h.Oh=function(a,b){return A5(this,Y4,function(c){return b.g?b.g(c):b.call(null,c)})};$APP.h.Ph=function(a,b){return A5(this,Y4,function(c){return b.g?b.g(c):b.call(null,c)})}; $APP.h.Ih=function(a,b){this.handle(b);return this};$APP.h.Jh=function(a,b){this.handle(b);return this};$APP.h.Qh=function(a,b){return this.then(function(c){return b.g?b.g(c):b.call(null,c)})};$APP.h.Rh=function(a,b){return this.then(function(c){return b.g?b.g(c):b.call(null,c)})};$APP.h.Eh=function(a,b){return this.resolve(b)};$APP.h.Dh=function(a,b){return this.reject(b)};$APP.h.Bh=function(){return this.cancel()};$APP.h.Ch=function(){const a=this[j5];return this[h5]===u5&&a instanceof H7}; $APP.h.kd=$APP.Cd;$APP.h.oa=function(){var a=this.value;if($APP.r(this[h5]===u5))throw a;return a};$APP.h.Th=function(){return this.value};$APP.h.Uh=function(a,b){return $APP.r(this[h5]===i5)?b:this.value};$APP.h.Xh=function(){return this[h5]===t5};$APP.h.Wh=function(){return this[h5]===u5};$APP.h.Vh=function(){return this[h5]===i5};Error.prototype.Bf=function(){return C5(this)};Y4._=function(a){return B5(a)};Promise.prototype.pa=$APP.Cd;Promise.prototype.T=function(a,b){return $APP.Rc(b,"#\x3cjs/Promise[~]\x3e")}; o5.prototype.pa=$APP.Cd;o5.prototype.T=function(a,b){return $APP.Rc(b,["#\x3cPromise[",$APP.r(X4(this))?"pending":$APP.r($4(this))?"cancelled":$APP.r(W4(this))?"rejected":"resolved",":",$APP.t.g($APP.Dd(this)),"]\x3e"].join(""))};var K7=function K7(a){switch(arguments.length){case 1:return K7.g(arguments[0]);case 2:return K7.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};K7.g=function(a){return Y4(a)};K7.h=function(a,b){return b6(Y4(a),$APP.pf,b)};K7.o=2;var g6=function g6(a){switch(arguments.length){case 1:return g6.g(arguments[0]);case 2:return g6.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}}; g6.g=function(a){var b=new o5;try{var c=function(e){return a5(b,e)},d=function(e){return b5(b,e)};a.h?a.h(c,d):a.call(null,c,d)}catch(e){b5(b,e)}return b};g6.h=function(a,b){var c=new o5;J7.h(b,function(){try{var d=function(f){return a5(c,f)},e=function(f){return b5(c,f)};return a.h?a.h(d,e):a.call(null,d,e)}catch(f){return b5(c,f)}});return c};g6.o=2; var L7=function L7(a){switch(arguments.length){case 1:return L7.g(arguments[0]);case 2:return L7.h(arguments[0],arguments[1]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};L7.g=function(a){return F7(a)};L7.h=function(a,b){return F7(a,b)};L7.o=2; var M7=function M7(a){switch(arguments.length){case 2:return M7.h(arguments[0],arguments[1]);case 3:return M7.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};M7.h=function(a,b){return D7(Y4(a),b)};M7.j=function(a,b,c){return D7(Y4(a),b,c)};M7.o=3; var N7=function N7(a){switch(arguments.length){case 2:return N7.h(arguments[0],arguments[1]);case 3:return N7.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};N7.h=function(a,b){return y7(Y4(a),b)};N7.j=function(a,b,c){return y7(Y4(a),b,c)};N7.o=3; var O7=function O7(a){switch(arguments.length){case 2:return O7.h(arguments[0],arguments[1]);case 3:return O7.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};O7.h=function(a,b){return b6(Y4(b),a)};O7.j=function(a,b,c){return b6(Y4(c),b,a)};O7.o=3; var P7=function P7(a){switch(arguments.length){case 2:return P7.h(arguments[0],arguments[1]);case 3:return P7.j(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",$APP.t.g(arguments.length)].join(""));}};P7.h=function(a,b){return y7(Y4(b),a)};P7.j=function(a,b,c){return y7(Y4(c),b,a)};P7.o=3; var Q7=function Q7(a){switch(arguments.length){case 2:return Q7.h(arguments[0],arguments[1]);default:for(var c=[],d=arguments.length,e=0;;)if(e