@jolibox/implement 1.1.19 → 1.1.20

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.
@@ -1,4 +1,4 @@
1
- var qw=Object.create;var jn=Object.defineProperty,Uw=Object.defineProperties,Mw=Object.getOwnPropertyDescriptor,jw=Object.getOwnPropertyDescriptors,Fw=Object.getOwnPropertyNames,Mn=Object.getOwnPropertySymbols,Bw=Object.getPrototypeOf,ia=Object.prototype.hasOwnProperty,tu=Object.prototype.propertyIsEnumerable;var eu=(e,t,r)=>t in e?jn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))ia.call(t,r)&&eu(e,r,t[r]);if(Mn)for(var r of Mn(t))tu.call(t,r)&&eu(e,r,t[r]);return e},L=(e,t)=>Uw(e,jw(t));var Ze=(e,t)=>{var r={};for(var n in e)ia.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Mn)for(var n of Mn(e))t.indexOf(n)<0&&tu.call(e,n)&&(r[n]=e[n]);return r};var T=(e,t)=>()=>(e&&(t=e(e=0)),t);var f=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ru=(e,t)=>{for(var r in t)jn(e,r,{get:t[r],enumerable:!0})},$w=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Fw(t))!ia.call(e,i)&&i!==r&&jn(e,i,{get:()=>t[i],enumerable:!(n=Mw(t,i))||n.enumerable});return e};var ce=(e,t,r)=>(r=e!=null?qw(Bw(e)):{},$w(t||!e||!e.__esModule?jn(r,"default",{value:e,enumerable:!0}):r,e));var I=(e,t,r)=>new Promise((n,i)=>{var o=l=>{try{s(r.next(l))}catch(c){i(c)}},a=l=>{try{s(r.throw(l))}catch(c){i(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,a);s((r=r.apply(e,t)).next())});function Ww(e){return!!(e!=null&&e.__nativeBuffers__)}function da(e){if(typeof e=="string")try{e=JSON.parse(e)}catch(r){return{}}if(typeof e!="object"||e===null)return{};if(!Ww(e))return e;let t=e.__nativeBuffers__;if(delete e.__nativeBuffers__,t)for(let r=0;r<t.length;r++){let n=t[r];if(n){let i;n.value?i=n.value:n.base64&&(i=zw(n.base64)),typeof i!="undefined"&&i instanceof ArrayBuffer&&(e[n.key]=i)}}return e}function Qw(e={},t=!1){let r=e,n=[];for(let[i,o]of Object.entries(r))if(o!==void 0&&o instanceof ArrayBuffer&&o.byteLength!==void 0){let a=t?{value:o,key:i}:{base64:Yw(o),key:i};n.push(a),delete r[i]}return n.length>0&&(r.__nativeBuffers__=n),r}function tE(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function hu(e){return typeof e=="string"}function Pr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function nE(e){return typeof e=="undefined"}function iE(e){return nE(e)||e===null}function mu(e){return typeof e=="function"}function oE(e){return Pr(e)&&mu(e.then)}function vu(e){let t=e,r=null,n=function(...i){return r||(r=new t(...i)),r};return n.prototype=t.prototype,n}function Or(e){return(...t)=>{var r,n;((n=(r=globalThis.VConsole)==null?void 0:r[e])!=null?n:globalThis.console[e])(...t)}}function mE(){try{if(window.__joliboxLocalStorage__)return window.__joliboxLocalStorage__;let e=Object.getOwnPropertyDescriptor(window,"localStorage");if(e&&e.get){let n=e.get.call(window);return window.__joliboxLocalStorage__=n,n}if(e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(window),"localStorage"),e&&e.get)return e.get.call(window);let t=Window.prototype,r=Object.getOwnPropertyDescriptor(t,"localStorage");if(r&&r.get){let n=r.get.call(window);return window.__joliboxLocalStorage__=n,n}return localStorage}catch(e){return console.warn("Failed to get original localStorage, fallback to default implementation",e),localStorage}}function bE(e){return new Promise(t=>gu(e)(t))}function gu(e){return(t,r=null)=>{let n=!1;return e(i=>{if(!n)return n=!0,t.call(r,i)},null)}}function wE(e,t){return(r=>{let n,i={onWillAddFirstListener(){n=r(o.fire,o)}},o=new Dr(i);return o.event})((r,n=null)=>e(i=>t(i)&&r.call(n,i),null))}function xE(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++)AE(e[n],t[n])}function AE(e,t){if(hu(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(mu(t)){try{if(e instanceof t)return}catch(r){}if(!iE(e)&&e.constructor===t||t.length===1&&t.call(void 0,e)===!0)return;throw new Error("[Jolibox SDK]argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function au(e,t){return`[${e}]:${t}`}function OE(e,t){su||(sa=new Bn({eventName:"jolibox_invoke",tagNameOrder:["status","method","errNo","errMsg","isForeground"],metricName:"duration",reporter(i){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:i}),-1)}}),la=new Bn({eventName:"jolibox_invoke_js2native",tagNameOrder:["status","method","isForeground"],metricName:"duration",reporter(i){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:i}),-1)}}),ca=new Bn({eventName:"jolibox_invoke_native2js",tagNameOrder:["status","method","isForeground"],metricName:"duration",reporter(i){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:i}),-1)}}),t("onJoliboxEnterBackground",()=>{sa.flush(),la.flush(),ca.flush()}),su=!0);function r(i){var o,a;let{method:s,args:l,startTime:c,isForeground:d,errMsg:u=`${s}:fail no errMsg`,errNo:h=0,__timing:p={receiveJSInvoke:0,invokeCallback:0}}=i,{receiveJSInvoke:m,invokeCallback:g}=p,_=(a=(o=u.match(/\S:(\S+)\s?/))==null?void 0:o[1])!=null?a:"fail";sa.report({status:_,method:n(s,l),errNo:`${h}`,errMsg:u,isForeground:d,duration:Date.now()-c}),c&&m&&g&&(la.report({status:_,method:s,isForeground:d,duration:Number((m-c).toFixed(3))}),ca.report({status:_,method:s,isForeground:d,duration:Number((Date.now()-g).toFixed(3))}))}function n(i,o){return(i==="callHostMethod"||i==="callHostMethodSync")&&o!=null&&o.method?`${i}-${o.method}`:i}return r}function DE(e,t){let r=0,n=!0,i=NE.resolveMap,o=OE(e,t);t("onJoliboxEnterBackground",()=>{n=!1}),t("onJoliboxEnterForeground",()=>{n=!0,ua.forEach(l=>Hn(this,[l],function*({method:c,args:d,resolve:u}){let h=yield s(c,d);u(h)})),ua.length=0});let a=(l,c)=>{let d=i.get(Number(l));if(!d)return;let u=da(c);d(u),i.delete(Number(l))},s=(l,c)=>{var d,u;let h=Date.now(),p=`${n}`;r+=1;let m=new rE;if(i.set(r,m.resolve),!n&&TE.includes(l))return new Promise(R=>{ua.push({method:l,args:c,resolve:R})});let g=Gw(xt({},{method:l,startTime:h,args:c,isForeground:p}),{invokeType:"js-bridge"}),_=!CE&&IE.includes(l),v=Qw(c,_),y=_?v:JSON.stringify(v),x;if(l.endsWith("Sync")||RE.includes(l)?x=(d=e.call)==null?void 0:d.call(e,l,v,r):typeof y=="string"?x=e.invoke(l,y,r):x=(u=e.call)==null?void 0:u.call(e,l,y,r),x){try{typeof x=="string"&&(x=JSON.parse(x)),x=da(x)}catch(R){_a.error(R)}return i.delete(r),x.errorCode&&(x.errorCode=au(l,x.errorCode)),o(xt(xt({},g),x)),x}return l.endsWith("Sync")&&i.delete(r),m.promise.then(R=>(R.errorCode&&(R.errorCode=au(l,R.errorCode)),o(xt(xt({},g),R)),R))};return{invokeNative:s,applyNative:(l,c)=>{let d=s(l,c);return oE(d)?d.then(u=>lu(l,u)):lu(l,d)},invokeHandler:a}}function lu(e,t){if(!Pr(t)){_a.warn(`[Jolibox SDK]${e} no response value`);return}let r=t,{errMsg:n,errNo:i,errorType:o,errorCode:a}=r,s=Kw(r,["errMsg","errNo","errorType","errorCode"]);if(n&&n!==`${e}:ok`)throw new cE(n,i,o,a);return s}function LE(e){if(globalThis[Fn])return globalThis[Fn];let t=new ha,r=new ha,n=new Bn({eventName:"jolibox_publish",tagNameOrder:["type","event"],metricName:"duration",reporter(i){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:i}),-1)}});return t.on("onJoliboxEnterBackground",()=>{n.flush()}),globalThis[Fn]={onNative:t.on.bind(t),offNative:t.off.bind(t),subscribe:r.on.bind(r),unsubscribe:r.off.bind(r),subscribeHandler(i,o,a){let s=da(o),l;if(s.__extra){l=s.params;let{type:c,startTime:d}=s.__extra;n.report({type:c,event:i,duration:Date.now()-d})}else l=s;if(i===_u){l.forEach(c=>{let[d,u]=c;try{r.emit(d.slice(Nr.length),u,a)}catch(h){}});return}if(i.startsWith(Nr)){r.emit(i.slice(Nr.length),l,a);return}t.emit(i,l,a)}},globalThis[Fn]}function qE(e){let t=new Map,r;return(n,i,o,a)=>{if(a){let l=o?[o]:"*";e.publish(`${Nr}${n}`,i,l);return}r||(r=Promise.resolve().then(()=>{t.forEach((l,c)=>{try{let d=c?[c]:"*";e.publish(_u,l,d)}catch(d){}}),r=void 0,t.clear()}));let s=t.get(o);s||(s=[],t.set(o,s)),s.push([`${Nr}${n}`,i])}}function UE(e){let{subscribeHandler:t,onNative:r,offNative:n,subscribe:i,unsubscribe:o}=LE(e),{invokeNative:a,invokeHandler:s,applyNative:l}=DE(e,r),c=qE(e);return{invokeHandler:s,subscribeHandler:t,applyNative:l,invokeNative:a,onNative:r,offNative:n,publish:c,subscribe:i,unsubscribe:o}}function yu(e,t){return{params:e,__extra:{startTime:Date.now(),type:t}}}var Hw,Jw,Vw,$n,uu,du,nu,xt,Gw,Kw,Hn,zw,Yw,fu,Xw,Zw,pu,eE,rE,aE,sE,Jn,lE,cE,uE,oa,_a,iu,dE,fE,pE,hE,vE,sU,fa,G,gE,_E,Cr,Dr,ha,ma,yE,aa,EE,lU,va,ou,cU,SE,Nr,IE,TE,RE,_u,kE,Bn,su,sa,la,ca,ua,CE,ga,PE,NE,Fn,ya,Je,bu,wu,ME,Eu,cu,Oe,q,Ve,uU,jE,xu,dU,fU,Se=T(()=>{"use strict";Hw=Object.defineProperty,Jw=Object.defineProperties,Vw=Object.getOwnPropertyDescriptors,$n=Object.getOwnPropertySymbols,uu=Object.prototype.hasOwnProperty,du=Object.prototype.propertyIsEnumerable,nu=(e,t,r)=>t in e?Hw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t)=>{for(var r in t||(t={}))uu.call(t,r)&&nu(e,r,t[r]);if($n)for(var r of $n(t))du.call(t,r)&&nu(e,r,t[r]);return e},Gw=(e,t)=>Jw(e,Vw(t)),Kw=(e,t)=>{var r={};for(var n in e)uu.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$n)for(var n of $n(e))t.indexOf(n)<0&&du.call(e,n)&&(r[n]=e[n]);return r},Hn=(e,t,r)=>new Promise((n,i)=>{var o=l=>{try{s(r.next(l))}catch(c){i(c)}},a=l=>{try{s(r.throw(l))}catch(c){i(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,a);s((r=r.apply(e,t)).next())});zw=e=>{let t=atob(e),r=t.length,n=new Uint8Array(r);for(let i=0;i<r;i++)n[i]=t.charCodeAt(i);return n.buffer};Yw=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let i=0;i<n;i++)t+=String.fromCharCode(r[i]);return btoa(t)};fu=Object.defineProperty,Xw=Object.getOwnPropertyDescriptor,Zw=(e,t)=>{for(var r in t)fu(e,r,{get:t[r],enumerable:!0})},pu=(e,t,r,n)=>{for(var i=n>1?void 0:n?Xw(t,r):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(n?a(t,r,i):a(i))||i);return n&&i&&fu(t,r,i),i},eE=(e,t,r)=>new Promise((n,i)=>{var o=l=>{try{s(r.next(l))}catch(c){i(c)}},a=l=>{try{s(r.throw(l))}catch(c){i(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,a);s((r=r.apply(e,t)).next())});if(typeof window!="undefined"&&!window.AbortController){let e=function(){this.signal=new t};e.prototype.abort=function(){this.signal._aborted=!0,typeof this.signal.onabort=="function"&&this.signal.onabort(new Event("abort"));let r=new Event("abort");this.signal.dispatchEvent(r)};let t=function(){this._aborted=!1,this.aborted=!1,this.onabort=null,this._eventListeners={}};Object.defineProperty(t.prototype,"aborted",{get:function(){return this._aborted}}),t.prototype.addEventListener=function(r,n){this._eventListeners[r]||(this._eventListeners[r]=[]),this._eventListeners[r].push(n)},t.prototype.removeEventListener=function(r,n){if(!this._eventListeners[r])return;let i=this._eventListeners[r].indexOf(n);i!==-1&&this._eventListeners[r].splice(i,1)},t.prototype.dispatchEvent=function(r){if(this._eventListeners[r.type])for(let n of this._eventListeners[r.type])n.call(this,r)},window.AbortController=e,window.AbortSignal=t}rE=class{constructor(){this.state="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.state==="pending"&&(this.state="fulfilled",e(r))},this.reject=r=>{this.state==="pending"&&(this.state="rejected",t(r))}})}};aE=(e=>(e[e.DEVELOPER_FILE_NOT_FOUND=0]="DEVELOPER_FILE_NOT_FOUND",e[e.INTERNAL_IOS_CAN_NOT_FOUND_PKG=1]="INTERNAL_IOS_CAN_NOT_FOUND_PKG",e[e.USER_IOS_LOAD_TIMEOUT=2]="USER_IOS_LOAD_TIMEOUT",e[e.INTERNAL_IOS_PKG_LOAD_ERROR=3]="INTERNAL_IOS_PKG_LOAD_ERROR",e[e.INTERNAL_IOS_PKG_PARSE_FAIL=4]="INTERNAL_IOS_PKG_PARSE_FAIL",e[e.USER_IOS_GET_EMPTY_DATA=5]="USER_IOS_GET_EMPTY_DATA",e[e.USER_ANDROID_GET_PKG_FAIL=6]="USER_ANDROID_GET_PKG_FAIL",e[e.DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE=7]="DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE",e))(aE||{}),sE=class extends Error{constructor(e){if(typeof e=="string"){super(e),this.priority="P1";return}super(e.message),this.priority="P1",this.stack=e.stack,this.raw=e}},Jn=class extends sE{constructor(){super(...arguments),this.kind="INTERNAL_ERROR"}},lE=class extends Jn{constructor(){super(...arguments),this.name="INTERNAL_INVOKE_NATIVE_ERROR"}},cE=class extends Jn{constructor(e,t,r,n){super(e),this.errNo=t,this.name="INTERNAL_APPLY_NATIVE_ERROR",this.errorType=r,this.errorCode=n}},uE=class extends Jn{constructor(){super(...arguments),this.name="INTERNAL_JSCORE_ERROR",this.priority="P0"}},oa=class extends Jn{constructor(){super(...arguments),this.name="INTERNAL_METRIC_REPORT_ERROR"}};_a={log:Or("log"),warn:Or("warn"),info:Or("info"),error:Or("error"),debug:Or("debug")};Object.assign(globalThis,{logger:_a});iu=Symbol.for("Jolibox.canIUseMap"),dE={};globalThis[iu]||(globalThis[iu]=dE);fE=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(fE||{}),pE=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(pE||{}),hE=(e=>(e[e.App=0]="App",e[e.H5=1]="H5",e[e.Weapp=2]="Weapp",e[e.Alipay=3]="Alipay",e[e.Gcash=4]="Gcash",e[e.Dana=5]="Dana",e[e.Umma=6]="Umma",e[e.WebSDK=1e3]="WebSDK",e[e.AppSDK=1001]="AppSDK",e[e.Other=9999]="Other",e))(hE||{});mE();vE=()=>!!(navigator.userAgent||"").includes("JoliboxPlatformSDK"),sU={isiOS:navigator.userAgent.includes("iPhone")||navigator.userAgent.includes("iPod")||navigator.userAgent.includes("iPad")||navigator.userAgent.includes("iPhone OS"),iosVersion:()=>{let e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3]||"0",10)]},isAndroid:navigator.userAgent.includes("Android"),isMac:navigator.userAgent.includes("Mac"),isFacebook:navigator.userAgent.includes("FB_IAB"),isPC:!navigator.userAgent.includes("iPhone")&&!navigator.userAgent.includes("Android")},fa=class pa{constructor(t){this.element=t,this.next=pa.Undefined,this.prev=pa.Undefined}};fa.Undefined=new fa(void 0);G=fa,gE=class{constructor(){this._first=G.Undefined,this._last=G.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===G.Undefined}clear(){let e=this._first;for(;e!==G.Undefined;){let t=e.next;e.prev=G.Undefined,e.next=G.Undefined,e=t}this._first=G.Undefined,this._last=G.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new G(e);if(this._first===G.Undefined)this._first=r,this._last=r;else if(t){let i=this._last;this._last=r,r.prev=i,i.next=r}else{let i=this._first;this._first=r,r.next=i,i.prev=r}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(r))}}shift(){if(this._first!==G.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==G.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==G.Undefined&&e.next!==G.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===G.Undefined&&e.next===G.Undefined?(this._first=G.Undefined,this._last=G.Undefined):e.next===G.Undefined?(this._last=this._last.prev,this._last.next=G.Undefined):e.prev===G.Undefined&&(this._first=this._first.next,this._first.prev=G.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==G.Undefined;)yield e.element,e=e.next}},_E=0,Cr=class{constructor(e){this.value=e,this.id=_E++}},Dr=class{constructor(e){this.options=e,this._size=0}dispose(e){var t,r;this._disposed||(this._disposed=!0,this._listeners&&(e?(this._listeners instanceof Cr&&(this._listeners=[this._listeners]),this._listeners=this._listeners.filter(n=>(n==null?void 0:n.value)===e)):(this._listeners=void 0,this._size=0)),(r=(t=this.options)==null?void 0:t.onDidRemoveLastListener)==null||r.call(t))}get event(){var e;return(e=this._event)!=null||(this._event=(t,r)=>{var n,i,o,a,s,l;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};r&&(t=t.bind(r));let c=new Cr(t);return this._listeners?this._listeners instanceof Cr?this._listeners=[this._listeners,c]:this._listeners.push(c):((i=(n=this.options)==null?void 0:n.onWillAddFirstListener)==null||i.call(n,this),this._listeners=c,(a=(o=this.options)==null?void 0:o.onDidFirstListener)==null||a.call(o,this)),(l=(s=this.options)==null?void 0:s.onDidAddListener)==null||l.call(s,this),this._size++,()=>{var d,u,h,p;if(!this._disposed){if(this._listeners instanceof Cr)this._listeners.id===c.id&&(this._listeners=void 0,this._size=0,(u=(d=this.options)==null?void 0:d.onDidRemoveLastListener)==null||u.call(d));else if(this._listeners){let m=this._listeners.indexOf(c);m>=0&&(this._listeners.splice(m,1),this._size--,this._size===0&&((p=(h=this.options)==null?void 0:h.onDidRemoveLastListener)==null||p.call(h)))}}}}),this._event}_deliver(e,t){var r;if(!e)return;let n=((r=this.options)==null?void 0:r.onListenerError)||Error.constructor;if(!n){e.value(t);return}try{e.value(t)}catch(i){n(i)}}fire(e){this._listeners&&(this._listeners instanceof Cr?this._deliver(this._listeners,e):this._listeners.forEach(t=>this._deliver(t,e)))}hasListeners(){return this._size>0}},ha=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,t,r=!0){var n;let i=(n=this.listeners.get(e))!=null?n:new Dr,o=l=>t(...l.args),a=i.event(o);this.listerHandlerMap.set(t,{handler:o,dispose:a}),this.listeners.set(e,i);let s=this.cachedEventQueue.get(e);if(s&&r)for(let l of s)t(...l.args)}flushCachedEvent(e){e?this.cachedEventQueue.delete(e):this.cachedEventQueue.clear()}off(e,t){let r=this.listerHandlerMap.get(t);r&&(r.dispose(),this.listerHandlerMap.delete(t))}emit(e,...t){let r=this.listeners.get(e),n=this.cachedEventQueue.get(e);n||(n=new gE,this.cachedEventQueue.set(e,n)),n.push({args:t}),r&&r.fire({event:e,args:t})}once(e,t){let r=(...n)=>{t(...n),this.off(e,r)};this.on(e,r,!1)}},ma={};Zw(ma,{None:()=>yE,filter:()=>wE,once:()=>gu,toPromise:()=>bE});yE=()=>(console.log("[Jolibox SDK] None Event"),()=>{console.log("[Jolibox SDK] None Event dispose")});aa=Symbol.for("Jolibox.hostEmitter"),EE=()=>{let e=new ha;return globalThis[aa]||(globalThis[aa]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e),once:e.once.bind(e)}),globalThis[aa]},lU=EE();va=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Dr,this.onDidRegisterCommand=this._onDidRegisterCommand.event,console.log("[Jolibox SDK] command registry")}registerCommand(e){if(!e)throw new Error("invalid command");if(e.metadata&&Array.isArray(e.metadata.args)){let r=[];for(let i of e.metadata.args)r.push(i.constraint);let n=e.handler;e.handler=function(...i){return xE(i,r),n(...i)}}let{id:t}=e;this._commands.get(t)&&console.info(`[Jolibox SDK] duplicated command is registered ${t}`),this._commands.set(t,e),this._onDidRegisterCommand.fire(t)}getCommand(e){return this._commands.get(e)}getCommands(){let e=new Map;for(let t of this._commands.keys()){let r=this.getCommand(t);r&&e.set(t,r)}return e}};va=pu([vu],va);ou=class{constructor(){this._onWillExecuteCommand=new Dr,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new Dr,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new va,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=tE(3e4)),this._starActivation}executeCommand(e,...t){return eE(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,t):(yield Promise.all([Promise.race([this._activateStar(),ma.toPromise(ma.filter(this.registry.onDidRegisterCommand,r=>r===e))])]),this._tryExecuteCommand(e,t))})}executeCommandThowErr(e,...t){if(!this.registry.getCommand(e))throw new Error(`command '${e}' not found`);let r=this.registry.getCommand(e);this._onWillExecuteCommand.fire({commandId:e,args:t});let n=this.invokeFunction(r.handler,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),n}_tryExecuteCommand(e,t){let r=this.registry.getCommand(e);if(!r)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});let n=this.invokeFunction(r.handler,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}invokeFunction(e,...t){let r=!1;try{return e(...t)}finally{r=!0}}};ou=pu([vu],ou);cU=Symbol.for("Jolibox.commands");SE=()=>vE(),Nr="custom_event_",IE=[],TE=[],RE=["env","createRequestTask","login"],_u="__batch_event__",kE=e=>e==="pv"?e:"default",Bn=class{constructor(e){this.interval=30,this.lastReportTime=0,this.cache={};let{reporter:t,interval:r=30,eventName:n,tagNameOrder:i,metricName:o,type:a}=e;this.reporter=t,this.interval=r,this.eventName=n,this.tagNameOrder=i,this.metricName=o,this.type=kE(a)}report(e){this.type==="pv"?this.addPVPoint(e):this.addPoint(e),this.tryReport(!1)}flush(){this.tryReport(!0)}tryReport(e){if(Object.keys(this.cache).length){if(e){this.reporter(this.processPoints(this.cache)),this.clearPoints();return}this.lastReportTime=this.lastReportTime||Date.now(),Date.now()-this.lastReportTime>=this.interval*1e3&&(this.reporter(this.processPoints(this.cache)),this.clearPoints(),this.lastReportTime=Date.now())}}addPoint(e){let t=(r,n,i,o)=>{let a=n.shift();if(a){let s=o[a];r[s]||(r[s]={}),t(r[s],n,i,o)}else r[i]||(r[i]=[]),r[i].push(o[i])};t(this.cache,[...this.tagNameOrder],this.metricName,e)}addPVPoint(e){let t=(n,i,o,a)=>{let s=i.shift();if(!s&&Pr(a))throw new oa(`report value failed to match tagNameOrder, ${JSON.stringify(r)}`);if(s){let l=[];if(Pr(a))l.push(...Object.keys(a));else if(hu(a)){if(i.length>0)throw new oa(`report value failed to match tagNameOrder, ${JSON.stringify(r)}`);l.push(a)}else throw new oa(`expected metric value to be a string, but got a(n) ${typeof a}, ${JSON.stringify(r)}`);l.forEach(c=>{n[c]||(n[c]={});let d=Pr(a)?a[c]:a;t(n[c],[...i],o,d)})}else n[o]?n[o]++:n[o]=1},r={point:e,metricName:this.metricName,tagNameOrder:this.tagNameOrder};t(this.cache,[...this.tagNameOrder],this.metricName,e)}processPoints(e){return{eventName:this.eventName,tagNameOrder:this.tagNameOrder,metricName:this.metricName,metricAggregateType:this.type==="pv"?"itoa":"arr",data:e}}clearPoints(){this.cache={}}},su=!1;ua=[],CE=!1,ga=Symbol.for("Jolibox.invokeResolverInstance"),PE=new Map;globalThis[ga]||(globalThis[ga]=PE);NE={get resolveMap(){return globalThis[ga]}};Fn=Symbol.for("Jolibox.subscribeInstance");Je={trigger(){},exit(){return Promise.resolve(!1)},backPress(){return Promise.resolve(!1)},onReady(e){Je.trigger=e},onDoExit(e){Je.exit=e},onDoBackPress(e){Je.backPress=e}},bu=e=>{let t=window.prompt("invoke",JSON.stringify({event:"envSync",paramsString:JSON.stringify({})}));if(!t)e.onError(new lE("native env failed"));else{let{data:r}=JSON.parse(t);return r!=null?r:void 0}};if(window.webkit){let e=window.webkit.messageHandlers,t=(i="")=>{Je.trigger(),e.onDocumentReady.postMessage({path:i})},r=i=>Hn(void 0,null,function*(){let o=yield Je.exit();e.doExit.postMessage({uuid:i,shouldInterrupt:o})});ya={onDocumentReady:t,doExit:r,invoke(i,o,a){e.invoke.postMessage({event:i,paramsString:o,callbackId:a})},publish(i,o,a){let s=yu(o,"joliboxJSCore");window.prompt("publish",JSON.stringify({event:i,paramsString:JSON.stringify(s),webviewIds:a}))},call(i,o,a){let s=window.prompt("invoke",JSON.stringify({event:i,paramsString:JSON.stringify(o),callbackId:a}));if(s)return JSON.parse(s)}};let n={onDocumentReady:t,env:bu,doExit:r};globalThis.joliboxJSCore=xt({},n)}if(window.JoliAndroidSDKBridge){let e,t=window.JoliAndroidSDKBridge,r=(o="")=>{Je.trigger(),t.onDocumentReady(JSON.stringify({path:o}))},n=o=>Hn(void 0,null,function*(){let a=yield Je.exit();t.doExit(JSON.stringify({uuid:o,shouldInterrupt:a}))});ya={onDocumentReady:r,invoke(o,a,s){t.invoke(JSON.stringify({event:o,paramsString:a,callbackId:s}))},doExit:n,publish(o,a,s){let l=yu(a,"joliboxJSCore");t.publish({event:o,paramsString:JSON.stringify(l),webviewIds:s})},call(o,a,s){let l=window.prompt("invoke",JSON.stringify({event:o,paramsString:JSON.stringify(a),callbackId:s}));if(l)return JSON.parse(l)},doBackPress(o){return Hn(this,null,function*(){let a=yield Je.backPress();t.doBackPress(JSON.stringify({uuid:o,shouldInterrupt:a}))})}};let i={onDocumentReady:r,env:bu,doExit:n};globalThis.joliboxJSCore=xt({},i)}wu=ya;if(!wu&&SE())throw new uE("No joliboxJScore is found, native bridge not found.");ME=xt({},wu),Eu=UE(ME),{invokeHandler:cu}=Eu,{applyNative:Oe,invokeNative:q,onNative:Ve,offNative:uU,subscribeHandler:jE,publish:xu,subscribe:dU,unsubscribe:fU}=Eu;globalThis.joliboxJSBridge={callHandler:cu,invokeHandler:cu,subscribeHandler:jE}});function GE(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function Mr(e){return typeof e=="string"}function Ut(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function Ru(e){return typeof e=="object"&&Array.isArray(e)}function jr(e){return e===!0||e===!1}function ku(e){return typeof e=="undefined"}function KE(e){return ku(e)||e===null}function WE(e){return typeof e=="function"}function Ou(e){let t=e,r=null,n=function(...i){return r||(r=new t(...i)),r};return n.prototype=t.prototype,n}function Cu(e,t,r){if(typeof r!="function")throw new Error("[Jolibox SDK]Customizer must be a function");function n(i,o){for(let a in o)if(Object.prototype.hasOwnProperty.call(o,a)){let s=i[a],l=o[a],c=r(s,l,a,i,o);c!==void 0?i[a]=c:Iu(l)&&Iu(s)?i[a]=n(HE({},s),l):Array.isArray(l)&&Array.isArray(s)?i[a]=[...s,...l]:i[a]=l}return i}return n(e,t)}function Iu(e){return e&&typeof e=="object"&&e.constructor===Object}function Pu(e,t){if(Array.isArray(e))return e.concat(t)}function Fr(e,t,r={}){let n=null,i,o,a,{leading:s=!1,trailing:l=!0}=r,c=()=>(a=e.apply(o,i),i=void 0,o=void 0,a),d=function(...u){i=u,o=this;let h=s&&!n;if(n&&clearTimeout(n),n=setTimeout(()=>{n=null,l&&!h&&c()},t),h)return c()};return d.cancel=()=>{n&&clearTimeout(n),n=null,i=o=void 0},d.flush=()=>{if(n)return clearTimeout(n),n=null,c()},d}function YE(e,t){return(...r)=>t(e,...r)}function Gn(e){return t=>YE(t,function(r,...n){if(typeof r=="function")try{return r.apply(this,n)}catch(i){e(new Br(`${i}`))}})}function Lr(e){return(...t)=>{var r,n;((n=(r=globalThis.VConsole)==null?void 0:r[e])!=null?n:globalThis.console[e])(...t)}}function Pa(){try{if(window.__joliboxLocalStorage__)return window.__joliboxLocalStorage__;let e=Object.getOwnPropertyDescriptor(window,"localStorage");if(e&&e.get){let n=e.get.call(window);return window.__joliboxLocalStorage__=n,n}if(e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(window),"localStorage"),e&&e.get)return e.get.call(window);let t=Window.prototype,r=Object.getOwnPropertyDescriptor(t,"localStorage");if(r&&r.get){let n=r.get.call(window);return window.__joliboxLocalStorage__=n,n}return localStorage}catch(e){return console.warn("Failed to get original localStorage, fallback to default implementation",e),localStorage}}function ox(e){return new Promise(t=>Fu(e)(t))}function Fu(e){return(t,r=null)=>{let n=!1;return e(i=>{if(!n)return n=!0,t.call(r,i)},null)}}function ax(e,t){return(r=>{let n,i={onWillAddFirstListener(){n=r(o.fire,o)}},o=new Ur(i);return o.event})((r,n=null)=>e(i=>t(i)&&r.call(n,i),null))}function lx(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++)cx(e[n],t[n])}function cx(e,t){if(Mr(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(WE(t)){try{if(e instanceof t)return}catch(r){}if(!KE(e)&&e.constructor===t||t.length===1&&t.call(void 0,e)===!0)return;throw new Error("[Jolibox SDK]argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function ux(){return typeof globalThis!="undefined"?globalThis[Bu]:void 0}function dx(e){typeof globalThis!="undefined"&&(globalThis[Bu]=e)}function X(){let e=ux();if(e)return e;let t=new Vn,r=new Sa,n={registerCommand(i,o,a){t.registerCommand({id:i,handler:o,metadata:a})},executeCommand(i,...o){return r.executeCommand(i,...o)},excuteCommandSync(i,...o){return r.executeCommandThowErr(i,...o)}};return dx(n),n}var Ia,FE,Au,BE,$E,Su,HE,JE,Tu,VE,At,zE,Ta,Ra,Nu,Du,Br,Lu,qu,$r,ka,et,wa,QE,Oa,XE,Ca,ZE,Kn,Hr,ex,tx,Uu,Mu,ju,Ea,K,rx,nx,qr,Ur,tt,Aa,ix,ba,sx,ue,Vn,Sa,Bu,D=T(()=>{"use strict";Ia=Object.defineProperty,FE=Object.getOwnPropertyDescriptor,Au=Object.getOwnPropertySymbols,BE=Object.prototype.hasOwnProperty,$E=Object.prototype.propertyIsEnumerable,Su=(e,t,r)=>t in e?Ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,HE=(e,t)=>{for(var r in t||(t={}))BE.call(t,r)&&Su(e,r,t[r]);if(Au)for(var r of Au(t))$E.call(t,r)&&Su(e,r,t[r]);return e},JE=(e,t)=>{for(var r in t)Ia(e,r,{get:t[r],enumerable:!0})},Tu=(e,t,r,n)=>{for(var i=n>1?void 0:n?FE(t,r):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(n?a(t,r,i):a(i))||i);return n&&i&&Ia(t,r,i),i},VE=(e,t,r)=>new Promise((n,i)=>{var o=l=>{try{s(r.next(l))}catch(c){i(c)}},a=l=>{try{s(r.throw(l))}catch(c){i(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,a);s((r=r.apply(e,t)).next())});if(typeof window!="undefined"&&!window.AbortController){let e=function(){this.signal=new t};e.prototype.abort=function(){this.signal._aborted=!0,typeof this.signal.onabort=="function"&&this.signal.onabort(new Event("abort"));let r=new Event("abort");this.signal.dispatchEvent(r)};let t=function(){this._aborted=!1,this.aborted=!1,this.onabort=null,this._eventListeners={}};Object.defineProperty(t.prototype,"aborted",{get:function(){return this._aborted}}),t.prototype.addEventListener=function(r,n){this._eventListeners[r]||(this._eventListeners[r]=[]),this._eventListeners[r].push(n)},t.prototype.removeEventListener=function(r,n){if(!this._eventListeners[r])return;let i=this._eventListeners[r].indexOf(n);i!==-1&&this._eventListeners[r].splice(i,1)},t.prototype.dispatchEvent=function(r){if(this._eventListeners[r.type])for(let n of this._eventListeners[r.type])n.call(this,r)},window.AbortController=e,window.AbortSignal=t}At=class{constructor(){this.state="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.state==="pending"&&(this.state="fulfilled",e(r))},this.reject=r=>{this.state==="pending"&&(this.state="rejected",t(r))}})}};zE=(e=>(e[e.DEVELOPER_FILE_NOT_FOUND=0]="DEVELOPER_FILE_NOT_FOUND",e[e.INTERNAL_IOS_CAN_NOT_FOUND_PKG=1]="INTERNAL_IOS_CAN_NOT_FOUND_PKG",e[e.USER_IOS_LOAD_TIMEOUT=2]="USER_IOS_LOAD_TIMEOUT",e[e.INTERNAL_IOS_PKG_LOAD_ERROR=3]="INTERNAL_IOS_PKG_LOAD_ERROR",e[e.INTERNAL_IOS_PKG_PARSE_FAIL=4]="INTERNAL_IOS_PKG_PARSE_FAIL",e[e.USER_IOS_GET_EMPTY_DATA=5]="USER_IOS_GET_EMPTY_DATA",e[e.USER_ANDROID_GET_PKG_FAIL=6]="USER_ANDROID_GET_PKG_FAIL",e[e.DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE=7]="DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE",e))(zE||{}),Ta=class extends Error{constructor(e){if(typeof e=="string"){super(e),this.priority="P1";return}super(e.message),this.priority="P1",this.stack=e.stack,this.raw=e}},Ra=class extends Ta{constructor(){super(...arguments),this.kind="INTERNAL_ERROR"}},Nu=class extends Ta{constructor(){super(...arguments),this.kind="USER_ERROR"}},Du=class extends Nu{constructor(){super(...arguments),this.name="USER_VALIDATE_ERROR"}},Br=class extends Nu{constructor(e,t,r){super(e),this.message=e,this.errNo=t,this.name="USER_CUSTOM_ERROR",this.errMsg=e,r&&(this.extra=Object.assign({},this.extra,r))}},Lu=class extends Ra{constructor(){super(...arguments),this.name="INTERNAL_SCHEMA_PARSE_ERROR",this.priority="P0"}},qu=class extends Ra{constructor(){super(...arguments),this.name="INTERNAL_GLOBAL_JS_ERROR",this.priority="P1"}},$r=class extends Ta{constructor(e,t,r,n,i){super(e),this.message=e,this.code=t,this.kind="API_ERROR",this.name="API_ERROR",r&&(this.errorType=r),n!==void 0&&(this.stack=n),i&&(this.priority=i)}toJSON(){return{message:this.message,stack:this.stack,name:this.name,code:this.code,errorType:this.errorType}}},ka=class extends Ra{constructor(){super(...arguments),this.name="INTERNAL_REPORTER_ERROR"}};et={log:Lr("log"),warn:Lr("warn"),info:Lr("info"),error:Lr("error"),debug:Lr("debug")};Object.assign(globalThis,{logger:et});wa=Symbol.for("Jolibox.canIUseMap"),QE={};globalThis[wa]||(globalThis[wa]=QE);Oa={get config(){return globalThis[wa]}},XE=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(XE||{}),Ca=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(Ca||{}),ZE=(e=>(e[e.App=0]="App",e[e.H5=1]="H5",e[e.Weapp=2]="Weapp",e[e.Alipay=3]="Alipay",e[e.Gcash=4]="Gcash",e[e.Dana=5]="Dana",e[e.Umma=6]="Umma",e[e.WebSDK=1e3]="WebSDK",e[e.AppSDK=1001]="AppSDK",e[e.Other=9999]="Other",e))(ZE||{}),Kn=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)});Pa();Hr={isiOS:navigator.userAgent.includes("iPhone")||navigator.userAgent.includes("iPod")||navigator.userAgent.includes("iPad")||navigator.userAgent.includes("iPhone OS"),iosVersion:()=>{let e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3]||"0",10)]},isAndroid:navigator.userAgent.includes("Android"),isMac:navigator.userAgent.includes("Mac"),isFacebook:navigator.userAgent.includes("FB_IAB"),isPC:!navigator.userAgent.includes("iPhone")&&!navigator.userAgent.includes("Android")},ex="device_id",tx="advertising_id",Uu=e=>(window.__joliboxLocalStorage__.getItem(e)||window.__joliboxLocalStorage__.setItem(e,Kn()),window.__joliboxLocalStorage__.getItem(e)),Mu=()=>new URLSearchParams(window.location.search).get("deviceId")||Uu(ex),ju=()=>new URLSearchParams(window.location.search).get("advertisingId")||Uu(tx),Ea=class xa{constructor(t){this.element=t,this.next=xa.Undefined,this.prev=xa.Undefined}};Ea.Undefined=new Ea(void 0);K=Ea,rx=class{constructor(){this._first=K.Undefined,this._last=K.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===K.Undefined}clear(){let e=this._first;for(;e!==K.Undefined;){let t=e.next;e.prev=K.Undefined,e.next=K.Undefined,e=t}this._first=K.Undefined,this._last=K.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new K(e);if(this._first===K.Undefined)this._first=r,this._last=r;else if(t){let i=this._last;this._last=r,r.prev=i,i.next=r}else{let i=this._first;this._first=r,r.next=i,i.prev=r}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(r))}}shift(){if(this._first!==K.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==K.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==K.Undefined&&e.next!==K.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===K.Undefined&&e.next===K.Undefined?(this._first=K.Undefined,this._last=K.Undefined):e.next===K.Undefined?(this._last=this._last.prev,this._last.next=K.Undefined):e.prev===K.Undefined&&(this._first=this._first.next,this._first.prev=K.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==K.Undefined;)yield e.element,e=e.next}},nx=0,qr=class{constructor(e){this.value=e,this.id=nx++}},Ur=class{constructor(e){this.options=e,this._size=0}dispose(e){var t,r;this._disposed||(this._disposed=!0,this._listeners&&(e?(this._listeners instanceof qr&&(this._listeners=[this._listeners]),this._listeners=this._listeners.filter(n=>(n==null?void 0:n.value)===e)):(this._listeners=void 0,this._size=0)),(r=(t=this.options)==null?void 0:t.onDidRemoveLastListener)==null||r.call(t))}get event(){var e;return(e=this._event)!=null||(this._event=(t,r)=>{var n,i,o,a,s,l;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};r&&(t=t.bind(r));let c=new qr(t);return this._listeners?this._listeners instanceof qr?this._listeners=[this._listeners,c]:this._listeners.push(c):((i=(n=this.options)==null?void 0:n.onWillAddFirstListener)==null||i.call(n,this),this._listeners=c,(a=(o=this.options)==null?void 0:o.onDidFirstListener)==null||a.call(o,this)),(l=(s=this.options)==null?void 0:s.onDidAddListener)==null||l.call(s,this),this._size++,()=>{var d,u,h,p;if(!this._disposed){if(this._listeners instanceof qr)this._listeners.id===c.id&&(this._listeners=void 0,this._size=0,(u=(d=this.options)==null?void 0:d.onDidRemoveLastListener)==null||u.call(d));else if(this._listeners){let m=this._listeners.indexOf(c);m>=0&&(this._listeners.splice(m,1),this._size--,this._size===0&&((p=(h=this.options)==null?void 0:h.onDidRemoveLastListener)==null||p.call(h)))}}}}),this._event}_deliver(e,t){var r;if(!e)return;let n=((r=this.options)==null?void 0:r.onListenerError)||Error.constructor;if(!n){e.value(t);return}try{e.value(t)}catch(i){n(i)}}fire(e){this._listeners&&(this._listeners instanceof qr?this._deliver(this._listeners,e):this._listeners.forEach(t=>this._deliver(t,e)))}hasListeners(){return this._size>0}},tt=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,t,r=!0){var n;let i=(n=this.listeners.get(e))!=null?n:new Ur,o=l=>t(...l.args),a=i.event(o);this.listerHandlerMap.set(t,{handler:o,dispose:a}),this.listeners.set(e,i);let s=this.cachedEventQueue.get(e);if(s&&r)for(let l of s)t(...l.args)}flushCachedEvent(e){e?this.cachedEventQueue.delete(e):this.cachedEventQueue.clear()}off(e,t){let r=this.listerHandlerMap.get(t);r&&(r.dispose(),this.listerHandlerMap.delete(t))}emit(e,...t){let r=this.listeners.get(e),n=this.cachedEventQueue.get(e);n||(n=new rx,this.cachedEventQueue.set(e,n)),n.push({args:t}),r&&r.fire({event:e,args:t})}once(e,t){let r=(...n)=>{t(...n),this.off(e,r)};this.on(e,r,!1)}},Aa={};JE(Aa,{None:()=>ix,filter:()=>ax,once:()=>Fu,toPromise:()=>ox});ix=()=>(console.log("[Jolibox SDK] None Event"),()=>{console.log("[Jolibox SDK] None Event dispose")});ba=Symbol.for("Jolibox.hostEmitter"),sx=()=>{let e=new tt;return globalThis[ba]||(globalThis[ba]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e),once:e.once.bind(e)}),globalThis[ba]},ue=sx();Vn=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Ur,this.onDidRegisterCommand=this._onDidRegisterCommand.event,console.log("[Jolibox SDK] command registry")}registerCommand(e){if(!e)throw new Error("invalid command");if(e.metadata&&Array.isArray(e.metadata.args)){let r=[];for(let i of e.metadata.args)r.push(i.constraint);let n=e.handler;e.handler=function(...i){return lx(i,r),n(...i)}}let{id:t}=e;this._commands.get(t)&&console.info(`[Jolibox SDK] duplicated command is registered ${t}`),this._commands.set(t,e),this._onDidRegisterCommand.fire(t)}getCommand(e){return this._commands.get(e)}getCommands(){let e=new Map;for(let t of this._commands.keys()){let r=this.getCommand(t);r&&e.set(t,r)}return e}};Vn=Tu([Ou],Vn);Sa=class{constructor(){this._onWillExecuteCommand=new Ur,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new Ur,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new Vn,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=GE(3e4)),this._starActivation}executeCommand(e,...t){return VE(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,t):(yield Promise.all([Promise.race([this._activateStar(),Aa.toPromise(Aa.filter(this.registry.onDidRegisterCommand,r=>r===e))])]),this._tryExecuteCommand(e,t))})}executeCommandThowErr(e,...t){if(!this.registry.getCommand(e))throw new Error(`command '${e}' not found`);let r=this.registry.getCommand(e);this._onWillExecuteCommand.fire({commandId:e,args:t});let n=this.invokeFunction(r.handler,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),n}_tryExecuteCommand(e,t){let r=this.registry.getCommand(e);if(!r)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});let n=this.invokeFunction(r.handler,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}invokeFunction(e,...t){let r=!1;try{return e(...t)}finally{r=!0}}};Sa=Tu([Ou],Sa);Bu=Symbol.for("Jolibox.commands")});function Ie(e,t={}){Na.emit("ERROR_REPORT",{error:e,options:t})}var Na,Mt,rt=T(()=>{"use strict";D();D();Na=new tt,Mt=new tt;Ie.debounce=Fr(Ie,50,{leading:!0})});var Da,fx,$u,Hu,Ju=T(()=>{"use strict";D();rt();Da=e=>{let t=e.replace(/-/g,"+").replace(/_/g,"/"),r=t.length%4===0?"":"=".repeat(4-t.length%4),n=atob(t+r);try{return JSON.parse(n)}catch(i){return{}}},fx=e=>{let t=JSON.stringify(e);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},$u=e=>{var t;try{let i=(t=new URL(e).searchParams.get("joliSource"))==null?void 0:t.split(".");if(i!=null&&i.length){let[o,a,s]=i;return{headerJson:Da(o),payloadJson:Da(a),signature:Da(s)}}else throw"joli_source is missing"}catch(r){return Ie(new Lu(`${e} not a valid schema: ${r}`)),{headerJson:{},payloadJson:{},signature:{}}}},Hu=(e,t)=>{let r=t.split(".");if(r&&r.length===3){let n=r[0],i=fx(e),o=r[2];return`${n}.${i}.${o}`}return t}});var px,La,Vu=T(()=>{"use strict";D();px="1.1.19",La=()=>px});var hx,Gu,qa,Ku,me,mx,A,Z=T(()=>{"use strict";D();Ju();Vu();D();hx={deviceInfo:{brand:"UnknownBrand",model:"UnknownModel",did:Mu(),adId:ju(),pixelRatio:window.devicePixelRatio||1,platform:Hr.isAndroid?"android":Hr.isiOS?"ios":"h5",system:"UnknownSystemVersion",lang:"zh"},sdkInfo:{nativeSDKVersion:"",jssdkVersion:La()},schema:window.location.href,platform:Hr.isAndroid?"android":Hr.isiOS?"ios":"h5"},qa=(Gu=globalThis.joliboxJSCore)==null?void 0:Gu.env,me=Object.assign({},(Ku=qa==null?void 0:qa())!=null?Ku:hx),mx=()=>{var h,p,m,g,_,v,y,x,R,C,S;let{payloadJson:e,headerJson:t,signature:r}=me.schema.length?$u(me.schema):{},n=`${me.deviceInfo.did}-${new Date().getTime()}`,o=new URL(me.schema.length?me.schema:window.location.href).searchParams,a=(m=(p=(h=o.get("mpId"))!=null?h:o.get("appId"))!=null?p:o.get("gameId"))!=null?m:"",s=(v=(_=(g=me.clientSessionId)!=null?g:e==null?void 0:e.sessionId)!=null?_:o.get("sessionId"))!=null?v:n,l=!!((x=(y=e==null?void 0:e.testAdsMode)!=null?y:e==null?void 0:e.__testAdsMode)!=null?x:o.get("testAdsMode")==="true"),c=(S=(C=(R=e==null?void 0:e.joliboxEnv)!=null?R:e==null?void 0:e.__joliboxEnv)!=null?C:o.get("joliboxEnv"))!=null?S:"production",d=c==="staging",u=t==null?void 0:t.channel;return{get testMode(){return d},get testAdsMode(){return l},get joliboxEnv(){return c},get joliSource(){var w;return(w=o.get("joliSource"))!=null?w:null},get mpId(){var w;return(w=a!=null?a:e==null?void 0:e.id)!=null?w:""},get mpVersion(){var w;return(w=t==null?void 0:t.ver)!=null?w:La()},get mpType(){var w,B;return(B=(w=t==null?void 0:t.__mpType)!=null?w:e==null?void 0:e.__mpType)!=null?B:"game"},get platform(){var w;return((w=me.platform)!=null?w:me.deviceInfo.platform).toLowerCase()},get deviceInfo(){return me.deviceInfo},get sdkInfo(){return me.sdkInfo},get hostInfo(){return me.hostInfo},get hostUserInfo(){return me.hostUserInfo},get sessionId(){var w,B;return(B=(w=me.clientSessionId)!=null?w:s)!=null?B:n},get channel(){return u},get webviewId(){var w;return(w=me.webviewId)!=null?w:-1},get shouldInterupt(){return e==null?void 0:e.__shouldInterupt},get from(){return e==null?void 0:e.__from},get baseApiHost(){return d?"https://stg-api.jolibox.com":"https://api.jolibox.com"},get adId(){var w;return(w=me.deviceInfo.adId)!=null?w:me.deviceInfo.did},onEnvConfigChanged:w=>{Cu(me,w,Pu)},encodeJoliSourceQuery:w=>{var B,$e;return t&&r?Hu(k(k({},e),w),(B=o.get("joliSource"))!=null?B:""):($e=o.get("joliSource"))!=null?$e:""}}},A=mx()});var Ua,zu,vx,gx,Wu,_x,Yu=T(()=>{"use strict";D();rt();Z();D();Ua=!1,zu=(e,t)=>e==null?!1:t in e,vx=e=>zu(e,"kind"),gx=e=>{let t=e.toLowerCase().split("_");return t[0]+t.slice(1).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join("")},Wu=(e,t={},r)=>{var o,a,s;let n={user_id:(a=(o=A.hostUserInfo)==null?void 0:o.uid)!=null?a:"",device_id:(s=A.deviceInfo.did)!=null?s:"",timestamp:Date.now(),tag:gx(e.name)},i=L(k({},n),{env:t.environment,isFromUser:r});r?Mt.emit("GLOBAL_USER_ERROR",e,i):Mt.emit("GLOBAL_ERROR",e,i)},_x=e=>zu(e,"kind")&&e.kind==="USER_ERROR";Na.on("ERROR_REPORT",({error:e,options:t})=>{if(Ua)return;Ua=!0;let r=vx(e)&&e.raw?e.raw:e;try{let n=_x(e);Wu(e,t,n)}catch(n){let i=n instanceof Error?n.message:String(n),o=new ka(`${i}, origin error: ${r.message}`);et.error(o),Wu(new ka(o.message),{environment:t.environment},!1)}finally{Ua=!1}})});var St,Ma,Qt=T(()=>{"use strict";rt();D();rt();St=(e,t)=>{var r,n;return new $r((n=(r=t==null?void 0:t.errMsg)!=null?r:e.msg)!=null?n:"",e.code,e.type)},Ma=e=>new Du(e)});var Qu=T(()=>{"use strict";Yu();Qt();D();Se();Mt.on("GLOBAL_ERROR",(e,t)=>{var n;let r={message:e.message,stack:(n=e.stack)!=null?n:"",errorType:e.name,source:0};q("trackAsync",{event:"reportJsError",data:r})});Mt.on("GLOBAL_USER_ERROR",(e,t)=>{et.log("UserError",e,t)})});var ja=T(()=>{"use strict"});function Xu(e,t){let r=(n,i,o)=>{let a=L(k({tag:n},t),{extra:k({},i)});n=="globalJsError"?Ie(new qu(JSON.stringify(a))):e("systemLog",a,o)};return r.debounce=Fr(r,500,{leading:!0}),r}function Zu(e){let t=(r,n,i)=>{var s;let o=(s=i&&JSON.stringify(i))!=null?s:0,a={speed_value_type:r,total_duration:n};o&&Object.assign(a,{extra:o}),e("joliboxSpeedAnalysis",a)};return t.debounce=Fr(t,500,{leading:!0}),t}var ed=T(()=>{"use strict";D();D();rt()});function td(e,t){let r=Xu(e,t),n=Zu(r);return{track:r,trackPerformance:n}}var rd=T(()=>{"use strict";ed()});var nd=T(()=>{"use strict";Z();D();D()});var id=T(()=>{"use strict";rd();ja();nd()});var Wn,od=T(()=>{"use strict";Wn=class{constructor(t,r){this.eventEmitter=t;this.lastReportTime=0;this.visible=!0;this.timer=this.createRAFTimer(t=>{this.reporter({event:"PLAY_GAME",params:{duration:t}}),this.tracker("PlayGame",{duration:t})});this.interval=r!=null?r:5*1e3,t.on("visible",n=>{this.visible=n})}start(t){this.reporter({event:"OPEN_GAME",params:{timestamp:Date.now(),duration:t!=null?t:0}}),this.tracker("OpenGame",{duration:t!=null?t:0}),this.timer.start()}close(t){this.reporter({event:"CLOSE_GAME",params:{timestamp:Date.now(),duration:t}}),this.tracker("CloseGame",{duration:t}),this.timer.stop()}createRAFTimer(t){let r=Date.now(),n,i,o=!1,a=0,s=()=>{if(!o)return;let p=Date.now(),m=p-r;m>=this.interval&&(this.visible&&(a+=m,t(a)),r=p),n=requestAnimationFrame(s)},l=()=>{d(),r=Date.now(),i=window.setInterval(()=>{if(!o)return;let p=Date.now();p-r>=this.interval&&(r=p)},this.interval)},c=()=>{u(),r=Date.now(),n=requestAnimationFrame(s)},d=()=>{n&&(cancelAnimationFrame(n),n=0)},u=()=>{i&&(clearInterval(i),i=0)};this.eventEmitter.on("visible",p=>{o&&(console.log("visible",p),p?c():l())});let h=this.visible;return{start(){o||(o=!0,h?c():l())},stop(){o=!1,d(),u()}}}}});var Fa=T(()=>{"use strict"});function sd(e,t,r){let{response:n,startTime:i,endTime:o,requestFrom:a}=r,{errMsg:s="",profile:l={}}=n,d={duration:o-i,request_type:e,url:t.split("?")[0],result:r.state,error_msg:r.state==="fail"?s:"",socket_reused:l.socketReused?1:0,request_from:a};(a==="public"&&ad<bx||a==="inner")&&(d.joli_request_number=ad++,setTimeout(()=>{qe("joliboxNetRequestResult",d)},500))}var ad,bx,ld=T(()=>{"use strict";Fa();It();ad=0,bx=10});function zn(e,t,r){var l,c,d;let n=new Map,i=(l=r==null?void 0:r.baseUrl)!=null?l:"https://api.jolibox.com",o=(c=r==null?void 0:r.type)!=null?c:"public",a=(d=r==null?void 0:r.defaultHeaders)!=null?d:{};return Ve("onRequestTaskStateChange",u=>{if(typeof u.requestTaskId!="string")return;let h=n.get(u.requestTaskId);if(h)if(u.state==="success"){let p=u,{requestTaskId:g,state:_}=p,v=Ze(p,["requestTaskId","state"]);u.statusCode===200?h.resolve(v):h.reject(v),n.delete(g)}else if(u.state==="fail"){let m=u,{requestTaskId:g,state:_}=m,v=Ze(m,["requestTaskId","state"]);h.reject(v),n.delete(g)}else et.warn("onRequestTaskStateChange unknown event",u)}),ue.on("onLoginComplete",({isLogin:u,token:h})=>{u&&h&&(a["X-JOLI-TOKEN"]=h)}),(p,...m)=>I(this,[p,...m],function*(u,h={}){let g=Date.now(),_=wx(u,L(k({},h),{baseUrl:i})),{method:v="GET",responseType:y="text",dataType:x="json",timeout:R,enableCache:C=!1,appendHostCookie:S=!0}=h,w=Object.assign({"content-type":"application/json"},a,h.header),B={url:_,method:v,header:w,enableCache:C,responseType:y,appendHostCookie:S};if(v=="POST"||v=="PUT"){let Xe=xx(h.data,w["content-type"]);B.data=Xe}R&&Object.assign(B,{timeout:R});let{data:{requestTaskId:$e}}=q(e,B);if(typeof $e!="string")throw St({code:-1,msg:"requestTaskId is not a string"});let Yt=(Xe,dt)=>{sd("request",_,{state:Xe,startTime:g,endTime:Date.now(),params:B,response:dt,requestId:$e,requestFrom:o=="public"?"public":"inner"})},{resolve:He,reject:qt,promise:Pw}=new At;n.set($e,{resolve:He,reject:qt});try{let Xe=yield Pw;Yt("success",Xe);let{data:dt}=Xe;return x==="json"&&typeof dt=="string"&&(dt=Ex(dt)),{url:_,timeout:R,method:v,response:L(k({},Xe),{data:dt})}}catch(Xe){let dt=Xe;if(Ut(dt)){let{errMsg:Un,prefetchDetail:Nw,isPrefetch:Dw,errNo:Lw}=dt;Mr(Un)&&(Yt("fail",{errMsg:Un,isPrefetch:Dw,prefetchDetail:Nw}),Ie(St({code:-1,msg:Un},{errNo:Lw,errMsg:Un})))}throw Xe}})}function Ex(e){try{return JSON.parse(e.trim())}catch(t){return e}}function xx(e,t="application/json"){let r=t.toLowerCase();return e===void 0?"":typeof e=="string"||e instanceof ArrayBuffer?e:r.includes("application/x-www-form-urlencoded")||r.includes("application/json")||typeof e=="object"?JSON.stringify(e):String(e)}var wx,Ba=T(()=>{"use strict";D();ld();Fa();Se();rt();Qt();wx=(e,t)=>{if(/^https?:\/\//.test(e))return e;let r=t==null?void 0:t.query,i=new URLSearchParams(r).toString();return t!=null&&t.baseUrl?`${t.baseUrl}${e}${i?`?${i}`:""}`:`${e}${i?`?${i}`:""}`}});var $a,cd,we,jt=T(()=>{"use strict";Ba();Z();$a={};(cd=A.hostUserInfo)!=null&&cd.token&&($a["x-joli-token"]=A.hostUserInfo.token);A.joliSource&&($a["x-joli-source"]=A.joliSource);we=zn("createRequestTaskSync","operateRequestTaskSync",{type:"inner",baseUrl:A.testMode?"https://stg-api.jolibox.com":"https://api.jolibox.com",defaultHeaders:$a})});var Yn,ud=T(()=>{"use strict";Z();od();jt();Se();Yn=class extends Wn{constructor(t,r,n){super(r,n),this.gameId=A.mpId,this.sessionId=A.sessionId,this.track=t,this.taskUrl=A.testMode?"https://stg-api.jolibox.com/api/base/app-event":"https://api.jolibox.com/api/base/app-event"}reporter(t){return I(this,null,function*(){let{event:r,params:n}=t,i={eventType:r,gameInfo:k({gameId:this.gameId,sessionId:this.sessionId},n)};yield A.platform==="android"?we("/api/base/app-event",{method:"POST",data:i}):Oe("trackAppEventAsync",{url:this.taskUrl,body:JSON.stringify(i)})})}reportToNative(t){return I(this,null,function*(){let{event:r,params:n}=t;yield Oe("userTrackAsync",{event:r,params:k({},n),gameId:this.gameId})})}tracker(t,r=null){this.track(t,r)}}});var md={};ru(md,{nativeTaskEmitter:()=>Jr,taskTracker:()=>Ce,track:()=>qe,trackPerformance:()=>pd});var Ax,dd,fd,qe,pd,hd,Jr,Ce,It=T(()=>{"use strict";Qu();D();ja();id();Z();ud();Se();Ax=(e,t,r)=>{var a,s;let n=t,i=Ut(n.extra)?n.extra:Mr(n.extra)?JSON.parse(n.extra):{},o=L(k({},i),{mp_id:(a=n.mp_id)!=null?a:"",mp_version:(s=n.mp_version)!=null?s:""});q("trackAsync",{event:e,data:o,webviewId:r})},{track:qe,trackPerformance:pd}=td(Ax,{type:Ca.AppSDK,platform:"native",jssdk_version:(fd=(dd=A.sdkInfo)==null?void 0:dd.jssdkVersion)!=null?fd:"1.0.0",mp_id:A.mpId,mp_version:A.mpVersion}),hd=X();hd.registerCommand("ReportSDK.traceSystemTimeline",({event:e,duration:t,extra:r})=>{pd(e,t,r)});hd.registerCommand("ReportSDK.traceSystem",({event:e,info:t})=>{qe(e,t)});Jr=new tt,Ce=new Yn(qe,Jr)});function vd(){let e=null,t=window.fetch,r=()=>{e=document.createElement("style"),e.setAttribute("data-jolibox-sdk","default-styles");let o=`
1
+ var qw=Object.create;var jn=Object.defineProperty,Uw=Object.defineProperties,Mw=Object.getOwnPropertyDescriptor,jw=Object.getOwnPropertyDescriptors,Fw=Object.getOwnPropertyNames,Mn=Object.getOwnPropertySymbols,Bw=Object.getPrototypeOf,oa=Object.prototype.hasOwnProperty,nu=Object.prototype.propertyIsEnumerable;var ru=(e,t,r)=>t in e?jn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))oa.call(t,r)&&ru(e,r,t[r]);if(Mn)for(var r of Mn(t))nu.call(t,r)&&ru(e,r,t[r]);return e},L=(e,t)=>Uw(e,jw(t));var Ze=(e,t)=>{var r={};for(var n in e)oa.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Mn)for(var n of Mn(e))t.indexOf(n)<0&&nu.call(e,n)&&(r[n]=e[n]);return r};var T=(e,t)=>()=>(e&&(t=e(e=0)),t);var f=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),iu=(e,t)=>{for(var r in t)jn(e,r,{get:t[r],enumerable:!0})},$w=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Fw(t))!oa.call(e,i)&&i!==r&&jn(e,i,{get:()=>t[i],enumerable:!(n=Mw(t,i))||n.enumerable});return e};var ce=(e,t,r)=>(r=e!=null?qw(Bw(e)):{},$w(t||!e||!e.__esModule?jn(r,"default",{value:e,enumerable:!0}):r,e));var I=(e,t,r)=>new Promise((n,i)=>{var o=l=>{try{s(r.next(l))}catch(c){i(c)}},a=l=>{try{s(r.throw(l))}catch(c){i(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,a);s((r=r.apply(e,t)).next())});function Ww(e){return!!(e!=null&&e.__nativeBuffers__)}function fa(e){if(typeof e=="string")try{e=JSON.parse(e)}catch(r){return{}}if(typeof e!="object"||e===null)return{};if(!Ww(e))return e;let t=e.__nativeBuffers__;if(delete e.__nativeBuffers__,t)for(let r=0;r<t.length;r++){let n=t[r];if(n){let i;n.value?i=n.value:n.base64&&(i=zw(n.base64)),typeof i!="undefined"&&i instanceof ArrayBuffer&&(e[n.key]=i)}}return e}function Qw(e={},t=!1){let r=e,n=[];for(let[i,o]of Object.entries(r))if(o!==void 0&&o instanceof ArrayBuffer&&o.byteLength!==void 0){let a=t?{value:o,key:i}:{base64:Yw(o),key:i};n.push(a),delete r[i]}return n.length>0&&(r.__nativeBuffers__=n),r}function tE(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function vu(e){return typeof e=="string"}function Pr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function nE(e){return typeof e=="undefined"}function iE(e){return nE(e)||e===null}function gu(e){return typeof e=="function"}function oE(e){return Pr(e)&&gu(e.then)}function _u(e){let t=e,r=null,n=function(...i){return r||(r=new t(...i)),r};return n.prototype=t.prototype,n}function Or(e){return(...t)=>{var r,n;((n=(r=globalThis.VConsole)==null?void 0:r[e])!=null?n:globalThis.console[e])(...t)}}function mE(){try{if(window.__joliboxLocalStorage__)return window.__joliboxLocalStorage__;let e=Object.getOwnPropertyDescriptor(window,"localStorage");if(e&&e.get){let n=e.get.call(window);return window.__joliboxLocalStorage__=n,n}if(e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(window),"localStorage"),e&&e.get)return e.get.call(window);let t=Window.prototype,r=Object.getOwnPropertyDescriptor(t,"localStorage");if(r&&r.get){let n=r.get.call(window);return window.__joliboxLocalStorage__=n,n}return localStorage}catch(e){return console.warn("Failed to get original localStorage, fallback to default implementation",e),localStorage}}function bE(e){return new Promise(t=>yu(e)(t))}function yu(e){return(t,r=null)=>{let n=!1;return e(i=>{if(!n)return n=!0,t.call(r,i)},null)}}function wE(e,t){return(r=>{let n,i={onWillAddFirstListener(){n=r(o.fire,o)}},o=new Dr(i);return o.event})((r,n=null)=>e(i=>t(i)&&r.call(n,i),null))}function xE(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++)AE(e[n],t[n])}function AE(e,t){if(vu(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(gu(t)){try{if(e instanceof t)return}catch(r){}if(!iE(e)&&e.constructor===t||t.length===1&&t.call(void 0,e)===!0)return;throw new Error("[Jolibox SDK]argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function lu(e,t){return`[${e}]:${t}`}function OE(e,t){cu||(la=new Bn({eventName:"jolibox_invoke",tagNameOrder:["status","method","errNo","errMsg","isForeground"],metricName:"duration",reporter(i){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:i}),-1)}}),ca=new Bn({eventName:"jolibox_invoke_js2native",tagNameOrder:["status","method","isForeground"],metricName:"duration",reporter(i){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:i}),-1)}}),ua=new Bn({eventName:"jolibox_invoke_native2js",tagNameOrder:["status","method","isForeground"],metricName:"duration",reporter(i){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:i}),-1)}}),t("onJoliboxEnterBackground",()=>{la.flush(),ca.flush(),ua.flush()}),cu=!0);function r(i){var o,a;let{method:s,args:l,startTime:c,isForeground:d,errMsg:u=`${s}:fail no errMsg`,errNo:h=0,__timing:p={receiveJSInvoke:0,invokeCallback:0}}=i,{receiveJSInvoke:m,invokeCallback:g}=p,_=(a=(o=u.match(/\S:(\S+)\s?/))==null?void 0:o[1])!=null?a:"fail";la.report({status:_,method:n(s,l),errNo:`${h}`,errMsg:u,isForeground:d,duration:Date.now()-c}),c&&m&&g&&(ca.report({status:_,method:s,isForeground:d,duration:Number((m-c).toFixed(3))}),ua.report({status:_,method:s,isForeground:d,duration:Number((Date.now()-g).toFixed(3))}))}function n(i,o){return(i==="callHostMethod"||i==="callHostMethodSync")&&o!=null&&o.method?`${i}-${o.method}`:i}return r}function DE(e,t){let r=0,n=!0,i=NE.resolveMap,o=OE(e,t);t("onJoliboxEnterBackground",()=>{n=!1}),t("onJoliboxEnterForeground",()=>{n=!0,da.forEach(l=>Hn(this,[l],function*({method:c,args:d,resolve:u}){let h=yield s(c,d);u(h)})),da.length=0});let a=(l,c)=>{let d=i.get(Number(l));if(!d)return;let u=fa(c);d(u),i.delete(Number(l))},s=(l,c)=>{var d,u;let h=Date.now(),p=`${n}`;r+=1;let m=new rE;if(i.set(r,m.resolve),!n&&TE.includes(l))return new Promise(R=>{da.push({method:l,args:c,resolve:R})});let g=Gw(xt({},{method:l,startTime:h,args:c,isForeground:p}),{invokeType:"js-bridge"}),_=!CE&&IE.includes(l),v=Qw(c,_),y=_?v:JSON.stringify(v),x;if(l.endsWith("Sync")||RE.includes(l)?x=(d=e.call)==null?void 0:d.call(e,l,v,r):typeof y=="string"?x=e.invoke(l,y,r):x=(u=e.call)==null?void 0:u.call(e,l,y,r),x){try{typeof x=="string"&&(x=JSON.parse(x)),x=fa(x)}catch(R){ya.error(R)}return i.delete(r),x.errorCode&&(x.errorCode=lu(l,x.errorCode)),o(xt(xt({},g),x)),x}return l.endsWith("Sync")&&i.delete(r),m.promise.then(R=>(R.errorCode&&(R.errorCode=lu(l,R.errorCode)),o(xt(xt({},g),R)),R))};return{invokeNative:s,applyNative:(l,c)=>{let d=s(l,c);return oE(d)?d.then(u=>uu(l,u)):uu(l,d)},invokeHandler:a}}function uu(e,t){if(!Pr(t)){ya.warn(`[Jolibox SDK]${e} no response value`);return}let r=t,{errMsg:n,errNo:i,errorType:o,errorCode:a}=r,s=Kw(r,["errMsg","errNo","errorType","errorCode"]);if(n&&n!==`${e}:ok`)throw new cE(n,i,o,a);return s}function LE(e){if(globalThis[Fn])return globalThis[Fn];let t=new ma,r=new ma,n=new Bn({eventName:"jolibox_publish",tagNameOrder:["type","event"],metricName:"duration",reporter(i){e.invoke("trackAsync",JSON.stringify({event:"reportMetrics",data:i}),-1)}});return t.on("onJoliboxEnterBackground",()=>{n.flush()}),globalThis[Fn]={onNative:t.on.bind(t),offNative:t.off.bind(t),subscribe:r.on.bind(r),unsubscribe:r.off.bind(r),subscribeHandler(i,o,a){let s=fa(o),l;if(s.__extra){l=s.params;let{type:c,startTime:d}=s.__extra;n.report({type:c,event:i,duration:Date.now()-d})}else l=s;if(i===bu){l.forEach(c=>{let[d,u]=c;try{r.emit(d.slice(Nr.length),u,a)}catch(h){}});return}if(i.startsWith(Nr)){r.emit(i.slice(Nr.length),l,a);return}t.emit(i,l,a)}},globalThis[Fn]}function qE(e){let t=new Map,r;return(n,i,o,a)=>{if(a){let l=o?[o]:"*";e.publish(`${Nr}${n}`,i,l);return}r||(r=Promise.resolve().then(()=>{t.forEach((l,c)=>{try{let d=c?[c]:"*";e.publish(bu,l,d)}catch(d){}}),r=void 0,t.clear()}));let s=t.get(o);s||(s=[],t.set(o,s)),s.push([`${Nr}${n}`,i])}}function UE(e){let{subscribeHandler:t,onNative:r,offNative:n,subscribe:i,unsubscribe:o}=LE(e),{invokeNative:a,invokeHandler:s,applyNative:l}=DE(e,r),c=qE(e);return{invokeHandler:s,subscribeHandler:t,applyNative:l,invokeNative:a,onNative:r,offNative:n,publish:c,subscribe:i,unsubscribe:o}}function wu(e,t){return{params:e,__extra:{startTime:Date.now(),type:t}}}var Hw,Jw,Vw,$n,fu,pu,ou,xt,Gw,Kw,Hn,zw,Yw,hu,Xw,Zw,mu,eE,rE,aE,sE,Jn,lE,cE,uE,aa,ya,au,dE,fE,pE,hE,vE,sU,pa,G,gE,_E,Cr,Dr,ma,va,yE,sa,EE,lU,ga,su,cU,SE,Nr,IE,TE,RE,bu,kE,Bn,cu,la,ca,ua,da,CE,_a,PE,NE,Fn,ba,Je,Eu,xu,ME,Au,du,Oe,q,Ve,uU,jE,Su,dU,fU,Se=T(()=>{"use strict";Hw=Object.defineProperty,Jw=Object.defineProperties,Vw=Object.getOwnPropertyDescriptors,$n=Object.getOwnPropertySymbols,fu=Object.prototype.hasOwnProperty,pu=Object.prototype.propertyIsEnumerable,ou=(e,t,r)=>t in e?Hw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t)=>{for(var r in t||(t={}))fu.call(t,r)&&ou(e,r,t[r]);if($n)for(var r of $n(t))pu.call(t,r)&&ou(e,r,t[r]);return e},Gw=(e,t)=>Jw(e,Vw(t)),Kw=(e,t)=>{var r={};for(var n in e)fu.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$n)for(var n of $n(e))t.indexOf(n)<0&&pu.call(e,n)&&(r[n]=e[n]);return r},Hn=(e,t,r)=>new Promise((n,i)=>{var o=l=>{try{s(r.next(l))}catch(c){i(c)}},a=l=>{try{s(r.throw(l))}catch(c){i(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,a);s((r=r.apply(e,t)).next())});zw=e=>{let t=atob(e),r=t.length,n=new Uint8Array(r);for(let i=0;i<r;i++)n[i]=t.charCodeAt(i);return n.buffer};Yw=e=>{let t="",r=new Uint8Array(e),n=r.byteLength;for(let i=0;i<n;i++)t+=String.fromCharCode(r[i]);return btoa(t)};hu=Object.defineProperty,Xw=Object.getOwnPropertyDescriptor,Zw=(e,t)=>{for(var r in t)hu(e,r,{get:t[r],enumerable:!0})},mu=(e,t,r,n)=>{for(var i=n>1?void 0:n?Xw(t,r):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(n?a(t,r,i):a(i))||i);return n&&i&&hu(t,r,i),i},eE=(e,t,r)=>new Promise((n,i)=>{var o=l=>{try{s(r.next(l))}catch(c){i(c)}},a=l=>{try{s(r.throw(l))}catch(c){i(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,a);s((r=r.apply(e,t)).next())});if(typeof window!="undefined"&&!window.AbortController){let e=function(){this.signal=new t};e.prototype.abort=function(){this.signal._aborted=!0,typeof this.signal.onabort=="function"&&this.signal.onabort(new Event("abort"));let r=new Event("abort");this.signal.dispatchEvent(r)};let t=function(){this._aborted=!1,this.aborted=!1,this.onabort=null,this._eventListeners={}};Object.defineProperty(t.prototype,"aborted",{get:function(){return this._aborted}}),t.prototype.addEventListener=function(r,n){this._eventListeners[r]||(this._eventListeners[r]=[]),this._eventListeners[r].push(n)},t.prototype.removeEventListener=function(r,n){if(!this._eventListeners[r])return;let i=this._eventListeners[r].indexOf(n);i!==-1&&this._eventListeners[r].splice(i,1)},t.prototype.dispatchEvent=function(r){if(this._eventListeners[r.type])for(let n of this._eventListeners[r.type])n.call(this,r)},window.AbortController=e,window.AbortSignal=t}rE=class{constructor(){this.state="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.state==="pending"&&(this.state="fulfilled",e(r))},this.reject=r=>{this.state==="pending"&&(this.state="rejected",t(r))}})}};aE=(e=>(e[e.DEVELOPER_FILE_NOT_FOUND=0]="DEVELOPER_FILE_NOT_FOUND",e[e.INTERNAL_IOS_CAN_NOT_FOUND_PKG=1]="INTERNAL_IOS_CAN_NOT_FOUND_PKG",e[e.USER_IOS_LOAD_TIMEOUT=2]="USER_IOS_LOAD_TIMEOUT",e[e.INTERNAL_IOS_PKG_LOAD_ERROR=3]="INTERNAL_IOS_PKG_LOAD_ERROR",e[e.INTERNAL_IOS_PKG_PARSE_FAIL=4]="INTERNAL_IOS_PKG_PARSE_FAIL",e[e.USER_IOS_GET_EMPTY_DATA=5]="USER_IOS_GET_EMPTY_DATA",e[e.USER_ANDROID_GET_PKG_FAIL=6]="USER_ANDROID_GET_PKG_FAIL",e[e.DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE=7]="DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE",e))(aE||{}),sE=class extends Error{constructor(e){if(typeof e=="string"){super(e),this.priority="P1";return}super(e.message),this.priority="P1",this.stack=e.stack,this.raw=e}},Jn=class extends sE{constructor(){super(...arguments),this.kind="INTERNAL_ERROR"}},lE=class extends Jn{constructor(){super(...arguments),this.name="INTERNAL_INVOKE_NATIVE_ERROR"}},cE=class extends Jn{constructor(e,t,r,n){super(e),this.errNo=t,this.name="INTERNAL_APPLY_NATIVE_ERROR",this.errorType=r,this.errorCode=n}},uE=class extends Jn{constructor(){super(...arguments),this.name="INTERNAL_JSCORE_ERROR",this.priority="P0"}},aa=class extends Jn{constructor(){super(...arguments),this.name="INTERNAL_METRIC_REPORT_ERROR"}};ya={log:Or("log"),warn:Or("warn"),info:Or("info"),error:Or("error"),debug:Or("debug")};Object.assign(globalThis,{logger:ya});au=Symbol.for("Jolibox.canIUseMap"),dE={};globalThis[au]||(globalThis[au]=dE);fE=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(fE||{}),pE=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(pE||{}),hE=(e=>(e[e.App=0]="App",e[e.H5=1]="H5",e[e.Weapp=2]="Weapp",e[e.Alipay=3]="Alipay",e[e.Gcash=4]="Gcash",e[e.Dana=5]="Dana",e[e.Umma=6]="Umma",e[e.WebSDK=1e3]="WebSDK",e[e.AppSDK=1001]="AppSDK",e[e.Other=9999]="Other",e))(hE||{});mE();vE=()=>!!(navigator.userAgent||"").includes("JoliboxPlatformSDK"),sU={isiOS:navigator.userAgent.includes("iPhone")||navigator.userAgent.includes("iPod")||navigator.userAgent.includes("iPad")||navigator.userAgent.includes("iPhone OS"),iosVersion:()=>{let e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3]||"0",10)]},isAndroid:navigator.userAgent.includes("Android"),isMac:navigator.userAgent.includes("Mac"),isFacebook:navigator.userAgent.includes("FB_IAB"),isPC:!navigator.userAgent.includes("iPhone")&&!navigator.userAgent.includes("Android")},pa=class ha{constructor(t){this.element=t,this.next=ha.Undefined,this.prev=ha.Undefined}};pa.Undefined=new pa(void 0);G=pa,gE=class{constructor(){this._first=G.Undefined,this._last=G.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===G.Undefined}clear(){let e=this._first;for(;e!==G.Undefined;){let t=e.next;e.prev=G.Undefined,e.next=G.Undefined,e=t}this._first=G.Undefined,this._last=G.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new G(e);if(this._first===G.Undefined)this._first=r,this._last=r;else if(t){let i=this._last;this._last=r,r.prev=i,i.next=r}else{let i=this._first;this._first=r,r.next=i,i.prev=r}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(r))}}shift(){if(this._first!==G.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==G.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==G.Undefined&&e.next!==G.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===G.Undefined&&e.next===G.Undefined?(this._first=G.Undefined,this._last=G.Undefined):e.next===G.Undefined?(this._last=this._last.prev,this._last.next=G.Undefined):e.prev===G.Undefined&&(this._first=this._first.next,this._first.prev=G.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==G.Undefined;)yield e.element,e=e.next}},_E=0,Cr=class{constructor(e){this.value=e,this.id=_E++}},Dr=class{constructor(e){this.options=e,this._size=0}dispose(e){var t,r;this._disposed||(this._disposed=!0,this._listeners&&(e?(this._listeners instanceof Cr&&(this._listeners=[this._listeners]),this._listeners=this._listeners.filter(n=>(n==null?void 0:n.value)===e)):(this._listeners=void 0,this._size=0)),(r=(t=this.options)==null?void 0:t.onDidRemoveLastListener)==null||r.call(t))}get event(){var e;return(e=this._event)!=null||(this._event=(t,r)=>{var n,i,o,a,s,l;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};r&&(t=t.bind(r));let c=new Cr(t);return this._listeners?this._listeners instanceof Cr?this._listeners=[this._listeners,c]:this._listeners.push(c):((i=(n=this.options)==null?void 0:n.onWillAddFirstListener)==null||i.call(n,this),this._listeners=c,(a=(o=this.options)==null?void 0:o.onDidFirstListener)==null||a.call(o,this)),(l=(s=this.options)==null?void 0:s.onDidAddListener)==null||l.call(s,this),this._size++,()=>{var d,u,h,p;if(!this._disposed){if(this._listeners instanceof Cr)this._listeners.id===c.id&&(this._listeners=void 0,this._size=0,(u=(d=this.options)==null?void 0:d.onDidRemoveLastListener)==null||u.call(d));else if(this._listeners){let m=this._listeners.indexOf(c);m>=0&&(this._listeners.splice(m,1),this._size--,this._size===0&&((p=(h=this.options)==null?void 0:h.onDidRemoveLastListener)==null||p.call(h)))}}}}),this._event}_deliver(e,t){var r;if(!e)return;let n=((r=this.options)==null?void 0:r.onListenerError)||Error.constructor;if(!n){e.value(t);return}try{e.value(t)}catch(i){n(i)}}fire(e){this._listeners&&(this._listeners instanceof Cr?this._deliver(this._listeners,e):this._listeners.forEach(t=>this._deliver(t,e)))}hasListeners(){return this._size>0}},ma=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,t,r=!0){var n;let i=(n=this.listeners.get(e))!=null?n:new Dr,o=l=>t(...l.args),a=i.event(o);this.listerHandlerMap.set(t,{handler:o,dispose:a}),this.listeners.set(e,i);let s=this.cachedEventQueue.get(e);if(s&&r)for(let l of s)t(...l.args)}flushCachedEvent(e){e?this.cachedEventQueue.delete(e):this.cachedEventQueue.clear()}off(e,t){let r=this.listerHandlerMap.get(t);r&&(r.dispose(),this.listerHandlerMap.delete(t))}emit(e,...t){let r=this.listeners.get(e),n=this.cachedEventQueue.get(e);n||(n=new gE,this.cachedEventQueue.set(e,n)),n.push({args:t}),r&&r.fire({event:e,args:t})}once(e,t){let r=(...n)=>{t(...n),this.off(e,r)};this.on(e,r,!1)}},va={};Zw(va,{None:()=>yE,filter:()=>wE,once:()=>yu,toPromise:()=>bE});yE=()=>(console.log("[Jolibox SDK] None Event"),()=>{console.log("[Jolibox SDK] None Event dispose")});sa=Symbol.for("Jolibox.hostEmitter"),EE=()=>{let e=new ma;return globalThis[sa]||(globalThis[sa]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e),once:e.once.bind(e)}),globalThis[sa]},lU=EE();ga=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Dr,this.onDidRegisterCommand=this._onDidRegisterCommand.event,console.log("[Jolibox SDK] command registry")}registerCommand(e){if(!e)throw new Error("invalid command");if(e.metadata&&Array.isArray(e.metadata.args)){let r=[];for(let i of e.metadata.args)r.push(i.constraint);let n=e.handler;e.handler=function(...i){return xE(i,r),n(...i)}}let{id:t}=e;this._commands.get(t)&&console.info(`[Jolibox SDK] duplicated command is registered ${t}`),this._commands.set(t,e),this._onDidRegisterCommand.fire(t)}getCommand(e){return this._commands.get(e)}getCommands(){let e=new Map;for(let t of this._commands.keys()){let r=this.getCommand(t);r&&e.set(t,r)}return e}};ga=mu([_u],ga);su=class{constructor(){this._onWillExecuteCommand=new Dr,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new Dr,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new ga,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=tE(3e4)),this._starActivation}executeCommand(e,...t){return eE(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,t):(yield Promise.all([Promise.race([this._activateStar(),va.toPromise(va.filter(this.registry.onDidRegisterCommand,r=>r===e))])]),this._tryExecuteCommand(e,t))})}executeCommandThowErr(e,...t){if(!this.registry.getCommand(e))throw new Error(`command '${e}' not found`);let r=this.registry.getCommand(e);this._onWillExecuteCommand.fire({commandId:e,args:t});let n=this.invokeFunction(r.handler,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),n}_tryExecuteCommand(e,t){let r=this.registry.getCommand(e);if(!r)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});let n=this.invokeFunction(r.handler,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}invokeFunction(e,...t){let r=!1;try{return e(...t)}finally{r=!0}}};su=mu([_u],su);cU=Symbol.for("Jolibox.commands");SE=()=>vE(),Nr="custom_event_",IE=[],TE=[],RE=["env","createRequestTask","login"],bu="__batch_event__",kE=e=>e==="pv"?e:"default",Bn=class{constructor(e){this.interval=30,this.lastReportTime=0,this.cache={};let{reporter:t,interval:r=30,eventName:n,tagNameOrder:i,metricName:o,type:a}=e;this.reporter=t,this.interval=r,this.eventName=n,this.tagNameOrder=i,this.metricName=o,this.type=kE(a)}report(e){this.type==="pv"?this.addPVPoint(e):this.addPoint(e),this.tryReport(!1)}flush(){this.tryReport(!0)}tryReport(e){if(Object.keys(this.cache).length){if(e){this.reporter(this.processPoints(this.cache)),this.clearPoints();return}this.lastReportTime=this.lastReportTime||Date.now(),Date.now()-this.lastReportTime>=this.interval*1e3&&(this.reporter(this.processPoints(this.cache)),this.clearPoints(),this.lastReportTime=Date.now())}}addPoint(e){let t=(r,n,i,o)=>{let a=n.shift();if(a){let s=o[a];r[s]||(r[s]={}),t(r[s],n,i,o)}else r[i]||(r[i]=[]),r[i].push(o[i])};t(this.cache,[...this.tagNameOrder],this.metricName,e)}addPVPoint(e){let t=(n,i,o,a)=>{let s=i.shift();if(!s&&Pr(a))throw new aa(`report value failed to match tagNameOrder, ${JSON.stringify(r)}`);if(s){let l=[];if(Pr(a))l.push(...Object.keys(a));else if(vu(a)){if(i.length>0)throw new aa(`report value failed to match tagNameOrder, ${JSON.stringify(r)}`);l.push(a)}else throw new aa(`expected metric value to be a string, but got a(n) ${typeof a}, ${JSON.stringify(r)}`);l.forEach(c=>{n[c]||(n[c]={});let d=Pr(a)?a[c]:a;t(n[c],[...i],o,d)})}else n[o]?n[o]++:n[o]=1},r={point:e,metricName:this.metricName,tagNameOrder:this.tagNameOrder};t(this.cache,[...this.tagNameOrder],this.metricName,e)}processPoints(e){return{eventName:this.eventName,tagNameOrder:this.tagNameOrder,metricName:this.metricName,metricAggregateType:this.type==="pv"?"itoa":"arr",data:e}}clearPoints(){this.cache={}}},cu=!1;da=[],CE=!1,_a=Symbol.for("Jolibox.invokeResolverInstance"),PE=new Map;globalThis[_a]||(globalThis[_a]=PE);NE={get resolveMap(){return globalThis[_a]}};Fn=Symbol.for("Jolibox.subscribeInstance");Je={trigger(){},exit(){return Promise.resolve(!1)},backPress(){return Promise.resolve(!1)},onReady(e){Je.trigger=e},onDoExit(e){Je.exit=e},onDoBackPress(e){Je.backPress=e}},Eu=e=>{let t=window.prompt("invoke",JSON.stringify({event:"envSync",paramsString:JSON.stringify({})}));if(!t)e.onError(new lE("native env failed"));else{let{data:r}=JSON.parse(t);return r!=null?r:void 0}};if(window.webkit){let e=window.webkit.messageHandlers,t=(i="")=>{Je.trigger(),e.onDocumentReady.postMessage({path:i})},r=i=>Hn(void 0,null,function*(){let o=yield Je.exit();e.doExit.postMessage({uuid:i,shouldInterrupt:o})});ba={onDocumentReady:t,doExit:r,invoke(i,o,a){e.invoke.postMessage({event:i,paramsString:o,callbackId:a})},publish(i,o,a){let s=wu(o,"joliboxJSCore");window.prompt("publish",JSON.stringify({event:i,paramsString:JSON.stringify(s),webviewIds:a}))},call(i,o,a){let s=window.prompt("invoke",JSON.stringify({event:i,paramsString:JSON.stringify(o),callbackId:a}));if(s)return JSON.parse(s)}};let n={onDocumentReady:t,env:Eu,doExit:r};globalThis.joliboxJSCore=xt({},n)}if(window.JoliAndroidSDKBridge){let e,t=window.JoliAndroidSDKBridge,r=(o="")=>{Je.trigger(),t.onDocumentReady(JSON.stringify({path:o}))},n=o=>Hn(void 0,null,function*(){let a=yield Je.exit();t.doExit(JSON.stringify({uuid:o,shouldInterrupt:a}))});ba={onDocumentReady:r,invoke(o,a,s){t.invoke(JSON.stringify({event:o,paramsString:a,callbackId:s}))},doExit:n,publish(o,a,s){let l=wu(a,"joliboxJSCore");t.publish({event:o,paramsString:JSON.stringify(l),webviewIds:s})},call(o,a,s){let l=window.prompt("invoke",JSON.stringify({event:o,paramsString:JSON.stringify(a),callbackId:s}));if(l)return JSON.parse(l)},doBackPress(o){return Hn(this,null,function*(){let a=yield Je.backPress();t.doBackPress(JSON.stringify({uuid:o,shouldInterrupt:a}))})}};let i={onDocumentReady:r,env:Eu,doExit:n};globalThis.joliboxJSCore=xt({},i)}xu=ba;if(!xu&&SE())throw new uE("No joliboxJScore is found, native bridge not found.");ME=xt({},xu),Au=UE(ME),{invokeHandler:du}=Au,{applyNative:Oe,invokeNative:q,onNative:Ve,offNative:uU,subscribeHandler:jE,publish:Su,subscribe:dU,unsubscribe:fU}=Au;globalThis.joliboxJSBridge={callHandler:du,invokeHandler:du,subscribeHandler:jE}});function GE(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function Mr(e){return typeof e=="string"}function Ut(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function Ou(e){return typeof e=="object"&&Array.isArray(e)}function jr(e){return e===!0||e===!1}function Cu(e){return typeof e=="undefined"}function KE(e){return Cu(e)||e===null}function WE(e){return typeof e=="function"}function Pu(e){let t=e,r=null,n=function(...i){return r||(r=new t(...i)),r};return n.prototype=t.prototype,n}function Nu(e,t,r){if(typeof r!="function")throw new Error("[Jolibox SDK]Customizer must be a function");function n(i,o){for(let a in o)if(Object.prototype.hasOwnProperty.call(o,a)){let s=i[a],l=o[a],c=r(s,l,a,i,o);c!==void 0?i[a]=c:Ru(l)&&Ru(s)?i[a]=n(HE({},s),l):Array.isArray(l)&&Array.isArray(s)?i[a]=[...s,...l]:i[a]=l}return i}return n(e,t)}function Ru(e){return e&&typeof e=="object"&&e.constructor===Object}function Du(e,t){if(Array.isArray(e))return e.concat(t)}function Fr(e,t,r={}){let n=null,i,o,a,{leading:s=!1,trailing:l=!0}=r,c=()=>(a=e.apply(o,i),i=void 0,o=void 0,a),d=function(...u){i=u,o=this;let h=s&&!n;if(n&&clearTimeout(n),n=setTimeout(()=>{n=null,l&&!h&&c()},t),h)return c()};return d.cancel=()=>{n&&clearTimeout(n),n=null,i=o=void 0},d.flush=()=>{if(n)return clearTimeout(n),n=null,c()},d}function YE(e,t){return(...r)=>t(e,...r)}function Gn(e){return t=>YE(t,function(r,...n){if(typeof r=="function")try{return r.apply(this,n)}catch(i){e(new Br(`${i}`))}})}function Lr(e){return(...t)=>{var r,n;((n=(r=globalThis.VConsole)==null?void 0:r[e])!=null?n:globalThis.console[e])(...t)}}function Na(){try{if(window.__joliboxLocalStorage__)return window.__joliboxLocalStorage__;let e=Object.getOwnPropertyDescriptor(window,"localStorage");if(e&&e.get){let n=e.get.call(window);return window.__joliboxLocalStorage__=n,n}if(e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(window),"localStorage"),e&&e.get)return e.get.call(window);let t=Window.prototype,r=Object.getOwnPropertyDescriptor(t,"localStorage");if(r&&r.get){let n=r.get.call(window);return window.__joliboxLocalStorage__=n,n}return localStorage}catch(e){return console.warn("Failed to get original localStorage, fallback to default implementation",e),localStorage}}function ox(e){return new Promise(t=>$u(e)(t))}function $u(e){return(t,r=null)=>{let n=!1;return e(i=>{if(!n)return n=!0,t.call(r,i)},null)}}function ax(e,t){return(r=>{let n,i={onWillAddFirstListener(){n=r(o.fire,o)}},o=new Ur(i);return o.event})((r,n=null)=>e(i=>t(i)&&r.call(n,i),null))}function lx(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++)cx(e[n],t[n])}function cx(e,t){if(Mr(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(WE(t)){try{if(e instanceof t)return}catch(r){}if(!KE(e)&&e.constructor===t||t.length===1&&t.call(void 0,e)===!0)return;throw new Error("[Jolibox SDK]argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function ux(){return typeof globalThis!="undefined"?globalThis[Hu]:void 0}function dx(e){typeof globalThis!="undefined"&&(globalThis[Hu]=e)}function X(){let e=ux();if(e)return e;let t=new Vn,r=new Ia,n={registerCommand(i,o,a){t.registerCommand({id:i,handler:o,metadata:a})},executeCommand(i,...o){return r.executeCommand(i,...o)},excuteCommandSync(i,...o){return r.executeCommandThowErr(i,...o)}};return dx(n),n}var Ta,FE,Iu,BE,$E,Tu,HE,JE,ku,VE,At,zE,Ra,ka,Lu,qu,Br,Uu,Mu,$r,Oa,et,Ea,QE,Ca,XE,Pa,ZE,Kn,Hr,ex,tx,ju,Fu,Bu,xa,K,rx,nx,qr,Ur,tt,Sa,ix,wa,sx,ue,Vn,Ia,Hu,D=T(()=>{"use strict";Ta=Object.defineProperty,FE=Object.getOwnPropertyDescriptor,Iu=Object.getOwnPropertySymbols,BE=Object.prototype.hasOwnProperty,$E=Object.prototype.propertyIsEnumerable,Tu=(e,t,r)=>t in e?Ta(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,HE=(e,t)=>{for(var r in t||(t={}))BE.call(t,r)&&Tu(e,r,t[r]);if(Iu)for(var r of Iu(t))$E.call(t,r)&&Tu(e,r,t[r]);return e},JE=(e,t)=>{for(var r in t)Ta(e,r,{get:t[r],enumerable:!0})},ku=(e,t,r,n)=>{for(var i=n>1?void 0:n?FE(t,r):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(n?a(t,r,i):a(i))||i);return n&&i&&Ta(t,r,i),i},VE=(e,t,r)=>new Promise((n,i)=>{var o=l=>{try{s(r.next(l))}catch(c){i(c)}},a=l=>{try{s(r.throw(l))}catch(c){i(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,a);s((r=r.apply(e,t)).next())});if(typeof window!="undefined"&&!window.AbortController){let e=function(){this.signal=new t};e.prototype.abort=function(){this.signal._aborted=!0,typeof this.signal.onabort=="function"&&this.signal.onabort(new Event("abort"));let r=new Event("abort");this.signal.dispatchEvent(r)};let t=function(){this._aborted=!1,this.aborted=!1,this.onabort=null,this._eventListeners={}};Object.defineProperty(t.prototype,"aborted",{get:function(){return this._aborted}}),t.prototype.addEventListener=function(r,n){this._eventListeners[r]||(this._eventListeners[r]=[]),this._eventListeners[r].push(n)},t.prototype.removeEventListener=function(r,n){if(!this._eventListeners[r])return;let i=this._eventListeners[r].indexOf(n);i!==-1&&this._eventListeners[r].splice(i,1)},t.prototype.dispatchEvent=function(r){if(this._eventListeners[r.type])for(let n of this._eventListeners[r.type])n.call(this,r)},window.AbortController=e,window.AbortSignal=t}At=class{constructor(){this.state="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.state==="pending"&&(this.state="fulfilled",e(r))},this.reject=r=>{this.state==="pending"&&(this.state="rejected",t(r))}})}};zE=(e=>(e[e.DEVELOPER_FILE_NOT_FOUND=0]="DEVELOPER_FILE_NOT_FOUND",e[e.INTERNAL_IOS_CAN_NOT_FOUND_PKG=1]="INTERNAL_IOS_CAN_NOT_FOUND_PKG",e[e.USER_IOS_LOAD_TIMEOUT=2]="USER_IOS_LOAD_TIMEOUT",e[e.INTERNAL_IOS_PKG_LOAD_ERROR=3]="INTERNAL_IOS_PKG_LOAD_ERROR",e[e.INTERNAL_IOS_PKG_PARSE_FAIL=4]="INTERNAL_IOS_PKG_PARSE_FAIL",e[e.USER_IOS_GET_EMPTY_DATA=5]="USER_IOS_GET_EMPTY_DATA",e[e.USER_ANDROID_GET_PKG_FAIL=6]="USER_ANDROID_GET_PKG_FAIL",e[e.DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE=7]="DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE",e))(zE||{}),Ra=class extends Error{constructor(e){if(typeof e=="string"){super(e),this.priority="P1";return}super(e.message),this.priority="P1",this.stack=e.stack,this.raw=e}},ka=class extends Ra{constructor(){super(...arguments),this.kind="INTERNAL_ERROR"}},Lu=class extends Ra{constructor(){super(...arguments),this.kind="USER_ERROR"}},qu=class extends Lu{constructor(){super(...arguments),this.name="USER_VALIDATE_ERROR"}},Br=class extends Lu{constructor(e,t,r){super(e),this.message=e,this.errNo=t,this.name="USER_CUSTOM_ERROR",this.errMsg=e,r&&(this.extra=Object.assign({},this.extra,r))}},Uu=class extends ka{constructor(){super(...arguments),this.name="INTERNAL_SCHEMA_PARSE_ERROR",this.priority="P0"}},Mu=class extends ka{constructor(){super(...arguments),this.name="INTERNAL_GLOBAL_JS_ERROR",this.priority="P1"}},$r=class extends Ra{constructor(e,t,r,n,i){super(e),this.message=e,this.code=t,this.kind="API_ERROR",this.name="API_ERROR",r&&(this.errorType=r),n!==void 0&&(this.stack=n),i&&(this.priority=i)}toJSON(){return{message:this.message,stack:this.stack,name:this.name,code:this.code,errorType:this.errorType}}},Oa=class extends ka{constructor(){super(...arguments),this.name="INTERNAL_REPORTER_ERROR"}};et={log:Lr("log"),warn:Lr("warn"),info:Lr("info"),error:Lr("error"),debug:Lr("debug")};Object.assign(globalThis,{logger:et});Ea=Symbol.for("Jolibox.canIUseMap"),QE={};globalThis[Ea]||(globalThis[Ea]=QE);Ca={get config(){return globalThis[Ea]}},XE=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(XE||{}),Pa=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(Pa||{}),ZE=(e=>(e[e.App=0]="App",e[e.H5=1]="H5",e[e.Weapp=2]="Weapp",e[e.Alipay=3]="Alipay",e[e.Gcash=4]="Gcash",e[e.Dana=5]="Dana",e[e.Umma=6]="Umma",e[e.WebSDK=1e3]="WebSDK",e[e.AppSDK=1001]="AppSDK",e[e.Other=9999]="Other",e))(ZE||{}),Kn=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)});Na();Hr={isiOS:navigator.userAgent.includes("iPhone")||navigator.userAgent.includes("iPod")||navigator.userAgent.includes("iPad")||navigator.userAgent.includes("iPhone OS"),iosVersion:()=>{let e=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3]||"0",10)]},isAndroid:navigator.userAgent.includes("Android"),isMac:navigator.userAgent.includes("Mac"),isFacebook:navigator.userAgent.includes("FB_IAB"),isPC:!navigator.userAgent.includes("iPhone")&&!navigator.userAgent.includes("Android")},ex="device_id",tx="advertising_id",ju=e=>(window.__joliboxLocalStorage__.getItem(e)||window.__joliboxLocalStorage__.setItem(e,Kn()),window.__joliboxLocalStorage__.getItem(e)),Fu=()=>new URLSearchParams(window.location.search).get("deviceId")||ju(ex),Bu=()=>new URLSearchParams(window.location.search).get("advertisingId")||ju(tx),xa=class Aa{constructor(t){this.element=t,this.next=Aa.Undefined,this.prev=Aa.Undefined}};xa.Undefined=new xa(void 0);K=xa,rx=class{constructor(){this._first=K.Undefined,this._last=K.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===K.Undefined}clear(){let e=this._first;for(;e!==K.Undefined;){let t=e.next;e.prev=K.Undefined,e.next=K.Undefined,e=t}this._first=K.Undefined,this._last=K.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new K(e);if(this._first===K.Undefined)this._first=r,this._last=r;else if(t){let i=this._last;this._last=r,r.prev=i,i.next=r}else{let i=this._first;this._first=r,r.next=i,i.prev=r}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(r))}}shift(){if(this._first!==K.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==K.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==K.Undefined&&e.next!==K.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===K.Undefined&&e.next===K.Undefined?(this._first=K.Undefined,this._last=K.Undefined):e.next===K.Undefined?(this._last=this._last.prev,this._last.next=K.Undefined):e.prev===K.Undefined&&(this._first=this._first.next,this._first.prev=K.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==K.Undefined;)yield e.element,e=e.next}},nx=0,qr=class{constructor(e){this.value=e,this.id=nx++}},Ur=class{constructor(e){this.options=e,this._size=0}dispose(e){var t,r;this._disposed||(this._disposed=!0,this._listeners&&(e?(this._listeners instanceof qr&&(this._listeners=[this._listeners]),this._listeners=this._listeners.filter(n=>(n==null?void 0:n.value)===e)):(this._listeners=void 0,this._size=0)),(r=(t=this.options)==null?void 0:t.onDidRemoveLastListener)==null||r.call(t))}get event(){var e;return(e=this._event)!=null||(this._event=(t,r)=>{var n,i,o,a,s,l;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};r&&(t=t.bind(r));let c=new qr(t);return this._listeners?this._listeners instanceof qr?this._listeners=[this._listeners,c]:this._listeners.push(c):((i=(n=this.options)==null?void 0:n.onWillAddFirstListener)==null||i.call(n,this),this._listeners=c,(a=(o=this.options)==null?void 0:o.onDidFirstListener)==null||a.call(o,this)),(l=(s=this.options)==null?void 0:s.onDidAddListener)==null||l.call(s,this),this._size++,()=>{var d,u,h,p;if(!this._disposed){if(this._listeners instanceof qr)this._listeners.id===c.id&&(this._listeners=void 0,this._size=0,(u=(d=this.options)==null?void 0:d.onDidRemoveLastListener)==null||u.call(d));else if(this._listeners){let m=this._listeners.indexOf(c);m>=0&&(this._listeners.splice(m,1),this._size--,this._size===0&&((p=(h=this.options)==null?void 0:h.onDidRemoveLastListener)==null||p.call(h)))}}}}),this._event}_deliver(e,t){var r;if(!e)return;let n=((r=this.options)==null?void 0:r.onListenerError)||Error.constructor;if(!n){e.value(t);return}try{e.value(t)}catch(i){n(i)}}fire(e){this._listeners&&(this._listeners instanceof qr?this._deliver(this._listeners,e):this._listeners.forEach(t=>this._deliver(t,e)))}hasListeners(){return this._size>0}},tt=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,t,r=!0){var n;let i=(n=this.listeners.get(e))!=null?n:new Ur,o=l=>t(...l.args),a=i.event(o);this.listerHandlerMap.set(t,{handler:o,dispose:a}),this.listeners.set(e,i);let s=this.cachedEventQueue.get(e);if(s&&r)for(let l of s)t(...l.args)}flushCachedEvent(e){e?this.cachedEventQueue.delete(e):this.cachedEventQueue.clear()}off(e,t){let r=this.listerHandlerMap.get(t);r&&(r.dispose(),this.listerHandlerMap.delete(t))}emit(e,...t){let r=this.listeners.get(e),n=this.cachedEventQueue.get(e);n||(n=new rx,this.cachedEventQueue.set(e,n)),n.push({args:t}),r&&r.fire({event:e,args:t})}once(e,t){let r=(...n)=>{t(...n),this.off(e,r)};this.on(e,r,!1)}},Sa={};JE(Sa,{None:()=>ix,filter:()=>ax,once:()=>$u,toPromise:()=>ox});ix=()=>(console.log("[Jolibox SDK] None Event"),()=>{console.log("[Jolibox SDK] None Event dispose")});wa=Symbol.for("Jolibox.hostEmitter"),sx=()=>{let e=new tt;return globalThis[wa]||(globalThis[wa]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e),once:e.once.bind(e)}),globalThis[wa]},ue=sx();Vn=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Ur,this.onDidRegisterCommand=this._onDidRegisterCommand.event,console.log("[Jolibox SDK] command registry")}registerCommand(e){if(!e)throw new Error("invalid command");if(e.metadata&&Array.isArray(e.metadata.args)){let r=[];for(let i of e.metadata.args)r.push(i.constraint);let n=e.handler;e.handler=function(...i){return lx(i,r),n(...i)}}let{id:t}=e;this._commands.get(t)&&console.info(`[Jolibox SDK] duplicated command is registered ${t}`),this._commands.set(t,e),this._onDidRegisterCommand.fire(t)}getCommand(e){return this._commands.get(e)}getCommands(){let e=new Map;for(let t of this._commands.keys()){let r=this.getCommand(t);r&&e.set(t,r)}return e}};Vn=ku([Pu],Vn);Ia=class{constructor(){this._onWillExecuteCommand=new Ur,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new Ur,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new Vn,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=GE(3e4)),this._starActivation}executeCommand(e,...t){return VE(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,t):(yield Promise.all([Promise.race([this._activateStar(),Sa.toPromise(Sa.filter(this.registry.onDidRegisterCommand,r=>r===e))])]),this._tryExecuteCommand(e,t))})}executeCommandThowErr(e,...t){if(!this.registry.getCommand(e))throw new Error(`command '${e}' not found`);let r=this.registry.getCommand(e);this._onWillExecuteCommand.fire({commandId:e,args:t});let n=this.invokeFunction(r.handler,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),n}_tryExecuteCommand(e,t){let r=this.registry.getCommand(e);if(!r)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});let n=this.invokeFunction(r.handler,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}invokeFunction(e,...t){let r=!1;try{return e(...t)}finally{r=!0}}};Ia=ku([Pu],Ia);Hu=Symbol.for("Jolibox.commands")});function Ie(e,t={}){Da.emit("ERROR_REPORT",{error:e,options:t})}var Da,Mt,rt=T(()=>{"use strict";D();D();Da=new tt,Mt=new tt;Ie.debounce=Fr(Ie,50,{leading:!0})});var La,fx,Ju,Vu,Gu=T(()=>{"use strict";D();rt();La=e=>{let t=e.replace(/-/g,"+").replace(/_/g,"/"),r=t.length%4===0?"":"=".repeat(4-t.length%4),n=atob(t+r);try{return JSON.parse(n)}catch(i){return{}}},fx=e=>{let t=JSON.stringify(e);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},Ju=e=>{var t;try{let i=(t=new URL(e).searchParams.get("joliSource"))==null?void 0:t.split(".");if(i!=null&&i.length){let[o,a,s]=i;return{headerJson:La(o),payloadJson:La(a),signature:La(s)}}else throw"joli_source is missing"}catch(r){return Ie(new Uu(`${e} not a valid schema: ${r}`)),{headerJson:{},payloadJson:{},signature:{}}}},Vu=(e,t)=>{let r=t.split(".");if(r&&r.length===3){let n=r[0],i=fx(e),o=r[2];return`${n}.${i}.${o}`}return t}});var px,qa,Ku=T(()=>{"use strict";D();px="1.1.20",qa=()=>px});var hx,Wu,Ua,zu,me,mx,A,Z=T(()=>{"use strict";D();Gu();Ku();D();hx={deviceInfo:{brand:"UnknownBrand",model:"UnknownModel",did:Fu(),adId:Bu(),pixelRatio:window.devicePixelRatio||1,platform:Hr.isAndroid?"android":Hr.isiOS?"ios":"h5",system:"UnknownSystemVersion",lang:"zh"},sdkInfo:{nativeSDKVersion:"",jssdkVersion:qa()},schema:window.location.href,platform:Hr.isAndroid?"android":Hr.isiOS?"ios":"h5"},Ua=(Wu=globalThis.joliboxJSCore)==null?void 0:Wu.env,me=Object.assign({},(zu=Ua==null?void 0:Ua())!=null?zu:hx),mx=()=>{var h,p,m,g,_,v,y,x,R,C,S;let{payloadJson:e,headerJson:t,signature:r}=me.schema.length?Ju(me.schema):{},n=`${me.deviceInfo.did}-${new Date().getTime()}`,o=new URL(me.schema.length?me.schema:window.location.href).searchParams,a=(m=(p=(h=o.get("mpId"))!=null?h:o.get("appId"))!=null?p:o.get("gameId"))!=null?m:"",s=(v=(_=(g=me.clientSessionId)!=null?g:e==null?void 0:e.sessionId)!=null?_:o.get("sessionId"))!=null?v:n,l=!!((x=(y=e==null?void 0:e.testAdsMode)!=null?y:e==null?void 0:e.__testAdsMode)!=null?x:o.get("testAdsMode")==="true"),c=(S=(C=(R=e==null?void 0:e.joliboxEnv)!=null?R:e==null?void 0:e.__joliboxEnv)!=null?C:o.get("joliboxEnv"))!=null?S:"production",d=c==="staging",u=t==null?void 0:t.channel;return{get testMode(){return d},get testAdsMode(){return l},get joliboxEnv(){return c},get joliSource(){var w;return(w=o.get("joliSource"))!=null?w:null},get mpId(){var w;return(w=a!=null?a:e==null?void 0:e.id)!=null?w:""},get mpVersion(){var w;return(w=t==null?void 0:t.ver)!=null?w:qa()},get mpType(){var w,B;return(B=(w=t==null?void 0:t.__mpType)!=null?w:e==null?void 0:e.__mpType)!=null?B:"game"},get platform(){var w;return((w=me.platform)!=null?w:me.deviceInfo.platform).toLowerCase()},get deviceInfo(){return me.deviceInfo},get sdkInfo(){return me.sdkInfo},get hostInfo(){return me.hostInfo},get hostUserInfo(){return me.hostUserInfo},get sessionId(){var w,B;return(B=(w=me.clientSessionId)!=null?w:s)!=null?B:n},get channel(){return u},get webviewId(){var w;return(w=me.webviewId)!=null?w:-1},get shouldInterupt(){return e==null?void 0:e.__shouldInterupt},get from(){return e==null?void 0:e.__from},get baseApiHost(){return d?"https://stg-api.jolibox.com":"https://api.jolibox.com"},get adId(){var w;return(w=me.deviceInfo.adId)!=null?w:me.deviceInfo.did},onEnvConfigChanged:w=>{Nu(me,w,Du)},encodeJoliSourceQuery:w=>{var B,$e;return t&&r?Vu(k(k({},e),w),(B=o.get("joliSource"))!=null?B:""):($e=o.get("joliSource"))!=null?$e:""}}},A=mx()});var Ma,Qu,vx,gx,Yu,_x,Xu=T(()=>{"use strict";D();rt();Z();D();Ma=!1,Qu=(e,t)=>e==null?!1:t in e,vx=e=>Qu(e,"kind"),gx=e=>{let t=e.toLowerCase().split("_");return t[0]+t.slice(1).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join("")},Yu=(e,t={},r)=>{var o,a,s;let n={user_id:(a=(o=A.hostUserInfo)==null?void 0:o.uid)!=null?a:"",device_id:(s=A.deviceInfo.did)!=null?s:"",timestamp:Date.now(),tag:gx(e.name)},i=L(k({},n),{env:t.environment,isFromUser:r});r?Mt.emit("GLOBAL_USER_ERROR",e,i):Mt.emit("GLOBAL_ERROR",e,i)},_x=e=>Qu(e,"kind")&&e.kind==="USER_ERROR";Da.on("ERROR_REPORT",({error:e,options:t})=>{if(Ma)return;Ma=!0;let r=vx(e)&&e.raw?e.raw:e;try{let n=_x(e);Yu(e,t,n)}catch(n){let i=n instanceof Error?n.message:String(n),o=new Oa(`${i}, origin error: ${r.message}`);et.error(o),Yu(new Oa(o.message),{environment:t.environment},!1)}finally{Ma=!1}})});var St,ja,Qt=T(()=>{"use strict";rt();D();rt();St=(e,t)=>{var r,n;return new $r((n=(r=t==null?void 0:t.errMsg)!=null?r:e.msg)!=null?n:"",e.code,e.type)},ja=e=>new qu(e)});var Zu=T(()=>{"use strict";Xu();Qt();D();Se();Mt.on("GLOBAL_ERROR",(e,t)=>{var n;let r={message:e.message,stack:(n=e.stack)!=null?n:"",errorType:e.name,source:0};q("trackAsync",{event:"reportJsError",data:r})});Mt.on("GLOBAL_USER_ERROR",(e,t)=>{et.log("UserError",e,t)})});var Fa=T(()=>{"use strict"});function ed(e,t){let r=(n,i,o)=>{let a=L(k({tag:n},t),{extra:k({},i)});n=="globalJsError"?Ie(new Mu(JSON.stringify(a))):e("systemLog",a,o)};return r.debounce=Fr(r,500,{leading:!0}),r}function td(e){let t=(r,n,i)=>{var s;let o=(s=i&&JSON.stringify(i))!=null?s:0,a={speed_value_type:r,total_duration:n};o&&Object.assign(a,{extra:o}),e("joliboxSpeedAnalysis",a)};return t.debounce=Fr(t,500,{leading:!0}),t}var rd=T(()=>{"use strict";D();D();rt()});function nd(e,t){let r=ed(e,t),n=td(r);return{track:r,trackPerformance:n}}var id=T(()=>{"use strict";rd()});var od=T(()=>{"use strict";Z();D();D()});var ad=T(()=>{"use strict";id();Fa();od()});var Wn,sd=T(()=>{"use strict";Wn=class{constructor(t,r){this.eventEmitter=t;this.lastReportTime=0;this.visible=!0;this.timer=this.createRAFTimer(t=>{this.reporter({event:"PLAY_GAME",params:{duration:t}}),this.tracker("PlayGame",{duration:t})});this.interval=r!=null?r:5*1e3,t.on("visible",n=>{this.visible=n})}start(t){this.reporter({event:"OPEN_GAME",params:{timestamp:Date.now(),duration:t!=null?t:0}}),this.tracker("OpenGame",{duration:t!=null?t:0}),this.timer.start()}close(t){this.reporter({event:"CLOSE_GAME",params:{timestamp:Date.now(),duration:t}}),this.tracker("CloseGame",{duration:t}),this.timer.stop()}createRAFTimer(t){let r=Date.now(),n,i,o=!1,a=0,s=()=>{if(!o)return;let p=Date.now(),m=p-r;m>=this.interval&&(this.visible&&(a+=m,t(a)),r=p),n=requestAnimationFrame(s)},l=()=>{d(),r=Date.now(),i=window.setInterval(()=>{if(!o)return;let p=Date.now();p-r>=this.interval&&(r=p)},this.interval)},c=()=>{u(),r=Date.now(),n=requestAnimationFrame(s)},d=()=>{n&&(cancelAnimationFrame(n),n=0)},u=()=>{i&&(clearInterval(i),i=0)};this.eventEmitter.on("visible",p=>{o&&(console.log("visible",p),p?c():l())});let h=this.visible;return{start(){o||(o=!0,h?c():l())},stop(){o=!1,d(),u()}}}}});var Ba=T(()=>{"use strict"});function cd(e,t,r){let{response:n,startTime:i,endTime:o,requestFrom:a}=r,{errMsg:s="",profile:l={}}=n,d={duration:o-i,request_type:e,url:t.split("?")[0],result:r.state,error_msg:r.state==="fail"?s:"",socket_reused:l.socketReused?1:0,request_from:a};(a==="public"&&ld<bx||a==="inner")&&(d.joli_request_number=ld++,setTimeout(()=>{qe("joliboxNetRequestResult",d)},500))}var ld,bx,ud=T(()=>{"use strict";Ba();It();ld=0,bx=10});function zn(e,t,r){var l,c,d;let n=new Map,i=(l=r==null?void 0:r.baseUrl)!=null?l:"https://api.jolibox.com",o=(c=r==null?void 0:r.type)!=null?c:"public",a=(d=r==null?void 0:r.defaultHeaders)!=null?d:{};return Ve("onRequestTaskStateChange",u=>{if(typeof u.requestTaskId!="string")return;let h=n.get(u.requestTaskId);if(h)if(u.state==="success"){let p=u,{requestTaskId:g,state:_}=p,v=Ze(p,["requestTaskId","state"]);u.statusCode===200?h.resolve(v):h.reject(v),n.delete(g)}else if(u.state==="fail"){let m=u,{requestTaskId:g,state:_}=m,v=Ze(m,["requestTaskId","state"]);h.reject(v),n.delete(g)}else et.warn("onRequestTaskStateChange unknown event",u)}),ue.on("onLoginComplete",({isLogin:u,token:h})=>{u&&h&&(a["X-JOLI-TOKEN"]=h)}),(p,...m)=>I(this,[p,...m],function*(u,h={}){let g=Date.now(),_=wx(u,L(k({},h),{baseUrl:i})),{method:v="GET",responseType:y="text",dataType:x="json",timeout:R,enableCache:C=!1,appendHostCookie:S=!0}=h,w=Object.assign({"content-type":"application/json"},a,h.header),B={url:_,method:v,header:w,enableCache:C,responseType:y,appendHostCookie:S};if(v=="POST"||v=="PUT"){let Xe=xx(h.data,w["content-type"]);B.data=Xe}R&&Object.assign(B,{timeout:R});let{data:{requestTaskId:$e}}=q(e,B);if(typeof $e!="string")throw St({code:-1,msg:"requestTaskId is not a string"});let Yt=(Xe,dt)=>{cd("request",_,{state:Xe,startTime:g,endTime:Date.now(),params:B,response:dt,requestId:$e,requestFrom:o=="public"?"public":"inner"})},{resolve:He,reject:qt,promise:Pw}=new At;n.set($e,{resolve:He,reject:qt});try{let Xe=yield Pw;Yt("success",Xe);let{data:dt}=Xe;return x==="json"&&typeof dt=="string"&&(dt=Ex(dt)),{url:_,timeout:R,method:v,response:L(k({},Xe),{data:dt})}}catch(Xe){let dt=Xe;if(Ut(dt)){let{errMsg:Un,prefetchDetail:Nw,isPrefetch:Dw,errNo:Lw}=dt;Mr(Un)&&(Yt("fail",{errMsg:Un,isPrefetch:Dw,prefetchDetail:Nw}),Ie(St({code:-1,msg:Un},{errNo:Lw,errMsg:Un})))}throw Xe}})}function Ex(e){try{return JSON.parse(e.trim())}catch(t){return e}}function xx(e,t="application/json"){let r=t.toLowerCase();return e===void 0?"":typeof e=="string"||e instanceof ArrayBuffer?e:r.includes("application/x-www-form-urlencoded")||r.includes("application/json")||typeof e=="object"?JSON.stringify(e):String(e)}var wx,$a=T(()=>{"use strict";D();ud();Ba();Se();rt();Qt();wx=(e,t)=>{if(/^https?:\/\//.test(e))return e;let r=t==null?void 0:t.query,i=new URLSearchParams(r).toString();return t!=null&&t.baseUrl?`${t.baseUrl}${e}${i?`?${i}`:""}`:`${e}${i?`?${i}`:""}`}});var Ha,dd,we,jt=T(()=>{"use strict";$a();Z();Ha={};(dd=A.hostUserInfo)!=null&&dd.token&&(Ha["x-joli-token"]=A.hostUserInfo.token);A.joliSource&&(Ha["x-joli-source"]=A.joliSource);we=zn("createRequestTaskSync","operateRequestTaskSync",{type:"inner",baseUrl:A.testMode?"https://stg-api.jolibox.com":"https://api.jolibox.com",defaultHeaders:Ha})});var Yn,fd=T(()=>{"use strict";Z();sd();jt();Se();Yn=class extends Wn{constructor(t,r,n){super(r,n),this.gameId=A.mpId,this.sessionId=A.sessionId,this.track=t,this.taskUrl=A.testMode?"https://stg-api.jolibox.com/api/base/app-event":"https://api.jolibox.com/api/base/app-event"}reporter(t){return I(this,null,function*(){let{event:r,params:n}=t,i={eventType:r,gameInfo:k({gameId:this.gameId,sessionId:this.sessionId},n)};yield A.platform==="android"?we("/api/base/app-event",{method:"POST",data:i}):Oe("trackAppEventAsync",{url:this.taskUrl,body:JSON.stringify(i)})})}reportToNative(t){return I(this,null,function*(){let{event:r,params:n}=t;yield Oe("userTrackAsync",{event:r,params:k({},n),gameId:this.gameId})})}tracker(t,r=null){this.track(t,r)}}});var gd={};iu(gd,{nativeTaskEmitter:()=>Jr,taskTracker:()=>Ce,track:()=>qe,trackPerformance:()=>md});var Ax,pd,hd,qe,md,vd,Jr,Ce,It=T(()=>{"use strict";Zu();D();Fa();ad();Z();fd();Se();Ax=(e,t,r)=>{var a,s;let n=t,i=Ut(n.extra)?n.extra:Mr(n.extra)?JSON.parse(n.extra):{},o=L(k({},i),{mp_id:(a=n.mp_id)!=null?a:"",mp_version:(s=n.mp_version)!=null?s:""});q("trackAsync",{event:e,data:o,webviewId:r})},{track:qe,trackPerformance:md}=nd(Ax,{type:Pa.AppSDK,platform:"native",jssdk_version:(hd=(pd=A.sdkInfo)==null?void 0:pd.jssdkVersion)!=null?hd:"1.0.0",mp_id:A.mpId,mp_version:A.mpVersion}),vd=X();vd.registerCommand("ReportSDK.traceSystemTimeline",({event:e,duration:t,extra:r})=>{md(e,t,r)});vd.registerCommand("ReportSDK.traceSystem",({event:e,info:t})=>{qe(e,t)});Jr=new tt,Ce=new Yn(qe,Jr)});function _d(){let e=null,t=window.fetch,r=()=>{e=document.createElement("style"),e.setAttribute("data-jolibox-sdk","default-styles");let o=`
2
2
  html[data-jolibox-root] {
3
3
  height: 100%;
4
4
  margin: 0;
@@ -16,8 +16,8 @@ var qw=Object.create;var jn=Object.defineProperty,Uw=Object.defineProperties,Mw=
16
16
  min-height: 100dvh;
17
17
  }
18
18
  }
19
- `;e.textContent=o;let a=document.head||document.getElementsByTagName("head")[0];a.insertBefore(e,a.firstChild),document.documentElement.setAttribute("data-jolibox-root","")},n=()=>{function o(s){return I(this,null,function*(){let l=s instanceof URL?s.href:s,c=new Promise((d,u)=>{let h=new XMLHttpRequest;h.open("GET",l),h.responseType="arraybuffer",h.addEventListener("load",()=>d(h.response)),h.addEventListener("error",u),h.send()});try{let d=yield c;return new Response(d,{headers:new Headers([["Content-Type","application/wasm"]])}).clone()}catch(d){throw console.error("Failed to load wasm:",d),d}})}let a=window.fetch;window.fetch=(s,l)=>{let c=s instanceof URL?s.href:s.toString();return c.endsWith(".wasm")?o(c):a(s,l)}},i=()=>{e!=null&&e.parentNode&&(e.parentNode.removeChild(e),e=null),document.documentElement.removeAttribute("data-jolibox-root"),window.fetch=t};return r(),n(),i}var gd=T(()=>{"use strict"});var _d=T(()=>{"use strict"});var yd=T(()=>{"use strict";D();Pa()});var bd=T(()=>{"use strict";Z()});var wd,Ed=T(()=>{"use strict";_d();yd();Z();bd();D();wd=new tt});function ft(e,t){for(var r in t)e[r]=t[r];return e}function Ka(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function nt(e,t,r){var n,i,o,a={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?ei.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Xn(e,a,n,i,null)}function Xn(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++Td:i,__i:-1,__u:0};return i==null&&O.vnode!=null&&O.vnode(o),o}function it(e){return e.children}function Ue(e,t){this.props=e,this.context=t}function Xt(e,t){if(t==null)return e.__?Xt(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Xt(e):null}function Pd(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Pd(e)}}function Ad(e){(!e.__d&&(e.__d=!0)&&Ft.push(e)&&!Zn.__r++||xd!==O.debounceRendering)&&((xd=O.debounceRendering)||Rd)(Zn)}function Zn(){for(var e,t,r,n,i,o,a,s=1;Ft.length;)Ft.length>s&&Ft.sort(kd),e=Ft.shift(),s=Ft.length,e.__d&&(r=void 0,i=(n=(t=e).__v).__e,o=[],a=[],t.__P&&((r=ft({},n)).__v=n.__v+1,O.vnode&&O.vnode(r),Wa(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[i]:null,o,i==null?Xt(n):i,!!(32&n.__u),a),r.__v=n.__v,r.__.__k[r.__i]=r,Ld(o,r,a),r.__e!=i&&Pd(r)));Zn.__r=0}function Nd(e,t,r,n,i,o,a,s,l,c,d){var u,h,p,m,g,_,v=n&&n.__k||Cd,y=t.length;for(l=Tx(r,t,v,l,y),u=0;u<y;u++)(p=r.__k[u])!=null&&(h=p.__i===-1?Vr:v[p.__i]||Vr,p.__i=u,_=Wa(e,p,h,i,o,a,s,l,c,d),m=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&za(h.ref,null,p),d.push(p.ref,p.__c||m,p)),g==null&&m!=null&&(g=m),4&p.__u||h.__k===p.__k?l=Dd(p,l,e):typeof p.type=="function"&&_!==void 0?l=_:m&&(l=m.nextSibling),p.__u&=-7);return r.__e=g,l}function Tx(e,t,r,n,i){var o,a,s,l,c,d=r.length,u=d,h=0;for(e.__k=new Array(i),o=0;o<i;o++)(a=t[o])!=null&&typeof a!="boolean"&&typeof a!="function"?(l=o+h,(a=e.__k[o]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?Xn(null,a,null,null,null):Gr(a)?Xn(it,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?Xn(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,s=null,(c=a.__i=Rx(a,r,l,u))!==-1&&(u--,(s=r[c])&&(s.__u|=2)),s==null||s.__v===null?(c==-1&&(i>d?h--:i<d&&h++),typeof a.type!="function"&&(a.__u|=4)):c!=l&&(c==l-1?h--:c==l+1?h++:(c>l?h--:h++,a.__u|=4))):e.__k[o]=null;if(u)for(o=0;o<d;o++)(s=r[o])!=null&&!(2&s.__u)&&(s.__e==n&&(n=Xt(s)),Ud(s,s));return n}function Dd(e,t,r){var n,i;if(typeof e.type=="function"){for(n=e.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=e,t=Dd(n[i],t,r));return t}e.__e!=t&&(t&&e.type&&!r.contains(t)&&(t=Xt(e)),r.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Kr(e,t){return t=t||[],e==null||typeof e=="boolean"||(Gr(e)?e.some(function(r){Kr(r,t)}):t.push(e)),t}function Rx(e,t,r,n){var i,o,a=e.key,s=e.type,l=t[r];if(l===null&&e.key==null||l&&a==l.key&&s===l.type&&!(2&l.__u))return r;if(n>(l!=null&&!(2&l.__u)?1:0))for(i=r-1,o=r+1;i>=0||o<t.length;){if(i>=0){if((l=t[i])&&!(2&l.__u)&&a==l.key&&s===l.type)return i;i--}if(o<t.length){if((l=t[o])&&!(2&l.__u)&&a==l.key&&s===l.type)return o;o++}}return-1}function Sd(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||Ix.test(t)?r:r+"px"}function Qn(e,t,r,n,i){var o;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Sd(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Sd(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(Od,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.t=n.t:(r.t=Ga,e.addEventListener(t,o?Ja:Ha,o)):e.removeEventListener(t,o?Ja:Ha,o);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r==null?"":r;break e}catch(a){}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Id(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.u==null)t.u=Ga++;else if(t.u<r.t)return;return r(O.event?O.event(t):t)}}}function Wa(e,t,r,n,i,o,a,s,l,c){var d,u,h,p,m,g,_,v,y,x,R,C,S,w,B,$e,Yt,He=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),o=[s=t.__e=r.__e]),(d=O.__b)&&d(t);e:if(typeof He=="function")try{if(v=t.props,y="prototype"in He&&He.prototype.render,x=(d=He.contextType)&&n[d.__c],R=d?x?x.props.value:d.__:n,r.__c?_=(u=t.__c=r.__c).__=u.__E:(y?t.__c=u=new He(v,R):(t.__c=u=new Ue(v,R),u.constructor=He,u.render=Ox),x&&x.sub(u),u.props=v,u.state||(u.state={}),u.context=R,u.__n=n,h=u.__d=!0,u.__h=[],u._sb=[]),y&&u.__s==null&&(u.__s=u.state),y&&He.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=ft({},u.__s)),ft(u.__s,He.getDerivedStateFromProps(v,u.__s))),p=u.props,m=u.state,u.__v=t,h)y&&He.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),y&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(y&&He.getDerivedStateFromProps==null&&v!==p&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(v,R),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(v,u.__s,R)===!1||t.__v==r.__v)){for(t.__v!=r.__v&&(u.props=v,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(qt){qt&&(qt.__=t)}),C=0;C<u._sb.length;C++)u.__h.push(u._sb[C]);u._sb=[],u.__h.length&&a.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(v,u.__s,R),y&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(p,m,g)})}if(u.context=R,u.props=v,u.__P=e,u.__e=!1,S=O.__r,w=0,y){for(u.state=u.__s,u.__d=!1,S&&S(t),d=u.render(u.props,u.state,u.context),B=0;B<u._sb.length;B++)u.__h.push(u._sb[B]);u._sb=[]}else do u.__d=!1,S&&S(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++w<25);u.state=u.__s,u.getChildContext!=null&&(n=ft(ft({},n),u.getChildContext())),y&&!h&&u.getSnapshotBeforeUpdate!=null&&(g=u.getSnapshotBeforeUpdate(p,m)),$e=d,d!=null&&d.type===it&&d.key==null&&($e=qd(d.props.children)),s=Nd(e,Gr($e)?$e:[$e],t,r,n,i,o,a,s,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&a.push(u),_&&(u.__E=u.__=null)}catch(qt){if(t.__v=null,l||o!=null)if(qt.then){for(t.__u|=l?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else for(Yt=o.length;Yt--;)Ka(o[Yt]);else t.__e=r.__e,t.__k=r.__k;O.__e(qt,t,r)}else o==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):s=t.__e=kx(r.__e,t,r,n,i,o,a,l,c);return(d=O.diffed)&&d(t),128&t.__u?void 0:s}function Ld(e,t,r){for(var n=0;n<r.length;n++)za(r[n],r[++n],r[++n]);O.__c&&O.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){O.__e(o,i.__v)}})}function qd(e){return typeof e!="object"||e==null?e:Gr(e)?e.map(qd):ft({},e)}function kx(e,t,r,n,i,o,a,s,l){var c,d,u,h,p,m,g,_=r.props,v=t.props,y=t.type;if(y=="svg"?i="http://www.w3.org/2000/svg":y=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(c=0;c<o.length;c++)if((p=o[c])&&"setAttribute"in p==!!y&&(y?p.localName==y:p.nodeType==3)){e=p,o[c]=null;break}}if(e==null){if(y==null)return document.createTextNode(v);e=document.createElementNS(i,y,v.is&&v),s&&(O.__m&&O.__m(t,o),s=!1),o=null}if(y===null)_===v||s&&e.data===v||(e.data=v);else{if(o=o&&ei.call(e.childNodes),_=r.props||Vr,!s&&o!=null)for(_={},c=0;c<e.attributes.length;c++)_[(p=e.attributes[c]).name]=p.value;for(c in _)if(p=_[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=p;else if(!(c in v)){if(c=="value"&&"defaultValue"in v||c=="checked"&&"defaultChecked"in v)continue;Qn(e,c,null,p,i)}}for(c in v)p=v[c],c=="children"?h=p:c=="dangerouslySetInnerHTML"?d=p:c=="value"?m=p:c=="checked"?g=p:s&&typeof p!="function"||_[c]===p||Qn(e,c,p,_[c],i);if(d)s||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),Nd(t.type==="template"?e.content:e,Gr(h)?h:[h],t,r,n,y=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:r.__k&&Xt(r,0),s,l),o!=null)for(c=o.length;c--;)Ka(o[c]);s||(c="value",y=="progress"&&m==null?e.removeAttribute("value"):m!==void 0&&(m!==e[c]||y=="progress"&&!m||y=="option"&&m!==_[c])&&Qn(e,c,m,_[c],i),c="checked",g!==void 0&&g!==e[c]&&Qn(e,c,g,_[c],i))}return e}function za(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(i){O.__e(i,r)}}function Ud(e,t,r){var n,i;if(O.unmount&&O.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||za(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){O.__e(o,t)}n.base=n.__P=null}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Ud(n[i],t,r||typeof e.type!="function");r||Ka(e.__e),e.__c=e.__=e.__e=void 0}function Ox(e,t,r){return this.constructor(e,r)}function Zt(e,t,r){var n,i,o,a;t==document&&(t=document.documentElement),O.__&&O.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,o=[],a=[],Wa(t,e=(!n&&r||t).__k=nt(it,null,[e]),i||Vr,Vr,t.namespaceURI,!n&&r?[r]:i?null:t.firstChild?ei.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,a),Ld(o,e,a)}var ei,O,Td,Va,Ft,xd,Rd,kd,Od,Ga,Ha,Ja,Sx,Vr,Cd,Ix,Gr,er=T(()=>{Vr={},Cd=[],Ix=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Gr=Array.isArray;ei=Cd.slice,O={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},Td=0,Va=function(e){return e!=null&&e.constructor==null},Ue.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ft({},this.state),typeof e=="function"&&(e=e(ft({},r),this.props)),e&&ft(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ad(this))},Ue.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ad(this))},Ue.prototype.render=it,Ft=[],Rd=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,kd=function(e,t){return e.__v.__b-t.__v.__b},Zn.__r=0,Od=/(PointerCapture)$|Capture$/i,Ga=0,Ha=Id(!1),Ja=Id(!0),Sx=0});var z=f((Vj,Md)=>{"use strict";Md.exports=function(e){try{return!!e()}catch(t){return!0}}});var tr=f((Gj,jd)=>{"use strict";var Cx=z();jd.exports=!Cx(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var de=f((Kj,$d)=>{"use strict";var Fd=tr(),Bd=Function.prototype,Ya=Bd.call,Px=Fd&&Bd.bind.bind(Ya,Ya);$d.exports=Fd?Px:function(e){return function(){return Ya.apply(e,arguments)}}});var Te=f((Wj,Hd)=>{"use strict";var Nx=de();Hd.exports=Nx({}.isPrototypeOf)});var ee=f((Qa,Jd)=>{"use strict";var Wr=function(e){return e&&e.Math===Math&&e};Jd.exports=Wr(typeof globalThis=="object"&&globalThis)||Wr(typeof window=="object"&&window)||Wr(typeof self=="object"&&self)||Wr(typeof global=="object"&&global)||Wr(typeof Qa=="object"&&Qa)||function(){return this}()||Function("return this")()});var Xa=f((zj,Wd)=>{"use strict";var Dx=tr(),Kd=Function.prototype,Vd=Kd.apply,Gd=Kd.call;Wd.exports=typeof Reflect=="object"&&Reflect.apply||(Dx?Gd.bind(Vd):function(){return Gd.apply(Vd,arguments)})});var pt=f((Yj,Yd)=>{"use strict";var zd=de(),Lx=zd({}.toString),qx=zd("".slice);Yd.exports=function(e){return qx(Lx(e),8,-1)}});var zr=f((Qj,Qd)=>{"use strict";var Ux=pt(),Mx=de();Qd.exports=function(e){if(Ux(e)==="Function")return Mx(e)}});var ve=f((Xj,Xd)=>{"use strict";var Za=typeof document=="object"&&document.all;Xd.exports=typeof Za=="undefined"&&Za!==void 0?function(e){return typeof e=="function"||e===Za}:function(e){return typeof e=="function"}});var Me=f((Zj,Zd)=>{"use strict";var jx=z();Zd.exports=!jx(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var ht=f((eF,ef)=>{"use strict";var Fx=tr(),ti=Function.prototype.call;ef.exports=Fx?ti.bind(ti):function(){return ti.apply(ti,arguments)}});var es=f(nf=>{"use strict";var tf={}.propertyIsEnumerable,rf=Object.getOwnPropertyDescriptor,Bx=rf&&!tf.call({1:2},1);nf.f=Bx?function(t){var r=rf(this,t);return!!r&&r.enumerable}:tf});var Yr=f((rF,of)=>{"use strict";of.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var ri=f((nF,af)=>{"use strict";var $x=de(),Hx=z(),Jx=pt(),ts=Object,Vx=$x("".split);af.exports=Hx(function(){return!ts("z").propertyIsEnumerable(0)})?function(e){return Jx(e)==="String"?Vx(e,""):ts(e)}:ts});var rr=f((iF,sf)=>{"use strict";sf.exports=function(e){return e==null}});var nr=f((oF,lf)=>{"use strict";var Gx=rr(),Kx=TypeError;lf.exports=function(e){if(Gx(e))throw new Kx("Can't call method on "+e);return e}});var Tt=f((aF,cf)=>{"use strict";var Wx=ri(),zx=nr();cf.exports=function(e){return Wx(zx(e))}});var fe=f((sF,uf)=>{"use strict";var Yx=ve();uf.exports=function(e){return typeof e=="object"?e!==null:Yx(e)}});var mt=f((lF,df)=>{"use strict";df.exports={}});var ni=f((cF,pf)=>{"use strict";var rs=mt(),ns=ee(),Qx=ve(),ff=function(e){return Qx(e)?e:void 0};pf.exports=function(e,t){return arguments.length<2?ff(rs[e])||ff(ns[e]):rs[e]&&rs[e][t]||ns[e]&&ns[e][t]}});var ii=f((uF,vf)=>{"use strict";var Xx=ee(),hf=Xx.navigator,mf=hf&&hf.userAgent;vf.exports=mf?String(mf):""});var ai=f((dF,Ef)=>{"use strict";var wf=ee(),is=ii(),gf=wf.process,_f=wf.Deno,yf=gf&&gf.versions||_f&&_f.version,bf=yf&&yf.v8,Ye,oi;bf&&(Ye=bf.split("."),oi=Ye[0]>0&&Ye[0]<4?1:+(Ye[0]+Ye[1]));!oi&&is&&(Ye=is.match(/Edge\/(\d+)/),(!Ye||Ye[1]>=74)&&(Ye=is.match(/Chrome\/(\d+)/),Ye&&(oi=+Ye[1])));Ef.exports=oi});var os=f((fF,Af)=>{"use strict";var xf=ai(),Zx=z(),eA=ee(),tA=eA.String;Af.exports=!!Object.getOwnPropertySymbols&&!Zx(function(){var e=Symbol("symbol detection");return!tA(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&xf&&xf<41})});var as=f((pF,Sf)=>{"use strict";var rA=os();Sf.exports=rA&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var ss=f((hF,If)=>{"use strict";var nA=ni(),iA=ve(),oA=Te(),aA=as(),sA=Object;If.exports=aA?function(e){return typeof e=="symbol"}:function(e){var t=nA("Symbol");return iA(t)&&oA(t.prototype,sA(e))}});var si=f((mF,Tf)=>{"use strict";var lA=String;Tf.exports=function(e){try{return lA(e)}catch(t){return"Object"}}});var ir=f((vF,Rf)=>{"use strict";var cA=ve(),uA=si(),dA=TypeError;Rf.exports=function(e){if(cA(e))return e;throw new dA(uA(e)+" is not a function")}});var li=f((gF,kf)=>{"use strict";var fA=ir(),pA=rr();kf.exports=function(e,t){var r=e[t];return pA(r)?void 0:fA(r)}});var Cf=f((_F,Of)=>{"use strict";var ls=ht(),cs=ve(),us=fe(),hA=TypeError;Of.exports=function(e,t){var r,n;if(t==="string"&&cs(r=e.toString)&&!us(n=ls(r,e))||cs(r=e.valueOf)&&!us(n=ls(r,e))||t!=="string"&&cs(r=e.toString)&&!us(n=ls(r,e)))return n;throw new hA("Can't convert object to primitive value")}});var or=f((yF,Pf)=>{"use strict";Pf.exports=!0});var Lf=f((bF,Df)=>{"use strict";var Nf=ee(),mA=Object.defineProperty;Df.exports=function(e,t){try{mA(Nf,e,{value:t,configurable:!0,writable:!0})}catch(r){Nf[e]=t}return t}});var Qr=f((wF,Mf)=>{"use strict";var vA=or(),gA=ee(),_A=Lf(),qf="__core-js_shared__",Uf=Mf.exports=gA[qf]||_A(qf,{});(Uf.versions||(Uf.versions=[])).push({version:"3.41.0",mode:vA?"pure":"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var ds=f((EF,Ff)=>{"use strict";var jf=Qr();Ff.exports=function(e,t){return jf[e]||(jf[e]=t||{})}});var ar=f((xF,Bf)=>{"use strict";var yA=nr(),bA=Object;Bf.exports=function(e){return bA(yA(e))}});var je=f((AF,$f)=>{"use strict";var wA=de(),EA=ar(),xA=wA({}.hasOwnProperty);$f.exports=Object.hasOwn||function(t,r){return xA(EA(t),r)}});var ci=f((SF,Hf)=>{"use strict";var AA=de(),SA=0,IA=Math.random(),TA=AA(1 .toString);Hf.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+TA(++SA+IA,36)}});var Re=f((IF,Vf)=>{"use strict";var RA=ee(),kA=ds(),Jf=je(),OA=ci(),CA=os(),PA=as(),sr=RA.Symbol,fs=kA("wks"),NA=PA?sr.for||sr:sr&&sr.withoutSetter||OA;Vf.exports=function(e){return Jf(fs,e)||(fs[e]=CA&&Jf(sr,e)?sr[e]:NA("Symbol."+e)),fs[e]}});var zf=f((TF,Wf)=>{"use strict";var DA=ht(),Gf=fe(),Kf=ss(),LA=li(),qA=Cf(),UA=Re(),MA=TypeError,jA=UA("toPrimitive");Wf.exports=function(e,t){if(!Gf(e)||Kf(e))return e;var r=LA(e,jA),n;if(r){if(t===void 0&&(t="default"),n=DA(r,e,t),!Gf(n)||Kf(n))return n;throw new MA("Can't convert object to primitive value")}return t===void 0&&(t="number"),qA(e,t)}});var ps=f((RF,Yf)=>{"use strict";var FA=zf(),BA=ss();Yf.exports=function(e){var t=FA(e,"string");return BA(t)?t:t+""}});var ms=f((kF,Xf)=>{"use strict";var $A=ee(),Qf=fe(),hs=$A.document,HA=Qf(hs)&&Qf(hs.createElement);Xf.exports=function(e){return HA?hs.createElement(e):{}}});var vs=f((OF,Zf)=>{"use strict";var JA=Me(),VA=z(),GA=ms();Zf.exports=!JA&&!VA(function(){return Object.defineProperty(GA("div"),"a",{get:function(){return 7}}).a!==7})});var gs=f(tp=>{"use strict";var KA=Me(),WA=ht(),zA=es(),YA=Yr(),QA=Tt(),XA=ps(),ZA=je(),eS=vs(),ep=Object.getOwnPropertyDescriptor;tp.f=KA?ep:function(t,r){if(t=QA(t),r=XA(r),eS)try{return ep(t,r)}catch(n){}if(ZA(t,r))return YA(!WA(zA.f,t,r),t[r])}});var np=f((PF,rp)=>{"use strict";var tS=z(),rS=ve(),nS=/#|\.prototype\./,Xr=function(e,t){var r=oS[iS(e)];return r===sS?!0:r===aS?!1:rS(t)?tS(t):!!t},iS=Xr.normalize=function(e){return String(e).replace(nS,".").toLowerCase()},oS=Xr.data={},aS=Xr.NATIVE="N",sS=Xr.POLYFILL="P";rp.exports=Xr});var ui=f((NF,op)=>{"use strict";var ip=zr(),lS=ir(),cS=tr(),uS=ip(ip.bind);op.exports=function(e,t){return lS(e),t===void 0?e:cS?uS(e,t):function(){return e.apply(t,arguments)}}});var _s=f((DF,ap)=>{"use strict";var dS=Me(),fS=z();ap.exports=dS&&fS(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Rt=f((LF,sp)=>{"use strict";var pS=fe(),hS=String,mS=TypeError;sp.exports=function(e){if(pS(e))return e;throw new mS(hS(e)+" is not an object")}});var kt=f(cp=>{"use strict";var vS=Me(),gS=vs(),_S=_s(),di=Rt(),lp=ps(),yS=TypeError,ys=Object.defineProperty,bS=Object.getOwnPropertyDescriptor,bs="enumerable",ws="configurable",Es="writable";cp.f=vS?_S?function(t,r,n){if(di(t),r=lp(r),di(n),typeof t=="function"&&r==="prototype"&&"value"in n&&Es in n&&!n[Es]){var i=bS(t,r);i&&i[Es]&&(t[r]=n.value,n={configurable:ws in n?n[ws]:i[ws],enumerable:bs in n?n[bs]:i[bs],writable:!1})}return ys(t,r,n)}:ys:function(t,r,n){if(di(t),r=lp(r),di(n),gS)try{return ys(t,r,n)}catch(i){}if("get"in n||"set"in n)throw new yS("Accessors not supported");return"value"in n&&(t[r]=n.value),t}});var Bt=f((UF,up)=>{"use strict";var wS=Me(),ES=kt(),xS=Yr();up.exports=wS?function(e,t,r){return ES.f(e,t,xS(1,r))}:function(e,t,r){return e[t]=r,e}});var te=f((MF,fp)=>{"use strict";var Zr=ee(),AS=Xa(),SS=zr(),IS=ve(),TS=gs().f,RS=np(),lr=mt(),kS=ui(),cr=Bt(),dp=je();Qr();var OS=function(e){var t=function(r,n,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,i)}return AS(e,this,arguments)};return t.prototype=e.prototype,t};fp.exports=function(e,t){var r=e.target,n=e.global,i=e.stat,o=e.proto,a=n?Zr:i?Zr[r]:Zr[r]&&Zr[r].prototype,s=n?lr:lr[r]||cr(lr,r,{})[r],l=s.prototype,c,d,u,h,p,m,g,_,v;for(h in t)c=RS(n?h:r+(i?".":"#")+h,e.forced),d=!c&&a&&dp(a,h),m=s[h],d&&(e.dontCallGetSet?(v=TS(a,h),g=v&&v.value):g=a[h]),p=d&&g?g:t[h],!(!c&&!o&&typeof m==typeof p)&&(e.bind&&d?_=kS(p,Zr):e.wrap&&d?_=OS(p):o&&IS(p)?_=SS(p):_=p,(e.sham||p&&p.sham||m&&m.sham)&&cr(_,"sham",!0),cr(s,h,_),o&&(u=r+"Prototype",dp(lr,u)||cr(lr,u,{}),cr(lr[u],h,p),e.real&&l&&(c||!l[h])&&cr(l,h,p)))}});var hp=f((jF,pp)=>{"use strict";var CS=Math.ceil,PS=Math.floor;pp.exports=Math.trunc||function(t){var r=+t;return(r>0?PS:CS)(r)}});var xs=f((FF,mp)=>{"use strict";var NS=hp();mp.exports=function(e){var t=+e;return t!==t||t===0?0:NS(t)}});var As=f((BF,vp)=>{"use strict";var DS=xs(),LS=Math.min;vp.exports=function(e){var t=DS(e);return t>0?LS(t,9007199254740991):0}});var ur=f(($F,gp)=>{"use strict";var qS=As();gp.exports=function(e){return qS(e.length)}});var en=f((HF,_p)=>{"use strict";var US=pt();_p.exports=Array.isArray||function(t){return US(t)==="Array"}});var fi=f((JF,bp)=>{"use strict";var MS=Re(),jS=MS("toStringTag"),yp={};yp[jS]="z";bp.exports=String(yp)==="[object z]"});var dr=f((VF,wp)=>{"use strict";var FS=fi(),BS=ve(),pi=pt(),$S=Re(),HS=$S("toStringTag"),JS=Object,VS=pi(function(){return arguments}())==="Arguments",GS=function(e,t){try{return e[t]}catch(r){}};wp.exports=FS?pi:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=GS(t=JS(e),HS))=="string"?r:VS?pi(t):(n=pi(t))==="Object"&&BS(t.callee)?"Arguments":n}});var xp=f((GF,Ep)=>{"use strict";var KS=de(),WS=ve(),Ss=Qr(),zS=KS(Function.toString);WS(Ss.inspectSource)||(Ss.inspectSource=function(e){return zS(e)});Ep.exports=Ss.inspectSource});var Ts=f((KF,Rp)=>{"use strict";var YS=de(),QS=z(),Ap=ve(),XS=dr(),ZS=ni(),eI=xp(),Sp=function(){},Ip=ZS("Reflect","construct"),Is=/^\s*(?:class|function)\b/,tI=YS(Is.exec),rI=!Is.test(Sp),tn=function(t){if(!Ap(t))return!1;try{return Ip(Sp,[],t),!0}catch(r){return!1}},Tp=function(t){if(!Ap(t))return!1;switch(XS(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return rI||!!tI(Is,eI(t))}catch(r){return!0}};Tp.sham=!0;Rp.exports=!Ip||QS(function(){var e;return tn(tn.call)||!tn(Object)||!tn(function(){e=!0})||e})?Tp:tn});var Pp=f((WF,Cp)=>{"use strict";var kp=en(),nI=Ts(),iI=fe(),oI=Re(),aI=oI("species"),Op=Array;Cp.exports=function(e){var t;return kp(e)&&(t=e.constructor,nI(t)&&(t===Op||kp(t.prototype))?t=void 0:iI(t)&&(t=t[aI],t===null&&(t=void 0))),t===void 0?Op:t}});var Rs=f((zF,Np)=>{"use strict";var sI=Pp();Np.exports=function(e,t){return new(sI(e))(t===0?0:t)}});var Ct=f((YF,Lp)=>{"use strict";var lI=ui(),cI=de(),uI=ri(),dI=ar(),fI=ur(),pI=Rs(),Dp=cI([].push),Ot=function(e){var t=e===1,r=e===2,n=e===3,i=e===4,o=e===6,a=e===7,s=e===5||o;return function(l,c,d,u){for(var h=dI(l),p=uI(h),m=fI(p),g=lI(c,d),_=0,v=u||pI,y=t?v(l,m):r||a?v(l,0):void 0,x,R;m>_;_++)if((s||_ in p)&&(x=p[_],R=g(x,_,h),e))if(t)y[_]=R;else if(R)switch(e){case 3:return!0;case 5:return x;case 6:return _;case 2:Dp(y,x)}else switch(e){case 4:return!1;case 7:Dp(y,x)}return o?-1:n||i?i:y}};Lp.exports={forEach:Ot(0),map:Ot(1),filter:Ot(2),some:Ot(3),every:Ot(4),find:Ot(5),findIndex:Ot(6),filterReject:Ot(7)}});var rn=f((QF,qp)=>{"use strict";var hI=z(),mI=Re(),vI=ai(),gI=mI("species");qp.exports=function(e){return vI>=51||!hI(function(){var t=[],r=t.constructor={};return r[gI]=function(){return{foo:1}},t[e](Boolean).foo!==1})}});var Up=f(()=>{"use strict";var _I=te(),yI=Ct().filter,bI=rn(),wI=bI("filter");_I({target:"Array",proto:!0,forced:!wI},{filter:function(t){return yI(this,t,arguments.length>1?arguments[1]:void 0)}})});var Ge=f((e2,Mp)=>{"use strict";var EI=ee(),xI=mt();Mp.exports=function(e,t){var r=xI[e+"Prototype"],n=r&&r[t];if(n)return n;var i=EI[e],o=i&&i.prototype;return o&&o[t]}});var Fp=f((t2,jp)=>{"use strict";Up();var AI=Ge();jp.exports=AI("Array","filter")});var $p=f((r2,Bp)=>{"use strict";var SI=Te(),II=Fp(),ks=Array.prototype;Bp.exports=function(e){var t=e.filter;return e===ks||SI(ks,e)&&t===ks.filter?II:t}});var Jp=f((n2,Hp)=>{"use strict";var TI=$p();Hp.exports=TI});var Gp=f((i2,Vp)=>{Vp.exports=Jp()});var nn=f((o2,Kp)=>{"use strict";var RI=z();Kp.exports=function(e,t){var r=[][e];return!!r&&RI(function(){r.call(null,t||function(){return 1},1)})}});var Wp=f(()=>{"use strict";var kI=te(),OI=Ct().every,CI=nn(),PI=CI("every");kI({target:"Array",proto:!0,forced:!PI},{every:function(t){return OI(this,t,arguments.length>1?arguments[1]:void 0)}})});var Yp=f((l2,zp)=>{"use strict";Wp();var NI=Ge();zp.exports=NI("Array","every")});var Xp=f((c2,Qp)=>{"use strict";var DI=Te(),LI=Yp(),Os=Array.prototype;Qp.exports=function(e){var t=e.every;return e===Os||DI(Os,e)&&t===Os.every?LI:t}});var eh=f((u2,Zp)=>{"use strict";var qI=Xp();Zp.exports=qI});var rh=f((d2,th)=>{th.exports=eh()});var ih=f((f2,nh)=>{"use strict";var UI=Ct().forEach,MI=nn(),jI=MI("forEach");nh.exports=jI?[].forEach:function(t){return UI(this,t,arguments.length>1?arguments[1]:void 0)}});var ah=f(()=>{"use strict";var FI=te(),oh=ih();FI({target:"Array",proto:!0,forced:[].forEach!==oh},{forEach:oh})});var lh=f((m2,sh)=>{"use strict";ah();var BI=Ge();sh.exports=BI("Array","forEach")});var uh=f((v2,ch)=>{"use strict";var $I=lh();ch.exports=$I});var dh=f(()=>{});var ph=f((y2,fh)=>{"use strict";var HI=dr(),JI=je(),VI=Te(),GI=uh();dh();var Cs=Array.prototype,KI={DOMTokenList:!0,NodeList:!0};fh.exports=function(e){var t=e.forEach;return e===Cs||VI(Cs,e)&&t===Cs.forEach||JI(KI,HI(e))?GI:t}});var mh=f((b2,hh)=>{hh.exports=ph()});var gh=f((w2,vh)=>{"use strict";var WI=TypeError,zI=9007199254740991;vh.exports=function(e){if(e>zI)throw WI("Maximum allowed index exceeded");return e}});var Ps=f((E2,_h)=>{"use strict";var YI=Me(),QI=kt(),XI=Yr();_h.exports=function(e,t,r){YI?QI.f(e,t,XI(0,r)):e[t]=r}});var Eh=f(()=>{"use strict";var ZI=te(),eT=z(),tT=en(),rT=fe(),nT=ar(),iT=ur(),yh=gh(),bh=Ps(),oT=Rs(),aT=rn(),sT=Re(),lT=ai(),wh=sT("isConcatSpreadable"),cT=lT>=51||!eT(function(){var e=[];return e[wh]=!1,e.concat()[0]!==e}),uT=function(e){if(!rT(e))return!1;var t=e[wh];return t!==void 0?!!t:tT(e)},dT=!cT||!aT("concat");ZI({target:"Array",proto:!0,arity:1,forced:dT},{concat:function(t){var r=nT(this),n=oT(r,0),i=0,o,a,s,l,c;for(o=-1,s=arguments.length;o<s;o++)if(c=o===-1?r:arguments[o],uT(c))for(l=iT(c),yh(i+l),a=0;a<l;a++,i++)a in c&&bh(n,i,c[a]);else yh(i+1),bh(n,i++,c);return n.length=i,n}})});var Ah=f((S2,xh)=>{"use strict";Eh();var fT=Ge();xh.exports=fT("Array","concat")});var Ih=f((I2,Sh)=>{"use strict";var pT=Te(),hT=Ah(),Ns=Array.prototype;Sh.exports=function(e){var t=e.concat;return e===Ns||pT(Ns,e)&&t===Ns.concat?hT:t}});var Rh=f((T2,Th)=>{"use strict";var mT=Ih();Th.exports=mT});var Oh=f((R2,kh)=>{kh.exports=Rh()});var Ch=f(()=>{"use strict";var vT=te(),gT=Ct().some,_T=nn(),yT=_T("some");vT({target:"Array",proto:!0,forced:!yT},{some:function(t){return gT(this,t,arguments.length>1?arguments[1]:void 0)}})});var Nh=f((C2,Ph)=>{"use strict";Ch();var bT=Ge();Ph.exports=bT("Array","some")});var Lh=f((P2,Dh)=>{"use strict";var wT=Te(),ET=Nh(),Ds=Array.prototype;Dh.exports=function(e){var t=e.some;return e===Ds||wT(Ds,e)&&t===Ds.some?ET:t}});var Uh=f((N2,qh)=>{"use strict";var xT=Lh();qh.exports=xT});var jh=f((D2,Mh)=>{Mh.exports=Uh()});var Bh=f((L2,Fh)=>{"use strict";var on=ee(),AT=ii(),ST=pt(),hi=function(e){return AT.slice(0,e.length)===e};Fh.exports=function(){return hi("Bun/")?"BUN":hi("Cloudflare-Workers")?"CLOUDFLARE":hi("Deno/")?"DENO":hi("Node.js/")?"NODE":on.Bun&&typeof Bun.version=="string"?"BUN":on.Deno&&typeof Deno.version=="object"?"DENO":ST(on.process)==="process"?"NODE":on.window&&on.document?"BROWSER":"REST"}()});var an=f((q2,$h)=>{"use strict";var IT=de();$h.exports=IT([].slice)});var Jh=f((U2,Hh)=>{"use strict";var TT=TypeError;Hh.exports=function(e,t){if(e<t)throw new TT("Not enough arguments");return e}});var Ls=f((M2,Gh)=>{"use strict";var Vh=ee(),RT=Xa(),kT=ve(),OT=Bh(),CT=ii(),PT=an(),NT=Jh(),DT=Vh.Function,LT=/MSIE .\./.test(CT)||OT==="BUN"&&function(){var e=Vh.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}();Gh.exports=function(e,t){var r=t?2:1;return LT?function(n,i){var o=NT(arguments.length,1)>r,a=kT(n)?n:DT(n),s=o?PT(arguments,r):[],l=o?function(){RT(a,this,s)}:a;return t?e(l,i):e(l)}:e}});var zh=f(()=>{"use strict";var qT=te(),Wh=ee(),UT=Ls(),Kh=UT(Wh.setInterval,!0);qT({global:!0,bind:!0,forced:Wh.setInterval!==Kh},{setInterval:Kh})});var Xh=f(()=>{"use strict";var MT=te(),Qh=ee(),jT=Ls(),Yh=jT(Qh.setTimeout,!0);MT({global:!0,bind:!0,forced:Qh.setTimeout!==Yh},{setTimeout:Yh})});var Zh=f(()=>{"use strict";zh();Xh()});var tm=f((V2,em)=>{"use strict";Zh();var FT=mt();em.exports=FT.setTimeout});var nm=f((G2,rm)=>{rm.exports=tm()});function Ms(e,t){Y.__h&&Y.__h(ke,e,vi||t),vi=0;var r=ke.__H||(ke.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function js(e,t){var r=Ms(sn++,3);!Y.__s&&$s(r.__H,t)&&(r.__=e,r.u=t,ke.__H.__h.push(r))}function Fs(e,t){var r=Ms(sn++,4);!Y.__s&&$s(r.__H,t)&&(r.__=e,r.u=t,ke.__h.push(r))}function Bs(e){return vi=5,ln(function(){return{current:e}},[])}function ln(e,t){var r=Ms(sn++,7);return $s(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function gi(e,t){return vi=8,ln(function(){return e},t)}function BT(){for(var e;e=fm.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(mi),e.__H.__h.forEach(Us),e.__H.__h=[]}catch(t){e.__H.__h=[],Y.__e(t,e.__v)}}function $T(e){var t,r=function(){clearTimeout(n),dm&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);dm&&(t=requestAnimationFrame(r))}function mi(e){var t=ke,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),ke=t}function Us(e){var t=ke;e.__c=e.__(),ke=t}function $s(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}var sn,ke,qs,im,vi,fm,Y,om,am,sm,lm,cm,um,dm,Hs=T(()=>{er();vi=0,fm=[],Y=O,om=Y.__b,am=Y.__r,sm=Y.diffed,lm=Y.__c,cm=Y.unmount,um=Y.__;Y.__b=function(e){ke=null,om&&om(e)},Y.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),um&&um(e,t)},Y.__r=function(e){am&&am(e),sn=0;var t=(ke=e.__c).__H;t&&(qs===ke?(t.__h=[],ke.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(mi),t.__h.forEach(Us),t.__h=[],sn=0)),qs=ke},Y.diffed=function(e){sm&&sm(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fm.push(t)!==1&&im===Y.requestAnimationFrame||((im=Y.requestAnimationFrame)||$T)(BT)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),qs=ke=null},Y.__c=function(e,t){t.some(function(r){try{r.__h.forEach(mi),r.__h=r.__h.filter(function(n){return!n.__||Us(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],Y.__e(n,r.__v)}}),lm&&lm(e,t)},Y.unmount=function(e){cm&&cm(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{mi(n)}catch(i){t=i}}),r.__H=void 0,t&&Y.__e(t,r.__v))};dm=typeof requestAnimationFrame=="function"});function Em(e,t){for(var r in t)e[r]=t[r];return e}function Vs(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function pm(e,t){this.props=e,this.context=t}function Gs(e,t){function r(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!a:Vs(this.props,i)}function n(i){return this.shouldComponentUpdate=r,nt(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}function xm(e){function t(r){var n=Em({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=JT,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}function Am(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Em({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Am(n,t,r)})),e}function Sm(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Sm(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function Js(){this.__u=0,this.o=null,this.__b=null}function Im(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function _i(){this.i=null,this.l=null}function Tm(e,t,r){return t.__k==null&&(t.textContent=""),Zt(e,t),typeof r=="function"&&r(),e?e.__c:null}function XT(){}function ZT(){return this.cancelBubble}function e1(){return this.defaultPrevented}var hm,JT,VT,mm,vm,GT,KT,WT,zT,YT,QT,gm,Rm,t1,_m,ym,bm,Ks=T(()=>{er();er();Hs();Hs();(pm.prototype=new Ue).isPureReactComponent=!0,pm.prototype.shouldComponentUpdate=function(e,t){return Vs(this.props,e)||Vs(this.state,t)};hm=O.__b;O.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),hm&&hm(e)};JT=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;VT=O.__e;O.__e=function(e,t,r,n){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}VT(e,t,r,n)};mm=O.unmount;O.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),mm&&mm(e)},(Js.prototype=new Ue).__c=function(e,t){var r=t.__c,n=this;n.o==null&&(n.o=[]),n.o.push(r);var i=Im(n.__v),o=!1,a=function(){o||(o=!0,r.__R=null,i?i(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var l=n.state.__a;n.__v.__k[0]=Sm(l,l.__c.__P,l.__c.__O)}var c;for(n.setState({__a:n.__b=null});c=n.o.pop();)c.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},Js.prototype.componentWillUnmount=function(){this.o=[]},Js.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Am(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&nt(it,null,e.fallback);return i&&(i.__u&=-33),[nt(it,null,t.__a?null:e.children),i]};vm=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.i=r=r[2]}};(_i.prototype=new Ue).__a=function(e){var t=this,r=Im(t.__v),n=t.l.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),vm(t,e,n)):i()};r?r(o):o()}},_i.prototype.render=function(e){this.i=null,this.l=new Map;var t=Kr(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.l.set(t[r],this.i=[1,0,this.i]);return e.children},_i.prototype.componentDidUpdate=_i.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,r){vm(e,r,t)})};GT=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,KT=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,WT=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,zT=/[A-Z0-9]/g,YT=typeof document!="undefined",QT=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};Ue.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ue.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});gm=O.event;O.event=function(e){return gm&&(e=gm(e)),e.persist=XT,e.isPropagationStopped=ZT,e.isDefaultPrevented=e1,e.nativeEvent=e};t1={enumerable:!1,configurable:!0,get:function(){return this.class}},_m=O.vnode;O.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={},o=n.indexOf("-")===-1;for(var a in r){var s=r[a];if(!(a==="value"&&"defaultValue"in r&&s==null||YT&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var l=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&s===!0?s="":l==="translate"&&s==="no"?s=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?a="ondblclick":l!=="onchange"||n!=="input"&&n!=="textarea"||QT(r.type)?l==="onfocus"?a="onfocusin":l==="onblur"?a="onfocusout":WT.test(a)&&(a=l):l=a="oninput":o&&KT.test(a)?a=a.replace(zT,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&i[a=l]&&(a="oninputCapture"),i[a]=s}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Kr(r.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=Kr(r.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",t1)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=GT,_m&&_m(e)};ym=O.__r;O.__r=function(e){ym&&ym(e),Rm=e.__c};bm=O.diffed;O.diffed=function(e){bm&&bm(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),Rm=null}});var Ws=f((lB,km)=>{"use strict";var r1=xs(),n1=Math.max,i1=Math.min;km.exports=function(e,t){var r=r1(e);return r<0?n1(r+t,0):i1(r,t)}});var Pm=f(()=>{"use strict";var o1=te(),Om=en(),a1=Ts(),s1=fe(),Cm=Ws(),l1=ur(),c1=Tt(),u1=Ps(),d1=Re(),f1=rn(),p1=an(),h1=f1("slice"),m1=d1("species"),zs=Array,v1=Math.max;o1({target:"Array",proto:!0,forced:!h1},{slice:function(t,r){var n=c1(this),i=l1(n),o=Cm(t,i),a=Cm(r===void 0?i:r,i),s,l,c;if(Om(n)&&(s=n.constructor,a1(s)&&(s===zs||Om(s.prototype))?s=void 0:s1(s)&&(s=s[m1],s===null&&(s=void 0)),s===zs||s===void 0))return p1(n,o,a);for(l=new(s===void 0?zs:s)(v1(a-o,0)),c=0;o<a;o++,c++)o in n&&u1(l,c,n[o]);return l.length=c,l}})});var Dm=f((dB,Nm)=>{"use strict";Pm();var g1=Ge();Nm.exports=g1("Array","slice")});var qm=f((fB,Lm)=>{"use strict";var _1=Te(),y1=Dm(),Ys=Array.prototype;Lm.exports=function(e){var t=e.slice;return e===Ys||_1(Ys,e)&&t===Ys.slice?y1:t}});var Mm=f((pB,Um)=>{"use strict";var b1=qm();Um.exports=b1});var Fm=f((hB,jm)=>{jm.exports=Mm()});var Bm=f(()=>{"use strict";var w1=te(),E1=en();w1({target:"Array",stat:!0},{isArray:E1})});var Hm=f((gB,$m)=>{"use strict";Bm();var x1=mt();$m.exports=x1.Array.isArray});var Vm=f((_B,Jm)=>{"use strict";var A1=Hm();Jm.exports=A1});var Km=f((yB,Gm)=>{Gm.exports=Vm()});var Qs=f((bB,Wm)=>{"use strict";var S1=dr(),I1=String;Wm.exports=function(e){if(S1(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return I1(e)}});var Ym=f((wB,zm)=>{"use strict";var T1=fe(),R1=pt(),k1=Re(),O1=k1("match");zm.exports=function(e){var t;return T1(e)&&((t=e[O1])!==void 0?!!t:R1(e)==="RegExp")}});var Xm=f((EB,Qm)=>{"use strict";var C1=Ym(),P1=TypeError;Qm.exports=function(e){if(C1(e))throw new P1("The method doesn't accept regular expressions");return e}});var ev=f((xB,Zm)=>{"use strict";var N1=Re(),D1=N1("match");Zm.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[D1]=!1,"/./"[e](t)}catch(n){}}return!1}});var nv=f(()=>{"use strict";var L1=te(),q1=zr(),U1=gs().f,M1=As(),tv=Qs(),j1=Xm(),F1=nr(),B1=ev(),$1=or(),H1=q1("".slice),J1=Math.min,rv=B1("startsWith"),V1=!$1&&!rv&&!!function(){var e=U1(String.prototype,"startsWith");return e&&!e.writable}();L1({target:"String",proto:!0,forced:!V1&&!rv},{startsWith:function(t){var r=tv(F1(this));j1(t);var n=M1(J1(arguments.length>1?arguments[1]:void 0,r.length)),i=tv(t);return H1(r,n,n+i.length)===i}})});var ov=f((IB,iv)=>{"use strict";nv();var G1=Ge();iv.exports=G1("String","startsWith")});var sv=f((TB,av)=>{"use strict";var K1=Te(),W1=ov(),Xs=String.prototype;av.exports=function(e){var t=e.startsWith;return typeof e=="string"||e===Xs||K1(Xs,e)&&t===Xs.startsWith?W1:t}});var cv=f((RB,lv)=>{"use strict";var z1=sv();lv.exports=z1});var dv=f((kB,uv)=>{uv.exports=cv()});var vv=f((OB,mv)=>{"use strict";var pv=de(),Y1=ir(),Q1=fe(),X1=je(),fv=an(),Z1=tr(),hv=Function,eR=pv([].concat),tR=pv([].join),Zs={},rR=function(e,t,r){if(!X1(Zs,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Zs[t]=hv("C,a","return new C("+tR(n,",")+")")}return Zs[t](e,r)};mv.exports=Z1?hv.bind:function(t){var r=Y1(this),n=r.prototype,i=fv(arguments,1),o=function(){var s=eR(i,fv(arguments));return this instanceof o?rR(r,s.length,s):r.apply(t,s)};return Q1(n)&&(o.prototype=n),o}});var _v=f(()=>{"use strict";var nR=te(),gv=vv();nR({target:"Function",proto:!0,forced:Function.bind!==gv},{bind:gv})});var bv=f((NB,yv)=>{"use strict";_v();var iR=Ge();yv.exports=iR("Function","bind")});var Ev=f((DB,wv)=>{"use strict";var oR=Te(),aR=bv(),el=Function.prototype;wv.exports=function(e){var t=e.bind;return e===el||oR(el,e)&&t===el.bind?aR:t}});var Av=f((LB,xv)=>{"use strict";var sR=Ev();xv.exports=sR});var Iv=f((qB,Sv)=>{Sv.exports=Av()});var Rv=f((UB,Tv)=>{"use strict";Tv.exports=function(){}});var $t=f((MB,kv)=>{"use strict";kv.exports={}});var tl=f((jB,Cv)=>{"use strict";var lR=ee(),cR=ve(),Ov=lR.WeakMap;Cv.exports=cR(Ov)&&/native code/.test(String(Ov))});var yi=f((FB,Nv)=>{"use strict";var uR=ds(),dR=ci(),Pv=uR("keys");Nv.exports=function(e){return Pv[e]||(Pv[e]=dR(e))}});var cn=f((BB,Dv)=>{"use strict";Dv.exports={}});var dn=f(($B,Uv)=>{"use strict";var fR=tl(),qv=ee(),pR=fe(),hR=Bt(),rl=je(),nl=Qr(),mR=yi(),vR=cn(),Lv="Object already initialized",il=qv.TypeError,gR=qv.WeakMap,bi,un,wi,_R=function(e){return wi(e)?un(e):bi(e,{})},yR=function(e){return function(t){var r;if(!pR(t)||(r=un(t)).type!==e)throw new il("Incompatible receiver, "+e+" required");return r}};fR||nl.state?(Qe=nl.state||(nl.state=new gR),Qe.get=Qe.get,Qe.has=Qe.has,Qe.set=Qe.set,bi=function(e,t){if(Qe.has(e))throw new il(Lv);return t.facade=e,Qe.set(e,t),t},un=function(e){return Qe.get(e)||{}},wi=function(e){return Qe.has(e)}):(Ht=mR("state"),vR[Ht]=!0,bi=function(e,t){if(rl(e,Ht))throw new il(Lv);return t.facade=e,hR(e,Ht,t),t},un=function(e){return rl(e,Ht)?e[Ht]:{}},wi=function(e){return rl(e,Ht)});var Qe,Ht;Uv.exports={set:bi,get:un,has:wi,enforce:_R,getterFor:yR}});var sl=f((HB,jv)=>{"use strict";var ol=Me(),bR=je(),Mv=Function.prototype,wR=ol&&Object.getOwnPropertyDescriptor,al=bR(Mv,"name"),ER=al&&(function(){}).name==="something",xR=al&&(!ol||ol&&wR(Mv,"name").configurable);jv.exports={EXISTS:al,PROPER:ER,CONFIGURABLE:xR}});var ll=f((JB,Bv)=>{"use strict";var AR=Tt(),SR=Ws(),IR=ur(),Fv=function(e){return function(t,r,n){var i=AR(t),o=IR(i);if(o===0)return!e&&-1;var a=SR(n,o),s;if(e&&r!==r){for(;o>a;)if(s=i[a++],s!==s)return!0}else for(;o>a;a++)if((e||a in i)&&i[a]===r)return e||a||0;return!e&&-1}};Bv.exports={includes:Fv(!0),indexOf:Fv(!1)}});var ul=f((VB,Hv)=>{"use strict";var TR=de(),cl=je(),RR=Tt(),kR=ll().indexOf,OR=cn(),$v=TR([].push);Hv.exports=function(e,t){var r=RR(e),n=0,i=[],o;for(o in r)!cl(OR,o)&&cl(r,o)&&$v(i,o);for(;t.length>n;)cl(r,o=t[n++])&&(~kR(i,o)||$v(i,o));return i}});var Ei=f((GB,Jv)=>{"use strict";Jv.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var dl=f((KB,Vv)=>{"use strict";var CR=ul(),PR=Ei();Vv.exports=Object.keys||function(t){return CR(t,PR)}});var Kv=f(Gv=>{"use strict";var NR=Me(),DR=_s(),LR=kt(),qR=Rt(),UR=Tt(),MR=dl();Gv.f=NR&&!DR?Object.defineProperties:function(t,r){qR(t);for(var n=UR(r),i=MR(r),o=i.length,a=0,s;o>a;)LR.f(t,s=i[a++],n[s]);return t}});var zv=f((zB,Wv)=>{"use strict";var jR=ni();Wv.exports=jR("document","documentElement")});var Si=f((YB,rg)=>{"use strict";var FR=Rt(),BR=Kv(),Yv=Ei(),$R=cn(),HR=zv(),JR=ms(),VR=yi(),Qv=">",Xv="<",pl="prototype",hl="script",eg=VR("IE_PROTO"),fl=function(){},tg=function(e){return Xv+hl+Qv+e+Xv+"/"+hl+Qv},Zv=function(e){e.write(tg("")),e.close();var t=e.parentWindow.Object;return e=null,t},GR=function(){var e=JR("iframe"),t="java"+hl+":",r;return e.style.display="none",HR.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(tg("document.F=Object")),r.close(),r.F},xi,Ai=function(){try{xi=new ActiveXObject("htmlfile")}catch(t){}Ai=typeof document!="undefined"?document.domain&&xi?Zv(xi):GR():Zv(xi);for(var e=Yv.length;e--;)delete Ai[pl][Yv[e]];return Ai()};$R[eg]=!0;rg.exports=Object.create||function(t,r){var n;return t!==null?(fl[pl]=FR(t),n=new fl,fl[pl]=null,n[eg]=t):n=Ai(),r===void 0?n:BR.f(n,r)}});var ig=f((QB,ng)=>{"use strict";var KR=z();ng.exports=!KR(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var vl=f((XB,ag)=>{"use strict";var WR=je(),zR=ve(),YR=ar(),QR=yi(),XR=ig(),og=QR("IE_PROTO"),ml=Object,ZR=ml.prototype;ag.exports=XR?ml.getPrototypeOf:function(e){var t=YR(e);if(WR(t,og))return t[og];var r=t.constructor;return zR(r)&&t instanceof r?r.prototype:t instanceof ml?ZR:null}});var Ii=f((ZB,sg)=>{"use strict";var ek=Bt();sg.exports=function(e,t,r,n){return n&&n.enumerable?e[t]=r:ek(e,t,r),e}});var bl=f((e5,ug)=>{"use strict";var tk=z(),rk=ve(),nk=fe(),ik=Si(),lg=vl(),ok=Ii(),ak=Re(),sk=or(),yl=ak("iterator"),cg=!1,vt,gl,_l;[].keys&&(_l=[].keys(),"next"in _l?(gl=lg(lg(_l)),gl!==Object.prototype&&(vt=gl)):cg=!0);var lk=!nk(vt)||tk(function(){var e={};return vt[yl].call(e)!==e});lk?vt={}:sk&&(vt=ik(vt));rk(vt[yl])||ok(vt,yl,function(){return this});ug.exports={IteratorPrototype:vt,BUGGY_SAFARI_ITERATORS:cg}});var fg=f((t5,dg)=>{"use strict";var ck=fi(),uk=dr();dg.exports=ck?{}.toString:function(){return"[object "+uk(this)+"]"}});var fn=f((r5,hg)=>{"use strict";var dk=fi(),fk=kt().f,pk=Bt(),hk=je(),mk=fg(),vk=Re(),pg=vk("toStringTag");hg.exports=function(e,t,r,n){var i=r?e:e&&e.prototype;i&&(hk(i,pg)||fk(i,pg,{configurable:!0,value:t}),n&&!dk&&pk(i,"toString",mk))}});var vg=f((n5,mg)=>{"use strict";var gk=bl().IteratorPrototype,_k=Si(),yk=Yr(),bk=fn(),wk=$t(),Ek=function(){return this};mg.exports=function(e,t,r,n){var i=t+" Iterator";return e.prototype=_k(gk,{next:yk(+!n,r)}),bk(e,i,!1,!0),wk[i]=Ek,e}});var _g=f((i5,gg)=>{"use strict";var xk=de(),Ak=ir();gg.exports=function(e,t,r){try{return xk(Ak(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(n){}}});var bg=f((o5,yg)=>{"use strict";var Sk=fe();yg.exports=function(e){return Sk(e)||e===null}});var Eg=f((a5,wg)=>{"use strict";var Ik=bg(),Tk=String,Rk=TypeError;wg.exports=function(e){if(Ik(e))return e;throw new Rk("Can't set "+Tk(e)+" as a prototype")}});var Ag=f((s5,xg)=>{"use strict";var kk=_g(),Ok=fe(),Ck=nr(),Pk=Eg();xg.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,t={},r;try{r=kk(Object.prototype,"__proto__","set"),r(t,[]),e=t instanceof Array}catch(n){}return function(i,o){return Ck(i),Pk(o),Ok(i)&&(e?r(i,o):i.__proto__=o),i}}():void 0)});var Lg=f((l5,Dg)=>{"use strict";var Nk=te(),Dk=ht(),Ti=or(),Pg=sl(),Lk=ve(),qk=vg(),Sg=vl(),Ig=Ag(),Uk=fn(),Mk=Bt(),wl=Ii(),jk=Re(),Tg=$t(),Ng=bl(),Fk=Pg.PROPER,Bk=Pg.CONFIGURABLE,Rg=Ng.IteratorPrototype,Ri=Ng.BUGGY_SAFARI_ITERATORS,pn=jk("iterator"),kg="keys",hn="values",Og="entries",Cg=function(){return this};Dg.exports=function(e,t,r,n,i,o,a){qk(r,t,n);var s=function(v){if(v===i&&h)return h;if(!Ri&&v&&v in d)return d[v];switch(v){case kg:return function(){return new r(this,v)};case hn:return function(){return new r(this,v)};case Og:return function(){return new r(this,v)}}return function(){return new r(this)}},l=t+" Iterator",c=!1,d=e.prototype,u=d[pn]||d["@@iterator"]||i&&d[i],h=!Ri&&u||s(i),p=t==="Array"&&d.entries||u,m,g,_;if(p&&(m=Sg(p.call(new e)),m!==Object.prototype&&m.next&&(!Ti&&Sg(m)!==Rg&&(Ig?Ig(m,Rg):Lk(m[pn])||wl(m,pn,Cg)),Uk(m,l,!0,!0),Ti&&(Tg[l]=Cg))),Fk&&i===hn&&u&&u.name!==hn&&(!Ti&&Bk?Mk(d,"name",hn):(c=!0,h=function(){return Dk(u,this)})),i)if(g={values:s(hn),keys:o?h:s(kg),entries:s(Og)},a)for(_ in g)(Ri||c||!(_ in d))&&wl(d,_,g[_]);else Nk({target:t,proto:!0,forced:Ri||c},g);return(!Ti||a)&&d[pn]!==h&&wl(d,pn,h,{name:i}),Tg[t]=h,g}});var Ug=f((c5,qg)=>{"use strict";qg.exports=function(e,t){return{value:e,done:t}}});var xl=f((u5,$g)=>{"use strict";var $k=Tt(),El=Rv(),Mg=$t(),Fg=dn(),Hk=kt().f,Jk=Lg(),ki=Ug(),Vk=or(),Gk=Me(),Bg="Array Iterator",Kk=Fg.set,Wk=Fg.getterFor(Bg);$g.exports=Jk(Array,"Array",function(e,t){Kk(this,{type:Bg,target:$k(e),index:0,kind:t})},function(){var e=Wk(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,ki(void 0,!0);switch(e.kind){case"keys":return ki(r,!1);case"values":return ki(t[r],!1)}return ki([r,t[r]],!1)},"values");var jg=Mg.Arguments=Mg.Array;El("keys");El("values");El("entries");if(!Vk&&Gk&&jg.name!=="values")try{Hk(jg,"name",{value:"values"})}catch(e){}});var Hg=f(()=>{});var Al=f((p5,Jg)=>{"use strict";var zk=z();Jg.exports=!zk(function(){return Object.isExtensible(Object.preventExtensions({}))})});var Sl=f((h5,Vg)=>{"use strict";var Yk=Ii();Vg.exports=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:Yk(e,n,t[n],r);return e}});var Il=f(Gg=>{"use strict";var Qk=ul(),Xk=Ei(),Zk=Xk.concat("length","prototype");Gg.f=Object.getOwnPropertyNames||function(t){return Qk(t,Zk)}});var Yg=f((v5,zg)=>{"use strict";var eO=pt(),tO=Tt(),Kg=Il().f,rO=an(),Wg=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],nO=function(e){try{return Kg(e)}catch(t){return rO(Wg)}};zg.exports.f=function(t){return Wg&&eO(t)==="Window"?nO(t):Kg(tO(t))}});var Xg=f((g5,Qg)=>{"use strict";var iO=z();Qg.exports=iO(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})});var t_=f((_5,e_)=>{"use strict";var oO=z(),aO=fe(),sO=pt(),Zg=Xg(),Oi=Object.isExtensible,lO=oO(function(){Oi(1)});e_.exports=lO||Zg?function(t){return!aO(t)||Zg&&sO(t)==="ArrayBuffer"?!1:Oi?Oi(t):!0}:Oi});var Ci=f((y5,i_)=>{"use strict";var cO=te(),uO=de(),dO=cn(),fO=fe(),Tl=je(),pO=kt().f,r_=Il(),hO=Yg(),Rl=t_(),mO=ci(),vO=Al(),n_=!1,gt=mO("meta"),gO=0,kl=function(e){pO(e,gt,{value:{objectID:"O"+gO++,weakData:{}}})},_O=function(e,t){if(!fO(e))return typeof e=="symbol"?e:(typeof e=="string"?"S":"P")+e;if(!Tl(e,gt)){if(!Rl(e))return"F";if(!t)return"E";kl(e)}return e[gt].objectID},yO=function(e,t){if(!Tl(e,gt)){if(!Rl(e))return!0;if(!t)return!1;kl(e)}return e[gt].weakData},bO=function(e){return vO&&n_&&Rl(e)&&!Tl(e,gt)&&kl(e),e},wO=function(){EO.enable=function(){},n_=!0;var e=r_.f,t=uO([].splice),r={};r[gt]=1,e(r).length&&(r_.f=function(n){for(var i=e(n),o=0,a=i.length;o<a;o++)if(i[o]===gt){t(i,o,1);break}return i},cO({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:hO.f}))},EO=i_.exports={enable:wO,fastKey:_O,getWeakData:yO,onFreeze:bO};dO[gt]=!0});var a_=f((b5,o_)=>{"use strict";var xO=Re(),AO=$t(),SO=xO("iterator"),IO=Array.prototype;o_.exports=function(e){return e!==void 0&&(AO.Array===e||IO[SO]===e)}});var Ol=f((w5,l_)=>{"use strict";var TO=dr(),s_=li(),RO=rr(),kO=$t(),OO=Re(),CO=OO("iterator");l_.exports=function(e){if(!RO(e))return s_(e,CO)||s_(e,"@@iterator")||kO[TO(e)]}});var u_=f((E5,c_)=>{"use strict";var PO=ht(),NO=ir(),DO=Rt(),LO=si(),qO=Ol(),UO=TypeError;c_.exports=function(e,t){var r=arguments.length<2?qO(e):t;if(NO(r))return DO(PO(r,e));throw new UO(LO(e)+" is not iterable")}});var p_=f((x5,f_)=>{"use strict";var MO=ht(),d_=Rt(),jO=li();f_.exports=function(e,t,r){var n,i;d_(e);try{if(n=jO(e,"return"),!n){if(t==="throw")throw r;return r}n=MO(n,e)}catch(o){i=!0,n=o}if(t==="throw")throw r;if(i)throw n;return d_(n),r}});var Cl=f((A5,g_)=>{"use strict";var FO=ui(),BO=ht(),$O=Rt(),HO=si(),JO=a_(),VO=ur(),h_=Te(),GO=u_(),KO=Ol(),m_=p_(),WO=TypeError,Pi=function(e,t){this.stopped=e,this.result=t},v_=Pi.prototype;g_.exports=function(e,t,r){var n=r&&r.that,i=!!(r&&r.AS_ENTRIES),o=!!(r&&r.IS_RECORD),a=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),l=FO(t,n),c,d,u,h,p,m,g,_=function(y){return c&&m_(c,"normal",y),new Pi(!0,y)},v=function(y){return i?($O(y),s?l(y[0],y[1],_):l(y[0],y[1])):s?l(y,_):l(y)};if(o)c=e.iterator;else if(a)c=e;else{if(d=KO(e),!d)throw new WO(HO(e)+" is not iterable");if(JO(d)){for(u=0,h=VO(e);h>u;u++)if(p=v(e[u]),p&&h_(v_,p))return p;return new Pi(!1)}c=GO(e,d)}for(m=o?e.next:c.next;!(g=BO(m,c)).done;){try{p=v(g.value)}catch(y){m_(c,"throw",y)}if(typeof p=="object"&&p&&h_(v_,p))return p}return new Pi(!1)}});var Pl=f((S5,__)=>{"use strict";var zO=Te(),YO=TypeError;__.exports=function(e,t){if(zO(t,e))return e;throw new YO("Incorrect invocation")}});var w_=f((I5,b_)=>{"use strict";var QO=te(),XO=ee(),ZO=Ci(),eC=z(),tC=Bt(),rC=Cl(),nC=Pl(),iC=ve(),oC=fe(),aC=rr(),sC=fn(),lC=kt().f,cC=Ct().forEach,uC=Me(),y_=dn(),dC=y_.set,fC=y_.getterFor;b_.exports=function(e,t,r){var n=e.indexOf("Map")!==-1,i=e.indexOf("Weak")!==-1,o=n?"set":"add",a=XO[e],s=a&&a.prototype,l={},c;if(!uC||!iC(a)||!(i||s.forEach&&!eC(function(){new a().entries().next()})))c=r.getConstructor(t,e,n,o),ZO.enable();else{c=t(function(h,p){dC(nC(h,d),{type:e,collection:new a}),aC(p)||rC(p,h[o],{that:h,AS_ENTRIES:n})});var d=c.prototype,u=fC(e);cC(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(h){var p=h==="add"||h==="set";h in s&&!(i&&h==="clear")&&tC(d,h,function(m,g){var _=u(this).collection;if(!p&&i&&!oC(m))return h==="get"?void 0:!1;var v=_[h](m===0?0:m,g);return p?this:v})}),i||lC(d,"size",{configurable:!0,get:function(){return u(this).collection.size}})}return sC(c,e,!1,!0),l[e]=c,QO({global:!0,forced:!0},l),i||r.setStrong(c,e,n),c}});var R_=f((T5,T_)=>{"use strict";var pC=de(),E_=Sl(),Ni=Ci().getWeakData,hC=Pl(),mC=Rt(),vC=rr(),Nl=fe(),gC=Cl(),A_=Ct(),x_=je(),S_=dn(),_C=S_.set,yC=S_.getterFor,bC=A_.find,wC=A_.findIndex,EC=pC([].splice),xC=0,Di=function(e){return e.frozen||(e.frozen=new I_)},I_=function(){this.entries=[]},Dl=function(e,t){return bC(e.entries,function(r){return r[0]===t})};I_.prototype={get:function(e){var t=Dl(this,e);if(t)return t[1]},has:function(e){return!!Dl(this,e)},set:function(e,t){var r=Dl(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=wC(this.entries,function(r){return r[0]===e});return~t&&EC(this.entries,t,1),!!~t}};T_.exports={getConstructor:function(e,t,r,n){var i=e(function(l,c){hC(l,o),_C(l,{type:t,id:xC++,frozen:null}),vC(c)||gC(c,l[n],{that:l,AS_ENTRIES:r})}),o=i.prototype,a=yC(t),s=function(l,c,d){var u=a(l),h=Ni(mC(c),!0);return h===!0?Di(u).set(c,d):h[u.id]=d,l};return E_(o,{delete:function(l){var c=a(this);if(!Nl(l))return!1;var d=Ni(l);return d===!0?Di(c).delete(l):d&&x_(d,c.id)&&delete d[c.id]},has:function(c){var d=a(this);if(!Nl(c))return!1;var u=Ni(c);return u===!0?Di(d).has(c):u&&x_(u,d.id)}}),E_(o,r?{get:function(c){var d=a(this);if(Nl(c)){var u=Ni(c);if(u===!0)return Di(d).get(c);if(u)return u[d.id]}},set:function(c,d){return s(this,c,d)}}:{add:function(c){return s(this,c,!0)}}),i}}});var q_=f(()=>{"use strict";var AC=Al(),k_=ee(),Mi=de(),O_=Sl(),SC=Ci(),IC=w_(),C_=R_(),Li=fe(),qi=dn().enforce,TC=z(),RC=tl(),gn=Object,kC=Array.isArray,Ui=gn.isExtensible,P_=gn.isFrozen,OC=gn.isSealed,N_=gn.freeze,CC=gn.seal,PC=!k_.ActiveXObject&&"ActiveXObject"in k_,mn,D_=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},L_=IC("WeakMap",D_,C_),fr=L_.prototype,ji=Mi(fr.set),NC=function(){return AC&&TC(function(){var e=N_([]);return ji(new L_,e,1),!P_(e)})};RC&&(PC?(mn=C_.getConstructor(D_,"WeakMap",!0),SC.enable(),Ll=Mi(fr.delete),vn=Mi(fr.has),ql=Mi(fr.get),O_(fr,{delete:function(e){if(Li(e)&&!Ui(e)){var t=qi(this);return t.frozen||(t.frozen=new mn),Ll(this,e)||t.frozen.delete(e)}return Ll(this,e)},has:function(t){if(Li(t)&&!Ui(t)){var r=qi(this);return r.frozen||(r.frozen=new mn),vn(this,t)||r.frozen.has(t)}return vn(this,t)},get:function(t){if(Li(t)&&!Ui(t)){var r=qi(this);return r.frozen||(r.frozen=new mn),vn(this,t)?ql(this,t):r.frozen.get(t)}return ql(this,t)},set:function(t,r){if(Li(t)&&!Ui(t)){var n=qi(this);n.frozen||(n.frozen=new mn),vn(this,t)?ji(this,t,r):n.frozen.set(t,r)}else ji(this,t,r);return this}})):NC()&&O_(fr,{set:function(t,r){var n;return kC(t)&&(P_(t)?n=N_:OC(t)&&(n=CC)),ji(this,t,r),n&&n(t),this}}));var Ll,vn,ql});var U_=f(()=>{"use strict";q_()});var j_=f((P5,M_)=>{"use strict";xl();Hg();U_();var DC=mt();M_.exports=DC.WeakMap});var B_=f((N5,F_)=>{"use strict";F_.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}});var H_=f(()=>{"use strict";xl();var LC=B_(),qC=ee(),UC=fn(),$_=$t();for(Fi in LC)UC(qC[Fi],Fi),$_[Fi]=$_.Array;var Fi});var V_=f((q5,J_)=>{"use strict";var MC=j_();H_();J_.exports=MC});var K_=f((U5,G_)=>{G_.exports=V_()});var z_=f(()=>{"use strict";var jC=te(),FC=zr(),BC=ll().indexOf,$C=nn(),Ul=FC([].indexOf),W_=!!Ul&&1/Ul([1],1,-0)<0,HC=W_||!$C("indexOf");jC({target:"Array",proto:!0,forced:HC},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return W_?Ul(this,t,r)||0:BC(this,t,r)}})});var Q_=f((F5,Y_)=>{"use strict";z_();var JC=Ge();Y_.exports=JC("Array","indexOf")});var Z_=f((B5,X_)=>{"use strict";var VC=Te(),GC=Q_(),Ml=Array.prototype;X_.exports=function(e){var t=e.indexOf;return e===Ml||VC(Ml,e)&&t===Ml.indexOf?GC:t}});var ty=f(($5,ey)=>{"use strict";var KC=Z_();ey.exports=KC});var ny=f((H5,ry)=>{ry.exports=ty()});var iy=f(()=>{"use strict";var WC=te(),zC=Me(),YC=Si();WC({target:"Object",stat:!0,sham:!zC},{create:YC})});var ay=f((G5,oy)=>{"use strict";iy();var QC=mt(),XC=QC.Object;oy.exports=function(t,r){return XC.create(t,r)}});var ly=f((K5,sy)=>{"use strict";var ZC=ay();sy.exports=ZC});var uy=f((W5,cy)=>{cy.exports=ly()});var dy=f(()=>{"use strict";var eP=te(),tP=Ct().map,rP=rn(),nP=rP("map");eP({target:"Array",proto:!0,forced:!nP},{map:function(t){return tP(this,t,arguments.length>1?arguments[1]:void 0)}})});var py=f((Q5,fy)=>{"use strict";dy();var iP=Ge();fy.exports=iP("Array","map")});var my=f((X5,hy)=>{"use strict";var oP=Te(),aP=py(),jl=Array.prototype;hy.exports=function(e){var t=e.map;return e===jl||oP(jl,e)&&t===jl.map?aP:t}});var gy=f((Z5,vy)=>{"use strict";var sP=my();vy.exports=sP});var yy=f((e3,_y)=>{_y.exports=gy()});var wy=f(by=>{"use strict";by.f=Object.getOwnPropertySymbols});var Sy=f((r3,Ay)=>{"use strict";var Ey=Me(),lP=de(),cP=ht(),uP=z(),Fl=dl(),dP=wy(),fP=es(),pP=ar(),hP=ri(),pr=Object.assign,xy=Object.defineProperty,mP=lP([].concat);Ay.exports=!pr||uP(function(){if(Ey&&pr({b:1},pr(xy({},"a",{enumerable:!0,get:function(){xy(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(i){t[i]=i}),pr({},e)[r]!==7||Fl(pr({},t)).join("")!==n})?function(t,r){for(var n=pP(t),i=arguments.length,o=1,a=dP.f,s=fP.f;i>o;)for(var l=hP(arguments[o++]),c=a?mP(Fl(l),a(l)):Fl(l),d=c.length,u=0,h;d>u;)h=c[u++],(!Ey||cP(s,l,h))&&(n[h]=l[h]);return n}:pr});var Ty=f(()=>{"use strict";var vP=te(),Iy=Sy();vP({target:"Object",stat:!0,arity:2,forced:Object.assign!==Iy},{assign:Iy})});var ky=f((o3,Ry)=>{"use strict";Ty();var gP=mt();Ry.exports=gP.Object.assign});var Cy=f((a3,Oy)=>{"use strict";var _P=ky();Oy.exports=_P});var Ny=f((s3,Py)=>{Py.exports=Cy()});var Bl=f((l3,Dy)=>{"use strict";Dy.exports=`
20
- \v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var Uy=f((c3,qy)=>{"use strict";var yP=de(),bP=nr(),wP=Qs(),Hl=Bl(),Ly=yP("".replace),EP=RegExp("^["+Hl+"]+"),xP=RegExp("(^|[^"+Hl+"])["+Hl+"]+$"),$l=function(e){return function(t){var r=wP(bP(t));return e&1&&(r=Ly(r,EP,"")),e&2&&(r=Ly(r,xP,"$1")),r}};qy.exports={start:$l(1),end:$l(2),trim:$l(3)}});var By=f((u3,Fy)=>{"use strict";var AP=sl().PROPER,SP=z(),My=Bl(),jy="\u200B\x85\u180E";Fy.exports=function(e){return SP(function(){return!!My[e]()||jy[e]()!==jy||AP&&My[e].name!==e})}});var $y=f(()=>{"use strict";var IP=te(),TP=Uy().trim,RP=By();IP({target:"String",proto:!0,forced:RP("trim")},{trim:function(){return TP(this)}})});var Jy=f((p3,Hy)=>{"use strict";$y();var kP=Ge();Hy.exports=kP("String","trim")});var Gy=f((h3,Vy)=>{"use strict";var OP=Te(),CP=Jy(),Jl=String.prototype;Vy.exports=function(e){var t=e.trim;return typeof e=="string"||e===Jl||OP(Jl,e)&&t===Jl.trim?CP:t}});var Wy=f((m3,Ky)=>{"use strict";var PP=Gy();Ky.exports=PP});var Yy=f((v3,zy)=>{zy.exports=Wy()});function oc(e,t){ne.__h&&ne.__h(Q,e,bn||t),bn=0;var r=Q.__H||(Q.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Nt(e){return bn=1,NP(xb,e)}function NP(e,t,r){var n=oc(yn++,2);if(n.t=e,!n.__c&&(n.__=[xb(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],c=n.t(l,s);l!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=Q,!Q.__f)){var i=function(s,l,c){var d;if(!n.__c.__H)return!0;var u=(0,nc.default)(d=n.__c.__H.__).call(d,function(p){return!!p.__c});if((0,fb.default)(u).call(u,function(p){return!p.__N}))return!o||o.call(this,s,l,c);var h=n.__c.props!==s;return(0,xe.default)(u).call(u,function(p){if(p.__N){var m=p.__[0];p.__=p.__N,p.__N=void 0,m!==p.__[0]&&(h=!0)}}),o&&o.call(this,s,l,c)||h};Q.__f=!0;var o=Q.shouldComponentUpdate,a=Q.componentWillUpdate;Q.componentWillUpdate=function(s,l,c){if(this.__e){var d=o;o=void 0,i(s,l,c),o=d}a&&a.call(this,s,l,c)},Q.shouldComponentUpdate=i}return n.__N||n.__}function Jt(e,t){var r=oc(yn++,3);!ne.__s&&Eb(r.__H,t)&&(r.__=e,r.u=t,Q.__H.__h.push(r))}function Wi(e){return bn=5,wb(function(){return{current:e}},[])}function wb(e,t){var r=oc(yn++,7);return Eb(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function at(e,t){return bn=8,wb(function(){return e},t)}function DP(){for(var e;e=bb.shift();)if(e.__P&&e.__H)try{var t,r;(0,xe.default)(t=e.__H.__h).call(t,$i),(0,xe.default)(r=e.__H.__h).call(r,Xl),e.__H.__h=[]}catch(n){e.__H.__h=[],ne.__e(n,e.__v)}}function LP(e){var t,r=function(){clearTimeout(n),ib&&cancelAnimationFrame(t),(0,Yl.default)(e)},n=(0,Yl.default)(r,100);ib&&(t=requestAnimationFrame(r))}function $i(e){var t=Q,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),Q=t}function Xl(e){var t=Q;e.__c=e.__(),Q=t}function Eb(e,t){return!e||e.length!==t.length||(0,Gi.default)(t).call(t,function(r,n){return r!==e[n]})}function xb(e,t){return typeof t=="function"?t(e):t}function b(e,t,r,n,i,o){t||(t={});var a,s,l=t;if("ref"in l)for(s in l={},t)s=="ref"?a=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--qP,__i:-1,__u:0,__source:i,__self:o};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return O.vnode&&O.vnode(c),c}function FP(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function BP(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}function KP(e,t){return ge(e,0)^45?(((t<<2^ge(e,0))<<2^ge(e,1))<<2^ge(e,2))<<2^ge(e,3):0}function Ib(e){return(0,yb.default)(e).call(e)}function WP(e,t){return(e=t.exec(e))?e[0]:e}function M(e,t,r){return e.replace(t,r)}function Zl(e,t){return(0,ic.default)(e).call(e,t)}function ge(e,t){return e.charCodeAt(t)|0}function wn(e,t,r){return(0,hb.default)(e).call(e,t,r)}function ot(e){return e.length}function lc(e){return e.length}function Bi(e,t){return t.push(e),e}function zP(e,t){return(0,gb.default)(e).call(e,t).join("")}function Zi(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:Xi,column:vr,length:a,return:""}}function _n(e,t){return GP(Zi("",null,null,"",null,null,0),e,{length:-e.length},t)}function YP(){return ie}function QP(){return ie=Pe>0?ge(gr,--Pe):0,vr--,ie===10&&(vr=1,Xi--),ie}function Fe(){return ie=Pe<Tb?ge(gr,Pe++):0,vr++,ie===10&&(vr=1,Xi++),ie}function st(){return ge(gr,Pe)}function Hi(){return Pe}function xn(e,t){return wn(gr,e,t)}function En(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Rb(e){return Xi=vr=1,Tb=ot(gr=e),Pe=0,[]}function kb(e){return gr="",e}function Ji(e){return Ib(xn(Pe-1,ec(e===91?e+2:e===40?e+1:e)))}function XP(e){for(;(ie=st())&&ie<33;)Fe();return En(e)>2||En(ie)>3?"":" "}function ZP(e,t){for(;--t&&Fe()&&!(ie<48||ie>102||ie>57&&ie<65||ie>70&&ie<97););return xn(e,Hi()+(t<6&&st()==32&&Fe()==32))}function ec(e){for(;Fe();)switch(ie){case e:return Pe;case 34:case 39:e!==34&&e!==39&&ec(ie);break;case 40:e===41&&ec(e);break;case 92:Fe();break}return Pe}function eN(e,t){for(;Fe()&&e+ie!==57&&!(e+ie===84&&st()===47););return"/*"+xn(t,Pe-1)+"*"+Qi(e===47?e:Fe())}function tN(e){for(;!En(st());)Fe();return xn(e,Pe)}function rN(e){return kb(Vi("",null,null,null,[""],e=Rb(e),0,[0],e))}function Vi(e,t,r,n,i,o,a,s,l){for(var c=0,d=0,u=a,h=0,p=0,m=0,g=1,_=1,v=1,y=0,x="",R=i,C=o,S=n,w=x;_;)switch(m=y,y=Fe()){case 40:if(m!=108&&ge(w,u-1)==58){Zl(w+=M(Ji(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:w+=Ji(y);break;case 9:case 10:case 13:case 32:w+=XP(m);break;case 92:w+=ZP(Hi()-1,7);continue;case 47:switch(st()){case 42:case 47:Bi(nN(eN(Fe(),Hi()),t,r),l);break;default:w+="/"}break;case 123*g:s[c++]=ot(w)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:_=0;case 59+d:v==-1&&(w=M(w,/\f/g,"")),p>0&&ot(w)-u&&Bi(p>32?ab(w+";",n,r,u-1):ab(M(w," ","")+";",n,r,u-2),l);break;case 59:w+=";";default:if(Bi(S=ob(w,t,r,c,d,i,s,x,R=[],C=[],u),o),y===123)if(d===0)Vi(w,t,S,S,R,o,u,s,C);else switch(h===99&&ge(w,3)===110?100:h){case 100:case 108:case 109:case 115:Vi(e,S,S,n&&Bi(ob(e,S,S,0,0,i,s,x,i,R=[],u),C),i,C,u,s,n?R:C);break;default:Vi(w,S,S,S,[""],C,0,s,C)}}c=d=p=0,g=v=1,x=w="",u=a;break;case 58:u=1+ot(w),p=m;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&QP()==125)continue}switch(w+=Qi(y),y*g){case 38:v=d>0?1:(w+="\f",-1);break;case 44:s[c++]=(ot(w)-1)*v,v=1;break;case 64:st()===45&&(w+=Ji(Fe())),h=st(),d=u=ot(x=w+=tN(Hi())),y++;break;case 45:m===45&&ot(w)==2&&(g=0)}}return o}function ob(e,t,r,n,i,o,a,s,l,c,d){for(var u=i-1,h=i===0?o:[""],p=lc(h),m=0,g=0,_=0;m<n;++m)for(var v=0,y=wn(e,u+1,u=VP(g=a[m])),x=e;v<p;++v)(x=Ib(g>0?h[v]+" "+y:M(y,/&\f/g,h[v])))&&(l[_++]=x);return Zi(e,t,r,i===0?ac:s,l,c,d)}function nN(e,t,r){return Zi(e,t,r,Ab,Qi(YP()),wn(e,2,-2),0)}function ab(e,t,r,n){return Zi(e,t,r,sc,wn(e,0,n),wn(e,n+1,-1),n)}function mr(e,t){for(var r="",n=lc(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function iN(e,t,r,n){switch(e.type){case JP:if(e.children.length)break;case HP:case sc:return e.return=e.return||e.value;case Ab:return"";case Sb:return e.return=e.value+"{"+mr(e.children,n)+"}";case ac:e.value=e.props.join(",")}return ot(r=mr(e.children,n))?e.return=e.value+"{"+r+"}":""}function oN(e){var t=lc(e);return function(r,n,i,o){for(var a="",s=0;s<t;s++)a+=e[s](r,n,i,o)||"";return a}}function aN(e){return function(t){t.root||(t=t.return)&&e(t)}}function sN(e){var t=(0,vb.default)(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}function Ob(e,t){switch(KP(e,t)){case 5103:return U+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return U+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return U+e+zi+e+Ee+e+e;case 6828:case 4268:return U+e+Ee+e+e;case 6165:return U+e+Ee+"flex-"+e+e;case 5187:return U+e+M(e,/(\w+).+(:[^]+)/,U+"box-$1$2"+Ee+"flex-$1$2")+e;case 5443:return U+e+Ee+"flex-item-"+M(e,/flex-|-self/,"")+e;case 4675:return U+e+Ee+"flex-line-pack"+M(e,/align-content|flex-|-self/,"")+e;case 5548:return U+e+Ee+M(e,"shrink","negative")+e;case 5292:return U+e+Ee+M(e,"basis","preferred-size")+e;case 6060:return U+"box-"+M(e,"-grow","")+U+e+Ee+M(e,"grow","positive")+e;case 4554:return U+M(e,/([^-])(transform)/g,"$1"+U+"$2")+e;case 6187:return M(M(M(e,/(zoom-|grab)/,U+"$1"),/(image-set)/,U+"$1"),e,"")+e;case 5495:case 3959:return M(e,/(image-set\([^]*)/,U+"$1$`$1");case 4968:return M(M(e,/(.+:)(flex-)?(.*)/,U+"box-pack:$3"+Ee+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+U+e+e;case 4095:case 3583:case 4068:case 2532:return M(e,/(.+)-inline(.+)/,U+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ot(e)-1-t>6)switch(ge(e,t+1)){case 109:if(ge(e,t+4)!==45)break;case 102:return M(e,/(.+:)(.+)-([^]+)/,"$1"+U+"$2-$3$1"+zi+(ge(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Zl(e,"stretch")?Ob(M(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ge(e,t+1)!==115)break;case 6444:switch(ge(e,ot(e)-3-(~Zl(e,"!important")&&10))){case 107:return M(e,":",":"+U)+e;case 101:return M(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+U+(ge(e,14)===45?"inline-":"")+"box$3$1"+U+"$2$3$1"+Ee+"$2box$3")+e}break;case 5936:switch(ge(e,t+11)){case 114:return U+e+Ee+M(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return U+e+Ee+M(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return U+e+Ee+M(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return U+e+Ee+e+e}return e}function vN(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function Yi(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return Pt={name:i.name,styles:i.styles,next:Pt},i.name;var o=r;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)Pt={name:a.name,styles:a.styles,next:Pt},a=a.next;var s=o.styles+";";return s}return bN(e,t,r)}}var l=r;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function bN(e,t,r){var n="";if((0,Ki.default)(r))for(var i=0;i<r.length;i++)n+=Yi(e,t,r[i])+";";else for(var o in r){var a=r[o];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?n+=o+"{"+t[s]+"}":lb(s)&&(n+=Kl(o)+":"+cb(o,s)+";")}else if((0,Ki.default)(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)lb(a[l])&&(n+=Kl(o)+":"+cb(o,a[l])+";");else{var c=Yi(e,t,a);switch(o){case"animation":case"animationName":{n+=Kl(o)+":"+c+";";break}default:n+=o+"{"+c+"}"}}}return n}function Wl(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";Pt=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,i+=Yi(r,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=Yi(r,t,e[s]),n){var l=o;i+=l[s]}ub.lastIndex=0;for(var c="",d;(d=ub.exec(i))!==null;)c+="-"+d[1];var u=vN(i)+c;return{name:u,styles:i,next:Pt}}function tc(e,t,r){var n,i="";return(0,xe.default)(n=r.split(" ")).call(n,function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(i+=o+" ")}),i}function db(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function zl(e,t,r){var n=[],i=tc(e,n,r);return n.length<2?r:i+t(n)}function kN(s){var l=s,{elementTag:e="Image",src:t="",children:r,handleExposure:n,className:i,imgStyle:o}=l,a=Ze(l,["elementTag","src","children","handleExposure","className","imgStyle"]);let c=RN(()=>{t&&n()});return e==="Image"?b("div",{className:i,style:{borderRadius:"8px"},children:nt("img",L(k({},a),{ref:c,src:t!=null?t:"",style:k({display:"block",width:"100%",height:"auto",objectFit:"cover",maxWidth:"100%",maxHeight:"100%",aspectRatio:"1 / 1",borderRadius:"8px"},o||{})}))}):b("div",L(k({},a),{ref:c,className:i,children:r}))}function ON(e,t){if(!e)return null;let r=Array.isArray(t)?t[0]:t,n=Array.isArray(t)?t[1]:0;return Array.isArray(e)?e.map((i,o)=>i&&typeof i=="object"&&"type"in i?nt(i.type,L(k({},i.props),{style:L(k({},i.props.style||{}),{paddingLeft:r>0?`${r/2}px`:void 0,paddingRight:r>0?`${r/2}px`:void 0,paddingTop:n>0?`${n/2}px`:void 0,paddingBottom:n>0?`${n/2}px`:void 0}),key:i.key||o})):i):e&&typeof e=="object"&&"type"in e?nt(e.type,L(k({},e.props),{style:L(k({},e.props.style||{}),{paddingLeft:r>0?`${r/2}px`:void 0,paddingRight:r>0?`${r/2}px`:void 0,paddingTop:n>0?`${n/2}px`:void 0,paddingBottom:n>0?`${n/2}px`:void 0})})):e}var nc,fb,xe,pb,Gi,Yl,hb,Ki,y3,Ql,mb,ic,vb,gb,_b,yb,yn,Q,Vl,Qy,bn,bb,ne,Xy,Zy,eb,tb,rb,nb,ib,qP,Gl,UP,MP,jP,$P,Ee,zi,U,Ab,ac,sc,HP,Sb,JP,VP,Qi,GP,Xi,vr,Tb,Pe,ie,gr,lN,cN,uN,sb,dN,fN,pN,hN,mN,gN,_N,yN,Cb,lb,Kl,cb,ub,Pt,wN,EN,xN,AN,SN,N,IN,TN,cc,RN,uc,dc,Pb,CN,PN,NN,rc,DN,Nb,_r,_t,Db,hr,LN,qN,UN,MN,jN,re,FN,BN,Lb,qb,Ub,Mb,$N,HN,jb,eo=T(()=>{"use strict";er();nc=ce(Gp(),1),fb=ce(rh(),1),xe=ce(mh(),1),pb=ce(Oh(),1),Gi=ce(jh(),1),Yl=ce(nm(),1);Ks();hb=ce(Fm(),1),Ki=ce(Km(),1),y3=ce(dv(),1),Ql=ce(Iv(),1),mb=ce(K_(),1),ic=ce(ny(),1),vb=ce(uy(),1),gb=ce(yy(),1),_b=ce(Ny(),1),yb=ce(Yy(),1),bn=0,bb=[],ne=O,Xy=ne.__b,Zy=ne.__r,eb=ne.diffed,tb=ne.__c,rb=ne.unmount,nb=ne.__;ne.__b=function(e){Q=null,Xy&&Xy(e)},ne.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),nb&&nb(e,t)},ne.__r=function(e){var t,r,n;Zy&&Zy(e),yn=0;var i=(Q=e.__c).__H;i&&(Vl===Q?(i.__h=[],Q.__h=[],(0,xe.default)(t=i.__).call(t,function(o){o.__N&&(o.__=o.__N),o.u=o.__N=void 0})):((0,xe.default)(r=i.__h).call(r,$i),(0,xe.default)(n=i.__h).call(n,Xl),i.__h=[],yn=0)),Vl=Q},ne.diffed=function(e){var t;eb&&eb(e);var r=e.__c;r&&r.__H&&(r.__H.__h.length&&(bb.push(r)!==1&&Qy===ne.requestAnimationFrame||((Qy=ne.requestAnimationFrame)||LP)(DP)),(0,xe.default)(t=r.__H.__).call(t,function(n){n.u&&(n.__H=n.u),n.u=void 0})),Vl=Q=null},ne.__c=function(e,t){(0,Gi.default)(t).call(t,function(r){try{var n,i;(0,xe.default)(n=r.__h).call(n,$i),r.__h=(0,nc.default)(i=r.__h).call(i,function(o){return!o.__||Xl(o)})}catch(o){(0,Gi.default)(t).call(t,function(a){a.__h&&(a.__h=[])}),t=[],ne.__e(o,r.__v)}}),tb&&tb(e,t)},ne.unmount=function(e){var t;rb&&rb(e);var r,n=e.__c;n&&n.__H&&((0,xe.default)(t=n.__H.__).call(t,function(i){try{$i(i)}catch(o){r=o}}),n.__H=void 0,r&&ne.__e(r,n.__v))};ib=typeof requestAnimationFrame=="function";qP=0;Gl={drawerBackdrop:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"flex-end",zIndex:1e3,overflow:"hidden",touchAction:"none"},drawer:{backgroundColor:"white",borderRadius:"16px 16px 0 0",width:"100%",maxWidth:"100%",overflowY:"auto",position:"relative",boxShadow:"0 -2px 10px rgba(0, 0, 0, 0.1)",display:"flex",flexDirection:"column",margin:"0 auto"},drawerContent:{flex:1,width:"100%",height:"100%",overflow:"auto",margin:"0 auto"}},UP=`
19
+ `;e.textContent=o;let a=document.head||document.getElementsByTagName("head")[0];a.insertBefore(e,a.firstChild),document.documentElement.setAttribute("data-jolibox-root","")},n=()=>{function o(s){return I(this,null,function*(){let l=s instanceof URL?s.href:s,c=new Promise((d,u)=>{let h=new XMLHttpRequest;h.open("GET",l),h.responseType="arraybuffer",h.addEventListener("load",()=>d(h.response)),h.addEventListener("error",u),h.send()});try{let d=yield c;return new Response(d,{headers:new Headers([["Content-Type","application/wasm"]])}).clone()}catch(d){throw console.error("Failed to load wasm:",d),d}})}let a=window.fetch;window.fetch=(s,l)=>{let c=s instanceof URL?s.href:s.toString();return c.endsWith(".wasm")?o(c):a(s,l)}},i=()=>{e!=null&&e.parentNode&&(e.parentNode.removeChild(e),e=null),document.documentElement.removeAttribute("data-jolibox-root"),window.fetch=t};return r(),n(),i}var yd=T(()=>{"use strict"});var bd=T(()=>{"use strict"});var wd=T(()=>{"use strict";D();Na()});var Ed=T(()=>{"use strict";Z()});var Qn,Ja=T(()=>{"use strict";bd();wd();Z();Ed();D();Qn=new tt});function ft(e,t){for(var r in t)e[r]=t[r];return e}function za(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function nt(e,t,r){var n,i,o,a={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?ti.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)a[o]===void 0&&(a[o]=e.defaultProps[o]);return Zn(e,a,n,i,null)}function Zn(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++Td:i,__i:-1,__u:0};return i==null&&O.vnode!=null&&O.vnode(o),o}function it(e){return e.children}function Ue(e,t){this.props=e,this.context=t}function Xt(e,t){if(t==null)return e.__?Xt(e.__,e.__i+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?Xt(e):null}function Pd(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Pd(e)}}function Ad(e){(!e.__d&&(e.__d=!0)&&Ft.push(e)&&!ei.__r++||xd!==O.debounceRendering)&&((xd=O.debounceRendering)||Rd)(ei)}function ei(){for(var e,t,r,n,i,o,a,s=1;Ft.length;)Ft.length>s&&Ft.sort(kd),e=Ft.shift(),s=Ft.length,e.__d&&(r=void 0,i=(n=(t=e).__v).__e,o=[],a=[],t.__P&&((r=ft({},n)).__v=n.__v+1,O.vnode&&O.vnode(r),Ya(t.__P,r,n,t.__n,t.__P.namespaceURI,32&n.__u?[i]:null,o,i==null?Xt(n):i,!!(32&n.__u),a),r.__v=n.__v,r.__.__k[r.__i]=r,Ld(o,r,a),r.__e!=i&&Pd(r)));ei.__r=0}function Nd(e,t,r,n,i,o,a,s,l,c,d){var u,h,p,m,g,_,v=n&&n.__k||Cd,y=t.length;for(l=Tx(r,t,v,l,y),u=0;u<y;u++)(p=r.__k[u])!=null&&(h=p.__i===-1?Vr:v[p.__i]||Vr,p.__i=u,_=Ya(e,p,h,i,o,a,s,l,c,d),m=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&Qa(h.ref,null,p),d.push(p.ref,p.__c||m,p)),g==null&&m!=null&&(g=m),4&p.__u||h.__k===p.__k?l=Dd(p,l,e):typeof p.type=="function"&&_!==void 0?l=_:m&&(l=m.nextSibling),p.__u&=-7);return r.__e=g,l}function Tx(e,t,r,n,i){var o,a,s,l,c,d=r.length,u=d,h=0;for(e.__k=new Array(i),o=0;o<i;o++)(a=t[o])!=null&&typeof a!="boolean"&&typeof a!="function"?(l=o+h,(a=e.__k[o]=typeof a=="string"||typeof a=="number"||typeof a=="bigint"||a.constructor==String?Zn(null,a,null,null,null):Gr(a)?Zn(it,{children:a},null,null,null):a.constructor===void 0&&a.__b>0?Zn(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,s=null,(c=a.__i=Rx(a,r,l,u))!==-1&&(u--,(s=r[c])&&(s.__u|=2)),s==null||s.__v===null?(c==-1&&(i>d?h--:i<d&&h++),typeof a.type!="function"&&(a.__u|=4)):c!=l&&(c==l-1?h--:c==l+1?h++:(c>l?h--:h++,a.__u|=4))):e.__k[o]=null;if(u)for(o=0;o<d;o++)(s=r[o])!=null&&!(2&s.__u)&&(s.__e==n&&(n=Xt(s)),Ud(s,s));return n}function Dd(e,t,r){var n,i;if(typeof e.type=="function"){for(n=e.__k,i=0;n&&i<n.length;i++)n[i]&&(n[i].__=e,t=Dd(n[i],t,r));return t}e.__e!=t&&(t&&e.type&&!r.contains(t)&&(t=Xt(e)),r.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Kr(e,t){return t=t||[],e==null||typeof e=="boolean"||(Gr(e)?e.some(function(r){Kr(r,t)}):t.push(e)),t}function Rx(e,t,r,n){var i,o,a=e.key,s=e.type,l=t[r];if(l===null&&e.key==null||l&&a==l.key&&s===l.type&&!(2&l.__u))return r;if(n>(l!=null&&!(2&l.__u)?1:0))for(i=r-1,o=r+1;i>=0||o<t.length;){if(i>=0){if((l=t[i])&&!(2&l.__u)&&a==l.key&&s===l.type)return i;i--}if(o<t.length){if((l=t[o])&&!(2&l.__u)&&a==l.key&&s===l.type)return o;o++}}return-1}function Sd(e,t,r){t[0]=="-"?e.setProperty(t,r==null?"":r):e[t]=r==null?"":typeof r!="number"||Ix.test(t)?r:r+"px"}function Xn(e,t,r,n,i){var o;e:if(t=="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Sd(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Sd(e.style,t,r[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(Od,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n?r.t=n.t:(r.t=Wa,e.addEventListener(t,o?Ga:Va,o)):e.removeEventListener(t,o?Ga:Va,o);else{if(i=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=r==null?"":r;break e}catch(a){}typeof r=="function"||(r==null||r===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&r==1?"":r))}}function Id(e){return function(t){if(this.l){var r=this.l[t.type+e];if(t.u==null)t.u=Wa++;else if(t.u<r.t)return;return r(O.event?O.event(t):t)}}}function Ya(e,t,r,n,i,o,a,s,l,c){var d,u,h,p,m,g,_,v,y,x,R,C,S,w,B,$e,Yt,He=t.type;if(t.constructor!==void 0)return null;128&r.__u&&(l=!!(32&r.__u),o=[s=t.__e=r.__e]),(d=O.__b)&&d(t);e:if(typeof He=="function")try{if(v=t.props,y="prototype"in He&&He.prototype.render,x=(d=He.contextType)&&n[d.__c],R=d?x?x.props.value:d.__:n,r.__c?_=(u=t.__c=r.__c).__=u.__E:(y?t.__c=u=new He(v,R):(t.__c=u=new Ue(v,R),u.constructor=He,u.render=Ox),x&&x.sub(u),u.props=v,u.state||(u.state={}),u.context=R,u.__n=n,h=u.__d=!0,u.__h=[],u._sb=[]),y&&u.__s==null&&(u.__s=u.state),y&&He.getDerivedStateFromProps!=null&&(u.__s==u.state&&(u.__s=ft({},u.__s)),ft(u.__s,He.getDerivedStateFromProps(v,u.__s))),p=u.props,m=u.state,u.__v=t,h)y&&He.getDerivedStateFromProps==null&&u.componentWillMount!=null&&u.componentWillMount(),y&&u.componentDidMount!=null&&u.__h.push(u.componentDidMount);else{if(y&&He.getDerivedStateFromProps==null&&v!==p&&u.componentWillReceiveProps!=null&&u.componentWillReceiveProps(v,R),!u.__e&&(u.shouldComponentUpdate!=null&&u.shouldComponentUpdate(v,u.__s,R)===!1||t.__v==r.__v)){for(t.__v!=r.__v&&(u.props=v,u.state=u.__s,u.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.some(function(qt){qt&&(qt.__=t)}),C=0;C<u._sb.length;C++)u.__h.push(u._sb[C]);u._sb=[],u.__h.length&&a.push(u);break e}u.componentWillUpdate!=null&&u.componentWillUpdate(v,u.__s,R),y&&u.componentDidUpdate!=null&&u.__h.push(function(){u.componentDidUpdate(p,m,g)})}if(u.context=R,u.props=v,u.__P=e,u.__e=!1,S=O.__r,w=0,y){for(u.state=u.__s,u.__d=!1,S&&S(t),d=u.render(u.props,u.state,u.context),B=0;B<u._sb.length;B++)u.__h.push(u._sb[B]);u._sb=[]}else do u.__d=!1,S&&S(t),d=u.render(u.props,u.state,u.context),u.state=u.__s;while(u.__d&&++w<25);u.state=u.__s,u.getChildContext!=null&&(n=ft(ft({},n),u.getChildContext())),y&&!h&&u.getSnapshotBeforeUpdate!=null&&(g=u.getSnapshotBeforeUpdate(p,m)),$e=d,d!=null&&d.type===it&&d.key==null&&($e=qd(d.props.children)),s=Nd(e,Gr($e)?$e:[$e],t,r,n,i,o,a,s,l,c),u.base=t.__e,t.__u&=-161,u.__h.length&&a.push(u),_&&(u.__E=u.__=null)}catch(qt){if(t.__v=null,l||o!=null)if(qt.then){for(t.__u|=l?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;o[o.indexOf(s)]=null,t.__e=s}else for(Yt=o.length;Yt--;)za(o[Yt]);else t.__e=r.__e,t.__k=r.__k;O.__e(qt,t,r)}else o==null&&t.__v==r.__v?(t.__k=r.__k,t.__e=r.__e):s=t.__e=kx(r.__e,t,r,n,i,o,a,l,c);return(d=O.diffed)&&d(t),128&t.__u?void 0:s}function Ld(e,t,r){for(var n=0;n<r.length;n++)Qa(r[n],r[++n],r[++n]);O.__c&&O.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){O.__e(o,i.__v)}})}function qd(e){return typeof e!="object"||e==null?e:Gr(e)?e.map(qd):ft({},e)}function kx(e,t,r,n,i,o,a,s,l){var c,d,u,h,p,m,g,_=r.props,v=t.props,y=t.type;if(y=="svg"?i="http://www.w3.org/2000/svg":y=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(c=0;c<o.length;c++)if((p=o[c])&&"setAttribute"in p==!!y&&(y?p.localName==y:p.nodeType==3)){e=p,o[c]=null;break}}if(e==null){if(y==null)return document.createTextNode(v);e=document.createElementNS(i,y,v.is&&v),s&&(O.__m&&O.__m(t,o),s=!1),o=null}if(y===null)_===v||s&&e.data===v||(e.data=v);else{if(o=o&&ti.call(e.childNodes),_=r.props||Vr,!s&&o!=null)for(_={},c=0;c<e.attributes.length;c++)_[(p=e.attributes[c]).name]=p.value;for(c in _)if(p=_[c],c!="children"){if(c=="dangerouslySetInnerHTML")u=p;else if(!(c in v)){if(c=="value"&&"defaultValue"in v||c=="checked"&&"defaultChecked"in v)continue;Xn(e,c,null,p,i)}}for(c in v)p=v[c],c=="children"?h=p:c=="dangerouslySetInnerHTML"?d=p:c=="value"?m=p:c=="checked"?g=p:s&&typeof p!="function"||_[c]===p||Xn(e,c,p,_[c],i);if(d)s||u&&(d.__html===u.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(u&&(e.innerHTML=""),Nd(t.type==="template"?e.content:e,Gr(h)?h:[h],t,r,n,y=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,a,o?o[0]:r.__k&&Xt(r,0),s,l),o!=null)for(c=o.length;c--;)za(o[c]);s||(c="value",y=="progress"&&m==null?e.removeAttribute("value"):m!==void 0&&(m!==e[c]||y=="progress"&&!m||y=="option"&&m!==_[c])&&Xn(e,c,m,_[c],i),c="checked",g!==void 0&&g!==e[c]&&Xn(e,c,g,_[c],i))}return e}function Qa(e,t,r){try{if(typeof e=="function"){var n=typeof e.__u=="function";n&&e.__u(),n&&t==null||(e.__u=e(t))}else e.current=t}catch(i){O.__e(i,r)}}function Ud(e,t,r){var n,i;if(O.unmount&&O.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Qa(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){O.__e(o,t)}n.base=n.__P=null}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Ud(n[i],t,r||typeof e.type!="function");r||za(e.__e),e.__c=e.__=e.__e=void 0}function Ox(e,t,r){return this.constructor(e,r)}function Zt(e,t,r){var n,i,o,a;t==document&&(t=document.documentElement),O.__&&O.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,o=[],a=[],Ya(t,e=(!n&&r||t).__k=nt(it,null,[e]),i||Vr,Vr,t.namespaceURI,!n&&r?[r]:i?null:t.firstChild?ti.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,a),Ld(o,e,a)}var ti,O,Td,Ka,Ft,xd,Rd,kd,Od,Wa,Va,Ga,Sx,Vr,Cd,Ix,Gr,er=T(()=>{Vr={},Cd=[],Ix=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Gr=Array.isArray;ti=Cd.slice,O={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(s){e=s}throw e}},Td=0,Ka=function(e){return e!=null&&e.constructor==null},Ue.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ft({},this.state),typeof e=="function"&&(e=e(ft({},r),this.props)),e&&ft(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Ad(this))},Ue.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Ad(this))},Ue.prototype.render=it,Ft=[],Rd=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,kd=function(e,t){return e.__v.__b-t.__v.__b},ei.__r=0,Od=/(PointerCapture)$|Capture$/i,Wa=0,Va=Id(!1),Ga=Id(!0),Sx=0});var z=f((Vj,Md)=>{"use strict";Md.exports=function(e){try{return!!e()}catch(t){return!0}}});var tr=f((Gj,jd)=>{"use strict";var Cx=z();jd.exports=!Cx(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var de=f((Kj,$d)=>{"use strict";var Fd=tr(),Bd=Function.prototype,Xa=Bd.call,Px=Fd&&Bd.bind.bind(Xa,Xa);$d.exports=Fd?Px:function(e){return function(){return Xa.apply(e,arguments)}}});var Te=f((Wj,Hd)=>{"use strict";var Nx=de();Hd.exports=Nx({}.isPrototypeOf)});var ee=f((Za,Jd)=>{"use strict";var Wr=function(e){return e&&e.Math===Math&&e};Jd.exports=Wr(typeof globalThis=="object"&&globalThis)||Wr(typeof window=="object"&&window)||Wr(typeof self=="object"&&self)||Wr(typeof global=="object"&&global)||Wr(typeof Za=="object"&&Za)||function(){return this}()||Function("return this")()});var es=f((zj,Wd)=>{"use strict";var Dx=tr(),Kd=Function.prototype,Vd=Kd.apply,Gd=Kd.call;Wd.exports=typeof Reflect=="object"&&Reflect.apply||(Dx?Gd.bind(Vd):function(){return Gd.apply(Vd,arguments)})});var pt=f((Yj,Yd)=>{"use strict";var zd=de(),Lx=zd({}.toString),qx=zd("".slice);Yd.exports=function(e){return qx(Lx(e),8,-1)}});var zr=f((Qj,Qd)=>{"use strict";var Ux=pt(),Mx=de();Qd.exports=function(e){if(Ux(e)==="Function")return Mx(e)}});var ve=f((Xj,Xd)=>{"use strict";var ts=typeof document=="object"&&document.all;Xd.exports=typeof ts=="undefined"&&ts!==void 0?function(e){return typeof e=="function"||e===ts}:function(e){return typeof e=="function"}});var Me=f((Zj,Zd)=>{"use strict";var jx=z();Zd.exports=!jx(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var ht=f((eF,ef)=>{"use strict";var Fx=tr(),ri=Function.prototype.call;ef.exports=Fx?ri.bind(ri):function(){return ri.apply(ri,arguments)}});var rs=f(nf=>{"use strict";var tf={}.propertyIsEnumerable,rf=Object.getOwnPropertyDescriptor,Bx=rf&&!tf.call({1:2},1);nf.f=Bx?function(t){var r=rf(this,t);return!!r&&r.enumerable}:tf});var Yr=f((rF,of)=>{"use strict";of.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var ni=f((nF,af)=>{"use strict";var $x=de(),Hx=z(),Jx=pt(),ns=Object,Vx=$x("".split);af.exports=Hx(function(){return!ns("z").propertyIsEnumerable(0)})?function(e){return Jx(e)==="String"?Vx(e,""):ns(e)}:ns});var rr=f((iF,sf)=>{"use strict";sf.exports=function(e){return e==null}});var nr=f((oF,lf)=>{"use strict";var Gx=rr(),Kx=TypeError;lf.exports=function(e){if(Gx(e))throw new Kx("Can't call method on "+e);return e}});var Tt=f((aF,cf)=>{"use strict";var Wx=ni(),zx=nr();cf.exports=function(e){return Wx(zx(e))}});var fe=f((sF,uf)=>{"use strict";var Yx=ve();uf.exports=function(e){return typeof e=="object"?e!==null:Yx(e)}});var mt=f((lF,df)=>{"use strict";df.exports={}});var ii=f((cF,pf)=>{"use strict";var is=mt(),os=ee(),Qx=ve(),ff=function(e){return Qx(e)?e:void 0};pf.exports=function(e,t){return arguments.length<2?ff(is[e])||ff(os[e]):is[e]&&is[e][t]||os[e]&&os[e][t]}});var oi=f((uF,vf)=>{"use strict";var Xx=ee(),hf=Xx.navigator,mf=hf&&hf.userAgent;vf.exports=mf?String(mf):""});var si=f((dF,Ef)=>{"use strict";var wf=ee(),as=oi(),gf=wf.process,_f=wf.Deno,yf=gf&&gf.versions||_f&&_f.version,bf=yf&&yf.v8,Ye,ai;bf&&(Ye=bf.split("."),ai=Ye[0]>0&&Ye[0]<4?1:+(Ye[0]+Ye[1]));!ai&&as&&(Ye=as.match(/Edge\/(\d+)/),(!Ye||Ye[1]>=74)&&(Ye=as.match(/Chrome\/(\d+)/),Ye&&(ai=+Ye[1])));Ef.exports=ai});var ss=f((fF,Af)=>{"use strict";var xf=si(),Zx=z(),eA=ee(),tA=eA.String;Af.exports=!!Object.getOwnPropertySymbols&&!Zx(function(){var e=Symbol("symbol detection");return!tA(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&xf&&xf<41})});var ls=f((pF,Sf)=>{"use strict";var rA=ss();Sf.exports=rA&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var cs=f((hF,If)=>{"use strict";var nA=ii(),iA=ve(),oA=Te(),aA=ls(),sA=Object;If.exports=aA?function(e){return typeof e=="symbol"}:function(e){var t=nA("Symbol");return iA(t)&&oA(t.prototype,sA(e))}});var li=f((mF,Tf)=>{"use strict";var lA=String;Tf.exports=function(e){try{return lA(e)}catch(t){return"Object"}}});var ir=f((vF,Rf)=>{"use strict";var cA=ve(),uA=li(),dA=TypeError;Rf.exports=function(e){if(cA(e))return e;throw new dA(uA(e)+" is not a function")}});var ci=f((gF,kf)=>{"use strict";var fA=ir(),pA=rr();kf.exports=function(e,t){var r=e[t];return pA(r)?void 0:fA(r)}});var Cf=f((_F,Of)=>{"use strict";var us=ht(),ds=ve(),fs=fe(),hA=TypeError;Of.exports=function(e,t){var r,n;if(t==="string"&&ds(r=e.toString)&&!fs(n=us(r,e))||ds(r=e.valueOf)&&!fs(n=us(r,e))||t!=="string"&&ds(r=e.toString)&&!fs(n=us(r,e)))return n;throw new hA("Can't convert object to primitive value")}});var or=f((yF,Pf)=>{"use strict";Pf.exports=!0});var Lf=f((bF,Df)=>{"use strict";var Nf=ee(),mA=Object.defineProperty;Df.exports=function(e,t){try{mA(Nf,e,{value:t,configurable:!0,writable:!0})}catch(r){Nf[e]=t}return t}});var Qr=f((wF,Mf)=>{"use strict";var vA=or(),gA=ee(),_A=Lf(),qf="__core-js_shared__",Uf=Mf.exports=gA[qf]||_A(qf,{});(Uf.versions||(Uf.versions=[])).push({version:"3.41.0",mode:vA?"pure":"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var ps=f((EF,Ff)=>{"use strict";var jf=Qr();Ff.exports=function(e,t){return jf[e]||(jf[e]=t||{})}});var ar=f((xF,Bf)=>{"use strict";var yA=nr(),bA=Object;Bf.exports=function(e){return bA(yA(e))}});var je=f((AF,$f)=>{"use strict";var wA=de(),EA=ar(),xA=wA({}.hasOwnProperty);$f.exports=Object.hasOwn||function(t,r){return xA(EA(t),r)}});var ui=f((SF,Hf)=>{"use strict";var AA=de(),SA=0,IA=Math.random(),TA=AA(1 .toString);Hf.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+TA(++SA+IA,36)}});var Re=f((IF,Vf)=>{"use strict";var RA=ee(),kA=ps(),Jf=je(),OA=ui(),CA=ss(),PA=ls(),sr=RA.Symbol,hs=kA("wks"),NA=PA?sr.for||sr:sr&&sr.withoutSetter||OA;Vf.exports=function(e){return Jf(hs,e)||(hs[e]=CA&&Jf(sr,e)?sr[e]:NA("Symbol."+e)),hs[e]}});var zf=f((TF,Wf)=>{"use strict";var DA=ht(),Gf=fe(),Kf=cs(),LA=ci(),qA=Cf(),UA=Re(),MA=TypeError,jA=UA("toPrimitive");Wf.exports=function(e,t){if(!Gf(e)||Kf(e))return e;var r=LA(e,jA),n;if(r){if(t===void 0&&(t="default"),n=DA(r,e,t),!Gf(n)||Kf(n))return n;throw new MA("Can't convert object to primitive value")}return t===void 0&&(t="number"),qA(e,t)}});var ms=f((RF,Yf)=>{"use strict";var FA=zf(),BA=cs();Yf.exports=function(e){var t=FA(e,"string");return BA(t)?t:t+""}});var gs=f((kF,Xf)=>{"use strict";var $A=ee(),Qf=fe(),vs=$A.document,HA=Qf(vs)&&Qf(vs.createElement);Xf.exports=function(e){return HA?vs.createElement(e):{}}});var _s=f((OF,Zf)=>{"use strict";var JA=Me(),VA=z(),GA=gs();Zf.exports=!JA&&!VA(function(){return Object.defineProperty(GA("div"),"a",{get:function(){return 7}}).a!==7})});var ys=f(tp=>{"use strict";var KA=Me(),WA=ht(),zA=rs(),YA=Yr(),QA=Tt(),XA=ms(),ZA=je(),eS=_s(),ep=Object.getOwnPropertyDescriptor;tp.f=KA?ep:function(t,r){if(t=QA(t),r=XA(r),eS)try{return ep(t,r)}catch(n){}if(ZA(t,r))return YA(!WA(zA.f,t,r),t[r])}});var np=f((PF,rp)=>{"use strict";var tS=z(),rS=ve(),nS=/#|\.prototype\./,Xr=function(e,t){var r=oS[iS(e)];return r===sS?!0:r===aS?!1:rS(t)?tS(t):!!t},iS=Xr.normalize=function(e){return String(e).replace(nS,".").toLowerCase()},oS=Xr.data={},aS=Xr.NATIVE="N",sS=Xr.POLYFILL="P";rp.exports=Xr});var di=f((NF,op)=>{"use strict";var ip=zr(),lS=ir(),cS=tr(),uS=ip(ip.bind);op.exports=function(e,t){return lS(e),t===void 0?e:cS?uS(e,t):function(){return e.apply(t,arguments)}}});var bs=f((DF,ap)=>{"use strict";var dS=Me(),fS=z();ap.exports=dS&&fS(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Rt=f((LF,sp)=>{"use strict";var pS=fe(),hS=String,mS=TypeError;sp.exports=function(e){if(pS(e))return e;throw new mS(hS(e)+" is not an object")}});var kt=f(cp=>{"use strict";var vS=Me(),gS=_s(),_S=bs(),fi=Rt(),lp=ms(),yS=TypeError,ws=Object.defineProperty,bS=Object.getOwnPropertyDescriptor,Es="enumerable",xs="configurable",As="writable";cp.f=vS?_S?function(t,r,n){if(fi(t),r=lp(r),fi(n),typeof t=="function"&&r==="prototype"&&"value"in n&&As in n&&!n[As]){var i=bS(t,r);i&&i[As]&&(t[r]=n.value,n={configurable:xs in n?n[xs]:i[xs],enumerable:Es in n?n[Es]:i[Es],writable:!1})}return ws(t,r,n)}:ws:function(t,r,n){if(fi(t),r=lp(r),fi(n),gS)try{return ws(t,r,n)}catch(i){}if("get"in n||"set"in n)throw new yS("Accessors not supported");return"value"in n&&(t[r]=n.value),t}});var Bt=f((UF,up)=>{"use strict";var wS=Me(),ES=kt(),xS=Yr();up.exports=wS?function(e,t,r){return ES.f(e,t,xS(1,r))}:function(e,t,r){return e[t]=r,e}});var te=f((MF,fp)=>{"use strict";var Zr=ee(),AS=es(),SS=zr(),IS=ve(),TS=ys().f,RS=np(),lr=mt(),kS=di(),cr=Bt(),dp=je();Qr();var OS=function(e){var t=function(r,n,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,i)}return AS(e,this,arguments)};return t.prototype=e.prototype,t};fp.exports=function(e,t){var r=e.target,n=e.global,i=e.stat,o=e.proto,a=n?Zr:i?Zr[r]:Zr[r]&&Zr[r].prototype,s=n?lr:lr[r]||cr(lr,r,{})[r],l=s.prototype,c,d,u,h,p,m,g,_,v;for(h in t)c=RS(n?h:r+(i?".":"#")+h,e.forced),d=!c&&a&&dp(a,h),m=s[h],d&&(e.dontCallGetSet?(v=TS(a,h),g=v&&v.value):g=a[h]),p=d&&g?g:t[h],!(!c&&!o&&typeof m==typeof p)&&(e.bind&&d?_=kS(p,Zr):e.wrap&&d?_=OS(p):o&&IS(p)?_=SS(p):_=p,(e.sham||p&&p.sham||m&&m.sham)&&cr(_,"sham",!0),cr(s,h,_),o&&(u=r+"Prototype",dp(lr,u)||cr(lr,u,{}),cr(lr[u],h,p),e.real&&l&&(c||!l[h])&&cr(l,h,p)))}});var hp=f((jF,pp)=>{"use strict";var CS=Math.ceil,PS=Math.floor;pp.exports=Math.trunc||function(t){var r=+t;return(r>0?PS:CS)(r)}});var Ss=f((FF,mp)=>{"use strict";var NS=hp();mp.exports=function(e){var t=+e;return t!==t||t===0?0:NS(t)}});var Is=f((BF,vp)=>{"use strict";var DS=Ss(),LS=Math.min;vp.exports=function(e){var t=DS(e);return t>0?LS(t,9007199254740991):0}});var ur=f(($F,gp)=>{"use strict";var qS=Is();gp.exports=function(e){return qS(e.length)}});var en=f((HF,_p)=>{"use strict";var US=pt();_p.exports=Array.isArray||function(t){return US(t)==="Array"}});var pi=f((JF,bp)=>{"use strict";var MS=Re(),jS=MS("toStringTag"),yp={};yp[jS]="z";bp.exports=String(yp)==="[object z]"});var dr=f((VF,wp)=>{"use strict";var FS=pi(),BS=ve(),hi=pt(),$S=Re(),HS=$S("toStringTag"),JS=Object,VS=hi(function(){return arguments}())==="Arguments",GS=function(e,t){try{return e[t]}catch(r){}};wp.exports=FS?hi:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=GS(t=JS(e),HS))=="string"?r:VS?hi(t):(n=hi(t))==="Object"&&BS(t.callee)?"Arguments":n}});var xp=f((GF,Ep)=>{"use strict";var KS=de(),WS=ve(),Ts=Qr(),zS=KS(Function.toString);WS(Ts.inspectSource)||(Ts.inspectSource=function(e){return zS(e)});Ep.exports=Ts.inspectSource});var ks=f((KF,Rp)=>{"use strict";var YS=de(),QS=z(),Ap=ve(),XS=dr(),ZS=ii(),eI=xp(),Sp=function(){},Ip=ZS("Reflect","construct"),Rs=/^\s*(?:class|function)\b/,tI=YS(Rs.exec),rI=!Rs.test(Sp),tn=function(t){if(!Ap(t))return!1;try{return Ip(Sp,[],t),!0}catch(r){return!1}},Tp=function(t){if(!Ap(t))return!1;switch(XS(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return rI||!!tI(Rs,eI(t))}catch(r){return!0}};Tp.sham=!0;Rp.exports=!Ip||QS(function(){var e;return tn(tn.call)||!tn(Object)||!tn(function(){e=!0})||e})?Tp:tn});var Pp=f((WF,Cp)=>{"use strict";var kp=en(),nI=ks(),iI=fe(),oI=Re(),aI=oI("species"),Op=Array;Cp.exports=function(e){var t;return kp(e)&&(t=e.constructor,nI(t)&&(t===Op||kp(t.prototype))?t=void 0:iI(t)&&(t=t[aI],t===null&&(t=void 0))),t===void 0?Op:t}});var Os=f((zF,Np)=>{"use strict";var sI=Pp();Np.exports=function(e,t){return new(sI(e))(t===0?0:t)}});var Ct=f((YF,Lp)=>{"use strict";var lI=di(),cI=de(),uI=ni(),dI=ar(),fI=ur(),pI=Os(),Dp=cI([].push),Ot=function(e){var t=e===1,r=e===2,n=e===3,i=e===4,o=e===6,a=e===7,s=e===5||o;return function(l,c,d,u){for(var h=dI(l),p=uI(h),m=fI(p),g=lI(c,d),_=0,v=u||pI,y=t?v(l,m):r||a?v(l,0):void 0,x,R;m>_;_++)if((s||_ in p)&&(x=p[_],R=g(x,_,h),e))if(t)y[_]=R;else if(R)switch(e){case 3:return!0;case 5:return x;case 6:return _;case 2:Dp(y,x)}else switch(e){case 4:return!1;case 7:Dp(y,x)}return o?-1:n||i?i:y}};Lp.exports={forEach:Ot(0),map:Ot(1),filter:Ot(2),some:Ot(3),every:Ot(4),find:Ot(5),findIndex:Ot(6),filterReject:Ot(7)}});var rn=f((QF,qp)=>{"use strict";var hI=z(),mI=Re(),vI=si(),gI=mI("species");qp.exports=function(e){return vI>=51||!hI(function(){var t=[],r=t.constructor={};return r[gI]=function(){return{foo:1}},t[e](Boolean).foo!==1})}});var Up=f(()=>{"use strict";var _I=te(),yI=Ct().filter,bI=rn(),wI=bI("filter");_I({target:"Array",proto:!0,forced:!wI},{filter:function(t){return yI(this,t,arguments.length>1?arguments[1]:void 0)}})});var Ge=f((e2,Mp)=>{"use strict";var EI=ee(),xI=mt();Mp.exports=function(e,t){var r=xI[e+"Prototype"],n=r&&r[t];if(n)return n;var i=EI[e],o=i&&i.prototype;return o&&o[t]}});var Fp=f((t2,jp)=>{"use strict";Up();var AI=Ge();jp.exports=AI("Array","filter")});var $p=f((r2,Bp)=>{"use strict";var SI=Te(),II=Fp(),Cs=Array.prototype;Bp.exports=function(e){var t=e.filter;return e===Cs||SI(Cs,e)&&t===Cs.filter?II:t}});var Jp=f((n2,Hp)=>{"use strict";var TI=$p();Hp.exports=TI});var Gp=f((i2,Vp)=>{Vp.exports=Jp()});var nn=f((o2,Kp)=>{"use strict";var RI=z();Kp.exports=function(e,t){var r=[][e];return!!r&&RI(function(){r.call(null,t||function(){return 1},1)})}});var Wp=f(()=>{"use strict";var kI=te(),OI=Ct().every,CI=nn(),PI=CI("every");kI({target:"Array",proto:!0,forced:!PI},{every:function(t){return OI(this,t,arguments.length>1?arguments[1]:void 0)}})});var Yp=f((l2,zp)=>{"use strict";Wp();var NI=Ge();zp.exports=NI("Array","every")});var Xp=f((c2,Qp)=>{"use strict";var DI=Te(),LI=Yp(),Ps=Array.prototype;Qp.exports=function(e){var t=e.every;return e===Ps||DI(Ps,e)&&t===Ps.every?LI:t}});var eh=f((u2,Zp)=>{"use strict";var qI=Xp();Zp.exports=qI});var rh=f((d2,th)=>{th.exports=eh()});var ih=f((f2,nh)=>{"use strict";var UI=Ct().forEach,MI=nn(),jI=MI("forEach");nh.exports=jI?[].forEach:function(t){return UI(this,t,arguments.length>1?arguments[1]:void 0)}});var ah=f(()=>{"use strict";var FI=te(),oh=ih();FI({target:"Array",proto:!0,forced:[].forEach!==oh},{forEach:oh})});var lh=f((m2,sh)=>{"use strict";ah();var BI=Ge();sh.exports=BI("Array","forEach")});var uh=f((v2,ch)=>{"use strict";var $I=lh();ch.exports=$I});var dh=f(()=>{});var ph=f((y2,fh)=>{"use strict";var HI=dr(),JI=je(),VI=Te(),GI=uh();dh();var Ns=Array.prototype,KI={DOMTokenList:!0,NodeList:!0};fh.exports=function(e){var t=e.forEach;return e===Ns||VI(Ns,e)&&t===Ns.forEach||JI(KI,HI(e))?GI:t}});var mh=f((b2,hh)=>{hh.exports=ph()});var gh=f((w2,vh)=>{"use strict";var WI=TypeError,zI=9007199254740991;vh.exports=function(e){if(e>zI)throw WI("Maximum allowed index exceeded");return e}});var Ds=f((E2,_h)=>{"use strict";var YI=Me(),QI=kt(),XI=Yr();_h.exports=function(e,t,r){YI?QI.f(e,t,XI(0,r)):e[t]=r}});var Eh=f(()=>{"use strict";var ZI=te(),eT=z(),tT=en(),rT=fe(),nT=ar(),iT=ur(),yh=gh(),bh=Ds(),oT=Os(),aT=rn(),sT=Re(),lT=si(),wh=sT("isConcatSpreadable"),cT=lT>=51||!eT(function(){var e=[];return e[wh]=!1,e.concat()[0]!==e}),uT=function(e){if(!rT(e))return!1;var t=e[wh];return t!==void 0?!!t:tT(e)},dT=!cT||!aT("concat");ZI({target:"Array",proto:!0,arity:1,forced:dT},{concat:function(t){var r=nT(this),n=oT(r,0),i=0,o,a,s,l,c;for(o=-1,s=arguments.length;o<s;o++)if(c=o===-1?r:arguments[o],uT(c))for(l=iT(c),yh(i+l),a=0;a<l;a++,i++)a in c&&bh(n,i,c[a]);else yh(i+1),bh(n,i++,c);return n.length=i,n}})});var Ah=f((S2,xh)=>{"use strict";Eh();var fT=Ge();xh.exports=fT("Array","concat")});var Ih=f((I2,Sh)=>{"use strict";var pT=Te(),hT=Ah(),Ls=Array.prototype;Sh.exports=function(e){var t=e.concat;return e===Ls||pT(Ls,e)&&t===Ls.concat?hT:t}});var Rh=f((T2,Th)=>{"use strict";var mT=Ih();Th.exports=mT});var Oh=f((R2,kh)=>{kh.exports=Rh()});var Ch=f(()=>{"use strict";var vT=te(),gT=Ct().some,_T=nn(),yT=_T("some");vT({target:"Array",proto:!0,forced:!yT},{some:function(t){return gT(this,t,arguments.length>1?arguments[1]:void 0)}})});var Nh=f((C2,Ph)=>{"use strict";Ch();var bT=Ge();Ph.exports=bT("Array","some")});var Lh=f((P2,Dh)=>{"use strict";var wT=Te(),ET=Nh(),qs=Array.prototype;Dh.exports=function(e){var t=e.some;return e===qs||wT(qs,e)&&t===qs.some?ET:t}});var Uh=f((N2,qh)=>{"use strict";var xT=Lh();qh.exports=xT});var jh=f((D2,Mh)=>{Mh.exports=Uh()});var Bh=f((L2,Fh)=>{"use strict";var on=ee(),AT=oi(),ST=pt(),mi=function(e){return AT.slice(0,e.length)===e};Fh.exports=function(){return mi("Bun/")?"BUN":mi("Cloudflare-Workers")?"CLOUDFLARE":mi("Deno/")?"DENO":mi("Node.js/")?"NODE":on.Bun&&typeof Bun.version=="string"?"BUN":on.Deno&&typeof Deno.version=="object"?"DENO":ST(on.process)==="process"?"NODE":on.window&&on.document?"BROWSER":"REST"}()});var an=f((q2,$h)=>{"use strict";var IT=de();$h.exports=IT([].slice)});var Jh=f((U2,Hh)=>{"use strict";var TT=TypeError;Hh.exports=function(e,t){if(e<t)throw new TT("Not enough arguments");return e}});var Us=f((M2,Gh)=>{"use strict";var Vh=ee(),RT=es(),kT=ve(),OT=Bh(),CT=oi(),PT=an(),NT=Jh(),DT=Vh.Function,LT=/MSIE .\./.test(CT)||OT==="BUN"&&function(){var e=Vh.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}();Gh.exports=function(e,t){var r=t?2:1;return LT?function(n,i){var o=NT(arguments.length,1)>r,a=kT(n)?n:DT(n),s=o?PT(arguments,r):[],l=o?function(){RT(a,this,s)}:a;return t?e(l,i):e(l)}:e}});var zh=f(()=>{"use strict";var qT=te(),Wh=ee(),UT=Us(),Kh=UT(Wh.setInterval,!0);qT({global:!0,bind:!0,forced:Wh.setInterval!==Kh},{setInterval:Kh})});var Xh=f(()=>{"use strict";var MT=te(),Qh=ee(),jT=Us(),Yh=jT(Qh.setTimeout,!0);MT({global:!0,bind:!0,forced:Qh.setTimeout!==Yh},{setTimeout:Yh})});var Zh=f(()=>{"use strict";zh();Xh()});var tm=f((V2,em)=>{"use strict";Zh();var FT=mt();em.exports=FT.setTimeout});var nm=f((G2,rm)=>{rm.exports=tm()});function Fs(e,t){Y.__h&&Y.__h(ke,e,gi||t),gi=0;var r=ke.__H||(ke.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Bs(e,t){var r=Fs(sn++,3);!Y.__s&&Js(r.__H,t)&&(r.__=e,r.u=t,ke.__H.__h.push(r))}function $s(e,t){var r=Fs(sn++,4);!Y.__s&&Js(r.__H,t)&&(r.__=e,r.u=t,ke.__h.push(r))}function Hs(e){return gi=5,ln(function(){return{current:e}},[])}function ln(e,t){var r=Fs(sn++,7);return Js(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function _i(e,t){return gi=8,ln(function(){return e},t)}function BT(){for(var e;e=fm.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(vi),e.__H.__h.forEach(js),e.__H.__h=[]}catch(t){e.__H.__h=[],Y.__e(t,e.__v)}}function $T(e){var t,r=function(){clearTimeout(n),dm&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);dm&&(t=requestAnimationFrame(r))}function vi(e){var t=ke,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),ke=t}function js(e){var t=ke;e.__c=e.__(),ke=t}function Js(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}var sn,ke,Ms,im,gi,fm,Y,om,am,sm,lm,cm,um,dm,Vs=T(()=>{er();gi=0,fm=[],Y=O,om=Y.__b,am=Y.__r,sm=Y.diffed,lm=Y.__c,cm=Y.unmount,um=Y.__;Y.__b=function(e){ke=null,om&&om(e)},Y.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),um&&um(e,t)},Y.__r=function(e){am&&am(e),sn=0;var t=(ke=e.__c).__H;t&&(Ms===ke?(t.__h=[],ke.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(vi),t.__h.forEach(js),t.__h=[],sn=0)),Ms=ke},Y.diffed=function(e){sm&&sm(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(fm.push(t)!==1&&im===Y.requestAnimationFrame||((im=Y.requestAnimationFrame)||$T)(BT)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Ms=ke=null},Y.__c=function(e,t){t.some(function(r){try{r.__h.forEach(vi),r.__h=r.__h.filter(function(n){return!n.__||js(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],Y.__e(n,r.__v)}}),lm&&lm(e,t)},Y.unmount=function(e){cm&&cm(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{vi(n)}catch(i){t=i}}),r.__H=void 0,t&&Y.__e(t,r.__v))};dm=typeof requestAnimationFrame=="function"});function Em(e,t){for(var r in t)e[r]=t[r];return e}function Ks(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function pm(e,t){this.props=e,this.context=t}function Ws(e,t){function r(i){var o=this.props.ref,a=o==i.ref;return!a&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!a:Ks(this.props,i)}function n(i){return this.shouldComponentUpdate=r,nt(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}function xm(e){function t(r){var n=Em({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=JT,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}function Am(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Em({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Am(n,t,r)})),e}function Sm(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Sm(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function Gs(){this.__u=0,this.o=null,this.__b=null}function Im(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function yi(){this.i=null,this.l=null}function Tm(e,t,r){return t.__k==null&&(t.textContent=""),Zt(e,t),typeof r=="function"&&r(),e?e.__c:null}function XT(){}function ZT(){return this.cancelBubble}function e1(){return this.defaultPrevented}var hm,JT,VT,mm,vm,GT,KT,WT,zT,YT,QT,gm,Rm,t1,_m,ym,bm,zs=T(()=>{er();er();Vs();Vs();(pm.prototype=new Ue).isPureReactComponent=!0,pm.prototype.shouldComponentUpdate=function(e,t){return Ks(this.props,e)||Ks(this.state,t)};hm=O.__b;O.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),hm&&hm(e)};JT=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;VT=O.__e;O.__e=function(e,t,r,n){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}VT(e,t,r,n)};mm=O.unmount;O.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),mm&&mm(e)},(Gs.prototype=new Ue).__c=function(e,t){var r=t.__c,n=this;n.o==null&&(n.o=[]),n.o.push(r);var i=Im(n.__v),o=!1,a=function(){o||(o=!0,r.__R=null,i?i(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var l=n.state.__a;n.__v.__k[0]=Sm(l,l.__c.__P,l.__c.__O)}var c;for(n.setState({__a:n.__b=null});c=n.o.pop();)c.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},Gs.prototype.componentWillUnmount=function(){this.o=[]},Gs.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Am(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&nt(it,null,e.fallback);return i&&(i.__u&=-33),[nt(it,null,t.__a?null:e.children),i]};vm=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.i=r=r[2]}};(yi.prototype=new Ue).__a=function(e){var t=this,r=Im(t.__v),n=t.l.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),vm(t,e,n)):i()};r?r(o):o()}},yi.prototype.render=function(e){this.i=null,this.l=new Map;var t=Kr(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.l.set(t[r],this.i=[1,0,this.i]);return e.children},yi.prototype.componentDidUpdate=yi.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,r){vm(e,r,t)})};GT=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,KT=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,WT=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,zT=/[A-Z0-9]/g,YT=typeof document!="undefined",QT=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};Ue.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ue.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});gm=O.event;O.event=function(e){return gm&&(e=gm(e)),e.persist=XT,e.isPropagationStopped=ZT,e.isDefaultPrevented=e1,e.nativeEvent=e};t1={enumerable:!1,configurable:!0,get:function(){return this.class}},_m=O.vnode;O.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={},o=n.indexOf("-")===-1;for(var a in r){var s=r[a];if(!(a==="value"&&"defaultValue"in r&&s==null||YT&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var l=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&s===!0?s="":l==="translate"&&s==="no"?s=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?a="ondblclick":l!=="onchange"||n!=="input"&&n!=="textarea"||QT(r.type)?l==="onfocus"?a="onfocusin":l==="onblur"?a="onfocusout":WT.test(a)&&(a=l):l=a="oninput":o&&KT.test(a)?a=a.replace(zT,"-$&").toLowerCase():s===null&&(s=void 0),l==="oninput"&&i[a=l]&&(a="oninputCapture"),i[a]=s}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Kr(r.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=Kr(r.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",t1)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=GT,_m&&_m(e)};ym=O.__r;O.__r=function(e){ym&&ym(e),Rm=e.__c};bm=O.diffed;O.diffed=function(e){bm&&bm(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),Rm=null}});var Ys=f((lB,km)=>{"use strict";var r1=Ss(),n1=Math.max,i1=Math.min;km.exports=function(e,t){var r=r1(e);return r<0?n1(r+t,0):i1(r,t)}});var Pm=f(()=>{"use strict";var o1=te(),Om=en(),a1=ks(),s1=fe(),Cm=Ys(),l1=ur(),c1=Tt(),u1=Ds(),d1=Re(),f1=rn(),p1=an(),h1=f1("slice"),m1=d1("species"),Qs=Array,v1=Math.max;o1({target:"Array",proto:!0,forced:!h1},{slice:function(t,r){var n=c1(this),i=l1(n),o=Cm(t,i),a=Cm(r===void 0?i:r,i),s,l,c;if(Om(n)&&(s=n.constructor,a1(s)&&(s===Qs||Om(s.prototype))?s=void 0:s1(s)&&(s=s[m1],s===null&&(s=void 0)),s===Qs||s===void 0))return p1(n,o,a);for(l=new(s===void 0?Qs:s)(v1(a-o,0)),c=0;o<a;o++,c++)o in n&&u1(l,c,n[o]);return l.length=c,l}})});var Dm=f((dB,Nm)=>{"use strict";Pm();var g1=Ge();Nm.exports=g1("Array","slice")});var qm=f((fB,Lm)=>{"use strict";var _1=Te(),y1=Dm(),Xs=Array.prototype;Lm.exports=function(e){var t=e.slice;return e===Xs||_1(Xs,e)&&t===Xs.slice?y1:t}});var Mm=f((pB,Um)=>{"use strict";var b1=qm();Um.exports=b1});var Fm=f((hB,jm)=>{jm.exports=Mm()});var Bm=f(()=>{"use strict";var w1=te(),E1=en();w1({target:"Array",stat:!0},{isArray:E1})});var Hm=f((gB,$m)=>{"use strict";Bm();var x1=mt();$m.exports=x1.Array.isArray});var Vm=f((_B,Jm)=>{"use strict";var A1=Hm();Jm.exports=A1});var Km=f((yB,Gm)=>{Gm.exports=Vm()});var Zs=f((bB,Wm)=>{"use strict";var S1=dr(),I1=String;Wm.exports=function(e){if(S1(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return I1(e)}});var Ym=f((wB,zm)=>{"use strict";var T1=fe(),R1=pt(),k1=Re(),O1=k1("match");zm.exports=function(e){var t;return T1(e)&&((t=e[O1])!==void 0?!!t:R1(e)==="RegExp")}});var Xm=f((EB,Qm)=>{"use strict";var C1=Ym(),P1=TypeError;Qm.exports=function(e){if(C1(e))throw new P1("The method doesn't accept regular expressions");return e}});var ev=f((xB,Zm)=>{"use strict";var N1=Re(),D1=N1("match");Zm.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[D1]=!1,"/./"[e](t)}catch(n){}}return!1}});var nv=f(()=>{"use strict";var L1=te(),q1=zr(),U1=ys().f,M1=Is(),tv=Zs(),j1=Xm(),F1=nr(),B1=ev(),$1=or(),H1=q1("".slice),J1=Math.min,rv=B1("startsWith"),V1=!$1&&!rv&&!!function(){var e=U1(String.prototype,"startsWith");return e&&!e.writable}();L1({target:"String",proto:!0,forced:!V1&&!rv},{startsWith:function(t){var r=tv(F1(this));j1(t);var n=M1(J1(arguments.length>1?arguments[1]:void 0,r.length)),i=tv(t);return H1(r,n,n+i.length)===i}})});var ov=f((IB,iv)=>{"use strict";nv();var G1=Ge();iv.exports=G1("String","startsWith")});var sv=f((TB,av)=>{"use strict";var K1=Te(),W1=ov(),el=String.prototype;av.exports=function(e){var t=e.startsWith;return typeof e=="string"||e===el||K1(el,e)&&t===el.startsWith?W1:t}});var cv=f((RB,lv)=>{"use strict";var z1=sv();lv.exports=z1});var dv=f((kB,uv)=>{uv.exports=cv()});var vv=f((OB,mv)=>{"use strict";var pv=de(),Y1=ir(),Q1=fe(),X1=je(),fv=an(),Z1=tr(),hv=Function,eR=pv([].concat),tR=pv([].join),tl={},rR=function(e,t,r){if(!X1(tl,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";tl[t]=hv("C,a","return new C("+tR(n,",")+")")}return tl[t](e,r)};mv.exports=Z1?hv.bind:function(t){var r=Y1(this),n=r.prototype,i=fv(arguments,1),o=function(){var s=eR(i,fv(arguments));return this instanceof o?rR(r,s.length,s):r.apply(t,s)};return Q1(n)&&(o.prototype=n),o}});var _v=f(()=>{"use strict";var nR=te(),gv=vv();nR({target:"Function",proto:!0,forced:Function.bind!==gv},{bind:gv})});var bv=f((NB,yv)=>{"use strict";_v();var iR=Ge();yv.exports=iR("Function","bind")});var Ev=f((DB,wv)=>{"use strict";var oR=Te(),aR=bv(),rl=Function.prototype;wv.exports=function(e){var t=e.bind;return e===rl||oR(rl,e)&&t===rl.bind?aR:t}});var Av=f((LB,xv)=>{"use strict";var sR=Ev();xv.exports=sR});var Iv=f((qB,Sv)=>{Sv.exports=Av()});var Rv=f((UB,Tv)=>{"use strict";Tv.exports=function(){}});var $t=f((MB,kv)=>{"use strict";kv.exports={}});var nl=f((jB,Cv)=>{"use strict";var lR=ee(),cR=ve(),Ov=lR.WeakMap;Cv.exports=cR(Ov)&&/native code/.test(String(Ov))});var bi=f((FB,Nv)=>{"use strict";var uR=ps(),dR=ui(),Pv=uR("keys");Nv.exports=function(e){return Pv[e]||(Pv[e]=dR(e))}});var cn=f((BB,Dv)=>{"use strict";Dv.exports={}});var dn=f(($B,Uv)=>{"use strict";var fR=nl(),qv=ee(),pR=fe(),hR=Bt(),il=je(),ol=Qr(),mR=bi(),vR=cn(),Lv="Object already initialized",al=qv.TypeError,gR=qv.WeakMap,wi,un,Ei,_R=function(e){return Ei(e)?un(e):wi(e,{})},yR=function(e){return function(t){var r;if(!pR(t)||(r=un(t)).type!==e)throw new al("Incompatible receiver, "+e+" required");return r}};fR||ol.state?(Qe=ol.state||(ol.state=new gR),Qe.get=Qe.get,Qe.has=Qe.has,Qe.set=Qe.set,wi=function(e,t){if(Qe.has(e))throw new al(Lv);return t.facade=e,Qe.set(e,t),t},un=function(e){return Qe.get(e)||{}},Ei=function(e){return Qe.has(e)}):(Ht=mR("state"),vR[Ht]=!0,wi=function(e,t){if(il(e,Ht))throw new al(Lv);return t.facade=e,hR(e,Ht,t),t},un=function(e){return il(e,Ht)?e[Ht]:{}},Ei=function(e){return il(e,Ht)});var Qe,Ht;Uv.exports={set:wi,get:un,has:Ei,enforce:_R,getterFor:yR}});var cl=f((HB,jv)=>{"use strict";var sl=Me(),bR=je(),Mv=Function.prototype,wR=sl&&Object.getOwnPropertyDescriptor,ll=bR(Mv,"name"),ER=ll&&(function(){}).name==="something",xR=ll&&(!sl||sl&&wR(Mv,"name").configurable);jv.exports={EXISTS:ll,PROPER:ER,CONFIGURABLE:xR}});var ul=f((JB,Bv)=>{"use strict";var AR=Tt(),SR=Ys(),IR=ur(),Fv=function(e){return function(t,r,n){var i=AR(t),o=IR(i);if(o===0)return!e&&-1;var a=SR(n,o),s;if(e&&r!==r){for(;o>a;)if(s=i[a++],s!==s)return!0}else for(;o>a;a++)if((e||a in i)&&i[a]===r)return e||a||0;return!e&&-1}};Bv.exports={includes:Fv(!0),indexOf:Fv(!1)}});var fl=f((VB,Hv)=>{"use strict";var TR=de(),dl=je(),RR=Tt(),kR=ul().indexOf,OR=cn(),$v=TR([].push);Hv.exports=function(e,t){var r=RR(e),n=0,i=[],o;for(o in r)!dl(OR,o)&&dl(r,o)&&$v(i,o);for(;t.length>n;)dl(r,o=t[n++])&&(~kR(i,o)||$v(i,o));return i}});var xi=f((GB,Jv)=>{"use strict";Jv.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var pl=f((KB,Vv)=>{"use strict";var CR=fl(),PR=xi();Vv.exports=Object.keys||function(t){return CR(t,PR)}});var Kv=f(Gv=>{"use strict";var NR=Me(),DR=bs(),LR=kt(),qR=Rt(),UR=Tt(),MR=pl();Gv.f=NR&&!DR?Object.defineProperties:function(t,r){qR(t);for(var n=UR(r),i=MR(r),o=i.length,a=0,s;o>a;)LR.f(t,s=i[a++],n[s]);return t}});var zv=f((zB,Wv)=>{"use strict";var jR=ii();Wv.exports=jR("document","documentElement")});var Ii=f((YB,rg)=>{"use strict";var FR=Rt(),BR=Kv(),Yv=xi(),$R=cn(),HR=zv(),JR=gs(),VR=bi(),Qv=">",Xv="<",ml="prototype",vl="script",eg=VR("IE_PROTO"),hl=function(){},tg=function(e){return Xv+vl+Qv+e+Xv+"/"+vl+Qv},Zv=function(e){e.write(tg("")),e.close();var t=e.parentWindow.Object;return e=null,t},GR=function(){var e=JR("iframe"),t="java"+vl+":",r;return e.style.display="none",HR.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(tg("document.F=Object")),r.close(),r.F},Ai,Si=function(){try{Ai=new ActiveXObject("htmlfile")}catch(t){}Si=typeof document!="undefined"?document.domain&&Ai?Zv(Ai):GR():Zv(Ai);for(var e=Yv.length;e--;)delete Si[ml][Yv[e]];return Si()};$R[eg]=!0;rg.exports=Object.create||function(t,r){var n;return t!==null?(hl[ml]=FR(t),n=new hl,hl[ml]=null,n[eg]=t):n=Si(),r===void 0?n:BR.f(n,r)}});var ig=f((QB,ng)=>{"use strict";var KR=z();ng.exports=!KR(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var _l=f((XB,ag)=>{"use strict";var WR=je(),zR=ve(),YR=ar(),QR=bi(),XR=ig(),og=QR("IE_PROTO"),gl=Object,ZR=gl.prototype;ag.exports=XR?gl.getPrototypeOf:function(e){var t=YR(e);if(WR(t,og))return t[og];var r=t.constructor;return zR(r)&&t instanceof r?r.prototype:t instanceof gl?ZR:null}});var Ti=f((ZB,sg)=>{"use strict";var ek=Bt();sg.exports=function(e,t,r,n){return n&&n.enumerable?e[t]=r:ek(e,t,r),e}});var El=f((e5,ug)=>{"use strict";var tk=z(),rk=ve(),nk=fe(),ik=Ii(),lg=_l(),ok=Ti(),ak=Re(),sk=or(),wl=ak("iterator"),cg=!1,vt,yl,bl;[].keys&&(bl=[].keys(),"next"in bl?(yl=lg(lg(bl)),yl!==Object.prototype&&(vt=yl)):cg=!0);var lk=!nk(vt)||tk(function(){var e={};return vt[wl].call(e)!==e});lk?vt={}:sk&&(vt=ik(vt));rk(vt[wl])||ok(vt,wl,function(){return this});ug.exports={IteratorPrototype:vt,BUGGY_SAFARI_ITERATORS:cg}});var fg=f((t5,dg)=>{"use strict";var ck=pi(),uk=dr();dg.exports=ck?{}.toString:function(){return"[object "+uk(this)+"]"}});var fn=f((r5,hg)=>{"use strict";var dk=pi(),fk=kt().f,pk=Bt(),hk=je(),mk=fg(),vk=Re(),pg=vk("toStringTag");hg.exports=function(e,t,r,n){var i=r?e:e&&e.prototype;i&&(hk(i,pg)||fk(i,pg,{configurable:!0,value:t}),n&&!dk&&pk(i,"toString",mk))}});var vg=f((n5,mg)=>{"use strict";var gk=El().IteratorPrototype,_k=Ii(),yk=Yr(),bk=fn(),wk=$t(),Ek=function(){return this};mg.exports=function(e,t,r,n){var i=t+" Iterator";return e.prototype=_k(gk,{next:yk(+!n,r)}),bk(e,i,!1,!0),wk[i]=Ek,e}});var _g=f((i5,gg)=>{"use strict";var xk=de(),Ak=ir();gg.exports=function(e,t,r){try{return xk(Ak(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(n){}}});var bg=f((o5,yg)=>{"use strict";var Sk=fe();yg.exports=function(e){return Sk(e)||e===null}});var Eg=f((a5,wg)=>{"use strict";var Ik=bg(),Tk=String,Rk=TypeError;wg.exports=function(e){if(Ik(e))return e;throw new Rk("Can't set "+Tk(e)+" as a prototype")}});var Ag=f((s5,xg)=>{"use strict";var kk=_g(),Ok=fe(),Ck=nr(),Pk=Eg();xg.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,t={},r;try{r=kk(Object.prototype,"__proto__","set"),r(t,[]),e=t instanceof Array}catch(n){}return function(i,o){return Ck(i),Pk(o),Ok(i)&&(e?r(i,o):i.__proto__=o),i}}():void 0)});var Lg=f((l5,Dg)=>{"use strict";var Nk=te(),Dk=ht(),Ri=or(),Pg=cl(),Lk=ve(),qk=vg(),Sg=_l(),Ig=Ag(),Uk=fn(),Mk=Bt(),xl=Ti(),jk=Re(),Tg=$t(),Ng=El(),Fk=Pg.PROPER,Bk=Pg.CONFIGURABLE,Rg=Ng.IteratorPrototype,ki=Ng.BUGGY_SAFARI_ITERATORS,pn=jk("iterator"),kg="keys",hn="values",Og="entries",Cg=function(){return this};Dg.exports=function(e,t,r,n,i,o,a){qk(r,t,n);var s=function(v){if(v===i&&h)return h;if(!ki&&v&&v in d)return d[v];switch(v){case kg:return function(){return new r(this,v)};case hn:return function(){return new r(this,v)};case Og:return function(){return new r(this,v)}}return function(){return new r(this)}},l=t+" Iterator",c=!1,d=e.prototype,u=d[pn]||d["@@iterator"]||i&&d[i],h=!ki&&u||s(i),p=t==="Array"&&d.entries||u,m,g,_;if(p&&(m=Sg(p.call(new e)),m!==Object.prototype&&m.next&&(!Ri&&Sg(m)!==Rg&&(Ig?Ig(m,Rg):Lk(m[pn])||xl(m,pn,Cg)),Uk(m,l,!0,!0),Ri&&(Tg[l]=Cg))),Fk&&i===hn&&u&&u.name!==hn&&(!Ri&&Bk?Mk(d,"name",hn):(c=!0,h=function(){return Dk(u,this)})),i)if(g={values:s(hn),keys:o?h:s(kg),entries:s(Og)},a)for(_ in g)(ki||c||!(_ in d))&&xl(d,_,g[_]);else Nk({target:t,proto:!0,forced:ki||c},g);return(!Ri||a)&&d[pn]!==h&&xl(d,pn,h,{name:i}),Tg[t]=h,g}});var Ug=f((c5,qg)=>{"use strict";qg.exports=function(e,t){return{value:e,done:t}}});var Sl=f((u5,$g)=>{"use strict";var $k=Tt(),Al=Rv(),Mg=$t(),Fg=dn(),Hk=kt().f,Jk=Lg(),Oi=Ug(),Vk=or(),Gk=Me(),Bg="Array Iterator",Kk=Fg.set,Wk=Fg.getterFor(Bg);$g.exports=Jk(Array,"Array",function(e,t){Kk(this,{type:Bg,target:$k(e),index:0,kind:t})},function(){var e=Wk(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,Oi(void 0,!0);switch(e.kind){case"keys":return Oi(r,!1);case"values":return Oi(t[r],!1)}return Oi([r,t[r]],!1)},"values");var jg=Mg.Arguments=Mg.Array;Al("keys");Al("values");Al("entries");if(!Vk&&Gk&&jg.name!=="values")try{Hk(jg,"name",{value:"values"})}catch(e){}});var Hg=f(()=>{});var Il=f((p5,Jg)=>{"use strict";var zk=z();Jg.exports=!zk(function(){return Object.isExtensible(Object.preventExtensions({}))})});var Tl=f((h5,Vg)=>{"use strict";var Yk=Ti();Vg.exports=function(e,t,r){for(var n in t)r&&r.unsafe&&e[n]?e[n]=t[n]:Yk(e,n,t[n],r);return e}});var Rl=f(Gg=>{"use strict";var Qk=fl(),Xk=xi(),Zk=Xk.concat("length","prototype");Gg.f=Object.getOwnPropertyNames||function(t){return Qk(t,Zk)}});var Yg=f((v5,zg)=>{"use strict";var eO=pt(),tO=Tt(),Kg=Rl().f,rO=an(),Wg=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],nO=function(e){try{return Kg(e)}catch(t){return rO(Wg)}};zg.exports.f=function(t){return Wg&&eO(t)==="Window"?nO(t):Kg(tO(t))}});var Xg=f((g5,Qg)=>{"use strict";var iO=z();Qg.exports=iO(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})});var t_=f((_5,e_)=>{"use strict";var oO=z(),aO=fe(),sO=pt(),Zg=Xg(),Ci=Object.isExtensible,lO=oO(function(){Ci(1)});e_.exports=lO||Zg?function(t){return!aO(t)||Zg&&sO(t)==="ArrayBuffer"?!1:Ci?Ci(t):!0}:Ci});var Pi=f((y5,i_)=>{"use strict";var cO=te(),uO=de(),dO=cn(),fO=fe(),kl=je(),pO=kt().f,r_=Rl(),hO=Yg(),Ol=t_(),mO=ui(),vO=Il(),n_=!1,gt=mO("meta"),gO=0,Cl=function(e){pO(e,gt,{value:{objectID:"O"+gO++,weakData:{}}})},_O=function(e,t){if(!fO(e))return typeof e=="symbol"?e:(typeof e=="string"?"S":"P")+e;if(!kl(e,gt)){if(!Ol(e))return"F";if(!t)return"E";Cl(e)}return e[gt].objectID},yO=function(e,t){if(!kl(e,gt)){if(!Ol(e))return!0;if(!t)return!1;Cl(e)}return e[gt].weakData},bO=function(e){return vO&&n_&&Ol(e)&&!kl(e,gt)&&Cl(e),e},wO=function(){EO.enable=function(){},n_=!0;var e=r_.f,t=uO([].splice),r={};r[gt]=1,e(r).length&&(r_.f=function(n){for(var i=e(n),o=0,a=i.length;o<a;o++)if(i[o]===gt){t(i,o,1);break}return i},cO({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:hO.f}))},EO=i_.exports={enable:wO,fastKey:_O,getWeakData:yO,onFreeze:bO};dO[gt]=!0});var a_=f((b5,o_)=>{"use strict";var xO=Re(),AO=$t(),SO=xO("iterator"),IO=Array.prototype;o_.exports=function(e){return e!==void 0&&(AO.Array===e||IO[SO]===e)}});var Pl=f((w5,l_)=>{"use strict";var TO=dr(),s_=ci(),RO=rr(),kO=$t(),OO=Re(),CO=OO("iterator");l_.exports=function(e){if(!RO(e))return s_(e,CO)||s_(e,"@@iterator")||kO[TO(e)]}});var u_=f((E5,c_)=>{"use strict";var PO=ht(),NO=ir(),DO=Rt(),LO=li(),qO=Pl(),UO=TypeError;c_.exports=function(e,t){var r=arguments.length<2?qO(e):t;if(NO(r))return DO(PO(r,e));throw new UO(LO(e)+" is not iterable")}});var p_=f((x5,f_)=>{"use strict";var MO=ht(),d_=Rt(),jO=ci();f_.exports=function(e,t,r){var n,i;d_(e);try{if(n=jO(e,"return"),!n){if(t==="throw")throw r;return r}n=MO(n,e)}catch(o){i=!0,n=o}if(t==="throw")throw r;if(i)throw n;return d_(n),r}});var Nl=f((A5,g_)=>{"use strict";var FO=di(),BO=ht(),$O=Rt(),HO=li(),JO=a_(),VO=ur(),h_=Te(),GO=u_(),KO=Pl(),m_=p_(),WO=TypeError,Ni=function(e,t){this.stopped=e,this.result=t},v_=Ni.prototype;g_.exports=function(e,t,r){var n=r&&r.that,i=!!(r&&r.AS_ENTRIES),o=!!(r&&r.IS_RECORD),a=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),l=FO(t,n),c,d,u,h,p,m,g,_=function(y){return c&&m_(c,"normal",y),new Ni(!0,y)},v=function(y){return i?($O(y),s?l(y[0],y[1],_):l(y[0],y[1])):s?l(y,_):l(y)};if(o)c=e.iterator;else if(a)c=e;else{if(d=KO(e),!d)throw new WO(HO(e)+" is not iterable");if(JO(d)){for(u=0,h=VO(e);h>u;u++)if(p=v(e[u]),p&&h_(v_,p))return p;return new Ni(!1)}c=GO(e,d)}for(m=o?e.next:c.next;!(g=BO(m,c)).done;){try{p=v(g.value)}catch(y){m_(c,"throw",y)}if(typeof p=="object"&&p&&h_(v_,p))return p}return new Ni(!1)}});var Dl=f((S5,__)=>{"use strict";var zO=Te(),YO=TypeError;__.exports=function(e,t){if(zO(t,e))return e;throw new YO("Incorrect invocation")}});var w_=f((I5,b_)=>{"use strict";var QO=te(),XO=ee(),ZO=Pi(),eC=z(),tC=Bt(),rC=Nl(),nC=Dl(),iC=ve(),oC=fe(),aC=rr(),sC=fn(),lC=kt().f,cC=Ct().forEach,uC=Me(),y_=dn(),dC=y_.set,fC=y_.getterFor;b_.exports=function(e,t,r){var n=e.indexOf("Map")!==-1,i=e.indexOf("Weak")!==-1,o=n?"set":"add",a=XO[e],s=a&&a.prototype,l={},c;if(!uC||!iC(a)||!(i||s.forEach&&!eC(function(){new a().entries().next()})))c=r.getConstructor(t,e,n,o),ZO.enable();else{c=t(function(h,p){dC(nC(h,d),{type:e,collection:new a}),aC(p)||rC(p,h[o],{that:h,AS_ENTRIES:n})});var d=c.prototype,u=fC(e);cC(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(h){var p=h==="add"||h==="set";h in s&&!(i&&h==="clear")&&tC(d,h,function(m,g){var _=u(this).collection;if(!p&&i&&!oC(m))return h==="get"?void 0:!1;var v=_[h](m===0?0:m,g);return p?this:v})}),i||lC(d,"size",{configurable:!0,get:function(){return u(this).collection.size}})}return sC(c,e,!1,!0),l[e]=c,QO({global:!0,forced:!0},l),i||r.setStrong(c,e,n),c}});var R_=f((T5,T_)=>{"use strict";var pC=de(),E_=Tl(),Di=Pi().getWeakData,hC=Dl(),mC=Rt(),vC=rr(),Ll=fe(),gC=Nl(),A_=Ct(),x_=je(),S_=dn(),_C=S_.set,yC=S_.getterFor,bC=A_.find,wC=A_.findIndex,EC=pC([].splice),xC=0,Li=function(e){return e.frozen||(e.frozen=new I_)},I_=function(){this.entries=[]},ql=function(e,t){return bC(e.entries,function(r){return r[0]===t})};I_.prototype={get:function(e){var t=ql(this,e);if(t)return t[1]},has:function(e){return!!ql(this,e)},set:function(e,t){var r=ql(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=wC(this.entries,function(r){return r[0]===e});return~t&&EC(this.entries,t,1),!!~t}};T_.exports={getConstructor:function(e,t,r,n){var i=e(function(l,c){hC(l,o),_C(l,{type:t,id:xC++,frozen:null}),vC(c)||gC(c,l[n],{that:l,AS_ENTRIES:r})}),o=i.prototype,a=yC(t),s=function(l,c,d){var u=a(l),h=Di(mC(c),!0);return h===!0?Li(u).set(c,d):h[u.id]=d,l};return E_(o,{delete:function(l){var c=a(this);if(!Ll(l))return!1;var d=Di(l);return d===!0?Li(c).delete(l):d&&x_(d,c.id)&&delete d[c.id]},has:function(c){var d=a(this);if(!Ll(c))return!1;var u=Di(c);return u===!0?Li(d).has(c):u&&x_(u,d.id)}}),E_(o,r?{get:function(c){var d=a(this);if(Ll(c)){var u=Di(c);if(u===!0)return Li(d).get(c);if(u)return u[d.id]}},set:function(c,d){return s(this,c,d)}}:{add:function(c){return s(this,c,!0)}}),i}}});var q_=f(()=>{"use strict";var AC=Il(),k_=ee(),ji=de(),O_=Tl(),SC=Pi(),IC=w_(),C_=R_(),qi=fe(),Ui=dn().enforce,TC=z(),RC=nl(),gn=Object,kC=Array.isArray,Mi=gn.isExtensible,P_=gn.isFrozen,OC=gn.isSealed,N_=gn.freeze,CC=gn.seal,PC=!k_.ActiveXObject&&"ActiveXObject"in k_,mn,D_=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},L_=IC("WeakMap",D_,C_),fr=L_.prototype,Fi=ji(fr.set),NC=function(){return AC&&TC(function(){var e=N_([]);return Fi(new L_,e,1),!P_(e)})};RC&&(PC?(mn=C_.getConstructor(D_,"WeakMap",!0),SC.enable(),Ul=ji(fr.delete),vn=ji(fr.has),Ml=ji(fr.get),O_(fr,{delete:function(e){if(qi(e)&&!Mi(e)){var t=Ui(this);return t.frozen||(t.frozen=new mn),Ul(this,e)||t.frozen.delete(e)}return Ul(this,e)},has:function(t){if(qi(t)&&!Mi(t)){var r=Ui(this);return r.frozen||(r.frozen=new mn),vn(this,t)||r.frozen.has(t)}return vn(this,t)},get:function(t){if(qi(t)&&!Mi(t)){var r=Ui(this);return r.frozen||(r.frozen=new mn),vn(this,t)?Ml(this,t):r.frozen.get(t)}return Ml(this,t)},set:function(t,r){if(qi(t)&&!Mi(t)){var n=Ui(this);n.frozen||(n.frozen=new mn),vn(this,t)?Fi(this,t,r):n.frozen.set(t,r)}else Fi(this,t,r);return this}})):NC()&&O_(fr,{set:function(t,r){var n;return kC(t)&&(P_(t)?n=N_:OC(t)&&(n=CC)),Fi(this,t,r),n&&n(t),this}}));var Ul,vn,Ml});var U_=f(()=>{"use strict";q_()});var j_=f((P5,M_)=>{"use strict";Sl();Hg();U_();var DC=mt();M_.exports=DC.WeakMap});var B_=f((N5,F_)=>{"use strict";F_.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}});var H_=f(()=>{"use strict";Sl();var LC=B_(),qC=ee(),UC=fn(),$_=$t();for(Bi in LC)UC(qC[Bi],Bi),$_[Bi]=$_.Array;var Bi});var V_=f((q5,J_)=>{"use strict";var MC=j_();H_();J_.exports=MC});var K_=f((U5,G_)=>{G_.exports=V_()});var z_=f(()=>{"use strict";var jC=te(),FC=zr(),BC=ul().indexOf,$C=nn(),jl=FC([].indexOf),W_=!!jl&&1/jl([1],1,-0)<0,HC=W_||!$C("indexOf");jC({target:"Array",proto:!0,forced:HC},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return W_?jl(this,t,r)||0:BC(this,t,r)}})});var Q_=f((F5,Y_)=>{"use strict";z_();var JC=Ge();Y_.exports=JC("Array","indexOf")});var Z_=f((B5,X_)=>{"use strict";var VC=Te(),GC=Q_(),Fl=Array.prototype;X_.exports=function(e){var t=e.indexOf;return e===Fl||VC(Fl,e)&&t===Fl.indexOf?GC:t}});var ty=f(($5,ey)=>{"use strict";var KC=Z_();ey.exports=KC});var ny=f((H5,ry)=>{ry.exports=ty()});var iy=f(()=>{"use strict";var WC=te(),zC=Me(),YC=Ii();WC({target:"Object",stat:!0,sham:!zC},{create:YC})});var ay=f((G5,oy)=>{"use strict";iy();var QC=mt(),XC=QC.Object;oy.exports=function(t,r){return XC.create(t,r)}});var ly=f((K5,sy)=>{"use strict";var ZC=ay();sy.exports=ZC});var uy=f((W5,cy)=>{cy.exports=ly()});var dy=f(()=>{"use strict";var eP=te(),tP=Ct().map,rP=rn(),nP=rP("map");eP({target:"Array",proto:!0,forced:!nP},{map:function(t){return tP(this,t,arguments.length>1?arguments[1]:void 0)}})});var py=f((Q5,fy)=>{"use strict";dy();var iP=Ge();fy.exports=iP("Array","map")});var my=f((X5,hy)=>{"use strict";var oP=Te(),aP=py(),Bl=Array.prototype;hy.exports=function(e){var t=e.map;return e===Bl||oP(Bl,e)&&t===Bl.map?aP:t}});var gy=f((Z5,vy)=>{"use strict";var sP=my();vy.exports=sP});var yy=f((e3,_y)=>{_y.exports=gy()});var wy=f(by=>{"use strict";by.f=Object.getOwnPropertySymbols});var Sy=f((r3,Ay)=>{"use strict";var Ey=Me(),lP=de(),cP=ht(),uP=z(),$l=pl(),dP=wy(),fP=rs(),pP=ar(),hP=ni(),pr=Object.assign,xy=Object.defineProperty,mP=lP([].concat);Ay.exports=!pr||uP(function(){if(Ey&&pr({b:1},pr(xy({},"a",{enumerable:!0,get:function(){xy(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(i){t[i]=i}),pr({},e)[r]!==7||$l(pr({},t)).join("")!==n})?function(t,r){for(var n=pP(t),i=arguments.length,o=1,a=dP.f,s=fP.f;i>o;)for(var l=hP(arguments[o++]),c=a?mP($l(l),a(l)):$l(l),d=c.length,u=0,h;d>u;)h=c[u++],(!Ey||cP(s,l,h))&&(n[h]=l[h]);return n}:pr});var Ty=f(()=>{"use strict";var vP=te(),Iy=Sy();vP({target:"Object",stat:!0,arity:2,forced:Object.assign!==Iy},{assign:Iy})});var ky=f((o3,Ry)=>{"use strict";Ty();var gP=mt();Ry.exports=gP.Object.assign});var Cy=f((a3,Oy)=>{"use strict";var _P=ky();Oy.exports=_P});var Ny=f((s3,Py)=>{Py.exports=Cy()});var Hl=f((l3,Dy)=>{"use strict";Dy.exports=`
20
+ \v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var Uy=f((c3,qy)=>{"use strict";var yP=de(),bP=nr(),wP=Zs(),Vl=Hl(),Ly=yP("".replace),EP=RegExp("^["+Vl+"]+"),xP=RegExp("(^|[^"+Vl+"])["+Vl+"]+$"),Jl=function(e){return function(t){var r=wP(bP(t));return e&1&&(r=Ly(r,EP,"")),e&2&&(r=Ly(r,xP,"$1")),r}};qy.exports={start:Jl(1),end:Jl(2),trim:Jl(3)}});var By=f((u3,Fy)=>{"use strict";var AP=cl().PROPER,SP=z(),My=Hl(),jy="\u200B\x85\u180E";Fy.exports=function(e){return SP(function(){return!!My[e]()||jy[e]()!==jy||AP&&My[e].name!==e})}});var $y=f(()=>{"use strict";var IP=te(),TP=Uy().trim,RP=By();IP({target:"String",proto:!0,forced:RP("trim")},{trim:function(){return TP(this)}})});var Jy=f((p3,Hy)=>{"use strict";$y();var kP=Ge();Hy.exports=kP("String","trim")});var Gy=f((h3,Vy)=>{"use strict";var OP=Te(),CP=Jy(),Gl=String.prototype;Vy.exports=function(e){var t=e.trim;return typeof e=="string"||e===Gl||OP(Gl,e)&&t===Gl.trim?CP:t}});var Wy=f((m3,Ky)=>{"use strict";var PP=Gy();Ky.exports=PP});var Yy=f((v3,zy)=>{zy.exports=Wy()});function sc(e,t){ne.__h&&ne.__h(Q,e,bn||t),bn=0;var r=Q.__H||(Q.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function Nt(e){return bn=1,NP(xb,e)}function NP(e,t,r){var n=sc(yn++,2);if(n.t=e,!n.__c&&(n.__=[xb(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],c=n.t(l,s);l!==c&&(n.__N=[c,n.__[1]],n.__c.setState({}))}],n.__c=Q,!Q.__f)){var i=function(s,l,c){var d;if(!n.__c.__H)return!0;var u=(0,oc.default)(d=n.__c.__H.__).call(d,function(p){return!!p.__c});if((0,fb.default)(u).call(u,function(p){return!p.__N}))return!o||o.call(this,s,l,c);var h=n.__c.props!==s;return(0,xe.default)(u).call(u,function(p){if(p.__N){var m=p.__[0];p.__=p.__N,p.__N=void 0,m!==p.__[0]&&(h=!0)}}),o&&o.call(this,s,l,c)||h};Q.__f=!0;var o=Q.shouldComponentUpdate,a=Q.componentWillUpdate;Q.componentWillUpdate=function(s,l,c){if(this.__e){var d=o;o=void 0,i(s,l,c),o=d}a&&a.call(this,s,l,c)},Q.shouldComponentUpdate=i}return n.__N||n.__}function Jt(e,t){var r=sc(yn++,3);!ne.__s&&Eb(r.__H,t)&&(r.__=e,r.u=t,Q.__H.__h.push(r))}function zi(e){return bn=5,wb(function(){return{current:e}},[])}function wb(e,t){var r=sc(yn++,7);return Eb(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function at(e,t){return bn=8,wb(function(){return e},t)}function DP(){for(var e;e=bb.shift();)if(e.__P&&e.__H)try{var t,r;(0,xe.default)(t=e.__H.__h).call(t,Hi),(0,xe.default)(r=e.__H.__h).call(r,ec),e.__H.__h=[]}catch(n){e.__H.__h=[],ne.__e(n,e.__v)}}function LP(e){var t,r=function(){clearTimeout(n),ib&&cancelAnimationFrame(t),(0,Xl.default)(e)},n=(0,Xl.default)(r,100);ib&&(t=requestAnimationFrame(r))}function Hi(e){var t=Q,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),Q=t}function ec(e){var t=Q;e.__c=e.__(),Q=t}function Eb(e,t){return!e||e.length!==t.length||(0,Ki.default)(t).call(t,function(r,n){return r!==e[n]})}function xb(e,t){return typeof t=="function"?t(e):t}function b(e,t,r,n,i,o){t||(t={});var a,s,l=t;if("ref"in l)for(s in l={},t)s=="ref"?a=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--qP,__i:-1,__u:0,__source:i,__self:o};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return O.vnode&&O.vnode(c),c}function FP(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function BP(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}function KP(e,t){return ge(e,0)^45?(((t<<2^ge(e,0))<<2^ge(e,1))<<2^ge(e,2))<<2^ge(e,3):0}function Ib(e){return(0,yb.default)(e).call(e)}function WP(e,t){return(e=t.exec(e))?e[0]:e}function M(e,t,r){return e.replace(t,r)}function tc(e,t){return(0,ac.default)(e).call(e,t)}function ge(e,t){return e.charCodeAt(t)|0}function wn(e,t,r){return(0,hb.default)(e).call(e,t,r)}function ot(e){return e.length}function uc(e){return e.length}function $i(e,t){return t.push(e),e}function zP(e,t){return(0,gb.default)(e).call(e,t).join("")}function eo(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:Zi,column:vr,length:a,return:""}}function _n(e,t){return GP(eo("",null,null,"",null,null,0),e,{length:-e.length},t)}function YP(){return ie}function QP(){return ie=Pe>0?ge(gr,--Pe):0,vr--,ie===10&&(vr=1,Zi--),ie}function Fe(){return ie=Pe<Tb?ge(gr,Pe++):0,vr++,ie===10&&(vr=1,Zi++),ie}function st(){return ge(gr,Pe)}function Ji(){return Pe}function xn(e,t){return wn(gr,e,t)}function En(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Rb(e){return Zi=vr=1,Tb=ot(gr=e),Pe=0,[]}function kb(e){return gr="",e}function Vi(e){return Ib(xn(Pe-1,rc(e===91?e+2:e===40?e+1:e)))}function XP(e){for(;(ie=st())&&ie<33;)Fe();return En(e)>2||En(ie)>3?"":" "}function ZP(e,t){for(;--t&&Fe()&&!(ie<48||ie>102||ie>57&&ie<65||ie>70&&ie<97););return xn(e,Ji()+(t<6&&st()==32&&Fe()==32))}function rc(e){for(;Fe();)switch(ie){case e:return Pe;case 34:case 39:e!==34&&e!==39&&rc(ie);break;case 40:e===41&&rc(e);break;case 92:Fe();break}return Pe}function eN(e,t){for(;Fe()&&e+ie!==57&&!(e+ie===84&&st()===47););return"/*"+xn(t,Pe-1)+"*"+Xi(e===47?e:Fe())}function tN(e){for(;!En(st());)Fe();return xn(e,Pe)}function rN(e){return kb(Gi("",null,null,null,[""],e=Rb(e),0,[0],e))}function Gi(e,t,r,n,i,o,a,s,l){for(var c=0,d=0,u=a,h=0,p=0,m=0,g=1,_=1,v=1,y=0,x="",R=i,C=o,S=n,w=x;_;)switch(m=y,y=Fe()){case 40:if(m!=108&&ge(w,u-1)==58){tc(w+=M(Vi(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:w+=Vi(y);break;case 9:case 10:case 13:case 32:w+=XP(m);break;case 92:w+=ZP(Ji()-1,7);continue;case 47:switch(st()){case 42:case 47:$i(nN(eN(Fe(),Ji()),t,r),l);break;default:w+="/"}break;case 123*g:s[c++]=ot(w)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:_=0;case 59+d:v==-1&&(w=M(w,/\f/g,"")),p>0&&ot(w)-u&&$i(p>32?ab(w+";",n,r,u-1):ab(M(w," ","")+";",n,r,u-2),l);break;case 59:w+=";";default:if($i(S=ob(w,t,r,c,d,i,s,x,R=[],C=[],u),o),y===123)if(d===0)Gi(w,t,S,S,R,o,u,s,C);else switch(h===99&&ge(w,3)===110?100:h){case 100:case 108:case 109:case 115:Gi(e,S,S,n&&$i(ob(e,S,S,0,0,i,s,x,i,R=[],u),C),i,C,u,s,n?R:C);break;default:Gi(w,S,S,S,[""],C,0,s,C)}}c=d=p=0,g=v=1,x=w="",u=a;break;case 58:u=1+ot(w),p=m;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&QP()==125)continue}switch(w+=Xi(y),y*g){case 38:v=d>0?1:(w+="\f",-1);break;case 44:s[c++]=(ot(w)-1)*v,v=1;break;case 64:st()===45&&(w+=Vi(Fe())),h=st(),d=u=ot(x=w+=tN(Ji())),y++;break;case 45:m===45&&ot(w)==2&&(g=0)}}return o}function ob(e,t,r,n,i,o,a,s,l,c,d){for(var u=i-1,h=i===0?o:[""],p=uc(h),m=0,g=0,_=0;m<n;++m)for(var v=0,y=wn(e,u+1,u=VP(g=a[m])),x=e;v<p;++v)(x=Ib(g>0?h[v]+" "+y:M(y,/&\f/g,h[v])))&&(l[_++]=x);return eo(e,t,r,i===0?lc:s,l,c,d)}function nN(e,t,r){return eo(e,t,r,Ab,Xi(YP()),wn(e,2,-2),0)}function ab(e,t,r,n){return eo(e,t,r,cc,wn(e,0,n),wn(e,n+1,-1),n)}function mr(e,t){for(var r="",n=uc(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function iN(e,t,r,n){switch(e.type){case JP:if(e.children.length)break;case HP:case cc:return e.return=e.return||e.value;case Ab:return"";case Sb:return e.return=e.value+"{"+mr(e.children,n)+"}";case lc:e.value=e.props.join(",")}return ot(r=mr(e.children,n))?e.return=e.value+"{"+r+"}":""}function oN(e){var t=uc(e);return function(r,n,i,o){for(var a="",s=0;s<t;s++)a+=e[s](r,n,i,o)||"";return a}}function aN(e){return function(t){t.root||(t=t.return)&&e(t)}}function sN(e){var t=(0,vb.default)(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}function Ob(e,t){switch(KP(e,t)){case 5103:return U+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return U+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return U+e+Yi+e+Ee+e+e;case 6828:case 4268:return U+e+Ee+e+e;case 6165:return U+e+Ee+"flex-"+e+e;case 5187:return U+e+M(e,/(\w+).+(:[^]+)/,U+"box-$1$2"+Ee+"flex-$1$2")+e;case 5443:return U+e+Ee+"flex-item-"+M(e,/flex-|-self/,"")+e;case 4675:return U+e+Ee+"flex-line-pack"+M(e,/align-content|flex-|-self/,"")+e;case 5548:return U+e+Ee+M(e,"shrink","negative")+e;case 5292:return U+e+Ee+M(e,"basis","preferred-size")+e;case 6060:return U+"box-"+M(e,"-grow","")+U+e+Ee+M(e,"grow","positive")+e;case 4554:return U+M(e,/([^-])(transform)/g,"$1"+U+"$2")+e;case 6187:return M(M(M(e,/(zoom-|grab)/,U+"$1"),/(image-set)/,U+"$1"),e,"")+e;case 5495:case 3959:return M(e,/(image-set\([^]*)/,U+"$1$`$1");case 4968:return M(M(e,/(.+:)(flex-)?(.*)/,U+"box-pack:$3"+Ee+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+U+e+e;case 4095:case 3583:case 4068:case 2532:return M(e,/(.+)-inline(.+)/,U+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ot(e)-1-t>6)switch(ge(e,t+1)){case 109:if(ge(e,t+4)!==45)break;case 102:return M(e,/(.+:)(.+)-([^]+)/,"$1"+U+"$2-$3$1"+Yi+(ge(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~tc(e,"stretch")?Ob(M(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ge(e,t+1)!==115)break;case 6444:switch(ge(e,ot(e)-3-(~tc(e,"!important")&&10))){case 107:return M(e,":",":"+U)+e;case 101:return M(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+U+(ge(e,14)===45?"inline-":"")+"box$3$1"+U+"$2$3$1"+Ee+"$2box$3")+e}break;case 5936:switch(ge(e,t+11)){case 114:return U+e+Ee+M(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return U+e+Ee+M(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return U+e+Ee+M(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return U+e+Ee+e+e}return e}function vN(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function Qi(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return Pt={name:i.name,styles:i.styles,next:Pt},i.name;var o=r;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)Pt={name:a.name,styles:a.styles,next:Pt},a=a.next;var s=o.styles+";";return s}return bN(e,t,r)}}var l=r;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function bN(e,t,r){var n="";if((0,Wi.default)(r))for(var i=0;i<r.length;i++)n+=Qi(e,t,r[i])+";";else for(var o in r){var a=r[o];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?n+=o+"{"+t[s]+"}":lb(s)&&(n+=zl(o)+":"+cb(o,s)+";")}else if((0,Wi.default)(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)lb(a[l])&&(n+=zl(o)+":"+cb(o,a[l])+";");else{var c=Qi(e,t,a);switch(o){case"animation":case"animationName":{n+=zl(o)+":"+c+";";break}default:n+=o+"{"+c+"}"}}}return n}function Yl(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";Pt=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,i+=Qi(r,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=Qi(r,t,e[s]),n){var l=o;i+=l[s]}ub.lastIndex=0;for(var c="",d;(d=ub.exec(i))!==null;)c+="-"+d[1];var u=vN(i)+c;return{name:u,styles:i,next:Pt}}function nc(e,t,r){var n,i="";return(0,xe.default)(n=r.split(" ")).call(n,function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(i+=o+" ")}),i}function db(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function Ql(e,t,r){var n=[],i=nc(e,n,r);return n.length<2?r:i+t(n)}function kN(s){var l=s,{elementTag:e="Image",src:t="",children:r,handleExposure:n,className:i,imgStyle:o}=l,a=Ze(l,["elementTag","src","children","handleExposure","className","imgStyle"]);let c=RN(()=>{t&&n()});return e==="Image"?b("div",{className:i,style:{borderRadius:"8px"},children:nt("img",L(k({},a),{ref:c,src:t!=null?t:"",style:k({display:"block",width:"100%",height:"auto",objectFit:"cover",maxWidth:"100%",maxHeight:"100%",aspectRatio:"1 / 1",borderRadius:"8px"},o||{})}))}):b("div",L(k({},a),{ref:c,className:i,children:r}))}function ON(e,t){if(!e)return null;let r=Array.isArray(t)?t[0]:t,n=Array.isArray(t)?t[1]:0;return Array.isArray(e)?e.map((i,o)=>i&&typeof i=="object"&&"type"in i?nt(i.type,L(k({},i.props),{style:L(k({},i.props.style||{}),{paddingLeft:r>0?`${r/2}px`:void 0,paddingRight:r>0?`${r/2}px`:void 0,paddingTop:n>0?`${n/2}px`:void 0,paddingBottom:n>0?`${n/2}px`:void 0}),key:i.key||o})):i):e&&typeof e=="object"&&"type"in e?nt(e.type,L(k({},e.props),{style:L(k({},e.props.style||{}),{paddingLeft:r>0?`${r/2}px`:void 0,paddingRight:r>0?`${r/2}px`:void 0,paddingTop:n>0?`${n/2}px`:void 0,paddingBottom:n>0?`${n/2}px`:void 0})})):e}var oc,fb,xe,pb,Ki,Xl,hb,Wi,y3,Zl,mb,ac,vb,gb,_b,yb,yn,Q,Kl,Qy,bn,bb,ne,Xy,Zy,eb,tb,rb,nb,ib,qP,Wl,UP,MP,jP,$P,Ee,Yi,U,Ab,lc,cc,HP,Sb,JP,VP,Xi,GP,Zi,vr,Tb,Pe,ie,gr,lN,cN,uN,sb,dN,fN,pN,hN,mN,gN,_N,yN,Cb,lb,zl,cb,ub,Pt,wN,EN,xN,AN,SN,N,IN,TN,dc,RN,fc,pc,Pb,CN,PN,NN,ic,DN,Nb,_r,_t,Db,hr,LN,qN,UN,MN,jN,re,FN,BN,Lb,qb,Ub,Mb,$N,HN,jb,to=T(()=>{"use strict";er();oc=ce(Gp(),1),fb=ce(rh(),1),xe=ce(mh(),1),pb=ce(Oh(),1),Ki=ce(jh(),1),Xl=ce(nm(),1);zs();hb=ce(Fm(),1),Wi=ce(Km(),1),y3=ce(dv(),1),Zl=ce(Iv(),1),mb=ce(K_(),1),ac=ce(ny(),1),vb=ce(uy(),1),gb=ce(yy(),1),_b=ce(Ny(),1),yb=ce(Yy(),1),bn=0,bb=[],ne=O,Xy=ne.__b,Zy=ne.__r,eb=ne.diffed,tb=ne.__c,rb=ne.unmount,nb=ne.__;ne.__b=function(e){Q=null,Xy&&Xy(e)},ne.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),nb&&nb(e,t)},ne.__r=function(e){var t,r,n;Zy&&Zy(e),yn=0;var i=(Q=e.__c).__H;i&&(Kl===Q?(i.__h=[],Q.__h=[],(0,xe.default)(t=i.__).call(t,function(o){o.__N&&(o.__=o.__N),o.u=o.__N=void 0})):((0,xe.default)(r=i.__h).call(r,Hi),(0,xe.default)(n=i.__h).call(n,ec),i.__h=[],yn=0)),Kl=Q},ne.diffed=function(e){var t;eb&&eb(e);var r=e.__c;r&&r.__H&&(r.__H.__h.length&&(bb.push(r)!==1&&Qy===ne.requestAnimationFrame||((Qy=ne.requestAnimationFrame)||LP)(DP)),(0,xe.default)(t=r.__H.__).call(t,function(n){n.u&&(n.__H=n.u),n.u=void 0})),Kl=Q=null},ne.__c=function(e,t){(0,Ki.default)(t).call(t,function(r){try{var n,i;(0,xe.default)(n=r.__h).call(n,Hi),r.__h=(0,oc.default)(i=r.__h).call(i,function(o){return!o.__||ec(o)})}catch(o){(0,Ki.default)(t).call(t,function(a){a.__h&&(a.__h=[])}),t=[],ne.__e(o,r.__v)}}),tb&&tb(e,t)},ne.unmount=function(e){var t;rb&&rb(e);var r,n=e.__c;n&&n.__H&&((0,xe.default)(t=n.__H.__).call(t,function(i){try{Hi(i)}catch(o){r=o}}),n.__H=void 0,r&&ne.__e(r,n.__v))};ib=typeof requestAnimationFrame=="function";qP=0;Wl={drawerBackdrop:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"flex-end",zIndex:1e3,overflow:"hidden",touchAction:"none"},drawer:{backgroundColor:"white",borderRadius:"16px 16px 0 0",width:"100%",maxWidth:"100%",overflowY:"auto",position:"relative",boxShadow:"0 -2px 10px rgba(0, 0, 0, 0.1)",display:"flex",flexDirection:"column",margin:"0 auto"},drawerContent:{flex:1,width:"100%",height:"100%",overflow:"auto",margin:"0 auto"}},UP=`
21
21
  @keyframes fadeIn {
22
22
  from { opacity: 0; }
23
23
  to { opacity: 1; }
@@ -53,7 +53,7 @@ var qw=Object.create;var jn=Object.defineProperty,Uw=Object.defineProperties,Mw=
53
53
  .drawer-leave {
54
54
  animation: slideDown 0.3s ease forwards;
55
55
  }
56
- `,MP=({children:e,isOpen:t=!1,onClose:r,height:n="50%",className:i="",backdropColor:o},a)=>{let[s,l]=Nt(t),[c,d]=Nt(null),u=Wi(null),h=Wi(!1);Jt(()=>{let S=document.createElement("style");return S.innerHTML=UP,document.head.appendChild(S),()=>{document.head.removeChild(S)}},[]),Jt(()=>{t!==s&&!h.current&&(l(t),d(t?"enter":"leave"),t?(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%"):!t&&!h.current&&(document.body.style.overflow="",document.body.style.position="",document.body.style.width=""))},[t,s]),Jt(()=>()=>{document.body.style.overflow="",document.body.style.position="",document.body.style.width=""},[]);let p=at(()=>{c==="leave"&&(d(null),l(!1),h.current=!1)},[c]),m=at(S=>{S.preventDefault(),S.stopPropagation(),S.target===u.current&&_()},[]),g=at(()=>{h.current=!1,l(!0),d("enter")},[]),_=at(()=>{h.current=!0,d("leave"),document.body.style.overflow="",document.body.style.position="",document.body.style.width="",r&&r()},[r]),v=at(()=>s&&!h.current,[s]);if(Jt(()=>{if(a){let S={show:g,hide:_,isOpen:v};typeof a=="function"?a(S):a&&(a.current=S)}},[g,_,v,a]),!s&&!c)return null;let y=L(k({},Gl.drawer),{height:typeof n=="number"?`${n}px`:n,backgroundColor:o||"rgba(255, 255, 255, 1)"}),x=L(k({},Gl.drawerBackdrop),{pointerEvents:"auto"}),R=c?`drawer-${c}`:"",C=c?`backdrop-${c}`:"";return b("div",{ref:u,style:x,className:C,onClick:m,onTouchMove:S=>S.preventDefault(),onTouchStart:S=>S.stopPropagation(),onTouchEnd:S=>S.stopPropagation(),children:b("div",{style:y,className:`${R} ${i}`,onAnimationEnd:p,onClick:S=>S.stopPropagation(),onTouchMove:S=>{S.stopPropagation()},onTouchStart:S=>S.stopPropagation(),onTouchEnd:S=>S.stopPropagation(),children:b("div",{style:L(k({},Gl.drawerContent),{pointerEvents:"auto"}),onTouchMove:S=>S.stopPropagation(),onClick:S=>S.stopPropagation(),children:e})})})},jP=xm(MP);$P=function(){function e(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){(0,xe.default)(r).call(r,this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(BP(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var i=FP(n);try{i.insertRule(r,i.cssRules.length)}catch(o){}}else n.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){var r;(0,xe.default)(r=this.tags).call(r,function(n){var i;return(i=n.parentNode)==null?void 0:i.removeChild(n)}),this.tags=[],this.ctr=0},e}(),Ee="-ms-",zi="-moz-",U="-webkit-",Ab="comm",ac="rule",sc="decl",HP="@import",Sb="@keyframes",JP="@layer",VP=Math.abs,Qi=String.fromCharCode,GP=_b.default;Xi=1,vr=1,Tb=0,Pe=0,ie=0,gr="";lN=function(e,t,r){for(var n=0,i=0;n=i,i=st(),n===38&&i===12&&(t[r]=1),!En(i);)Fe();return xn(e,Pe)},cN=function(e,t){var r=-1,n=44;do switch(En(n)){case 0:n===38&&st()===12&&(t[r]=1),e[r]+=lN(Pe-1,t,r);break;case 2:e[r]+=Ji(n);break;case 4:if(n===44){e[++r]=st()===58?"&\f":"",t[r]=e[r].length;break}default:e[r]+=Qi(n)}while(n=Fe());return e},uN=function(e,t){return kb(cN(Rb(e),t))},sb=new mb.default,dN=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!sb.get(r))&&!n){sb.set(e,!0);for(var i=[],o=uN(t,i),a=r.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},fN=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};pN=function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case sc:e.return=Ob(e.value,e.length);break;case Sb:return mr([_n(e,{value:M(e.value,"@","@"+U)})],n);case ac:if(e.length)return zP(e.props,function(i){switch(WP(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return mr([_n(e,{props:[M(i,/:(read-\w+)/,":"+zi+"$1")]})],n);case"::placeholder":return mr([_n(e,{props:[M(i,/:(plac\w+)/,":"+U+"input-$1")]}),_n(e,{props:[M(i,/:(plac\w+)/,":"+zi+"$1")]}),_n(e,{props:[M(i,/:(plac\w+)/,Ee+"input-$1")]})],n)}return""})}},hN=[pN],mN=function(e){var t=e.key;if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");(0,xe.default)(Array.prototype).call(r,function(m){var g=m.getAttribute("data-emotion");(0,ic.default)(g).call(g," ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var n=e.stylisPlugins||hN,i={},o,a=[];o=e.container||document.head,(0,xe.default)(Array.prototype).call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(m){for(var g=m.getAttribute("data-emotion").split(" "),_=1;_<g.length;_++)i[g[_]]=!0;a.push(m)});var s,l=[dN,fN];{var c,d=[iN,aN(function(m){c.insert(m)})],u=oN((0,pb.default)(l).call(l,n,d)),h=function(m){return mr(rN(m),u)};s=function(m,g,_,v){c=_,h(m?m+"{"+g.styles+"}":g.styles),v&&(p.inserted[g.name]=!0)}}var p={key:t,sheet:new $P({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(a),p};gN={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_N=/[A-Z]|^ms/g,yN=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Cb=function(e){return e.charCodeAt(1)===45},lb=function(e){return e!=null&&typeof e!="boolean"},Kl=sN(function(e){return Cb(e)?e:e.replace(_N,"-$&").toLowerCase()}),cb=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(yN,function(r,n,i){return Pt={name:n,styles:i,next:Pt},n})}return gN[e]!==1&&!Cb(e)&&typeof t=="number"&&t!==0?t+"px":t};ub=/label:\s*([^\s;{]+)\s*(;|$)/g;wN=function(e,t,r){var n=e.key+"-"+t.name;e.registered[n]===void 0&&(e.registered[n]=t.styles)},EN=function(e,t,r){wN(e,t);var n=e.key+"-"+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?"."+n:"",i,e.sheet,!0),i=i.next;while(i!==void 0)}};xN=function(e){var t=mN(e);t.sheet.speedy=function(a){this.isSpeedy=a},t.compat=!0;var r=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Wl(s,t.registered,void 0);return EN(t,c),t.key+"-"+c.name},n=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Wl(s,t.registered),d="animation-"+c.name;return db(t,{name:c.name,styles:"@keyframes "+d+"{"+c.styles+"}"}),d},i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Wl(s,t.registered);db(t,c)},o=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return zl(t.registered,r,AN(s))};return{css:r,cx:o,injectGlobal:i,keyframes:n,hydrate:function(a){(0,xe.default)(a).call(a,function(s){t.inserted[s]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:(0,Ql.default)(tc).call(tc,null,t.registered),merge:(0,Ql.default)(zl).call(zl,null,t.registered,r)}},AN=function e(t){for(var r="",n=0;n<t.length;n++){var i=t[n];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if((0,Ki.default)(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(r&&(r+=" "),r+=o)}}return r},SN=xN({key:"css"}),N=SN.css,IN=({title:e,content:t,noHeader:r,height:n,padding:i="16px",footerButtons:o,onClose:a})=>{let s={container:N`
56
+ `,MP=({children:e,isOpen:t=!1,onClose:r,height:n="50%",className:i="",backdropColor:o},a)=>{let[s,l]=Nt(t),[c,d]=Nt(null),u=zi(null),h=zi(!1);Jt(()=>{let S=document.createElement("style");return S.innerHTML=UP,document.head.appendChild(S),()=>{document.head.removeChild(S)}},[]),Jt(()=>{t!==s&&!h.current&&(l(t),d(t?"enter":"leave"),t?(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%"):!t&&!h.current&&(document.body.style.overflow="",document.body.style.position="",document.body.style.width=""))},[t,s]),Jt(()=>()=>{document.body.style.overflow="",document.body.style.position="",document.body.style.width=""},[]);let p=at(()=>{c==="leave"&&(d(null),l(!1),h.current=!1)},[c]),m=at(S=>{S.preventDefault(),S.stopPropagation(),S.target===u.current&&_()},[]),g=at(()=>{h.current=!1,l(!0),d("enter")},[]),_=at(()=>{h.current=!0,d("leave"),document.body.style.overflow="",document.body.style.position="",document.body.style.width="",r&&r()},[r]),v=at(()=>s&&!h.current,[s]);if(Jt(()=>{if(a){let S={show:g,hide:_,isOpen:v};typeof a=="function"?a(S):a&&(a.current=S)}},[g,_,v,a]),!s&&!c)return null;let y=L(k({},Wl.drawer),{height:typeof n=="number"?`${n}px`:n,backgroundColor:o||"rgba(255, 255, 255, 1)"}),x=L(k({},Wl.drawerBackdrop),{pointerEvents:"auto"}),R=c?`drawer-${c}`:"",C=c?`backdrop-${c}`:"";return b("div",{ref:u,style:x,className:C,onClick:m,onTouchMove:S=>S.preventDefault(),onTouchStart:S=>S.stopPropagation(),onTouchEnd:S=>S.stopPropagation(),children:b("div",{style:y,className:`${R} ${i}`,onAnimationEnd:p,onClick:S=>S.stopPropagation(),onTouchMove:S=>{S.stopPropagation()},onTouchStart:S=>S.stopPropagation(),onTouchEnd:S=>S.stopPropagation(),children:b("div",{style:L(k({},Wl.drawerContent),{pointerEvents:"auto"}),onTouchMove:S=>S.stopPropagation(),onClick:S=>S.stopPropagation(),children:e})})})},jP=xm(MP);$P=function(){function e(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){(0,xe.default)(r).call(r,this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(BP(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var i=FP(n);try{i.insertRule(r,i.cssRules.length)}catch(o){}}else n.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){var r;(0,xe.default)(r=this.tags).call(r,function(n){var i;return(i=n.parentNode)==null?void 0:i.removeChild(n)}),this.tags=[],this.ctr=0},e}(),Ee="-ms-",Yi="-moz-",U="-webkit-",Ab="comm",lc="rule",cc="decl",HP="@import",Sb="@keyframes",JP="@layer",VP=Math.abs,Xi=String.fromCharCode,GP=_b.default;Zi=1,vr=1,Tb=0,Pe=0,ie=0,gr="";lN=function(e,t,r){for(var n=0,i=0;n=i,i=st(),n===38&&i===12&&(t[r]=1),!En(i);)Fe();return xn(e,Pe)},cN=function(e,t){var r=-1,n=44;do switch(En(n)){case 0:n===38&&st()===12&&(t[r]=1),e[r]+=lN(Pe-1,t,r);break;case 2:e[r]+=Vi(n);break;case 4:if(n===44){e[++r]=st()===58?"&\f":"",t[r]=e[r].length;break}default:e[r]+=Xi(n)}while(n=Fe());return e},uN=function(e,t){return kb(cN(Rb(e),t))},sb=new mb.default,dN=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!sb.get(r))&&!n){sb.set(e,!0);for(var i=[],o=uN(t,i),a=r.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},fN=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};pN=function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case cc:e.return=Ob(e.value,e.length);break;case Sb:return mr([_n(e,{value:M(e.value,"@","@"+U)})],n);case lc:if(e.length)return zP(e.props,function(i){switch(WP(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return mr([_n(e,{props:[M(i,/:(read-\w+)/,":"+Yi+"$1")]})],n);case"::placeholder":return mr([_n(e,{props:[M(i,/:(plac\w+)/,":"+U+"input-$1")]}),_n(e,{props:[M(i,/:(plac\w+)/,":"+Yi+"$1")]}),_n(e,{props:[M(i,/:(plac\w+)/,Ee+"input-$1")]})],n)}return""})}},hN=[pN],mN=function(e){var t=e.key;if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");(0,xe.default)(Array.prototype).call(r,function(m){var g=m.getAttribute("data-emotion");(0,ac.default)(g).call(g," ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var n=e.stylisPlugins||hN,i={},o,a=[];o=e.container||document.head,(0,xe.default)(Array.prototype).call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(m){for(var g=m.getAttribute("data-emotion").split(" "),_=1;_<g.length;_++)i[g[_]]=!0;a.push(m)});var s,l=[dN,fN];{var c,d=[iN,aN(function(m){c.insert(m)})],u=oN((0,pb.default)(l).call(l,n,d)),h=function(m){return mr(rN(m),u)};s=function(m,g,_,v){c=_,h(m?m+"{"+g.styles+"}":g.styles),v&&(p.inserted[g.name]=!0)}}var p={key:t,sheet:new $P({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(a),p};gN={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_N=/[A-Z]|^ms/g,yN=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Cb=function(e){return e.charCodeAt(1)===45},lb=function(e){return e!=null&&typeof e!="boolean"},zl=sN(function(e){return Cb(e)?e:e.replace(_N,"-$&").toLowerCase()}),cb=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(yN,function(r,n,i){return Pt={name:n,styles:i,next:Pt},n})}return gN[e]!==1&&!Cb(e)&&typeof t=="number"&&t!==0?t+"px":t};ub=/label:\s*([^\s;{]+)\s*(;|$)/g;wN=function(e,t,r){var n=e.key+"-"+t.name;e.registered[n]===void 0&&(e.registered[n]=t.styles)},EN=function(e,t,r){wN(e,t);var n=e.key+"-"+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?"."+n:"",i,e.sheet,!0),i=i.next;while(i!==void 0)}};xN=function(e){var t=mN(e);t.sheet.speedy=function(a){this.isSpeedy=a},t.compat=!0;var r=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Yl(s,t.registered,void 0);return EN(t,c),t.key+"-"+c.name},n=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Yl(s,t.registered),d="animation-"+c.name;return db(t,{name:c.name,styles:"@keyframes "+d+"{"+c.styles+"}"}),d},i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Yl(s,t.registered);db(t,c)},o=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return Ql(t.registered,r,AN(s))};return{css:r,cx:o,injectGlobal:i,keyframes:n,hydrate:function(a){(0,xe.default)(a).call(a,function(s){t.inserted[s]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:(0,Zl.default)(nc).call(nc,null,t.registered),merge:(0,Zl.default)(Ql).call(Ql,null,t.registered,r)}},AN=function e(t){for(var r="",n=0;n<t.length;n++){var i=t[n];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if((0,Wi.default)(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(r&&(r+=" "),r+=o)}}return r},SN=xN({key:"css"}),N=SN.css,IN=({title:e,content:t,noHeader:r,height:n,padding:i="16px",footerButtons:o,onClose:a})=>{let s={container:N`
57
57
  display: flex;
58
58
  flex-direction: column;
59
59
  height: 100%;
@@ -90,10 +90,10 @@ var qw=Object.create;var jn=Object.defineProperty,Uw=Object.defineProperties,Mw=
90
90
  ${s.button}
91
91
  background-color: ${l.variant==="primary"?"#1677ff":"#fff"};
92
92
  color: ${l.variant==="primary"?"#fff":"#333"};
93
- `,onClick:d=>{var u;return(u=l.onClick)==null?void 0:u.call(l,d,{hide:a})},children:l.text},c))})]})},TN=()=>{let e=document.createElement("div");return e.id=`jolibox-ui-modal-container-${Math.random().toString(36).substring(2,15)}`,e.style.position="absolute",e.style.zIndex=`${1e3+document.querySelectorAll('[id^="jolibox-ui-modal-container-"]').length}`,document.body.appendChild(e),e},cc=e=>{let t=TN(),r=null,n=!1,i=!1,o=()=>{i||(n=!1,e.onClose&&e.onClose(),s(),setTimeout(()=>{i||t.remove()},300))},a=()=>window.innerWidth>window.innerHeight,s=()=>{var c;Zt(b(jP,{ref:d=>{r=d},isOpen:n,onClose:o,height:a()?"90vh":(c=e.height)!=null?c:"50vh",backdropColor:e.backdropColor,children:b(IN,L(k({},e),{onClose:o}))}),t)},l=()=>{!i&&n&&s()};return window.addEventListener("resize",l),s(),{show:()=>{i||(n=!0,s(),setTimeout(()=>{r&&(r.show(),e.onOpen&&e.onOpen())},0))},hide:()=>{i||r&&r.hide()},isOpen:()=>n,destroy:()=>{i=!0,t.remove()}}},RN=(e,t={threshold:.6})=>{let r=Wi(null),n=Wi(!1),i=at(o=>{let[a]=o;a.isIntersecting&&!n.current?(n.current=!0,e()):a.isIntersecting||(n.current=!1)},[e]);return Jt(()=>{if(r.current){let o=new IntersectionObserver(i,t);return o.observe(r.current),()=>{r.current&&o.unobserve(r.current)}}},[i,t]),r};uc=o=>{var a=o,{children:e,fluid:t=!1,className:r="",style:n={}}=a,i=Ze(a,["children","fluid","className","style"]);let s=k({width:"100%",marginLeft:"auto",marginRight:"auto",paddingLeft:"15px",paddingRight:"15px",boxSizing:"border-box",maxWidth:t?"100%":void 0},n);return b("div",L(k({className:r,style:s},i),{children:e}))},dc=s=>{var l=s,{children:e,gutter:t=0,justify:r="start",align:n="top",className:i="",style:o={}}=l,a=Ze(l,["children","gutter","justify","align","className","style"]);let c={start:"flex-start",end:"flex-end",center:"center","space-around":"space-around","space-between":"space-between"},d={top:"flex-start",middle:"center",bottom:"flex-end"},u=k({display:"flex",flexWrap:"wrap",boxSizing:"border-box",justifyContent:c[r],alignItems:d[n]},o);if(t){let p=Array.isArray(t)?t[0]:t,m=Array.isArray(t)?t[1]:0;p>0&&(u.marginLeft=`-${p/2}px`,u.marginRight=`-${p/2}px`),m>0&&(u.marginTop=`-${m/2}px`,u.marginBottom=`-${m/2}px`)}let h=t?ON(e,t):e;return b("div",L(k({className:i,style:u},a),{children:h}))};Pb=u=>{var h=u,{children:e,span:t,offset:r,xs:n,sm:i,md:o,lg:a,xl:s,className:l="",style:c={}}=h,d=Ze(h,["children","span","offset","xs","sm","md","lg","xl","className","style"]);let p=k({position:"relative",width:"100%",paddingLeft:"15px",paddingRight:"15px",boxSizing:"border-box"},c);if(t!==void 0){let m=t/24*100;p.flex=`0 0 ${m}%`,p.maxWidth=`${m}%`}return r!==void 0&&(p.marginLeft=`${r/24*100}%`),b("div",L(k({className:l,style:p},d),{children:e}))},CN=({game:e,layerName:t,routeMode:r,onGameClick:n})=>{var a,s;let i=gi(l=>{l.preventDefault(),n==null||n(e)},[n,e]),o=gi(()=>{},[e,t]);return b(Pb,{span:8,className:"relative px-[4px] box-border mb-[8px]",style:{marginBottom:"16px"},onClick:i,role:"button",tabIndex:0,onTouchEnd:i,children:[b("div",{className:"relative w-full mb-[2px] ion-no-margin",children:b(kN,{src:(s=(a=e.logo)!=null?a:e.cover)!=null?s:"",className:"w-full h-full absolute top-0 left-0 aspect-square rounded-[8px] object-cover",style:{display:"block",objectFit:"cover"},handleExposure:o})}),b("div",{className:"block text-white max-w-full text-[15px] leading-[1.2] overflow-hidden whitespace-nowrap text-ellipsis font-normal break-words",style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",wordBreak:"break-word",color:"white",maxWidth:"100%",fontSize:"15px",lineHeight:1.2,fontWeight:"normal",marginTop:"6px",fontFamily:"PingFangSC-Regular"},children:e.name})]},e.gameId)},PN=o=>{var a=o,{list:e,routeMode:t,layerName:r,onGameClick:n}=a,i=Ze(a,["list","routeMode","layerName","onGameClick"]);return b(uc,{className:"w-full max-w-[440px] mx-auto flex-grow overflow-y-auto",children:b(dc,{gutter:8,className:N`
93
+ `,onClick:d=>{var u;return(u=l.onClick)==null?void 0:u.call(l,d,{hide:a})},children:l.text},c))})]})},TN=()=>{let e=document.createElement("div");return e.id=`jolibox-ui-modal-container-${Math.random().toString(36).substring(2,15)}`,e.style.position="absolute",e.style.zIndex=`${1e3+document.querySelectorAll('[id^="jolibox-ui-modal-container-"]').length}`,document.body.appendChild(e),e},dc=e=>{let t=TN(),r=null,n=!1,i=!1,o=()=>{i||(n=!1,e.onClose&&e.onClose(),s(),setTimeout(()=>{i||t.remove()},300))},a=()=>window.innerWidth>window.innerHeight,s=()=>{var c;Zt(b(jP,{ref:d=>{r=d},isOpen:n,onClose:o,height:a()?"90vh":(c=e.height)!=null?c:"50vh",backdropColor:e.backdropColor,children:b(IN,L(k({},e),{onClose:o}))}),t)},l=()=>{!i&&n&&s()};return window.addEventListener("resize",l),s(),{show:()=>{i||(n=!0,s(),setTimeout(()=>{r&&(r.show(),e.onOpen&&e.onOpen())},0))},hide:()=>{i||r&&r.hide()},isOpen:()=>n,destroy:()=>{i=!0,t.remove()}}},RN=(e,t={threshold:.6})=>{let r=zi(null),n=zi(!1),i=at(o=>{let[a]=o;a.isIntersecting&&!n.current?(n.current=!0,e()):a.isIntersecting||(n.current=!1)},[e]);return Jt(()=>{if(r.current){let o=new IntersectionObserver(i,t);return o.observe(r.current),()=>{r.current&&o.unobserve(r.current)}}},[i,t]),r};fc=o=>{var a=o,{children:e,fluid:t=!1,className:r="",style:n={}}=a,i=Ze(a,["children","fluid","className","style"]);let s=k({width:"100%",marginLeft:"auto",marginRight:"auto",paddingLeft:"15px",paddingRight:"15px",boxSizing:"border-box",maxWidth:t?"100%":void 0},n);return b("div",L(k({className:r,style:s},i),{children:e}))},pc=s=>{var l=s,{children:e,gutter:t=0,justify:r="start",align:n="top",className:i="",style:o={}}=l,a=Ze(l,["children","gutter","justify","align","className","style"]);let c={start:"flex-start",end:"flex-end",center:"center","space-around":"space-around","space-between":"space-between"},d={top:"flex-start",middle:"center",bottom:"flex-end"},u=k({display:"flex",flexWrap:"wrap",boxSizing:"border-box",justifyContent:c[r],alignItems:d[n]},o);if(t){let p=Array.isArray(t)?t[0]:t,m=Array.isArray(t)?t[1]:0;p>0&&(u.marginLeft=`-${p/2}px`,u.marginRight=`-${p/2}px`),m>0&&(u.marginTop=`-${m/2}px`,u.marginBottom=`-${m/2}px`)}let h=t?ON(e,t):e;return b("div",L(k({className:i,style:u},a),{children:h}))};Pb=u=>{var h=u,{children:e,span:t,offset:r,xs:n,sm:i,md:o,lg:a,xl:s,className:l="",style:c={}}=h,d=Ze(h,["children","span","offset","xs","sm","md","lg","xl","className","style"]);let p=k({position:"relative",width:"100%",paddingLeft:"15px",paddingRight:"15px",boxSizing:"border-box"},c);if(t!==void 0){let m=t/24*100;p.flex=`0 0 ${m}%`,p.maxWidth=`${m}%`}return r!==void 0&&(p.marginLeft=`${r/24*100}%`),b("div",L(k({className:l,style:p},d),{children:e}))},CN=({game:e,layerName:t,routeMode:r,onGameClick:n})=>{var a,s;let i=_i(l=>{l.preventDefault(),n==null||n(e)},[n,e]),o=_i(()=>{},[e,t]);return b(Pb,{span:8,className:"relative px-[4px] box-border mb-[8px]",style:{marginBottom:"16px"},onClick:i,role:"button",tabIndex:0,onTouchEnd:i,children:[b("div",{className:"relative w-full mb-[2px] ion-no-margin",children:b(kN,{src:(s=(a=e.logo)!=null?a:e.cover)!=null?s:"",className:"w-full h-full absolute top-0 left-0 aspect-square rounded-[8px] object-cover",style:{display:"block",objectFit:"cover"},handleExposure:o})}),b("div",{className:"block text-white max-w-full text-[15px] leading-[1.2] overflow-hidden whitespace-nowrap text-ellipsis font-normal break-words",style:{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",wordBreak:"break-word",color:"white",maxWidth:"100%",fontSize:"15px",lineHeight:1.2,fontWeight:"normal",marginTop:"6px",fontFamily:"PingFangSC-Regular"},children:e.name})]},e.gameId)},PN=o=>{var a=o,{list:e,routeMode:t,layerName:r,onGameClick:n}=a,i=Ze(a,["list","routeMode","layerName","onGameClick"]);return b(fc,{className:"w-full max-w-[440px] mx-auto flex-grow overflow-y-auto",children:b(pc,{gutter:8,className:N`
94
94
  display: flex;
95
95
  flex-wrap: wrap;
96
- `,children:e==null?void 0:e.map(s=>b(CN,{game:s,routeMode:t,layerName:r,onGameClick:n},s.gameId))})})},NN=Gs(PN),rc=(e=>(e.Dismiss="DISMISS",e.Quit="QUIT",e))(rc||{}),DN=e=>{let{games:t,title:r,buttons:n,onClose:i}=e,[o,a]=Nt(null),s=at(d=>{i==null||i({type:d.type===rc.Quit?"quit":"dismiss"})},[i]),l=at(d=>{i==null||i({type:"navigate",data:{game:d}})},[i]);if(!t.length)return b(it,{});let c=at(d=>{if(d!==null&&!d.shadowRoot){let u=d.attachShadow({mode:"open"}),h=document.createElement("style");h.textContent=`
96
+ `,children:e==null?void 0:e.map(s=>b(CN,{game:s,routeMode:t,layerName:r,onGameClick:n},s.gameId))})})},NN=Ws(PN),ic=(e=>(e.Dismiss="DISMISS",e.Quit="QUIT",e))(ic||{}),DN=e=>{let{games:t,title:r,buttons:n,onClose:i}=e,[o,a]=Nt(null),s=at(d=>{i==null||i({type:d.type===ic.Quit?"quit":"dismiss"})},[i]),l=at(d=>{i==null||i({type:"navigate",data:{game:d}})},[i]);if(!t.length)return b(it,{});let c=at(d=>{if(d!==null&&!d.shadowRoot){let u=d.attachShadow({mode:"open"}),h=document.createElement("style");h.textContent=`
97
97
  .recommend-panel {
98
98
  background-color: #1a1a1a;
99
99
  width: 100%;
@@ -194,7 +194,7 @@ var qw=Object.create;var jn=Object.defineProperty,Uw=Object.defineProperties,Mw=
194
194
  background-color: #7817FF;
195
195
  color: #fff;
196
196
  }
197
- `;let p=document.createElement("div");p.id="recommend-panel-content",u.appendChild(h),u.appendChild(p),a(u)}},[]);return Jt(()=>{if(o){let d=o.getElementById("recommend-panel-content");d&&Zt(b("div",{className:"recommend-panel",children:b("div",{className:"container",children:[b("p",{className:"title",children:r}),b("div",{className:"games-container",children:b(NN,{list:t||[],routeMode:"REDIRECT",layerName:"RecommendedGuide",onGameClick:l})}),b("div",{className:"buttons-container",children:b(uc,{children:b(dc,{gutter:10,children:(n!=null?n:[]).map((u,h)=>b("div",{className:"button-wrapper",children:b("button",{className:`button ${u.type===rc.Quit?"quit-button":"action-button"}`,onClick:()=>s(u),children:b("span",{className:"button-text-ellipsis",children:u.text})})},h))})})})]})}),d)}},[o,t,r,n,s,l]),b("div",{ref:c})},Nb=e=>{let t=cc({title:e.title,content:b(DN,{games:e.games,title:e.title,buttons:e.buttons,onClose:e.onClose}),backdropColor:"#1a1a1a",placement:"bottom",noHeader:!0,padding:"0px",height:"450px",onClose:()=>{console.log("onClose")},onOpen:e.onOpen});return t.show(),t},_r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAUNSURBVHgBfVRZbFRlFP7+e+/cmc5MO22ntGALLZUWhoZFqBgaNUYJMUYehBgwJLw0wRd9MJr4AokvJibG6JtLoompkhgNBoNbERQqVEQLtdu0dN9nptPOcvft98xU3Kje5Cb3vzn/d77zfeccYO1HaG9vr0xlZz+ZvZXJ955TeO8XKh+5oPPRzrR29Uz8fbwCoRC31mW2FuB8PD3HRH/N2Od5NnDLQlmlH9x1sZhU4CvT0XpfEyyf4/GqTOqRp+tr6Y77X6BsfHz8QHip5ht3SBDKDwiYHbQQLpOQHxfBZA5XNFBRK8BeAT58bxg1tTvRtMPlXek32k69fOqnu0B7+3sfb9m+7bx+1hOVqAl3yYcQcei6MIW6xghEDvR0p7Dl3iiEsAxFtTD0M0PN1nUQxGXPt6N7z+HDh3v/DirM3VBc55KDymN+5PtcDAzE8djx3XCzXlE4z2LwvMILXO25DTvZBCE4jdR4GOLmEASW4kdfbBAplBdAhZFLWmLg41TVpr0yMotBhFsW0bprM7jDiyG8AOYUkAFSsnieT2ZIZwm2yjCbTmDDjgYEfcmRpoc3biu6l9fNyn2H6jC27IfujGJPbDOSoyZuXluEp5KGGgETU9ddBeREtyZajuu/TkLnLuoq6sCSDi686TbvPblXYjMzM+96c5UnHVPAwqCKfY9WgOc8pKYNhJqDEKW/1P/t8gx2xkhoKoARHRYETGaB2wJk2YNBMSNfxl+XskOR45lrHkp2SwhIGsxUhKI5bINDDgGDXy9CEFYZlkBG3/AcYg21xSSFfKGN1BkhAT7dh2Alw9Jk2QnJy/lDuXwWK/E8ttaFYemFeBGGSZnzHpqbN8AwXALlxI6kiLq48tU09u/ftCrFBCWv4bDggAUEuitVS4oKqNxACQsjq5oIqqVgzINJcuiaAEnhxUScSvZJDEYYUHQLhu5B9gRqJwZlhr6DHD5iHAoxJhTa5PbCFKrqXSTTBlRFgKLQiJDTjEpU6VujxJrGoVGCPJ0tGzDIQEsDsgs2cssckiPDyJFptUEIkai+MpdLY2XGT2DlyOXpIhnlwY9vO4Yhl7sINJqQa03och66IlEXEGPLo0TUOUmRxPJhflQl5jI+PZ9YYmN9I+8MXYk8m56S4VAvVkU8lAZLCwZT03P0x+NY11QB26YhIOrD8TEcanuoOAQyja2VJMbkvEjv8KSB7qvZV9nBgwdDR9o+U3p+nMATR6sR7wqhdbefSmZ/DpxEujHGV0eP9BbpHPSTniRVzpeCoMtY5AHc6Erwt75rEIXOzk7t0Ak+8dSx9ei+GMa2+1V0/7JEa0eH4VAHkLia5cIkpjZVYpMHkuRBT3m4nUlDTwcQ8PlQKjmIrlevFxMXZvWexsiWvFXGo5V9uPy9g/rmABYWJCgJEs01yWEKpHaSRAvqgo7pcR0TpgJTlxCRAmAxGRNZlZ/+qOXBAt6dJetVxfr2BNe1eEeeCSE1S5O0IYNl0tRwbFgKga3k4IvYsAMGFnUBAY+qipZAaKUBcDRvaPDMxjt79R9LuqPj7K6y/JM3t8dclpnIwsuEyXWvKENqDAhUu3Amy4uxWTuLTW1+XP9B8+T6K43PvXRkCv+z+cXBc4nemepALBD2CzHLQSBMeiYljI66uNjnoIbkMSYs9M+b/W93VO9EcRusvfnv+p9L5V6Dydt7LktRTSFzdMFzBCWRdCc/eP6FB07/Ecv/ffl3auuKkJv2jm0AAAAASUVORK5CYII=",_t={coinInfo:N`
197
+ `;let p=document.createElement("div");p.id="recommend-panel-content",u.appendChild(h),u.appendChild(p),a(u)}},[]);return Jt(()=>{if(o){let d=o.getElementById("recommend-panel-content");d&&Zt(b("div",{className:"recommend-panel",children:b("div",{className:"container",children:[b("p",{className:"title",children:r}),b("div",{className:"games-container",children:b(NN,{list:t||[],routeMode:"REDIRECT",layerName:"RecommendedGuide",onGameClick:l})}),b("div",{className:"buttons-container",children:b(fc,{children:b(pc,{gutter:10,children:(n!=null?n:[]).map((u,h)=>b("div",{className:"button-wrapper",children:b("button",{className:`button ${u.type===ic.Quit?"quit-button":"action-button"}`,onClick:()=>s(u),children:b("span",{className:"button-text-ellipsis",children:u.text})})},h))})})})]})}),d)}},[o,t,r,n,s,l]),b("div",{ref:c})},Nb=e=>{let t=dc({title:e.title,content:b(DN,{games:e.games,title:e.title,buttons:e.buttons,onClose:e.onClose}),backdropColor:"#1a1a1a",placement:"bottom",noHeader:!0,padding:"0px",height:"450px",onClose:()=>{console.log("onClose")},onOpen:e.onOpen});return t.show(),t},_r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAUNSURBVHgBfVRZbFRlFP7+e+/cmc5MO22ntGALLZUWhoZFqBgaNUYJMUYehBgwJLw0wRd9MJr4AokvJibG6JtLoompkhgNBoNbERQqVEQLtdu0dN9nptPOcvft98xU3Kje5Cb3vzn/d77zfeccYO1HaG9vr0xlZz+ZvZXJ955TeO8XKh+5oPPRzrR29Uz8fbwCoRC31mW2FuB8PD3HRH/N2Od5NnDLQlmlH9x1sZhU4CvT0XpfEyyf4/GqTOqRp+tr6Y77X6BsfHz8QHip5ht3SBDKDwiYHbQQLpOQHxfBZA5XNFBRK8BeAT58bxg1tTvRtMPlXek32k69fOqnu0B7+3sfb9m+7bx+1hOVqAl3yYcQcei6MIW6xghEDvR0p7Dl3iiEsAxFtTD0M0PN1nUQxGXPt6N7z+HDh3v/DirM3VBc55KDymN+5PtcDAzE8djx3XCzXlE4z2LwvMILXO25DTvZBCE4jdR4GOLmEASW4kdfbBAplBdAhZFLWmLg41TVpr0yMotBhFsW0bprM7jDiyG8AOYUkAFSsnieT2ZIZwm2yjCbTmDDjgYEfcmRpoc3biu6l9fNyn2H6jC27IfujGJPbDOSoyZuXluEp5KGGgETU9ddBeREtyZajuu/TkLnLuoq6sCSDi686TbvPblXYjMzM+96c5UnHVPAwqCKfY9WgOc8pKYNhJqDEKW/1P/t8gx2xkhoKoARHRYETGaB2wJk2YNBMSNfxl+XskOR45lrHkp2SwhIGsxUhKI5bINDDgGDXy9CEFYZlkBG3/AcYg21xSSFfKGN1BkhAT7dh2Alw9Jk2QnJy/lDuXwWK/E8ttaFYemFeBGGSZnzHpqbN8AwXALlxI6kiLq48tU09u/ftCrFBCWv4bDggAUEuitVS4oKqNxACQsjq5oIqqVgzINJcuiaAEnhxUScSvZJDEYYUHQLhu5B9gRqJwZlhr6DHD5iHAoxJhTa5PbCFKrqXSTTBlRFgKLQiJDTjEpU6VujxJrGoVGCPJ0tGzDIQEsDsgs2cssckiPDyJFptUEIkai+MpdLY2XGT2DlyOXpIhnlwY9vO4Yhl7sINJqQa03och66IlEXEGPLo0TUOUmRxPJhflQl5jI+PZ9YYmN9I+8MXYk8m56S4VAvVkU8lAZLCwZT03P0x+NY11QB26YhIOrD8TEcanuoOAQyja2VJMbkvEjv8KSB7qvZV9nBgwdDR9o+U3p+nMATR6sR7wqhdbefSmZ/DpxEujHGV0eP9BbpHPSTniRVzpeCoMtY5AHc6Erwt75rEIXOzk7t0Ak+8dSx9ei+GMa2+1V0/7JEa0eH4VAHkLia5cIkpjZVYpMHkuRBT3m4nUlDTwcQ8PlQKjmIrlevFxMXZvWexsiWvFXGo5V9uPy9g/rmABYWJCgJEs01yWEKpHaSRAvqgo7pcR0TpgJTlxCRAmAxGRNZlZ/+qOXBAt6dJetVxfr2BNe1eEeeCSE1S5O0IYNl0tRwbFgKga3k4IvYsAMGFnUBAY+qipZAaKUBcDRvaPDMxjt79R9LuqPj7K6y/JM3t8dclpnIwsuEyXWvKENqDAhUu3Amy4uxWTuLTW1+XP9B8+T6K43PvXRkCv+z+cXBc4nemepALBD2CzHLQSBMeiYljI66uNjnoIbkMSYs9M+b/W93VO9EcRusvfnv+p9L5V6Dydt7LktRTSFzdMFzBCWRdCc/eP6FB07/Ecv/ffl3auuKkJv2jm0AAAAASUVORK5CYII=",_t={coinInfo:N`
198
198
  display: flex;
199
199
  gap: 24px;
200
200
  `,coinAmount:N`
@@ -266,10 +266,10 @@ var qw=Object.create;var jn=Object.defineProperty,Uw=Object.defineProperties,Mw=
266
266
  display: flex;
267
267
  flex-direction: column;
268
268
  justify-content: center;
269
- `,UN=e=>b("div",{className:LN,children:b("div",{className:qN,children:b("div",{className:`${hr.card} ${e.option.id===e.selectedId?hr.selectedCard:""}`,onClick:()=>e.handleSelect(e.option),children:[b("div",{className:hr.coinContainer,children:[b("img",{src:_r,alt:"Coin",className:hr.coinIcon}),b("span",{className:hr.coinValue,children:e.option.coins})]}),b("div",{className:hr.price,children:e.option.price})]})})}),MN=({options:e,defaultSelectedId:t,onSelect:r})=>{let[n,i]=Nt(t!=null?t:""),o=a=>{i(a.id),r==null||r(a)};return b(uc,{className:"w-full mx-auto flex-grow overflow-y-auto",style:{padding:"0px"},children:b(dc,{gutter:[10,10],className:N`
269
+ `,UN=e=>b("div",{className:LN,children:b("div",{className:qN,children:b("div",{className:`${hr.card} ${e.option.id===e.selectedId?hr.selectedCard:""}`,onClick:()=>e.handleSelect(e.option),children:[b("div",{className:hr.coinContainer,children:[b("img",{src:_r,alt:"Coin",className:hr.coinIcon}),b("span",{className:hr.coinValue,children:e.option.coins})]}),b("div",{className:hr.price,children:e.option.price})]})})}),MN=({options:e,defaultSelectedId:t,onSelect:r})=>{let[n,i]=Nt(t!=null?t:""),o=a=>{i(a.id),r==null||r(a)};return b(fc,{className:"w-full mx-auto flex-grow overflow-y-auto",style:{padding:"0px"},children:b(pc,{gutter:[10,10],className:N`
270
270
  display: flex;
271
271
  flex-wrap: wrap;
272
- `,children:e.map(a=>b(Pb,{span:8,children:b(UN,{option:a,selectedId:n,coinImageSrc:_r,handleSelect:o})},a.id))})})},jN=Gs(MN),re={modal:N`
272
+ `,children:e.map(a=>b(Pb,{span:8,children:b(UN,{option:a,selectedId:n,coinImageSrc:_r,handleSelect:o})},a.id))})})},jN=Ws(MN),re={modal:N`
273
273
  font-family: PingFangSC-Regular;
274
274
  background-color: #1a1a1a;
275
275
  color: white;
@@ -380,7 +380,7 @@ var qw=Object.create;var jn=Object.defineProperty,Uw=Object.defineProperties,Mw=
380
380
  line-height: 1.2;
381
381
  `,children:"Deduct Jolicoin automatically for digital items"}),b("label",{className:re.toggleSwitch,children:[b("input",{className:re.toggleInput,type:"checkbox",checked:s,onChange:()=>l(!s)}),b("span",{className:`${re.toggleSlider} ${s?re.toggleSliderActive:""}`})]})]}),b("button",{className:re.confirmButton,onClick:c,children:o}),b("button",{className:re.cancelButton,onClick:i,children:a})]}),b("div",{className:re.bottomIndicator})]})},BN=({unlockNeedsAmount:e=1,balanceAmount:t=0,defaultEnableAutoDeduct:r=!1,paymentChoices:n=[],onConfirm:i,onClose:o,confirmButtonText:a,cancelButtonText:s})=>{let[l,c]=Nt(r),[d,u]=Nt(n[0].productId),h=()=>{i(d)},p=at(m=>{console.log(m),u(m)},[]);return b("div",{className:re.modal,children:[b("div",{className:re.header,children:[b(Db,{unlockNeedsAmount:e,balanceAmount:t,coinImage:_r}),b("button",{className:re.closeButton,onClick:o,children:b("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:b("path",{d:"M18 6L6 18M6 6L18 18",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),b("div",{className:re.content,children:[b("div",{className:N`
382
382
  padding: 0px;
383
- `,children:b(jN,{options:n.map(m=>({id:m.productId,coins:m.quantity,price:m.totalAmountStr})),defaultSelectedId:n[0].productId,onSelect:m=>p(m.id)})}),b("button",{className:re.confirmButton,onClick:h,children:a}),b("button",{className:re.cancelButton,onClick:o,children:s})]}),b("div",{className:re.bottomIndicator})]})},Lb=e=>{let t=cc({title:"",content:b(FN,{balanceAmount:e.data.userJolicoin.balance,unlockNeedsAmount:e.data.joliCoinQuantity,defaultEnableAutoDeduct:e.data.enableAutoDeduct,confirmButtonText:e.buttons.confirm.text,cancelButtonText:e.buttons.cancel.text,onClose:e.buttons.cancel.onPress,onConfirm:e.buttons.confirm.onPress}),backdropColor:"#1a1a1a",placement:"bottom",noHeader:!0,padding:"0px",height:"316px",onClose:e.buttons.cancel.onPress.bind(null,{type:"CANCEL"})});return t.show(),t},qb=e=>{let t=cc({title:"",content:b(BN,{balanceAmount:e.data.userJolicoin.balance,unlockNeedsAmount:e.data.joliCoinQuantity,defaultEnableAutoDeduct:e.data.enableAutoDeduct,paymentChoices:e.data.paymentChoices,confirmButtonText:e.buttons.confirm.text,cancelButtonText:e.buttons.cancel.text,onClose:e.buttons.cancel.onPress,onConfirm:e.buttons.confirm.onPress}),backdropColor:"#1a1a1a",placement:"bottom",noHeader:!0,padding:"0px",height:"520px",onClose:e.buttons.cancel.onPress.bind(null,{type:"CANCEL"})});return t.show(),t},Ub=new Map,Mb=(e,t)=>{Ub.set(e,t)};Mb(/^\{slot-checkmark\}/,(e,t)=>{var n,i;let r=(i=(n=t==null?void 0:t.customStyle)==null?void 0:n.mark)!=null?i:{};return b("div",{style:r,children:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",style:{height:"24px",verticalAlign:"middle"},children:[b("g",{clipPath:"url(#clip0_2247_16523)",children:b("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM9.29 16.29L5.7 12.7C5.31 12.31 5.31 11.68 5.7 11.29C6.09 10.9 6.72 10.9 7.11 11.29L10 14.17L16.88 7.29C17.27 6.9 17.9 6.9 18.29 7.29C18.68 7.68 18.68 8.31 18.29 8.7L10.7 16.29C10.32 16.68 9.68 16.68 9.29 16.29Z",fill:"white"})}),b("defs",{children:b("clipPath",{id:"clip0_2247_16523",children:b("rect",{width:"24",height:"24",fill:"white"})})})]})})});Mb(/^\{slot-coin\}/,(e,t)=>{var n;let r=(n=t==null?void 0:t.coinImage)!=null?n:_r;return b("img",{src:r,alt:"\u{1FA99}",style:{height:"1em",verticalAlign:"middle"}})});$N=(e,t)=>{if(!e.includes("{slot-"))return e;let r=[],n=0;for(;n<e.length;){let o=null,a=1/0,s=null;for(let[l,c]of Ub.entries()){let d=l.source.startsWith("^")?l.source.slice(1):l.source,u=new RegExp(d,"g");u.lastIndex=n;let h=u.exec(e);h&&h.index<a&&(o=h,a=h.index,s=c)}if(o&&s)a>n&&r.push(e.substring(n,a)),r.push(s(o,t)),n=a+o[0].length;else{r.push(e.substring(n));break}}let i=N`
383
+ `,children:b(jN,{options:n.map(m=>({id:m.productId,coins:m.quantity,price:m.totalAmountStr})),defaultSelectedId:n[0].productId,onSelect:m=>p(m.id)})}),b("button",{className:re.confirmButton,onClick:h,children:a}),b("button",{className:re.cancelButton,onClick:o,children:s})]}),b("div",{className:re.bottomIndicator})]})},Lb=e=>{let t=dc({title:"",content:b(FN,{balanceAmount:e.data.userJolicoin.balance,unlockNeedsAmount:e.data.joliCoinQuantity,defaultEnableAutoDeduct:e.data.enableAutoDeduct,confirmButtonText:e.buttons.confirm.text,cancelButtonText:e.buttons.cancel.text,onClose:e.buttons.cancel.onPress,onConfirm:e.buttons.confirm.onPress}),backdropColor:"#1a1a1a",placement:"bottom",noHeader:!0,padding:"0px",height:"316px",onClose:e.buttons.cancel.onPress.bind(null,{type:"CANCEL"})});return t.show(),t},qb=e=>{let t=dc({title:"",content:b(BN,{balanceAmount:e.data.userJolicoin.balance,unlockNeedsAmount:e.data.joliCoinQuantity,defaultEnableAutoDeduct:e.data.enableAutoDeduct,paymentChoices:e.data.paymentChoices,confirmButtonText:e.buttons.confirm.text,cancelButtonText:e.buttons.cancel.text,onClose:e.buttons.cancel.onPress,onConfirm:e.buttons.confirm.onPress}),backdropColor:"#1a1a1a",placement:"bottom",noHeader:!0,padding:"0px",height:"520px",onClose:e.buttons.cancel.onPress.bind(null,{type:"CANCEL"})});return t.show(),t},Ub=new Map,Mb=(e,t)=>{Ub.set(e,t)};Mb(/^\{slot-checkmark\}/,(e,t)=>{var n,i;let r=(i=(n=t==null?void 0:t.customStyle)==null?void 0:n.mark)!=null?i:{};return b("div",{style:r,children:b("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",style:{height:"24px",verticalAlign:"middle"},children:[b("g",{clipPath:"url(#clip0_2247_16523)",children:b("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM9.29 16.29L5.7 12.7C5.31 12.31 5.31 11.68 5.7 11.29C6.09 10.9 6.72 10.9 7.11 11.29L10 14.17L16.88 7.29C17.27 6.9 17.9 6.9 18.29 7.29C18.68 7.68 18.68 8.31 18.29 8.7L10.7 16.29C10.32 16.68 9.68 16.68 9.29 16.29Z",fill:"white"})}),b("defs",{children:b("clipPath",{id:"clip0_2247_16523",children:b("rect",{width:"24",height:"24",fill:"white"})})})]})})});Mb(/^\{slot-coin\}/,(e,t)=>{var n;let r=(n=t==null?void 0:t.coinImage)!=null?n:_r;return b("img",{src:r,alt:"\u{1FA99}",style:{height:"1em",verticalAlign:"middle"}})});$N=(e,t)=>{if(!e.includes("{slot-"))return e;let r=[],n=0;for(;n<e.length;){let o=null,a=1/0,s=null;for(let[l,c]of Ub.entries()){let d=l.source.startsWith("^")?l.source.slice(1):l.source,u=new RegExp(d,"g");u.lastIndex=n;let h=u.exec(e);h&&h.index<a&&(o=h,a=h.index,s=c)}if(o&&s)a>n&&r.push(e.substring(n,a)),r.push(s(o,t)),n=a+o[0].length;else{r.push(e.substring(n));break}}let i=N`
384
384
  display: 'flex',
385
385
  alignItems: 'center',
386
386
  gap: '4px',
@@ -410,9 +410,9 @@ var qw=Object.create;var jn=Object.defineProperty,Uw=Object.defineProperties,Mw=
410
410
  transform: ${i?"translate(-50%, 0)":"translate(-50%, -20px)"};
411
411
  text-align: center;
412
412
  word-wrap: break-word;
413
- `;return b("div",{className:`toast toast-${t} ${i?"toast-visible":"toast-hidden"} ${a}`,children:e})},jb=(e,t)=>{let r=document.createElement("div");document.body.appendChild(r);let n=()=>{document.body.removeChild(r)},i=$N(e,t);Zt(b(HN,{message:i,type:t==null?void 0:t.type,duration:t==null?void 0:t.duration,onClose:n}),r)}});function Fb(){return I(this,null,function*(){if(fc)return fc;let t=`${A.testMode?"https://stg-game.jolibox.com":"https://game.jolibox.com"}/api/user-retention/exit-recommendations?objectId=${A.mpId}&from=GAME_DETAIL`,{response:{data:r}}=yield we(t);return fc=r,r})}function Bb(){return I(this,null,function*(){let e=new At;if(A.mpType!=="game")return e.resolve(!1),e.promise;let t=yield Fb();if(t.code!=="SUCCESS")return e.resolve(!1),e.promise;let{gameListInfo:r,title:n,buttons:i}=t.data,o=Nb({games:r.games,title:n,buttons:i,onClose:a=>{var s;switch(a.type){case"quit":e.resolve(!1);break;case"dismiss":e.resolve(!0),o.hide();break;case"navigate":(s=a.data)!=null&&s.game?JN(a.data.game):e.resolve(!0),o.hide();break;default:e.resolve(!0);break}}});return e.promise})}var fc,JN,$b=T(()=>{"use strict";Z();Se();D();eo();jt();fc=null;Fb();JN=e=>{var a;let{data:t}=q("envSync"),r=new URL(t.schema),n=new URLSearchParams(r.search);n.set("gameId",e.gameId),n.set("joliSource",A.encodeJoliSourceQuery({__mpType:"game",__orientation:(a=e.orientation)!=null?a:"VERTICAL"}));let o=`${`https://${e.gameId}.content.jolibox.com/`}index.html?${n.toString()}`;q("openSchemaSync",{schema:o})}});function GN(e){let t=k(k({},VN),e),{url:r,height:n,showCloseButton:i,enableDragClose:o,useAnimation:a,onClose:s,onLoad:l}=t,c=0,d=0,u=!1,h=()=>a?{overlayTransition:"opacity 0.3s ease",containerTransition:"transform 0.3s ease",iframeTransition:"opacity 0.3s ease"}:{overlayTransition:"none",containerTransition:"none",iframeTransition:"none"},p=()=>a?300:0;function m(){let{overlayTransition:y,containerTransition:x,iframeTransition:R}=h();V=document.createElement("div"),V.id="jolibox-modal-overlay",V.style.cssText=`position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.5); z-index:1000; display:flex; justify-content:center; align-items:flex-end; transition:${y}; opacity:0; visibility:hidden;`,$=document.createElement("div"),$.id="jolibox-modal-container",$.style.cssText=`width:100%; height:${n}; background:white; border-radius:12px 12px 0 0; overflow:hidden; box-shadow:0 -2px 10px rgba(0,0,0,0.2); transform:translateY(100%); transition:${x};`;let C=document.createElement("div");C.id="jolibox-modal-loading",C.style.cssText="position:absolute; top:50%; left:50%; transform:translate(-50%, -50%); width:40px; height:40px; border:4px solid #f3f3f3; border-top:4px solid #3498db; border-radius:50%; animation:spin 1s linear infinite;";let S=document.createElement("style");S.textContent="@keyframes spin { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } }",document.head.appendChild(S);let w=document.createElement("div");if(w.style.cssText="width:100%; height:100%; display:flex; flex-direction:column; padding-bottom:env(safe-area-inset-bottom, 0); position:relative;",Ke=document.createElement("iframe"),Ke.style.cssText=`width:100%; flex:1; border:none; opacity:0; transition:${R};`,Ke.src=r,Ke.onload=()=>{C.parentNode&&C.parentNode.removeChild(C),Ke.style.opacity="1",g(),l==null||l(),ue.emit("onModalIframeLoaded",{url:r})},w.appendChild(Ke),w.appendChild(C),$.appendChild(w),i){let B=document.createElement("div");B.style.cssText="position:absolute; top:10px; right:10px; width:30px; height:30px; background:rgba(0,0,0,0.1); border-radius:15px; display:flex; justify-content:center; align-items:center; cursor:pointer; z-index:10;",B.innerHTML="\u2715",B.onclick=v,$.appendChild(B)}V.appendChild($),document.body.appendChild(V),V.addEventListener("click",function(B){B.target===V&&v()}),o&&_()}function g(){!V||!$||u||(V.style.visibility="visible",a?requestAnimationFrame(()=>{V&&(V.style.opacity="1"),$&&($.style.transform="translateY(0)"),u=!0}):(V&&(V.style.opacity="1"),$&&($.style.transform="translateY(0)"),u=!0),q("updateContainerConfigSync",{displayCapsuleButton:!1,webviewId:A.webviewId}))}function _(){if(!$)return;let y=C=>{c=C.touches[0].clientY},x=C=>{if(!u)return;d=C.touches[0].clientY;let S=d-c;S>0&&($&&($.style.transition="none",$.style.transform=`translateY(${S}px)`),C.preventDefault())},R=()=>{!u||!$||($.style.transition=a?"transform 0.3s ease":"none",d-c>80?v():$.style.transform="translateY(0)")};$.addEventListener("touchstart",y),$.addEventListener("touchmove",x),$.addEventListener("touchend",R)}function v(){!V||!$||!u||(a?($.style.transform="translateY(100%)",V.style.opacity="0"):V.style.visibility="hidden",u=!1,q("updateContainerConfigSync",{displayCapsuleButton:!0,webviewId:A.webviewId}),setTimeout(()=>{V&&(V.remove(),V=null,$=null,Ke=null,s==null||s(),ue.emit("onModalIframeClosed",{url:r}))},p()))}return m(),{close:v}}function Hb(){return window.joliboxUI=L(k({},window.joliboxUI),{createIframeModal:GN}),()=>{window.joliboxUI=void 0,V&&V.parentNode&&V.parentNode.removeChild(V),$&&$.parentNode&&$.parentNode.removeChild($),Ke&&Ke.parentNode&&Ke.parentNode.removeChild(Ke),V=null,$=null,Ke=null}}var VN,V,$,Ke,Jb=T(()=>{"use strict";Se();Z();D();VN={height:"50%",showCloseButton:!0,enableDragClose:!0,useAnimation:!0},V=null,$=null,Ke=null});var Gb={};ru(Gb,{config:()=>nD});function WN(){wd.on("isAdShowing",e=>{no=e,jr(no)&&q("updateContainerConfigSync",{displayCapsuleButton:!no,webviewId:A.webviewId})})}function zN(){ue.on("onInterceptSystemExit",({intercept:e})=>{Vb=e})}function YN(){ue.on("onInterceptBackPress",({intercept:e})=>{KN=e}),Ve("onBeforeBackPress",({uuid:e})=>{var t,r;ue.emit("onBackPress",{}),(r=(t=globalThis.joliboxJSCore)==null?void 0:t.doBackPress)==null||r.call(t,e)})}function QN(){ue.on("onDocumentReady",()=>{var e;(e=globalThis.joliboxJSCore)==null||e.onDocumentReady(window.location.href),qe("onDocumentReady",{start_timestamp:oo,timestamp:Date.now()})})}function XN(){Ve("onI18nChanged",({language:e})=>{ue.emit("onI18nChanged",{i18n:e})})}function ZN(e){A.mpType==="game"&&Ce.start(e)}function eD(){Ve("onJoliboxServiceReady",({runtimeInfo:e,loadDuration:t})=>{e&&A.onEnvConfigChanged({hostUserInfo:e}),ue.emit("LifecycleEvent.onReady",k({},A.hostUserInfo?A.hostUserInfo:{isLogin:!1})),qe("joliboxServiceReady",{start_timestamp:oo,timestamp:Date.now()}),ZN(t)}),Ve("onBeforeExit",({uuid:e})=>{var t;(t=globalThis.joliboxJSCore)==null||t.doExit(e)})}function tD(){let e=()=>{qe("onBeforeExit",{timestamp:Date.now()}),to==null||to(),ro==null||ro(),Ce.close(Date.now()-oo)},t=()=>no||Vb;Je.onDoExit(()=>I(this,null,function*(){return t()?!0:jr(A.shouldInterupt)?(A.shouldInterupt||e(),A.shouldInterupt):io!=null&&io.canShowRecommended&&(yield Bb())?!0:(e(),!1)})),Je.onDoBackPress(()=>I(this,null,function*(){return!!t()}))}function rD(){return I(this,null,function*(){let e=`${A.baseApiHost}/api/fe-configs/js-sdk/basic-meta`,{response:{data:t}}=yield we(e);t&&(io=t)})}function nD(){oo=Date.now(),eD(),WN(),zN(),YN(),tD(),QN(),XN(),rD(),ro=Hb(),to=vd()}var to,ro,oo,no,io,Vb,KN,Kb=T(()=>{"use strict";Se();Z();D();It();gd();Ed();$b();jt();Jb();no=!1,io=null,Vb=!1,KN=!1;Je.onReady(()=>{})});function Wb(e){let t=Oa.config[e];return t||(t={},Oa.config[e]=t),(r,n)=>{if(t[r]){et.warn(`[can i use] ${r} already registered`);return}t[r]=k({},n)}}var zb=T(()=>{"use strict";D()});function pc(e){Yb=e}function ao(e){return e===null||typeof e!="object"?e:Array.isArray(e)?e.map(t=>ao(t)):Object.keys(e).reduce((t,r)=>(t[r]=ao(e[r]),t),{})}function yt(e){return typeof e=="number"}function hc(e){let t=mc(e);switch(t){case"string":return`"${e}"`;case"number":case"boolean":case"null":case"undefined":return String(e);default:return`a(n) ${t}`}}function mc(e){return typeof e=="function"?"function":Object.prototype.toString.call(e).slice(8).slice(0,-1).toLowerCase()}var Yb,oe,so,lo,co,uo,yr,fo,po,ho,mo,vo,go,_o,yo,bo,wo,Eo,xo,vc=T(()=>{"use strict";Yb=!1;oe=class{constructor(){this.errors=[];this.hasFallback=!1;this.hasDefault=!1;this._optional=!1}fail(t){if(Yb)if(typeof t=="string")this.errors.push(t);else{let r=`${this.path} should be ${t.expect}`;this._optional&&t.expect!=="undefined"?r+=" or undefined, ":r+=", ",r+=`but got ${hc(t.actual)}`,this.errors.push(r)}return!1}fallback(t){return this.hasFallback=!0,this._fallback=t,this}get fallbackValue(){return ao(this._fallback)}default(t){return this.hasDefault=!0,this._default=t,this}get defaultValue(){return typeof this._default=="function"?this._default:ao(this._default)}optional(){return this._optional=!0,this}};so=class extends oe{validate(t){return this._optional&&t===void 0?!0:yt(t)?yt(this._min)&&t<this._min?this.fail(`the value of ${this.path} should be greater than or equal to ${this._min}`):yt(this._max)&&t>this._max?this.fail(`the value of ${this.path} should be less than or equal to ${this._max}`):yt(this._greater)&&t<=this._greater?this.fail(`the value of ${this.path} should be greater than ${this._greater}`):this._isInt&&t!==Math.floor(t)?this.fail(`the value of ${this.path} should be integer but got ${t}`):!0:this.fail({expect:"number",actual:t})}min(t){return this._min=t,this}max(t){return this._max=t,this}isInt(t){return this._isInt=t,this}greater(t){return this._greater=t,this}},lo=class extends oe{validate(t){return this._optional&&t===void 0?!0:typeof t!="boolean"?this.fail({expect:"boolean",actual:t}):!0}},co=class extends oe{validate(t){if(this._optional&&t===void 0)return!0;if(typeof t!="string")return this.fail({expect:"string",actual:t});if(yt(this._maxLength)&&t.length>this._maxLength)return this.fail(`the length of ${this.path} should be less than or equal to ${this._maxLength}`);if(yt(this._minLength)&&t.length<this._minLength)return this.fail(`the length of ${this.path} should be greater than or equal to ${this._minLength}`);if(typeof this._pattern=="string"){if(!new RegExp(this._pattern).test(t))return this.fail(`${this.path} should match pattern "${this._pattern}"`)}else if(this._pattern&&!this._pattern.test(t))return this.fail(`${this.path} should match pattern "${this._pattern.toString()}"`);return!0}minLength(t){return this._minLength=t,this}maxLength(t){return this._maxLength=t,this}pattern(t){return this._pattern=t,this}},uo=class extends oe{validate(t){return this._optional&&t===void 0?!0:typeof t!="symbol"?this.fail({expect:"symbol",actual:t}):!0}},yr=class extends oe{validate(t){return!0}},fo=class extends oe{validate(t){return t!==void 0?this.fail({expect:"undefined",actual:t}):!0}},po=class extends oe{validate(t){return this._optional&&t===void 0?!0:t!==null?this.fail({expect:"null",actual:t}):!0}},ho=class extends oe{validate(t){return this._optional&&t===void 0?!0:typeof t!="function"?this.fail({expect:"function",actual:t}):!0}},mo=class extends oe{constructor(...t){super(),this._items=t}validate(t){if(this._optional&&t===void 0)return!0;if(!this._items.includes(t)){let r=this._items.map(n=>JSON.stringify(n)).join(", ");return this.fail(`expect ${this.path} to be one of ${r}, but got ${hc(t)}`)}return!0}},vo=class extends oe{constructor(r){super();this._item=r}validate(r){if(this._optional&&r===void 0)return!0;if(!Array.isArray(r))return this.fail({expect:"array",actual:r});if(yt(this._minItems)&&r.length<this._minItems)return this.fail(`the length of ${this.path} should be greater than or equal to ${this._minItems}`);if(yt(this._maxItems)&&r.length>this._maxItems)return this.fail(`the length of ${this.path} should be less than or equal to ${this._maxItems}`);if(yt(this._length)&&r.length!==this._length)return this.fail(`the length of ${this.path} should be equal to ${this._length}`);let n=this._item;if(!n)return!0;let i=!0;if(r.forEach((o,a)=>{if(n.path=`${this.path}[${a}]`,n.errors=this.errors,o===void 0&&n.hasDefault){r[a]=n.defaultValue;return}n.validate(o)||(n.hasFallback?r[a]=n.fallbackValue:i=!1)}),this._uniqueItems){let o=new Map;for(let a in r)o.has(r[a])?i=this.fail(`${this.path} should NOT have duplicate items (${this.path}[${o.get(r[a])}] and ${this.path}[${a}] are identical)`):o.set(r[a],a)}return i}minItems(r){return this._minItems=r,this}maxItems(r){return this._maxItems=r,this}uniqueItems(){return this._uniqueItems=!0,this}length(r){return this._length=r,this}},go=class extends oe{constructor(r){super();this._value=r}validate(r){if(this._optional&&r===void 0)return!0;if(mc(r)!=="object")return this.fail({expect:"object",actual:r});let i=r,o=this._value;o.errors=this.errors;let a=!0;for(let s in i){let l=i[s];if(/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/.test(s)?o.path=`${this.path}.${s}`:o.path=`${this.path}["${s}"]`,!(l===void 0&&o._optional)){if(l===void 0&&o.hasDefault){i[s]=o.defaultValue;continue}o.validate(l)||(o.hasFallback?i[s]=o.fallbackValue:a=!1)}}return a}},_o=class extends oe{constructor(r={}){super();this._object=r}validate(r){if(this._optional&&r===void 0)return!0;if(mc(r)!=="object")return this.fail({expect:"object",actual:r});let n=r,i=!0;for(let o in this._object){let a=n[o],s=this._object[o];if(s.errors=this.errors,/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/.test(o)?s.path=`${this.path}.${o}`:s.path=`${this.path}["${o}"]`,!(s._optional&&a===void 0)){if(a===void 0&&s.hasDefault){n[o]=s.defaultValue;continue}s.validate(a)||(s.hasFallback?n[o]=s.fallbackValue:i=!1)}}return i}},yo=class extends oe{constructor(r){super();this.value=r}validate(r){return r===void 0&&this._optional?!0:r!==this.value?this.fail({expect:hc(this.value),actual:r}):!0}},bo=class extends oe{constructor(...t){super(),this._items=t}validate(t){if(t===void 0&&this._optional)return!0;let r=[],n=!1,i=this._items.length;for(let o=0;o<i;o++){let a=this._items[o];if(a.errors=[],a.path=this.path,!a.validate(t))r.push(a.errors.join("; "));else if(!n){n=!0;break}}if(!n){let o=r.join(`
414
- or `);this.errors.push(o)}return n}},wo=class extends oe{constructor(...t){super(),this._items=t;let r=0,n=t.length-1;for(;n>=0;n--){let i=t[n];if(i._optional||i.hasDefault)r+=1;else break}this._minItems=t.length-r}validate(t){if(t===void 0&&this._optional)return!0;if(!Array.isArray(t))return this.fail({expect:"array",actual:t});if(t.length<this._minItems)return this.fail(`the length of ${this.path} should be greater than or equal to ${this._minItems}`);let r=!0;return this._items.forEach((n,i)=>{if(n.path=`${this.path}[${i}]`,n.errors=this.errors,t[i]===void 0&&n.hasDefault){t[i]=n.defaultValue;return}n.validate(t[i])||(n.hasFallback?t[i]=n._fallback:r=!1)}),r}},Eo=class extends oe{validate(t){return t===void 0&&this._optional||t instanceof ArrayBuffer?!0:this.fail({expect:"arraybuffer",actual:t})}},xo=class extends oe{constructor(t){super(),this._ctor=t}validate(t){return t===void 0&&this._optional||t instanceof this._ctor?!0:this.fail({expect:`typedarray of ${this._ctor.name}`,actual:t})}}});function gc(e,t,r="param"){if(e.errors=[],e.path=r,pc(!0),!e.validate(t)){let n=e.errors.join(`
415
- `);throw e.errors.length=0,pc(!1),new TypeError(n)}}var E,_c=T(()=>{"use strict";vc();vc();E={object(e){return new _o(e)},array(e){return new vo(e)},tuple(...e){return new wo(...e)},literal(e){return new yo(e)},or(...e){return new bo(...e)},symbol(){return new uo},record(e){return new go(e)},function(){return new ho},boolean(){return new lo},string(){return new co},number(){return new so},undefined(){return new fo},null(){return new po},unknown(){return new yr},any(){return new yr},as(){return new yr},arraybuffer(){return new Eo},enum(...e){return new mo(...e)},typedarray(e){return new xo(e)}}});var Ao,Qb,Xb=T(()=>{"use strict";D();rt();_c();Qt();Ao=1,Qb=e=>{function t(n,i){return(...o)=>{var u,h,p,m;let a=Date.now(),s={method:n,trace_id:Ao};Ao+=1;let l="SUCCESS",c=`${n}:ok`,d=0;try{if(i.paramsSchema)try{gc(i.paramsSchema,o,"params")}catch(y){throw Ma(`${n}:fail ${y.message}`)}let g=i.implement(...o),_=g,v=`${n}:ok`;if(g&&"code"in g){let{code:y,data:x,message:R}=g;l=y,_=x,v=R}return{code:l,message:v,data:_}}catch(g){let _=g;d=(h=(u=_.code)!=null?u:_.errNo)!=null?h:2e3,l="FAILURE";let v=(m=(p=_.message)!=null?p:_.errMsg)!=null?m:`${g}`;return c=`${n}:${l} ${v.replace(/^\S+:(fail|cancel)\s?/,"")}`,Ie(new $r(c,d)),{code:l,message:c}}finally{let g=Date.now()-a;e("apiInvoked",L(k({},s),{duration:g,status:l}))}}}function r(n,i){return(...o)=>I(this,null,function*(){var h,p,m,g;let a=Ru(o)?o:[o],s=Date.now(),l={method:n,trace_id:Ao};Ao+=1;let c=`${n}:ok`,d="SUCCESS",u={code:d,message:c};try{if(i.paramsSchema)try{gc(i.paramsSchema,a,"params")}catch(y){throw Ma(y.message)}let v=yield i.implement(...a);if(v&&"code"in v){let{code:y,data:x,message:R}=v;d=y,c=R,v=x}return Object.assign(u,{code:d,message:c,data:v}),u}catch(_){let v=_,y=(p=(h=v.code)!=null?h:v.errNo)!=null?p:2e3;d="FAILURE";let x=(g=(m=v.message)!=null?m:v.errMsg)!=null?g:`${_}`,R=`${n}:${d} ${x.replace(/^\S+:(fail|cancel)\s?/,"")}`;return Object.assign(u,{code:d,message:R}),Ie(new $r(R,y)),u}finally{let _=Date.now()-s;e("apiInvoked",L(k({},l),{duration:_,status:d}))}})}return{createAPI:r,createSyncAPI:t}}});var pe,J,P,lt=T(()=>{"use strict";zb();It();Xb();_c();({createAPI:pe,createSyncAPI:J}=Qb(qe)),P=Wb("native")});var Zb,oD,aD,sD,lD,e0=T(()=>{"use strict";D();lt();Se();Zb=X(),oD="env",aD="getSystemInfoSync",sD=J(aD,{implement:()=>{var r;let e=q("envSync"),{data:t}=e;return{system:t.deviceInfo.system,platform:t.deviceInfo.platform.toLowerCase(),version:t.sdkInfo.jssdkVersion,pixelRatio:t.deviceInfo.pixelRatio,language:t.deviceInfo.lang,brand:t.deviceInfo.brand,appName:(r=t.hostInfo)==null?void 0:r.appName,SDKVersion:t.sdkInfo.jssdkVersion}}}),lD=J(oD,{implement:()=>{var t;let e=q("envSync");return(t=e==null?void 0:e.data)!=null?t:void 0}});Zb.registerCommand("API.getSystemInfoSync",sD);Zb.registerCommand("API.env",lD);P("env",{version:"1.0.0"});P("getSystemInfoSync",{version:"1.0.0"})});var t0=f(yc=>{"use strict";D();lt();rt();Se();It();Z();var cD="exitGame",uD="onReady",dD="onJoliboxShow",fD="onJoliboxHide",So=X(),Io=Gn(Ie),pD=pe(cD,{paramsSchema:E.tuple(E.function(),E.boolean().optional().default(!1)),implement:(e,t=!1)=>I(yc,null,function*(){Io(e).call(yc),jr(A.shouldInterupt)&&!A.shouldInterupt&&A.from&&xu("onRetentionResult",{shouldStay:t},A.from,!0),yield Oe("exitAppAsync")})}),hD=J(dD,{paramsSchema:E.tuple(E.function()),implement(e){let t=Io(e);Ve("onJoliboxEnterForeground",()=>{t.call(this),Jr.emit("visible",!0)})}}),mD=J(fD,{paramsSchema:E.tuple(E.function()),implement(e){let t=Io(e);Ve("onJoliboxEnterBackground",()=>{t.call(this),Jr.emit("visible",!1)})}}),vD=J(uD,{paramsSchema:E.tuple(E.function()),implement(e){let t=Io(e);ue.on("LifecycleEvent.onReady",r=>{t(r)})}});So.registerCommand("LifecycleSDK.exit",pD);So.registerCommand("LifecycleSDK.onReady",vD);So.registerCommand("LifecycleSDK.onJoliboxShow",hD);So.registerCommand("LifecycleSDK.onJoliboxHide",mD);P("lifeCycle.exit",{version:"1.0.0"});P("lifeCycle.onReady",{version:"1.0.0"});P("lifeCycle.onJoliboxShow",{version:"1.0.0"});P("lifeCycle.onJoliboxHide",{version:"1.0.0"})});function r0(e){let t={};if(!Ut(e))return t;for(let[r,n]of Object.entries(e)){let i=r.toLocaleLowerCase();n?typeof n=="object"?t[i]=Object.prototype.toString.call(n):t[i]=String(n):t[i]=""}return t}function n0(e="GET"){if(e==="")return"POST";let t=e.toUpperCase();return["GET","OPTIONS","HEAD","POST","PUT","DELETE","TRACE","CONNECT","PATCH"].includes(t)?t:"GET"}function i0(e,t=!1){if(e)return t||e>0&&e<=6e4?Math.ceil(e):6e4}function o0(e,t,r){if(["POST","PUT","PATCH"].includes(t)||!Ut(r))return e;let[n,i=""]=e.split("?"),o=new URLSearchParams(i);for(let[s,l]of Object.entries(r))l!=null&&o.append(s,String(l));let a=o.toString();return a?`${n}?${a}`:n}var a0=T(()=>{"use strict";D()});var gD,_D,bc,wc,s0,yD,bD,wD,l0=T(()=>{"use strict";Qt();Ba();lt();a0();D();rt();Z();gD=15,_D=zn("createRequestTaskSync","operateRequestTaskSync",{type:"public",baseUrl:A.baseApiHost}),bc=0,wc=[],s0=Gn(Ie),yD=(e,t)=>{let r=e.filter(t),n=e.filter(i=>!t(i));return e.length=0,e.push(...n),r},bD=e=>{let t=new At,r=()=>{};return J("request",{paramsSchema:E.tuple(E.object({url:E.string(),method:E.string(),headers:E.object(),data:E.object().optional(),query:E.object().optional(),dataType:E.string().default("json"),responseType:E.string().default("text"),enableCache:E.boolean().default(!1),appendHostCookie:E.boolean().default(!0),timeout:E.number().default(3e4),success:E.function(),fail:E.function()})),implement(i){let o=()=>I(this,null,function*(){var s,l;let a=s0(i.fail);try{if(bc+=1,t.state!=="pending")return;let{data:c,dataType:d,responseType:u,enableCache:h,appendHostCookie:p}=i,m=r0(i.headers),g=n0(i.method),_=i0(i.timeout),v=o0(i.url,g,c),y=s0(i.success),x=Object.assign({},i,{method:g,header:m,data:g==="GET"||g==="HEAD"?void 0:c,enableCache:h,query:(s=i.query)!=null?s:{},dataType:d,responseType:u,appendHostCookie:p});_&&(x.timeout=_);let R=_D(v,x);{let{response:C}=yield R,{code:S,data:w,message:B}=C;if(w&&typeof w=="object"&&"status"in w&&w.status!==200)throw St({code:w.status||-1,msg:`request:fail status ${w.status}`});t.resolve({code:S!=null?S:"SUCCESS",data:w,message:B!=null?B:"request:ok"}),y({code:"SUCCESS",message:"request:ok",data:w})}}catch(c){t.reject(c),a({code:"FAILURE",message:"httpRequst: failed"})}finally{bc-=1,(l=wc.shift())==null||l()}});return bc>=gD?(r=()=>{yD(wc,a=>a===o)},wc.push(o)):o(),t.promise}})(e),{abort(){t.reject(St({code:-1,msg:"request:fail abort"})),r()}}},wD=X();wD.registerCommand("HttpSDK.request",bD);P("request",{version:"1.0.0"})});function TD(e){let t=Object.prototype.toString.call(e).split(" ")[1].split("]")[0].toLocaleLowerCase();return ID.includes(t)?t:""}function RD(e,t){try{switch(t){case"string":return e;case"object":return JSON.parse(e);case"number":return parseFloat(e);case"boolean":return e==="true";default:return""}}catch(r){return""}}function kD(e,t){try{switch(t){case"string":case"number":case"boolean":return`${e}`;case"object":return JSON.stringify(e);default:return""}}catch(r){return""}}var To,ED,xD,AD,SD,H$,J$,ID,c0=T(()=>{"use strict";lt();Se();D();jt();Z();To=X(),ED=pe("getLocalStorage",{paramsSchema:E.tuple(E.string()),implement(e){return I(this,null,function*(){let{response:t}=yield we(`/api/games/user-storage/${A.mpId}`,{method:"GET",responseType:"json",appendHostCookie:!0,query:{key:e}}),{data:{code:r,message:n,data:i}}=yield t;if(r==="SUCCESS")return{code:r,message:n,data:i==null?void 0:i.value};try{let{data:{data:o,dataType:a}}=yield Oe("getLocalStorageAsync",{key:e}),s=RD(o,a);return{code:r,message:`${n}. fallback to native`,data:s}}catch(o){return{code:"INTERNAL_ERROR",message:"[Jolibox SDK] get local storage failed",data:null}}})}});To.registerCommand("StorageSDK.getItem",ED);P("storage.getItem",{version:"1.0.0",properties:{key:"1.0.0",value:"1.0.0"}});xD=pe("setStorage",{paramsSchema:E.tuple(E.string(),E.or(E.string(),E.boolean(),E.number())),implement(e,t){return I(this,null,function*(){let r=A.mpId,n=typeof t=="string"?t:String(t),{response:i}=yield we(`/api/games/user-storage/${r}`,{method:"POST",responseType:"json",appendHostCookie:!0,data:{key:e,value:n}}),{data:{code:o,message:a}}=i,s=TD(t),l=kD(t,s);return yield Oe("setLocalStorageAsync",{key:e,data:l,dataType:s}),o=="SUCCESS"?{code:o,message:a}:{code:o,message:`${a}. fallback to native`}})}});To.registerCommand("StorageSDK.setItem",xD);P("storage.setItem",{version:"1.0.0",properties:{key:"1.0.0",value:"1.0.0"}});AD=pe("removeStorage",{paramsSchema:E.tuple(E.string()),implement(e){return I(this,null,function*(){let t=A.mpId,{response:r}=yield we(`/api/games/user-storage/${t}/remove`,{method:"POST",responseType:"json",appendHostCookie:!0,data:{key:e}}),{data:{code:n,message:i}}=r;return yield Oe("removeLocalStorageAsync",{key:e}),n==="SUCCESS"?{code:n,message:i}:{code:n,message:"[Jolibox SDK] remove item succ"}})}});To.registerCommand("StorageSDK.removeItem",AD);P("storage.removeItem",{version:"1.0.0",properties:{key:"1.0.0"}});SD=pe("clearStorage",{implement(){return I(this,null,function*(){let e=A.mpId,{response:t}=yield we(`/api/games/user-storage/${e}/clear`,{method:"POST",appendHostCookie:!0});Oe("clearLocalStorageAsync");let{data:{code:r,message:n}}=t;return r==="SUCCESS"?{code:r,message:n}:{code:r,message:`${n}.fallback to native`}})}});To.registerCommand("StorageSDK.clear",SD);P("storage.clear",{version:"1.0.0"});H$=pe("getStorageInfo",{implement(){return I(this,null,function*(){let{data:e}=yield Oe("getStorageInfoAsync");return e})}});P("getStorageInfo",{version:"1.0.0",success:{keys:"1.0.0",currentSize:"1.0.0",limitSize:"1.0.0"}});J$=J("getStorageInfoSync",{implement(){return q("getStorageInfoSync")}}),ID=["string","number","boolean","object",""]});var OD,CD,PD,Ec,u0=T(()=>{"use strict";D();Se();lt();OD=J("showKeyboard",{paramsSchema:E.tuple(E.object({defaultValue:E.string().optional().default(""),multiple:E.boolean().optional().default(!1),maxLength:E.unknown().optional().default(1e5)})),implement(e){var n;let t=Math.floor((n=Number(e.maxLength))!=null?n:1e5),{defaultValue:r}=e;r&&t&&(r=r.slice(0,t)),q("showKeyboardSync",L(k({},e),{defaultValue:r,maxLength:t}))}});P("keyboard.showKeyboard",{version:"1.0.0",properties:{params:{defaultValue:"1.0.0",multiple:"1.0.0",confirmHold:"1.0.0",confirmType:"1.0.0",maxLength:"1.0.0"}},success:{errMsg:"1.0.0"}});CD=J("updateKeyboard",{paramsSchema:E.tuple(E.object({value:E.string()})),implement(e){q("updateKeyboardSync",e)}});P("keyboard.updateKeyboard",{version:"1.0.0",properties:{params:{value:"1.0.0"}}});PD=J("hideKeyboard",{implement(){q("hideKeyboardSync")}});P("keyboard.hideKeyboard",{version:"1.0.0"});Ec=X();Ec.registerCommand("KeyboardSDK.showKeyboard",OD);Ec.registerCommand("KeyboardSDK.updateKeyboard",CD);Ec.registerCommand("KeyboardSDK.hideKeyboard",PD)});var d0=f(Vt=>{"use strict";D();lt();It();var br=X(),ND=pe("levelFinished",{paramsSchema:E.tuple(E.string(),E.object({result:E.boolean(),duration:E.number()})),implement:(e,t)=>I(Vt,null,function*(){let{result:r,duration:n}=t,i=[];i.push(Ce.tracker("LevelFinished",{levelId:e,result:r,duration:n})),i.push(Ce.reporter({event:"COMPLETE_GAME_LEVEL"})),yield Promise.all(i)})}),DD=pe("taskFinished",{paramsSchema:E.tuple(E.string(),E.object({duration:E.number()})),implement:(e,t)=>I(Vt,null,function*(){let{duration:r}=t;return yield Ce.reportToNative({event:"TaskFinished",params:{duration:r,taskId:e}})})}),LD=pe("levelUpgrade",{paramsSchema:E.tuple(E.string(),E.string()),implement:(e,t)=>I(Vt,null,function*(){let r=[];r.push(Ce.reportToNative({event:"LevelUpgrade",params:{name:t,levelId:e}})),yield Promise.all(r)})}),qD=pe("onHistoryUserLevel",{paramsSchema:E.tuple(E.number()),implement:e=>I(Vt,null,function*(){return yield Ce.reportToNative({event:"HistoryUserLevel",params:{level:e}})})}),UD=pe("onHistoryUserScore",{paramsSchema:E.tuple(E.number()),implement:e=>I(Vt,null,function*(){return yield Ce.reportToNative({event:"HistoryUserScore",params:{score:e}})})}),MD=pe("taskEvent",{paramsSchema:E.tuple(E.string(),E.object({tools:E.array(E.object({id:E.string(),name:E.string(),count:E.number(),description:E.string().optional(),price:E.object({amount:E.number(),unit:E.string()}).optional()})).optional(),awards:E.array(E.object({id:E.string(),name:E.string()})).optional()})),implement:(e,t)=>I(Vt,null,function*(){var n,i;let r=[];r.push(Ce.reportToNative({event:"TaskEvent",params:k({taskId:e},t)})),(i=(n=t.tools)==null?void 0:n.length)!=null&&i&&(r.push(Ce.reporter({event:"USE_GAME_ITEM"})),r.push(Ce.reportToNative({event:"UseGameItem",params:k({taskId:e},t)}))),yield Promise.all(r)})});br.registerCommand("TaskTrackerSDK.levelFinished",ND);br.registerCommand("TaskTrackerSDK.taskFinished",DD);br.registerCommand("TaskTrackerSDK.levelUpgrade",LD);br.registerCommand("TaskTrackerSDK.historyUserLevel",qD);br.registerCommand("TaskTrackerSDK.historyUserScore",UD);br.registerCommand("TaskTrackerSDK.taskEvent",MD);P("TaskTrackerSDK.onLevelFinished",{version:"1.0.0",properties:{levelId:"1.0.0",params:{result:"1.0.0",duration:"1.0.0"}}});P("TaskTrackerSDK.onTaskFinished",{version:"1.0.0",properties:{taskId:"1.0.0",duration:"1.0.0"}});P("TaskTrackerSDK.onLevelUpgrade",{version:"1.0.0",properties:{levelId:"1.0.0",name:"1.0.0"}});P("TaskTrackerSDK.onHistoryUserLevel",{version:"1.0.0",properties:{level:"1.0.0"}});P("TaskTrackerSDK.onHistoryUserScore",{version:"1.0.0",properties:{score:"1.0.0"}});P("TaskTrackerSDK.onTaskEvent",{version:"1.0.0",properties:{taskId:"1.0.0",params:{tools:{id:"1.0.0",name:"1.0.0",count:"1.0.0",description:"1.0.0",price:{amount:"1.0.0",unit:"1.0.0"}},awards:{id:"1.0.0",name:"1.0.0"}}}})});var xc,jD,f0,Ac=T(()=>{"use strict";Z();Se();lt();D();Qt();P("login",{version:"1.0.0",properties:{force:"1.0.0"},success:{errMsg:"1.0.0",code:"1.0.0",token:"1.0.0",isLogin:"1.0.0"}});P("checkSession",{version:"1.0.0",success:{errMsg:"1.0.0"}});xc=pe("login",{implement(){return I(this,null,function*(){var a;let{data:{isLogin:e}}=yield Oe("checkLoginAsync");if(e)return{isLogin:!0,token:(a=A.hostUserInfo)==null?void 0:a.token};Ve("onLoginStateChange",({isLogin:s,token:l,uuid:c})=>{c==r&&i({isLogin:s,token:l})});let t=q("loginSync"),{data:{uuid:r}}=t;if(!r)throw St({code:-1,msg:"login failed"});let{promise:n,resolve:i}=new At,o=yield n;return A.onEnvConfigChanged({hostUserInfo:o}),ue.emit("onLoginComplete",o),o})}}),jD=pe("checkSession",{implement(){return I(this,null,function*(){let{data:{isLogin:e}}=yield Oe("checkLoginAsync");return{isLogin:e}})}}),f0=X();f0.registerCommand("API.login",xc);f0.registerCommand("API.checkSession",jD)});var Er,Ro,Gt,ko,An,wr,FD,ae,xr=T(()=>{"use strict";D();Er="UNLOCK_OPTIONS_CHANGED",Ro="INVOKE_PAYMENT",Gt="ON_PAYMENT_RESULT",ko="ON_USE_MODAL_EVENT",An="ON_USE_MODAL_RESULT",wr=new tt,FD=()=>({on:wr.on.bind(wr),off:wr.off.bind(wr),emit:wr.emit.bind(wr)}),ae=FD()});var p0=f(Oo=>{"use strict";xr();eo();jt();Z();Ac();ae.on(ko,(e,t)=>{e==="ADS-JOLI_COIN"&&console.log("use modal show by frequency");let r=Lb({data:{enableAutoDeduct:t.enableAutoDeduct,userJolicoin:t.userJoliCoin,joliCoinQuantity:t.joliCoinQuantity},buttons:{confirm:{text:t.confirmButtonText,onPress:()=>{ae.emit(An,{useModalResult:"CONFIRM"}),r.destroy()}},cancel:{text:t.cancelButtonText,onPress:({type:n})=>{ae.emit(An,{useModalResult:(n!=null?n:"")==="CANCEL"?"CANCEL":"FAILED"}),r.destroy()}}}})});ae.on(Ro,(e,t)=>I(Oo,null,function*(){try{e==="ADS-JOLI_COIN"&&console.log("show by frequency");let r=yield BD();if(!r){ae.emit(Gt,{paymentResult:"FAILED"});return}let n=qb({data:{userJolicoin:t.userJoliCoin,joliCoinQuantity:t.joliCoinQuantity,paymentChoices:r.paymentChoices,enableAutoDeduct:r.enableAutoDeduct},buttons:{confirm:{text:t.confirmButtonText,onPress:i=>I(Oo,null,function*(){var o;if(!((o=A.hostUserInfo)!=null&&o.isLogin)){let{data:a}=yield xc();if(!(a!=null&&a.isLogin)){console.log("login failed");return}}console.log("invokeNativePayment",i),ae.emit(Gt,{paymentResult:"SUCCESS"}),n.destroy()})},cancel:{text:t.cancelButtonText,onPress:({type:i})=>{ae.emit(Gt,{paymentResult:(i!=null?i:"")==="CANCEL"?"CANCEL":"FAILED"}),n.destroy()}}}})}catch(r){console.info("payment failed",r),ae.emit(Gt,{paymentResult:"FAILED"})}}));var BD=()=>I(Oo,null,function*(){var t;let{response:e}=yield we("/api/joli-coin/balance-detail",{method:"GET",appendHostCookie:!0,responseType:"json"});return(t=e.data)==null?void 0:t.data})});function We(e,t,r){return(t=VD(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VD(e){var t=GD(e,"string");return typeof t=="symbol"?t:t+""}function GD(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Co(e,t,r){return(t=KD(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KD(e){var t=WD(e,"string");return typeof t=="symbol"?t:t+""}function WD(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nL(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function iL(e){return typeof e=="string"}function oL(e){return typeof e=="undefined"}function aL(e){return oL(e)||e===null}function sL(e){return typeof e=="function"}function M0(e){let t=e,r=null,n=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r||(r=new t(...o)),r};return n.prototype=t.prototype,n}function Sn(e){return function(){var t,r;((r=(t=globalThis.VConsole)==null?void 0:t[e])!=null?r:globalThis.console[e])(...arguments)}}function Do(e,t){return t.map(r=>{if(r==="params"&&e[r]){let n=e[r];return Object.keys(n).reduce((i,o)=>(i[o]=String(n[o]),i),{})}return e[r]})}function pL(e){let t=e.location?Do(e.location,_0):null,r=e.target?Do(e.target,_0):null;return Do(eL(ZD({},e),{location:t,target:r}),dL)}function hL(e){let t=e.events.map(n=>pL(n)),r=Do(e.device,fL);return[e.protocolVersion,t,r,e.project]}function mL(){try{if(window.__joliboxLocalStorage__)return window.__joliboxLocalStorage__;let e=Object.getOwnPropertyDescriptor(window,"localStorage");if(e&&e.get){let n=e.get.call(window);return window.__joliboxLocalStorage__=n,n}if(e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(window),"localStorage"),e&&e.get)return e.get.call(window);let t=Window.prototype,r=Object.getOwnPropertyDescriptor(t,"localStorage");if(r&&r.get){let n=r.get.call(window);return window.__joliboxLocalStorage__=n,n}return localStorage}catch(e){return console.warn("Failed to get original localStorage, fallback to default implementation",e),localStorage}}function bL(e){return new Promise(t=>$0(e)(t))}function $0(e){return function(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=!1;return e(i=>{if(!n)return n=!0,t.call(r,i)},null)}}function wL(e,t){return(r=>{let n={onWillAddFirstListener(){r(i.fire,i)}},i=new On(n);return i.event})(function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e(i=>t(i)&&r.call(n,i),null)})}function xL(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++)AL(e[n],t[n])}function AL(e,t){if(iL(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(sL(t)){try{if(e instanceof t)return}catch(r){}if(!aL(e)&&e.constructor===t||t.length===1&&t.call(void 0,e)===!0)return;throw new Error("[Jolibox SDK]argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function Ic(e,t,r){return(t=SL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SL(e){var t=IL(e,"string");return typeof t=="symbol"?t:t+""}function IL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Po(e,t,r){return(t=TL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TL(e){var t=RL(e,"string");return typeof t=="symbol"?t:t+""}function RL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bt(e,t,r){return(t=kL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kL(e){var t=OL(e,"string");return typeof t=="symbol"?t:t+""}function OL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CL(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function PL(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}function ML(e,t){return ye(e,0)^45?(((t<<2^ye(e,0))<<2^ye(e,1))<<2^ye(e,2))<<2^ye(e,3):0}function V0(e){return e.trim()}function jL(e,t){return(e=t.exec(e))?e[0]:e}function F(e,t,r){return e.replace(t,r)}function Fc(e,t){return e.indexOf(t)}function ye(e,t){return e.charCodeAt(t)|0}function Cn(e,t,r){return e.slice(t,r)}function ct(e){return e.length}function Yc(e){return e.length}function No(e,t){return t.push(e),e}function FL(e,t){return e.map(t).join("")}function Wo(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:Ko,column:Sr,length:a,return:""}}function Tn(e,t){return UL(Wo("",null,null,"",null,null,0),e,{length:-e.length},t)}function BL(){return le}function $L(){return le=Le>0?ye(Ir,--Le):0,Sr--,le===10&&(Sr=1,Ko--),le}function Be(){return le=Le<G0?ye(Ir,Le++):0,Sr++,le===10&&(Sr=1,Ko++),le}function ut(){return ye(Ir,Le)}function Lo(){return Le}function Nn(e,t){return Cn(Ir,e,t)}function Pn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function K0(e){return Ko=Sr=1,G0=ct(Ir=e),Le=0,[]}function W0(e){return Ir="",e}function qo(e){return V0(Nn(Le-1,Bc(e===91?e+2:e===40?e+1:e)))}function HL(e){for(;(le=ut())&&le<33;)Be();return Pn(e)>2||Pn(le)>3?"":" "}function JL(e,t){for(;--t&&Be()&&!(le<48||le>102||le>57&&le<65||le>70&&le<97););return Nn(e,Lo()+(t<6&&ut()==32&&Be()==32))}function Bc(e){for(;Be();)switch(le){case e:return Le;case 34:case 39:e!==34&&e!==39&&Bc(le);break;case 40:e===41&&Bc(e);break;case 92:Be();break}return Le}function VL(e,t){for(;Be()&&e+le!==57&&!(e+le===84&&ut()===47););return"/*"+Nn(t,Le-1)+"*"+Go(e===47?e:Be())}function GL(e){for(;!Pn(ut());)Be();return Nn(e,Le)}function KL(e){return W0(Uo("",null,null,null,[""],e=K0(e),0,[0],e))}function Uo(e,t,r,n,i,o,a,s,l){for(var c=0,d=0,u=a,h=0,p=0,m=0,g=1,_=1,v=1,y=0,x="",R=i,C=o,S=n,w=x;_;)switch(m=y,y=Be()){case 40:if(m!=108&&ye(w,u-1)==58){Fc(w+=F(qo(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:w+=qo(y);break;case 9:case 10:case 13:case 32:w+=HL(m);break;case 92:w+=JL(Lo()-1,7);continue;case 47:switch(ut()){case 42:case 47:No(WL(VL(Be(),Lo()),t,r),l);break;default:w+="/"}break;case 123*g:s[c++]=ct(w)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:_=0;case 59+d:v==-1&&(w=F(w,/\f/g,"")),p>0&&ct(w)-u&&No(p>32?w0(w+";",n,r,u-1):w0(F(w," ","")+";",n,r,u-2),l);break;case 59:w+=";";default:if(No(S=b0(w,t,r,c,d,i,s,x,R=[],C=[],u),o),y===123)if(d===0)Uo(w,t,S,S,R,o,u,s,C);else switch(h===99&&ye(w,3)===110?100:h){case 100:case 108:case 109:case 115:Uo(e,S,S,n&&No(b0(e,S,S,0,0,i,s,x,i,R=[],u),C),i,C,u,s,n?R:C);break;default:Uo(w,S,S,S,[""],C,0,s,C)}}c=d=p=0,g=v=1,x=w="",u=a;break;case 58:u=1+ct(w),p=m;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&$L()==125)continue}switch(w+=Go(y),y*g){case 38:v=d>0?1:(w+="\f",-1);break;case 44:s[c++]=(ct(w)-1)*v,v=1;break;case 64:ut()===45&&(w+=qo(Be())),h=ut(),d=u=ct(x=w+=GL(Lo())),y++;break;case 45:m===45&&ct(w)==2&&(g=0)}}return o}function b0(e,t,r,n,i,o,a,s,l,c,d){for(var u=i-1,h=i===0?o:[""],p=Yc(h),m=0,g=0,_=0;m<n;++m)for(var v=0,y=Cn(e,u+1,u=qL(g=a[m])),x=e;v<p;++v)(x=V0(g>0?h[v]+" "+y:F(y,/&\f/g,h[v])))&&(l[_++]=x);return Wo(e,t,r,i===0?Wc:s,l,c,d)}function WL(e,t,r){return Wo(e,t,r,H0,Go(BL()),Cn(e,2,-2),0)}function w0(e,t,r,n){return Wo(e,t,r,zc,Cn(e,0,n),Cn(e,n+1,-1),n)}function Ar(e,t){for(var r="",n=Yc(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function zL(e,t,r,n){switch(e.type){case LL:if(e.children.length)break;case DL:case zc:return e.return=e.return||e.value;case H0:return"";case J0:return e.return=e.value+"{"+Ar(e.children,n)+"}";case Wc:e.value=e.props.join(",")}return ct(r=Ar(e.children,n))?e.return=e.value+"{"+r+"}":""}function YL(e){var t=Yc(e);return function(r,n,i,o){for(var a="",s=0;s<t;s++)a+=e[s](r,n,i,o)||"";return a}}function QL(e){return function(t){t.root||(t=t.return)&&e(t)}}function XL(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}function z0(e,t){switch(ML(e,t)){case 5103:return j+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return j+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return j+e+Fo+e+Ae+e+e;case 6828:case 4268:return j+e+Ae+e+e;case 6165:return j+e+Ae+"flex-"+e+e;case 5187:return j+e+F(e,/(\w+).+(:[^]+)/,j+"box-$1$2"+Ae+"flex-$1$2")+e;case 5443:return j+e+Ae+"flex-item-"+F(e,/flex-|-self/,"")+e;case 4675:return j+e+Ae+"flex-line-pack"+F(e,/align-content|flex-|-self/,"")+e;case 5548:return j+e+Ae+F(e,"shrink","negative")+e;case 5292:return j+e+Ae+F(e,"basis","preferred-size")+e;case 6060:return j+"box-"+F(e,"-grow","")+j+e+Ae+F(e,"grow","positive")+e;case 4554:return j+F(e,/([^-])(transform)/g,"$1"+j+"$2")+e;case 6187:return F(F(F(e,/(zoom-|grab)/,j+"$1"),/(image-set)/,j+"$1"),e,"")+e;case 5495:case 3959:return F(e,/(image-set\([^]*)/,j+"$1$`$1");case 4968:return F(F(e,/(.+:)(flex-)?(.*)/,j+"box-pack:$3"+Ae+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+j+e+e;case 4095:case 3583:case 4068:case 2532:return F(e,/(.+)-inline(.+)/,j+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ct(e)-1-t>6)switch(ye(e,t+1)){case 109:if(ye(e,t+4)!==45)break;case 102:return F(e,/(.+:)(.+)-([^]+)/,"$1"+j+"$2-$3$1"+Fo+(ye(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Fc(e,"stretch")?z0(F(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ye(e,t+1)!==115)break;case 6444:switch(ye(e,ct(e)-3-(~Fc(e,"!important")&&10))){case 107:return F(e,":",":"+j)+e;case 101:return F(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+j+(ye(e,14)===45?"inline-":"")+"box$3$1"+j+"$2$3$1"+Ae+"$2box$3")+e}break;case 5936:switch(ye(e,t+11)){case 114:return j+e+Ae+F(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return j+e+Ae+F(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return j+e+Ae+F(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return j+e+Ae+e+e}return e}function sq(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function Bo(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return Dt={name:i.name,styles:i.styles,next:Dt},i.name;var o=r;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)Dt={name:a.name,styles:a.styles,next:Dt},a=a.next;var s=o.styles+";";return s}return dq(e,t,r)}}var l=r;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function dq(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=Bo(e,t,r[i])+";";else for(var o in r){var a=r[o];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?n+=o+"{"+t[s]+"}":x0(s)&&(n+=Tc(o)+":"+A0(o,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)x0(a[l])&&(n+=Tc(o)+":"+A0(o,a[l])+";");else{var c=Bo(e,t,a);switch(o){case"animation":case"animationName":{n+=Tc(o)+":"+c+";";break}default:n+=o+"{"+c+"}"}}}return n}function Rc(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";Dt=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,i+=Bo(r,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=Bo(r,t,e[s]),n){var l=o;i+=l[s]}S0.lastIndex=0;for(var c="",d;(d=S0.exec(i))!==null;)c+="-"+d[1];var u=sq(i)+c;return{name:u,styles:i,next:Dt}}function Q0(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}function I0(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function T0(e,t,r){var n=[],i=Q0(e,n,r);return n.length<2?r:i+t(n)}function Z0(e,t){se.__h&&se.__h(De,e,$c||t),$c=0;var r=De.__H||(De.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function gq(e,t){var r=Z0($o++,3);!se.__s&&ew(r.__H,t)&&(r.__=e,r.u=t,De.__H.__h.push(r))}function _q(e){return $c=5,Qc(function(){return{current:e}},[])}function Qc(e,t){var r=Z0($o++,7);return ew(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function yq(){for(var e;e=X0.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Mo),e.__H.__h.forEach(Hc),e.__H.__h=[]}catch(t){e.__H.__h=[],se.__e(t,e.__v)}}function bq(e){var t,r=function(){clearTimeout(n),L0&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);L0&&(t=requestAnimationFrame(r))}function Mo(e){var t=De,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),De=t}function Hc(e){var t=De;e.__c=e.__(),De=t}function ew(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function zo(){if(Lt>1)Lt--;else{for(var e,t=!1;Rn!==void 0;){var r=Rn;for(Rn=void 0,Jc++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&rw(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Jc=0,Lt--,t)throw e}}function ze(e){if(Lt>0)return e();Lt++;try{return e()}finally{zo()}}function tw(e){if(H!==void 0){var t=e.n;if(t===void 0||t.t!==H)return t={i:0,S:e,p:H.s,n:void 0,t:H,e:void 0,x:void 0,r:t},H.s!==void 0&&(H.s.n=t),H.s=t,e.n=t,32&H.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=H.s,t.n=void 0,H.s.n=t,H.s=t),t}}function be(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}function _e(e){return new be(e)}function rw(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function nw(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function iw(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Tr(e){be.call(this,void 0),this.x=e,this.s=void 0,this.g=Ho-1,this.f=4}function kn(e){return new Tr(e)}function ow(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Lt++;var r=H;H=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Xc(e),n}finally{H=r,zo()}}}function Xc(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ow(e)}function Eq(e){if(H!==this)throw new Error("Out-of-order effect");iw(this),H=e,this.f&=-2,8&this.f&&Xc(this),zo()}function Ln(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function Rr(e){var t=new Ln(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}function kr(e,t){O[e]=t.bind(null,O[e]||function(){})}function Jo(e){Oc&&Oc(),Oc=e&&e.S()}function lw(e){var t=this,r=e.data,n=cw(r);n.value=r;var i=Qc(function(){for(var s=t,l=t.__v;l=l.__;)if(l.__c){l.__c.__$f|=4;break}var c=kn(function(){var p=n.value.value;return p===0?0:p===!0?"":p||""}),d=kn(function(){return!Array.isArray(c.value)&&!Va(c.value)}),u=Rr(function(){if(this.N=uw,d.value){var p=c.value;s.__v&&s.__v.__e&&s.__v.__e.nodeType===3&&(s.__v.__e.data=p)}}),h=t.__$u.d;return t.__$u.d=function(){u(),h.call(this)},[d,c]},[]),o=i[0],a=i[1];return o.value?a.peek():a.value}function xq(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,o=_e(r);return{o:function(a,s){o.value=a,n=s},d:Rr(function(){this.N=uw;var a=o.value.value;n[t]!==a&&(n[t]=a,i?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}function cw(e){return Qc(function(){return _e(e)},[])}function Iq(){ze(function(){for(var e;e=aw.shift();)Zc.call(e)})}function Tq(){aw.push(this)===1&&(O.requestAnimationFrame||Aq)(Iq)}function Rq(){ze(function(){for(var e;e=sw.shift();)Zc.call(e)})}function uw(){sw.push(this)===1&&(O.requestAnimationFrame||Sq)(Rq)}function kq(e){var t=_q(e);t.current=e,gq(function(){return Rr(function(){return this.N=Tq,t.current()})},[])}function Oq(e,t){let r=Bs(e);Fs(()=>{r.current=e},[e]),js(()=>{if(t===null)return;let n=setInterval(()=>{r.current()},t);return()=>{clearInterval(n)}},[t])}function he(e,t,r,n,i,o){t||(t={});var a,s,l=t;if("ref"in l)for(s in l={},t)s=="ref"?a=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Cq,__i:-1,__u:0,__source:i,__self:o};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return O.vnode&&O.vnode(c),c}function wt(e,t,r){return(t=Hq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hq(e){var t=Jq(e,"string");return typeof t=="symbol"?t:t+""}function Jq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kt(e,t,r){return(t=Vq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vq(e){var t=Gq(e,"string");return typeof t=="symbol"?t:t+""}function Gq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var h0,$D,HD,JD,Cc,Pc,q0,zD,YD,m0,QD,XD,v0,ZD,eL,tL,U0,rL,lL,cL,g0,uL,j0,F0,B0,_0,dL,fL,Nc,W,vL,gL,In,On,_L,Lc,yL,Sc,EL,qc,y0,Uc,Mc,jc,NL,Ae,Fo,j,H0,Wc,zc,DL,J0,LL,qL,Go,UL,Ko,Sr,G0,Le,le,Ir,ZL,eq,tq,E0,rq,nq,iq,oq,aq,lq,cq,uq,Y0,x0,Tc,A0,S0,Dt,fq,pq,hq,mq,vq,Dn,$o,De,kc,R0,$c,X0,se,k0,O0,C0,P0,N0,D0,L0,wq,H,Rn,Lt,Jc,Ho,Zc,Oc,aw,sw,Aq,Sq,Ne,Cq,Pq,Et,Vc,Gc,jo,Nq,Dq,Lq,qq,Uq,Mq,jq,Fq,Bq,$q,Kc,Vo,S4,dw=T(()=>{"use strict";er();Ks();h0=Object.getOwnPropertySymbols,$D=Object.prototype.hasOwnProperty,HD=Object.prototype.propertyIsEnumerable,JD=(e,t)=>{var r={};for(var n in e)$D.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&h0)for(var n of h0(e))t.indexOf(n)<0&&HD.call(e,n)&&(r[n]=e[n]);return r};Cc=class{constructor(t){We(this,"context",void 0),We(this,"continueCallback",void 0),We(this,"isBeforeAdCalled",!1),We(this,"isBeforeRewardCalled",!1),We(this,"isAdDismissedCalled",!1),We(this,"isAdViewedCalled",!1),We(this,"isAfterAdCalled",!1),We(this,"currentProvider",void 0),We(this,"currentClientParams",void 0),We(this,"adsHasResponse",!1),We(this,"videoChecker",window.document.createElement("video")),We(this,"wrapShowAdFn",r=>()=>{this.adsHasResponse=!0;let n=!1;this.videoChecker.play().catch(()=>{n=!1}),n=!this.videoChecker.paused,this.videoChecker.pause(),this.context.track("CallShowAdFn",Object.assign({},{userEvent:n},this.paramsToTrack)),r()}),this.context=t}get paramsToTrack(){var t,r,n,i,o,a;return{provider:(r=(t=this.currentProvider)==null?void 0:t.name)!=null?r:null,type:(n=this.currentClientParams)==null?void 0:n.type,name:((i=this.currentClientParams)==null?void 0:i.type)==="preroll"?null:(a=(o=this.currentClientParams)==null?void 0:o.name)!=null?a:""}}wrapBeforeAd(t){return()=>{this.adsHasResponse=!0,this.context.track("CallBeforeAd",this.paramsToTrack),this.isBeforeAdCalled||(this.isBeforeAdCalled=!0,t==null||t())}}wrapBeforeReward(t){return r=>{this.adsHasResponse=!0,this.isBeforeRewardCalled?this.wrapShowAdFn(r)():(this.isBeforeRewardCalled=!0,t==null||t(this.wrapShowAdFn(r)))}}wrapAdDismissed(t){return()=>{this.adsHasResponse=!0,this.isAdDismissedCalled||(this.isAdDismissedCalled=!0,t==null||t())}}wrapAdViewed(t){return()=>{this.adsHasResponse=!0,this.isAdViewedCalled||(this.isAdViewedCalled=!0,t==null||t())}}wrapAfterAd(t){return()=>{this.adsHasResponse=!0,this.context.track("CallAfterAd",this.paramsToTrack),this.isAfterAdCalled||(this.isAfterAdCalled=!0,t==null||t())}}wrapAdBreakDone(t){return r=>{var n,i,o,a,s;switch(this.adsHasResponse=!0,this.context.track("CallAdBreakDone",{provider:(i=(n=this.currentProvider)==null?void 0:n.name)!=null?i:null,breakType:r.breakType,breakName:(o=r.breakName)!=null?o:"",breakFormat:r.breakFormat,breakStatus:r.breakStatus}),r.breakStatus){case"viewed":case"ignored":case"dismissed":case"error":{t==null||t(r),(a=this.continueCallback)==null||a.call(this,[!1,r]);break}default:{(s=this.continueCallback)==null||s.call(this,[!0,r]);break}}}}callAdBreakAndContinue(t,r,n){return I(this,null,function*(){return this.currentProvider=t,this.currentClientParams=r,this.adsHasResponse=!1,new Promise(i=>{this.continueCallback=i;let o;switch(r.type){case"preroll":{o={type:r.type,adBreakDone:this.wrapAdBreakDone(r.adBreakDone)};break}case"reward":{o={name:r.name,type:r.type,beforeAd:this.wrapBeforeAd(r.beforeAd),beforeReward:this.wrapBeforeReward(r.beforeReward),adDismissed:this.wrapAdDismissed(r.adDismissed),adViewed:this.wrapAdViewed(r.adViewed),afterAd:this.wrapAfterAd(r.afterAd),adBreakDone:this.wrapAdBreakDone(r.adBreakDone)};break}default:{o={name:r.name,type:r.type,beforeAd:this.wrapBeforeAd(r.beforeAd),afterAd:this.wrapAfterAd(r.afterAd),adBreakDone:this.wrapAdBreakDone(r.adBreakDone)};break}}window.setTimeout(()=>{var a,s,l,c;this.adsHasResponse||(this.context.track("CallAdBreakTimeout",{type:r.type,provider:(s=(a=this.currentProvider)==null?void 0:a.name)!=null?s:null}),(c=this.continueCallback)==null||c.call(this,[!0,{breakType:r.type,breakName:r.type==="preroll"?"":(l=r.name)!=null?l:"",breakFormat:r.type==="reward"?"reward":"interstitial",breakStatus:"timeout"}]))},5e3),this.context.track("CallAdBreak",this.paramsToTrack),t.adBreak(o,n),window.JoliTesterBridge&&console.log("joli-fullscreen-ad-show")})})}};Pc=class{constructor(t){Co(this,"context",void 0),Co(this,"adBreakIsShowing",!1),Co(this,"reportPageJumpOut",()=>{this.context.track("AdBreakJumpOut",{context:"AdsActionDetection"})}),Co(this,"reportPageHide",()=>{this.context.track("AdBreakHide",{context:"AdsActionDetection"})}),this.context=t,window.addEventListener("visibilitychange",()=>{document.hidden&&this.adBreakIsShowing&&this.reportPageHide()}),window.addEventListener("beforeunload",r=>{this.adBreakIsShowing&&this.reportPageJumpOut()})}},q0=Object.defineProperty,zD=Object.defineProperties,YD=Object.getOwnPropertyDescriptors,m0=Object.getOwnPropertySymbols,QD=Object.prototype.hasOwnProperty,XD=Object.prototype.propertyIsEnumerable,v0=(e,t,r)=>t in e?q0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ZD=(e,t)=>{for(var r in t||(t={}))QD.call(t,r)&&v0(e,r,t[r]);if(m0)for(var r of m0(t))XD.call(t,r)&&v0(e,r,t[r]);return e},eL=(e,t)=>zD(e,YD(t)),tL=(e,t)=>{for(var r in t)q0(e,r,{get:t[r],enumerable:!0})},U0=(e,t,r,n)=>{for(var i=t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=a(i)||i);return i},rL=(e,t,r)=>new Promise((n,i)=>{var o=l=>{try{s(r.next(l))}catch(c){i(c)}},a=l=>{try{s(r.throw(l))}catch(c){i(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,a);s((r=r.apply(e,t)).next())});if(typeof window!="undefined"&&!window.AbortController){let e=function(){this.signal=new t};e.prototype.abort=function(){this.signal._aborted=!0,typeof this.signal.onabort=="function"&&this.signal.onabort(new Event("abort"));let r=new Event("abort");this.signal.dispatchEvent(r)};let t=function(){this._aborted=!1,this.aborted=!1,this.onabort=null,this._eventListeners={}};Object.defineProperty(t.prototype,"aborted",{get:function(){return this._aborted}}),t.prototype.addEventListener=function(r,n){this._eventListeners[r]||(this._eventListeners[r]=[]),this._eventListeners[r].push(n)},t.prototype.removeEventListener=function(r,n){if(!this._eventListeners[r])return;let i=this._eventListeners[r].indexOf(n);i!==-1&&this._eventListeners[r].splice(i,1)},t.prototype.dispatchEvent=function(r){if(this._eventListeners[r.type])for(let n of this._eventListeners[r.type])n.call(this,r)},window.AbortController=e,window.AbortSignal=t}lL=(e=>(e[e.DEVELOPER_FILE_NOT_FOUND=0]="DEVELOPER_FILE_NOT_FOUND",e[e.INTERNAL_IOS_CAN_NOT_FOUND_PKG=1]="INTERNAL_IOS_CAN_NOT_FOUND_PKG",e[e.USER_IOS_LOAD_TIMEOUT=2]="USER_IOS_LOAD_TIMEOUT",e[e.INTERNAL_IOS_PKG_LOAD_ERROR=3]="INTERNAL_IOS_PKG_LOAD_ERROR",e[e.INTERNAL_IOS_PKG_PARSE_FAIL=4]="INTERNAL_IOS_PKG_PARSE_FAIL",e[e.USER_IOS_GET_EMPTY_DATA=5]="USER_IOS_GET_EMPTY_DATA",e[e.USER_ANDROID_GET_PKG_FAIL=6]="USER_ANDROID_GET_PKG_FAIL",e[e.DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE=7]="DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE",e))(lL||{});cL={log:Sn("log"),warn:Sn("warn"),info:Sn("info"),error:Sn("error"),debug:Sn("debug")};Object.assign(globalThis,{logger:cL});g0=Symbol.for("Jolibox.canIUseMap"),uL={};globalThis[g0]||(globalThis[g0]=uL);j0=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(j0||{}),F0=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(F0||{}),B0=(e=>(e[e.App=0]="App",e[e.H5=1]="H5",e[e.Weapp=2]="Weapp",e[e.Alipay=3]="Alipay",e[e.Gcash=4]="Gcash",e[e.Dana=5]="Dana",e[e.Umma=6]="Umma",e[e.WebSDK=1e3]="WebSDK",e[e.AppSDK=1001]="AppSDK",e[e.Other=9999]="Other",e))(B0||{}),_0=["name","params"],dL=["name","type","location","target","extra","timestamp","userId"],fL=["platform","os","appVersion","appId","model","brand","uuid","jsSdkVersion","extra"];mL();navigator.userAgent.includes("iPhone")||navigator.userAgent.includes("iPod")||navigator.userAgent.includes("iPad")||navigator.userAgent.includes("iPhone OS"),navigator.userAgent.includes("Android"),navigator.userAgent.includes("Mac"),navigator.userAgent.includes("FB_IAB"),!navigator.userAgent.includes("iPhone")&&navigator.userAgent.includes("Android");Nc=class Dc{constructor(t){this.element=t,this.next=Dc.Undefined,this.prev=Dc.Undefined}};Nc.Undefined=new Nc(void 0);W=Nc,vL=class{constructor(){this._first=W.Undefined,this._last=W.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===W.Undefined}clear(){let e=this._first;for(;e!==W.Undefined;){let t=e.next;e.prev=W.Undefined,e.next=W.Undefined,e=t}this._first=W.Undefined,this._last=W.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new W(e);if(this._first===W.Undefined)this._first=r,this._last=r;else if(t){let i=this._last;this._last=r,r.prev=i,i.next=r}else{let i=this._first;this._first=r,r.next=i,i.prev=r}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(r))}}shift(){if(this._first!==W.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==W.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==W.Undefined&&e.next!==W.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===W.Undefined&&e.next===W.Undefined?(this._first=W.Undefined,this._last=W.Undefined):e.next===W.Undefined?(this._last=this._last.prev,this._last.next=W.Undefined):e.prev===W.Undefined&&(this._first=this._first.next,this._first.prev=W.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==W.Undefined;)yield e.element,e=e.next}},gL=0,In=class{constructor(e){this.value=e,this.id=gL++}},On=class{constructor(e){this.options=e,this._size=0}dispose(e){var t,r;this._disposed||(this._disposed=!0,this._listeners&&(e?(this._listeners instanceof In&&(this._listeners=[this._listeners]),this._listeners=this._listeners.filter(n=>(n==null?void 0:n.value)===e)):(this._listeners=void 0,this._size=0)),(r=(t=this.options)==null?void 0:t.onDidRemoveLastListener)==null||r.call(t))}get event(){return this._event!=null||(this._event=(e,t)=>{var r,n,i,o,a,s;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};t&&(e=e.bind(t));let l=new In(e);return this._listeners?this._listeners instanceof In?this._listeners=[this._listeners,l]:this._listeners.push(l):((n=(r=this.options)==null?void 0:r.onWillAddFirstListener)==null||n.call(r,this),this._listeners=l,(o=(i=this.options)==null?void 0:i.onDidFirstListener)==null||o.call(i,this)),(s=(a=this.options)==null?void 0:a.onDidAddListener)==null||s.call(a,this),this._size++,()=>{var c,d,u,h;if(!this._disposed){if(this._listeners instanceof In)this._listeners.id===l.id&&(this._listeners=void 0,this._size=0,(d=(c=this.options)==null?void 0:c.onDidRemoveLastListener)==null||d.call(c));else if(this._listeners){let p=this._listeners.indexOf(l);p>=0&&(this._listeners.splice(p,1),this._size--,this._size===0&&((h=(u=this.options)==null?void 0:u.onDidRemoveLastListener)==null||h.call(u)))}}}}),this._event}_deliver(e,t){var r;if(!e)return;let n=((r=this.options)==null?void 0:r.onListenerError)||Error.constructor;if(!n){e.value(t);return}try{e.value(t)}catch(i){n(i)}}fire(e){this._listeners&&(this._listeners instanceof In?this._deliver(this._listeners,e):this._listeners.forEach(t=>this._deliver(t,e)))}hasListeners(){return this._size>0}},_L=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;var n;let i=(n=this.listeners.get(e))!=null?n:new On,o=l=>t(...l.args),a=i.event(o);this.listerHandlerMap.set(t,{handler:o,dispose:a}),this.listeners.set(e,i);let s=this.cachedEventQueue.get(e);if(s&&r)for(let l of s)t(...l.args)}flushCachedEvent(e){e?this.cachedEventQueue.delete(e):this.cachedEventQueue.clear()}off(e,t){let r=this.listerHandlerMap.get(t);r&&(r.dispose(),this.listerHandlerMap.delete(t))}emit(e){let t=this.listeners.get(e),r=this.cachedEventQueue.get(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];r||(r=new vL,this.cachedEventQueue.set(e,r)),r.push({args:i}),t&&t.fire({event:e,args:i})}once(e,t){var r=this;let n=function(){t(...arguments),r.off(e,n)};this.on(e,n,!1)}},Lc={};tL(Lc,{None:()=>yL,filter:()=>wL,once:()=>$0,toPromise:()=>bL});yL=()=>(console.log("[Jolibox SDK] None Event"),()=>{console.log("[Jolibox SDK] None Event dispose")});Sc=Symbol.for("Jolibox.hostEmitter"),EL=()=>{let e=new _L;return globalThis[Sc]||(globalThis[Sc]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e),once:e.once.bind(e)}),globalThis[Sc]};EL();qc=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new On,this.onDidRegisterCommand=this._onDidRegisterCommand.event,console.log("[Jolibox SDK] command registry")}registerCommand(e){if(!e)throw new Error("invalid command");if(e.metadata&&Array.isArray(e.metadata.args)){let r=[];for(let i of e.metadata.args)r.push(i.constraint);let n=e.handler;e.handler=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return xL(o,r),n(...o)}}let{id:t}=e;this._commands.get(t)&&console.info(`[Jolibox SDK] duplicated command is registered ${t}`),this._commands.set(t,e),this._onDidRegisterCommand.fire(t)}getCommand(e){return this._commands.get(e)}getCommands(){let e=new Map;for(let t of this._commands.keys()){let r=this.getCommand(t);r&&e.set(t,r)}return e}};qc=U0([M0],qc);y0=class{constructor(){this._onWillExecuteCommand=new On,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new On,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new qc,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=nL(3e4)),this._starActivation}executeCommand(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return rL(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,r):(yield Promise.all([Promise.race([this._activateStar(),Lc.toPromise(Lc.filter(this.registry.onDidRegisterCommand,i=>i===e))])]),this._tryExecuteCommand(e,r))})}executeCommandThowErr(e){if(!this.registry.getCommand(e))throw new Error(`command '${e}' not found`);let t=this.registry.getCommand(e);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];this._onWillExecuteCommand.fire({commandId:e,args:n});let o=this.invokeFunction(t.handler,...n);return this._onDidExecuteCommand.fire({commandId:e,args:n}),o}_tryExecuteCommand(e,t){let r=this.registry.getCommand(e);if(!r)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});let n=this.invokeFunction(r.handler,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}invokeFunction(e){try{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e(...r)}finally{}}};y0=U0([M0],y0);Uc=class{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GAME";Ic(this,"context",void 0),Ic(this,"placement","GAME"),Ic(this,"contextInfo",void 0),this.context=t,this.placement=r,this.contextInfo=this.context.getContextInfo()}getLocation(){let t=new URLSearchParams(window.location.search),r={};return t.forEach((n,i)=>{r[i]=n}),{name:this.placement==="GAME"?"GamePage":"DramaPage",params:r}}getDevice(){var t,r,n,i;return{platform:(t=this.contextInfo.platform)!=null?t:B0.WebSDK,os:this.contextInfo.osType+"_"+this.contextInfo.runtimeType,appVersion:"1.0.0",appId:(r=this.contextInfo.hostAppId)!=null?r:"1",model:(n=this.contextInfo.deviceModel)!=null?n:"UnknownModel",brand:(i=this.contextInfo.deviceBrand)!=null?i:"UnknownBrand",uuid:this.contextInfo.deviceId,jsSdkVersion:"1.0.0",extra:{}}}serialize(t,r){var n;let i={protocolVersion:"1.0.0",events:[{name:t,type:j0.System,location:this.getLocation(),target:null,extra:r,timestamp:Date.now(),userId:(n=this.contextInfo.userId)!=null?n:null}],device:this.getDevice(),project:F0.WebSDK};return hL(i)}};Mc=class{constructor(t){Po(this,"configs",null),Po(this,"firstRun",!0),Po(this,"context",void 0),Po(this,"contextInfo",void 0),this.context=t,this.contextInfo=this.context.getContextInfo(),this.init()}init(){return I(this,null,function*(){try{this.configs=yield this.context.httpClient.get("/api/fe-configs/js-sdk/ads-channel-config",{})}catch(t){}})}shouldBypassCallingInterstitial(){var t,r;let n;if(!this.configs)this.init(),n=!this.firstRun;else{let i=(t=this.contextInfo.channel)!=null?t:"",o=this.configs[i],a=(r=o==null?void 0:o.interstitialRate)!=null?r:1;n=Math.random()<a}return this.firstRun=!1,n}};jc=class{constructor(t,r){bt(this,"name","ADSENSE"),bt(this,"context",void 0),bt(this,"contextInfo",void 0),bt(this,"configured",!1),bt(this,"initParams",void 0),bt(this,"push",function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};window.adsbygoogle.push(n)}),bt(this,"adConfig",n=>{let i=n,{onReady:o}=i,a=JD(i,["onReady"]);this.context.track("CallAdConfig",a),this.configured?console.warn("Ad config already set, skipping"):(this.configured=!0,this.push(n))}),bt(this,"adBreak",n=>{if(!this.contextInfo.objectId){console.warn("Game ID is not set, skip calling adBreak");return}this.push(n)}),bt(this,"adUnit",n=>I(this,null,function*(){var i,o,a,s;if(this.context.track("CallAdUnit",{adFormat:(o=(i=n.adFormat)==null?void 0:i.toString())!=null?o:null,fullWidthResponsive:(a=n.fullWidthResponsive)!=null?a:null}),document.querySelector("#jolibox-ads")){console.warn("Ad unit already set, skipping");return}let{el:l,slot:c,adFormat:d,fullWidthResponsive:u,style:h}=n,p;if(!l)throw new Error("targeting element is required");if(typeof l=="string"?p=document.querySelector(l):p=l,!p)throw new Error("targeting element not found");let m=c;if(m||(m=this.initParams.unitId),!m)throw new Error("slot is required");let g=typeof d=="object"&&Array.isArray(d)?d.join(", "):d,_=document.createElement("ins");if(_.className="adsbygoogle",_.id="jolibox-ads",_.style.display="block",_.setAttribute("data-ad-client",this.initParams.clientId),_.setAttribute("data-ad-slot",m),g&&_.setAttribute("data-ad-format",g),u&&_.setAttribute("data-full-width-responsive",u),h&&_.setAttribute("style",h),(s=this.contextInfo.testAdsMode)!=null?s:!1){let v=document.createElement("div");v.style.position="absolute",v.style.top="0",v.style.left="0",v.style.width="100%",v.style.height="100%",v.style.display="flex",v.style.justifyContent="center",v.style.alignItems="center",v.style.backgroundColor="rgba(0, 0, 0, 0.5)",v.style.color="white",v.innerHTML="Test Ad",_.style.position="relative",p.appendChild(_),_.appendChild(v)}else p.appendChild(_),new MutationObserver(v=>{v.forEach(y=>{if(y.type==="attributes"&&y.attributeName==="data-ad-status"){let x=_.getAttribute("data-ad-status");this.context.track("AdSenseUnitStatusChanged",{status:x!=null?x:"null"})}})}).observe(_,{attributes:!0,attributeFilter:["data-ad-status"]}),this.push({})})),this.context=t,this.contextInfo=this.context.getContextInfo(),this.initParams=r,window.adsbygoogle=window.adsbygoogle||[]}init(){return I(this,null,function*(){var t;if(this.context.track("CallAdsInit",{provider:this.name}),typeof window=="undefined")return;let r="google-adsense",n=(t=this.contextInfo.testAdsMode)!=null?t:!1;if(!document.getElementById(r)&&this.initParams.clientId){let i=document.createElement("script");i.id=r,i.async=!0,i.crossOrigin="anonymous",i.src=`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${this.initParams.clientId}`,n&&i.setAttribute("data-adbreak-test","on"),this.initParams.channelId&&i.setAttribute("data-ad-channel",this.initParams.channelId),document.head.appendChild(i),this.context.track("LoadAdsenseCompleted",null)}})}};NL=function(){function e(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(PL(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var i=CL(n);try{i.insertRule(r,i.cssRules.length)}catch(o){}}else n.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var n;return(n=r.parentNode)==null?void 0:n.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Ae="-ms-",Fo="-moz-",j="-webkit-",H0="comm",Wc="rule",zc="decl",DL="@import",J0="@keyframes",LL="@layer",qL=Math.abs,Go=String.fromCharCode,UL=Object.assign;Ko=1,Sr=1,G0=0,Le=0,le=0,Ir="";ZL=function(e,t,r){for(var n=0,i=0;n=i,i=ut(),n===38&&i===12&&(t[r]=1),!Pn(i);)Be();return Nn(e,Le)},eq=function(e,t){var r=-1,n=44;do switch(Pn(n)){case 0:n===38&&ut()===12&&(t[r]=1),e[r]+=ZL(Le-1,t,r);break;case 2:e[r]+=qo(n);break;case 4:if(n===44){e[++r]=ut()===58?"&\f":"",t[r]=e[r].length;break}default:e[r]+=Go(n)}while(n=Be());return e},tq=function(e,t){return W0(eq(K0(e),t))},E0=new WeakMap,rq=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!E0.get(r))&&!n){E0.set(e,!0);for(var i=[],o=tq(t,i),a=r.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},nq=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};iq=function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case zc:e.return=z0(e.value,e.length);break;case J0:return Ar([Tn(e,{value:F(e.value,"@","@"+j)})],n);case Wc:if(e.length)return FL(e.props,function(i){switch(jL(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ar([Tn(e,{props:[F(i,/:(read-\w+)/,":"+Fo+"$1")]})],n);case"::placeholder":return Ar([Tn(e,{props:[F(i,/:(plac\w+)/,":"+j+"input-$1")]}),Tn(e,{props:[F(i,/:(plac\w+)/,":"+Fo+"$1")]}),Tn(e,{props:[F(i,/:(plac\w+)/,Ae+"input-$1")]})],n)}return""})}},oq=[iq],aq=function(e){var t=e.key;if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var g=m.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var n=e.stylisPlugins||oq,i={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(m){for(var g=m.getAttribute("data-emotion").split(" "),_=1;_<g.length;_++)i[g[_]]=!0;a.push(m)});var s,l=[rq,nq];{var c,d=[zL,QL(function(m){c.insert(m)})],u=YL(l.concat(n,d)),h=function(m){return Ar(KL(m),u)};s=function(m,g,_,v){c=_,h(m?m+"{"+g.styles+"}":g.styles),v&&(p.inserted[g.name]=!0)}}var p={key:t,sheet:new NL({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(a),p};lq={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},cq=/[A-Z]|^ms/g,uq=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Y0=function(e){return e.charCodeAt(1)===45},x0=function(e){return e!=null&&typeof e!="boolean"},Tc=XL(function(e){return Y0(e)?e:e.replace(cq,"-$&").toLowerCase()}),A0=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(uq,function(r,n,i){return Dt={name:n,styles:i,next:Dt},n})}return lq[e]!==1&&!Y0(e)&&typeof t=="number"&&t!==0?t+"px":t};S0=/label:\s*([^\s;{]+)\s*(;|$)/g;fq=function(e,t,r){var n=e.key+"-"+t.name;e.registered[n]===void 0&&(e.registered[n]=t.styles)},pq=function(e,t,r){fq(e,t);var n=e.key+"-"+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?"."+n:"",i,e.sheet,!0),i=i.next;while(i!==void 0)}};hq=function(e){var t=aq(e);t.sheet.speedy=function(a){this.isSpeedy=a},t.compat=!0;var r=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Rc(s,t.registered,void 0);return pq(t,c),t.key+"-"+c.name},n=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Rc(s,t.registered),d="animation-"+c.name;return I0(t,{name:c.name,styles:"@keyframes "+d+"{"+c.styles+"}"}),d},i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Rc(s,t.registered);I0(t,c)},o=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return T0(t.registered,r,mq(s))};return{css:r,cx:o,injectGlobal:i,keyframes:n,hydrate:function(a){a.forEach(function(s){t.inserted[s]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:Q0.bind(null,t.registered),merge:T0.bind(null,t.registered,r)}},mq=function e(t){for(var r="",n=0;n<t.length;n++){var i=t[n];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(r&&(r+=" "),r+=o)}}return r},vq=hq({key:"css"}),Dn=vq.css,$c=0,X0=[],se=O,k0=se.__b,O0=se.__r,C0=se.diffed,P0=se.__c,N0=se.unmount,D0=se.__;se.__b=function(e){De=null,k0&&k0(e)},se.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),D0&&D0(e,t)},se.__r=function(e){O0&&O0(e),$o=0;var t=(De=e.__c).__H;t&&(kc===De?(t.__h=[],De.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(Mo),t.__h.forEach(Hc),t.__h=[],$o=0)),kc=De},se.diffed=function(e){C0&&C0(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(X0.push(t)!==1&&R0===se.requestAnimationFrame||((R0=se.requestAnimationFrame)||bq)(yq)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),kc=De=null},se.__c=function(e,t){t.some(function(r){try{r.__h.forEach(Mo),r.__h=r.__h.filter(function(n){return!n.__||Hc(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],se.__e(n,r.__v)}}),P0&&P0(e,t)},se.unmount=function(e){N0&&N0(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{Mo(n)}catch(i){t=i}}),r.__H=void 0,t&&se.__e(t,r.__v))};L0=typeof requestAnimationFrame=="function";wq=Symbol.for("preact-signals");H=void 0,Rn=void 0,Lt=0,Jc=0,Ho=0;be.prototype.brand=wq;be.prototype.h=function(){return!0};be.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};be.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}};be.prototype.subscribe=function(e){var t=this;return Rr(function(){var r=t.value,n=H;H=void 0;try{e(r)}finally{H=n}})};be.prototype.valueOf=function(){return this.value};be.prototype.toString=function(){return this.value+""};be.prototype.toJSON=function(){return this.value};be.prototype.peek=function(){var e=H;H=void 0;try{return this.value}finally{H=e}};Object.defineProperty(be.prototype,"value",{get:function(){var e=tw(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Jc>100)throw new Error("Cycle detected");this.v=e,this.i++,Ho++,Lt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{zo()}}}});(Tr.prototype=new be).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Ho))return!0;if(this.g=Ho,this.f|=1,this.i>0&&!rw(this))return this.f&=-2,!0;var e=H;try{nw(this),H=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return H=e,iw(this),this.f&=-2,!0};Tr.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}be.prototype.S.call(this,e)};Tr.prototype.U=function(e){if(this.t!==void 0&&(be.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Tr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(Tr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=tw(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});Ln.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Ln.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ow(this),nw(this),Lt++;var e=H;return H=this,Eq.bind(this,e)};Ln.prototype.N=function(){2&this.f||(this.f|=2,this.o=Rn,Rn=this)};Ln.prototype.d=function(){this.f|=8,1&this.f||Xc(this)};aw=[],sw=[];Rr(function(){Zc=this.N})();lw.displayName="_st";Object.defineProperties(be.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:lw},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});kr("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var o=n[i];o instanceof be&&(r||(t.__np=r={}),r[i]=o,n[i]=o.peek())}}e(t)});kr("__r",function(e,t){Jo();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var o;return Rr(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o}())),Jo(r),e(t)});kr("__e",function(e,t,r,n){Jo(),e(t,r,n)});kr("diffed",function(e,t){Jo();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var o=r.U;if(o)for(var a in o){var s=o[a];s!==void 0&&!(a in n)&&(s.d(),o[a]=void 0)}else o={},r.U=o;for(var l in n){var c=o[l],d=n[l];c===void 0?(c=xq(r,l,d,i),o[l]=c):c.o(d,i)}}}e(t)});kr("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var o=n[i];o&&o.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)});kr("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});Ue.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u,n=r&&r.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){var o=2&this.__$f;if(!(n||o||4&this.__$f)||1&this.__$f)return!0}else if(!(n||4&this.__$f)||3&this.__$f)return!0;for(var a in e)if(a!=="__source"&&e[a]!==this.props[a])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};Aq=typeof requestAnimationFrame=="undefined"?setTimeout:function(e){var t=function(){clearTimeout(r),cancelAnimationFrame(n),e()},r=setTimeout(t,100),n=requestAnimationFrame(t)},Sq=function(e){queueMicrotask(function(){queueMicrotask(e)})};Ne=Dn`
413
+ `;return b("div",{className:`toast toast-${t} ${i?"toast-visible":"toast-hidden"} ${a}`,children:e})},jb=(e,t)=>{let r=document.createElement("div");document.body.appendChild(r);let n=()=>{document.body.removeChild(r)},i=$N(e,t);Zt(b(HN,{message:i,type:t==null?void 0:t.type,duration:t==null?void 0:t.duration,onClose:n}),r)}});function Fb(){return I(this,null,function*(){if(hc)return hc;let t=`${A.testMode?"https://stg-game.jolibox.com":"https://game.jolibox.com"}/api/user-retention/exit-recommendations?objectId=${A.mpId}&from=GAME_DETAIL`,{response:{data:r}}=yield we(t);return hc=r,r})}function Bb(){return I(this,null,function*(){let e=new At;if(A.mpType!=="game")return e.resolve(!1),e.promise;let t=yield Fb();if(t.code!=="SUCCESS")return e.resolve(!1),e.promise;let{gameListInfo:r,title:n,buttons:i}=t.data,o=Nb({games:r.games,title:n,buttons:i,onClose:a=>{var s;switch(a.type){case"quit":e.resolve(!1);break;case"dismiss":e.resolve(!0),o.hide();break;case"navigate":(s=a.data)!=null&&s.game?JN(a.data.game):e.resolve(!0),o.hide();break;default:e.resolve(!0);break}}});return e.promise})}var hc,JN,$b=T(()=>{"use strict";Z();Se();D();to();jt();hc=null;Fb();JN=e=>{var a;let{data:t}=q("envSync"),r=new URL(t.schema),n=new URLSearchParams(r.search);n.set("gameId",e.gameId),n.set("joliSource",A.encodeJoliSourceQuery({__mpType:"game",__orientation:(a=e.orientation)!=null?a:"VERTICAL"}));let o=`${`https://${e.gameId}.content.jolibox.com/`}index.html?${n.toString()}`;q("openSchemaSync",{schema:o})}});function GN(e){let t=k(k({},VN),e),{url:r,height:n,showCloseButton:i,enableDragClose:o,useAnimation:a,onClose:s,onLoad:l}=t,c=0,d=0,u=!1,h=()=>a?{overlayTransition:"opacity 0.3s ease",containerTransition:"transform 0.3s ease",iframeTransition:"opacity 0.3s ease"}:{overlayTransition:"none",containerTransition:"none",iframeTransition:"none"},p=()=>a?300:0;function m(){let{overlayTransition:y,containerTransition:x,iframeTransition:R}=h();V=document.createElement("div"),V.id="jolibox-modal-overlay",V.style.cssText=`position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,0.5); z-index:1000; display:flex; justify-content:center; align-items:flex-end; transition:${y}; opacity:0; visibility:hidden;`,$=document.createElement("div"),$.id="jolibox-modal-container",$.style.cssText=`width:100%; height:${n}; background:white; border-radius:12px 12px 0 0; overflow:hidden; box-shadow:0 -2px 10px rgba(0,0,0,0.2); transform:translateY(100%); transition:${x};`;let C=document.createElement("div");C.id="jolibox-modal-loading",C.style.cssText="position:absolute; top:50%; left:50%; transform:translate(-50%, -50%); width:40px; height:40px; border:4px solid #f3f3f3; border-top:4px solid #3498db; border-radius:50%; animation:spin 1s linear infinite;";let S=document.createElement("style");S.textContent="@keyframes spin { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } }",document.head.appendChild(S);let w=document.createElement("div");if(w.style.cssText="width:100%; height:100%; display:flex; flex-direction:column; padding-bottom:env(safe-area-inset-bottom, 0); position:relative;",Ke=document.createElement("iframe"),Ke.style.cssText=`width:100%; flex:1; border:none; opacity:0; transition:${R};`,Ke.src=r,Ke.onload=()=>{C.parentNode&&C.parentNode.removeChild(C),Ke.style.opacity="1",g(),l==null||l(),ue.emit("onModalIframeLoaded",{url:r})},w.appendChild(Ke),w.appendChild(C),$.appendChild(w),i){let B=document.createElement("div");B.style.cssText="position:absolute; top:10px; right:10px; width:30px; height:30px; background:rgba(0,0,0,0.1); border-radius:15px; display:flex; justify-content:center; align-items:center; cursor:pointer; z-index:10;",B.innerHTML="\u2715",B.onclick=v,$.appendChild(B)}V.appendChild($),document.body.appendChild(V),V.addEventListener("click",function(B){B.target===V&&v()}),o&&_()}function g(){!V||!$||u||(V.style.visibility="visible",a?requestAnimationFrame(()=>{V&&(V.style.opacity="1"),$&&($.style.transform="translateY(0)"),u=!0}):(V&&(V.style.opacity="1"),$&&($.style.transform="translateY(0)"),u=!0),q("updateContainerConfigSync",{displayCapsuleButton:!1,webviewId:A.webviewId}))}function _(){if(!$)return;let y=C=>{c=C.touches[0].clientY},x=C=>{if(!u)return;d=C.touches[0].clientY;let S=d-c;S>0&&($&&($.style.transition="none",$.style.transform=`translateY(${S}px)`),C.preventDefault())},R=()=>{!u||!$||($.style.transition=a?"transform 0.3s ease":"none",d-c>80?v():$.style.transform="translateY(0)")};$.addEventListener("touchstart",y),$.addEventListener("touchmove",x),$.addEventListener("touchend",R)}function v(){!V||!$||!u||(a?($.style.transform="translateY(100%)",V.style.opacity="0"):V.style.visibility="hidden",u=!1,q("updateContainerConfigSync",{displayCapsuleButton:!0,webviewId:A.webviewId}),setTimeout(()=>{V&&(V.remove(),V=null,$=null,Ke=null,s==null||s(),ue.emit("onModalIframeClosed",{url:r}))},p()))}return m(),{close:v}}function Hb(){return window.joliboxUI=L(k({},window.joliboxUI),{createIframeModal:GN}),()=>{window.joliboxUI=void 0,V&&V.parentNode&&V.parentNode.removeChild(V),$&&$.parentNode&&$.parentNode.removeChild($),Ke&&Ke.parentNode&&Ke.parentNode.removeChild(Ke),V=null,$=null,Ke=null}}var VN,V,$,Ke,Jb=T(()=>{"use strict";Se();Z();D();VN={height:"50%",showCloseButton:!0,enableDragClose:!0,useAnimation:!0},V=null,$=null,Ke=null});var Gb={};iu(Gb,{config:()=>nD});function WN(){Qn.on("isAdShowing",e=>{io=e,jr(io)&&q("updateContainerConfigSync",{displayCapsuleButton:!io,webviewId:A.webviewId})})}function zN(){ue.on("onInterceptSystemExit",({intercept:e})=>{Vb=e})}function YN(){ue.on("onInterceptBackPress",({intercept:e})=>{KN=e}),Ve("onBeforeBackPress",({uuid:e})=>{var t,r;ue.emit("onBackPress",{}),(r=(t=globalThis.joliboxJSCore)==null?void 0:t.doBackPress)==null||r.call(t,e)})}function QN(){ue.on("onDocumentReady",()=>{var e;(e=globalThis.joliboxJSCore)==null||e.onDocumentReady(window.location.href),qe("onDocumentReady",{start_timestamp:ao,timestamp:Date.now()})})}function XN(){Ve("onI18nChanged",({language:e})=>{ue.emit("onI18nChanged",{i18n:e})})}function ZN(e){A.mpType==="game"&&Ce.start(e)}function eD(){Ve("onJoliboxServiceReady",({runtimeInfo:e,loadDuration:t})=>{e&&A.onEnvConfigChanged({hostUserInfo:e}),ue.emit("LifecycleEvent.onReady",k({},A.hostUserInfo?A.hostUserInfo:{isLogin:!1})),qe("joliboxServiceReady",{start_timestamp:ao,timestamp:Date.now()}),ZN(t)}),Ve("onBeforeExit",({uuid:e})=>{var t;(t=globalThis.joliboxJSCore)==null||t.doExit(e)})}function tD(){let e=()=>{qe("onBeforeExit",{timestamp:Date.now()}),ro==null||ro(),no==null||no(),Ce.close(Date.now()-ao)},t=()=>io||Vb;Je.onDoExit(()=>I(this,null,function*(){return t()?!0:jr(A.shouldInterupt)?(A.shouldInterupt||e(),A.shouldInterupt):oo!=null&&oo.canShowRecommended&&(yield Bb())?!0:(e(),!1)})),Je.onDoBackPress(()=>I(this,null,function*(){return!!t()}))}function rD(){return I(this,null,function*(){let e=`${A.baseApiHost}/api/fe-configs/js-sdk/basic-meta`,{response:{data:t}}=yield we(e);t&&(oo=t)})}function nD(){ao=Date.now(),eD(),WN(),zN(),YN(),tD(),QN(),XN(),rD(),no=Hb(),ro=_d()}var ro,no,ao,io,oo,Vb,KN,Kb=T(()=>{"use strict";Se();Z();D();It();yd();Ja();$b();jt();Jb();io=!1,oo=null,Vb=!1,KN=!1;Je.onReady(()=>{})});function Wb(e){let t=Ca.config[e];return t||(t={},Ca.config[e]=t),(r,n)=>{if(t[r]){et.warn(`[can i use] ${r} already registered`);return}t[r]=k({},n)}}var zb=T(()=>{"use strict";D()});function mc(e){Yb=e}function so(e){return e===null||typeof e!="object"?e:Array.isArray(e)?e.map(t=>so(t)):Object.keys(e).reduce((t,r)=>(t[r]=so(e[r]),t),{})}function yt(e){return typeof e=="number"}function vc(e){let t=gc(e);switch(t){case"string":return`"${e}"`;case"number":case"boolean":case"null":case"undefined":return String(e);default:return`a(n) ${t}`}}function gc(e){return typeof e=="function"?"function":Object.prototype.toString.call(e).slice(8).slice(0,-1).toLowerCase()}var Yb,oe,lo,co,uo,fo,yr,po,ho,mo,vo,go,_o,yo,bo,wo,Eo,xo,Ao,_c=T(()=>{"use strict";Yb=!1;oe=class{constructor(){this.errors=[];this.hasFallback=!1;this.hasDefault=!1;this._optional=!1}fail(t){if(Yb)if(typeof t=="string")this.errors.push(t);else{let r=`${this.path} should be ${t.expect}`;this._optional&&t.expect!=="undefined"?r+=" or undefined, ":r+=", ",r+=`but got ${vc(t.actual)}`,this.errors.push(r)}return!1}fallback(t){return this.hasFallback=!0,this._fallback=t,this}get fallbackValue(){return so(this._fallback)}default(t){return this.hasDefault=!0,this._default=t,this}get defaultValue(){return typeof this._default=="function"?this._default:so(this._default)}optional(){return this._optional=!0,this}};lo=class extends oe{validate(t){return this._optional&&t===void 0?!0:yt(t)?yt(this._min)&&t<this._min?this.fail(`the value of ${this.path} should be greater than or equal to ${this._min}`):yt(this._max)&&t>this._max?this.fail(`the value of ${this.path} should be less than or equal to ${this._max}`):yt(this._greater)&&t<=this._greater?this.fail(`the value of ${this.path} should be greater than ${this._greater}`):this._isInt&&t!==Math.floor(t)?this.fail(`the value of ${this.path} should be integer but got ${t}`):!0:this.fail({expect:"number",actual:t})}min(t){return this._min=t,this}max(t){return this._max=t,this}isInt(t){return this._isInt=t,this}greater(t){return this._greater=t,this}},co=class extends oe{validate(t){return this._optional&&t===void 0?!0:typeof t!="boolean"?this.fail({expect:"boolean",actual:t}):!0}},uo=class extends oe{validate(t){if(this._optional&&t===void 0)return!0;if(typeof t!="string")return this.fail({expect:"string",actual:t});if(yt(this._maxLength)&&t.length>this._maxLength)return this.fail(`the length of ${this.path} should be less than or equal to ${this._maxLength}`);if(yt(this._minLength)&&t.length<this._minLength)return this.fail(`the length of ${this.path} should be greater than or equal to ${this._minLength}`);if(typeof this._pattern=="string"){if(!new RegExp(this._pattern).test(t))return this.fail(`${this.path} should match pattern "${this._pattern}"`)}else if(this._pattern&&!this._pattern.test(t))return this.fail(`${this.path} should match pattern "${this._pattern.toString()}"`);return!0}minLength(t){return this._minLength=t,this}maxLength(t){return this._maxLength=t,this}pattern(t){return this._pattern=t,this}},fo=class extends oe{validate(t){return this._optional&&t===void 0?!0:typeof t!="symbol"?this.fail({expect:"symbol",actual:t}):!0}},yr=class extends oe{validate(t){return!0}},po=class extends oe{validate(t){return t!==void 0?this.fail({expect:"undefined",actual:t}):!0}},ho=class extends oe{validate(t){return this._optional&&t===void 0?!0:t!==null?this.fail({expect:"null",actual:t}):!0}},mo=class extends oe{validate(t){return this._optional&&t===void 0?!0:typeof t!="function"?this.fail({expect:"function",actual:t}):!0}},vo=class extends oe{constructor(...t){super(),this._items=t}validate(t){if(this._optional&&t===void 0)return!0;if(!this._items.includes(t)){let r=this._items.map(n=>JSON.stringify(n)).join(", ");return this.fail(`expect ${this.path} to be one of ${r}, but got ${vc(t)}`)}return!0}},go=class extends oe{constructor(r){super();this._item=r}validate(r){if(this._optional&&r===void 0)return!0;if(!Array.isArray(r))return this.fail({expect:"array",actual:r});if(yt(this._minItems)&&r.length<this._minItems)return this.fail(`the length of ${this.path} should be greater than or equal to ${this._minItems}`);if(yt(this._maxItems)&&r.length>this._maxItems)return this.fail(`the length of ${this.path} should be less than or equal to ${this._maxItems}`);if(yt(this._length)&&r.length!==this._length)return this.fail(`the length of ${this.path} should be equal to ${this._length}`);let n=this._item;if(!n)return!0;let i=!0;if(r.forEach((o,a)=>{if(n.path=`${this.path}[${a}]`,n.errors=this.errors,o===void 0&&n.hasDefault){r[a]=n.defaultValue;return}n.validate(o)||(n.hasFallback?r[a]=n.fallbackValue:i=!1)}),this._uniqueItems){let o=new Map;for(let a in r)o.has(r[a])?i=this.fail(`${this.path} should NOT have duplicate items (${this.path}[${o.get(r[a])}] and ${this.path}[${a}] are identical)`):o.set(r[a],a)}return i}minItems(r){return this._minItems=r,this}maxItems(r){return this._maxItems=r,this}uniqueItems(){return this._uniqueItems=!0,this}length(r){return this._length=r,this}},_o=class extends oe{constructor(r){super();this._value=r}validate(r){if(this._optional&&r===void 0)return!0;if(gc(r)!=="object")return this.fail({expect:"object",actual:r});let i=r,o=this._value;o.errors=this.errors;let a=!0;for(let s in i){let l=i[s];if(/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/.test(s)?o.path=`${this.path}.${s}`:o.path=`${this.path}["${s}"]`,!(l===void 0&&o._optional)){if(l===void 0&&o.hasDefault){i[s]=o.defaultValue;continue}o.validate(l)||(o.hasFallback?i[s]=o.fallbackValue:a=!1)}}return a}},yo=class extends oe{constructor(r={}){super();this._object=r}validate(r){if(this._optional&&r===void 0)return!0;if(gc(r)!=="object")return this.fail({expect:"object",actual:r});let n=r,i=!0;for(let o in this._object){let a=n[o],s=this._object[o];if(s.errors=this.errors,/^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/.test(o)?s.path=`${this.path}.${o}`:s.path=`${this.path}["${o}"]`,!(s._optional&&a===void 0)){if(a===void 0&&s.hasDefault){n[o]=s.defaultValue;continue}s.validate(a)||(s.hasFallback?n[o]=s.fallbackValue:i=!1)}}return i}},bo=class extends oe{constructor(r){super();this.value=r}validate(r){return r===void 0&&this._optional?!0:r!==this.value?this.fail({expect:vc(this.value),actual:r}):!0}},wo=class extends oe{constructor(...t){super(),this._items=t}validate(t){if(t===void 0&&this._optional)return!0;let r=[],n=!1,i=this._items.length;for(let o=0;o<i;o++){let a=this._items[o];if(a.errors=[],a.path=this.path,!a.validate(t))r.push(a.errors.join("; "));else if(!n){n=!0;break}}if(!n){let o=r.join(`
414
+ or `);this.errors.push(o)}return n}},Eo=class extends oe{constructor(...t){super(),this._items=t;let r=0,n=t.length-1;for(;n>=0;n--){let i=t[n];if(i._optional||i.hasDefault)r+=1;else break}this._minItems=t.length-r}validate(t){if(t===void 0&&this._optional)return!0;if(!Array.isArray(t))return this.fail({expect:"array",actual:t});if(t.length<this._minItems)return this.fail(`the length of ${this.path} should be greater than or equal to ${this._minItems}`);let r=!0;return this._items.forEach((n,i)=>{if(n.path=`${this.path}[${i}]`,n.errors=this.errors,t[i]===void 0&&n.hasDefault){t[i]=n.defaultValue;return}n.validate(t[i])||(n.hasFallback?t[i]=n._fallback:r=!1)}),r}},xo=class extends oe{validate(t){return t===void 0&&this._optional||t instanceof ArrayBuffer?!0:this.fail({expect:"arraybuffer",actual:t})}},Ao=class extends oe{constructor(t){super(),this._ctor=t}validate(t){return t===void 0&&this._optional||t instanceof this._ctor?!0:this.fail({expect:`typedarray of ${this._ctor.name}`,actual:t})}}});function yc(e,t,r="param"){if(e.errors=[],e.path=r,mc(!0),!e.validate(t)){let n=e.errors.join(`
415
+ `);throw e.errors.length=0,mc(!1),new TypeError(n)}}var E,bc=T(()=>{"use strict";_c();_c();E={object(e){return new yo(e)},array(e){return new go(e)},tuple(...e){return new Eo(...e)},literal(e){return new bo(e)},or(...e){return new wo(...e)},symbol(){return new fo},record(e){return new _o(e)},function(){return new mo},boolean(){return new co},string(){return new uo},number(){return new lo},undefined(){return new po},null(){return new ho},unknown(){return new yr},any(){return new yr},as(){return new yr},arraybuffer(){return new xo},enum(...e){return new vo(...e)},typedarray(e){return new Ao(e)}}});var So,Qb,Xb=T(()=>{"use strict";D();rt();bc();Qt();So=1,Qb=e=>{function t(n,i){return(...o)=>{var u,h,p,m;let a=Date.now(),s={method:n,trace_id:So};So+=1;let l="SUCCESS",c=`${n}:ok`,d=0;try{if(i.paramsSchema)try{yc(i.paramsSchema,o,"params")}catch(y){throw ja(`${n}:fail ${y.message}`)}let g=i.implement(...o),_=g,v=`${n}:ok`;if(g&&"code"in g){let{code:y,data:x,message:R}=g;l=y,_=x,v=R}return{code:l,message:v,data:_}}catch(g){let _=g;d=(h=(u=_.code)!=null?u:_.errNo)!=null?h:2e3,l="FAILURE";let v=(m=(p=_.message)!=null?p:_.errMsg)!=null?m:`${g}`;return c=`${n}:${l} ${v.replace(/^\S+:(fail|cancel)\s?/,"")}`,Ie(new $r(c,d)),{code:l,message:c}}finally{let g=Date.now()-a;e("apiInvoked",L(k({},s),{duration:g,status:l}))}}}function r(n,i){return(...o)=>I(this,null,function*(){var h,p,m,g;let a=Ou(o)?o:[o],s=Date.now(),l={method:n,trace_id:So};So+=1;let c=`${n}:ok`,d="SUCCESS",u={code:d,message:c};try{if(i.paramsSchema)try{yc(i.paramsSchema,a,"params")}catch(y){throw ja(y.message)}let v=yield i.implement(...a);if(v&&"code"in v){let{code:y,data:x,message:R}=v;d=y,c=R,v=x}return Object.assign(u,{code:d,message:c,data:v}),u}catch(_){let v=_,y=(p=(h=v.code)!=null?h:v.errNo)!=null?p:2e3;d="FAILURE";let x=(g=(m=v.message)!=null?m:v.errMsg)!=null?g:`${_}`,R=`${n}:${d} ${x.replace(/^\S+:(fail|cancel)\s?/,"")}`;return Object.assign(u,{code:d,message:R}),Ie(new $r(R,y)),u}finally{let _=Date.now()-s;e("apiInvoked",L(k({},l),{duration:_,status:d}))}})}return{createAPI:r,createSyncAPI:t}}});var pe,J,P,lt=T(()=>{"use strict";zb();It();Xb();bc();({createAPI:pe,createSyncAPI:J}=Qb(qe)),P=Wb("native")});var Zb,oD,aD,sD,lD,e0=T(()=>{"use strict";D();lt();Se();Zb=X(),oD="env",aD="getSystemInfoSync",sD=J(aD,{implement:()=>{var r;let e=q("envSync"),{data:t}=e;return{system:t.deviceInfo.system,platform:t.deviceInfo.platform.toLowerCase(),version:t.sdkInfo.jssdkVersion,pixelRatio:t.deviceInfo.pixelRatio,language:t.deviceInfo.lang,brand:t.deviceInfo.brand,appName:(r=t.hostInfo)==null?void 0:r.appName,SDKVersion:t.sdkInfo.jssdkVersion}}}),lD=J(oD,{implement:()=>{var t;let e=q("envSync");return(t=e==null?void 0:e.data)!=null?t:void 0}});Zb.registerCommand("API.getSystemInfoSync",sD);Zb.registerCommand("API.env",lD);P("env",{version:"1.0.0"});P("getSystemInfoSync",{version:"1.0.0"})});var t0=f(wc=>{"use strict";D();lt();rt();Se();It();Z();var cD="exitGame",uD="onReady",dD="onJoliboxShow",fD="onJoliboxHide",Io=X(),To=Gn(Ie),pD=pe(cD,{paramsSchema:E.tuple(E.function(),E.boolean().optional().default(!1)),implement:(e,t=!1)=>I(wc,null,function*(){To(e).call(wc),jr(A.shouldInterupt)&&!A.shouldInterupt&&A.from&&Su("onRetentionResult",{shouldStay:t},A.from,!0),yield Oe("exitAppAsync")})}),hD=J(dD,{paramsSchema:E.tuple(E.function()),implement(e){let t=To(e);Ve("onJoliboxEnterForeground",()=>{t.call(this),Jr.emit("visible",!0)})}}),mD=J(fD,{paramsSchema:E.tuple(E.function()),implement(e){let t=To(e);Ve("onJoliboxEnterBackground",()=>{t.call(this),Jr.emit("visible",!1)})}}),vD=J(uD,{paramsSchema:E.tuple(E.function()),implement(e){let t=To(e);ue.on("LifecycleEvent.onReady",r=>{t(r)})}});Io.registerCommand("LifecycleSDK.exit",pD);Io.registerCommand("LifecycleSDK.onReady",vD);Io.registerCommand("LifecycleSDK.onJoliboxShow",hD);Io.registerCommand("LifecycleSDK.onJoliboxHide",mD);P("lifeCycle.exit",{version:"1.0.0"});P("lifeCycle.onReady",{version:"1.0.0"});P("lifeCycle.onJoliboxShow",{version:"1.0.0"});P("lifeCycle.onJoliboxHide",{version:"1.0.0"})});function r0(e){let t={};if(!Ut(e))return t;for(let[r,n]of Object.entries(e)){let i=r.toLocaleLowerCase();n?typeof n=="object"?t[i]=Object.prototype.toString.call(n):t[i]=String(n):t[i]=""}return t}function n0(e="GET"){if(e==="")return"POST";let t=e.toUpperCase();return["GET","OPTIONS","HEAD","POST","PUT","DELETE","TRACE","CONNECT","PATCH"].includes(t)?t:"GET"}function i0(e,t=!1){if(e)return t||e>0&&e<=6e4?Math.ceil(e):6e4}function o0(e,t,r){if(["POST","PUT","PATCH"].includes(t)||!Ut(r))return e;let[n,i=""]=e.split("?"),o=new URLSearchParams(i);for(let[s,l]of Object.entries(r))l!=null&&o.append(s,String(l));let a=o.toString();return a?`${n}?${a}`:n}var a0=T(()=>{"use strict";D()});var gD,_D,Ec,xc,s0,yD,bD,wD,l0=T(()=>{"use strict";Qt();$a();lt();a0();D();rt();Z();gD=15,_D=zn("createRequestTaskSync","operateRequestTaskSync",{type:"public",baseUrl:A.baseApiHost}),Ec=0,xc=[],s0=Gn(Ie),yD=(e,t)=>{let r=e.filter(t),n=e.filter(i=>!t(i));return e.length=0,e.push(...n),r},bD=e=>{let t=new At,r=()=>{};return J("request",{paramsSchema:E.tuple(E.object({url:E.string(),method:E.string(),headers:E.object(),data:E.object().optional(),query:E.object().optional(),dataType:E.string().default("json"),responseType:E.string().default("text"),enableCache:E.boolean().default(!1),appendHostCookie:E.boolean().default(!0),timeout:E.number().default(3e4),success:E.function(),fail:E.function()})),implement(i){let o=()=>I(this,null,function*(){var s,l;let a=s0(i.fail);try{if(Ec+=1,t.state!=="pending")return;let{data:c,dataType:d,responseType:u,enableCache:h,appendHostCookie:p}=i,m=r0(i.headers),g=n0(i.method),_=i0(i.timeout),v=o0(i.url,g,c),y=s0(i.success),x=Object.assign({},i,{method:g,header:m,data:g==="GET"||g==="HEAD"?void 0:c,enableCache:h,query:(s=i.query)!=null?s:{},dataType:d,responseType:u,appendHostCookie:p});_&&(x.timeout=_);let R=_D(v,x);{let{response:C}=yield R,{code:S,data:w,message:B}=C;if(w&&typeof w=="object"&&"status"in w&&w.status!==200)throw St({code:w.status||-1,msg:`request:fail status ${w.status}`});t.resolve({code:S!=null?S:"SUCCESS",data:w,message:B!=null?B:"request:ok"}),y({code:"SUCCESS",message:"request:ok",data:w})}}catch(c){t.reject(c),a({code:"FAILURE",message:"httpRequst: failed"})}finally{Ec-=1,(l=xc.shift())==null||l()}});return Ec>=gD?(r=()=>{yD(xc,a=>a===o)},xc.push(o)):o(),t.promise}})(e),{abort(){t.reject(St({code:-1,msg:"request:fail abort"})),r()}}},wD=X();wD.registerCommand("HttpSDK.request",bD);P("request",{version:"1.0.0"})});function TD(e){let t=Object.prototype.toString.call(e).split(" ")[1].split("]")[0].toLocaleLowerCase();return ID.includes(t)?t:""}function RD(e,t){try{switch(t){case"string":return e;case"object":return JSON.parse(e);case"number":return parseFloat(e);case"boolean":return e==="true";default:return""}}catch(r){return""}}function kD(e,t){try{switch(t){case"string":case"number":case"boolean":return`${e}`;case"object":return JSON.stringify(e);default:return""}}catch(r){return""}}var Ro,ED,xD,AD,SD,H$,J$,ID,c0=T(()=>{"use strict";lt();Se();D();jt();Z();Ro=X(),ED=pe("getLocalStorage",{paramsSchema:E.tuple(E.string()),implement(e){return I(this,null,function*(){let{response:t}=yield we(`/api/games/user-storage/${A.mpId}`,{method:"GET",responseType:"json",appendHostCookie:!0,query:{key:e}}),{data:{code:r,message:n,data:i}}=yield t;if(r==="SUCCESS")return{code:r,message:n,data:i==null?void 0:i.value};try{let{data:{data:o,dataType:a}}=yield Oe("getLocalStorageAsync",{key:e}),s=RD(o,a);return{code:r,message:`${n}. fallback to native`,data:s}}catch(o){return{code:"INTERNAL_ERROR",message:"[Jolibox SDK] get local storage failed",data:null}}})}});Ro.registerCommand("StorageSDK.getItem",ED);P("storage.getItem",{version:"1.0.0",properties:{key:"1.0.0",value:"1.0.0"}});xD=pe("setStorage",{paramsSchema:E.tuple(E.string(),E.or(E.string(),E.boolean(),E.number())),implement(e,t){return I(this,null,function*(){let r=A.mpId,n=typeof t=="string"?t:String(t),{response:i}=yield we(`/api/games/user-storage/${r}`,{method:"POST",responseType:"json",appendHostCookie:!0,data:{key:e,value:n}}),{data:{code:o,message:a}}=i,s=TD(t),l=kD(t,s);return yield Oe("setLocalStorageAsync",{key:e,data:l,dataType:s}),o=="SUCCESS"?{code:o,message:a}:{code:o,message:`${a}. fallback to native`}})}});Ro.registerCommand("StorageSDK.setItem",xD);P("storage.setItem",{version:"1.0.0",properties:{key:"1.0.0",value:"1.0.0"}});AD=pe("removeStorage",{paramsSchema:E.tuple(E.string()),implement(e){return I(this,null,function*(){let t=A.mpId,{response:r}=yield we(`/api/games/user-storage/${t}/remove`,{method:"POST",responseType:"json",appendHostCookie:!0,data:{key:e}}),{data:{code:n,message:i}}=r;return yield Oe("removeLocalStorageAsync",{key:e}),n==="SUCCESS"?{code:n,message:i}:{code:n,message:"[Jolibox SDK] remove item succ"}})}});Ro.registerCommand("StorageSDK.removeItem",AD);P("storage.removeItem",{version:"1.0.0",properties:{key:"1.0.0"}});SD=pe("clearStorage",{implement(){return I(this,null,function*(){let e=A.mpId,{response:t}=yield we(`/api/games/user-storage/${e}/clear`,{method:"POST",appendHostCookie:!0});Oe("clearLocalStorageAsync");let{data:{code:r,message:n}}=t;return r==="SUCCESS"?{code:r,message:n}:{code:r,message:`${n}.fallback to native`}})}});Ro.registerCommand("StorageSDK.clear",SD);P("storage.clear",{version:"1.0.0"});H$=pe("getStorageInfo",{implement(){return I(this,null,function*(){let{data:e}=yield Oe("getStorageInfoAsync");return e})}});P("getStorageInfo",{version:"1.0.0",success:{keys:"1.0.0",currentSize:"1.0.0",limitSize:"1.0.0"}});J$=J("getStorageInfoSync",{implement(){return q("getStorageInfoSync")}}),ID=["string","number","boolean","object",""]});var OD,CD,PD,Ac,u0=T(()=>{"use strict";D();Se();lt();OD=J("showKeyboard",{paramsSchema:E.tuple(E.object({defaultValue:E.string().optional().default(""),multiple:E.boolean().optional().default(!1),maxLength:E.unknown().optional().default(1e5)})),implement(e){var n;let t=Math.floor((n=Number(e.maxLength))!=null?n:1e5),{defaultValue:r}=e;r&&t&&(r=r.slice(0,t)),q("showKeyboardSync",L(k({},e),{defaultValue:r,maxLength:t}))}});P("keyboard.showKeyboard",{version:"1.0.0",properties:{params:{defaultValue:"1.0.0",multiple:"1.0.0",confirmHold:"1.0.0",confirmType:"1.0.0",maxLength:"1.0.0"}},success:{errMsg:"1.0.0"}});CD=J("updateKeyboard",{paramsSchema:E.tuple(E.object({value:E.string()})),implement(e){q("updateKeyboardSync",e)}});P("keyboard.updateKeyboard",{version:"1.0.0",properties:{params:{value:"1.0.0"}}});PD=J("hideKeyboard",{implement(){q("hideKeyboardSync")}});P("keyboard.hideKeyboard",{version:"1.0.0"});Ac=X();Ac.registerCommand("KeyboardSDK.showKeyboard",OD);Ac.registerCommand("KeyboardSDK.updateKeyboard",CD);Ac.registerCommand("KeyboardSDK.hideKeyboard",PD)});var d0=f(Vt=>{"use strict";D();lt();It();var br=X(),ND=pe("levelFinished",{paramsSchema:E.tuple(E.string(),E.object({result:E.boolean(),duration:E.number()})),implement:(e,t)=>I(Vt,null,function*(){let{result:r,duration:n}=t,i=[];i.push(Ce.tracker("LevelFinished",{levelId:e,result:r,duration:n})),i.push(Ce.reporter({event:"COMPLETE_GAME_LEVEL"})),yield Promise.all(i)})}),DD=pe("taskFinished",{paramsSchema:E.tuple(E.string(),E.object({duration:E.number()})),implement:(e,t)=>I(Vt,null,function*(){let{duration:r}=t;return yield Ce.reportToNative({event:"TaskFinished",params:{duration:r,taskId:e}})})}),LD=pe("levelUpgrade",{paramsSchema:E.tuple(E.string(),E.string()),implement:(e,t)=>I(Vt,null,function*(){let r=[];r.push(Ce.reportToNative({event:"LevelUpgrade",params:{name:t,levelId:e}})),yield Promise.all(r)})}),qD=pe("onHistoryUserLevel",{paramsSchema:E.tuple(E.number()),implement:e=>I(Vt,null,function*(){return yield Ce.reportToNative({event:"HistoryUserLevel",params:{level:e}})})}),UD=pe("onHistoryUserScore",{paramsSchema:E.tuple(E.number()),implement:e=>I(Vt,null,function*(){return yield Ce.reportToNative({event:"HistoryUserScore",params:{score:e}})})}),MD=pe("taskEvent",{paramsSchema:E.tuple(E.string(),E.object({tools:E.array(E.object({id:E.string(),name:E.string(),count:E.number(),description:E.string().optional(),price:E.object({amount:E.number(),unit:E.string()}).optional()})).optional(),awards:E.array(E.object({id:E.string(),name:E.string()})).optional()})),implement:(e,t)=>I(Vt,null,function*(){var n,i;let r=[];r.push(Ce.reportToNative({event:"TaskEvent",params:k({taskId:e},t)})),(i=(n=t.tools)==null?void 0:n.length)!=null&&i&&(r.push(Ce.reporter({event:"USE_GAME_ITEM"})),r.push(Ce.reportToNative({event:"UseGameItem",params:k({taskId:e},t)}))),yield Promise.all(r)})});br.registerCommand("TaskTrackerSDK.levelFinished",ND);br.registerCommand("TaskTrackerSDK.taskFinished",DD);br.registerCommand("TaskTrackerSDK.levelUpgrade",LD);br.registerCommand("TaskTrackerSDK.historyUserLevel",qD);br.registerCommand("TaskTrackerSDK.historyUserScore",UD);br.registerCommand("TaskTrackerSDK.taskEvent",MD);P("TaskTrackerSDK.onLevelFinished",{version:"1.0.0",properties:{levelId:"1.0.0",params:{result:"1.0.0",duration:"1.0.0"}}});P("TaskTrackerSDK.onTaskFinished",{version:"1.0.0",properties:{taskId:"1.0.0",duration:"1.0.0"}});P("TaskTrackerSDK.onLevelUpgrade",{version:"1.0.0",properties:{levelId:"1.0.0",name:"1.0.0"}});P("TaskTrackerSDK.onHistoryUserLevel",{version:"1.0.0",properties:{level:"1.0.0"}});P("TaskTrackerSDK.onHistoryUserScore",{version:"1.0.0",properties:{score:"1.0.0"}});P("TaskTrackerSDK.onTaskEvent",{version:"1.0.0",properties:{taskId:"1.0.0",params:{tools:{id:"1.0.0",name:"1.0.0",count:"1.0.0",description:"1.0.0",price:{amount:"1.0.0",unit:"1.0.0"}},awards:{id:"1.0.0",name:"1.0.0"}}}})});var Sc,jD,f0,Ic=T(()=>{"use strict";Z();Se();lt();D();Qt();P("login",{version:"1.0.0",properties:{force:"1.0.0"},success:{errMsg:"1.0.0",code:"1.0.0",token:"1.0.0",isLogin:"1.0.0"}});P("checkSession",{version:"1.0.0",success:{errMsg:"1.0.0"}});Sc=pe("login",{implement(){return I(this,null,function*(){var a;let{data:{isLogin:e}}=yield Oe("checkLoginAsync");if(e)return{isLogin:!0,token:(a=A.hostUserInfo)==null?void 0:a.token};Ve("onLoginStateChange",({isLogin:s,token:l,uuid:c})=>{c==r&&i({isLogin:s,token:l})});let t=q("loginSync"),{data:{uuid:r}}=t;if(!r)throw St({code:-1,msg:"login failed"});let{promise:n,resolve:i}=new At,o=yield n;return A.onEnvConfigChanged({hostUserInfo:o}),ue.emit("onLoginComplete",o),o})}}),jD=pe("checkSession",{implement(){return I(this,null,function*(){let{data:{isLogin:e}}=yield Oe("checkLoginAsync");return{isLogin:e}})}}),f0=X();f0.registerCommand("API.login",Sc);f0.registerCommand("API.checkSession",jD)});var Er,ko,Gt,Oo,An,wr,FD,ae,xr=T(()=>{"use strict";D();Er="UNLOCK_OPTIONS_CHANGED",ko="INVOKE_PAYMENT",Gt="ON_PAYMENT_RESULT",Oo="ON_USE_MODAL_EVENT",An="ON_USE_MODAL_RESULT",wr=new tt,FD=()=>({on:wr.on.bind(wr),off:wr.off.bind(wr),emit:wr.emit.bind(wr)}),ae=FD()});var p0=f(Co=>{"use strict";xr();to();jt();Z();Ic();ae.on(Oo,(e,t)=>{e==="ADS-JOLI_COIN"&&console.log("use modal show by frequency");let r=Lb({data:{enableAutoDeduct:t.enableAutoDeduct,userJolicoin:t.userJoliCoin,joliCoinQuantity:t.joliCoinQuantity},buttons:{confirm:{text:t.confirmButtonText,onPress:()=>{ae.emit(An,{useModalResult:"CONFIRM"}),r.destroy()}},cancel:{text:t.cancelButtonText,onPress:({type:n})=>{ae.emit(An,{useModalResult:(n!=null?n:"")==="CANCEL"?"CANCEL":"FAILED"}),r.destroy()}}}})});ae.on(ko,(e,t)=>I(Co,null,function*(){try{e==="ADS-JOLI_COIN"&&console.log("show by frequency");let r=yield BD();if(!r){ae.emit(Gt,{paymentResult:"FAILED"});return}let n=qb({data:{userJolicoin:t.userJoliCoin,joliCoinQuantity:t.joliCoinQuantity,paymentChoices:r.paymentChoices,enableAutoDeduct:r.enableAutoDeduct},buttons:{confirm:{text:t.confirmButtonText,onPress:i=>I(Co,null,function*(){var o;if(!((o=A.hostUserInfo)!=null&&o.isLogin)){let{data:a}=yield Sc();if(!(a!=null&&a.isLogin)){console.log("login failed");return}}console.log("invokeNativePayment",i),ae.emit(Gt,{paymentResult:"SUCCESS"}),n.destroy()})},cancel:{text:t.cancelButtonText,onPress:({type:i})=>{ae.emit(Gt,{paymentResult:(i!=null?i:"")==="CANCEL"?"CANCEL":"FAILED"}),n.destroy()}}}})}catch(r){console.info("payment failed",r),ae.emit(Gt,{paymentResult:"FAILED"})}}));var BD=()=>I(Co,null,function*(){var t;let{response:e}=yield we("/api/joli-coin/balance-detail",{method:"GET",appendHostCookie:!0,responseType:"json"});return(t=e.data)==null?void 0:t.data})});function We(e,t,r){return(t=VD(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VD(e){var t=GD(e,"string");return typeof t=="symbol"?t:t+""}function GD(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Po(e,t,r){return(t=KD(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KD(e){var t=WD(e,"string");return typeof t=="symbol"?t:t+""}function WD(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nL(e){return new Promise(t=>{setTimeout(()=>{t()},e)})}function iL(e){return typeof e=="string"}function oL(e){return typeof e=="undefined"}function aL(e){return oL(e)||e===null}function sL(e){return typeof e=="function"}function M0(e){let t=e,r=null,n=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r||(r=new t(...o)),r};return n.prototype=t.prototype,n}function Sn(e){return function(){var t,r;((r=(t=globalThis.VConsole)==null?void 0:t[e])!=null?r:globalThis.console[e])(...arguments)}}function Lo(e,t){return t.map(r=>{if(r==="params"&&e[r]){let n=e[r];return Object.keys(n).reduce((i,o)=>(i[o]=String(n[o]),i),{})}return e[r]})}function pL(e){let t=e.location?Lo(e.location,_0):null,r=e.target?Lo(e.target,_0):null;return Lo(eL(ZD({},e),{location:t,target:r}),dL)}function hL(e){let t=e.events.map(n=>pL(n)),r=Lo(e.device,fL);return[e.protocolVersion,t,r,e.project]}function mL(){try{if(window.__joliboxLocalStorage__)return window.__joliboxLocalStorage__;let e=Object.getOwnPropertyDescriptor(window,"localStorage");if(e&&e.get){let n=e.get.call(window);return window.__joliboxLocalStorage__=n,n}if(e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(window),"localStorage"),e&&e.get)return e.get.call(window);let t=Window.prototype,r=Object.getOwnPropertyDescriptor(t,"localStorage");if(r&&r.get){let n=r.get.call(window);return window.__joliboxLocalStorage__=n,n}return localStorage}catch(e){return console.warn("Failed to get original localStorage, fallback to default implementation",e),localStorage}}function bL(e){return new Promise(t=>$0(e)(t))}function $0(e){return function(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=!1;return e(i=>{if(!n)return n=!0,t.call(r,i)},null)}}function wL(e,t){return(r=>{let n={onWillAddFirstListener(){r(i.fire,i)}},i=new On(n);return i.event})(function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e(i=>t(i)&&r.call(n,i),null)})}function xL(e,t){let r=Math.min(e.length,t.length);for(let n=0;n<r;n++)AL(e[n],t[n])}function AL(e,t){if(iL(t)){if(typeof e!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(sL(t)){try{if(e instanceof t)return}catch(r){}if(!aL(e)&&e.constructor===t||t.length===1&&t.call(void 0,e)===!0)return;throw new Error("[Jolibox SDK]argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function Rc(e,t,r){return(t=SL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SL(e){var t=IL(e,"string");return typeof t=="symbol"?t:t+""}function IL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function No(e,t,r){return(t=TL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TL(e){var t=RL(e,"string");return typeof t=="symbol"?t:t+""}function RL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bt(e,t,r){return(t=kL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kL(e){var t=OL(e,"string");return typeof t=="symbol"?t:t+""}function OL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CL(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function PL(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}function ML(e,t){return ye(e,0)^45?(((t<<2^ye(e,0))<<2^ye(e,1))<<2^ye(e,2))<<2^ye(e,3):0}function V0(e){return e.trim()}function jL(e,t){return(e=t.exec(e))?e[0]:e}function F(e,t,r){return e.replace(t,r)}function $c(e,t){return e.indexOf(t)}function ye(e,t){return e.charCodeAt(t)|0}function Cn(e,t,r){return e.slice(t,r)}function ct(e){return e.length}function Xc(e){return e.length}function Do(e,t){return t.push(e),e}function FL(e,t){return e.map(t).join("")}function zo(e,t,r,n,i,o,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:Wo,column:Sr,length:a,return:""}}function Tn(e,t){return UL(zo("",null,null,"",null,null,0),e,{length:-e.length},t)}function BL(){return le}function $L(){return le=Le>0?ye(Ir,--Le):0,Sr--,le===10&&(Sr=1,Wo--),le}function Be(){return le=Le<G0?ye(Ir,Le++):0,Sr++,le===10&&(Sr=1,Wo++),le}function ut(){return ye(Ir,Le)}function qo(){return Le}function Nn(e,t){return Cn(Ir,e,t)}function Pn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function K0(e){return Wo=Sr=1,G0=ct(Ir=e),Le=0,[]}function W0(e){return Ir="",e}function Uo(e){return V0(Nn(Le-1,Hc(e===91?e+2:e===40?e+1:e)))}function HL(e){for(;(le=ut())&&le<33;)Be();return Pn(e)>2||Pn(le)>3?"":" "}function JL(e,t){for(;--t&&Be()&&!(le<48||le>102||le>57&&le<65||le>70&&le<97););return Nn(e,qo()+(t<6&&ut()==32&&Be()==32))}function Hc(e){for(;Be();)switch(le){case e:return Le;case 34:case 39:e!==34&&e!==39&&Hc(le);break;case 40:e===41&&Hc(e);break;case 92:Be();break}return Le}function VL(e,t){for(;Be()&&e+le!==57&&!(e+le===84&&ut()===47););return"/*"+Nn(t,Le-1)+"*"+Ko(e===47?e:Be())}function GL(e){for(;!Pn(ut());)Be();return Nn(e,Le)}function KL(e){return W0(Mo("",null,null,null,[""],e=K0(e),0,[0],e))}function Mo(e,t,r,n,i,o,a,s,l){for(var c=0,d=0,u=a,h=0,p=0,m=0,g=1,_=1,v=1,y=0,x="",R=i,C=o,S=n,w=x;_;)switch(m=y,y=Be()){case 40:if(m!=108&&ye(w,u-1)==58){$c(w+=F(Uo(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:w+=Uo(y);break;case 9:case 10:case 13:case 32:w+=HL(m);break;case 92:w+=JL(qo()-1,7);continue;case 47:switch(ut()){case 42:case 47:Do(WL(VL(Be(),qo()),t,r),l);break;default:w+="/"}break;case 123*g:s[c++]=ct(w)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:_=0;case 59+d:v==-1&&(w=F(w,/\f/g,"")),p>0&&ct(w)-u&&Do(p>32?w0(w+";",n,r,u-1):w0(F(w," ","")+";",n,r,u-2),l);break;case 59:w+=";";default:if(Do(S=b0(w,t,r,c,d,i,s,x,R=[],C=[],u),o),y===123)if(d===0)Mo(w,t,S,S,R,o,u,s,C);else switch(h===99&&ye(w,3)===110?100:h){case 100:case 108:case 109:case 115:Mo(e,S,S,n&&Do(b0(e,S,S,0,0,i,s,x,i,R=[],u),C),i,C,u,s,n?R:C);break;default:Mo(w,S,S,S,[""],C,0,s,C)}}c=d=p=0,g=v=1,x=w="",u=a;break;case 58:u=1+ct(w),p=m;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&$L()==125)continue}switch(w+=Ko(y),y*g){case 38:v=d>0?1:(w+="\f",-1);break;case 44:s[c++]=(ct(w)-1)*v,v=1;break;case 64:ut()===45&&(w+=Uo(Be())),h=ut(),d=u=ct(x=w+=GL(qo())),y++;break;case 45:m===45&&ct(w)==2&&(g=0)}}return o}function b0(e,t,r,n,i,o,a,s,l,c,d){for(var u=i-1,h=i===0?o:[""],p=Xc(h),m=0,g=0,_=0;m<n;++m)for(var v=0,y=Cn(e,u+1,u=qL(g=a[m])),x=e;v<p;++v)(x=V0(g>0?h[v]+" "+y:F(y,/&\f/g,h[v])))&&(l[_++]=x);return zo(e,t,r,i===0?Yc:s,l,c,d)}function WL(e,t,r){return zo(e,t,r,H0,Ko(BL()),Cn(e,2,-2),0)}function w0(e,t,r,n){return zo(e,t,r,Qc,Cn(e,0,n),Cn(e,n+1,-1),n)}function Ar(e,t){for(var r="",n=Xc(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function zL(e,t,r,n){switch(e.type){case LL:if(e.children.length)break;case DL:case Qc:return e.return=e.return||e.value;case H0:return"";case J0:return e.return=e.value+"{"+Ar(e.children,n)+"}";case Yc:e.value=e.props.join(",")}return ct(r=Ar(e.children,n))?e.return=e.value+"{"+r+"}":""}function YL(e){var t=Xc(e);return function(r,n,i,o){for(var a="",s=0;s<t;s++)a+=e[s](r,n,i,o)||"";return a}}function QL(e){return function(t){t.root||(t=t.return)&&e(t)}}function XL(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}function z0(e,t){switch(ML(e,t)){case 5103:return j+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return j+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return j+e+Bo+e+Ae+e+e;case 6828:case 4268:return j+e+Ae+e+e;case 6165:return j+e+Ae+"flex-"+e+e;case 5187:return j+e+F(e,/(\w+).+(:[^]+)/,j+"box-$1$2"+Ae+"flex-$1$2")+e;case 5443:return j+e+Ae+"flex-item-"+F(e,/flex-|-self/,"")+e;case 4675:return j+e+Ae+"flex-line-pack"+F(e,/align-content|flex-|-self/,"")+e;case 5548:return j+e+Ae+F(e,"shrink","negative")+e;case 5292:return j+e+Ae+F(e,"basis","preferred-size")+e;case 6060:return j+"box-"+F(e,"-grow","")+j+e+Ae+F(e,"grow","positive")+e;case 4554:return j+F(e,/([^-])(transform)/g,"$1"+j+"$2")+e;case 6187:return F(F(F(e,/(zoom-|grab)/,j+"$1"),/(image-set)/,j+"$1"),e,"")+e;case 5495:case 3959:return F(e,/(image-set\([^]*)/,j+"$1$`$1");case 4968:return F(F(e,/(.+:)(flex-)?(.*)/,j+"box-pack:$3"+Ae+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+j+e+e;case 4095:case 3583:case 4068:case 2532:return F(e,/(.+)-inline(.+)/,j+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ct(e)-1-t>6)switch(ye(e,t+1)){case 109:if(ye(e,t+4)!==45)break;case 102:return F(e,/(.+:)(.+)-([^]+)/,"$1"+j+"$2-$3$1"+Bo+(ye(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~$c(e,"stretch")?z0(F(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ye(e,t+1)!==115)break;case 6444:switch(ye(e,ct(e)-3-(~$c(e,"!important")&&10))){case 107:return F(e,":",":"+j)+e;case 101:return F(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+j+(ye(e,14)===45?"inline-":"")+"box$3$1"+j+"$2$3$1"+Ae+"$2box$3")+e}break;case 5936:switch(ye(e,t+11)){case 114:return j+e+Ae+F(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return j+e+Ae+F(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return j+e+Ae+F(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return j+e+Ae+e+e}return e}function sq(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function $o(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return Dt={name:i.name,styles:i.styles,next:Dt},i.name;var o=r;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)Dt={name:a.name,styles:a.styles,next:Dt},a=a.next;var s=o.styles+";";return s}return dq(e,t,r)}}var l=r;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function dq(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=$o(e,t,r[i])+";";else for(var o in r){var a=r[o];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?n+=o+"{"+t[s]+"}":x0(s)&&(n+=kc(o)+":"+A0(o,s)+";")}else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)x0(a[l])&&(n+=kc(o)+":"+A0(o,a[l])+";");else{var c=$o(e,t,a);switch(o){case"animation":case"animationName":{n+=kc(o)+":"+c+";";break}default:n+=o+"{"+c+"}"}}}return n}function Oc(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";Dt=void 0;var o=e[0];if(o==null||o.raw===void 0)n=!1,i+=$o(r,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=$o(r,t,e[s]),n){var l=o;i+=l[s]}S0.lastIndex=0;for(var c="",d;(d=S0.exec(i))!==null;)c+="-"+d[1];var u=sq(i)+c;return{name:u,styles:i,next:Dt}}function Q0(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}function I0(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function T0(e,t,r){var n=[],i=Q0(e,n,r);return n.length<2?r:i+t(n)}function Z0(e,t){se.__h&&se.__h(De,e,Jc||t),Jc=0;var r=De.__H||(De.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function gq(e,t){var r=Z0(Ho++,3);!se.__s&&ew(r.__H,t)&&(r.__=e,r.u=t,De.__H.__h.push(r))}function _q(e){return Jc=5,Zc(function(){return{current:e}},[])}function Zc(e,t){var r=Z0(Ho++,7);return ew(r.__H,t)&&(r.__=e(),r.__H=t,r.__h=e),r.__}function yq(){for(var e;e=X0.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(jo),e.__H.__h.forEach(Vc),e.__H.__h=[]}catch(t){e.__H.__h=[],se.__e(t,e.__v)}}function bq(e){var t,r=function(){clearTimeout(n),L0&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);L0&&(t=requestAnimationFrame(r))}function jo(e){var t=De,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),De=t}function Vc(e){var t=De;e.__c=e.__(),De=t}function ew(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Yo(){if(Lt>1)Lt--;else{for(var e,t=!1;Rn!==void 0;){var r=Rn;for(Rn=void 0,Gc++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&rw(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Gc=0,Lt--,t)throw e}}function ze(e){if(Lt>0)return e();Lt++;try{return e()}finally{Yo()}}function tw(e){if(H!==void 0){var t=e.n;if(t===void 0||t.t!==H)return t={i:0,S:e,p:H.s,n:void 0,t:H,e:void 0,x:void 0,r:t},H.s!==void 0&&(H.s.n=t),H.s=t,e.n=t,32&H.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=H.s,t.n=void 0,H.s.n=t,H.s=t),t}}function be(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}function _e(e){return new be(e)}function rw(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function nw(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function iw(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Tr(e){be.call(this,void 0),this.x=e,this.s=void 0,this.g=Jo-1,this.f=4}function kn(e){return new Tr(e)}function ow(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Lt++;var r=H;H=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,eu(e),n}finally{H=r,Yo()}}}function eu(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ow(e)}function Eq(e){if(H!==this)throw new Error("Out-of-order effect");iw(this),H=e,this.f&=-2,8&this.f&&eu(this),Yo()}function Ln(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}function Rr(e){var t=new Ln(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}function kr(e,t){O[e]=t.bind(null,O[e]||function(){})}function Vo(e){Pc&&Pc(),Pc=e&&e.S()}function lw(e){var t=this,r=e.data,n=cw(r);n.value=r;var i=Zc(function(){for(var s=t,l=t.__v;l=l.__;)if(l.__c){l.__c.__$f|=4;break}var c=kn(function(){var p=n.value.value;return p===0?0:p===!0?"":p||""}),d=kn(function(){return!Array.isArray(c.value)&&!Ka(c.value)}),u=Rr(function(){if(this.N=uw,d.value){var p=c.value;s.__v&&s.__v.__e&&s.__v.__e.nodeType===3&&(s.__v.__e.data=p)}}),h=t.__$u.d;return t.__$u.d=function(){u(),h.call(this)},[d,c]},[]),o=i[0],a=i[1];return o.value?a.peek():a.value}function xq(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,o=_e(r);return{o:function(a,s){o.value=a,n=s},d:Rr(function(){this.N=uw;var a=o.value.value;n[t]!==a&&(n[t]=a,i?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}function cw(e){return Zc(function(){return _e(e)},[])}function Iq(){ze(function(){for(var e;e=aw.shift();)tu.call(e)})}function Tq(){aw.push(this)===1&&(O.requestAnimationFrame||Aq)(Iq)}function Rq(){ze(function(){for(var e;e=sw.shift();)tu.call(e)})}function uw(){sw.push(this)===1&&(O.requestAnimationFrame||Sq)(Rq)}function kq(e){var t=_q(e);t.current=e,gq(function(){return Rr(function(){return this.N=Tq,t.current()})},[])}function Oq(e,t){let r=Hs(e);$s(()=>{r.current=e},[e]),Bs(()=>{if(t===null)return;let n=setInterval(()=>{r.current()},t);return()=>{clearInterval(n)}},[t])}function he(e,t,r,n,i,o){t||(t={});var a,s,l=t;if("ref"in l)for(s in l={},t)s=="ref"?a=t[s]:l[s]=t[s];var c={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Cq,__i:-1,__u:0,__source:i,__self:o};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return O.vnode&&O.vnode(c),c}function wt(e,t,r){return(t=Hq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Hq(e){var t=Jq(e,"string");return typeof t=="symbol"?t:t+""}function Jq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kt(e,t,r){return(t=Vq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vq(e){var t=Gq(e,"string");return typeof t=="symbol"?t:t+""}function Gq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var h0,$D,HD,JD,Nc,Dc,q0,zD,YD,m0,QD,XD,v0,ZD,eL,tL,U0,rL,lL,cL,g0,uL,j0,F0,B0,_0,dL,fL,Lc,W,vL,gL,In,On,_L,Uc,yL,Tc,EL,Mc,y0,jc,Fc,Bc,NL,Ae,Bo,j,H0,Yc,Qc,DL,J0,LL,qL,Ko,UL,Wo,Sr,G0,Le,le,Ir,ZL,eq,tq,E0,rq,nq,iq,oq,aq,lq,cq,uq,Y0,x0,kc,A0,S0,Dt,fq,pq,hq,mq,vq,Dn,Ho,De,Cc,R0,Jc,X0,se,k0,O0,C0,P0,N0,D0,L0,wq,H,Rn,Lt,Gc,Jo,tu,Pc,aw,sw,Aq,Sq,Ne,Cq,Pq,Et,Kc,Wc,Fo,Nq,Dq,Lq,qq,Uq,Mq,jq,Fq,Bq,$q,zc,Go,S4,dw=T(()=>{"use strict";er();zs();h0=Object.getOwnPropertySymbols,$D=Object.prototype.hasOwnProperty,HD=Object.prototype.propertyIsEnumerable,JD=(e,t)=>{var r={};for(var n in e)$D.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&h0)for(var n of h0(e))t.indexOf(n)<0&&HD.call(e,n)&&(r[n]=e[n]);return r};Nc=class{constructor(t){We(this,"context",void 0),We(this,"continueCallback",void 0),We(this,"isBeforeAdCalled",!1),We(this,"isBeforeRewardCalled",!1),We(this,"isAdDismissedCalled",!1),We(this,"isAdViewedCalled",!1),We(this,"isAfterAdCalled",!1),We(this,"currentProvider",void 0),We(this,"currentClientParams",void 0),We(this,"adsHasResponse",!1),We(this,"videoChecker",window.document.createElement("video")),We(this,"wrapShowAdFn",r=>()=>{this.adsHasResponse=!0;let n=!1;this.videoChecker.play().catch(()=>{n=!1}),n=!this.videoChecker.paused,this.videoChecker.pause(),this.context.track("CallShowAdFn",Object.assign({},{userEvent:n},this.paramsToTrack)),r()}),this.context=t}get paramsToTrack(){var t,r,n,i,o,a;return{provider:(r=(t=this.currentProvider)==null?void 0:t.name)!=null?r:null,type:(n=this.currentClientParams)==null?void 0:n.type,name:((i=this.currentClientParams)==null?void 0:i.type)==="preroll"?null:(a=(o=this.currentClientParams)==null?void 0:o.name)!=null?a:""}}wrapBeforeAd(t){return()=>{this.adsHasResponse=!0,this.context.track("CallBeforeAd",this.paramsToTrack),this.isBeforeAdCalled||(this.isBeforeAdCalled=!0,t==null||t())}}wrapBeforeReward(t){return r=>{this.adsHasResponse=!0,this.isBeforeRewardCalled?this.wrapShowAdFn(r)():(this.isBeforeRewardCalled=!0,t==null||t(this.wrapShowAdFn(r)))}}wrapAdDismissed(t){return()=>{this.adsHasResponse=!0,this.isAdDismissedCalled||(this.isAdDismissedCalled=!0,t==null||t())}}wrapAdViewed(t){return()=>{this.adsHasResponse=!0,this.isAdViewedCalled||(this.isAdViewedCalled=!0,t==null||t())}}wrapAfterAd(t){return()=>{this.adsHasResponse=!0,this.context.track("CallAfterAd",this.paramsToTrack),this.isAfterAdCalled||(this.isAfterAdCalled=!0,t==null||t())}}wrapAdBreakDone(t){return r=>{var n,i,o,a,s;switch(this.adsHasResponse=!0,this.context.track("CallAdBreakDone",{provider:(i=(n=this.currentProvider)==null?void 0:n.name)!=null?i:null,breakType:r.breakType,breakName:(o=r.breakName)!=null?o:"",breakFormat:r.breakFormat,breakStatus:r.breakStatus}),r.breakStatus){case"viewed":case"ignored":case"dismissed":case"error":{t==null||t(r),(a=this.continueCallback)==null||a.call(this,[!1,r]);break}default:{(s=this.continueCallback)==null||s.call(this,[!0,r]);break}}}}callAdBreakAndContinue(t,r,n){return I(this,null,function*(){return this.currentProvider=t,this.currentClientParams=r,this.adsHasResponse=!1,new Promise(i=>{this.continueCallback=i;let o;switch(r.type){case"preroll":{o={type:r.type,adBreakDone:this.wrapAdBreakDone(r.adBreakDone)};break}case"reward":{o={name:r.name,type:r.type,beforeAd:this.wrapBeforeAd(r.beforeAd),beforeReward:this.wrapBeforeReward(r.beforeReward),adDismissed:this.wrapAdDismissed(r.adDismissed),adViewed:this.wrapAdViewed(r.adViewed),afterAd:this.wrapAfterAd(r.afterAd),adBreakDone:this.wrapAdBreakDone(r.adBreakDone)};break}default:{o={name:r.name,type:r.type,beforeAd:this.wrapBeforeAd(r.beforeAd),afterAd:this.wrapAfterAd(r.afterAd),adBreakDone:this.wrapAdBreakDone(r.adBreakDone)};break}}window.setTimeout(()=>{var a,s,l,c;this.adsHasResponse||(this.context.track("CallAdBreakTimeout",{type:r.type,provider:(s=(a=this.currentProvider)==null?void 0:a.name)!=null?s:null}),(c=this.continueCallback)==null||c.call(this,[!0,{breakType:r.type,breakName:r.type==="preroll"?"":(l=r.name)!=null?l:"",breakFormat:r.type==="reward"?"reward":"interstitial",breakStatus:"timeout"}]))},5e3),this.context.track("CallAdBreak",this.paramsToTrack),t.adBreak(o,n),window.JoliTesterBridge&&console.log("joli-fullscreen-ad-show")})})}};Dc=class{constructor(t){Po(this,"context",void 0),Po(this,"adBreakIsShowing",!1),Po(this,"reportPageJumpOut",()=>{this.context.track("AdBreakJumpOut",{context:"AdsActionDetection"})}),Po(this,"reportPageHide",()=>{this.context.track("AdBreakHide",{context:"AdsActionDetection"})}),this.context=t,window.addEventListener("visibilitychange",()=>{document.hidden&&this.adBreakIsShowing&&this.reportPageHide()}),window.addEventListener("beforeunload",r=>{this.adBreakIsShowing&&this.reportPageJumpOut()})}},q0=Object.defineProperty,zD=Object.defineProperties,YD=Object.getOwnPropertyDescriptors,m0=Object.getOwnPropertySymbols,QD=Object.prototype.hasOwnProperty,XD=Object.prototype.propertyIsEnumerable,v0=(e,t,r)=>t in e?q0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ZD=(e,t)=>{for(var r in t||(t={}))QD.call(t,r)&&v0(e,r,t[r]);if(m0)for(var r of m0(t))XD.call(t,r)&&v0(e,r,t[r]);return e},eL=(e,t)=>zD(e,YD(t)),tL=(e,t)=>{for(var r in t)q0(e,r,{get:t[r],enumerable:!0})},U0=(e,t,r,n)=>{for(var i=t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=a(i)||i);return i},rL=(e,t,r)=>new Promise((n,i)=>{var o=l=>{try{s(r.next(l))}catch(c){i(c)}},a=l=>{try{s(r.throw(l))}catch(c){i(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,a);s((r=r.apply(e,t)).next())});if(typeof window!="undefined"&&!window.AbortController){let e=function(){this.signal=new t};e.prototype.abort=function(){this.signal._aborted=!0,typeof this.signal.onabort=="function"&&this.signal.onabort(new Event("abort"));let r=new Event("abort");this.signal.dispatchEvent(r)};let t=function(){this._aborted=!1,this.aborted=!1,this.onabort=null,this._eventListeners={}};Object.defineProperty(t.prototype,"aborted",{get:function(){return this._aborted}}),t.prototype.addEventListener=function(r,n){this._eventListeners[r]||(this._eventListeners[r]=[]),this._eventListeners[r].push(n)},t.prototype.removeEventListener=function(r,n){if(!this._eventListeners[r])return;let i=this._eventListeners[r].indexOf(n);i!==-1&&this._eventListeners[r].splice(i,1)},t.prototype.dispatchEvent=function(r){if(this._eventListeners[r.type])for(let n of this._eventListeners[r.type])n.call(this,r)},window.AbortController=e,window.AbortSignal=t}lL=(e=>(e[e.DEVELOPER_FILE_NOT_FOUND=0]="DEVELOPER_FILE_NOT_FOUND",e[e.INTERNAL_IOS_CAN_NOT_FOUND_PKG=1]="INTERNAL_IOS_CAN_NOT_FOUND_PKG",e[e.USER_IOS_LOAD_TIMEOUT=2]="USER_IOS_LOAD_TIMEOUT",e[e.INTERNAL_IOS_PKG_LOAD_ERROR=3]="INTERNAL_IOS_PKG_LOAD_ERROR",e[e.INTERNAL_IOS_PKG_PARSE_FAIL=4]="INTERNAL_IOS_PKG_PARSE_FAIL",e[e.USER_IOS_GET_EMPTY_DATA=5]="USER_IOS_GET_EMPTY_DATA",e[e.USER_ANDROID_GET_PKG_FAIL=6]="USER_ANDROID_GET_PKG_FAIL",e[e.DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE=7]="DEVELOPER_ANDROID_PACKAGE_FILE_UNEXPECTED_REQUIRE",e))(lL||{});cL={log:Sn("log"),warn:Sn("warn"),info:Sn("info"),error:Sn("error"),debug:Sn("debug")};Object.assign(globalThis,{logger:cL});g0=Symbol.for("Jolibox.canIUseMap"),uL={};globalThis[g0]||(globalThis[g0]=uL);j0=(e=>(e[e.System=1e3]="System",e[e.ErrorTrace=1001]="ErrorTrace",e[e.UserDefined=1002]="UserDefined",e))(j0||{}),F0=(e=>(e.MiniGame="mini-game",e.MiniDrama="mini-drama",e.App="app",e.WebSDK="web-sdk",e.AppSDK="app-sdk",e))(F0||{}),B0=(e=>(e[e.App=0]="App",e[e.H5=1]="H5",e[e.Weapp=2]="Weapp",e[e.Alipay=3]="Alipay",e[e.Gcash=4]="Gcash",e[e.Dana=5]="Dana",e[e.Umma=6]="Umma",e[e.WebSDK=1e3]="WebSDK",e[e.AppSDK=1001]="AppSDK",e[e.Other=9999]="Other",e))(B0||{}),_0=["name","params"],dL=["name","type","location","target","extra","timestamp","userId"],fL=["platform","os","appVersion","appId","model","brand","uuid","jsSdkVersion","extra"];mL();navigator.userAgent.includes("iPhone")||navigator.userAgent.includes("iPod")||navigator.userAgent.includes("iPad")||navigator.userAgent.includes("iPhone OS"),navigator.userAgent.includes("Android"),navigator.userAgent.includes("Mac"),navigator.userAgent.includes("FB_IAB"),!navigator.userAgent.includes("iPhone")&&navigator.userAgent.includes("Android");Lc=class qc{constructor(t){this.element=t,this.next=qc.Undefined,this.prev=qc.Undefined}};Lc.Undefined=new Lc(void 0);W=Lc,vL=class{constructor(){this._first=W.Undefined,this._last=W.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===W.Undefined}clear(){let e=this._first;for(;e!==W.Undefined;){let t=e.next;e.prev=W.Undefined,e.next=W.Undefined,e=t}this._first=W.Undefined,this._last=W.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new W(e);if(this._first===W.Undefined)this._first=r,this._last=r;else if(t){let i=this._last;this._last=r,r.prev=i,i.next=r}else{let i=this._first;this._first=r,r.next=i,i.prev=r}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(r))}}shift(){if(this._first!==W.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==W.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==W.Undefined&&e.next!==W.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===W.Undefined&&e.next===W.Undefined?(this._first=W.Undefined,this._last=W.Undefined):e.next===W.Undefined?(this._last=this._last.prev,this._last.next=W.Undefined):e.prev===W.Undefined&&(this._first=this._first.next,this._first.prev=W.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==W.Undefined;)yield e.element,e=e.next}},gL=0,In=class{constructor(e){this.value=e,this.id=gL++}},On=class{constructor(e){this.options=e,this._size=0}dispose(e){var t,r;this._disposed||(this._disposed=!0,this._listeners&&(e?(this._listeners instanceof In&&(this._listeners=[this._listeners]),this._listeners=this._listeners.filter(n=>(n==null?void 0:n.value)===e)):(this._listeners=void 0,this._size=0)),(r=(t=this.options)==null?void 0:t.onDidRemoveLastListener)==null||r.call(t))}get event(){return this._event!=null||(this._event=(e,t)=>{var r,n,i,o,a,s;if(this._disposed)return()=>{console.info("[Jolibox SDK] Emitter is _disposed")};t&&(e=e.bind(t));let l=new In(e);return this._listeners?this._listeners instanceof In?this._listeners=[this._listeners,l]:this._listeners.push(l):((n=(r=this.options)==null?void 0:r.onWillAddFirstListener)==null||n.call(r,this),this._listeners=l,(o=(i=this.options)==null?void 0:i.onDidFirstListener)==null||o.call(i,this)),(s=(a=this.options)==null?void 0:a.onDidAddListener)==null||s.call(a,this),this._size++,()=>{var c,d,u,h;if(!this._disposed){if(this._listeners instanceof In)this._listeners.id===l.id&&(this._listeners=void 0,this._size=0,(d=(c=this.options)==null?void 0:c.onDidRemoveLastListener)==null||d.call(c));else if(this._listeners){let p=this._listeners.indexOf(l);p>=0&&(this._listeners.splice(p,1),this._size--,this._size===0&&((h=(u=this.options)==null?void 0:u.onDidRemoveLastListener)==null||h.call(u)))}}}}),this._event}_deliver(e,t){var r;if(!e)return;let n=((r=this.options)==null?void 0:r.onListenerError)||Error.constructor;if(!n){e.value(t);return}try{e.value(t)}catch(i){n(i)}}fire(e){this._listeners&&(this._listeners instanceof In?this._deliver(this._listeners,e):this._listeners.forEach(t=>this._deliver(t,e)))}hasListeners(){return this._size>0}},_L=class{constructor(){this.listeners=new Map,this.listerHandlerMap=new WeakMap,this.cachedEventQueue=new Map}on(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;var n;let i=(n=this.listeners.get(e))!=null?n:new On,o=l=>t(...l.args),a=i.event(o);this.listerHandlerMap.set(t,{handler:o,dispose:a}),this.listeners.set(e,i);let s=this.cachedEventQueue.get(e);if(s&&r)for(let l of s)t(...l.args)}flushCachedEvent(e){e?this.cachedEventQueue.delete(e):this.cachedEventQueue.clear()}off(e,t){let r=this.listerHandlerMap.get(t);r&&(r.dispose(),this.listerHandlerMap.delete(t))}emit(e){let t=this.listeners.get(e),r=this.cachedEventQueue.get(e);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];r||(r=new vL,this.cachedEventQueue.set(e,r)),r.push({args:i}),t&&t.fire({event:e,args:i})}once(e,t){var r=this;let n=function(){t(...arguments),r.off(e,n)};this.on(e,n,!1)}},Uc={};tL(Uc,{None:()=>yL,filter:()=>wL,once:()=>$0,toPromise:()=>bL});yL=()=>(console.log("[Jolibox SDK] None Event"),()=>{console.log("[Jolibox SDK] None Event dispose")});Tc=Symbol.for("Jolibox.hostEmitter"),EL=()=>{let e=new _L;return globalThis[Tc]||(globalThis[Tc]={on:e.on.bind(e),off:e.off.bind(e),emit:e.emit.bind(e),once:e.once.bind(e)}),globalThis[Tc]};EL();Mc=class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new On,this.onDidRegisterCommand=this._onDidRegisterCommand.event,console.log("[Jolibox SDK] command registry")}registerCommand(e){if(!e)throw new Error("invalid command");if(e.metadata&&Array.isArray(e.metadata.args)){let r=[];for(let i of e.metadata.args)r.push(i.constraint);let n=e.handler;e.handler=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return xL(o,r),n(...o)}}let{id:t}=e;this._commands.get(t)&&console.info(`[Jolibox SDK] duplicated command is registered ${t}`),this._commands.set(t,e),this._onDidRegisterCommand.fire(t)}getCommand(e){return this._commands.get(e)}getCommands(){let e=new Map;for(let t of this._commands.keys()){let r=this.getCommand(t);r&&e.set(t,r)}return e}};Mc=U0([M0],Mc);y0=class{constructor(){this._onWillExecuteCommand=new On,this.onWillExecuteCommand=this._onWillExecuteCommand.event,this._onDidExecuteCommand=new On,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this.registry=new Mc,this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=nL(3e4)),this._starActivation}executeCommand(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return rL(this,null,function*(){return this.registry.getCommand(e)?this._tryExecuteCommand(e,r):(yield Promise.all([Promise.race([this._activateStar(),Uc.toPromise(Uc.filter(this.registry.onDidRegisterCommand,i=>i===e))])]),this._tryExecuteCommand(e,r))})}executeCommandThowErr(e){if(!this.registry.getCommand(e))throw new Error(`command '${e}' not found`);let t=this.registry.getCommand(e);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];this._onWillExecuteCommand.fire({commandId:e,args:n});let o=this.invokeFunction(t.handler,...n);return this._onDidExecuteCommand.fire({commandId:e,args:n}),o}_tryExecuteCommand(e,t){let r=this.registry.getCommand(e);if(!r)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});let n=this.invokeFunction(r.handler,...t);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}invokeFunction(e){try{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e(...r)}finally{}}};y0=U0([M0],y0);jc=class{constructor(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GAME";Rc(this,"context",void 0),Rc(this,"placement","GAME"),Rc(this,"contextInfo",void 0),this.context=t,this.placement=r,this.contextInfo=this.context.getContextInfo()}getLocation(){let t=new URLSearchParams(window.location.search),r={};return t.forEach((n,i)=>{r[i]=n}),{name:this.placement==="GAME"?"GamePage":"DramaPage",params:r}}getDevice(){var t,r,n,i;return{platform:(t=this.contextInfo.platform)!=null?t:B0.WebSDK,os:this.contextInfo.osType+"_"+this.contextInfo.runtimeType,appVersion:"1.0.0",appId:(r=this.contextInfo.hostAppId)!=null?r:"1",model:(n=this.contextInfo.deviceModel)!=null?n:"UnknownModel",brand:(i=this.contextInfo.deviceBrand)!=null?i:"UnknownBrand",uuid:this.contextInfo.deviceId,jsSdkVersion:"1.0.0",extra:{}}}serialize(t,r){var n;let i={protocolVersion:"1.0.0",events:[{name:t,type:j0.System,location:this.getLocation(),target:null,extra:r,timestamp:Date.now(),userId:(n=this.contextInfo.userId)!=null?n:null}],device:this.getDevice(),project:F0.WebSDK};return hL(i)}};Fc=class{constructor(t){No(this,"configs",null),No(this,"firstRun",!0),No(this,"context",void 0),No(this,"contextInfo",void 0),this.context=t,this.contextInfo=this.context.getContextInfo(),this.init()}init(){return I(this,null,function*(){try{this.configs=yield this.context.httpClient.get("/api/fe-configs/js-sdk/ads-channel-config",{})}catch(t){}})}shouldBypassCallingInterstitial(){var t,r;let n;if(!this.configs)this.init(),n=!this.firstRun;else{let i=(t=this.contextInfo.channel)!=null?t:"",o=this.configs[i],a=(r=o==null?void 0:o.interstitialRate)!=null?r:1;n=Math.random()<a}return this.firstRun=!1,n}};Bc=class{constructor(t,r){bt(this,"name","ADSENSE"),bt(this,"context",void 0),bt(this,"contextInfo",void 0),bt(this,"configured",!1),bt(this,"initParams",void 0),bt(this,"push",function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};window.adsbygoogle.push(n)}),bt(this,"adConfig",n=>{let i=n,{onReady:o}=i,a=JD(i,["onReady"]);this.context.track("CallAdConfig",a),this.configured?console.warn("Ad config already set, skipping"):(this.configured=!0,this.push(n))}),bt(this,"adBreak",n=>{if(!this.contextInfo.objectId){console.warn("Game ID is not set, skip calling adBreak");return}this.push(n)}),bt(this,"adUnit",n=>I(this,null,function*(){var i,o,a,s;if(this.context.track("CallAdUnit",{adFormat:(o=(i=n.adFormat)==null?void 0:i.toString())!=null?o:null,fullWidthResponsive:(a=n.fullWidthResponsive)!=null?a:null}),document.querySelector("#jolibox-ads")){console.warn("Ad unit already set, skipping");return}let{el:l,slot:c,adFormat:d,fullWidthResponsive:u,style:h}=n,p;if(!l)throw new Error("targeting element is required");if(typeof l=="string"?p=document.querySelector(l):p=l,!p)throw new Error("targeting element not found");let m=c;if(m||(m=this.initParams.unitId),!m)throw new Error("slot is required");let g=typeof d=="object"&&Array.isArray(d)?d.join(", "):d,_=document.createElement("ins");if(_.className="adsbygoogle",_.id="jolibox-ads",_.style.display="block",_.setAttribute("data-ad-client",this.initParams.clientId),_.setAttribute("data-ad-slot",m),g&&_.setAttribute("data-ad-format",g),u&&_.setAttribute("data-full-width-responsive",u),h&&_.setAttribute("style",h),(s=this.contextInfo.testAdsMode)!=null?s:!1){let v=document.createElement("div");v.style.position="absolute",v.style.top="0",v.style.left="0",v.style.width="100%",v.style.height="100%",v.style.display="flex",v.style.justifyContent="center",v.style.alignItems="center",v.style.backgroundColor="rgba(0, 0, 0, 0.5)",v.style.color="white",v.innerHTML="Test Ad",_.style.position="relative",p.appendChild(_),_.appendChild(v)}else p.appendChild(_),new MutationObserver(v=>{v.forEach(y=>{if(y.type==="attributes"&&y.attributeName==="data-ad-status"){let x=_.getAttribute("data-ad-status");this.context.track("AdSenseUnitStatusChanged",{status:x!=null?x:"null"})}})}).observe(_,{attributes:!0,attributeFilter:["data-ad-status"]}),this.push({})})),this.context=t,this.contextInfo=this.context.getContextInfo(),this.initParams=r,window.adsbygoogle=window.adsbygoogle||[]}init(){return I(this,null,function*(){var t;if(this.context.track("CallAdsInit",{provider:this.name}),typeof window=="undefined")return;let r="google-adsense",n=(t=this.contextInfo.testAdsMode)!=null?t:!1;if(!document.getElementById(r)&&this.initParams.clientId){let i=document.createElement("script");i.id=r,i.async=!0,i.crossOrigin="anonymous",i.src=`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${this.initParams.clientId}`,n&&i.setAttribute("data-adbreak-test","on"),this.initParams.channelId&&i.setAttribute("data-ad-channel",this.initParams.channelId),document.head.appendChild(i),this.context.track("LoadAdsenseCompleted",null)}})}};NL=function(){function e(r){var n=this;this._insertTag=function(i){var o;n.tags.length===0?n.insertionPoint?o=n.insertionPoint.nextSibling:n.prepend?o=n.container.firstChild:o=n.before:o=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,o),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(PL(this));var n=this.tags[this.tags.length-1];if(this.isSpeedy){var i=CL(n);try{i.insertRule(r,i.cssRules.length)}catch(o){}}else n.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var n;return(n=r.parentNode)==null?void 0:n.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Ae="-ms-",Bo="-moz-",j="-webkit-",H0="comm",Yc="rule",Qc="decl",DL="@import",J0="@keyframes",LL="@layer",qL=Math.abs,Ko=String.fromCharCode,UL=Object.assign;Wo=1,Sr=1,G0=0,Le=0,le=0,Ir="";ZL=function(e,t,r){for(var n=0,i=0;n=i,i=ut(),n===38&&i===12&&(t[r]=1),!Pn(i);)Be();return Nn(e,Le)},eq=function(e,t){var r=-1,n=44;do switch(Pn(n)){case 0:n===38&&ut()===12&&(t[r]=1),e[r]+=ZL(Le-1,t,r);break;case 2:e[r]+=Uo(n);break;case 4:if(n===44){e[++r]=ut()===58?"&\f":"",t[r]=e[r].length;break}default:e[r]+=Ko(n)}while(n=Be());return e},tq=function(e,t){return W0(eq(K0(e),t))},E0=new WeakMap,rq=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(e.props.length===1&&t.charCodeAt(0)!==58&&!E0.get(r))&&!n){E0.set(e,!0);for(var i=[],o=tq(t,i),a=r.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},nq=function(e){if(e.type==="decl"){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return="",e.value="")}};iq=function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Qc:e.return=z0(e.value,e.length);break;case J0:return Ar([Tn(e,{value:F(e.value,"@","@"+j)})],n);case Yc:if(e.length)return FL(e.props,function(i){switch(jL(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ar([Tn(e,{props:[F(i,/:(read-\w+)/,":"+Bo+"$1")]})],n);case"::placeholder":return Ar([Tn(e,{props:[F(i,/:(plac\w+)/,":"+j+"input-$1")]}),Tn(e,{props:[F(i,/:(plac\w+)/,":"+Bo+"$1")]}),Tn(e,{props:[F(i,/:(plac\w+)/,Ae+"input-$1")]})],n)}return""})}},oq=[iq],aq=function(e){var t=e.key;if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var g=m.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var n=e.stylisPlugins||oq,i={},o,a=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(m){for(var g=m.getAttribute("data-emotion").split(" "),_=1;_<g.length;_++)i[g[_]]=!0;a.push(m)});var s,l=[rq,nq];{var c,d=[zL,QL(function(m){c.insert(m)})],u=YL(l.concat(n,d)),h=function(m){return Ar(KL(m),u)};s=function(m,g,_,v){c=_,h(m?m+"{"+g.styles+"}":g.styles),v&&(p.inserted[g.name]=!0)}}var p={key:t,sheet:new NL({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(a),p};lq={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},cq=/[A-Z]|^ms/g,uq=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Y0=function(e){return e.charCodeAt(1)===45},x0=function(e){return e!=null&&typeof e!="boolean"},kc=XL(function(e){return Y0(e)?e:e.replace(cq,"-$&").toLowerCase()}),A0=function(e,t){switch(e){case"animation":case"animationName":if(typeof t=="string")return t.replace(uq,function(r,n,i){return Dt={name:n,styles:i,next:Dt},n})}return lq[e]!==1&&!Y0(e)&&typeof t=="number"&&t!==0?t+"px":t};S0=/label:\s*([^\s;{]+)\s*(;|$)/g;fq=function(e,t,r){var n=e.key+"-"+t.name;e.registered[n]===void 0&&(e.registered[n]=t.styles)},pq=function(e,t,r){fq(e,t);var n=e.key+"-"+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?"."+n:"",i,e.sheet,!0),i=i.next;while(i!==void 0)}};hq=function(e){var t=aq(e);t.sheet.speedy=function(a){this.isSpeedy=a},t.compat=!0;var r=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Oc(s,t.registered,void 0);return pq(t,c),t.key+"-"+c.name},n=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Oc(s,t.registered),d="animation-"+c.name;return I0(t,{name:c.name,styles:"@keyframes "+d+"{"+c.styles+"}"}),d},i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=Oc(s,t.registered);I0(t,c)},o=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return T0(t.registered,r,mq(s))};return{css:r,cx:o,injectGlobal:i,keyframes:n,hydrate:function(a){a.forEach(function(s){t.inserted[s]=!0})},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:Q0.bind(null,t.registered),merge:T0.bind(null,t.registered,r)}},mq=function e(t){for(var r="",n=0;n<t.length;n++){var i=t[n];if(i!=null){var o=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))o=e(i);else{o="";for(var a in i)i[a]&&a&&(o&&(o+=" "),o+=a)}break}default:o=i}o&&(r&&(r+=" "),r+=o)}}return r},vq=hq({key:"css"}),Dn=vq.css,Jc=0,X0=[],se=O,k0=se.__b,O0=se.__r,C0=se.diffed,P0=se.__c,N0=se.unmount,D0=se.__;se.__b=function(e){De=null,k0&&k0(e)},se.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),D0&&D0(e,t)},se.__r=function(e){O0&&O0(e),Ho=0;var t=(De=e.__c).__H;t&&(Cc===De?(t.__h=[],De.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(t.__h.forEach(jo),t.__h.forEach(Vc),t.__h=[],Ho=0)),Cc=De},se.diffed=function(e){C0&&C0(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(X0.push(t)!==1&&R0===se.requestAnimationFrame||((R0=se.requestAnimationFrame)||bq)(yq)),t.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),Cc=De=null},se.__c=function(e,t){t.some(function(r){try{r.__h.forEach(jo),r.__h=r.__h.filter(function(n){return!n.__||Vc(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],se.__e(n,r.__v)}}),P0&&P0(e,t)},se.unmount=function(e){N0&&N0(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{jo(n)}catch(i){t=i}}),r.__H=void 0,t&&se.__e(t,r.__v))};L0=typeof requestAnimationFrame=="function";wq=Symbol.for("preact-signals");H=void 0,Rn=void 0,Lt=0,Gc=0,Jo=0;be.prototype.brand=wq;be.prototype.h=function(){return!0};be.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};be.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}};be.prototype.subscribe=function(e){var t=this;return Rr(function(){var r=t.value,n=H;H=void 0;try{e(r)}finally{H=n}})};be.prototype.valueOf=function(){return this.value};be.prototype.toString=function(){return this.value+""};be.prototype.toJSON=function(){return this.value};be.prototype.peek=function(){var e=H;H=void 0;try{return this.value}finally{H=e}};Object.defineProperty(be.prototype,"value",{get:function(){var e=tw(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Gc>100)throw new Error("Cycle detected");this.v=e,this.i++,Jo++,Lt++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Yo()}}}});(Tr.prototype=new be).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Jo))return!0;if(this.g=Jo,this.f|=1,this.i>0&&!rw(this))return this.f&=-2,!0;var e=H;try{nw(this),H=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return H=e,iw(this),this.f&=-2,!0};Tr.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}be.prototype.S.call(this,e)};Tr.prototype.U=function(e){if(this.t!==void 0&&(be.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};Tr.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};Object.defineProperty(Tr.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=tw(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});Ln.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Ln.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,ow(this),nw(this),Lt++;var e=H;return H=this,Eq.bind(this,e)};Ln.prototype.N=function(){2&this.f||(this.f|=2,this.o=Rn,Rn=this)};Ln.prototype.d=function(){this.f|=8,1&this.f||eu(this)};aw=[],sw=[];Rr(function(){tu=this.N})();lw.displayName="_st";Object.defineProperties(be.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:lw},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});kr("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var o=n[i];o instanceof be&&(r||(t.__np=r={}),r[i]=o,n[i]=o.peek())}}e(t)});kr("__r",function(e,t){Vo();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var o;return Rr(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o}())),Vo(r),e(t)});kr("__e",function(e,t,r,n){Vo(),e(t,r,n)});kr("diffed",function(e,t){Vo();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var o=r.U;if(o)for(var a in o){var s=o[a];s!==void 0&&!(a in n)&&(s.d(),o[a]=void 0)}else o={},r.U=o;for(var l in n){var c=o[l],d=n[l];c===void 0?(c=xq(r,l,d,i),o[l]=c):c.o(d,i)}}}e(t)});kr("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var o=n[i];o&&o.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)});kr("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)});Ue.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u,n=r&&r.s!==void 0;for(var i in t)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){var o=2&this.__$f;if(!(n||o||4&this.__$f)||1&this.__$f)return!0}else if(!(n||4&this.__$f)||3&this.__$f)return!0;for(var a in e)if(a!=="__source"&&e[a]!==this.props[a])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};Aq=typeof requestAnimationFrame=="undefined"?setTimeout:function(e){var t=function(){clearTimeout(r),cancelAnimationFrame(n),e()},r=setTimeout(t,100),n=requestAnimationFrame(t)},Sq=function(e){queueMicrotask(function(){queueMicrotask(e)})};Ne=Dn`
416
416
  inset: 0;
417
417
  clear: none;
418
418
  float: none;
@@ -505,7 +505,7 @@ or `);this.errors.push(o)}return n}},wo=class extends oe{constructor(...t){super
505
505
  }
506
506
  }
507
507
  }
508
- `,Et=_e(null),Vc=_e(""),Gc=_e(""),jo=_e(!1),Nq=()=>{var e;(e=Et.value)==null||e.call(Et,!1)},Dq=()=>{var e;(e=Et.value)==null||e.call(Et,!0)},Lq=e=>I(void 0,null,function*(){let{title:t,content:r}=e;return Et.value&&(Et.value(!1),ze(()=>{Et.value=null,jo.value=!1})),ze(()=>{Vc.value=t||"",Gc.value=r||"",jo.value=!0}),new Promise(n=>{Et.value=i=>{ze(()=>{Et.value=null,jo.value=!1,Vc.value="",Gc.value=""}),n(i)}})}),qq=()=>jo.value?he("div",{className:Pq,children:he("div",{className:"card-wrapper",children:[he("div",{className:"body",children:[he("div",{className:"title",children:Vc.value}),he("div",{className:"content",children:Gc.value})]}),he("div",{className:"footer",children:[he("button",{onClick:Nq,className:"cancel-btn",children:"Cancel"}),he("button",{onClick:Dq,className:"confirm-btm",children:"Confirm"})]})]})}):null,Uq=Dn`
508
+ `,Et=_e(null),Kc=_e(""),Wc=_e(""),Fo=_e(!1),Nq=()=>{var e;(e=Et.value)==null||e.call(Et,!1)},Dq=()=>{var e;(e=Et.value)==null||e.call(Et,!0)},Lq=e=>I(void 0,null,function*(){let{title:t,content:r}=e;return Et.value&&(Et.value(!1),ze(()=>{Et.value=null,Fo.value=!1})),ze(()=>{Kc.value=t||"",Wc.value=r||"",Fo.value=!0}),new Promise(n=>{Et.value=i=>{ze(()=>{Et.value=null,Fo.value=!1,Kc.value="",Wc.value=""}),n(i)}})}),qq=()=>Fo.value?he("div",{className:Pq,children:he("div",{className:"card-wrapper",children:[he("div",{className:"body",children:[he("div",{className:"title",children:Kc.value}),he("div",{className:"content",children:Wc.value})]}),he("div",{className:"footer",children:[he("button",{onClick:Nq,className:"cancel-btn",children:"Cancel"}),he("button",{onClick:Dq,className:"confirm-btm",children:"Confirm"})]})]})}):null,Uq=Dn`
509
509
  ${Ne}
510
510
  position: relative;
511
511
  display: flex;
@@ -557,7 +557,7 @@ or `);this.errors.push(o)}return n}},wo=class extends oe{constructor(...t){super
557
557
  width: 100%;
558
558
  height: 100%;
559
559
  }
560
- `,$q=e=>{let{state:t}=e,{afterAd:r,adDismissed:n,adViewed:i,adBreakDone:o,adLoaded:a,visible:s,countdown:l,src:c,mode:d}=t,u=ln(()=>Mq(),[]),h=m=>{var g,_,v,y;s.value=!1,m==="dismiss"?(g=n.value)==null||g.call(n):m==="viewed"&&((_=i.value)==null||_.call(i)),(v=r.value)==null||v.call(r),(y=o.value)==null||y.call(o)},p=()=>{var m;(d.value==="reward"||d.value==="rewarded_insterstitial")&&setTimeout(()=>{u.startTimer()},100),(m=a.value)==null||m.call(a)};return s.value?he("div",{className:Bq,children:[he(jq,{mode:d.value,onClose:h,countdown:l.value,state:u}),s.value&&he("iframe",{src:c.value,onLoad:p,sandbox:"allow-scripts allow-same-origin allow-forms allow-modals allow-downloads allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation allow-top-navigation allow-top-navigation-by-user-activation allow-top-navigation-to-custom-protocols"}),he(qq,{})]}):null};Kc=class{constructor(t,r){wt(this,"name","OKSPIN"),wt(this,"initialized",!1),wt(this,"initCompleter",null),wt(this,"context",void 0),wt(this,"initParams",void 0),wt(this,"adsOverlay",null),wt(this,"adsIsShowing",!1),wt(this,"lastUnDisplayedAdBreak",null),wt(this,"state",Fq()),this.context=t,this.initParams=r}init(){return I(this,null,function*(){var t;this.adsOverlay=document.createElement("div"),this.adsOverlay.setAttribute("data-placement-info","afg"),Tm(he($q,{state:this.state}),this.adsOverlay),document.documentElement.appendChild(this.adsOverlay),this.initialized=!0,(t=this.initCompleter)==null||t.call(this)})}adConfig(t){var r;if(this.initialized){(r=t.onReady)==null||r.call(t);return}this.initCompleter=()=>{var n;(n=t.onReady)==null||n.call(t)}}adBreak(t,r){return I(this,null,function*(){var n,i,o,a,s,l,c,d;if(!this.initialized||!this.adsOverlay||!r.params.url){(n=t.adBreakDone)==null||n.call(t,{breakType:t.type,breakName:t.type==="preroll"?"":t.name,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"notReady"});return}if(this.adsIsShowing){(i=t.adBreakDone)==null||i.call(t,{breakType:t.type,breakName:t.type==="preroll"?"":t.name,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"frequencyCapped"});return}switch(t.type){case"preroll":{(o=t.adBreakDone)==null||o.call(t,{breakType:t.type,breakName:"",breakFormat:"interstitial",breakStatus:"noAdPreloaded"});break}case"start":case"browse":case"next":case"pause":{(a=t.beforeAd)==null||a.call(t);let u=()=>{var p;this.adsIsShowing=!1,(p=t.afterAd)==null||p.call(t)},h=()=>{var p;this.adsIsShowing=!1,(p=t.adBreakDone)==null||p.call(t,{breakType:t.type,breakName:t.name,breakFormat:"interstitial",breakStatus:"viewed"})};ze(()=>{this.adsIsShowing=!0,this.state.afterAd.value=u,this.state.adBreakDone.value=h,this.state.src.value=r.params.url,this.state.mode.value="interstitial",this.state.visible.value=!0});break}case"reward":{this.lastUnDisplayedAdBreak&&((l=(s=this.lastUnDisplayedAdBreak).adBreakDone)==null||l.call(s,{breakType:this.lastUnDisplayedAdBreak.type,breakName:this.lastUnDisplayedAdBreak.type==="preroll"?"":this.lastUnDisplayedAdBreak.name,breakFormat:this.lastUnDisplayedAdBreak.type==="reward"?"reward":"interstitial",breakStatus:"ignored"}),this.lastUnDisplayedAdBreak=null),(c=t.beforeAd)==null||c.call(t);let u=()=>{var v;this.adsIsShowing=!1,(v=t.afterAd)==null||v.call(t)},h={breakType:t.type,breakName:t.name,breakFormat:"reward",breakStatus:"ignored"},p=()=>{var v;this.adsIsShowing=!1,h.breakStatus="dismissed",(v=t.adDismissed)==null||v.call(t)},m=()=>{var v;this.adsIsShowing=!1,h.breakStatus="viewed",(v=t.adViewed)==null||v.call(t)},g=()=>{var v;this.adsIsShowing=!1,(v=t.adBreakDone)==null||v.call(t,h)};ze(()=>{this.state.afterAd.value=u,this.state.adDismissed.value=p,this.state.adViewed.value=m,this.state.adBreakDone.value=g});let _=()=>{var v;if(this.lastUnDisplayedAdBreak=null,!this.adsOverlay){(v=t.adBreakDone)==null||v.call(t,{breakType:t.type,breakName:t.name,breakFormat:"reward",breakStatus:"notReady"});return}this.adsIsShowing=!0,ze(()=>{var y;this.state.countdown.value=(y=r.params.countdown)!=null?y:15,this.state.src.value=r.params.url,this.state.mode.value="reward",this.state.visible.value=!0})};this.lastUnDisplayedAdBreak=t,(d=t.beforeReward)==null||d.call(t,_);break}}})}};Vo=class{constructor(t){if(Kt(this,"context",void 0),Kt(this,"contextInfo",void 0),Kt(this,"providers",{}),Kt(this,"channelPolicy",void 0),Kt(this,"adsActionDetection",void 0),Kt(this,"adsTrackSerializer",void 0),Kt(this,"initialized",!1),t)this.context=t,this.channelPolicy=new Mc(this.context),this.adsActionDetection=new Pc(this.context),this.adsTrackSerializer=new Uc(this.context),this.contextInfo=this.context.getContextInfo();else throw new Error("JoliboxAdsForGame requires a configuration object")}getRequestContextData(t){var r,n;return{report:JSON.stringify(this.adsTrackSerializer.serialize(t,{sessionId:this.contextInfo.sessionId,objectType:this.contextInfo.objectType,objectId:this.contextInfo.objectId,testAdsMode:this.contextInfo.testAdsMode})),osType:this.contextInfo.osType,runtimeType:this.contextInfo.runtimeType,sessionId:this.contextInfo.sessionId,deviceId:this.contextInfo.deviceId,adId:this.contextInfo.adId,deviceModel:(r=this.contextInfo.deviceModel)!=null?r:"UnknownModel",deviceBrand:(n=this.contextInfo.deviceBrand)!=null?n:"UnknownBrand"}}getRequestBizParams(){return{objectType:this.contextInfo.objectType,objectId:this.contextInfo.objectId}}init(t){return I(this,null,function*(){window.adsbygoogle=window.adsbygoogle||[];let{data:r}=yield this.context.httpClient.post("/api/ads/init",{data:{contextData:this.getRequestContextData("AdsAFGSDKInit"),bizParams:this.getRequestBizParams(),testAdsMode:this.contextInfo.testAdsMode}});if((r==null?void 0:r.length)>0)for(let n of r)switch(n.provider){case"ADSENSE":{let i=new jc(this.context,n.params);yield i.init(),this.providers.ADSENSE=i;break}case"OKSPIN":{let i=new Kc(this.context,n.params);yield i.init(),this.providers.OKSPIN=i;break}}this.initialized=!0})}adConfig(t){this.providers.ADSENSE?this.providers.ADSENSE.adConfig(t):window.adsbygoogle.push(t)}adBreak(t){return I(this,null,function*(){var r,n,i,o,a,s,l,c,d;if((r=this.context.eventEmitter)==null||r.emit("isAdShowing",!0),this.adsActionDetection.adBreakIsShowing=!0,this.initialized||(yield this.init()),t.type!=="reward"&&!this.channelPolicy.shouldBypassCallingInterstitial()){(n=t.adBreakDone)==null||n.call(t,{breakType:t.type,breakName:"skipInterstitials",breakFormat:"interstitial",breakStatus:"viewed"});return}this.context.checkNetwork()||(i=t.adBreakDone)==null||i.call(t,{breakType:t.type,breakName:"NETWORK_NOT_OK",breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"});try{let{data:u,code:h}=yield this.context.httpClient.post("/api/ads/info",{data:{contextData:this.getRequestContextData("AdsAFGSDKAdBreak"),bizParams:this.getRequestBizParams(),adsType:t.type==="reward"?"REWARD":"INTERSTITIAL",testAdsMode:this.contextInfo.testAdsMode,name:t.type==="preroll"?"":t.name}});if(h!=="SUCCESS"){(o=t.adBreakDone)==null||o.call(t,{breakType:t.type,breakName:"UNKNOWN_ERROR",breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"});return}else{let p=u;if(p.length===0){(a=t.adBreakDone)==null||a.call(t,{breakType:t.type,breakName:"NO_ADS",breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"});return}let m=!0,g=null,_=new Cc(this.context);for(;p.length>0;){let v=p.shift(),y=this.providers[v.provider];if(y){let[x,R]=yield _.callAdBreakAndContinue(y,t,v);m=x,g=R}else m=!0,g={breakType:t.type,breakName:t.type==="preroll"?"":(s=t.name)!=null?s:"",breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"notReady"};if(!m)break}m&&g&&((l=t.adBreakDone)==null||l.call(t,g))}}catch(u){(c=t.adBreakDone)==null||c.call(t,{breakType:t.type,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"})}finally{(d=this.context.eventEmitter)==null||d.emit("isAdShowing",!1),this.adsActionDetection.adBreakIsShowing=!1}})}adUnit(t){console.warn("This method has been deprecated. We will not support AdSense AdUnit in the future.")}},S4=Dn`
560
+ `,$q=e=>{let{state:t}=e,{afterAd:r,adDismissed:n,adViewed:i,adBreakDone:o,adLoaded:a,visible:s,countdown:l,src:c,mode:d}=t,u=ln(()=>Mq(),[]),h=m=>{var g,_,v,y;s.value=!1,m==="dismiss"?(g=n.value)==null||g.call(n):m==="viewed"&&((_=i.value)==null||_.call(i)),(v=r.value)==null||v.call(r),(y=o.value)==null||y.call(o)},p=()=>{var m;(d.value==="reward"||d.value==="rewarded_insterstitial")&&setTimeout(()=>{u.startTimer()},100),(m=a.value)==null||m.call(a)};return s.value?he("div",{className:Bq,children:[he(jq,{mode:d.value,onClose:h,countdown:l.value,state:u}),s.value&&he("iframe",{src:c.value,onLoad:p,sandbox:"allow-scripts allow-same-origin allow-forms allow-modals allow-downloads allow-popups allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation allow-top-navigation allow-top-navigation-by-user-activation allow-top-navigation-to-custom-protocols"}),he(qq,{})]}):null};zc=class{constructor(t,r){wt(this,"name","OKSPIN"),wt(this,"initialized",!1),wt(this,"initCompleter",null),wt(this,"context",void 0),wt(this,"initParams",void 0),wt(this,"adsOverlay",null),wt(this,"adsIsShowing",!1),wt(this,"lastUnDisplayedAdBreak",null),wt(this,"state",Fq()),this.context=t,this.initParams=r}init(){return I(this,null,function*(){var t;this.adsOverlay=document.createElement("div"),this.adsOverlay.setAttribute("data-placement-info","afg"),Tm(he($q,{state:this.state}),this.adsOverlay),document.documentElement.appendChild(this.adsOverlay),this.initialized=!0,(t=this.initCompleter)==null||t.call(this)})}adConfig(t){var r;if(this.initialized){(r=t.onReady)==null||r.call(t);return}this.initCompleter=()=>{var n;(n=t.onReady)==null||n.call(t)}}adBreak(t,r){return I(this,null,function*(){var n,i,o,a,s,l,c,d;if(!this.initialized||!this.adsOverlay||!r.params.url){(n=t.adBreakDone)==null||n.call(t,{breakType:t.type,breakName:t.type==="preroll"?"":t.name,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"notReady"});return}if(this.adsIsShowing){(i=t.adBreakDone)==null||i.call(t,{breakType:t.type,breakName:t.type==="preroll"?"":t.name,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"frequencyCapped"});return}switch(t.type){case"preroll":{(o=t.adBreakDone)==null||o.call(t,{breakType:t.type,breakName:"",breakFormat:"interstitial",breakStatus:"noAdPreloaded"});break}case"start":case"browse":case"next":case"pause":{(a=t.beforeAd)==null||a.call(t);let u=()=>{var p;this.adsIsShowing=!1,(p=t.afterAd)==null||p.call(t)},h=()=>{var p;this.adsIsShowing=!1,(p=t.adBreakDone)==null||p.call(t,{breakType:t.type,breakName:t.name,breakFormat:"interstitial",breakStatus:"viewed"})};ze(()=>{this.adsIsShowing=!0,this.state.afterAd.value=u,this.state.adBreakDone.value=h,this.state.src.value=r.params.url,this.state.mode.value="interstitial",this.state.visible.value=!0});break}case"reward":{this.lastUnDisplayedAdBreak&&((l=(s=this.lastUnDisplayedAdBreak).adBreakDone)==null||l.call(s,{breakType:this.lastUnDisplayedAdBreak.type,breakName:this.lastUnDisplayedAdBreak.type==="preroll"?"":this.lastUnDisplayedAdBreak.name,breakFormat:this.lastUnDisplayedAdBreak.type==="reward"?"reward":"interstitial",breakStatus:"ignored"}),this.lastUnDisplayedAdBreak=null),(c=t.beforeAd)==null||c.call(t);let u=()=>{var v;this.adsIsShowing=!1,(v=t.afterAd)==null||v.call(t)},h={breakType:t.type,breakName:t.name,breakFormat:"reward",breakStatus:"ignored"},p=()=>{var v;this.adsIsShowing=!1,h.breakStatus="dismissed",(v=t.adDismissed)==null||v.call(t)},m=()=>{var v;this.adsIsShowing=!1,h.breakStatus="viewed",(v=t.adViewed)==null||v.call(t)},g=()=>{var v;this.adsIsShowing=!1,(v=t.adBreakDone)==null||v.call(t,h)};ze(()=>{this.state.afterAd.value=u,this.state.adDismissed.value=p,this.state.adViewed.value=m,this.state.adBreakDone.value=g});let _=()=>{var v;if(this.lastUnDisplayedAdBreak=null,!this.adsOverlay){(v=t.adBreakDone)==null||v.call(t,{breakType:t.type,breakName:t.name,breakFormat:"reward",breakStatus:"notReady"});return}this.adsIsShowing=!0,ze(()=>{var y;this.state.countdown.value=(y=r.params.countdown)!=null?y:15,this.state.src.value=r.params.url,this.state.mode.value="reward",this.state.visible.value=!0})};this.lastUnDisplayedAdBreak=t,(d=t.beforeReward)==null||d.call(t,_);break}}})}};Go=class{constructor(t){if(Kt(this,"context",void 0),Kt(this,"contextInfo",void 0),Kt(this,"providers",{}),Kt(this,"channelPolicy",void 0),Kt(this,"adsActionDetection",void 0),Kt(this,"adsTrackSerializer",void 0),Kt(this,"initialized",!1),t)this.context=t,this.channelPolicy=new Fc(this.context),this.adsActionDetection=new Dc(this.context),this.adsTrackSerializer=new jc(this.context),this.contextInfo=this.context.getContextInfo();else throw new Error("JoliboxAdsForGame requires a configuration object")}getRequestContextData(t){var r,n;return{report:JSON.stringify(this.adsTrackSerializer.serialize(t,{sessionId:this.contextInfo.sessionId,objectType:this.contextInfo.objectType,objectId:this.contextInfo.objectId,testAdsMode:this.contextInfo.testAdsMode})),osType:this.contextInfo.osType,runtimeType:this.contextInfo.runtimeType,sessionId:this.contextInfo.sessionId,deviceId:this.contextInfo.deviceId,adId:this.contextInfo.adId,deviceModel:(r=this.contextInfo.deviceModel)!=null?r:"UnknownModel",deviceBrand:(n=this.contextInfo.deviceBrand)!=null?n:"UnknownBrand"}}getRequestBizParams(){return{objectType:this.contextInfo.objectType,objectId:this.contextInfo.objectId}}init(t){return I(this,null,function*(){window.adsbygoogle=window.adsbygoogle||[];let{data:r}=yield this.context.httpClient.post("/api/ads/init",{data:{contextData:this.getRequestContextData("AdsAFGSDKInit"),bizParams:this.getRequestBizParams(),testAdsMode:this.contextInfo.testAdsMode}});if((r==null?void 0:r.length)>0)for(let n of r)switch(n.provider){case"ADSENSE":{let i=new Bc(this.context,n.params);yield i.init(),this.providers.ADSENSE=i;break}case"OKSPIN":{let i=new zc(this.context,n.params);yield i.init(),this.providers.OKSPIN=i;break}}this.initialized=!0})}adConfig(t){this.providers.ADSENSE?this.providers.ADSENSE.adConfig(t):window.adsbygoogle.push(t)}adBreak(t){return I(this,null,function*(){var r,n,i,o,a,s,l,c,d;if((r=this.context.eventEmitter)==null||r.emit("isAdShowing",!0),this.adsActionDetection.adBreakIsShowing=!0,this.initialized||(yield this.init()),t.type!=="reward"&&!this.channelPolicy.shouldBypassCallingInterstitial()){(n=t.adBreakDone)==null||n.call(t,{breakType:t.type,breakName:"skipInterstitials",breakFormat:"interstitial",breakStatus:"viewed"});return}this.context.checkNetwork()||(i=t.adBreakDone)==null||i.call(t,{breakType:t.type,breakName:"NETWORK_NOT_OK",breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"});try{let{data:u,code:h}=yield this.context.httpClient.post("/api/ads/info",{data:{contextData:this.getRequestContextData("AdsAFGSDKAdBreak"),bizParams:this.getRequestBizParams(),adsType:t.type==="reward"?"REWARD":"INTERSTITIAL",testAdsMode:this.contextInfo.testAdsMode,name:t.type==="preroll"?"":t.name}});if(h!=="SUCCESS"){(o=t.adBreakDone)==null||o.call(t,{breakType:t.type,breakName:"UNKNOWN_ERROR",breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"});return}else{let p=u;if(p.length===0){(a=t.adBreakDone)==null||a.call(t,{breakType:t.type,breakName:"NO_ADS",breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"});return}let m=!0,g=null,_=new Nc(this.context);for(;p.length>0;){let v=p.shift(),y=this.providers[v.provider];if(y){let[x,R]=yield _.callAdBreakAndContinue(y,t,v);m=x,g=R}else m=!0,g={breakType:t.type,breakName:t.type==="preroll"?"":(s=t.name)!=null?s:"",breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"notReady"};if(!m)break}m&&g&&((l=t.adBreakDone)==null||l.call(t,g))}}catch(u){(c=t.adBreakDone)==null||c.call(t,{breakType:t.type,breakFormat:t.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"})}finally{(d=this.context.eventEmitter)==null||d.emit("isAdShowing",!1),this.adsActionDetection.adBreakIsShowing=!1}})}adUnit(t){console.warn("This method has been deprecated. We will not support AdSense AdUnit in the future.")}},S4=Dn`
561
561
  ${Ne}
562
562
  position: fixed;
563
563
  left: 0;
@@ -606,4 +606,4 @@ or `);this.errors.push(o)}return n}},wo=class extends oe{constructor(...t){super
606
606
  cursor: pointer;
607
607
  }
608
608
  }
609
- `});function pw(){let e=new Map,t;return{registerRewardHandler(n,i){e.set(n,i)},handleReward(n,...i){return I(this,null,function*(){return yield n.reduce((a,s)=>I(this,null,function*(){let l=yield a;if(l===!0)return!0;fw&&console.log(`handleReward ${s}`);let c=e.get(s),d=c?yield c(...i):l;return fw&&console.log(`handleReward ${s} ${d}`),d}),Promise.resolve(!1))})},registerRewardsFetcher(n){return I(this,null,function*(){t=(...i)=>I(this,null,function*(){try{return yield n(...i)}catch(o){return console.error("getRewardOptions error:",o),["ADS"]}})})},getRewardsTypes(...n){return I(this,null,function*(){return t?yield t(...n):["ADS"]})}}}var fw,hw=T(()=>{"use strict";Z();fw=A.testMode});var Kq,Wq,mw,vw=T(()=>{"use strict";xr();Kq=()=>(e,t)=>e==="JOLI_COIN"&&t==="ADS"?-1:e==="ADS"&&t==="JOLI_COIN"?1:0,Wq=e=>e.length?e.includes("JOLI_COIN")&&e.length<=1?["JOLI_COIN_ONLY"]:e.sort(Kq()):["ADS"],mw=e=>{e.registerRewardsFetcher(t=>I(void 0,null,function*(){var n,i,o,a;let r=["ADS"];try{let s=yield t.post("/api/games/unlock-options",{});if(s.code!=="SUCCESS")return r;ae.emit(Er,{options:((n=s.data)==null?void 0:n.unlockOptions)||[],userJoliCoin:((i=s.extra)==null?void 0:i.joliCoin)||{balance:0,enableAutoDeduct:!1}});let l=((a=(o=s.data)==null?void 0:o.unlockOptions)==null?void 0:a.map(c=>c.type))||Array.from(r);return Wq(l)}catch(s){return console.error("getRewardOptions error:",s),r}}))}});var gw,_w=T(()=>{"use strict";gw=e=>t=>I(void 0,null,function*(){return e.adBreak(t),!0})});function Wt(e,t){let r=null,n=null,i=null,o=()=>{if(i){r=Promise.resolve(i);return}r=new Promise(a=>{n=a})};return o(),e.on(t,(...a)=>{let s=a[0];i=s,n&&(n(s),n=null)}),{getData:()=>(r||o(),r),getCachedData:()=>i,clearCache:()=>{i=null,r=null},getFreshData:()=>(i=null,r=null,o(),r)}}var Yo=T(()=>{"use strict"});var yw,bw=T(()=>{"use strict";yw=(e,t)=>e.some(r=>r.type==="JOLI_COIN"&&r.joliCoinChoices.some(n=>{var i;return n.joliCoinQuantity<=((i=t==null?void 0:t.balance)!=null?i:0)}))});var Qo,Xo,ww,Zo,ea=T(()=>{"use strict";Z();D();xr();bw();Yo();Qo=(e,t)=>r=>I(void 0,null,function*(){let n=Wt(ae,Gt);return ae.emit(Ro,e,{userJoliCoin:r.userJoliCoin,joliCoinQuantity:r.joliCoinQuantity,enableAutoDeduct:r.userJoliCoin.enableAutoDeduct,confirmButtonText:t.confirmButtonText,cancelButtonText:t.cancelButtonText}),(yield n.getFreshData()).paymentResult}),Xo=(e,t)=>r=>I(void 0,null,function*(){let n=Wt(ae,An);return ae.emit(ko,e,{enableAutoDeduct:r.enableAutoDeduct,userJoliCoin:r.userJoliCoin,joliCoinQuantity:r.joliCoinQuantity,confirmButtonText:t.confirmButtonText,cancelButtonText:t.cancelButtonText}),(yield n.getFreshData()).useModalResult}),ww=e=>{if(e=="CANCEL")throw new Error("CANCEL")},Zo=(e,{handlers:{handleUnlockSuccess:t,handleUnlockFailed:r,unlockOptionsHandler:n,initiateAndAwaitPayment:i,showUnlockWithJolicoinModal:o}})=>a=>I(void 0,null,function*(){var s,l,c,d,u,h,p;try{let m=!1,g=yield n.getData(),_=(c=(l=(s=g==null?void 0:g.options)==null?void 0:s.find(x=>x.type==="JOLI_COIN"))==null?void 0:l.joliCoinChoices[0].joliCoinQuantity)!=null?c:0;if(!yw((g==null?void 0:g.options)||[],g==null?void 0:g.userJoliCoin)){let x=yield i({userJoliCoin:g==null?void 0:g.userJoliCoin,joliCoinQuantity:_});if(ww(x),x!=="SUCCESS")return r==null||r(a),!1;m=!0}let v=!!((d=g==null?void 0:g.userJoliCoin)!=null&&d.enableAutoDeduct);if(!m){let x=yield o({enableAutoDeduct:v,userJoliCoin:g==null?void 0:g.userJoliCoin,joliCoinQuantity:_});if(ww(x),x!=="CONFIRM")return r==null||r(a),!1}let y=yield e.post("/api/joli-coin/unlock",{data:{type:"GAME_REWARD",reqId:`${Kn()}-${A.mpType}-${Date.now()}`,gameInfo:{gameId:A.mpId}}});return y.code=="SUCCESS"?((h=a.adBreakDone)==null||h.call(a,{breakType:a.type,breakName:"name"in a&&(u=a.name)!=null?u:"",breakFormat:"reward",breakStatus:"viewed"}),"adViewed"in a&&((p=a.adViewed)==null||p.call(a)),t==null||t({quantity:y.data.quantity,balance:y.data.balance}),!0):(r==null||r(a),!1)}catch(m){if(console.info("JolicoinRewardHandler error:",m),m instanceof Error&&m.message=="CANCEL")throw m;return r==null||r(a),!1}finally{n.clearCache()}})});var Ew,xw=T(()=>{"use strict";xr();Yo();ea();ea();Ew=(e,{onUnlockSuccess:t,onUnlockFailed:r})=>{let n=Wt(ae,Er),i=()=>{r==null||r()},o=Xo("ADS-JOLI_COIN",{confirmButtonText:"Use Jolicoin",cancelButtonText:"No watch ads"}),a=Qo("ADS-JOLI_COIN",{confirmButtonText:"Pay and unlock",cancelButtonText:"No watch ads"});return Zo(e,{handlers:{handleUnlockSuccess:t,handleUnlockFailed:i,unlockOptionsHandler:n,initiateAndAwaitPayment:a,showUnlockWithJolicoinModal:o}})}});var Aw,Sw=T(()=>{"use strict";xr();ea();Yo();Aw=(e,{onUnlockSuccess:t,onUnlockFailed:r})=>{let n=Wt(ae,Er),i=l=>{var c;r==null||r(),(c=l.adBreakDone)==null||c.call(l,{breakType:l.type,breakFormat:l.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"})},o=Xo("JOLI_COIN",{confirmButtonText:"Use Jolicoin",cancelButtonText:"No thanks"}),a=Qo("JOLI_COIN",{confirmButtonText:"Pay and unlock",cancelButtonText:"No thanks"});return Zo(e,{handlers:{handleUnlockSuccess:t,handleUnlockFailed:i,unlockOptionsHandler:n,initiateAndAwaitPayment:a,showUnlockWithJolicoinModal:o}})}});var zt,Iw=T(()=>{"use strict";hw();vw();_w();xw();Sw();zt=pw();mw(zt)});var EH,ta,zq,ra,Yq,qn,Tw,Qq,Xq,Zq,eU,Rw=T(()=>{"use strict";D();lt();eo();EH=ce(p0());dw();It();Z();jt();Se();Iw();ta=X(),zq=()=>{let{data:e}=q("getNetworkStatusSync");return!!(e!=null&&e.isConnected)},ra={get:(e,t)=>we(e,k({method:"GET",responseType:"json",appendHostCookie:!0},t)).then(r=>r.response.data),post:(e,t)=>we(e,k({method:"POST",responseType:"json",appendHostCookie:!0},t)).then(r=>r.response.data)},Yq={httpClient:ra,checkNetwork:zq,track:qe,getContextInfo:()=>{var e,t,r,n,i,o,a,s;return{hostAppId:(t=(e=A.hostInfo)==null?void 0:e.aid)!=null?t:"1",deviceId:(r=A.deviceInfo.did)!=null?r:"",adId:(n=A.deviceInfo.adId)!=null?n:"",sessionId:(i=A.sessionId)!=null?i:"",userId:(a=(o=A.hostUserInfo)==null?void 0:o.uid)!=null?a:"",objectType:"GAME",objectId:A.mpId,testAdsMode:A.testAdsMode,channel:(s=A.joliSource)!=null?s:"",deviceBrand:A.deviceInfo.brand,deviceModel:A.deviceInfo.model,osType:A.platform==="android"?"ANDROID":A.platform==="ios"?"IOS":"PC",runtimeType:"APP",platform:1e3}}},qn=new Vo(Yq);zt.registerRewardHandler("ADS",gw(qn));zt.registerRewardHandler("JOLI_COIN",Ew(ra,{onUnlockSuccess:e=>{Tw(e)},onUnlockFailed:()=>{console.log("onUnlockFailed")}}));zt.registerRewardHandler("JOLI_COIN_ONLY",Aw(ra,{onUnlockSuccess:e=>{Tw(e)},onUnlockFailed:()=>{console.log("onUnlockFailed")}}));Tw=e=>{let{quantity:t}=e,r=`{slot-coin} ${t} JoliCoins used`;jb(r,{customStyle:{mark:{marginRight:"8px"}}})},Qq=J("adInit",{implement:e=>{qn.init(e)}}),Xq=J("adConfig",{implement:e=>{qn.adConfig(e)}}),Zq=J("adBreak",{implement:e=>{e.type==="reward"?zt.getRewardsTypes(ra).then(t=>{zt.handleReward(t,e).catch(r=>{var n;console.info("handleReward failed in native",r),(n=e.adBreakDone)==null||n.call(e,{breakType:e.type,breakFormat:e.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"})})}):qn.adBreak(e)}}),eU=J("adUnit",{implement:e=>{qn.adUnit(e)}});ta.registerCommand("AdsSDK.init",Qq);ta.registerCommand("AdsSDK.adConfig",Xq);ta.registerCommand("AdsSDK.adBreak",Zq);ta.registerCommand("AdsSDK.adUnit",eU);P("AdsSDK.init",{version:"1.0.0"});P("AdsSDK.adConfig",{version:"1.0.0"});P("AdsSDK.adBreak",{version:"1.0.0"});P("AdsSDK.adUnit",{version:"1.0.0"})});var na,tU,rU,nU,iU,kw=T(()=>{"use strict";D();Se();lt();Z();na=X(),tU=J("openSchemaSync",{paramsSchema:E.tuple(E.string()),implement:e=>{let t=e;e.match(/^https?:\/\//)||(t=`https://${A.mpId}.app.jolibox.com${e.startsWith("/")?"":"/"}${e}`);let r=q("openSchemaSync",{schema:t});if(r.errNo!==0)throw new Br(r.errMsg,r.errNo)}}),rU=J("openPageSync",{paramsSchema:E.tuple(E.string()),implement:e=>{let{errNo:t,errMsg:r,data:n}=q("openPageSync",{url:e});if(t!==0||!n)throw new Br(r,t);return{webviewId:n.webviewId}}}),nU=J("closePageSync",{paramsSchema:E.tuple(E.number()),implement:e=>{let{errNo:t,errMsg:r}=q("closePageSync",{webviewId:e});if(t!==0)throw new Br(r,t)}}),iU=J("interceptSystemExitSync",{paramsSchema:E.tuple(E.boolean()),implement:e=>{ue.emit("onInterceptSystemExit",{intercept:e}),ue.emit("onInterceptBackPress",{intercept:e})}});na.registerCommand("RouterSDK.openSchema",tU);na.registerCommand("RouterSDK.openPage",rU);na.registerCommand("RouterSDK.closePage",nU);na.registerCommand("RouterSDK.interceptSystemExit",iU);P("router.openSchema",{version:"1.1.10"});P("router.openPage",{version:"1.1.10"});P("router.closePage",{version:"1.1.10"});P("router.interceptSystemExit",{version:"1.1.18"})});var oU={};var LH,jH,Ow=T(()=>{"use strict";e0();LH=ce(t0());l0();c0();u0();jH=ce(d0());Ac();Rw();kw()});var Cw=Symbol.for("JOLIBOX_IMPLEMENT_INIT");if(window[Cw])throw console.info("Jolibox Implement Already Initialized"),new Error("Jolibox Implement Already Initialized");window[Cw]=!0;I(void 0,null,function*(){let[{config:e}]=yield Promise.all([Promise.resolve().then(()=>(Kb(),Gb)),Promise.resolve().then(()=>(Ow(),oU)),Promise.resolve().then(()=>(It(),md))]);e()});
609
+ `});function pw(){let e=new Map,t;return{registerRewardHandler(n,i){e.set(n,i)},handleReward(n,...i){return I(this,null,function*(){return yield n.reduce((a,s)=>I(this,null,function*(){let l=yield a;if(l===!0)return!0;fw&&console.log(`handleReward ${s}`);let c=e.get(s),d=c?yield c(...i):l;return fw&&console.log(`handleReward ${s} ${d}`),d}),Promise.resolve(!1))})},registerRewardsFetcher(n){return I(this,null,function*(){t=(...i)=>I(this,null,function*(){try{return yield n(...i)}catch(o){return console.error("getRewardOptions error:",o),["ADS"]}})})},getRewardsTypes(...n){return I(this,null,function*(){return t?yield t(...n):["ADS"]})}}}var fw,hw=T(()=>{"use strict";Z();fw=A.testMode});var Kq,Wq,mw,vw=T(()=>{"use strict";xr();Kq=()=>(e,t)=>e==="JOLI_COIN"&&t==="ADS"?-1:e==="ADS"&&t==="JOLI_COIN"?1:0,Wq=e=>e.length?e.includes("JOLI_COIN")&&e.length<=1?["JOLI_COIN_ONLY"]:e.sort(Kq()):["ADS"],mw=e=>{e.registerRewardsFetcher(t=>I(void 0,null,function*(){var n,i,o,a;let r=["ADS"];try{let s=yield t.post("/api/games/unlock-options",{});if(s.code!=="SUCCESS")return r;ae.emit(Er,{options:((n=s.data)==null?void 0:n.unlockOptions)||[],userJoliCoin:((i=s.extra)==null?void 0:i.joliCoin)||{balance:0,enableAutoDeduct:!1}});let l=((a=(o=s.data)==null?void 0:o.unlockOptions)==null?void 0:a.map(c=>c.type))||Array.from(r);return Wq(l)}catch(s){return console.error("getRewardOptions error:",s),r}}))}});var gw,_w=T(()=>{"use strict";gw=e=>t=>I(void 0,null,function*(){return e.adBreak(t),!0})});function Wt(e,t){let r=null,n=null,i=null,o=()=>{if(i){r=Promise.resolve(i);return}r=new Promise(a=>{n=a})};return o(),e.on(t,(...a)=>{let s=a[0];i=s,n&&(n(s),n=null)}),{getData:()=>(r||o(),r),getCachedData:()=>i,clearCache:()=>{i=null,r=null},getFreshData:()=>(i=null,r=null,o(),r)}}var Qo=T(()=>{"use strict"});var yw,bw=T(()=>{"use strict";yw=(e,t)=>e.some(r=>r.type==="JOLI_COIN"&&r.joliCoinChoices.some(n=>{var i;return n.joliCoinQuantity<=((i=t==null?void 0:t.balance)!=null?i:0)}))});var Xo,Zo,ww,ea,ta=T(()=>{"use strict";Z();D();xr();bw();Qo();Xo=(e,t)=>r=>I(void 0,null,function*(){let n=Wt(ae,Gt);return ae.emit(ko,e,{userJoliCoin:r.userJoliCoin,joliCoinQuantity:r.joliCoinQuantity,enableAutoDeduct:r.userJoliCoin.enableAutoDeduct,confirmButtonText:t.confirmButtonText,cancelButtonText:t.cancelButtonText}),(yield n.getFreshData()).paymentResult}),Zo=(e,t)=>r=>I(void 0,null,function*(){let n=Wt(ae,An);return ae.emit(Oo,e,{enableAutoDeduct:r.enableAutoDeduct,userJoliCoin:r.userJoliCoin,joliCoinQuantity:r.joliCoinQuantity,confirmButtonText:t.confirmButtonText,cancelButtonText:t.cancelButtonText}),(yield n.getFreshData()).useModalResult}),ww=e=>{if(e=="CANCEL")throw new Error("CANCEL")},ea=(e,{handlers:{handleUnlockSuccess:t,handleUnlockFailed:r,unlockOptionsHandler:n,initiateAndAwaitPayment:i,showUnlockWithJolicoinModal:o}})=>a=>I(void 0,null,function*(){var s,l,c,d,u,h,p;try{let m=!1,g=yield n.getData(),_=(c=(l=(s=g==null?void 0:g.options)==null?void 0:s.find(x=>x.type==="JOLI_COIN"))==null?void 0:l.joliCoinChoices[0].joliCoinQuantity)!=null?c:0;if(!yw((g==null?void 0:g.options)||[],g==null?void 0:g.userJoliCoin)){let x=yield i({userJoliCoin:g==null?void 0:g.userJoliCoin,joliCoinQuantity:_});if(ww(x),x!=="SUCCESS")return r==null||r(a),!1;m=!0}let v=!!((d=g==null?void 0:g.userJoliCoin)!=null&&d.enableAutoDeduct);if(!m){let x=yield o({enableAutoDeduct:v,userJoliCoin:g==null?void 0:g.userJoliCoin,joliCoinQuantity:_});if(ww(x),x!=="CONFIRM")return r==null||r(a),!1}let y=yield e.post("/api/joli-coin/unlock",{data:{type:"GAME_REWARD",reqId:`${Kn()}-${A.mpType}-${Date.now()}`,gameInfo:{gameId:A.mpId}}});return y.code=="SUCCESS"?((h=a.adBreakDone)==null||h.call(a,{breakType:a.type,breakName:"name"in a&&(u=a.name)!=null?u:"",breakFormat:"reward",breakStatus:"viewed"}),"adViewed"in a&&((p=a.adViewed)==null||p.call(a)),t==null||t({quantity:y.data.quantity,balance:y.data.balance}),!0):(r==null||r(a),!1)}catch(m){if(console.info("JolicoinRewardHandler error:",m),m instanceof Error&&m.message=="CANCEL")throw m;return r==null||r(a),!1}finally{n.clearCache()}})});var Ew,xw=T(()=>{"use strict";xr();Qo();ta();ta();Ew=(e,{onUnlockSuccess:t,onUnlockFailed:r})=>{let n=Wt(ae,Er),i=()=>{r==null||r()},o=Zo("ADS-JOLI_COIN",{confirmButtonText:"Use Jolicoin",cancelButtonText:"No watch ads"}),a=Xo("ADS-JOLI_COIN",{confirmButtonText:"Pay and unlock",cancelButtonText:"No watch ads"});return ea(e,{handlers:{handleUnlockSuccess:t,handleUnlockFailed:i,unlockOptionsHandler:n,initiateAndAwaitPayment:a,showUnlockWithJolicoinModal:o}})}});var Aw,Sw=T(()=>{"use strict";xr();ta();Qo();Aw=(e,{onUnlockSuccess:t,onUnlockFailed:r})=>{let n=Wt(ae,Er),i=l=>{var c;r==null||r(),(c=l.adBreakDone)==null||c.call(l,{breakType:l.type,breakFormat:l.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"})},o=Zo("JOLI_COIN",{confirmButtonText:"Use Jolicoin",cancelButtonText:"No thanks"}),a=Xo("JOLI_COIN",{confirmButtonText:"Pay and unlock",cancelButtonText:"No thanks"});return ea(e,{handlers:{handleUnlockSuccess:t,handleUnlockFailed:i,unlockOptionsHandler:n,initiateAndAwaitPayment:a,showUnlockWithJolicoinModal:o}})}});var zt,Iw=T(()=>{"use strict";hw();vw();_w();xw();Sw();zt=pw();mw(zt)});var EH,ra,zq,na,Yq,qn,Tw,Qq,Xq,Zq,eU,Rw=T(()=>{"use strict";D();lt();to();EH=ce(p0());dw();It();Z();jt();Se();Iw();Ja();ra=X(),zq=()=>{let{data:e}=q("getNetworkStatusSync");return!!(e!=null&&e.isConnected)},na={get:(e,t)=>we(e,k({method:"GET",responseType:"json",appendHostCookie:!0},t)).then(r=>r.response.data),post:(e,t)=>we(e,k({method:"POST",responseType:"json",appendHostCookie:!0},t)).then(r=>r.response.data)},Yq={httpClient:na,checkNetwork:zq,track:qe,eventEmitter:Qn,getContextInfo:()=>{var e,t,r,n,i,o,a,s;return{hostAppId:(t=(e=A.hostInfo)==null?void 0:e.aid)!=null?t:"1",deviceId:(r=A.deviceInfo.did)!=null?r:"",adId:(n=A.deviceInfo.adId)!=null?n:"",sessionId:(i=A.sessionId)!=null?i:"",userId:(a=(o=A.hostUserInfo)==null?void 0:o.uid)!=null?a:"",objectType:"GAME",objectId:A.mpId,testAdsMode:A.testAdsMode,channel:(s=A.joliSource)!=null?s:"",deviceBrand:A.deviceInfo.brand,deviceModel:A.deviceInfo.model,osType:A.platform==="android"?"ANDROID":A.platform==="ios"?"IOS":"PC",runtimeType:"APP",platform:1e3}}},qn=new Go(Yq);zt.registerRewardHandler("ADS",gw(qn));zt.registerRewardHandler("JOLI_COIN",Ew(na,{onUnlockSuccess:e=>{Tw(e)},onUnlockFailed:()=>{console.log("onUnlockFailed")}}));zt.registerRewardHandler("JOLI_COIN_ONLY",Aw(na,{onUnlockSuccess:e=>{Tw(e)},onUnlockFailed:()=>{console.log("onUnlockFailed")}}));Tw=e=>{let{quantity:t}=e,r=`{slot-coin} ${t} JoliCoins used`;jb(r,{customStyle:{mark:{marginRight:"8px"}}})},Qq=J("adInit",{implement:e=>{qn.init(e)}}),Xq=J("adConfig",{implement:e=>{qn.adConfig(e)}}),Zq=J("adBreak",{implement:e=>{e.type==="reward"?zt.getRewardsTypes(na).then(t=>{zt.handleReward(t,e).catch(r=>{var n;console.info("handleReward failed in native",r),(n=e.adBreakDone)==null||n.call(e,{breakType:e.type,breakFormat:e.type==="reward"?"reward":"interstitial",breakStatus:"noAdPreloaded"})})}):qn.adBreak(e)}}),eU=J("adUnit",{implement:e=>{qn.adUnit(e)}});ra.registerCommand("AdsSDK.init",Qq);ra.registerCommand("AdsSDK.adConfig",Xq);ra.registerCommand("AdsSDK.adBreak",Zq);ra.registerCommand("AdsSDK.adUnit",eU);P("AdsSDK.init",{version:"1.0.0"});P("AdsSDK.adConfig",{version:"1.0.0"});P("AdsSDK.adBreak",{version:"1.0.0"});P("AdsSDK.adUnit",{version:"1.0.0"})});var ia,tU,rU,nU,iU,kw=T(()=>{"use strict";D();Se();lt();Z();ia=X(),tU=J("openSchemaSync",{paramsSchema:E.tuple(E.string()),implement:e=>{let t=e;e.match(/^https?:\/\//)||(t=`https://${A.mpId}.app.jolibox.com${e.startsWith("/")?"":"/"}${e}`);let r=q("openSchemaSync",{schema:t});if(r.errNo!==0)throw new Br(r.errMsg,r.errNo)}}),rU=J("openPageSync",{paramsSchema:E.tuple(E.string()),implement:e=>{let{errNo:t,errMsg:r,data:n}=q("openPageSync",{url:e});if(t!==0||!n)throw new Br(r,t);return{webviewId:n.webviewId}}}),nU=J("closePageSync",{paramsSchema:E.tuple(E.number()),implement:e=>{let{errNo:t,errMsg:r}=q("closePageSync",{webviewId:e});if(t!==0)throw new Br(r,t)}}),iU=J("interceptSystemExitSync",{paramsSchema:E.tuple(E.boolean()),implement:e=>{ue.emit("onInterceptSystemExit",{intercept:e}),ue.emit("onInterceptBackPress",{intercept:e})}});ia.registerCommand("RouterSDK.openSchema",tU);ia.registerCommand("RouterSDK.openPage",rU);ia.registerCommand("RouterSDK.closePage",nU);ia.registerCommand("RouterSDK.interceptSystemExit",iU);P("router.openSchema",{version:"1.1.10"});P("router.openPage",{version:"1.1.10"});P("router.closePage",{version:"1.1.10"});P("router.interceptSystemExit",{version:"1.1.18"})});var oU={};var qH,FH,Ow=T(()=>{"use strict";e0();qH=ce(t0());l0();c0();u0();FH=ce(d0());Ic();Rw();kw()});var Cw=Symbol.for("JOLIBOX_IMPLEMENT_INIT");if(window[Cw])throw console.info("Jolibox Implement Already Initialized"),new Error("Jolibox Implement Already Initialized");window[Cw]=!0;I(void 0,null,function*(){let[{config:e}]=yield Promise.all([Promise.resolve().then(()=>(Kb(),Gb)),Promise.resolve().then(()=>(Ow(),oU)),Promise.resolve().then(()=>(It(),gd))]);e()});