@bootpay/client-js 5.0.0-beta.8 → 5.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +8458 -0
- package/dist/index.umd.js +1 -0
- package/dist/package.json.d.ts +53 -0
- package/dist/src/bootpay-es5.d.ts +0 -2
- package/dist/src/lib/template/payment.d.ts +0 -1
- package/dist/src/support/alfred-progress/index.d.ts +0 -1
- package/dist/src/support/bootpay-manager.d.ts +2 -2
- package/dist/src/test/index.d.ts +1 -0
- package/dist/src/test/moduleRequire.d.ts +1 -0
- package/dist/style.css +1 -0
- package/dist/test/payment/css/style.css +52 -0
- package/dist/test/payment/ehowlsla.html +92 -0
- package/dist/test/payment/iframe.html +71 -0
- package/dist/test/payment/index.html +285 -0
- package/dist/test/payment/js/development-ehowlsla.js +286 -0
- package/dist/test/payment/js/development.js +971 -0
- package/dist/test/payment/js/widget.js +369 -0
- package/dist/test/payment/widget.html +164 -0
- package/dist/vite.config.d.ts +2 -0
- package/package.json +7 -4
- package/{tsconfig-esnext.json → tsconfig.build.json} +8 -6
- package/vite.config.ts +23 -0
- package/dist/package.json +0 -47
- package/dist/src/bootpay-environment.js +0 -5
- package/dist/src/bootpay-environment.js.map +0 -1
- package/dist/src/bootpay-es5.js +0 -10
- package/dist/src/bootpay-es5.js.map +0 -1
- package/dist/src/bootpay-sdk.js +0 -243
- package/dist/src/bootpay-sdk.js.map +0 -1
- package/dist/src/bootpay-widget.js +0 -83
- package/dist/src/bootpay-widget.js.map +0 -1
- package/dist/src/bootpay.js +0 -319
- package/dist/src/bootpay.js.map +0 -1
- package/dist/src/index.js +0 -33
- package/dist/src/index.js.map +0 -1
- package/dist/src/lib/analytics.js +0 -137
- package/dist/src/lib/analytics.js.map +0 -1
- package/dist/src/lib/bootpay-widget.js +0 -171
- package/dist/src/lib/bootpay-widget.js.map +0 -1
- package/dist/src/lib/bootpay.js +0 -496
- package/dist/src/lib/bootpay.js.map +0 -1
- package/dist/src/lib/event/payment.js +0 -215
- package/dist/src/lib/event/payment.js.map +0 -1
- package/dist/src/lib/event/polling.js +0 -42
- package/dist/src/lib/event/polling.js.map +0 -1
- package/dist/src/lib/event/user-token.js +0 -51
- package/dist/src/lib/event/user-token.js.map +0 -1
- package/dist/src/lib/event/widget.js +0 -90
- package/dist/src/lib/event/widget.js.map +0 -1
- package/dist/src/lib/locale/message.js +0 -110
- package/dist/src/lib/locale/message.js.map +0 -1
- package/dist/src/lib/template/oopay.js +0 -66
- package/dist/src/lib/template/oopay.js.map +0 -1
- package/dist/src/lib/template/payment.js +0 -488
- package/dist/src/lib/template/payment.js.map +0 -1
- package/dist/src/lib/template/user-token.js +0 -281
- package/dist/src/lib/template/user-token.js.map +0 -1
- package/dist/src/lib/template/widget.js +0 -78
- package/dist/src/lib/template/widget.js.map +0 -1
- package/dist/src/models/bootpay-interface.js +0 -3
- package/dist/src/models/bootpay-interface.js.map +0 -1
- package/dist/src/models/bootpay-sdk-interface.js +0 -3
- package/dist/src/models/bootpay-sdk-interface.js.map +0 -1
- package/dist/src/models/bootpay-widget-interface.js +0 -3
- package/dist/src/models/bootpay-widget-interface.js.map +0 -1
- package/dist/src/models/const.js +0 -15
- package/dist/src/models/const.js.map +0 -1
- package/dist/src/support/alfred-progress/index.js +0 -64
- package/dist/src/support/alfred-progress/index.js.map +0 -1
- package/dist/src/support/bootpay-manager.js +0 -39
- package/dist/src/support/bootpay-manager.js.map +0 -1
- package/dist/src/support/environment.js +0 -89
- package/dist/src/support/environment.js.map +0 -1
- package/dist/src/support/event.js +0 -133
- package/dist/src/support/event.js.map +0 -1
- package/dist/src/support/logger.js +0 -130
- package/dist/src/support/logger.js.map +0 -1
- package/dist/src/support/resource.js +0 -125
- package/dist/src/support/resource.js.map +0 -1
- package/dist/src/support/storage.js +0 -191
- package/dist/src/support/storage.js.map +0 -1
- package/dist/src/support/template-manager.js +0 -47
- package/dist/src/support/template-manager.js.map +0 -1
- package/dist/src/support/util.js +0 -36
- package/dist/src/support/util.js.map +0 -1
- package/dist/src/support/widget-store.js +0 -73
- package/dist/src/support/widget-store.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Bootpay={})}(this,(function(e){"use strict";const t={PLATFORM:{JS:1,ANDROID:2,IOS:3,REST:4},STORAGE_PREFIX:e=>`__bootpay_track_${e}__`},r={mode:"production",locale:"ko",isSetLocale:!1,applicationId:"",API_URL:{development:"https://dev-api.bootpay.co.kr/v2",stage:"https://stage-api.bootpay.co.kr/v2",production:"https://api.bootpay.co.kr/v2"},ANALYTICS_URL:{development:"https://dev-analytics.bootpay.co.kr",stage:"https://stage-analytics.bootpay.co.kr",production:"https://analytics.bootpay.co.kr"},DOOR_URL:{development:"https://door-dev.bootpay.co.kr",stage:"https://door-stage.bootpay.co.kr",production:"https://door.bootpay.co.kr"},WIDGET_URL:{development:"https://dev-widget.bootpay.co.kr",stage:"https://stage-widget.bootpay.co.kr",production:"https://widget.bootpay.co.kr"},sdkNames:{android:100,android_react_native:101,android_flutter:102,android_unity:103,ios:200,ios_react_native:201,ios_flutter:202,ios_unity:203,ios_objc:204,ios_swift_ui:205,mac_swift:206,mac_flutter:207},sdkVersion:"",sdkName:0,set(e){this.mode=e},setApplicationId(e){return this.applicationId=e,this.currentApplicationId(void 0)},setLocale(e){this.locale=e,this.isSetLocale=!0},currentApplicationId(e=void 0){return void 0===e?this.applicationId:e},setDevelopmentHost(e){this.API_URL.development=this.API_URL.development.replace(/dev-api.bootpay.co.kr\/v2/gi,e)},setVersion(e,t){this.sdkName=void 0===this.sdkNames[t]?0:this.sdkNames[t],this.sdkVersion=e},toApi(e){return[this.API_URL[this.mode],e].join("/")},toDoor(e){return[this.DOOR_URL[this.mode],e].join("/")},toWidget(e){return[this.WIDGET_URL[this.mode],e].join("/")},isMobile(){const e=window.navigator.userAgent||window.navigator.vendor;return/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/.test(e)},isMobileSafari(){const e=window.navigator.userAgent;return(e.match(/iPad/i)||e.match(/iPhone/i))&&!e.match(/CriOS/i)},toAnalytics(e){return[this.ANALYTICS_URL[this.mode],e].join("/")}},s=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),i=e=>{let t=!1;return t="string"==typeof e||Array.isArray(e)?0===e.length:null==e||o(e,"object")&&e.constructor===Object&&0===Object.keys(e).length,t},n=e=>!i(e),o=(e,t)=>typeof e===t;var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})})),r}var p={exports:{}};var l={exports:{}};const u=d(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var h;function m(){return h||(h=1,function(e,t){var r;e.exports=(r=r||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==a&&a.crypto&&(r=a.crypto),!r)try{r=u}catch(v){}var s=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(v){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(v){}}throw new Error("Native crypto module could not be used to get secure random number.")},i=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),n={},o=n.lib={},c=o.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},d=o.WordArray=c.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,s=this.sigBytes,i=e.sigBytes;if(this.clamp(),s%4)for(var n=0;n<i;n++){var o=r[n>>>2]>>>24-n%4*8&255;t[s+n>>>2]|=o<<24-(s+n)%4*8}else for(var a=0;a<i;a+=4)t[s+a>>>2]=r[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(s());return new d.init(t,e)}}),p=n.enc={},l=p.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,s=[],i=0;i<r;i++){var n=t[i>>>2]>>>24-i%4*8&255;s.push((n>>>4).toString(16)),s.push((15&n).toString(16))}return s.join("")},parse:function(e){for(var t=e.length,r=[],s=0;s<t;s+=2)r[s>>>3]|=parseInt(e.substr(s,2),16)<<24-s%8*4;return new d.init(r,t/2)}},h=p.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,s=[],i=0;i<r;i++){var n=t[i>>>2]>>>24-i%4*8&255;s.push(String.fromCharCode(n))}return s.join("")},parse:function(e){for(var t=e.length,r=[],s=0;s<t;s++)r[s>>>2]|=(255&e.charCodeAt(s))<<24-s%4*8;return new d.init(r,t)}},m=p.Utf8={stringify:function(e){try{return decodeURIComponent(escape(h.stringify(e)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(e){return h.parse(unescape(encodeURIComponent(e)))}},y=o.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=m.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,s=this._data,i=s.words,n=s.sigBytes,o=this.blockSize,a=n/(4*o),c=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*o,p=e.min(4*c,n);if(c){for(var l=0;l<c;l+=o)this._doProcessBlock(i,l);r=i.splice(0,c),s.sigBytes-=p}return new d.init(r,p)},clone:function(){var e=c.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});o.Hasher=y.extend({cfg:c.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){y.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new f.HMAC.init(e,r).finalize(t)}}});var f=n.algo={};return n}(Math),r)}(l)),l.exports}!function(e,t){e.exports=m().enc.Utf8}(p);const y=c(p.exports);var f={exports:{}};!function(e,t){var r;e.exports=(r=m(),function(){var e=r,t=e.lib.WordArray;function s(e,r,s){for(var i=[],n=0,o=0;o<r;o++)if(o%4){var a=s[e.charCodeAt(o-1)]<<o%4*2|s[e.charCodeAt(o)]>>>6-o%4*2;i[n>>>2]|=a<<24-n%4*8,n++}return t.create(i,n)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,s=this._map;e.clamp();for(var i=[],n=0;n<r;n+=3)for(var o=(t[n>>>2]>>>24-n%4*8&255)<<16|(t[n+1>>>2]>>>24-(n+1)%4*8&255)<<8|t[n+2>>>2]>>>24-(n+2)%4*8&255,a=0;a<4&&n+.75*a<r;a++)i.push(s.charAt(o>>>6*(3-a)&63));var c=s.charAt(64);if(c)for(;i.length%4;)i.push(c);return i.join("")},parse:function(e){var t=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var n=0;n<r.length;n++)i[r.charCodeAt(n)]=n}var o=r.charAt(64);if(o){var a=e.indexOf(o);-1!==a&&(t=a)}return s(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),r.enc.Base64)}(f);var v=f.exports;const g=c(v);class _{$blank(e){return i(e)}$present(e){return!this.$blank(e)}$type(e,t){return o(e,t)}$uuid(){return s()}$encrypt(e){return this.$type(e,"object")&&(e=JSON.stringify(e)),g.stringify(y.parse(e))}$decrypt(e){return y.stringify(g.parse(e))}getUserAgent(){return window.navigator.userAgent}}var w,b={exports:{}},$=function(e,t){return function(){for(var r=new Array(arguments.length),s=0;s<r.length;s++)r[s]=arguments[s];return e.apply(t,r)}},E=$,P=Object.prototype.toString,k=(w=Object.create(null),function(e){var t=P.call(e);return w[t]||(w[t]=t.slice(8,-1).toLowerCase())});function I(e){return e=e.toLowerCase(),function(t){return k(t)===e}}function T(e){return Array.isArray(e)}function S(e){return void 0===e}var x=I("ArrayBuffer");function O(e){return null!==e&&"object"==typeof e}function A(e){if("object"!==k(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var R=I("Date"),U=I("File"),D=I("Blob"),B=I("FileList");function C(e){return"[object Function]"===P.call(e)}var N=I("URLSearchParams");function M(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),T(e))for(var r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var F,j=(F="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return F&&e instanceof F}),L={isArray:T,isArrayBuffer:x,isBuffer:function(e){return null!==e&&!S(e)&&null!==e.constructor&&!S(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||P.call(e)===t||C(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&x(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:O,isPlainObject:A,isUndefined:S,isDate:R,isFile:U,isBlob:D,isFunction:C,isStream:function(e){return O(e)&&C(e.pipe)},isURLSearchParams:N,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:M,merge:function e(){var t={};function r(r,s){A(t[s])&&A(r)?t[s]=e(t[s],r):A(r)?t[s]=e({},r):T(r)?t[s]=r.slice():t[s]=r}for(var s=0,i=arguments.length;s<i;s++)M(arguments[s],r);return t},extend:function(e,t,r){return M(t,(function(t,s){e[s]=r&&"function"==typeof t?E(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,s){e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r){var s,i,n,o={};t=t||{};do{for(i=(s=Object.getOwnPropertyNames(e)).length;i-- >0;)o[n=s[i]]||(t[n]=e[n],o[n]=!0);e=Object.getPrototypeOf(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:k,kindOfTest:I,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var s=e.indexOf(t,r);return-1!==s&&s===r},toArray:function(e){if(!e)return null;var t=e.length;if(S(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},isTypedArray:j,isFileList:B},W=L;function H(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var q=function(e,t,r){if(!t)return e;var s;if(r)s=r(t);else if(W.isURLSearchParams(t))s=t.toString();else{var i=[];W.forEach(t,(function(e,t){null!=e&&(W.isArray(e)?t+="[]":e=[e],W.forEach(e,(function(e){W.isDate(e)?e=e.toISOString():W.isObject(e)&&(e=JSON.stringify(e)),i.push(H(t)+"="+H(e))})))})),s=i.join("&")}if(s){var n=e.indexOf("#");-1!==n&&(e=e.slice(0,n)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e},z=L;function K(){this.handlers=[]}K.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},K.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},K.prototype.forEach=function(e){z.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var J=K,V=L,Y=L;function G(e,t,r,s,i){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),s&&(this.request=s),i&&(this.response=i)}Y.inherits(G,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var X=G.prototype,Q={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){Q[e]={value:e}})),Object.defineProperties(G,Q),Object.defineProperty(X,"isAxiosError",{value:!0}),G.from=function(e,t,r,s,i,n){var o=Object.create(X);return Y.toFlatObject(e,o,(function(e){return e!==Error.prototype})),G.call(o,e.message,t,r,s,i),o.name=e.name,n&&Object.assign(o,n),o};var Z=G,ee={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},te=L;var re,se,ie,ne,oe=function(e,t){t=t||new FormData;var r=[];function s(e){return null===e?"":te.isDate(e)?e.toISOString():te.isArrayBuffer(e)||te.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(i,n){if(te.isPlainObject(i)||te.isArray(i)){if(-1!==r.indexOf(i))throw Error("Circular reference detected in "+n);r.push(i),te.forEach(i,(function(r,i){if(!te.isUndefined(r)){var o,a=n?n+"."+i:i;if(r&&!n&&"object"==typeof r)if(te.endsWith(i,"{}"))r=JSON.stringify(r);else if(te.endsWith(i,"[]")&&(o=te.toArray(r)))return void o.forEach((function(e){!te.isUndefined(e)&&t.append(a,s(e))}));e(r,a)}})),r.pop()}else t.append(n,s(i))}(e),t};function ae(){if(se)return re;se=1;var e=Z;return re=function(t,r,s){var i=s.config.validateStatus;s.status&&i&&!i(s.status)?r(new e("Request failed with status code "+s.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s)):t(s)}}function ce(){if(ne)return ie;ne=1;var e=L;return ie=e.isStandardBrowserEnv()?{write:function(t,r,s,i,n,o){var a=[];a.push(t+"="+encodeURIComponent(r)),e.isNumber(s)&&a.push("expires="+new Date(s).toGMTString()),e.isString(i)&&a.push("path="+i),e.isString(n)&&a.push("domain="+n),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},ie}var de,pe,le,ue,he,me,ye,fe,ve,ge,_e,we,be=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},$e=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},Ee=function(e,t){return e&&!be(t)?$e(e,t):t};function Pe(){if(pe)return de;pe=1;var e=L,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return de=function(r){var s,i,n,o={};return r?(e.forEach(r.split("\n"),(function(r){if(n=r.indexOf(":"),s=e.trim(r.substr(0,n)).toLowerCase(),i=e.trim(r.substr(n+1)),s){if(o[s]&&t.indexOf(s)>=0)return;o[s]="set-cookie"===s?(o[s]?o[s]:[]).concat([i]):o[s]?o[s]+", "+i:i}})),o):o}}function ke(){if(ue)return le;ue=1;var e=L;return le=e.isStandardBrowserEnv()?function(){var t,r=/(msie|trident)/i.test(navigator.userAgent),s=document.createElement("a");function i(e){var t=e;return r&&(s.setAttribute("href",t),t=s.href),s.setAttribute("href",t),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:s.port,pathname:"/"===s.pathname.charAt(0)?s.pathname:"/"+s.pathname}}return t=i(window.location.href),function(r){var s=e.isString(r)?i(r):r;return s.protocol===t.protocol&&s.host===t.host}}():function(){return!0}}function Ie(){if(me)return he;me=1;var e=Z;function t(t){e.call(this,null==t?"canceled":t,e.ERR_CANCELED),this.name="CanceledError"}return L.inherits(t,e,{__CANCEL__:!0}),he=t}function Te(){return fe?ye:(fe=1,ye=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""})}function Se(){if(ge)return ve;ge=1;var e=L,t=ae(),r=ce(),s=q,i=Ee,n=Pe(),o=ke(),a=ee,c=Z,d=Ie(),p=Te();return ve=function(l){return new Promise((function(u,h){var m,y=l.data,f=l.headers,v=l.responseType;function g(){l.cancelToken&&l.cancelToken.unsubscribe(m),l.signal&&l.signal.removeEventListener("abort",m)}e.isFormData(y)&&e.isStandardBrowserEnv()&&delete f["Content-Type"];var _=new XMLHttpRequest;if(l.auth){var w=l.auth.username||"",b=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";f.Authorization="Basic "+btoa(w+":"+b)}var $=i(l.baseURL,l.url);function E(){if(_){var e="getAllResponseHeaders"in _?n(_.getAllResponseHeaders()):null,r={data:v&&"text"!==v&&"json"!==v?_.response:_.responseText,status:_.status,statusText:_.statusText,headers:e,config:l,request:_};t((function(e){u(e),g()}),(function(e){h(e),g()}),r),_=null}}if(_.open(l.method.toUpperCase(),s($,l.params,l.paramsSerializer),!0),_.timeout=l.timeout,"onloadend"in _?_.onloadend=E:_.onreadystatechange=function(){_&&4===_.readyState&&(0!==_.status||_.responseURL&&0===_.responseURL.indexOf("file:"))&&setTimeout(E)},_.onabort=function(){_&&(h(new c("Request aborted",c.ECONNABORTED,l,_)),_=null)},_.onerror=function(){h(new c("Network Error",c.ERR_NETWORK,l,_,_)),_=null},_.ontimeout=function(){var e=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded",t=l.transitional||a;l.timeoutErrorMessage&&(e=l.timeoutErrorMessage),h(new c(e,t.clarifyTimeoutError?c.ETIMEDOUT:c.ECONNABORTED,l,_)),_=null},e.isStandardBrowserEnv()){var P=(l.withCredentials||o($))&&l.xsrfCookieName?r.read(l.xsrfCookieName):void 0;P&&(f[l.xsrfHeaderName]=P)}"setRequestHeader"in _&&e.forEach(f,(function(e,t){void 0===y&&"content-type"===t.toLowerCase()?delete f[t]:_.setRequestHeader(t,e)})),e.isUndefined(l.withCredentials)||(_.withCredentials=!!l.withCredentials),v&&"json"!==v&&(_.responseType=l.responseType),"function"==typeof l.onDownloadProgress&&_.addEventListener("progress",l.onDownloadProgress),"function"==typeof l.onUploadProgress&&_.upload&&_.upload.addEventListener("progress",l.onUploadProgress),(l.cancelToken||l.signal)&&(m=function(e){_&&(h(!e||e&&e.type?new d:e),_.abort(),_=null)},l.cancelToken&&l.cancelToken.subscribe(m),l.signal&&(l.signal.aborted?m():l.signal.addEventListener("abort",m))),y||(y=null);var k=p($);k&&-1===["http","https","file"].indexOf(k)?h(new c("Unsupported protocol "+k+":",c.ERR_BAD_REQUEST,l)):_.send(y)}))},ve}var xe=L,Oe=function(e,t){V.forEach(e,(function(r,s){s!==t&&s.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[s])}))},Ae=Z,Re=oe,Ue={"Content-Type":"application/x-www-form-urlencoded"};function De(e,t){!xe.isUndefined(e)&&xe.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var Be,Ce={transitional:ee,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(Be=Se()),Be),transformRequest:[function(e,t){if(Oe(t,"Accept"),Oe(t,"Content-Type"),xe.isFormData(e)||xe.isArrayBuffer(e)||xe.isBuffer(e)||xe.isStream(e)||xe.isFile(e)||xe.isBlob(e))return e;if(xe.isArrayBufferView(e))return e.buffer;if(xe.isURLSearchParams(e))return De(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var r,s=xe.isObject(e),i=t&&t["Content-Type"];if((r=xe.isFileList(e))||s&&"multipart/form-data"===i){var n=this.env&&this.env.FormData;return Re(r?{"files[]":e}:e,n&&new n)}return s||"application/json"===i?(De(t,"application/json"),function(e,t,r){if(xe.isString(e))try{return(t||JSON.parse)(e),xe.trim(e)}catch(s){if("SyntaxError"!==s.name)throw s}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Ce.transitional,r=t&&t.silentJSONParsing,s=t&&t.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||s&&xe.isString(e)&&e.length)try{return JSON.parse(e)}catch(n){if(i){if("SyntaxError"===n.name)throw Ae.from(n,Ae.ERR_BAD_RESPONSE,this,null,this.response);throw n}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:we?_e:(we=1,_e=null)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};xe.forEach(["delete","get","head"],(function(e){Ce.headers[e]={}})),xe.forEach(["post","put","patch"],(function(e){Ce.headers[e]=xe.merge(Ue)}));var Ne,Me,Fe=Ce,je=L,Le=Fe;function We(){return Me?Ne:(Me=1,Ne=function(e){return!(!e||!e.__CANCEL__)})}var He=L,qe=function(e,t,r){var s=this||Le;return je.forEach(r,(function(r){e=r.call(s,e,t)})),e},ze=We(),Ke=Fe,Je=Ie();function Ve(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Je}var Ye,Ge,Xe=L,Qe=function(e,t){t=t||{};var r={};function s(e,t){return Xe.isPlainObject(e)&&Xe.isPlainObject(t)?Xe.merge(e,t):Xe.isPlainObject(t)?Xe.merge({},t):Xe.isArray(t)?t.slice():t}function i(r){return Xe.isUndefined(t[r])?Xe.isUndefined(e[r])?void 0:s(void 0,e[r]):s(e[r],t[r])}function n(e){if(!Xe.isUndefined(t[e]))return s(void 0,t[e])}function o(r){return Xe.isUndefined(t[r])?Xe.isUndefined(e[r])?void 0:s(void 0,e[r]):s(void 0,t[r])}function a(r){return r in t?s(e[r],t[r]):r in e?s(void 0,e[r]):void 0}var c={url:n,method:n,data:n,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a};return Xe.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||i,s=t(e);Xe.isUndefined(s)&&t!==a||(r[e]=s)})),r};function Ze(){return Ge?Ye:(Ge=1,Ye={version:"0.27.2"})}var et=Ze().version,tt=Z,rt={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){rt[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var st={};rt.transitional=function(e,t,r){function s(e,t){return"[Axios v"+et+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,i,n){if(!1===e)throw new tt(s(i," has been removed"+(t?" in "+t:"")),tt.ERR_DEPRECATED);return t&&!st[i]&&(st[i]=!0,console.warn(s(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,n)}};var it,nt,ot,at,ct,dt,pt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new tt("options must be an object",tt.ERR_BAD_OPTION_VALUE);for(var s=Object.keys(e),i=s.length;i-- >0;){var n=s[i],o=t[n];if(o){var a=e[n],c=void 0===a||o(a,n,e);if(!0!==c)throw new tt("option "+n+" must be "+c,tt.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new tt("Unknown option "+n,tt.ERR_BAD_OPTION)}},validators:rt},lt=L,ut=q,ht=J,mt=function(e){return Ve(e),e.headers=e.headers||{},e.data=qe.call(e,e.data,e.headers,e.transformRequest),e.headers=He.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),He.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||Ke.adapter)(e).then((function(t){return Ve(e),t.data=qe.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return ze(t)||(Ve(e),t&&t.response&&(t.response.data=qe.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},yt=Qe,ft=Ee,vt=pt,gt=vt.validators;function _t(e){this.defaults=e,this.interceptors={request:new ht,response:new ht}}_t.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=yt(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&vt.assertOptions(r,{silentJSONParsing:gt.transitional(gt.boolean),forcedJSONParsing:gt.transitional(gt.boolean),clarifyTimeoutError:gt.transitional(gt.boolean)},!1);var s=[],i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));var n,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!i){var a=[mt,void 0];for(Array.prototype.unshift.apply(a,s),a=a.concat(o),n=Promise.resolve(t);a.length;)n=n.then(a.shift(),a.shift());return n}for(var c=t;s.length;){var d=s.shift(),p=s.shift();try{c=d(c)}catch(l){p(l);break}}try{n=mt(c)}catch(l){return Promise.reject(l)}for(;o.length;)n=n.then(o.shift(),o.shift());return n},_t.prototype.getUri=function(e){e=yt(this.defaults,e);var t=ft(e.baseURL,e.url);return ut(t,e.params,e.paramsSerializer)},lt.forEach(["delete","get","head","options"],(function(e){_t.prototype[e]=function(t,r){return this.request(yt(r||{},{method:e,url:t,data:(r||{}).data}))}})),lt.forEach(["post","put","patch"],(function(e){function t(t){return function(r,s,i){return this.request(yt(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:s}))}}_t.prototype[e]=t(),_t.prototype[e+"Form"]=t(!0)}));var wt=L,bt=$,$t=_t,Et=Qe;var Pt=function e(t){var r=new $t(t),s=bt($t.prototype.request,r);return wt.extend(s,$t.prototype,r),wt.extend(s,r),s.create=function(r){return e(Et(t,r))},s}(Fe);Pt.Axios=$t,Pt.CanceledError=Ie(),Pt.CancelToken=function(){if(nt)return it;nt=1;var e=Ie();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var r;this.promise=new Promise((function(e){r=e}));var s=this;this.promise.then((function(e){if(s._listeners){var t,r=s._listeners.length;for(t=0;t<r;t++)s._listeners[t](e);s._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){s.subscribe(e),t=e})).then(e);return r.cancel=function(){s.unsubscribe(t)},r},t((function(t){s.reason||(s.reason=new e(t),r(s.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},t.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},t.source=function(){var e;return{token:new t((function(t){e=t})),cancel:e}},it=t}(),Pt.isCancel=We(),Pt.VERSION=Ze().version,Pt.toFormData=oe,Pt.AxiosError=Z,Pt.Cancel=Pt.CanceledError,Pt.all=function(e){return Promise.all(e)},Pt.spread=at?ot:(at=1,ot=function(e){return function(t){return e.apply(null,t)}}),Pt.isAxiosError=function(){if(dt)return ct;dt=1;var e=L;return ct=function(t){return e.isObject(t)&&!0===t.isAxiosError}}(),b.exports=Pt,b.exports.default=Pt;const kt=c(b.exports);var It,Tt={exports:{}},St={exports:{}};function xt(){return It||(It=1,function(e,t){var r;e.exports=(r=m(),function(e){var t=r,s=t.lib,i=s.WordArray,n=s.Hasher,o=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var c=o.MD5=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var r=0;r<16;r++){var s=t+r,i=e[s];e[s]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var n=this._hash.words,o=e[t+0],c=e[t+1],h=e[t+2],m=e[t+3],y=e[t+4],f=e[t+5],v=e[t+6],g=e[t+7],_=e[t+8],w=e[t+9],b=e[t+10],$=e[t+11],E=e[t+12],P=e[t+13],k=e[t+14],I=e[t+15],T=n[0],S=n[1],x=n[2],O=n[3];T=d(T,S,x,O,o,7,a[0]),O=d(O,T,S,x,c,12,a[1]),x=d(x,O,T,S,h,17,a[2]),S=d(S,x,O,T,m,22,a[3]),T=d(T,S,x,O,y,7,a[4]),O=d(O,T,S,x,f,12,a[5]),x=d(x,O,T,S,v,17,a[6]),S=d(S,x,O,T,g,22,a[7]),T=d(T,S,x,O,_,7,a[8]),O=d(O,T,S,x,w,12,a[9]),x=d(x,O,T,S,b,17,a[10]),S=d(S,x,O,T,$,22,a[11]),T=d(T,S,x,O,E,7,a[12]),O=d(O,T,S,x,P,12,a[13]),x=d(x,O,T,S,k,17,a[14]),T=p(T,S=d(S,x,O,T,I,22,a[15]),x,O,c,5,a[16]),O=p(O,T,S,x,v,9,a[17]),x=p(x,O,T,S,$,14,a[18]),S=p(S,x,O,T,o,20,a[19]),T=p(T,S,x,O,f,5,a[20]),O=p(O,T,S,x,b,9,a[21]),x=p(x,O,T,S,I,14,a[22]),S=p(S,x,O,T,y,20,a[23]),T=p(T,S,x,O,w,5,a[24]),O=p(O,T,S,x,k,9,a[25]),x=p(x,O,T,S,m,14,a[26]),S=p(S,x,O,T,_,20,a[27]),T=p(T,S,x,O,P,5,a[28]),O=p(O,T,S,x,h,9,a[29]),x=p(x,O,T,S,g,14,a[30]),T=l(T,S=p(S,x,O,T,E,20,a[31]),x,O,f,4,a[32]),O=l(O,T,S,x,_,11,a[33]),x=l(x,O,T,S,$,16,a[34]),S=l(S,x,O,T,k,23,a[35]),T=l(T,S,x,O,c,4,a[36]),O=l(O,T,S,x,y,11,a[37]),x=l(x,O,T,S,g,16,a[38]),S=l(S,x,O,T,b,23,a[39]),T=l(T,S,x,O,P,4,a[40]),O=l(O,T,S,x,o,11,a[41]),x=l(x,O,T,S,m,16,a[42]),S=l(S,x,O,T,v,23,a[43]),T=l(T,S,x,O,w,4,a[44]),O=l(O,T,S,x,E,11,a[45]),x=l(x,O,T,S,I,16,a[46]),T=u(T,S=l(S,x,O,T,h,23,a[47]),x,O,o,6,a[48]),O=u(O,T,S,x,g,10,a[49]),x=u(x,O,T,S,k,15,a[50]),S=u(S,x,O,T,f,21,a[51]),T=u(T,S,x,O,E,6,a[52]),O=u(O,T,S,x,m,10,a[53]),x=u(x,O,T,S,b,15,a[54]),S=u(S,x,O,T,c,21,a[55]),T=u(T,S,x,O,_,6,a[56]),O=u(O,T,S,x,I,10,a[57]),x=u(x,O,T,S,v,15,a[58]),S=u(S,x,O,T,P,21,a[59]),T=u(T,S,x,O,y,6,a[60]),O=u(O,T,S,x,$,10,a[61]),x=u(x,O,T,S,h,15,a[62]),S=u(S,x,O,T,w,21,a[63]),n[0]=n[0]+T|0,n[1]=n[1]+S|0,n[2]=n[2]+x|0,n[3]=n[3]+O|0},_doFinalize:function(){var t=this._data,r=t.words,s=8*this._nDataBytes,i=8*t.sigBytes;r[i>>>5]|=128<<24-i%32;var n=e.floor(s/4294967296),o=s;r[15+(i+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),r[14+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t.sigBytes=4*(r.length+1),this._process();for(var a=this._hash,c=a.words,d=0;d<4;d++){var p=c[d];c[d]=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8)}return a},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,r,s,i,n,o){var a=e+(t&r|~t&s)+i+o;return(a<<n|a>>>32-n)+t}function p(e,t,r,s,i,n,o){var a=e+(t&s|r&~s)+i+o;return(a<<n|a>>>32-n)+t}function l(e,t,r,s,i,n,o){var a=e+(t^r^s)+i+o;return(a<<n|a>>>32-n)+t}function u(e,t,r,s,i,n,o){var a=e+(r^(t|~s))+i+o;return(a<<n|a>>>32-n)+t}t.MD5=n._createHelper(c),t.HmacMD5=n._createHmacHelper(c)}(Math),r.MD5)}(St)),St.exports}var Ot,At={exports:{}},Rt={exports:{}};function Ut(){return Ot||(Ot=1,function(e,t){var r,s,i,n,o,a,c,d;e.exports=(d=m(),s=(r=d).lib,i=s.WordArray,n=s.Hasher,o=r.algo,a=[],c=o.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,s=r[0],i=r[1],n=r[2],o=r[3],c=r[4],d=0;d<80;d++){if(d<16)a[d]=0|e[t+d];else{var p=a[d-3]^a[d-8]^a[d-14]^a[d-16];a[d]=p<<1|p>>>31}var l=(s<<5|s>>>27)+c+a[d];l+=d<20?1518500249+(i&n|~i&o):d<40?1859775393+(i^n^o):d<60?(i&n|i&o|n&o)-1894007588:(i^n^o)-899497514,c=o,o=n,n=i<<30|i>>>2,i=s,s=l}r[0]=r[0]+s|0,r[1]=r[1]+i|0,r[2]=r[2]+n|0,r[3]=r[3]+o|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,s=8*e.sigBytes;return t[s>>>5]|=128<<24-s%32,t[14+(s+64>>>9<<4)]=Math.floor(r/4294967296),t[15+(s+64>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}}),r.SHA1=n._createHelper(c),r.HmacSHA1=n._createHmacHelper(c),d.SHA1)}(Rt)),Rt.exports}var Dt,Bt,Ct={exports:{}};function Nt(){return Bt||(Bt=1,function(e,t){var r,s,i,n,o,a,c,d;e.exports=(d=m(),Ut(),Dt||(Dt=1,function(e,t){var r,s,i;e.exports=(s=(r=m()).lib.Base,i=r.enc.Utf8,void(r.algo.HMAC=s.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=i.parse(t));var r=e.blockSize,s=4*r;t.sigBytes>s&&(t=e.finalize(t)),t.clamp();for(var n=this._oKey=t.clone(),o=this._iKey=t.clone(),a=n.words,c=o.words,d=0;d<r;d++)a[d]^=1549556828,c[d]^=909522486;n.sigBytes=o.sigBytes=s,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(r))}})))}(Ct)),Ct.exports,s=(r=d).lib,i=s.Base,n=s.WordArray,o=r.algo,a=o.MD5,c=o.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var r,s=this.cfg,i=s.hasher.create(),o=n.create(),a=o.words,c=s.keySize,d=s.iterations;a.length<c;){r&&i.update(r),r=i.update(e).finalize(t),i.reset();for(var p=1;p<d;p++)r=i.finalize(r),i.reset();o.concat(r)}return o.sigBytes=4*c,o}}),r.EvpKDF=function(e,t,r){return c.create(r).compute(e,t)},d.EvpKDF)}(At)),At.exports}var Mt,Ft={exports:{}};!function(e,t){var r;e.exports=(r=m(),xt(),Nt(),Mt||(Mt=1,function(e,t){var r;e.exports=(r=m(),Nt(),void(r.lib.Cipher||function(e){var t=r,s=t.lib,i=s.Base,n=s.WordArray,o=s.BufferedBlockAlgorithm,a=t.enc;a.Utf8;var c=a.Base64,d=t.algo.EvpKDF,p=s.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,r){this.cfg=this.cfg.extend(r),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?_:v}return function(t){return{encrypt:function(r,s,i){return e(s).encrypt(t,r,s,i)},decrypt:function(r,s,i){return e(s).decrypt(t,r,s,i)}}}}()});s.StreamCipher=p.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l=t.mode={},u=s.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=l.CBC=function(){var t=u.extend();function r(t,r,s){var i,n=this._iv;n?(i=n,this._iv=e):i=this._prevBlock;for(var o=0;o<s;o++)t[r+o]^=i[o]}return t.Encryptor=t.extend({processBlock:function(e,t){var s=this._cipher,i=s.blockSize;r.call(this,e,t,i),s.encryptBlock(e,t),this._prevBlock=e.slice(t,t+i)}}),t.Decryptor=t.extend({processBlock:function(e,t){var s=this._cipher,i=s.blockSize,n=e.slice(t,t+i);s.decryptBlock(e,t),r.call(this,e,t,i),this._prevBlock=n}}),t}(),m=(t.pad={}).Pkcs7={pad:function(e,t){for(var r=4*t,s=r-e.sigBytes%r,i=s<<24|s<<16|s<<8|s,o=[],a=0;a<s;a+=4)o.push(i);var c=n.create(o,s);e.concat(c)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}};s.BlockCipher=p.extend({cfg:p.cfg.extend({mode:h,padding:m}),reset:function(){var e;p.reset.call(this);var t=this.cfg,r=t.iv,s=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=s.createEncryptor:(e=s.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,r&&r.words):(this._mode=e.call(s,this,r&&r.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4});var y=s.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),f=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,r=e.salt;return(r?n.create([1398893684,1701076831]).concat(r).concat(t):t).toString(c)},parse:function(e){var t,r=c.parse(e),s=r.words;return 1398893684==s[0]&&1701076831==s[1]&&(t=n.create(s.slice(2,4)),s.splice(0,4),r.sigBytes-=16),y.create({ciphertext:r,salt:t})}},v=s.SerializableCipher=i.extend({cfg:i.extend({format:f}),encrypt:function(e,t,r,s){s=this.cfg.extend(s);var i=e.createEncryptor(r,s),n=i.finalize(t),o=i.cfg;return y.create({ciphertext:n,key:r,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:s.format})},decrypt:function(e,t,r,s){return s=this.cfg.extend(s),t=this._parse(t,s.format),e.createDecryptor(r,s).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),g=(t.kdf={}).OpenSSL={execute:function(e,t,r,s){s||(s=n.random(8));var i=d.create({keySize:t+r}).compute(e,s),o=n.create(i.words.slice(t),4*r);return i.sigBytes=4*t,y.create({key:i,iv:o,salt:s})}},_=s.PasswordBasedCipher=v.extend({cfg:v.cfg.extend({kdf:g}),encrypt:function(e,t,r,s){var i=(s=this.cfg.extend(s)).kdf.execute(r,e.keySize,e.ivSize);s.iv=i.iv;var n=v.encrypt.call(this,e,t,i.key,s);return n.mixIn(i),n},decrypt:function(e,t,r,s){s=this.cfg.extend(s),t=this._parse(t,s.format);var i=s.kdf.execute(r,e.keySize,e.ivSize,t.salt);return s.iv=i.iv,v.decrypt.call(this,e,t,i.key,s)}})}()))}(Ft)),function(){var e=r,t=e.lib.BlockCipher,s=e.algo,i=[],n=[],o=[],a=[],c=[],d=[],p=[],l=[],u=[],h=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,s=0;for(t=0;t<256;t++){var m=s^s<<1^s<<2^s<<3^s<<4;m=m>>>8^255&m^99,i[r]=m,n[m]=r;var y=e[r],f=e[y],v=e[f],g=257*e[m]^16843008*m;o[r]=g<<24|g>>>8,a[r]=g<<16|g>>>16,c[r]=g<<8|g>>>24,d[r]=g,g=16843009*v^65537*f^257*y^16843008*r,p[m]=g<<24|g>>>8,l[m]=g<<16|g>>>16,u[m]=g<<8|g>>>24,h[m]=g,r?(r=y^e[e[e[v^y]]],s^=e[e[s]]):r=s=1}}();var m=[0,1,2,4,8,16,32,64,128,27,54],y=s.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,s=4*((this._nRounds=r+6)+1),n=this._keySchedule=[],o=0;o<s;o++)o<r?n[o]=t[o]:(d=n[o-1],o%r?r>6&&o%r==4&&(d=i[d>>>24]<<24|i[d>>>16&255]<<16|i[d>>>8&255]<<8|i[255&d]):(d=i[(d=d<<8|d>>>24)>>>24]<<24|i[d>>>16&255]<<16|i[d>>>8&255]<<8|i[255&d],d^=m[o/r|0]<<24),n[o]=n[o-r]^d);for(var a=this._invKeySchedule=[],c=0;c<s;c++){if(o=s-c,c%4)var d=n[o];else d=n[o-4];a[c]=c<4||o<=4?d:p[i[d>>>24]]^l[i[d>>>16&255]]^u[i[d>>>8&255]]^h[i[255&d]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,a,c,d,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,p,l,u,h,n),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,s,i,n,o,a){for(var c=this._nRounds,d=e[t]^r[0],p=e[t+1]^r[1],l=e[t+2]^r[2],u=e[t+3]^r[3],h=4,m=1;m<c;m++){var y=s[d>>>24]^i[p>>>16&255]^n[l>>>8&255]^o[255&u]^r[h++],f=s[p>>>24]^i[l>>>16&255]^n[u>>>8&255]^o[255&d]^r[h++],v=s[l>>>24]^i[u>>>16&255]^n[d>>>8&255]^o[255&p]^r[h++],g=s[u>>>24]^i[d>>>16&255]^n[p>>>8&255]^o[255&l]^r[h++];d=y,p=f,l=v,u=g}y=(a[d>>>24]<<24|a[p>>>16&255]<<16|a[l>>>8&255]<<8|a[255&u])^r[h++],f=(a[p>>>24]<<24|a[l>>>16&255]<<16|a[u>>>8&255]<<8|a[255&d])^r[h++],v=(a[l>>>24]<<24|a[u>>>16&255]<<16|a[d>>>8&255]<<8|a[255&p])^r[h++],g=(a[u>>>24]<<24|a[d>>>16&255]<<16|a[p>>>8&255]<<8|a[255&l])^r[h++],e[t]=y,e[t+1]=f,e[t+2]=v,e[t+3]=g},keySize:8});e.AES=t._createHelper(y)}(),r.AES)}(Tt);const jt=c(Tt.exports);class Lt{constructor(){this.$http=kt.create({timeout:6e4})}static encryptParams(e){o(e,"object")&&(e=JSON.stringify(e));let t=jt.encrypt(e,s());return{payload:t.ciphertext.toString(g),token:`${t.key.toString(g)}##${t.iv.toString(g)}`}}static toUnderscore(e){return e.split(/(?=[A-Z])/).join("_").toLowerCase()}static toCamelcase(e){return e.replace(/(\_[a-z])/g,(function(e){return e.toUpperCase().replace(/_/g,"")}))}static objectKeyToUnderscore(e){let t;return n(e)&&(Array.isArray(e)?(t=[],e.forEach((e=>{let r={};Object.keys(e).forEach((t=>{r[this.toUnderscore(t)]=e[t]})),t.push(r)}))):(t={},Object.keys(e).forEach((r=>{t[this.toUnderscore(r)]=e[r]})))),t}static objectKeyToCamel(e){let t;return n(e)&&(Array.isArray(e)?(t=[],e.forEach((e=>{let r={};Object.keys(e).forEach((t=>{r[this.toCamelcase(t)]=e[t]})),t.push(r)}))):(t={},Object.keys(e).forEach((r=>{o(e[r],"object")&&Object.keys(e[r]).length>0?t[this.toCamelcase(r)]=this.objectKeyToCamel(e[r]):t[this.toCamelcase(r)]=e[r]})))),t}static axiosMultipayConfigure(){kt.defaults.headers.common["Content-Type"]="application/json",kt.defaults.headers.common.Accept="application/json",kt.interceptors.request.use((e=>(n(e.data),this.isHttpBodyUsedMethod(e.method)&&(e.data=Lt.encryptParams(Lt.objectKeyToUnderscore(e.data))),void 0!==e.headers&&n(e.headers.progress)&&delete e.headers.progress,e)),(e=>Promise.reject(e))),kt.interceptors.response.use((e=>e),(function(e){if(n(e.response)){let t=e.response.data;return t.status=e.response.status,Promise.reject(t)}return Promise.reject(e)}))}static isHttpBodyUsedMethod(e){return["post","put"].indexOf(e)>-1}}Lt.axiosMultipayConfigure();const Wt="5.0.0-beta.9",Ht=1,qt=2,zt=3,Kt=4,Jt={level:zt,setLogLevel(e){this.level=e},messageStringify(e,t){try{return`${e}: ${o(t,"object")?JSON.stringify(t):t}`}catch(r){console.error(`log parse error: ${r}`)}},debug(e,t){this.level<=Ht&&console.log(this.messageStringify(e,t))},info(e,t){this.level<=qt&&console.info(this.messageStringify(e,t))},warn(e,t){this.level<=zt&&console.warn(this.messageStringify(e,t))},error(e,t){this.level<=Kt&&console.error(this.messageStringify(e,t))}};const Vt=new class extends Lt{constructor(){super(),this.$session=Gt,this.$applicationId=void 0,this.$tk=void 0,this.$platformType=1,this.$receiptId=void 0}setTokenKey(e){this.$tk=e}setReceiptId(e){this.$receiptId=e}clearInstance(){this.$applicationId=void 0,this.$receiptId=void 0}send(e){try{if(n(this.$applicationId))return e.application_id=this.$applicationId,e.status=n(e.status)?e.status:1,e.version=Wt,e.tk=this.$tk,Jt.debug("send event",`${JSON.stringify(e)} 전송됨`),this.$http.post(r.toAnalytics("event"),e)}catch(t){return}}sendError(e){e.status=-1,this.send(e)}setApplicationId(e){this.$applicationId=e}sendCloseEvent(){if(!n(this.$receiptId))return Jt.debug("receipt_id","undefined receipt_id"),Promise.resolve();try{return this.$http.put(r.toApi(`close/${this.$receiptId}`))}catch(e){return Promise.reject(e)}}};class Yt extends _{constructor(){super(),this.$storage={}}get(e){let t="";try{t=window.localStorage.getItem(e)}catch(r){t=this.$storage[e]}return this.$present(t)?this.$decrypt(t):void 0}set(e,t){try{window.localStorage.setItem(e,this.$encrypt(t))}catch(r){this.$storage[e]=this.$encrypt(t)}return t}currentUserUUID(){const e=t.STORAGE_PREFIX("uuid"),r=this.get(e);return this.$blank(r)?this.set(e,this.$uuid()):r}setUUID(e){const r=t.STORAGE_PREFIX("uuid");return this.set(r,e)}getToJSON(e){const t=this.get(e);return this.$present(t)?this.caseMarshalToJson(t):t}setToJSON(e,t){return this.set(e,JSON.stringify(t)),t}caseMarshalToJson(e){try{return JSON.parse(e)}catch(t){return JSON.parse(e.replace(/\\\"/g,'"'))}}}const Gt=new class extends Yt{constructor(){super(),this.currentUserUUID()}currentSessionKey(){const e=Math.round((new Date).getTime()/1e3),r=t.STORAGE_PREFIX("session"),s=this.getToJSON(r);if(this.$blank(s)||s.time+1800<e){return this.setToJSON(r,{time:e,term:this.$blank(s)?-1:e-s.time,uuid:`${this.$uuid()}-${e}`}).uuid}return s.uuid}currentTimeTerm(){const e=t.STORAGE_PREFIX("session"),r=this.getToJSON(e);return this.$blank(r.term)?-1:r.term}currentTime(){const e=t.STORAGE_PREFIX("session"),r=this.getToJSON(e);return this.$blank(r.time)?-1:r.time}setTime(e){const r=Math.round((new Date).getTime()/1e3),s=t.STORAGE_PREFIX("session"),i=this.getToJSON(s),n=this.$blank(i)?{time:e>0?e:r,term:e>0?r-e:-1,uuid:`${this.$uuid()}-${r}`}:i;n.time=e,this.setToJSON(s,n)}generateKey(){return`${this.$uuid()}-${(new Date).getTime()}`}setUser(e){return this.set(t.STORAGE_PREFIX("user"),void 0===e?void 0:JSON.stringify(e)),e}getUser(){try{return JSON.parse(this.get(t.STORAGE_PREFIX("user")))}catch(e){return void Jt.error("User Storage",`사용자 정보를 추출하는데 실패하였습니다. [ ${e.message} ]`)}}};class Xt extends Error{constructor(e){super(),this.name="BootpayEventError",this.eventMessage=e}}const Qt={__BOOTPAY_NAMESPACE:{},isBind:!1,initialize(){this.isBind||(n(window)&&(window.addBootpayEventListener=this.on,window.removeBootpayEventListener=this.off,window.resetBootpayEventListener=function(e,t,r){this.removeBootpayEventListener(e).addBootpayEventListener(e,t,r)}),n(document)&&(document.addBootpayEventListener=this.on,document.removeBootpayEventListener=this.off,document.resetBootpayEventListener=function(e,t,r){this.removeBootpayEventListener(e).addBootpayEventListener(e,t,r)}),n(Element)&&(Element.prototype.addBootpayEventListener=this.on,Element.prototype.removeBootpayEventListener=this.off,Element.prototype.resetBootpayEventListener=function(e,t,r){this.removeBootpayEventListener(e).addBootpayEventListener(e,t,r)}),this.isBind=!0)},on(e,t,r=void 0){return i(Qt.__BOOTPAY_NAMESPACE)&&(Qt.__BOOTPAY_NAMESPACE={}),this.addEventListener(e.split(".")[0],t,r||!1),Qt.__BOOTPAY_NAMESPACE[e]=t,this},off(e){return n(Qt.__BOOTPAY_NAMESPACE)&&n(Qt.__BOOTPAY_NAMESPACE[e])&&this.removeEventListener(e.split(".")[0],Qt.__BOOTPAY_NAMESPACE[e]),this}};class Zt extends _{constructor(){super(),this.$resolve=null,this.$reject=null,Qt.initialize()}reject(e){null!==this.$reject&&this.$reject(e)}resolve(e){null!==this.$resolve&&this.$resolve(e)}setCallbackFunction(e,t){this.$resolve=e,this.$reject=t}parseEvent(e){let t={};if(this.$present(e)&&this.$type(e,"string")){try{t=JSON.parse(e)}catch(r){Jt.info("json parsing failed",`data: ${e}, message: ${er(r)} JSON 파싱 형태가 아닌 이벤트 입니다.`)}return t.bootpay_event?(delete t.bootpay_event,t):null}return null}}const er=e=>"string"==typeof e?e.toUpperCase():e instanceof Error?e.message:e;class tr extends _{constructor(){super(),this.$windowId="",this.$template=""}byId(e){return document.getElementById(e)}createTemplateHtml(){if(null===this.byId(this.$windowId)){const e=document.querySelector("body");this.$present(e.className)?e.className=`${e.className} bootpay-open`:e.className="bootpay-open",document.body.insertAdjacentHTML("beforeend",this.$template)}}templateResize(e,t){const r=this.byId(e);if(void 0!==r)for(let s in Object.keys(t)){let e=Object.keys(t)[s],i=t[e];this.$present(i)&&!String(i).match(/%/)&&(e.match(/width/)||e.match(/Width/)||e.match(/height/)||e.match(/Height/))&&(i=`${String(t[e]).replace(/px/gi,"")}px`),r.style.setProperty(e,i)}}}const rr=new class extends tr{constructor(){super(),this.$alfredId="bootpay-alfred-progress-id",this.$alfredTextId="__alfred-text-message__"}template(e){return`\n<div class="bootpay-progress-background" id="${this.$alfredId}" style="display: none;">\n<div class="progress-message-window">\n <div class="alfred-loading">\n <div class="bootpay-spinner"></div> \n </div>\n <div class="alfred-text">\n <span class="alfred-inner-text" id="${this.$alfredTextId}">${e}</span>\n </div>\n</div> \n</div>\n `}showProgress(e){this.$present(this.byId(this.$alfredId))?this.byId(this.$alfredTextId).innerText=e:document.body.insertAdjacentHTML("beforeend",this.template(e)),this.byId(this.$alfredId).style.setProperty("display","block")}hideProgress(){try{this.byId(this.$alfredId).outerHTML=""}catch(e){}}};const sr=new class extends Lt{constructor(){super()}async pollingStatus(e,t,r,s){try{const i=await this.$http.get([e,"s",t].join("/"),{params:{application_id:r,tk:s}});return Promise.resolve(i)}catch(i){return Promise.reject(i)}}};const ir=new class extends Zt{constructor(){super(),this.$messageEventName="message.BootpayPaymentEvent",this.$eventPrefix="bootpay",this.$pollingInterval=void 0,this.$pollingData={applicationId:"",gatewayUrl:"",receiptId:"",transactionKey:""},this.$pollingEvent=sr,this.pollingInterval=3e3,this.isDone=!1}bind(e,t){this.isDone=!1,this.setCallbackFunction(e,t),window.resetBootpayEventListener(this.$messageEventName,(e=>{const t=this.parseEvent(e.data);if(Jt.debug("event received",JSON.stringify(t)),n(t))switch(Jt.debug("event",t),t.event){case"error":case"cancel":return this.reject({event:t.event,pg_error_code:t.pg_error_code,error_code:t.error_code,message:t.message,payload:t.payload});case"confirm":return this.resolve({event:t.event,receipt_id:t.receipt_id,gateway_url:t.gateway_url,order_id:t.order_id});case"redirect":return void location.replace(t.url);case"polling":return void 0!==this.$pollingData&&(this.$pollingData.receiptId=t.receipt_id,this.$pollingData.gatewayUrl=t.gateway_url),this.startPollingEvent();case"issued":case"done":if(!this.isDone)return this.isDone=!0,this.clearPollingEvent(),this.resolve(t);break;case"iFrameStyle":or.iFrameSetStyle(t.styles);break;case"windowStyle":or.windowStyle(t.styles);break;case"hideProgress":rr.hideProgress();break;case"showProgress":rr.showProgress(t.message);break;case"resize":or.iFrameResize(t.resizeData);break;case"hidePayment":or.closePopup(),or.hidePaymentiFrame();break;case"showPayment":or.showPaymentiFrame(!!this.$present(t.showCloseButton)&&t.showCloseButton);break;case"popup":or.createPopupButton({gatewayUrl:t.url,receiptId:t.receipt_id,name:t.name,price:t.price});break;case"close":or.destroy();break;default:return}}))}setDefaultPaymentData(e,t){void 0!==this.$pollingData&&(this.$pollingData.applicationId=e,this.$pollingData.transactionKey=t)}callBootpayDOMEvent(e,t=void 0){document.dispatchEvent(new CustomEvent([this.$eventPrefix,e].join(""),{detail:t}))}startPollingEvent(){this.$pollingInterval=setInterval((async()=>{if(void 0!==this.$pollingData)try{const e=await this.$pollingEvent.pollingStatus(this.$pollingData.gatewayUrl,this.$pollingData.receiptId,this.$pollingData.applicationId,this.$pollingData.transactionKey);let t={bootpay_event:!0,event:"",data:e.data};if(void 0!==e.data){if(Jt.debug("polling event",`receive data: ${JSON.stringify(t)}`),1===e.data.status)return t.event="done",window.postMessage(JSON.stringify(t),"*");if(5===e.data.status)return t.event="issued",window.postMessage(JSON.stringify(t),"*")}}catch(e){return this.reject({error_code:"RC_RECEIPT_POLLING_INVALID",message:"결제 상태 체크에 실패하였습니다."})}}),this.pollingInterval)}clearPollingEvent(){void 0!==this.$pollingInterval&&clearInterval(this.$pollingInterval),this.$pollingInterval=void 0,this.$pollingData={applicationId:"",gatewayUrl:"",receiptId:"",transactionKey:""}}allClearEvent(){this.clearPollingEvent(),window.removeBootpayEventListener(this.$messageEventName)}},nr={startProgress:{PAYMENT:{ko:"결제를 시작합니다",en:"Start Payment..."},CARD_SUBSCRIPTION:{ko:"카드정기결제를 시작합니다",en:"Automatic payment will start..."},AUTH:{ko:"본인인증을 시작합니다",en:"Authentication will start..."}},popupLocaleMessage:{message:{ko:"구매 내역에 동의하면 결제를 진행해주세요",en:"If you agree with the purchase details, please proceed with the payment."},button:{ko:"결제계속하기",en:"Continue"}},popupMessage:{message:{PAYMENT:{ko:"구매 내역에 동의하면 결제를 진행해주세요",en:"If you agree with the purchase details, please proceed with the payment"},CARD_SUBSCRIPTION:{ko:'카드 자동결제에 동의하면 "계속하기" 버튼을 눌러 진행해주세요',en:'If you agree to automatic card payment, press the "Continue" button to proceed'},AUTH:{ko:'본인인증에 동의하면 "계속하기" 버튼을 눌러 진행해주세요',en:'If you agree to authenticate yourself, press the "Continue" button to proceed'}},button:{PAYMENT:{ko:"결제계속하기",en:"Continue"},CARD_SUBSCRIPTION:{ko:"계속하기",en:"Continue"},AUTH:{ko:"계속하기",en:"Continue"}}},closeMessage:{PAYMENT:{ko:"결제창을 닫았습니다",en:"Payment window is closed"},CARD_SUBSCRIPTION:{ko:"자동 결제창을 닫았습니다",en:"Automatic Payment window is closed"},AUTH:{ko:"본인인증 창을 닫았습니다",en:"Authenticate window is closed"}},confirmNotYet:{PAYMENT:{ko:"결제 승인준비가 되지 않았습니다",en:"Payment approval not ready "},CARD_SUBSCRIPTION:{ko:"자동결제 승인준비가 되지 않았습니다",en:"Automatic Payment approval not ready"},AUTH:{ko:"본인인증 승인준비가 되지 않았습니다",en:"Authenticate approval not ready"}},notSelectPayment:{ko:"어떤 방법으로 결제할지 선택해주세요",en:"Please, do select payment."},termsNotAgree:{ko:"필수 약관을 모두 동의해주세요",en:"Please agree to all required terms and conditions"},notSelectOOPay:{ko:"간편결제로 결제하려면, 등록된 카드 혹은 계좌를 선택해주세요",en:"Please select a registered card or account to pay with Easy Payment"},getLocaleMessage:(e,t)=>{const r=e.split(".").reduce(((e,t)=>e[t]),nr);return n(r)&&n(r[t])?r[t]:r.ko}};const or=new class extends tr{constructor(){super(),this.mode="PAYMENT",this.modeApiUrl={PAYMENT:"request/payment",CARD_SUBSCRIPTION:"request/subscribe",AUTH:"request/authentication"},this.$formId="bootpay-form",this.$iFrameId="bootpay-iframe-id",this.$windowId="bootpay-window-id",this.$paymentWindowId="bootpay-payment-window-id",this.$confirmFormId="bootpay-confirm-form-id",this.$confirmIFrame="bootpay-confirm-iframe-id",this.$popupWindow="bootpay-popup-window-id",this.$closeButton="bootpay-close-btn",this.$popupItemNameId="bootpay-item-name-id",this.$popupPriceId="bootpay-price-id",this.$popup=void 0,this.$popupWatcher=void 0,this.$popupUrl=void 0,this.$env=r,this.$template=this.template()}template(){return`\n<div id="${this.$windowId}" class="bootpay-payment-background">\n <div class="bootpay-payment-window ${r.isMobile()?"__mobile":""}" id="${this.$paymentWindowId}">\n <button class="bootpay-close-btn" id="${this.$closeButton}" style="display: none;" onclick="Bootpay.dismiss()"></button> \n <form id="${this.$formId}" method="POST">\n </form> \n <iframe id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>\n <div class="bootpay-popup-window" id="${this.$popupWindow}">\n <div class="header">\n <button class="bootpay-close-btn" onclick="Bootpay.dismiss(true)"></button>\n </div>\n <div class="body">\n <h5 id="${this.$popupItemNameId}"></h5>\n <p class="price" id="${this.$popupPriceId}"></p> \n <div class="agree-text">${this.message("popupMessage.message")}</div>\n </div>\n <div class="footer">\n <button class="bootpay-button" onclick="Bootpay.readyToPopup()">\n ${this.message("popupMessage.button")}\n </button> \n </div>\n </div>\n </div>\n <div class="bootpay-confirm-window">\n <form id="${this.$confirmFormId}" method="POST">\n <input type="hidden" name="_method" value="put" /> \n </form>\n <iframe id="${this.$confirmIFrame}" name="${this.$confirmIFrame}"></iframe>\n </div> \n</div>\n `}templateReload(){Jt.debug("template reload","template reload!"),this.$template=this.template()}async start(e,t="PAYMENT"){return new Promise(((r,s)=>{this.mode=t,this.templateReload(),ir.clearPollingEvent(),ir.bind(r,s),ir.setDefaultPaymentData(e.application_id,e.tk),rr.showProgress(this.message("startProgress")),this.createTemplateHtml();const i=Lt.encryptParams(Lt.objectKeyToUnderscore(e)),n=this.byId(this.$formId);n.innerHTML=`\n <input type="hidden" name="payload" value="${i.payload}" />\n <input type="hidden" name="token" value="${i.token}" />\n `,n.action=this.$env.toApi(this.apiUrl()),this.$present(e.extra)&&e.extra.popup,n.target=this.$iFrameId,n.submit()}))}setConfirmFormUrl(e){const t=this.byId(this.$confirmIFrame),r=this.byId(this.$confirmFormId);t.style.setProperty("display","block"),r.target=this.$confirmIFrame,r.action=e}confirm(){return new Promise(((e,t)=>{ir.bind(e,t);const r=this.byId(this.$confirmFormId);if(this.$blank(r.action))throw new Xt({event:"error",error_code:"RC_CONFIRM_READY_NOT_YET",message:this.message("confirmNotYet")});r.submit()}))}async startPaymentUrl(e,t="PAYMENT"){return new Promise(((r,s)=>{this.mode=t,this.templateReload(),ir.clearPollingEvent(),ir.bind(r,s),ir.setDefaultPaymentData(null,null),rr.showProgress(this.message("startProgress")),this.createTemplateHtml();const i=this.byId(this.$formId);i.method="GET",i.action=e,i.target=this.$iFrameId,i.submit()}))}createPopupButton(e){rr.hideProgress(),this.hidePaymentiFrame(),this.showPopupMessage(e),this.$present(e.gatewayUrl)&&(this.$popupUrl=`${e.gatewayUrl}?popup=1`,Vt.setReceiptId(e.receiptId))}readyToPopup(e=void 0){this.hidePopupMessage(),this.closePopup();this.$popup=window.open(this.getPopupUrl(e),"BootPayPopupInstance","width=750,height=500,top=0,left=0,scrollbars=yes,directories=no, status=no, menubar=no, fullscreen=no"),this.$popupWatcher=setInterval((async()=>{if(void 0===this.$popup||this.$popup.closed){try{clearInterval(this.$popupWatcher),await Vt.sendCloseEvent()}catch(e){Jt.debug("popup",er(e))}return this.$popupUrl=void 0,ir.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:this.message("closeMessage")})}}),500),this.bindParentEventOnPopup()}closePopup(){if(void 0!==this.$popupWatcher)try{clearInterval(this.$popupWatcher),Jt.debug("close popup","clear popup interval")}catch(e){Jt.info("clear popup watcher",er(e))}if(void 0!==this.$popup&&!this.$popup.closed)try{this.$popup.close(),Jt.debug("close popup","close popup instance")}catch(e){Jt.info("popup destroy",er(e))}}getPopupUrl(e){return this.$present(e)?e:this.$present(this.$popupUrl)?this.$popupUrl:"about:blank"}bindParentEventOnPopup(){let e="beforeunload.BootpayReloadWatcher";r.isMobileSafari()&&(e="pagehide.BootpayReloadWatcher"),window.resetBootpayEventListener(e,(()=>{void 0!==this.$popup&&this.$popup.close()}))}showPaymentiFrame(e=!1){const t=this.byId(this.$iFrameId),r=this.byId(this.$closeButton);void 0!==t&&t.style.setProperty("display","block"),void 0!==r&&e&&r.style.setProperty("display","inline-block")}showPopupMessage(e){const t=this.byId(this.$popupWindow),r=this.byId(this.$popupItemNameId),s=this.byId(this.$popupPriceId);void 0!==t&&t.style.setProperty("display","block"),void 0!==r&&(r.innerText=e.name),void 0!==s&&(parseFloat(e.price)>0?s.innerText=e.price:s.remove())}hidePopupMessage(){this.byId(this.$popupWindow).style.setProperty("display","none")}destroy(){this.$present(document.querySelector("body").className)&&(document.querySelector("body").className=document.querySelector("body").className.replace(/bootpay-open/gi,"")),this.$present(this.byId(this.$windowId))&&(this.byId(this.$windowId).outerHTML=""),document.body.classList.remove("bootpay-open"),rr.hideProgress(),this.closePopup(),ir.allClearEvent(),Vt.clearInstance(),setTimeout((()=>ir.callBootpayDOMEvent("close")),300)}iFrameResize(e){const t=this.byId(this.$iFrameId);if(void 0!==t)for(let r in Object.keys(e)){let s=Object.keys(e)[r],i=e[s];this.$present(i)&&!String(i).match(/%/)&&(s.match(/width/)||s.match(/Width/)||s.match(/height/)||s.match(/Height/))&&(i=`${String(e[s]).replace(/px/gi,"")}px`),String(i).match(/%/)&&!this.byId(this.$paymentWindowId).className.match(/w-100/)&&(this.byId(this.$paymentWindowId).className+=" w-100"),t.style.setProperty(s,i)}}iFrameSetStyle(e){Jt.debug("change style",e);const t=this.byId(this.$iFrameId);for(let s in Object.keys(e)){let i=Object.keys(e)[s];try{Jt.debug(i,e[i]),t.style.setProperty(i,e[i])}catch(r){Jt.warn("iframe style",r?.message)}}}windowStyle(e){Jt.debug("change style",e);const t=this.byId(this.$paymentWindowId);for(let s in Object.keys(e)){let i=Object.keys(e)[s];try{Jt.debug(i,e[i]),t.style.setProperty(i,e[i])}catch(r){Jt.warn("iframe style",r?.message)}}}hidePaymentiFrame(){const e=this.byId(this.$iFrameId),t=this.byId(this.$closeButton);void 0!==e&&e.style.setProperty("display","none"),void 0!==t&&t.style.setProperty("display","none")}message(e){return nr.getLocaleMessage(`${e}.${this.mode}`,r.locale)}moveToUrl(e){const t=this.byId(this.$iFrameId);this.hidePaymentiFrame(),t.removeAttribute("style"),this.iFrameResize({width:r.isMobile()?"100%":400,height:r.isMobile()?"100%":700}),t.style.setProperty("display","block"),t.src=e}apiUrl(){return this.modeApiUrl[this.mode]}};class ar extends _{constructor(){super(),this.$session=Gt,this.$logger=Jt,this.$event=Vt,this.platformType=t.PLATFORM.JS,this.$transactionKey="",this.extra={},this.browserBootpayFilter={instagram:/Instagram/i,kakaotalk:/KAKAOTALK/i,facebook:/FBAV/i,naver:/NAVER/i,mobile_safari:/(iPhone|iPad|iPod)/,mobile_chrome:[/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/,/Chrome/]}}static{this.invalidRequestParams={application_id:"application_id를 입력해주세요. [ key: application_id ]",order_name:"판매할 상품명을 입력해주세요. [ key: order_name ]",price:"판매할 상품의 금액을 입력해주세요. [ key: price ]",order_id:"가맹점에서 설정할 주문 ID를 입력해주세요. [ key: order_id ]"}}async requestPayment(e){void 0===e.extra?.locale||r.isSetLocale||r.setLocale(e.extra.locale),this.$event.clearInstance(),this.generateTransactionKey(),e.application_id=r.currentApplicationId(e.application_id),this.$event.setTokenKey(this.$transactionKey),this.$event.setApplicationId(e.application_id),this.$event.send({step:"start",msg:"결제 요청 시작",request:e}),e.sdk=!0,e.platform_type=this.platformType,e.ver=Wt,e.sdk_version=r.sdkVersion,e.sdk_type=r.sdkName,e.locale=r.locale,e.price=parseFloat(String(e.price)),e.tax_free=parseFloat(String(e.tax_free)),ar.invalidRequestParamsData(e),ar.invalidRequestItemsData(e.items,e.price),e.uuid=this.$session.currentUserUUID(),e.sk=this.$session.currentSessionKey(),e.ti=this.$session.currentTimeTerm(),e.tk=this.$transactionKey,e.env=this.getUserDeviceEnvironment(),e.extra=this.openTypeFilter(e.extra),this.extra=e.extra;try{const t=await or.start(e);return Jt.debug("confirm ready",t),or.hidePaymentiFrame(),or.closePopup(),-1===["done","issued"].indexOf(t.event)&&this.$event.send({step:t.event,msg:"",request:e,response:t}),or.setConfirmFormUrl(`${t.gateway_url}/confirm/${t.receipt_id}?application_id=${e.application_id}`),Promise.resolve(t)}catch(t){return this.eventError(t),Promise.reject(t)}}async confirm(){try{const e=await or.confirm();return Promise.resolve(e)}catch(e){return this.eventError(e),Promise.reject(e)}}eventDone(e,t=!0){this.$logger.debug(e.event,e),this.$event.send({step:e.event,msg:"done"===e.event?"결제완료":"가상계좌발급완료",request:{},response:e}),rr.hideProgress(),this.$logger.debug("show result",this.isDisplaySuccessResult()),this.isDisplaySuccessResult()&&t?this.displayResultView(e.data.receipt_id):or.destroy()}eventError(e){rr.hideProgress(),or.closePopup(),this.isDisplayErrorResult()&&"error"===e.event?this.displayResultErrorView(e):or.destroy(),this.$logger.debug("done failed destroy and hide","payment"),this.$event.sendError({step:this.$present(e.event)?e.event:"error",msg:e.message,trace:function(){try{return e.stack}catch(t){return!1}}()})}generateTransactionKey(){return this.$transactionKey=`${this.$uuid()}-${1e3*(new Date).getTime()}`,this.$transactionKey}async requestSubscription(e){this.$event.clearInstance(),this.generateTransactionKey(),this.$event.setTokenKey(this.$transactionKey),this.$event.setApplicationId(e.application_id),this.$event.send({step:"start",msg:"정기결제 요청 시작",request:e}),e.extra=this.openTypeFilter(e.extra);const t={application_id:e.application_id,subscription_id:e.subscription_id,pg:e.pg,method:e.method,order_name:e.order_name,price:e.price,tax_free:e.tax_free,user_token:e.user_token,metadata:e.metadata,platform_type:this.platformType,ver:Wt,sdk_version:r.sdkVersion,sdk_type:r.sdkName,locale:r.locale,sdk:!0,uuid:this.$session.currentUserUUID(),sk:this.$session.currentSessionKey(),tk:this.$transactionKey,env:this.getUserDeviceEnvironment(),user:e.user,extra:e.extra};try{const r=await or.start(t,"CARD_SUBSCRIPTION");switch(Jt.debug("subscription success",r),this.$event.send({step:"confirm",msg:"결제승인전",request:{},response:r}),or.hidePaymentiFrame(),or.closePopup(),r.event){case"done":case"issued":break;case"confirm":or.setConfirmFormUrl(`${r.gateway_url}/confirm/${r.receipt_id}?application_id=${e.application_id}`)}return Promise.resolve(r)}catch(s){return this.eventError(s),Promise.reject(s)}}async requestAuthentication(e){this.$event.clearInstance(),this.generateTransactionKey(),this.$event.setTokenKey(this.$transactionKey),this.$event.setApplicationId(e.application_id),this.$event.send({step:"start",msg:"본인인증 요청 시작",request:e}),e.extra=this.openTypeFilter(e.extra);const t={application_id:e.application_id,authentication_id:e.authentication_id,pg:e.pg,method:this.$present(e.method)?e.method:"auth",order_name:e.order_name,platform_type:this.platformType,ver:Wt,sdk_version:r.sdkVersion,sdk_type:r.sdkName,locale:r.locale,metadata:e.metadata,sdk:!0,uuid:this.$session.currentUserUUID(),sk:this.$session.currentSessionKey(),tk:this.$transactionKey,env:this.getUserDeviceEnvironment(),user:e.user,extra:e.extra};try{const r=await or.start(t,"AUTH");switch(Jt.debug("authentication success",r),this.$event.send({step:"confirm",msg:"본인인증 승인전",request:{},response:r}),or.hidePaymentiFrame(),or.closePopup(),r.event){case"done":case"issued":break;case"confirm":or.setConfirmFormUrl(`${r.gateway_url}/confirm/${r.receipt_id}?application_id=${e.application_id}`)}return Promise.resolve(r)}catch(s){return this.eventError(s),Promise.reject(s)}}async requestPaymentUrl(e){try{const t=await or.startPaymentUrl(e.url);return-1===["done","issued"].indexOf(t.event)&&this.$event.send({step:t.event,msg:"",request:{url:e.url},response:t}),or.setConfirmFormUrl(`${t.gateway_url}/confirm/${t.receipt_id}?application_id=${e.application_id}`),Promise.resolve(t)}catch(t){return this.eventError(t),Promise.reject(t)}}getUserDeviceEnvironment(){return{width:window.innerWidth,height:window.innerHeight}}isDisplaySuccessResult(){return void 0!==this.extra&&void 0!==this.extra.display_success_result&&this.extra.display_success_result}isDisplayErrorResult(){return void 0!==this.extra&&void 0!==this.extra.display_error_result&&this.extra.display_error_result}displayResultView(e){or.moveToUrl(r.toDoor(`result/${e}`))}displayResultErrorView(e){or.moveToUrl(r.toDoor(`error?error_code=${e.error_code}&pg_error_code=${e.pg_error_code}&message=${e.message}`))}openTypeFilter(e){if(this.$present(e)&&void 0!==e.browser_open_type){const t=this.getUserAgent();for(let r in e.browser_open_type){const s=e.browser_open_type[r],i=this.$present(this.browserBootpayFilter[s.browser])?this.browserBootpayFilter[s.browser]:new RegExp(`${s.browser}`);if(t.match(i)){e.open_type=s.open_type;break}}}return e}static invalidRequestParamsData(e){if(i(e))throw new Xt({event:"error",error_code:"NEED_MORE_PARAMS",message:"결제 요청을 위한 최소한의 결제 정보를 입력해주세요."});Object.keys(ar.invalidRequestParams).forEach((t=>{const r=e[t];if(i(r))throw new Xt({event:"error",error_code:"INVALID_REQUEST_PARAMS",message:ar.invalidRequestParams[t]})}))}static invalidRequestItemsData(e,t){if(void 0!==e&&n(e)){let r=0;if(e.forEach(((t,s)=>{if(i(t.id))throw new Xt({event:"error",error_code:"NEED_ITEM_ID",message:`${s+1}번째 상품 고유 ID를 입력해주세요. [ key: id ]`});if(i(t.name))throw new Xt({event:"error",error_code:"NEED_ITEM_NAME",message:`${s+1}번째 상품명을 입력해주세요. [ key: name ]`});if(i(t.qty))throw new Xt({event:"error",error_code:"NEED_ITEM_QTY",message:`${s+1}번째 상품수량을 입력해주세요. [ key: qty ]`});if(i(t.price))throw new Xt({event:"error",error_code:"NEED_ITEM_PRICE",message:`${s+1}번째 상품금액을 입력해주세요. [ key: price ]`});e[s].price=parseFloat(String(e[s].price)),e[s].qty=parseFloat(String(e[s].qty)),r+=e[s].price*e[s].qty})),r!==t)throw new Xt({event:"error",error_code:"NEED_ITEM_TOTAL_PRICE_NOT_MATCH",message:`결제 금액과 상품 수량 및 상품 금액의 총합과 일치하지 않습니다. [ 요청금액: ${t} ${typeof t}, 상품 총합계 금액: ${r} ${typeof r} ]`})}}}const cr=new ar;const dr=new class extends Lt{constructor(){super(),this.$session=Gt}setAnalyticsData(e){this.$session.setTime(e.time),this.$session.setUUID(e.uuid)}async send(e){const t=document.URL;if(void 0!==t&&-1===t.search(/bootapi.co.kr/)){const o=this.$session.getUser();e.application_id=r.currentApplicationId(e.application_id),e.sk=this.$session.currentSessionKey(),e.uuid=this.$session.currentUserUUID(),e.time=this.$session.currentTime(),e.url=t,e.referer=void 0!==document.referrer&&n(document.referrer)&&-1==document.referrer.search(new RegExp(window.location.hostname))?document.referrer:"",e.user_id=void 0===o||i(o)?void 0:o.id,e.items=this.generateItemKeyToVersion1(e.items);try{const t=await this.$http.post(r.toAnalytics(`call?ver=${Wt}`),e);return 200===t.data.status?(Jt.info("Analytics Common Send","통계 데이터가 전송되었습니다."),Promise.resolve()):(Jt.warn("Analytics Common Send",`통계 데이터가 전송 실패. ${JSON.stringify(t.data)}`),Promise.reject())}catch(s){return Jt.error("Analytics Common Error",`데이터 전송 실패: ${s.message}`),Promise.reject()}}}async login(e){if(e.application_id=r.currentApplicationId(e.application_id),i(e.application_id))return Jt.error("Analytics Params","application_id 값을 입력해주세요.");if(i(e.id))return Jt.error("Analytics Params","id 값을 입력해주세요.");try{const t=await this.$http.post(r.toAnalytics(`login?ver=${Wt}`),e),{user_id:s}=t.data.data;return this.$session.setUser({id:s,time:(new Date).getTime()}),Promise.resolve()}catch(t){return Jt.error("Analytics Login Error",`데이터 전송 실패: ${t.message}`),Promise.reject()}}logout(){this.$session.setUser(void 0)}generateItemKeyToVersion1(e){return void 0!==e?e.map((e=>({cat1:e.cat1,cat2:e.cat2,cat3:e.cat3,item_img:e.img,item_name:e.name,unique:e.id,price:e.price}))):void 0}};!function(){if("function"==typeof window.CustomEvent)return!1;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};let r=document.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r}e.prototype=window.Event.prototype,window.CustomEvent=e}();const pr={$payment:cr,$analytics:dr,$environment:r,async requestPayment(e){return new Promise((async(t,r)=>{try{const r=await this.$payment.requestPayment(e);setTimeout((()=>{t(r),["done","issued"].indexOf(r.event)>-1&&this.$payment.eventDone(r)}),100)}catch(s){setTimeout((()=>{r(this.errorHandler(s))}),100)}}))},async confirm(){return new Promise((async(e,t)=>{try{const t=await this.$payment.confirm();setTimeout((()=>{e(t),this.$payment.eventDone(t)}),100)}catch(r){setTimeout((()=>t(this.errorHandler(r))),100)}}))},async requestSubscription(e){return new Promise((async(t,r)=>{try{const r=await this.$payment.requestSubscription(e);t(r),this.$payment.eventDone(r)}catch(s){return r(this.errorHandler(s))}}))},async requestAuthentication(e){return new Promise((async(t,r)=>{try{const r=await this.$payment.requestAuthentication(e);t(r),this.$payment.eventDone(r)}catch(s){return r(this.errorHandler(s))}}))},async requestPaymentUrl(e){return new Promise((async(t,r)=>{try{const r=await this.$payment.requestPaymentUrl(e);setTimeout((()=>{t(r),["done","issued"].indexOf(r.event)>-1&&this.$payment.eventDone(r)}),100)}catch(s){setTimeout((()=>{r(this.errorHandler(s))}),100)}}))},setEnvironmentMode(e,t=void 0){this.$environment.set(e),void 0!==t&&this.$environment.setDevelopmentHost(t)},setApplicationId(e){return this.$environment.setApplicationId(e)},setVersion(e,t){return this.$environment.setVersion(e,t)},setDevice(e){switch(e){case"IOS":this.$payment.platformType=t.PLATFORM.IOS;break;case"ANDROID":this.$payment.platformType=t.PLATFORM.ANDROID;break;default:this.$payment.platformType=t.PLATFORM.JS}return this.$payment.platformType},errorHandler(e){let t;if(rr.hideProgress(),"BootpayEventError"===e.name)t=e.eventMessage;else{if(!n(e.event))throw e;t=e}return t},readyToPopup(){or.readyToPopup()},setLogLevel(e){Jt.setLogLevel(e)},setUUID:e=>Gt.setUUID(e),send(e=void 0){return this.$analytics.send(void 0!==e?e:{})},login(e){return this.$analytics.login(e)},logout(){return this.$analytics.logout()},setLocale(e){r.setLocale(e),or.templateReload()},async dismiss(e=!1){if(e)try{await Vt.sendCloseEvent()}catch(t){Jt.debug("error",t.message)}ir.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})},getCurrentUUID:()=>Gt.currentUserUUID(),destroy(){or.destroy()}};window.Bootpay=pr;class lr extends Zt{constructor(){super(),this.$messageEventName="message.BootpayUserTokenEvent"}bind(e,t){this.setCallbackFunction(e,t),window.resetBootpayEventListener(this.$messageEventName,(e=>{const t=this.parseEvent(e.data);if(n(t))switch(Jt.debug("event",t),t.event){case"error":case"cancel":return this.reject({event:t.event,pg_error_code:t.pg_error_code,error_code:t.error_code,message:t.message,payload:t.payload});case"data":return this.resolve(t.data);case"confirmPasswordToken":return this.resolve(t.token);case"confirmAddCard":return this.resolve(t);case"resize":ur.iFrameResize(t.resizeData);break;default:return}}))}}const ur=new class extends tr{constructor(){super(),this.$windowId="bootpay-user-token-background-id",this.$userWindowId="bootpay-user-token-window-id",this.$iFrameId="bootpay-user-token-iframe-id",this.$bootpaySdkFormId="bootpay-user-token-sdk-form",this.$template=this.template(),this.$event=new lr,this.$session=Gt,this.deviceType=t.PLATFORM.JS}setDevice(e){return this.deviceType=e,this.deviceType}template(){return`\n <div id="${this.$windowId}" class="bootpay-payment-background">\n <div class="bootpay-payment-window" id="${this.$userWindowId}">\n <iframe id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>\n <form name="${this.$bootpaySdkFormId}" id="${this.$bootpaySdkFormId}" method="GET"> \n </form>\n </div>\n </div>\n `}setParams(e,t){if(void 0!==t){const r=this.byId(this.$bootpaySdkFormId);if(["POST","PUT"].indexOf(e.toUpperCase())>-1){const e=Lt.encryptParams(Lt.objectKeyToUnderscore(t));r.innerHTML=`\n <input type="hidden" name="payload" value="${e.payload}" />\n <input type="hidden" name="token" value="${e.token}" /> \n `}else{let s="";"DELETE"===e.toUpperCase()&&(s+='<input type="hidden" name="_method" value="patch"/>'),Object.keys(t).forEach((e=>{s+=`<input type="hidden" name="${e}" value="${t[e]}"/>`})),r.innerHTML=s}}}request(e,t){return new Promise(((s,i)=>{this.createTemplateHtml(),this.$event.bind(s,i),this.goiFrameUrl("GET",r.toDoor(`sdk/password/${t}`),{type:e,uuid:this.$session.currentUserUUID()})}))}addCard(e){return new Promise(((t,s)=>{this.createTemplateHtml(),this.$event.bind(t,s),this.goiFrameUrl("GET",r.toDoor(`sdk/card/${e}`),{uuid:this.$session.currentUserUUID()})}))}wallets(e){return new Promise(((t,s)=>{this.createTemplateHtml(),this.$event.bind(t,s),this.goiFrameUrl("GET",r.toApi("sdk/easy/wallet"),{user_token:e,sdk:!0,uuid:this.$session.currentUserUUID()})}))}destroyWallet(e){return new Promise(((t,s)=>{this.createTemplateHtml(),this.$event.bind(t,s),this.goiFrameUrl("POST",r.toApi("sdk/easy/wallet"),{method:"DELETE",sdk:!0,user_token:e.user_token,wallet_id:e.wallet_id,token:e.token,uuid:this.$session.currentUserUUID()})}))}createBiometricAuthenticate(e){return new Promise(((t,s)=>{this.createTemplateHtml(),this.$event.bind(t,s),this.goiFrameUrl("POST",r.toApi("sdk/easy/biometric"),{user_token:e.userToken,sdk:!0,uuid:this.$session.currentUserUUID(),os:e.os,token:e.token})}))}destroyBiometricAuthenticate(e){return new Promise(((t,s)=>{this.createTemplateHtml(),this.$event.bind(t,s),this.goiFrameUrl("POST",r.toApi("sdk/easy/biometric"),{method:"DELETE",uuid:this.$session.currentUserUUID(),user_token:e.userToken,token:e.token})}))}requestWalletPayment(e){return new Promise(((t,s)=>{this.createTemplateHtml(),this.$event.bind(t,s),this.goiFrameUrl("POST",r.toApi("sdk/easy/card"),this.regenerateRequestPayment(e))}))}goiFrameUrl(e,t,r=void 0){this.setParams(e,r);const s=this.byId(this.$bootpaySdkFormId);s.method=this.toMethod(e),s.action=t,s.target=this.$iFrameId,s.submit(),this.show()}toMethod(e){switch(e.toUpperCase()){case"PUT":case"DELETE":return"POST";default:return e}}iFrameResize(e){const t=this.byId(this.$iFrameId);if(void 0!==t)for(let r in Object.keys(e)){let s=Object.keys(e)[r],i=e[s];this.$present(i)&&!String(i).match(/%/)&&(s.match(/width/)||s.match(/Width/)||s.match(/height/)||s.match(/Height/))&&(i=`${String(e[s]).replace(/px/gi,"")}px`),String(i).match(/%/)&&!this.byId(this.$userWindowId).className.match(/w-100/)&&(this.byId(this.$userWindowId).className+=" w-100"),t.style.setProperty(s,i)}}regenerateRequestPayment(e){return e.ver=Wt,e.platform_type=this.deviceType,e.sdk=!0,e.price=parseFloat(String(e.price)),e.tax_free=parseFloat(String(e.tax_free)),ar.invalidRequestParamsData(e),ar.invalidRequestItemsData(e.items,e.price),e.uuid=this.$session.currentUserUUID(),e.sk=this.$session.currentSessionKey(),e.ti=this.$session.currentTimeTerm(),e.tk=`${this.$uuid()}-${1e3*(new Date).getTime()}`,e}show(){const e=this.byId(this.$iFrameId);void 0!==e&&e.style.setProperty("display","block")}destroy(){this.$present(document.querySelector("body").className)&&(document.querySelector("body").className=document.querySelector("body").className.replace(/bootpay-open/gi,"")),this.$present(this.byId(this.$windowId))&&(this.byId(this.$windowId).outerHTML=""),document.body.classList.remove("bootpay-open"),ir.clearPollingEvent(),setTimeout((()=>ir.callBootpayDOMEvent("close")),300)}},hr={$templateUserToken:ur,async requestPasswordToken(e){try{const t=await this.$templateUserToken.request("passwordToken",e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}},async requestChangePassword(e){try{const t=await this.$templateUserToken.request("changePasswordToken",e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}},async requestAddCard(e){try{const t=await this.$templateUserToken.addCard(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}},async wallets(e){try{const t=await this.$templateUserToken.wallets(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}},async destroyWallet(e){try{const t=await this.$templateUserToken.destroyWallet(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}},async createBiometricAuthenticate(e){try{const t=await this.$templateUserToken.createBiometricAuthenticate(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}},async destroyBiometricAuthenticate(e){try{const t=await this.$templateUserToken.destroyBiometricAuthenticate(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}},async requestWalletPayment(e){try{const t=await this.$templateUserToken.requestWalletPayment(e);return this.$templateUserToken.destroy(),Promise.resolve(t)}catch(t){return this.$templateUserToken.destroy(),Promise.reject(this.errorHandler(t))}},setEnvironmentMode(e,t=void 0){r.set(e),void 0!==t&&r.setDevelopmentHost(t)},setDevice(e){let r=t.PLATFORM.JS;switch(e.toUpperCase()){case"IOS":r=t.PLATFORM.IOS;break;case"ANDROID":r=t.PLATFORM.ANDROID}return this.$templateUserToken.setDevice(r)},errorHandler(e){let t;if(rr.hideProgress(),"BootpayEventError"===e.name)t=e.eventMessage;else{if(!n(e.event))throw e;t=e}return t},setLogLevel(e){Jt.setLogLevel(e)},setUUID:e=>Gt.setUUID(e),dismiss(){ir.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})}};window.BootpaySDK=hr;const mr={el:void 0,applicationId:void 0,price:0,taxFree:0,currency:"KRW",userToken:void 0,pg:void 0,method:void 0,walletId:void 0,selectTerms:[],useOnlyOOpay:!1,termsPassed:!1,useTerms:!0,sandbox:!1,externalTerms:[],widgetExtra:{card_quota:[]},extra:{},setWidgetData(e){this.el=String(e.el).replace(/#/gi,""),this.applicationId=e.application_id,this.price=e.price,this.taxFree=e.tax_free,this.currency=e.currency,this.userToken=e.user_token,this.useOnlyOOpay=void 0!==e.use_only_oopay&&e.use_only_oopay,this.useTerms=!(!1===e.use_terms),this.walletId=e.wallet_id,this.externalTerms=e.external_terms,this.widgetExtra=e.widget_extra,this.sandbox=!0===e.sandbox,this.termsPassed=!1,this.extra={}},setPayment(e,t,r,s=!1,i,n){this.pg=e,this.method=t,this.walletId=r,this.termsPassed=s,this.selectTerms=i,this.extra=n},updateOnProcessing(e){n(e.price)&&(this.price=e.price),n(e.tax_free)&&(this.taxFree=e.tax_free),n(e.currency)&&(this.currency=e.currency),void 0!==e.user_token&&(this.userToken=e.user_token),n(e.use_terms)&&(this.useTerms=!(!1===e.use_terms)),n(e.sandbox)&&(this.sandbox=!0===e.sandbox),void 0!==e.external_terms&&(this.externalTerms=e.external_terms)}};const yr=new class extends tr{constructor(){super(),this.$iFrameId="bootpay-widget-iframe",this.$widgetStore=mr,this.$template=`\n <iframe id="${this.$iFrameId}" src="" frameborder="0" allowtransparency="true" scrolling="no" style="background: transparent; width: 100%; height: 100%;"></iframe> \n `,this.isRendered=!1}render(){const e=document.getElementById(this.$widgetStore.el);if(this.$blank(this.$widgetStore.el)||null===e)throw new Error("부트페이 위젯을 설정할 Element ID를 입력하지 않았거나 해당 Element DOM이 존재하지 않습니다.");this.templateRender()}templateRender(){const e=document.getElementById(this.$widgetStore.el);e.style.setProperty("height","0px"),e.innerHTML=this.$template;this.byId(this.$iFrameId).setAttribute("src",r.toWidget(`p/${this.$widgetStore.applicationId}`)),this.isRendered=!0}resize(e){this.templateResize(this.$widgetStore.el,e)}rerender(){this.postMessage("bootpayWidgetRerender")}destroy(){document.getElementById(this.$widgetStore.el).innerHTML=""}postMessage(e,t=void 0){const r=this.byId(this.$iFrameId);r?.contentWindow?.postMessage(JSON.stringify({bootpay_event:!0,event:e,data:t}),"*")}};const fr=new class extends tr{constructor(){super(),this.$oopayWindowId="__bootpay-card-easy-window",this.$iFrameId="__bootpay-card-easy-iframe",this.$windowId="__bootpay-card-easy-container-window",this.$additionalClass=r.isMobile()?"":"rounded-iframe",this.$template=this.template(),this.$widgetStore=mr}template(){return`\n<div id="${this.$windowId}" class="bootpay-payment-background">\n <div class="bootpay-payment-window ${r.isMobile()?"__mobile":""}" id="${this.$oopayWindowId}"> \n <iframe class="${this.$additionalClass}" id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe> \n </div> \n</div>\n `}createIFrame(e){this.createTemplateHtml();const t=document.getElementById(this.$iFrameId);t?.setAttribute("src",r.toWidget(`${e}`)),t?.style.setProperty("display","block")}addWallet(){this.createIFrame(`wallet/add/${this.$widgetStore.applicationId}`)}removeWallet(e){this.createIFrame(`oopay/destroy/${this.$widgetStore.applicationId}/${e}`)}showCardInterestInformation(e){this.createIFrame(`card/interest/${this.$widgetStore.applicationId}`)}destroy(){document.body.classList.remove("bootpay-open");const e=document.getElementById(this.$windowId);void 0!==e&&(e.outerHTML="",e.remove())}resize(e){Jt.debug("resize",e),this.templateResize(this.$iFrameId,e)}postMessage(e,t=void 0){const r=this.byId(this.$iFrameId);r?.contentWindow?.postMessage(JSON.stringify({bootpay_event:!0,event:e,data:t}),"*")}};const vr=new class extends Zt{constructor(){super(),this.$messageEventName="message.BootpayWidgetEvent",this.$eventPrefix="bootpay"}bind(){window.resetBootpayEventListener(this.$messageEventName,(e=>{const t=this.parseEvent(e.data);if(n(t))switch(t.event){case"bootpayWidgetSelectMethod":return gr.selectPayment(t.data.pg,t.data.method,t.data.wallet_id,!0===t.data.term_passed,t.data.select_terms,t.data.extra);case"bootpayRequestGetEnvironment":return yr.postMessage("bootpayResponseGetEnvironment",{use_only_oopay:yr.$widgetStore.useOnlyOOpay,user_token:yr.$widgetStore.userToken,sandbox:yr.$widgetStore.sandbox,use_terms:yr.$widgetStore.useTerms,external_terms:yr.$widgetStore.externalTerms});case"bootpayRequestGetEnvironmentOOPAY":return fr.postMessage("bootpayResponseGetEnvironmentOOPAY",{use_only_oopay:yr.$widgetStore.useOnlyOOpay,user_token:yr.$widgetStore.userToken,sandbox:yr.$widgetStore.sandbox,use_terms:yr.$widgetStore.useTerms});case"bootpayWidgetError":default:return this.reject(t);case"bootpayWidgetOOpayReload":return yr.postMessage("bootpayWidgetOOpayReload",t.data);case"bootpayWidgetResize":return yr.resize(t.data);case"bootpayWidgetShowInterestInformation":return fr.showCardInterestInformation(t.data);case"bootpayWidgetAddWallet":return fr.addWallet();case"bootpayWidgetRemoveWallet":return fr.removeWallet(t.data.wallet_id);case"bootpayWidgetPaymentWindowResize":return fr.resize(t.data);case"bootpayWidgetOOpayWindowClose":return fr.destroy();case"bootpayWidgetPaymentGetStoreData":const{applicationId:e,price:r,widgetExtra:s,taxFree:i,userToken:n}=yr.$widgetStore;return yr.postMessage("bootpayWidgetResponseStoreData",{applicationId:e,price:r,widgetExtra:s,taxFree:i,userToken:n});case"bootpayWidgetTermAllAgree":return void this.callBootpayDOMEvent("allagreeterms",t.data)}}))}callBootpayDOMEvent(e,t=void 0){document.dispatchEvent(new CustomEvent([this.$eventPrefix,e].join(""),{detail:t}))}destroyAllEvent(){window.removeBootpayEventListener(this.$messageEventName)}};const gr=new class extends _{constructor(){super(),this.message=nr}initialize(){mr.setWidgetData({el:void 0,application_id:void 0,price:0,tax_free:0,currency:"KRW",user_token:void 0,pg:void 0,method:void 0})}render(e,t){if(this.$blank(t?.price)||t.price<0)throw new Error("결제금액은 1원 이상을 입력해주세요.");if(this.$blank(t?.application_id))throw new Error("application_id가 입력되지 않았습니다.");this.initialize(),mr.setWidgetData({el:e,application_id:t.application_id,price:t.price,tax_free:t.tax_free,currency:t.currency,user_token:t.user_token,use_only_oopay:t.use_only_oopay,external_terms:t.external_terms,widget_extra:t.extra,use_terms:t.use_terms,sandbox:t.sandbox}),yr.render(),vr.bind()}update(e){const{price:t,tax_free:r,currency:s,user_token:i,use_only_oopay:n,use_terms:o,sandbox:a,external_terms:c}=e;mr.updateOnProcessing({price:t,tax_free:r,currency:s,user_token:i,use_only_oopay:n,use_terms:o,external_terms:c,sandbox:a}),(this.$present(i)||this.$present(n)||this.$present(o)||this.$present(a))&&yr.postMessage("bootpayWidgetUpdateUserToken",{user_token:i,use_only_oopay:n,use_terms:o,external_terms:c,sandbox:a})}rerender(){yr.rerender()}destroy(){yr.destroy()}selectPayment(e,t,r,s=!1,i,n){mr.setPayment(e,t,r,s,i,n),Jt.debug("selectPayment",`pg: ${e}, method: ${t}, wallet_id: ${r}, terms: ${s}, select_terms: ${JSON.stringify(i)}, extra: ${JSON.stringify(n)}`)}currentTermsCondition(){return mr.selectTerms}async requestPayment(e){if(this.$blank(mr.pg)||this.$blank(mr.method))throw new Xt({event:"error",error_code:"RC_PG_METHOD_NOT_SELECTED",message:this.message.getLocaleMessage("notSelectPayment","ko")});if(!mr.termsPassed&&mr.useTerms)throw new Xt({event:"error",error_code:"RC_TERMS_NOT_AGREE",message:this.message.getLocaleMessage("termsNotAgree","ko")});if("OOPAY"===mr.method&&void 0===mr.walletId)throw new Xt({event:"error",error_code:"RC_OOPAY_NEED_SELECT_WALLET",message:this.message.getLocaleMessage("notSelectOOPay","ko")});return e.application_id=mr.applicationId,e.price=mr.price,e.tax_free=mr.taxFree,e.currency=mr.currency,e.pg=mr.pg,e.method=mr.method,e.wallet_id=mr.walletId,e.terms=mr.selectTerms,e.widget_sandbox=mr.sandbox,e.extra=this.mergeExtraOnStore(e.extra),e.widget=1,pr.requestPayment(e)}mergeExtraOnStore(e){return void 0===e?mr.extra:(void 0!==mr.extra&&Object.keys(mr.extra).forEach((t=>{e[t]=mr.extra[t]})),e)}isRendered(){return yr.isRendered}},_r={render(e,t){gr.render(e,t)},rerender(){gr.rerender()},setEnvironmentMode(e,t){pr.setEnvironmentMode(e,t),r.set(e)},async requestPayment(e){return new Promise((async(t,r)=>{try{return t(await gr.requestPayment(e))}catch(s){return r(this.errorHandler(s))}}))},errorHandler(e){let t;if(rr.hideProgress(),"BootpayEventError"===e.name)t=e.eventMessage;else{if(!n(e.event))throw e;t=e}return t},update(e){gr.update(e),this.rerender()},currentTermsCondition:()=>gr.currentTermsCondition(),destroy(){gr.destroy()},isRendered:()=>gr.isRendered()};window.BootpayWidget=_r,e.Bootpay=pr,e.BootpayEnvironment=r,e.BootpaySDK=hr,e.BootpayWidget=_r,e.default=pr,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"name": "@bootpay/client-js",
|
|
3
|
+
"version": "5.0.0-beta.9",
|
|
4
|
+
"main": "dist/index.es.js",
|
|
5
|
+
"types": "dist/src/index.d.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"build": "rm -rf ./dist && vite build",
|
|
9
|
+
"deploy": "NODE_ENV=production ./node_modules/.bin/webpack --output-path=./dist --mode=production && gzip -kf dist/*.min.js && ./webview.sh $npm_package_version"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"typescript": "^5.1.6"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@types/ws": "^8.5.5",
|
|
16
|
+
"@types/node": "^18.15.3",
|
|
17
|
+
"@webpack-cli/serve": "^2.0.5",
|
|
18
|
+
"webpack-dev-server": "^4.15.1",
|
|
19
|
+
"webpack": "^5.87.0",
|
|
20
|
+
"webpack-cli": "^5.1.4",
|
|
21
|
+
"axios": "^0.27.2",
|
|
22
|
+
"crypto-js": "^4.1.1",
|
|
23
|
+
"@types/crypto-js": "^4.1.1",
|
|
24
|
+
"@babel/core": "^7.22.5",
|
|
25
|
+
"@babel/plugin-transform-regenerator": "^7.22.5",
|
|
26
|
+
"@babel/plugin-transform-runtime": "^7.22.5",
|
|
27
|
+
"@babel/plugin-transform-object-assign": "^7.22.5",
|
|
28
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
29
|
+
"@babel/preset-env": "^7.22.5",
|
|
30
|
+
"@babel/preset-typescript": "^7.22.5",
|
|
31
|
+
"@babel/runtime-corejs3": "^7.22.5",
|
|
32
|
+
"@babel/plugin-transform-classes": "^7.22.5",
|
|
33
|
+
"core-js": "^3.31.0",
|
|
34
|
+
"babel-loader": "^9.1.2",
|
|
35
|
+
"css-loader": "^6.8.1",
|
|
36
|
+
"sass": "^1.63.4",
|
|
37
|
+
"sass-loader": "^13.3.2",
|
|
38
|
+
"style-loader": "^3.3.3",
|
|
39
|
+
"vite": "^5.0.10",
|
|
40
|
+
"vite-plugin-dts": "^3.6.4",
|
|
41
|
+
"vite-plugin-tsconfig": "^1.0.4"
|
|
42
|
+
},
|
|
43
|
+
"resolutions": {
|
|
44
|
+
"@webpack-cli/serve": "^1.3.1"
|
|
45
|
+
},
|
|
46
|
+
"keywords": [],
|
|
47
|
+
"author": "",
|
|
48
|
+
"license": "ISC",
|
|
49
|
+
"description": ""
|
|
50
|
+
}
|
|
51
|
+
;
|
|
52
|
+
|
|
53
|
+
export default _default;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TemplateManager } from "../../support/template-manager";
|
|
2
2
|
import { ConfirmModel } from "../../models/bootpay-interface";
|
|
3
|
-
import '../../stylesheets/common';
|
|
4
3
|
declare class TemplatePaymentManager extends TemplateManager {
|
|
5
4
|
$template: string;
|
|
6
5
|
$formId: string;
|
|
@@ -3,7 +3,7 @@ export declare class BootpayManager {
|
|
|
3
3
|
$present(value: any): boolean;
|
|
4
4
|
$type(value: any, type: string): boolean;
|
|
5
5
|
$uuid(): string;
|
|
6
|
-
$encrypt(data: any):
|
|
7
|
-
$decrypt(payload: string):
|
|
6
|
+
$encrypt(data: any): string;
|
|
7
|
+
$decrypt(payload: string): string;
|
|
8
8
|
getUserAgent(): string;
|
|
9
9
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.bootpay-progress-background{position:fixed;display:block;background-color:transparent;inset:0;text-align:center;z-index:200000;white-space:nowrap}.bootpay-progress-background.blur-off{background-color:transparent}.bootpay-progress-background:before{display:inline-block;height:100%;content:" ";vertical-align:middle}.bootpay-progress-background .progress-message-window{display:inline-block;text-align:center;max-width:600px;border-radius:3px;width:100%;background-color:transparent;padding:0;vertical-align:middle}@media (min-width: 600px){.bootpay-progress-background .progress-message-window{padding:1rem}}.bootpay-progress-background .progress-message-window .bootpay-spinner{display:inline-block;width:50px;height:50px;border-radius:50%;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2);border-left:2px solid #ffffff;animation:spin 1s infinite linear}.bootpay-progress-background .progress-message-window .alfred-text{margin-top:1rem}.bootpay-progress-background .progress-message-window .alfred-text span.alfred-inner-text{font-weight:400;color:#eee}@keyframes spin{0%{transform:rotate(0);border-left:2px solid #ffffff;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2)}50%{transform:rotate(180deg);border-left:3px solid #ffffff;border-top:2px solid rgba(255,255,255,.4);border-right:2px solid rgba(255,255,255,.4);border-bottom:2px solid rgba(255,255,255,.4)}to{transform:rotate(360deg);border-left:2px solid #ffffff;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2)}}body.bootpay-open{position:fixed!important;inset:0;padding:0;margin:0;height:100vh!important;overflow:hidden!important;-webkit-overflow-scrolling:auto!important}body.bootpay-open .bootpay-payment-background{position:fixed;inset:0;display:block;text-align:center;background-color:#000000b3;z-index:9999}body.bootpay-open .bootpay-payment-background:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:relative;display:inline-block;vertical-align:middle}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{max-width:470px;height:90%}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:absolute;inset:0;border-radius:0!important}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{position:absolute;max-width:inherit;inset:0;height:100%}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%!important;height:100%!important;border-radius:0}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{position:absolute;display:none;top:-32px;right:4px;color:#fff;font-size:32px;text-decoration:none;outline:none;box-shadow:none;border:0;background-color:transparent}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after{width:2px!important;background-color:#fff!important}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{top:1rem;right:16px;color:#000;padding:0}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after{width:2px!important;background-color:#000!important}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:relative;width:400px;height:600px;display:none;background-color:#fff;border-radius:5px;overflow:hidden}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:absolute;inset:0;width:100%;height:100%;border-radius:0}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header{position:absolute;left:0;right:0;top:0;height:50px;color:#333;background-color:#fff;text-align:left}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body{position:absolute;inset:50px 0 72px;padding:1rem;text-align:left;font-size:14px}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-item-name-id{font-size:16px;color:#888;font-weight:400!important;text-align:center}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-price-id{font-size:36px;color:#333;font-weight:700;text-align:center}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>.agree-text{position:absolute;bottom:1rem;left:0;right:0;color:#888;font-size:14px;text-align:center}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer{position:absolute;left:0;right:0;bottom:0;height:72px;padding:0 1rem;margin:0}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button{display:block;width:100%;padding:1rem;outline:none;border:none;background-color:#507cf3;border-radius:5px;color:#fff;font-size:16px}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:hover,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:active{outline:none;box-shadow:none}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%;height:100%;display:none;border:0!important;outline:0!important;border-radius:0;box-shadow:none}@media (min-width: 600px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:0;height:0;border:0;outline:0;border-radius:0!important;box-shadow:none!important}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{border-radius:20px}@media (min-width: 600px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{width:0;height:0;border:0;outline:0;border-radius:20px!important;box-shadow:none!important}}body.bootpay-open .bootpay-payment-background>.bootpay-confirm-window>iframe{display:none;width:1px;height:1px;background:transparent;border:0!important;outline:0!important}.bootpay-close-btn{position:absolute;box-shadow:none;background-color:#fff;outline:0;z-index:10001;right:8px;top:8px;height:21px;width:21px;border:2px solid #333}@media (min-width: 600px){.bootpay-close-btn{right:4px;top:-32px;width:25px;height:25px;border:0;background:transparent}}.bootpay-close-btn.active,.bootpay-close-btn:focus{border:0;outline:0}.bootpay-close-btn:before,.bootpay-close-btn:after{position:absolute;left:8px;top:2px;content:" ";height:15px;width:1px;background-color:#333}@media (min-width: 600px){.bootpay-close-btn:before,.bootpay-close-btn:after{height:23px;top:0;width:2px;background-color:#fff}}.bootpay-close-btn:before{transform:rotate(45deg)}.bootpay-close-btn:after{transform:rotate(-45deg)}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
html {
|
|
2
|
+
margin: 0;
|
|
3
|
+
padding: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
body {
|
|
7
|
+
margin: 0;
|
|
8
|
+
padding: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.container {
|
|
12
|
+
max-width: 600px;
|
|
13
|
+
margin: 0 auto;
|
|
14
|
+
width: 100%;
|
|
15
|
+
padding: 1rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.widget-background {
|
|
19
|
+
background-color: #e2e8f0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@media (max-width: 500px) {
|
|
23
|
+
|
|
24
|
+
.flex-container {
|
|
25
|
+
display: block;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.widget-left, .widget-right {
|
|
29
|
+
flex: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.widget-left .widget-container {
|
|
33
|
+
border-radius: 10px;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media (min-width: 500px) {
|
|
39
|
+
.flex-container {
|
|
40
|
+
display: flex;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.widget-left {
|
|
44
|
+
flex: 1;
|
|
45
|
+
padding: 1rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.widget-right {
|
|
49
|
+
flex: 0 500px;
|
|
50
|
+
padding: 1rem;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>결제 테스트 페이지 (개발서버)</title>
|
|
5
|
+
<meta charset="utf-8"/>
|
|
6
|
+
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"/>
|
|
7
|
+
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
|
8
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="none"/>
|
|
9
|
+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
|
|
10
|
+
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
|
11
|
+
<link rel="stylesheet" media="all" href="./css/style.css"/>
|
|
12
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
|
13
|
+
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
|
|
14
|
+
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
|
|
15
|
+
crossorigin="anonymous"></script>
|
|
16
|
+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
|
|
17
|
+
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
|
|
18
|
+
crossorigin="anonymous"></script>
|
|
19
|
+
<script src="../../bootpay-latest.js" type="application/javascript"></script>
|
|
20
|
+
<script src="./js/development-ehowlsla.js" type="application/javascript"></script>
|
|
21
|
+
<meta content="width=device-width, initial-scale=1, user-scalable=no" name="viewport">
|
|
22
|
+
</head>
|
|
23
|
+
<body>
|
|
24
|
+
<div class="container">
|
|
25
|
+
<div class="card">
|
|
26
|
+
<div class="card-header">
|
|
27
|
+
<h5 class="card-title">테스트 결제 페이지입니다</h5>
|
|
28
|
+
<h6 class="card-subtitle mb-2 text-muted">테스트 서버로 결제 요청을 할 수 있습니다.</h6>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="card-body">
|
|
31
|
+
<div class="form-group">
|
|
32
|
+
<label>결제할 금액</label>
|
|
33
|
+
<input class="form-control" value="100" name="amount"/>
|
|
34
|
+
</div>
|
|
35
|
+
<div class="form-group">
|
|
36
|
+
<label>면세로 설정할 금액</label>
|
|
37
|
+
<input class="form-control" value="0" name="taxFreeAmount"/>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="form-group">
|
|
40
|
+
<label>PG</label>
|
|
41
|
+
<select class="form-control" name="pg">
|
|
42
|
+
<option value="이니시스">이니시스</option>
|
|
43
|
+
<option value="다날">다날</option>
|
|
44
|
+
<option value="케이씨피">KCP</option>
|
|
45
|
+
<option value="나이스페이">나이스페이</option>
|
|
46
|
+
<option value="토스">토스</option>
|
|
47
|
+
<option value="스트라이프">스트라이프</option>
|
|
48
|
+
<option value="페이팔">페이팔</option>
|
|
49
|
+
<option value="페이레터">페이레터</option>
|
|
50
|
+
<option value="페이앱">페이앱</option>
|
|
51
|
+
<option value="이지페이">이지페이</option>
|
|
52
|
+
<option value="유디페이">유디페이</option>
|
|
53
|
+
<option value="페이코">페이코</option>
|
|
54
|
+
<option value="카카오">카카오</option>
|
|
55
|
+
<option value="세틀뱅크">세틀뱅크</option>
|
|
56
|
+
<option value="티페이">티페이</option>
|
|
57
|
+
<option value="웰컴페이먼츠">웰컴페이먼츠</option>
|
|
58
|
+
<option value="스마트로">스마트로</option>
|
|
59
|
+
</select>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="form-group">
|
|
62
|
+
<label>결제수단</label>
|
|
63
|
+
<select class="form-control" name="method">
|
|
64
|
+
<option value="카드">카드결제</option>
|
|
65
|
+
<option value="휴대폰">휴대폰</option>
|
|
66
|
+
<option value="계좌이체">계좌이체</option>
|
|
67
|
+
<option value="가상계좌">가상계좌</option>
|
|
68
|
+
<option value="카카오페이">카카오페이</option>
|
|
69
|
+
<option value="네이버페이">네이버페이</option>
|
|
70
|
+
<option value="페이코">페이코</option>
|
|
71
|
+
<option value="간편결제">간편결제</option>
|
|
72
|
+
<option value="카드정기결제">카드정기결제(창결제)</option>
|
|
73
|
+
<option value="정기결제">간편정기결제(창결제)</option>
|
|
74
|
+
<option value="디지털카드">디지털카드</option>
|
|
75
|
+
<option value="디지털정기결제">디지털정기결제</option>
|
|
76
|
+
<option value="본인인증">본인인증</option>
|
|
77
|
+
<option value="카드수기">카드수기결제</option>
|
|
78
|
+
</select>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="group text-center mt-3">
|
|
81
|
+
<button class="btn btn-primary" onclick="requestMethod()">
|
|
82
|
+
선택된 결제하기
|
|
83
|
+
</button>
|
|
84
|
+
<button class="btn btn-warning ml-2" onClick="requestTotalPayment()">
|
|
85
|
+
통합결제창
|
|
86
|
+
</button>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</body>
|
|
92
|
+
</html>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>결제 테스트 페이지 (개발서버)</title>
|
|
5
|
+
<meta charset="utf-8"/>
|
|
6
|
+
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"/>
|
|
7
|
+
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
|
8
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="none"/>
|
|
9
|
+
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
|
|
10
|
+
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
|
|
11
|
+
<link rel="stylesheet" media="all" href="./css/style.css"/>
|
|
12
|
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
|
13
|
+
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
|
|
14
|
+
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
|
|
15
|
+
crossorigin="anonymous"></script>
|
|
16
|
+
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
|
|
17
|
+
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
|
|
18
|
+
crossorigin="anonymous"></script>
|
|
19
|
+
<meta content="width=device-width, initial-scale=1, user-scalable=no" name="viewport">
|
|
20
|
+
<!-- Google Tag Manager -->
|
|
21
|
+
<script>(function (w, d, s, l, i) {
|
|
22
|
+
w[l] = w[l] || [];
|
|
23
|
+
w[l].push({
|
|
24
|
+
'gtm.start':
|
|
25
|
+
new Date().getTime(), event: 'gtm.js'
|
|
26
|
+
});
|
|
27
|
+
var f = d.getElementsByTagName(s)[0],
|
|
28
|
+
j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
|
|
29
|
+
j.async = true;
|
|
30
|
+
j.src =
|
|
31
|
+
'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
|
|
32
|
+
f.parentNode.insertBefore(j, f);
|
|
33
|
+
})(window, document, 'script', 'dataLayer', 'GTM-NQKMWJD');</script>
|
|
34
|
+
<!-- End Google Tag Manager -->
|
|
35
|
+
<script>
|
|
36
|
+
function popupOpen() {
|
|
37
|
+
window.open('https://l.bootpay.co.kr/l/Fh90Qy')
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
window.addEventListener('message', (e) => {
|
|
41
|
+
if (e.data !== undefined) {
|
|
42
|
+
let eventData = undefined
|
|
43
|
+
try {
|
|
44
|
+
eventData = JSON.parse(e.data)
|
|
45
|
+
} catch (e) {
|
|
46
|
+
console.log('event data json parse failed.')
|
|
47
|
+
return true
|
|
48
|
+
}
|
|
49
|
+
// 부트페이 이벤트에 해당되는 경우
|
|
50
|
+
if(eventData.bootpay_event) {
|
|
51
|
+
console.log(eventData)
|
|
52
|
+
// 오류인 경우
|
|
53
|
+
// event: error, cancel
|
|
54
|
+
// error_code: 부트페이 오류코드
|
|
55
|
+
// message: 오류 내용
|
|
56
|
+
// pg_error_code: PG 오류코드
|
|
57
|
+
|
|
58
|
+
// 결제 승인된 경우
|
|
59
|
+
// event: done
|
|
60
|
+
// data: { // 리턴되는 데이터
|
|
61
|
+
//
|
|
62
|
+
// }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
</script>
|
|
67
|
+
</head>
|
|
68
|
+
<body>
|
|
69
|
+
<button onClick="popupOpen()">팝업으로 진행하기</button>
|
|
70
|
+
<iframe style="width:100%;height: 100vh; border: 0;" src="https://l.bootpay.co.kr/l/Fh90Qy"></iframe>
|
|
71
|
+
</body>
|