1"use strict";(self.webpackChunkshop_react_web=self.webpackChunkshop_react_web||[]).push([[2222],{78127:(e,o,t)=>{t.d(o,{FK:()=>r,ZR:()=>c,xW:()=>i});var n=t(54451),a=t(69835);const r=async e=>{const{data:o}=await a.A.post("/authentication/nice-intc/auth-url",e);return o.data},i=async e=>{const{data:o}=await a.A.post("/authentication/nice-intc/result",e);return o.data},c=async e=>(await n.A.post("/users/apple/authorization",e)).data},32222:(e,o,t)=>{t.r(o),t.d(o,{default:()=>x});var n=t(65043),a=t(14365),r=t(47097),i=t(78127);(0,a.DY)("niceToken",{fetchNiceToken:e=>[e],postDecryptNiceToken:e=>[e],postNiceAuthUrl:e=>[e],postNiceAuthResult:e=>[e]});var c=t(9970),s=t(76172),l=t(97605),d=t(399),u=t(35509),m=t(48120),p=t(59116),h=t(70579);const g="niceTransactionId",w=()=>{if("undefined"===typeof window)return{scheme:"mieumshop",packageName:"com.wzsoft.mieumshop"};const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||e.includes("develop")?{scheme:"mieumshop-dev",packageName:"com.wzsoft.mieumshop.dev"}:e.includes("stg")||e.includes("staging")?{scheme:"mieumshop-stg",packageName:"com.wzsoft.mieumshop.stg"}:{scheme:"mieumshop",packageName:"com.wzsoft.mieumshop"}},f=e=>{const{scheme:o,packageName:t}=w();return"intent://nice/callback?web_transaction_id=".concat(encodeURIComponent(e),"#Intent;scheme=").concat(o,";package=").concat(t,";end")},v=e=>{const{scheme:o}=w();return"".concat(o,"://nice/callback?web_transaction_id=").concat(encodeURIComponent(e))},k=(e,o,t)=>{const{scheme:n,packageName:a}=w(),r=new URLSearchParams({error:e});return o&&r.append("error_description",o),t?"intent://nice/callback?".concat(r.toString(),"#Intent;scheme=").concat(n,";package=").concat(a,";end"):"".concat(n,"://nice/callback?").concat(r.toString())},b=e=>{(0,s.aO)("\ub525\ub9c1\ud06c URL:",e),window.location.href=e},x=()=>{const e=new URL(window.location.href),o=(0,n.useRef)(!1),t=(()=>{if("undefined"===typeof navigator)return{isMobile:!1,isAndroid:!1};const e=navigator.userAgent||"",o=/android/i.test(e),t=/iphone|ipad|ipod/i.test(e);return{isMobile:o||t,isAndroid:o}})(),[a]=(0,n.useState)(t.isMobile),[w]=(0,n.useState)(t.isAndroid),[x,y]=(0,n.useState)(!1),I=e.searchParams.get("web_transaction_id")||"",S=localStorage.getItem(g)||sessionStorage.getItem(g)||"",A=sessionStorage.getItem("shopId")||"",_=e.searchParams.get("error")||"",N=e.searchParams.get("error_description")||"",T=!!I,j=!!_,R=T||j,M="undefined"!==typeof window&&!!window.opener,{mutate:C}=(0,r.n)({mutationFn:e=>(0,i.xW)(e)});(0,n.useEffect)((()=>{if(!a||!R||M)return;let e;if(T)e=w?f(I):v(I);else{if(!j)return;e=k(_,N,w)}const o=setTimeout((()=>{b(e)}),100);return()=>clearTimeout(o)}),[]);const U=()=>{if(x)return;let e;if(y(!0),T)e=w?f(I):v(I);else{if(!j)return void y(!1);e=k(_,N,w)}b(e),setTimeout((()=>{y(!1)}),2500)};return(0,n.useEffect)((()=>{if(M&&!o.current){var e;if(!I||!S)return(0,s.aO)("webTransactionId \ub610\ub294 transactionId \uc5c6\uc74c - \uc778\uc99d \uc2e4\ud328 \ucc98\ub9ac"),null===(e=window.opener)||void 0===e||e.postMessage({result:"authFail",tel:null},window.location.origin),void window.close();o.current=!0,C({webTransactionId:I,transactionId:S,shopId:A},{onSuccess:e=>{localStorage.removeItem(g),sessionStorage.removeItem(g),e?window.opener.postMessage({result:"authSuccess",tel:e.tel},window.location.origin):window.opener.postMessage({result:"authFail",tel:null},window.location.origin),window.close()},onError:()=>{localStorage.removeItem(g),sessionStorage.removeItem(g),window.opener.postMessage({result:"authFail",tel:null},window.location.origin),window.close()}})}}),[I,S,A,C,M]),a&&R&&!M?(0,h.jsx)(l.pT,{direction:"column",align:"center",justify:"center",$minHeight:"100vh",padding:"20px",background:"var(--color-gray-50)",children:(0,h.jsxs)(l.pT,{direction:"column",align:"center",background:"var(--color-white)",radius:m.A.corner16,padding:"32px 24px",$maxWidth:"320px",width:"100%",$boxShadow:"var(--shadow-3)",children:[(0,h.jsx)(d.yO,{color:"var(--color-gray-700-main)",margin:"0 0 8px",children:j?"\ubcf8\uc778\uc778\uc99d \uc2e4\ud328":"\ubcf8\uc778\uc778\uc99d \uc644\ub8cc"}),(0,h.jsx)(d.ld,{color:"var(--color-gray-500)",margin:"0 0 24px",align:"center",children:j?N||"\ubcf8\uc778\uc778\uc99d\uc5d0 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4.":"\ubbf8\uc74c \uc571\uc73c\ub85c \uc774\ub3d9\ud569\ub2c8\ub2e4..."}),(0,h.jsx)(u.tB,{width:"100%",height:"48px",background:x?"var(--color-gray-300)":"var(--color-primary-500-main)",$hoverBackgroun
1d:x?"var(--color-gray-300)":"var(--color-primary-600)",$activeBackground:x?"var(--color-gray-300)":"var(--color-primary-700)",color:"var(--color-white)",radius:m.A.corner12,fontWeight:p.sO.semiBold,onClick:U,disabled:x,$hasNotCursor:x,children:x?"\uc774\ub3d9 \uc911...":"\ubbf8\uc74c \uc571 \uc5f4\uae30"}),(0,h.jsx)(d.x5,{color:"var(--color-gray-400)",margin:"16px 0 0",align:"center",children:"\uc571\uc774 \uc790\ub3d9\uc73c\ub85c \uc5f4\ub9ac\uc9c0 \uc54a\uc73c\uba74 \ubc84\ud2bc\uc744 \ub20c\ub7ec\uc8fc\uc138\uc694."})]})}):(0,h.jsx)(c.A,{})}}}]); 2//# sourceMappingURL=2222.1d0738f1.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.