1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="9cc9c229-4173-4b1e-9747-0240ede1353f",e._sentryDebugIdIdentifier="sentry-dbid-9cc9c229-4173-4b1e-9747-0240ede1353f")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4514],{15585:function(e,t,n){var r=n(44194),i=n(7862),o=n.n(i);let UilCheckCircle=({color:e="currentColor",size:t=24,...n})=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:e,...n},r.createElement("path",{d:"M14.72,8.79l-4.29,4.3L8.78,11.44a1,1,0,1,0-1.41,1.41l2.35,2.36a1,1,0,0,0,.71.29,1,1,0,0,0,.7-.29l5-5a1,1,0,0,0,0-1.42A1,1,0,0,0,14.72,8.79ZM12,2A10,10,0,1,0,22,12,10,10,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z"}));UilCheckCircle.propTypes={color:o().string,size:o().oneOfType([o().string,o().number])},t.Z=UilCheckCircle},45310:function(e,t,n){var r=n(44194),i=n(7862),o=n.n(i);let UilCommentAltVerify=({color:e="currentColor",size:t=24,...n})=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:e,...n},r.createElement("path",{d:"M15.71,6.29l-5.3,5.3L8.29,9.47a1,1,0,1,0-1.41,1.41l2.83,2.83a1,1,0,0,0,.7.29,1,1,0,0,0,.71-.29l6-6a1,1,0,0,0,0-1.42A1,1,0,0,0,15.71,6.29ZM19,2H5A3,3,0,0,0,2,5V15a3,3,0,0,0,3,3H16.59l3.7,3.71A1,1,0,0,0,21,22a.84.84,0,0,0,.38-.08A1,1,0,0,0,22,21V5A3,3,0,0,0,19,2Zm1,16.59-2.29-2.3A1,1,0,0,0,17,16H5a1,1,0,0,1-1-1V5A1,1,0,0,1,5,4H19a1,1,0,0,1,1,1Z"}));UilCommentAltVerify.propTypes={color:o().string,size:o().oneOfType([o().string,o().number])},t.Z=UilCommentAltVerify},32314:function(e,t,n){var r=n(44194),i=n(7862),o=n.n(i);let UilEnvelope=({color:e="currentColor",size:t=24,...n})=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24",fill:e,...n},r.createElement("path",{d:"M19,4H5A3,3,0,0,0,2,7V17a3,3,0,0,0,3,3H19a3,3,0,0,0,3-3V7A3,3,0,0,0,19,4Zm-.41,2-5.88,5.88a1,1,0,0,1-1.42,0L5.41,6ZM20,17a1,1,0,0,1-1,1H5a1,1,0,0,1-1-1V7.41l5.88,5.88a3,3,0,0,0,4.24,0L20,7.41Z"}));UilEnvelope.propTypes={color:o().string,size:o().oneOfType([o().string,o().number])},t.Z=UilEnvelope},88798:function(e,t,n){n.d(t,{g:function(){return Notify}});var r,i,o=n(84302),a=n(52153),c=n(21526),l=n(90253),s=n(39036),u=n(27719),d=n(11461),p=n(62940),h={self:(0,c.iv)((r={marginLeft:"auto",marginRight:"auto",marginTop:40,width:342},(0,o.Z)(r,(0,a.on)(a.Screen.tablet),{name:"1oaalg5",styles:"width:367px"}),(0,o.Z)(r,(0,a.on)(a.Screen.desktop),{name:"1jv8jc4",styles:"width:420px"}),r),"",""),mascot:(0,c.iv)((i={height:100},(0,o.Z)(i,(0,a.on)(a.Screen.tablet),{name:"1kpi2tn",styles:"height:130px"}),(0,o.Z)(i,"& svg",{height:"100%"}),i),"","")},Notify=function(e){var t=e.mascot,n=e.header,r=e.text,i=e.ok,o=e.cancel;return(0,p.BX)(l.Z,{css:h.self,alignItems:"center",spacing:2,children:[(0,p.tZ)("div",{css:h.mascot,children:t}),(0,p.tZ)(s.Z,{variant:"h3",component:"h1",className:"font-bold",children:n}),(0,p.tZ)(s.Z,{textAlign:"center",className:"whitespace-pre-wrap",children:(0,p.tZ)(d.cC,{children:r})}),(0,p.tZ)(u.Z,{variant:"contained",fullWidth:!0,style:{marginTop:40},onClick:i.onClick,children:i.text}),o&&(0,p.tZ)(u.Z,{variant:"outlined",fullWidth:!0,onClick:o.onClick,children:(0,p.tZ)(s.Z,{variant:"body1",fontWeight:700,textAlign:"center",children:o.text})})]})}},94514:function(e,t,n){n.r(t),n.d(t,{RegisterShop:function(){return RegisterShop}});var r=n(90253),i=n(39036),o=n(35918),a=n(20724),c=n(25316),l=n(51865),s=n.n(l),u=n(44194),d=n(62940),Stepper=function(e){var t=e.currentStep;return e.currentStep<0&&(t=0),e.currentStep>e.steps.length-1&&(t=e.steps.length-1),(0,d.BX)(r.Z,{alignItems:"center",spacing:2,className:e.className,children:[(0,d.tZ)(i.Z,{component:"h1",variant:"h3",className:"font-bold",children:e.title}),(0,d.BX)(r.Z,{direction:"row",className:"relative",children:[e.steps.map(function(e,n){return(0,d.BX)(r.Z,{spacing:1,children:[(0,d.BX)(r.Z,{direction:"row",alignItems:"center",spacing:1,children:[(0,d.tZ)(o.Z,{sx:[n<t&&{bgcolor:"primary.lightPrimary",color:"primary.main"},n===t&&{bgcolor:"primary.main",color:"primary.white"},n>t&&{bgcolor:"primary.lighterGray",color:"primary.gray"}],className:s()({"ml-8 desktop:ml-9":0!==n}),children:(0,d.tZ)(a.Z,{children:e.icon})}),(0,d.tZ)(i.Z,{component:"h2",variant:"body",className:s()("font-bold ",{"hidden tablet:inline-block":t!==n}),children:e.label})]}),n<=t&&(0,d.tZ)(c.Z,{sx:{bgcolor:"primary.main"},component:"div",className:s()("h-1.5 z-10",{"rounded-l":0===n,"rounded-r":n===t})})]},e.label)}),(0,d.tZ)(c.Z,{sx:{bgcolor:"primary.lighterGray"},component:"div",className:"h-1.5 rounded w-full absolute bottom-0 z-0"})]})]})},p=n(45310),h=n(67753),m=n(11461),g=n(30179),f=n(76880),Z=n.n(f),v=n(7080),b=n(67546),y=n(47886),w=n(37403),x=n(1597),k=n(50155),useCheckSellerConsent=function(){var e=(0,b.fo)().authAPI;return(0,k.u)("/is-consent-accepted/seller",(0,g.Z)(Z().mark(function _callee(){var t;return Z().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e("/is-consent-accepted").method("get").create()({});case 2:return t=n.sent,n.abrupt("return",t.data.isAccepted);case 4:case"end":return n.stop()}},_callee)})))},AcceptConsent=function(e){var t,n=(0,b.fo)().authAPI,r=(0,x.useRouter)(),i=(0,y.V)(),o=n("/accept-consent").method("post").create(),a=useCheckSellerConsent(),c=a.data,l=a.error;(0,y.L)(l);var s=(0,u.useCallback)((t=(0,g.Z)(Z().mark(function _callee(t){var n;return Z().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n=t&&t[0].version,r.prev=1,r.next=4,o({version:n});case 4:e.onAccepted(),r.next=10;break;case 7:r.prev=7,r.t0=r.catch(1),i(r.t0);case 10:case"end":return r.stop()}},_callee,null,[[1,7]])})),function(e){return t.apply(this,arguments)}),[e.onAccepted]),p=(0,u.useCallback)((0,g.Z)(Z().mark(function _callee2(){return Z().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r.push((0,w.kr)());case 1:case"end":return e.stop()}},_callee2)}
1)),[r]);return c?(e.onAccepted(),null):(0,d.tZ)("div",{children:(0,d.tZ)(v.D,{open:!0,onSubmit:s,onRefuse:p})})},C=n(88798),S=n(33461),O=n(2e3),j=n(1878),A=n.n(j),Complete=function(){var e=(0,m.$G)().t,t=(0,O.bj)().isMobile;return(0,d.tZ)(C.g,{mascot:(0,d.tZ)(A(),{src:"/images/thank-you-purchase.svg",width:120,height:120,alt:"mascot-success"}),header:e("register-shop.success.header"),text:e("register-shop.success.detail.".concat(t?"mobile":"tablet")),ok:{text:e("register-shop.success.get-money-detail"),onClick:function(){window.location.href="".concat(S.m.sellerWebBaseUri,"/shop-revenue-management")}},cancel:{text:e("register-shop.success.manage-shop"),onClick:function(){window.location.href=S.m.sellerWebBaseUri}}})},I=n(84302),B=n(24231),N=n(2080),P=n(8898),PlaceHolder=function(e){var t,n=e.icon,o=e.text,l=e.linkText,s=e.recommendSize,u=e.fileType,p=e.onLinkClick,h=(0,m.$G)().t;return(0,d.tZ)(c.Z,{sx:{width:245,height:245,bgcolor:"secondary.lightGrayBG",p:1},children:(0,d.BX)(r.Z,{alignItems:"center",justifyContent:"center",gap:2,sx:{border:2,borderStyle:"dashed",borderRadius:2,borderColor:"primary.gray",width:1,height:1},children:[(0,d.tZ)(a.Z,{sx:{fontSize:"h3.fontSize",color:"primary.gray"},children:n}),(0,d.BX)(r.Z,{alignItems:"center",children:[(0,d.tZ)(i.Z,{variant:"body",sx:{mb:1},children:o}),(0,d.tZ)(i.Z,{variant:"caption",children:h("image.recommend-size",{w:s.w,h:s.h})}),(0,d.tZ)(i.Z,{variant:"caption",children:h("image.allow-files",{files:(t=new Map,u.forEach(function(e){return t.set(e,!0)}),Array.from(t.keys()).join(", "))})})]}),(0,d.tZ)(P.Z,{component:"button",variant:"body",onClick:p,children:l})]})})},ShowImg=function(e){var t=e.imgUrl,n=e.onChangeImgClick,i=(0,m.$G)().t;return(0,d.BX)(r.Z,{gap:2,children:[(0,d.tZ)(o.Z,{src:t,alt:i("register-shop.shop-detail.img"),sx:{width:{xs:150,sm:200},height:{xs:150,sm:200}}}),(0,d.tZ)(P.Z,{component:"button",variant:"body",onClick:n,children:i("image.change")})]})},E=["imgUrl","onImgChange","size","circle"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,I.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ImageField=function(e){var t,n=e.imgUrl,r=e.onImgChange,i=e.size,o=e.circle,a=(0,B.Z)(e,E),c=(0,u.useState)(!1),l=c[0],s=c[1],p=(0,u.useState)(),h=p[0],m=p[1],g=(0,u.useState)(void 0),f=g[0],Z=g[1],v=(0,u.useRef)(null),handleSelectImage=function(){v.current&&v.current.click()};return t=n?(0,d.tZ)(ShowImg,{imgUrl:n,onChangeImgClick:handleSelectImage}):(0,d.tZ)(PlaceHolder,_objectSpread(_objectSpread({onLinkClick:handleSelectImage},a),{},{recommendSize:i})),(0,d.BX)(d.HY,{children:[t,h&&f&&(0,d.tZ)(N.f,{image:h,size:f,circle:o,open:l,onClose:function(){s(!1),Z(void 0)},onCrop:function(e){var t=URL.createObjectURL(e),n=new FileReader;n.readAsDataURL(e),n.onload=function(e){var t,n=new Image;e.target&&(n.src=null===(t=e.target)||void 0===t?void 0:t.result,n.onload=function(){Z({w:n.width,h:n.height})})},m(e),s(!1),r(t,e)},onSelectNewImg:handleSelectImage}),(0,d.tZ)("input",{ref:v,type:"file",className:"hidden",onChange:function(){if(v.current&&v.current.files){var e=v.current.files[0],t=new FileReader;t.readAsDataURL(e),t.onload=function(e){var t,n=new Image;e.target&&(n.src=null===(t=e.target)||void 0===t?void 0:t.result,n.onload=function(){Z({w:n.width,h:n.height})})},m(e),s(!0),v.current.value=""}}})]})},L=n(68512),_=n(3244),R=n(52218),T=n(27719),RegisterShopStepTmpl=function(e){var t=e.title,n=e.children,o=e.showBtn,a=e.btnText,c=e.onBtnClick,l=e.loadingComponent,s=e.loading,u=(0,O.bj)().isMobile;return(0,d.tZ)(r.Z,{sx:{width:{xs:1,sm:600},mx:"auto",px:{xs:2,sm:0}},alignItems:"center",children:void 0!==s&&s?void 0===l?null:l:(0,d.BX)(d.HY,{children:[(0,d.tZ)(i.Z,{component:"p",variant:"h5",className:"font-bold pb-6",children:t}),n,o&&(0,d.tZ)(T.Z,{className:"mt-10",type:"submit",size:u?"medium":"large",fullWidth:!0,variant:"contained",onClick:c,children:a})]})})},U=n(21777),z=n(46136),G=n(32314),D=n(15585),M=n(80572),X=n(78011),H=n(6255),V=n(21526),ReadOnlyFiled=function(e){var t=(0,X.Z)();return(0,d.tZ)(H.Z,{sx:[e.value?{borderColor:"secondary.green",bgcolor:"primary.white"}:{borderColor:"secondary.red",bgcolor:"secondary.lightGrayBG"}],className:"w-full",value:e.value?e.value:e.placeHolder,InputProps:{startAdornment:(0,d.tZ)(a.Z,{className:"text-ci-ex-dark-gray mr-2",children:e.icon}),readOnly:!0,endAdornment:e.value?(0,d.tZ)(a.Z,{sx:{color:"secondary.green"},children:(0,d.tZ)(D.Z,{})}):(0,d.tZ)(P.Z,{className:"cursor-pointer shrink-0",onClick:e.onLinkClick,children:e.linkValue})},css:(0,V.iv)({fieldset:{borderColor:"".concat(e.value?t.palette.secondary.green:t.palette.secondary.red," !important")}})})},W=[{icon:(0,d.tZ)(p.Z,{}),i18nKey:"verify-user",component:function(e){var t=(0,U.G)(),n=t.data,r=t.error,i=(0,_.L)().data,o=(0,m.$G)().t,a=(0,O.bj)().isMobile,c=(0,x.useRouter)(),l=null==n?void 0:n.email,s="string"!=typeof l&&!r,p=(0,y.V
1)();(0,u.useEffect)(function(){if(r){if((0,z.Eo)(r)){c.push((0,w.kr)());return}p(r)}},[r]);var changeMail=function(){c.push((0,w.hI)((0,w.du)("change-email"),(0,I.Z)({},w.S8.Redirect,(0,w.mu)())))};return(0,u.useEffect)(function(){i&&e.done()},[i]),(0,d.BX)(RegisterShopStepTmpl,{title:o(l?"register-shop.verify-user.title-complete":"register-shop.verify-user.title-not-complete"),loading:s,loadingComponent:(0,d.BX)(d.HY,{children:[(0,d.tZ)(M.Z,{variant:"rounded",className:"w-1/2"}),(0,d.tZ)(M.Z,{variant:"rounded",className:"w-full h-20 mt-4"})]}),showBtn:!!l,onBtnClick:e.done,btnText:o("common.next"),children:[(0,d.tZ)(ReadOnlyFiled,{icon:(0,d.tZ)(G.Z,{}),value:l,onLinkClick:changeMail,placeHolder:o("register-shop.verify-user.no-mail"),linkValue:o("register-shop.verify-user.add-mail")}),(0,d.tZ)(T.Z,{color:"gray",disableElevation:!0,className:"mt-10 -mb-4",size:a?"medium":"large",fullWidth:!0,variant:"contained",onClick:changeMail,children:o("register-shop.verify-user.change-mail")})]})}},{icon:(0,d.tZ)(h.Z,{}),i18nKey:"shop-detail",component:function(e){var t,n=(0,u.useState)(""),r=n[0],i=n[1],o=(0,u.useState)(null),a=o[0],l=o[1],s=(0,u.useState)(""),p=s[0],f=s[1],v=(0,u.useState)(null),w=v[0],x=v[1],k=(0,_.L)(),C=k.data,S=k.error,O=(0,b.Ek)().sellerAPI,j=(0,R.l)(),A=(0,m.$G)().t,I=(0,y.V)(),B=(t=(0,g.Z)(Z().mark(function _callee(){var t,n,i,o,a;return Z().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(t=O("/shop").method("post").create(),n="image/png",l(null),!(i=r?Array.from(r.trim()).length<5?"min-length":null:"require")){c.next=7;break}return l(i),c.abrupt("return");case 7:if(c.prev=7,o={shopName:r},!w){c.next=14;break}return c.next=12,j(w,n);case 12:a=c.sent,o.cover={tmpPath:a,name:"shop-cover"};case 14:return c.next=16,t(o);case 16:e.done(),c.next=22;break;case 19:c.prev=19,c.t0=c.catch(7),I(c.t0,{min:5,max:50});case 22:case"end":return c.stop()}},_callee,null,[[7,19]])})),function(){return t.apply(this,arguments)});return(0,u.useEffect)(function(){S&&I(S)},[S]),(0,u.useEffect)(function(){C&&e.done()},[C]),(0,d.BX)(RegisterShopStepTmpl,{title:A("register-shop.shop-detail.title"),loading:!1,showBtn:!0,btnText:A("common.confirm"),onBtnClick:B,children:[(0,d.tZ)(c.Z,{className:"mb-4",children:(0,d.tZ)(ImageField,{imgUrl:p||null,onImgChange:function(e,t){f(e),x(t)},icon:(0,d.tZ)(h.Z,{}),text:A("register-shop.shop-detail.img"),linkText:A("image.select"),size:{w:200,h:200},circle:!0,fileType:["jpg","png","gif"]})}),(0,d.tZ)(L.A,{label:A("register-shop.shop-detail.name"),children:(0,d.tZ)(L.G,{error:!!a,helperText:a&&A("register-shop.shop-detail.err.shop-name.".concat(a),{min:5}),required:!0,value:r,onChange:function(e){l(null),i(e.target.value)},maxLen:50})})]})}}],RegisterShop=function(){var e=(0,u.useState)(0),t=e[0],n=e[1],r=(0,u.useState)(!1),i=r[0],o=r[1],a=(0,m.$G)().t;if(i)return(0,d.tZ)(Complete,{});if(t>=W.length)return(0,d.tZ)(AcceptConsent,{onAccepted:function(){return o(!0)}});var c=W[t].component;return(0,d.BX)("div",{className:"m-6 tablet:m-12 desktop:m-10",children:[(0,d.tZ)(Stepper,{className:"mb-11",title:a("register-shop.step.title"),currentStep:t,steps:W.map(function(e){return{label:a("register-shop.step.".concat(e.i18nKey)),icon:e.icon}})}),(0,d.tZ)(c,{done:function(){return n(t+1)}})]})}},68512:function(e,t,n){n.d(t,{A:function(){return InputLabel},G:function(){return TextFieldWithMaxLen}});var r=n(84302),i=n(24231),o=n(6255),a=n(54788),c=n(39036),l=n(90253),s=n(11461),u=n(62940),d=["maxLen","value","required","onChange"];function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){(0,r.Z)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var TextFieldWithMaxLen=function(e){var t=e.maxLen,n=e.value,r=e.required,l=e.onChange,p=(0,i.Z)(e,d),h=(0,s.$G)().t;return(0,u.tZ)(o.Z,_objectSpread(_objectSpread({},p),{},{fullWidth:!0,value:n,onChange:function(e){if(l){var n=Array.from(e.target.value);t&&n.length>t&&(e.target.value=n.slice(0,t).join("")),l(e)}},placeholder:r?h("common.require"):void 0},"number"==typeof t&&t>0?{InputProps:{endAdornment:(0,u.tZ)(a.Z,{position:"start",children:(0,u.tZ)(c.Z,{sx:{color:"primary.gray"},children:"".concat("string"==typeof n?Array.from(n).length:0,"/").concat(t)})})}}:{}))},InputLabel=function(e){var t=e.label,n=e.children;return(0,u.BX)(l.Z,{spacing:1,sx:{width:1},children:[(0,u.tZ)(c.Z,{variant:"body",children:t}),n]})}}}]);
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.