sales-frontend-utils 0.0.18 → 0.0.19

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.cjs CHANGED
@@ -575,19 +575,16 @@ var astx2_custom_default = "/* ASTx 1.3 | (C) Copyright AhnLab, Inc. | $Revision
575
575
 
576
576
  // src/utils/astx2-utils.ts
577
577
  function addE2EObject(el, e2e_type) {
578
- const globalThis = window;
579
- if (globalThis.$ASTX2) {
580
- globalThis.$ASTX2.addE2EObject(el, e2e_type);
581
- globalThis.$ASTX2.resetE2E();
578
+ if (window.$ASTX2) {
579
+ window.$ASTX2.addE2EObject(el, e2e_type);
580
+ window.$ASTX2.resetE2E();
582
581
  }
583
582
  }
584
583
  function hasAstx2() {
585
- const globalThis = window;
586
- return !!globalThis.$ASTX2;
584
+ return !!window.$ASTX2;
587
585
  }
588
586
  var loadScript = (callback) => {
589
- const globalThis = window;
590
- if (!globalThis.$ASTX2) {
587
+ if (!window.$ASTX2) {
591
588
  console.log("dynamic load");
592
589
  const script = document.createElement("script");
593
590
  script.innerHTML = `
@@ -610,27 +607,26 @@ var init = ({
610
607
  checkServerFailure = () => {
611
608
  }
612
609
  } = {}) => {
613
- const globalThis = window;
614
- globalThis.$ASTX2.init(
610
+ window.$ASTX2.init(
615
611
  () => {
616
- globalThis.$ASTX2.initE2E();
617
- globalThis.$ASTX2.checkServer(
612
+ window.$ASTX2.initE2E();
613
+ window.$ASTX2.checkServer(
618
614
  () => {
619
615
  checkServerSuccess();
620
616
  },
621
617
  () => {
622
618
  checkServerFailure();
623
- console.error(`ASTX.checkServer() onFailure: errno=${globalThis.$ASTX2.getLastError()}`);
619
+ console.error(`ASTX.checkServer() onFailure: errno=${window.$ASTX2.getLastError()}`);
624
620
  }
625
621
  );
626
622
  initSuccess();
627
623
  },
628
624
  () => {
629
625
  initFailure();
630
- if (globalThis.$ASTX2.getLastError() === 103) {
626
+ if (window.$ASTX2.getLastError() === 103) {
631
627
  console.error("AhnLab Safe Transaction \uD074\uB77C\uC774\uC5B8\uD2B8\uAC00 \uC124\uCE58\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4.");
632
628
  } else {
633
- console.error(`$ASTX2.init() onFailure: errno=${globalThis.$ASTX2.getLastError()}`);
629
+ console.error(`$ASTX2.init() onFailure: errno=${window.$ASTX2.getLastError()}`);
634
630
  }
635
631
  }
636
632
  );
@@ -645,8 +641,7 @@ var initASTX2 = ({
645
641
  checkServerFailure = () => {
646
642
  }
647
643
  } = {}) => {
648
- const globalThis = window;
649
- if (globalThis.$ASTX2) {
644
+ if (window.$ASTX2) {
650
645
  init({
651
646
  initSuccess,
652
647
  initFailure,
@@ -657,16 +652,15 @@ var initASTX2 = ({
657
652
  };
658
653
  function getE2EDataIDs(ids, onSuccess, onFailure = () => {
659
654
  }) {
660
- const globalThis = window;
661
- if (globalThis.$ASTX2) {
662
- globalThis.$ASTX2.getE2EDataIDs(
655
+ if (window.$ASTX2) {
656
+ window.$ASTX2.getE2EDataIDs(
663
657
  ids,
664
658
  async (astx_data) => {
665
659
  onSuccess(astx_data);
666
660
  },
667
661
  () => {
668
662
  onFailure();
669
- console.log(`ASTX.getE2EData() onFailure: errno=${globalThis.$ASTX2.getLastError()}`);
663
+ console.log(`ASTX.getE2EData() onFailure: errno=${window.$ASTX2.getLastError()}`);
670
664
  }
671
665
  );
672
666
  }