@devvit/ui-renderer 0.11.5-next-2024-12-16-8977290b0.0 → 0.11.5-next-2024-12-16-93e3b81f8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/devvit-surface.min.js
CHANGED
|
@@ -622,7 +622,7 @@ button inline-flex`},AN=e=>{let{createElement:n}=Ke(),{attributes:i,selected:d,r
|
|
|
622
622
|
style="${d(t)}"
|
|
623
623
|
>
|
|
624
624
|
${r===me?"":r}
|
|
625
|
-
</div>`}else return r}var Gc,zc,A4,wl=class extends rr{constructor(){super(...arguments);Se(this,Gc,window.matchMedia("(prefers-color-scheme: dark)"));Se(this,zc,()=>this.requestUpdate());Se(this,A4,()=>({stackDirection:Ce.UNRECOGNIZED}))}static get styles(){return[p4]}connectedCallback(){super.connectedCallback(),I(this,Gc)?.addEventListener("change",I(this,zc))}disconnectedCallback(){super.disconnectedCallback(),I(this,Gc)?.removeEventListener("change",I(this,zc))}async getUpdateComplete(){let i=await super.getUpdateComplete(),d=this.renderRoot.querySelectorAll("[data-block-type]");for(let r=0;r<d.length;r++)await d.item(r).updateComplete;return i}reset(){this.renderRoot.querySelectorAll("[data-block-type]").forEach(d=>{d.reset?.()})}findBlockById(i){let d=this.renderRoot.querySelector(`#${i}[data-block-type]`);if(d)return{blockType:d.dataset.blockType,element:d}}findBlocksByType(i){return Array.from(this.renderRoot.querySelectorAll(`[data-block-type=${i}]`)).map(d=>({blockType:i,element:d}))}render(){if(this.block&&this.block.type===fe.BLOCK_ROOT){let i={...I(this,A4).call(this),...this.renderContext?.()??{}},d=new c4,r=t8(this.block,i);return d.finish(),this.dispatchEvent(I0(Zc,{name:"blocks_layout",timeStart:d.timeStart,timeEnd:d.timeEnd})),Tt` <div class="${zo(this.class)}">${r}</div>`}return Tt`${CN({creative:Tt`<slot name="empty-state-image"></slot>`,title:Wp("Whoops!",{desc:"Header for message to display when rendering fails"}),description:Wp("Something went wrong while attempting to display this content.",{desc:"Message for users to display when rendering fails"})})}`}};Gc=new WeakMap,zc=new WeakMap,A4=new WeakMap,He([Cn({attribute:!1})],wl.prototype,"block",2),He([Cn({attribute:!1})],wl.prototype,"renderContext",2),He([Cn()],wl.prototype,"class",2),wl=He([wN(),E0("devvit-blocks-renderer")],wl);var bx="ServerCallRequired";var C4=class extends Error{constructor(n,i){super(bx),this.response=n,this.cause=i,this.name="CircuitBreakerResponse"}};function Tx(e){return e?.message===bx}var mu=Object.freeze({Actor:"devvit-actor",App:"devvit-app",AppUser:"devvit-app-user",AppViewerAuthToken:"devvit-app-viewer-authorization",Caller:"devvit-caller",CallerPortID:"devvit-caller-port-id",Canary:"devvit-canary",Debug:"devvit-debug",GQLHost:"devvit-gql-host",Installation:"devvit-installation",ModPermissions:"devvit-mod-permissions",Post:"devvit-post",PostAuthor:"devvit-post-author",R2Auth:"devvit-sec-authorization",R2Host:"devvit-r2-host",RemoteHostname:"devvit-remote-hostname",SettingsUri:"devvit-sec-settings-uri",StreamID:"devvit-stream-id",Subreddit:"devvit-subreddit",SubredditName:"devvit-subreddit-name",TraceID:"devvit-trace-id",User:"devvit-user",UserAgent:"devvit-user-agent",Version:"devvit-version",Language:"devvit-accept-language",Timezone:"devvit-accept-timezone",AppDependencies:"devvit-app-dependencies"}),Rx;(function(e){e.Blocks="blocks",e.EmitSnapshots="emitSnapshots",e.EmitState="emitState",e.Realtime="realtime",e.Runtime="runtime",e.Surface="surface",e.UseAsync="useAsync",e.Payments="payments",e.Bootstrap="bootstrap",e.WebView="webView"})(Rx||(Rx={}));function Nx(e,n){let i,d=0,r;return function(...t){return r=t,i??(i=setTimeout(()=>{d=Date.now(),i=void 0;let s=r;r=void 0,e.apply(this,s)},Math.max(0,n-(Date.now()-d)))),()=>{i!=null&&clearTimeout(i),i=void 0,r=void 0}}}function xx(e,n){if(!e)throw Error(n)}var g4;(function(e){e.COMMENT="t1_",e.ACCOUNT="t2_",e.LINK="t3_",e.MESSAGE="t4_",e.SUBREDDIT="t5_",e.AWARD="t6_"})(g4||(g4={}));function Y_(e){return e.startsWith(g4.LINK)}function Q_(e){xx(Y_(e),`Expected link id to start with ${g4.LINK}, got ${e}}`)}function Ix(e){return Q_(e),e}var j_=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,M0=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");let n=e.match(j_);if(!n)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return n.shift(),n},Ex=e=>e==="*"||e==="x"||e==="X",Ox=e=>{let n=parseInt(e,10);return isNaN(n)?e:n},eB=(e,n)=>typeof e!=typeof n?[String(e),String(n)]:[e,n],nB=(e,n)=>{if(Ex(e)||Ex(n))return 0;let[i,d]=eB(Ox(e),Ox(n));return i>d?1:i<d?-1:0},r8=(e,n)=>{for(let i=0;i<Math.max(e.length,n.length);i++){let d=nB(e[i]||"0",n[i]||"0");if(d!==0)return d}return 0};var Px=(e,n)=>{let i=M0(e),d=M0(n),r=i.pop(),t=d.pop(),s=r8(i,d);return s!==0?s:r&&t?r8(r.split("."),t.split(".")):r||t?r?-1:1:0};var d8=(e,n,i)=>{iB(i);let d=Px(e,n);return _x[i].includes(d)},_x={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Mx=Object.keys(_x),iB=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Mx.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Mx.join("|")}`)};function Bx(e,n,i){let{width:d,height:r}=e.contentRect,s=n.getComputedStyle(i).fontSize.split("px")[0],f=s?parseFloat(s)/16:1;return{width:Math.round(d),height:Math.round(r),scale:n.devicePixelRatio,fontScale:f}}typeof ArrayBuffer.isView>"u"&&(ArrayBuffer.isView=function(e){return e!=null&&e.__proto__!=null&&e.__proto__.__proto__===Int8Array.prototype.__proto__});typeof Array.prototype.fill>"u"&&Object.defineProperty(Array.prototype,"fill",{value:function(e){if(this==null)throw new TypeError("this is null or not defined");for(var n=Object(this),i=n.length>>>0,d=arguments[1],r=d>>0,t=r<0?Math.max(i+r,0):Math.min(r,i),s=arguments[2],f=s===void 0?i:s>>0,p=f<0?Math.max(i+f,0):Math.min(f,i);t<p;)n[t]=e,t++;return n}});[Int8Array,Int16Array,Uint16Array,Int32Array,Float32Array,Float64Array].forEach(function(e){typeof e.prototype.fill>"u"&&Object.defineProperty(e.prototype,"fill",{value:Array.prototype.fill})});typeof Math.clz32>"u"&&(Math.clz32=function(e,n){return function(i){var d=i>>>0;return d===0?32:31-(e(d)/n|0)|0}}(Math.log,Math.LN2));typeof Math.imul>"u"&&(Math.imul=function(n,i){return(n&4294901760)*(i&65535)+(n&65535)*(i|0)|0});var Qx=Math.clz32,f8=ArrayBuffer.isView,kn=Math.imul;V(g8,"CharSequence",Zo);V(b8,"Number",te);V(T8,"Unit",di);V(U0,"IntCompanionObject",di);V(bi,"Collection",Zo);V(Fo,"AbstractCollection",te,U,[bi]);V(Yr,"AbstractMutableCollection",te,Fo,[Fo,bi]);V(e3,"IteratorImpl",te);V(V0,"List",Zo,U,[bi]);V(gr,"AbstractMutableList",te,Yr,[Yr,bi,V0]);V(Lo,"Map",Zo);V(br,"AbstractMap",te,U,[Lo]);V(_0,"AbstractMutableMap",te,br,[br,Lo]);V(r3,"Set",Zo,U,[bi]);V(_o,"AbstractMutableSet",te,Yr,[Yr,bi,r3]);V(iI,"Companion",di);V(Kn,"ArrayList",te,gr,[gr,bi,V0],rt);V(Qr,"HashMap",te,_0,[_0,Lo],mB);V(Tr,"HashMapEntrySetBase",te,_o,[bi,r3,_o]);V(x8,"HashMapEntrySet",te,Tr);V(wu,"HashSet",te,_o,[_o,bi,r3],I8);V(uI,"Companion",di);V(Uo,"Itr",te);V(M8,"KeysItr",te,Uo);V(i3,"EntriesItr",te,Uo);V(Bo,"Entry",Zo);V(Cl,"EntryRef",te,U,[Bo]);function tB(e){var n;e:{var i;if(On(e,bi)?i=e.t():i=!1,i){n=!0;break e}for(var d=e.l();d.m();){var r=d.o(),t=r,s;if(t!=null&&On(t,Bo)?s=this.c4(t):s=!1,!s){n=!1;break e}}n=!0}return n}V(lI,"InternalMap",Zo);V(Ii,"InternalHashMap",te,U,[lI],E8);V(_4,"LinkedHashMap",te,Qr,[Qr,Lo],t3);V(ed,"StringBuilder",te,U,[g8],_8);V(mI,"Companion",di);V(kI,"Char",te);V(yI,"Companion",di);V(Ct,"Enum",te);V(B4,U,te);V(II,"Companion",di);V(Ve,"Long",te,b8);V(Vo,"Exception",te,Error,U,JI);V(qi,"RuntimeException",te,Vo,U,WI);V($0,"IllegalArgumentException",te,qi,U,qI);V(G0,"IndexOutOfBoundsException",te,qi,U,DI);V(z0,"IllegalStateException",te,qi,U,$I);V(F4,"UnsupportedOperationException",te,qi,U,K0);V(X0,"NoSuchElementException",te,qi,U,Jo);V(U4,"ConcurrentModificationException",te,qi,U,V8);V(Y0,"ArithmeticException",te,qi,U,zI);V(Z4,"NullPointerException",te,qi,U,J8);V(V4,"ClassCastException",te,qi,U,H8);V(Q0,"UninitializedPropertyAccessException",te,qi,U,XI);V(Au,"Companion",di);V(jI,"Companion",di);V(J4,"Companion",di);V(nE,"Companion",di);V(Pn,"ArrayDeque",te,gr,U,l3);V(td,"EmptyList",di,U,[V0]);V(H4,"EmptyIterator",di);V(Ho,"ArrayAsCollection",te,U,[bi]);V(q4,"IntIterator",te);V(rE,"Companion",di);V(_d,"IntProgression",te);V(Su,"IntRange",te,_d);V(D4,"IntProgressionIterator",te,q4);V(W8,"Companion",di);V(gi,"Pair",te);function g8(){}function b8(){}function T8(){}c(T8).toString=function(){return"kotlin.Unit"};var Ie;function U0(){this.MIN_VALUE=-2147483648,this.MAX_VALUE=2147483647,this.SIZE_BYTES=4,this.SIZE_BITS=32}c(U0).c=function(){return this.MIN_VALUE};c(U0).d=function(){return this.MAX_VALUE};c(U0).e=function(){return this.SIZE_BYTES};c(U0).f=function(){return this.SIZE_BITS};var R8;function rB(e){return e!==e}function dB(e){var n;if(e===0)n=0;else{var i=31;n=1<<(i-Qx(e)|0)}return n}function jx(e){return iF(e)}function oB(e,n){return n}function aB(e,n){return J0(Array(n),null)}function E4(e){return dF([e])}function Z0(e){var n;return e.toArray!==void 0?n=e.toArray():n=jx(e),n}function Ue(e,n,i,d,r){tt.h(d,r,e.length);var t=r-d|0;if(tt.h(i,i+t|0,n.length),f8(n)&&f8(e)){var s=e.subarray(d,r);n.set(s,i)}else if(e!==n||i<=d){var f=0;if(f<t)do{var p=f;f=f+1|0,n[i+p|0]=e[d+p|0]}while(f<t)}else{var v=t-1|0;if(0<=v)do{var w=v;v=v+-1|0,n[i+w|0]=e[d+w|0]}while(0<=v)}}function uB(e){return e<0&&oF(),e}function Yr(){Fo.call(this)}c(Yr).j=function(e){this.k();for(var n=this.l();n.m();)if(Ze(n.o(),e))return n.n(),!0;return!1};c(Yr).p=function(e){this.k();for(var n=!1,i=e.l();i.m();){var d=i.o();this.i(d)&&(n=!0)}return n};c(Yr).toJSON=function(){return this.toArray()};c(Yr).k=function(){};function e3(e){this.w_1=e,this.u_1=0,this.v_1=-1}c(e3).m=function(){return this.u_1<this.w_1.q()};c(e3).o=function(){if(!this.m())throw Jo();var e=this,n=this.u_1;return this.u_1=n+1|0,e.v_1=n,this.w_1.x(this.v_1)};c(e3).n=function(){if(this.v_1===-1){var e="Call next() or previous() before removing element from the iterator.";throw a3(nd(e))}this.w_1.z(this.v_1),this.u_1=this.v_1,this.v_1=-1};function gr(){Yr.call(this),this.y_1=0}c(gr).i=function(e){return this.k(),this.a1(this.q(),e),!0};c(gr).l=function(){return new e3(this)};c(gr).r=function(e){return this.b1(e)>=0};c(gr).b1=function(e){var n;e:{for(var i=0,d=this.l();d.m();){var r=d.o();if(Ze(r,e)){n=i;break e}i=i+1|0}n=-1}return n};c(gr).equals=function(e){return e===this?!0:e!=null&&On(e,V0)?tt.c1(this,e):!1};c(gr).hashCode=function(){return tt.d1(this)};function _0(){br.call(this),this.g1_1=null,this.h1_1=null}c(_0).j1=function(e){this.k();for(var n=this.k1().l();n.m();){var i=n.o(),d=i.l1();if(Ze(e,d)){var r=i.m1();return n.n(),r}}return null};c(_0).k=function(){};function _o(){Yr.call(this)}c(_o).equals=function(e){return e===this?!0:e!=null&&On(e,r3)?q8.s1(this,e):!1};c(_o).hashCode=function(){return q8.t1(this)};function eI(e){if(!(e>=0)){var n="capacity must be non-negative.";throw jr(nd(n))}return J0(Array(e),null)}function nI(e,n){e[n]=null}function Lx(e,n,i){e.fill(null,n,i)}function Fx(e,n){return ML(e,n)}function iI(){c8=this;var e=this,n=O4(0);n.w1_1=!0,e.x1_1=n}var c8;function lB(){return c8==null&&new iI,c8}function sB(e){var n=[];return Kn.call(e,n),e}function rt(){return sB(Ge(c(Kn)))}function fB(e,n){var i=[];if(Kn.call(n,i),!(e>=0)){var d="Negative initial capacity: "+e;throw jr(nd(d))}return n}function O4(e){return fB(e,Ge(c(Kn)))}function cB(e,n){var i=Z0(e);return Kn.call(n,i),n}function N8(e){return cB(e,Ge(c(Kn)))}function pB(e,n){var i=e.q();return e.v1_1.length=e.q()+n|0,i}function tI(e,n){return tt.y1(n,e.q()),n}function hB(e,n){return tt.z1(n,e.q()),n}function Kn(e){lB(),gr.call(this),this.v1_1=e,this.w1_1=!1}c(Kn).q=function(){return this.v1_1.length};c(Kn).x=function(e){var n=this.v1_1[tI(this,e)];return n==null||n!=null?n:rn()};c(Kn).i=function(e){return this.k(),this.v1_1.push(e),this.y_1=this.y_1+1|0,!0};c(Kn).a1=function(e,n){this.k(),this.v1_1.splice(hB(this,e),0,n),this.y_1=this.y_1+1|0};c(Kn).p=function(e){if(this.k(),e.t())return!1;for(var n=pB(this,e.q()),i=0,d=e.l();d.m();){var r=d.o(),t=i;i=t+1|0;var s=uB(t);this.v1_1[n+s|0]=r}return this.y_1=this.y_1+1|0,!0};c(Kn).z=function(e){this.k(),tI(this,e),this.y_1=this.y_1+1|0;var n;return e===I4(this)?n=this.v1_1.pop():n=this.v1_1.splice(e,1)[0],n};c(Kn).j=function(e){this.k();var n=0,i=this.v1_1.length-1|0;if(n<=i)do{var d=n;if(n=n+1|0,Ze(this.v1_1[d],e))return this.v1_1.splice(d,1),this.y_1=this.y_1+1|0,!0}while(n<=i);return!1};c(Kn).b1=function(e){return cI(this.v1_1,e)};c(Kn).toString=function(){return YB(this.v1_1)};c(Kn).a2=function(){return[].slice.call(this.v1_1)};c(Kn).toArray=function(){return this.a2()};c(Kn).k=function(){if(this.w1_1)throw K0()};function vB(e,n){return _0.call(n),Qr.call(n),n.f2_1=e,n}function rI(e){return vB(E8(),e),e}function mB(){return rI(Ge(c(Qr)))}c(Qr).p1=function(e){return this.f2_1.h2(e)};c(Qr).k1=function(){var e=this.g2_1,n;if(e==null){var i=new x8(this.f2_1);this.g2_1=i,n=i}else n=e;return n};c(Qr).r1=function(e){return this.f2_1.r1(e)};c(Qr).i1=function(e,n){return this.f2_1.i1(e,n)};c(Qr).j1=function(e){return this.f2_1.j1(e)};c(Qr).q=function(){return this.f2_1.q()};function Qr(){this.g2_1=null}function x8(e){Tr.call(this,e)}c(x8).l=function(){return this.j2_1.k2()};function Tr(e){_o.call(this),this.j2_1=e}c(Tr).q=function(){return this.j2_1.q()};c(Tr).t=function(){return this.j2_1.q()===0};c(Tr).l2=function(e){return this.j2_1.n2(e)};c(Tr).r=function(e){return e!=null&&On(e,Bo)?this.l2(e!=null&&On(e,Bo)?e:rn()):!1};c(Tr).m2=function(e){throw K0()};c(Tr).i=function(e){return this.m2(e!=null&&On(e,Bo)?e:rn())};c(Tr).p=function(e){throw K0()};c(Tr).s=function(e){return this.j2_1.o2(e)};c(Tr).k=function(){return this.j2_1.k()};function kB(e,n){return _o.call(n),wu.call(n),n.p2_1=e,n}function yB(e){return kB(E8(),e),e}function I8(){return yB(Ge(c(wu)))}c(wu).i=function(e){return this.p2_1.i1(e,!0)==null};c(wu).r=function(e){return this.p2_1.h2(e)};c(wu).t=function(){return this.p2_1.q()===0};c(wu).l=function(){return this.p2_1.q2()};c(wu).q=function(){return this.p2_1.q()};function wu(){}function dI(e,n){return dB(kn(T4(n,1),3))}function oI(e,n){return Qx(n)+1|0}function SB(e){return wB(8,e),e}function E8(){return SB(Ge(c(Ii)))}function wB(e,n){return Ii.call(n,eI(e),null,new Int32Array(e),new Int32Array(dI(n3,e)),2,0),n}function B0(e){return e.r2_1.length}function Qt(e){return e.u2_1.length}function O8(e){e.y2_1=e.y2_1+1|0}function AB(e,n){CB(e,n)?P8(e,Qt(e)):gB(e,e.w2_1+n|0)}function CB(e,n){var i=B0(e)-e.w2_1|0,d=e.w2_1-e.q()|0;return i<n&&(d+i|0)>=n?d>=(B0(e)/4|0):!1}function gB(e,n){if(n<0)throw GI("too many elements");if(n>B0(e)){var i=tt.b3(B0(e),n);e.r2_1=Fx(e.r2_1,i);var d=e,r=e.s2_1;d.s2_1=r==null?null:Fx(r,i),e.t2_1=PL(e.t2_1,i);var t=dI(n3,i);t>Qt(e)&&P8(e,t)}}function bB(e){var n=e.s2_1;if(n!=null)return n;var i=eI(B0(e));return e.s2_1=i,i}function P4(e,n){return n==null?0:kn(Zn(n),-1640531527)>>>e.x2_1|0}function TB(e){for(var n=0,i=0,d=e.s2_1;n<e.w2_1;)e.t2_1[n]>=0&&(e.r2_1[i]=e.r2_1[n],d!=null&&(d[i]=d[n]),i=i+1|0),n=n+1|0;Lx(e.r2_1,i,e.w2_1),d==null||Lx(d,i,e.w2_1),e.w2_1=i}function P8(e,n){O8(e),e.w2_1>e.z2_1&&TB(e),n!==Qt(e)?(e.u2_1=new Int32Array(n),e.x2_1=oI(n3,n)):OL(e.u2_1,0,0,Qt(e));for(var i=0;i<e.w2_1;){var d=i;if(i=d+1|0,!RB(e,d))throw a3("This cannot happen with fixed magic multiplier and grow-only hash array. Have object hashCodes changed?")}}function RB(e,n){for(var i=P4(e,e.r2_1[n]),d=e.v2_1;;){var r=e.u2_1[i];if(r===0)return e.u2_1[i]=n+1|0,e.t2_1[n]=i,!0;if(d=d-1|0,d<0)return!1;var t=i;i=t-1|0,t===0&&(i=Qt(e)-1|0)}}function M4(e,n){for(var i=P4(e,n),d=e.v2_1;;){var r=e.u2_1[i];if(r===0)return-1;if(r>0&&Ze(e.r2_1[r-1|0],n))return r-1|0;if(d=d-1|0,d<0)return-1;var t=i;i=t-1|0,t===0&&(i=Qt(e)-1|0)}}function NB(e,n){e.k();e:for(;;)for(var i=P4(e,n),d=R4(kn(e.v2_1,2),Qt(e)/2|0),r=0;;){var t=e.u2_1[i];if(t<=0){if(e.w2_1>=B0(e)){AB(e,1);continue e}var s=e.w2_1;e.w2_1=s+1|0;var f=s;return e.r2_1[f]=n,e.t2_1[f]=i,e.u2_1[i]=f+1|0,e.z2_1=e.z2_1+1|0,O8(e),r>e.v2_1&&(e.v2_1=r),f}if(Ze(e.r2_1[t-1|0],n))return-t|0;if(r=r+1|0,r>d){P8(e,kn(Qt(e),2));continue e}var p=i;i=p-1|0,p===0&&(i=Qt(e)-1|0)}}function xB(e,n){e.k();var i=M4(e,n);return i<0?-1:(aI(e,i),i)}function aI(e,n){nI(e.r2_1,n),IB(e,e.t2_1[n]),e.t2_1[n]=-1,e.z2_1=e.z2_1-1|0,O8(e)}function IB(e,n){for(var i=n,d=n,r=0,t=R4(kn(e.v2_1,2),Qt(e)/2|0);;){var s=i;if(i=s-1|0,s===0&&(i=Qt(e)-1|0),r=r+1|0,r>e.v2_1)return e.u2_1[d]=0,Ie;var f=e.u2_1[i];if(f===0)return e.u2_1[d]=0,Ie;if(f<0)e.u2_1[d]=-1,d=i,r=0;else{var p=P4(e,e.r2_1[f-1|0]);((p-i|0)&(Qt(e)-1|0))>=r&&(e.u2_1[d]=f,e.t2_1[f-1|0]=d,d=i,r=0)}if(t=t-1|0,t<0)return e.u2_1[d]=-1,Ie}}function EB(e,n){return e.z2_1===n.q()?e.o2(n.k1()):!1}function uI(){this.c3_1=-1640531527,this.d3_1=8,this.e3_1=2,this.f3_1=-1}var n3;function Uo(e){this.g3_1=e,this.h3_1=0,this.i3_1=-1,this.j3_1=this.g3_1.y2_1,this.k3()}c(Uo).k3=function(){for(;this.h3_1<this.g3_1.w2_1&&this.g3_1.t2_1[this.h3_1]<0;)this.h3_1=this.h3_1+1|0};c(Uo).m=function(){return this.h3_1<this.g3_1.w2_1};c(Uo).n=function(){if(this.l3(),this.i3_1===-1){var e="Call next() before removing element from the iterator.";throw a3(nd(e))}this.g3_1.k(),aI(this.g3_1,this.i3_1),this.i3_1=-1,this.j3_1=this.g3_1.y2_1};c(Uo).l3=function(){if(this.g3_1.y2_1!==this.j3_1)throw V8()};function M8(e){Uo.call(this,e)}c(M8).o=function(){if(this.l3(),this.h3_1>=this.g3_1.w2_1)throw Jo();var e=this,n=this.h3_1;this.h3_1=n+1|0,e.i3_1=n;var i=this.g3_1.r2_1[this.i3_1];return this.k3(),i};function i3(e){Uo.call(this,e)}c(i3).o=function(){if(this.l3(),this.h3_1>=this.g3_1.w2_1)throw Jo();var e=this,n=this.h3_1;this.h3_1=n+1|0,e.i3_1=n;var i=new Cl(this.g3_1,this.i3_1);return this.k3(),i};c(i3).u3=function(){if(this.h3_1>=this.g3_1.w2_1)throw Jo();var e=this,n=this.h3_1;this.h3_1=n+1|0,e.i3_1=n;var i=this.g3_1.r2_1[this.i3_1],d=i==null?null:Zn(i),r=d??0,t=q0(this.g3_1.s2_1)[this.i3_1],s=t==null?null:Zn(t),f=r^(s??0);return this.k3(),f};c(i3).v3=function(e){if(this.h3_1>=this.g3_1.w2_1)throw Jo();var n=this,i=this.h3_1;this.h3_1=i+1|0,n.i3_1=i;var d=this.g3_1.r2_1[this.i3_1];Ze(d,this.g3_1)?e.y3("(this Map)"):e.x3(d),e.z3(61);var r=q0(this.g3_1.s2_1)[this.i3_1];Ze(r,this.g3_1)?e.y3("(this Map)"):e.x3(r),this.k3()};function Cl(e,n){this.a4_1=e,this.b4_1=n}c(Cl).l1=function(){return this.a4_1.r2_1[this.b4_1]};c(Cl).m1=function(){return q0(this.a4_1.s2_1)[this.b4_1]};c(Cl).equals=function(e){var n,i;return e!=null&&On(e,Bo)?i=Ze(e.l1(),this.l1()):i=!1,i?n=Ze(e.m1(),this.m1()):n=!1,n};c(Cl).hashCode=function(){var e=this.l1(),n=e==null?null:Zn(e),i=n??0,d=this.m1(),r=d==null?null:Zn(d);return i^(r??0)};c(Cl).toString=function(){return""+this.l1()+"="+this.m1()};function Ii(e,n,i,d,r,t){this.r2_1=e,this.s2_1=n,this.t2_1=i,this.u2_1=d,this.v2_1=r,this.w2_1=t,this.x2_1=oI(n3,Qt(this)),this.y2_1=0,this.z2_1=0,this.a3_1=!1}c(Ii).q=function(){return this.z2_1};c(Ii).r1=function(e){var n=M4(this,e);return n<0?null:q0(this.s2_1)[n]};c(Ii).h2=function(e){return M4(this,e)>=0};c(Ii).i1=function(e,n){var i=NB(this,e),d=bB(this);if(i<0){var r=d[(-i|0)-1|0];return d[(-i|0)-1|0]=n,r}else return d[i]=n,null};c(Ii).j1=function(e){var n=xB(this,e);if(n<0)return null;var i=q0(this.s2_1),d=i[n];return nI(i,n),d};c(Ii).equals=function(e){var n;if(e===this)n=!0;else{var i;e!=null&&On(e,Lo)?i=EB(this,e):i=!1,n=i}return n};c(Ii).hashCode=function(){for(var e=0,n=this.k2();n.m();)e=e+n.u3()|0;return e};c(Ii).toString=function(){var e=MB(2+kn(this.z2_1,3)|0);e.y3("{");for(var n=0,i=this.k2();i.m();)n>0&&e.y3(", "),i.v3(e),n=n+1|0;return e.y3("}"),e.toString()};c(Ii).k=function(){if(this.a3_1)throw K0()};c(Ii).n2=function(e){var n=M4(this,e.l1());return n<0?!1:Ze(q0(this.s2_1)[n],e.m1())};c(Ii).c4=function(e){return this.n2(On(e,Bo)?e:rn())};c(Ii).q2=function(){return new M8(this)};c(Ii).k2=function(){return new i3(this)};function lI(){}function OB(e){return rI(e),_4.call(e),e}function t3(){return OB(Ge(c(_4)))}c(_4).k=function(){return this.f2_1.k()};function _4(){}function PB(e,n){return sI(n),n}function MB(e){return PB(e,Ge(c(ed)))}function sI(e){return ed.call(e,""),e}function _8(){return sI(Ge(c(ed)))}function ed(e){this.w3_1=e!==void 0?e:""}c(ed).a=function(){return this.w3_1.length};c(ed).b=function(e){var n=this.w3_1,i;if(e>=0&&e<=aE(n))i=L0(n,e);else throw W0("index: "+e+", length: "+this.a()+"}");return i};c(ed).z3=function(e){return this.w3_1=this.w3_1+N4(e),this};c(ed).j4=function(e){return this.w3_1=this.w3_1+d3(e),this};c(ed).x3=function(e){return this.w3_1=this.w3_1+d3(e),this};c(ed).y3=function(e){var n=this,i=this.w3_1;return n.w3_1=i+(e??"null"),this};c(ed).toString=function(){return this.w3_1};function Ux(e){var n=N4(e).toUpperCase();return n.length>1?e:L0(n,0)}function _B(e,n,i,d,r,t){return t=t===U?!1:t,lE(e,n,i,d,r,t)}function B8(e){switch(e.length){case 0:return Rr();case 1:return E4(e[0]);default:return BB(e)}}function fI(e){return e.length-1|0}function BB(e){return N8(rF(e))}function cI(e,n){if(n==null){var i=0,d=e.length-1|0;if(i<=d)do{var r=i;if(i=i+1|0,e[r]==null)return r}while(i<=d)}else{var t=0,s=e.length-1|0;if(t<=s)do{var f=t;if(t=t+1|0,Ze(n,e[f]))return f}while(t<=s)}return-1}function LB(e,n){return cI(e,n)>=0}function FB(e,n,i,d,r,t,s){return n=n===U?", ":n,i=i===U?"":i,d=d===U?"":d,r=r===U?-1:r,t=t===U?"...":t,s=s===U?null:s,UB(e,_8(),n,i,d,r,t,s).toString()}function UB(e,n,i,d,r,t,s,f){i=i===U?", ":i,d=d===U?"":d,r=r===U?"":r,t=t===U?-1:t,s=s===U?"...":s,f=f===U?null:f,n.j4(d);var p=0,v=0,w=e.length;e:for(;v<w;){var b=e[v];if(v=v+1|0,p=p+1|0,p>1&&n.j4(i),t<0||p<=t)oE(n,b,f);else break e}return t>=0&&p>t&&n.j4(s),n.j4(r),n}function pI(e,n,i,d,r,t,s){return n=n===U?", ":n,i=i===U?"":i,d=d===U?"":d,r=r===U?-1:r,t=t===U?"...":t,s=s===U?null:s,ZB(e,_8(),n,i,d,r,t,s).toString()}function ZB(e,n,i,d,r,t,s,f){i=i===U?", ":i,d=d===U?"":d,r=r===U?"":r,t=t===U?-1:t,s=s===U?"...":s,f=f===U?null:f,n.j4(d);var p=0,v=e.l();e:for(;v.m();){var w=v.o();if(p=p+1|0,p>1&&n.j4(i),t<0||p<=t)oE(n,w,f);else break e}return t>=0&&p>t&&n.j4(s),n.j4(r),n}function hI(e){if(e.t())throw u3("List is empty.");return e.x(0)}function vI(e,n){if(On(n,bi)){var i=O4(e.q()+n.q()|0);return i.p(e),i.p(n),i}else{var d=N8(e);return aF(d,n),d}}function T4(e,n){return e<n?n:e}function VB(e,n){return dE.k4(e,n,-1)}function R4(e,n){return e>n?n:e}function JB(e){var n=e&65535;return n}function Zx(e){return e}function N4(e){return String.fromCharCode(e)}function mI(){p8=this,this.l4_1=0,this.m4_1=65535,this.n4_1=55296,this.o4_1=56319,this.p4_1=56320,this.q4_1=57343,this.r4_1=55296,this.s4_1=57343,this.t4_1=2,this.u4_1=16}var p8;function Vx(){return p8==null&&new mI,p8}function kI(){}function V0(){}function bi(){}function Bo(){}function Lo(){}function r3(){}function yI(){}var HB;function Ct(e,n){this.v4_1=e,this.w4_1=n}c(Ct).x4=function(){return this.v4_1};c(Ct).y4=function(){return this.w4_1};c(Ct).z4=function(e){return jB(this.w4_1,e.w4_1)};c(Ct).a5=function(e){return this.z4(e instanceof Ct?e:rn())};c(Ct).equals=function(e){return this===e};c(Ct).hashCode=function(){return nL(this)};c(Ct).toString=function(){return this.v4_1};function d3(e){var n=e==null?null:nd(e);return n??"null"}function qB(e){for(var n=1,i=[],d=0,r=e.length;d<r;){var t=e[d];d=d+1|0;var s=n,f=t.prototype.$imask$,p=f??t.$imask$;p!=null&&(i.push(p),s=p.length);var v=t.$metadata$.iid,w;v==null?w=null:w=DB(v);var b=w;b!=null&&(i.push(b),s=Math.max(s,b.length)),s>n&&(n=s)}return $B(n,i)}function DB(e){var n=e>>5,i=new Int32Array(n+1|0),d=e&31,r=1<<d;return i[n]=i[n]|r,i}function $B(e,n){for(var i=0,d=new Int32Array(e);i<e;){for(var r=i,t=0,s=0,f=n.length;s<f;){var p=n[s];s=s+1|0,r<p.length&&(t=t|p[r])}d[r]=t,i=i+1|0}return d}function WB(e,n){var i=n>>5;if(i>e.length)return!1;var d=n&31,r=1<<d;return!!(e[i]&r)}function J0(e,n){var i=0,d=e.length-1|0;if(i<=d)do{var r=i;i=i+1|0,e[r]=n}while(r!==d);return e}function GB(e){return new B4(e)}function B4(e){this.c5_1=e,this.b5_1=0}c(B4).m=function(){return this.b5_1!==this.c5_1.length};c(B4).o=function(){var e;if(this.b5_1!==this.c5_1.length){var n=this.b5_1;this.b5_1=n+1|0,e=this.c5_1[n]}else throw u3(""+this.b5_1);return e};function o8(){return H0(),SI}var SI;function wI(){return H0(),AI}var AI,zB;function h8(){return H0(),CI}var CI;function gI(){return H0(),bI}var bI;function KB(){return H0(),TI}var TI;function XB(e){return H0(),(e|0)===e?LI(e):(wI()[0]=e,kn(h8()[KB()],31)+h8()[gI()]|0)}var Jx;function H0(){Jx||(Jx=!0,SI=new ArrayBuffer(8),AI=new Float64Array(o8()),zB=new Float32Array(o8()),CI=new Int32Array(o8()),wI()[0]=-1,bI=h8()[0]!==0?1:0,TI=1-gI()|0)}function L0(e,n){var i;if(RI(e)){var d=e.charCodeAt(n),r;Vx();var t=0;if(d<Zx(t))r=!0;else{Vx();var s=65535;r=d>Zx(s)}if(r)throw jr("Invalid Char code: "+d);i=TL(d)}else i=e.b(n);return i}function RI(e){return typeof e=="string"}function ku(e){var n;return RI(e)?n=e.length:n=e.a(),n}function YB(e){return FB(e,", ","[","]",U,U,QB)}function QB(e){return nd(e)}function jB(e,n){var i;switch(typeof e){case"number":var d;typeof n=="number"?d=Hx(e,n):n instanceof Ve?d=Hx(e,n.f5()):d=qx(e,n),i=d;break;case"string":case"boolean":i=qx(e,n);break;default:i=eL(e,n);break}return i}function Hx(e,n){var i;if(e<n)i=-1;else if(e>n)i=1;else if(e===n){var d;if(e!==0)d=0;else{var r=1/e,t;r===1/n?t=0:r<0?t=-1:t=1,d=t}i=d}else e!==e?i=n!==n?0:1:i=-1;return i}function qx(e,n){return e<n?-1:e>n?1:0}function eL(e,n){return e.a5(n)}function nL(e){return v8(e)}function v8(e){if(!("kotlinHashCodeValue$"in e)){var n=NI(),i=new Object;i.value=n,i.enumerable=!1,Object.defineProperty(e,"kotlinHashCodeValue$",i)}return e.kotlinHashCodeValue$}function NI(){return Math.random()*4294967296|0}function nd(e){var n;return e==null?n="null":NL(e)?n="[...]":typeof e.toString!="function"?n=iL(e):n=e.toString(),n}function iL(e){return Object.prototype.toString.call(e)}function Zn(e){if(e==null)return 0;var n=typeof e,i;switch(n){case"object":i=typeof e.hashCode=="function"?e.hashCode():v8(e);break;case"function":i=v8(e);break;case"number":i=XB(e);break;case"boolean":i=tL(e);break;case"string":i=L8(String(e));break;case"bigint":i=rL(e);break;case"symbol":i=dL(e);break;default:i=function(){throw new Error("Unexpected typeof `"+n+"`")}();break}return i}function tL(e){return e?1231:1237}function L8(e){var n=0,i=e.length,d=0,r=i-1|0;if(d<=r)do{var t=d;d=d+1|0;var s=e.charCodeAt(t);n=kn(n,31)+s|0}while(t!==r);return n}function rL(e){for(var n=BigInt(32),i=BigInt(4294967295),d=e<0?-e:e,r=0,t=e<0?-1:1;d!=0;){var s=Number(d&i);r=kn(31,r)+s|0,d=d>>n}return kn(r,t)}function dL(e){var n=oL(e)?aL():uL(),i=n.get(e);if(i!==U)return i;var d=NI();return n.set(e,d),d}function oL(e){return Symbol.keyFor(e)!=U}function aL(){return a8===U&&(a8=new Map),a8}function uL(){return u8===U&&(u8=new WeakMap),u8}var a8,u8;function Ze(e,n){if(e==null)return n==null;if(n==null)return!1;if(typeof e=="object"&&typeof e.equals=="function")return e.equals(n);if(e!==e)return n!==n;if(typeof e=="number"&&typeof n=="number"){var i;if(e===n){var d;if(e!==0)d=!0;else{var r=1/e;d=r===1/n}i=d}else i=!1;return i}return e===n}function Je(e,n){Error.captureStackTrace!=null?Error.captureStackTrace(e,n):e.stack=new Error().stack}function c(e){return e.prototype}function Xn(e,n,i,d){return Object.defineProperty(e,n,{configurable:!0,get:i,set:d})}function Ge(e){return Object.create(e)}function xI(e,n,i){Error.call(e),lL(e,n,i)}function lL(e,n,i){var d=UI(Object.getPrototypeOf(e));if(!(d&1)){var r;if(n==null){var t;if(n!==null){var s=i==null?null:i.toString();t=s??U}else t=U;r=t}else r=n;e.message=r}d&2||(e.cause=i),e.name=Object.getPrototypeOf(e).constructor.name}function q0(e){var n;return e==null?sL():n=e,n}function sL(){throw J8()}function rn(){throw H8()}function o3(e){throw YI("lateinit property "+e+" has not been initialized")}function F8(e){throw jr(e)}function fL(e,n){for(var i=e.length,d=n.length,r=0,t=n;r<i&&r<d;){var s=r,f=r;r=f+1|0,t[s]=e[f]}return n}function cL(e,n,i){var d=e.slice(0,n);e.$type$!==void 0&&(d.$type$=e.$type$);var r=e.length;if(n>r)for(d.length=n;r<n;){var t=r;r=t+1|0,d[t]=i}return d}function II(){m8=this,this.g5_1=new Ve(0,-2147483648),this.h5_1=new Ve(-1,2147483647),this.i5_1=8,this.j5_1=64}var m8;function pL(){return m8==null&&new II,m8}function Ve(e,n){pL(),b8.call(this),this.d5_1=e,this.e5_1=n}c(Ve).k5=function(e){return L4(this,e)};c(Ve).a5=function(e){return this.k5(e instanceof Ve?e:rn())};c(Ve).l5=function(e){return x4(this,e)};c(Ve).m5=function(e){return vL(this,e)};c(Ve).n5=function(){return this.o5().l5(new Ve(1,0))};c(Ve).o5=function(){return new Ve(~this.d5_1,~this.e5_1)};c(Ve).p5=function(){return this.d5_1};c(Ve).f5=function(){return Qc(this)};c(Ve).valueOf=function(){return this.f5()};c(Ve).equals=function(e){var n;return e instanceof Ve?n=Xr(this,e):n=!1,n};c(Ve).hashCode=function(){return yL(this)};c(Ve).toString=function(){return k8(this,10)};function Mo(){return dn(),EI}var EI;function b4(){return dn(),OI}var OI;function Dx(){return dn(),PI}var PI;function hL(){return dn(),MI}var MI;function Md(){return dn(),_I}var _I;function $x(){return dn(),BI}var BI;function L4(e,n){if(dn(),Xr(e,n))return 0;var i=Cr(e),d=Cr(n);return i&&!d?-1:!i&&d?1:Cr(Yc(e,n))?-1:1}function x4(e,n){dn();var i=e.e5_1>>>16|0,d=e.e5_1&65535,r=e.d5_1>>>16|0,t=e.d5_1&65535,s=n.e5_1>>>16|0,f=n.e5_1&65535,p=n.d5_1>>>16|0,v=n.d5_1&65535,w=0,b=0,g=0,P=0;return P=P+(t+v|0)|0,g=g+(P>>>16|0)|0,P=P&65535,g=g+(r+p|0)|0,b=b+(g>>>16|0)|0,g=g&65535,b=b+(d+f|0)|0,w=w+(b>>>16|0)|0,b=b&65535,w=w+(i+s|0)|0,w=w&65535,new Ve(g<<16|P,w<<16|b)}function Yc(e,n){return dn(),x4(e,n.n5())}function yu(e,n){if(dn(),Al(e))return Mo();if(Al(n))return Mo();if(Xr(e,Md()))return Wx(n)?Md():Mo();if(Xr(n,Md()))return Wx(e)?Md():Mo();if(Cr(e)){var i;return Cr(n)?i=yu(At(e),At(n)):i=At(yu(At(e),n)),i}else if(Cr(n))return At(yu(e,At(n)));if(Gx(e,$x())&&Gx(n,$x()))return jc(Qc(e)*Qc(n));var d=e.e5_1>>>16|0,r=e.e5_1&65535,t=e.d5_1>>>16|0,s=e.d5_1&65535,f=n.e5_1>>>16|0,p=n.e5_1&65535,v=n.d5_1>>>16|0,w=n.d5_1&65535,b=0,g=0,P=0,W=0;return W=W+kn(s,w)|0,P=P+(W>>>16|0)|0,W=W&65535,P=P+kn(t,w)|0,g=g+(P>>>16|0)|0,P=P&65535,P=P+kn(s,v)|0,g=g+(P>>>16|0)|0,P=P&65535,g=g+kn(r,w)|0,b=b+(g>>>16|0)|0,g=g&65535,g=g+kn(t,v)|0,b=b+(g>>>16|0)|0,g=g&65535,g=g+kn(s,p)|0,b=b+(g>>>16|0)|0,g=g&65535,b=b+(((kn(d,w)+kn(r,v)|0)+kn(t,p)|0)+kn(s,f)|0)|0,b=b&65535,new Ve(P<<16|W,b<<16|g)}function vL(e,n){if(dn(),Al(n))throw Z8("division by zero");if(Al(e))return Mo();if(Xr(e,Md())){if(Xr(n,b4())||Xr(n,Dx()))return Md();if(Xr(n,Md()))return b4();var i=kL(e,1),d=mL(i.m5(n),1);if(Xr(d,Mo()))return Cr(n)?b4():Dx();var r=Yc(e,yu(n,d));return x4(d,r.m5(n))}else if(Xr(n,Md()))return Mo();if(Cr(e)){var t;return Cr(n)?t=At(e).m5(At(n)):t=At(At(e).m5(n)),t}else if(Cr(n))return At(e.m5(At(n)));for(var s=Mo(),f=e;wL(f,n);){for(var p=Qc(f)/Qc(n),v=Math.max(1,Math.floor(p)),w=Math.ceil(Math.log(v)/Math.LN2),b=w<=48?1:Math.pow(2,w-48),g=jc(v),P=yu(g,n);Cr(P)||SL(P,f);)v=v-b,g=jc(v),P=yu(g,n);Al(g)&&(g=b4()),s=x4(s,g),f=Yc(f,P)}return s}function mL(e,n){dn();var i=n&63;return i===0?e:i<32?new Ve(e.d5_1<<i,e.e5_1<<i|(e.d5_1>>>(32-i|0)|0)):new Ve(0,e.d5_1<<(i-32|0))}function kL(e,n){dn();var i=n&63;return i===0?e:i<32?new Ve(e.d5_1>>>i|0|e.e5_1<<(32-i|0),e.e5_1>>i):new Ve(e.e5_1>>(i-32|0),e.e5_1>=0?0:-1)}function Qc(e){return dn(),e.e5_1*4294967296+AL(e)}function Xr(e,n){return dn(),e.e5_1===n.e5_1?e.d5_1===n.d5_1:!1}function yL(e){return dn(),e.d5_1^e.e5_1}function k8(e,n){if(dn(),n<2||36<n)throw Z8("radix out of range: "+n);if(Al(e))return"0";if(Cr(e))if(Xr(e,Md())){var i=Xc(n),d=e.m5(i),r=Yc(yu(d,i),e).p5(),t=k8(d,n);return t+r.toString(n)}else return"-"+k8(At(e),n);for(var s=n===2?31:n<=10?9:n<=21?7:n<=35?6:5,f=jc(Math.pow(n,s)),p=e,v="";;){var w=p.m5(f),b=Yc(p,yu(w,f)).p5(),g=b.toString(n);if(p=w,Al(p))return g+v;for(;g.length<s;)g="0"+g;v=g+v}}function Xc(e){return dn(),new Ve(e,e<0?-1:0)}function Cr(e){return dn(),e.e5_1<0}function Al(e){return dn(),e.e5_1===0?e.d5_1===0:!1}function Wx(e){return dn(),(e.d5_1&1)===1}function At(e){return dn(),e.n5()}function Gx(e,n){return dn(),L4(e,n)<0}function jc(e){if(dn(),rB(e))return Mo();if(e<=-9223372036854776e3)return Md();if(e+1>=9223372036854776e3)return hL();if(e<0)return At(jc(-e));var n=4294967296,i=e%n|0,d=e/n|0;return new Ve(i,d)}function SL(e,n){return dn(),L4(e,n)>0}function wL(e,n){return dn(),L4(e,n)>=0}function AL(e){return dn(),e.d5_1>=0?e.d5_1:4294967296+e.d5_1}var zx;function dn(){zx||(zx=!0,EI=Xc(0),OI=Xc(1),PI=Xc(-1),MI=new Ve(-1,2147483647),_I=new Ve(0,-2147483648),BI=Xc(16777216))}function te(e,n,i,d,r){return U8("class",e,n,i,d,r,null)}function U8(e,n,i,d,r,t,s){var f=U;return{kind:e,simpleName:n,associatedObjectKey:d,associatedObjects:r,suspendArity:t,$kClass$:f,defaultConstructor:i,iid:s}}function V(e,n,i,d,r,t,s,f,p){d!=null&&(e.prototype=Object.create(d.prototype),e.prototype.constructor=e);var v=i(n,t,s,f,p??[]);if(e.$metadata$=v,r!=null){var w=v.iid!=null?e:e.prototype;w.$imask$=qB(r)}}function Zo(e,n,i,d,r){return U8("interface",e,n,i,d,r,CL())}function CL(){return Kc===U&&(Kc=0),Kc=Kc+1|0,Kc}var Kc;function di(e,n,i,d,r){return U8("object",e,n,i,d,r,null)}function D0(e){var n=e.length,i=Array(n),d=0,r=n-1|0;if(d<=r)do{var t=d;d=d+1|0;var s=e[t];s!=null&&F0(s)?i[t]=s:i[t]=[].slice.call(s)}while(t!==r);return[].concat.apply([],i)}function LI(e){var n;return e instanceof Ve?n=e.p5():n=gL(e),n}function gL(e){var n;return e>2147483647?n=2147483647:e<-2147483648?n=-2147483648:n=e|0,n}function bL(e){return e<<16>>16}function TL(e){var n=LI(e),i=bL(n);return JB(i)}function RL(e,n){return new Su(e,n)}function NL(e){return FI(e)?!0:f8(e)}function FI(e){return Array.isArray(e)}function On(e,n){return xL(e,n.$metadata$.iid)}function xL(e,n){var i=e.$imask$,d;if(i==null)return!1;d=i;var r=d;return WB(r,n)}function F0(e){var n;return FI(e)?n=!e.$type$:n=!1,n}function IL(e){return typeof e=="string"?!0:On(e,g8)}function UI(e){var n=e.constructor,i=n==null?null:n.$metadata$,d=i==null?null:i.errorInfo;if(d!=null)return d;var r=0;if(Kx(e,"message")&&(r=r|1),Kx(e,"cause")&&(r=r|2),r!==3){var t=EL(e);t!=Error.prototype&&(r=r|UI(t))}return i!=null&&(i.errorInfo=r),r}function Kx(e,n){return e.hasOwnProperty(n)}function EL(e){return Object.getPrototypeOf(e)}var U;function OL(e,n,i,d){i=i===U?0:i,d=d===U?e.length:d,tt.h(i,d,e.length),e.fill(n,i,d)}function l8(e,n,i,d){i=i===U?0:i,d=d===U?e.length:d,tt.h(i,d,e.length),e.fill(n,i,d)}function ZI(e){return new Kn(e)}function PL(e,n){if(!(n>=0)){var i="Invalid new array size: "+n+".";throw jr(nd(i))}return fL(e,new Int32Array(n))}function ML(e,n){if(!(n>=0)){var i="Invalid new array size: "+n+".";throw jr(nd(i))}return cL(e,n,null)}function VI(e){return xI(e),Vo.call(e),e}function JI(){var e=VI(Ge(c(Vo)));return Je(e,JI),e}function HI(e,n){return xI(n,e),Vo.call(n),n}function Z8(e){var n=HI(e,Ge(c(Vo)));return Je(n,Z8),n}function Vo(){Je(this,Vo)}function _L(e){return id(e),$0.call(e),e}function qI(){var e=_L(Ge(c($0)));return Je(e,qI),e}function BL(e,n){return gl(e,n),$0.call(n),n}function jr(e){var n=BL(e,Ge(c($0)));return Je(n,jr),n}function $0(){Je(this,$0)}function LL(e){return id(e),G0.call(e),e}function DI(){var e=LL(Ge(c(G0)));return Je(e,DI),e}function FL(e,n){return gl(e,n),G0.call(n),n}function W0(e){var n=FL(e,Ge(c(G0)));return Je(n,W0),n}function G0(){Je(this,G0)}function UL(e){return id(e),z0.call(e),e}function $I(){var e=UL(Ge(c(z0)));return Je(e,$I),e}function ZL(e,n){return gl(e,n),z0.call(n),n}function a3(e){var n=ZL(e,Ge(c(z0)));return Je(n,a3),n}function z0(){Je(this,z0)}function VL(e){return id(e),F4.call(e),e}function K0(){var e=VL(Ge(c(F4)));return Je(e,K0),e}function F4(){Je(this,F4)}function id(e){return VI(e),qi.call(e),e}function WI(){var e=id(Ge(c(qi)));return Je(e,WI),e}function gl(e,n){return HI(e,n),qi.call(n),n}function GI(e){var n=gl(e,Ge(c(qi)));return Je(n,GI),n}function qi(){Je(this,qi)}function JL(e){return id(e),X0.call(e),e}function Jo(){var e=JL(Ge(c(X0)));return Je(e,Jo),e}function HL(e,n){return gl(e,n),X0.call(n),n}function u3(e){var n=HL(e,Ge(c(X0)));return Je(n,u3),n}function X0(){Je(this,X0)}function qL(e){return id(e),U4.call(e),e}function V8(){var e=qL(Ge(c(U4)));return Je(e,V8),e}function U4(){Je(this,U4)}function DL(e){return id(e),Y0.call(e),e}function zI(){var e=DL(Ge(c(Y0)));return Je(e,zI),e}function $L(e,n){return gl(e,n),Y0.call(n),n}function KI(e){var n=$L(e,Ge(c(Y0)));return Je(n,KI),n}function Y0(){Je(this,Y0)}function WL(e){return id(e),Z4.call(e),e}function J8(){var e=WL(Ge(c(Z4)));return Je(e,J8),e}function Z4(){Je(this,Z4)}function GL(e){return id(e),V4.call(e),e}function H8(){var e=GL(Ge(c(V4)));return Je(e,H8),e}function V4(){Je(this,V4)}function zL(e){return id(e),Q0.call(e),e}function XI(){var e=zL(Ge(c(Q0)));return Je(e,XI),e}function KL(e,n){return gl(e,n),Q0.call(n),n}function YI(e){var n=KL(e,Ge(c(Q0)));return Je(n,YI),n}function Q0(){Je(this,Q0)}function XL(e){return function(n){return n===e?"(this Collection)":d3(n)}}function Fo(){}c(Fo).r=function(e){var n;e:{var i;if(On(this,bi)?i=this.t():i=!1,i){n=!1;break e}for(var d=this.l();d.m();){var r=d.o();if(Ze(r,e)){n=!0;break e}}n=!1}return n};c(Fo).s=function(e){var n;e:{var i;if(On(e,bi)?i=e.t():i=!1,i){n=!0;break e}for(var d=e.l();d.m();){var r=d.o();if(!this.r(r)){n=!1;break e}}n=!0}return n};c(Fo).t=function(){return this.q()===0};c(Fo).toString=function(){return pI(this,", ","[","]",U,U,XL(this))};c(Fo).toArray=function(){return jx(this)};function Au(){this.g_1=2147483639}c(Au).y1=function(e,n){if(e<0||e>=n)throw W0("index: "+e+", size: "+n)};c(Au).z1=function(e,n){if(e<0||e>n)throw W0("index: "+e+", size: "+n)};c(Au).h=function(e,n,i){if(e<0||n>i)throw W0("fromIndex: "+e+", toIndex: "+n+", size: "+i);if(e>n)throw jr("fromIndex: "+e+" > toIndex: "+n)};c(Au).b3=function(e,n){var i=e+(e>>1)|0;return(i-n|0)<0&&(i=n),(i-2147483639|0)>0&&(i=n>2147483639?R8.MAX_VALUE:2147483639),i};c(Au).d1=function(e){for(var n=1,i=e.l();i.m();){var d=i.o(),r=kn(31,n),t=d==null?null:Zn(d);n=r+(t??0)|0}return n};c(Au).c1=function(e,n){if(e.q()!==n.q())return!1;for(var i=n.l(),d=e.l();d.m();){var r=d.o(),t=i.o();if(!Ze(r,t))return!1}return!0};var tt;function Xx(e,n){return n===e?"(this Map)":d3(n)}function QI(e,n){var i;e:{for(var d=e.k1().l();d.m();){var r=d.o();if(Ze(r.l1(),n)){i=r;break e}}i=null}return i}function jI(){}var YL;function QL(e){return function(n){return e.s5(n)}}function br(){this.n1_1=null,this.o1_1=null}c(br).p1=function(e){return QI(this,e)!=null};c(br).q1=function(e){if(!(e!=null&&On(e,Bo)))return!1;var n=e.l1(),i=e.m1(),d=(On(this,Lo)?this:rn()).r1(n);if(!Ze(i,d))return!1;var r;return d==null?r=!(On(this,Lo)?this:rn()).p1(n):r=!1,!r};c(br).equals=function(e){if(e===this)return!0;if(!(e!=null&&On(e,Lo))||this.q()!==e.q())return!1;var n;e:{var i=e.k1(),d;if(On(i,bi)?d=i.t():d=!1,d){n=!0;break e}for(var r=i.l();r.m();){var t=r.o();if(!this.q1(t)){n=!1;break e}}n=!0}return n};c(br).r1=function(e){var n=QI(this,e);return n==null?null:n.m1()};c(br).hashCode=function(){return Zn(this.k1())};c(br).q=function(){return this.k1().q()};c(br).toString=function(){var e=this.k1();return pI(e,", ","{","}",U,U,QL(this))};c(br).s5=function(e){return Xx(this,e.l1())+"="+Xx(this,e.m1())};function J4(){}c(J4).t1=function(e){for(var n=0,i=e.l();i.m();){var d=i.o(),r=n,t=d==null?null:Zn(d);n=r+(t??0)|0}return n};c(J4).s1=function(e,n){return e.q()!==n.q()?!1:e.s(n)};var q8;function jL(e){return gr.call(e),Pn.call(e),e.v5_1=D8().x5_1,e}function l3(){return jL(Ge(c(Pn)))}function s3(e,n){if(n<0)throw a3("Deque is too big.");if(n<=e.v5_1.length)return Ie;if(e.v5_1===D8().x5_1){var i=e,d=T4(n,10);return i.v5_1=J0(Array(d),null),Ie}var r=tt.b3(e.v5_1.length,n);eF(e,r)}function eF(e,n){var i=J0(Array(n),null),d=e.v5_1,r=e.u5_1,t=e.v5_1.length;Ue(d,i,0,r,t);var s=e.v5_1,f=e.v5_1.length-e.u5_1|0,p=e.u5_1;Ue(s,i,f,0,p),e.u5_1=0,e.v5_1=i}function jt(e,n){return n>=e.v5_1.length?n-e.v5_1.length|0:n}function nF(e,n){return n<0?n+e.v5_1.length|0:n}function eE(e,n){return n===fI(e.v5_1)?0:n+1|0}function y8(e,n){return n===0?fI(e.v5_1):n-1|0}function S8(e,n,i){var d=i.l(),r=n,t=e.v5_1.length;if(r<t)e:do{var s=r;if(r=r+1|0,!d.m())break e;e.v5_1[s]=d.o()}while(r<t);var f=0,p=e.u5_1;if(f<p)e:do{var v=f;if(f=f+1|0,!d.m())break e;e.v5_1[v]=d.o()}while(f<p);e.w5_1=e.w5_1+i.q()|0}function nE(){w8=this;var e=this;e.x5_1=[],this.y5_1=10}var w8;function D8(){return w8==null&&new nE,w8}c(Pn).q=function(){return this.w5_1};c(Pn).t=function(){return this.w5_1===0};c(Pn).z5=function(e){s3(this,this.w5_1+1|0),this.u5_1=y8(this,this.u5_1),this.v5_1[this.u5_1]=e,this.w5_1=this.w5_1+1|0};c(Pn).a6=function(e){s3(this,this.w5_1+1|0);var n=this.v5_1,i=this.w5_1;n[jt(this,this.u5_1+i|0)]=e,this.w5_1=this.w5_1+1|0};c(Pn).b6=function(){if(this.t())throw u3("ArrayDeque is empty.");var e=this.u5_1,n=this.v5_1[e],i=n==null||n!=null?n:rn();return this.v5_1[this.u5_1]=null,this.u5_1=eE(this,this.u5_1),this.w5_1=this.w5_1-1|0,i};c(Pn).c6=function(){if(this.t())throw u3("ArrayDeque is empty.");var e=I4(this),n=jt(this,this.u5_1+e|0),i=this.v5_1[n],d=i==null||i!=null?i:rn();return this.v5_1[n]=null,this.w5_1=this.w5_1-1|0,d};c(Pn).i=function(e){return this.a6(e),!0};c(Pn).a1=function(e,n){if(tt.z1(e,this.w5_1),e===this.w5_1)return this.a6(n),Ie;if(e===0)return this.z5(n),Ie;s3(this,this.w5_1+1|0);var i=jt(this,this.u5_1+e|0);if(e<(this.w5_1+1|0)>>1){var d=y8(this,i),r=y8(this,this.u5_1);if(d>=this.u5_1){this.v5_1[r]=this.v5_1[this.u5_1];var t=this.v5_1,s=this.v5_1,f=this.u5_1,p=this.u5_1+1|0,v=d+1|0;Ue(t,s,f,p,v)}else{var w=this.v5_1,b=this.v5_1,g=this.u5_1-1|0,P=this.u5_1,W=this.v5_1.length;Ue(w,b,g,P,W),this.v5_1[this.v5_1.length-1|0]=this.v5_1[0];var he=this.v5_1,Me=this.v5_1,Hn=d+1|0;Ue(he,Me,0,1,Hn)}this.v5_1[d]=n,this.u5_1=r}else{var qn=this.w5_1,Gi=jt(this,this.u5_1+qn|0);if(i<Gi){var bt=this.v5_1,Zd=this.v5_1,ud=i+1|0;Ue(bt,Zd,ud,i,Gi)}else{var ld=this.v5_1,Er=this.v5_1;Ue(ld,Er,1,0,Gi),this.v5_1[0]=this.v5_1[this.v5_1.length-1|0];var Vd=this.v5_1,Jd=this.v5_1,sd=i+1|0,Pu=this.v5_1.length-1|0;Ue(Vd,Jd,sd,i,Pu)}this.v5_1[i]=n}this.w5_1=this.w5_1+1|0};c(Pn).p=function(e){if(e.t())return!1;s3(this,this.w5_1+e.q()|0);var n=this.w5_1,i=jt(this,this.u5_1+n|0);return S8(this,i,e),!0};c(Pn).d6=function(e,n){if(tt.z1(e,this.w5_1),n.t())return!1;if(e===this.w5_1)return this.p(n);s3(this,this.w5_1+n.q()|0);var i=this.w5_1,d=jt(this,this.u5_1+i|0),r=jt(this,this.u5_1+e|0),t=n.q();if(e<(this.w5_1+1|0)>>1){var s=this.u5_1-t|0;if(r>=this.u5_1)if(s>=0){var f=this.v5_1,p=this.v5_1,v=s,w=this.u5_1;Ue(f,p,v,w,r)}else{s=s+this.v5_1.length|0;var b=r-this.u5_1|0,g=this.v5_1.length-s|0;if(g>=b){var P=this.v5_1,W=this.v5_1,he=s,Me=this.u5_1;Ue(P,W,he,Me,r)}else{var Hn=this.v5_1,qn=this.v5_1,Gi=s,bt=this.u5_1,Zd=this.u5_1+g|0;Ue(Hn,qn,Gi,bt,Zd);var ud=this.v5_1,ld=this.v5_1,Er=this.u5_1+g|0;Ue(ud,ld,0,Er,r)}}else{var Vd=this.v5_1,Jd=this.v5_1,sd=s,Pu=this.u5_1,Bl=this.v5_1.length;if(Ue(Vd,Jd,sd,Pu,Bl),t>=r){var Ll=this.v5_1,Fl=this.v5_1,vO=this.v5_1.length-t|0;Ue(Ll,Fl,vO,0,r)}else{var mO=this.v5_1,kO=this.v5_1,yO=this.v5_1.length-t|0;Ue(mO,kO,yO,0,t);var SO=this.v5_1,wO=this.v5_1;Ue(SO,wO,0,t,r)}}this.u5_1=s,S8(this,nF(this,r-t|0),n)}else{var Mu=r+t|0;if(r<d)if((d+t|0)<=this.v5_1.length){var AO=this.v5_1,CO=this.v5_1;Ue(AO,CO,Mu,r,d)}else if(Mu>=this.v5_1.length){var gO=this.v5_1,bO=this.v5_1,TO=Mu-this.v5_1.length|0;Ue(gO,bO,TO,r,d)}else{var Bh=(d+t|0)-this.v5_1.length|0,RO=this.v5_1,NO=this.v5_1,xO=d-Bh|0;Ue(RO,NO,0,xO,d);var IO=this.v5_1,EO=this.v5_1,OO=d-Bh|0;Ue(IO,EO,Mu,r,OO)}else{var PO=this.v5_1,MO=this.v5_1;if(Ue(PO,MO,t,0,d),Mu>=this.v5_1.length){var _O=this.v5_1,BO=this.v5_1,LO=Mu-this.v5_1.length|0,FO=this.v5_1.length;Ue(_O,BO,LO,r,FO)}else{var UO=this.v5_1,ZO=this.v5_1,VO=this.v5_1.length-t|0,JO=this.v5_1.length;Ue(UO,ZO,0,VO,JO);var HO=this.v5_1,qO=this.v5_1,DO=this.v5_1.length-t|0;Ue(HO,qO,Mu,r,DO)}}S8(this,r,n)}return!0};c(Pn).x=function(e){tt.y1(e,this.w5_1);var n=jt(this,this.u5_1+e|0),i=this.v5_1[n];return i==null||i!=null?i:rn()};c(Pn).r=function(e){return this.b1(e)!==-1};c(Pn).b1=function(e){var n=this.w5_1,i=jt(this,this.u5_1+n|0);if(this.u5_1<i){var d=this.u5_1;if(d<i)do{var r=d;if(d=d+1|0,Ze(e,this.v5_1[r]))return r-this.u5_1|0}while(d<i)}else if(this.u5_1>=i){var t=this.u5_1,s=this.v5_1.length;if(t<s)do{var f=t;if(t=t+1|0,Ze(e,this.v5_1[f]))return f-this.u5_1|0}while(t<s);var p=0;if(p<i)do{var v=p;if(p=p+1|0,Ze(e,this.v5_1[v]))return(v+this.v5_1.length|0)-this.u5_1|0}while(p<i)}return-1};c(Pn).j=function(e){var n=this.b1(e);return n===-1?!1:(this.z(n),!0)};c(Pn).z=function(e){if(tt.y1(e,this.w5_1),e===I4(this))return this.c6();if(e===0)return this.b6();var n=jt(this,this.u5_1+e|0),i=this.v5_1[n],d=i==null||i!=null?i:rn();if(e<this.w5_1>>1){if(n>=this.u5_1){var r=this.v5_1,t=this.v5_1,s=this.u5_1+1|0,f=this.u5_1;Ue(r,t,s,f,n)}else{var p=this.v5_1,v=this.v5_1;Ue(p,v,1,0,n),this.v5_1[0]=this.v5_1[this.v5_1.length-1|0];var w=this.v5_1,b=this.v5_1,g=this.u5_1+1|0,P=this.u5_1,W=this.v5_1.length-1|0;Ue(w,b,g,P,W)}this.v5_1[this.u5_1]=null,this.u5_1=eE(this,this.u5_1)}else{var he=I4(this),Me=jt(this,this.u5_1+he|0);if(n<=Me){var Hn=this.v5_1,qn=this.v5_1,Gi=n+1|0,bt=Me+1|0;Ue(Hn,qn,n,Gi,bt)}else{var Zd=this.v5_1,ud=this.v5_1,ld=n+1|0,Er=this.v5_1.length;Ue(Zd,ud,n,ld,Er),this.v5_1[this.v5_1.length-1|0]=this.v5_1[0];var Vd=this.v5_1,Jd=this.v5_1,sd=Me+1|0;Ue(Vd,Jd,0,1,sd)}this.v5_1[Me]=null}return this.w5_1=this.w5_1-1|0,d};c(Pn).e6=function(){var e=this.w5_1,n=jt(this,this.u5_1+e|0);this.u5_1<n?l8(this.v5_1,null,this.u5_1,n):this.t()||(l8(this.v5_1,null,this.u5_1,this.v5_1.length),l8(this.v5_1,null,0,n)),this.u5_1=0,this.w5_1=0};c(Pn).f6=function(e){var n=e.length>=this.w5_1?e:aB(e,this.w5_1),i=F0(n)?n:rn(),d=this.w5_1,r=jt(this,this.u5_1+d|0);if(this.u5_1<r){var t=this.v5_1,s=this.u5_1;Ue(t,i,0,s,r)}else if(!this.t()){var f=this.v5_1,p=this.u5_1,v=this.v5_1.length;Ue(f,i,0,p,v);var w=this.v5_1,b=this.v5_1.length-this.u5_1|0;Ue(w,i,b,0,r)}var g=oB(this.w5_1,i);return F0(g)?g:rn()};c(Pn).a2=function(){var e=this.w5_1,n=J0(Array(e),null);return this.f6(n)};c(Pn).toArray=function(){return this.a2()};function Pn(){D8(),this.u5_1=0,this.w5_1=0}function iF(e){if(e.t())return[];for(var n=e.q(),i=J0(Array(n),null),d=e.l(),r=0;d.m();){var t=r;r=t+1|0,i[t]=d.o()}return i}function Rr(){return tF()}function iE(e){return e.length>0?ZI(e):Rr()}function I4(e){return e.q()-1|0}function td(){A8=this,this.g6_1=new Ve(-1478467534,-1720727600)}c(td).equals=function(e){var n;return e!=null&&On(e,V0)?n=e.t():n=!1,n};c(td).hashCode=function(){return 1};c(td).toString=function(){return"[]"};c(td).q=function(){return 0};c(td).t=function(){return!0};c(td).h6=function(e){return e.t()};c(td).s=function(e){return this.h6(e)};c(td).x=function(e){throw W0("Empty list doesn't contain element at index "+e+".")};c(td).l=function(){return tE};var A8;function tF(){return A8==null&&new td,A8}function H4(){}c(H4).m=function(){return!1};c(H4).o=function(){throw Jo()};var tE;function rF(e){return new Ho(e,!1)}function dF(e){return e.length===0?rt():N8(new Ho(e,!0))}function Ho(e,n){this.i6_1=e,this.j6_1=n}c(Ho).q=function(){return this.i6_1.length};c(Ho).t=function(){return this.i6_1.length===0};c(Ho).k6=function(e){return LB(this.i6_1,e)};c(Ho).l6=function(e){var n;e:{var i;if(On(e,bi)?i=e.t():i=!1,i){n=!0;break e}for(var d=e.l();d.m();){var r=d.o();if(!this.k6(r)){n=!1;break e}}n=!0}return n};c(Ho).s=function(e){return this.l6(e)};c(Ho).l=function(){return GB(this.i6_1)};function oF(){throw KI("Index overflow has happened.")}function $8(e,n){return e.p(ZI(n))}function aF(e,n){if(On(n,bi))return e.p(n);for(var i=!1,d=n.l();d.m();){var r=d.o();e.i(r)&&(i=!0)}return i}function q4(){}c(q4).o=function(){return this.m6()};function uF(e,n,i){var d;if(i>0)d=e>=n?n:n-Yx(n,e,i)|0;else if(i<0)d=e<=n?n:n+Yx(e,n,-i|0)|0;else throw jr("Step is zero.");return d}function Yx(e,n,i){return s8(s8(e,i)-s8(n,i)|0,i)}function s8(e,n){var i=e%n|0;return i>=0?i:i+n|0}function rE(){C8=this,this.n6_1=new Su(1,0)}var C8;function lF(){return C8==null&&new rE,C8}function Su(e,n){lF(),_d.call(this,e,n,1)}c(Su).t=function(){return this.r6_1>this.s6_1};c(Su).equals=function(e){var n;return e instanceof Su?n=this.t()&&e.t()?!0:this.r6_1===e.r6_1?this.s6_1===e.s6_1:!1:n=!1,n};c(Su).hashCode=function(){return this.t()?-1:kn(31,this.r6_1)+this.s6_1|0};c(Su).toString=function(){return""+this.r6_1+".."+this.s6_1};function D4(e,n,i){q4.call(this),this.u6_1=i,this.v6_1=n,this.w6_1=this.u6_1>0?e<=n:e>=n,this.x6_1=this.w6_1?e:this.v6_1}c(D4).m=function(){return this.w6_1};c(D4).m6=function(){var e=this.x6_1;if(e===this.v6_1){if(!this.w6_1)throw Jo();this.w6_1=!1}else this.x6_1=this.x6_1+this.u6_1|0;return e};function W8(){}c(W8).k4=function(e,n,i){return new _d(e,n,i)};var dE;function _d(e,n,i){if(i===0)throw jr("Step must be non-zero.");if(i===R8.MIN_VALUE)throw jr("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");this.r6_1=e,this.s6_1=uF(e,n,i),this.t6_1=i}c(_d).l=function(){return new D4(this.r6_1,this.s6_1,this.t6_1)};c(_d).t=function(){return this.t6_1>0?this.r6_1>this.s6_1:this.r6_1<this.s6_1};c(_d).equals=function(e){var n;return e instanceof _d?n=this.t()&&e.t()?!0:this.r6_1===e.r6_1&&this.s6_1===e.s6_1?this.t6_1===e.t6_1:!1:n=!1,n};c(_d).hashCode=function(){return this.t()?-1:kn(31,kn(31,this.r6_1)+this.s6_1|0)+this.t6_1|0};c(_d).toString=function(){return this.t6_1>0?""+this.r6_1+".."+this.s6_1+" step "+this.t6_1:""+this.r6_1+" downTo "+this.s6_1+" step "+(-this.t6_1|0)};function oE(e,n,i){i!=null?e.j4(i(n)):n==null||IL(n)?e.j4(n):n instanceof kI?e.z3(n.y6_1):e.j4(d3(n))}function sF(e,n,i){if(i=i===U?!1:i,e===n)return!0;if(!i)return!1;var d=Ux(e),r=Ux(n),t;if(d===r)t=!0;else{var s=N4(d).toLowerCase(),f=L0(s,0),p=N4(r).toLowerCase();t=f===L0(p,0)}return t}function aE(e){return ku(e)-1|0}function G8(e,n,i){i=i===U?!1:i;var d;return typeof n=="string"?d=fF(e,n,U,i)>=0:d=uE(e,n,0,ku(e),i)>=0,d}function fF(e,n,i,d){i=i===U?0:i,d=d===U?!1:d;var r,t;return d?t=!0:t=typeof e!="string",t?r=uE(e,n,i,ku(e),d):r=e.indexOf(n,i),r}function uE(e,n,i,d,r,t){t=t===U?!1:t;var s=t?VB(R4(i,aE(e)),T4(d,0)):RL(T4(i,0),R4(d,ku(e))),f;if(typeof e=="string"?f=typeof n=="string":f=!1,f){var p=s.r6_1,v=s.s6_1,w=s.t6_1;if(w>0&&p<=v||w<0&&v<=p)do{var b=p;if(p=p+w|0,_B(n,0,e,b,ku(n),r))return b}while(b!==v)}else{var g=s.r6_1,P=s.s6_1,W=s.t6_1;if(W>0&&g<=P||W<0&&P<=g)do{var he=g;if(g=g+W|0,lE(n,0,e,he,ku(n),r))return he}while(he!==P)}return-1}function lE(e,n,i,d,r,t){if(d<0||n<0||n>(ku(e)-r|0)||d>(ku(i)-r|0))return!1;var s=0;if(s<r)do{var f=s;if(s=s+1|0,!sF(L0(e,n+f|0),L0(i,d+f|0),t))return!1}while(s<r);return!0}function gi(e,n){this.z6_1=e,this.a7_1=n}c(gi).toString=function(){return"("+this.z6_1+", "+this.a7_1+")"};c(gi).b7=function(){return this.z6_1};c(gi).c7=function(){return this.a7_1};c(gi).hashCode=function(){var e=this.z6_1==null?0:Zn(this.z6_1);return e=kn(e,31)+(this.a7_1==null?0:Zn(this.a7_1))|0,e};c(gi).equals=function(e){if(this===e)return!0;if(!(e instanceof gi))return!1;var n=e instanceof gi?e:rn();return!(!Ze(this.z6_1,n.z6_1)||!Ze(this.a7_1,n.a7_1))};function sE(e,n){return new gi(e,n)}c(Ii).o2=tB;Ie=new T8;R8=new U0;n3=new uI;HB=new yI;tt=new Au;YL=new jI;q8=new J4;tE=new H4;dE=new W8;var qo=Math.imul;V(X8,"OneAtATimeAssembler",te);V(Y8,"AllAtOnceAssembler",te);V(Di,"SubscribeCallbackParams",te);V(er,"Mode",te,Ct);V(bl,"Callback",te);V(j8,U,te);V(Ti,"DispatcherImpl",te);V($i,"EmptyOptions",te,U,U,$i);V(Mn,"DispatcherSnapshot",te);V(oi,"EventScope",te,Ct);V(eh,"NoOpUnsubscriber",di);V(j0,"BaseTrace",te);V(v3,"ErrorInfo",te);V(TE,"PerformanceAnalyticsDelegate",Zo);V(c3,"NoOpPerformanceAnalyticsDelegate",te,U,[TE],c3);V(m3,"RuntimeTrace",te,j0);V(bu,"Disabled",di);V(k3,"NiceLogger",te);V(gu,"NoOpLogger",te,U,U,gu);V(nh,"IntervalEventDeduper",te);V(ih,"LocalEventsDeduper",te);V(dt,"TimerDefinition",te);V(Q4,"Span",te);V(th,"Tracer",di);V(j4,"JsDispatcherImpl",te,Ti);V(e6,"JsRequestBuilderAdapter",te);V(p3,"JsonStateOperations",te,U,U,p3);function X8(e,n){this.d7_1=e,this.e7_1=n}c(X8).f7=function(e,n){var i;if(e.t())i=Rr();else{for(var d=this.e7_1.list(),r=e.b6();hE(r);){for(var t=0,s=d.length;t<s;){var f=d[t];if(t=t+1|0,f.id===r.hook)return this.d7_1.h7([""+n+" building batch of ",r]),E4(r)}if(!e.t())r=e.b6();else return Rr()}this.d7_1.h7([""+n+" building batch of ",r]),i=E4(r)}return i};function Y8(e,n){this.i7_1=e,this.j7_1=n}c(Y8).f7=function(e,n){var i;if(e.t())i=Rr();else{for(var d=this.j7_1.list(),r=rt(),t=e.l();t.m();){var s=t.o(),f;if(hE(s)){var p;if(d.length===0)p=!1;else{var v;e:{for(var w=0,b=d.length;w<b;){var g=d[w];if(w=w+1|0,g.id===s.hook){v=g;break e}}v=null}p=v!=null}f=p}else f=!0;f&&r.i(s)}var P=r;e.e6(),this.i7_1.h7([""+n+" building batch of ",P]),i=P}return i};function hE(e){var n=e.hook;return(n==null?null:G8(n,"useInterval"))===!0}function Di(e,n,i){this.request=e,this.response=n,this.mode=i}c(Di).k7=function(){return this.request};c(Di).l7=function(){return this.response};c(Di).m7=function(){return this.mode};c(Di).b7=function(){return this.request};c(Di).c7=function(){return this.response};c(Di).n7=function(){return this.mode};c(Di).o7=function(e,n,i){return new Di(e,n,i)};c(Di).copy=function(e,n,i,d){return e=e===U?this.request:e,n=n===U?this.response:n,i=i===U?this.mode:i,this.o7(e,n,i)};c(Di).toString=function(){return"SubscribeCallbackParams(request="+this.request+", response="+this.response+", mode="+this.mode+")"};c(Di).hashCode=function(){var e=this.request==null?0:Zn(this.request);return e=qo(e,31)+(this.response==null?0:Zn(this.response))|0,e=qo(e,31)+this.mode.hashCode()|0,e};c(Di).equals=function(e){if(this===e)return!0;if(!(e instanceof Di))return!1;var n=e instanceof Di?e:rn();return!(!Ze(this.request,n.request)||!Ze(this.response,n.response)||!this.mode.equals(n.mode))};var vE,mE,kE;function cF(){return[Bd(),f3(),Ld()]}function pF(e){switch(e){case"SYNC":return Bd();case"ASYNC":return f3();case"SPEC":return Ld();default:W4(),F8("No enum constant value.");break}}var fE;function W4(){if(fE)return Ie;fE=!0,vE=new er("SYNC",0),mE=new er("ASYNC",1),kE=new er("SPEC",2)}function er(e,n){Ct.call(this,e,n)}function Bd(){return W4(),vE}function f3(){return W4(),mE}function Ld(){return W4(),kE}function bl(e,n){this.r7_1=e,this.s7_1=n}c(bl).toString=function(){return"Callback(success="+this.r7_1+", failure="+this.s7_1+")"};c(bl).hashCode=function(){var e=Zn(this.r7_1);return e=qo(e,31)+Zn(this.s7_1)|0,e};c(bl).equals=function(e){if(this===e)return!0;if(!(e instanceof bl))return!1;var n=e instanceof bl?e:rn();return!(!Ze(this.r7_1,n.r7_1)||!Ze(this.s7_1,n.s7_1))};function z8(e){var n=e.b8_1;if(n!=null)return n;o3("assembler")}function Tl(e){var n=e.i8_1;if(n!=null)return n;o3("local")}function h3(e){var n=e.j8_1;if(n!=null)return n;o3("remote")}function G4(e){var n=e.k8_1;if(n!=null)return n;o3("timers")}function yE(e){SE(e),e.p8_1=!0,e.y7_1.h7(["recalculateSpeculativeWork"]);var n=e.c8_1.l(),i=0;e:for(;n.m();){var d=i;i=i+1|0;var r=n.o();if(d===0||r.retry===!0||r.async===!0||r.scope.equals(Cu()))continue e;if(e.e8_1.w5_1>10)break e;e.e8_1.i(r)}e.y7_1.h7(["Speculative queue size: "+e.e8_1.w5_1]),z4(e,e.e8_1)}function Q8(e){e.y7_1.h7(["cancelSpeculation"]),e.p8_1=!1,SE(e)}function SE(e){e.e8_1.e6(),e.m8_1=e.v7_1.clone(e.state),e.n8_1=e.n8_1+1|0}function K8(e,n,i){if(n.t())return Ie;var d=hI(n),r=d.scope.equals(Cu())?!0:xF(d.scope)?!Tl(e).isReady():!1;i.equals(Bd())&&(e.f8_1=!0);var t=e.u7_1.q8(i.equals(Ld())?e.m8_1:e.state,n),s=r?h3(e):Tl(e),f=e.z7_1;e.z7_1=f+1|0;var p=f,v=e.n8_1,w=xE.r8("runtime_trace"),b=SF(e,i,r,w,n,p,v,t),g=new bl(b,AF(e,i,r,w,p,n));e.g8_1.i1(p,g),e.y7_1.h7(["Signpost: Handling "+$4(e,i,r)+" request"]),z4(e,t),s.handle(e.w7_1,t,g.r7_1,g.s7_1)}function $4(e,n,i){return(i?"remote":"local")+" "+n+" runtime"}function wE(e,n){e.p8_1=e.o8_1,e.f8_1=!1,e.state=e.v7_1.clone(e.l8_1),e.d8_1.e6(),e.c8_1.e6(),Tl(e).reset(),h3(e).reset(),Q8(e),n&&G4(e).clear()}function Rl(e,n,i){var d;try{d=i()}catch(s){var r;if(s instanceof Vo){var t=s;e.y7_1.s8([t]),e.x7_1.errorHandler(t),r=n}else throw s;d=r}return d}function z4(e,n){e.x7_1.featureFlags.isVerboseLoggingEnabled&&e.y7_1.h7([n])}function hF(e){return function(){return Tl(e).isReady()}}function vF(e){return function(n){var i,d;e:{for(var r=e.c8_1.l();r.m();){var t=r.o();if(t.hook===n){d=t;break e}}d=null}if(d!=null)i=!0;else{var s;e:{for(var f=e.d8_1.l();f.m();){var p=f.o();if(p.hook===n){s=p;break e}}s=null}i=s!=null}return i}}function mF(e,n,i,d){return function(){e.y7_1.h7(["Signpost: Initializing Dispatcher",n,i]),e.i8_1=n,e.j8_1=i,e.k8_1=d;var r=e,t;return e.x7_1.featureFlags.isUsingEverythingAssembler?t=new Y8(e.y7_1,d):t=new X8(e.y7_1,d),r.b8_1=t,e.t8(),Ie}}function j8(e,n){this.u8_1=e,this.v8_1=n}c(j8).unsubscribe=function(){this.u8_1.h8_1.j(this.v8_1)};function kF(e,n){return function(){var i=typeof e=="function"?e:rn();return n.h8_1.i(i),new j8(n,i)}}function yF(e,n,i,d,r,t,s,f,p){return function(){e.y7_1.h7(["Signpost: Response success for "+$4(e,n,i)+" request"]),z4(e,d),r.z8(),IF(e.x7_1.performanceAnalyticsDelegate,r,i,"",t.q()),e.g8_1.j1(s);var v;if(n.equals(Ld())&&e.n8_1!==f)return e.y7_1.h7(["throwing away stale speculative results"]),Ie;e.y7_1.h7(["Responding to "+$4(e,n,i)+" runtime result subscriptions"]);for(var w=e.h8_1.l();w.m();){var b=w.o();b(new Di(p,d,n))}var g;n.equals(Bd())?(e.state=e.v7_1.merge(e.state,d.state),e.f8_1=!1,g=Ie):n.equals(Ld())&&(e.m8_1=e.v7_1.merge(e.m8_1,d.state),g=Ie),e.a9(B8(d.replay),n);var P;return n.equals(Bd())&&e.o8_1&&(yE(e),P=Ie),e.t8(),Ie}}function SF(e,n,i,d,r,t,s,f){return function(p){return Rl(e,Ie,yF(e,n,i,p,d,r,t,s,f)),Ie}}function wF(e,n,i,d,r,t,s){return function(){e.y7_1.h7(["Signpost: Response error for "+$4(e,n,i)+" request",d]),r.z8();var f=e.x7_1.performanceAnalyticsDelegate,p=d.message;EF(f,p??"Request Response Error"+(" with a duration of "+r.b9()+"ms"),i,""),e.g8_1.j1(t);var v;n.equals(Bd())&&(e.f8_1=!1,v=Ie);var w;if(n.equals(Ld()))return Q8(e),e.t8(),Ie;for(var b=s,g=t3(),P=b.l();P.m();){var W=P.o(),he=W.scope.equals(Cu())?!1:W.retry!==!0,Me=g.r1(he),Hn;if(Me==null){var qn=rt();g.i1(he,qn),Hn=qn}else Hn=Me;var Gi=Hn;Gi.i(W)}var bt=g,Zd,ud=bt.r1(!1);if(!(ud==null||ud.t())){var ld=bt.r1(!1),Er=ld??Rr(),Vd=Z0(Er);e.y7_1.h7(D0([["unretryable events",d],Vd])),Zd=e.x7_1.errorHandler(d)}var Jd,sd=bt.r1(!0);if(!(sd==null||sd.t())){var Pu=bt.r1(!0);if(Pu!=null)for(var Bl=Pu.l();Bl.m();){var Ll=Bl.o();Ll.retry=!0,Ll.scope=Cu()}var Fl=bt.r1(!0);e.a9(Fl??Rr(),n),n.equals(Bd())&&e.o8_1&&yE(e),e.t8(),Jd=Ie}return Ie}}function AF(e,n,i,d,r,t){return function(s){return Rl(e,Ie,wF(e,n,i,s,d,r,t)),Ie}}function CF(e,n){return function(){e.y7_1.h7(D0([["Signpost: Submitted events"],n]));for(var i=e.a8_1,d=B8(n),r=i.l();r.m();){var t=r.o(),s=d;d=t.c9(s)}for(var f=d,p=rt(),v=rt(),w=f.l();w.m();){var b=w.o();b.async===!0?p.i(b):v.i(b)}var g=new gi(p,v),P=g.b7(),W=g.c7();e.d8_1.p(P),e.c8_1.p(W);var he;return e.f8_1&&e.p8_1&&(e.e8_1.p(W),he=Ie),e.t8(),Ie}}function gF(e){return function(){return wE(e,!0),Ie}}function bF(e,n){return function(){e.state=e.v7_1.clone(n.state),e.d8_1.e6();var i=n.asyncQueue;$8(e.d8_1,F0(i)?i:rn()),e.c8_1.e6();var d=n.syncQueue;return $8(e.c8_1,F0(d)?d:rn()),Q8(e),Tl(e).resume(n.localSnapshot),h3(e).resume(n.remoteSnapshot),G4(e).resumeAll(n.timerSnapshot),Ie}}function Ti(e,n,i,d,r){d=d===U?"RenderPostContent":d,r=r===U?new $i:r,this.t7_1=e,this.u7_1=n,this.v7_1=i,this.w7_1=d,this.x7_1=r,this.y7_1=new k3(this.x7_1.logger),this.z7_1=0;var t=this,s=new ih(hF(this),this.y7_1);t.a8_1=iE([s,new nh(vF(this))]),this.c8_1=l3(),this.d8_1=l3(),this.e8_1=l3(),this.f8_1=!1;var f=this;f.g8_1=t3();var p=this;p.h8_1=rt(),this.l8_1=this.v7_1.clone(this.state),this.m8_1=this.v7_1.clone(this.l8_1),this.n8_1=0,this.o8_1=this.x7_1.featureFlags.isSpeculativeExecutionEnabled,this.p8_1=this.o8_1,this.y7_1.h7(["Signpost: Constructed KMP Dispatcher"])}c(Ti).d9=function(e){this.t7_1=e};c(Ti).e9=function(){return this.t7_1};c(Ti).f9=function(){return this.c8_1};c(Ti).g9=function(){return this.d8_1};c(Ti).h9=function(){return this.e8_1};c(Ti).init=function(e,n,i){Rl(this,Ie,mF(this,e,n,i))};c(Ti).subscribe=function(e){var n=bE;return Rl(this,n,kF(e,this))};c(Ti).t8=function(){if(this.y7_1.h7(["ticking","syncInFlight "+this.f8_1,"asyncQueue.size "+this.d8_1.w5_1,"syncQueue.size "+this.c8_1.w5_1,"speculativeQueue.size "+this.e8_1.w5_1]),!Tl(this).isReady()&&!h3(this).isReady()&&!(this.c8_1.t()&&this.d8_1.t()))return this.y7_1.i9(["ticking with events and no runtime, deferring..."]),Ie;if(this.f8_1){if(this.p8_1){var n=z8(this).f7(this.e8_1,Ld());K8(this,n,Ld())}}else{var e=z8(this).f7(this.c8_1,Bd());K8(this,e,Bd())}if(!this.d8_1.t()){for(;!this.d8_1.t();){var i=z8(this).f7(this.d8_1,f3());K8(this,i,f3())}this.t8()}};c(Ti).a9=function(e,n){if(e.t()||n.equals(Ld()))return Ie;this.y7_1.h7(["replaying "+e.q()+" events"]),z4(this,e);for(var i=t3(),d=e.l();d.m();){var r=d.o(),t=new gi(r.async===!0,r.retry===!0),s=i.r1(t),f;if(s==null){var p=rt();i.i1(t,p),f=p}else f=s;var v=f;v.i(r)}var w=i,b=w.r1(new gi(!0,!0));this.d8_1.d6(0,b??Rr());var g=w.r1(new gi(!0,!1));this.d8_1.p(g??Rr());var P=w.r1(new gi(!1,!0));this.c8_1.d6(0,P??Rr());var W=w.r1(new gi(!1,!1));this.c8_1.p(W??Rr())};c(Ti).submit=function(e){Rl(this,Ie,CF(this,e))};c(Ti).reset=function(){Rl(this,Ie,gF(this))};c(Ti).snapshot=function(){var e=this.v7_1.clone(this.state),n=this.c8_1,i=Z0(n),d=this.d8_1,r=Z0(d);return new Mn(e,i,r,Tl(this).snapshot(),h3(this).snapshot(),G4(this).list())};c(Ti).pause=function(){var e=this.snapshot();return G4(this).pauseAll(),wE(this,!1),e};c(Ti).resume=function(e){Rl(this,Ie,bF(this,e))};function TF(e){return Ie}function $i(){this.j9_1=new gu;var e=this;e.k9_1=TF,this.l9_1=NE,this.m9_1=new c3}c($i).n9=function(e){this.j9_1=e};c($i).o9=function(){return this.j9_1};c($i).p9=function(e){this.k9_1=e};c($i).q9=function(){return this.k9_1};c($i).r9=function(e){this.l9_1=e};c($i).s9=function(){return this.l9_1};c($i).t9=function(e){this.m9_1=e};c($i).u9=function(){return this.m9_1};function Mn(e,n,i,d,r,t){this.state=e,this.syncQueue=n,this.asyncQueue=i,this.localSnapshot=d,this.remoteSnapshot=r,this.timerSnapshot=t}c(Mn).e9=function(){return this.state};c(Mn).f9=function(){return this.syncQueue};c(Mn).g9=function(){return this.asyncQueue};c(Mn).v9=function(){return this.localSnapshot};c(Mn).w9=function(){return this.remoteSnapshot};c(Mn).x9=function(){return this.timerSnapshot};c(Mn).b7=function(){return this.state};c(Mn).c7=function(){return this.syncQueue};c(Mn).n7=function(){return this.asyncQueue};c(Mn).y9=function(){return this.localSnapshot};c(Mn).z9=function(){return this.remoteSnapshot};c(Mn).aa=function(){return this.timerSnapshot};c(Mn).ba=function(e,n,i,d,r,t){return new Mn(e,n,i,d,r,t)};c(Mn).copy=function(e,n,i,d,r,t,s){return e=e===U?this.state:e,n=n===U?this.syncQueue:n,i=i===U?this.asyncQueue:i,d=d===U?this.localSnapshot:d,r=r===U?this.remoteSnapshot:r,t=t===U?this.timerSnapshot:t,this.ba(e,n,i,d,r,t)};c(Mn).toString=function(){return"DispatcherSnapshot(state="+this.state+", syncQueue="+nd(this.syncQueue)+", asyncQueue="+nd(this.asyncQueue)+", localSnapshot="+this.localSnapshot+", remoteSnapshot="+this.remoteSnapshot+", timerSnapshot="+this.timerSnapshot+")"};c(Mn).hashCode=function(){var e=this.state==null?0:Zn(this.state);return e=qo(e,31)+Zn(this.syncQueue)|0,e=qo(e,31)+Zn(this.asyncQueue)|0,e=qo(e,31)+(this.localSnapshot==null?0:Zn(this.localSnapshot))|0,e=qo(e,31)+(this.remoteSnapshot==null?0:Zn(this.remoteSnapshot))|0,e=qo(e,31)+(this.timerSnapshot==null?0:Zn(this.timerSnapshot))|0,e};c(Mn).equals=function(e){if(this===e)return!0;if(!(e instanceof Mn))return!1;var n=e instanceof Mn?e:rn();return!(!Ze(this.state,n.state)||!Ze(this.syncQueue,n.syncQueue)||!Ze(this.asyncQueue,n.asyncQueue)||!Ze(this.localSnapshot,n.localSnapshot)||!Ze(this.remoteSnapshot,n.remoteSnapshot)||!Ze(this.timerSnapshot,n.timerSnapshot))};var AE,CE,gE;function RF(){return[X4(),Y4(),Cu()]}function NF(e){switch(e){case"ALL":return X4();case"LOCAL":return Y4();case"REMOTE":return Cu();default:K4(),F8("No enum constant value.");break}}var cE;function K4(){if(cE)return Ie;cE=!0,AE=new oi("ALL",0),CE=new oi("LOCAL",1),gE=new oi("REMOTE",2)}function oi(e,n){Ct.call(this,e,n)}function xF(e){return e.equals(Cu())?!0:e.equals(X4())}function X4(){return K4(),AE}function Y4(){return K4(),CE}function Cu(){return K4(),gE}function eh(){}c(eh).unsubscribe=function(){};var bE;function j0(e,n,i){this.spanName=e,this.startTimeMs=n,this.endTimeMs=i}c(j0).ea=function(){return this.spanName};c(j0).fa=function(){return this.startTimeMs};c(j0).ga=function(){return this.endTimeMs};function v3(e,n,i){this.message=e,this.origin=n,this.version=i}c(v3).q5=function(){return this.message};c(v3).ha=function(){return this.origin};c(v3).ia=function(){return this.version};function TE(){}function c3(){}c(c3).logRuntimeTrace=function(e){};c(c3).logRuntimeError=function(e){};function IF(e,n,i,d,r){e.logRuntimeTrace(new m3(n.w8_1,n.x8_1,n.y8_1,d,RE(i),r))}function EF(e,n,i,d){e.logRuntimeError(new v3(n,RE(i),d))}function RE(e){return e?"remote":"local"}function m3(e,n,i,d,r,t){j0.call(this,e,n,i),this.intent=d,this.target=r,this.eventCount=t}c(m3).ja=function(){return this.intent};c(m3).ka=function(){return this.target};c(m3).la=function(){return this.eventCount};function bu(){this.ma_1=!1,this.na_1=!1,this.oa_1=!1}c(bu).pa=function(){return this.ma_1};c(bu).qa=function(){return this.na_1};c(bu).ra=function(){return this.oa_1};var NE;function k3(e){this.g7_1=e}c(k3).s8=function(e){var n=D0([[this.g7_1.tag()],e]);this.g7_1.error(n)};c(k3).i9=function(e){var n=D0([[this.g7_1.tag()],e]);this.g7_1.warn(n)};c(k3).h7=function(e){var n=D0([[this.g7_1.tag()],e]);this.g7_1.debug(n)};function gu(){}c(gu).info=function(e){};c(gu).error=function(e){};c(gu).warn=function(e){};c(gu).debug=function(e){};c(gu).tag=function(){return""};function nh(e){this.sa_1=e}c(nh).c9=function(e){for(var n=rt(),i=rt(),d=e.l();d.m();){var r=d.o(),t=r.hook;(t==null?null:G8(t,"useInterval"))===!0?n.i(r):i.i(r)}for(var s=new gi(n,i),f=s.b7(),p=s.c7(),v=I8(),w=rt(),b=f.l();b.m();){var g=b.o(),P=g.hook;v.i(P)&&w.i(g)}for(var W=w,he=rt(),Me=W.l();Me.m();){var Hn=Me.o(),qn=Hn.hook;this.sa_1(qn??"")||he.i(Hn)}var Gi=he;return vI(Gi,p)};function ih(e,n){this.ta_1=e,this.ua_1=n}c(ih).c9=function(e){var n;if(this.ta_1())n=e;else{for(var i=rt(),d=rt(),r=e.l();r.m();){var t=r.o();t.scope.equals(Y4())?d.i(t):i.i(t)}var s=new gi(i,d);if(!s.a7_1.t()){var f=["Dropping "+s.a7_1.q()+" local events",s.a7_1];this.ua_1.h7([f])}n=s.z6_1}return n};function dt(e,n){this.id=e,this.duration=n}c(dt).va=function(){return this.id};c(dt).wa=function(){return this.duration};c(dt).b7=function(){return this.id};c(dt).c7=function(){return this.duration};c(dt).xa=function(e,n){return new dt(e,n)};c(dt).copy=function(e,n,i){return e=e===U?this.id:e,n=n===U?this.duration:n,this.xa(e,n)};c(dt).toString=function(){return"TimerDefinition(id="+this.id+", duration="+this.duration+")"};c(dt).hashCode=function(){var e=L8(this.id);return e=qo(e,31)+this.duration|0,e};c(dt).equals=function(e){if(this===e)return!0;if(!(e instanceof dt))return!1;var n=e instanceof dt?e:rn();return!(this.id!==n.id||this.duration!==n.duration)};function Q4(e,n){this.w8_1=e,this.x8_1=n,this.y8_1=0}c(Q4).z8=function(){this.y8_1=IE()};c(Q4).b9=function(){return this.y8_1-this.x8_1};function th(){}c(th).r8=function(e){return new Q4(e,IE())};var xE;function j4(e,n,i,d){i=i===U?"RenderPostContent":i,d=d===U?new $i:d,Ti.call(this,e,new e6(n),new p3,i,d),this.vb_1=i,this.wb_1=d}function e6(e){this.xb_1=e}c(e6).yb=function(e,n){var i=Z0(n);return this.xb_1.build(e,i)};c(e6).q8=function(e,n){return this.yb(e!=null&&e!=null?e:rn(),n)};function pE(e){for(var n=Object.entries,i=(n!=null&&typeof n=="function"?n:rn())(e),d=O4(i.length),r=0,t=i.length;r<t;){var s=i[r];r=r+1|0;var f=s[0],p=sE(f!=null&&typeof f=="string"?f:rn(),s[1]);d.i(p)}return d}function p3(){}c(p3).clone=function(e){return JSON.parse(JSON.stringify(e))};c(p3).merge=function(e,n){for(var i={},d=i!=null&&i!=null?i:rn(),r=pE(e).l();r.m();){var t=r.o();d[t.z6_1]=t.a7_1}for(var s=pE(n).l();s.m();){var f=s.o();d[f.z6_1]=f.a7_1}return d};function IE(){return new Date().getTime()}Xn(c(er),"name",c(er).x4);Xn(c(er),"ordinal",c(er).y4);Xn(c(Ti),"state",function(){return this.e9()},function(e){this.d9(e)});Xn(c($i),"logger",function(){return this.o9()},function(e){this.n9(e)});Xn(c($i),"errorHandler",function(){return this.q9()},function(e){this.p9(e)});Xn(c($i),"featureFlags",function(){return this.s9()},function(e){this.r9(e)});Xn(c($i),"performanceAnalyticsDelegate",function(){return this.u9()},function(e){this.t9(e)});Xn(c(oi),"name",c(oi).x4);Xn(c(oi),"ordinal",c(oi).y4);Xn(c(bu),"isSpeculativeExecutionEnabled",function(){return this.pa()});Xn(c(bu),"isVerboseLoggingEnabled",function(){return this.qa()});Xn(c(bu),"isUsingEverythingAssembler",function(){return this.ra()});Xn(c(j4),"state",function(){return this.e9()},function(e){this.d9(e)});bE=new eh;NE=new bu;xE=new th;er.values=cF;er.valueOf=pF;Xn(er,"SYNC",Bd);Xn(er,"ASYNC",f3);Xn(er,"SPEC",Ld);oi.values=RF;oi.valueOf=NF;Xn(oi,"ALL",X4);Xn(oi,"LOCAL",Y4);Xn(oi,"REMOTE",Cu);var ir=B(F(),1);var xl=B(F(),1);var Fd;(function(e){e[e.ENVIRONMENT_UNSPECIFIED=0]="ENVIRONMENT_UNSPECIFIED",e[e.ENVIRONMENT_SANDBOX=1]="ENVIRONMENT_SANDBOX",e[e.ENVIRONMENT_PRODUCTION=2]="ENVIRONMENT_PRODUCTION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Fd||(Fd={}));function n6(e){switch(e){case 0:case"ENVIRONMENT_UNSPECIFIED":return Fd.ENVIRONMENT_UNSPECIFIED;case 1:case"ENVIRONMENT_SANDBOX":return Fd.ENVIRONMENT_SANDBOX;case 2:case"ENVIRONMENT_PRODUCTION":return Fd.ENVIRONMENT_PRODUCTION;case-1:case"UNRECOGNIZED":default:return Fd.UNRECOGNIZED}}function i6(e){switch(e){case Fd.ENVIRONMENT_UNSPECIFIED:return 0;case Fd.ENVIRONMENT_SANDBOX:return 1;case Fd.ENVIRONMENT_PRODUCTION:return 2;case Fd.UNRECOGNIZED:default:return-1}}var nr=B(F(),1);var Ru;(function(e){e[e.CURRENCY_UNSPECIFIED=0]="CURRENCY_UNSPECIFIED",e[e.GOLD=200]="GOLD",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Ru||(Ru={}));function OF(e){switch(e){case 0:case"CURRENCY_UNSPECIFIED":return Ru.CURRENCY_UNSPECIFIED;case 200:case"GOLD":return Ru.GOLD;case-1:case"UNRECOGNIZED":default:return Ru.UNRECOGNIZED}}function PF(e){switch(e){case Ru.CURRENCY_UNSPECIFIED:return 0;case Ru.GOLD:return 200;case Ru.UNRECOGNIZED:default:return-1}}var Yn;(function(e){e[e.ACCOUNTING_TYPE_UNSPECIFIED=0]="ACCOUNTING_TYPE_UNSPECIFIED",e[e.ACCOUNTING_TYPE_INSTANT=1]="ACCOUNTING_TYPE_INSTANT",e[e.ACCOUNTING_TYPE_DURABLE=2]="ACCOUNTING_TYPE_DURABLE",e[e.ACCOUNTING_TYPE_CONSUMABLE=3]="ACCOUNTING_TYPE_CONSUMABLE",e[e.ACCOUNTING_TYPE_VALID_FOR_1D=4]="ACCOUNTING_TYPE_VALID_FOR_1D",e[e.ACCOUNTING_TYPE_VALID_FOR_7D=5]="ACCOUNTING_TYPE_VALID_FOR_7D",e[e.ACCOUNTING_TYPE_VALID_FOR_30D=6]="ACCOUNTING_TYPE_VALID_FOR_30D",e[e.ACCOUNTING_TYPE_VALID_FOR_1Y=7]="ACCOUNTING_TYPE_VALID_FOR_1Y",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Yn||(Yn={}));function MF(e){switch(e){case 0:case"ACCOUNTING_TYPE_UNSPECIFIED":return Yn.ACCOUNTING_TYPE_UNSPECIFIED;case 1:case"ACCOUNTING_TYPE_INSTANT":return Yn.ACCOUNTING_TYPE_INSTANT;case 2:case"ACCOUNTING_TYPE_DURABLE":return Yn.ACCOUNTING_TYPE_DURABLE;case 3:case"ACCOUNTING_TYPE_CONSUMABLE":return Yn.ACCOUNTING_TYPE_CONSUMABLE;case 4:case"ACCOUNTING_TYPE_VALID_FOR_1D":return Yn.ACCOUNTING_TYPE_VALID_FOR_1D;case 5:case"ACCOUNTING_TYPE_VALID_FOR_7D":return Yn.ACCOUNTING_TYPE_VALID_FOR_7D;case 6:case"ACCOUNTING_TYPE_VALID_FOR_30D":return Yn.ACCOUNTING_TYPE_VALID_FOR_30D;case 7:case"ACCOUNTING_TYPE_VALID_FOR_1Y":return Yn.ACCOUNTING_TYPE_VALID_FOR_1Y;case-1:case"UNRECOGNIZED":default:return Yn.UNRECOGNIZED}}function _F(e){switch(e){case Yn.ACCOUNTING_TYPE_UNSPECIFIED:return 0;case Yn.ACCOUNTING_TYPE_INSTANT:return 1;case Yn.ACCOUNTING_TYPE_DURABLE:return 2;case Yn.ACCOUNTING_TYPE_CONSUMABLE:return 3;case Yn.ACCOUNTING_TYPE_VALID_FOR_1D:return 4;case Yn.ACCOUNTING_TYPE_VALID_FOR_7D:return 5;case Yn.ACCOUNTING_TYPE_VALID_FOR_30D:return 6;case Yn.ACCOUNTING_TYPE_VALID_FOR_1Y:return 7;case Yn.UNRECOGNIZED:default:return-1}}function EE(){return{sku:"",name:"",price:void 0,environment:0,description:"",accountingType:0,productMetadata:{},images:{}}}var ot={$type:"devvit.payments.v1alpha.Product",encode(e,n=nr.default.Writer.create()){return e.sku!==""&&n.uint32(8010).string(e.sku),e.name!==""&&n.uint32(26).string(e.name),e.price!==void 0&&Tu.encode(e.price,n.uint32(42).fork()).ldelim(),e.environment!==0&&n.uint32(160).int32(e.environment),e.description!==""&&n.uint32(170).string(e.description),e.accountingType!==0&&n.uint32(184).int32(e.accountingType),Object.entries(e.productMetadata).forEach(([i,d])=>{y3.encode({key:i,value:d},n.uint32(8018).fork()).ldelim()}),Object.entries(e.images).forEach(([i,d])=>{S3.encode({key:i,value:d},n.uint32(8026).fork()).ldelim()}),n},decode(e,n){let i=e instanceof nr.default.Reader?e:nr.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=EE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1001:if(t!==8010)break;r.sku=i.string();continue;case 3:if(t!==26)break;r.name=i.string();continue;case 5:if(t!==42)break;r.price=Tu.decode(i,i.uint32());continue;case 20:if(t!==160)break;r.environment=i.int32();continue;case 21:if(t!==170)break;r.description=i.string();continue;case 23:if(t!==184)break;r.accountingType=i.int32();continue;case 1002:if(t!==8018)break;let s=y3.decode(i,i.uint32());s.value!==void 0&&(r.productMetadata[s.key]=s.value);continue;case 1003:if(t!==8026)break;let f=S3.decode(i,i.uint32());f.value!==void 0&&(r.images[f.key]=f.value);continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{sku:Nr(e.sku)?globalThis.String(e.sku):"",name:Nr(e.name)?globalThis.String(e.name):"",price:Nr(e.price)?Tu.fromJSON(e.price):void 0,environment:Nr(e.environment)?n6(e.environment):0,description:Nr(e.description)?globalThis.String(e.description):"",accountingType:Nr(e.accountingType)?MF(e.accountingType):0,productMetadata:_E(e.productMetadata)?Object.entries(e.productMetadata).reduce((n,[i,d])=>(n[i]=String(d),n),{}):{},images:_E(e.images)?Object.entries(e.images).reduce((n,[i,d])=>(n[i]=String(d),n),{}):{}}},toJSON(e){let n={};if(e.sku!==""&&(n.sku=e.sku),e.name!==""&&(n.name=e.name),e.price!==void 0&&(n.price=Tu.toJSON(e.price)),e.environment!==0&&(n.environment=i6(e.environment)),e.description!==""&&(n.description=e.description),e.accountingType!==0&&(n.accountingType=_F(e.accountingType)),e.productMetadata){let i=Object.entries(e.productMetadata);i.length>0&&(n.productMetadata={},i.forEach(([d,r])=>{n.productMetadata[d]=r}))}if(e.images){let i=Object.entries(e.images);i.length>0&&(n.images={},i.forEach(([d,r])=>{n.images[d]=r}))}return n},create(e){return ot.fromPartial(e??{})},fromPartial(e){let n=EE();return n.sku=e.sku??"",n.name=e.name??"",n.price=e.price!==void 0&&e.price!==null?Tu.fromPartial(e.price):void 0,n.environment=e.environment??0,n.description=e.description??"",n.accountingType=e.accountingType??0,n.productMetadata=Object.entries(e.productMetadata??{}).reduce((i,[d,r])=>(r!==void 0&&(i[d]=globalThis.String(r)),i),{}),n.images=Object.entries(e.images??{}).reduce((i,[d,r])=>(r!==void 0&&(i[d]=globalThis.String(r)),i),{}),n}};l.set(ot.$type,ot);function OE(){return{key:"",value:""}}var y3={$type:"devvit.payments.v1alpha.Product.ProductMetadataEntry",encode(e,n=nr.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==""&&n.uint32(18).string(e.value),n},decode(e,n){let i=e instanceof nr.default.Reader?e:nr.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=OE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.key=i.string();continue;case 2:if(t!==18)break;r.value=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{key:Nr(e.key)?globalThis.String(e.key):"",value:Nr(e.value)?globalThis.String(e.value):""}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==""&&(n.value=e.value),n},create(e){return y3.fromPartial(e??{})},fromPartial(e){let n=OE();return n.key=e.key??"",n.value=e.value??"",n}};l.set(y3.$type,y3);function PE(){return{key:"",value:""}}var S3={$type:"devvit.payments.v1alpha.Product.ImagesEntry",encode(e,n=nr.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==""&&n.uint32(18).string(e.value),n},decode(e,n){let i=e instanceof nr.default.Reader?e:nr.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=PE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.key=i.string();continue;case 2:if(t!==18)break;r.value=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{key:Nr(e.key)?globalThis.String(e.key):"",value:Nr(e.value)?globalThis.String(e.value):""}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==""&&(n.value=e.value),n},create(e){return S3.fromPartial(e??{})},fromPartial(e){let n=PE();return n.key=e.key??"",n.value=e.value??"",n}};l.set(S3.$type,S3);function ME(){return{amount:0,currency:0}}var Tu={$type:"devvit.payments.v1alpha.ProductPrice",encode(e,n=nr.default.Writer.create()){return e.amount!==0&&n.uint32(8).int32(e.amount),e.currency!==0&&n.uint32(16).int32(e.currency),n},decode(e,n){let i=e instanceof nr.default.Reader?e:nr.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=ME();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==8)break;r.amount=i.int32();continue;case 2:if(t!==16)break;r.currency=i.int32();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{amount:Nr(e.amount)?globalThis.Number(e.amount):0,currency:Nr(e.currency)?OF(e.currency):0}},toJSON(e){let n={};return e.amount!==0&&(n.amount=Math.round(e.amount)),e.currency!==0&&(n.currency=PF(e.currency)),n},create(e){return Tu.fromPartial(e??{})},fromPartial(e){let n=ME();return n.amount=e.amount??0,n.currency=e.currency??0,n}};l.set(Tu.$type,Tu);function _E(e){return typeof e=="object"&&e!==null}function Nr(e){return e!=null}var Ri;(function(e){e[e.ORDER_STATUS_UNSPECIFIED=0]="ORDER_STATUS_UNSPECIFIED",e[e.ORDER_STATUS_NEW=1]="ORDER_STATUS_NEW",e[e.ORDER_STATUS_CREATED=2]="ORDER_STATUS_CREATED",e[e.ORDER_STATUS_PAID=3]="ORDER_STATUS_PAID",e[e.ORDER_STATUS_DELIVERED=4]="ORDER_STATUS_DELIVERED",e[e.ORDER_STATUS_CANCELED=5]="ORDER_STATUS_CANCELED",e[e.ORDER_STATUS_REVERTED=6]="ORDER_STATUS_REVERTED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Ri||(Ri={}));function dh(e){switch(e){case 0:case"ORDER_STATUS_UNSPECIFIED":return Ri.ORDER_STATUS_UNSPECIFIED;case 1:case"ORDER_STATUS_NEW":return Ri.ORDER_STATUS_NEW;case 2:case"ORDER_STATUS_CREATED":return Ri.ORDER_STATUS_CREATED;case 3:case"ORDER_STATUS_PAID":return Ri.ORDER_STATUS_PAID;case 4:case"ORDER_STATUS_DELIVERED":return Ri.ORDER_STATUS_DELIVERED;case 5:case"ORDER_STATUS_CANCELED":return Ri.ORDER_STATUS_CANCELED;case 6:case"ORDER_STATUS_REVERTED":return Ri.ORDER_STATUS_REVERTED;case-1:case"UNRECOGNIZED":default:return Ri.UNRECOGNIZED}}function oh(e){switch(e){case Ri.ORDER_STATUS_UNSPECIFIED:return 0;case Ri.ORDER_STATUS_NEW:return 1;case Ri.ORDER_STATUS_CREATED:return 2;case Ri.ORDER_STATUS_PAID:return 3;case Ri.ORDER_STATUS_DELIVERED:return 4;case Ri.ORDER_STATUS_CANCELED:return 5;case Ri.ORDER_STATUS_REVERTED:return 6;case Ri.UNRECOGNIZED:default:return-1}}function BE(){return{id:"",status:0,createdAt:void 0,updatedAt:void 0,products:[],environment:0,metadata:{}}}var Qn={$type:"devvit.payments.v1alpha.Order",encode(e,n=xl.default.Writer.create()){e.id!==""&&n.uint32(10).string(e.id),e.status!==0&&n.uint32(16).int32(e.status),e.createdAt!==void 0&&re.encode(FE(e.createdAt),n.uint32(26).fork()).ldelim(),e.updatedAt!==void 0&&re.encode(FE(e.updatedAt),n.uint32(34).fork()).ldelim();for(let i of e.products)ot.encode(i,n.uint32(42).fork()).ldelim();return e.environment!==0&&n.uint32(64).int32(e.environment),Object.entries(e.metadata).forEach(([i,d])=>{w3.encode({key:i,value:d},n.uint32(8010).fork()).ldelim()}),n},decode(e,n){let i=e instanceof xl.default.Reader?e:xl.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=BE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.id=i.string();continue;case 2:if(t!==16)break;r.status=i.int32();continue;case 3:if(t!==26)break;r.createdAt=rh(re.decode(i,i.uint32()));continue;case 4:if(t!==34)break;r.updatedAt=rh(re.decode(i,i.uint32()));continue;case 5:if(t!==42)break;r.products.push(ot.decode(i,i.uint32()));continue;case 8:if(t!==64)break;r.environment=i.int32();continue;case 1001:if(t!==8010)break;let s=w3.decode(i,i.uint32());s.value!==void 0&&(r.metadata[s.key]=s.value);continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{id:Nl(e.id)?globalThis.String(e.id):"",status:Nl(e.status)?dh(e.status):0,createdAt:Nl(e.createdAt)?UE(e.createdAt):void 0,updatedAt:Nl(e.updatedAt)?UE(e.updatedAt):void 0,products:globalThis.Array.isArray(e?.products)?e.products.map(n=>ot.fromJSON(n)):[],environment:Nl(e.environment)?n6(e.environment):0,metadata:BF(e.metadata)?Object.entries(e.metadata).reduce((n,[i,d])=>(n[i]=String(d),n),{}):{}}},toJSON(e){let n={};if(e.id!==""&&(n.id=e.id),e.status!==0&&(n.status=oh(e.status)),e.createdAt!==void 0&&(n.createdAt=e.createdAt.toISOString()),e.updatedAt!==void 0&&(n.updatedAt=e.updatedAt.toISOString()),e.products?.length&&(n.products=e.products.map(i=>ot.toJSON(i))),e.environment!==0&&(n.environment=i6(e.environment)),e.metadata){let i=Object.entries(e.metadata);i.length>0&&(n.metadata={},i.forEach(([d,r])=>{n.metadata[d]=r}))}return n},create(e){return Qn.fromPartial(e??{})},fromPartial(e){let n=BE();return n.id=e.id??"",n.status=e.status??0,n.createdAt=e.createdAt??void 0,n.updatedAt=e.updatedAt??void 0,n.products=e.products?.map(i=>ot.fromPartial(i))||[],n.environment=e.environment??0,n.metadata=Object.entries(e.metadata??{}).reduce((i,[d,r])=>(r!==void 0&&(i[d]=globalThis.String(r)),i),{}),n}};l.set(Qn.$type,Qn);function LE(){return{key:"",value:""}}var w3={$type:"devvit.payments.v1alpha.Order.MetadataEntry",encode(e,n=xl.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==""&&n.uint32(18).string(e.value),n},decode(e,n){let i=e instanceof xl.default.Reader?e:xl.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=LE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.key=i.string();continue;case 2:if(t!==18)break;r.value=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{key:Nl(e.key)?globalThis.String(e.key):"",value:Nl(e.value)?globalThis.String(e.value):""}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==""&&(n.value=e.value),n},create(e){return w3.fromPartial(e??{})},fromPartial(e){let n=LE();return n.key=e.key??"",n.value=e.value??"",n}};l.set(w3.$type,w3);function FE(e){let n=Math.trunc(e.getTime()/1e3),i=e.getTime()%1e3*1e6;return{seconds:n,nanos:i}}function rh(e){let n=(e.seconds||0)*1e3;return n+=(e.nanos||0)/1e6,new globalThis.Date(n)}function UE(e){return e instanceof globalThis.Date?e:typeof e=="string"?new globalThis.Date(e):rh(re.fromJSON(e))}function BF(e){return typeof e=="object"&&e!==null}function Nl(e){return e!=null}function ZE(){return{order:void 0}}var ah={$type:"devvit.actor.payments.v1alpha.FulfillOrderRequest",encode(e,n=ir.default.Writer.create()){return e.order!==void 0&&Qn.encode(e.order,n.uint32(10).fork()).ldelim(),n},decode(e,n){let i=e instanceof ir.default.Reader?e:ir.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=ZE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.order=Qn.decode(i,i.uint32());continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{order:t6(e.order)?Qn.fromJSON(e.order):void 0}},toJSON(e){let n={};return e.order!==void 0&&(n.order=Qn.toJSON(e.order)),n},create(e){return ah.fromPartial(e??{})},fromPartial(e){let n=ZE();return n.order=e.order!==void 0&&e.order!==null?Qn.fromPartial(e.order):void 0,n}};l.set(ah.$type,ah);function VE(){return{order:void 0}}var uh={$type:"devvit.actor.payments.v1alpha.RefundOrderRequest",encode(e,n=ir.default.Writer.create()){return e.order!==void 0&&Qn.encode(e.order,n.uint32(10).fork()).ldelim(),n},decode(e,n){let i=e instanceof ir.default.Reader?e:ir.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=VE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.order=Qn.decode(i,i.uint32());continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{order:t6(e.order)?Qn.fromJSON(e.order):void 0}},toJSON(e){let n={};return e.order!==void 0&&(n.order=Qn.toJSON(e.order)),n},create(e){return uh.fromPartial(e??{})},fromPartial(e){let n=VE();return n.order=e.order!==void 0&&e.order!==null?Qn.fromPartial(e.order):void 0,n}};l.set(uh.$type,uh);function JE(){return{acknowledged:void 0,rejectionReason:void 0}}var lh={$type:"devvit.actor.payments.v1alpha.FulfillOrderResponse",encode(e,n=ir.default.Writer.create()){return e.acknowledged!==void 0&&n.uint32(8).bool(e.acknowledged),e.rejectionReason!==void 0&&n.uint32(18).string(e.rejectionReason),n},decode(e,n){let i=e instanceof ir.default.Reader?e:ir.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=JE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==8)break;r.acknowledged=i.bool();continue;case 2:if(t!==18)break;r.rejectionReason=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{acknowledged:t6(e.acknowledged)?globalThis.Boolean(e.acknowledged):void 0,rejectionReason:t6(e.rejectionReason)?globalThis.String(e.rejectionReason):void 0}},toJSON(e){let n={};return e.acknowledged!==void 0&&(n.acknowledged=e.acknowledged),e.rejectionReason!==void 0&&(n.rejectionReason=e.rejectionReason),n},create(e){return lh.fromPartial(e??{})},fromPartial(e){let n=JE();return n.acknowledged=e.acknowledged??void 0,n.rejectionReason=e.rejectionReason??void 0,n}};l.set(lh.$type,lh);function HE(){return{}}var sh={$type:"devvit.actor.payments.v1alpha.RefundOrderResponse",encode(e,n=ir.default.Writer.create()){return n},decode(e,n){let i=e instanceof ir.default.Reader?e:ir.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=HE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{}},toJSON(e){return{}},create(e){return sh.fromPartial(e??{})},fromPartial(e){return HE()}};l.set(sh.$type,sh);function t6(e){return e!=null}var en=B(F(),1);function qE(){return{skus:[],metadata:{}}}var fh={$type:"devvit.plugin.payments.v1alpha.GetProductsRequest",encode(e,n=en.default.Writer.create()){for(let i of e.skus)n.uint32(10).string(i);return Object.entries(e.metadata).forEach(([i,d])=>{A3.encode({key:i,value:d},n.uint32(18).fork()).ldelim()}),n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=qE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.skus.push(i.string());continue;case 2:if(t!==18)break;let s=A3.decode(i,i.uint32());s.value!==void 0&&(r.metadata[s.key]=s.value);continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{skus:globalThis.Array.isArray(e?.skus)?e.skus.map(n=>globalThis.String(n)):[],metadata:eO(e.metadata)?Object.entries(e.metadata).reduce((n,[i,d])=>(n[i]=String(d),n),{}):{}}},toJSON(e){let n={};if(e.skus?.length&&(n.skus=e.skus),e.metadata){let i=Object.entries(e.metadata);i.length>0&&(n.metadata={},i.forEach(([d,r])=>{n.metadata[d]=r}))}return n},create(e){return fh.fromPartial(e??{})},fromPartial(e){let n=qE();return n.skus=e.skus?.map(i=>i)||[],n.metadata=Object.entries(e.metadata??{}).reduce((i,[d,r])=>(r!==void 0&&(i[d]=globalThis.String(r)),i),{}),n}};l.set(fh.$type,fh);function DE(){return{key:"",value:""}}var A3={$type:"devvit.plugin.payments.v1alpha.GetProductsRequest.MetadataEntry",encode(e,n=en.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==""&&n.uint32(18).string(e.value),n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=DE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.key=i.string();continue;case 2:if(t!==18)break;r.value=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{key:Ei(e.key)?globalThis.String(e.key):"",value:Ei(e.value)?globalThis.String(e.value):""}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==""&&(n.value=e.value),n},create(e){return A3.fromPartial(e??{})},fromPartial(e){let n=DE();return n.key=e.key??"",n.value=e.value??"",n}};l.set(A3.$type,A3);function $E(){return{products:[]}}var ch={$type:"devvit.plugin.payments.v1alpha.GetProductsResponse",encode(e,n=en.default.Writer.create()){for(let i of e.products)ot.encode(i,n.uint32(10).fork()).ldelim();return n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=$E();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.products.push(ot.decode(i,i.uint32()));continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{products:globalThis.Array.isArray(e?.products)?e.products.map(n=>ot.fromJSON(n)):[]}},toJSON(e){let n={};return e.products?.length&&(n.products=e.products.map(i=>ot.toJSON(i))),n},create(e){return ch.fromPartial(e??{})},fromPartial(e){let n=$E();return n.products=e.products?.map(i=>ot.fromPartial(i))||[],n}};l.set(ch.$type,ch);function WE(){return{start:void 0,end:void 0,limit:0,sku:"",buyer:"",status:0,metadata:{},cursor:""}}var ph={$type:"devvit.plugin.payments.v1alpha.GetOrdersRequest",encode(e,n=en.default.Writer.create()){return e.start!==void 0&&re.encode(QE(e.start),n.uint32(10).fork()).ldelim(),e.end!==void 0&&re.encode(QE(e.end),n.uint32(18).fork()).ldelim(),e.limit!==0&&n.uint32(24).int32(e.limit),e.sku!==""&&n.uint32(34).string(e.sku),e.buyer!==""&&n.uint32(42).string(e.buyer),e.status!==0&&n.uint32(48).int32(e.status),Object.entries(e.metadata).forEach(([i,d])=>{C3.encode({key:i,value:d},n.uint32(58).fork()).ldelim()}),e.cursor!==""&&n.uint32(66).string(e.cursor),n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=WE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.start=kh(re.decode(i,i.uint32()));continue;case 2:if(t!==18)break;r.end=kh(re.decode(i,i.uint32()));continue;case 3:if(t!==24)break;r.limit=i.int32();continue;case 4:if(t!==34)break;r.sku=i.string();continue;case 5:if(t!==42)break;r.buyer=i.string();continue;case 6:if(t!==48)break;r.status=i.int32();continue;case 7:if(t!==58)break;let s=C3.decode(i,i.uint32());s.value!==void 0&&(r.metadata[s.key]=s.value);continue;case 8:if(t!==66)break;r.cursor=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{start:Ei(e.start)?jE(e.start):void 0,end:Ei(e.end)?jE(e.end):void 0,limit:Ei(e.limit)?globalThis.Number(e.limit):0,sku:Ei(e.sku)?globalThis.String(e.sku):"",buyer:Ei(e.buyer)?globalThis.String(e.buyer):"",status:Ei(e.status)?dh(e.status):0,metadata:eO(e.metadata)?Object.entries(e.metadata).reduce((n,[i,d])=>(n[i]=String(d),n),{}):{},cursor:Ei(e.cursor)?globalThis.String(e.cursor):""}},toJSON(e){let n={};if(e.start!==void 0&&(n.start=e.start.toISOString()),e.end!==void 0&&(n.end=e.end.toISOString()),e.limit!==0&&(n.limit=Math.round(e.limit)),e.sku!==""&&(n.sku=e.sku),e.buyer!==""&&(n.buyer=e.buyer),e.status!==0&&(n.status=oh(e.status)),e.metadata){let i=Object.entries(e.metadata);i.length>0&&(n.metadata={},i.forEach(([d,r])=>{n.metadata[d]=r}))}return e.cursor!==""&&(n.cursor=e.cursor),n},create(e){return ph.fromPartial(e??{})},fromPartial(e){let n=WE();return n.start=e.start??void 0,n.end=e.end??void 0,n.limit=e.limit??0,n.sku=e.sku??"",n.buyer=e.buyer??"",n.status=e.status??0,n.metadata=Object.entries(e.metadata??{}).reduce((i,[d,r])=>(r!==void 0&&(i[d]=globalThis.String(r)),i),{}),n.cursor=e.cursor??"",n}};l.set(ph.$type,ph);function GE(){return{key:"",value:""}}var C3={$type:"devvit.plugin.payments.v1alpha.GetOrdersRequest.MetadataEntry",encode(e,n=en.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==""&&n.uint32(18).string(e.value),n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=GE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.key=i.string();continue;case 2:if(t!==18)break;r.value=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{key:Ei(e.key)?globalThis.String(e.key):"",value:Ei(e.value)?globalThis.String(e.value):""}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==""&&(n.value=e.value),n},create(e){return C3.fromPartial(e??{})},fromPartial(e){let n=GE();return n.key=e.key??"",n.value=e.value??"",n}};l.set(C3.$type,C3);function zE(){return{hasNextPage:!1,endCursor:"",hasPreviousPage:!1,startCursor:""}}var Nu={$type:"devvit.plugin.payments.v1alpha.PageInfo",encode(e,n=en.default.Writer.create()){return e.hasNextPage!==!1&&n.uint32(8).bool(e.hasNextPage),e.endCursor!==""&&n.uint32(18).string(e.endCursor),e.hasPreviousPage!==!1&&n.uint32(24).bool(e.hasPreviousPage),e.startCursor!==""&&n.uint32(34).string(e.startCursor),n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=zE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==8)break;r.hasNextPage=i.bool();continue;case 2:if(t!==18)break;r.endCursor=i.string();continue;case 3:if(t!==24)break;r.hasPreviousPage=i.bool();continue;case 4:if(t!==34)break;r.startCursor=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{hasNextPage:Ei(e.hasNextPage)?globalThis.Boolean(e.hasNextPage):!1,endCursor:Ei(e.endCursor)?globalThis.String(e.endCursor):"",hasPreviousPage:Ei(e.hasPreviousPage)?globalThis.Boolean(e.hasPreviousPage):!1,startCursor:Ei(e.startCursor)?globalThis.String(e.startCursor):""}},toJSON(e){let n={};return e.hasNextPage!==!1&&(n.hasNextPage=e.hasNextPage),e.endCursor!==""&&(n.endCursor=e.endCursor),e.hasPreviousPage!==!1&&(n.hasPreviousPage=e.hasPreviousPage),e.startCursor!==""&&(n.startCursor=e.startCursor),n},create(e){return Nu.fromPartial(e??{})},fromPartial(e){let n=zE();return n.hasNextPage=e.hasNextPage??!1,n.endCursor=e.endCursor??"",n.hasPreviousPage=e.hasPreviousPage??!1,n.startCursor=e.startCursor??"",n}};l.set(Nu.$type,Nu);function KE(){return{orders:[],pageInfo:void 0}}var hh={$type:"devvit.plugin.payments.v1alpha.GetOrdersResponse",encode(e,n=en.default.Writer.create()){for(let i of e.orders)Qn.encode(i,n.uint32(10).fork()).ldelim();return e.pageInfo!==void 0&&Nu.encode(e.pageInfo,n.uint32(18).fork()).ldelim(),n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=KE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.orders.push(Qn.decode(i,i.uint32()));continue;case 2:if(t!==18)break;r.pageInfo=Nu.decode(i,i.uint32());continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{orders:globalThis.Array.isArray(e?.orders)?e.orders.map(n=>Qn.fromJSON(n)):[],pageInfo:Ei(e.pageInfo)?Nu.fromJSON(e.pageInfo):void 0}},toJSON(e){let n={};return e.orders?.length&&(n.orders=e.orders.map(i=>Qn.toJSON(i))),e.pageInfo!==void 0&&(n.pageInfo=Nu.toJSON(e.pageInfo)),n},create(e){return hh.fromPartial(e??{})},fromPartial(e){let n=KE();return n.orders=e.orders?.map(i=>Qn.fromPartial(i))||[],n.pageInfo=e.pageInfo!==void 0&&e.pageInfo!==null?Nu.fromPartial(e.pageInfo):void 0,n}};l.set(hh.$type,hh);function XE(){return{orderId:""}}var vh={$type:"devvit.plugin.payments.v1alpha.AcknowledgeOrderDeliveryRequest",encode(e,n=en.default.Writer.create()){return e.orderId!==""&&n.uint32(10).string(e.orderId),n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=XE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.orderId=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{orderId:Ei(e.orderId)?globalThis.String(e.orderId):""}},toJSON(e){let n={};return e.orderId!==""&&(n.orderId=e.orderId),n},create(e){return vh.fromPartial(e??{})},fromPartial(e){let n=XE();return n.orderId=e.orderId??"",n}};l.set(vh.$type,vh);function YE(){return{}}var mh={$type:"devvit.plugin.payments.v1alpha.AcknowledgeOrderDeliveryResponse",encode(e,n=en.default.Writer.create()){return n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=YE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{}},toJSON(e){return{}},create(e){return mh.fromPartial(e??{})},fromPartial(e){return YE()}};l.set(mh.$type,mh);function QE(e){let n=Math.trunc(e.getTime()/1e3),i=e.getTime()%1e3*1e6;return{seconds:n,nanos:i}}function kh(e){let n=(e.seconds||0)*1e3;return n+=(e.nanos||0)/1e6,new globalThis.Date(n)}function jE(e){return e instanceof globalThis.Date?e:typeof e=="string"?new globalThis.Date(e):kh(re.fromJSON(e))}function eO(e){return typeof e=="object"&&e!==null}function Ei(e){return e!=null}var LF=e=>{switch(e){case En.ALL:return oi.ALL;case En.REMOTE:return oi.REMOTE;case En.LOCAL:return oi.LOCAL;case En.UNRECOGNIZED:return oi.ALL;default:throw new Error(`Unknown UIEventScope: ${e}`)}},rd=class{constructor(n){this.scope=n.scope?LF(n.scope):oi.ALL,this.async=n.async,this.hook=n.hook,this.retry=n.retry,this.uiEvent=n}},r6=class{constructor(n){this.uiRequest=n,this.events=n.events.map(i=>new rd(i)),n.state&&(this.state=n.state)}},g3=class{constructor(n){this.uiResponse=n,this.replay=n.events.map(i=>new rd(i)),n.state&&(this.state=n.state)}};function nO(){var r,t;let e=new URL(globalThis.location?location.href:"file://");if(globalThis.devvit??(globalThis.devvit={}),globalThis.devvit.debug)return;(r=globalThis.devvit).debug??(r.debug={});let n={blocks:void 0,emitSnapshots:void 0,emitState:void 0,realtime:void 0,runtime:void 0,surface:void 0,useAsync:void 0,payments:void 0,bootstrap:void 0,webView:void 0},i={};for(let s in n)i[s.toLowerCase()]=s;let d=[...e.searchParams].find(([s])=>s.toLowerCase()==="devvitdebug")?.[1];if(d!=null){d===""&&(d=Object.keys(n).filter(s=>s!=="emitSnapshots"&&s!=="emitState").join());for(let s of d.split(",")??[]){let[f,p]=s.split("=");f&&(f.toLowerCase()in i?f=i[f.toLowerCase()]:console.warn(`[devvit] unknown devvitdebug parameter "${f}"`),(t=globalThis.devvit.debug)[f]??(t[f]=p||"true"),console.info(`[devvit] set devvitdebug ${f}=${globalThis.devvit.debug[f]}`))}}}var dd;(function(e){e.ENABLE_APP_LOGGING="enableAppLogging",e.ENABLE_DEBUG_LOGGING="enableDebugLogging",e.ENABLE_PLUGINS="enablePlugins",e.LOAD_BUNDLE="loadBundle",e.CALL="call",e.PLUGIN_RESPONSE="pluginResponse",e.QUIT="quit"})(dd||(dd={}));var xr;(function(e){e.READY="ready",e.PLUGINS_CONFIGURED="pluginsConfigured",e.BUNDLE_LOADED="bundleLoaded",e.BUNDLE_LOAD_FAILED="bundleLoadFailed",e.RETURN="return",e.ERROR="error",e.CIRCUIT_BREAKER="circuitBreaker",e.PLUGIN_CALL="pluginCall",e.UNHANDLED_REJECTION="unhandledRejection"})(xr||(xr={}));function yh(e){return e.hostname.split(".")[1]??e.hostname}function iO(e){return`${yh(e)}@${e.actor?.version} by ${e.actor?.owner}`}var Wi=B(F(),1);function tO(){return{callState:void 0,connect:void 0}}var Sh={$type:"devvit.cli.PlaytestProviderMessage",encode(e,n=Wi.default.Writer.create()){return e.callState!==void 0&&Iu.encode(e.callState,n.uint32(10).fork()).ldelim(),e.connect!==void 0&&Eu.encode(e.connect,n.uint32(18).fork()).ldelim(),n},decode(e,n){let i=e instanceof Wi.default.Reader?e:Wi.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=tO();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.callState=Iu.decode(i,i.uint32());continue;case 2:if(t!==18)break;r.connect=Eu.decode(i,i.uint32());continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{callState:d6(e.callState)?Iu.fromJSON(e.callState):void 0,connect:d6(e.connect)?Eu.fromJSON(e.connect):void 0}},toJSON(e){let n={};return e.callState!==void 0&&(n.callState=Iu.toJSON(e.callState)),e.connect!==void 0&&(n.connect=Eu.toJSON(e.connect)),n},create(e){return Sh.fromPartial(e??{})},fromPartial(e){let n=tO();return n.callState=e.callState!==void 0&&e.callState!==null?Iu.fromPartial(e.callState):void 0,n.connect=e.connect!==void 0&&e.connect!==null?Eu.fromPartial(e.connect):void 0,n}};l.set(Sh.$type,Sh);function rO(){return{appInstalled:void 0}}var b3={$type:"devvit.cli.PlaytestSubscriberMessage",encode(e,n=Wi.default.Writer.create()){return e.appInstalled!==void 0&&xu.encode(e.appInstalled,n.uint32(10).fork()).ldelim(),n},decode(e,n){let i=e instanceof Wi.default.Reader?e:Wi.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=rO();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.appInstalled=xu.decode(i,i.uint32());continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{appInstalled:d6(e.appInstalled)?xu.fromJSON(e.appInstalled):void 0}},toJSON(e){let n={};return e.appInstalled!==void 0&&(n.appInstalled=xu.toJSON(e.appInstalled)),n},create(e){return b3.fromPartial(e??{})},fromPartial(e){let n=rO();return n.appInstalled=e.appInstalled!==void 0&&e.appInstalled!==null?xu.fromPartial(e.appInstalled):void 0,n}};l.set(b3.$type,b3);function dO(){return{}}var xu={$type:"devvit.cli.PlaytestAppInstalled",encode(e,n=Wi.default.Writer.create()){return n},decode(e,n){let i=e instanceof Wi.default.Reader?e:Wi.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=dO();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{}},toJSON(e){return{}},create(e){return xu.fromPartial(e??{})},fromPartial(e){return dO()}};l.set(xu.$type,xu);function oO(){return{logs:[]}}var Iu={$type:"devvit.cli.PlaytestCallState",encode(e,n=Wi.default.Writer.create()){for(let i of e.logs)mt.encode(i,n.uint32(10).fork()).ldelim();return n},decode(e,n){let i=e instanceof Wi.default.Reader?e:Wi.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=oO();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.logs.push(mt.decode(i,i.uint32()));continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{logs:globalThis.Array.isArray(e?.logs)?e.logs.map(n=>mt.fromJSON(n)):[]}},toJSON(e){let n={};return e.logs?.length&&(n.logs=e.logs.map(i=>mt.toJSON(i))),n},create(e){return Iu.fromPartial(e??{})},fromPartial(e){let n=oO();return n.logs=e.logs?.map(i=>mt.fromPartial(i))||[],n}};l.set(Iu.$type,Iu);function aO(){return{url:""}}var Eu={$type:"devvit.cli.PlaytestConnect",encode(e,n=Wi.default.Writer.create()){return e.url!==""&&n.uint32(10).string(e.url),n},decode(e,n){let i=e instanceof Wi.default.Reader?e:Wi.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=aO();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.url=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{url:d6(e.url)?globalThis.String(e.url):""}},toJSON(e){let n={};return e.url!==""&&(n.url=e.url),n},create(e){return Eu.fromPartial(e??{})},fromPartial(e){let n=aO();return n.url=e.url??"",n}};l.set(Eu.$type,Eu);function d6(e){return e!=null}var wh="playtest",uO="ws://localhost:5678";function lO(e){let n=Ah();return n===""||n===e}function Ah(){return globalThis.location?new URL(location.href).searchParams.get(wh)??void 0:void 0}var Jn=function(e,n,i,d){if(i==="a"&&!d)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?e!==n||!d:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?d:i==="a"?d.call(e):d?d.value:n.get(e)},T3=function(e,n,i,d,r){if(d==="m")throw new TypeError("Private method is not writable");if(d==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?e!==n||!r:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return d==="a"?r.call(e,i):r?r.value=i:n.set(e,i),i},R3,Vn,Ch,sO,gh,bh,Th,Rh,FF=15e3,o6=class{constructor(){R3.add(this),Vn.set(this,{type:"Init"}),gh.set(this,()=>{Jn(this,Vn,"f").type==="Opened"&&this.onState?.("Closed"),T3(this,Vn,Jn(this,R3,"m",sO).call(this),"f")}),bh.set(this,n=>{let i=b3.fromJSON(JSON.parse(n.data));switch(!0){case i.appInstalled!=null:this.onState?.("Reloading");break}}),Th.set(this,()=>{if(Jn(this,Vn,"f").type!=="Opening")throw Error(`invalid transition from ${Jn(this,Vn,"f").type}`);this.onState?.("Opened"),T3(this,Vn,{sock:Jn(this,Vn,"f").sock,type:"Opened"},"f"),this.send({connect:{url:location.href}})}),Rh.set(this,()=>{T3(this,Vn,Jn(this,R3,"m",Ch).call(this),"f")})}close(){"timer"in Jn(this,Vn,"f")&&clearTimeout(Jn(this,Vn,"f").timer),"sock"in Jn(this,Vn,"f")&&(Jn(this,Vn,"f").sock.onopen=null,Jn(this,Vn,"f").sock.onmessage=null,Jn(this,Vn,"f").sock.onclose=null,Jn(this,Vn,"f").sock.close()),T3(this,Vn,{type:"Init"},"f")}open(){Jn(this,Vn,"f").type==="Init"&&T3(this,Vn,Jn(this,R3,"m",Ch).call(this),"f")}send(n){"sock"in Jn(this,Vn,"f")?Jn(this,Vn,"f").sock.send(JSON.stringify(n)):console.warn("devvit playtest message dropped",n)}};Vn=new WeakMap,gh=new WeakMap,bh=new WeakMap,Th=new WeakMap,Rh=new WeakMap,R3=new WeakSet,Ch=function(){let n=new WebSocket(uO);return n.onclose=Jn(this,gh,"f"),n.onmessage=Jn(this,bh,"f"),n.onopen=Jn(this,Th,"f"),{sock:n,type:"Opening"}},sO=function(){return{timer:setTimeout(Jn(this,Rh,"f"),FF),type:"Retrying"}};var ai=function(e,n,i,d,r){if(d==="m")throw new TypeError("Private method is not writable");if(d==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?e!==n||!r:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return d==="a"?r.call(e,i):r?r.value=i:n.set(e,i),i},pe=function(e,n,i,d){if(i==="a"&&!d)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?e!==n||!d:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?d:i==="a"?d.call(e):d?d.value:n.get(e)},Ud,a6,ui,es,u6,x3,od,Do,ns,ts,$o,Nh,N3,l6,xh,fO,is,Ih,Eh,UF={debug:Nn.DEBUG,error:Nn.ERROR,info:Nn.INFO,log:Nn.DEBUG,trace:Nn.DEBUG,warn:Nn.WARN},s6=class{constructor(n,i,d){Ud.add(this),a6.set(this,void 0),ui.set(this,void 0),es.set(this,!1),u6.set(this,0),x3.set(this,void 0),od.set(this,{}),Do.set(this,void 0),ns.set(this,()=>{}),ts.set(this,void 0),$o.set(this,void 0),Nh.set(this,Ah()),N3.set(this,!1),l6.set(this,void 0),xh.set(this,r=>{let t=r.data,[s]=t;switch(s){case xr.READY:{let[,f]=t;ai(this,l6,f,"f"),pe(this,ts,"f")?.plugins?pe(this,Ud,"m",fO).call(this):pe(this,Ud,"m",Ih).call(this);break}case xr.PLUGINS_CONFIGURED:pe(this,Ud,"m",Ih).call(this);break;case xr.BUNDLE_LOADED:{let[,f,p]=t;pe(this,Ud,"m",is).call(this,f),ai(this,es,!0,"f"),pe(this,Do,"f")?.resolve({metrics:{init:pe(this,l6,"f"),loadBundle:p}}),ai(this,Do,void 0,"f");break}case xr.BUNDLE_LOAD_FAILED:{let[,,f,p]=t;pe(this,Ud,"m",is).call(this,p),pe(this,Do,"f")?.reject(f),ai(this,Do,void 0,"f");break}case xr.RETURN:{let[,f,p,v]=t;pe(this,Ud,"m",is).call(this,v),pe(this,od,"f")[f]?.resolve(p),delete pe(this,od,"f")[f];break}case xr.ERROR:{let[,f,p,v]=t;pe(this,Ud,"m",is).call(this,v),pe(this,od,"f")[f]?.reject(p),delete pe(this,od,"f")[f];break}case xr.CIRCUIT_BREAKER:{let[,f,p,v]=t;pe(this,od,"f")[f]?.reject(new C4(p,v)),delete pe(this,od,"f")[f];break}case xr.PLUGIN_CALL:{let[,f,p,v,w,b]=t;pe(this,ts,"f")?.callback(f,p,v,w,b);break}case xr.UNHANDLED_REJECTION:{let[,,f,p]=t;pe(this,Ud,"m",is).call(this,p),pe(this,ns,"f").call(this,"UnhandledRejection",f);break}}}),Eh.set(this,r=>{switch(r){case"Opened":console.info("devvit playtest connected");break;case"Closed":console.info("devvit playtest disconnected");break;case"Reloading":{console.info("devvit playtest reloading"),pe(this,$o,"f")?.close();let t=new URL(location.href);t.searchParams.set(wh,pe(this,Nh,"f")??""),location.assign(t),location.reload();break}}}),ai(this,a6,n,"f"),i&&ai(this,ns,i,"f"),d&&ai(this,ts,d,"f")}get ready(){return pe(this,es,"f")}get runtimeDebugLogging(){return pe(this,N3,"f")}set runtimeDebugLogging(n){n!==pe(this,N3,"f")&&(ai(this,N3,n,"f"),this.runtimeDebugLogging&&pe(this,ui,"f")?.postMessage([dd.ENABLE_DEBUG_LOGGING]))}async loadBundle(n){if(pe(this,ui,"f"))throw new Error("Bundle already loaded");let i=lO(yh(n));i&&(ai(this,$o,new o6,"f"),pe(this,$o,"f").onState=pe(this,Eh,"f")),pe(this,$o,"f")?.open();let d=new Worker(URL.createObjectURL(pe(this,a6,"f")),{name:`App: ${iO(n)}`,type:"module"});return d.onerror=r=>pe(this,ns,"f").call(this,"Error",r.error),d.onmessageerror=r=>pe(this,ns,"f").call(this,"MessageError",r.data),d.onmessage=pe(this,xh,"f"),ai(this,ui,d,"f"),ai(this,x3,n,"f"),this.runtimeDebugLogging&&pe(this,ui,"f").postMessage([dd.ENABLE_DEBUG_LOGGING]),i&&pe(this,ui,"f").postMessage([dd.ENABLE_APP_LOGGING]),new Promise((r,t)=>{ai(this,Do,{resolve:r,reject:t},"f")})}async call(n,i,d){var r;if(!pe(this,es,"f")||!pe(this,ui,"f"))throw new Error("No bundle loaded");let t=ai(this,u6,(r=pe(this,u6,"f"),++r),"f"),s=new Promise((f,p)=>{pe(this,od,"f")[t]={resolve:f,reject:p}});return pe(this,ui,"f").postMessage([dd.CALL,t,n,i,d,!1]),s}onPluginResponse(n,i){pe(this,ui,"f")?.postMessage([dd.PLUGIN_RESPONSE,n,i])}quit(){pe(this,$o,"f")?.close(),ai(this,$o,void 0,"f"),ai(this,es,!1,"f"),pe(this,ui,"f")&&(pe(this,ui,"f").postMessage([dd.QUIT]),pe(this,ui,"f").onerror=null,pe(this,ui,"f").onmessageerror=null,pe(this,ui,"f").onmessage=null,pe(this,ui,"f").terminate()),ai(this,ui,void 0,"f");for(let{reject:n}of Object.values(pe(this,od,"f")))n(Error("worker terminated"));ai(this,od,{},"f"),pe(this,Do,"f")?.reject(Error("worker terminated")),ai(this,Do,void 0,"f")}};a6=new WeakMap,ui=new WeakMap,es=new WeakMap,u6=new WeakMap,x3=new WeakMap,od=new WeakMap,Do=new WeakMap,ns=new WeakMap,ts=new WeakMap,$o=new WeakMap,Nh=new WeakMap,N3=new WeakMap,l6=new WeakMap,xh=new WeakMap,Eh=new WeakMap,Ud=new WeakSet,fO=function(){pe(this,ui,"f")?.postMessage([dd.ENABLE_PLUGINS,pe(this,ts,"f")?.plugins??[]])},is=function(n){if(!n.length)return;let i=new Date,d={logs:n.map(r=>({severity:UF[r.method],message:r.args.join(" "),tags:[],timestamp:i}))};pe(this,$o,"f")?.send({callState:d})},Ih=function(){pe(this,ui,"f")?.postMessage([dd.LOAD_BUNDLE,pe(this,x3,"f")]),ai(this,x3,void 0,"f")};var Oh="RenderPostContent",ZF=new Set([Oh]);function cO(e){if(ZF.has(e.split("/").at(-1)))return e;throw Error(`Unsupported RPC ${e}`)}var rs,I3,f6=class{constructor(n){Se(this,rs);Se(this,I3);Oe(this,rs,n)}set env(n){Oe(this,rs,n)}set props(n){Oe(this,I3,n)}build(n,i){return new r6({state:n,events:i.map(d=>d.uiEvent),env:I(this,rs),props:I(this,I3)})}};rs=new WeakMap,I3=new WeakMap;var gt,E3,h6,c6=class{constructor(){Se(this,gt);Se(this,E3,!1);Se(this,h6,(n,i,d,r,t)=>{this.onPluginCall?.(n,i,d,r,t),i===ju.fullName&&d===ju.methods.send.name&&I(this,gt)?.onPluginResponse(n,{error:void 0,success:!0,value:{}})})}isReady(){return!!I(this,gt)?.ready}set runtimeDebugLogging(n){Oe(this,E3,n),I(this,gt)&&(I(this,gt).runtimeDebugLogging=n)}setLocalSrc(n){this.unload(),Oe(this,gt,n?new s6(n,(i,d)=>console.error(i,d),{callback:I(this,h6),plugins:[]}):void 0),I(this,gt)&&(I(this,gt).runtimeDebugLogging=I(this,E3))}unload(){I(this,gt)?.quit()}async load(n){this.unload();try{return await I(this,gt)?.loadBundle(n)}catch(i){console.error(i)}}handle(n,i,d,r){if(!this.isReady()||!I(this,gt))throw new Error("local runtime handle called before isReady");devvit?.debug.runtime&&console.debug("[runtime] Local request",i,this.metadata),I(this,gt)?.call(cO(n),i.uiRequest,this.metadata).then(t=>d(new g3(t))).catch(t=>r(t))}pause(){}reset(){}resume(){}snapshot(){return{}}};gt=new WeakMap,E3=new WeakMap,h6=new WeakMap;var p6=class{isReady(){return!!this.remote}load(n){this.remote=n}handle(n,i,d,r){if(!this.isReady()||!this.remote)throw new Error("remote runtime called remote before isReady()");this.remote[cO(n)](i.uiRequest,this.metadata).then(t=>d(new g3(t))).catch(r)}pause(){}reset(){}resume(){}snapshot(){return{}}};var Wo,Go,O3,v6=class{constructor(n){Se(this,Wo,new Map);Se(this,Go,new Map);Se(this,O3);devvit?.debug.runtime&&console.debug("[runtime] timers: constructor"),Oe(this,O3,n)}add(n){devvit?.debug.runtime&&console.debug("[runtime] timers: add",n),I(this,Go).set(n.id,n),I(this,Wo).set(n.id,window.setInterval(()=>{I(this,O3).submit([new rd({scope:En.ALL,timer:{},hook:n.id})])},n.duration))}apply(n){devvit?.debug.runtime&&console.debug("[runtime] timers: apply",n);let i=new Map(I(this,Go));n.forEach(d=>{i.delete(d.id),I(this,Go).has(d.id)||(devvit?.debug.runtime&&console.debug("[runtime] timers: apply - adding definition",d),this.add(d))}),devvit?.debug.runtime&&console.debug("[runtime] timers: apply - removing the following definitions",i);for(let[d]of i)this.remove(d)}clear(){devvit?.debug.runtime&&console.debug("[runtime] timers: clear");for(let n of I(this,Wo).values())clearInterval(n);I(this,Wo).clear(),I(this,Go).clear()}list(){return devvit?.debug.runtime&&console.debug("[runtime] timers: list"),[...I(this,Go).values()]}pauseAll(){devvit?.debug.runtime&&console.debug("[runtime] timers: pauseAll");for(let n of I(this,Wo).values())clearInterval(n);return this.list()}remove(n){devvit?.debug.runtime&&console.debug("[runtime] timers: remove"),I(this,Go).delete(n),clearInterval(I(this,Wo).get(n)),I(this,Wo).delete(n)}resumeAll(n){devvit?.debug.runtime&&console.debug("[runtime] timers: resumeAll"),this.apply(n)}};Wo=new WeakMap,Go=new WeakMap,O3=new WeakMap;var pO=e=>e.message==="ServerCallRequired",Ph=class{debug(n){devvit?.debug.runtime&&console.debug(this.tag(),...n)}error(n){pO(n[0])||console.error(this.tag(),...n)}info(n){console.info(this.tag(),...n)}warn(n){console.warn(this.tag(),...n)}tag(){return"[kmp-dispatcher]"}},P3,M3,Mh=class{constructor(n,i){Se(this,P3);Se(this,M3);this.__doNotUseOrImplementIt={"net.devvit.analytics.PerformanceAnalyticsDelegate":Symbol("net.devvit.analytics.PerformanceAnalyticsDelegate")};Oe(this,P3,n),Oe(this,M3,i)}logRuntimeError(n){var i;pO(n)||(console.error("[kmp-dispatcher-perf-analytics] error",n),(i=I(this,M3))==null||i.call(this,n))}logRuntimeTrace(n){var i;devvit?.debug.runtime&&console.debug("[kmp-dispatcher-perf-analytics]",n),(i=I(this,P3))==null||i.call(this,n)}};P3=new WeakMap,M3=new WeakMap;nO();var VF=({nanos:e,seconds:n})=>{let i=n*1e3,d=e/1e6;return Math.floor(i+d)},JF=["showToast","showForm","navigateToUrl","createOrder"],Il,El,Ir,_3,Ol,ad,ds,m6=class{constructor(n,i,d){Se(this,Il);Se(this,El);Se(this,Ir);Se(this,_3);this.hasRendered=!1;Se(this,Ol);Se(this,ad);Se(this,ds);Oe(this,Il,new f6(i)),d.useSpeculativeExecution&&devvit?.debug.runtime&&console.debug("[webDispatcher] Using speculative execution mode!"),Oe(this,Ir,new j4(n??{},I(this,Il),Oh,{logger:new Ph,featureFlags:{isSpeculativeExecutionEnabled:d.useSpeculativeExecution,isUsingEverythingAssembler:!1,isVerboseLoggingEnabled:!!devvit?.debug.runtime},performanceAnalyticsDelegate:new Mh(d.performanceTracker,d.errorTracker),errorHandler:r=>this.onError?.(r)})),Oe(this,El,new v6(I(this,Ir))),Oe(this,Ol,new p6),Oe(this,ad,new c6),this.init()}get state(){return I(this,Ir).state}set metadata(n){let i={...n},d=[];for(let[r,t]of Object.entries(devvit?.debug??{}))d.push(`${r}=${t}`);d.length&&(i[mu.Debug]={values:d}),I(this,ad).metadata=i,I(this,Ol).metadata=i}set onPluginCall(n){I(this,ad).onPluginCall=n}set runtimeDebugLogging(n){I(this,ad).runtimeDebugLogging=n}subscribe(n){Oe(this,_3,I(this,Ir).subscribe((...i)=>{devvit?.debug.runtime&&console.debug("[runtime] dispatcher got a new event from subscribe",i[0]);let[{response:d}]=i;d.uiResponse.effects.forEach(r=>{if(JF.some(t=>r[t])||r.realtimeSubscriptions){this.onUserAction?.(r);return}if(r.interval){let t=Object.entries(r.interval.intervals);t.length===0&&I(this,El).clear(),I(this,El).apply(t.map(([s,f])=>new dt(s,VF(f.duration))));return}if(r.webView){this.onWebViewMessage?.(r);return}console.warn(`Received an effect that is not implemented! Please add an effect handler to the web dispatcher. Effect: ${JSON.stringify(r,null,2)}`)}),n(...i)}))}submit(...n){I(this,Ir).submit(...n)}unsubscribe(){I(this,_3)?.unsubscribe()}init(){I(this,Ir).init(I(this,ad),I(this,Ol),I(this,El))}togglePause(n){n?Oe(this,ds,I(this,Ir).pause()):I(this,ds)&&I(this,Ir).resume(I(this,ds))}resetAppState(){this.hasRendered=!1,I(this,Ir).reset()}setEnv(n){I(this,Il).env=n}setProps(n){I(this,Il).props=n}remoteLoad(...n){I(this,Ol).load(...n)}async localLoad(...n){return I(this,ad).reset(),await I(this,ad).load(...n)}localLoadWorker(...n){I(this,ad).setLocalSrc(...n)}};Il=new WeakMap,El=new WeakMap,Ir=new WeakMap,_3=new WeakMap,Ol=new WeakMap,ad=new WeakMap,ds=new WeakMap;function hO(e,n,i,d){let r=d.match(/([a-zA-Z0-9-]+)\/(.*)/)??[];if(r.length<3)return"";let[t,s,f]=r;if(!n||!s||!f)return"";let p=n.replace(/^t[0-9]_/,""),v=e.replace("{{location}}",p).replace("{{app}}",s).replace("{{path}}",f);return new URL(v).toString()}var Pl,Ml,_l,os,as,fn,k6,y6,tr,_h,S6,w6,Ou,A6,C6,li=class extends rr{constructor(){super();Se(this,tr);this.runtimeDebugLogging=!1;this.useExperimentalBlocks=!1;this.useSpeculativeExecution=!1;this.webViewUrlTemplate="";this.appPublicApiVersion="";this.disableAssetSandbox=!1;Se(this,Pl);Se(this,Ml);Se(this,_l);Se(this,os,!1);Se(this,as,"");Se(this,fn);Se(this,k6,()=>({experimental:this.useExperimentalBlocks,resolveWebViewUrl:i=>this.disableAssetSandbox?i:hO(this.webViewUrlTemplate,this.metadata?.[mu.Subreddit]?.values?.[0],this.bundle?.actor?.version??"",i),onAction:i=>{let d={};i.type===Bi.ACTION_CLICK||I(this,os)?d.userAction={actionId:i.id,data:i.data??{}}:i.type===Bi.ACTION_WEBVIEW&&(d.webView={postMessage:{message:i.data}}),I(this,fn)?.submit([new rd({scope:En.ALL,hook:i.id,...d})])},stackDirection:Ce.UNRECOGNIZED,disableAssetSandbox:this.disableAssetSandbox}));Se(this,y6,i=>{Tx(i)||console.error(i),nn(this,tr,Ou).call(this,"devvit-ui-error",{err:i,type:"Error"})});Se(this,S6,(i,d,r,t,s)=>{d===ju.fullName&&r===ju.methods.send.name&&nn(this,tr,Ou).call(this,"devvit-realtime-send",{event:t})});Se(this,w6,({response:i})=>{var d,r;this.renderResponse=i,i?.blocks&&(this._rootBlock=i.blocks,I(this,Pl)?((d=this._rootBlock).config??(d.config={}),(r=this._rootBlock.config).rootConfig??(r.rootConfig={children:[],height:0}),this._rootBlock.config.rootConfig.height=I(this,Pl)):Oe(this,Pl,this._rootBlock.config?.rootConfig?.height||i8))});Se(this,A6,i=>{nn(this,tr,Ou).call(this,"devvit-ui-effect",{effect:i,onEvent:d=>I(this,fn)?.submit([new rd(d)]),metadata:this.metadata})});Se(this,C6,async i=>{if(await this.updateComplete,i.webView?.postMessage?.app){let d=[];if(i.webView.postMessage.webViewId){let r=this._blocksRenderer?.findBlockById(i.webView.postMessage.webViewId);r?.blockType!=="web-view"||!r?.element?console.error("Invalid postMessage request: could not find block with ID",i.webView.postMessage.webViewId):d.push(r)}else{let r=this._blocksRenderer?.findBlocksByType("web-view")??[];r.length===0?console.error("Invalid postMessage request: could not find a WebView"):d.push(...r)}for(let r of d)r?.element?.postMessage(i.webView.postMessage.app)}});devvit?.debug.surface&&console.debug("[surface] Using devvit-surface and KMP!")}static get styles(){return[p4]}async connectedCallback(){super.connectedCallback(),Oe(this,fn,new m6({},{colorScheme:this.scheme,dimensions:this.dimensions,locale:this.metadata?.[mu.Language]?.values?.[0],timezone:this.metadata?.[mu.Timezone]?.values?.[0]},{useSpeculativeExecution:this.useSpeculativeExecution,performanceTracker:i=>{nn(this,tr,Ou).call(this,gN,{name:i.spanName,timeStart:i.startTimeMs,timeEnd:i.endTimeMs,target:i.target,intent:i.intent,eventCount:i.eventCount})},errorTracker:i=>{nn(this,tr,Ou).call(this,bN,{message:i.message,origin:i.origin,version:i.version})}})),I(this,fn).onPluginCall=I(this,S6),I(this,fn).onError=I(this,y6),I(this,fn).onUserAction=I(this,A6),I(this,fn).onWebViewMessage=I(this,C6),I(this,fn).subscribe(i=>{I(this,w6).call(this,{request:i.request.uiRequest,response:i.response.uiResponse})}),Oe(this,Ml,new ResizeObserver(Nx(i=>{i.length!==0&&(this.dimensions=Bx(i[0],window,document.body))},600))),I(this,Ml).observe(this,{box:"content-box"}),Oe(this,_l,new IntersectionObserver(i=>{i.forEach(d=>{I(this,fn)?.togglePause(!d.isIntersecting)})})),I(this,_l).observe(this)}disconnectedCallback(){I(this,Ml)?.unobserve(this),I(this,Ml)?.disconnect(),I(this,_l)?.unobserve(this),I(this,_l)?.disconnect(),I(this,fn)?.unsubscribe(),super.disconnectedCallback()}render(){return this.renderResponse?Tt`<div class="relative">
|
|
625
|
+
</div>`}else return r}var Gc,zc,A4,wl=class extends rr{constructor(){super(...arguments);Se(this,Gc,window.matchMedia("(prefers-color-scheme: dark)"));Se(this,zc,()=>this.requestUpdate());Se(this,A4,()=>({stackDirection:Ce.UNRECOGNIZED}))}static get styles(){return[p4]}connectedCallback(){super.connectedCallback(),I(this,Gc)?.addEventListener("change",I(this,zc))}disconnectedCallback(){super.disconnectedCallback(),I(this,Gc)?.removeEventListener("change",I(this,zc))}async getUpdateComplete(){let i=await super.getUpdateComplete(),d=this.renderRoot.querySelectorAll("[data-block-type]");for(let r=0;r<d.length;r++)await d.item(r).updateComplete;return i}reset(){this.renderRoot.querySelectorAll("[data-block-type]").forEach(d=>{d.reset?.()})}findBlockById(i){let d=this.renderRoot.querySelector(`#${i}[data-block-type]`);if(d)return{blockType:d.dataset.blockType,element:d}}findBlocksByType(i){return Array.from(this.renderRoot.querySelectorAll(`[data-block-type=${i}]`)).map(d=>({blockType:i,element:d}))}render(){if(this.block&&this.block.type===fe.BLOCK_ROOT){let i={...I(this,A4).call(this),...this.renderContext?.()??{}},d=new c4,r=t8(this.block,i);return d.finish(),this.dispatchEvent(I0(Zc,{name:"blocks_layout",timeStart:d.timeStart,timeEnd:d.timeEnd})),Tt` <div class="${zo(this.class)}">${r}</div>`}return Tt`${CN({creative:Tt`<slot name="empty-state-image"></slot>`,title:Wp("Whoops!",{desc:"Header for message to display when rendering fails"}),description:Wp("Something went wrong while attempting to display this content.",{desc:"Message for users to display when rendering fails"})})}`}};Gc=new WeakMap,zc=new WeakMap,A4=new WeakMap,He([Cn({attribute:!1})],wl.prototype,"block",2),He([Cn({attribute:!1})],wl.prototype,"renderContext",2),He([Cn()],wl.prototype,"class",2),wl=He([wN(),E0("devvit-blocks-renderer")],wl);var bx="ServerCallRequired";var C4=class extends Error{constructor(n,i){super(bx),this.response=n,this.cause=i,this.name="CircuitBreakerResponse"}};function Tx(e){return e?.message===bx}var mu=Object.freeze({Actor:"devvit-actor",App:"devvit-app",AppUser:"devvit-app-user",AppViewerAuthToken:"devvit-app-viewer-authorization",Caller:"devvit-caller",CallerPortID:"devvit-caller-port-id",Canary:"devvit-canary",Debug:"devvit-debug",GQLHost:"devvit-gql-host",Installation:"devvit-installation",ModPermissions:"devvit-mod-permissions",Post:"devvit-post",PostAuthor:"devvit-post-author",R2Auth:"devvit-sec-authorization",R2Host:"devvit-r2-host",RemoteHostname:"devvit-remote-hostname",SettingsUri:"devvit-sec-settings-uri",StreamID:"devvit-stream-id",Subreddit:"devvit-subreddit",SubredditName:"devvit-subreddit-name",TraceID:"devvit-trace-id",User:"devvit-user",Username:"devvit-user-name",UserAgent:"devvit-user-agent",Version:"devvit-version",Language:"devvit-accept-language",Timezone:"devvit-accept-timezone",AppDependencies:"devvit-app-dependencies"}),Rx;(function(e){e.Blocks="blocks",e.EmitSnapshots="emitSnapshots",e.EmitState="emitState",e.Realtime="realtime",e.Runtime="runtime",e.Surface="surface",e.UseAsync="useAsync",e.Payments="payments",e.Bootstrap="bootstrap",e.WebView="webView"})(Rx||(Rx={}));function Nx(e,n){let i,d=0,r;return function(...t){return r=t,i??(i=setTimeout(()=>{d=Date.now(),i=void 0;let s=r;r=void 0,e.apply(this,s)},Math.max(0,n-(Date.now()-d)))),()=>{i!=null&&clearTimeout(i),i=void 0,r=void 0}}}function xx(e,n){if(!e)throw Error(n)}var g4;(function(e){e.COMMENT="t1_",e.ACCOUNT="t2_",e.LINK="t3_",e.MESSAGE="t4_",e.SUBREDDIT="t5_",e.AWARD="t6_"})(g4||(g4={}));function Y_(e){return e.startsWith(g4.LINK)}function Q_(e){xx(Y_(e),`Expected link id to start with ${g4.LINK}, got ${e}}`)}function Ix(e){return Q_(e),e}var j_=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,M0=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");let n=e.match(j_);if(!n)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return n.shift(),n},Ex=e=>e==="*"||e==="x"||e==="X",Ox=e=>{let n=parseInt(e,10);return isNaN(n)?e:n},eB=(e,n)=>typeof e!=typeof n?[String(e),String(n)]:[e,n],nB=(e,n)=>{if(Ex(e)||Ex(n))return 0;let[i,d]=eB(Ox(e),Ox(n));return i>d?1:i<d?-1:0},r8=(e,n)=>{for(let i=0;i<Math.max(e.length,n.length);i++){let d=nB(e[i]||"0",n[i]||"0");if(d!==0)return d}return 0};var Px=(e,n)=>{let i=M0(e),d=M0(n),r=i.pop(),t=d.pop(),s=r8(i,d);return s!==0?s:r&&t?r8(r.split("."),t.split(".")):r||t?r?-1:1:0};var d8=(e,n,i)=>{iB(i);let d=Px(e,n);return _x[i].includes(d)},_x={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},Mx=Object.keys(_x),iB=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(Mx.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${Mx.join("|")}`)};function Bx(e,n,i){let{width:d,height:r}=e.contentRect,s=n.getComputedStyle(i).fontSize.split("px")[0],f=s?parseFloat(s)/16:1;return{width:Math.round(d),height:Math.round(r),scale:n.devicePixelRatio,fontScale:f}}typeof ArrayBuffer.isView>"u"&&(ArrayBuffer.isView=function(e){return e!=null&&e.__proto__!=null&&e.__proto__.__proto__===Int8Array.prototype.__proto__});typeof Array.prototype.fill>"u"&&Object.defineProperty(Array.prototype,"fill",{value:function(e){if(this==null)throw new TypeError("this is null or not defined");for(var n=Object(this),i=n.length>>>0,d=arguments[1],r=d>>0,t=r<0?Math.max(i+r,0):Math.min(r,i),s=arguments[2],f=s===void 0?i:s>>0,p=f<0?Math.max(i+f,0):Math.min(f,i);t<p;)n[t]=e,t++;return n}});[Int8Array,Int16Array,Uint16Array,Int32Array,Float32Array,Float64Array].forEach(function(e){typeof e.prototype.fill>"u"&&Object.defineProperty(e.prototype,"fill",{value:Array.prototype.fill})});typeof Math.clz32>"u"&&(Math.clz32=function(e,n){return function(i){var d=i>>>0;return d===0?32:31-(e(d)/n|0)|0}}(Math.log,Math.LN2));typeof Math.imul>"u"&&(Math.imul=function(n,i){return(n&4294901760)*(i&65535)+(n&65535)*(i|0)|0});var Qx=Math.clz32,f8=ArrayBuffer.isView,kn=Math.imul;V(g8,"CharSequence",Zo);V(b8,"Number",te);V(T8,"Unit",di);V(U0,"IntCompanionObject",di);V(bi,"Collection",Zo);V(Fo,"AbstractCollection",te,U,[bi]);V(Yr,"AbstractMutableCollection",te,Fo,[Fo,bi]);V(e3,"IteratorImpl",te);V(V0,"List",Zo,U,[bi]);V(gr,"AbstractMutableList",te,Yr,[Yr,bi,V0]);V(Lo,"Map",Zo);V(br,"AbstractMap",te,U,[Lo]);V(_0,"AbstractMutableMap",te,br,[br,Lo]);V(r3,"Set",Zo,U,[bi]);V(_o,"AbstractMutableSet",te,Yr,[Yr,bi,r3]);V(iI,"Companion",di);V(Kn,"ArrayList",te,gr,[gr,bi,V0],rt);V(Qr,"HashMap",te,_0,[_0,Lo],mB);V(Tr,"HashMapEntrySetBase",te,_o,[bi,r3,_o]);V(x8,"HashMapEntrySet",te,Tr);V(wu,"HashSet",te,_o,[_o,bi,r3],I8);V(uI,"Companion",di);V(Uo,"Itr",te);V(M8,"KeysItr",te,Uo);V(i3,"EntriesItr",te,Uo);V(Bo,"Entry",Zo);V(Cl,"EntryRef",te,U,[Bo]);function tB(e){var n;e:{var i;if(On(e,bi)?i=e.t():i=!1,i){n=!0;break e}for(var d=e.l();d.m();){var r=d.o(),t=r,s;if(t!=null&&On(t,Bo)?s=this.c4(t):s=!1,!s){n=!1;break e}}n=!0}return n}V(lI,"InternalMap",Zo);V(Ii,"InternalHashMap",te,U,[lI],E8);V(_4,"LinkedHashMap",te,Qr,[Qr,Lo],t3);V(ed,"StringBuilder",te,U,[g8],_8);V(mI,"Companion",di);V(kI,"Char",te);V(yI,"Companion",di);V(Ct,"Enum",te);V(B4,U,te);V(II,"Companion",di);V(Ve,"Long",te,b8);V(Vo,"Exception",te,Error,U,JI);V(qi,"RuntimeException",te,Vo,U,WI);V($0,"IllegalArgumentException",te,qi,U,qI);V(G0,"IndexOutOfBoundsException",te,qi,U,DI);V(z0,"IllegalStateException",te,qi,U,$I);V(F4,"UnsupportedOperationException",te,qi,U,K0);V(X0,"NoSuchElementException",te,qi,U,Jo);V(U4,"ConcurrentModificationException",te,qi,U,V8);V(Y0,"ArithmeticException",te,qi,U,zI);V(Z4,"NullPointerException",te,qi,U,J8);V(V4,"ClassCastException",te,qi,U,H8);V(Q0,"UninitializedPropertyAccessException",te,qi,U,XI);V(Au,"Companion",di);V(jI,"Companion",di);V(J4,"Companion",di);V(nE,"Companion",di);V(Pn,"ArrayDeque",te,gr,U,l3);V(td,"EmptyList",di,U,[V0]);V(H4,"EmptyIterator",di);V(Ho,"ArrayAsCollection",te,U,[bi]);V(q4,"IntIterator",te);V(rE,"Companion",di);V(_d,"IntProgression",te);V(Su,"IntRange",te,_d);V(D4,"IntProgressionIterator",te,q4);V(W8,"Companion",di);V(gi,"Pair",te);function g8(){}function b8(){}function T8(){}c(T8).toString=function(){return"kotlin.Unit"};var Ie;function U0(){this.MIN_VALUE=-2147483648,this.MAX_VALUE=2147483647,this.SIZE_BYTES=4,this.SIZE_BITS=32}c(U0).c=function(){return this.MIN_VALUE};c(U0).d=function(){return this.MAX_VALUE};c(U0).e=function(){return this.SIZE_BYTES};c(U0).f=function(){return this.SIZE_BITS};var R8;function rB(e){return e!==e}function dB(e){var n;if(e===0)n=0;else{var i=31;n=1<<(i-Qx(e)|0)}return n}function jx(e){return iF(e)}function oB(e,n){return n}function aB(e,n){return J0(Array(n),null)}function E4(e){return dF([e])}function Z0(e){var n;return e.toArray!==void 0?n=e.toArray():n=jx(e),n}function Ue(e,n,i,d,r){tt.h(d,r,e.length);var t=r-d|0;if(tt.h(i,i+t|0,n.length),f8(n)&&f8(e)){var s=e.subarray(d,r);n.set(s,i)}else if(e!==n||i<=d){var f=0;if(f<t)do{var p=f;f=f+1|0,n[i+p|0]=e[d+p|0]}while(f<t)}else{var v=t-1|0;if(0<=v)do{var w=v;v=v+-1|0,n[i+w|0]=e[d+w|0]}while(0<=v)}}function uB(e){return e<0&&oF(),e}function Yr(){Fo.call(this)}c(Yr).j=function(e){this.k();for(var n=this.l();n.m();)if(Ze(n.o(),e))return n.n(),!0;return!1};c(Yr).p=function(e){this.k();for(var n=!1,i=e.l();i.m();){var d=i.o();this.i(d)&&(n=!0)}return n};c(Yr).toJSON=function(){return this.toArray()};c(Yr).k=function(){};function e3(e){this.w_1=e,this.u_1=0,this.v_1=-1}c(e3).m=function(){return this.u_1<this.w_1.q()};c(e3).o=function(){if(!this.m())throw Jo();var e=this,n=this.u_1;return this.u_1=n+1|0,e.v_1=n,this.w_1.x(this.v_1)};c(e3).n=function(){if(this.v_1===-1){var e="Call next() or previous() before removing element from the iterator.";throw a3(nd(e))}this.w_1.z(this.v_1),this.u_1=this.v_1,this.v_1=-1};function gr(){Yr.call(this),this.y_1=0}c(gr).i=function(e){return this.k(),this.a1(this.q(),e),!0};c(gr).l=function(){return new e3(this)};c(gr).r=function(e){return this.b1(e)>=0};c(gr).b1=function(e){var n;e:{for(var i=0,d=this.l();d.m();){var r=d.o();if(Ze(r,e)){n=i;break e}i=i+1|0}n=-1}return n};c(gr).equals=function(e){return e===this?!0:e!=null&&On(e,V0)?tt.c1(this,e):!1};c(gr).hashCode=function(){return tt.d1(this)};function _0(){br.call(this),this.g1_1=null,this.h1_1=null}c(_0).j1=function(e){this.k();for(var n=this.k1().l();n.m();){var i=n.o(),d=i.l1();if(Ze(e,d)){var r=i.m1();return n.n(),r}}return null};c(_0).k=function(){};function _o(){Yr.call(this)}c(_o).equals=function(e){return e===this?!0:e!=null&&On(e,r3)?q8.s1(this,e):!1};c(_o).hashCode=function(){return q8.t1(this)};function eI(e){if(!(e>=0)){var n="capacity must be non-negative.";throw jr(nd(n))}return J0(Array(e),null)}function nI(e,n){e[n]=null}function Lx(e,n,i){e.fill(null,n,i)}function Fx(e,n){return ML(e,n)}function iI(){c8=this;var e=this,n=O4(0);n.w1_1=!0,e.x1_1=n}var c8;function lB(){return c8==null&&new iI,c8}function sB(e){var n=[];return Kn.call(e,n),e}function rt(){return sB(Ge(c(Kn)))}function fB(e,n){var i=[];if(Kn.call(n,i),!(e>=0)){var d="Negative initial capacity: "+e;throw jr(nd(d))}return n}function O4(e){return fB(e,Ge(c(Kn)))}function cB(e,n){var i=Z0(e);return Kn.call(n,i),n}function N8(e){return cB(e,Ge(c(Kn)))}function pB(e,n){var i=e.q();return e.v1_1.length=e.q()+n|0,i}function tI(e,n){return tt.y1(n,e.q()),n}function hB(e,n){return tt.z1(n,e.q()),n}function Kn(e){lB(),gr.call(this),this.v1_1=e,this.w1_1=!1}c(Kn).q=function(){return this.v1_1.length};c(Kn).x=function(e){var n=this.v1_1[tI(this,e)];return n==null||n!=null?n:rn()};c(Kn).i=function(e){return this.k(),this.v1_1.push(e),this.y_1=this.y_1+1|0,!0};c(Kn).a1=function(e,n){this.k(),this.v1_1.splice(hB(this,e),0,n),this.y_1=this.y_1+1|0};c(Kn).p=function(e){if(this.k(),e.t())return!1;for(var n=pB(this,e.q()),i=0,d=e.l();d.m();){var r=d.o(),t=i;i=t+1|0;var s=uB(t);this.v1_1[n+s|0]=r}return this.y_1=this.y_1+1|0,!0};c(Kn).z=function(e){this.k(),tI(this,e),this.y_1=this.y_1+1|0;var n;return e===I4(this)?n=this.v1_1.pop():n=this.v1_1.splice(e,1)[0],n};c(Kn).j=function(e){this.k();var n=0,i=this.v1_1.length-1|0;if(n<=i)do{var d=n;if(n=n+1|0,Ze(this.v1_1[d],e))return this.v1_1.splice(d,1),this.y_1=this.y_1+1|0,!0}while(n<=i);return!1};c(Kn).b1=function(e){return cI(this.v1_1,e)};c(Kn).toString=function(){return YB(this.v1_1)};c(Kn).a2=function(){return[].slice.call(this.v1_1)};c(Kn).toArray=function(){return this.a2()};c(Kn).k=function(){if(this.w1_1)throw K0()};function vB(e,n){return _0.call(n),Qr.call(n),n.f2_1=e,n}function rI(e){return vB(E8(),e),e}function mB(){return rI(Ge(c(Qr)))}c(Qr).p1=function(e){return this.f2_1.h2(e)};c(Qr).k1=function(){var e=this.g2_1,n;if(e==null){var i=new x8(this.f2_1);this.g2_1=i,n=i}else n=e;return n};c(Qr).r1=function(e){return this.f2_1.r1(e)};c(Qr).i1=function(e,n){return this.f2_1.i1(e,n)};c(Qr).j1=function(e){return this.f2_1.j1(e)};c(Qr).q=function(){return this.f2_1.q()};function Qr(){this.g2_1=null}function x8(e){Tr.call(this,e)}c(x8).l=function(){return this.j2_1.k2()};function Tr(e){_o.call(this),this.j2_1=e}c(Tr).q=function(){return this.j2_1.q()};c(Tr).t=function(){return this.j2_1.q()===0};c(Tr).l2=function(e){return this.j2_1.n2(e)};c(Tr).r=function(e){return e!=null&&On(e,Bo)?this.l2(e!=null&&On(e,Bo)?e:rn()):!1};c(Tr).m2=function(e){throw K0()};c(Tr).i=function(e){return this.m2(e!=null&&On(e,Bo)?e:rn())};c(Tr).p=function(e){throw K0()};c(Tr).s=function(e){return this.j2_1.o2(e)};c(Tr).k=function(){return this.j2_1.k()};function kB(e,n){return _o.call(n),wu.call(n),n.p2_1=e,n}function yB(e){return kB(E8(),e),e}function I8(){return yB(Ge(c(wu)))}c(wu).i=function(e){return this.p2_1.i1(e,!0)==null};c(wu).r=function(e){return this.p2_1.h2(e)};c(wu).t=function(){return this.p2_1.q()===0};c(wu).l=function(){return this.p2_1.q2()};c(wu).q=function(){return this.p2_1.q()};function wu(){}function dI(e,n){return dB(kn(T4(n,1),3))}function oI(e,n){return Qx(n)+1|0}function SB(e){return wB(8,e),e}function E8(){return SB(Ge(c(Ii)))}function wB(e,n){return Ii.call(n,eI(e),null,new Int32Array(e),new Int32Array(dI(n3,e)),2,0),n}function B0(e){return e.r2_1.length}function Qt(e){return e.u2_1.length}function O8(e){e.y2_1=e.y2_1+1|0}function AB(e,n){CB(e,n)?P8(e,Qt(e)):gB(e,e.w2_1+n|0)}function CB(e,n){var i=B0(e)-e.w2_1|0,d=e.w2_1-e.q()|0;return i<n&&(d+i|0)>=n?d>=(B0(e)/4|0):!1}function gB(e,n){if(n<0)throw GI("too many elements");if(n>B0(e)){var i=tt.b3(B0(e),n);e.r2_1=Fx(e.r2_1,i);var d=e,r=e.s2_1;d.s2_1=r==null?null:Fx(r,i),e.t2_1=PL(e.t2_1,i);var t=dI(n3,i);t>Qt(e)&&P8(e,t)}}function bB(e){var n=e.s2_1;if(n!=null)return n;var i=eI(B0(e));return e.s2_1=i,i}function P4(e,n){return n==null?0:kn(Zn(n),-1640531527)>>>e.x2_1|0}function TB(e){for(var n=0,i=0,d=e.s2_1;n<e.w2_1;)e.t2_1[n]>=0&&(e.r2_1[i]=e.r2_1[n],d!=null&&(d[i]=d[n]),i=i+1|0),n=n+1|0;Lx(e.r2_1,i,e.w2_1),d==null||Lx(d,i,e.w2_1),e.w2_1=i}function P8(e,n){O8(e),e.w2_1>e.z2_1&&TB(e),n!==Qt(e)?(e.u2_1=new Int32Array(n),e.x2_1=oI(n3,n)):OL(e.u2_1,0,0,Qt(e));for(var i=0;i<e.w2_1;){var d=i;if(i=d+1|0,!RB(e,d))throw a3("This cannot happen with fixed magic multiplier and grow-only hash array. Have object hashCodes changed?")}}function RB(e,n){for(var i=P4(e,e.r2_1[n]),d=e.v2_1;;){var r=e.u2_1[i];if(r===0)return e.u2_1[i]=n+1|0,e.t2_1[n]=i,!0;if(d=d-1|0,d<0)return!1;var t=i;i=t-1|0,t===0&&(i=Qt(e)-1|0)}}function M4(e,n){for(var i=P4(e,n),d=e.v2_1;;){var r=e.u2_1[i];if(r===0)return-1;if(r>0&&Ze(e.r2_1[r-1|0],n))return r-1|0;if(d=d-1|0,d<0)return-1;var t=i;i=t-1|0,t===0&&(i=Qt(e)-1|0)}}function NB(e,n){e.k();e:for(;;)for(var i=P4(e,n),d=R4(kn(e.v2_1,2),Qt(e)/2|0),r=0;;){var t=e.u2_1[i];if(t<=0){if(e.w2_1>=B0(e)){AB(e,1);continue e}var s=e.w2_1;e.w2_1=s+1|0;var f=s;return e.r2_1[f]=n,e.t2_1[f]=i,e.u2_1[i]=f+1|0,e.z2_1=e.z2_1+1|0,O8(e),r>e.v2_1&&(e.v2_1=r),f}if(Ze(e.r2_1[t-1|0],n))return-t|0;if(r=r+1|0,r>d){P8(e,kn(Qt(e),2));continue e}var p=i;i=p-1|0,p===0&&(i=Qt(e)-1|0)}}function xB(e,n){e.k();var i=M4(e,n);return i<0?-1:(aI(e,i),i)}function aI(e,n){nI(e.r2_1,n),IB(e,e.t2_1[n]),e.t2_1[n]=-1,e.z2_1=e.z2_1-1|0,O8(e)}function IB(e,n){for(var i=n,d=n,r=0,t=R4(kn(e.v2_1,2),Qt(e)/2|0);;){var s=i;if(i=s-1|0,s===0&&(i=Qt(e)-1|0),r=r+1|0,r>e.v2_1)return e.u2_1[d]=0,Ie;var f=e.u2_1[i];if(f===0)return e.u2_1[d]=0,Ie;if(f<0)e.u2_1[d]=-1,d=i,r=0;else{var p=P4(e,e.r2_1[f-1|0]);((p-i|0)&(Qt(e)-1|0))>=r&&(e.u2_1[d]=f,e.t2_1[f-1|0]=d,d=i,r=0)}if(t=t-1|0,t<0)return e.u2_1[d]=-1,Ie}}function EB(e,n){return e.z2_1===n.q()?e.o2(n.k1()):!1}function uI(){this.c3_1=-1640531527,this.d3_1=8,this.e3_1=2,this.f3_1=-1}var n3;function Uo(e){this.g3_1=e,this.h3_1=0,this.i3_1=-1,this.j3_1=this.g3_1.y2_1,this.k3()}c(Uo).k3=function(){for(;this.h3_1<this.g3_1.w2_1&&this.g3_1.t2_1[this.h3_1]<0;)this.h3_1=this.h3_1+1|0};c(Uo).m=function(){return this.h3_1<this.g3_1.w2_1};c(Uo).n=function(){if(this.l3(),this.i3_1===-1){var e="Call next() before removing element from the iterator.";throw a3(nd(e))}this.g3_1.k(),aI(this.g3_1,this.i3_1),this.i3_1=-1,this.j3_1=this.g3_1.y2_1};c(Uo).l3=function(){if(this.g3_1.y2_1!==this.j3_1)throw V8()};function M8(e){Uo.call(this,e)}c(M8).o=function(){if(this.l3(),this.h3_1>=this.g3_1.w2_1)throw Jo();var e=this,n=this.h3_1;this.h3_1=n+1|0,e.i3_1=n;var i=this.g3_1.r2_1[this.i3_1];return this.k3(),i};function i3(e){Uo.call(this,e)}c(i3).o=function(){if(this.l3(),this.h3_1>=this.g3_1.w2_1)throw Jo();var e=this,n=this.h3_1;this.h3_1=n+1|0,e.i3_1=n;var i=new Cl(this.g3_1,this.i3_1);return this.k3(),i};c(i3).u3=function(){if(this.h3_1>=this.g3_1.w2_1)throw Jo();var e=this,n=this.h3_1;this.h3_1=n+1|0,e.i3_1=n;var i=this.g3_1.r2_1[this.i3_1],d=i==null?null:Zn(i),r=d??0,t=q0(this.g3_1.s2_1)[this.i3_1],s=t==null?null:Zn(t),f=r^(s??0);return this.k3(),f};c(i3).v3=function(e){if(this.h3_1>=this.g3_1.w2_1)throw Jo();var n=this,i=this.h3_1;this.h3_1=i+1|0,n.i3_1=i;var d=this.g3_1.r2_1[this.i3_1];Ze(d,this.g3_1)?e.y3("(this Map)"):e.x3(d),e.z3(61);var r=q0(this.g3_1.s2_1)[this.i3_1];Ze(r,this.g3_1)?e.y3("(this Map)"):e.x3(r),this.k3()};function Cl(e,n){this.a4_1=e,this.b4_1=n}c(Cl).l1=function(){return this.a4_1.r2_1[this.b4_1]};c(Cl).m1=function(){return q0(this.a4_1.s2_1)[this.b4_1]};c(Cl).equals=function(e){var n,i;return e!=null&&On(e,Bo)?i=Ze(e.l1(),this.l1()):i=!1,i?n=Ze(e.m1(),this.m1()):n=!1,n};c(Cl).hashCode=function(){var e=this.l1(),n=e==null?null:Zn(e),i=n??0,d=this.m1(),r=d==null?null:Zn(d);return i^(r??0)};c(Cl).toString=function(){return""+this.l1()+"="+this.m1()};function Ii(e,n,i,d,r,t){this.r2_1=e,this.s2_1=n,this.t2_1=i,this.u2_1=d,this.v2_1=r,this.w2_1=t,this.x2_1=oI(n3,Qt(this)),this.y2_1=0,this.z2_1=0,this.a3_1=!1}c(Ii).q=function(){return this.z2_1};c(Ii).r1=function(e){var n=M4(this,e);return n<0?null:q0(this.s2_1)[n]};c(Ii).h2=function(e){return M4(this,e)>=0};c(Ii).i1=function(e,n){var i=NB(this,e),d=bB(this);if(i<0){var r=d[(-i|0)-1|0];return d[(-i|0)-1|0]=n,r}else return d[i]=n,null};c(Ii).j1=function(e){var n=xB(this,e);if(n<0)return null;var i=q0(this.s2_1),d=i[n];return nI(i,n),d};c(Ii).equals=function(e){var n;if(e===this)n=!0;else{var i;e!=null&&On(e,Lo)?i=EB(this,e):i=!1,n=i}return n};c(Ii).hashCode=function(){for(var e=0,n=this.k2();n.m();)e=e+n.u3()|0;return e};c(Ii).toString=function(){var e=MB(2+kn(this.z2_1,3)|0);e.y3("{");for(var n=0,i=this.k2();i.m();)n>0&&e.y3(", "),i.v3(e),n=n+1|0;return e.y3("}"),e.toString()};c(Ii).k=function(){if(this.a3_1)throw K0()};c(Ii).n2=function(e){var n=M4(this,e.l1());return n<0?!1:Ze(q0(this.s2_1)[n],e.m1())};c(Ii).c4=function(e){return this.n2(On(e,Bo)?e:rn())};c(Ii).q2=function(){return new M8(this)};c(Ii).k2=function(){return new i3(this)};function lI(){}function OB(e){return rI(e),_4.call(e),e}function t3(){return OB(Ge(c(_4)))}c(_4).k=function(){return this.f2_1.k()};function _4(){}function PB(e,n){return sI(n),n}function MB(e){return PB(e,Ge(c(ed)))}function sI(e){return ed.call(e,""),e}function _8(){return sI(Ge(c(ed)))}function ed(e){this.w3_1=e!==void 0?e:""}c(ed).a=function(){return this.w3_1.length};c(ed).b=function(e){var n=this.w3_1,i;if(e>=0&&e<=aE(n))i=L0(n,e);else throw W0("index: "+e+", length: "+this.a()+"}");return i};c(ed).z3=function(e){return this.w3_1=this.w3_1+N4(e),this};c(ed).j4=function(e){return this.w3_1=this.w3_1+d3(e),this};c(ed).x3=function(e){return this.w3_1=this.w3_1+d3(e),this};c(ed).y3=function(e){var n=this,i=this.w3_1;return n.w3_1=i+(e??"null"),this};c(ed).toString=function(){return this.w3_1};function Ux(e){var n=N4(e).toUpperCase();return n.length>1?e:L0(n,0)}function _B(e,n,i,d,r,t){return t=t===U?!1:t,lE(e,n,i,d,r,t)}function B8(e){switch(e.length){case 0:return Rr();case 1:return E4(e[0]);default:return BB(e)}}function fI(e){return e.length-1|0}function BB(e){return N8(rF(e))}function cI(e,n){if(n==null){var i=0,d=e.length-1|0;if(i<=d)do{var r=i;if(i=i+1|0,e[r]==null)return r}while(i<=d)}else{var t=0,s=e.length-1|0;if(t<=s)do{var f=t;if(t=t+1|0,Ze(n,e[f]))return f}while(t<=s)}return-1}function LB(e,n){return cI(e,n)>=0}function FB(e,n,i,d,r,t,s){return n=n===U?", ":n,i=i===U?"":i,d=d===U?"":d,r=r===U?-1:r,t=t===U?"...":t,s=s===U?null:s,UB(e,_8(),n,i,d,r,t,s).toString()}function UB(e,n,i,d,r,t,s,f){i=i===U?", ":i,d=d===U?"":d,r=r===U?"":r,t=t===U?-1:t,s=s===U?"...":s,f=f===U?null:f,n.j4(d);var p=0,v=0,w=e.length;e:for(;v<w;){var b=e[v];if(v=v+1|0,p=p+1|0,p>1&&n.j4(i),t<0||p<=t)oE(n,b,f);else break e}return t>=0&&p>t&&n.j4(s),n.j4(r),n}function pI(e,n,i,d,r,t,s){return n=n===U?", ":n,i=i===U?"":i,d=d===U?"":d,r=r===U?-1:r,t=t===U?"...":t,s=s===U?null:s,ZB(e,_8(),n,i,d,r,t,s).toString()}function ZB(e,n,i,d,r,t,s,f){i=i===U?", ":i,d=d===U?"":d,r=r===U?"":r,t=t===U?-1:t,s=s===U?"...":s,f=f===U?null:f,n.j4(d);var p=0,v=e.l();e:for(;v.m();){var w=v.o();if(p=p+1|0,p>1&&n.j4(i),t<0||p<=t)oE(n,w,f);else break e}return t>=0&&p>t&&n.j4(s),n.j4(r),n}function hI(e){if(e.t())throw u3("List is empty.");return e.x(0)}function vI(e,n){if(On(n,bi)){var i=O4(e.q()+n.q()|0);return i.p(e),i.p(n),i}else{var d=N8(e);return aF(d,n),d}}function T4(e,n){return e<n?n:e}function VB(e,n){return dE.k4(e,n,-1)}function R4(e,n){return e>n?n:e}function JB(e){var n=e&65535;return n}function Zx(e){return e}function N4(e){return String.fromCharCode(e)}function mI(){p8=this,this.l4_1=0,this.m4_1=65535,this.n4_1=55296,this.o4_1=56319,this.p4_1=56320,this.q4_1=57343,this.r4_1=55296,this.s4_1=57343,this.t4_1=2,this.u4_1=16}var p8;function Vx(){return p8==null&&new mI,p8}function kI(){}function V0(){}function bi(){}function Bo(){}function Lo(){}function r3(){}function yI(){}var HB;function Ct(e,n){this.v4_1=e,this.w4_1=n}c(Ct).x4=function(){return this.v4_1};c(Ct).y4=function(){return this.w4_1};c(Ct).z4=function(e){return jB(this.w4_1,e.w4_1)};c(Ct).a5=function(e){return this.z4(e instanceof Ct?e:rn())};c(Ct).equals=function(e){return this===e};c(Ct).hashCode=function(){return nL(this)};c(Ct).toString=function(){return this.v4_1};function d3(e){var n=e==null?null:nd(e);return n??"null"}function qB(e){for(var n=1,i=[],d=0,r=e.length;d<r;){var t=e[d];d=d+1|0;var s=n,f=t.prototype.$imask$,p=f??t.$imask$;p!=null&&(i.push(p),s=p.length);var v=t.$metadata$.iid,w;v==null?w=null:w=DB(v);var b=w;b!=null&&(i.push(b),s=Math.max(s,b.length)),s>n&&(n=s)}return $B(n,i)}function DB(e){var n=e>>5,i=new Int32Array(n+1|0),d=e&31,r=1<<d;return i[n]=i[n]|r,i}function $B(e,n){for(var i=0,d=new Int32Array(e);i<e;){for(var r=i,t=0,s=0,f=n.length;s<f;){var p=n[s];s=s+1|0,r<p.length&&(t=t|p[r])}d[r]=t,i=i+1|0}return d}function WB(e,n){var i=n>>5;if(i>e.length)return!1;var d=n&31,r=1<<d;return!!(e[i]&r)}function J0(e,n){var i=0,d=e.length-1|0;if(i<=d)do{var r=i;i=i+1|0,e[r]=n}while(r!==d);return e}function GB(e){return new B4(e)}function B4(e){this.c5_1=e,this.b5_1=0}c(B4).m=function(){return this.b5_1!==this.c5_1.length};c(B4).o=function(){var e;if(this.b5_1!==this.c5_1.length){var n=this.b5_1;this.b5_1=n+1|0,e=this.c5_1[n]}else throw u3(""+this.b5_1);return e};function o8(){return H0(),SI}var SI;function wI(){return H0(),AI}var AI,zB;function h8(){return H0(),CI}var CI;function gI(){return H0(),bI}var bI;function KB(){return H0(),TI}var TI;function XB(e){return H0(),(e|0)===e?LI(e):(wI()[0]=e,kn(h8()[KB()],31)+h8()[gI()]|0)}var Jx;function H0(){Jx||(Jx=!0,SI=new ArrayBuffer(8),AI=new Float64Array(o8()),zB=new Float32Array(o8()),CI=new Int32Array(o8()),wI()[0]=-1,bI=h8()[0]!==0?1:0,TI=1-gI()|0)}function L0(e,n){var i;if(RI(e)){var d=e.charCodeAt(n),r;Vx();var t=0;if(d<Zx(t))r=!0;else{Vx();var s=65535;r=d>Zx(s)}if(r)throw jr("Invalid Char code: "+d);i=TL(d)}else i=e.b(n);return i}function RI(e){return typeof e=="string"}function ku(e){var n;return RI(e)?n=e.length:n=e.a(),n}function YB(e){return FB(e,", ","[","]",U,U,QB)}function QB(e){return nd(e)}function jB(e,n){var i;switch(typeof e){case"number":var d;typeof n=="number"?d=Hx(e,n):n instanceof Ve?d=Hx(e,n.f5()):d=qx(e,n),i=d;break;case"string":case"boolean":i=qx(e,n);break;default:i=eL(e,n);break}return i}function Hx(e,n){var i;if(e<n)i=-1;else if(e>n)i=1;else if(e===n){var d;if(e!==0)d=0;else{var r=1/e,t;r===1/n?t=0:r<0?t=-1:t=1,d=t}i=d}else e!==e?i=n!==n?0:1:i=-1;return i}function qx(e,n){return e<n?-1:e>n?1:0}function eL(e,n){return e.a5(n)}function nL(e){return v8(e)}function v8(e){if(!("kotlinHashCodeValue$"in e)){var n=NI(),i=new Object;i.value=n,i.enumerable=!1,Object.defineProperty(e,"kotlinHashCodeValue$",i)}return e.kotlinHashCodeValue$}function NI(){return Math.random()*4294967296|0}function nd(e){var n;return e==null?n="null":NL(e)?n="[...]":typeof e.toString!="function"?n=iL(e):n=e.toString(),n}function iL(e){return Object.prototype.toString.call(e)}function Zn(e){if(e==null)return 0;var n=typeof e,i;switch(n){case"object":i=typeof e.hashCode=="function"?e.hashCode():v8(e);break;case"function":i=v8(e);break;case"number":i=XB(e);break;case"boolean":i=tL(e);break;case"string":i=L8(String(e));break;case"bigint":i=rL(e);break;case"symbol":i=dL(e);break;default:i=function(){throw new Error("Unexpected typeof `"+n+"`")}();break}return i}function tL(e){return e?1231:1237}function L8(e){var n=0,i=e.length,d=0,r=i-1|0;if(d<=r)do{var t=d;d=d+1|0;var s=e.charCodeAt(t);n=kn(n,31)+s|0}while(t!==r);return n}function rL(e){for(var n=BigInt(32),i=BigInt(4294967295),d=e<0?-e:e,r=0,t=e<0?-1:1;d!=0;){var s=Number(d&i);r=kn(31,r)+s|0,d=d>>n}return kn(r,t)}function dL(e){var n=oL(e)?aL():uL(),i=n.get(e);if(i!==U)return i;var d=NI();return n.set(e,d),d}function oL(e){return Symbol.keyFor(e)!=U}function aL(){return a8===U&&(a8=new Map),a8}function uL(){return u8===U&&(u8=new WeakMap),u8}var a8,u8;function Ze(e,n){if(e==null)return n==null;if(n==null)return!1;if(typeof e=="object"&&typeof e.equals=="function")return e.equals(n);if(e!==e)return n!==n;if(typeof e=="number"&&typeof n=="number"){var i;if(e===n){var d;if(e!==0)d=!0;else{var r=1/e;d=r===1/n}i=d}else i=!1;return i}return e===n}function Je(e,n){Error.captureStackTrace!=null?Error.captureStackTrace(e,n):e.stack=new Error().stack}function c(e){return e.prototype}function Xn(e,n,i,d){return Object.defineProperty(e,n,{configurable:!0,get:i,set:d})}function Ge(e){return Object.create(e)}function xI(e,n,i){Error.call(e),lL(e,n,i)}function lL(e,n,i){var d=UI(Object.getPrototypeOf(e));if(!(d&1)){var r;if(n==null){var t;if(n!==null){var s=i==null?null:i.toString();t=s??U}else t=U;r=t}else r=n;e.message=r}d&2||(e.cause=i),e.name=Object.getPrototypeOf(e).constructor.name}function q0(e){var n;return e==null?sL():n=e,n}function sL(){throw J8()}function rn(){throw H8()}function o3(e){throw YI("lateinit property "+e+" has not been initialized")}function F8(e){throw jr(e)}function fL(e,n){for(var i=e.length,d=n.length,r=0,t=n;r<i&&r<d;){var s=r,f=r;r=f+1|0,t[s]=e[f]}return n}function cL(e,n,i){var d=e.slice(0,n);e.$type$!==void 0&&(d.$type$=e.$type$);var r=e.length;if(n>r)for(d.length=n;r<n;){var t=r;r=t+1|0,d[t]=i}return d}function II(){m8=this,this.g5_1=new Ve(0,-2147483648),this.h5_1=new Ve(-1,2147483647),this.i5_1=8,this.j5_1=64}var m8;function pL(){return m8==null&&new II,m8}function Ve(e,n){pL(),b8.call(this),this.d5_1=e,this.e5_1=n}c(Ve).k5=function(e){return L4(this,e)};c(Ve).a5=function(e){return this.k5(e instanceof Ve?e:rn())};c(Ve).l5=function(e){return x4(this,e)};c(Ve).m5=function(e){return vL(this,e)};c(Ve).n5=function(){return this.o5().l5(new Ve(1,0))};c(Ve).o5=function(){return new Ve(~this.d5_1,~this.e5_1)};c(Ve).p5=function(){return this.d5_1};c(Ve).f5=function(){return Qc(this)};c(Ve).valueOf=function(){return this.f5()};c(Ve).equals=function(e){var n;return e instanceof Ve?n=Xr(this,e):n=!1,n};c(Ve).hashCode=function(){return yL(this)};c(Ve).toString=function(){return k8(this,10)};function Mo(){return dn(),EI}var EI;function b4(){return dn(),OI}var OI;function Dx(){return dn(),PI}var PI;function hL(){return dn(),MI}var MI;function Md(){return dn(),_I}var _I;function $x(){return dn(),BI}var BI;function L4(e,n){if(dn(),Xr(e,n))return 0;var i=Cr(e),d=Cr(n);return i&&!d?-1:!i&&d?1:Cr(Yc(e,n))?-1:1}function x4(e,n){dn();var i=e.e5_1>>>16|0,d=e.e5_1&65535,r=e.d5_1>>>16|0,t=e.d5_1&65535,s=n.e5_1>>>16|0,f=n.e5_1&65535,p=n.d5_1>>>16|0,v=n.d5_1&65535,w=0,b=0,g=0,P=0;return P=P+(t+v|0)|0,g=g+(P>>>16|0)|0,P=P&65535,g=g+(r+p|0)|0,b=b+(g>>>16|0)|0,g=g&65535,b=b+(d+f|0)|0,w=w+(b>>>16|0)|0,b=b&65535,w=w+(i+s|0)|0,w=w&65535,new Ve(g<<16|P,w<<16|b)}function Yc(e,n){return dn(),x4(e,n.n5())}function yu(e,n){if(dn(),Al(e))return Mo();if(Al(n))return Mo();if(Xr(e,Md()))return Wx(n)?Md():Mo();if(Xr(n,Md()))return Wx(e)?Md():Mo();if(Cr(e)){var i;return Cr(n)?i=yu(At(e),At(n)):i=At(yu(At(e),n)),i}else if(Cr(n))return At(yu(e,At(n)));if(Gx(e,$x())&&Gx(n,$x()))return jc(Qc(e)*Qc(n));var d=e.e5_1>>>16|0,r=e.e5_1&65535,t=e.d5_1>>>16|0,s=e.d5_1&65535,f=n.e5_1>>>16|0,p=n.e5_1&65535,v=n.d5_1>>>16|0,w=n.d5_1&65535,b=0,g=0,P=0,W=0;return W=W+kn(s,w)|0,P=P+(W>>>16|0)|0,W=W&65535,P=P+kn(t,w)|0,g=g+(P>>>16|0)|0,P=P&65535,P=P+kn(s,v)|0,g=g+(P>>>16|0)|0,P=P&65535,g=g+kn(r,w)|0,b=b+(g>>>16|0)|0,g=g&65535,g=g+kn(t,v)|0,b=b+(g>>>16|0)|0,g=g&65535,g=g+kn(s,p)|0,b=b+(g>>>16|0)|0,g=g&65535,b=b+(((kn(d,w)+kn(r,v)|0)+kn(t,p)|0)+kn(s,f)|0)|0,b=b&65535,new Ve(P<<16|W,b<<16|g)}function vL(e,n){if(dn(),Al(n))throw Z8("division by zero");if(Al(e))return Mo();if(Xr(e,Md())){if(Xr(n,b4())||Xr(n,Dx()))return Md();if(Xr(n,Md()))return b4();var i=kL(e,1),d=mL(i.m5(n),1);if(Xr(d,Mo()))return Cr(n)?b4():Dx();var r=Yc(e,yu(n,d));return x4(d,r.m5(n))}else if(Xr(n,Md()))return Mo();if(Cr(e)){var t;return Cr(n)?t=At(e).m5(At(n)):t=At(At(e).m5(n)),t}else if(Cr(n))return At(e.m5(At(n)));for(var s=Mo(),f=e;wL(f,n);){for(var p=Qc(f)/Qc(n),v=Math.max(1,Math.floor(p)),w=Math.ceil(Math.log(v)/Math.LN2),b=w<=48?1:Math.pow(2,w-48),g=jc(v),P=yu(g,n);Cr(P)||SL(P,f);)v=v-b,g=jc(v),P=yu(g,n);Al(g)&&(g=b4()),s=x4(s,g),f=Yc(f,P)}return s}function mL(e,n){dn();var i=n&63;return i===0?e:i<32?new Ve(e.d5_1<<i,e.e5_1<<i|(e.d5_1>>>(32-i|0)|0)):new Ve(0,e.d5_1<<(i-32|0))}function kL(e,n){dn();var i=n&63;return i===0?e:i<32?new Ve(e.d5_1>>>i|0|e.e5_1<<(32-i|0),e.e5_1>>i):new Ve(e.e5_1>>(i-32|0),e.e5_1>=0?0:-1)}function Qc(e){return dn(),e.e5_1*4294967296+AL(e)}function Xr(e,n){return dn(),e.e5_1===n.e5_1?e.d5_1===n.d5_1:!1}function yL(e){return dn(),e.d5_1^e.e5_1}function k8(e,n){if(dn(),n<2||36<n)throw Z8("radix out of range: "+n);if(Al(e))return"0";if(Cr(e))if(Xr(e,Md())){var i=Xc(n),d=e.m5(i),r=Yc(yu(d,i),e).p5(),t=k8(d,n);return t+r.toString(n)}else return"-"+k8(At(e),n);for(var s=n===2?31:n<=10?9:n<=21?7:n<=35?6:5,f=jc(Math.pow(n,s)),p=e,v="";;){var w=p.m5(f),b=Yc(p,yu(w,f)).p5(),g=b.toString(n);if(p=w,Al(p))return g+v;for(;g.length<s;)g="0"+g;v=g+v}}function Xc(e){return dn(),new Ve(e,e<0?-1:0)}function Cr(e){return dn(),e.e5_1<0}function Al(e){return dn(),e.e5_1===0?e.d5_1===0:!1}function Wx(e){return dn(),(e.d5_1&1)===1}function At(e){return dn(),e.n5()}function Gx(e,n){return dn(),L4(e,n)<0}function jc(e){if(dn(),rB(e))return Mo();if(e<=-9223372036854776e3)return Md();if(e+1>=9223372036854776e3)return hL();if(e<0)return At(jc(-e));var n=4294967296,i=e%n|0,d=e/n|0;return new Ve(i,d)}function SL(e,n){return dn(),L4(e,n)>0}function wL(e,n){return dn(),L4(e,n)>=0}function AL(e){return dn(),e.d5_1>=0?e.d5_1:4294967296+e.d5_1}var zx;function dn(){zx||(zx=!0,EI=Xc(0),OI=Xc(1),PI=Xc(-1),MI=new Ve(-1,2147483647),_I=new Ve(0,-2147483648),BI=Xc(16777216))}function te(e,n,i,d,r){return U8("class",e,n,i,d,r,null)}function U8(e,n,i,d,r,t,s){var f=U;return{kind:e,simpleName:n,associatedObjectKey:d,associatedObjects:r,suspendArity:t,$kClass$:f,defaultConstructor:i,iid:s}}function V(e,n,i,d,r,t,s,f,p){d!=null&&(e.prototype=Object.create(d.prototype),e.prototype.constructor=e);var v=i(n,t,s,f,p??[]);if(e.$metadata$=v,r!=null){var w=v.iid!=null?e:e.prototype;w.$imask$=qB(r)}}function Zo(e,n,i,d,r){return U8("interface",e,n,i,d,r,CL())}function CL(){return Kc===U&&(Kc=0),Kc=Kc+1|0,Kc}var Kc;function di(e,n,i,d,r){return U8("object",e,n,i,d,r,null)}function D0(e){var n=e.length,i=Array(n),d=0,r=n-1|0;if(d<=r)do{var t=d;d=d+1|0;var s=e[t];s!=null&&F0(s)?i[t]=s:i[t]=[].slice.call(s)}while(t!==r);return[].concat.apply([],i)}function LI(e){var n;return e instanceof Ve?n=e.p5():n=gL(e),n}function gL(e){var n;return e>2147483647?n=2147483647:e<-2147483648?n=-2147483648:n=e|0,n}function bL(e){return e<<16>>16}function TL(e){var n=LI(e),i=bL(n);return JB(i)}function RL(e,n){return new Su(e,n)}function NL(e){return FI(e)?!0:f8(e)}function FI(e){return Array.isArray(e)}function On(e,n){return xL(e,n.$metadata$.iid)}function xL(e,n){var i=e.$imask$,d;if(i==null)return!1;d=i;var r=d;return WB(r,n)}function F0(e){var n;return FI(e)?n=!e.$type$:n=!1,n}function IL(e){return typeof e=="string"?!0:On(e,g8)}function UI(e){var n=e.constructor,i=n==null?null:n.$metadata$,d=i==null?null:i.errorInfo;if(d!=null)return d;var r=0;if(Kx(e,"message")&&(r=r|1),Kx(e,"cause")&&(r=r|2),r!==3){var t=EL(e);t!=Error.prototype&&(r=r|UI(t))}return i!=null&&(i.errorInfo=r),r}function Kx(e,n){return e.hasOwnProperty(n)}function EL(e){return Object.getPrototypeOf(e)}var U;function OL(e,n,i,d){i=i===U?0:i,d=d===U?e.length:d,tt.h(i,d,e.length),e.fill(n,i,d)}function l8(e,n,i,d){i=i===U?0:i,d=d===U?e.length:d,tt.h(i,d,e.length),e.fill(n,i,d)}function ZI(e){return new Kn(e)}function PL(e,n){if(!(n>=0)){var i="Invalid new array size: "+n+".";throw jr(nd(i))}return fL(e,new Int32Array(n))}function ML(e,n){if(!(n>=0)){var i="Invalid new array size: "+n+".";throw jr(nd(i))}return cL(e,n,null)}function VI(e){return xI(e),Vo.call(e),e}function JI(){var e=VI(Ge(c(Vo)));return Je(e,JI),e}function HI(e,n){return xI(n,e),Vo.call(n),n}function Z8(e){var n=HI(e,Ge(c(Vo)));return Je(n,Z8),n}function Vo(){Je(this,Vo)}function _L(e){return id(e),$0.call(e),e}function qI(){var e=_L(Ge(c($0)));return Je(e,qI),e}function BL(e,n){return gl(e,n),$0.call(n),n}function jr(e){var n=BL(e,Ge(c($0)));return Je(n,jr),n}function $0(){Je(this,$0)}function LL(e){return id(e),G0.call(e),e}function DI(){var e=LL(Ge(c(G0)));return Je(e,DI),e}function FL(e,n){return gl(e,n),G0.call(n),n}function W0(e){var n=FL(e,Ge(c(G0)));return Je(n,W0),n}function G0(){Je(this,G0)}function UL(e){return id(e),z0.call(e),e}function $I(){var e=UL(Ge(c(z0)));return Je(e,$I),e}function ZL(e,n){return gl(e,n),z0.call(n),n}function a3(e){var n=ZL(e,Ge(c(z0)));return Je(n,a3),n}function z0(){Je(this,z0)}function VL(e){return id(e),F4.call(e),e}function K0(){var e=VL(Ge(c(F4)));return Je(e,K0),e}function F4(){Je(this,F4)}function id(e){return VI(e),qi.call(e),e}function WI(){var e=id(Ge(c(qi)));return Je(e,WI),e}function gl(e,n){return HI(e,n),qi.call(n),n}function GI(e){var n=gl(e,Ge(c(qi)));return Je(n,GI),n}function qi(){Je(this,qi)}function JL(e){return id(e),X0.call(e),e}function Jo(){var e=JL(Ge(c(X0)));return Je(e,Jo),e}function HL(e,n){return gl(e,n),X0.call(n),n}function u3(e){var n=HL(e,Ge(c(X0)));return Je(n,u3),n}function X0(){Je(this,X0)}function qL(e){return id(e),U4.call(e),e}function V8(){var e=qL(Ge(c(U4)));return Je(e,V8),e}function U4(){Je(this,U4)}function DL(e){return id(e),Y0.call(e),e}function zI(){var e=DL(Ge(c(Y0)));return Je(e,zI),e}function $L(e,n){return gl(e,n),Y0.call(n),n}function KI(e){var n=$L(e,Ge(c(Y0)));return Je(n,KI),n}function Y0(){Je(this,Y0)}function WL(e){return id(e),Z4.call(e),e}function J8(){var e=WL(Ge(c(Z4)));return Je(e,J8),e}function Z4(){Je(this,Z4)}function GL(e){return id(e),V4.call(e),e}function H8(){var e=GL(Ge(c(V4)));return Je(e,H8),e}function V4(){Je(this,V4)}function zL(e){return id(e),Q0.call(e),e}function XI(){var e=zL(Ge(c(Q0)));return Je(e,XI),e}function KL(e,n){return gl(e,n),Q0.call(n),n}function YI(e){var n=KL(e,Ge(c(Q0)));return Je(n,YI),n}function Q0(){Je(this,Q0)}function XL(e){return function(n){return n===e?"(this Collection)":d3(n)}}function Fo(){}c(Fo).r=function(e){var n;e:{var i;if(On(this,bi)?i=this.t():i=!1,i){n=!1;break e}for(var d=this.l();d.m();){var r=d.o();if(Ze(r,e)){n=!0;break e}}n=!1}return n};c(Fo).s=function(e){var n;e:{var i;if(On(e,bi)?i=e.t():i=!1,i){n=!0;break e}for(var d=e.l();d.m();){var r=d.o();if(!this.r(r)){n=!1;break e}}n=!0}return n};c(Fo).t=function(){return this.q()===0};c(Fo).toString=function(){return pI(this,", ","[","]",U,U,XL(this))};c(Fo).toArray=function(){return jx(this)};function Au(){this.g_1=2147483639}c(Au).y1=function(e,n){if(e<0||e>=n)throw W0("index: "+e+", size: "+n)};c(Au).z1=function(e,n){if(e<0||e>n)throw W0("index: "+e+", size: "+n)};c(Au).h=function(e,n,i){if(e<0||n>i)throw W0("fromIndex: "+e+", toIndex: "+n+", size: "+i);if(e>n)throw jr("fromIndex: "+e+" > toIndex: "+n)};c(Au).b3=function(e,n){var i=e+(e>>1)|0;return(i-n|0)<0&&(i=n),(i-2147483639|0)>0&&(i=n>2147483639?R8.MAX_VALUE:2147483639),i};c(Au).d1=function(e){for(var n=1,i=e.l();i.m();){var d=i.o(),r=kn(31,n),t=d==null?null:Zn(d);n=r+(t??0)|0}return n};c(Au).c1=function(e,n){if(e.q()!==n.q())return!1;for(var i=n.l(),d=e.l();d.m();){var r=d.o(),t=i.o();if(!Ze(r,t))return!1}return!0};var tt;function Xx(e,n){return n===e?"(this Map)":d3(n)}function QI(e,n){var i;e:{for(var d=e.k1().l();d.m();){var r=d.o();if(Ze(r.l1(),n)){i=r;break e}}i=null}return i}function jI(){}var YL;function QL(e){return function(n){return e.s5(n)}}function br(){this.n1_1=null,this.o1_1=null}c(br).p1=function(e){return QI(this,e)!=null};c(br).q1=function(e){if(!(e!=null&&On(e,Bo)))return!1;var n=e.l1(),i=e.m1(),d=(On(this,Lo)?this:rn()).r1(n);if(!Ze(i,d))return!1;var r;return d==null?r=!(On(this,Lo)?this:rn()).p1(n):r=!1,!r};c(br).equals=function(e){if(e===this)return!0;if(!(e!=null&&On(e,Lo))||this.q()!==e.q())return!1;var n;e:{var i=e.k1(),d;if(On(i,bi)?d=i.t():d=!1,d){n=!0;break e}for(var r=i.l();r.m();){var t=r.o();if(!this.q1(t)){n=!1;break e}}n=!0}return n};c(br).r1=function(e){var n=QI(this,e);return n==null?null:n.m1()};c(br).hashCode=function(){return Zn(this.k1())};c(br).q=function(){return this.k1().q()};c(br).toString=function(){var e=this.k1();return pI(e,", ","{","}",U,U,QL(this))};c(br).s5=function(e){return Xx(this,e.l1())+"="+Xx(this,e.m1())};function J4(){}c(J4).t1=function(e){for(var n=0,i=e.l();i.m();){var d=i.o(),r=n,t=d==null?null:Zn(d);n=r+(t??0)|0}return n};c(J4).s1=function(e,n){return e.q()!==n.q()?!1:e.s(n)};var q8;function jL(e){return gr.call(e),Pn.call(e),e.v5_1=D8().x5_1,e}function l3(){return jL(Ge(c(Pn)))}function s3(e,n){if(n<0)throw a3("Deque is too big.");if(n<=e.v5_1.length)return Ie;if(e.v5_1===D8().x5_1){var i=e,d=T4(n,10);return i.v5_1=J0(Array(d),null),Ie}var r=tt.b3(e.v5_1.length,n);eF(e,r)}function eF(e,n){var i=J0(Array(n),null),d=e.v5_1,r=e.u5_1,t=e.v5_1.length;Ue(d,i,0,r,t);var s=e.v5_1,f=e.v5_1.length-e.u5_1|0,p=e.u5_1;Ue(s,i,f,0,p),e.u5_1=0,e.v5_1=i}function jt(e,n){return n>=e.v5_1.length?n-e.v5_1.length|0:n}function nF(e,n){return n<0?n+e.v5_1.length|0:n}function eE(e,n){return n===fI(e.v5_1)?0:n+1|0}function y8(e,n){return n===0?fI(e.v5_1):n-1|0}function S8(e,n,i){var d=i.l(),r=n,t=e.v5_1.length;if(r<t)e:do{var s=r;if(r=r+1|0,!d.m())break e;e.v5_1[s]=d.o()}while(r<t);var f=0,p=e.u5_1;if(f<p)e:do{var v=f;if(f=f+1|0,!d.m())break e;e.v5_1[v]=d.o()}while(f<p);e.w5_1=e.w5_1+i.q()|0}function nE(){w8=this;var e=this;e.x5_1=[],this.y5_1=10}var w8;function D8(){return w8==null&&new nE,w8}c(Pn).q=function(){return this.w5_1};c(Pn).t=function(){return this.w5_1===0};c(Pn).z5=function(e){s3(this,this.w5_1+1|0),this.u5_1=y8(this,this.u5_1),this.v5_1[this.u5_1]=e,this.w5_1=this.w5_1+1|0};c(Pn).a6=function(e){s3(this,this.w5_1+1|0);var n=this.v5_1,i=this.w5_1;n[jt(this,this.u5_1+i|0)]=e,this.w5_1=this.w5_1+1|0};c(Pn).b6=function(){if(this.t())throw u3("ArrayDeque is empty.");var e=this.u5_1,n=this.v5_1[e],i=n==null||n!=null?n:rn();return this.v5_1[this.u5_1]=null,this.u5_1=eE(this,this.u5_1),this.w5_1=this.w5_1-1|0,i};c(Pn).c6=function(){if(this.t())throw u3("ArrayDeque is empty.");var e=I4(this),n=jt(this,this.u5_1+e|0),i=this.v5_1[n],d=i==null||i!=null?i:rn();return this.v5_1[n]=null,this.w5_1=this.w5_1-1|0,d};c(Pn).i=function(e){return this.a6(e),!0};c(Pn).a1=function(e,n){if(tt.z1(e,this.w5_1),e===this.w5_1)return this.a6(n),Ie;if(e===0)return this.z5(n),Ie;s3(this,this.w5_1+1|0);var i=jt(this,this.u5_1+e|0);if(e<(this.w5_1+1|0)>>1){var d=y8(this,i),r=y8(this,this.u5_1);if(d>=this.u5_1){this.v5_1[r]=this.v5_1[this.u5_1];var t=this.v5_1,s=this.v5_1,f=this.u5_1,p=this.u5_1+1|0,v=d+1|0;Ue(t,s,f,p,v)}else{var w=this.v5_1,b=this.v5_1,g=this.u5_1-1|0,P=this.u5_1,W=this.v5_1.length;Ue(w,b,g,P,W),this.v5_1[this.v5_1.length-1|0]=this.v5_1[0];var he=this.v5_1,Me=this.v5_1,Hn=d+1|0;Ue(he,Me,0,1,Hn)}this.v5_1[d]=n,this.u5_1=r}else{var qn=this.w5_1,Gi=jt(this,this.u5_1+qn|0);if(i<Gi){var bt=this.v5_1,Zd=this.v5_1,ud=i+1|0;Ue(bt,Zd,ud,i,Gi)}else{var ld=this.v5_1,Er=this.v5_1;Ue(ld,Er,1,0,Gi),this.v5_1[0]=this.v5_1[this.v5_1.length-1|0];var Vd=this.v5_1,Jd=this.v5_1,sd=i+1|0,Pu=this.v5_1.length-1|0;Ue(Vd,Jd,sd,i,Pu)}this.v5_1[i]=n}this.w5_1=this.w5_1+1|0};c(Pn).p=function(e){if(e.t())return!1;s3(this,this.w5_1+e.q()|0);var n=this.w5_1,i=jt(this,this.u5_1+n|0);return S8(this,i,e),!0};c(Pn).d6=function(e,n){if(tt.z1(e,this.w5_1),n.t())return!1;if(e===this.w5_1)return this.p(n);s3(this,this.w5_1+n.q()|0);var i=this.w5_1,d=jt(this,this.u5_1+i|0),r=jt(this,this.u5_1+e|0),t=n.q();if(e<(this.w5_1+1|0)>>1){var s=this.u5_1-t|0;if(r>=this.u5_1)if(s>=0){var f=this.v5_1,p=this.v5_1,v=s,w=this.u5_1;Ue(f,p,v,w,r)}else{s=s+this.v5_1.length|0;var b=r-this.u5_1|0,g=this.v5_1.length-s|0;if(g>=b){var P=this.v5_1,W=this.v5_1,he=s,Me=this.u5_1;Ue(P,W,he,Me,r)}else{var Hn=this.v5_1,qn=this.v5_1,Gi=s,bt=this.u5_1,Zd=this.u5_1+g|0;Ue(Hn,qn,Gi,bt,Zd);var ud=this.v5_1,ld=this.v5_1,Er=this.u5_1+g|0;Ue(ud,ld,0,Er,r)}}else{var Vd=this.v5_1,Jd=this.v5_1,sd=s,Pu=this.u5_1,Bl=this.v5_1.length;if(Ue(Vd,Jd,sd,Pu,Bl),t>=r){var Ll=this.v5_1,Fl=this.v5_1,vO=this.v5_1.length-t|0;Ue(Ll,Fl,vO,0,r)}else{var mO=this.v5_1,kO=this.v5_1,yO=this.v5_1.length-t|0;Ue(mO,kO,yO,0,t);var SO=this.v5_1,wO=this.v5_1;Ue(SO,wO,0,t,r)}}this.u5_1=s,S8(this,nF(this,r-t|0),n)}else{var Mu=r+t|0;if(r<d)if((d+t|0)<=this.v5_1.length){var AO=this.v5_1,CO=this.v5_1;Ue(AO,CO,Mu,r,d)}else if(Mu>=this.v5_1.length){var gO=this.v5_1,bO=this.v5_1,TO=Mu-this.v5_1.length|0;Ue(gO,bO,TO,r,d)}else{var Bh=(d+t|0)-this.v5_1.length|0,RO=this.v5_1,NO=this.v5_1,xO=d-Bh|0;Ue(RO,NO,0,xO,d);var IO=this.v5_1,EO=this.v5_1,OO=d-Bh|0;Ue(IO,EO,Mu,r,OO)}else{var PO=this.v5_1,MO=this.v5_1;if(Ue(PO,MO,t,0,d),Mu>=this.v5_1.length){var _O=this.v5_1,BO=this.v5_1,LO=Mu-this.v5_1.length|0,FO=this.v5_1.length;Ue(_O,BO,LO,r,FO)}else{var UO=this.v5_1,ZO=this.v5_1,VO=this.v5_1.length-t|0,JO=this.v5_1.length;Ue(UO,ZO,0,VO,JO);var HO=this.v5_1,qO=this.v5_1,DO=this.v5_1.length-t|0;Ue(HO,qO,Mu,r,DO)}}S8(this,r,n)}return!0};c(Pn).x=function(e){tt.y1(e,this.w5_1);var n=jt(this,this.u5_1+e|0),i=this.v5_1[n];return i==null||i!=null?i:rn()};c(Pn).r=function(e){return this.b1(e)!==-1};c(Pn).b1=function(e){var n=this.w5_1,i=jt(this,this.u5_1+n|0);if(this.u5_1<i){var d=this.u5_1;if(d<i)do{var r=d;if(d=d+1|0,Ze(e,this.v5_1[r]))return r-this.u5_1|0}while(d<i)}else if(this.u5_1>=i){var t=this.u5_1,s=this.v5_1.length;if(t<s)do{var f=t;if(t=t+1|0,Ze(e,this.v5_1[f]))return f-this.u5_1|0}while(t<s);var p=0;if(p<i)do{var v=p;if(p=p+1|0,Ze(e,this.v5_1[v]))return(v+this.v5_1.length|0)-this.u5_1|0}while(p<i)}return-1};c(Pn).j=function(e){var n=this.b1(e);return n===-1?!1:(this.z(n),!0)};c(Pn).z=function(e){if(tt.y1(e,this.w5_1),e===I4(this))return this.c6();if(e===0)return this.b6();var n=jt(this,this.u5_1+e|0),i=this.v5_1[n],d=i==null||i!=null?i:rn();if(e<this.w5_1>>1){if(n>=this.u5_1){var r=this.v5_1,t=this.v5_1,s=this.u5_1+1|0,f=this.u5_1;Ue(r,t,s,f,n)}else{var p=this.v5_1,v=this.v5_1;Ue(p,v,1,0,n),this.v5_1[0]=this.v5_1[this.v5_1.length-1|0];var w=this.v5_1,b=this.v5_1,g=this.u5_1+1|0,P=this.u5_1,W=this.v5_1.length-1|0;Ue(w,b,g,P,W)}this.v5_1[this.u5_1]=null,this.u5_1=eE(this,this.u5_1)}else{var he=I4(this),Me=jt(this,this.u5_1+he|0);if(n<=Me){var Hn=this.v5_1,qn=this.v5_1,Gi=n+1|0,bt=Me+1|0;Ue(Hn,qn,n,Gi,bt)}else{var Zd=this.v5_1,ud=this.v5_1,ld=n+1|0,Er=this.v5_1.length;Ue(Zd,ud,n,ld,Er),this.v5_1[this.v5_1.length-1|0]=this.v5_1[0];var Vd=this.v5_1,Jd=this.v5_1,sd=Me+1|0;Ue(Vd,Jd,0,1,sd)}this.v5_1[Me]=null}return this.w5_1=this.w5_1-1|0,d};c(Pn).e6=function(){var e=this.w5_1,n=jt(this,this.u5_1+e|0);this.u5_1<n?l8(this.v5_1,null,this.u5_1,n):this.t()||(l8(this.v5_1,null,this.u5_1,this.v5_1.length),l8(this.v5_1,null,0,n)),this.u5_1=0,this.w5_1=0};c(Pn).f6=function(e){var n=e.length>=this.w5_1?e:aB(e,this.w5_1),i=F0(n)?n:rn(),d=this.w5_1,r=jt(this,this.u5_1+d|0);if(this.u5_1<r){var t=this.v5_1,s=this.u5_1;Ue(t,i,0,s,r)}else if(!this.t()){var f=this.v5_1,p=this.u5_1,v=this.v5_1.length;Ue(f,i,0,p,v);var w=this.v5_1,b=this.v5_1.length-this.u5_1|0;Ue(w,i,b,0,r)}var g=oB(this.w5_1,i);return F0(g)?g:rn()};c(Pn).a2=function(){var e=this.w5_1,n=J0(Array(e),null);return this.f6(n)};c(Pn).toArray=function(){return this.a2()};function Pn(){D8(),this.u5_1=0,this.w5_1=0}function iF(e){if(e.t())return[];for(var n=e.q(),i=J0(Array(n),null),d=e.l(),r=0;d.m();){var t=r;r=t+1|0,i[t]=d.o()}return i}function Rr(){return tF()}function iE(e){return e.length>0?ZI(e):Rr()}function I4(e){return e.q()-1|0}function td(){A8=this,this.g6_1=new Ve(-1478467534,-1720727600)}c(td).equals=function(e){var n;return e!=null&&On(e,V0)?n=e.t():n=!1,n};c(td).hashCode=function(){return 1};c(td).toString=function(){return"[]"};c(td).q=function(){return 0};c(td).t=function(){return!0};c(td).h6=function(e){return e.t()};c(td).s=function(e){return this.h6(e)};c(td).x=function(e){throw W0("Empty list doesn't contain element at index "+e+".")};c(td).l=function(){return tE};var A8;function tF(){return A8==null&&new td,A8}function H4(){}c(H4).m=function(){return!1};c(H4).o=function(){throw Jo()};var tE;function rF(e){return new Ho(e,!1)}function dF(e){return e.length===0?rt():N8(new Ho(e,!0))}function Ho(e,n){this.i6_1=e,this.j6_1=n}c(Ho).q=function(){return this.i6_1.length};c(Ho).t=function(){return this.i6_1.length===0};c(Ho).k6=function(e){return LB(this.i6_1,e)};c(Ho).l6=function(e){var n;e:{var i;if(On(e,bi)?i=e.t():i=!1,i){n=!0;break e}for(var d=e.l();d.m();){var r=d.o();if(!this.k6(r)){n=!1;break e}}n=!0}return n};c(Ho).s=function(e){return this.l6(e)};c(Ho).l=function(){return GB(this.i6_1)};function oF(){throw KI("Index overflow has happened.")}function $8(e,n){return e.p(ZI(n))}function aF(e,n){if(On(n,bi))return e.p(n);for(var i=!1,d=n.l();d.m();){var r=d.o();e.i(r)&&(i=!0)}return i}function q4(){}c(q4).o=function(){return this.m6()};function uF(e,n,i){var d;if(i>0)d=e>=n?n:n-Yx(n,e,i)|0;else if(i<0)d=e<=n?n:n+Yx(e,n,-i|0)|0;else throw jr("Step is zero.");return d}function Yx(e,n,i){return s8(s8(e,i)-s8(n,i)|0,i)}function s8(e,n){var i=e%n|0;return i>=0?i:i+n|0}function rE(){C8=this,this.n6_1=new Su(1,0)}var C8;function lF(){return C8==null&&new rE,C8}function Su(e,n){lF(),_d.call(this,e,n,1)}c(Su).t=function(){return this.r6_1>this.s6_1};c(Su).equals=function(e){var n;return e instanceof Su?n=this.t()&&e.t()?!0:this.r6_1===e.r6_1?this.s6_1===e.s6_1:!1:n=!1,n};c(Su).hashCode=function(){return this.t()?-1:kn(31,this.r6_1)+this.s6_1|0};c(Su).toString=function(){return""+this.r6_1+".."+this.s6_1};function D4(e,n,i){q4.call(this),this.u6_1=i,this.v6_1=n,this.w6_1=this.u6_1>0?e<=n:e>=n,this.x6_1=this.w6_1?e:this.v6_1}c(D4).m=function(){return this.w6_1};c(D4).m6=function(){var e=this.x6_1;if(e===this.v6_1){if(!this.w6_1)throw Jo();this.w6_1=!1}else this.x6_1=this.x6_1+this.u6_1|0;return e};function W8(){}c(W8).k4=function(e,n,i){return new _d(e,n,i)};var dE;function _d(e,n,i){if(i===0)throw jr("Step must be non-zero.");if(i===R8.MIN_VALUE)throw jr("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");this.r6_1=e,this.s6_1=uF(e,n,i),this.t6_1=i}c(_d).l=function(){return new D4(this.r6_1,this.s6_1,this.t6_1)};c(_d).t=function(){return this.t6_1>0?this.r6_1>this.s6_1:this.r6_1<this.s6_1};c(_d).equals=function(e){var n;return e instanceof _d?n=this.t()&&e.t()?!0:this.r6_1===e.r6_1&&this.s6_1===e.s6_1?this.t6_1===e.t6_1:!1:n=!1,n};c(_d).hashCode=function(){return this.t()?-1:kn(31,kn(31,this.r6_1)+this.s6_1|0)+this.t6_1|0};c(_d).toString=function(){return this.t6_1>0?""+this.r6_1+".."+this.s6_1+" step "+this.t6_1:""+this.r6_1+" downTo "+this.s6_1+" step "+(-this.t6_1|0)};function oE(e,n,i){i!=null?e.j4(i(n)):n==null||IL(n)?e.j4(n):n instanceof kI?e.z3(n.y6_1):e.j4(d3(n))}function sF(e,n,i){if(i=i===U?!1:i,e===n)return!0;if(!i)return!1;var d=Ux(e),r=Ux(n),t;if(d===r)t=!0;else{var s=N4(d).toLowerCase(),f=L0(s,0),p=N4(r).toLowerCase();t=f===L0(p,0)}return t}function aE(e){return ku(e)-1|0}function G8(e,n,i){i=i===U?!1:i;var d;return typeof n=="string"?d=fF(e,n,U,i)>=0:d=uE(e,n,0,ku(e),i)>=0,d}function fF(e,n,i,d){i=i===U?0:i,d=d===U?!1:d;var r,t;return d?t=!0:t=typeof e!="string",t?r=uE(e,n,i,ku(e),d):r=e.indexOf(n,i),r}function uE(e,n,i,d,r,t){t=t===U?!1:t;var s=t?VB(R4(i,aE(e)),T4(d,0)):RL(T4(i,0),R4(d,ku(e))),f;if(typeof e=="string"?f=typeof n=="string":f=!1,f){var p=s.r6_1,v=s.s6_1,w=s.t6_1;if(w>0&&p<=v||w<0&&v<=p)do{var b=p;if(p=p+w|0,_B(n,0,e,b,ku(n),r))return b}while(b!==v)}else{var g=s.r6_1,P=s.s6_1,W=s.t6_1;if(W>0&&g<=P||W<0&&P<=g)do{var he=g;if(g=g+W|0,lE(n,0,e,he,ku(n),r))return he}while(he!==P)}return-1}function lE(e,n,i,d,r,t){if(d<0||n<0||n>(ku(e)-r|0)||d>(ku(i)-r|0))return!1;var s=0;if(s<r)do{var f=s;if(s=s+1|0,!sF(L0(e,n+f|0),L0(i,d+f|0),t))return!1}while(s<r);return!0}function gi(e,n){this.z6_1=e,this.a7_1=n}c(gi).toString=function(){return"("+this.z6_1+", "+this.a7_1+")"};c(gi).b7=function(){return this.z6_1};c(gi).c7=function(){return this.a7_1};c(gi).hashCode=function(){var e=this.z6_1==null?0:Zn(this.z6_1);return e=kn(e,31)+(this.a7_1==null?0:Zn(this.a7_1))|0,e};c(gi).equals=function(e){if(this===e)return!0;if(!(e instanceof gi))return!1;var n=e instanceof gi?e:rn();return!(!Ze(this.z6_1,n.z6_1)||!Ze(this.a7_1,n.a7_1))};function sE(e,n){return new gi(e,n)}c(Ii).o2=tB;Ie=new T8;R8=new U0;n3=new uI;HB=new yI;tt=new Au;YL=new jI;q8=new J4;tE=new H4;dE=new W8;var qo=Math.imul;V(X8,"OneAtATimeAssembler",te);V(Y8,"AllAtOnceAssembler",te);V(Di,"SubscribeCallbackParams",te);V(er,"Mode",te,Ct);V(bl,"Callback",te);V(j8,U,te);V(Ti,"DispatcherImpl",te);V($i,"EmptyOptions",te,U,U,$i);V(Mn,"DispatcherSnapshot",te);V(oi,"EventScope",te,Ct);V(eh,"NoOpUnsubscriber",di);V(j0,"BaseTrace",te);V(v3,"ErrorInfo",te);V(TE,"PerformanceAnalyticsDelegate",Zo);V(c3,"NoOpPerformanceAnalyticsDelegate",te,U,[TE],c3);V(m3,"RuntimeTrace",te,j0);V(bu,"Disabled",di);V(k3,"NiceLogger",te);V(gu,"NoOpLogger",te,U,U,gu);V(nh,"IntervalEventDeduper",te);V(ih,"LocalEventsDeduper",te);V(dt,"TimerDefinition",te);V(Q4,"Span",te);V(th,"Tracer",di);V(j4,"JsDispatcherImpl",te,Ti);V(e6,"JsRequestBuilderAdapter",te);V(p3,"JsonStateOperations",te,U,U,p3);function X8(e,n){this.d7_1=e,this.e7_1=n}c(X8).f7=function(e,n){var i;if(e.t())i=Rr();else{for(var d=this.e7_1.list(),r=e.b6();hE(r);){for(var t=0,s=d.length;t<s;){var f=d[t];if(t=t+1|0,f.id===r.hook)return this.d7_1.h7([""+n+" building batch of ",r]),E4(r)}if(!e.t())r=e.b6();else return Rr()}this.d7_1.h7([""+n+" building batch of ",r]),i=E4(r)}return i};function Y8(e,n){this.i7_1=e,this.j7_1=n}c(Y8).f7=function(e,n){var i;if(e.t())i=Rr();else{for(var d=this.j7_1.list(),r=rt(),t=e.l();t.m();){var s=t.o(),f;if(hE(s)){var p;if(d.length===0)p=!1;else{var v;e:{for(var w=0,b=d.length;w<b;){var g=d[w];if(w=w+1|0,g.id===s.hook){v=g;break e}}v=null}p=v!=null}f=p}else f=!0;f&&r.i(s)}var P=r;e.e6(),this.i7_1.h7([""+n+" building batch of ",P]),i=P}return i};function hE(e){var n=e.hook;return(n==null?null:G8(n,"useInterval"))===!0}function Di(e,n,i){this.request=e,this.response=n,this.mode=i}c(Di).k7=function(){return this.request};c(Di).l7=function(){return this.response};c(Di).m7=function(){return this.mode};c(Di).b7=function(){return this.request};c(Di).c7=function(){return this.response};c(Di).n7=function(){return this.mode};c(Di).o7=function(e,n,i){return new Di(e,n,i)};c(Di).copy=function(e,n,i,d){return e=e===U?this.request:e,n=n===U?this.response:n,i=i===U?this.mode:i,this.o7(e,n,i)};c(Di).toString=function(){return"SubscribeCallbackParams(request="+this.request+", response="+this.response+", mode="+this.mode+")"};c(Di).hashCode=function(){var e=this.request==null?0:Zn(this.request);return e=qo(e,31)+(this.response==null?0:Zn(this.response))|0,e=qo(e,31)+this.mode.hashCode()|0,e};c(Di).equals=function(e){if(this===e)return!0;if(!(e instanceof Di))return!1;var n=e instanceof Di?e:rn();return!(!Ze(this.request,n.request)||!Ze(this.response,n.response)||!this.mode.equals(n.mode))};var vE,mE,kE;function cF(){return[Bd(),f3(),Ld()]}function pF(e){switch(e){case"SYNC":return Bd();case"ASYNC":return f3();case"SPEC":return Ld();default:W4(),F8("No enum constant value.");break}}var fE;function W4(){if(fE)return Ie;fE=!0,vE=new er("SYNC",0),mE=new er("ASYNC",1),kE=new er("SPEC",2)}function er(e,n){Ct.call(this,e,n)}function Bd(){return W4(),vE}function f3(){return W4(),mE}function Ld(){return W4(),kE}function bl(e,n){this.r7_1=e,this.s7_1=n}c(bl).toString=function(){return"Callback(success="+this.r7_1+", failure="+this.s7_1+")"};c(bl).hashCode=function(){var e=Zn(this.r7_1);return e=qo(e,31)+Zn(this.s7_1)|0,e};c(bl).equals=function(e){if(this===e)return!0;if(!(e instanceof bl))return!1;var n=e instanceof bl?e:rn();return!(!Ze(this.r7_1,n.r7_1)||!Ze(this.s7_1,n.s7_1))};function z8(e){var n=e.b8_1;if(n!=null)return n;o3("assembler")}function Tl(e){var n=e.i8_1;if(n!=null)return n;o3("local")}function h3(e){var n=e.j8_1;if(n!=null)return n;o3("remote")}function G4(e){var n=e.k8_1;if(n!=null)return n;o3("timers")}function yE(e){SE(e),e.p8_1=!0,e.y7_1.h7(["recalculateSpeculativeWork"]);var n=e.c8_1.l(),i=0;e:for(;n.m();){var d=i;i=i+1|0;var r=n.o();if(d===0||r.retry===!0||r.async===!0||r.scope.equals(Cu()))continue e;if(e.e8_1.w5_1>10)break e;e.e8_1.i(r)}e.y7_1.h7(["Speculative queue size: "+e.e8_1.w5_1]),z4(e,e.e8_1)}function Q8(e){e.y7_1.h7(["cancelSpeculation"]),e.p8_1=!1,SE(e)}function SE(e){e.e8_1.e6(),e.m8_1=e.v7_1.clone(e.state),e.n8_1=e.n8_1+1|0}function K8(e,n,i){if(n.t())return Ie;var d=hI(n),r=d.scope.equals(Cu())?!0:xF(d.scope)?!Tl(e).isReady():!1;i.equals(Bd())&&(e.f8_1=!0);var t=e.u7_1.q8(i.equals(Ld())?e.m8_1:e.state,n),s=r?h3(e):Tl(e),f=e.z7_1;e.z7_1=f+1|0;var p=f,v=e.n8_1,w=xE.r8("runtime_trace"),b=SF(e,i,r,w,n,p,v,t),g=new bl(b,AF(e,i,r,w,p,n));e.g8_1.i1(p,g),e.y7_1.h7(["Signpost: Handling "+$4(e,i,r)+" request"]),z4(e,t),s.handle(e.w7_1,t,g.r7_1,g.s7_1)}function $4(e,n,i){return(i?"remote":"local")+" "+n+" runtime"}function wE(e,n){e.p8_1=e.o8_1,e.f8_1=!1,e.state=e.v7_1.clone(e.l8_1),e.d8_1.e6(),e.c8_1.e6(),Tl(e).reset(),h3(e).reset(),Q8(e),n&&G4(e).clear()}function Rl(e,n,i){var d;try{d=i()}catch(s){var r;if(s instanceof Vo){var t=s;e.y7_1.s8([t]),e.x7_1.errorHandler(t),r=n}else throw s;d=r}return d}function z4(e,n){e.x7_1.featureFlags.isVerboseLoggingEnabled&&e.y7_1.h7([n])}function hF(e){return function(){return Tl(e).isReady()}}function vF(e){return function(n){var i,d;e:{for(var r=e.c8_1.l();r.m();){var t=r.o();if(t.hook===n){d=t;break e}}d=null}if(d!=null)i=!0;else{var s;e:{for(var f=e.d8_1.l();f.m();){var p=f.o();if(p.hook===n){s=p;break e}}s=null}i=s!=null}return i}}function mF(e,n,i,d){return function(){e.y7_1.h7(["Signpost: Initializing Dispatcher",n,i]),e.i8_1=n,e.j8_1=i,e.k8_1=d;var r=e,t;return e.x7_1.featureFlags.isUsingEverythingAssembler?t=new Y8(e.y7_1,d):t=new X8(e.y7_1,d),r.b8_1=t,e.t8(),Ie}}function j8(e,n){this.u8_1=e,this.v8_1=n}c(j8).unsubscribe=function(){this.u8_1.h8_1.j(this.v8_1)};function kF(e,n){return function(){var i=typeof e=="function"?e:rn();return n.h8_1.i(i),new j8(n,i)}}function yF(e,n,i,d,r,t,s,f,p){return function(){e.y7_1.h7(["Signpost: Response success for "+$4(e,n,i)+" request"]),z4(e,d),r.z8(),IF(e.x7_1.performanceAnalyticsDelegate,r,i,"",t.q()),e.g8_1.j1(s);var v;if(n.equals(Ld())&&e.n8_1!==f)return e.y7_1.h7(["throwing away stale speculative results"]),Ie;e.y7_1.h7(["Responding to "+$4(e,n,i)+" runtime result subscriptions"]);for(var w=e.h8_1.l();w.m();){var b=w.o();b(new Di(p,d,n))}var g;n.equals(Bd())?(e.state=e.v7_1.merge(e.state,d.state),e.f8_1=!1,g=Ie):n.equals(Ld())&&(e.m8_1=e.v7_1.merge(e.m8_1,d.state),g=Ie),e.a9(B8(d.replay),n);var P;return n.equals(Bd())&&e.o8_1&&(yE(e),P=Ie),e.t8(),Ie}}function SF(e,n,i,d,r,t,s,f){return function(p){return Rl(e,Ie,yF(e,n,i,p,d,r,t,s,f)),Ie}}function wF(e,n,i,d,r,t,s){return function(){e.y7_1.h7(["Signpost: Response error for "+$4(e,n,i)+" request",d]),r.z8();var f=e.x7_1.performanceAnalyticsDelegate,p=d.message;EF(f,p??"Request Response Error"+(" with a duration of "+r.b9()+"ms"),i,""),e.g8_1.j1(t);var v;n.equals(Bd())&&(e.f8_1=!1,v=Ie);var w;if(n.equals(Ld()))return Q8(e),e.t8(),Ie;for(var b=s,g=t3(),P=b.l();P.m();){var W=P.o(),he=W.scope.equals(Cu())?!1:W.retry!==!0,Me=g.r1(he),Hn;if(Me==null){var qn=rt();g.i1(he,qn),Hn=qn}else Hn=Me;var Gi=Hn;Gi.i(W)}var bt=g,Zd,ud=bt.r1(!1);if(!(ud==null||ud.t())){var ld=bt.r1(!1),Er=ld??Rr(),Vd=Z0(Er);e.y7_1.h7(D0([["unretryable events",d],Vd])),Zd=e.x7_1.errorHandler(d)}var Jd,sd=bt.r1(!0);if(!(sd==null||sd.t())){var Pu=bt.r1(!0);if(Pu!=null)for(var Bl=Pu.l();Bl.m();){var Ll=Bl.o();Ll.retry=!0,Ll.scope=Cu()}var Fl=bt.r1(!0);e.a9(Fl??Rr(),n),n.equals(Bd())&&e.o8_1&&yE(e),e.t8(),Jd=Ie}return Ie}}function AF(e,n,i,d,r,t){return function(s){return Rl(e,Ie,wF(e,n,i,s,d,r,t)),Ie}}function CF(e,n){return function(){e.y7_1.h7(D0([["Signpost: Submitted events"],n]));for(var i=e.a8_1,d=B8(n),r=i.l();r.m();){var t=r.o(),s=d;d=t.c9(s)}for(var f=d,p=rt(),v=rt(),w=f.l();w.m();){var b=w.o();b.async===!0?p.i(b):v.i(b)}var g=new gi(p,v),P=g.b7(),W=g.c7();e.d8_1.p(P),e.c8_1.p(W);var he;return e.f8_1&&e.p8_1&&(e.e8_1.p(W),he=Ie),e.t8(),Ie}}function gF(e){return function(){return wE(e,!0),Ie}}function bF(e,n){return function(){e.state=e.v7_1.clone(n.state),e.d8_1.e6();var i=n.asyncQueue;$8(e.d8_1,F0(i)?i:rn()),e.c8_1.e6();var d=n.syncQueue;return $8(e.c8_1,F0(d)?d:rn()),Q8(e),Tl(e).resume(n.localSnapshot),h3(e).resume(n.remoteSnapshot),G4(e).resumeAll(n.timerSnapshot),Ie}}function Ti(e,n,i,d,r){d=d===U?"RenderPostContent":d,r=r===U?new $i:r,this.t7_1=e,this.u7_1=n,this.v7_1=i,this.w7_1=d,this.x7_1=r,this.y7_1=new k3(this.x7_1.logger),this.z7_1=0;var t=this,s=new ih(hF(this),this.y7_1);t.a8_1=iE([s,new nh(vF(this))]),this.c8_1=l3(),this.d8_1=l3(),this.e8_1=l3(),this.f8_1=!1;var f=this;f.g8_1=t3();var p=this;p.h8_1=rt(),this.l8_1=this.v7_1.clone(this.state),this.m8_1=this.v7_1.clone(this.l8_1),this.n8_1=0,this.o8_1=this.x7_1.featureFlags.isSpeculativeExecutionEnabled,this.p8_1=this.o8_1,this.y7_1.h7(["Signpost: Constructed KMP Dispatcher"])}c(Ti).d9=function(e){this.t7_1=e};c(Ti).e9=function(){return this.t7_1};c(Ti).f9=function(){return this.c8_1};c(Ti).g9=function(){return this.d8_1};c(Ti).h9=function(){return this.e8_1};c(Ti).init=function(e,n,i){Rl(this,Ie,mF(this,e,n,i))};c(Ti).subscribe=function(e){var n=bE;return Rl(this,n,kF(e,this))};c(Ti).t8=function(){if(this.y7_1.h7(["ticking","syncInFlight "+this.f8_1,"asyncQueue.size "+this.d8_1.w5_1,"syncQueue.size "+this.c8_1.w5_1,"speculativeQueue.size "+this.e8_1.w5_1]),!Tl(this).isReady()&&!h3(this).isReady()&&!(this.c8_1.t()&&this.d8_1.t()))return this.y7_1.i9(["ticking with events and no runtime, deferring..."]),Ie;if(this.f8_1){if(this.p8_1){var n=z8(this).f7(this.e8_1,Ld());K8(this,n,Ld())}}else{var e=z8(this).f7(this.c8_1,Bd());K8(this,e,Bd())}if(!this.d8_1.t()){for(;!this.d8_1.t();){var i=z8(this).f7(this.d8_1,f3());K8(this,i,f3())}this.t8()}};c(Ti).a9=function(e,n){if(e.t()||n.equals(Ld()))return Ie;this.y7_1.h7(["replaying "+e.q()+" events"]),z4(this,e);for(var i=t3(),d=e.l();d.m();){var r=d.o(),t=new gi(r.async===!0,r.retry===!0),s=i.r1(t),f;if(s==null){var p=rt();i.i1(t,p),f=p}else f=s;var v=f;v.i(r)}var w=i,b=w.r1(new gi(!0,!0));this.d8_1.d6(0,b??Rr());var g=w.r1(new gi(!0,!1));this.d8_1.p(g??Rr());var P=w.r1(new gi(!1,!0));this.c8_1.d6(0,P??Rr());var W=w.r1(new gi(!1,!1));this.c8_1.p(W??Rr())};c(Ti).submit=function(e){Rl(this,Ie,CF(this,e))};c(Ti).reset=function(){Rl(this,Ie,gF(this))};c(Ti).snapshot=function(){var e=this.v7_1.clone(this.state),n=this.c8_1,i=Z0(n),d=this.d8_1,r=Z0(d);return new Mn(e,i,r,Tl(this).snapshot(),h3(this).snapshot(),G4(this).list())};c(Ti).pause=function(){var e=this.snapshot();return G4(this).pauseAll(),wE(this,!1),e};c(Ti).resume=function(e){Rl(this,Ie,bF(this,e))};function TF(e){return Ie}function $i(){this.j9_1=new gu;var e=this;e.k9_1=TF,this.l9_1=NE,this.m9_1=new c3}c($i).n9=function(e){this.j9_1=e};c($i).o9=function(){return this.j9_1};c($i).p9=function(e){this.k9_1=e};c($i).q9=function(){return this.k9_1};c($i).r9=function(e){this.l9_1=e};c($i).s9=function(){return this.l9_1};c($i).t9=function(e){this.m9_1=e};c($i).u9=function(){return this.m9_1};function Mn(e,n,i,d,r,t){this.state=e,this.syncQueue=n,this.asyncQueue=i,this.localSnapshot=d,this.remoteSnapshot=r,this.timerSnapshot=t}c(Mn).e9=function(){return this.state};c(Mn).f9=function(){return this.syncQueue};c(Mn).g9=function(){return this.asyncQueue};c(Mn).v9=function(){return this.localSnapshot};c(Mn).w9=function(){return this.remoteSnapshot};c(Mn).x9=function(){return this.timerSnapshot};c(Mn).b7=function(){return this.state};c(Mn).c7=function(){return this.syncQueue};c(Mn).n7=function(){return this.asyncQueue};c(Mn).y9=function(){return this.localSnapshot};c(Mn).z9=function(){return this.remoteSnapshot};c(Mn).aa=function(){return this.timerSnapshot};c(Mn).ba=function(e,n,i,d,r,t){return new Mn(e,n,i,d,r,t)};c(Mn).copy=function(e,n,i,d,r,t,s){return e=e===U?this.state:e,n=n===U?this.syncQueue:n,i=i===U?this.asyncQueue:i,d=d===U?this.localSnapshot:d,r=r===U?this.remoteSnapshot:r,t=t===U?this.timerSnapshot:t,this.ba(e,n,i,d,r,t)};c(Mn).toString=function(){return"DispatcherSnapshot(state="+this.state+", syncQueue="+nd(this.syncQueue)+", asyncQueue="+nd(this.asyncQueue)+", localSnapshot="+this.localSnapshot+", remoteSnapshot="+this.remoteSnapshot+", timerSnapshot="+this.timerSnapshot+")"};c(Mn).hashCode=function(){var e=this.state==null?0:Zn(this.state);return e=qo(e,31)+Zn(this.syncQueue)|0,e=qo(e,31)+Zn(this.asyncQueue)|0,e=qo(e,31)+(this.localSnapshot==null?0:Zn(this.localSnapshot))|0,e=qo(e,31)+(this.remoteSnapshot==null?0:Zn(this.remoteSnapshot))|0,e=qo(e,31)+(this.timerSnapshot==null?0:Zn(this.timerSnapshot))|0,e};c(Mn).equals=function(e){if(this===e)return!0;if(!(e instanceof Mn))return!1;var n=e instanceof Mn?e:rn();return!(!Ze(this.state,n.state)||!Ze(this.syncQueue,n.syncQueue)||!Ze(this.asyncQueue,n.asyncQueue)||!Ze(this.localSnapshot,n.localSnapshot)||!Ze(this.remoteSnapshot,n.remoteSnapshot)||!Ze(this.timerSnapshot,n.timerSnapshot))};var AE,CE,gE;function RF(){return[X4(),Y4(),Cu()]}function NF(e){switch(e){case"ALL":return X4();case"LOCAL":return Y4();case"REMOTE":return Cu();default:K4(),F8("No enum constant value.");break}}var cE;function K4(){if(cE)return Ie;cE=!0,AE=new oi("ALL",0),CE=new oi("LOCAL",1),gE=new oi("REMOTE",2)}function oi(e,n){Ct.call(this,e,n)}function xF(e){return e.equals(Cu())?!0:e.equals(X4())}function X4(){return K4(),AE}function Y4(){return K4(),CE}function Cu(){return K4(),gE}function eh(){}c(eh).unsubscribe=function(){};var bE;function j0(e,n,i){this.spanName=e,this.startTimeMs=n,this.endTimeMs=i}c(j0).ea=function(){return this.spanName};c(j0).fa=function(){return this.startTimeMs};c(j0).ga=function(){return this.endTimeMs};function v3(e,n,i){this.message=e,this.origin=n,this.version=i}c(v3).q5=function(){return this.message};c(v3).ha=function(){return this.origin};c(v3).ia=function(){return this.version};function TE(){}function c3(){}c(c3).logRuntimeTrace=function(e){};c(c3).logRuntimeError=function(e){};function IF(e,n,i,d,r){e.logRuntimeTrace(new m3(n.w8_1,n.x8_1,n.y8_1,d,RE(i),r))}function EF(e,n,i,d){e.logRuntimeError(new v3(n,RE(i),d))}function RE(e){return e?"remote":"local"}function m3(e,n,i,d,r,t){j0.call(this,e,n,i),this.intent=d,this.target=r,this.eventCount=t}c(m3).ja=function(){return this.intent};c(m3).ka=function(){return this.target};c(m3).la=function(){return this.eventCount};function bu(){this.ma_1=!1,this.na_1=!1,this.oa_1=!1}c(bu).pa=function(){return this.ma_1};c(bu).qa=function(){return this.na_1};c(bu).ra=function(){return this.oa_1};var NE;function k3(e){this.g7_1=e}c(k3).s8=function(e){var n=D0([[this.g7_1.tag()],e]);this.g7_1.error(n)};c(k3).i9=function(e){var n=D0([[this.g7_1.tag()],e]);this.g7_1.warn(n)};c(k3).h7=function(e){var n=D0([[this.g7_1.tag()],e]);this.g7_1.debug(n)};function gu(){}c(gu).info=function(e){};c(gu).error=function(e){};c(gu).warn=function(e){};c(gu).debug=function(e){};c(gu).tag=function(){return""};function nh(e){this.sa_1=e}c(nh).c9=function(e){for(var n=rt(),i=rt(),d=e.l();d.m();){var r=d.o(),t=r.hook;(t==null?null:G8(t,"useInterval"))===!0?n.i(r):i.i(r)}for(var s=new gi(n,i),f=s.b7(),p=s.c7(),v=I8(),w=rt(),b=f.l();b.m();){var g=b.o(),P=g.hook;v.i(P)&&w.i(g)}for(var W=w,he=rt(),Me=W.l();Me.m();){var Hn=Me.o(),qn=Hn.hook;this.sa_1(qn??"")||he.i(Hn)}var Gi=he;return vI(Gi,p)};function ih(e,n){this.ta_1=e,this.ua_1=n}c(ih).c9=function(e){var n;if(this.ta_1())n=e;else{for(var i=rt(),d=rt(),r=e.l();r.m();){var t=r.o();t.scope.equals(Y4())?d.i(t):i.i(t)}var s=new gi(i,d);if(!s.a7_1.t()){var f=["Dropping "+s.a7_1.q()+" local events",s.a7_1];this.ua_1.h7([f])}n=s.z6_1}return n};function dt(e,n){this.id=e,this.duration=n}c(dt).va=function(){return this.id};c(dt).wa=function(){return this.duration};c(dt).b7=function(){return this.id};c(dt).c7=function(){return this.duration};c(dt).xa=function(e,n){return new dt(e,n)};c(dt).copy=function(e,n,i){return e=e===U?this.id:e,n=n===U?this.duration:n,this.xa(e,n)};c(dt).toString=function(){return"TimerDefinition(id="+this.id+", duration="+this.duration+")"};c(dt).hashCode=function(){var e=L8(this.id);return e=qo(e,31)+this.duration|0,e};c(dt).equals=function(e){if(this===e)return!0;if(!(e instanceof dt))return!1;var n=e instanceof dt?e:rn();return!(this.id!==n.id||this.duration!==n.duration)};function Q4(e,n){this.w8_1=e,this.x8_1=n,this.y8_1=0}c(Q4).z8=function(){this.y8_1=IE()};c(Q4).b9=function(){return this.y8_1-this.x8_1};function th(){}c(th).r8=function(e){return new Q4(e,IE())};var xE;function j4(e,n,i,d){i=i===U?"RenderPostContent":i,d=d===U?new $i:d,Ti.call(this,e,new e6(n),new p3,i,d),this.vb_1=i,this.wb_1=d}function e6(e){this.xb_1=e}c(e6).yb=function(e,n){var i=Z0(n);return this.xb_1.build(e,i)};c(e6).q8=function(e,n){return this.yb(e!=null&&e!=null?e:rn(),n)};function pE(e){for(var n=Object.entries,i=(n!=null&&typeof n=="function"?n:rn())(e),d=O4(i.length),r=0,t=i.length;r<t;){var s=i[r];r=r+1|0;var f=s[0],p=sE(f!=null&&typeof f=="string"?f:rn(),s[1]);d.i(p)}return d}function p3(){}c(p3).clone=function(e){return JSON.parse(JSON.stringify(e))};c(p3).merge=function(e,n){for(var i={},d=i!=null&&i!=null?i:rn(),r=pE(e).l();r.m();){var t=r.o();d[t.z6_1]=t.a7_1}for(var s=pE(n).l();s.m();){var f=s.o();d[f.z6_1]=f.a7_1}return d};function IE(){return new Date().getTime()}Xn(c(er),"name",c(er).x4);Xn(c(er),"ordinal",c(er).y4);Xn(c(Ti),"state",function(){return this.e9()},function(e){this.d9(e)});Xn(c($i),"logger",function(){return this.o9()},function(e){this.n9(e)});Xn(c($i),"errorHandler",function(){return this.q9()},function(e){this.p9(e)});Xn(c($i),"featureFlags",function(){return this.s9()},function(e){this.r9(e)});Xn(c($i),"performanceAnalyticsDelegate",function(){return this.u9()},function(e){this.t9(e)});Xn(c(oi),"name",c(oi).x4);Xn(c(oi),"ordinal",c(oi).y4);Xn(c(bu),"isSpeculativeExecutionEnabled",function(){return this.pa()});Xn(c(bu),"isVerboseLoggingEnabled",function(){return this.qa()});Xn(c(bu),"isUsingEverythingAssembler",function(){return this.ra()});Xn(c(j4),"state",function(){return this.e9()},function(e){this.d9(e)});bE=new eh;NE=new bu;xE=new th;er.values=cF;er.valueOf=pF;Xn(er,"SYNC",Bd);Xn(er,"ASYNC",f3);Xn(er,"SPEC",Ld);oi.values=RF;oi.valueOf=NF;Xn(oi,"ALL",X4);Xn(oi,"LOCAL",Y4);Xn(oi,"REMOTE",Cu);var ir=B(F(),1);var xl=B(F(),1);var Fd;(function(e){e[e.ENVIRONMENT_UNSPECIFIED=0]="ENVIRONMENT_UNSPECIFIED",e[e.ENVIRONMENT_SANDBOX=1]="ENVIRONMENT_SANDBOX",e[e.ENVIRONMENT_PRODUCTION=2]="ENVIRONMENT_PRODUCTION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Fd||(Fd={}));function n6(e){switch(e){case 0:case"ENVIRONMENT_UNSPECIFIED":return Fd.ENVIRONMENT_UNSPECIFIED;case 1:case"ENVIRONMENT_SANDBOX":return Fd.ENVIRONMENT_SANDBOX;case 2:case"ENVIRONMENT_PRODUCTION":return Fd.ENVIRONMENT_PRODUCTION;case-1:case"UNRECOGNIZED":default:return Fd.UNRECOGNIZED}}function i6(e){switch(e){case Fd.ENVIRONMENT_UNSPECIFIED:return 0;case Fd.ENVIRONMENT_SANDBOX:return 1;case Fd.ENVIRONMENT_PRODUCTION:return 2;case Fd.UNRECOGNIZED:default:return-1}}var nr=B(F(),1);var Ru;(function(e){e[e.CURRENCY_UNSPECIFIED=0]="CURRENCY_UNSPECIFIED",e[e.GOLD=200]="GOLD",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Ru||(Ru={}));function OF(e){switch(e){case 0:case"CURRENCY_UNSPECIFIED":return Ru.CURRENCY_UNSPECIFIED;case 200:case"GOLD":return Ru.GOLD;case-1:case"UNRECOGNIZED":default:return Ru.UNRECOGNIZED}}function PF(e){switch(e){case Ru.CURRENCY_UNSPECIFIED:return 0;case Ru.GOLD:return 200;case Ru.UNRECOGNIZED:default:return-1}}var Yn;(function(e){e[e.ACCOUNTING_TYPE_UNSPECIFIED=0]="ACCOUNTING_TYPE_UNSPECIFIED",e[e.ACCOUNTING_TYPE_INSTANT=1]="ACCOUNTING_TYPE_INSTANT",e[e.ACCOUNTING_TYPE_DURABLE=2]="ACCOUNTING_TYPE_DURABLE",e[e.ACCOUNTING_TYPE_CONSUMABLE=3]="ACCOUNTING_TYPE_CONSUMABLE",e[e.ACCOUNTING_TYPE_VALID_FOR_1D=4]="ACCOUNTING_TYPE_VALID_FOR_1D",e[e.ACCOUNTING_TYPE_VALID_FOR_7D=5]="ACCOUNTING_TYPE_VALID_FOR_7D",e[e.ACCOUNTING_TYPE_VALID_FOR_30D=6]="ACCOUNTING_TYPE_VALID_FOR_30D",e[e.ACCOUNTING_TYPE_VALID_FOR_1Y=7]="ACCOUNTING_TYPE_VALID_FOR_1Y",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Yn||(Yn={}));function MF(e){switch(e){case 0:case"ACCOUNTING_TYPE_UNSPECIFIED":return Yn.ACCOUNTING_TYPE_UNSPECIFIED;case 1:case"ACCOUNTING_TYPE_INSTANT":return Yn.ACCOUNTING_TYPE_INSTANT;case 2:case"ACCOUNTING_TYPE_DURABLE":return Yn.ACCOUNTING_TYPE_DURABLE;case 3:case"ACCOUNTING_TYPE_CONSUMABLE":return Yn.ACCOUNTING_TYPE_CONSUMABLE;case 4:case"ACCOUNTING_TYPE_VALID_FOR_1D":return Yn.ACCOUNTING_TYPE_VALID_FOR_1D;case 5:case"ACCOUNTING_TYPE_VALID_FOR_7D":return Yn.ACCOUNTING_TYPE_VALID_FOR_7D;case 6:case"ACCOUNTING_TYPE_VALID_FOR_30D":return Yn.ACCOUNTING_TYPE_VALID_FOR_30D;case 7:case"ACCOUNTING_TYPE_VALID_FOR_1Y":return Yn.ACCOUNTING_TYPE_VALID_FOR_1Y;case-1:case"UNRECOGNIZED":default:return Yn.UNRECOGNIZED}}function _F(e){switch(e){case Yn.ACCOUNTING_TYPE_UNSPECIFIED:return 0;case Yn.ACCOUNTING_TYPE_INSTANT:return 1;case Yn.ACCOUNTING_TYPE_DURABLE:return 2;case Yn.ACCOUNTING_TYPE_CONSUMABLE:return 3;case Yn.ACCOUNTING_TYPE_VALID_FOR_1D:return 4;case Yn.ACCOUNTING_TYPE_VALID_FOR_7D:return 5;case Yn.ACCOUNTING_TYPE_VALID_FOR_30D:return 6;case Yn.ACCOUNTING_TYPE_VALID_FOR_1Y:return 7;case Yn.UNRECOGNIZED:default:return-1}}function EE(){return{sku:"",name:"",price:void 0,environment:0,description:"",accountingType:0,productMetadata:{},images:{}}}var ot={$type:"devvit.payments.v1alpha.Product",encode(e,n=nr.default.Writer.create()){return e.sku!==""&&n.uint32(8010).string(e.sku),e.name!==""&&n.uint32(26).string(e.name),e.price!==void 0&&Tu.encode(e.price,n.uint32(42).fork()).ldelim(),e.environment!==0&&n.uint32(160).int32(e.environment),e.description!==""&&n.uint32(170).string(e.description),e.accountingType!==0&&n.uint32(184).int32(e.accountingType),Object.entries(e.productMetadata).forEach(([i,d])=>{y3.encode({key:i,value:d},n.uint32(8018).fork()).ldelim()}),Object.entries(e.images).forEach(([i,d])=>{S3.encode({key:i,value:d},n.uint32(8026).fork()).ldelim()}),n},decode(e,n){let i=e instanceof nr.default.Reader?e:nr.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=EE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1001:if(t!==8010)break;r.sku=i.string();continue;case 3:if(t!==26)break;r.name=i.string();continue;case 5:if(t!==42)break;r.price=Tu.decode(i,i.uint32());continue;case 20:if(t!==160)break;r.environment=i.int32();continue;case 21:if(t!==170)break;r.description=i.string();continue;case 23:if(t!==184)break;r.accountingType=i.int32();continue;case 1002:if(t!==8018)break;let s=y3.decode(i,i.uint32());s.value!==void 0&&(r.productMetadata[s.key]=s.value);continue;case 1003:if(t!==8026)break;let f=S3.decode(i,i.uint32());f.value!==void 0&&(r.images[f.key]=f.value);continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{sku:Nr(e.sku)?globalThis.String(e.sku):"",name:Nr(e.name)?globalThis.String(e.name):"",price:Nr(e.price)?Tu.fromJSON(e.price):void 0,environment:Nr(e.environment)?n6(e.environment):0,description:Nr(e.description)?globalThis.String(e.description):"",accountingType:Nr(e.accountingType)?MF(e.accountingType):0,productMetadata:_E(e.productMetadata)?Object.entries(e.productMetadata).reduce((n,[i,d])=>(n[i]=String(d),n),{}):{},images:_E(e.images)?Object.entries(e.images).reduce((n,[i,d])=>(n[i]=String(d),n),{}):{}}},toJSON(e){let n={};if(e.sku!==""&&(n.sku=e.sku),e.name!==""&&(n.name=e.name),e.price!==void 0&&(n.price=Tu.toJSON(e.price)),e.environment!==0&&(n.environment=i6(e.environment)),e.description!==""&&(n.description=e.description),e.accountingType!==0&&(n.accountingType=_F(e.accountingType)),e.productMetadata){let i=Object.entries(e.productMetadata);i.length>0&&(n.productMetadata={},i.forEach(([d,r])=>{n.productMetadata[d]=r}))}if(e.images){let i=Object.entries(e.images);i.length>0&&(n.images={},i.forEach(([d,r])=>{n.images[d]=r}))}return n},create(e){return ot.fromPartial(e??{})},fromPartial(e){let n=EE();return n.sku=e.sku??"",n.name=e.name??"",n.price=e.price!==void 0&&e.price!==null?Tu.fromPartial(e.price):void 0,n.environment=e.environment??0,n.description=e.description??"",n.accountingType=e.accountingType??0,n.productMetadata=Object.entries(e.productMetadata??{}).reduce((i,[d,r])=>(r!==void 0&&(i[d]=globalThis.String(r)),i),{}),n.images=Object.entries(e.images??{}).reduce((i,[d,r])=>(r!==void 0&&(i[d]=globalThis.String(r)),i),{}),n}};l.set(ot.$type,ot);function OE(){return{key:"",value:""}}var y3={$type:"devvit.payments.v1alpha.Product.ProductMetadataEntry",encode(e,n=nr.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==""&&n.uint32(18).string(e.value),n},decode(e,n){let i=e instanceof nr.default.Reader?e:nr.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=OE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.key=i.string();continue;case 2:if(t!==18)break;r.value=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{key:Nr(e.key)?globalThis.String(e.key):"",value:Nr(e.value)?globalThis.String(e.value):""}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==""&&(n.value=e.value),n},create(e){return y3.fromPartial(e??{})},fromPartial(e){let n=OE();return n.key=e.key??"",n.value=e.value??"",n}};l.set(y3.$type,y3);function PE(){return{key:"",value:""}}var S3={$type:"devvit.payments.v1alpha.Product.ImagesEntry",encode(e,n=nr.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==""&&n.uint32(18).string(e.value),n},decode(e,n){let i=e instanceof nr.default.Reader?e:nr.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=PE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.key=i.string();continue;case 2:if(t!==18)break;r.value=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{key:Nr(e.key)?globalThis.String(e.key):"",value:Nr(e.value)?globalThis.String(e.value):""}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==""&&(n.value=e.value),n},create(e){return S3.fromPartial(e??{})},fromPartial(e){let n=PE();return n.key=e.key??"",n.value=e.value??"",n}};l.set(S3.$type,S3);function ME(){return{amount:0,currency:0}}var Tu={$type:"devvit.payments.v1alpha.ProductPrice",encode(e,n=nr.default.Writer.create()){return e.amount!==0&&n.uint32(8).int32(e.amount),e.currency!==0&&n.uint32(16).int32(e.currency),n},decode(e,n){let i=e instanceof nr.default.Reader?e:nr.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=ME();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==8)break;r.amount=i.int32();continue;case 2:if(t!==16)break;r.currency=i.int32();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{amount:Nr(e.amount)?globalThis.Number(e.amount):0,currency:Nr(e.currency)?OF(e.currency):0}},toJSON(e){let n={};return e.amount!==0&&(n.amount=Math.round(e.amount)),e.currency!==0&&(n.currency=PF(e.currency)),n},create(e){return Tu.fromPartial(e??{})},fromPartial(e){let n=ME();return n.amount=e.amount??0,n.currency=e.currency??0,n}};l.set(Tu.$type,Tu);function _E(e){return typeof e=="object"&&e!==null}function Nr(e){return e!=null}var Ri;(function(e){e[e.ORDER_STATUS_UNSPECIFIED=0]="ORDER_STATUS_UNSPECIFIED",e[e.ORDER_STATUS_NEW=1]="ORDER_STATUS_NEW",e[e.ORDER_STATUS_CREATED=2]="ORDER_STATUS_CREATED",e[e.ORDER_STATUS_PAID=3]="ORDER_STATUS_PAID",e[e.ORDER_STATUS_DELIVERED=4]="ORDER_STATUS_DELIVERED",e[e.ORDER_STATUS_CANCELED=5]="ORDER_STATUS_CANCELED",e[e.ORDER_STATUS_REVERTED=6]="ORDER_STATUS_REVERTED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Ri||(Ri={}));function dh(e){switch(e){case 0:case"ORDER_STATUS_UNSPECIFIED":return Ri.ORDER_STATUS_UNSPECIFIED;case 1:case"ORDER_STATUS_NEW":return Ri.ORDER_STATUS_NEW;case 2:case"ORDER_STATUS_CREATED":return Ri.ORDER_STATUS_CREATED;case 3:case"ORDER_STATUS_PAID":return Ri.ORDER_STATUS_PAID;case 4:case"ORDER_STATUS_DELIVERED":return Ri.ORDER_STATUS_DELIVERED;case 5:case"ORDER_STATUS_CANCELED":return Ri.ORDER_STATUS_CANCELED;case 6:case"ORDER_STATUS_REVERTED":return Ri.ORDER_STATUS_REVERTED;case-1:case"UNRECOGNIZED":default:return Ri.UNRECOGNIZED}}function oh(e){switch(e){case Ri.ORDER_STATUS_UNSPECIFIED:return 0;case Ri.ORDER_STATUS_NEW:return 1;case Ri.ORDER_STATUS_CREATED:return 2;case Ri.ORDER_STATUS_PAID:return 3;case Ri.ORDER_STATUS_DELIVERED:return 4;case Ri.ORDER_STATUS_CANCELED:return 5;case Ri.ORDER_STATUS_REVERTED:return 6;case Ri.UNRECOGNIZED:default:return-1}}function BE(){return{id:"",status:0,createdAt:void 0,updatedAt:void 0,products:[],environment:0,metadata:{}}}var Qn={$type:"devvit.payments.v1alpha.Order",encode(e,n=xl.default.Writer.create()){e.id!==""&&n.uint32(10).string(e.id),e.status!==0&&n.uint32(16).int32(e.status),e.createdAt!==void 0&&re.encode(FE(e.createdAt),n.uint32(26).fork()).ldelim(),e.updatedAt!==void 0&&re.encode(FE(e.updatedAt),n.uint32(34).fork()).ldelim();for(let i of e.products)ot.encode(i,n.uint32(42).fork()).ldelim();return e.environment!==0&&n.uint32(64).int32(e.environment),Object.entries(e.metadata).forEach(([i,d])=>{w3.encode({key:i,value:d},n.uint32(8010).fork()).ldelim()}),n},decode(e,n){let i=e instanceof xl.default.Reader?e:xl.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=BE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.id=i.string();continue;case 2:if(t!==16)break;r.status=i.int32();continue;case 3:if(t!==26)break;r.createdAt=rh(re.decode(i,i.uint32()));continue;case 4:if(t!==34)break;r.updatedAt=rh(re.decode(i,i.uint32()));continue;case 5:if(t!==42)break;r.products.push(ot.decode(i,i.uint32()));continue;case 8:if(t!==64)break;r.environment=i.int32();continue;case 1001:if(t!==8010)break;let s=w3.decode(i,i.uint32());s.value!==void 0&&(r.metadata[s.key]=s.value);continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{id:Nl(e.id)?globalThis.String(e.id):"",status:Nl(e.status)?dh(e.status):0,createdAt:Nl(e.createdAt)?UE(e.createdAt):void 0,updatedAt:Nl(e.updatedAt)?UE(e.updatedAt):void 0,products:globalThis.Array.isArray(e?.products)?e.products.map(n=>ot.fromJSON(n)):[],environment:Nl(e.environment)?n6(e.environment):0,metadata:BF(e.metadata)?Object.entries(e.metadata).reduce((n,[i,d])=>(n[i]=String(d),n),{}):{}}},toJSON(e){let n={};if(e.id!==""&&(n.id=e.id),e.status!==0&&(n.status=oh(e.status)),e.createdAt!==void 0&&(n.createdAt=e.createdAt.toISOString()),e.updatedAt!==void 0&&(n.updatedAt=e.updatedAt.toISOString()),e.products?.length&&(n.products=e.products.map(i=>ot.toJSON(i))),e.environment!==0&&(n.environment=i6(e.environment)),e.metadata){let i=Object.entries(e.metadata);i.length>0&&(n.metadata={},i.forEach(([d,r])=>{n.metadata[d]=r}))}return n},create(e){return Qn.fromPartial(e??{})},fromPartial(e){let n=BE();return n.id=e.id??"",n.status=e.status??0,n.createdAt=e.createdAt??void 0,n.updatedAt=e.updatedAt??void 0,n.products=e.products?.map(i=>ot.fromPartial(i))||[],n.environment=e.environment??0,n.metadata=Object.entries(e.metadata??{}).reduce((i,[d,r])=>(r!==void 0&&(i[d]=globalThis.String(r)),i),{}),n}};l.set(Qn.$type,Qn);function LE(){return{key:"",value:""}}var w3={$type:"devvit.payments.v1alpha.Order.MetadataEntry",encode(e,n=xl.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==""&&n.uint32(18).string(e.value),n},decode(e,n){let i=e instanceof xl.default.Reader?e:xl.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=LE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.key=i.string();continue;case 2:if(t!==18)break;r.value=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{key:Nl(e.key)?globalThis.String(e.key):"",value:Nl(e.value)?globalThis.String(e.value):""}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==""&&(n.value=e.value),n},create(e){return w3.fromPartial(e??{})},fromPartial(e){let n=LE();return n.key=e.key??"",n.value=e.value??"",n}};l.set(w3.$type,w3);function FE(e){let n=Math.trunc(e.getTime()/1e3),i=e.getTime()%1e3*1e6;return{seconds:n,nanos:i}}function rh(e){let n=(e.seconds||0)*1e3;return n+=(e.nanos||0)/1e6,new globalThis.Date(n)}function UE(e){return e instanceof globalThis.Date?e:typeof e=="string"?new globalThis.Date(e):rh(re.fromJSON(e))}function BF(e){return typeof e=="object"&&e!==null}function Nl(e){return e!=null}function ZE(){return{order:void 0}}var ah={$type:"devvit.actor.payments.v1alpha.FulfillOrderRequest",encode(e,n=ir.default.Writer.create()){return e.order!==void 0&&Qn.encode(e.order,n.uint32(10).fork()).ldelim(),n},decode(e,n){let i=e instanceof ir.default.Reader?e:ir.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=ZE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.order=Qn.decode(i,i.uint32());continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{order:t6(e.order)?Qn.fromJSON(e.order):void 0}},toJSON(e){let n={};return e.order!==void 0&&(n.order=Qn.toJSON(e.order)),n},create(e){return ah.fromPartial(e??{})},fromPartial(e){let n=ZE();return n.order=e.order!==void 0&&e.order!==null?Qn.fromPartial(e.order):void 0,n}};l.set(ah.$type,ah);function VE(){return{order:void 0}}var uh={$type:"devvit.actor.payments.v1alpha.RefundOrderRequest",encode(e,n=ir.default.Writer.create()){return e.order!==void 0&&Qn.encode(e.order,n.uint32(10).fork()).ldelim(),n},decode(e,n){let i=e instanceof ir.default.Reader?e:ir.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=VE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.order=Qn.decode(i,i.uint32());continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{order:t6(e.order)?Qn.fromJSON(e.order):void 0}},toJSON(e){let n={};return e.order!==void 0&&(n.order=Qn.toJSON(e.order)),n},create(e){return uh.fromPartial(e??{})},fromPartial(e){let n=VE();return n.order=e.order!==void 0&&e.order!==null?Qn.fromPartial(e.order):void 0,n}};l.set(uh.$type,uh);function JE(){return{acknowledged:void 0,rejectionReason:void 0}}var lh={$type:"devvit.actor.payments.v1alpha.FulfillOrderResponse",encode(e,n=ir.default.Writer.create()){return e.acknowledged!==void 0&&n.uint32(8).bool(e.acknowledged),e.rejectionReason!==void 0&&n.uint32(18).string(e.rejectionReason),n},decode(e,n){let i=e instanceof ir.default.Reader?e:ir.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=JE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==8)break;r.acknowledged=i.bool();continue;case 2:if(t!==18)break;r.rejectionReason=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{acknowledged:t6(e.acknowledged)?globalThis.Boolean(e.acknowledged):void 0,rejectionReason:t6(e.rejectionReason)?globalThis.String(e.rejectionReason):void 0}},toJSON(e){let n={};return e.acknowledged!==void 0&&(n.acknowledged=e.acknowledged),e.rejectionReason!==void 0&&(n.rejectionReason=e.rejectionReason),n},create(e){return lh.fromPartial(e??{})},fromPartial(e){let n=JE();return n.acknowledged=e.acknowledged??void 0,n.rejectionReason=e.rejectionReason??void 0,n}};l.set(lh.$type,lh);function HE(){return{}}var sh={$type:"devvit.actor.payments.v1alpha.RefundOrderResponse",encode(e,n=ir.default.Writer.create()){return n},decode(e,n){let i=e instanceof ir.default.Reader?e:ir.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=HE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{}},toJSON(e){return{}},create(e){return sh.fromPartial(e??{})},fromPartial(e){return HE()}};l.set(sh.$type,sh);function t6(e){return e!=null}var en=B(F(),1);function qE(){return{skus:[],metadata:{}}}var fh={$type:"devvit.plugin.payments.v1alpha.GetProductsRequest",encode(e,n=en.default.Writer.create()){for(let i of e.skus)n.uint32(10).string(i);return Object.entries(e.metadata).forEach(([i,d])=>{A3.encode({key:i,value:d},n.uint32(18).fork()).ldelim()}),n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=qE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.skus.push(i.string());continue;case 2:if(t!==18)break;let s=A3.decode(i,i.uint32());s.value!==void 0&&(r.metadata[s.key]=s.value);continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{skus:globalThis.Array.isArray(e?.skus)?e.skus.map(n=>globalThis.String(n)):[],metadata:eO(e.metadata)?Object.entries(e.metadata).reduce((n,[i,d])=>(n[i]=String(d),n),{}):{}}},toJSON(e){let n={};if(e.skus?.length&&(n.skus=e.skus),e.metadata){let i=Object.entries(e.metadata);i.length>0&&(n.metadata={},i.forEach(([d,r])=>{n.metadata[d]=r}))}return n},create(e){return fh.fromPartial(e??{})},fromPartial(e){let n=qE();return n.skus=e.skus?.map(i=>i)||[],n.metadata=Object.entries(e.metadata??{}).reduce((i,[d,r])=>(r!==void 0&&(i[d]=globalThis.String(r)),i),{}),n}};l.set(fh.$type,fh);function DE(){return{key:"",value:""}}var A3={$type:"devvit.plugin.payments.v1alpha.GetProductsRequest.MetadataEntry",encode(e,n=en.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==""&&n.uint32(18).string(e.value),n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=DE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.key=i.string();continue;case 2:if(t!==18)break;r.value=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{key:Ei(e.key)?globalThis.String(e.key):"",value:Ei(e.value)?globalThis.String(e.value):""}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==""&&(n.value=e.value),n},create(e){return A3.fromPartial(e??{})},fromPartial(e){let n=DE();return n.key=e.key??"",n.value=e.value??"",n}};l.set(A3.$type,A3);function $E(){return{products:[]}}var ch={$type:"devvit.plugin.payments.v1alpha.GetProductsResponse",encode(e,n=en.default.Writer.create()){for(let i of e.products)ot.encode(i,n.uint32(10).fork()).ldelim();return n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=$E();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.products.push(ot.decode(i,i.uint32()));continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{products:globalThis.Array.isArray(e?.products)?e.products.map(n=>ot.fromJSON(n)):[]}},toJSON(e){let n={};return e.products?.length&&(n.products=e.products.map(i=>ot.toJSON(i))),n},create(e){return ch.fromPartial(e??{})},fromPartial(e){let n=$E();return n.products=e.products?.map(i=>ot.fromPartial(i))||[],n}};l.set(ch.$type,ch);function WE(){return{start:void 0,end:void 0,limit:0,sku:"",buyer:"",status:0,metadata:{},cursor:""}}var ph={$type:"devvit.plugin.payments.v1alpha.GetOrdersRequest",encode(e,n=en.default.Writer.create()){return e.start!==void 0&&re.encode(QE(e.start),n.uint32(10).fork()).ldelim(),e.end!==void 0&&re.encode(QE(e.end),n.uint32(18).fork()).ldelim(),e.limit!==0&&n.uint32(24).int32(e.limit),e.sku!==""&&n.uint32(34).string(e.sku),e.buyer!==""&&n.uint32(42).string(e.buyer),e.status!==0&&n.uint32(48).int32(e.status),Object.entries(e.metadata).forEach(([i,d])=>{C3.encode({key:i,value:d},n.uint32(58).fork()).ldelim()}),e.cursor!==""&&n.uint32(66).string(e.cursor),n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=WE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.start=kh(re.decode(i,i.uint32()));continue;case 2:if(t!==18)break;r.end=kh(re.decode(i,i.uint32()));continue;case 3:if(t!==24)break;r.limit=i.int32();continue;case 4:if(t!==34)break;r.sku=i.string();continue;case 5:if(t!==42)break;r.buyer=i.string();continue;case 6:if(t!==48)break;r.status=i.int32();continue;case 7:if(t!==58)break;let s=C3.decode(i,i.uint32());s.value!==void 0&&(r.metadata[s.key]=s.value);continue;case 8:if(t!==66)break;r.cursor=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{start:Ei(e.start)?jE(e.start):void 0,end:Ei(e.end)?jE(e.end):void 0,limit:Ei(e.limit)?globalThis.Number(e.limit):0,sku:Ei(e.sku)?globalThis.String(e.sku):"",buyer:Ei(e.buyer)?globalThis.String(e.buyer):"",status:Ei(e.status)?dh(e.status):0,metadata:eO(e.metadata)?Object.entries(e.metadata).reduce((n,[i,d])=>(n[i]=String(d),n),{}):{},cursor:Ei(e.cursor)?globalThis.String(e.cursor):""}},toJSON(e){let n={};if(e.start!==void 0&&(n.start=e.start.toISOString()),e.end!==void 0&&(n.end=e.end.toISOString()),e.limit!==0&&(n.limit=Math.round(e.limit)),e.sku!==""&&(n.sku=e.sku),e.buyer!==""&&(n.buyer=e.buyer),e.status!==0&&(n.status=oh(e.status)),e.metadata){let i=Object.entries(e.metadata);i.length>0&&(n.metadata={},i.forEach(([d,r])=>{n.metadata[d]=r}))}return e.cursor!==""&&(n.cursor=e.cursor),n},create(e){return ph.fromPartial(e??{})},fromPartial(e){let n=WE();return n.start=e.start??void 0,n.end=e.end??void 0,n.limit=e.limit??0,n.sku=e.sku??"",n.buyer=e.buyer??"",n.status=e.status??0,n.metadata=Object.entries(e.metadata??{}).reduce((i,[d,r])=>(r!==void 0&&(i[d]=globalThis.String(r)),i),{}),n.cursor=e.cursor??"",n}};l.set(ph.$type,ph);function GE(){return{key:"",value:""}}var C3={$type:"devvit.plugin.payments.v1alpha.GetOrdersRequest.MetadataEntry",encode(e,n=en.default.Writer.create()){return e.key!==""&&n.uint32(10).string(e.key),e.value!==""&&n.uint32(18).string(e.value),n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=GE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.key=i.string();continue;case 2:if(t!==18)break;r.value=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{key:Ei(e.key)?globalThis.String(e.key):"",value:Ei(e.value)?globalThis.String(e.value):""}},toJSON(e){let n={};return e.key!==""&&(n.key=e.key),e.value!==""&&(n.value=e.value),n},create(e){return C3.fromPartial(e??{})},fromPartial(e){let n=GE();return n.key=e.key??"",n.value=e.value??"",n}};l.set(C3.$type,C3);function zE(){return{hasNextPage:!1,endCursor:"",hasPreviousPage:!1,startCursor:""}}var Nu={$type:"devvit.plugin.payments.v1alpha.PageInfo",encode(e,n=en.default.Writer.create()){return e.hasNextPage!==!1&&n.uint32(8).bool(e.hasNextPage),e.endCursor!==""&&n.uint32(18).string(e.endCursor),e.hasPreviousPage!==!1&&n.uint32(24).bool(e.hasPreviousPage),e.startCursor!==""&&n.uint32(34).string(e.startCursor),n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=zE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==8)break;r.hasNextPage=i.bool();continue;case 2:if(t!==18)break;r.endCursor=i.string();continue;case 3:if(t!==24)break;r.hasPreviousPage=i.bool();continue;case 4:if(t!==34)break;r.startCursor=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{hasNextPage:Ei(e.hasNextPage)?globalThis.Boolean(e.hasNextPage):!1,endCursor:Ei(e.endCursor)?globalThis.String(e.endCursor):"",hasPreviousPage:Ei(e.hasPreviousPage)?globalThis.Boolean(e.hasPreviousPage):!1,startCursor:Ei(e.startCursor)?globalThis.String(e.startCursor):""}},toJSON(e){let n={};return e.hasNextPage!==!1&&(n.hasNextPage=e.hasNextPage),e.endCursor!==""&&(n.endCursor=e.endCursor),e.hasPreviousPage!==!1&&(n.hasPreviousPage=e.hasPreviousPage),e.startCursor!==""&&(n.startCursor=e.startCursor),n},create(e){return Nu.fromPartial(e??{})},fromPartial(e){let n=zE();return n.hasNextPage=e.hasNextPage??!1,n.endCursor=e.endCursor??"",n.hasPreviousPage=e.hasPreviousPage??!1,n.startCursor=e.startCursor??"",n}};l.set(Nu.$type,Nu);function KE(){return{orders:[],pageInfo:void 0}}var hh={$type:"devvit.plugin.payments.v1alpha.GetOrdersResponse",encode(e,n=en.default.Writer.create()){for(let i of e.orders)Qn.encode(i,n.uint32(10).fork()).ldelim();return e.pageInfo!==void 0&&Nu.encode(e.pageInfo,n.uint32(18).fork()).ldelim(),n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=KE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.orders.push(Qn.decode(i,i.uint32()));continue;case 2:if(t!==18)break;r.pageInfo=Nu.decode(i,i.uint32());continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{orders:globalThis.Array.isArray(e?.orders)?e.orders.map(n=>Qn.fromJSON(n)):[],pageInfo:Ei(e.pageInfo)?Nu.fromJSON(e.pageInfo):void 0}},toJSON(e){let n={};return e.orders?.length&&(n.orders=e.orders.map(i=>Qn.toJSON(i))),e.pageInfo!==void 0&&(n.pageInfo=Nu.toJSON(e.pageInfo)),n},create(e){return hh.fromPartial(e??{})},fromPartial(e){let n=KE();return n.orders=e.orders?.map(i=>Qn.fromPartial(i))||[],n.pageInfo=e.pageInfo!==void 0&&e.pageInfo!==null?Nu.fromPartial(e.pageInfo):void 0,n}};l.set(hh.$type,hh);function XE(){return{orderId:""}}var vh={$type:"devvit.plugin.payments.v1alpha.AcknowledgeOrderDeliveryRequest",encode(e,n=en.default.Writer.create()){return e.orderId!==""&&n.uint32(10).string(e.orderId),n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=XE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.orderId=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{orderId:Ei(e.orderId)?globalThis.String(e.orderId):""}},toJSON(e){let n={};return e.orderId!==""&&(n.orderId=e.orderId),n},create(e){return vh.fromPartial(e??{})},fromPartial(e){let n=XE();return n.orderId=e.orderId??"",n}};l.set(vh.$type,vh);function YE(){return{}}var mh={$type:"devvit.plugin.payments.v1alpha.AcknowledgeOrderDeliveryResponse",encode(e,n=en.default.Writer.create()){return n},decode(e,n){let i=e instanceof en.default.Reader?e:en.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=YE();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{}},toJSON(e){return{}},create(e){return mh.fromPartial(e??{})},fromPartial(e){return YE()}};l.set(mh.$type,mh);function QE(e){let n=Math.trunc(e.getTime()/1e3),i=e.getTime()%1e3*1e6;return{seconds:n,nanos:i}}function kh(e){let n=(e.seconds||0)*1e3;return n+=(e.nanos||0)/1e6,new globalThis.Date(n)}function jE(e){return e instanceof globalThis.Date?e:typeof e=="string"?new globalThis.Date(e):kh(re.fromJSON(e))}function eO(e){return typeof e=="object"&&e!==null}function Ei(e){return e!=null}var LF=e=>{switch(e){case En.ALL:return oi.ALL;case En.REMOTE:return oi.REMOTE;case En.LOCAL:return oi.LOCAL;case En.UNRECOGNIZED:return oi.ALL;default:throw new Error(`Unknown UIEventScope: ${e}`)}},rd=class{constructor(n){this.scope=n.scope?LF(n.scope):oi.ALL,this.async=n.async,this.hook=n.hook,this.retry=n.retry,this.uiEvent=n}},r6=class{constructor(n){this.uiRequest=n,this.events=n.events.map(i=>new rd(i)),n.state&&(this.state=n.state)}},g3=class{constructor(n){this.uiResponse=n,this.replay=n.events.map(i=>new rd(i)),n.state&&(this.state=n.state)}};function nO(){var r,t;let e=new URL(globalThis.location?location.href:"file://");if(globalThis.devvit??(globalThis.devvit={}),globalThis.devvit.debug)return;(r=globalThis.devvit).debug??(r.debug={});let n={blocks:void 0,emitSnapshots:void 0,emitState:void 0,realtime:void 0,runtime:void 0,surface:void 0,useAsync:void 0,payments:void 0,bootstrap:void 0,webView:void 0},i={};for(let s in n)i[s.toLowerCase()]=s;let d=[...e.searchParams].find(([s])=>s.toLowerCase()==="devvitdebug")?.[1];if(d!=null){d===""&&(d=Object.keys(n).filter(s=>s!=="emitSnapshots"&&s!=="emitState").join());for(let s of d.split(",")??[]){let[f,p]=s.split("=");f&&(f.toLowerCase()in i?f=i[f.toLowerCase()]:console.warn(`[devvit] unknown devvitdebug parameter "${f}"`),(t=globalThis.devvit.debug)[f]??(t[f]=p||"true"),console.info(`[devvit] set devvitdebug ${f}=${globalThis.devvit.debug[f]}`))}}}var dd;(function(e){e.ENABLE_APP_LOGGING="enableAppLogging",e.ENABLE_DEBUG_LOGGING="enableDebugLogging",e.ENABLE_PLUGINS="enablePlugins",e.LOAD_BUNDLE="loadBundle",e.CALL="call",e.PLUGIN_RESPONSE="pluginResponse",e.QUIT="quit"})(dd||(dd={}));var xr;(function(e){e.READY="ready",e.PLUGINS_CONFIGURED="pluginsConfigured",e.BUNDLE_LOADED="bundleLoaded",e.BUNDLE_LOAD_FAILED="bundleLoadFailed",e.RETURN="return",e.ERROR="error",e.CIRCUIT_BREAKER="circuitBreaker",e.PLUGIN_CALL="pluginCall",e.UNHANDLED_REJECTION="unhandledRejection"})(xr||(xr={}));function yh(e){return e.hostname.split(".")[1]??e.hostname}function iO(e){return`${yh(e)}@${e.actor?.version} by ${e.actor?.owner}`}var Wi=B(F(),1);function tO(){return{callState:void 0,connect:void 0}}var Sh={$type:"devvit.cli.PlaytestProviderMessage",encode(e,n=Wi.default.Writer.create()){return e.callState!==void 0&&Iu.encode(e.callState,n.uint32(10).fork()).ldelim(),e.connect!==void 0&&Eu.encode(e.connect,n.uint32(18).fork()).ldelim(),n},decode(e,n){let i=e instanceof Wi.default.Reader?e:Wi.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=tO();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.callState=Iu.decode(i,i.uint32());continue;case 2:if(t!==18)break;r.connect=Eu.decode(i,i.uint32());continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{callState:d6(e.callState)?Iu.fromJSON(e.callState):void 0,connect:d6(e.connect)?Eu.fromJSON(e.connect):void 0}},toJSON(e){let n={};return e.callState!==void 0&&(n.callState=Iu.toJSON(e.callState)),e.connect!==void 0&&(n.connect=Eu.toJSON(e.connect)),n},create(e){return Sh.fromPartial(e??{})},fromPartial(e){let n=tO();return n.callState=e.callState!==void 0&&e.callState!==null?Iu.fromPartial(e.callState):void 0,n.connect=e.connect!==void 0&&e.connect!==null?Eu.fromPartial(e.connect):void 0,n}};l.set(Sh.$type,Sh);function rO(){return{appInstalled:void 0}}var b3={$type:"devvit.cli.PlaytestSubscriberMessage",encode(e,n=Wi.default.Writer.create()){return e.appInstalled!==void 0&&xu.encode(e.appInstalled,n.uint32(10).fork()).ldelim(),n},decode(e,n){let i=e instanceof Wi.default.Reader?e:Wi.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=rO();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.appInstalled=xu.decode(i,i.uint32());continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{appInstalled:d6(e.appInstalled)?xu.fromJSON(e.appInstalled):void 0}},toJSON(e){let n={};return e.appInstalled!==void 0&&(n.appInstalled=xu.toJSON(e.appInstalled)),n},create(e){return b3.fromPartial(e??{})},fromPartial(e){let n=rO();return n.appInstalled=e.appInstalled!==void 0&&e.appInstalled!==null?xu.fromPartial(e.appInstalled):void 0,n}};l.set(b3.$type,b3);function dO(){return{}}var xu={$type:"devvit.cli.PlaytestAppInstalled",encode(e,n=Wi.default.Writer.create()){return n},decode(e,n){let i=e instanceof Wi.default.Reader?e:Wi.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=dO();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{}},toJSON(e){return{}},create(e){return xu.fromPartial(e??{})},fromPartial(e){return dO()}};l.set(xu.$type,xu);function oO(){return{logs:[]}}var Iu={$type:"devvit.cli.PlaytestCallState",encode(e,n=Wi.default.Writer.create()){for(let i of e.logs)mt.encode(i,n.uint32(10).fork()).ldelim();return n},decode(e,n){let i=e instanceof Wi.default.Reader?e:Wi.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=oO();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.logs.push(mt.decode(i,i.uint32()));continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{logs:globalThis.Array.isArray(e?.logs)?e.logs.map(n=>mt.fromJSON(n)):[]}},toJSON(e){let n={};return e.logs?.length&&(n.logs=e.logs.map(i=>mt.toJSON(i))),n},create(e){return Iu.fromPartial(e??{})},fromPartial(e){let n=oO();return n.logs=e.logs?.map(i=>mt.fromPartial(i))||[],n}};l.set(Iu.$type,Iu);function aO(){return{url:""}}var Eu={$type:"devvit.cli.PlaytestConnect",encode(e,n=Wi.default.Writer.create()){return e.url!==""&&n.uint32(10).string(e.url),n},decode(e,n){let i=e instanceof Wi.default.Reader?e:Wi.default.Reader.create(e),d=n===void 0?i.len:i.pos+n,r=aO();for(;i.pos<d;){let t=i.uint32();switch(t>>>3){case 1:if(t!==10)break;r.url=i.string();continue}if((t&7)===4||t===0)break;i.skipType(t&7)}return r},fromJSON(e){return{url:d6(e.url)?globalThis.String(e.url):""}},toJSON(e){let n={};return e.url!==""&&(n.url=e.url),n},create(e){return Eu.fromPartial(e??{})},fromPartial(e){let n=aO();return n.url=e.url??"",n}};l.set(Eu.$type,Eu);function d6(e){return e!=null}var wh="playtest",uO="ws://localhost:5678";function lO(e){let n=Ah();return n===""||n===e}function Ah(){return globalThis.location?new URL(location.href).searchParams.get(wh)??void 0:void 0}var Jn=function(e,n,i,d){if(i==="a"&&!d)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?e!==n||!d:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?d:i==="a"?d.call(e):d?d.value:n.get(e)},T3=function(e,n,i,d,r){if(d==="m")throw new TypeError("Private method is not writable");if(d==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?e!==n||!r:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return d==="a"?r.call(e,i):r?r.value=i:n.set(e,i),i},R3,Vn,Ch,sO,gh,bh,Th,Rh,FF=15e3,o6=class{constructor(){R3.add(this),Vn.set(this,{type:"Init"}),gh.set(this,()=>{Jn(this,Vn,"f").type==="Opened"&&this.onState?.("Closed"),T3(this,Vn,Jn(this,R3,"m",sO).call(this),"f")}),bh.set(this,n=>{let i=b3.fromJSON(JSON.parse(n.data));switch(!0){case i.appInstalled!=null:this.onState?.("Reloading");break}}),Th.set(this,()=>{if(Jn(this,Vn,"f").type!=="Opening")throw Error(`invalid transition from ${Jn(this,Vn,"f").type}`);this.onState?.("Opened"),T3(this,Vn,{sock:Jn(this,Vn,"f").sock,type:"Opened"},"f"),this.send({connect:{url:location.href}})}),Rh.set(this,()=>{T3(this,Vn,Jn(this,R3,"m",Ch).call(this),"f")})}close(){"timer"in Jn(this,Vn,"f")&&clearTimeout(Jn(this,Vn,"f").timer),"sock"in Jn(this,Vn,"f")&&(Jn(this,Vn,"f").sock.onopen=null,Jn(this,Vn,"f").sock.onmessage=null,Jn(this,Vn,"f").sock.onclose=null,Jn(this,Vn,"f").sock.close()),T3(this,Vn,{type:"Init"},"f")}open(){Jn(this,Vn,"f").type==="Init"&&T3(this,Vn,Jn(this,R3,"m",Ch).call(this),"f")}send(n){"sock"in Jn(this,Vn,"f")?Jn(this,Vn,"f").sock.send(JSON.stringify(n)):console.warn("devvit playtest message dropped",n)}};Vn=new WeakMap,gh=new WeakMap,bh=new WeakMap,Th=new WeakMap,Rh=new WeakMap,R3=new WeakSet,Ch=function(){let n=new WebSocket(uO);return n.onclose=Jn(this,gh,"f"),n.onmessage=Jn(this,bh,"f"),n.onopen=Jn(this,Th,"f"),{sock:n,type:"Opening"}},sO=function(){return{timer:setTimeout(Jn(this,Rh,"f"),FF),type:"Retrying"}};var ai=function(e,n,i,d,r){if(d==="m")throw new TypeError("Private method is not writable");if(d==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?e!==n||!r:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return d==="a"?r.call(e,i):r?r.value=i:n.set(e,i),i},pe=function(e,n,i,d){if(i==="a"&&!d)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?e!==n||!d:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?d:i==="a"?d.call(e):d?d.value:n.get(e)},Ud,a6,ui,es,u6,x3,od,Do,ns,ts,$o,Nh,N3,l6,xh,fO,is,Ih,Eh,UF={debug:Nn.DEBUG,error:Nn.ERROR,info:Nn.INFO,log:Nn.DEBUG,trace:Nn.DEBUG,warn:Nn.WARN},s6=class{constructor(n,i,d){Ud.add(this),a6.set(this,void 0),ui.set(this,void 0),es.set(this,!1),u6.set(this,0),x3.set(this,void 0),od.set(this,{}),Do.set(this,void 0),ns.set(this,()=>{}),ts.set(this,void 0),$o.set(this,void 0),Nh.set(this,Ah()),N3.set(this,!1),l6.set(this,void 0),xh.set(this,r=>{let t=r.data,[s]=t;switch(s){case xr.READY:{let[,f]=t;ai(this,l6,f,"f"),pe(this,ts,"f")?.plugins?pe(this,Ud,"m",fO).call(this):pe(this,Ud,"m",Ih).call(this);break}case xr.PLUGINS_CONFIGURED:pe(this,Ud,"m",Ih).call(this);break;case xr.BUNDLE_LOADED:{let[,f,p]=t;pe(this,Ud,"m",is).call(this,f),ai(this,es,!0,"f"),pe(this,Do,"f")?.resolve({metrics:{init:pe(this,l6,"f"),loadBundle:p}}),ai(this,Do,void 0,"f");break}case xr.BUNDLE_LOAD_FAILED:{let[,,f,p]=t;pe(this,Ud,"m",is).call(this,p),pe(this,Do,"f")?.reject(f),ai(this,Do,void 0,"f");break}case xr.RETURN:{let[,f,p,v]=t;pe(this,Ud,"m",is).call(this,v),pe(this,od,"f")[f]?.resolve(p),delete pe(this,od,"f")[f];break}case xr.ERROR:{let[,f,p,v]=t;pe(this,Ud,"m",is).call(this,v),pe(this,od,"f")[f]?.reject(p),delete pe(this,od,"f")[f];break}case xr.CIRCUIT_BREAKER:{let[,f,p,v]=t;pe(this,od,"f")[f]?.reject(new C4(p,v)),delete pe(this,od,"f")[f];break}case xr.PLUGIN_CALL:{let[,f,p,v,w,b]=t;pe(this,ts,"f")?.callback(f,p,v,w,b);break}case xr.UNHANDLED_REJECTION:{let[,,f,p]=t;pe(this,Ud,"m",is).call(this,p),pe(this,ns,"f").call(this,"UnhandledRejection",f);break}}}),Eh.set(this,r=>{switch(r){case"Opened":console.info("devvit playtest connected");break;case"Closed":console.info("devvit playtest disconnected");break;case"Reloading":{console.info("devvit playtest reloading"),pe(this,$o,"f")?.close();let t=new URL(location.href);t.searchParams.set(wh,pe(this,Nh,"f")??""),location.assign(t),location.reload();break}}}),ai(this,a6,n,"f"),i&&ai(this,ns,i,"f"),d&&ai(this,ts,d,"f")}get ready(){return pe(this,es,"f")}get runtimeDebugLogging(){return pe(this,N3,"f")}set runtimeDebugLogging(n){n!==pe(this,N3,"f")&&(ai(this,N3,n,"f"),this.runtimeDebugLogging&&pe(this,ui,"f")?.postMessage([dd.ENABLE_DEBUG_LOGGING]))}async loadBundle(n){if(pe(this,ui,"f"))throw new Error("Bundle already loaded");let i=lO(yh(n));i&&(ai(this,$o,new o6,"f"),pe(this,$o,"f").onState=pe(this,Eh,"f")),pe(this,$o,"f")?.open();let d=new Worker(URL.createObjectURL(pe(this,a6,"f")),{name:`App: ${iO(n)}`,type:"module"});return d.onerror=r=>pe(this,ns,"f").call(this,"Error",r.error),d.onmessageerror=r=>pe(this,ns,"f").call(this,"MessageError",r.data),d.onmessage=pe(this,xh,"f"),ai(this,ui,d,"f"),ai(this,x3,n,"f"),this.runtimeDebugLogging&&pe(this,ui,"f").postMessage([dd.ENABLE_DEBUG_LOGGING]),i&&pe(this,ui,"f").postMessage([dd.ENABLE_APP_LOGGING]),new Promise((r,t)=>{ai(this,Do,{resolve:r,reject:t},"f")})}async call(n,i,d){var r;if(!pe(this,es,"f")||!pe(this,ui,"f"))throw new Error("No bundle loaded");let t=ai(this,u6,(r=pe(this,u6,"f"),++r),"f"),s=new Promise((f,p)=>{pe(this,od,"f")[t]={resolve:f,reject:p}});return pe(this,ui,"f").postMessage([dd.CALL,t,n,i,d,!1]),s}onPluginResponse(n,i){pe(this,ui,"f")?.postMessage([dd.PLUGIN_RESPONSE,n,i])}quit(){pe(this,$o,"f")?.close(),ai(this,$o,void 0,"f"),ai(this,es,!1,"f"),pe(this,ui,"f")&&(pe(this,ui,"f").postMessage([dd.QUIT]),pe(this,ui,"f").onerror=null,pe(this,ui,"f").onmessageerror=null,pe(this,ui,"f").onmessage=null,pe(this,ui,"f").terminate()),ai(this,ui,void 0,"f");for(let{reject:n}of Object.values(pe(this,od,"f")))n(Error("worker terminated"));ai(this,od,{},"f"),pe(this,Do,"f")?.reject(Error("worker terminated")),ai(this,Do,void 0,"f")}};a6=new WeakMap,ui=new WeakMap,es=new WeakMap,u6=new WeakMap,x3=new WeakMap,od=new WeakMap,Do=new WeakMap,ns=new WeakMap,ts=new WeakMap,$o=new WeakMap,Nh=new WeakMap,N3=new WeakMap,l6=new WeakMap,xh=new WeakMap,Eh=new WeakMap,Ud=new WeakSet,fO=function(){pe(this,ui,"f")?.postMessage([dd.ENABLE_PLUGINS,pe(this,ts,"f")?.plugins??[]])},is=function(n){if(!n.length)return;let i=new Date,d={logs:n.map(r=>({severity:UF[r.method],message:r.args.join(" "),tags:[],timestamp:i}))};pe(this,$o,"f")?.send({callState:d})},Ih=function(){pe(this,ui,"f")?.postMessage([dd.LOAD_BUNDLE,pe(this,x3,"f")]),ai(this,x3,void 0,"f")};var Oh="RenderPostContent",ZF=new Set([Oh]);function cO(e){if(ZF.has(e.split("/").at(-1)))return e;throw Error(`Unsupported RPC ${e}`)}var rs,I3,f6=class{constructor(n){Se(this,rs);Se(this,I3);Oe(this,rs,n)}set env(n){Oe(this,rs,n)}set props(n){Oe(this,I3,n)}build(n,i){return new r6({state:n,events:i.map(d=>d.uiEvent),env:I(this,rs),props:I(this,I3)})}};rs=new WeakMap,I3=new WeakMap;var gt,E3,h6,c6=class{constructor(){Se(this,gt);Se(this,E3,!1);Se(this,h6,(n,i,d,r,t)=>{this.onPluginCall?.(n,i,d,r,t),i===ju.fullName&&d===ju.methods.send.name&&I(this,gt)?.onPluginResponse(n,{error:void 0,success:!0,value:{}})})}isReady(){return!!I(this,gt)?.ready}set runtimeDebugLogging(n){Oe(this,E3,n),I(this,gt)&&(I(this,gt).runtimeDebugLogging=n)}setLocalSrc(n){this.unload(),Oe(this,gt,n?new s6(n,(i,d)=>console.error(i,d),{callback:I(this,h6),plugins:[]}):void 0),I(this,gt)&&(I(this,gt).runtimeDebugLogging=I(this,E3))}unload(){I(this,gt)?.quit()}async load(n){this.unload();try{return await I(this,gt)?.loadBundle(n)}catch(i){console.error(i)}}handle(n,i,d,r){if(!this.isReady()||!I(this,gt))throw new Error("local runtime handle called before isReady");devvit?.debug.runtime&&console.debug("[runtime] Local request",i,this.metadata),I(this,gt)?.call(cO(n),i.uiRequest,this.metadata).then(t=>d(new g3(t))).catch(t=>r(t))}pause(){}reset(){}resume(){}snapshot(){return{}}};gt=new WeakMap,E3=new WeakMap,h6=new WeakMap;var p6=class{isReady(){return!!this.remote}load(n){this.remote=n}handle(n,i,d,r){if(!this.isReady()||!this.remote)throw new Error("remote runtime called remote before isReady()");this.remote[cO(n)](i.uiRequest,this.metadata).then(t=>d(new g3(t))).catch(r)}pause(){}reset(){}resume(){}snapshot(){return{}}};var Wo,Go,O3,v6=class{constructor(n){Se(this,Wo,new Map);Se(this,Go,new Map);Se(this,O3);devvit?.debug.runtime&&console.debug("[runtime] timers: constructor"),Oe(this,O3,n)}add(n){devvit?.debug.runtime&&console.debug("[runtime] timers: add",n),I(this,Go).set(n.id,n),I(this,Wo).set(n.id,window.setInterval(()=>{I(this,O3).submit([new rd({scope:En.ALL,timer:{},hook:n.id})])},n.duration))}apply(n){devvit?.debug.runtime&&console.debug("[runtime] timers: apply",n);let i=new Map(I(this,Go));n.forEach(d=>{i.delete(d.id),I(this,Go).has(d.id)||(devvit?.debug.runtime&&console.debug("[runtime] timers: apply - adding definition",d),this.add(d))}),devvit?.debug.runtime&&console.debug("[runtime] timers: apply - removing the following definitions",i);for(let[d]of i)this.remove(d)}clear(){devvit?.debug.runtime&&console.debug("[runtime] timers: clear");for(let n of I(this,Wo).values())clearInterval(n);I(this,Wo).clear(),I(this,Go).clear()}list(){return devvit?.debug.runtime&&console.debug("[runtime] timers: list"),[...I(this,Go).values()]}pauseAll(){devvit?.debug.runtime&&console.debug("[runtime] timers: pauseAll");for(let n of I(this,Wo).values())clearInterval(n);return this.list()}remove(n){devvit?.debug.runtime&&console.debug("[runtime] timers: remove"),I(this,Go).delete(n),clearInterval(I(this,Wo).get(n)),I(this,Wo).delete(n)}resumeAll(n){devvit?.debug.runtime&&console.debug("[runtime] timers: resumeAll"),this.apply(n)}};Wo=new WeakMap,Go=new WeakMap,O3=new WeakMap;var pO=e=>e.message==="ServerCallRequired",Ph=class{debug(n){devvit?.debug.runtime&&console.debug(this.tag(),...n)}error(n){pO(n[0])||console.error(this.tag(),...n)}info(n){console.info(this.tag(),...n)}warn(n){console.warn(this.tag(),...n)}tag(){return"[kmp-dispatcher]"}},P3,M3,Mh=class{constructor(n,i){Se(this,P3);Se(this,M3);this.__doNotUseOrImplementIt={"net.devvit.analytics.PerformanceAnalyticsDelegate":Symbol("net.devvit.analytics.PerformanceAnalyticsDelegate")};Oe(this,P3,n),Oe(this,M3,i)}logRuntimeError(n){var i;pO(n)||(console.error("[kmp-dispatcher-perf-analytics] error",n),(i=I(this,M3))==null||i.call(this,n))}logRuntimeTrace(n){var i;devvit?.debug.runtime&&console.debug("[kmp-dispatcher-perf-analytics]",n),(i=I(this,P3))==null||i.call(this,n)}};P3=new WeakMap,M3=new WeakMap;nO();var VF=({nanos:e,seconds:n})=>{let i=n*1e3,d=e/1e6;return Math.floor(i+d)},JF=["showToast","showForm","navigateToUrl","createOrder"],Il,El,Ir,_3,Ol,ad,ds,m6=class{constructor(n,i,d){Se(this,Il);Se(this,El);Se(this,Ir);Se(this,_3);this.hasRendered=!1;Se(this,Ol);Se(this,ad);Se(this,ds);Oe(this,Il,new f6(i)),d.useSpeculativeExecution&&devvit?.debug.runtime&&console.debug("[webDispatcher] Using speculative execution mode!"),Oe(this,Ir,new j4(n??{},I(this,Il),Oh,{logger:new Ph,featureFlags:{isSpeculativeExecutionEnabled:d.useSpeculativeExecution,isUsingEverythingAssembler:!1,isVerboseLoggingEnabled:!!devvit?.debug.runtime},performanceAnalyticsDelegate:new Mh(d.performanceTracker,d.errorTracker),errorHandler:r=>this.onError?.(r)})),Oe(this,El,new v6(I(this,Ir))),Oe(this,Ol,new p6),Oe(this,ad,new c6),this.init()}get state(){return I(this,Ir).state}set metadata(n){let i={...n},d=[];for(let[r,t]of Object.entries(devvit?.debug??{}))d.push(`${r}=${t}`);d.length&&(i[mu.Debug]={values:d}),I(this,ad).metadata=i,I(this,Ol).metadata=i}set onPluginCall(n){I(this,ad).onPluginCall=n}set runtimeDebugLogging(n){I(this,ad).runtimeDebugLogging=n}subscribe(n){Oe(this,_3,I(this,Ir).subscribe((...i)=>{devvit?.debug.runtime&&console.debug("[runtime] dispatcher got a new event from subscribe",i[0]);let[{response:d}]=i;d.uiResponse.effects.forEach(r=>{if(JF.some(t=>r[t])||r.realtimeSubscriptions){this.onUserAction?.(r);return}if(r.interval){let t=Object.entries(r.interval.intervals);t.length===0&&I(this,El).clear(),I(this,El).apply(t.map(([s,f])=>new dt(s,VF(f.duration))));return}if(r.webView){this.onWebViewMessage?.(r);return}console.warn(`Received an effect that is not implemented! Please add an effect handler to the web dispatcher. Effect: ${JSON.stringify(r,null,2)}`)}),n(...i)}))}submit(...n){I(this,Ir).submit(...n)}unsubscribe(){I(this,_3)?.unsubscribe()}init(){I(this,Ir).init(I(this,ad),I(this,Ol),I(this,El))}togglePause(n){n?Oe(this,ds,I(this,Ir).pause()):I(this,ds)&&I(this,Ir).resume(I(this,ds))}resetAppState(){this.hasRendered=!1,I(this,Ir).reset()}setEnv(n){I(this,Il).env=n}setProps(n){I(this,Il).props=n}remoteLoad(...n){I(this,Ol).load(...n)}async localLoad(...n){return I(this,ad).reset(),await I(this,ad).load(...n)}localLoadWorker(...n){I(this,ad).setLocalSrc(...n)}};Il=new WeakMap,El=new WeakMap,Ir=new WeakMap,_3=new WeakMap,Ol=new WeakMap,ad=new WeakMap,ds=new WeakMap;function hO(e,n,i,d){let r=d.match(/([a-zA-Z0-9-]+)\/(.*)/)??[];if(r.length<3)return"";let[t,s,f]=r;if(!n||!s||!f)return"";let p=n.replace(/^t[0-9]_/,""),v=e.replace("{{location}}",p).replace("{{app}}",s).replace("{{path}}",f);return new URL(v).toString()}var Pl,Ml,_l,os,as,fn,k6,y6,tr,_h,S6,w6,Ou,A6,C6,li=class extends rr{constructor(){super();Se(this,tr);this.runtimeDebugLogging=!1;this.useExperimentalBlocks=!1;this.useSpeculativeExecution=!1;this.webViewUrlTemplate="";this.appPublicApiVersion="";this.disableAssetSandbox=!1;Se(this,Pl);Se(this,Ml);Se(this,_l);Se(this,os,!1);Se(this,as,"");Se(this,fn);Se(this,k6,()=>({experimental:this.useExperimentalBlocks,resolveWebViewUrl:i=>this.disableAssetSandbox?i:hO(this.webViewUrlTemplate,this.metadata?.[mu.Subreddit]?.values?.[0],this.bundle?.actor?.version??"",i),onAction:i=>{let d={};i.type===Bi.ACTION_CLICK||I(this,os)?d.userAction={actionId:i.id,data:i.data??{}}:i.type===Bi.ACTION_WEBVIEW&&(d.webView={postMessage:{message:i.data}}),I(this,fn)?.submit([new rd({scope:En.ALL,hook:i.id,...d})])},stackDirection:Ce.UNRECOGNIZED,disableAssetSandbox:this.disableAssetSandbox}));Se(this,y6,i=>{Tx(i)||console.error(i),nn(this,tr,Ou).call(this,"devvit-ui-error",{err:i,type:"Error"})});Se(this,S6,(i,d,r,t,s)=>{d===ju.fullName&&r===ju.methods.send.name&&nn(this,tr,Ou).call(this,"devvit-realtime-send",{event:t})});Se(this,w6,({response:i})=>{var d,r;this.renderResponse=i,i?.blocks&&(this._rootBlock=i.blocks,I(this,Pl)?((d=this._rootBlock).config??(d.config={}),(r=this._rootBlock.config).rootConfig??(r.rootConfig={children:[],height:0}),this._rootBlock.config.rootConfig.height=I(this,Pl)):Oe(this,Pl,this._rootBlock.config?.rootConfig?.height||i8))});Se(this,A6,i=>{nn(this,tr,Ou).call(this,"devvit-ui-effect",{effect:i,onEvent:d=>I(this,fn)?.submit([new rd(d)]),metadata:this.metadata})});Se(this,C6,async i=>{if(await this.updateComplete,i.webView?.postMessage?.app){let d=[];if(i.webView.postMessage.webViewId){let r=this._blocksRenderer?.findBlockById(i.webView.postMessage.webViewId);r?.blockType!=="web-view"||!r?.element?console.error("Invalid postMessage request: could not find block with ID",i.webView.postMessage.webViewId):d.push(r)}else{let r=this._blocksRenderer?.findBlocksByType("web-view")??[];r.length===0?console.error("Invalid postMessage request: could not find a WebView"):d.push(...r)}for(let r of d)r?.element?.postMessage(i.webView.postMessage.app)}});devvit?.debug.surface&&console.debug("[surface] Using devvit-surface and KMP!")}static get styles(){return[p4]}async connectedCallback(){super.connectedCallback(),Oe(this,fn,new m6({},{colorScheme:this.scheme,dimensions:this.dimensions,locale:this.metadata?.[mu.Language]?.values?.[0],timezone:this.metadata?.[mu.Timezone]?.values?.[0]},{useSpeculativeExecution:this.useSpeculativeExecution,performanceTracker:i=>{nn(this,tr,Ou).call(this,gN,{name:i.spanName,timeStart:i.startTimeMs,timeEnd:i.endTimeMs,target:i.target,intent:i.intent,eventCount:i.eventCount})},errorTracker:i=>{nn(this,tr,Ou).call(this,bN,{message:i.message,origin:i.origin,version:i.version})}})),I(this,fn).onPluginCall=I(this,S6),I(this,fn).onError=I(this,y6),I(this,fn).onUserAction=I(this,A6),I(this,fn).onWebViewMessage=I(this,C6),I(this,fn).subscribe(i=>{I(this,w6).call(this,{request:i.request.uiRequest,response:i.response.uiResponse})}),Oe(this,Ml,new ResizeObserver(Nx(i=>{i.length!==0&&(this.dimensions=Bx(i[0],window,document.body))},600))),I(this,Ml).observe(this,{box:"content-box"}),Oe(this,_l,new IntersectionObserver(i=>{i.forEach(d=>{I(this,fn)?.togglePause(!d.isIntersecting)})})),I(this,_l).observe(this)}disconnectedCallback(){I(this,Ml)?.unobserve(this),I(this,Ml)?.disconnect(),I(this,_l)?.unobserve(this),I(this,_l)?.disconnect(),I(this,fn)?.unsubscribe(),super.disconnectedCallback()}render(){return this.renderResponse?Tt`<div class="relative">
|
|
626
626
|
<devvit-blocks-renderer
|
|
627
627
|
class="${this.scheme??""}"
|
|
628
628
|
.block="${this._rootBlock}"
|