@paypay/mini-app-js-sdk 2.39.0 → 2.40.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.
@@ -1 +1,2 @@
1
1
  export * from './storageFunctions';
2
+ export * from './urlFunctions';
@@ -0,0 +1 @@
1
+ export declare function removeQueryParametersFromUrl(removeParams: string[]): void;
@@ -1,2 +1,2 @@
1
- export declare const miniAppSupportedFunctions: readonly ["init", "openWebview", "openMap", "closeApp", "makePayment", "topup", "setSessionData", "getSessionData", "setStorageData", "getStorageData", "removeStorageData", "getPermissionStatus", "scanCode", "showAlert", "showErrorSheet", "getTopBarHeight", "setTitle", "showUpdateWarning", "getPlatformInformation", "openApp", "share", "getKycInformation", "getUserLocation", "checkPaymentMethod", "registerKyc", "startMultiFactorAuth", "verifyMultiFactorAuthResult", "getBankInfo", "logout", "getUserProfile", "getBalance", "getUserAddress", "getUAID", "copyToClipboard", "registerUserInfo", "setEnablePullDownRefresh", "registerEmail", "checkAccessToken", "debug", "inputAddress", "getDeviceInformation", "openMiniApp", "request", "requestInternal", "registerPaymentFeatures", "initKycPassport", "getKycPassportInfo", "shortcutExists", "addShortcut", "logAppsFlyerEvent", "getAllUserAddresses", "getUserPaymentFeatureSettings", "getPaymentSettings", "getTransactionInfo", "getTransactions", "getPayPayCardInfo", "getExternalLinkageInformation", "markAsReady", "renderCoupons"];
1
+ export declare const miniAppSupportedFunctions: readonly ["init", "openWebview", "openMap", "closeApp", "makePayment", "topup", "setSessionData", "getSessionData", "setStorageData", "getStorageData", "removeStorageData", "getPermissionStatus", "scanCode", "showAlert", "showErrorSheet", "getTopBarHeight", "setTitle", "showUpdateWarning", "getPlatformInformation", "openApp", "share", "getKycInformation", "getUserLocation", "checkPaymentMethod", "registerKyc", "startMultiFactorAuth", "verifyMultiFactorAuthResult", "getBankInfo", "logout", "getUserProfile", "getBalance", "getUserAddress", "getUAID", "copyToClipboard", "registerUserInfo", "setEnablePullDownRefresh", "registerEmail", "checkAccessToken", "debug", "inputAddress", "getDeviceInformation", "openMiniApp", "request", "requestInternal", "registerPaymentFeatures", "initKycPassport", "getKycPassportInfo", "shortcutExists", "addShortcut", "getAllUserAddresses", "getUserPaymentFeatureSettings", "getPaymentSettings", "getTransactionInfo", "getTransactions", "getPayPayCardInfo", "getExternalLinkageInformation", "markAsReady", "renderCoupons"];
2
2
  export declare const smartPaymentSupportedFunctions: readonly ["init", "createOrder", "makePayment", "render", "logout", "getAuthStatus", "getUserProfile", "getBalance", "getUserAddress", "getUAID", "getCashbackInformation", "renderCoupons", "getLoginUrl"];
@@ -1,6 +1,7 @@
1
1
  import { NativeParams } from '../jsbridge-core/jsbridge';
2
2
  import { ConsoleDebugInfoParams } from '../types';
3
3
  import { ChallengeMethod } from '../types/getAuthStatus';
4
+ export declare const OTT_QUERY_PARAMETERS: string[];
4
5
  export declare function getClientFunctions(): import('../utils/windowBridge').WindowBridgeFunctions<typeof import("../client/clientFunctions")>;
5
6
  export declare function linkOpen(url: string, target?: string, isFocus?: boolean): void;
6
7
  export declare function getDomain(subdomainCookieSharing: boolean, hostname: string): string;
