@bootpay/client-js 5.2.0-rc.1 → 5.2.0-rc.2
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.mjs +5 -4
- package/dist/index.umd.js +3 -3
- package/dist/src/bootpay.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -861,7 +861,7 @@ class Ws extends Ns {
|
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
863
|
}
|
|
864
|
-
const $e = new Ws(), Ms = "@bootpay/client-js", Ls = "5.2.0-rc.
|
|
864
|
+
const $e = new Ws(), Ms = "@bootpay/client-js", Ls = "5.2.0-rc.2", qs = "dist/index.mjs", zs = {
|
|
865
865
|
".": {
|
|
866
866
|
import: "./dist/index.mjs",
|
|
867
867
|
types: "./dist/index.d.ts"
|
|
@@ -3666,7 +3666,8 @@ class hn extends Ce {
|
|
|
3666
3666
|
* @date: 2021-06-23
|
|
3667
3667
|
*/
|
|
3668
3668
|
hidePopupMessage() {
|
|
3669
|
-
|
|
3669
|
+
var e;
|
|
3670
|
+
(e = this.byId(this.$popupWindow)) == null || e.style.setProperty("display", "none");
|
|
3670
3671
|
}
|
|
3671
3672
|
/**
|
|
3672
3673
|
* 결제창을 삭제한다
|
|
@@ -4392,8 +4393,8 @@ const Pe = {
|
|
|
4392
4393
|
* Comment by GOSOMI
|
|
4393
4394
|
* @date: 2021-06-23
|
|
4394
4395
|
*/
|
|
4395
|
-
readyToPopup() {
|
|
4396
|
-
M.readyToPopup();
|
|
4396
|
+
readyToPopup(r = void 0) {
|
|
4397
|
+
M.readyToPopup(r);
|
|
4397
4398
|
},
|
|
4398
4399
|
/**
|
|
4399
4400
|
* 로그 레벨을 설정한다
|
package/dist/index.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.bootpay-progress-background{position:fixed;display:block;background-color:transparent;left:0;right:0;top:0;bottom: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)}}:root{--bootpay-popup-bottom: 72px;--bootpay-primary: #507cf3;--bootpay-primary-hover: #3f6be2;--bootpay-white: #ffffff;--bootpay-black: #000000;--bootpay-gray-dark: #333333;--bootpay-gray-light: #888888;--bootpay-gray-bg: #f2f2f2;--bootpay-overlay: rgba(0, 0, 0, .7);--bootpay-radius: 12px;--bootpay-radius-sm: 5px;--bootpay-radius-lg: 16px;--bootpay-radius-xl: 20px;--bootpay-radius-xxl: 24px;--bootpay-shadow: 0 0 10px rgba(0, 0, 0, .1);--bootpay-z-modal: 9999;--bootpay-z-spinner: 200000;--bootpay-z-close: 10001}body.bootpay-open{position:fixed!important;left:0;right:0;bottom:0;top:0;padding:0;margin:0;height:100vh!important;overflow:hidden!important;-webkit-overflow-scrolling:auto!important}body.bootpay-inherit .fade-in,body.bootpay-open .fade-in{animation:__bootpay-fade-in .1s linear}body.bootpay-inherit .fade-out,body.bootpay-open .fade-out{animation:__bootpay-fade-out .1s linear}body.bootpay-inherit .slide-up,body.bootpay-open .slide-up{animation:__bootpay-slide-up .3s cubic-bezier(.25,.46,.45,.94) forwards!important}@media (max-width: 600px){body.bootpay-inherit .slide-up,body.bootpay-open .slide-up{animation:__bootpay-slide-up-mobile .1s cubic-bezier(.25,.46,.45,.94) forwards!important}}body.bootpay-inherit .slide-down,body.bootpay-open .slide-down{animation:__bootpay-slide-down .1s ease-in forwards!important}@media (max-width: 600px){body.bootpay-inherit .slide-down,body.bootpay-open .slide-down{animation:__bootpay-slide-down-mobile .1s ease-in forwards!important}}body.bootpay-inherit.bootpay-mobile .bootpay-payment-background,body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:transparent}@media (min-width: 600px){body.bootpay-inherit.bootpay-mobile .bootpay-payment-background,body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:var(--bootpay-overlay)}}body.bootpay-inherit .bootpay-transparent-background,body.bootpay-open .bootpay-transparent-background{position:relative;height:100%;z-index:var(--bootpay-z-modal)}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window{position:relative;display:block;width:500px;height:auto}@media (max-width: 768px){body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window{width:100%}}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window.__mobile,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window.__mobile{max-width:470px;height:90%}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window>iframe,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window>iframe{width:100%!important;border-radius:0}body.bootpay-inherit .bootpay-transparent-background>.bootpay-payment-window>iframe.transparent,body.bootpay-open .bootpay-transparent-background>.bootpay-payment-window>iframe.transparent{background:transparent!important}body.bootpay-inherit .bootpay-payment-background,body.bootpay-open .bootpay-payment-background{position:fixed;left:0;right:0;top:0;bottom:0;display:block;text-align:center;background-color:var(--bootpay-overlay);z-index:var(--bootpay-z-modal)}body.bootpay-inherit .bootpay-payment-background:before,body.bootpay-open .bootpay-payment-background:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-inherit .bootpay-payment-background.__alert,body.bootpay-open .bootpay-payment-background.__alert{padding:1rem}body.bootpay-inherit .bootpay-payment-background.__alert:before,body.bootpay-open .bootpay-payment-background.__alert:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-inherit .bootpay-payment-background.__alert>.slider-window,body.bootpay-open .bootpay-payment-background.__alert>.slider-window{max-width:480px;position:absolute;width:100%;background-color:var(--bootpay-white);border-radius:24px;left:50%;top:50%;transform:translate(-50%,-50%);overflow:hidden;box-shadow:0 10px 40px #00000014,0 4px 12px #0000000a;border:1px solid #f1f5f9}body.bootpay-inherit .bootpay-payment-background.__alert>.slider-window.__bootpay-hidden,body.bootpay-open .bootpay-payment-background.__alert>.slider-window.__bootpay-hidden{display:none}@media (max-width: 600px){body.bootpay-inherit .bootpay-payment-background.__alert>.slider-window,body.bootpay-open .bootpay-payment-background.__alert>.slider-window{left:0;right:0;bottom:0;width:100%;max-width:inherit;top:auto;border-bottom-left-radius:0;border-bottom-right-radius:0;transform:translateY(0) translate(0)}}body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window{position:absolute;max-width:400px;width:100%;background-color:var(--bootpay-white);border-radius:var(--bootpay-radius);left:50%;top:50%;transform:translate(-50%,-50%);overflow:hidden;box-shadow:var(--bootpay-shadow)}@media (max-width: 768px){body.bootpay-inherit .bootpay-payment-background.__alert>.bootpay-confirm-window,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window{left:1rem;right:1rem;width:auto;top:50%;transform:translateY(-50%)}}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header{padding:1.5rem 2rem 1rem;text-align:left;font-size:20px;font-weight:700;position:relative;background-color:var(--bootpay-white);border-bottom:1px solid #f1f5f9}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header.__text-center,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header.__text-center,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header.__text-center,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header.__text-center{text-align:center}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn{top:40%;transform:translateY(-50%);padding:0;right:1rem}@media (min-width: 600px){body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn{right:8px;top:50%;transform:translateY(-55%)}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:after,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn:after,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:after,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-header>.bootpay-close-btn:after{background-color:var(--bootpay-gray-dark);width:1px}}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body{padding:.5rem 1rem 1.5rem;text-align:center;font-size:16px;color:var(--bootpay-gray-dark);line-height:1.5;background:transparent}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body.slider-body,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body.slider-body,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body.slider-body,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body.slider-body{padding:1.5rem 2rem 2rem;background:transparent}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button{display:inline-block;width:100%;padding:1rem 1.5rem;color:#64748b;font-size:16px;font-weight:500;border-radius:16px;outline:none;border:2px solid transparent;cursor:pointer;margin-top:1rem;background-color:#f8fafc;transition:all .3s cubic-bezier(.4,0,.2,1);position:relative}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button:first-child,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:first-child,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button:first-child,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:first-child{margin-top:0}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button:hover,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:hover,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button:hover,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button:hover{border-color:var(--bootpay-primary);background-color:#f0f4ff;color:var(--bootpay-primary);transform:translateY(-2px);box-shadow:0 8px 25px #507cf326}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button.active,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button.active,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-body button.bootpay__slider-button.active,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-body button.bootpay__slider-button.active{background-color:var(--bootpay-primary);color:var(--bootpay-white);font-weight:600;border-color:var(--bootpay-primary);transform:translateY(-1px);box-shadow:0 12px 30px #507cf340,0 0 0 3px #507cf31a}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer{display:flex;justify-content:flex-end;border-top:1px solid var(--bootpay-gray-bg)}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close{flex:0 1 50%;padding:1rem;background-color:var(--bootpay-white);color:var(--bootpay-gray-dark);font-size:16px;cursor:pointer;border:0;outline:none}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.border-right,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.border-right,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.border-right,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.border-right{border-right:1px solid var(--bootpay-gray-bg)}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close:hover,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close:hover,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close:hover,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close:hover{background-color:#e0e0e0}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary{color:var(--bootpay-primary);font-weight:600}body.bootpay-inherit .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover,body.bootpay-inherit .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover,body.bootpay-open .bootpay-payment-background.__alert .bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover,body.bootpay-open .bootpay-payment-background.__alert .slider-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover{color:var(--bootpay-primary-hover)}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:relative;display:inline-block;vertical-align:middle}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.__mobile,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{max-width:470px;height:90%}@media (max-width: 768px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:absolute;left:0;right:0;top:0;bottom:0;border-radius:0!important}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window.__mobile,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{position:absolute;max-width:inherit;left:0;right:0;top:0;bottom:0;height:100%}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%!important;height:100%!important;border-radius:0}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.transparent,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.transparent{background:transparent!important}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{position:absolute;display:none;top:-32px;right:4px;color:var(--bootpay-white);font-size:32px;text-decoration:none;outline:none;box-shadow:none;border:0;background-color:transparent}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after,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:var(--bootpay-white)!important}@media (max-width: 768px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{top:1rem;right:16px;color:var(--bootpay-black);padding:0}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after,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:var(--bootpay-black)!important}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:relative;width:400px;height:600px;display:none;background-color:var(--bootpay-white);border-radius:var(--bootpay-radius-sm);overflow:hidden}@media (max-width: 768px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:absolute;left:0;top:0;bottom:0;right:0;width:100%;height:100%;border-radius:0}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header{position:absolute;left:0;right:0;top:0;height:50px;color:var(--bootpay-gray-dark);background-color:var(--bootpay-white);text-align:left}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body{position:absolute;left:0;right:0;top:50px;bottom:var(--bootpay-popup-bottom);padding:1rem;text-align:left;font-size:14px}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-item-name-id,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-item-name-id{font-size:16px;color:var(--bootpay-gray-light);font-weight:400!important;text-align:center}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-price-id,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-price-id{font-size:36px;color:var(--bootpay-gray-dark);font-weight:700;text-align:center;line-height:normal}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>.agree-text,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>.agree-text{position:absolute;bottom:1rem;left:0;right:0;color:var(--bootpay-gray-light);font-size:14px;text-align:center}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer{position:absolute;left:0;right:0;bottom:0;height:var(--bootpay-popup-bottom);padding:0 1rem;margin:0}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button,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:var(--bootpay-primary);border-radius:var(--bootpay-radius-sm);color:#fff;font-size:16px}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:hover,body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:active,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-inherit .bootpay-payment-background>.bootpay-payment-window>iframe,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-inherit .bootpay-payment-background>.bootpay-payment-window>iframe,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-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{border-radius:0}@media (min-width: 600px){body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{width:0;height:0;border:0;outline:0;border-radius:var(--bootpay-radius-xl)!important;box-shadow:none!important}}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-up,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-up{animation:__bootpay-slide-up .3s linear}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-down,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window #__bootpay-modal-iframe.slide-down{animation:__bootpay-slide-down .3s linear}body.bootpay-inherit .bootpay-payment-background>.bootpay-payment-window>.bootpay-confirm-window>iframe,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.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:transparent;outline:0;z-index:var(--bootpay-z-close);right:8px;top:8px;height:21px;width:21px;border:0!important;outline:none!important}@media (min-width: 600px){.bootpay-close-btn{right:4px;top:-32px;width:25px;height:25px;background:transparent;outline:none!important;border:0!important}}.bootpay-close-btn.active,.bootpay-close-btn:focus{outline:none!important;border:0!important}.bootpay-close-btn:before,.bootpay-close-btn:after{position:absolute;left:8px;top:2px;content:" ";height:24px;width:1px;background-color:var(--bootpay-gray-dark)}@media (min-width: 600px){.bootpay-close-btn:before,.bootpay-close-btn:after{height:23px;top:0;width:2px;background-color:var(--bootpay-white)}}.bootpay-close-btn:before{transform:rotate(45deg)}.bootpay-close-btn:after{transform:rotate(-45deg)}@keyframes __bootpay-slide-up{0%{transform:translate(-50%,150%);opacity:1}to{transform:translate(-50%,-50%);opacity:1}}@keyframes __bootpay-slide-down{0%{transform:translate(-50%,-50%);opacity:1}to{transform:translate(-50%,150%);opacity:1}}@keyframes __bootpay-slide-up-mobile{0%{transform:translateY(100%);opacity:1}to{transform:translateY(0);opacity:1}}@keyframes __bootpay-slide-down-mobile{0%{transform:translateY(0);opacity:1}to{transform:translateY(100%);opacity:1}}@keyframes __bootpay-fade-in{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes __bootpay-fade-out{0%{opacity:1;scale:1}to{opacity:0;scale:.9}}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
(function(me,Z){typeof exports=="object"&&typeof module<"u"?Z(exports):typeof define=="function"&&define.amd?define(["exports"],Z):(me=typeof globalThis<"u"?globalThis:me||self,Z(me.Bootpay={}))})(this,function(me){"use strict";const Z={PLATFORM:{JS:1,ANDROID:2,IOS:3,REST:4},STORAGE_PREFIX(r){return`__bootpay_track_${r}__`}},P0=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{let e=Math.random()*16|0;return(r=="x"?e:e&3|8).toString(16)}),se=r=>{let e=!1;return typeof r=="string"||Array.isArray(r)?e=r.length===0:e=r==null||ze(r,"object")&&r.constructor===Object&&Object.keys(r).length===0,e},q=r=>!se(r),ze=(r,e)=>typeof r===e,Bs=(r,e=void 0)=>{if(q(e)){const t=typeof e!="string"?new URLSearchParams(JSON.parse(JSON.stringify(e))).toString():e;return/\?/.test(r)?`${r}&${t}`:`${r}?${t}`}else return r},yt=(r,e)=>{for(let t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r};var N=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Te(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function bs(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(s){var i=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:function(){return r[s]}})}),t}var S0={exports:{}};function _s(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var mt={exports:{}};const Cs=bs(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var I0;function L(){return I0||(I0=1,function(r,e){(function(t,s){r.exports=s()})(N,function(){var t=t||function(s,i){var n;if(typeof window<"u"&&window.crypto&&(n=window.crypto),typeof self<"u"&&self.crypto&&(n=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window<"u"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof N<"u"&&N.crypto&&(n=N.crypto),!n&&typeof _s=="function")try{n=Cs}catch{}var m=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},x=Object.create||function(){function d(){}return function(l){var v;return d.prototype=l,v=new d,d.prototype=null,v}}(),p={},a=p.lib={},c=a.Base=function(){return{extend:function(d){var l=x(this);return d&&l.mixIn(d),(!l.hasOwnProperty("init")||this.init===l.init)&&(l.init=function(){l.$super.init.apply(this,arguments)}),l.init.prototype=l,l.$super=this,l},create:function(){var d=this.extend();return d.init.apply(d,arguments),d},init:function(){},mixIn:function(d){for(var l in d)d.hasOwnProperty(l)&&(this[l]=d[l]);d.hasOwnProperty("toString")&&(this.toString=d.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=a.WordArray=c.extend({init:function(d,l){d=this.words=d||[],l!=i?this.sigBytes=l:this.sigBytes=d.length*4},toString:function(d){return(d||u).stringify(this)},concat:function(d){var l=this.words,v=d.words,E=this.sigBytes,_=d.sigBytes;if(this.clamp(),E%4)for(var A=0;A<_;A++){var w=v[A>>>2]>>>24-A%4*8&255;l[E+A>>>2]|=w<<24-(E+A)%4*8}else for(var I=0;I<_;I+=4)l[E+I>>>2]=v[I>>>2];return this.sigBytes+=_,this},clamp:function(){var d=this.words,l=this.sigBytes;d[l>>>2]&=4294967295<<32-l%4*8,d.length=s.ceil(l/4)},clone:function(){var d=c.clone.call(this);return d.words=this.words.slice(0),d},random:function(d){for(var l=[],v=0;v<d;v+=4)l.push(m());return new g.init(l,d)}}),o=p.enc={},u=o.Hex={stringify:function(d){for(var l=d.words,v=d.sigBytes,E=[],_=0;_<v;_++){var A=l[_>>>2]>>>24-_%4*8&255;E.push((A>>>4).toString(16)),E.push((A&15).toString(16))}return E.join("")},parse:function(d){for(var l=d.length,v=[],E=0;E<l;E+=2)v[E>>>3]|=parseInt(d.substr(E,2),16)<<24-E%8*4;return new g.init(v,l/2)}},f=o.Latin1={stringify:function(d){for(var l=d.words,v=d.sigBytes,E=[],_=0;_<v;_++){var A=l[_>>>2]>>>24-_%4*8&255;E.push(String.fromCharCode(A))}return E.join("")},parse:function(d){for(var l=d.length,v=[],E=0;E<l;E++)v[E>>>2]|=(d.charCodeAt(E)&255)<<24-E%4*8;return new g.init(v,l)}},y=o.Utf8={stringify:function(d){try{return decodeURIComponent(escape(f.stringify(d)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(d){return f.parse(unescape(encodeURIComponent(d)))}},h=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(d){typeof d=="string"&&(d=y.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},_process:function(d){var l,v=this._data,E=v.words,_=v.sigBytes,A=this.blockSize,w=A*4,I=_/w;d?I=s.ceil(I):I=s.max((I|0)-this._minBufferSize,0);var B=I*A,C=s.min(B*4,_);if(B){for(var F=0;F<B;F+=A)this._doProcessBlock(E,F);l=E.splice(0,B),v.sigBytes-=C}return new g.init(l,C)},clone:function(){var d=c.clone.call(this);return d._data=this._data.clone(),d},_minBufferSize:0});a.Hasher=h.extend({cfg:c.extend(),init:function(d){this.cfg=this.cfg.extend(d),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(d){return this._append(d),this._process(),this},finalize:function(d){d&&this._append(d);var l=this._doFinalize();return l},blockSize:16,_createHelper:function(d){return function(l,v){return new d.init(v).finalize(l)}},_createHmacHelper:function(d){return function(l,v){return new b.HMAC.init(d,v).finalize(l)}}});var b=p.algo={};return p}(Math);return t})}(mt)),mt.exports}(function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return t.enc.Utf8})})(S0);var As=S0.exports;const T0=Te(As);var Et={exports:{}},R0;function Be(){return R0||(R0=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,m=s.enc;m.Base64={stringify:function(p){var a=p.words,c=p.sigBytes,g=this._map;p.clamp();for(var o=[],u=0;u<c;u+=3)for(var f=a[u>>>2]>>>24-u%4*8&255,y=a[u+1>>>2]>>>24-(u+1)%4*8&255,h=a[u+2>>>2]>>>24-(u+2)%4*8&255,b=f<<16|y<<8|h,d=0;d<4&&u+d*.75<c;d++)o.push(g.charAt(b>>>6*(3-d)&63));var l=g.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("")},parse:function(p){var a=p.length,c=this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var o=0;o<c.length;o++)g[c.charCodeAt(o)]=o}var u=c.charAt(64);if(u){var f=p.indexOf(u);f!==-1&&(a=f)}return x(p,a,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function x(p,a,c){for(var g=[],o=0,u=0;u<a;u++)if(u%4){var f=c[p.charCodeAt(u-1)]<<u%4*2,y=c[p.charCodeAt(u)]>>>6-u%4*2,h=f|y;g[o>>>2]|=h<<24-o%4*8,o++}return n.create(g,o)}}(),t.enc.Base64})}(Et)),Et.exports}var ws=Be();const Re=Te(ws);class je{$blank(e){return se(e)}$present(e){return!this.$blank(e)}$type(e,t){return ze(e,t)}$uuid(){return P0()}$encrypt(e){return this.$type(e,"object")&&(e=JSON.stringify(e)),Re.stringify(T0.parse(e))}$decrypt(e){return T0.stringify(Re.parse(e))}getUserAgent(){return window.navigator.userAgent}}const Ke={debug:1,info:2,warning:3,error:4},H={level:Ke.warning,setLogLevel(r){this.level=r},messageStringify(r,e){try{return e=`${r}: ${ze(e,"object")?JSON.stringify(e):e}`}catch(t){console.error(`log parse error: ${t}`)}},debug(r,e){this.level<=Ke.debug&&console.log(this.messageStringify(r,e))},info(r,e){this.level<=Ke.info&&console.info(this.messageStringify(r,e))},warn(r,e){this.level<=Ke.warning&&console.warn(this.messageStringify(r,e))},error(r,e){this.level<=Ke.error&&console.error(this.messageStringify(r,e))}};class Fs extends je{constructor(){super(),this.$storage={}}get(e){let t="";try{t=window.localStorage.getItem(e)}catch{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{this.$storage[e]=this.$encrypt(t)}return t}currentUserUUID(){const e=Z.STORAGE_PREFIX("uuid"),t=this.get(e);return this.$blank(t)?this.set(e,this.$uuid()):t}setUUID(e){const t=Z.STORAGE_PREFIX("uuid");return this.set(t,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{return JSON.parse(e.replace(/\\\"/g,'"'))}}}class Ds extends Fs{constructor(){super(),this.currentUserUUID()}currentSessionKey(){const e=Math.round(new Date().getTime()/1e3),t=Z.STORAGE_PREFIX("session"),s=this.getToJSON(t);return this.$blank(s)||s.time+1800<e?this.setToJSON(t,{time:e,term:this.$blank(s)?-1:e-s.time,uuid:`${this.$uuid()}-${e}`}).uuid:s.uuid}currentTimeTerm(){const e=Z.STORAGE_PREFIX("session"),t=this.getToJSON(e);return this.$blank(t.term)?-1:t.term}currentTime(){const e=Z.STORAGE_PREFIX("session"),t=this.getToJSON(e);return this.$blank(t.time)?-1:t.time}setTime(e){const t=Math.round(new Date().getTime()/1e3),s=Z.STORAGE_PREFIX("session"),i=this.getToJSON(s),n=this.$blank(i)?{time:e>0?e:t,term:e>0?t-e:-1,uuid:`${this.$uuid()}-${t}`}:i;n.time=e,this.setToJSON(s,n)}generateKey(){return`${this.$uuid()}-${new Date().getTime()}`}setUser(e){return this.set(Z.STORAGE_PREFIX("user"),e===void 0?void 0:JSON.stringify(e)),e}getUser(){try{return JSON.parse(this.get(Z.STORAGE_PREFIX("user")))}catch(e){H.error("User Storage",`사용자 정보를 추출하는데 실패하였습니다. [ ${e.message} ]`);return}}}const De=new Ds,$e={name:"@bootpay/client-js",version:"5.2.0-rc.1",main:"dist/index.mjs",exports:{".":{import:"./dist/index.mjs",types:"./dist/index.d.ts"}},styles:"dist/index.css",scripts:{test:'echo "Error: no test specified" && exit 1',build:"rm -rf ./dist && vite build",deploy:"NODE_ENV=production ./node_modules/.bin/webpack --output-path=./dist --mode=production && gzip -kf dist/*.min.js && ./webview.sh $npm_package_version"},dependencies:{typescript:"^5.5.4"},devDependencies:{"@types/ws":"^8.5.5","@types/node":"^18.15.3","@webpack-cli/serve":"^2.0.5","webpack-dev-server":"^4.15.1",webpack:"^5.87.0","webpack-cli":"^5.1.4",axios:"^0.27.2","crypto-js":"^4.1.1","@types/crypto-js":"^4.1.1","@babel/core":"^7.22.5","@babel/plugin-transform-regenerator":"^7.22.5","@babel/plugin-transform-runtime":"^7.22.5","@babel/plugin-transform-object-assign":"^7.22.5","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-transform-destructuring":"^7.24.8","@babel/plugin-proposal-export-default-from":"^7.27.1","@babel/plugin-transform-class-properties":"^7.27.1","@babel/plugin-proposal-decorators":"^7.28.0","@babel/plugin-transform-private-methods":"^7.27.1","@babel/plugin-transform-typescript":"^7.28.0","@babel/preset-env":"^7.22.5","@babel/preset-typescript":"^7.22.5","@babel/runtime-corejs3":"^7.22.5","@babel/plugin-transform-classes":"^7.22.5","core-js":"^3.31.0","babel-loader":"^9.1.2","css-loader":"^6.8.1",sass:"^1.63.4","sass-loader":"^13.3.2","style-loader":"^3.3.3",vite:"^5.4.3","vite-plugin-dts":"^3.6.4","vite-plugin-tsconfig":"^1.0.4","vite-plugin-css-injected-by-js":"3.3.1"},resolutions:{"@webpack-cli/serve":"^1.3.1"},keywords:[],author:"",license:"ISC",description:""},R={mode:"production",locale:"ko",isSetLocale:!1,packageVersion:$e.version,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(r){this.mode=r},setApplicationId(r){return this.applicationId=r,this.currentApplicationId(void 0)},setLocale(r){this.locale=r,this.isSetLocale=!0},currentApplicationId(r=void 0){return r===void 0?this.applicationId:r},setDevelopmentHost(r){this.API_URL.development=this.API_URL.development.replace(/dev-api.bootpay.co.kr\/v2/gi,r)},setVersion(r,e,t=void 0){this.sdkName=this.sdkNames[e]===void 0?0:this.sdkNames[e],this.sdkVersion=r,this.packageVersion=t===void 0||t===""?$e.version:t},toApi(r){return[this.API_URL[this.mode],r].join("/")},toDoor(r){return[this.DOOR_URL[this.mode],r].join("/")},toWidget(r){return[this.WIDGET_URL[this.mode],r].join("/")},isMobile(){if(typeof window>"u")return!1;const r=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(r)},isMobileSafari(){if(typeof window>"u")return!1;const r=window.navigator.userAgent;return(r.match(/iPad/i)||r.match(/iPhone/i))&&!r.match(/CriOS/i)},toAnalytics(r){return[this.ANALYTICS_URL[this.mode],r].join("/")}};class xe extends Error{constructor(e){super(),this.name="BootpayEventError",this.eventMessage=e}}const ke={__BOOTPAY_NAMESPACE:{},isBind:!1,initialize(){this.isBind||(typeof window<"u"&&(window.addBootpayEventListener=this.on,window.removeBootpayEventListener=this.off,window.resetBootpayEventListener=function(r,e,t){this.removeBootpayEventListener(r).addBootpayEventListener(r,e,t)}),typeof document<"u"&&(document.addBootpayEventListener=this.on,document.removeBootpayEventListener=this.off,document.resetBootpayEventListener=function(r,e,t){this.removeBootpayEventListener(r).addBootpayEventListener(r,e,t)}),typeof Element<"u"&&(Element.prototype.addBootpayEventListener=this.on,Element.prototype.removeBootpayEventListener=this.off,Element.prototype.resetBootpayEventListener=function(r,e,t){this.removeBootpayEventListener(r).addBootpayEventListener(r,e,t)}),this.isBind=!0)},on(r,e,t=void 0){return se(ke.__BOOTPAY_NAMESPACE)&&(ke.__BOOTPAY_NAMESPACE={}),this.addEventListener(r.split(".")[0],e,t||!1),ke.__BOOTPAY_NAMESPACE[r]=e,this},off(r){return q(ke.__BOOTPAY_NAMESPACE)&&q(ke.__BOOTPAY_NAMESPACE[r])&&this.removeEventListener(r.split(".")[0],ke.__BOOTPAY_NAMESPACE[r]),this}};class it extends je{constructor(e){super(),this.$resolve=null,this.$reject=null,this.$messageEventName=(e==null?void 0:e.messageEventName)??"message.BootpayEvent",this.$eventHooks=(e==null?void 0:e.messageEventHooks)??{},this.afterBind=e==null?void 0:e.afterBind,this.$childInstance=null,ke.initialize()}setChildInstance(e){this.$childInstance=e}bind(e,t){this.$messageEventName&&window.resetBootpayEventListener(this.$messageEventName,s=>{const i=this.parseEvent(s.data);if(H.debug("event received",JSON.stringify(i)),q(i)&&q(i.event)){const n=this.hookFunction(i.hook);if(q(n)&&q(n[i.event]))return n[i.event](i.data,this);H.debug("event",`${this.$messageEventName}: ${i.event} is not defined`)}}),this.afterBind&&this.afterBind(),this.setCallbackFunction(e,t)}hookFunction(e){return this.$eventHooks[e]}reject(e){q(this.$reject)&&this.$reject(e)}resolve(e){q(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(s){H.info("json parsing failed",`data: ${e}, message: ${Ge(s)} JSON 파싱 형태가 아닌 이벤트 입니다.`)}return t.bootpay_event?(delete t.bootpay_event,t):null}else return null}}const Ge=r=>typeof r=="string"?r.toUpperCase():r instanceof Error?r.message:r;class be extends je{constructor(e={}){super();const{iframeId:t="bootpay-iframe",template:s=this.defaultIframeHtml(),el:i=void 0}=e;this.el=i,this.$windowId=t,this.$template=s}defaultIframeHtml(){return`
|
|
2
|
+
(function(me,Z){typeof exports=="object"&&typeof module<"u"?Z(exports):typeof define=="function"&&define.amd?define(["exports"],Z):(me=typeof globalThis<"u"?globalThis:me||self,Z(me.Bootpay={}))})(this,function(me){"use strict";const Z={PLATFORM:{JS:1,ANDROID:2,IOS:3,REST:4},STORAGE_PREFIX(r){return`__bootpay_track_${r}__`}},P0=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{let e=Math.random()*16|0;return(r=="x"?e:e&3|8).toString(16)}),se=r=>{let e=!1;return typeof r=="string"||Array.isArray(r)?e=r.length===0:e=r==null||ze(r,"object")&&r.constructor===Object&&Object.keys(r).length===0,e},q=r=>!se(r),ze=(r,e)=>typeof r===e,Bs=(r,e=void 0)=>{if(q(e)){const t=typeof e!="string"?new URLSearchParams(JSON.parse(JSON.stringify(e))).toString():e;return/\?/.test(r)?`${r}&${t}`:`${r}?${t}`}else return r},yt=(r,e)=>{for(let t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r};var N=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Te(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function bs(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(s){var i=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:function(){return r[s]}})}),t}var S0={exports:{}};function _s(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var mt={exports:{}};const Cs=bs(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var I0;function L(){return I0||(I0=1,function(r,e){(function(t,s){r.exports=s()})(N,function(){var t=t||function(s,i){var n;if(typeof window<"u"&&window.crypto&&(n=window.crypto),typeof self<"u"&&self.crypto&&(n=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window<"u"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof N<"u"&&N.crypto&&(n=N.crypto),!n&&typeof _s=="function")try{n=Cs}catch{}var m=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},x=Object.create||function(){function d(){}return function(l){var v;return d.prototype=l,v=new d,d.prototype=null,v}}(),p={},a=p.lib={},c=a.Base=function(){return{extend:function(d){var l=x(this);return d&&l.mixIn(d),(!l.hasOwnProperty("init")||this.init===l.init)&&(l.init=function(){l.$super.init.apply(this,arguments)}),l.init.prototype=l,l.$super=this,l},create:function(){var d=this.extend();return d.init.apply(d,arguments),d},init:function(){},mixIn:function(d){for(var l in d)d.hasOwnProperty(l)&&(this[l]=d[l]);d.hasOwnProperty("toString")&&(this.toString=d.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=a.WordArray=c.extend({init:function(d,l){d=this.words=d||[],l!=i?this.sigBytes=l:this.sigBytes=d.length*4},toString:function(d){return(d||u).stringify(this)},concat:function(d){var l=this.words,v=d.words,E=this.sigBytes,_=d.sigBytes;if(this.clamp(),E%4)for(var A=0;A<_;A++){var w=v[A>>>2]>>>24-A%4*8&255;l[E+A>>>2]|=w<<24-(E+A)%4*8}else for(var I=0;I<_;I+=4)l[E+I>>>2]=v[I>>>2];return this.sigBytes+=_,this},clamp:function(){var d=this.words,l=this.sigBytes;d[l>>>2]&=4294967295<<32-l%4*8,d.length=s.ceil(l/4)},clone:function(){var d=c.clone.call(this);return d.words=this.words.slice(0),d},random:function(d){for(var l=[],v=0;v<d;v+=4)l.push(m());return new g.init(l,d)}}),o=p.enc={},u=o.Hex={stringify:function(d){for(var l=d.words,v=d.sigBytes,E=[],_=0;_<v;_++){var A=l[_>>>2]>>>24-_%4*8&255;E.push((A>>>4).toString(16)),E.push((A&15).toString(16))}return E.join("")},parse:function(d){for(var l=d.length,v=[],E=0;E<l;E+=2)v[E>>>3]|=parseInt(d.substr(E,2),16)<<24-E%8*4;return new g.init(v,l/2)}},f=o.Latin1={stringify:function(d){for(var l=d.words,v=d.sigBytes,E=[],_=0;_<v;_++){var A=l[_>>>2]>>>24-_%4*8&255;E.push(String.fromCharCode(A))}return E.join("")},parse:function(d){for(var l=d.length,v=[],E=0;E<l;E++)v[E>>>2]|=(d.charCodeAt(E)&255)<<24-E%4*8;return new g.init(v,l)}},y=o.Utf8={stringify:function(d){try{return decodeURIComponent(escape(f.stringify(d)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(d){return f.parse(unescape(encodeURIComponent(d)))}},h=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(d){typeof d=="string"&&(d=y.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},_process:function(d){var l,v=this._data,E=v.words,_=v.sigBytes,A=this.blockSize,w=A*4,I=_/w;d?I=s.ceil(I):I=s.max((I|0)-this._minBufferSize,0);var B=I*A,C=s.min(B*4,_);if(B){for(var F=0;F<B;F+=A)this._doProcessBlock(E,F);l=E.splice(0,B),v.sigBytes-=C}return new g.init(l,C)},clone:function(){var d=c.clone.call(this);return d._data=this._data.clone(),d},_minBufferSize:0});a.Hasher=h.extend({cfg:c.extend(),init:function(d){this.cfg=this.cfg.extend(d),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(d){return this._append(d),this._process(),this},finalize:function(d){d&&this._append(d);var l=this._doFinalize();return l},blockSize:16,_createHelper:function(d){return function(l,v){return new d.init(v).finalize(l)}},_createHmacHelper:function(d){return function(l,v){return new b.HMAC.init(d,v).finalize(l)}}});var b=p.algo={};return p}(Math);return t})}(mt)),mt.exports}(function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return t.enc.Utf8})})(S0);var As=S0.exports;const T0=Te(As);var Et={exports:{}},R0;function Be(){return R0||(R0=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,m=s.enc;m.Base64={stringify:function(p){var a=p.words,c=p.sigBytes,g=this._map;p.clamp();for(var o=[],u=0;u<c;u+=3)for(var f=a[u>>>2]>>>24-u%4*8&255,y=a[u+1>>>2]>>>24-(u+1)%4*8&255,h=a[u+2>>>2]>>>24-(u+2)%4*8&255,b=f<<16|y<<8|h,d=0;d<4&&u+d*.75<c;d++)o.push(g.charAt(b>>>6*(3-d)&63));var l=g.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("")},parse:function(p){var a=p.length,c=this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var o=0;o<c.length;o++)g[c.charCodeAt(o)]=o}var u=c.charAt(64);if(u){var f=p.indexOf(u);f!==-1&&(a=f)}return x(p,a,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function x(p,a,c){for(var g=[],o=0,u=0;u<a;u++)if(u%4){var f=c[p.charCodeAt(u-1)]<<u%4*2,y=c[p.charCodeAt(u)]>>>6-u%4*2,h=f|y;g[o>>>2]|=h<<24-o%4*8,o++}return n.create(g,o)}}(),t.enc.Base64})}(Et)),Et.exports}var ws=Be();const Re=Te(ws);class je{$blank(e){return se(e)}$present(e){return!this.$blank(e)}$type(e,t){return ze(e,t)}$uuid(){return P0()}$encrypt(e){return this.$type(e,"object")&&(e=JSON.stringify(e)),Re.stringify(T0.parse(e))}$decrypt(e){return T0.stringify(Re.parse(e))}getUserAgent(){return window.navigator.userAgent}}const Ke={debug:1,info:2,warning:3,error:4},H={level:Ke.warning,setLogLevel(r){this.level=r},messageStringify(r,e){try{return e=`${r}: ${ze(e,"object")?JSON.stringify(e):e}`}catch(t){console.error(`log parse error: ${t}`)}},debug(r,e){this.level<=Ke.debug&&console.log(this.messageStringify(r,e))},info(r,e){this.level<=Ke.info&&console.info(this.messageStringify(r,e))},warn(r,e){this.level<=Ke.warning&&console.warn(this.messageStringify(r,e))},error(r,e){this.level<=Ke.error&&console.error(this.messageStringify(r,e))}};class Fs extends je{constructor(){super(),this.$storage={}}get(e){let t="";try{t=window.localStorage.getItem(e)}catch{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{this.$storage[e]=this.$encrypt(t)}return t}currentUserUUID(){const e=Z.STORAGE_PREFIX("uuid"),t=this.get(e);return this.$blank(t)?this.set(e,this.$uuid()):t}setUUID(e){const t=Z.STORAGE_PREFIX("uuid");return this.set(t,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{return JSON.parse(e.replace(/\\\"/g,'"'))}}}class Ds extends Fs{constructor(){super(),this.currentUserUUID()}currentSessionKey(){const e=Math.round(new Date().getTime()/1e3),t=Z.STORAGE_PREFIX("session"),s=this.getToJSON(t);return this.$blank(s)||s.time+1800<e?this.setToJSON(t,{time:e,term:this.$blank(s)?-1:e-s.time,uuid:`${this.$uuid()}-${e}`}).uuid:s.uuid}currentTimeTerm(){const e=Z.STORAGE_PREFIX("session"),t=this.getToJSON(e);return this.$blank(t.term)?-1:t.term}currentTime(){const e=Z.STORAGE_PREFIX("session"),t=this.getToJSON(e);return this.$blank(t.time)?-1:t.time}setTime(e){const t=Math.round(new Date().getTime()/1e3),s=Z.STORAGE_PREFIX("session"),i=this.getToJSON(s),n=this.$blank(i)?{time:e>0?e:t,term:e>0?t-e:-1,uuid:`${this.$uuid()}-${t}`}:i;n.time=e,this.setToJSON(s,n)}generateKey(){return`${this.$uuid()}-${new Date().getTime()}`}setUser(e){return this.set(Z.STORAGE_PREFIX("user"),e===void 0?void 0:JSON.stringify(e)),e}getUser(){try{return JSON.parse(this.get(Z.STORAGE_PREFIX("user")))}catch(e){H.error("User Storage",`사용자 정보를 추출하는데 실패하였습니다. [ ${e.message} ]`);return}}}const De=new Ds,$e={name:"@bootpay/client-js",version:"5.2.0-rc.2",main:"dist/index.mjs",exports:{".":{import:"./dist/index.mjs",types:"./dist/index.d.ts"}},styles:"dist/index.css",scripts:{test:'echo "Error: no test specified" && exit 1',build:"rm -rf ./dist && vite build",deploy:"NODE_ENV=production ./node_modules/.bin/webpack --output-path=./dist --mode=production && gzip -kf dist/*.min.js && ./webview.sh $npm_package_version"},dependencies:{typescript:"^5.5.4"},devDependencies:{"@types/ws":"^8.5.5","@types/node":"^18.15.3","@webpack-cli/serve":"^2.0.5","webpack-dev-server":"^4.15.1",webpack:"^5.87.0","webpack-cli":"^5.1.4",axios:"^0.27.2","crypto-js":"^4.1.1","@types/crypto-js":"^4.1.1","@babel/core":"^7.22.5","@babel/plugin-transform-regenerator":"^7.22.5","@babel/plugin-transform-runtime":"^7.22.5","@babel/plugin-transform-object-assign":"^7.22.5","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-transform-destructuring":"^7.24.8","@babel/plugin-proposal-export-default-from":"^7.27.1","@babel/plugin-transform-class-properties":"^7.27.1","@babel/plugin-proposal-decorators":"^7.28.0","@babel/plugin-transform-private-methods":"^7.27.1","@babel/plugin-transform-typescript":"^7.28.0","@babel/preset-env":"^7.22.5","@babel/preset-typescript":"^7.22.5","@babel/runtime-corejs3":"^7.22.5","@babel/plugin-transform-classes":"^7.22.5","core-js":"^3.31.0","babel-loader":"^9.1.2","css-loader":"^6.8.1",sass:"^1.63.4","sass-loader":"^13.3.2","style-loader":"^3.3.3",vite:"^5.4.3","vite-plugin-dts":"^3.6.4","vite-plugin-tsconfig":"^1.0.4","vite-plugin-css-injected-by-js":"3.3.1"},resolutions:{"@webpack-cli/serve":"^1.3.1"},keywords:[],author:"",license:"ISC",description:""},R={mode:"production",locale:"ko",isSetLocale:!1,packageVersion:$e.version,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(r){this.mode=r},setApplicationId(r){return this.applicationId=r,this.currentApplicationId(void 0)},setLocale(r){this.locale=r,this.isSetLocale=!0},currentApplicationId(r=void 0){return r===void 0?this.applicationId:r},setDevelopmentHost(r){this.API_URL.development=this.API_URL.development.replace(/dev-api.bootpay.co.kr\/v2/gi,r)},setVersion(r,e,t=void 0){this.sdkName=this.sdkNames[e]===void 0?0:this.sdkNames[e],this.sdkVersion=r,this.packageVersion=t===void 0||t===""?$e.version:t},toApi(r){return[this.API_URL[this.mode],r].join("/")},toDoor(r){return[this.DOOR_URL[this.mode],r].join("/")},toWidget(r){return[this.WIDGET_URL[this.mode],r].join("/")},isMobile(){if(typeof window>"u")return!1;const r=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(r)},isMobileSafari(){if(typeof window>"u")return!1;const r=window.navigator.userAgent;return(r.match(/iPad/i)||r.match(/iPhone/i))&&!r.match(/CriOS/i)},toAnalytics(r){return[this.ANALYTICS_URL[this.mode],r].join("/")}};class xe extends Error{constructor(e){super(),this.name="BootpayEventError",this.eventMessage=e}}const ke={__BOOTPAY_NAMESPACE:{},isBind:!1,initialize(){this.isBind||(typeof window<"u"&&(window.addBootpayEventListener=this.on,window.removeBootpayEventListener=this.off,window.resetBootpayEventListener=function(r,e,t){this.removeBootpayEventListener(r).addBootpayEventListener(r,e,t)}),typeof document<"u"&&(document.addBootpayEventListener=this.on,document.removeBootpayEventListener=this.off,document.resetBootpayEventListener=function(r,e,t){this.removeBootpayEventListener(r).addBootpayEventListener(r,e,t)}),typeof Element<"u"&&(Element.prototype.addBootpayEventListener=this.on,Element.prototype.removeBootpayEventListener=this.off,Element.prototype.resetBootpayEventListener=function(r,e,t){this.removeBootpayEventListener(r).addBootpayEventListener(r,e,t)}),this.isBind=!0)},on(r,e,t=void 0){return se(ke.__BOOTPAY_NAMESPACE)&&(ke.__BOOTPAY_NAMESPACE={}),this.addEventListener(r.split(".")[0],e,t||!1),ke.__BOOTPAY_NAMESPACE[r]=e,this},off(r){return q(ke.__BOOTPAY_NAMESPACE)&&q(ke.__BOOTPAY_NAMESPACE[r])&&this.removeEventListener(r.split(".")[0],ke.__BOOTPAY_NAMESPACE[r]),this}};class it extends je{constructor(e){super(),this.$resolve=null,this.$reject=null,this.$messageEventName=(e==null?void 0:e.messageEventName)??"message.BootpayEvent",this.$eventHooks=(e==null?void 0:e.messageEventHooks)??{},this.afterBind=e==null?void 0:e.afterBind,this.$childInstance=null,ke.initialize()}setChildInstance(e){this.$childInstance=e}bind(e,t){this.$messageEventName&&window.resetBootpayEventListener(this.$messageEventName,s=>{const i=this.parseEvent(s.data);if(H.debug("event received",JSON.stringify(i)),q(i)&&q(i.event)){const n=this.hookFunction(i.hook);if(q(n)&&q(n[i.event]))return n[i.event](i.data,this);H.debug("event",`${this.$messageEventName}: ${i.event} is not defined`)}}),this.afterBind&&this.afterBind(),this.setCallbackFunction(e,t)}hookFunction(e){return this.$eventHooks[e]}reject(e){q(this.$reject)&&this.$reject(e)}resolve(e){q(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(s){H.info("json parsing failed",`data: ${e}, message: ${Ge(s)} JSON 파싱 형태가 아닌 이벤트 입니다.`)}return t.bootpay_event?(delete t.bootpay_event,t):null}else return null}}const Ge=r=>typeof r=="string"?r.toUpperCase():r instanceof Error?r.message:r;class be extends je{constructor(e={}){super();const{iframeId:t="bootpay-iframe",template:s=this.defaultIframeHtml(),el:i=void 0}=e;this.el=i,this.$windowId=t,this.$template=s}defaultIframeHtml(){return`
|
|
3
3
|
<iframe id="${this.$iFrameId}" src="" frameborder="0" allowtransparency="true" scrolling="no" style="background: transparent; width: 100%; height: 100%;"></iframe>
|
|
4
4
|
`}byId(e){return document.getElementById(e)}createTemplateHtml(){this.byId(this.$windowId)===null&&document.body.insertAdjacentHTML("beforeend",this.$template)}bodyOpen(e=void 0,t=!1){const s=document.querySelector("body");t||(this.$present(s.className)?s.className=`${s.className} bootpay-open`:s.className="bootpay-open"),this.$present(e)&&(s.className=`${s.className} ${e}`)}bodyClose(){const e=document.querySelector("body");e.className=e.className.replace("bootpay-open","")}templateResize(e,t){const s=this.byId(e);s!==void 0&&this.applyStylesToElement(s,t)}applyStylesToElement(e,t){for(let s in Object.keys(t)){let i=Object.keys(t)[s],n=t[i];this.$present(n)&&!String(n).match(/%/)&&!String(n).match(/vh/)&&(i.match(/width/)||i.match(/Width/)||i.match(/height/)||i.match(/Height/))&&(n=`${String(t[i]).replace(/px/gi,"")}px`),e.style.setProperty(i,n)}}isRendered(){const e=document.getElementById(this.$iFrameId);return H.debug("isRendered",`iFrameElement: ${e}`),e!==null&&e.src!==null&&e.src!==""}postMessage(e,t=void 0){var i;const s=this.byId(this.$iFrameId);(i=s==null?void 0:s.contentWindow)==null||i.postMessage(JSON.stringify({bootpay_event:!0,event:e,data:t}),"*")}defaultRender(e){this.el=String(this.el).replace(/#/g,"");const t=document.getElementById(this.el);if(this.$blank(this.el)||t===null)throw new Error("렌더링할 DOM Element ID를 입력해주세요.");t.style.setProperty("height","0"),t.innerHTML=this.$template,this.byId(this.$iFrameId).setAttribute("src",e)}}class $s extends be{constructor(){super(),this.$alfredId="bootpay-alfred-progress-id",this.$alfredTextId="__alfred-text-message__"}template(e){return`
|
|
5
5
|
<div class="bootpay-progress-background" id="${this.$alfredId}" style="display: none;">
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
<iframe id="${this.$confirmIFrame}" name="${this.$confirmIFrame}"></iframe>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
|
-
`}templateReload(){H.debug("template reload","template reload!"),this.$template=this.template()}async start(e,t="PAYMENT"){return new Promise((s,i)=>{this.initializePayment(t,s,i,e.application_id,e.tk),this.createTemplateHtml(),this.bodyOpen(),le.showProgress(this.message("startProgress"));const n=fe.encryptParams(fe.objectKeyToUnderscore(e)),m=this.setupForm(n,this.$env.toApi(this.apiUrl()));this.$present(e.extra)&&e.extra.popup,m.target=this.$iFrameId,m.submit()})}setConfirmFormUrl(e){const t=this.byId(this.$confirmIFrame),s=this.byId(this.$confirmFormId);t.style.setProperty("display","block"),s.target=this.$confirmIFrame,s.action=e}setConfirmRedirect(e){const t=this.byId(this.$confirmFormId);t.target="_self",t.action=e}confirm(){return new Promise((e,t)=>{he.bind(e,t);const s=this.byId(this.$confirmFormId);if(this.$blank(s.action))throw new xe({event:"error",error_code:"RC_CONFIRM_READY_NOT_YET",message:this.message("confirmNotYet")});s.submit()})}async startPaymentUrl(e,t="PAYMENT"){return new Promise((s,i)=>{this.initializePayment(t,s,i),le.showProgress(this.message("startProgress")),this.createTemplateHtml(),this.bodyOpen(),this.setupFormForUrl(e),this.byId(this.$formId).submit()})}createPopupButton(e){le.hideProgress(),this.hidePaymentiFrame(),this.showPopupMessage(e),this.$present(e.gatewayUrl)&&(this.$popupUrl=`${e.gatewayUrl}?popup=1`,Ve.setReceiptId(e.receiptId))}readyToPopup(e=void 0){this.hidePopupMessage(),this.closePopup();const t="width=750,height=500,top=0,left=0,scrollbars=yes,directories=no, status=no, menubar=no, fullscreen=no";this.$popup=window.open(this.getPopupUrl(e),"BootPayPopupInstance",t),this.$popupWatcher=setInterval(async()=>{if(this.$popup===void 0||this.$popup.closed){try{clearInterval(this.$popupWatcher),await Ve.sendCloseEvent()}catch(s){H.debug("popup",Ge(s))}return this.$popupUrl=void 0,he.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:this.message("closeMessage")})}},500),this.bindParentEventOnPopup()}closePopup(){if(this.$popupWatcher!==void 0)try{clearInterval(this.$popupWatcher),H.debug("close popup","clear popup interval")}catch(e){H.info("clear popup watcher",Ge(e))}if(this.$popup!==void 0&&!this.$popup.closed)try{this.$popup.close(),H.debug("close popup","close popup instance")}catch(e){H.info("popup destroy",Ge(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,()=>{if(this.$popup!==void 0&&!this.$popup.closed)try{this.$popup.close()}catch(t){H.info("popup destroy",Ge(t))}})}showPaymentiFrame(e=!1){const t=this.byId(this.$iFrameId),s=this.byId(this.$closeButton);t!==void 0&&t.style.setProperty("display","block"),s!==void 0&&e&&s.style.setProperty("display","inline-block")}showPopupMessage(e){const t=this.byId(this.$popupWindow),s=this.byId(this.$popupItemNameId),i=this.byId(this.$popupPriceId);t!==void 0&&t.style.setProperty("display","block"),s!==void 0&&(s.innerText=e.name),i!==void 0&&(parseFloat(e.price)>0?i.innerText=String(e.price).replace(/\B(?=(\d{3})+(?!\d))/g,","):i.remove())}hidePopupMessage(){this.byId(this.$popupWindow).style.setProperty("display","none")}destroy(e=!0){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"),le.hideProgress(),this.closePopup(),he.allClearEvent(),Ve.clearInstance(),e&&setTimeout(()=>he.callBootpayDOMEvent("close"),300)}iFrameResize(e){const t=this.byId(this.$iFrameId);if(t!==void 0){for(let s in e)if(String(e[s]).match(/%/)&&!this.byId(this.$paymentWindowId).className.match(/w-100/)){this.byId(this.$paymentWindowId).className+=" w-100";break}this.applyStylesToElement(t,e)}}iFrameSetStyle(e){H.debug("change style",e);const t=this.byId(this.$iFrameId);this.safeApplyStyles(t,e,"iframe style")}windowStyle(e){H.debug("change style",e);const t=this.byId(this.$paymentWindowId);this.safeApplyStyles(t,e,"window style")}safeApplyStyles(e,t,s){for(let i in t)try{H.debug(i,t[i]),e.style.setProperty(i,t[i])}catch(n){H.warn(s,n==null?void 0:n.message)}}hidePaymentiFrame(){const e=this.byId(this.$iFrameId),t=this.byId(this.$closeButton);e!==void 0&&e.style.setProperty("display","none"),t!==void 0&&t.style.setProperty("display","none")}message(e){return Jt.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]}setupForm(e,t){const s=this.byId(this.$formId);return s.innerHTML=`
|
|
46
|
+
`}templateReload(){H.debug("template reload","template reload!"),this.$template=this.template()}async start(e,t="PAYMENT"){return new Promise((s,i)=>{this.initializePayment(t,s,i,e.application_id,e.tk),this.createTemplateHtml(),this.bodyOpen(),le.showProgress(this.message("startProgress"));const n=fe.encryptParams(fe.objectKeyToUnderscore(e)),m=this.setupForm(n,this.$env.toApi(this.apiUrl()));this.$present(e.extra)&&e.extra.popup,m.target=this.$iFrameId,m.submit()})}setConfirmFormUrl(e){const t=this.byId(this.$confirmIFrame),s=this.byId(this.$confirmFormId);t.style.setProperty("display","block"),s.target=this.$confirmIFrame,s.action=e}setConfirmRedirect(e){const t=this.byId(this.$confirmFormId);t.target="_self",t.action=e}confirm(){return new Promise((e,t)=>{he.bind(e,t);const s=this.byId(this.$confirmFormId);if(this.$blank(s.action))throw new xe({event:"error",error_code:"RC_CONFIRM_READY_NOT_YET",message:this.message("confirmNotYet")});s.submit()})}async startPaymentUrl(e,t="PAYMENT"){return new Promise((s,i)=>{this.initializePayment(t,s,i),le.showProgress(this.message("startProgress")),this.createTemplateHtml(),this.bodyOpen(),this.setupFormForUrl(e),this.byId(this.$formId).submit()})}createPopupButton(e){le.hideProgress(),this.hidePaymentiFrame(),this.showPopupMessage(e),this.$present(e.gatewayUrl)&&(this.$popupUrl=`${e.gatewayUrl}?popup=1`,Ve.setReceiptId(e.receiptId))}readyToPopup(e=void 0){this.hidePopupMessage(),this.closePopup();const t="width=750,height=500,top=0,left=0,scrollbars=yes,directories=no, status=no, menubar=no, fullscreen=no";this.$popup=window.open(this.getPopupUrl(e),"BootPayPopupInstance",t),this.$popupWatcher=setInterval(async()=>{if(this.$popup===void 0||this.$popup.closed){try{clearInterval(this.$popupWatcher),await Ve.sendCloseEvent()}catch(s){H.debug("popup",Ge(s))}return this.$popupUrl=void 0,he.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:this.message("closeMessage")})}},500),this.bindParentEventOnPopup()}closePopup(){if(this.$popupWatcher!==void 0)try{clearInterval(this.$popupWatcher),H.debug("close popup","clear popup interval")}catch(e){H.info("clear popup watcher",Ge(e))}if(this.$popup!==void 0&&!this.$popup.closed)try{this.$popup.close(),H.debug("close popup","close popup instance")}catch(e){H.info("popup destroy",Ge(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,()=>{if(this.$popup!==void 0&&!this.$popup.closed)try{this.$popup.close()}catch(t){H.info("popup destroy",Ge(t))}})}showPaymentiFrame(e=!1){const t=this.byId(this.$iFrameId),s=this.byId(this.$closeButton);t!==void 0&&t.style.setProperty("display","block"),s!==void 0&&e&&s.style.setProperty("display","inline-block")}showPopupMessage(e){const t=this.byId(this.$popupWindow),s=this.byId(this.$popupItemNameId),i=this.byId(this.$popupPriceId);t!==void 0&&t.style.setProperty("display","block"),s!==void 0&&(s.innerText=e.name),i!==void 0&&(parseFloat(e.price)>0?i.innerText=String(e.price).replace(/\B(?=(\d{3})+(?!\d))/g,","):i.remove())}hidePopupMessage(){var e;(e=this.byId(this.$popupWindow))==null||e.style.setProperty("display","none")}destroy(e=!0){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"),le.hideProgress(),this.closePopup(),he.allClearEvent(),Ve.clearInstance(),e&&setTimeout(()=>he.callBootpayDOMEvent("close"),300)}iFrameResize(e){const t=this.byId(this.$iFrameId);if(t!==void 0){for(let s in e)if(String(e[s]).match(/%/)&&!this.byId(this.$paymentWindowId).className.match(/w-100/)){this.byId(this.$paymentWindowId).className+=" w-100";break}this.applyStylesToElement(t,e)}}iFrameSetStyle(e){H.debug("change style",e);const t=this.byId(this.$iFrameId);this.safeApplyStyles(t,e,"iframe style")}windowStyle(e){H.debug("change style",e);const t=this.byId(this.$paymentWindowId);this.safeApplyStyles(t,e,"window style")}safeApplyStyles(e,t,s){for(let i in t)try{H.debug(i,t[i]),e.style.setProperty(i,t[i])}catch(n){H.warn(s,n==null?void 0:n.message)}}hidePaymentiFrame(){const e=this.byId(this.$iFrameId),t=this.byId(this.$closeButton);e!==void 0&&e.style.setProperty("display","none"),t!==void 0&&t.style.setProperty("display","none")}message(e){return Jt.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]}setupForm(e,t){const s=this.byId(this.$formId);return s.innerHTML=`
|
|
47
47
|
<input type="hidden" name="payload" value="${e.payload}" />
|
|
48
48
|
<input type="hidden" name="token" value="${e.token}" />
|
|
49
|
-
`,s.action=t,s.target=this.$iFrameId,s}setupFormForUrl(e){const t=this.byId(this.$formId);t.method="GET",t.action=e,t.target=this.$iFrameId}initializePayment(e,t,s,i,n){this.mode=e,this.templateReload(),he.clearPollingEvent(),he.bind(t,s),i&&n&&he.setDefaultPaymentData(i,n)}}const M=new qi,Ie=class Ie extends je{constructor(){super(),this.$session=De,this.$logger=H,this.$event=Ve,this.platformType=Z.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/]}}async requestPayment(e){var t;((t=e.extra)==null?void 0:t.locale)!==void 0&&!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=R.packageVersion,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)),e.deposit_price=parseFloat(String(e.deposit_price)),Ie.invalidRequestParamsData(e),Ie.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 s=await M.start(e);return H.debug("confirm ready",s),M.hidePaymentiFrame(),M.closePopup(),["done","issued"].indexOf(s.event)===-1&&this.$event.send({step:s.event,msg:"",request:e,response:s}),M.setConfirmFormUrl(`${s.gateway_url}/confirm/${s.receipt_id}?application_id=${e.application_id}`),Promise.resolve(s)}catch(s){return this.eventError(s),Promise.reject(s)}}async confirm(){try{const e=await M.confirm();return Promise.resolve(e)}catch(e){return this.eventError(e),Promise.reject(e)}}eventDone(e,t=!0){var s;this.$logger.debug(e.event,e),this.$event.send({step:e.event,msg:e.event==="done"?"결제완료":"가상계좌발급완료",request:{},response:e}),le.hideProgress(),this.$logger.debug("show result",this.isDisplaySuccessResult()),this.isDisplaySuccessResult()&&t&&((s=e.data)==null?void 0:s.receipt_id)!==void 0?this.displayResultView(e.data.receipt_id):M.destroy()}eventError(e){le.hideProgress(),M.closePopup(),this.isDisplayErrorResult()&&e.event==="error"?this.displayResultErrorView(e):M.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{return!1}}()})}generateTransactionKey(){return this.$transactionKey=`${this.$uuid()}-${new Date().getTime()*1e3}`,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,redirect_url:e.redirect_url,wallet_id:e.wallet_id,widget:e.widget,widget_key:e.widget_key,widget_sandbox:e.widget_sandbox,subscribe_brandpay_type:e.subscribe_brandpay_type,platform_type:this.platformType,ver:R.packageVersion,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 s=await M.start(t,"CARD_SUBSCRIPTION");switch(H.debug("subscription success",s),this.$event.send({step:"confirm",msg:"결제승인전",request:{},response:s}),M.hidePaymentiFrame(),M.closePopup(),s.event){case"done":case"issued":break;case"confirm":M.setConfirmFormUrl(`${s.gateway_url}/confirm/${s.receipt_id}?application_id=${e.application_id}`)}return Promise.resolve(s)}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:$e.version,sdk_version:R.sdkVersion,sdk_type:R.sdkName,locale:R.locale,metadata:e.metadata,redirect_url:e.redirect_url,sdk:!0,uuid:this.$session.currentUserUUID(),sk:this.$session.currentSessionKey(),tk:this.$transactionKey,env:this.getUserDeviceEnvironment(),user:e.user,extra:e.extra};try{const s=await M.start(t,"AUTH");switch(H.debug("authentication success",s),this.$event.send({step:"confirm",msg:"본인인증 승인전",request:{},response:s}),M.hidePaymentiFrame(),M.closePopup(),s.event){case"done":case"issued":break;case"confirm":M.setConfirmFormUrl(`${s.gateway_url}/confirm/${s.receipt_id}?application_id=${e.application_id}`)}return Promise.resolve(s)}catch(s){return this.eventError(s),Promise.reject(s)}}async requestPaymentUrl(e){try{const t=await M.startPaymentUrl(e.url);return["done","issued"].indexOf(t.event)===-1&&this.$event.send({step:t.event,msg:"",request:{url:e.url},response:t}),M.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 this.extra!==void 0&&this.extra.display_success_result!==void 0&&this.extra.display_success_result}isDisplayErrorResult(){return this.extra!==void 0&&this.extra.display_error_result!==void 0&&this.extra.display_error_result}displayResultView(e){M.moveToUrl(R.toDoor(`result/${e}`))}displayResultErrorView(e){M.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)&&e.browser_open_type!==void 0){const t=this.getUserAgent();for(let s in e.browser_open_type){const i=e.browser_open_type[s],n=this.$present(this.browserBootpayFilter[i.browser])?this.browserBootpayFilter[i.browser]:new RegExp(`${i.browser}`);if(t.match(n)){e.open_type=i.open_type;break}}}return e}static invalidRequestParamsData(e){if(se(e))throw new xe({event:"error",error_code:"NEED_MORE_PARAMS",message:"결제 요청을 위한 최소한의 결제 정보를 입력해주세요."});Object.keys(Ie.invalidRequestParams).forEach(t=>{const s=e[t];if(se(s))throw new xe({event:"error",error_code:"INVALID_REQUEST_PARAMS",message:Ie.invalidRequestParams[t]})})}static invalidRequestItemsData(e,t){if(e!==void 0&&q(e)){let s=0;if(e.forEach((i,n)=>{if(se(i.id))throw new xe({event:"error",error_code:"NEED_ITEM_ID",message:`${n+1}번째 상품 고유 ID를 입력해주세요. [ key: id ]`});if(se(i.name))throw new xe({event:"error",error_code:"NEED_ITEM_NAME",message:`${n+1}번째 상품명을 입력해주세요. [ key: name ]`});if(se(i.qty))throw new xe({event:"error",error_code:"NEED_ITEM_QTY",message:`${n+1}번째 상품수량을 입력해주세요. [ key: qty ]`});if(se(i.price))throw new xe({event:"error",error_code:"NEED_ITEM_PRICE",message:`${n+1}번째 상품금액을 입력해주세요. [ key: price ]`});e[n].price=parseFloat(String(e[n].price)),e[n].qty=parseFloat(String(e[n].qty)),s+=e[n].price*e[n].qty}),s!==t)throw new xe({event:"error",error_code:"NEED_ITEM_TOTAL_PRICE_NOT_MATCH",message:`결제 금액과 상품 수량 및 상품 금액의 총합과 일치하지 않습니다. [ 요청금액: ${t} ${typeof t}, 상품 총합계 금액: ${s} ${typeof s} ]`})}}};Ie.invalidRequestParams={application_id:"application_id를 입력해주세요. [ key: application_id ]",order_name:"판매할 상품명을 입력해주세요. [ key: order_name ]",price:"판매할 상품의 금액을 입력해주세요. [ key: price ]",order_id:"가맹점에서 설정할 주문 ID를 입력해주세요. [ key: order_id ]"};let Ye=Ie;const zi=new Ye;class ji extends fe{constructor(){super(),this.$session=De}setAnalyticsData(e){this.$session.setTime(e.time),this.$session.setUUID(e.uuid)}async send(e){const t=document.URL;if(t!==void 0&&t.search(/bootapi.co.kr/)===-1){const s=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=document.referrer!==void 0&&q(document.referrer)&&document.referrer.search(new RegExp(window.location.hostname))==-1?document.referrer:"",e.user_id=s===void 0||se(s)?void 0:s.id,e.items=this.generateItemKeyToVersion1(e.items);try{const i=await this.$http.post(R.toAnalytics(`call?ver=${$e.version}`),e);return i.data.status===200?(H.info("Analytics Common Send","통계 데이터가 전송되었습니다."),Promise.resolve()):(H.warn("Analytics Common Send",`통계 데이터가 전송 실패. ${JSON.stringify(i.data)}`),Promise.reject())}catch(i){return H.error("Analytics Common Error",`데이터 전송 실패: ${i.message}`),Promise.reject()}}}async login(e){if(e.application_id=R.currentApplicationId(e.application_id),se(e.application_id))return H.error("Analytics Params","application_id 값을 입력해주세요.");if(se(e.id))return H.error("Analytics Params","id 값을 입력해주세요.");try{const t=await this.$http.post(R.toAnalytics(`login?ver=${$e.version}`),e),{user_id:s}=t.data.data;return this.$session.setUser({id:s,time:new Date().getTime()}),Promise.resolve()}catch(t){return H.error("Analytics Login Error",`데이터 전송 실패: ${t.message}`),Promise.reject()}}logout(){this.$session.setUser(void 0)}generateItemKeyToVersion1(e){if(e!==void 0)return e.map(t=>({cat1:t.cat1,cat2:t.cat2,cat3:t.cat3,item_img:t.img,item_name:t.name,unique:t.id,price:t.price}))}}const Ki=new ji;(function(){if(typeof window>"u"||typeof window.CustomEvent=="function")return!1;function r(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};let s=document.createEvent("CustomEvent");return s.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),s}r.prototype=window.Event.prototype,window.CustomEvent=r})();const Ee={$payment:zi,$analytics:Ki,$environment:R,async requestPayment(r){return new Promise(async(e,t)=>{try{r.extra!==void 0&&r.extra.override_global_event===!0&&(H.debug("override global event","override global event!"),Ee.overrideGlobalInstance());const s=await this.$payment.requestPayment(r);setTimeout(()=>{e(s),["done","issued"].indexOf(s.event)>-1&&this.$payment.eventDone(s)},100)}catch(s){setTimeout(()=>{t(this.errorHandler(s))},100)}})},async confirm(){return new Promise(async(r,e)=>{try{const t=await this.$payment.confirm();setTimeout(()=>{r(t),this.$payment.eventDone(t)},100)}catch(t){setTimeout(()=>e(this.errorHandler(t)),100)}})},async requestSubscription(r){return new Promise(async(e,t)=>{try{const s=await this.$payment.requestSubscription(r);e(s),this.$payment.eventDone(s)}catch(s){return t(this.errorHandler(s))}})},async requestAuthentication(r){return new Promise(async(e,t)=>{try{const s=await this.$payment.requestAuthentication(r);e(s),this.$payment.eventDone(s)}catch(s){return t(this.errorHandler(s))}})},async requestPaymentUrl(r){return new Promise(async(e,t)=>{try{const s=await this.$payment.requestPaymentUrl(r);setTimeout(()=>{e(s),["done","issued"].indexOf(s.event)>-1&&this.$payment.eventDone(s)},100)}catch(s){setTimeout(()=>{t(this.errorHandler(s))},100)}})},setEnvironmentMode(r,e=void 0){this.$environment.set(r),e!==void 0&&this.$environment.setDevelopmentHost(e)},setApplicationId(r){return this.$environment.setApplicationId(r)},setVersion(r,e,t){return this.$environment.setVersion(r,e,t)},setDevice(r){switch(r){case"IOS":this.$payment.platformType=Z.PLATFORM.IOS;break;case"ANDROID":this.$payment.platformType=Z.PLATFORM.ANDROID;break;default:this.$payment.platformType=Z.PLATFORM.JS}return this.$payment.platformType},errorHandler(r){let e;switch(le.hideProgress(),r.name){case"BootpayEventError":e=r.eventMessage;break;default:if(q(r.event))e=r;else throw r}return e},readyToPopup(){M.readyToPopup()},setLogLevel(r){H.setLogLevel(r)},setUUID(r){return De.setUUID(r)},send(r=void 0){return this.$analytics.send(r!==void 0?r:{})},login(r){return this.$analytics.login(r)},logout(){return this.$analytics.logout()},setLocale(r){R.setLocale(r),M.templateReload()},async dismiss(r=!1){if(r)try{await Ve.sendCloseEvent()}catch(e){H.debug("error",e.message)}he.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})},getCurrentUUID(){return De.currentUserUUID()},destroy(){M.destroy()},overrideGlobalInstance(){window.Bootpay=Ee}};typeof window<"u"&&(window.Bootpay=Ee);class Gi extends it{constructor(){super(),this.$messageEventName="message.BootpayUserTokenEvent"}bind(e,t){this.setCallbackFunction(e,t),window.resetBootpayEventListener(this.$messageEventName,s=>{const i=this.parseEvent(s.data);if(q(i))switch(H.debug("event",i),i.event){case"error":case"cancel":return this.handleErrorOrCancel(i);case"data":return this.resolve(i.data);case"confirmPasswordToken":return this.resolve(i.token);case"confirmAddCard":return this.resolve(i);case"resize":D0.iFrameResize(i.resizeData);break;default:return}})}handleErrorOrCancel(e){return this.reject({event:e.event,pg_error_code:e.pg_error_code,error_code:e.error_code,message:e.message,payload:e.payload})}}var kr={exports:{}},Zt={exports:{}},Pr;function ut(){return Pr||(Pr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(s){var i=t,n=i.lib,m=n.Base,x=n.WordArray,p=i.x64={};p.Word=m.extend({init:function(a,c){this.high=a,this.low=c}}),p.WordArray=m.extend({init:function(a,c){a=this.words=a||[],c!=s?this.sigBytes=c:this.sigBytes=a.length*8},toX32:function(){for(var a=this.words,c=a.length,g=[],o=0;o<c;o++){var u=a[o];g.push(u.high),g.push(u.low)}return x.create(g,this.sigBytes)},clone:function(){for(var a=m.clone.call(this),c=a.words=this.words.slice(0),g=c.length,o=0;o<g;o++)c[o]=c[o].clone();return a}})}(),t})}(Zt)),Zt.exports}var Qt={exports:{}},Sr;function Xi(){return Sr||(Sr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(){if(typeof ArrayBuffer=="function"){var s=t,i=s.lib,n=i.WordArray,m=n.init,x=n.init=function(p){if(p instanceof ArrayBuffer&&(p=new Uint8Array(p)),(p instanceof Int8Array||typeof Uint8ClampedArray<"u"&&p instanceof Uint8ClampedArray||p instanceof Int16Array||p instanceof Uint16Array||p instanceof Int32Array||p instanceof Uint32Array||p instanceof Float32Array||p instanceof Float64Array)&&(p=new Uint8Array(p.buffer,p.byteOffset,p.byteLength)),p instanceof Uint8Array){for(var a=p.byteLength,c=[],g=0;g<a;g++)c[g>>>2]|=p[g]<<24-g%4*8;m.call(this,c,a)}else m.apply(this,arguments)};x.prototype=n}}(),t.lib.WordArray})}(Qt)),Qt.exports}var e0={exports:{}},Ir;function Vi(){return Ir||(Ir=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,m=s.enc;m.Utf16=m.Utf16BE={stringify:function(p){for(var a=p.words,c=p.sigBytes,g=[],o=0;o<c;o+=2){var u=a[o>>>2]>>>16-o%4*8&65535;g.push(String.fromCharCode(u))}return g.join("")},parse:function(p){for(var a=p.length,c=[],g=0;g<a;g++)c[g>>>1]|=p.charCodeAt(g)<<16-g%2*16;return n.create(c,a*2)}},m.Utf16LE={stringify:function(p){for(var a=p.words,c=p.sigBytes,g=[],o=0;o<c;o+=2){var u=x(a[o>>>2]>>>16-o%4*8&65535);g.push(String.fromCharCode(u))}return g.join("")},parse:function(p){for(var a=p.length,c=[],g=0;g<a;g++)c[g>>>1]|=x(p.charCodeAt(g)<<16-g%2*16);return n.create(c,a*2)}};function x(p){return p<<8&4278255360|p>>>8&16711935}}(),t.enc.Utf16})}(e0)),e0.exports}var t0={exports:{}},Tr;function Yi(){return Tr||(Tr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,m=s.enc;m.Base64url={stringify:function(p,a){a===void 0&&(a=!0);var c=p.words,g=p.sigBytes,o=a?this._safe_map:this._map;p.clamp();for(var u=[],f=0;f<g;f+=3)for(var y=c[f>>>2]>>>24-f%4*8&255,h=c[f+1>>>2]>>>24-(f+1)%4*8&255,b=c[f+2>>>2]>>>24-(f+2)%4*8&255,d=y<<16|h<<8|b,l=0;l<4&&f+l*.75<g;l++)u.push(o.charAt(d>>>6*(3-l)&63));var v=o.charAt(64);if(v)for(;u.length%4;)u.push(v);return u.join("")},parse:function(p,a){a===void 0&&(a=!0);var c=p.length,g=a?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var u=0;u<g.length;u++)o[g.charCodeAt(u)]=u}var f=g.charAt(64);if(f){var y=p.indexOf(f);y!==-1&&(c=y)}return x(p,c,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function x(p,a,c){for(var g=[],o=0,u=0;u<a;u++)if(u%4){var f=c[p.charCodeAt(u-1)]<<u%4*2,y=c[p.charCodeAt(u)]>>>6-u%4*2,h=f|y;g[o>>>2]|=h<<24-o%4*8,o++}return n.create(g,o)}}(),t.enc.Base64url})}(t0)),t0.exports}var r0={exports:{}},Rr;function s0(){return Rr||(Rr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(s){var i=t,n=i.lib,m=n.WordArray,x=n.Hasher,p=i.algo,a=[],c=[];(function(){function u(b){for(var d=s.sqrt(b),l=2;l<=d;l++)if(!(b%l))return!1;return!0}function f(b){return(b-(b|0))*4294967296|0}for(var y=2,h=0;h<64;)u(y)&&(h<8&&(a[h]=f(s.pow(y,1/2))),c[h]=f(s.pow(y,1/3)),h++),y++})();var g=[],o=p.SHA256=x.extend({_doReset:function(){this._hash=new m.init(a.slice(0))},_doProcessBlock:function(u,f){for(var y=this._hash.words,h=y[0],b=y[1],d=y[2],l=y[3],v=y[4],E=y[5],_=y[6],A=y[7],w=0;w<64;w++){if(w<16)g[w]=u[f+w]|0;else{var I=g[w-15],B=(I<<25|I>>>7)^(I<<14|I>>>18)^I>>>3,C=g[w-2],F=(C<<15|C>>>17)^(C<<13|C>>>19)^C>>>10;g[w]=B+g[w-7]+F+g[w-16]}var D=v&E^~v&_,T=h&b^h&d^b&d,O=(h<<30|h>>>2)^(h<<19|h>>>13)^(h<<10|h>>>22),U=(v<<26|v>>>6)^(v<<21|v>>>11)^(v<<7|v>>>25),Y=A+U+D+c[w]+g[w],j=O+T;A=_,_=E,E=v,v=l+Y|0,l=d,d=b,b=h,h=Y+j|0}y[0]=y[0]+h|0,y[1]=y[1]+b|0,y[2]=y[2]+d|0,y[3]=y[3]+l|0,y[4]=y[4]+v|0,y[5]=y[5]+E|0,y[6]=y[6]+_|0,y[7]=y[7]+A|0},_doFinalize:function(){var u=this._data,f=u.words,y=this._nDataBytes*8,h=u.sigBytes*8;return f[h>>>5]|=128<<24-h%32,f[(h+64>>>9<<4)+14]=s.floor(y/4294967296),f[(h+64>>>9<<4)+15]=y,u.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var u=x.clone.call(this);return u._hash=this._hash.clone(),u}});i.SHA256=x._createHelper(o),i.HmacSHA256=x._createHmacHelper(o)}(Math),t.SHA256})}(r0)),r0.exports}var i0={exports:{}},Or;function Ji(){return Or||(Or=1,function(r,e){(function(t,s,i){r.exports=s(L(),s0())})(N,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,m=s.algo,x=m.SHA256,p=m.SHA224=x.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=x._doFinalize.call(this);return a.sigBytes-=4,a}});s.SHA224=x._createHelper(p),s.HmacSHA224=x._createHmacHelper(p)}(),t.SHA224})}(i0)),i0.exports}var n0={exports:{}},Ur;function Hr(){return Ur||(Ur=1,function(r,e){(function(t,s,i){r.exports=s(L(),ut())})(N,function(t){return function(){var s=t,i=s.lib,n=i.Hasher,m=s.x64,x=m.Word,p=m.WordArray,a=s.algo;function c(){return x.create.apply(x,arguments)}var g=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],o=[];(function(){for(var f=0;f<80;f++)o[f]=c()})();var u=a.SHA512=n.extend({_doReset:function(){this._hash=new p.init([new x.init(1779033703,4089235720),new x.init(3144134277,2227873595),new x.init(1013904242,4271175723),new x.init(2773480762,1595750129),new x.init(1359893119,2917565137),new x.init(2600822924,725511199),new x.init(528734635,4215389547),new x.init(1541459225,327033209)])},_doProcessBlock:function(f,y){for(var h=this._hash.words,b=h[0],d=h[1],l=h[2],v=h[3],E=h[4],_=h[5],A=h[6],w=h[7],I=b.high,B=b.low,C=d.high,F=d.low,D=l.high,T=l.low,O=v.high,U=v.low,Y=E.high,j=E.low,X=_.high,K=_.low,$=A.high,P=A.low,S=w.high,k=w.low,J=I,V=B,oe=C,W=F,Je=D,Me=T,$0=O,Ze=U,ve=Y,ce=j,ft=X,Qe=K,ht=$,et=P,k0=S,tt=k,ye=0;ye<80;ye++){var ue,we,vt=o[ye];if(ye<16)we=vt.high=f[y+ye*2]|0,ue=vt.low=f[y+ye*2+1]|0;else{var ds=o[ye-15],Le=ds.high,rt=ds.low,Rn=(Le>>>1|rt<<31)^(Le>>>8|rt<<24)^Le>>>7,xs=(rt>>>1|Le<<31)^(rt>>>8|Le<<24)^(rt>>>7|Le<<25),ls=o[ye-2],qe=ls.high,st=ls.low,On=(qe>>>19|st<<13)^(qe<<3|st>>>29)^qe>>>6,us=(st>>>19|qe<<13)^(st<<3|qe>>>29)^(st>>>6|qe<<26),ps=o[ye-7],Un=ps.high,Hn=ps.low,fs=o[ye-16],Nn=fs.high,hs=fs.low;ue=xs+Hn,we=Rn+Un+(ue>>>0<xs>>>0?1:0),ue=ue+us,we=we+On+(ue>>>0<us>>>0?1:0),ue=ue+hs,we=we+Nn+(ue>>>0<hs>>>0?1:0),vt.high=we,vt.low=ue}var Wn=ve&ft^~ve&ht,vs=ce&Qe^~ce&et,Mn=J&oe^J&Je^oe&Je,Ln=V&W^V&Me^W&Me,qn=(J>>>28|V<<4)^(J<<30|V>>>2)^(J<<25|V>>>7),ys=(V>>>28|J<<4)^(V<<30|J>>>2)^(V<<25|J>>>7),zn=(ve>>>14|ce<<18)^(ve>>>18|ce<<14)^(ve<<23|ce>>>9),jn=(ce>>>14|ve<<18)^(ce>>>18|ve<<14)^(ce<<23|ve>>>9),ms=g[ye],Kn=ms.high,Es=ms.low,de=tt+jn,Fe=k0+zn+(de>>>0<tt>>>0?1:0),de=de+vs,Fe=Fe+Wn+(de>>>0<vs>>>0?1:0),de=de+Es,Fe=Fe+Kn+(de>>>0<Es>>>0?1:0),de=de+ue,Fe=Fe+we+(de>>>0<ue>>>0?1:0),gs=ys+Ln,Gn=qn+Mn+(gs>>>0<ys>>>0?1:0);k0=ht,tt=et,ht=ft,et=Qe,ft=ve,Qe=ce,ce=Ze+de|0,ve=$0+Fe+(ce>>>0<Ze>>>0?1:0)|0,$0=Je,Ze=Me,Je=oe,Me=W,oe=J,W=V,V=de+gs|0,J=Fe+Gn+(V>>>0<de>>>0?1:0)|0}B=b.low=B+V,b.high=I+J+(B>>>0<V>>>0?1:0),F=d.low=F+W,d.high=C+oe+(F>>>0<W>>>0?1:0),T=l.low=T+Me,l.high=D+Je+(T>>>0<Me>>>0?1:0),U=v.low=U+Ze,v.high=O+$0+(U>>>0<Ze>>>0?1:0),j=E.low=j+ce,E.high=Y+ve+(j>>>0<ce>>>0?1:0),K=_.low=K+Qe,_.high=X+ft+(K>>>0<Qe>>>0?1:0),P=A.low=P+et,A.high=$+ht+(P>>>0<et>>>0?1:0),k=w.low=k+tt,w.high=S+k0+(k>>>0<tt>>>0?1:0)},_doFinalize:function(){var f=this._data,y=f.words,h=this._nDataBytes*8,b=f.sigBytes*8;y[b>>>5]|=128<<24-b%32,y[(b+128>>>10<<5)+30]=Math.floor(h/4294967296),y[(b+128>>>10<<5)+31]=h,f.sigBytes=y.length*4,this._process();var d=this._hash.toX32();return d},clone:function(){var f=n.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:1024/32});s.SHA512=n._createHelper(u),s.HmacSHA512=n._createHmacHelper(u)}(),t.SHA512})}(n0)),n0.exports}var o0={exports:{}},Nr;function Zi(){return Nr||(Nr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ut(),Hr())})(N,function(t){return function(){var s=t,i=s.x64,n=i.Word,m=i.WordArray,x=s.algo,p=x.SHA512,a=x.SHA384=p.extend({_doReset:function(){this._hash=new m.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var c=p._doFinalize.call(this);return c.sigBytes-=16,c}});s.SHA384=p._createHelper(a),s.HmacSHA384=p._createHmacHelper(a)}(),t.SHA384})}(o0)),o0.exports}var a0={exports:{}},Wr;function Qi(){return Wr||(Wr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ut())})(N,function(t){return function(s){var i=t,n=i.lib,m=n.WordArray,x=n.Hasher,p=i.x64,a=p.Word,c=i.algo,g=[],o=[],u=[];(function(){for(var h=1,b=0,d=0;d<24;d++){g[h+5*b]=(d+1)*(d+2)/2%64;var l=b%5,v=(2*h+3*b)%5;h=l,b=v}for(var h=0;h<5;h++)for(var b=0;b<5;b++)o[h+5*b]=b+(2*h+3*b)%5*5;for(var E=1,_=0;_<24;_++){for(var A=0,w=0,I=0;I<7;I++){if(E&1){var B=(1<<I)-1;B<32?w^=1<<B:A^=1<<B-32}E&128?E=E<<1^113:E<<=1}u[_]=a.create(A,w)}})();var f=[];(function(){for(var h=0;h<25;h++)f[h]=a.create()})();var y=c.SHA3=x.extend({cfg:x.cfg.extend({outputLength:512}),_doReset:function(){for(var h=this._state=[],b=0;b<25;b++)h[b]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(h,b){for(var d=this._state,l=this.blockSize/2,v=0;v<l;v++){var E=h[b+2*v],_=h[b+2*v+1];E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360;var A=d[v];A.high^=_,A.low^=E}for(var w=0;w<24;w++){for(var I=0;I<5;I++){for(var B=0,C=0,F=0;F<5;F++){var A=d[I+5*F];B^=A.high,C^=A.low}var D=f[I];D.high=B,D.low=C}for(var I=0;I<5;I++)for(var T=f[(I+4)%5],O=f[(I+1)%5],U=O.high,Y=O.low,B=T.high^(U<<1|Y>>>31),C=T.low^(Y<<1|U>>>31),F=0;F<5;F++){var A=d[I+5*F];A.high^=B,A.low^=C}for(var j=1;j<25;j++){var B,C,A=d[j],X=A.high,K=A.low,$=g[j];$<32?(B=X<<$|K>>>32-$,C=K<<$|X>>>32-$):(B=K<<$-32|X>>>64-$,C=X<<$-32|K>>>64-$);var P=f[o[j]];P.high=B,P.low=C}var S=f[0],k=d[0];S.high=k.high,S.low=k.low;for(var I=0;I<5;I++)for(var F=0;F<5;F++){var j=I+5*F,A=d[j],J=f[j],V=f[(I+1)%5+5*F],oe=f[(I+2)%5+5*F];A.high=J.high^~V.high&oe.high,A.low=J.low^~V.low&oe.low}var A=d[0],W=u[w];A.high^=W.high,A.low^=W.low}},_doFinalize:function(){var h=this._data,b=h.words;this._nDataBytes*8;var d=h.sigBytes*8,l=this.blockSize*32;b[d>>>5]|=1<<24-d%32,b[(s.ceil((d+1)/l)*l>>>5)-1]|=128,h.sigBytes=b.length*4,this._process();for(var v=this._state,E=this.cfg.outputLength/8,_=E/8,A=[],w=0;w<_;w++){var I=v[w],B=I.high,C=I.low;B=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,A.push(C),A.push(B)}return new m.init(A,E)},clone:function(){for(var h=x.clone.call(this),b=h._state=this._state.slice(0),d=0;d<25;d++)b[d]=b[d].clone();return h}});i.SHA3=x._createHelper(y),i.HmacSHA3=x._createHmacHelper(y)}(Math),t.SHA3})}(a0)),a0.exports}var c0={exports:{}},Mr;function en(){return Mr||(Mr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){/** @preserve
|
|
49
|
+
`,s.action=t,s.target=this.$iFrameId,s}setupFormForUrl(e){const t=this.byId(this.$formId);t.method="GET",t.action=e,t.target=this.$iFrameId}initializePayment(e,t,s,i,n){this.mode=e,this.templateReload(),he.clearPollingEvent(),he.bind(t,s),i&&n&&he.setDefaultPaymentData(i,n)}}const M=new qi,Ie=class Ie extends je{constructor(){super(),this.$session=De,this.$logger=H,this.$event=Ve,this.platformType=Z.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/]}}async requestPayment(e){var t;((t=e.extra)==null?void 0:t.locale)!==void 0&&!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=R.packageVersion,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)),e.deposit_price=parseFloat(String(e.deposit_price)),Ie.invalidRequestParamsData(e),Ie.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 s=await M.start(e);return H.debug("confirm ready",s),M.hidePaymentiFrame(),M.closePopup(),["done","issued"].indexOf(s.event)===-1&&this.$event.send({step:s.event,msg:"",request:e,response:s}),M.setConfirmFormUrl(`${s.gateway_url}/confirm/${s.receipt_id}?application_id=${e.application_id}`),Promise.resolve(s)}catch(s){return this.eventError(s),Promise.reject(s)}}async confirm(){try{const e=await M.confirm();return Promise.resolve(e)}catch(e){return this.eventError(e),Promise.reject(e)}}eventDone(e,t=!0){var s;this.$logger.debug(e.event,e),this.$event.send({step:e.event,msg:e.event==="done"?"결제완료":"가상계좌발급완료",request:{},response:e}),le.hideProgress(),this.$logger.debug("show result",this.isDisplaySuccessResult()),this.isDisplaySuccessResult()&&t&&((s=e.data)==null?void 0:s.receipt_id)!==void 0?this.displayResultView(e.data.receipt_id):M.destroy()}eventError(e){le.hideProgress(),M.closePopup(),this.isDisplayErrorResult()&&e.event==="error"?this.displayResultErrorView(e):M.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{return!1}}()})}generateTransactionKey(){return this.$transactionKey=`${this.$uuid()}-${new Date().getTime()*1e3}`,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,redirect_url:e.redirect_url,wallet_id:e.wallet_id,widget:e.widget,widget_key:e.widget_key,widget_sandbox:e.widget_sandbox,subscribe_brandpay_type:e.subscribe_brandpay_type,platform_type:this.platformType,ver:R.packageVersion,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 s=await M.start(t,"CARD_SUBSCRIPTION");switch(H.debug("subscription success",s),this.$event.send({step:"confirm",msg:"결제승인전",request:{},response:s}),M.hidePaymentiFrame(),M.closePopup(),s.event){case"done":case"issued":break;case"confirm":M.setConfirmFormUrl(`${s.gateway_url}/confirm/${s.receipt_id}?application_id=${e.application_id}`)}return Promise.resolve(s)}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:$e.version,sdk_version:R.sdkVersion,sdk_type:R.sdkName,locale:R.locale,metadata:e.metadata,redirect_url:e.redirect_url,sdk:!0,uuid:this.$session.currentUserUUID(),sk:this.$session.currentSessionKey(),tk:this.$transactionKey,env:this.getUserDeviceEnvironment(),user:e.user,extra:e.extra};try{const s=await M.start(t,"AUTH");switch(H.debug("authentication success",s),this.$event.send({step:"confirm",msg:"본인인증 승인전",request:{},response:s}),M.hidePaymentiFrame(),M.closePopup(),s.event){case"done":case"issued":break;case"confirm":M.setConfirmFormUrl(`${s.gateway_url}/confirm/${s.receipt_id}?application_id=${e.application_id}`)}return Promise.resolve(s)}catch(s){return this.eventError(s),Promise.reject(s)}}async requestPaymentUrl(e){try{const t=await M.startPaymentUrl(e.url);return["done","issued"].indexOf(t.event)===-1&&this.$event.send({step:t.event,msg:"",request:{url:e.url},response:t}),M.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 this.extra!==void 0&&this.extra.display_success_result!==void 0&&this.extra.display_success_result}isDisplayErrorResult(){return this.extra!==void 0&&this.extra.display_error_result!==void 0&&this.extra.display_error_result}displayResultView(e){M.moveToUrl(R.toDoor(`result/${e}`))}displayResultErrorView(e){M.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)&&e.browser_open_type!==void 0){const t=this.getUserAgent();for(let s in e.browser_open_type){const i=e.browser_open_type[s],n=this.$present(this.browserBootpayFilter[i.browser])?this.browserBootpayFilter[i.browser]:new RegExp(`${i.browser}`);if(t.match(n)){e.open_type=i.open_type;break}}}return e}static invalidRequestParamsData(e){if(se(e))throw new xe({event:"error",error_code:"NEED_MORE_PARAMS",message:"결제 요청을 위한 최소한의 결제 정보를 입력해주세요."});Object.keys(Ie.invalidRequestParams).forEach(t=>{const s=e[t];if(se(s))throw new xe({event:"error",error_code:"INVALID_REQUEST_PARAMS",message:Ie.invalidRequestParams[t]})})}static invalidRequestItemsData(e,t){if(e!==void 0&&q(e)){let s=0;if(e.forEach((i,n)=>{if(se(i.id))throw new xe({event:"error",error_code:"NEED_ITEM_ID",message:`${n+1}번째 상품 고유 ID를 입력해주세요. [ key: id ]`});if(se(i.name))throw new xe({event:"error",error_code:"NEED_ITEM_NAME",message:`${n+1}번째 상품명을 입력해주세요. [ key: name ]`});if(se(i.qty))throw new xe({event:"error",error_code:"NEED_ITEM_QTY",message:`${n+1}번째 상품수량을 입력해주세요. [ key: qty ]`});if(se(i.price))throw new xe({event:"error",error_code:"NEED_ITEM_PRICE",message:`${n+1}번째 상품금액을 입력해주세요. [ key: price ]`});e[n].price=parseFloat(String(e[n].price)),e[n].qty=parseFloat(String(e[n].qty)),s+=e[n].price*e[n].qty}),s!==t)throw new xe({event:"error",error_code:"NEED_ITEM_TOTAL_PRICE_NOT_MATCH",message:`결제 금액과 상품 수량 및 상품 금액의 총합과 일치하지 않습니다. [ 요청금액: ${t} ${typeof t}, 상품 총합계 금액: ${s} ${typeof s} ]`})}}};Ie.invalidRequestParams={application_id:"application_id를 입력해주세요. [ key: application_id ]",order_name:"판매할 상품명을 입력해주세요. [ key: order_name ]",price:"판매할 상품의 금액을 입력해주세요. [ key: price ]",order_id:"가맹점에서 설정할 주문 ID를 입력해주세요. [ key: order_id ]"};let Ye=Ie;const zi=new Ye;class ji extends fe{constructor(){super(),this.$session=De}setAnalyticsData(e){this.$session.setTime(e.time),this.$session.setUUID(e.uuid)}async send(e){const t=document.URL;if(t!==void 0&&t.search(/bootapi.co.kr/)===-1){const s=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=document.referrer!==void 0&&q(document.referrer)&&document.referrer.search(new RegExp(window.location.hostname))==-1?document.referrer:"",e.user_id=s===void 0||se(s)?void 0:s.id,e.items=this.generateItemKeyToVersion1(e.items);try{const i=await this.$http.post(R.toAnalytics(`call?ver=${$e.version}`),e);return i.data.status===200?(H.info("Analytics Common Send","통계 데이터가 전송되었습니다."),Promise.resolve()):(H.warn("Analytics Common Send",`통계 데이터가 전송 실패. ${JSON.stringify(i.data)}`),Promise.reject())}catch(i){return H.error("Analytics Common Error",`데이터 전송 실패: ${i.message}`),Promise.reject()}}}async login(e){if(e.application_id=R.currentApplicationId(e.application_id),se(e.application_id))return H.error("Analytics Params","application_id 값을 입력해주세요.");if(se(e.id))return H.error("Analytics Params","id 값을 입력해주세요.");try{const t=await this.$http.post(R.toAnalytics(`login?ver=${$e.version}`),e),{user_id:s}=t.data.data;return this.$session.setUser({id:s,time:new Date().getTime()}),Promise.resolve()}catch(t){return H.error("Analytics Login Error",`데이터 전송 실패: ${t.message}`),Promise.reject()}}logout(){this.$session.setUser(void 0)}generateItemKeyToVersion1(e){if(e!==void 0)return e.map(t=>({cat1:t.cat1,cat2:t.cat2,cat3:t.cat3,item_img:t.img,item_name:t.name,unique:t.id,price:t.price}))}}const Ki=new ji;(function(){if(typeof window>"u"||typeof window.CustomEvent=="function")return!1;function r(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};let s=document.createEvent("CustomEvent");return s.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),s}r.prototype=window.Event.prototype,window.CustomEvent=r})();const Ee={$payment:zi,$analytics:Ki,$environment:R,async requestPayment(r){return new Promise(async(e,t)=>{try{r.extra!==void 0&&r.extra.override_global_event===!0&&(H.debug("override global event","override global event!"),Ee.overrideGlobalInstance());const s=await this.$payment.requestPayment(r);setTimeout(()=>{e(s),["done","issued"].indexOf(s.event)>-1&&this.$payment.eventDone(s)},100)}catch(s){setTimeout(()=>{t(this.errorHandler(s))},100)}})},async confirm(){return new Promise(async(r,e)=>{try{const t=await this.$payment.confirm();setTimeout(()=>{r(t),this.$payment.eventDone(t)},100)}catch(t){setTimeout(()=>e(this.errorHandler(t)),100)}})},async requestSubscription(r){return new Promise(async(e,t)=>{try{const s=await this.$payment.requestSubscription(r);e(s),this.$payment.eventDone(s)}catch(s){return t(this.errorHandler(s))}})},async requestAuthentication(r){return new Promise(async(e,t)=>{try{const s=await this.$payment.requestAuthentication(r);e(s),this.$payment.eventDone(s)}catch(s){return t(this.errorHandler(s))}})},async requestPaymentUrl(r){return new Promise(async(e,t)=>{try{const s=await this.$payment.requestPaymentUrl(r);setTimeout(()=>{e(s),["done","issued"].indexOf(s.event)>-1&&this.$payment.eventDone(s)},100)}catch(s){setTimeout(()=>{t(this.errorHandler(s))},100)}})},setEnvironmentMode(r,e=void 0){this.$environment.set(r),e!==void 0&&this.$environment.setDevelopmentHost(e)},setApplicationId(r){return this.$environment.setApplicationId(r)},setVersion(r,e,t){return this.$environment.setVersion(r,e,t)},setDevice(r){switch(r){case"IOS":this.$payment.platformType=Z.PLATFORM.IOS;break;case"ANDROID":this.$payment.platformType=Z.PLATFORM.ANDROID;break;default:this.$payment.platformType=Z.PLATFORM.JS}return this.$payment.platformType},errorHandler(r){let e;switch(le.hideProgress(),r.name){case"BootpayEventError":e=r.eventMessage;break;default:if(q(r.event))e=r;else throw r}return e},readyToPopup(r=void 0){M.readyToPopup(r)},setLogLevel(r){H.setLogLevel(r)},setUUID(r){return De.setUUID(r)},send(r=void 0){return this.$analytics.send(r!==void 0?r:{})},login(r){return this.$analytics.login(r)},logout(){return this.$analytics.logout()},setLocale(r){R.setLocale(r),M.templateReload()},async dismiss(r=!1){if(r)try{await Ve.sendCloseEvent()}catch(e){H.debug("error",e.message)}he.reject({event:"cancel",error_code:"RC_CLOSE_WINDOW",message:"사용자가 결제창을 닫았습니다."})},getCurrentUUID(){return De.currentUserUUID()},destroy(){M.destroy()},overrideGlobalInstance(){window.Bootpay=Ee}};typeof window<"u"&&(window.Bootpay=Ee);class Gi extends it{constructor(){super(),this.$messageEventName="message.BootpayUserTokenEvent"}bind(e,t){this.setCallbackFunction(e,t),window.resetBootpayEventListener(this.$messageEventName,s=>{const i=this.parseEvent(s.data);if(q(i))switch(H.debug("event",i),i.event){case"error":case"cancel":return this.handleErrorOrCancel(i);case"data":return this.resolve(i.data);case"confirmPasswordToken":return this.resolve(i.token);case"confirmAddCard":return this.resolve(i);case"resize":D0.iFrameResize(i.resizeData);break;default:return}})}handleErrorOrCancel(e){return this.reject({event:e.event,pg_error_code:e.pg_error_code,error_code:e.error_code,message:e.message,payload:e.payload})}}var kr={exports:{}},Zt={exports:{}},Pr;function ut(){return Pr||(Pr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(s){var i=t,n=i.lib,m=n.Base,x=n.WordArray,p=i.x64={};p.Word=m.extend({init:function(a,c){this.high=a,this.low=c}}),p.WordArray=m.extend({init:function(a,c){a=this.words=a||[],c!=s?this.sigBytes=c:this.sigBytes=a.length*8},toX32:function(){for(var a=this.words,c=a.length,g=[],o=0;o<c;o++){var u=a[o];g.push(u.high),g.push(u.low)}return x.create(g,this.sigBytes)},clone:function(){for(var a=m.clone.call(this),c=a.words=this.words.slice(0),g=c.length,o=0;o<g;o++)c[o]=c[o].clone();return a}})}(),t})}(Zt)),Zt.exports}var Qt={exports:{}},Sr;function Xi(){return Sr||(Sr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(){if(typeof ArrayBuffer=="function"){var s=t,i=s.lib,n=i.WordArray,m=n.init,x=n.init=function(p){if(p instanceof ArrayBuffer&&(p=new Uint8Array(p)),(p instanceof Int8Array||typeof Uint8ClampedArray<"u"&&p instanceof Uint8ClampedArray||p instanceof Int16Array||p instanceof Uint16Array||p instanceof Int32Array||p instanceof Uint32Array||p instanceof Float32Array||p instanceof Float64Array)&&(p=new Uint8Array(p.buffer,p.byteOffset,p.byteLength)),p instanceof Uint8Array){for(var a=p.byteLength,c=[],g=0;g<a;g++)c[g>>>2]|=p[g]<<24-g%4*8;m.call(this,c,a)}else m.apply(this,arguments)};x.prototype=n}}(),t.lib.WordArray})}(Qt)),Qt.exports}var e0={exports:{}},Ir;function Vi(){return Ir||(Ir=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,m=s.enc;m.Utf16=m.Utf16BE={stringify:function(p){for(var a=p.words,c=p.sigBytes,g=[],o=0;o<c;o+=2){var u=a[o>>>2]>>>16-o%4*8&65535;g.push(String.fromCharCode(u))}return g.join("")},parse:function(p){for(var a=p.length,c=[],g=0;g<a;g++)c[g>>>1]|=p.charCodeAt(g)<<16-g%2*16;return n.create(c,a*2)}},m.Utf16LE={stringify:function(p){for(var a=p.words,c=p.sigBytes,g=[],o=0;o<c;o+=2){var u=x(a[o>>>2]>>>16-o%4*8&65535);g.push(String.fromCharCode(u))}return g.join("")},parse:function(p){for(var a=p.length,c=[],g=0;g<a;g++)c[g>>>1]|=x(p.charCodeAt(g)<<16-g%2*16);return n.create(c,a*2)}};function x(p){return p<<8&4278255360|p>>>8&16711935}}(),t.enc.Utf16})}(e0)),e0.exports}var t0={exports:{}},Tr;function Yi(){return Tr||(Tr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,m=s.enc;m.Base64url={stringify:function(p,a){a===void 0&&(a=!0);var c=p.words,g=p.sigBytes,o=a?this._safe_map:this._map;p.clamp();for(var u=[],f=0;f<g;f+=3)for(var y=c[f>>>2]>>>24-f%4*8&255,h=c[f+1>>>2]>>>24-(f+1)%4*8&255,b=c[f+2>>>2]>>>24-(f+2)%4*8&255,d=y<<16|h<<8|b,l=0;l<4&&f+l*.75<g;l++)u.push(o.charAt(d>>>6*(3-l)&63));var v=o.charAt(64);if(v)for(;u.length%4;)u.push(v);return u.join("")},parse:function(p,a){a===void 0&&(a=!0);var c=p.length,g=a?this._safe_map:this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var u=0;u<g.length;u++)o[g.charCodeAt(u)]=u}var f=g.charAt(64);if(f){var y=p.indexOf(f);y!==-1&&(c=y)}return x(p,c,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function x(p,a,c){for(var g=[],o=0,u=0;u<a;u++)if(u%4){var f=c[p.charCodeAt(u-1)]<<u%4*2,y=c[p.charCodeAt(u)]>>>6-u%4*2,h=f|y;g[o>>>2]|=h<<24-o%4*8,o++}return n.create(g,o)}}(),t.enc.Base64url})}(t0)),t0.exports}var r0={exports:{}},Rr;function s0(){return Rr||(Rr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){return function(s){var i=t,n=i.lib,m=n.WordArray,x=n.Hasher,p=i.algo,a=[],c=[];(function(){function u(b){for(var d=s.sqrt(b),l=2;l<=d;l++)if(!(b%l))return!1;return!0}function f(b){return(b-(b|0))*4294967296|0}for(var y=2,h=0;h<64;)u(y)&&(h<8&&(a[h]=f(s.pow(y,1/2))),c[h]=f(s.pow(y,1/3)),h++),y++})();var g=[],o=p.SHA256=x.extend({_doReset:function(){this._hash=new m.init(a.slice(0))},_doProcessBlock:function(u,f){for(var y=this._hash.words,h=y[0],b=y[1],d=y[2],l=y[3],v=y[4],E=y[5],_=y[6],A=y[7],w=0;w<64;w++){if(w<16)g[w]=u[f+w]|0;else{var I=g[w-15],B=(I<<25|I>>>7)^(I<<14|I>>>18)^I>>>3,C=g[w-2],F=(C<<15|C>>>17)^(C<<13|C>>>19)^C>>>10;g[w]=B+g[w-7]+F+g[w-16]}var D=v&E^~v&_,T=h&b^h&d^b&d,O=(h<<30|h>>>2)^(h<<19|h>>>13)^(h<<10|h>>>22),U=(v<<26|v>>>6)^(v<<21|v>>>11)^(v<<7|v>>>25),Y=A+U+D+c[w]+g[w],j=O+T;A=_,_=E,E=v,v=l+Y|0,l=d,d=b,b=h,h=Y+j|0}y[0]=y[0]+h|0,y[1]=y[1]+b|0,y[2]=y[2]+d|0,y[3]=y[3]+l|0,y[4]=y[4]+v|0,y[5]=y[5]+E|0,y[6]=y[6]+_|0,y[7]=y[7]+A|0},_doFinalize:function(){var u=this._data,f=u.words,y=this._nDataBytes*8,h=u.sigBytes*8;return f[h>>>5]|=128<<24-h%32,f[(h+64>>>9<<4)+14]=s.floor(y/4294967296),f[(h+64>>>9<<4)+15]=y,u.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var u=x.clone.call(this);return u._hash=this._hash.clone(),u}});i.SHA256=x._createHelper(o),i.HmacSHA256=x._createHmacHelper(o)}(Math),t.SHA256})}(r0)),r0.exports}var i0={exports:{}},Or;function Ji(){return Or||(Or=1,function(r,e){(function(t,s,i){r.exports=s(L(),s0())})(N,function(t){return function(){var s=t,i=s.lib,n=i.WordArray,m=s.algo,x=m.SHA256,p=m.SHA224=x.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var a=x._doFinalize.call(this);return a.sigBytes-=4,a}});s.SHA224=x._createHelper(p),s.HmacSHA224=x._createHmacHelper(p)}(),t.SHA224})}(i0)),i0.exports}var n0={exports:{}},Ur;function Hr(){return Ur||(Ur=1,function(r,e){(function(t,s,i){r.exports=s(L(),ut())})(N,function(t){return function(){var s=t,i=s.lib,n=i.Hasher,m=s.x64,x=m.Word,p=m.WordArray,a=s.algo;function c(){return x.create.apply(x,arguments)}var g=[c(1116352408,3609767458),c(1899447441,602891725),c(3049323471,3964484399),c(3921009573,2173295548),c(961987163,4081628472),c(1508970993,3053834265),c(2453635748,2937671579),c(2870763221,3664609560),c(3624381080,2734883394),c(310598401,1164996542),c(607225278,1323610764),c(1426881987,3590304994),c(1925078388,4068182383),c(2162078206,991336113),c(2614888103,633803317),c(3248222580,3479774868),c(3835390401,2666613458),c(4022224774,944711139),c(264347078,2341262773),c(604807628,2007800933),c(770255983,1495990901),c(1249150122,1856431235),c(1555081692,3175218132),c(1996064986,2198950837),c(2554220882,3999719339),c(2821834349,766784016),c(2952996808,2566594879),c(3210313671,3203337956),c(3336571891,1034457026),c(3584528711,2466948901),c(113926993,3758326383),c(338241895,168717936),c(666307205,1188179964),c(773529912,1546045734),c(1294757372,1522805485),c(1396182291,2643833823),c(1695183700,2343527390),c(1986661051,1014477480),c(2177026350,1206759142),c(2456956037,344077627),c(2730485921,1290863460),c(2820302411,3158454273),c(3259730800,3505952657),c(3345764771,106217008),c(3516065817,3606008344),c(3600352804,1432725776),c(4094571909,1467031594),c(275423344,851169720),c(430227734,3100823752),c(506948616,1363258195),c(659060556,3750685593),c(883997877,3785050280),c(958139571,3318307427),c(1322822218,3812723403),c(1537002063,2003034995),c(1747873779,3602036899),c(1955562222,1575990012),c(2024104815,1125592928),c(2227730452,2716904306),c(2361852424,442776044),c(2428436474,593698344),c(2756734187,3733110249),c(3204031479,2999351573),c(3329325298,3815920427),c(3391569614,3928383900),c(3515267271,566280711),c(3940187606,3454069534),c(4118630271,4000239992),c(116418474,1914138554),c(174292421,2731055270),c(289380356,3203993006),c(460393269,320620315),c(685471733,587496836),c(852142971,1086792851),c(1017036298,365543100),c(1126000580,2618297676),c(1288033470,3409855158),c(1501505948,4234509866),c(1607167915,987167468),c(1816402316,1246189591)],o=[];(function(){for(var f=0;f<80;f++)o[f]=c()})();var u=a.SHA512=n.extend({_doReset:function(){this._hash=new p.init([new x.init(1779033703,4089235720),new x.init(3144134277,2227873595),new x.init(1013904242,4271175723),new x.init(2773480762,1595750129),new x.init(1359893119,2917565137),new x.init(2600822924,725511199),new x.init(528734635,4215389547),new x.init(1541459225,327033209)])},_doProcessBlock:function(f,y){for(var h=this._hash.words,b=h[0],d=h[1],l=h[2],v=h[3],E=h[4],_=h[5],A=h[6],w=h[7],I=b.high,B=b.low,C=d.high,F=d.low,D=l.high,T=l.low,O=v.high,U=v.low,Y=E.high,j=E.low,X=_.high,K=_.low,$=A.high,P=A.low,S=w.high,k=w.low,J=I,V=B,oe=C,W=F,Je=D,Me=T,$0=O,Ze=U,ve=Y,ce=j,ft=X,Qe=K,ht=$,et=P,k0=S,tt=k,ye=0;ye<80;ye++){var ue,we,vt=o[ye];if(ye<16)we=vt.high=f[y+ye*2]|0,ue=vt.low=f[y+ye*2+1]|0;else{var ds=o[ye-15],Le=ds.high,rt=ds.low,Rn=(Le>>>1|rt<<31)^(Le>>>8|rt<<24)^Le>>>7,xs=(rt>>>1|Le<<31)^(rt>>>8|Le<<24)^(rt>>>7|Le<<25),ls=o[ye-2],qe=ls.high,st=ls.low,On=(qe>>>19|st<<13)^(qe<<3|st>>>29)^qe>>>6,us=(st>>>19|qe<<13)^(st<<3|qe>>>29)^(st>>>6|qe<<26),ps=o[ye-7],Un=ps.high,Hn=ps.low,fs=o[ye-16],Nn=fs.high,hs=fs.low;ue=xs+Hn,we=Rn+Un+(ue>>>0<xs>>>0?1:0),ue=ue+us,we=we+On+(ue>>>0<us>>>0?1:0),ue=ue+hs,we=we+Nn+(ue>>>0<hs>>>0?1:0),vt.high=we,vt.low=ue}var Wn=ve&ft^~ve&ht,vs=ce&Qe^~ce&et,Mn=J&oe^J&Je^oe&Je,Ln=V&W^V&Me^W&Me,qn=(J>>>28|V<<4)^(J<<30|V>>>2)^(J<<25|V>>>7),ys=(V>>>28|J<<4)^(V<<30|J>>>2)^(V<<25|J>>>7),zn=(ve>>>14|ce<<18)^(ve>>>18|ce<<14)^(ve<<23|ce>>>9),jn=(ce>>>14|ve<<18)^(ce>>>18|ve<<14)^(ce<<23|ve>>>9),ms=g[ye],Kn=ms.high,Es=ms.low,de=tt+jn,Fe=k0+zn+(de>>>0<tt>>>0?1:0),de=de+vs,Fe=Fe+Wn+(de>>>0<vs>>>0?1:0),de=de+Es,Fe=Fe+Kn+(de>>>0<Es>>>0?1:0),de=de+ue,Fe=Fe+we+(de>>>0<ue>>>0?1:0),gs=ys+Ln,Gn=qn+Mn+(gs>>>0<ys>>>0?1:0);k0=ht,tt=et,ht=ft,et=Qe,ft=ve,Qe=ce,ce=Ze+de|0,ve=$0+Fe+(ce>>>0<Ze>>>0?1:0)|0,$0=Je,Ze=Me,Je=oe,Me=W,oe=J,W=V,V=de+gs|0,J=Fe+Gn+(V>>>0<de>>>0?1:0)|0}B=b.low=B+V,b.high=I+J+(B>>>0<V>>>0?1:0),F=d.low=F+W,d.high=C+oe+(F>>>0<W>>>0?1:0),T=l.low=T+Me,l.high=D+Je+(T>>>0<Me>>>0?1:0),U=v.low=U+Ze,v.high=O+$0+(U>>>0<Ze>>>0?1:0),j=E.low=j+ce,E.high=Y+ve+(j>>>0<ce>>>0?1:0),K=_.low=K+Qe,_.high=X+ft+(K>>>0<Qe>>>0?1:0),P=A.low=P+et,A.high=$+ht+(P>>>0<et>>>0?1:0),k=w.low=k+tt,w.high=S+k0+(k>>>0<tt>>>0?1:0)},_doFinalize:function(){var f=this._data,y=f.words,h=this._nDataBytes*8,b=f.sigBytes*8;y[b>>>5]|=128<<24-b%32,y[(b+128>>>10<<5)+30]=Math.floor(h/4294967296),y[(b+128>>>10<<5)+31]=h,f.sigBytes=y.length*4,this._process();var d=this._hash.toX32();return d},clone:function(){var f=n.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:1024/32});s.SHA512=n._createHelper(u),s.HmacSHA512=n._createHmacHelper(u)}(),t.SHA512})}(n0)),n0.exports}var o0={exports:{}},Nr;function Zi(){return Nr||(Nr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ut(),Hr())})(N,function(t){return function(){var s=t,i=s.x64,n=i.Word,m=i.WordArray,x=s.algo,p=x.SHA512,a=x.SHA384=p.extend({_doReset:function(){this._hash=new m.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var c=p._doFinalize.call(this);return c.sigBytes-=16,c}});s.SHA384=p._createHelper(a),s.HmacSHA384=p._createHmacHelper(a)}(),t.SHA384})}(o0)),o0.exports}var a0={exports:{}},Wr;function Qi(){return Wr||(Wr=1,function(r,e){(function(t,s,i){r.exports=s(L(),ut())})(N,function(t){return function(s){var i=t,n=i.lib,m=n.WordArray,x=n.Hasher,p=i.x64,a=p.Word,c=i.algo,g=[],o=[],u=[];(function(){for(var h=1,b=0,d=0;d<24;d++){g[h+5*b]=(d+1)*(d+2)/2%64;var l=b%5,v=(2*h+3*b)%5;h=l,b=v}for(var h=0;h<5;h++)for(var b=0;b<5;b++)o[h+5*b]=b+(2*h+3*b)%5*5;for(var E=1,_=0;_<24;_++){for(var A=0,w=0,I=0;I<7;I++){if(E&1){var B=(1<<I)-1;B<32?w^=1<<B:A^=1<<B-32}E&128?E=E<<1^113:E<<=1}u[_]=a.create(A,w)}})();var f=[];(function(){for(var h=0;h<25;h++)f[h]=a.create()})();var y=c.SHA3=x.extend({cfg:x.cfg.extend({outputLength:512}),_doReset:function(){for(var h=this._state=[],b=0;b<25;b++)h[b]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(h,b){for(var d=this._state,l=this.blockSize/2,v=0;v<l;v++){var E=h[b+2*v],_=h[b+2*v+1];E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360;var A=d[v];A.high^=_,A.low^=E}for(var w=0;w<24;w++){for(var I=0;I<5;I++){for(var B=0,C=0,F=0;F<5;F++){var A=d[I+5*F];B^=A.high,C^=A.low}var D=f[I];D.high=B,D.low=C}for(var I=0;I<5;I++)for(var T=f[(I+4)%5],O=f[(I+1)%5],U=O.high,Y=O.low,B=T.high^(U<<1|Y>>>31),C=T.low^(Y<<1|U>>>31),F=0;F<5;F++){var A=d[I+5*F];A.high^=B,A.low^=C}for(var j=1;j<25;j++){var B,C,A=d[j],X=A.high,K=A.low,$=g[j];$<32?(B=X<<$|K>>>32-$,C=K<<$|X>>>32-$):(B=K<<$-32|X>>>64-$,C=X<<$-32|K>>>64-$);var P=f[o[j]];P.high=B,P.low=C}var S=f[0],k=d[0];S.high=k.high,S.low=k.low;for(var I=0;I<5;I++)for(var F=0;F<5;F++){var j=I+5*F,A=d[j],J=f[j],V=f[(I+1)%5+5*F],oe=f[(I+2)%5+5*F];A.high=J.high^~V.high&oe.high,A.low=J.low^~V.low&oe.low}var A=d[0],W=u[w];A.high^=W.high,A.low^=W.low}},_doFinalize:function(){var h=this._data,b=h.words;this._nDataBytes*8;var d=h.sigBytes*8,l=this.blockSize*32;b[d>>>5]|=1<<24-d%32,b[(s.ceil((d+1)/l)*l>>>5)-1]|=128,h.sigBytes=b.length*4,this._process();for(var v=this._state,E=this.cfg.outputLength/8,_=E/8,A=[],w=0;w<_;w++){var I=v[w],B=I.high,C=I.low;B=(B<<8|B>>>24)&16711935|(B<<24|B>>>8)&4278255360,C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360,A.push(C),A.push(B)}return new m.init(A,E)},clone:function(){for(var h=x.clone.call(this),b=h._state=this._state.slice(0),d=0;d<25;d++)b[d]=b[d].clone();return h}});i.SHA3=x._createHelper(y),i.HmacSHA3=x._createHmacHelper(y)}(Math),t.SHA3})}(a0)),a0.exports}var c0={exports:{}},Mr;function en(){return Mr||(Mr=1,function(r,e){(function(t,s){r.exports=s(L())})(N,function(t){/** @preserve
|
|
50
50
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
51
51
|
|
|
52
52
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
package/dist/src/bootpay.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface BootpayInterface {
|
|
|
22
22
|
send(data: BootpayAnalyticsModel): Promise<any>;
|
|
23
23
|
login(data: BootpayAnalyticsUserModel): Promise<any>;
|
|
24
24
|
logout(): void;
|
|
25
|
-
readyToPopup(): void;
|
|
25
|
+
readyToPopup(url: string): void;
|
|
26
26
|
getCurrentUUID(): string | undefined;
|
|
27
27
|
setLocale(locale: string): void;
|
|
28
28
|
dismiss(closedEvent: boolean): void;
|