@apps-in-toss/web-framework 2.1.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/prebuilt/dev.android.rn84.js +49 -14
- package/dist/prebuilt/dev.ios.rn84.js +49 -14
- package/dist/prebuilt/prod.android.rn72.js +24 -2
- package/dist/prebuilt/prod.android.rn84.js +24 -2
- package/dist/prebuilt/prod.ios.rn72.js +24 -2
- package/dist/prebuilt/prod.ios.rn84.js +24 -2
- package/package.json +8 -8
|
@@ -139836,6 +139836,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139836
139836
|
getPendingOrders: import_native_modules24.IAP.getPendingOrders,
|
|
139837
139837
|
getCompletedOrRefundedOrders: import_native_modules24.IAP.getCompletedOrRefundedOrders,
|
|
139838
139838
|
completeProductGrant: import_native_modules24.IAP.completeProductGrant,
|
|
139839
|
+
getSubscriptionInfo: import_native_modules24.IAP.getSubscriptionInfo,
|
|
139839
139840
|
isAppsInTossAdMobLoaded: import_native_modules24.GoogleAdMob.isAppsInTossAdMobLoaded,
|
|
139840
139841
|
tossAdEventLog,
|
|
139841
139842
|
memoryDebugLog: webViewMemoryDebugLog,
|
|
@@ -142795,6 +142796,22 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142795
142796
|
});
|
|
142796
142797
|
return _completeProductGrant.apply(this, arguments);
|
|
142797
142798
|
}
|
|
142799
|
+
function getSubscriptionInfo(_x12) {
|
|
142800
|
+
return _getSubscriptionInfo.apply(this, arguments);
|
|
142801
|
+
}
|
|
142802
|
+
function _getSubscriptionInfo() {
|
|
142803
|
+
_getSubscriptionInfo = _asyncToGenerator(function* (params) {
|
|
142804
|
+
var isSupported = isMinVersionSupported({
|
|
142805
|
+
android: "5.253.0",
|
|
142806
|
+
ios: "5.250.0"
|
|
142807
|
+
});
|
|
142808
|
+
if (!isSupported) {
|
|
142809
|
+
return;
|
|
142810
|
+
}
|
|
142811
|
+
return safePostMessage("getSubscriptionInfo", params);
|
|
142812
|
+
});
|
|
142813
|
+
return _getSubscriptionInfo.apply(this, arguments);
|
|
142814
|
+
}
|
|
142798
142815
|
function createSubscriptionPurchaseOrder(params) {
|
|
142799
142816
|
var isSupported = isMinVersionSupported({
|
|
142800
142817
|
android: "5.248.0",
|
|
@@ -142821,7 +142838,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142821
142838
|
isProductGranted
|
|
142822
142839
|
});
|
|
142823
142840
|
});
|
|
142824
|
-
return function onPurchased(
|
|
142841
|
+
return function onPurchased(_x13) {
|
|
142825
142842
|
return _ref8.apply(this, arguments);
|
|
142826
142843
|
};
|
|
142827
142844
|
}(),
|
|
@@ -142843,9 +142860,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142843
142860
|
getProductItemList,
|
|
142844
142861
|
getPendingOrders,
|
|
142845
142862
|
getCompletedOrRefundedOrders,
|
|
142846
|
-
completeProductGrant
|
|
142863
|
+
completeProductGrant,
|
|
142864
|
+
getSubscriptionInfo
|
|
142847
142865
|
};
|
|
142848
|
-
function saveBase64Data(
|
|
142866
|
+
function saveBase64Data(_x14) {
|
|
142849
142867
|
return _saveBase64Data.apply(this, arguments);
|
|
142850
142868
|
}
|
|
142851
142869
|
function _saveBase64Data() {
|
|
@@ -142862,7 +142880,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142862
142880
|
});
|
|
142863
142881
|
return _saveBase64Data.apply(this, arguments);
|
|
142864
142882
|
}
|
|
142865
|
-
function setDeviceOrientation(
|
|
142883
|
+
function setDeviceOrientation(_x15) {
|
|
142866
142884
|
return _setDeviceOrientation.apply(this, arguments);
|
|
142867
142885
|
}
|
|
142868
142886
|
function _setDeviceOrientation() {
|
|
@@ -142956,7 +142974,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142956
142974
|
});
|
|
142957
142975
|
return _getGameCenterGameProfile.apply(this, arguments);
|
|
142958
142976
|
}
|
|
142959
|
-
function submitGameCenterLeaderBoardScore(
|
|
142977
|
+
function submitGameCenterLeaderBoardScore(_x16) {
|
|
142960
142978
|
return _submitGameCenterLeaderBoardScore.apply(this, arguments);
|
|
142961
142979
|
}
|
|
142962
142980
|
function _submitGameCenterLeaderBoardScore() {
|
|
@@ -142996,7 +143014,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142996
143014
|
function isGrantPromotionRewardError(error) {
|
|
142997
143015
|
return typeof error === "object" && error !== null && "code" in error && typeof error.code === "string" && "message" in error && typeof error.message === "string";
|
|
142998
143016
|
}
|
|
142999
|
-
function grantPromotionReward(
|
|
143017
|
+
function grantPromotionReward(_x17) {
|
|
143000
143018
|
return _grantPromotionReward.apply(this, arguments);
|
|
143001
143019
|
}
|
|
143002
143020
|
function _grantPromotionReward() {
|
|
@@ -143023,7 +143041,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
143023
143041
|
});
|
|
143024
143042
|
return _grantPromotionReward.apply(this, arguments);
|
|
143025
143043
|
}
|
|
143026
|
-
function grantPromotionRewardForGame(
|
|
143044
|
+
function grantPromotionRewardForGame(_x18) {
|
|
143027
143045
|
return _grantPromotionRewardForGame.apply(this, arguments);
|
|
143028
143046
|
}
|
|
143029
143047
|
function _grantPromotionRewardForGame() {
|
|
@@ -143074,7 +143092,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
143074
143092
|
});
|
|
143075
143093
|
return unregisterCallbacks;
|
|
143076
143094
|
}
|
|
143077
|
-
function appsInTossSignTossCert(
|
|
143095
|
+
function appsInTossSignTossCert(_x19) {
|
|
143078
143096
|
return _appsInTossSignTossCert.apply(this, arguments);
|
|
143079
143097
|
}
|
|
143080
143098
|
function _appsInTossSignTossCert() {
|
|
@@ -143155,7 +143173,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
143155
143173
|
function generateHapticFeedback(options) {
|
|
143156
143174
|
return CommonModule2.generateHapticFeedback(options);
|
|
143157
143175
|
}
|
|
143158
|
-
function share(
|
|
143176
|
+
function share(_x20) {
|
|
143159
143177
|
return _share.apply(this, arguments);
|
|
143160
143178
|
}
|
|
143161
143179
|
function _share() {
|
|
@@ -143167,7 +143185,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
143167
143185
|
function setSecureScreen(options) {
|
|
143168
143186
|
return CommonModule2.setSecureScreen(options);
|
|
143169
143187
|
}
|
|
143170
|
-
function setScreenAwakeMode(
|
|
143188
|
+
function setScreenAwakeMode(_x21) {
|
|
143171
143189
|
return _setScreenAwakeMode.apply(this, arguments);
|
|
143172
143190
|
}
|
|
143173
143191
|
function _setScreenAwakeMode() {
|
|
@@ -143179,7 +143197,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
143179
143197
|
function getNetworkStatus() {
|
|
143180
143198
|
return CommonModule2.getNetworkStatus();
|
|
143181
143199
|
}
|
|
143182
|
-
function setIosSwipeGestureEnabled(
|
|
143200
|
+
function setIosSwipeGestureEnabled(_x22) {
|
|
143183
143201
|
return _setIosSwipeGestureEnabled.apply(this, arguments);
|
|
143184
143202
|
}
|
|
143185
143203
|
function _setIosSwipeGestureEnabled() {
|
|
@@ -213734,6 +213752,22 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
213734
213752
|
});
|
|
213735
213753
|
return _completeProductGrant.apply(this, arguments);
|
|
213736
213754
|
}
|
|
213755
|
+
function getSubscriptionInfo(_x4) {
|
|
213756
|
+
return _getSubscriptionInfo.apply(this, arguments);
|
|
213757
|
+
}
|
|
213758
|
+
function _getSubscriptionInfo() {
|
|
213759
|
+
_getSubscriptionInfo = (0, _asyncToGenerator2.default)(function* (params) {
|
|
213760
|
+
var isSupported = (0, _isMinVersionSupported.isMinVersionSupported)({
|
|
213761
|
+
android: '5.253.0',
|
|
213762
|
+
ios: '5.250.0'
|
|
213763
|
+
});
|
|
213764
|
+
if (!isSupported) {
|
|
213765
|
+
return;
|
|
213766
|
+
}
|
|
213767
|
+
return (0, _natives.safePostMessage)('getSubscriptionInfo', params);
|
|
213768
|
+
});
|
|
213769
|
+
return _getSubscriptionInfo.apply(this, arguments);
|
|
213770
|
+
}
|
|
213737
213771
|
function createSubscriptionPurchaseOrder(params) {
|
|
213738
213772
|
var isSupported = (0, _isMinVersionSupported.isMinVersionSupported)({
|
|
213739
213773
|
android: '5.248.0',
|
|
@@ -213760,7 +213794,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
213760
213794
|
isProductGranted
|
|
213761
213795
|
});
|
|
213762
213796
|
});
|
|
213763
|
-
return function onPurchased(
|
|
213797
|
+
return function onPurchased(_x5) {
|
|
213764
213798
|
return _ref2.apply(this, arguments);
|
|
213765
213799
|
};
|
|
213766
213800
|
}(),
|
|
@@ -213782,7 +213816,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
213782
213816
|
getProductItemList,
|
|
213783
213817
|
getPendingOrders,
|
|
213784
213818
|
getCompletedOrRefundedOrders,
|
|
213785
|
-
completeProductGrant
|
|
213819
|
+
completeProductGrant,
|
|
213820
|
+
getSubscriptionInfo
|
|
213786
213821
|
};
|
|
213787
213822
|
},2579,[1,16,1281,2544,2518,2573],"../../../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-e56741e8de/1/packages/apps-in-toss/native-modules/src/MiniAppModule/native-modules/iap.ts");
|
|
213788
213823
|
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
|
|
@@ -213919,7 +213954,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
213919
213954
|
}
|
|
213920
213955
|
\`;document.head.appendChild(e);})();
|
|
213921
213956
|
`,
|
|
213922
|
-
m = '"use strict";(()=>{var de=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},h=new de,O=()=>Math.random().toString(36).substring(2,15),B=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function d(e){return(...t)=>{let r=O(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(h.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(h.on(`${e}/reject/${r}`,i=>{o(),a(B(i))})),h.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function R(e){return t=>{let r=O(),n=[h.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),h.on(`${e}/onError/${r}`,o=>{t.onError(B(o))})];return h.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{h.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function g(e){return()=>h.getConstant(e)}var ue=function(){return{emit:function(t,r){for(var n=this.events[t]||[],o=0,s=n.length;o<s;o++)n[o](r)},events:{},on:function(t,r){var n=this,o,s;return((o=this.events)[s=t]||(o[s]=[])).push(r),function(){var a;n.events[t]=(a=n.events[t])===null||a===void 0?void 0:a.filter(function(i){return r!==i})}}}};typeof window<"u"&&(window.__GRANITE_NATIVE_EMITTER=ue());var Xe=d("closeView"),Ye=d("generateHapticFeedback"),Ze=d("share"),Qe=d("setSecureScreen"),et=d("setScreenAwakeMode"),tt=d("getNetworkStatus"),rt=d("setIosSwipeGestureEnabled"),nt=d("openURL"),ot=d("openPermissionDialog"),st=d("getPermission"),at=d("requestPermission"),it=g("setClipboardText"),ct=g("getClipboardText"),dt=g("fetchContacts"),ut=g("fetchAlbumPhotos"),pt=g("getCurrentLocation"),mt=g("openCamera"),lt=d("appLogin"),gt=d("eventLog"),ft=d("getTossShareLink"),vt=d("setDeviceOrientation"),ht=d("checkoutPayment"),wt=d("saveBase64Data"),Et=d("appsInTossSignTossCert"),bt=d("getGameCenterGameProfile"),At=d("openGameCenterLeaderboard"),_t=d("submitGameCenterLeaderBoardScore"),St=d("getUserKeyForGame"),Ct=d("grantPromotionReward"),It=d("grantPromotionRewardForGame"),Tt=d("getIsTossLoginIntegratedService"),yt=d("getServerTime"),Lt=g("getLocale"),Rt=g("getSchemeUri"),Pt=g("getPlatformOS"),xt=g("getOperationalEnvironment"),Dt=g("getTossAppVersion"),Nt=g("getDeviceId"),Mt=g("getGroupId"),Ft=R("contactsViral"),kt=R("startUpdateLocation"),Gt=R("onVisibilityChangedByTransparentServiceWeb");var S=class extends Error{constructor({methodName:e,message:t}){super(),this.name=`${e} permission error`,this.message=t}},V=class extends S{constructor(){super({methodName:"fetchAlbumPhotos",message:"\\uC0AC\\uC9C4\\uCCA9 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},H=class extends S{constructor(){super({methodName:"fetchContacts",message:"\\uC5F0\\uB77D\\uCC98 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},U=class extends S{constructor(){super({methodName:"openCamera",message:"\\uCE74\\uBA54\\uB77C \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var k=class extends S{constructor(){super({methodName:"getCurrentLocation",message:"\\uC704\\uCE58 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},W=k,z=class extends S{constructor(){super({methodName:"getClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC77D\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},$=class extends S{constructor(){super({methodName:"setClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC4F0\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var pe=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},w=new pe,te=()=>Math.random().toString(36).substring(2,15),re=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function c(e){return(...t)=>{let r=te(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(w.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(w.on(`${e}/reject/${r}`,i=>{o(),a(re(i))})),w.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function E(e){return t=>{let r=te(),n=[w.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),w.on(`${e}/onError/${r}`,o=>{t.onError(re(o))})];return w.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{w.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function p(e){return()=>w.getConstant(e)}var jt={getItem:c("getStorageItem"),setItem:c("setStorageItem"),removeItem:c("removeStorageItem"),clearItems:c("clearItems")},me=/^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*))?(?:\\+[\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*)?)?)?$/i,q=e=>["*","x","X"].includes(e),j=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},le=(e,t)=>typeof e==typeof t?[e,t]:[String(e),String(t)],ge=(e,t)=>{if(q(e)||q(t))return 0;let[r,n]=le(j(e),j(t));return r>n?1:r<n?-1:0},K=e=>{if(typeof e!="string")throw new TypeError("Invalid argument: expected a string");let t=e.match(me);if(!t)throw new Error(`Invalid semver: \'${e}\'`);let[,r,n,o,s,a]=t;return[r,n,o,s,a]},J=(e,t)=>{let r=Math.max(e.length,t.length);for(let n=0;n<r;n++){let o=e[n]??"0",s=t[n]??"0",a=ge(o,s);if(a!==0)return a}return 0},fe=(e,t)=>{let r=K(e),n=K(t),o=r.pop(),s=n.pop(),a=J(r,n);return a!==0?a:o&&s?J(o.split("."),s.split(".")):o?-1:s?1:0};function G(e){if(p("getOperationalEnvironment")()==="sandbox")return!0;let r=p("getTossAppVersion")(),o=p("getPlatformOS")()==="ios"?e.ios:e.android;return o===void 0?!1:o==="always"?!0:o==="never"?!1:fe(r,o)>=0}function X(e){return c("processProductGrant")(e)}var Kt={createOneTimePurchaseOrder:e=>{let t=G({android:"5.219.0",ios:"5.219.0"}),r=()=>{};if(!t)return r;let n=G({android:"5.231.1",ios:"5.230.0"}),{options:o,onEvent:s,onError:a}=e,i=o.sku??o.productId;return n?E("requestOneTimePurchase")({options:{sku:i},onEvent:async l=>{if(l.type==="purchased"){let m=await o.processProductGrant({orderId:l.data.orderId});await X({orderId:l.data.orderId,isProductGranted:m}).catch(a)}else s(l)},onError:l=>{a(l)}}):(c("iapCreateOneTimePurchaseOrder")({productId:i}).then(m=>{Promise.resolve(o.processProductGrant({orderId:m.orderId})).then(()=>{s({type:"success",data:m})}).catch(f=>{a(f)})}).catch(m=>{a(m)}),r)},createSubscriptionPurchaseOrder:e=>{let t=G({android:"5.248.0",ios:"5.249.0"}),r=()=>{};if(!t)return r;let{options:n,onEvent:o,onError:s}=e,{sku:a,offerId:i,processProductGrant:u}=n;return E("requestSubscriptionPurchase")({options:{sku:a,offerId:i??null},onEvent:async m=>{if(m.type==="purchased"){let f=await u({orderId:m.data.orderId,subscriptionId:m.data.subscriptionId});await X({orderId:m.data.orderId,isProductGranted:f}).catch(s)}else o(m)},onError:m=>{s(m)}})},getProductItemList:c("iapGetProductItemList"),getPendingOrders:c("getPendingOrders"),getCompletedOrRefundedOrders:c("getCompletedOrRefundedOrders"),completeProductGrant:c("completeProductGrant")},Jt=p("getSafeAreaInsets");var Xt=p("getSafeAreaInsets");var Yt={loadAppsInTossAdMob:Object.assign(E("loadAppsInTossAdMob"),{isSupported:p("loadAppsInTossAdMob_isSupported")}),showAppsInTossAdMob:Object.assign(E("showAppsInTossAdMob"),{isSupported:p("showAppsInTossAdMob_isSupported")}),isAppsInTossAdMobLoaded:Object.assign(c("isAppsInTossAdMobLoaded"),{isSupported:p("isAppsInTossAdMobLoaded_isSupported")})};var Zt={getDeploymentId:p("getDeploymentId")},Qt=p("deploymentId"),er=p("brandDisplayName"),tr=p("brandIcon"),rr=p("brandPrimaryColor");var nr={addAccessoryButton:c("addAccessoryButton"),removeAccessoryButton:c("removeAccessoryButton")},ve=c("requestPermission"),he=c("getPermission"),we=c("openPermissionDialog");function C({permission:e,handler:t,error:r}){let n=async(...o)=>{if(await ve(e)==="denied")throw new r;return t(...o)};return n.getPermission=()=>he(e),n.openPermissionDialog=()=>we(e),n}var sr=C({handler:e=>c("fetchAlbumPhotos")(e),permission:{name:"photos",access:"read"},error:V}),ir=C({handler:e=>c("fetchContacts")(e),permission:{name:"contacts",access:"read"},error:H}),dr=C({handler:e=>c("getCurrentLocation")(e),permission:{name:"geolocation",access:"access"},error:k}),pr=C({handler:e=>c("openCamera")(e),permission:{name:"camera",access:"access"},error:U}),lr=C({handler:e=>c("setClipboardText")(e),permission:{name:"clipboard",access:"write"},error:$}),fr=C({handler:()=>c("getClipboardText")(),permission:{name:"clipboard",access:"read"},error:z}),Ee=c("getPermission"),be=c("openPermissionDialog"),ne=e=>E("updateLocationEvent")({...e,onError:t=>{let r=new W;return t instanceof Error&&t.name===r.name?e.onError(r):e.onError(t)}});ne.getPermission=()=>Ee({name:"geolocation",access:"access"});ne.openPermissionDialog=()=>be({name:"geolocation",access:"access"});var hr=Object.assign(E("loadFullScreenAd"),{isSupported:p("loadFullScreenAd_isSupported")}),wr=Object.assign(E("showFullScreenAd"),{isSupported:p("showFullScreenAd_isSupported")}),Ae=c("openURL");function _e(e){let t=Se(e);return Ae(t)}function Se(e){return["http://","https://"].some(r=>e.startsWith(r))?Ce(e):e}function Ce(e){return`supertoss://web?url=${encodeURIComponent(e)}&external=true`}var Y="https://static.toss.im/ads/sdk/toss-ads-space-kit-1.3.0.js",Z=15e3,P=null;function _(){if(!(typeof window>"u"))return window.TossAdsSpaceKit}function Ie(){if(typeof window>"u"||typeof document>"u")return Promise.reject(new Error("Ads SDK can only be loaded in a browser environment."));let e=_();if(e)return Promise.resolve(e);if(P)return P;let t=new Promise((r,n)=>{let o=document.createElement("script"),s=()=>{o.removeEventListener("load",a),o.removeEventListener("error",i),window.clearTimeout(u),P=null},a=()=>{let l=_();if(l){s(),r(l);return}s(),n(new Error("Ads SDK script loaded but window.TossAdsSpaceKit was not exposed."))},i=()=>{s(),n(new Error(`Failed to load Ads SDK script from ${Y}.`))},u=window.setTimeout(()=>{s(),n(new Error(`Loading Ads SDK timed out after ${Z}ms.`))},Z);o.addEventListener("load",a),o.addEventListener("error",i),o.async=!0,o.src=Y,document.head.appendChild(o)});return P=t,t}var A=Object.assign(E("fetchTossAd"),{isSupported:p("fetchTossAd_isSupported")}),Te=c("tossAdEventLog"),ye=new Set(["1","2"]);function Le(e){return new Promise((t,r)=>{if(!A.isSupported()){r(new Error("fetchTossAd is not supported in this environment."));return}return A({options:e,onEvent:t,onError:r})})}function Q(e){let t=Array.isArray(e.ads)?e.ads.filter(r=>ye.has(String(r.styleId))):[];return{requestId:e.requestId??"",status:e.status??"OK",ads:t,ext:e.ext}}function Re(e){return Pe(e)?e.resultType!=="SUCCESS"?e:e.success?{...e,success:Q(e.success)}:{resultType:"FAIL",error:{reason:"fetchTossAd returned SUCCESS without payload"}}:xe(e)?{resultType:"SUCCESS",success:Q(e)}:{resultType:"FAIL",error:{reason:"Invalid response from fetchTossAd"}}}function Pe(e){return!!(e&&typeof e=="object"&&"resultType"in e)}function xe(e){return!!(e&&typeof e=="object"&&"ads"in e)}function De(){return async(e,t)=>{try{let r=await Le({adGroupId:t.spaceUnitId,sdkId:"108",availableStyleIds:["1","2"]});return Re(r)}catch(r){return{resultType:"FAIL",error:{reason:r instanceof Error?r.message:"Unknown fetchTossAd error"}}}}}var L=null;function Ne(e){let{callbacks:t}=e,r=()=>t?.onInitialized?.(),n=a=>{let i=a instanceof Error?a:new Error(String(a));t?.onInitializationFailed?.(i)};if(_()?.isInitialized()){r();return}if(L!=null){L.then(r).catch(n);return}let s=Ie().then(a=>{if(a.isInitialized())return;let u={environment:"live",customAdFetcher:De(),opener:_e};a.init(u)});L=s,s.then(r).catch(n).finally(()=>{L===s&&(L=null)})}function Me(e,t,r={}){let{callbacks:n}=r,o=s=>{let a=s instanceof Error?s:new Error(String(s));n?.onAdFailedToRender?.({slotId:"",adGroupId:e,adMetadata:{},error:{code:0,message:a.message}})};try{let s=e,a=_();if(!a)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!a.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let i=typeof t=="string"?document.querySelector(t):t;if(!i)throw new Error(`[toss-ad] Failed to find target element: ${t}`);let u={spaceId:s,autoLoad:!0,theme:r.theme,padding:r.padding,callbacks:oe(e,r.callbacks)};a.banner.createSlot(i,u)}catch(s){o(s)}}var Fe="16px 20px",ke="20px",Ge="auto",Oe="blackAndWhite",Be="expanded",v="toss-ads-attach",ee="toss-ads-attach-style";function Ve(e){let t=e.ownerDocument;if(!t||t.getElementById(ee))return;let r=t.createElement("style");r.id=ee,r.textContent=`\n .${v} { background: #ffffff; }\n .${v}.toss-ads-tone-grey { background: #f2f4f7; }\n @media (prefers-color-scheme: dark) {\n .${v} { background: #17171c; }\n .${v}.toss-ads-tone-grey { background: #101013; }\n }\n .${v}.toss-ads-theme-light { background: #ffffff; }\n .${v}.toss-ads-theme-light.toss-ads-tone-grey { background: #f2f4f7; }\n .${v}.toss-ads-theme-dark { background: #17171c; }\n .${v}.toss-ads-theme-dark.toss-ads-tone-grey { background: #101013; }\n `;let n=t.head??t.body??t.documentElement;n&&n.appendChild(r)}function He(e,t,r={}){let{callbacks:n,theme:o=Ge,tone:s=Oe,variant:a=Be}=r,i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.boxSizing="border-box",i.style.display="flex",i.style.flexDirection="column",i.style.justifyContent="center",i.style.overflow="hidden",a==="card"&&(i.style.padding="0 10px");let u=document.createElement("div");u.classList.add(v),s==="grey"&&u.classList.add("toss-ads-tone-grey"),o==="light"?u.classList.add("toss-ads-theme-light"):o==="dark"&&u.classList.add("toss-ads-theme-dark"),a==="card"&&(u.style.borderRadius="16px",u.style.overflow="hidden"),i.appendChild(u);let l=!1,m=null,f=b=>{let y=b instanceof Error?b:new Error(String(b));n?.onAdFailedToRender?.({slotId:"",adGroupId:e,adMetadata:{},error:{code:0,message:y.message}})},ae=oe(e,n);try{let b=e,y=_();if(!y)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!y.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let F=typeof t=="string"?document.querySelector(t):t;if(!F)throw new Error(`[toss-ad] Failed to find target element: ${t}`);Ve(F),F.appendChild(i),l=!0;let ie={spaceId:b,autoLoad:!0,theme:o==="auto"?void 0:o,renderPadding:ce=>ce==="1"?Fe:ke,callbacks:ae};m=y.banner.createSlot(u,ie)}catch(b){l&&i.parentNode&&i.parentNode.removeChild(i),f(b)}return{destroy(){m?.destroy(),l&&i.parentNode&&i.parentNode.removeChild(i)}}}function Ue(e){let t=_();t?.banner&&t.banner.destroy(e)}function We(){let e=_();e?.banner&&e.banner.destroyAll()}function oe(e,t){if(!t)return;let r=n=>{let o={...n??{}};return o.adGroupId=o.adGroupId??o.spaceId??e,delete o.spaceId,o};return{onAdRendered:n=>t.onAdRendered?.(r(n)),onAdViewable:n=>t.onAdViewable?.(r(n)),onAdClicked:n=>t.onAdClicked?.(r(n)),onAdImpression:n=>{Te({log_name:"display_ads_all::impression__1px_banner",log_type:"event",params:{event_type:"impression",schema_id:1812034,request_id:n?.adMetadata?.requestId??""}}),t.onAdImpression?.(r(n))},onAdFailedToRender:n=>t.onAdFailedToRender?.({...r(n),error:n?.error??{code:0,message:"UNKNOWN"}}),onNoFill:n=>t.onNoFill?.(r(n))}}var Er={initialize:Object.assign(Ne,{isSupported:A.isSupported}),attach:Object.assign(Me,{isSupported:A.isSupported}),attachBanner:Object.assign(He,{isSupported:A.isSupported}),destroy:Object.assign(Ue,{isSupported:A.isSupported}),destroyAll:Object.assign(We,{isSupported:A.isSupported})},br=Object.assign(c("getServerTime"),{isSupported:p("getServerTime_isSupported")});var x=class{_log=c("debugLog");log(t,r){try{this._log({log_name:`apps_in_toss_webview_${t}`,log_type:"debug",params:{...r,...this.getCommonParams()}})}catch{}}getCommonParams(){return{...this.getLocationInfo(),...this.getNavigatorInfo(),...this.getScreenInfo(),appName:window.__appsInToss.appName,deploymentId:window.__appsInToss.deploymentId,sessionId:window.__appsInToss.sessionId,isGame:window.__appsInToss.webViewType==="game",timestampMs:Date.now()}}getLocationInfo(){return{url:window.location.href,urlOrigin:window.location.origin,urlHost:window.location.hostname,urlPath:window.location.pathname,urlSearch:window.location.search}}getNavigatorInfo(){return{userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,cookieEnabled:navigator.cookieEnabled,hardwareConcurrency:navigator.hardwareConcurrency,deviceMemory:navigator.deviceMemory?navigator.deviceMemory*1024*1024:void 0,maxTouchPoints:navigator.maxTouchPoints}}getScreenInfo(){return{screenWidth:screen.width,screenHeight:screen.height,availableScreenWidth:screen.availWidth,availableScreenHeight:screen.availHeight,devicePixelRatio:window.devicePixelRatio,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}}};var D=class{callbacks={};on(t,r){return typeof this.callbacks[t]>"u"&&(this.callbacks[t]=[]),this.callbacks[t].push(r),()=>{this.callbacks[t]=this.callbacks[t]?.filter(n=>n!==r)??[]}}emit(t,r){this.callbacks[t]?.forEach(n=>n(r))}};window.__appsInToss={appName:p("getAppName")(),deploymentId:p("getDeploymentId")(),webViewType:p("getWebViewType")(),sessionId:Math.random().toString(36).substring(2),eventEmitter:new D,debugLogger:new x};var I=/\\.(data|wasm|framework\\.js)(?:\\.gz|\\.br|\\.unityweb)?$/;function N(e){window.fetch=new Proxy(window.fetch,{apply:e})}(()=>{if(window.__appsInToss.webViewType!=="game"||typeof caches>"u")return;let e="@apps-in-toss/caches/",t=`${e}${window.__appsInToss.deploymentId}`;window.addEventListener("load",async()=>{let r=await caches.keys();for(let n of r)n.startsWith(e)&&n!==t&&await caches.delete(n)}),N(async(r,n,o)=>{let s=new Request(o[0],o[1]);if(!I.test(s.url))return await r.call(n,s);let a=await caches.open(t),i=await a.match(s);if(i){let l=i.headers.get("ETag"),m=i.headers.get("Last-Modified");l&&s.headers.set("If-None-Match",l),m&&s.headers.set("If-Modified-Since",m);let f=await r.call(n,s);return f.status===304?(i.__revalidateResponse=f,i):(a.put(s,f.clone()),f)}let u=await r.call(n,s);return a.put(s,u.clone()),u})})();N(async(e,t,r)=>{let n=new Request(r[0],r[1]),o=Date.now();window.__appsInToss.eventEmitter.emit("fetchRequest",{request:n});try{let s=await e.call(t,n);return window.__appsInToss.eventEmitter.emit("fetchResponse",{request:n,response:s,requestAt:o}),s}catch(s){throw window.__appsInToss.eventEmitter.emit("fetchError",{request:n,requestAt:o,error:s}),s}});HTMLCanvasElement.prototype.getContext=new Proxy(HTMLCanvasElement.prototype.getContext,{apply:(e,t,r)=>{let n=e.apply(t,r);return(n instanceof WebGL2RenderingContext||n instanceof WebGLRenderingContext)&&window.__appsInToss.eventEmitter.emit("webglGetContext",{canvas:t,context:n}),n}});var se=window.__appsInToss.debugLogger;se.log("load_start",{});window.addEventListener("load",()=>{let e=performance.timeOrigin,t=performance.getEntriesByType?.("navigation")[0]??null,r=typeof e<"u"&&t!==null,n=r?{navigationStartAtMs:e+t.startTime,navigationRedirectStartAtMs:e+t.redirectStart,navigationRedirectEndAtMs:e+t.redirectEnd,navigationRedirectCount:t.redirectCount,navigationServiceWorkerStartAtMs:e+t.workerStart,navigationFetchStartAtMs:e+t.fetchStart,navigationDomainLookupStartAtMs:e+t.domainLookupStart,navigationDomainLookupEndAtMs:e+t.domainLookupEnd,navigationConnectStartAtMs:e+t.connectStart,navigationSecureConnectStartAtMs:e+t.secureConnectionStart,navigationConnectEndAtMs:e+t.connectEnd,navigationRequestStartAtMs:e+t.requestStart,navigationResponseStartAtMs:e+t.responseStart,navigationResponseEndAtMs:e+t.responseEnd,navigationDomInteractiveAtMs:e+t.domInteractive,navigationDomContentLoadedEventStartAtMs:e+t.domContentLoadedEventStart,navigationDomContentLoadedEventEndAtMs:e+t.domContentLoadedEventEnd,navigationDomCompleteAtMs:e+t.domComplete}:{};se.log("load_complete",{isNavigationDebugSupported:r,...n})});function T(e,t){return parseFloat(e.toFixed(t))}(()=>{if(typeof performance.memory>"u"||typeof performance.memory.usedJSHeapSize>"u"||typeof performance.memory.totalJSHeapSize>"u"||typeof performance.memory.jsHeapSizeLimit>"u")return;function e(t){window.__appsInToss.debugLogger.log(t,{usedJSHeapSize:T(performance.memory.usedJSHeapSize/1024,2),totalJSHeapSize:T(performance.memory.totalJSHeapSize/1024,2),jsHeapSizeLimit:T(performance.memory.jsHeapSizeLimit/1024,2)})}e("memory_usage_first_0s"),setTimeout(()=>e("memory_usage_first_1s"),1e3),setTimeout(()=>e("memory_usage_first_10s"),1e4),setTimeout(()=>e("memory_usage_first_30s"),3e4),setTimeout(()=>e("memory_usage_first_60s"),6e4),setInterval(()=>e("memory_usage_every_180s"),18e4)})();(()=>{let e=window.__appsInToss.debugLogger,t=performance.timeOrigin;if(typeof t>"u"||typeof PerformanceObserver>"u")return;new PerformanceObserver(o=>{o.getEntries().forEach(a=>{a.name==="first-paint"?e.log("first_paint",{fpStartAtMs:t+a.startTime}):a.name==="first-contentful-paint"&&e.log("first_contentful_paint",{fcpStartAtMs:t+a.startTime})})}).observe({type:"paint"}),new PerformanceObserver(o=>{o.getEntries().forEach(a=>{e.log("largest_contentful_paint",{lcpStartAtMs:t+a.startTime,lcpRenderSize:a.size})})}).observe({type:"largest-contentful-paint"})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.eventEmitter.on("webglGetContext",({canvas:t,context:r})=>{if(t.getAttribute("id")!=="unity-canvas")return;e();let n=r.getExtension("WEBGL_debug_renderer_info"),o=r.getParameter(r.MAX_VIEWPORT_DIMS),s={webGLRenderer:r.getParameter(r.RENDERER),webGLVendor:r.getParameter(r.VENDOR),webGLVersion:r.getParameter(r.VERSION),webGLShadingLanguageVersion:r.getParameter(r.SHADING_LANGUAGE_VERSION),webGLMaxTextureSize:r.getParameter(r.MAX_TEXTURE_SIZE),webGLMaxViewportWidth:o[0],webGLMaxViewportHeight:o[1],webGLMaxRenderbufferSize:r.getParameter(r.MAX_RENDERBUFFER_SIZE)},a=n?{webGLUnmaskedVendor:r.getParameter(n.UNMASKED_VENDOR_WEBGL),webGLUnmaskedRenderer:r.getParameter(n.UNMASKED_RENDERER_WEBGL)}:{};window.__appsInToss.debugLogger.log("unity_webgl_info",{...s,...a})})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.debugLogger,t=window.__appsInToss.eventEmitter;t.on("fetchRequest",({request:n})=>{I.test(n.url)&&e.log("game_resource_download_start",{gameResourceRequestURL:n.url})});function r({request:n,requestAt:o,error:s}){e.log("game_resource_download_error",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceError:s instanceof Error?s.message:"Unknown Error"})}t.on("fetchResponse",async({request:n,requestAt:o,response:s})=>{if(!I.test(n.url))return;let a=await s.clone().blob().then(u=>T(u.size/1024,2)).catch(u=>(r({request:n,requestAt:o,error:u}),null));if(a===null)return;let i=Date.now();e.log("game_resource_download_end",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceResponseAtMs:i,gameResourceResponseSize:a,gameResourceResponseStatus:s.__revalidateResponse?.status??s.status,gameResourceDownloadDurationMs:i-o})}),t.on("fetchError",async({request:n,requestAt:o,error:s})=>{I.test(n.url)&&r({request:n,requestAt:o,error:s})})})();var M=[];function ze(){let e=0;function t(r){let n=performance.now();if(r<n-1e3){M.push(e);return}e+=1,window.requestAnimationFrame(()=>t(r))}window.requestAnimationFrame(()=>t(performance.now()))}function $e(){if(M.length===0)return;let e=M;M=[];let t=qe(e).toSorted(),r={};for(let o=0;o<=100;o+=10){let s=t[Math.floor((t.length-1)*(o/100))];s&&(r[`fpsP${o}`]=s)}let n=t.reduce((o,s)=>o+s,0);r.fpsAverage=n/t.length,window.__appsInToss.debugLogger.log("fps_every_300s",r)}function qe(e){let t=new Set(e);return Array.from(t.values())}setInterval(()=>ze(),1e3);setInterval(()=>$e(),3e5);})();\n';
|
|
213957
|
+
m = '"use strict";(()=>{var de=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},h=new de,O=()=>Math.random().toString(36).substring(2,15),B=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function d(e){return(...t)=>{let r=O(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(h.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(h.on(`${e}/reject/${r}`,i=>{o(),a(B(i))})),h.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function R(e){return t=>{let r=O(),n=[h.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),h.on(`${e}/onError/${r}`,o=>{t.onError(B(o))})];return h.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{h.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function g(e){return()=>h.getConstant(e)}var ue=function(){return{emit:function(t,r){for(var n=this.events[t]||[],o=0,s=n.length;o<s;o++)n[o](r)},events:{},on:function(t,r){var n=this,o,s;return((o=this.events)[s=t]||(o[s]=[])).push(r),function(){var a;n.events[t]=(a=n.events[t])===null||a===void 0?void 0:a.filter(function(i){return r!==i})}}}};typeof window<"u"&&(window.__GRANITE_NATIVE_EMITTER=ue());var Xe=d("closeView"),Ye=d("generateHapticFeedback"),Ze=d("share"),Qe=d("setSecureScreen"),et=d("setScreenAwakeMode"),tt=d("getNetworkStatus"),rt=d("setIosSwipeGestureEnabled"),nt=d("openURL"),ot=d("openPermissionDialog"),st=d("getPermission"),at=d("requestPermission"),it=g("setClipboardText"),ct=g("getClipboardText"),dt=g("fetchContacts"),ut=g("fetchAlbumPhotos"),pt=g("getCurrentLocation"),mt=g("openCamera"),lt=d("appLogin"),gt=d("eventLog"),ft=d("getTossShareLink"),vt=d("setDeviceOrientation"),ht=d("checkoutPayment"),wt=d("saveBase64Data"),Et=d("appsInTossSignTossCert"),bt=d("getGameCenterGameProfile"),At=d("openGameCenterLeaderboard"),_t=d("submitGameCenterLeaderBoardScore"),St=d("getUserKeyForGame"),Ct=d("grantPromotionReward"),It=d("grantPromotionRewardForGame"),Tt=d("getIsTossLoginIntegratedService"),yt=d("getServerTime"),Lt=g("getLocale"),Rt=g("getSchemeUri"),Pt=g("getPlatformOS"),xt=g("getOperationalEnvironment"),Dt=g("getTossAppVersion"),Nt=g("getDeviceId"),Mt=g("getGroupId"),Ft=R("contactsViral"),kt=R("startUpdateLocation"),Gt=R("onVisibilityChangedByTransparentServiceWeb");var S=class extends Error{constructor({methodName:e,message:t}){super(),this.name=`${e} permission error`,this.message=t}},V=class extends S{constructor(){super({methodName:"fetchAlbumPhotos",message:"\\uC0AC\\uC9C4\\uCCA9 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},H=class extends S{constructor(){super({methodName:"fetchContacts",message:"\\uC5F0\\uB77D\\uCC98 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},U=class extends S{constructor(){super({methodName:"openCamera",message:"\\uCE74\\uBA54\\uB77C \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var k=class extends S{constructor(){super({methodName:"getCurrentLocation",message:"\\uC704\\uCE58 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},W=k,z=class extends S{constructor(){super({methodName:"getClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC77D\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},$=class extends S{constructor(){super({methodName:"setClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC4F0\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var pe=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},w=new pe,te=()=>Math.random().toString(36).substring(2,15),re=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function c(e){return(...t)=>{let r=te(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(w.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(w.on(`${e}/reject/${r}`,i=>{o(),a(re(i))})),w.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function E(e){return t=>{let r=te(),n=[w.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),w.on(`${e}/onError/${r}`,o=>{t.onError(re(o))})];return w.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{w.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function p(e){return()=>w.getConstant(e)}var jt={getItem:c("getStorageItem"),setItem:c("setStorageItem"),removeItem:c("removeStorageItem"),clearItems:c("clearItems")},me=/^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*))?(?:\\+[\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*)?)?)?$/i,q=e=>["*","x","X"].includes(e),j=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},le=(e,t)=>typeof e==typeof t?[e,t]:[String(e),String(t)],ge=(e,t)=>{if(q(e)||q(t))return 0;let[r,n]=le(j(e),j(t));return r>n?1:r<n?-1:0},K=e=>{if(typeof e!="string")throw new TypeError("Invalid argument: expected a string");let t=e.match(me);if(!t)throw new Error(`Invalid semver: \'${e}\'`);let[,r,n,o,s,a]=t;return[r,n,o,s,a]},J=(e,t)=>{let r=Math.max(e.length,t.length);for(let n=0;n<r;n++){let o=e[n]??"0",s=t[n]??"0",a=ge(o,s);if(a!==0)return a}return 0},fe=(e,t)=>{let r=K(e),n=K(t),o=r.pop(),s=n.pop(),a=J(r,n);return a!==0?a:o&&s?J(o.split("."),s.split(".")):o?-1:s?1:0};function G(e){if(p("getOperationalEnvironment")()==="sandbox")return!0;let r=p("getTossAppVersion")(),o=p("getPlatformOS")()==="ios"?e.ios:e.android;return o===void 0?!1:o==="always"?!0:o==="never"?!1:fe(r,o)>=0}function X(e){return c("processProductGrant")(e)}var Kt={createOneTimePurchaseOrder:e=>{let t=G({android:"5.219.0",ios:"5.219.0"}),r=()=>{};if(!t)return r;let n=G({android:"5.231.1",ios:"5.230.0"}),{options:o,onEvent:s,onError:a}=e,i=o.sku??o.productId;return n?E("requestOneTimePurchase")({options:{sku:i},onEvent:async l=>{if(l.type==="purchased"){let m=await o.processProductGrant({orderId:l.data.orderId});await X({orderId:l.data.orderId,isProductGranted:m}).catch(a)}else s(l)},onError:l=>{a(l)}}):(c("iapCreateOneTimePurchaseOrder")({productId:i}).then(m=>{Promise.resolve(o.processProductGrant({orderId:m.orderId})).then(()=>{s({type:"success",data:m})}).catch(f=>{a(f)})}).catch(m=>{a(m)}),r)},createSubscriptionPurchaseOrder:e=>{let t=G({android:"5.248.0",ios:"5.249.0"}),r=()=>{};if(!t)return r;let{options:n,onEvent:o,onError:s}=e,{sku:a,offerId:i,processProductGrant:u}=n;return E("requestSubscriptionPurchase")({options:{sku:a,offerId:i??null},onEvent:async m=>{if(m.type==="purchased"){let f=await u({orderId:m.data.orderId,subscriptionId:m.data.subscriptionId});await X({orderId:m.data.orderId,isProductGranted:f}).catch(s)}else o(m)},onError:m=>{s(m)}})},getProductItemList:c("iapGetProductItemList"),getPendingOrders:c("getPendingOrders"),getCompletedOrRefundedOrders:c("getCompletedOrRefundedOrders"),completeProductGrant:c("completeProductGrant"),getSubscriptionInfo:c("getSubscriptionInfo")},Jt=p("getSafeAreaInsets");var Xt=p("getSafeAreaInsets");var Yt={loadAppsInTossAdMob:Object.assign(E("loadAppsInTossAdMob"),{isSupported:p("loadAppsInTossAdMob_isSupported")}),showAppsInTossAdMob:Object.assign(E("showAppsInTossAdMob"),{isSupported:p("showAppsInTossAdMob_isSupported")}),isAppsInTossAdMobLoaded:Object.assign(c("isAppsInTossAdMobLoaded"),{isSupported:p("isAppsInTossAdMobLoaded_isSupported")})};var Zt={getDeploymentId:p("getDeploymentId")},Qt=p("deploymentId"),er=p("brandDisplayName"),tr=p("brandIcon"),rr=p("brandPrimaryColor");var nr={addAccessoryButton:c("addAccessoryButton"),removeAccessoryButton:c("removeAccessoryButton")},ve=c("requestPermission"),he=c("getPermission"),we=c("openPermissionDialog");function C({permission:e,handler:t,error:r}){let n=async(...o)=>{if(await ve(e)==="denied")throw new r;return t(...o)};return n.getPermission=()=>he(e),n.openPermissionDialog=()=>we(e),n}var sr=C({handler:e=>c("fetchAlbumPhotos")(e),permission:{name:"photos",access:"read"},error:V}),ir=C({handler:e=>c("fetchContacts")(e),permission:{name:"contacts",access:"read"},error:H}),dr=C({handler:e=>c("getCurrentLocation")(e),permission:{name:"geolocation",access:"access"},error:k}),pr=C({handler:e=>c("openCamera")(e),permission:{name:"camera",access:"access"},error:U}),lr=C({handler:e=>c("setClipboardText")(e),permission:{name:"clipboard",access:"write"},error:$}),fr=C({handler:()=>c("getClipboardText")(),permission:{name:"clipboard",access:"read"},error:z}),Ee=c("getPermission"),be=c("openPermissionDialog"),ne=e=>E("updateLocationEvent")({...e,onError:t=>{let r=new W;return t instanceof Error&&t.name===r.name?e.onError(r):e.onError(t)}});ne.getPermission=()=>Ee({name:"geolocation",access:"access"});ne.openPermissionDialog=()=>be({name:"geolocation",access:"access"});var hr=Object.assign(E("loadFullScreenAd"),{isSupported:p("loadFullScreenAd_isSupported")}),wr=Object.assign(E("showFullScreenAd"),{isSupported:p("showFullScreenAd_isSupported")}),Ae=c("openURL");function _e(e){let t=Se(e);return Ae(t)}function Se(e){return["http://","https://"].some(r=>e.startsWith(r))?Ce(e):e}function Ce(e){return`supertoss://web?url=${encodeURIComponent(e)}&external=true`}var Y="https://static.toss.im/ads/sdk/toss-ads-space-kit-1.3.0.js",Z=15e3,P=null;function _(){if(!(typeof window>"u"))return window.TossAdsSpaceKit}function Ie(){if(typeof window>"u"||typeof document>"u")return Promise.reject(new Error("Ads SDK can only be loaded in a browser environment."));let e=_();if(e)return Promise.resolve(e);if(P)return P;let t=new Promise((r,n)=>{let o=document.createElement("script"),s=()=>{o.removeEventListener("load",a),o.removeEventListener("error",i),window.clearTimeout(u),P=null},a=()=>{let l=_();if(l){s(),r(l);return}s(),n(new Error("Ads SDK script loaded but window.TossAdsSpaceKit was not exposed."))},i=()=>{s(),n(new Error(`Failed to load Ads SDK script from ${Y}.`))},u=window.setTimeout(()=>{s(),n(new Error(`Loading Ads SDK timed out after ${Z}ms.`))},Z);o.addEventListener("load",a),o.addEventListener("error",i),o.async=!0,o.src=Y,document.head.appendChild(o)});return P=t,t}var A=Object.assign(E("fetchTossAd"),{isSupported:p("fetchTossAd_isSupported")}),Te=c("tossAdEventLog"),ye=new Set(["1","2"]);function Le(e){return new Promise((t,r)=>{if(!A.isSupported()){r(new Error("fetchTossAd is not supported in this environment."));return}return A({options:e,onEvent:t,onError:r})})}function Q(e){let t=Array.isArray(e.ads)?e.ads.filter(r=>ye.has(String(r.styleId))):[];return{requestId:e.requestId??"",status:e.status??"OK",ads:t,ext:e.ext}}function Re(e){return Pe(e)?e.resultType!=="SUCCESS"?e:e.success?{...e,success:Q(e.success)}:{resultType:"FAIL",error:{reason:"fetchTossAd returned SUCCESS without payload"}}:xe(e)?{resultType:"SUCCESS",success:Q(e)}:{resultType:"FAIL",error:{reason:"Invalid response from fetchTossAd"}}}function Pe(e){return!!(e&&typeof e=="object"&&"resultType"in e)}function xe(e){return!!(e&&typeof e=="object"&&"ads"in e)}function De(){return async(e,t)=>{try{let r=await Le({adGroupId:t.spaceUnitId,sdkId:"108",availableStyleIds:["1","2"]});return Re(r)}catch(r){return{resultType:"FAIL",error:{reason:r instanceof Error?r.message:"Unknown fetchTossAd error"}}}}}var L=null;function Ne(e){let{callbacks:t}=e,r=()=>t?.onInitialized?.(),n=a=>{let i=a instanceof Error?a:new Error(String(a));t?.onInitializationFailed?.(i)};if(_()?.isInitialized()){r();return}if(L!=null){L.then(r).catch(n);return}let s=Ie().then(a=>{if(a.isInitialized())return;let u={environment:"live",customAdFetcher:De(),opener:_e};a.init(u)});L=s,s.then(r).catch(n).finally(()=>{L===s&&(L=null)})}function Me(e,t,r={}){let{callbacks:n}=r,o=s=>{let a=s instanceof Error?s:new Error(String(s));n?.onAdFailedToRender?.({slotId:"",adGroupId:e,adMetadata:{},error:{code:0,message:a.message}})};try{let s=e,a=_();if(!a)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!a.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let i=typeof t=="string"?document.querySelector(t):t;if(!i)throw new Error(`[toss-ad] Failed to find target element: ${t}`);let u={spaceId:s,autoLoad:!0,theme:r.theme,padding:r.padding,callbacks:oe(e,r.callbacks)};a.banner.createSlot(i,u)}catch(s){o(s)}}var Fe="16px 20px",ke="20px",Ge="auto",Oe="blackAndWhite",Be="expanded",v="toss-ads-attach",ee="toss-ads-attach-style";function Ve(e){let t=e.ownerDocument;if(!t||t.getElementById(ee))return;let r=t.createElement("style");r.id=ee,r.textContent=`\n .${v} { background: #ffffff; }\n .${v}.toss-ads-tone-grey { background: #f2f4f7; }\n @media (prefers-color-scheme: dark) {\n .${v} { background: #17171c; }\n .${v}.toss-ads-tone-grey { background: #101013; }\n }\n .${v}.toss-ads-theme-light { background: #ffffff; }\n .${v}.toss-ads-theme-light.toss-ads-tone-grey { background: #f2f4f7; }\n .${v}.toss-ads-theme-dark { background: #17171c; }\n .${v}.toss-ads-theme-dark.toss-ads-tone-grey { background: #101013; }\n `;let n=t.head??t.body??t.documentElement;n&&n.appendChild(r)}function He(e,t,r={}){let{callbacks:n,theme:o=Ge,tone:s=Oe,variant:a=Be}=r,i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.boxSizing="border-box",i.style.display="flex",i.style.flexDirection="column",i.style.justifyContent="center",i.style.overflow="hidden",a==="card"&&(i.style.padding="0 10px");let u=document.createElement("div");u.classList.add(v),s==="grey"&&u.classList.add("toss-ads-tone-grey"),o==="light"?u.classList.add("toss-ads-theme-light"):o==="dark"&&u.classList.add("toss-ads-theme-dark"),a==="card"&&(u.style.borderRadius="16px",u.style.overflow="hidden"),i.appendChild(u);let l=!1,m=null,f=b=>{let y=b instanceof Error?b:new Error(String(b));n?.onAdFailedToRender?.({slotId:"",adGroupId:e,adMetadata:{},error:{code:0,message:y.message}})},ae=oe(e,n);try{let b=e,y=_();if(!y)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!y.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let F=typeof t=="string"?document.querySelector(t):t;if(!F)throw new Error(`[toss-ad] Failed to find target element: ${t}`);Ve(F),F.appendChild(i),l=!0;let ie={spaceId:b,autoLoad:!0,theme:o==="auto"?void 0:o,renderPadding:ce=>ce==="1"?Fe:ke,callbacks:ae};m=y.banner.createSlot(u,ie)}catch(b){l&&i.parentNode&&i.parentNode.removeChild(i),f(b)}return{destroy(){m?.destroy(),l&&i.parentNode&&i.parentNode.removeChild(i)}}}function Ue(e){let t=_();t?.banner&&t.banner.destroy(e)}function We(){let e=_();e?.banner&&e.banner.destroyAll()}function oe(e,t){if(!t)return;let r=n=>{let o={...n??{}};return o.adGroupId=o.adGroupId??o.spaceId??e,delete o.spaceId,o};return{onAdRendered:n=>t.onAdRendered?.(r(n)),onAdViewable:n=>t.onAdViewable?.(r(n)),onAdClicked:n=>t.onAdClicked?.(r(n)),onAdImpression:n=>{Te({log_name:"display_ads_all::impression__1px_banner",log_type:"event",params:{event_type:"impression",schema_id:1812034,request_id:n?.adMetadata?.requestId??""}}),t.onAdImpression?.(r(n))},onAdFailedToRender:n=>t.onAdFailedToRender?.({...r(n),error:n?.error??{code:0,message:"UNKNOWN"}}),onNoFill:n=>t.onNoFill?.(r(n))}}var Er={initialize:Object.assign(Ne,{isSupported:A.isSupported}),attach:Object.assign(Me,{isSupported:A.isSupported}),attachBanner:Object.assign(He,{isSupported:A.isSupported}),destroy:Object.assign(Ue,{isSupported:A.isSupported}),destroyAll:Object.assign(We,{isSupported:A.isSupported})},br=Object.assign(c("getServerTime"),{isSupported:p("getServerTime_isSupported")});var x=class{_log=c("debugLog");log(t,r){try{this._log({log_name:`apps_in_toss_webview_${t}`,log_type:"debug",params:{...r,...this.getCommonParams()}})}catch{}}getCommonParams(){return{...this.getLocationInfo(),...this.getNavigatorInfo(),...this.getScreenInfo(),appName:window.__appsInToss.appName,deploymentId:window.__appsInToss.deploymentId,sessionId:window.__appsInToss.sessionId,isGame:window.__appsInToss.webViewType==="game",timestampMs:Date.now()}}getLocationInfo(){return{url:window.location.href,urlOrigin:window.location.origin,urlHost:window.location.hostname,urlPath:window.location.pathname,urlSearch:window.location.search}}getNavigatorInfo(){return{userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,cookieEnabled:navigator.cookieEnabled,hardwareConcurrency:navigator.hardwareConcurrency,deviceMemory:navigator.deviceMemory?navigator.deviceMemory*1024*1024:void 0,maxTouchPoints:navigator.maxTouchPoints}}getScreenInfo(){return{screenWidth:screen.width,screenHeight:screen.height,availableScreenWidth:screen.availWidth,availableScreenHeight:screen.availHeight,devicePixelRatio:window.devicePixelRatio,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}}};var D=class{callbacks={};on(t,r){return typeof this.callbacks[t]>"u"&&(this.callbacks[t]=[]),this.callbacks[t].push(r),()=>{this.callbacks[t]=this.callbacks[t]?.filter(n=>n!==r)??[]}}emit(t,r){this.callbacks[t]?.forEach(n=>n(r))}};window.__appsInToss={appName:p("getAppName")(),deploymentId:p("getDeploymentId")(),webViewType:p("getWebViewType")(),sessionId:Math.random().toString(36).substring(2),eventEmitter:new D,debugLogger:new x};var I=/\\.(data|wasm|framework\\.js)(?:\\.gz|\\.br|\\.unityweb)?$/;function N(e){window.fetch=new Proxy(window.fetch,{apply:e})}(()=>{if(window.__appsInToss.webViewType!=="game"||typeof caches>"u")return;let e="@apps-in-toss/caches/",t=`${e}${window.__appsInToss.deploymentId}`;window.addEventListener("load",async()=>{let r=await caches.keys();for(let n of r)n.startsWith(e)&&n!==t&&await caches.delete(n)}),N(async(r,n,o)=>{let s=new Request(o[0],o[1]);if(!I.test(s.url))return await r.call(n,s);let a=await caches.open(t),i=await a.match(s);if(i){let l=i.headers.get("ETag"),m=i.headers.get("Last-Modified");l&&s.headers.set("If-None-Match",l),m&&s.headers.set("If-Modified-Since",m);let f=await r.call(n,s);return f.status===304?(i.__revalidateResponse=f,i):(a.put(s,f.clone()),f)}let u=await r.call(n,s);return a.put(s,u.clone()),u})})();N(async(e,t,r)=>{let n=new Request(r[0],r[1]),o=Date.now();window.__appsInToss.eventEmitter.emit("fetchRequest",{request:n});try{let s=await e.call(t,n);return window.__appsInToss.eventEmitter.emit("fetchResponse",{request:n,response:s,requestAt:o}),s}catch(s){throw window.__appsInToss.eventEmitter.emit("fetchError",{request:n,requestAt:o,error:s}),s}});HTMLCanvasElement.prototype.getContext=new Proxy(HTMLCanvasElement.prototype.getContext,{apply:(e,t,r)=>{let n=e.apply(t,r);return(n instanceof WebGL2RenderingContext||n instanceof WebGLRenderingContext)&&window.__appsInToss.eventEmitter.emit("webglGetContext",{canvas:t,context:n}),n}});var se=window.__appsInToss.debugLogger;se.log("load_start",{});window.addEventListener("load",()=>{let e=performance.timeOrigin,t=performance.getEntriesByType?.("navigation")[0]??null,r=typeof e<"u"&&t!==null,n=r?{navigationStartAtMs:e+t.startTime,navigationRedirectStartAtMs:e+t.redirectStart,navigationRedirectEndAtMs:e+t.redirectEnd,navigationRedirectCount:t.redirectCount,navigationServiceWorkerStartAtMs:e+t.workerStart,navigationFetchStartAtMs:e+t.fetchStart,navigationDomainLookupStartAtMs:e+t.domainLookupStart,navigationDomainLookupEndAtMs:e+t.domainLookupEnd,navigationConnectStartAtMs:e+t.connectStart,navigationSecureConnectStartAtMs:e+t.secureConnectionStart,navigationConnectEndAtMs:e+t.connectEnd,navigationRequestStartAtMs:e+t.requestStart,navigationResponseStartAtMs:e+t.responseStart,navigationResponseEndAtMs:e+t.responseEnd,navigationDomInteractiveAtMs:e+t.domInteractive,navigationDomContentLoadedEventStartAtMs:e+t.domContentLoadedEventStart,navigationDomContentLoadedEventEndAtMs:e+t.domContentLoadedEventEnd,navigationDomCompleteAtMs:e+t.domComplete}:{};se.log("load_complete",{isNavigationDebugSupported:r,...n})});function T(e,t){return parseFloat(e.toFixed(t))}(()=>{if(typeof performance.memory>"u"||typeof performance.memory.usedJSHeapSize>"u"||typeof performance.memory.totalJSHeapSize>"u"||typeof performance.memory.jsHeapSizeLimit>"u")return;function e(t){window.__appsInToss.debugLogger.log(t,{usedJSHeapSize:T(performance.memory.usedJSHeapSize/1024,2),totalJSHeapSize:T(performance.memory.totalJSHeapSize/1024,2),jsHeapSizeLimit:T(performance.memory.jsHeapSizeLimit/1024,2)})}e("memory_usage_first_0s"),setTimeout(()=>e("memory_usage_first_1s"),1e3),setTimeout(()=>e("memory_usage_first_10s"),1e4),setTimeout(()=>e("memory_usage_first_30s"),3e4),setTimeout(()=>e("memory_usage_first_60s"),6e4),setInterval(()=>e("memory_usage_every_180s"),18e4)})();(()=>{let e=window.__appsInToss.debugLogger,t=performance.timeOrigin;if(typeof t>"u"||typeof PerformanceObserver>"u")return;new PerformanceObserver(o=>{o.getEntries().forEach(a=>{a.name==="first-paint"?e.log("first_paint",{fpStartAtMs:t+a.startTime}):a.name==="first-contentful-paint"&&e.log("first_contentful_paint",{fcpStartAtMs:t+a.startTime})})}).observe({type:"paint"}),new PerformanceObserver(o=>{o.getEntries().forEach(a=>{e.log("largest_contentful_paint",{lcpStartAtMs:t+a.startTime,lcpRenderSize:a.size})})}).observe({type:"largest-contentful-paint"})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.eventEmitter.on("webglGetContext",({canvas:t,context:r})=>{if(t.getAttribute("id")!=="unity-canvas")return;e();let n=r.getExtension("WEBGL_debug_renderer_info"),o=r.getParameter(r.MAX_VIEWPORT_DIMS),s={webGLRenderer:r.getParameter(r.RENDERER),webGLVendor:r.getParameter(r.VENDOR),webGLVersion:r.getParameter(r.VERSION),webGLShadingLanguageVersion:r.getParameter(r.SHADING_LANGUAGE_VERSION),webGLMaxTextureSize:r.getParameter(r.MAX_TEXTURE_SIZE),webGLMaxViewportWidth:o[0],webGLMaxViewportHeight:o[1],webGLMaxRenderbufferSize:r.getParameter(r.MAX_RENDERBUFFER_SIZE)},a=n?{webGLUnmaskedVendor:r.getParameter(n.UNMASKED_VENDOR_WEBGL),webGLUnmaskedRenderer:r.getParameter(n.UNMASKED_RENDERER_WEBGL)}:{};window.__appsInToss.debugLogger.log("unity_webgl_info",{...s,...a})})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.debugLogger,t=window.__appsInToss.eventEmitter;t.on("fetchRequest",({request:n})=>{I.test(n.url)&&e.log("game_resource_download_start",{gameResourceRequestURL:n.url})});function r({request:n,requestAt:o,error:s}){e.log("game_resource_download_error",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceError:s instanceof Error?s.message:"Unknown Error"})}t.on("fetchResponse",async({request:n,requestAt:o,response:s})=>{if(!I.test(n.url))return;let a=await s.clone().blob().then(u=>T(u.size/1024,2)).catch(u=>(r({request:n,requestAt:o,error:u}),null));if(a===null)return;let i=Date.now();e.log("game_resource_download_end",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceResponseAtMs:i,gameResourceResponseSize:a,gameResourceResponseStatus:s.__revalidateResponse?.status??s.status,gameResourceDownloadDurationMs:i-o})}),t.on("fetchError",async({request:n,requestAt:o,error:s})=>{I.test(n.url)&&r({request:n,requestAt:o,error:s})})})();var M=[];function ze(){let e=0;function t(r){let n=performance.now();if(r<n-1e3){M.push(e);return}e+=1,window.requestAnimationFrame(()=>t(r))}window.requestAnimationFrame(()=>t(performance.now()))}function $e(){if(M.length===0)return;let e=M;M=[];let t=qe(e).toSorted(),r={};for(let o=0;o<=100;o+=10){let s=t[Math.floor((t.length-1)*(o/100))];s&&(r[`fpsP${o}`]=s)}let n=t.reduce((o,s)=>o+s,0);r.fpsAverage=n/t.length,window.__appsInToss.debugLogger.log("fps_every_300s",r)}function qe(e){let t=new Set(e);return Array.from(t.values())}setInterval(()=>ze(),1e3);setInterval(()=>$e(),3e5);})();\n';
|
|
213923
213958
|
0 && (module.exports = {
|
|
213924
213959
|
afterDocumentLoad,
|
|
213925
213960
|
beforeDocumentLoad
|
|
@@ -139375,6 +139375,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
139375
139375
|
getPendingOrders: import_native_modules24.IAP.getPendingOrders,
|
|
139376
139376
|
getCompletedOrRefundedOrders: import_native_modules24.IAP.getCompletedOrRefundedOrders,
|
|
139377
139377
|
completeProductGrant: import_native_modules24.IAP.completeProductGrant,
|
|
139378
|
+
getSubscriptionInfo: import_native_modules24.IAP.getSubscriptionInfo,
|
|
139378
139379
|
isAppsInTossAdMobLoaded: import_native_modules24.GoogleAdMob.isAppsInTossAdMobLoaded,
|
|
139379
139380
|
tossAdEventLog,
|
|
139380
139381
|
memoryDebugLog: webViewMemoryDebugLog,
|
|
@@ -142334,6 +142335,22 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142334
142335
|
});
|
|
142335
142336
|
return _completeProductGrant.apply(this, arguments);
|
|
142336
142337
|
}
|
|
142338
|
+
function getSubscriptionInfo(_x12) {
|
|
142339
|
+
return _getSubscriptionInfo.apply(this, arguments);
|
|
142340
|
+
}
|
|
142341
|
+
function _getSubscriptionInfo() {
|
|
142342
|
+
_getSubscriptionInfo = _asyncToGenerator(function* (params) {
|
|
142343
|
+
var isSupported = isMinVersionSupported({
|
|
142344
|
+
android: "5.253.0",
|
|
142345
|
+
ios: "5.250.0"
|
|
142346
|
+
});
|
|
142347
|
+
if (!isSupported) {
|
|
142348
|
+
return;
|
|
142349
|
+
}
|
|
142350
|
+
return safePostMessage("getSubscriptionInfo", params);
|
|
142351
|
+
});
|
|
142352
|
+
return _getSubscriptionInfo.apply(this, arguments);
|
|
142353
|
+
}
|
|
142337
142354
|
function createSubscriptionPurchaseOrder(params) {
|
|
142338
142355
|
var isSupported = isMinVersionSupported({
|
|
142339
142356
|
android: "5.248.0",
|
|
@@ -142360,7 +142377,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142360
142377
|
isProductGranted
|
|
142361
142378
|
});
|
|
142362
142379
|
});
|
|
142363
|
-
return function onPurchased(
|
|
142380
|
+
return function onPurchased(_x13) {
|
|
142364
142381
|
return _ref8.apply(this, arguments);
|
|
142365
142382
|
};
|
|
142366
142383
|
}(),
|
|
@@ -142382,9 +142399,10 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142382
142399
|
getProductItemList,
|
|
142383
142400
|
getPendingOrders,
|
|
142384
142401
|
getCompletedOrRefundedOrders,
|
|
142385
|
-
completeProductGrant
|
|
142402
|
+
completeProductGrant,
|
|
142403
|
+
getSubscriptionInfo
|
|
142386
142404
|
};
|
|
142387
|
-
function saveBase64Data(
|
|
142405
|
+
function saveBase64Data(_x14) {
|
|
142388
142406
|
return _saveBase64Data.apply(this, arguments);
|
|
142389
142407
|
}
|
|
142390
142408
|
function _saveBase64Data() {
|
|
@@ -142401,7 +142419,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142401
142419
|
});
|
|
142402
142420
|
return _saveBase64Data.apply(this, arguments);
|
|
142403
142421
|
}
|
|
142404
|
-
function setDeviceOrientation(
|
|
142422
|
+
function setDeviceOrientation(_x15) {
|
|
142405
142423
|
return _setDeviceOrientation.apply(this, arguments);
|
|
142406
142424
|
}
|
|
142407
142425
|
function _setDeviceOrientation() {
|
|
@@ -142495,7 +142513,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142495
142513
|
});
|
|
142496
142514
|
return _getGameCenterGameProfile.apply(this, arguments);
|
|
142497
142515
|
}
|
|
142498
|
-
function submitGameCenterLeaderBoardScore(
|
|
142516
|
+
function submitGameCenterLeaderBoardScore(_x16) {
|
|
142499
142517
|
return _submitGameCenterLeaderBoardScore.apply(this, arguments);
|
|
142500
142518
|
}
|
|
142501
142519
|
function _submitGameCenterLeaderBoardScore() {
|
|
@@ -142535,7 +142553,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142535
142553
|
function isGrantPromotionRewardError(error) {
|
|
142536
142554
|
return typeof error === "object" && error !== null && "code" in error && typeof error.code === "string" && "message" in error && typeof error.message === "string";
|
|
142537
142555
|
}
|
|
142538
|
-
function grantPromotionReward(
|
|
142556
|
+
function grantPromotionReward(_x17) {
|
|
142539
142557
|
return _grantPromotionReward.apply(this, arguments);
|
|
142540
142558
|
}
|
|
142541
142559
|
function _grantPromotionReward() {
|
|
@@ -142562,7 +142580,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142562
142580
|
});
|
|
142563
142581
|
return _grantPromotionReward.apply(this, arguments);
|
|
142564
142582
|
}
|
|
142565
|
-
function grantPromotionRewardForGame(
|
|
142583
|
+
function grantPromotionRewardForGame(_x18) {
|
|
142566
142584
|
return _grantPromotionRewardForGame.apply(this, arguments);
|
|
142567
142585
|
}
|
|
142568
142586
|
function _grantPromotionRewardForGame() {
|
|
@@ -142613,7 +142631,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142613
142631
|
});
|
|
142614
142632
|
return unregisterCallbacks;
|
|
142615
142633
|
}
|
|
142616
|
-
function appsInTossSignTossCert(
|
|
142634
|
+
function appsInTossSignTossCert(_x19) {
|
|
142617
142635
|
return _appsInTossSignTossCert.apply(this, arguments);
|
|
142618
142636
|
}
|
|
142619
142637
|
function _appsInTossSignTossCert() {
|
|
@@ -142694,7 +142712,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142694
142712
|
function generateHapticFeedback(options) {
|
|
142695
142713
|
return CommonModule2.generateHapticFeedback(options);
|
|
142696
142714
|
}
|
|
142697
|
-
function share(
|
|
142715
|
+
function share(_x20) {
|
|
142698
142716
|
return _share.apply(this, arguments);
|
|
142699
142717
|
}
|
|
142700
142718
|
function _share() {
|
|
@@ -142706,7 +142724,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142706
142724
|
function setSecureScreen(options) {
|
|
142707
142725
|
return CommonModule2.setSecureScreen(options);
|
|
142708
142726
|
}
|
|
142709
|
-
function setScreenAwakeMode(
|
|
142727
|
+
function setScreenAwakeMode(_x21) {
|
|
142710
142728
|
return _setScreenAwakeMode.apply(this, arguments);
|
|
142711
142729
|
}
|
|
142712
142730
|
function _setScreenAwakeMode() {
|
|
@@ -142718,7 +142736,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
142718
142736
|
function getNetworkStatus() {
|
|
142719
142737
|
return CommonModule2.getNetworkStatus();
|
|
142720
142738
|
}
|
|
142721
|
-
function setIosSwipeGestureEnabled(
|
|
142739
|
+
function setIosSwipeGestureEnabled(_x22) {
|
|
142722
142740
|
return _setIosSwipeGestureEnabled.apply(this, arguments);
|
|
142723
142741
|
}
|
|
142724
142742
|
function _setIosSwipeGestureEnabled() {
|
|
@@ -213162,6 +213180,22 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
213162
213180
|
});
|
|
213163
213181
|
return _completeProductGrant.apply(this, arguments);
|
|
213164
213182
|
}
|
|
213183
|
+
function getSubscriptionInfo(_x4) {
|
|
213184
|
+
return _getSubscriptionInfo.apply(this, arguments);
|
|
213185
|
+
}
|
|
213186
|
+
function _getSubscriptionInfo() {
|
|
213187
|
+
_getSubscriptionInfo = (0, _asyncToGenerator2.default)(function* (params) {
|
|
213188
|
+
var isSupported = (0, _isMinVersionSupported.isMinVersionSupported)({
|
|
213189
|
+
android: '5.253.0',
|
|
213190
|
+
ios: '5.250.0'
|
|
213191
|
+
});
|
|
213192
|
+
if (!isSupported) {
|
|
213193
|
+
return;
|
|
213194
|
+
}
|
|
213195
|
+
return (0, _natives.safePostMessage)('getSubscriptionInfo', params);
|
|
213196
|
+
});
|
|
213197
|
+
return _getSubscriptionInfo.apply(this, arguments);
|
|
213198
|
+
}
|
|
213165
213199
|
function createSubscriptionPurchaseOrder(params) {
|
|
213166
213200
|
var isSupported = (0, _isMinVersionSupported.isMinVersionSupported)({
|
|
213167
213201
|
android: '5.248.0',
|
|
@@ -213188,7 +213222,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
213188
213222
|
isProductGranted
|
|
213189
213223
|
});
|
|
213190
213224
|
});
|
|
213191
|
-
return function onPurchased(
|
|
213225
|
+
return function onPurchased(_x5) {
|
|
213192
213226
|
return _ref2.apply(this, arguments);
|
|
213193
213227
|
};
|
|
213194
213228
|
}(),
|
|
@@ -213210,7 +213244,8 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
213210
213244
|
getProductItemList,
|
|
213211
213245
|
getPendingOrders,
|
|
213212
213246
|
getCompletedOrRefundedOrders,
|
|
213213
|
-
completeProductGrant
|
|
213247
|
+
completeProductGrant,
|
|
213248
|
+
getSubscriptionInfo
|
|
213214
213249
|
};
|
|
213215
213250
|
},2575,[1,16,1278,2540,2514,2569],"../../../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-e56741e8de/1/packages/apps-in-toss/native-modules/src/MiniAppModule/native-modules/iap.ts");
|
|
213216
213251
|
__d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {
|
|
@@ -213347,7 +213382,7 @@ __d(function (global, _$$_REQUIRE, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, e
|
|
|
213347
213382
|
}
|
|
213348
213383
|
\`;document.head.appendChild(e);})();
|
|
213349
213384
|
`,
|
|
213350
|
-
m = '"use strict";(()=>{var de=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},h=new de,O=()=>Math.random().toString(36).substring(2,15),B=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function d(e){return(...t)=>{let r=O(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(h.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(h.on(`${e}/reject/${r}`,i=>{o(),a(B(i))})),h.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function R(e){return t=>{let r=O(),n=[h.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),h.on(`${e}/onError/${r}`,o=>{t.onError(B(o))})];return h.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{h.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function g(e){return()=>h.getConstant(e)}var ue=function(){return{emit:function(t,r){for(var n=this.events[t]||[],o=0,s=n.length;o<s;o++)n[o](r)},events:{},on:function(t,r){var n=this,o,s;return((o=this.events)[s=t]||(o[s]=[])).push(r),function(){var a;n.events[t]=(a=n.events[t])===null||a===void 0?void 0:a.filter(function(i){return r!==i})}}}};typeof window<"u"&&(window.__GRANITE_NATIVE_EMITTER=ue());var Xe=d("closeView"),Ye=d("generateHapticFeedback"),Ze=d("share"),Qe=d("setSecureScreen"),et=d("setScreenAwakeMode"),tt=d("getNetworkStatus"),rt=d("setIosSwipeGestureEnabled"),nt=d("openURL"),ot=d("openPermissionDialog"),st=d("getPermission"),at=d("requestPermission"),it=g("setClipboardText"),ct=g("getClipboardText"),dt=g("fetchContacts"),ut=g("fetchAlbumPhotos"),pt=g("getCurrentLocation"),mt=g("openCamera"),lt=d("appLogin"),gt=d("eventLog"),ft=d("getTossShareLink"),vt=d("setDeviceOrientation"),ht=d("checkoutPayment"),wt=d("saveBase64Data"),Et=d("appsInTossSignTossCert"),bt=d("getGameCenterGameProfile"),At=d("openGameCenterLeaderboard"),_t=d("submitGameCenterLeaderBoardScore"),St=d("getUserKeyForGame"),Ct=d("grantPromotionReward"),It=d("grantPromotionRewardForGame"),Tt=d("getIsTossLoginIntegratedService"),yt=d("getServerTime"),Lt=g("getLocale"),Rt=g("getSchemeUri"),Pt=g("getPlatformOS"),xt=g("getOperationalEnvironment"),Dt=g("getTossAppVersion"),Nt=g("getDeviceId"),Mt=g("getGroupId"),Ft=R("contactsViral"),kt=R("startUpdateLocation"),Gt=R("onVisibilityChangedByTransparentServiceWeb");var S=class extends Error{constructor({methodName:e,message:t}){super(),this.name=`${e} permission error`,this.message=t}},V=class extends S{constructor(){super({methodName:"fetchAlbumPhotos",message:"\\uC0AC\\uC9C4\\uCCA9 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},H=class extends S{constructor(){super({methodName:"fetchContacts",message:"\\uC5F0\\uB77D\\uCC98 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},U=class extends S{constructor(){super({methodName:"openCamera",message:"\\uCE74\\uBA54\\uB77C \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var k=class extends S{constructor(){super({methodName:"getCurrentLocation",message:"\\uC704\\uCE58 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},W=k,z=class extends S{constructor(){super({methodName:"getClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC77D\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},$=class extends S{constructor(){super({methodName:"setClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC4F0\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var pe=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},w=new pe,te=()=>Math.random().toString(36).substring(2,15),re=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function c(e){return(...t)=>{let r=te(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(w.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(w.on(`${e}/reject/${r}`,i=>{o(),a(re(i))})),w.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function E(e){return t=>{let r=te(),n=[w.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),w.on(`${e}/onError/${r}`,o=>{t.onError(re(o))})];return w.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{w.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function p(e){return()=>w.getConstant(e)}var jt={getItem:c("getStorageItem"),setItem:c("setStorageItem"),removeItem:c("removeStorageItem"),clearItems:c("clearItems")},me=/^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*))?(?:\\+[\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*)?)?)?$/i,q=e=>["*","x","X"].includes(e),j=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},le=(e,t)=>typeof e==typeof t?[e,t]:[String(e),String(t)],ge=(e,t)=>{if(q(e)||q(t))return 0;let[r,n]=le(j(e),j(t));return r>n?1:r<n?-1:0},K=e=>{if(typeof e!="string")throw new TypeError("Invalid argument: expected a string");let t=e.match(me);if(!t)throw new Error(`Invalid semver: \'${e}\'`);let[,r,n,o,s,a]=t;return[r,n,o,s,a]},J=(e,t)=>{let r=Math.max(e.length,t.length);for(let n=0;n<r;n++){let o=e[n]??"0",s=t[n]??"0",a=ge(o,s);if(a!==0)return a}return 0},fe=(e,t)=>{let r=K(e),n=K(t),o=r.pop(),s=n.pop(),a=J(r,n);return a!==0?a:o&&s?J(o.split("."),s.split(".")):o?-1:s?1:0};function G(e){if(p("getOperationalEnvironment")()==="sandbox")return!0;let r=p("getTossAppVersion")(),o=p("getPlatformOS")()==="ios"?e.ios:e.android;return o===void 0?!1:o==="always"?!0:o==="never"?!1:fe(r,o)>=0}function X(e){return c("processProductGrant")(e)}var Kt={createOneTimePurchaseOrder:e=>{let t=G({android:"5.219.0",ios:"5.219.0"}),r=()=>{};if(!t)return r;let n=G({android:"5.231.1",ios:"5.230.0"}),{options:o,onEvent:s,onError:a}=e,i=o.sku??o.productId;return n?E("requestOneTimePurchase")({options:{sku:i},onEvent:async l=>{if(l.type==="purchased"){let m=await o.processProductGrant({orderId:l.data.orderId});await X({orderId:l.data.orderId,isProductGranted:m}).catch(a)}else s(l)},onError:l=>{a(l)}}):(c("iapCreateOneTimePurchaseOrder")({productId:i}).then(m=>{Promise.resolve(o.processProductGrant({orderId:m.orderId})).then(()=>{s({type:"success",data:m})}).catch(f=>{a(f)})}).catch(m=>{a(m)}),r)},createSubscriptionPurchaseOrder:e=>{let t=G({android:"5.248.0",ios:"5.249.0"}),r=()=>{};if(!t)return r;let{options:n,onEvent:o,onError:s}=e,{sku:a,offerId:i,processProductGrant:u}=n;return E("requestSubscriptionPurchase")({options:{sku:a,offerId:i??null},onEvent:async m=>{if(m.type==="purchased"){let f=await u({orderId:m.data.orderId,subscriptionId:m.data.subscriptionId});await X({orderId:m.data.orderId,isProductGranted:f}).catch(s)}else o(m)},onError:m=>{s(m)}})},getProductItemList:c("iapGetProductItemList"),getPendingOrders:c("getPendingOrders"),getCompletedOrRefundedOrders:c("getCompletedOrRefundedOrders"),completeProductGrant:c("completeProductGrant")},Jt=p("getSafeAreaInsets");var Xt=p("getSafeAreaInsets");var Yt={loadAppsInTossAdMob:Object.assign(E("loadAppsInTossAdMob"),{isSupported:p("loadAppsInTossAdMob_isSupported")}),showAppsInTossAdMob:Object.assign(E("showAppsInTossAdMob"),{isSupported:p("showAppsInTossAdMob_isSupported")}),isAppsInTossAdMobLoaded:Object.assign(c("isAppsInTossAdMobLoaded"),{isSupported:p("isAppsInTossAdMobLoaded_isSupported")})};var Zt={getDeploymentId:p("getDeploymentId")},Qt=p("deploymentId"),er=p("brandDisplayName"),tr=p("brandIcon"),rr=p("brandPrimaryColor");var nr={addAccessoryButton:c("addAccessoryButton"),removeAccessoryButton:c("removeAccessoryButton")},ve=c("requestPermission"),he=c("getPermission"),we=c("openPermissionDialog");function C({permission:e,handler:t,error:r}){let n=async(...o)=>{if(await ve(e)==="denied")throw new r;return t(...o)};return n.getPermission=()=>he(e),n.openPermissionDialog=()=>we(e),n}var sr=C({handler:e=>c("fetchAlbumPhotos")(e),permission:{name:"photos",access:"read"},error:V}),ir=C({handler:e=>c("fetchContacts")(e),permission:{name:"contacts",access:"read"},error:H}),dr=C({handler:e=>c("getCurrentLocation")(e),permission:{name:"geolocation",access:"access"},error:k}),pr=C({handler:e=>c("openCamera")(e),permission:{name:"camera",access:"access"},error:U}),lr=C({handler:e=>c("setClipboardText")(e),permission:{name:"clipboard",access:"write"},error:$}),fr=C({handler:()=>c("getClipboardText")(),permission:{name:"clipboard",access:"read"},error:z}),Ee=c("getPermission"),be=c("openPermissionDialog"),ne=e=>E("updateLocationEvent")({...e,onError:t=>{let r=new W;return t instanceof Error&&t.name===r.name?e.onError(r):e.onError(t)}});ne.getPermission=()=>Ee({name:"geolocation",access:"access"});ne.openPermissionDialog=()=>be({name:"geolocation",access:"access"});var hr=Object.assign(E("loadFullScreenAd"),{isSupported:p("loadFullScreenAd_isSupported")}),wr=Object.assign(E("showFullScreenAd"),{isSupported:p("showFullScreenAd_isSupported")}),Ae=c("openURL");function _e(e){let t=Se(e);return Ae(t)}function Se(e){return["http://","https://"].some(r=>e.startsWith(r))?Ce(e):e}function Ce(e){return`supertoss://web?url=${encodeURIComponent(e)}&external=true`}var Y="https://static.toss.im/ads/sdk/toss-ads-space-kit-1.3.0.js",Z=15e3,P=null;function _(){if(!(typeof window>"u"))return window.TossAdsSpaceKit}function Ie(){if(typeof window>"u"||typeof document>"u")return Promise.reject(new Error("Ads SDK can only be loaded in a browser environment."));let e=_();if(e)return Promise.resolve(e);if(P)return P;let t=new Promise((r,n)=>{let o=document.createElement("script"),s=()=>{o.removeEventListener("load",a),o.removeEventListener("error",i),window.clearTimeout(u),P=null},a=()=>{let l=_();if(l){s(),r(l);return}s(),n(new Error("Ads SDK script loaded but window.TossAdsSpaceKit was not exposed."))},i=()=>{s(),n(new Error(`Failed to load Ads SDK script from ${Y}.`))},u=window.setTimeout(()=>{s(),n(new Error(`Loading Ads SDK timed out after ${Z}ms.`))},Z);o.addEventListener("load",a),o.addEventListener("error",i),o.async=!0,o.src=Y,document.head.appendChild(o)});return P=t,t}var A=Object.assign(E("fetchTossAd"),{isSupported:p("fetchTossAd_isSupported")}),Te=c("tossAdEventLog"),ye=new Set(["1","2"]);function Le(e){return new Promise((t,r)=>{if(!A.isSupported()){r(new Error("fetchTossAd is not supported in this environment."));return}return A({options:e,onEvent:t,onError:r})})}function Q(e){let t=Array.isArray(e.ads)?e.ads.filter(r=>ye.has(String(r.styleId))):[];return{requestId:e.requestId??"",status:e.status??"OK",ads:t,ext:e.ext}}function Re(e){return Pe(e)?e.resultType!=="SUCCESS"?e:e.success?{...e,success:Q(e.success)}:{resultType:"FAIL",error:{reason:"fetchTossAd returned SUCCESS without payload"}}:xe(e)?{resultType:"SUCCESS",success:Q(e)}:{resultType:"FAIL",error:{reason:"Invalid response from fetchTossAd"}}}function Pe(e){return!!(e&&typeof e=="object"&&"resultType"in e)}function xe(e){return!!(e&&typeof e=="object"&&"ads"in e)}function De(){return async(e,t)=>{try{let r=await Le({adGroupId:t.spaceUnitId,sdkId:"108",availableStyleIds:["1","2"]});return Re(r)}catch(r){return{resultType:"FAIL",error:{reason:r instanceof Error?r.message:"Unknown fetchTossAd error"}}}}}var L=null;function Ne(e){let{callbacks:t}=e,r=()=>t?.onInitialized?.(),n=a=>{let i=a instanceof Error?a:new Error(String(a));t?.onInitializationFailed?.(i)};if(_()?.isInitialized()){r();return}if(L!=null){L.then(r).catch(n);return}let s=Ie().then(a=>{if(a.isInitialized())return;let u={environment:"live",customAdFetcher:De(),opener:_e};a.init(u)});L=s,s.then(r).catch(n).finally(()=>{L===s&&(L=null)})}function Me(e,t,r={}){let{callbacks:n}=r,o=s=>{let a=s instanceof Error?s:new Error(String(s));n?.onAdFailedToRender?.({slotId:"",adGroupId:e,adMetadata:{},error:{code:0,message:a.message}})};try{let s=e,a=_();if(!a)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!a.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let i=typeof t=="string"?document.querySelector(t):t;if(!i)throw new Error(`[toss-ad] Failed to find target element: ${t}`);let u={spaceId:s,autoLoad:!0,theme:r.theme,padding:r.padding,callbacks:oe(e,r.callbacks)};a.banner.createSlot(i,u)}catch(s){o(s)}}var Fe="16px 20px",ke="20px",Ge="auto",Oe="blackAndWhite",Be="expanded",v="toss-ads-attach",ee="toss-ads-attach-style";function Ve(e){let t=e.ownerDocument;if(!t||t.getElementById(ee))return;let r=t.createElement("style");r.id=ee,r.textContent=`\n .${v} { background: #ffffff; }\n .${v}.toss-ads-tone-grey { background: #f2f4f7; }\n @media (prefers-color-scheme: dark) {\n .${v} { background: #17171c; }\n .${v}.toss-ads-tone-grey { background: #101013; }\n }\n .${v}.toss-ads-theme-light { background: #ffffff; }\n .${v}.toss-ads-theme-light.toss-ads-tone-grey { background: #f2f4f7; }\n .${v}.toss-ads-theme-dark { background: #17171c; }\n .${v}.toss-ads-theme-dark.toss-ads-tone-grey { background: #101013; }\n `;let n=t.head??t.body??t.documentElement;n&&n.appendChild(r)}function He(e,t,r={}){let{callbacks:n,theme:o=Ge,tone:s=Oe,variant:a=Be}=r,i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.boxSizing="border-box",i.style.display="flex",i.style.flexDirection="column",i.style.justifyContent="center",i.style.overflow="hidden",a==="card"&&(i.style.padding="0 10px");let u=document.createElement("div");u.classList.add(v),s==="grey"&&u.classList.add("toss-ads-tone-grey"),o==="light"?u.classList.add("toss-ads-theme-light"):o==="dark"&&u.classList.add("toss-ads-theme-dark"),a==="card"&&(u.style.borderRadius="16px",u.style.overflow="hidden"),i.appendChild(u);let l=!1,m=null,f=b=>{let y=b instanceof Error?b:new Error(String(b));n?.onAdFailedToRender?.({slotId:"",adGroupId:e,adMetadata:{},error:{code:0,message:y.message}})},ae=oe(e,n);try{let b=e,y=_();if(!y)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!y.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let F=typeof t=="string"?document.querySelector(t):t;if(!F)throw new Error(`[toss-ad] Failed to find target element: ${t}`);Ve(F),F.appendChild(i),l=!0;let ie={spaceId:b,autoLoad:!0,theme:o==="auto"?void 0:o,renderPadding:ce=>ce==="1"?Fe:ke,callbacks:ae};m=y.banner.createSlot(u,ie)}catch(b){l&&i.parentNode&&i.parentNode.removeChild(i),f(b)}return{destroy(){m?.destroy(),l&&i.parentNode&&i.parentNode.removeChild(i)}}}function Ue(e){let t=_();t?.banner&&t.banner.destroy(e)}function We(){let e=_();e?.banner&&e.banner.destroyAll()}function oe(e,t){if(!t)return;let r=n=>{let o={...n??{}};return o.adGroupId=o.adGroupId??o.spaceId??e,delete o.spaceId,o};return{onAdRendered:n=>t.onAdRendered?.(r(n)),onAdViewable:n=>t.onAdViewable?.(r(n)),onAdClicked:n=>t.onAdClicked?.(r(n)),onAdImpression:n=>{Te({log_name:"display_ads_all::impression__1px_banner",log_type:"event",params:{event_type:"impression",schema_id:1812034,request_id:n?.adMetadata?.requestId??""}}),t.onAdImpression?.(r(n))},onAdFailedToRender:n=>t.onAdFailedToRender?.({...r(n),error:n?.error??{code:0,message:"UNKNOWN"}}),onNoFill:n=>t.onNoFill?.(r(n))}}var Er={initialize:Object.assign(Ne,{isSupported:A.isSupported}),attach:Object.assign(Me,{isSupported:A.isSupported}),attachBanner:Object.assign(He,{isSupported:A.isSupported}),destroy:Object.assign(Ue,{isSupported:A.isSupported}),destroyAll:Object.assign(We,{isSupported:A.isSupported})},br=Object.assign(c("getServerTime"),{isSupported:p("getServerTime_isSupported")});var x=class{_log=c("debugLog");log(t,r){try{this._log({log_name:`apps_in_toss_webview_${t}`,log_type:"debug",params:{...r,...this.getCommonParams()}})}catch{}}getCommonParams(){return{...this.getLocationInfo(),...this.getNavigatorInfo(),...this.getScreenInfo(),appName:window.__appsInToss.appName,deploymentId:window.__appsInToss.deploymentId,sessionId:window.__appsInToss.sessionId,isGame:window.__appsInToss.webViewType==="game",timestampMs:Date.now()}}getLocationInfo(){return{url:window.location.href,urlOrigin:window.location.origin,urlHost:window.location.hostname,urlPath:window.location.pathname,urlSearch:window.location.search}}getNavigatorInfo(){return{userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,cookieEnabled:navigator.cookieEnabled,hardwareConcurrency:navigator.hardwareConcurrency,deviceMemory:navigator.deviceMemory?navigator.deviceMemory*1024*1024:void 0,maxTouchPoints:navigator.maxTouchPoints}}getScreenInfo(){return{screenWidth:screen.width,screenHeight:screen.height,availableScreenWidth:screen.availWidth,availableScreenHeight:screen.availHeight,devicePixelRatio:window.devicePixelRatio,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}}};var D=class{callbacks={};on(t,r){return typeof this.callbacks[t]>"u"&&(this.callbacks[t]=[]),this.callbacks[t].push(r),()=>{this.callbacks[t]=this.callbacks[t]?.filter(n=>n!==r)??[]}}emit(t,r){this.callbacks[t]?.forEach(n=>n(r))}};window.__appsInToss={appName:p("getAppName")(),deploymentId:p("getDeploymentId")(),webViewType:p("getWebViewType")(),sessionId:Math.random().toString(36).substring(2),eventEmitter:new D,debugLogger:new x};var I=/\\.(data|wasm|framework\\.js)(?:\\.gz|\\.br|\\.unityweb)?$/;function N(e){window.fetch=new Proxy(window.fetch,{apply:e})}(()=>{if(window.__appsInToss.webViewType!=="game"||typeof caches>"u")return;let e="@apps-in-toss/caches/",t=`${e}${window.__appsInToss.deploymentId}`;window.addEventListener("load",async()=>{let r=await caches.keys();for(let n of r)n.startsWith(e)&&n!==t&&await caches.delete(n)}),N(async(r,n,o)=>{let s=new Request(o[0],o[1]);if(!I.test(s.url))return await r.call(n,s);let a=await caches.open(t),i=await a.match(s);if(i){let l=i.headers.get("ETag"),m=i.headers.get("Last-Modified");l&&s.headers.set("If-None-Match",l),m&&s.headers.set("If-Modified-Since",m);let f=await r.call(n,s);return f.status===304?(i.__revalidateResponse=f,i):(a.put(s,f.clone()),f)}let u=await r.call(n,s);return a.put(s,u.clone()),u})})();N(async(e,t,r)=>{let n=new Request(r[0],r[1]),o=Date.now();window.__appsInToss.eventEmitter.emit("fetchRequest",{request:n});try{let s=await e.call(t,n);return window.__appsInToss.eventEmitter.emit("fetchResponse",{request:n,response:s,requestAt:o}),s}catch(s){throw window.__appsInToss.eventEmitter.emit("fetchError",{request:n,requestAt:o,error:s}),s}});HTMLCanvasElement.prototype.getContext=new Proxy(HTMLCanvasElement.prototype.getContext,{apply:(e,t,r)=>{let n=e.apply(t,r);return(n instanceof WebGL2RenderingContext||n instanceof WebGLRenderingContext)&&window.__appsInToss.eventEmitter.emit("webglGetContext",{canvas:t,context:n}),n}});var se=window.__appsInToss.debugLogger;se.log("load_start",{});window.addEventListener("load",()=>{let e=performance.timeOrigin,t=performance.getEntriesByType?.("navigation")[0]??null,r=typeof e<"u"&&t!==null,n=r?{navigationStartAtMs:e+t.startTime,navigationRedirectStartAtMs:e+t.redirectStart,navigationRedirectEndAtMs:e+t.redirectEnd,navigationRedirectCount:t.redirectCount,navigationServiceWorkerStartAtMs:e+t.workerStart,navigationFetchStartAtMs:e+t.fetchStart,navigationDomainLookupStartAtMs:e+t.domainLookupStart,navigationDomainLookupEndAtMs:e+t.domainLookupEnd,navigationConnectStartAtMs:e+t.connectStart,navigationSecureConnectStartAtMs:e+t.secureConnectionStart,navigationConnectEndAtMs:e+t.connectEnd,navigationRequestStartAtMs:e+t.requestStart,navigationResponseStartAtMs:e+t.responseStart,navigationResponseEndAtMs:e+t.responseEnd,navigationDomInteractiveAtMs:e+t.domInteractive,navigationDomContentLoadedEventStartAtMs:e+t.domContentLoadedEventStart,navigationDomContentLoadedEventEndAtMs:e+t.domContentLoadedEventEnd,navigationDomCompleteAtMs:e+t.domComplete}:{};se.log("load_complete",{isNavigationDebugSupported:r,...n})});function T(e,t){return parseFloat(e.toFixed(t))}(()=>{if(typeof performance.memory>"u"||typeof performance.memory.usedJSHeapSize>"u"||typeof performance.memory.totalJSHeapSize>"u"||typeof performance.memory.jsHeapSizeLimit>"u")return;function e(t){window.__appsInToss.debugLogger.log(t,{usedJSHeapSize:T(performance.memory.usedJSHeapSize/1024,2),totalJSHeapSize:T(performance.memory.totalJSHeapSize/1024,2),jsHeapSizeLimit:T(performance.memory.jsHeapSizeLimit/1024,2)})}e("memory_usage_first_0s"),setTimeout(()=>e("memory_usage_first_1s"),1e3),setTimeout(()=>e("memory_usage_first_10s"),1e4),setTimeout(()=>e("memory_usage_first_30s"),3e4),setTimeout(()=>e("memory_usage_first_60s"),6e4),setInterval(()=>e("memory_usage_every_180s"),18e4)})();(()=>{let e=window.__appsInToss.debugLogger,t=performance.timeOrigin;if(typeof t>"u"||typeof PerformanceObserver>"u")return;new PerformanceObserver(o=>{o.getEntries().forEach(a=>{a.name==="first-paint"?e.log("first_paint",{fpStartAtMs:t+a.startTime}):a.name==="first-contentful-paint"&&e.log("first_contentful_paint",{fcpStartAtMs:t+a.startTime})})}).observe({type:"paint"}),new PerformanceObserver(o=>{o.getEntries().forEach(a=>{e.log("largest_contentful_paint",{lcpStartAtMs:t+a.startTime,lcpRenderSize:a.size})})}).observe({type:"largest-contentful-paint"})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.eventEmitter.on("webglGetContext",({canvas:t,context:r})=>{if(t.getAttribute("id")!=="unity-canvas")return;e();let n=r.getExtension("WEBGL_debug_renderer_info"),o=r.getParameter(r.MAX_VIEWPORT_DIMS),s={webGLRenderer:r.getParameter(r.RENDERER),webGLVendor:r.getParameter(r.VENDOR),webGLVersion:r.getParameter(r.VERSION),webGLShadingLanguageVersion:r.getParameter(r.SHADING_LANGUAGE_VERSION),webGLMaxTextureSize:r.getParameter(r.MAX_TEXTURE_SIZE),webGLMaxViewportWidth:o[0],webGLMaxViewportHeight:o[1],webGLMaxRenderbufferSize:r.getParameter(r.MAX_RENDERBUFFER_SIZE)},a=n?{webGLUnmaskedVendor:r.getParameter(n.UNMASKED_VENDOR_WEBGL),webGLUnmaskedRenderer:r.getParameter(n.UNMASKED_RENDERER_WEBGL)}:{};window.__appsInToss.debugLogger.log("unity_webgl_info",{...s,...a})})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.debugLogger,t=window.__appsInToss.eventEmitter;t.on("fetchRequest",({request:n})=>{I.test(n.url)&&e.log("game_resource_download_start",{gameResourceRequestURL:n.url})});function r({request:n,requestAt:o,error:s}){e.log("game_resource_download_error",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceError:s instanceof Error?s.message:"Unknown Error"})}t.on("fetchResponse",async({request:n,requestAt:o,response:s})=>{if(!I.test(n.url))return;let a=await s.clone().blob().then(u=>T(u.size/1024,2)).catch(u=>(r({request:n,requestAt:o,error:u}),null));if(a===null)return;let i=Date.now();e.log("game_resource_download_end",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceResponseAtMs:i,gameResourceResponseSize:a,gameResourceResponseStatus:s.__revalidateResponse?.status??s.status,gameResourceDownloadDurationMs:i-o})}),t.on("fetchError",async({request:n,requestAt:o,error:s})=>{I.test(n.url)&&r({request:n,requestAt:o,error:s})})})();var M=[];function ze(){let e=0;function t(r){let n=performance.now();if(r<n-1e3){M.push(e);return}e+=1,window.requestAnimationFrame(()=>t(r))}window.requestAnimationFrame(()=>t(performance.now()))}function $e(){if(M.length===0)return;let e=M;M=[];let t=qe(e).toSorted(),r={};for(let o=0;o<=100;o+=10){let s=t[Math.floor((t.length-1)*(o/100))];s&&(r[`fpsP${o}`]=s)}let n=t.reduce((o,s)=>o+s,0);r.fpsAverage=n/t.length,window.__appsInToss.debugLogger.log("fps_every_300s",r)}function qe(e){let t=new Set(e);return Array.from(t.values())}setInterval(()=>ze(),1e3);setInterval(()=>$e(),3e5);})();\n';
|
|
213385
|
+
m = '"use strict";(()=>{var de=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},h=new de,O=()=>Math.random().toString(36).substring(2,15),B=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function d(e){return(...t)=>{let r=O(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(h.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(h.on(`${e}/reject/${r}`,i=>{o(),a(B(i))})),h.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function R(e){return t=>{let r=O(),n=[h.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),h.on(`${e}/onError/${r}`,o=>{t.onError(B(o))})];return h.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{h.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function g(e){return()=>h.getConstant(e)}var ue=function(){return{emit:function(t,r){for(var n=this.events[t]||[],o=0,s=n.length;o<s;o++)n[o](r)},events:{},on:function(t,r){var n=this,o,s;return((o=this.events)[s=t]||(o[s]=[])).push(r),function(){var a;n.events[t]=(a=n.events[t])===null||a===void 0?void 0:a.filter(function(i){return r!==i})}}}};typeof window<"u"&&(window.__GRANITE_NATIVE_EMITTER=ue());var Xe=d("closeView"),Ye=d("generateHapticFeedback"),Ze=d("share"),Qe=d("setSecureScreen"),et=d("setScreenAwakeMode"),tt=d("getNetworkStatus"),rt=d("setIosSwipeGestureEnabled"),nt=d("openURL"),ot=d("openPermissionDialog"),st=d("getPermission"),at=d("requestPermission"),it=g("setClipboardText"),ct=g("getClipboardText"),dt=g("fetchContacts"),ut=g("fetchAlbumPhotos"),pt=g("getCurrentLocation"),mt=g("openCamera"),lt=d("appLogin"),gt=d("eventLog"),ft=d("getTossShareLink"),vt=d("setDeviceOrientation"),ht=d("checkoutPayment"),wt=d("saveBase64Data"),Et=d("appsInTossSignTossCert"),bt=d("getGameCenterGameProfile"),At=d("openGameCenterLeaderboard"),_t=d("submitGameCenterLeaderBoardScore"),St=d("getUserKeyForGame"),Ct=d("grantPromotionReward"),It=d("grantPromotionRewardForGame"),Tt=d("getIsTossLoginIntegratedService"),yt=d("getServerTime"),Lt=g("getLocale"),Rt=g("getSchemeUri"),Pt=g("getPlatformOS"),xt=g("getOperationalEnvironment"),Dt=g("getTossAppVersion"),Nt=g("getDeviceId"),Mt=g("getGroupId"),Ft=R("contactsViral"),kt=R("startUpdateLocation"),Gt=R("onVisibilityChangedByTransparentServiceWeb");var S=class extends Error{constructor({methodName:e,message:t}){super(),this.name=`${e} permission error`,this.message=t}},V=class extends S{constructor(){super({methodName:"fetchAlbumPhotos",message:"\\uC0AC\\uC9C4\\uCCA9 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},H=class extends S{constructor(){super({methodName:"fetchContacts",message:"\\uC5F0\\uB77D\\uCC98 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},U=class extends S{constructor(){super({methodName:"openCamera",message:"\\uCE74\\uBA54\\uB77C \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var k=class extends S{constructor(){super({methodName:"getCurrentLocation",message:"\\uC704\\uCE58 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},W=k,z=class extends S{constructor(){super({methodName:"getClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC77D\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}},$=class extends S{constructor(){super({methodName:"setClipboardText",message:"\\uD074\\uB9BD\\uBCF4\\uB4DC \\uC4F0\\uAE30 \\uAD8C\\uD55C\\uC774 \\uAC70\\uBD80\\uB418\\uC5C8\\uC5B4\\uC694."})}};var pe=class{get _window(){return typeof window<"u"?window:{ReactNativeWebView:{postMessage:()=>{}},__GRANITE_NATIVE_EMITTER:{on:()=>()=>{}},__CONSTANT_HANDLER_MAP:{}}}postMessage(e){let t=this._window.ReactNativeWebView;if(!t)throw new Error("ReactNativeWebView is not available in browser environment");t.postMessage(JSON.stringify(e))}on(e,t){let r=this._window.__GRANITE_NATIVE_EMITTER;if(!r)throw new Error("__GRANITE_NATIVE_EMITTER is not available");return r.on(e,t)}getConstant(e){let t=this._window.__CONSTANT_HANDLER_MAP;if(t&&e in t)return t[e];throw new Error(`${e} is not a constant handler`)}},w=new pe,te=()=>Math.random().toString(36).substring(2,15),re=e=>{if(e&&e.__isError){let t=new Error(e.message);for(let[r,n]of Object.entries(e))t[r]=n;return t}return e};function c(e){return(...t)=>{let r=te(),n=[],o=()=>{for(let s of n)s()};return new Promise((s,a)=>{n.push(w.on(`${e}/resolve/${r}`,i=>{o(),s(i)})),n.push(w.on(`${e}/reject/${r}`,i=>{o(),a(re(i))})),w.postMessage({type:"method",functionName:e,eventId:r,args:t})})}}function E(e){return t=>{let r=te(),n=[w.on(`${e}/onEvent/${r}`,o=>{t.onEvent(o)}),w.on(`${e}/onError/${r}`,o=>{t.onError(re(o))})];return w.postMessage({type:"addEventListener",functionName:e,eventId:r,args:t.options}),()=>{w.postMessage({type:"removeEventListener",functionName:e,eventId:r}),n.forEach(o=>o())}}}function p(e){return()=>w.getConstant(e)}var jt={getItem:c("getStorageItem"),setItem:c("setStorageItem"),removeItem:c("removeStorageItem"),clearItems:c("clearItems")},me=/^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*))?(?:\\+[\\da-z\\\\-]+(?:\\.[\\da-z\\\\-]+)*)?)?)?$/i,q=e=>["*","x","X"].includes(e),j=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},le=(e,t)=>typeof e==typeof t?[e,t]:[String(e),String(t)],ge=(e,t)=>{if(q(e)||q(t))return 0;let[r,n]=le(j(e),j(t));return r>n?1:r<n?-1:0},K=e=>{if(typeof e!="string")throw new TypeError("Invalid argument: expected a string");let t=e.match(me);if(!t)throw new Error(`Invalid semver: \'${e}\'`);let[,r,n,o,s,a]=t;return[r,n,o,s,a]},J=(e,t)=>{let r=Math.max(e.length,t.length);for(let n=0;n<r;n++){let o=e[n]??"0",s=t[n]??"0",a=ge(o,s);if(a!==0)return a}return 0},fe=(e,t)=>{let r=K(e),n=K(t),o=r.pop(),s=n.pop(),a=J(r,n);return a!==0?a:o&&s?J(o.split("."),s.split(".")):o?-1:s?1:0};function G(e){if(p("getOperationalEnvironment")()==="sandbox")return!0;let r=p("getTossAppVersion")(),o=p("getPlatformOS")()==="ios"?e.ios:e.android;return o===void 0?!1:o==="always"?!0:o==="never"?!1:fe(r,o)>=0}function X(e){return c("processProductGrant")(e)}var Kt={createOneTimePurchaseOrder:e=>{let t=G({android:"5.219.0",ios:"5.219.0"}),r=()=>{};if(!t)return r;let n=G({android:"5.231.1",ios:"5.230.0"}),{options:o,onEvent:s,onError:a}=e,i=o.sku??o.productId;return n?E("requestOneTimePurchase")({options:{sku:i},onEvent:async l=>{if(l.type==="purchased"){let m=await o.processProductGrant({orderId:l.data.orderId});await X({orderId:l.data.orderId,isProductGranted:m}).catch(a)}else s(l)},onError:l=>{a(l)}}):(c("iapCreateOneTimePurchaseOrder")({productId:i}).then(m=>{Promise.resolve(o.processProductGrant({orderId:m.orderId})).then(()=>{s({type:"success",data:m})}).catch(f=>{a(f)})}).catch(m=>{a(m)}),r)},createSubscriptionPurchaseOrder:e=>{let t=G({android:"5.248.0",ios:"5.249.0"}),r=()=>{};if(!t)return r;let{options:n,onEvent:o,onError:s}=e,{sku:a,offerId:i,processProductGrant:u}=n;return E("requestSubscriptionPurchase")({options:{sku:a,offerId:i??null},onEvent:async m=>{if(m.type==="purchased"){let f=await u({orderId:m.data.orderId,subscriptionId:m.data.subscriptionId});await X({orderId:m.data.orderId,isProductGranted:f}).catch(s)}else o(m)},onError:m=>{s(m)}})},getProductItemList:c("iapGetProductItemList"),getPendingOrders:c("getPendingOrders"),getCompletedOrRefundedOrders:c("getCompletedOrRefundedOrders"),completeProductGrant:c("completeProductGrant"),getSubscriptionInfo:c("getSubscriptionInfo")},Jt=p("getSafeAreaInsets");var Xt=p("getSafeAreaInsets");var Yt={loadAppsInTossAdMob:Object.assign(E("loadAppsInTossAdMob"),{isSupported:p("loadAppsInTossAdMob_isSupported")}),showAppsInTossAdMob:Object.assign(E("showAppsInTossAdMob"),{isSupported:p("showAppsInTossAdMob_isSupported")}),isAppsInTossAdMobLoaded:Object.assign(c("isAppsInTossAdMobLoaded"),{isSupported:p("isAppsInTossAdMobLoaded_isSupported")})};var Zt={getDeploymentId:p("getDeploymentId")},Qt=p("deploymentId"),er=p("brandDisplayName"),tr=p("brandIcon"),rr=p("brandPrimaryColor");var nr={addAccessoryButton:c("addAccessoryButton"),removeAccessoryButton:c("removeAccessoryButton")},ve=c("requestPermission"),he=c("getPermission"),we=c("openPermissionDialog");function C({permission:e,handler:t,error:r}){let n=async(...o)=>{if(await ve(e)==="denied")throw new r;return t(...o)};return n.getPermission=()=>he(e),n.openPermissionDialog=()=>we(e),n}var sr=C({handler:e=>c("fetchAlbumPhotos")(e),permission:{name:"photos",access:"read"},error:V}),ir=C({handler:e=>c("fetchContacts")(e),permission:{name:"contacts",access:"read"},error:H}),dr=C({handler:e=>c("getCurrentLocation")(e),permission:{name:"geolocation",access:"access"},error:k}),pr=C({handler:e=>c("openCamera")(e),permission:{name:"camera",access:"access"},error:U}),lr=C({handler:e=>c("setClipboardText")(e),permission:{name:"clipboard",access:"write"},error:$}),fr=C({handler:()=>c("getClipboardText")(),permission:{name:"clipboard",access:"read"},error:z}),Ee=c("getPermission"),be=c("openPermissionDialog"),ne=e=>E("updateLocationEvent")({...e,onError:t=>{let r=new W;return t instanceof Error&&t.name===r.name?e.onError(r):e.onError(t)}});ne.getPermission=()=>Ee({name:"geolocation",access:"access"});ne.openPermissionDialog=()=>be({name:"geolocation",access:"access"});var hr=Object.assign(E("loadFullScreenAd"),{isSupported:p("loadFullScreenAd_isSupported")}),wr=Object.assign(E("showFullScreenAd"),{isSupported:p("showFullScreenAd_isSupported")}),Ae=c("openURL");function _e(e){let t=Se(e);return Ae(t)}function Se(e){return["http://","https://"].some(r=>e.startsWith(r))?Ce(e):e}function Ce(e){return`supertoss://web?url=${encodeURIComponent(e)}&external=true`}var Y="https://static.toss.im/ads/sdk/toss-ads-space-kit-1.3.0.js",Z=15e3,P=null;function _(){if(!(typeof window>"u"))return window.TossAdsSpaceKit}function Ie(){if(typeof window>"u"||typeof document>"u")return Promise.reject(new Error("Ads SDK can only be loaded in a browser environment."));let e=_();if(e)return Promise.resolve(e);if(P)return P;let t=new Promise((r,n)=>{let o=document.createElement("script"),s=()=>{o.removeEventListener("load",a),o.removeEventListener("error",i),window.clearTimeout(u),P=null},a=()=>{let l=_();if(l){s(),r(l);return}s(),n(new Error("Ads SDK script loaded but window.TossAdsSpaceKit was not exposed."))},i=()=>{s(),n(new Error(`Failed to load Ads SDK script from ${Y}.`))},u=window.setTimeout(()=>{s(),n(new Error(`Loading Ads SDK timed out after ${Z}ms.`))},Z);o.addEventListener("load",a),o.addEventListener("error",i),o.async=!0,o.src=Y,document.head.appendChild(o)});return P=t,t}var A=Object.assign(E("fetchTossAd"),{isSupported:p("fetchTossAd_isSupported")}),Te=c("tossAdEventLog"),ye=new Set(["1","2"]);function Le(e){return new Promise((t,r)=>{if(!A.isSupported()){r(new Error("fetchTossAd is not supported in this environment."));return}return A({options:e,onEvent:t,onError:r})})}function Q(e){let t=Array.isArray(e.ads)?e.ads.filter(r=>ye.has(String(r.styleId))):[];return{requestId:e.requestId??"",status:e.status??"OK",ads:t,ext:e.ext}}function Re(e){return Pe(e)?e.resultType!=="SUCCESS"?e:e.success?{...e,success:Q(e.success)}:{resultType:"FAIL",error:{reason:"fetchTossAd returned SUCCESS without payload"}}:xe(e)?{resultType:"SUCCESS",success:Q(e)}:{resultType:"FAIL",error:{reason:"Invalid response from fetchTossAd"}}}function Pe(e){return!!(e&&typeof e=="object"&&"resultType"in e)}function xe(e){return!!(e&&typeof e=="object"&&"ads"in e)}function De(){return async(e,t)=>{try{let r=await Le({adGroupId:t.spaceUnitId,sdkId:"108",availableStyleIds:["1","2"]});return Re(r)}catch(r){return{resultType:"FAIL",error:{reason:r instanceof Error?r.message:"Unknown fetchTossAd error"}}}}}var L=null;function Ne(e){let{callbacks:t}=e,r=()=>t?.onInitialized?.(),n=a=>{let i=a instanceof Error?a:new Error(String(a));t?.onInitializationFailed?.(i)};if(_()?.isInitialized()){r();return}if(L!=null){L.then(r).catch(n);return}let s=Ie().then(a=>{if(a.isInitialized())return;let u={environment:"live",customAdFetcher:De(),opener:_e};a.init(u)});L=s,s.then(r).catch(n).finally(()=>{L===s&&(L=null)})}function Me(e,t,r={}){let{callbacks:n}=r,o=s=>{let a=s instanceof Error?s:new Error(String(s));n?.onAdFailedToRender?.({slotId:"",adGroupId:e,adMetadata:{},error:{code:0,message:a.message}})};try{let s=e,a=_();if(!a)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!a.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let i=typeof t=="string"?document.querySelector(t):t;if(!i)throw new Error(`[toss-ad] Failed to find target element: ${t}`);let u={spaceId:s,autoLoad:!0,theme:r.theme,padding:r.padding,callbacks:oe(e,r.callbacks)};a.banner.createSlot(i,u)}catch(s){o(s)}}var Fe="16px 20px",ke="20px",Ge="auto",Oe="blackAndWhite",Be="expanded",v="toss-ads-attach",ee="toss-ads-attach-style";function Ve(e){let t=e.ownerDocument;if(!t||t.getElementById(ee))return;let r=t.createElement("style");r.id=ee,r.textContent=`\n .${v} { background: #ffffff; }\n .${v}.toss-ads-tone-grey { background: #f2f4f7; }\n @media (prefers-color-scheme: dark) {\n .${v} { background: #17171c; }\n .${v}.toss-ads-tone-grey { background: #101013; }\n }\n .${v}.toss-ads-theme-light { background: #ffffff; }\n .${v}.toss-ads-theme-light.toss-ads-tone-grey { background: #f2f4f7; }\n .${v}.toss-ads-theme-dark { background: #17171c; }\n .${v}.toss-ads-theme-dark.toss-ads-tone-grey { background: #101013; }\n `;let n=t.head??t.body??t.documentElement;n&&n.appendChild(r)}function He(e,t,r={}){let{callbacks:n,theme:o=Ge,tone:s=Oe,variant:a=Be}=r,i=document.createElement("div");i.style.width="100%",i.style.height="100%",i.style.boxSizing="border-box",i.style.display="flex",i.style.flexDirection="column",i.style.justifyContent="center",i.style.overflow="hidden",a==="card"&&(i.style.padding="0 10px");let u=document.createElement("div");u.classList.add(v),s==="grey"&&u.classList.add("toss-ads-tone-grey"),o==="light"?u.classList.add("toss-ads-theme-light"):o==="dark"&&u.classList.add("toss-ads-theme-dark"),a==="card"&&(u.style.borderRadius="16px",u.style.overflow="hidden"),i.appendChild(u);let l=!1,m=null,f=b=>{let y=b instanceof Error?b:new Error(String(b));n?.onAdFailedToRender?.({slotId:"",adGroupId:e,adMetadata:{},error:{code:0,message:y.message}})},ae=oe(e,n);try{let b=e,y=_();if(!y)throw new Error("[toss-ad] Call initialize() before attaching an ad.");if(!y.banner)throw new Error("[toss-ad] Loaded TossAdsSpaceKit does not support banner ads.");let F=typeof t=="string"?document.querySelector(t):t;if(!F)throw new Error(`[toss-ad] Failed to find target element: ${t}`);Ve(F),F.appendChild(i),l=!0;let ie={spaceId:b,autoLoad:!0,theme:o==="auto"?void 0:o,renderPadding:ce=>ce==="1"?Fe:ke,callbacks:ae};m=y.banner.createSlot(u,ie)}catch(b){l&&i.parentNode&&i.parentNode.removeChild(i),f(b)}return{destroy(){m?.destroy(),l&&i.parentNode&&i.parentNode.removeChild(i)}}}function Ue(e){let t=_();t?.banner&&t.banner.destroy(e)}function We(){let e=_();e?.banner&&e.banner.destroyAll()}function oe(e,t){if(!t)return;let r=n=>{let o={...n??{}};return o.adGroupId=o.adGroupId??o.spaceId??e,delete o.spaceId,o};return{onAdRendered:n=>t.onAdRendered?.(r(n)),onAdViewable:n=>t.onAdViewable?.(r(n)),onAdClicked:n=>t.onAdClicked?.(r(n)),onAdImpression:n=>{Te({log_name:"display_ads_all::impression__1px_banner",log_type:"event",params:{event_type:"impression",schema_id:1812034,request_id:n?.adMetadata?.requestId??""}}),t.onAdImpression?.(r(n))},onAdFailedToRender:n=>t.onAdFailedToRender?.({...r(n),error:n?.error??{code:0,message:"UNKNOWN"}}),onNoFill:n=>t.onNoFill?.(r(n))}}var Er={initialize:Object.assign(Ne,{isSupported:A.isSupported}),attach:Object.assign(Me,{isSupported:A.isSupported}),attachBanner:Object.assign(He,{isSupported:A.isSupported}),destroy:Object.assign(Ue,{isSupported:A.isSupported}),destroyAll:Object.assign(We,{isSupported:A.isSupported})},br=Object.assign(c("getServerTime"),{isSupported:p("getServerTime_isSupported")});var x=class{_log=c("debugLog");log(t,r){try{this._log({log_name:`apps_in_toss_webview_${t}`,log_type:"debug",params:{...r,...this.getCommonParams()}})}catch{}}getCommonParams(){return{...this.getLocationInfo(),...this.getNavigatorInfo(),...this.getScreenInfo(),appName:window.__appsInToss.appName,deploymentId:window.__appsInToss.deploymentId,sessionId:window.__appsInToss.sessionId,isGame:window.__appsInToss.webViewType==="game",timestampMs:Date.now()}}getLocationInfo(){return{url:window.location.href,urlOrigin:window.location.origin,urlHost:window.location.hostname,urlPath:window.location.pathname,urlSearch:window.location.search}}getNavigatorInfo(){return{userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,cookieEnabled:navigator.cookieEnabled,hardwareConcurrency:navigator.hardwareConcurrency,deviceMemory:navigator.deviceMemory?navigator.deviceMemory*1024*1024:void 0,maxTouchPoints:navigator.maxTouchPoints}}getScreenInfo(){return{screenWidth:screen.width,screenHeight:screen.height,availableScreenWidth:screen.availWidth,availableScreenHeight:screen.availHeight,devicePixelRatio:window.devicePixelRatio,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight}}};var D=class{callbacks={};on(t,r){return typeof this.callbacks[t]>"u"&&(this.callbacks[t]=[]),this.callbacks[t].push(r),()=>{this.callbacks[t]=this.callbacks[t]?.filter(n=>n!==r)??[]}}emit(t,r){this.callbacks[t]?.forEach(n=>n(r))}};window.__appsInToss={appName:p("getAppName")(),deploymentId:p("getDeploymentId")(),webViewType:p("getWebViewType")(),sessionId:Math.random().toString(36).substring(2),eventEmitter:new D,debugLogger:new x};var I=/\\.(data|wasm|framework\\.js)(?:\\.gz|\\.br|\\.unityweb)?$/;function N(e){window.fetch=new Proxy(window.fetch,{apply:e})}(()=>{if(window.__appsInToss.webViewType!=="game"||typeof caches>"u")return;let e="@apps-in-toss/caches/",t=`${e}${window.__appsInToss.deploymentId}`;window.addEventListener("load",async()=>{let r=await caches.keys();for(let n of r)n.startsWith(e)&&n!==t&&await caches.delete(n)}),N(async(r,n,o)=>{let s=new Request(o[0],o[1]);if(!I.test(s.url))return await r.call(n,s);let a=await caches.open(t),i=await a.match(s);if(i){let l=i.headers.get("ETag"),m=i.headers.get("Last-Modified");l&&s.headers.set("If-None-Match",l),m&&s.headers.set("If-Modified-Since",m);let f=await r.call(n,s);return f.status===304?(i.__revalidateResponse=f,i):(a.put(s,f.clone()),f)}let u=await r.call(n,s);return a.put(s,u.clone()),u})})();N(async(e,t,r)=>{let n=new Request(r[0],r[1]),o=Date.now();window.__appsInToss.eventEmitter.emit("fetchRequest",{request:n});try{let s=await e.call(t,n);return window.__appsInToss.eventEmitter.emit("fetchResponse",{request:n,response:s,requestAt:o}),s}catch(s){throw window.__appsInToss.eventEmitter.emit("fetchError",{request:n,requestAt:o,error:s}),s}});HTMLCanvasElement.prototype.getContext=new Proxy(HTMLCanvasElement.prototype.getContext,{apply:(e,t,r)=>{let n=e.apply(t,r);return(n instanceof WebGL2RenderingContext||n instanceof WebGLRenderingContext)&&window.__appsInToss.eventEmitter.emit("webglGetContext",{canvas:t,context:n}),n}});var se=window.__appsInToss.debugLogger;se.log("load_start",{});window.addEventListener("load",()=>{let e=performance.timeOrigin,t=performance.getEntriesByType?.("navigation")[0]??null,r=typeof e<"u"&&t!==null,n=r?{navigationStartAtMs:e+t.startTime,navigationRedirectStartAtMs:e+t.redirectStart,navigationRedirectEndAtMs:e+t.redirectEnd,navigationRedirectCount:t.redirectCount,navigationServiceWorkerStartAtMs:e+t.workerStart,navigationFetchStartAtMs:e+t.fetchStart,navigationDomainLookupStartAtMs:e+t.domainLookupStart,navigationDomainLookupEndAtMs:e+t.domainLookupEnd,navigationConnectStartAtMs:e+t.connectStart,navigationSecureConnectStartAtMs:e+t.secureConnectionStart,navigationConnectEndAtMs:e+t.connectEnd,navigationRequestStartAtMs:e+t.requestStart,navigationResponseStartAtMs:e+t.responseStart,navigationResponseEndAtMs:e+t.responseEnd,navigationDomInteractiveAtMs:e+t.domInteractive,navigationDomContentLoadedEventStartAtMs:e+t.domContentLoadedEventStart,navigationDomContentLoadedEventEndAtMs:e+t.domContentLoadedEventEnd,navigationDomCompleteAtMs:e+t.domComplete}:{};se.log("load_complete",{isNavigationDebugSupported:r,...n})});function T(e,t){return parseFloat(e.toFixed(t))}(()=>{if(typeof performance.memory>"u"||typeof performance.memory.usedJSHeapSize>"u"||typeof performance.memory.totalJSHeapSize>"u"||typeof performance.memory.jsHeapSizeLimit>"u")return;function e(t){window.__appsInToss.debugLogger.log(t,{usedJSHeapSize:T(performance.memory.usedJSHeapSize/1024,2),totalJSHeapSize:T(performance.memory.totalJSHeapSize/1024,2),jsHeapSizeLimit:T(performance.memory.jsHeapSizeLimit/1024,2)})}e("memory_usage_first_0s"),setTimeout(()=>e("memory_usage_first_1s"),1e3),setTimeout(()=>e("memory_usage_first_10s"),1e4),setTimeout(()=>e("memory_usage_first_30s"),3e4),setTimeout(()=>e("memory_usage_first_60s"),6e4),setInterval(()=>e("memory_usage_every_180s"),18e4)})();(()=>{let e=window.__appsInToss.debugLogger,t=performance.timeOrigin;if(typeof t>"u"||typeof PerformanceObserver>"u")return;new PerformanceObserver(o=>{o.getEntries().forEach(a=>{a.name==="first-paint"?e.log("first_paint",{fpStartAtMs:t+a.startTime}):a.name==="first-contentful-paint"&&e.log("first_contentful_paint",{fcpStartAtMs:t+a.startTime})})}).observe({type:"paint"}),new PerformanceObserver(o=>{o.getEntries().forEach(a=>{e.log("largest_contentful_paint",{lcpStartAtMs:t+a.startTime,lcpRenderSize:a.size})})}).observe({type:"largest-contentful-paint"})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.eventEmitter.on("webglGetContext",({canvas:t,context:r})=>{if(t.getAttribute("id")!=="unity-canvas")return;e();let n=r.getExtension("WEBGL_debug_renderer_info"),o=r.getParameter(r.MAX_VIEWPORT_DIMS),s={webGLRenderer:r.getParameter(r.RENDERER),webGLVendor:r.getParameter(r.VENDOR),webGLVersion:r.getParameter(r.VERSION),webGLShadingLanguageVersion:r.getParameter(r.SHADING_LANGUAGE_VERSION),webGLMaxTextureSize:r.getParameter(r.MAX_TEXTURE_SIZE),webGLMaxViewportWidth:o[0],webGLMaxViewportHeight:o[1],webGLMaxRenderbufferSize:r.getParameter(r.MAX_RENDERBUFFER_SIZE)},a=n?{webGLUnmaskedVendor:r.getParameter(n.UNMASKED_VENDOR_WEBGL),webGLUnmaskedRenderer:r.getParameter(n.UNMASKED_RENDERER_WEBGL)}:{};window.__appsInToss.debugLogger.log("unity_webgl_info",{...s,...a})})})();(()=>{if(window.__appsInToss.webViewType!=="game")return;let e=window.__appsInToss.debugLogger,t=window.__appsInToss.eventEmitter;t.on("fetchRequest",({request:n})=>{I.test(n.url)&&e.log("game_resource_download_start",{gameResourceRequestURL:n.url})});function r({request:n,requestAt:o,error:s}){e.log("game_resource_download_error",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceError:s instanceof Error?s.message:"Unknown Error"})}t.on("fetchResponse",async({request:n,requestAt:o,response:s})=>{if(!I.test(n.url))return;let a=await s.clone().blob().then(u=>T(u.size/1024,2)).catch(u=>(r({request:n,requestAt:o,error:u}),null));if(a===null)return;let i=Date.now();e.log("game_resource_download_end",{gameResourceRequestURL:n.url,gameResourceRequestAtMs:o,gameResourceResponseAtMs:i,gameResourceResponseSize:a,gameResourceResponseStatus:s.__revalidateResponse?.status??s.status,gameResourceDownloadDurationMs:i-o})}),t.on("fetchError",async({request:n,requestAt:o,error:s})=>{I.test(n.url)&&r({request:n,requestAt:o,error:s})})})();var M=[];function ze(){let e=0;function t(r){let n=performance.now();if(r<n-1e3){M.push(e);return}e+=1,window.requestAnimationFrame(()=>t(r))}window.requestAnimationFrame(()=>t(performance.now()))}function $e(){if(M.length===0)return;let e=M;M=[];let t=qe(e).toSorted(),r={};for(let o=0;o<=100;o+=10){let s=t[Math.floor((t.length-1)*(o/100))];s&&(r[`fpsP${o}`]=s)}let n=t.reduce((o,s)=>o+s,0);r.fpsAverage=n/t.length,window.__appsInToss.debugLogger.log("fps_every_300s",r)}function qe(e){let t=new Set(e);return Array.from(t.values())}setInterval(()=>ze(),1e3);setInterval(()=>$e(),3e5);})();\n';
|
|
213351
213386
|
0 && (module.exports = {
|
|
213352
213387
|
afterDocumentLoad,
|
|
213353
213388
|
beforeDocumentLoad
|