@@ -13,3 +14,9 @@ export declare function getPkceCodeChallenge(): Promise<{
13
14
  export declare function sendMakeIframeVisible<T extends NativeParams<any>>(params: T): void;
14
15
  export declare function checkMakeIframeVisible(): void;
15
16
  export declare function sendDebugInfoToClient(data: ConsoleDebugInfoParams, env?: string | null, debugMode?: boolean): void;
17
+ export declare function extractOttFromParams(params: {
18
+ clientUrl?: string;
19
+ ott?: string;
20
+ token?: string;
21
+ }): string | undefined;
22
+ export declare function removeOttFromClientUrl(clientUrl: string | undefined): string | undefined;
@@ -21,7 +21,7 @@ import { StartMultiFactorAuthParams } from './types/startMultiFactorAuth';
21
21
  import { TopupParams } from './types/topup';
22
22
  import { VerifyMultiFactorAuthResultParams } from './types/verifyMultiFactorAuthResult';
23
23
  import { JsBridge, NativeParams } from './jsbridge-core/jsbridge';
24
- import { AddShortcutParams, CloseAppParams, GetCashbackInfoParams, LogAppsFlyerEventParams, MapParams, MiniAppResult, OpenAppParams, OpenMiniAppParams, RegisterPaymentFeaturesParams, RegisterUserInfoParams, RequestInternalParams, RequestParams, ScanCodeParams, SetEnablePullDownRefreshParams, ShareParams, ShortcutExistsParams, ShowAlertParams, ShowErrorSheetParams, SmsAuthParams } from './types';
24
+ import { AddShortcutParams, CloseAppParams, GetCashbackInfoParams, MapParams, MiniAppResult, OpenAppParams, OpenMiniAppParams, RegisterPaymentFeaturesParams, RegisterUserInfoParams, RequestInternalParams, RequestParams, ScanCodeParams, SetEnablePullDownRefreshParams, ShareParams, ShortcutExistsParams, ShowAlertParams, ShowErrorSheetParams, SmsAuthParams } from './types';
25
25
  export declare class MiniAppModule {
26
26
  jsBridge: JsBridge;
27
27
  isExecuting: boolean;
@@ -76,7 +76,6 @@ export declare class MiniAppModule {
76
76
  smsAuth(params: SmsAuthParams): void;
77
77
  initKycPassport(params: InitKycPassportParams): void;
78
78
  getKycPassportInfo(params: GetKycPassportInfoParams): void;
79
- logAppsFlyerEvent(params: LogAppsFlyerEventParams): void;
80
79
  getAllUserAddresses(params: NativeParams<MiniAppResult>): void;
81
80
  getTransactionInfo(params: NativeParams<MiniAppResult> & {
82
81
  orderId: string;
@@ -1,2 +1,2 @@
1
1
  (function(){"use strict";try{if(typeof document!="undefined"){var p=document.createElement("style");p.appendChild(document.createTextNode(".ppmna-reset-css{all:initial}.ppmna-reset-css *{text-align:unset;color:unset;background:initial;background-color:transparent;margin:revert;padding:revert;font-weight:revert;font-style:unset;font-size:unset;-webkit-user-select:none;user-select:none;border:unset;border-radius:revert;vertical-align:unset;word-break:unset;outline:none;box-sizing:content-box}.ppmna-reset-css * img{display:inline-block}.ppmna-reset-css * input,.ppmna-reset-css * select{-webkit-user-select:auto;user-select:auto}.ppmna-reset-css * li{list-style:none}.ppmna-reset-css * :where(*:not(svg,svg *)){all:revert}.pp-smartButtonWrapper .pp-smartBtn{display:flex;align-items:center;border-radius:8px;border:none;font-size:14px;font-weight:600;line-height:22px;color:#fff;padding:0;width:100%;height:44px;margin:auto;-webkit-tap-highlight-color:transparent;text-decoration:none;box-sizing:border-box}.pp-smartButtonWrapper .pp-smartBtn.pp-sm .pp-leftSection .pp-btnContent{flex-direction:column}.pp-smartButtonWrapper .pp-smartBtn.pp-light{background:#fff;color:#242323}.pp-smartButtonWrapper .pp-smartBtn.pp-dark{background:#000}.pp-smartButtonWrapper .pp-smartBtn.pp-red{background:#ff0033}.pp-smartButtonWrapper .pp-smartBtn.pp-login{min-width:180px}.pp-smartButtonWrapper .pp-smartBtn.pp-login.pp-sm{width:180px!important}.pp-smartButtonWrapper .pp-smartBtn.pp-login.pp-light{border:1px solid #e4e4e8}.pp-smartButtonWrapper .pp-smartBtn.pp-login.pp-light .pp-userProfile{margin-right:4px}.pp-smartButtonWrapper .pp-smartBtn.pp-login .pp-leftSection .pp-btnContent{display:grid}.pp-smartButtonWrapper .pp-smartBtn.pp-pay{min-width:160px}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-light{border:1px solid #dddddd}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-light .pp-cashbackInfo{color:#ff954c;background:#fff0e5}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-red .pp-cashbackInfo{color:#f03}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-ja .pp-cashbackInfo{padding:2px 16px}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-sm{width:160px!important}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-sm.pp-cashback{height:66px;flex-direction:column;justify-content:center}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-sm .pp-cashbackInfo{margin:8px 0 0}.pp-smartButtonWrapper .pp-smartBtn.pp-pay .pp-leftSection .pp-img{width:24px;height:24px}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-shortText{font-size:16px}.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-sm .pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-cashback .pp-leftSection .pp-btnContent,.pp-smartButtonWrapper .pp-smartBtn.pp-pay.pp-shortText .pp-leftSection .pp-btnContent{margin-left:4px}.pp-smartButtonWrapper .pp-smartBtn .pp-leftSection{display:flex;justify-content:center;align-items:center;width:100%;box-sizing:border-box;padding:0 8px}.pp-smartButtonWrapper .pp-smartBtn .pp-leftSection .pp-img{width:20px;height:20px;display:inline-block}.pp-smartButtonWrapper .pp-smartBtn .pp-leftSection .pp-btnContent{margin-left:8px}.pp-smartButtonWrapper .pp-smartBtn .pp-leftSection .pp-btnContent .pp-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pp-smartButtonWrapper .pp-smartBtn .pp-cashbackInfo{font-size:12px;color:#242323;background:#fff;line-height:14px;padding:2px 8px;border-radius:9px;margin-left:8px}.pp-smartButtonWrapper .pp-smartBtn .pp-userProfile{width:34px;height:34px;border-radius:50%;margin-right:5px}.pp-smartButtonWrapper.pp-button{padding:0;margin:0;background:none;border:none;width:100%;border-radius:8px;-webkit-tap-highlight-color:transparent;font-family:revert!important}.pp-smartButtonWrapper.pp-button *{font-family:revert!important}")),document.head.appendChild(p)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- var pp=function(){"use strict";var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(t,n,s)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s,a=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&o(e,n,t[n]);if(s)for(var n of s(t))i.call(t,n)&&o(e,n,t[n]);return e},c=(e,s)=>t(e,n(s)),l=(e,t,n)=>new Promise(((s,r)=>{var i=e=>{try{a(n.next(e))}catch(t){r(t)}},o=e=>{try{a(n.throw(e))}catch(t){r(t)}},a=e=>e.done?s(e.value):Promise.resolve(e.value).then(i,o);a((n=n.apply(e,t)).next())}));function u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)e[s]=n[s]}return e}var d=function e(t,n){function s(e,s,r){if("undefined"!=typeof document){"number"==typeof(r=u({},n,r)).expires&&(r.expires=new Date(Date.now()+864e5*r.expires)),r.expires&&(r.expires=r.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var o in r)r[o]&&(i+="; "+o,!0!==r[o]&&(i+="="+r[o].split(";")[0]));return document.cookie=e+"="+t.write(s,e)+i}}return Object.create({set:s,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],s={},r=0;r<n.length;r++){var i=n[r].split("="),o=i.slice(1).join("=");try{var a=decodeURIComponent(i[0]);if(s[a]=t.read(o,a),e===a)break}catch(c){}}return e?s[e]:s}},remove:function(e,t){s(e,"",u({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,u({},this.attributes,t))},withConverter:function(t){return e(u({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),p=(e=>(e.accessToken="ppjssdk.accessToken",e.refreshToken="ppjssdk.refreshToken",e.env="ppjssdk.env",e.deviceUUID="ppjssdk.deviceUUID",e.clientUUID="ppjssdk.clientUUID",e.lastPayment="ppjssdk.lastPayment",e.lastTopup="ppjssdk.lastTopup",e.appDetail="ppjssdk.appDetail",e.appConfig="ppjssdk.appConfig",e.userInfo="ppjssdk.userInfo",e.lastPaymentMethod="ppjssdk.lastPaymentMethod",e.lastTopupPayMethod="ppjssdk.lastTopupPayMethod",e.codeVerifier="ppjssdk.codeVerifier",e.clientOrigin="ppjssdk.clientOrigin",e.clientVersion="ppjssdk.clientVersion",e.debugMode="ppjssdk.debugMode",e.claimCouponImmediately="ppjssdk.claimCouponImmediately",e.merchant="ppjssdk.merchant",e.consumedOTT="ppjssdk.consumedOTT",e))(p||{});const h={success:"success",fail:"fail",complete:"complete"},g={init:"init",getBankInfo:"getBankInfo",showAlert:"showAlert",render:"render",makePayment:"makePayment",getUAID:"getUAID",logout:"logout",startMultiFactorAuth:"startMultiFactorAuth",verifyMultiFactorAuthResult:"verifyMultiFactorAuthResult",getPermissionStatus:"getPermissionStatus",registerKyc:"registerKyc",getKycInformation:"getKycInformation",getUserAddress:"getUserAddress",getUserLocation:"getUserLocation",getUserProfile:"getUserProfile",registerEmail:"registerEmail",showUpdateWarning:"showUpdateWarning",showErrorSheet:"showErrorSheet",getPlatformInformation:"getPlatformInformation",share:"share",getTopBarHeight:"getTopBarHeight",openWebview:"openWebview",openMap:"openMap",closeApp:"closeApp",openApp:"openApp",checkPaymentMethod:"checkPaymentMethod",getBalance:"getBalance",topup:"topup",registerPaymentFeatures:"registerPaymentFeatures",registerUserInfo:"registerUserInfo",requestInternal:"requestInternal",scanCode:"scanCode",getAuthStatus:"getAuthStatus",openMiniApp:"openMiniApp",inputAddress:"inputAddress",checkAccessToken:"checkAccessToken",getCashbackInformation:"getCashbackInformation",request:"request",getDeviceInformation:"getDeviceInformation",debug:"debug",createOrder:"createOrder",handleMessageFromNative:"handleMessageFromNative",initKycPassport:"initKycPassport",smsAuth:"smsAuth",getKycPassportInfo:"getKycPassportInfo"},_="reload",m="link",f="makeVisible",v="consoleDebugInfo",y="clientPopState";var E=(e=>(e.MiniApp="MiniApp",e.SmartPayment="SmartPayment",e))(E||{});const S="_PayPayJsBridge",I=["init","openWebview","openMap","closeApp","makePayment","topup","setSessionData","getSessionData","setStorageData","getStorageData","removeStorageData","getPermissionStatus","scanCode","showAlert","showErrorSheet","getTopBarHeight","setTitle","showUpdateWarning","getPlatformInformation","openApp","share","getKycInformation","getUserLocation","checkPaymentMethod","registerKyc","startMultiFactorAuth","verifyMultiFactorAuthResult","getBankInfo","logout","getUserProfile","getBalance","getUserAddress","getUAID","copyToClipboard","registerUserInfo","setEnablePullDownRefresh","registerEmail","checkAccessToken","debug","inputAddress","getDeviceInformation","openMiniApp","request","requestInternal","registerPaymentFeatures","initKycPassport","getKycPassportInfo","shortcutExists","addShortcut","logAppsFlyerEvent","getAllUserAddresses","getUserPaymentFeatureSettings","getPaymentSettings","getTransactionInfo","getTransactions","getPayPayCardInfo","getExternalLinkageInformation","markAsReady","renderCoupons"],T=["init","createOrder","makePayment","render","logout","getAuthStatus","getUserProfile","getBalance","getUserAddress","getUAID","getCashbackInformation","renderCoupons","getLoginUrl"];function b(e){return"https://image.paypay.ne.jp/miniapps/mini-app-sdk/"+e}const A=b("icon-paypay-rec.svg"),w=b("icon-paypay-rec-white.svg");var N,C=new Uint8Array(16);function P(){if(!N&&!(N="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return N(C)}const D=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function k(e){return"string"==typeof e&&D.test(e)}for(var R=[],O=0;O<256;++O)R.push((O+256).toString(16).substr(1));function U(e,t,n){var s=(e=e||{}).random||(e.rng||P)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=s[r];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(R[e[t+0]]+R[e[t+1]]+R[e[t+2]]+R[e[t+3]]+"-"+R[e[t+4]]+R[e[t+5]]+"-"+R[e[t+6]]+R[e[t+7]]+"-"+R[e[t+8]]+R[e[t+9]]+"-"+R[e[t+10]]+R[e[t+11]]+R[e[t+12]]+R[e[t+13]]+R[e[t+14]]+R[e[t+15]]).toLowerCase();if(!k(n))throw TypeError("Stringified UUID is invalid");return n}(s)}class L extends Error{constructor(e,t){super(e),this.errorCode=t}}var x=(e=>(e.success="SUCCESS",e.invalidUrl="INVALID_URL",e.invalidData="INVALID_DATA",e.invalidHeader="INVALID_HEADER",e.invalidMethod="INVALID_METHOD",e.invalidPath="INVALID_PATH",e.notReachable="NOT_REACHABLE",e.notAvailable="NOT_AVAILABLE",e.timeOut="TIME_OUT",e.whiteListError="NONE_WHITELIST_DOMAIN",e.statusCodeError="STATUS_CODE_ERROR",e.invalidResponse="INVALID_RESPONSE",e.noLocationPermission="NO_USER_LOCATION_PERMISSION",e.noPermissionListAvailable="NO_PERMISSION_LIST_AVAILABLE",e.other="other",e.serverError="SERVER_ERROR",e.noCameraPermission="HOST_APP_CAMERA_DENIED",e.noAlbumPermission="HOST_APP_ALBUM_DENIED",e.insufficientScope="INSUFFICIENT_SCOPE",e.userCanceled="USER_CANCELED",e.invalidJSAPIParams="INVALID_JS_API_PARAMS",e.hostAppLocationDenied="HOST_APP_LOCATION_DENIED",e.hostAppContactsDenied="HOST_APP_READING_CONTACT_DENIED",e.badRequestInsufficientParameter="BAD_REQUEST_INSUFFICIENT_PARAMETER",e.badRequest="BAD_REQUEST",e.paymentFail="PAYMENT_FAIL",e.topupFail="TOPUP_FAIL",e.topupSuccessButNotAddToBalance="TOPUP_SUCCESS_BUT_NOT_ADD_TO_BALANCE",e.userCanceledSimilarTxn="USER_CANCELED_SIMILAR_TRANSACTION",e.mapAppNotFound="MAP_APP_NOT_FOUND",e.invalidAppSchemeURL="INVALID_APP_SCHEME_URL",e.noValueFound="NO_VALUE_FOUND",e.securityNotSetup="SECURITY_NOT_SETUP",e.userDenied="USER_DENIED",e.securityTemporaryLocked="SECURITY_TEMPORARY_LOCKED",e.couldNotGenerateBarcode="COULD_NOT_GENERATE_BARCODE",e.cannotDetectAvailability="CAN_NOT_DETECT_AVAILABILITY",e.suspectedDuplicatePayment="SUSPECTED_DUPLICATE_PAYMENT",e.noSufficientFund="NO_SUFFICIENT_FUND",e.unknown="UNKNOWN",e.sdkNotInitialized="SDK_NOT_INITIALIZED",e.tokenNotFound="TOKEN_NOT_FOUND",e.tokenExpired="TOKEN_EXPIRED",e.activeRequestExists="ACTIVE_REQUEST_EXISTS",e.invalidType="INVALID_TYPE",e.sessionNotFound="SESSION_NOT_FOUND",e.cookieError="COOKIE_ERROR",e.notAuthorized="NOT_AUTHORIZED",e.permissionRequired="PERMISSION_REQUIRED",e.deeplinkUnavailable="DEEPLINK_UNAVAILABLE",e.kycIncompleted="KYC_INCOMPLETED",e.noBankAccount="NO_BANK_ACCOUNT",e.invalidPaymentIdentifier="INVALID_PAYMENT_IDENTIFIER",e.otpSendTooShort="OTP_SEND_TOO_SHORT",e.otpSendOverLimit="OTP_SEND_OVER_LIMIT",e.userVerificationFailure="USER_VERIFICATION_FAILURE",e.unacceptableOp="UNACCEPTABLE_OP",e.kycUpdateRequired="KYC_UPDATE_REQUIRED",e.notCompleted="NOT_COMPLETED",e.kycValidationInProcess="KYC_VALIDATION_IN_PROCESS",e.noLocationData="NO_LOCATION_DATA",e.functionNotFound="FUNCTION_NOT_FOUND",e.originNotAllowed="ORIGIN_NOT_ALLOWED",e.messageSendingFailed="MESSAGE_SENDING_FAILED",e.transactionNotFound="TRANSACTION_NOT_FOUND",e.unexpectedOperation="UNEXPECTED_OP",e.merchantTimeout="MERCHANT_TIMEOUT",e.rateLimitExceeded="RATE_LIMIT_EXCEEDED",e.sdkUpgradeRequired="SDK_UPGRADE_REQUIRED",e))(x||{});const M="2.39.0",B=new URL("https://mini-app-sdk-core.paypay.ne.jp/"),F=B.origin,j=new URL(`./iframe.html?v=${M}&rev=c39c952`,B).href,V=new URL(`./coupon/iframe.html?v=${M}`,B).href,$=Object.prototype.toString;function q(e){return function(e,t){return $.call(e)===`[object ${t}]`}(e,"Object")}function Y(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function H(e){return e&&e.Math==Math?e:void 0}const W="object"==typeof globalThis&&H(globalThis)||"object"==typeof window&&H(window)||"object"==typeof self&&H(self)||"object"==typeof global&&H(global)||function(){return this}()||{};function K(e,t,n){const s=n||W,r=s.__SENTRY__=s.__SENTRY__||{};return r[e]||(r[e]=t())}const G=["debug","info","warn","error","log","assert","trace"],J={};function z(e){if(!("console"in W))return e();const t=W.console,n={},s=Object.keys(J);s.forEach((e=>{const s=J[e];n[e]=t[e],t[e]=s}));try{return e()}finally{s.forEach((e=>{t[e]=n[e]}))}}const Q=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?G.forEach((n=>{t[n]=(...t)=>{e&&z((()=>{W.console[n](`Sentry Logger [${n}]:`,...t)}))}})):G.forEach((e=>{t[e]=()=>{}})),t}();function X(e){return Z(e,new Map)}function Z(e,t){if(q(e)){const n=t.get(e);if(void 0!==n)return n;const s={};t.set(e,s);for(const r of Object.keys(e))void 0!==e[r]&&(s[r]=Z(e[r],t));return s}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const s=[];return t.set(e,s),e.forEach((e=>{s.push(Z(e,t))})),s}return e}function ee(){const e=W,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>t.getRandomValues(new Uint8Array(1))[0])}catch(s){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}var te;!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(te||(te={}));class ne{constructor(e){ne.prototype.__init.call(this),ne.prototype.__init2.call(this),ne.prototype.__init3.call(this),ne.prototype.__init4.call(this),this._state=te.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new ne(((n,s)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(r){s(r)}else n(t)},e=>{if(t)try{n(t(e))}catch(r){s(r)}else s(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new ne(((t,n)=>{let s,r;return this.then((t=>{r=!1,s=t,e&&e()}),(t=>{r=!0,s=t,e&&e()})).then((()=>{r?n(s):t(s)}))}))}__init(){this._resolve=e=>{this._setResult(te.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(te.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===te.PENDING&&(Y(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===te.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===te.RESOLVED&&e[1](this._value),this._state===te.REJECTED&&e[2](this._value),e[0]=!0)}))}}}const se=W,re={nowSeconds:()=>Date.now()/1e3};const ie="undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__||"[object process]"!==Object.prototype.toString.call("undefined"!=typeof process?process:0)?function(){const{performance:e}=se;if(!e||!e.now)return;return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}():function(){try{return(e=module,t="perf_hooks",e.require(t)).performance}catch(n){return}var e,t}(),oe=void 0===ie?re:{nowSeconds:()=>(ie.timeOrigin+ie.now())/1e3},ae=re.nowSeconds.bind(re),ce=oe.nowSeconds.bind(oe);(()=>{const{performance:e}=se;if(!e||!e.now)return;const t=36e5,n=e.now(),s=Date.now(),r=e.timeOrigin?Math.abs(e.timeOrigin+n-s):t,i=r<t,o=e.timing&&e.timing.navigationStart,a="number"==typeof o?Math.abs(o+n-s):t;(i||a<t)&&(r<=a&&e.timeOrigin)})();const le="production";function ue(e,t,n,s=0){return new ne(((r,i)=>{const o=e[s];if(null===t||"function"!=typeof o)r(t);else{const c=o(a({},t),n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.id&&null===c&&Q.log(`Event processor "${o.id}" dropped event`),Y(c)?c.then((t=>ue(e,t,n,s+1).then(r))).then(null,i):ue(e,c,n,s+1).then(r).then(null,i)}}))}function de(e){const t=ce(),n={sid:ee(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return X({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&pe(n,e),n}function pe(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ce(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:ee()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}class he{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=ge()}static clone(e){const t=new he;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags=a({},e._tags),t._extra=a({},e._extra),t._contexts=a({},e._contexts),t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments],t._sdkProcessingMetadata=a({},e._sdkProcessingMetadata),t._propagationContext=a({},e._propagationContext)),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&pe(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags=a(a({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,t){return this._tags=c(a({},this._tags),{[e]:t}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=a(a({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,t){return this._extra=c(a({},this._extra),{[e]:t}),this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){const t=e(this);return t instanceof he?t:this}return e instanceof he?(this._tags=a(a({},this._tags),e._tags),this._extra=a(a({},this._extra),e._extra),this._contexts=a(a({},this._contexts),e._contexts),e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):q(e)&&(this._tags=a(a({},this._tags),e.tags),this._extra=a(a({},this._extra),e.extra),this._contexts=a(a({},this._contexts),e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=ge(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const s=a({timestamp:ae()},e),r=this._breadcrumbs;return r.push(s),this._breadcrumbs=r.length>n?r.slice(-n):r,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={},n){if(this._extra&&Object.keys(this._extra).length&&(e.extra=a(a({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=a(a({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=a(a({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=a(a({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts=a({trace:this._span.getTraceContext()},e.contexts);const t=this._span.transaction;if(t){e.sdkProcessingMetadata=a({dynamicSamplingContext:t.getDynamicSamplingContext()},e.sdkProcessingMetadata);const n=t.name;n&&(e.tags=a({transaction:n},e.tags))}}this._applyFingerprint(e);const s=this._getBreadcrumbs(),r=[...e.breadcrumbs||[],...s];return e.breadcrumbs=r.length>0?r:void 0,e.sdkProcessingMetadata=c(a(a({},e.sdkProcessingMetadata),this._sdkProcessingMetadata),{propagationContext:this._propagationContext}),ue([...n||[],...K("globalEventProcessors",(()=>[])),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=a(a({},this._sdkProcessingMetadata),e),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}_applyFingerprint(e){var t;e.fingerprint=e.fingerprint?(t=e.fingerprint,Array.isArray(t)?t:[t]):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function ge(){return{traceId:ee(),spanId:ee().substring(16)}}const _e=4,me=100;class fe{constructor(e,t=new he,n=_e){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=he.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:ee(),s=new Error("Sentry syntheticException");return this._withClient(((r,i)=>{r.captureException(e,c(a({originalException:e,syntheticException:s},t),{event_id:n}),i)})),n}captureMessage(e,t,n){const s=this._lastEventId=n&&n.event_id?n.event_id:ee(),r=new Error(e);return this._withClient(((i,o)=>{i.captureMessage(e,t,c(a({originalException:e,syntheticException:r},n),{event_id:s}),o)})),s}captureEvent(e,t){const n=t&&t.event_id?t.event_id:ee();return e.type||(this._lastEventId=n),this._withClient(((s,r)=>{s.captureEvent(e,c(a({},t),{event_id:n}),r)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:s}=this.getStackTop();if(!s)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:i=me}=s.getOptions&&s.getOptions()||{};if(i<=0)return;const o=ae(),c=a({timestamp:o},e),l=r?z((()=>r(c,t))):c;null!==l&&(s.emit&&s.emit("beforeAddBreadcrumb",l,t),n.addBreadcrumb(l,i))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=ye(this);try{e(this)}finally{ye(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Q.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){const n=this._callExtensionMethod("startTransaction",e,t);if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&!n){this.getClient()?console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):console.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),pe(e,n)}(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:s,environment:r=le}=n&&n.getOptions()||{},{userAgent:i}=W.navigator||{},o=de(a(a({release:s,environment:r,user:t.getUser()},i&&{userAgent:i}),e)),c=t.getSession&&t.getSession();return c&&"ok"===c.status&&pe(c,{status:"exited"}),this.endSession(),t.setSession(o),o}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){const n=ve().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Q.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function ve(){return W.__SENTRY__=W.__SENTRY__||{extensions:{},hub:void 0},W}function ye(e){const t=ve(),n=Se(t);return Ie(t,e),n}function Ee(){const e=ve();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return function(e=ve()){t=e,t&&t.__SENTRY__&&t.__SENTRY__.hub&&!Se(e).isOlderThan(_e)||Ie(e,new fe);var t;return Se(e)}(e)}function Se(e){return K("hub",(()=>new fe),e)}function Ie(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}const Te=[x.sdkNotInitialized,x.notAuthorized,x.userCanceled,x.userCanceledSimilarTxn,x.suspectedDuplicatePayment,x.noSufficientFund];function be(e,t,n){Te.includes(n)||function(e,t){const n="string"==typeof t?t:void 0,s="string"!=typeof t?{captureContext:t}:void 0;Ee().captureMessage(e,n,s)}(`windowBridge.${e} failed. client: unknown, error: ${n}, message: ${t}`,"log")}function Ae(e){!function(e){Ee().addBreadcrumb(e)}(e)}class we{constructor(e,t){this.deferredCallbacks={},this.functions=e,this.allowedOrigins=t,this.messageEventHandler=this.messageEventHandler.bind(this),this.subscribeToMessageEvent()}subscribeToMessageEvent(){window.addEventListener("message",this.messageEventHandler)}unsubscribeToMessageEvent(){window.removeEventListener("message",this.messageEventHandler)}messageEventHandler(e){var t;if(null==(t=e.data)?void 0:t.forWindowBridge)return this.allowedOrigins&&!this.allowedOrigins.includes(e.origin)?this.sendErrorResponse(e,`${e.origin} is not allowed to make requests`,x.originNotAllowed):void("request"===e.data.type?this.handleRequest(e):"response"===e.data.type&&this.handleResponse(e))}handleRequest(e){return l(this,null,(function*(){const t=e.data.functionName,n=this.functions[t];n||this.sendErrorResponse(e,`Function '${t}' does not exists on the target window`,x.functionNotFound);try{this.sendSuccessResponse(e,yield n(...e.data.params))}catch(s){let t="Some error ocurred while processing the request",n=x.unknown;s instanceof L&&(t=s.message,n=s.errorCode),this.sendErrorResponse(e,t,n)}}))}handleResponse(e){if(!this.deferredCallbacks[e.data.key])return void console.warn(`Callback for ${e.data.functionName} not found`);const[t,n]=this.deferredCallbacks[e.data.key];delete this.deferredCallbacks[e.data.key],"success"===e.data.status?t(e.data.result):n(new L(e.data.message,e.data.errorCode))}sendErrorResponse(e,t,n){be(e.data.functionName,t,n),this.sendResponse(e,{status:"failure",message:t,errorCode:n})}sendSuccessResponse(e,t){this.sendResponse(e,{status:"success",result:t})}sendResponse(e,t){var n;null==(n=e.source)||n.postMessage(a({forWindowBridge:!0,type:"response",key:e.data.key,functionName:e.data.functionName},t),e.origin)}static init(e,t){if(this._instance)throw new Error("WindowBridge already initialized, you can't call WindowBridge.init more than once");return this._instance=new this(e,t),this._instance}static destroy(){this._instance&&(this._instance.unsubscribeToMessageEvent(),this._instance=void 0)}static getBridge(){if(!this._instance)throw new Error("WindowBridge not initialized, please call WindowBridge.init before calling WindowBridge.getBridge");return this._instance}static getTargetWindowFunctionProxy(e,t){return we.getBridge().getTargetWindowFunctionProxy(e,t)}getTargetWindowFunctionProxy(e,t){return new Proxy(this,{get(n,s){return(...r)=>new Promise(((i,o)=>l(this,null,(function*(){const a=s.toString(),c=`${a}--${Me()}`;try{const s=yield e();if(!s)throw new Error("Target window is undefined");n.deferredCallbacks[c]=[i,o],s.postMessage({forWindowBridge:!0,type:"request",functionName:a,key:c,params:JSON.parse(JSON.stringify(r))},t)}catch(l){delete n.deferredCallbacks[c],o(new L(l.message,x.messageSendingFailed))}}))))}})}}let Ne="";const Ce="ppjssdk.initializedAt";const Pe=new class{constructor(){this.useLocalStorage=!0,this.memoryStorage={};try{localStorage.setItem(Ce,Date.now().toString())}catch(e){this.useLocalStorage=!1}}getItem(e){var t;if(this.useLocalStorage)try{if(null!=localStorage.getItem(Ce))return localStorage.getItem(e);console.debug("local storage value has lost unexpectedly."),Ae({message:"local storage value has lost unexpectedly.",category:"storage"})}catch(n){}return this.useLocalStorage=!1,null!=(t=this.memoryStorage[e])?t:null}setItem(e,t){if(this.memoryStorage[e]=t,this.useLocalStorage)try{localStorage.setItem(e,t)}catch(n){this.useLocalStorage=!1,console.warn("localStorage has become unavailable.")}}removeItem(e){delete this.memoryStorage[e];try{localStorage.removeItem(e)}catch(t){this.useLocalStorage=!1}}clear(){try{localStorage.clear(),localStorage.setItem(Ce,Date.now().toString())}catch(e){}this.memoryStorage={}}};function De(e,t){return`${e}.${null!=t?t:Ne}`}function ke(e,t){if(function(e){Pe.removeItem(e)}(e),t)return Pe.setItem(e,t)}function Re(){let e=Pe.getItem(De(p.clientUUID))||"";return k(e)||(e=U(),function(e){ke(De(p.clientUUID),e)}(e)),e}function Oe(e){const t=Pe.getItem(De(p.appDetail,e));return null==t?null:JSON.parse(t)}let Ue=null,Le=[];function xe(e){const t=function(){var e,t,n,s;let r=null;const i=navigator.userAgent.split(" PayPayMiniApp/");if(i.length>1){const o=null!=(e=i[1].split(" ")[0])?e:null;r=o?o.split("-")[0]:r,r=null!=(s=null==(n=null==(t=null==r?void 0:r.split("."))?void 0:t.slice(0,3))?void 0:n.join("."))?s:null}return r}();return!!t&&(e===t||function(e,t){const[n,s,r]=e.split(".").map((e=>Number.parseInt(e))),[i,o,a]=t.split(".").map((e=>Number.parseInt(e)));return n!==i?n>i:s!==o?s>o:r>a}(t,e))}function Me(){return Math.random().toString(36).substring(7)}function Be(e){return e===F}function Fe(e){return e?String(e):""}function je(e){return I.includes(e)}function Ve(e){return T.includes(e)}Me(),document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&Le.length>0&&(Ue&&clearTimeout(Ue),function(){var e;const t=Le;Le=[],Ue=null;const n="https://www.google-analytics.com/mp/collect?api_secret=fgPKRkdQQvq7XbV4qw3MOQ&measurement_id=G-M64Q2828RR",s=JSON.stringify({client_id:Re(),events:t,user_id:null==(e=Oe())?void 0:e.externalUserId});navigator.sendBeacon?navigator.sendBeacon(n,s):fetch(n,{method:"POST",keepalive:!0,body:s}).catch(console.warn)}())})),x.notAuthorized,x.badRequest,x.badRequestInsufficientParameter,x.insufficientScope,x.insufficientScope;let $e=[];function qe(e){$e=$e.filter((t=>t!==e))}function Ye(){const e=Me();return $e.push(e),e}function He(e,t,n,s){return function(r={}){const i=n(),o=null==s?void 0:s(r);i.logEvent(a({event_action:`pp_${e}_called`,event_category_suffix:e},o)),t(r).then((t=>{var n;i.logEvent(a({event_action:`pp_${e}_success`,event_category_suffix:e},o)),null==(n=r.success)||n.call(r,t)})).catch((t=>{var n;console.error(t.message),i.logEvent(a({event_action:`pp_${e}_fail`,event_category_suffix:e,error_value:t.errorCode},o)),null==(n=r.fail)||n.call(r,{errorCode:t.errorCode})})).finally((()=>{var e;null==(e=r.complete)||e.call(r)}))}}var We=(e=>(e.validToken="TOKEN_VALID",e.initialized="INITIALIZED",e.emailRegistered="EMAIL_REGISTERED",e.emailNotVerified="EMAIL_NOT_VERIFIED",e.success="SUCCESS",e.loggedOut="LOGGED_OUT",e.connected="CONNECTED",e))(We||{});const Ke="4.47.0";const Ge=Object.freeze(Object.defineProperty({__proto__:null,getCookie:function({name:e}){return d.get(e)},getLocalStorage:function({name:e}){return localStorage.getItem(e)},removeCookie:function({name:e,options:t}){return d.remove(e,t)},removeLocalStorage:function({name:e}){return localStorage.removeItem(e)},setCookie:function({name:e,value:t,options:n}){return d.set(e,t,n)},setLocalStorage:function({name:e,value:t}){return localStorage.setItem(e,t)}},Symbol.toStringTag,{value:"Module"})),Je="ppmna-iframe",ze="ppsdk-container";let Qe,Xe;function Ze(){return Qe||(Qe=function(){if(document.getElementById(Je))return;const e=document.createElement("div");return document.createElement("div"),e.setAttribute("id",ze),e.setAttribute("class",ze),e.style.all="initial",e.style.display="none",e.style.position="fixed",e.style.width="100%",e.style.height="100%",e.style.top="0",e.style.left="0",e.style.zIndex="2147483637",document.body.appendChild(e),e}()),Qe}function et(e){const t=Ze();t&&(t.style.display=e?"initial":"none")}function tt(){return Xe||(Xe=new Promise(((e,t)=>{function n(){const n=document.createElement("iframe");n.setAttribute("src",j),n.setAttribute("name",Je),n.setAttribute("id",Je),n.setAttribute("class",Je),n.setAttribute("allow","geolocation"),n.onload=()=>{e(n)},n.onerror=t,n.style.all="initial",n.style.width="100%",n.style.height="100%",n.style.border="none";const s=Ze();s&&(s.innerHTML="",s.append(n))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(()=>{n()})):n()}))),Xe}let nt,st,rt=!1;we.init(Ge,[F]),tt(),st=Promise.resolve(!1);const it=we.getTargetWindowFunctionProxy((function(){return tt().then((e=>null==e?void 0:e.contentWindow)).catch((()=>null))}),F);function ot(){return it}function at(e){const t=new URL(window.location.href),n=t.searchParams.get("token"),s=t.searchParams.get("one_time_token"),r=(i=e.clientId,d.get(`${p.refreshToken}.${i}`)||d.get(p.refreshToken)||"");var i;const o=function(e){return d.get(`${p.codeVerifier}.${e}`)||d.get(p.codeVerifier)||""}(e.clientId);rt=!!e.useAllFunctions,(n||s)&&function(e){e.searchParams.delete("token"),e.searchParams.delete("one_time_token"),e.search=e.searchParams.toString();const t=e.toString().replace(e.origin,"");history.replaceState(null,"",t)}(t);const l={env:e.env,mode:e.mode,debugMode:e.debugMode,clientId:e.clientId,token:n,ott:s,refreshToken:r,clientVersion:"2.39.0",codeVerifier:o,clientSdkType:nt,clientUrl:window.location.href};let u;const h=new Promise((e=>u=e)),_=()=>{var t;u(!0),null==(t=e.complete)||t.call(e)};st.then((()=>tt())).then((()=>{gt(g.init,!1,c(a({},e),{complete:_}),l)})).catch((()=>{var t;null==(t=e.fail)||t.call(e,{errorCode:x.sdkNotInitialized}),_()})),st=h}addEventListener("message",(e=>{var t;if(!(null==(t=e.data)?void 0:t.forWindowBridge)&&Be(e.origin))if(e.data.name===_&&window.location.reload(),e.data.name!==f){if(e.data.name===m){const t=e.data.data;"_blank"===t.target?window.open(t.url,"_blank"):window.location.href=t.url}if(e.data.name===v){const{params:t}=e.data.data;!function(e){console.debug(...e)}(t)}}else et(!0)})),addEventListener("popstate",(()=>{tt().then((e=>{var t;const n={name:y};null==(t=null==e?void 0:e.contentWindow)||t.postMessage(n,F)})).catch((e=>console.warn(e)))}));const ct=He("renderCoupons",(e=>l(this,null,(function*(){const{merchant:t,couponId:n,containerId:s,postLoginRedirectUrl:r=window.location.href,postLoginRedirectType:i,locale:o}=e,a=document.getElementById(s);if(!a)throw new L("Invalid coupon container Id",x.badRequestInsufficientParameter);const c=yield it.fetchCoupons({merchantId:t,couponId:n,postLoginRedirectUrl:r,postLoginRedirectType:i});try{const e=document.createElement("iframe");e.src=V,e.style.cssText="width:100%;height: 0;border: none;transition: height 300ms ease-in;display: block;",yield new Promise(((t,n)=>{e.onload=()=>t(!0),e.onerror=()=>n(!1),a.innerHTML="",a.append(e)})),e.onload=null,e.onerror=null,window.addEventListener("message",(({data:t,source:n})=>{"update-iframe-height"===(null==t?void 0:t.eventName)&&e.contentWindow===n&&(e.style.height=`${t.height}px`)}));const n=we.getTargetWindowFunctionProxy((()=>e.contentWindow),F);yield n.renderCoupons({coupons:c,merchantId:t,locale:o,postLoginRedirectUrl:r,postLoginRedirectType:i})}catch(l){throw new L(`An error ocurred while displaying coupons, merchantId=${t}, couponId=${n}, error=${l}`,x.unknown)}}))),ot,(e=>({event_label2:e.couponId,merchant_id:e.merchant})));const lt=He("logout",(()=>l(this,null,(function*(){try{return yield it.logout(),{statusCode:We.loggedOut}}catch(e){throw new L(`An error ocurred while trying to logout the user, error=${e}`,x.unknown)}}))),ot),ut=He("getPaymentSettings",it.getPaymentSettings,ot),dt=He("getLoginUrl",(e=>it.getLoginUrl({redirectUrl:e.redirectUrl||location.href,redirectType:e.redirectType})),ot);function pt(e,t,n){var s,r,i;e.result===h.fail&&(null==(s=null==t?void 0:t.fail)||s.call(t,e.data)),e.result===h.success&&(null==(r=null==t?void 0:t.success)||r.call(t,null==e?void 0:e.data)),e.result===h.complete&&(null==(i=null==t?void 0:t.complete)||i.call(t),removeEventListener("message",n),qe(e.messageId),$e.length>0||et(!1))}function ht(e){return l(this,null,(function*(){var t;const n=yield tt().catch((()=>{}));null==(t=null==n?void 0:n.contentWindow)||t.postMessage(JSON.parse(JSON.stringify(e)),F)}))}function gt(e,t,n,s){const r=Ye();t&&et(!0);const i=t=>{Be(t.origin)&&t.data.name===e&&t.data.messageId===r&&pt(t.data,n,i)};addEventListener("message",i),ht({name:e,params:s,messageId:r})}const _t=He("markAsReady",(()=>l(this,null,(function*(){xe(Ke)&&(window.location.href="paypay://miniappPerformance/ready"),yield it.markAsReady()}))),ot);var mt;mt={_handleMessageFromNative:e=>{tt().then((t=>{var n;null==(n=null==t?void 0:t.contentWindow)||n.postMessage(JSON.parse(JSON.stringify({name:g.handleMessageFromNative,params:{json:e}})),F)}))}},(!window.hasOwnProperty(S)||window[S]!==mt)&&(window[S]=mt);const ft={init:at,verifyMultiFactorAuthResult:function(e){const t=new URL(window.location.href);gt(g.verifyMultiFactorAuthResult,!1,e,c(a({},e),{sessionId:t.searchParams.get("ppSessionId")}))},share:function(e){if(!(null==navigator?void 0:navigator.share))return void gt(g.share,!1,e,e);const t={text:null==e?void 0:e.text};navigator.share(t).then((()=>{var t,n;null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)})).catch((()=>{var t,n;null==(t=null==e?void 0:e.fail)||t.call(e,{errorCode:x.unknown}),null==(n=null==e?void 0:e.complete)||n.call(e)}))},setTitle:function(e){var t,n;document.title=(null==e?void 0:e.title)||"",null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)},render:function(e){var t;if(!(null==e?void 0:e.containerId)||!document.getElementById(null==e?void 0:e.containerId))return null==(t=null==e?void 0:e.fail)||t.call(e,{errorCode:x.badRequestInsufficientParameter}),console.error("Invalid container Id");const n=Ye(),s=t=>{var r,i,o;if(!Be(t.origin)||t.data.name!==g.render||t.data.messageId!==n)return;const c=null==(r=t.data)?void 0:r.data,l=null==(i=t.data)?void 0:i.data;t.data.result===h.success&&(!function(e,t){var n,s,r,i,o,c,l;const u=document.getElementById(t.containerId),d=document.createElement("button");d.className="ppmna-reset-css pp-smartButtonWrapper pp-button";const p=function(e){return"red"===e?w:A}(null==t?void 0:t.theme),h=(null==(s=null==(n=null==e?void 0:e.data)?void 0:n.cashbackInfo)?void 0:s.length)?"pp-cashback":"",_=t.isShortText?"pp-shortText":"",m=null!=(r=null==t?void 0:t.buttonSize)?r:"lg",f=null!=(i=null==t?void 0:t.theme)?i:"light",v=document.createElement("a");v.className=`pp-smartBtn pp-${f} pp-${m} pp-${Fe(t.type)} pp-${e.preferredLanguage} ${h} ${_}`,v.href=Fe(e.data.loginUrl);const y=document.createElement("span");y.className="pp-leftSection";const E=document.createElement("img");E.className="pp-img",E.src=p,E.alt="",y.appendChild(E);const S=document.createElement("span");S.className="pp-btnContent";const I=document.createElement("span");I.className="pp-title",I.innerText=null==(o=null==e?void 0:e.data)?void 0:o.title,S.appendChild(I),y.appendChild(S),v.append(y);const T=document.createElement("span");(null==(c=null==e?void 0:e.data)?void 0:c.cashbackInfo)&&(T.className="pp-cashbackInfo",T.innerText=null==(l=null==e?void 0:e.data)?void 0:l.cashbackInfo,S.append(T));if(e.data.avatarUrl){const t=document.createElement("img");t.className="pp-userProfile",t.src=e.data.avatarUrl,t.addEventListener("error",(function(e){var t;const n=e.target;null==(t=null==n?void 0:n.parentNode)||t.removeChild(n)})),v.append(t)}d.append(v),u&&(u.innerHTML="",u.appendChild(d),"pay"===t.type&&(null==e?void 0:e.isLoggedIn)&&d.addEventListener("click",(e=>{var n;e.preventDefault(),(null==t?void 0:t.callback)?null==(n=null==t?void 0:t.callback)||n.call(t):t.orderInfo&&gt(g.makePayment,!0,t,a({},t.orderInfo))})))}(l,e),"pay"===c.type&&(null==l?void 0:l.isJustLoggedIn)&&e.autoInvoke&&(null==l?void 0:l.isLoggedIn)&&gt(g.makePayment,!0,e,a({},e.orderInfo))),t.data.result===h.fail&&(null==(o=null==e?void 0:e.fail)||o.call(e,t.data.data)),t.data.result===h.complete&&(qe(t.data.messageId),removeEventListener("message",s))};addEventListener("message",s),ht({name:g.render,params:c(a({},e),{redirectUrl:e.redirectUrl||window.location.href}),messageId:n})},renderCoupons:ct,scanCode:function(e){var t;const n=c(a({},e),{redirectUrlOnCancel:null!=(t=null==e?void 0:e.redirectUrlOnCancel)?t:window.location.href});gt(g.scanCode,!1,e,n)},copyToClipboard:function(e){var t,n,s;const r=document.createElement("textarea");r.setAttribute("readonly","true"),r.setAttribute("contenteditable","true"),r.value=e.value,document.body.appendChild(r),r.select(),r.setSelectionRange(0,r.value.length);const i=document.execCommand("copy");document.body.removeChild(r),i?null==(t=null==e?void 0:e.success)||t.call(e):null==(n=null==e?void 0:e.fail)||n.call(e,{errorCode:x.other}),null==(s=e.complete)||s.call(e)},getSessionData:function(e){var t,n;const s=sessionStorage.getItem(null==e?void 0:e.key);null==(t=null==e?void 0:e.success)||t.call(e,{[null==e?void 0:e.key]:null!=s?s:""}),null==(n=null==e?void 0:e.complete)||n.call(e)},setSessionData:function(e){var t,n,s;sessionStorage.setItem(null==e?void 0:e.key,null!=(t=null==e?void 0:e.value)?t:""),null==(n=null==e?void 0:e.success)||n.call(e),null==(s=null==e?void 0:e.complete)||s.call(e)},getStorageData:function(e){var t,n;const s=localStorage.getItem(null==e?void 0:e.key);null==(t=null==e?void 0:e.success)||t.call(e,{[null==e?void 0:e.key]:null!=s?s:""}),null==(n=null==e?void 0:e.complete)||n.call(e)},setStorageData:function(e){var t,n,s;localStorage.setItem(null==e?void 0:e.key,null!=(t=null==e?void 0:e.value)?t:""),null==(n=null==e?void 0:e.success)||n.call(e),null==(s=null==e?void 0:e.complete)||s.call(e)},removeStorageData:function(e){var t,n;localStorage.removeItem(null==e?void 0:e.key),null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)},getKycPassportInfo:function(e){const t=window.location.href;gt(g.getKycPassportInfo,!1,e,c(a({},e),{url:t}))},logout:lt,getPaymentSettings:ut,getLoginUrl:dt,markAsReady:_t},vt=["init","setTitle","copyToClipboard","getSessionData","setSessionData","getStorageData","setStorageData","removeStorageData","getLoginUrl"],yt=["renderCoupons"];const Et={version:"2.39.0",revision:"c39c952"};return function({sdkType:e}){nt=e;const t=e===E.MiniApp?je:Ve,n=new Proxy(ft,{get(n,s){if(s in Et)return Et[s];const r=s;if(!rt&&!t(r))throw new Error(`${r} is not supported by ${e} JS SDK`);return e=>l(this,null,(function*(){var t,i;if(!vt.includes(r)&&!(yield st)){if(!yt.includes(r)||!e.clientId)return null==(t=e.fail)||t.call(e,{errorCode:x.sdkNotInitialized}),void(null==(i=e.complete)||i.call(e));at({clientId:e.clientId,env:e.env}),yield st}if(Object.prototype.hasOwnProperty.call(n,r))return n[r](e);gt(s,!1,e,e)}))}});return window._pp=n,function(e){const t=window._ppcs;if(t){window._ppcs=void 0;for(const[n,s]of t)e[n](s)}}(n),n}({sdkType:E.MiniApp})}();
2
+ var pp=function(){"use strict";var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,o=(t,n,s)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s,a=(e,t)=>{for(var n in t||(t={}))r.call(t,n)&&o(e,n,t[n]);if(s)for(var n of s(t))i.call(t,n)&&o(e,n,t[n]);return e},c=(e,s)=>t(e,n(s)),l=(e,t,n)=>new Promise(((s,r)=>{var i=e=>{try{a(n.next(e))}catch(t){r(t)}},o=e=>{try{a(n.throw(e))}catch(t){r(t)}},a=e=>e.done?s(e.value):Promise.resolve(e.value).then(i,o);a((n=n.apply(e,t)).next())}));function u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)e[s]=n[s]}return e}var d=function e(t,n){function s(e,s,r){if("undefined"!=typeof document){"number"==typeof(r=u({},n,r)).expires&&(r.expires=new Date(Date.now()+864e5*r.expires)),r.expires&&(r.expires=r.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var o in r)r[o]&&(i+="; "+o,!0!==r[o]&&(i+="="+r[o].split(";")[0]));return document.cookie=e+"="+t.write(s,e)+i}}return Object.create({set:s,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],s={},r=0;r<n.length;r++){var i=n[r].split("="),o=i.slice(1).join("=");try{var a=decodeURIComponent(i[0]);if(s[a]=t.read(o,a),e===a)break}catch(c){}}return e?s[e]:s}},remove:function(e,t){s(e,"",u({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,u({},this.attributes,t))},withConverter:function(t){return e(u({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),p=(e=>(e.accessToken="ppjssdk.accessToken",e.refreshToken="ppjssdk.refreshToken",e.env="ppjssdk.env",e.deviceUUID="ppjssdk.deviceUUID",e.clientUUID="ppjssdk.clientUUID",e.lastPayment="ppjssdk.lastPayment",e.lastTopup="ppjssdk.lastTopup",e.appDetail="ppjssdk.appDetail",e.appConfig="ppjssdk.appConfig",e.userInfo="ppjssdk.userInfo",e.lastPaymentMethod="ppjssdk.lastPaymentMethod",e.lastTopupPayMethod="ppjssdk.lastTopupPayMethod",e.codeVerifier="ppjssdk.codeVerifier",e.clientOrigin="ppjssdk.clientOrigin",e.clientVersion="ppjssdk.clientVersion",e.debugMode="ppjssdk.debugMode",e.claimCouponImmediately="ppjssdk.claimCouponImmediately",e.merchant="ppjssdk.merchant",e.consumedOTT="ppjssdk.consumedOTT",e))(p||{});const h={success:"success",fail:"fail",complete:"complete"},g={init:"init",getBankInfo:"getBankInfo",showAlert:"showAlert",render:"render",makePayment:"makePayment",getUAID:"getUAID",logout:"logout",startMultiFactorAuth:"startMultiFactorAuth",verifyMultiFactorAuthResult:"verifyMultiFactorAuthResult",getPermissionStatus:"getPermissionStatus",registerKyc:"registerKyc",getKycInformation:"getKycInformation",getUserAddress:"getUserAddress",getUserLocation:"getUserLocation",getUserProfile:"getUserProfile",registerEmail:"registerEmail",showUpdateWarning:"showUpdateWarning",showErrorSheet:"showErrorSheet",getPlatformInformation:"getPlatformInformation",share:"share",getTopBarHeight:"getTopBarHeight",openWebview:"openWebview",openMap:"openMap",closeApp:"closeApp",openApp:"openApp",checkPaymentMethod:"checkPaymentMethod",getBalance:"getBalance",topup:"topup",registerPaymentFeatures:"registerPaymentFeatures",registerUserInfo:"registerUserInfo",requestInternal:"requestInternal",scanCode:"scanCode",getAuthStatus:"getAuthStatus",openMiniApp:"openMiniApp",inputAddress:"inputAddress",checkAccessToken:"checkAccessToken",getCashbackInformation:"getCashbackInformation",request:"request",getDeviceInformation:"getDeviceInformation",debug:"debug",createOrder:"createOrder",handleMessageFromNative:"handleMessageFromNative",initKycPassport:"initKycPassport",smsAuth:"smsAuth",getKycPassportInfo:"getKycPassportInfo"},_="reload",m="link",f="makeVisible",v="consoleDebugInfo",y="clientPopState";var E=(e=>(e.MiniApp="MiniApp",e.SmartPayment="SmartPayment",e))(E||{});const S="_PayPayJsBridge",I=["init","openWebview","openMap","closeApp","makePayment","topup","setSessionData","getSessionData","setStorageData","getStorageData","removeStorageData","getPermissionStatus","scanCode","showAlert","showErrorSheet","getTopBarHeight","setTitle","showUpdateWarning","getPlatformInformation","openApp","share","getKycInformation","getUserLocation","checkPaymentMethod","registerKyc","startMultiFactorAuth","verifyMultiFactorAuthResult","getBankInfo","logout","getUserProfile","getBalance","getUserAddress","getUAID","copyToClipboard","registerUserInfo","setEnablePullDownRefresh","registerEmail","checkAccessToken","debug","inputAddress","getDeviceInformation","openMiniApp","request","requestInternal","registerPaymentFeatures","initKycPassport","getKycPassportInfo","shortcutExists","addShortcut","getAllUserAddresses","getUserPaymentFeatureSettings","getPaymentSettings","getTransactionInfo","getTransactions","getPayPayCardInfo","getExternalLinkageInformation","markAsReady","renderCoupons"],T=["init","createOrder","makePayment","render","logout","getAuthStatus","getUserProfile","getBalance","getUserAddress","getUAID","getCashbackInformation","renderCoupons","getLoginUrl"];function b(e){return"https://image.paypay.ne.jp/miniapps/mini-app-sdk/"+e}const A=b("icon-paypay-rec.svg"),w=b("icon-paypay-rec-white.svg");var N,C=new Uint8Array(16);function D(){if(!N&&!(N="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return N(C)}const P=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function R(e){return"string"==typeof e&&P.test(e)}for(var O=[],k=0;k<256;++k)O.push((k+256).toString(16).substr(1));function U(e,t,n){var s=(e=e||{}).random||(e.rng||D)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=s[r];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(O[e[t+0]]+O[e[t+1]]+O[e[t+2]]+O[e[t+3]]+"-"+O[e[t+4]]+O[e[t+5]]+"-"+O[e[t+6]]+O[e[t+7]]+"-"+O[e[t+8]]+O[e[t+9]]+"-"+O[e[t+10]]+O[e[t+11]]+O[e[t+12]]+O[e[t+13]]+O[e[t+14]]+O[e[t+15]]).toLowerCase();if(!R(n))throw TypeError("Stringified UUID is invalid");return n}(s)}class L extends Error{constructor(e,t){super(e),this.errorCode=t}}var x=(e=>(e.success="SUCCESS",e.invalidUrl="INVALID_URL",e.invalidData="INVALID_DATA",e.invalidHeader="INVALID_HEADER",e.invalidMethod="INVALID_METHOD",e.invalidPath="INVALID_PATH",e.notReachable="NOT_REACHABLE",e.notAvailable="NOT_AVAILABLE",e.timeOut="TIME_OUT",e.whiteListError="NONE_WHITELIST_DOMAIN",e.statusCodeError="STATUS_CODE_ERROR",e.invalidResponse="INVALID_RESPONSE",e.noLocationPermission="NO_USER_LOCATION_PERMISSION",e.noPermissionListAvailable="NO_PERMISSION_LIST_AVAILABLE",e.other="other",e.serverError="SERVER_ERROR",e.noCameraPermission="HOST_APP_CAMERA_DENIED",e.noAlbumPermission="HOST_APP_ALBUM_DENIED",e.insufficientScope="INSUFFICIENT_SCOPE",e.userCanceled="USER_CANCELED",e.invalidJSAPIParams="INVALID_JS_API_PARAMS",e.hostAppLocationDenied="HOST_APP_LOCATION_DENIED",e.hostAppContactsDenied="HOST_APP_READING_CONTACT_DENIED",e.badRequestInsufficientParameter="BAD_REQUEST_INSUFFICIENT_PARAMETER",e.badRequest="BAD_REQUEST",e.paymentFail="PAYMENT_FAIL",e.topupFail="TOPUP_FAIL",e.topupSuccessButNotAddToBalance="TOPUP_SUCCESS_BUT_NOT_ADD_TO_BALANCE",e.userCanceledSimilarTxn="USER_CANCELED_SIMILAR_TRANSACTION",e.mapAppNotFound="MAP_APP_NOT_FOUND",e.invalidAppSchemeURL="INVALID_APP_SCHEME_URL",e.noValueFound="NO_VALUE_FOUND",e.securityNotSetup="SECURITY_NOT_SETUP",e.userDenied="USER_DENIED",e.securityTemporaryLocked="SECURITY_TEMPORARY_LOCKED",e.couldNotGenerateBarcode="COULD_NOT_GENERATE_BARCODE",e.cannotDetectAvailability="CAN_NOT_DETECT_AVAILABILITY",e.suspectedDuplicatePayment="SUSPECTED_DUPLICATE_PAYMENT",e.noSufficientFund="NO_SUFFICIENT_FUND",e.unknown="UNKNOWN",e.sdkNotInitialized="SDK_NOT_INITIALIZED",e.tokenNotFound="TOKEN_NOT_FOUND",e.tokenExpired="TOKEN_EXPIRED",e.activeRequestExists="ACTIVE_REQUEST_EXISTS",e.invalidType="INVALID_TYPE",e.sessionNotFound="SESSION_NOT_FOUND",e.cookieError="COOKIE_ERROR",e.notAuthorized="NOT_AUTHORIZED",e.permissionRequired="PERMISSION_REQUIRED",e.deeplinkUnavailable="DEEPLINK_UNAVAILABLE",e.kycIncompleted="KYC_INCOMPLETED",e.noBankAccount="NO_BANK_ACCOUNT",e.invalidPaymentIdentifier="INVALID_PAYMENT_IDENTIFIER",e.otpSendTooShort="OTP_SEND_TOO_SHORT",e.otpSendOverLimit="OTP_SEND_OVER_LIMIT",e.userVerificationFailure="USER_VERIFICATION_FAILURE",e.unacceptableOp="UNACCEPTABLE_OP",e.kycUpdateRequired="KYC_UPDATE_REQUIRED",e.notCompleted="NOT_COMPLETED",e.kycValidationInProcess="KYC_VALIDATION_IN_PROCESS",e.noLocationData="NO_LOCATION_DATA",e.functionNotFound="FUNCTION_NOT_FOUND",e.originNotAllowed="ORIGIN_NOT_ALLOWED",e.messageSendingFailed="MESSAGE_SENDING_FAILED",e.transactionNotFound="TRANSACTION_NOT_FOUND",e.unexpectedOperation="UNEXPECTED_OP",e.merchantTimeout="MERCHANT_TIMEOUT",e.rateLimitExceeded="RATE_LIMIT_EXCEEDED",e.sdkUpgradeRequired="SDK_UPGRADE_REQUIRED",e))(x||{});const M="2.40.0",B=new URL("https://mini-app-sdk-core.paypay.ne.jp/"),F=B.origin,j=new URL(`./iframe.html?v=${M}&rev=e045550`,B).href,V=new URL(`./coupon/iframe.html?v=${M}`,B).href,$=Object.prototype.toString;function q(e){return function(e,t){return $.call(e)===`[object ${t}]`}(e,"Object")}function Y(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function H(e){return e&&e.Math==Math?e:void 0}const W="object"==typeof globalThis&&H(globalThis)||"object"==typeof window&&H(window)||"object"==typeof self&&H(self)||"object"==typeof global&&H(global)||function(){return this}()||{};function K(e,t,n){const s=n||W,r=s.__SENTRY__=s.__SENTRY__||{};return r[e]||(r[e]=t())}const G=["debug","info","warn","error","log","assert","trace"],J={};function z(e){if(!("console"in W))return e();const t=W.console,n={},s=Object.keys(J);s.forEach((e=>{const s=J[e];n[e]=t[e],t[e]=s}));try{return e()}finally{s.forEach((e=>{t[e]=n[e]}))}}const Q=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?G.forEach((n=>{t[n]=(...t)=>{e&&z((()=>{W.console[n](`Sentry Logger [${n}]:`,...t)}))}})):G.forEach((e=>{t[e]=()=>{}})),t}();function X(e){return Z(e,new Map)}function Z(e,t){if(q(e)){const n=t.get(e);if(void 0!==n)return n;const s={};t.set(e,s);for(const r of Object.keys(e))void 0!==e[r]&&(s[r]=Z(e[r],t));return s}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const s=[];return t.set(e,s),e.forEach((e=>{s.push(Z(e,t))})),s}return e}function ee(){const e=W,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>t.getRandomValues(new Uint8Array(1))[0])}catch(s){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}var te;!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(te||(te={}));class ne{constructor(e){ne.prototype.__init.call(this),ne.prototype.__init2.call(this),ne.prototype.__init3.call(this),ne.prototype.__init4.call(this),this._state=te.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(t){this._reject(t)}}then(e,t){return new ne(((n,s)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(r){s(r)}else n(t)},e=>{if(t)try{n(t(e))}catch(r){s(r)}else s(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new ne(((t,n)=>{let s,r;return this.then((t=>{r=!1,s=t,e&&e()}),(t=>{r=!0,s=t,e&&e()})).then((()=>{r?n(s):t(s)}))}))}__init(){this._resolve=e=>{this._setResult(te.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(te.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===te.PENDING&&(Y(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===te.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===te.RESOLVED&&e[1](this._value),this._state===te.REJECTED&&e[2](this._value),e[0]=!0)}))}}}const se=W,re={nowSeconds:()=>Date.now()/1e3};const ie="undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__||"[object process]"!==Object.prototype.toString.call("undefined"!=typeof process?process:0)?function(){const{performance:e}=se;if(!e||!e.now)return;return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}():function(){try{return(e=module,t="perf_hooks",e.require(t)).performance}catch(n){return}var e,t}(),oe=void 0===ie?re:{nowSeconds:()=>(ie.timeOrigin+ie.now())/1e3},ae=re.nowSeconds.bind(re),ce=oe.nowSeconds.bind(oe);(()=>{const{performance:e}=se;if(!e||!e.now)return;const t=36e5,n=e.now(),s=Date.now(),r=e.timeOrigin?Math.abs(e.timeOrigin+n-s):t,i=r<t,o=e.timing&&e.timing.navigationStart,a="number"==typeof o?Math.abs(o+n-s):t;(i||a<t)&&(r<=a&&e.timeOrigin)})();const le="production";function ue(e,t,n,s=0){return new ne(((r,i)=>{const o=e[s];if(null===t||"function"!=typeof o)r(t);else{const c=o(a({},t),n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.id&&null===c&&Q.log(`Event processor "${o.id}" dropped event`),Y(c)?c.then((t=>ue(e,t,n,s+1).then(r))).then(null,i):ue(e,c,n,s+1).then(r).then(null,i)}}))}function de(e){const t=ce(),n={sid:ee(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return X({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&pe(n,e),n}function pe(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ce(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:ee()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}class he{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=ge()}static clone(e){const t=new he;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags=a({},e._tags),t._extra=a({},e._extra),t._contexts=a({},e._contexts),t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments],t._sdkProcessingMetadata=a({},e._sdkProcessingMetadata),t._propagationContext=a({},e._propagationContext)),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&pe(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags=a(a({},this._tags),e),this._notifyScopeListeners(),this}setTag(e,t){return this._tags=c(a({},this._tags),{[e]:t}),this._notifyScopeListeners(),this}setExtras(e){return this._extra=a(a({},this._extra),e),this._notifyScopeListeners(),this}setExtra(e,t){return this._extra=c(a({},this._extra),{[e]:t}),this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){const t=e(this);return t instanceof he?t:this}return e instanceof he?(this._tags=a(a({},this._tags),e._tags),this._extra=a(a({},this._extra),e._extra),this._contexts=a(a({},this._contexts),e._contexts),e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):q(e)&&(this._tags=a(a({},this._tags),e.tags),this._extra=a(a({},this._extra),e.extra),this._contexts=a(a({},this._contexts),e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=ge(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const s=a({timestamp:ae()},e),r=this._breadcrumbs;return r.push(s),this._breadcrumbs=r.length>n?r.slice(-n):r,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={},n){if(this._extra&&Object.keys(this._extra).length&&(e.extra=a(a({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=a(a({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=a(a({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=a(a({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts=a({trace:this._span.getTraceContext()},e.contexts);const t=this._span.transaction;if(t){e.sdkProcessingMetadata=a({dynamicSamplingContext:t.getDynamicSamplingContext()},e.sdkProcessingMetadata);const n=t.name;n&&(e.tags=a({transaction:n},e.tags))}}this._applyFingerprint(e);const s=this._getBreadcrumbs(),r=[...e.breadcrumbs||[],...s];return e.breadcrumbs=r.length>0?r:void 0,e.sdkProcessingMetadata=c(a(a({},e.sdkProcessingMetadata),this._sdkProcessingMetadata),{propagationContext:this._propagationContext}),ue([...n||[],...K("globalEventProcessors",(()=>[])),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=a(a({},this._sdkProcessingMetadata),e),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}_applyFingerprint(e){var t;e.fingerprint=e.fingerprint?(t=e.fingerprint,Array.isArray(t)?t:[t]):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function ge(){return{traceId:ee(),spanId:ee().substring(16)}}const _e=4,me=100;class fe{constructor(e,t=new he,n=_e){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=he.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:ee(),s=new Error("Sentry syntheticException");return this._withClient(((r,i)=>{r.captureException(e,c(a({originalException:e,syntheticException:s},t),{event_id:n}),i)})),n}captureMessage(e,t,n){const s=this._lastEventId=n&&n.event_id?n.event_id:ee(),r=new Error(e);return this._withClient(((i,o)=>{i.captureMessage(e,t,c(a({originalException:e,syntheticException:r},n),{event_id:s}),o)})),s}captureEvent(e,t){const n=t&&t.event_id?t.event_id:ee();return e.type||(this._lastEventId=n),this._withClient(((s,r)=>{s.captureEvent(e,c(a({},t),{event_id:n}),r)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:s}=this.getStackTop();if(!s)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:i=me}=s.getOptions&&s.getOptions()||{};if(i<=0)return;const o=ae(),c=a({timestamp:o},e),l=r?z((()=>r(c,t))):c;null!==l&&(s.emit&&s.emit("beforeAddBreadcrumb",l,t),n.addBreadcrumb(l,i))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=ye(this);try{e(this)}finally{ye(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(n){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Q.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){const n=this._callExtensionMethod("startTransaction",e,t);if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&!n){this.getClient()?console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):console.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),pe(e,n)}(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:s,environment:r=le}=n&&n.getOptions()||{},{userAgent:i}=W.navigator||{},o=de(a(a({release:s,environment:r,user:t.getUser()},i&&{userAgent:i}),e)),c=t.getSession&&t.getSession();return c&&"ok"===c.status&&pe(c,{status:"exited"}),this.endSession(),t.setSession(o),o}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){const n=ve().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Q.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function ve(){return W.__SENTRY__=W.__SENTRY__||{extensions:{},hub:void 0},W}function ye(e){const t=ve(),n=Se(t);return Ie(t,e),n}function Ee(){const e=ve();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return function(e=ve()){t=e,t&&t.__SENTRY__&&t.__SENTRY__.hub&&!Se(e).isOlderThan(_e)||Ie(e,new fe);var t;return Se(e)}(e)}function Se(e){return K("hub",(()=>new fe),e)}function Ie(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}const Te=[x.sdkNotInitialized,x.notAuthorized,x.userCanceled,x.userCanceledSimilarTxn,x.suspectedDuplicatePayment,x.noSufficientFund];function be(e,t,n){Te.includes(n)||function(e,t){const n="string"==typeof t?t:void 0,s="string"!=typeof t?{captureContext:t}:void 0;Ee().captureMessage(e,n,s)}(`windowBridge.${e} failed. error: ${n}, message: ${t}`,"log")}function Ae(e){!function(e){Ee().addBreadcrumb(e)}(e)}class we{constructor(e,t){this.deferredCallbacks={},this.functions=e,this.allowedOrigins=t,this.messageEventHandler=this.messageEventHandler.bind(this),this.subscribeToMessageEvent()}subscribeToMessageEvent(){window.addEventListener("message",this.messageEventHandler)}unsubscribeToMessageEvent(){window.removeEventListener("message",this.messageEventHandler)}messageEventHandler(e){var t;if(null==(t=e.data)?void 0:t.forWindowBridge)return this.allowedOrigins&&!this.allowedOrigins.includes(e.origin)?this.sendErrorResponse(e,`${e.origin} is not allowed to make requests`,x.originNotAllowed):void("request"===e.data.type?this.handleRequest(e):"response"===e.data.type&&this.handleResponse(e))}handleRequest(e){return l(this,null,(function*(){const t=e.data.functionName,n=this.functions[t];n||this.sendErrorResponse(e,`Function '${t}' does not exists on the target window`,x.functionNotFound);try{this.sendSuccessResponse(e,yield n(...e.data.params))}catch(s){let t="Some error ocurred while processing the request",n=x.unknown;s instanceof L&&(t=s.message,n=s.errorCode),this.sendErrorResponse(e,t,n)}}))}handleResponse(e){if(!this.deferredCallbacks[e.data.key])return void console.warn(`Callback for ${e.data.functionName} not found`);const[t,n]=this.deferredCallbacks[e.data.key];delete this.deferredCallbacks[e.data.key],"success"===e.data.status?t(e.data.result):n(new L(e.data.message,e.data.errorCode))}sendErrorResponse(e,t,n){be(e.data.functionName,t,n),this.sendResponse(e,{status:"failure",message:t,errorCode:n})}sendSuccessResponse(e,t){this.sendResponse(e,{status:"success",result:t})}sendResponse(e,t){var n;null==(n=e.source)||n.postMessage(a({forWindowBridge:!0,type:"response",key:e.data.key,functionName:e.data.functionName},t),e.origin)}static init(e,t){if(this._instance)throw new Error("WindowBridge already initialized, you can't call WindowBridge.init more than once");return this._instance=new this(e,t),this._instance}static destroy(){this._instance&&(this._instance.unsubscribeToMessageEvent(),this._instance=void 0)}static getBridge(){if(!this._instance)throw new Error("WindowBridge not initialized, please call WindowBridge.init before calling WindowBridge.getBridge");return this._instance}static getTargetWindowFunctionProxy(e,t){return we.getBridge().getTargetWindowFunctionProxy(e,t)}getTargetWindowFunctionProxy(e,t){return new Proxy(this,{get(n,s){return(...r)=>new Promise(((i,o)=>l(this,null,(function*(){const a=s.toString(),c=`${a}--${Me()}`;try{const s=yield e();if(!s)throw new Error("Target window is undefined");n.deferredCallbacks[c]=[i,o],s.postMessage({forWindowBridge:!0,type:"request",functionName:a,key:c,params:JSON.parse(JSON.stringify(r))},t)}catch(l){delete n.deferredCallbacks[c],o(new L(l.message,x.messageSendingFailed))}}))))}})}}let Ne="";const Ce="ppjssdk.initializedAt";const De=new class{constructor(){this.useLocalStorage=!0,this.memoryStorage={};try{localStorage.setItem(Ce,Date.now().toString())}catch(e){this.useLocalStorage=!1}}getItem(e){var t;if(this.useLocalStorage)try{if(null!=localStorage.getItem(Ce))return localStorage.getItem(e);console.debug("local storage value has lost unexpectedly."),Ae({message:"local storage value has lost unexpectedly.",category:"storage"})}catch(n){}return this.useLocalStorage=!1,null!=(t=this.memoryStorage[e])?t:null}setItem(e,t){if(this.memoryStorage[e]=t,this.useLocalStorage)try{localStorage.setItem(e,t)}catch(n){this.useLocalStorage=!1,console.warn("localStorage has become unavailable.")}}removeItem(e){delete this.memoryStorage[e];try{localStorage.removeItem(e)}catch(t){this.useLocalStorage=!1}}clear(){try{localStorage.clear(),localStorage.setItem(Ce,Date.now().toString())}catch(e){}this.memoryStorage={}}};function Pe(e,t){return`${e}.${null!=t?t:Ne}`}function Re(e,t){if(function(e){De.removeItem(e)}(e),t)return De.setItem(e,t)}function Oe(){let e=De.getItem(Pe(p.clientUUID))||"";return R(e)||(e=U(),function(e){Re(Pe(p.clientUUID),e)}(e)),e}function ke(e){const t=De.getItem(Pe(p.appDetail,e));return null==t?null:JSON.parse(t)}let Ue=null,Le=[];function xe(e){const t=function(){var e,t,n,s;let r=null;const i=navigator.userAgent.split(" PayPayMiniApp/");if(i.length>1){const o=null!=(e=i[1].split(" ")[0])?e:null;r=o?o.split("-")[0]:r,r=null!=(s=null==(n=null==(t=null==r?void 0:r.split("."))?void 0:t.slice(0,3))?void 0:n.join("."))?s:null}return r}();return!!t&&(e===t||function(e,t){const[n,s,r]=e.split(".").map((e=>Number.parseInt(e))),[i,o,a]=t.split(".").map((e=>Number.parseInt(e)));return n!==i?n>i:s!==o?s>o:r>a}(t,e))}function Me(){return Math.random().toString(36).substring(7)}function Be(e){return e===F}function Fe(e){return e?String(e):""}function je(e){return I.includes(e)}function Ve(e){return T.includes(e)}Me(),document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&Le.length>0&&(Ue&&clearTimeout(Ue),function(){var e;const t=Le;Le=[],Ue=null;const n="https://www.google-analytics.com/mp/collect?api_secret=fgPKRkdQQvq7XbV4qw3MOQ&measurement_id=G-M64Q2828RR",s=JSON.stringify({client_id:Oe(),events:t,user_id:null==(e=ke())?void 0:e.externalUserId});navigator.sendBeacon?navigator.sendBeacon(n,s):fetch(n,{method:"POST",keepalive:!0,body:s}).catch(console.warn)}())})),x.notAuthorized,x.badRequest,x.badRequestInsufficientParameter,x.insufficientScope,x.insufficientScope;let $e=[];function qe(e){$e=$e.filter((t=>t!==e))}function Ye(){const e=Me();return $e.push(e),e}function He(e,t,n,s){return function(r={}){const i=n(),o=null==s?void 0:s(r);i.logEvent(a({event_action:`pp_${e}_called`,event_category_suffix:e},o)),t(r).then((t=>{var n;i.logEvent(a({event_action:`pp_${e}_success`,event_category_suffix:e},o)),null==(n=r.success)||n.call(r,t)})).catch((t=>{var n;console.error(t.message),i.logEvent(a({event_action:`pp_${e}_fail`,event_category_suffix:e,error_value:t.errorCode},o)),null==(n=r.fail)||n.call(r,{errorCode:t.errorCode})})).finally((()=>{var e;null==(e=r.complete)||e.call(r)}))}}var We=(e=>(e.validToken="TOKEN_VALID",e.initialized="INITIALIZED",e.emailRegistered="EMAIL_REGISTERED",e.emailNotVerified="EMAIL_NOT_VERIFIED",e.success="SUCCESS",e.loggedOut="LOGGED_OUT",e.connected="CONNECTED",e))(We||{});const Ke="4.47.0";const Ge=Object.freeze(Object.defineProperty({__proto__:null,getCookie:function({name:e}){return d.get(e)},getLocalStorage:function({name:e}){return localStorage.getItem(e)},removeCookie:function({name:e,options:t}){return d.remove(e,t)},removeLocalStorage:function({name:e}){return localStorage.removeItem(e)},removeQueryParametersFromUrl:function(e){const t=new URL(window.location.href);e.forEach((e=>t.searchParams.delete(e)));const n=`${t.pathname}${t.search}`;history.replaceState(null,"",n)},setCookie:function({name:e,value:t,options:n}){return d.set(e,t,n)},setLocalStorage:function({name:e,value:t}){return localStorage.setItem(e,t)}},Symbol.toStringTag,{value:"Module"})),Je="ppmna-iframe",ze="ppsdk-container";let Qe,Xe;function Ze(){return Qe||(Qe=function(){if(document.getElementById(Je))return;const e=document.createElement("div");return document.createElement("div"),e.setAttribute("id",ze),e.setAttribute("class",ze),e.style.all="initial",e.style.display="none",e.style.position="fixed",e.style.width="100%",e.style.height="100%",e.style.top="0",e.style.left="0",e.style.zIndex="2147483637",document.body.appendChild(e),e}()),Qe}function et(e){const t=Ze();t&&(t.style.display=e?"initial":"none")}function tt(){return Xe||(Xe=new Promise(((e,t)=>{function n(){const n=document.createElement("iframe");n.setAttribute("src",j),n.setAttribute("name",Je),n.setAttribute("id",Je),n.setAttribute("class",Je),n.setAttribute("allow","geolocation"),n.onload=()=>{e(n)},n.onerror=t,n.style.all="initial",n.style.width="100%",n.style.height="100%",n.style.border="none";const s=Ze();s&&(s.innerHTML="",s.append(n))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(()=>{n()})):n()}))),Xe}let nt,st,rt=!1;we.init(Ge,[F]),tt(),st=Promise.resolve(!1);const it=we.getTargetWindowFunctionProxy((function(){return tt().then((e=>null==e?void 0:e.contentWindow)).catch((()=>null))}),F);function ot(){return it}function at(e){const t=(n=e.clientId,d.get(`${p.refreshToken}.${n}`)||d.get(p.refreshToken)||"");var n;const s=function(e){return d.get(`${p.codeVerifier}.${e}`)||d.get(p.codeVerifier)||""}(e.clientId);rt=!!e.useAllFunctions;const r={env:e.env,mode:e.mode,debugMode:e.debugMode,clientId:e.clientId,refreshToken:t,clientVersion:"2.40.0",codeVerifier:s,clientSdkType:nt,clientUrl:window.location.href};let i;const o=new Promise((e=>i=e)),l=()=>{var t;i(!0),null==(t=e.complete)||t.call(e)};st.then((()=>tt())).then((()=>{gt(g.init,!1,c(a({},e),{complete:l}),r)})).catch((()=>{var t;null==(t=e.fail)||t.call(e,{errorCode:x.sdkNotInitialized}),l()})),st=o}addEventListener("message",(e=>{var t;if(!(null==(t=e.data)?void 0:t.forWindowBridge)&&Be(e.origin))if(e.data.name===_&&window.location.reload(),e.data.name!==f){if(e.data.name===m){const t=e.data.data;"_blank"===t.target?window.open(t.url,"_blank"):window.location.href=t.url}if(e.data.name===v){const{params:t}=e.data.data;!function(e){console.debug(...e)}(t)}}else et(!0)})),addEventListener("popstate",(()=>{tt().then((e=>{var t;const n={name:y};null==(t=null==e?void 0:e.contentWindow)||t.postMessage(n,F)})).catch((e=>console.warn(e)))}));const ct=He("renderCoupons",(e=>l(this,null,(function*(){const{merchant:t,couponId:n,containerId:s,postLoginRedirectUrl:r=window.location.href,postLoginRedirectType:i,locale:o}=e,a=document.getElementById(s);if(!a)throw new L("Invalid coupon container Id",x.badRequestInsufficientParameter);const c=yield it.fetchCoupons({merchantId:t,couponId:n,postLoginRedirectUrl:r,postLoginRedirectType:i});try{const e=document.createElement("iframe");e.src=V,e.style.cssText="width:100%;height: 0;border: none;transition: height 300ms ease-in;display: block;",yield new Promise(((t,n)=>{e.onload=()=>t(!0),e.onerror=()=>n(!1),a.innerHTML="",a.append(e)})),e.onload=null,e.onerror=null,window.addEventListener("message",(({data:t,source:n})=>{"update-iframe-height"===(null==t?void 0:t.eventName)&&e.contentWindow===n&&(e.style.height=`${t.height}px`)}));const n=we.getTargetWindowFunctionProxy((()=>e.contentWindow),F);yield n.renderCoupons({coupons:c,merchantId:t,locale:o,postLoginRedirectUrl:r,postLoginRedirectType:i})}catch(l){throw new L(`An error ocurred while displaying coupons, merchantId=${t}, couponId=${n}, error=${l}`,x.unknown)}}))),ot,(e=>({event_label2:e.couponId,merchant_id:e.merchant})));const lt=He("logout",(()=>l(this,null,(function*(){try{return yield it.logout(),{statusCode:We.loggedOut}}catch(e){throw new L(`An error ocurred while trying to logout the user, error=${e}`,x.unknown)}}))),ot),ut=He("getPaymentSettings",it.getPaymentSettings,ot),dt=He("getLoginUrl",(e=>it.getLoginUrl({redirectUrl:e.redirectUrl||location.href,redirectType:e.redirectType})),ot);function pt(e,t,n){var s,r,i;e.result===h.fail&&(null==(s=null==t?void 0:t.fail)||s.call(t,e.data)),e.result===h.success&&(null==(r=null==t?void 0:t.success)||r.call(t,null==e?void 0:e.data)),e.result===h.complete&&(null==(i=null==t?void 0:t.complete)||i.call(t),removeEventListener("message",n),qe(e.messageId),$e.length>0||et(!1))}function ht(e){return l(this,null,(function*(){var t;const n=yield tt().catch((()=>{}));null==(t=null==n?void 0:n.contentWindow)||t.postMessage(JSON.parse(JSON.stringify(e)),F)}))}function gt(e,t,n,s){const r=Ye();t&&et(!0);const i=t=>{Be(t.origin)&&t.data.name===e&&t.data.messageId===r&&pt(t.data,n,i)};addEventListener("message",i),ht({name:e,params:s,messageId:r})}const _t=He("markAsReady",(()=>l(this,null,(function*(){xe(Ke)&&(window.location.href="paypay://miniappPerformance/ready"),yield it.markAsReady()}))),ot);var mt;mt={_handleMessageFromNative:e=>{tt().then((t=>{var n;null==(n=null==t?void 0:t.contentWindow)||n.postMessage(JSON.parse(JSON.stringify({name:g.handleMessageFromNative,params:{json:e}})),F)}))}},(!window.hasOwnProperty(S)||window[S]!==mt)&&(window[S]=mt);const ft={init:at,verifyMultiFactorAuthResult:function(e){const t=new URL(window.location.href);gt(g.verifyMultiFactorAuthResult,!1,e,c(a({},e),{sessionId:t.searchParams.get("ppSessionId")}))},share:function(e){if(!(null==navigator?void 0:navigator.share))return void gt(g.share,!1,e,e);const t={text:null==e?void 0:e.text};navigator.share(t).then((()=>{var t,n;null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)})).catch((()=>{var t,n;null==(t=null==e?void 0:e.fail)||t.call(e,{errorCode:x.unknown}),null==(n=null==e?void 0:e.complete)||n.call(e)}))},setTitle:function(e){var t,n;document.title=(null==e?void 0:e.title)||"",null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)},render:function(e){var t;if(!(null==e?void 0:e.containerId)||!document.getElementById(null==e?void 0:e.containerId))return null==(t=null==e?void 0:e.fail)||t.call(e,{errorCode:x.badRequestInsufficientParameter}),console.error("Invalid container Id");const n=Ye(),s=t=>{var r,i,o;if(!Be(t.origin)||t.data.name!==g.render||t.data.messageId!==n)return;const c=null==(r=t.data)?void 0:r.data,l=null==(i=t.data)?void 0:i.data;t.data.result===h.success&&(!function(e,t){var n,s,r,i,o,c,l;const u=document.getElementById(t.containerId),d=document.createElement("button");d.className="ppmna-reset-css pp-smartButtonWrapper pp-button";const p=function(e){return"red"===e?w:A}(null==t?void 0:t.theme),h=(null==(s=null==(n=null==e?void 0:e.data)?void 0:n.cashbackInfo)?void 0:s.length)?"pp-cashback":"",_=t.isShortText?"pp-shortText":"",m=null!=(r=null==t?void 0:t.buttonSize)?r:"lg",f=null!=(i=null==t?void 0:t.theme)?i:"light",v=document.createElement("a");v.className=`pp-smartBtn pp-${f} pp-${m} pp-${Fe(t.type)} pp-${e.preferredLanguage} ${h} ${_}`,v.href=Fe(e.data.loginUrl);const y=document.createElement("span");y.className="pp-leftSection";const E=document.createElement("img");E.className="pp-img",E.src=p,E.alt="",y.appendChild(E);const S=document.createElement("span");S.className="pp-btnContent";const I=document.createElement("span");I.className="pp-title",I.innerText=null==(o=null==e?void 0:e.data)?void 0:o.title,S.appendChild(I),y.appendChild(S),v.append(y);const T=document.createElement("span");(null==(c=null==e?void 0:e.data)?void 0:c.cashbackInfo)&&(T.className="pp-cashbackInfo",T.innerText=null==(l=null==e?void 0:e.data)?void 0:l.cashbackInfo,S.append(T));if(e.data.avatarUrl){const t=document.createElement("img");t.className="pp-userProfile",t.src=e.data.avatarUrl,t.addEventListener("error",(function(e){var t;const n=e.target;null==(t=null==n?void 0:n.parentNode)||t.removeChild(n)})),v.append(t)}d.append(v),u&&(u.innerHTML="",u.appendChild(d),"pay"===t.type&&(null==e?void 0:e.isLoggedIn)&&d.addEventListener("click",(e=>{var n;e.preventDefault(),(null==t?void 0:t.callback)?null==(n=null==t?void 0:t.callback)||n.call(t):t.orderInfo&&gt(g.makePayment,!0,t,a({},t.orderInfo))})))}(l,e),"pay"===c.type&&(null==l?void 0:l.isJustLoggedIn)&&e.autoInvoke&&(null==l?void 0:l.isLoggedIn)&&gt(g.makePayment,!0,e,a({},e.orderInfo))),t.data.result===h.fail&&(null==(o=null==e?void 0:e.fail)||o.call(e,t.data.data)),t.data.result===h.complete&&(qe(t.data.messageId),removeEventListener("message",s))};addEventListener("message",s),ht({name:g.render,params:c(a({},e),{redirectUrl:e.redirectUrl||window.location.href}),messageId:n})},renderCoupons:ct,scanCode:function(e){var t;const n=c(a({},e),{redirectUrlOnCancel:null!=(t=null==e?void 0:e.redirectUrlOnCancel)?t:window.location.href});gt(g.scanCode,!1,e,n)},copyToClipboard:function(e){var t,n,s;const r=document.createElement("textarea");r.setAttribute("readonly","true"),r.setAttribute("contenteditable","true"),r.value=e.value,document.body.appendChild(r),r.select(),r.setSelectionRange(0,r.value.length);const i=document.execCommand("copy");document.body.removeChild(r),i?null==(t=null==e?void 0:e.success)||t.call(e):null==(n=null==e?void 0:e.fail)||n.call(e,{errorCode:x.other}),null==(s=e.complete)||s.call(e)},getSessionData:function(e){var t,n;const s=sessionStorage.getItem(null==e?void 0:e.key);null==(t=null==e?void 0:e.success)||t.call(e,{[null==e?void 0:e.key]:null!=s?s:""}),null==(n=null==e?void 0:e.complete)||n.call(e)},setSessionData:function(e){var t,n,s;sessionStorage.setItem(null==e?void 0:e.key,null!=(t=null==e?void 0:e.value)?t:""),null==(n=null==e?void 0:e.success)||n.call(e),null==(s=null==e?void 0:e.complete)||s.call(e)},getStorageData:function(e){var t,n;const s=localStorage.getItem(null==e?void 0:e.key);null==(t=null==e?void 0:e.success)||t.call(e,{[null==e?void 0:e.key]:null!=s?s:""}),null==(n=null==e?void 0:e.complete)||n.call(e)},setStorageData:function(e){var t,n,s;localStorage.setItem(null==e?void 0:e.key,null!=(t=null==e?void 0:e.value)?t:""),null==(n=null==e?void 0:e.success)||n.call(e),null==(s=null==e?void 0:e.complete)||s.call(e)},removeStorageData:function(e){var t,n;localStorage.removeItem(null==e?void 0:e.key),null==(t=null==e?void 0:e.success)||t.call(e),null==(n=null==e?void 0:e.complete)||n.call(e)},getKycPassportInfo:function(e){const t=window.location.href;gt(g.getKycPassportInfo,!1,e,c(a({},e),{url:t}))},logout:lt,getPaymentSettings:ut,getLoginUrl:dt,markAsReady:_t},vt=["init","setTitle","copyToClipboard","getSessionData","setSessionData","getStorageData","setStorageData","removeStorageData","getLoginUrl"],yt=["renderCoupons"];const Et={version:"2.40.0",revision:"e045550"};return function({sdkType:e}){nt=e;const t=e===E.MiniApp?je:Ve,n=new Proxy(ft,{get(n,s){if(s in Et)return Et[s];const r=s;if(!rt&&!t(r))throw new Error(`${r} is not supported by ${e} JS SDK`);return e=>l(this,null,(function*(){var t,i;if(!vt.includes(r)&&!(yield st)){if(!yt.includes(r)||!e.clientId)return null==(t=e.fail)||t.call(e,{errorCode:x.sdkNotInitialized}),void(null==(i=e.complete)||i.call(e));at({clientId:e.clientId,env:e.env}),yield st}if(Object.prototype.hasOwnProperty.call(n,r))return n[r](e);gt(s,!1,e,e)}))}});return window._pp=n,function(e){const t=window._ppcs;if(t){window._ppcs=void 0;for(const[n,s]of t)e[n](s)}}(n),n}({sdkType:E.MiniApp})}();
@@ -274,7 +274,6 @@ const miniAppSupportedFunctions = [
274
274
  "getKycPassportInfo",
275
275
  "shortcutExists",
276
276
  "addShortcut",
277
- "logAppsFlyerEvent",
278
277
  "getAllUserAddresses",
279
278
  "getUserPaymentFeatureSettings",
280
279
  "getPaymentSettings",
@@ -424,8 +423,8 @@ var MiniAppErrorType = /* @__PURE__ */ ((MiniAppErrorType2) => {
424
423
  MiniAppErrorType2["sdkUpgradeRequired"] = "SDK_UPGRADE_REQUIRED";
425
424
  return MiniAppErrorType2;
426
425
  })(MiniAppErrorType || {});
427
- const JS_SDK_VERSION = "2.39.0";
428
- const REVISION = "c39c952";
426
+ const JS_SDK_VERSION = "2.40.0";
427
+ const REVISION = "e045550";
429
428
  const coreBaseUrl = new URL("https://mini-app-sdk-core.paypay.ne.jp/");
430
429
  const CORE_IFRAME_ORIGIN = coreBaseUrl.origin;
431
430
  const CORE_IFRAME_URL = new URL(
@@ -1750,7 +1749,7 @@ const errorsToIgnore = [
1750
1749
  function sendWindowBridgeErrorToSentry(functionName, message, error) {
1751
1750
  if (!errorsToIgnore.includes(error) && SENTRY_DSN) {
1752
1751
  captureMessage(
1753
- `windowBridge.${functionName} failed. client: ${"unknown"}, error: ${error}, message: ${message}`,
1752
+ `windowBridge.${functionName} failed. error: ${error}, message: ${message}`,
1754
1753
  "log"
1755
1754
  );
1756
1755
  }
@@ -2246,7 +2245,6 @@ const MinVersion = {
2246
2245
  OS_HOME_SCREEN_ICON: "3.71.0",
2247
2246
  START_MULTIFACTOR_AUTH_ANDROID_FIX: "3.67.0",
2248
2247
  KYC_PASSPORT: "3.72.0",
2249
- LOG_APP_FLYER_EVENT: "3.78.0",
2250
2248
  PERFORMANCE_MEASUREMENT: "4.47.0",
2251
2249
  START_MULTIFACTOR_AUTH_PIN_FALLBACK: "4.63.0"
2252
2250
  };
@@ -2271,12 +2269,19 @@ function getLocalStorage({ name }) {
2271
2269
  function removeLocalStorage({ name }) {
2272
2270
  return localStorage.removeItem(name);
2273
2271
  }
2272
+ function removeQueryParametersFromUrl(removeParams) {
2273
+ const url2 = new URL(window.location.href);
2274
+ removeParams.forEach((param) => url2.searchParams.delete(param));
2275
+ const newURL = `${url2.pathname}${url2.search}`;
2276
+ history.replaceState(null, "", newURL);
2277
+ }
2274
2278
  const clientWindowBridgeFunctions = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2275
2279
  __proto__: null,
2276
2280
  getCookie,
2277
2281
  getLocalStorage,
2278
2282
  removeCookie,
2279
2283
  removeLocalStorage,
2284
+ removeQueryParametersFromUrl,
2280
2285
  setCookie,
2281
2286
  setLocalStorage
2282
2287
  }, Symbol.toStringTag, { value: "Module" }));
@@ -2412,29 +2417,20 @@ addEventListener("popstate", () => {
2412
2417
  }).catch((error) => console.warn(error));
2413
2418
  });
2414
2419
  function init(params) {
2415
- const url2 = new URL(window.location.href);
2416
- const token = url2.searchParams.get("token");
2417
- const ott = url2.searchParams.get("one_time_token");
2418
2420
  const refreshToken = getRefreshToken(params.clientId);
2419
2421
  const codeVerifier = getCodeVerifier(params.clientId);
2420
- const clientVersion = "2.39.0";
2422
+ const clientVersion = "2.40.0";
2421
2423
  useAllFunctions = !!params.useAllFunctions;
2422
- if (token || ott) {
2423
- removeTokenFromUrl(url2);
2424
- }
2425
2424
  const initParams = {
2426
2425
  env: params.env,
2427
2426
  mode: params.mode,
2428
2427
  debugMode: params.debugMode,
2429
2428
  clientId: params.clientId,
2430
- token,
2431
- ott,
2432
2429
  refreshToken,
2433
2430
  clientVersion,
2434
2431
  codeVerifier,
2435
2432
  clientSdkType,
2436
2433
  clientUrl: window.location.href
2437
- // OTT already removed
2438
2434
  };
2439
2435
  let initDonePromiseResolve;
2440
2436
  const nextInitDonePromise = new Promise(
@@ -2720,13 +2716,6 @@ function postMessageToCore(messageData) {
2720
2716
  );
2721
2717
  });
2722
2718
  }
2723
- function removeTokenFromUrl(url2) {
2724
- url2.searchParams.delete("token");
2725
- url2.searchParams.delete("one_time_token");
2726
- url2.search = url2.searchParams.toString();
2727
- const newURL = url2.toString().replace(url2.origin, "");
2728
- history.replaceState(null, "", newURL);
2729
- }
2730
2719
  function triggerPostMessageToCore(type, showIframeFlag, params, postMessageParams) {
2731
2720
  const messageId = functionStart();
2732
2721
  if (showIframeFlag) {
@@ -2886,8 +2875,8 @@ function executePendingFunctionCalls(client2) {
2886
2875
  }
2887
2876
  }
2888
2877
  const clientProperties = {
2889
- version: "2.39.0",
2890
- revision: "c39c952"
2878
+ version: "2.40.0",
2879
+ revision: "e045550"
2891
2880
  };
2892
2881
  function getClient({ sdkType }) {
2893
2882
  clientSdkType = sdkType;
package/dist/types.d.ts CHANGED
@@ -344,10 +344,6 @@ export interface ScanCodeParams extends NativeParams<MiniAppResult> {
344
344
  export interface ScanCodeClientParams extends NativeParams<MiniAppResult> {
345
345
  redirectUrlOnCancel?: string;
346
346
  }
347
- export interface LogAppsFlyerEventParams extends NativeParams<void> {
348
- eventName: string;
349
- parameters: Record<string, unknown>;
350
- }
351
347
  export declare const AddShortcutTypes: {
352
348
  readonly FAVORITE: "FAVORITE";
353
349
  readonly OS_HOME_SCREEN_ICON: "OS_HOME_SCREEN_ICON";
@@ -79,6 +79,6 @@ export declare type PPFetchResult<T, E = Record<string, unknown>> = {
79
79
  statusCode: number;
80
80
  body?: null;
81
81
  };
82
- export declare function ppFetch2<T, E = Record<string, unknown>>(options: PPFetchOptions): Promise<PPFetchResult<T, E>>;
83
- export declare function fetchRefreshToken(refreshToken: string, clientId?: string, clientOrigin?: string): Promise<boolean>;
82
+ export declare function ppFetch<T, E = Record<string, unknown>>(options: PPFetchOptions): Promise<PPFetchResult<T, E>>;
83
+ export declare function fetchRefreshToken(refreshToken: string, clientOrigin?: string): Promise<boolean>;
84
84
  export { createHeaderMiniAppApi };
@@ -48,6 +48,7 @@ export declare function semVerCompare(a: string, b: string): boolean;
48
48
  export declare function checkVersion(minVersion: string): boolean;
49
49
  export declare function checkJSSDKVersion(minVersion: string): boolean;
50
50
  export declare function clientStorageFunctionsAreAvailable(): boolean;
51
+ export declare function clientQueryParamRemoval(): boolean;
51
52
  export declare function getPlatformFontSize(): FontSize;
52
53
  export declare function delay(time?: number): Promise<boolean>;
53
54
  export declare const createErrorCode: (errorCode: MiniAppErrorType, jws?: string | null | undefined) => {
@@ -4,7 +4,6 @@ export declare const MinVersion: {
4
4
  OS_HOME_SCREEN_ICON: string;
5
5
  START_MULTIFACTOR_AUTH_ANDROID_FIX: string;
6
6
  KYC_PASSPORT: string;
7
- LOG_APP_FLYER_EVENT: string;
8
7
  PERFORMANCE_MEASUREMENT: string;
9
8
  START_MULTIFACTOR_AUTH_PIN_FALLBACK: string;
10
9
  };
@@ -1,4 +1,5 @@
1
1
  export declare const MinJSSDKVersion: {
2
2
  ORDER_TYPE_REMITTANCE: string;
3
3
  CLIENT_STORAGE_FUNCTIONS: string;
4
+ CLIENT_QUERY_PARAM_REMOVAL: string;
4
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paypay/mini-app-js-sdk",
3
- "version": "2.39.0",
3
+ "version": "2.40.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "build": "yarn build:client && yarn build:core",
@@ -1,2 +0,0 @@
1
- import { LogAppsFlyerEventParams } from '../../types';
2
- export declare function logAppsFlyerEvent(params: LogAppsFlyerEventParams): void;