"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7869],{96898:function(e,n){var r;n.f=void 0,n.f=r,function(e){e[e.success=1]="success",e[e.error=2]="error"}(r||(n.f=r={}))},57241:function(e,n,r){r.d(n,{Z:function(){return K}});var t,a=r(77838),i=r(48441),o=r(66177),s=r(16115),l=r(61524),c=r(67294),u=r(70761),d=r(85893);var f=function(e,n){var r,a,i=e.endsWith("-fill")?"fill":e.endsWith("-color")?"":"stroke";return(0,u.iv)(t||(r=["\n    display: inline-flex;\n    ","\n\n    svg {\n      display: inline-block;\n      color: inherit;\n      font-style: normal;\n      width: 1em;\n      height: 1em;\n      vertical-align: -2px;\n      path {\n        ","\n      }\n    }\n  "],a||(a=r.slice(0)),t=Object.freeze(Object.defineProperties(r,{raw:{value:Object.freeze(a)}}))),n?"\n      cursor: pointer;\n      &:hover path {\n      ".concat(i?"".concat(i,": var(--funui-icon-hover-color, currentColor)"):"","\n    }"):"",i?"".concat(i,": currentColor"):"")};function h(e){var n=e.className,r=e.style,t=e.children,a=e.strokeWidth,i=e.size,o=e.name,s=e.color,l=e.onClick,c=!o.endsWith("-fill")&&!o.endsWith("-color"),u=f(o,!!l)+"".concat(n?" "+n:""),h=Object.assign({},r,a&&c&&{strokeWidth:a},s&&{color:s},i&&{fontSize:i});return(0,d.jsx)("span",{style:h,className:u,onClick:l,children:t})}function m(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function g(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?m(Object(r),!0).forEach((function(n){v(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function v(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}var p=(0,d.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,d.jsx)("path",{d:"M20 6L9 17L4 12",stroke:"#21242B",strokeLinecap:"round",strokeLinejoin:"round"})}),b=function(e){return(0,d.jsx)(h,g(g({},e),{},{name:"check",children:p}))};var x=r(98100),y=r(83429),j=(0,y.styled)((function(e){return{wrapper:{fontSize:14,color:e.basic.color.text,display:"flex",flexDirection:"column"},values:{height:48,lineHeight:"48px",padding:[0,12],overflowX:"auto",whiteSpace:"nowrap",color:e.cs.gray[500]},value:{height:"100%",display:"inline-block","& + $value":{marginLeft:12},"&$active":{position:"relative",color:e.cs.primary[500],fontWeight:e.basic.weight.bold.value,fontFamily:e.basic.weight.bold.family,"&:after":{position:"absolute",content:'" "',display:"inline-block",width:16,height:3,borderRadius:2,bottom:0,left:"50%",transform:"translateX(-50%)",background:e.cs.primary[500]}}},list:{flex:1,overflow:"auto","& $check":{display:"flex",alignItems:"center",justifyContent:"flex-end"},"& $active":{fontWeight:e.basic.weight.bold.value,fontFamily:e.basic.weight.bold.family}},active:{},check:{},line:{}}}),"bn-cascader");function w(e){var n=e.keygen,r=e.onSelect,t=e.data,a=e.renderItem,i=e.format,o=e.currentValue,s=j();return(0,d.jsxs)("div",{className:s.list,children:[null===t||void 0===t?void 0:t.map((function(e,t){var l=o&&i(e)===i(o);return(0,d.jsx)(x.Z,{clickable:!0,onClick:function(){return r(e)},className:l?s.active:"",title:a(e,t),valueClassName:s.check,value:l?(0,d.jsx)(b,{size:24}):void 0},n(e))})),(0,d.jsx)("span",{})]})}var N=r(86010);function S(e){var n=e.index,r=e.getValues,t=e.onIndexChange,a=e.renderItem,i=e.keygen,o=e.isEnd,s=e.placeholder,l=void 0===s?"Choose":s,c=j(),u=r();return(0,d.jsxs)("div",{className:c.values,children:[u.map((function(e,r){return(0,d.jsx)("span",{className:(0,N.default)(c.value,n===r&&c.active),onClick:function(){return t(r)},children:a(e,r)},i(e))})),!o&&(0,d.jsxs)("span",{className:(0,N.default)(c.value,c.choose,n===u.length&&c.active),onClick:function(){return t(u.length)},children:[l," ",(u.length||0)+1]})]})}function C(e){var n=(0,l.Z)(e),r=n.getValues,t=n.getData,a=n.index,i=n.onIndexChange,o=n.onSelect,s=n.renderItem,u=n.keygen,f=n.isEnd,h=n.getCurrentValue,m=n.format,g=n.props,v=g.onChange,p=g.setIndex,b=e.className,x=e.style,y=e.placeholder,N=e.data,C=j();return(0,c.useEffect)((function(){0===(null===N||void 0===N?void 0:N.length)&&(v([]),p(0))}),[N]),(0,d.jsxs)("div",{className:"".concat(C.wrapper," ").concat(b),style:x,children:[(0,d.jsx)(S,{isEnd:f,getValues:r,renderItem:s,keygen:u,placeholder:y,index:a,onIndexChange:i}),(0,d.jsx)(w,{keygen:u,format:m,currentValue:h(),renderItem:s,data:t(),onSelect:o},a)]})}var O=r(4361),k=r(53835),z=r(94192),_=r(60778),P=(0,y.styled)((function(e){return{wrapper:{color:e.cs.gray[800],fontSize:e.basic.size.font.md,boxSizing:"border-box"},content:{padding:[12,8],backgroundColor:e.cs.gray[25]},goodsItem:{"&:not(:last-child)":{marginBottom:12}},popupBg:{backgroundColor:e.cs.gray[25]}}}),"std-select-order-cell"),I=function(e){var n=e.data,r=e.onSelectNo,t=e.formatMoney,a=P();return(0,d.jsx)("div",{className:a.goodsItem,children:(0,d.jsx)(_.ZP,{data:n,hideAction:!0,goodsShowNumber:9999,gotoOrderDetail:function(e){return r(n.order_no||"")},formatMoney:t})})};function E(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function V(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?E(Object(r),!0).forEach((function(n){q(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function q(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Z(e){var n=e.style,r=e.className,t=e.query,a=e.options,i=e.visible,s=e.setVisible,l=e.onConfirm,u=e.formatMoney,f=P(),h=(0,c.useRef)(1);return(0,d.jsx)(o.Z,{visible:i,height:"100%",borderRadius:0,className:f.popupBg,children:(0,d.jsxs)("div",{className:(0,N.default)(r,f.wrapper),style:n,children:[(0,d.jsx)(k.Z,{sticky:!0,title:"Select Orders",style:{zIndex:10},onBack:function(){return s(!1)}}),(0,d.jsx)("div",{className:f.content,children:(0,d.jsx)(z.Z,{query:t,singlePageFinishedContentVisible:!1,options:V({size:10,getResponse:function(e){return h.current=h.current+1,{data:(null===e||void 0===e?void 0:e.order_list)||[],haveNext:(null===e||void 0===e?void 0:e.have_next)||!1}},getParams:function(e){return V(V({},e),{},{page:h.current})}},a),renderItem:function(e,n){return(0,d.jsx)(I,{data:e,onSelectNo:function(e){s(!1),l(e)},formatMoney:u},"".concat(e.order_no,"_").concat(n))},lazy:!0})})]})})}var D,T=r(83343),L=(0,y.styled)((function(e){return{wrapper:{position:"relative",boxSizing:"border-box",color:e.cs.gray[800],fontSize:14,background:e.cs.transparent.white[100],display:"flex",flexDirection:"column",height:"100vh",padding:[0,12]},warningText:{fontSize:12,color:e.cs.transparent.error[100],marginTop:"2px"},warning:{borderColor:e.cs.transparent.error[100]},cell:{display:"flex",flexDirection:"column",justifyContent:"center","& + &":{marginTop:16},"&:nth-of-type(5)":{marginTop:12}},message:{color:e.cs.gray[500],fontSize:14,marginLeft:-12,marginRight:-12,padding:[12,12,4],background:e.cs.gray[25]},borderWrapper:{position:"relative",overflow:"hidden",boxSizing:"border-box",minHeight:48,display:"flex",alignItems:"center",justifyContent:"space-between",outline:0,"&:not($warning):hover":{borderColor:e.cs.primary[500]}},selectCell:{"&:hover":{borderColor:e.cs.primary[500]}},line:{width:"100%",height:1,backgroundColor:e.cs.gray[50],marginTop:8},icon:{fontSize:24,color:e.cs.gray[800],lineHeight:"0px"},iconClass:{padding:4,fontSize:20},placeholder:{color:e.cs.gray[100]},required:{fontSize:12,color:e.cs.transparent.error[100]},bg:{flexGrow:1,background:e.cs.gray[25],margin:[6,-12,0]},submit:{margin:[8,0]},submitParent:{background:e.cs.transparent.white[100],margin:[0,-12],padding:[0,12],position:"sticky",left:0,bottom:0,right:0,flexShrink:0},messageBg:{height:"240px"},textarea:{height:"100% !important"},selectTitle:{fontSize:12,color:e.cs.gray[400],lineHeight:"12px"},selectValue:{fontSize:14,color:e.cs.gray[800],marginTop:4,lineHeight:"16px"}}}),"std-contact-us");function W(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var r=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var t,a,i=[],o=!0,s=!1;try{for(r=r.call(e);!(o=(t=r.next()).done)&&(i.push(t.value),!n||i.length!==n);o=!0);}catch(l){s=!0,a=l}finally{try{o||null==r.return||r.return()}finally{if(s)throw a}}return i}(e,n)||R(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,n){if(e){if("string"===typeof e)return A(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(e,n):void 0}}function A(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}function B(e){return/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(e)}!function(e){e[e.success=1]="success",e[e.error=2]="error"}(D||(D={}));var H=function(e){var n=e.onChange,r=L();return(0,d.jsx)(O.Z,{containerClassName:r.cell,onChange:n,clearable:!0,placeholder:"Name",maxLength:100})},F=function(e){var n=e.value,r=void 0===n?"":n,t=e.onChange,a=e.isVerify,i=L(),o=W((0,c.useState)("Enter your email address"),2),s=o[0],l=o[1],u=W((0,c.useState)(!1),2),f=u[0],h=u[1];return(0,c.useEffect)((function(){a&&(r.length>0?B(r)?h(!1):(l("Please enter a valid email address"),h(!0)):(l("Enter your email address"),h(!0)))}),[a,r]),(0,d.jsx)(O.Z,{containerClassName:i.cell,onChange:t,required:!0,clearable:!0,placeholder:"Email",error:f&&s})},M=function(e){var n=e.value,r=void 0===n?"":n,t=e.isHaveOrder,o=e.onSelectOrderNumber,s=e.isVerify,l=e.isRequiredOrderNumber,u=L(),f=W((0,c.useState)(!1),2),h=f[0],m=f[1],g=(0,i.Z)().toast;return(0,c.useEffect)((function(){m(!1),l&&s&&(r.length>0?m(!1):m(!0))}),[l,s,r]),(0,d.jsxs)("div",{className:(0,N.default)(u.cell),onClick:function(){t?null===o||void 0===o||o():g.message("You have no orders")},children:[(0,d.jsx)("div",{className:u.borderWrapper,children:r?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:u.selectTitle,children:"Order Number"}),l&&(0,d.jsx)("span",{className:u.required,children:" *"})]}),(0,d.jsx)("div",{className:u.selectValue,children:r})]}),(0,d.jsx)("span",{className:u.icon,children:(0,d.jsx)(a._Qn,{})})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("span",{children:["Order Number",l&&(0,d.jsx)("span",{className:u.required,children:" *"})]}),(0,d.jsx)("span",{className:u.icon,children:(0,d.jsx)(a._Qn,{})})]})}),(0,d.jsx)("div",{className:u.line}),h&&(0,d.jsx)("div",{className:u.warningText,children:"Please select your order number"})]})},$=function(e){var n=e.value,r=void 0===n?"":n,t=e.onChange,a=e.isVerify,i=e.isRequiredOrderNumber,o=L(),s=W((0,c.useState)(!1),2),l=s[0],u=s[1];return(0,c.useEffect)((function(){u(!1),i&&a&&(r.length>0?u(!1):u(!0))}),[i,a,r]),(0,d.jsx)(O.Z,{containerClassName:o.cell,onChange:t,clearable:!0,required:i,placeholder:"Order Number",error:l&&"Please enter your order number"})},Q=function(e){var n=e.value,r=void 0===n?"":n,t=e.onChange,a=e.isVerify,i=L(),o=W((0,c.useState)(!1),2),s=o[0],l=o[1],u=W((0,c.useState)(""),2),f=u[0],h=u[1];return(0,c.useEffect)((function(){l(!1),a&&(r.length>0?l(!1):(h("Please enter your message"),l(!0)))}),[a,r]),(0,d.jsxs)("div",{className:(0,N.default)(i.cell),children:[(0,d.jsxs)("div",{className:i.message,children:["Message",(0,d.jsx)("span",{className:i.required,children:" *"})]}),(0,d.jsx)(T.Z,{className:(0,N.default)(i.messageBg),contentClassName:i.textarea,maxLength:5e3,placeholder:"Please describe your issue here",onChange:t}),s&&(0,d.jsx)("div",{className:i.warningText,children:f})]})};function X(e,n){var r,t=function(e,n){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=R(e))||n&&e&&"number"===typeof e.length){r&&(e=r);var t=0,a=function(){};return{s:a,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}(n);try{for(t.s();!(r=t.n()).done;){var a=r.value;if(a.child){if(a.child.some((function(n){return n.name_en===e})))return a;var i=X(e,a.child);if(i)return i}}}catch(o){t.e(o)}finally{t.f()}return null}var G=function(e){var n,r,t,i=e.data,s=e.value,l=e.onChange,u=e.isVerify,f=L(),h=W((0,c.useState)(!1),2),m=h[0],g=h[1],v=W((0,c.useState)(""),2),p=v[0],b=v[1],x=W((0,c.useState)(!1),2),y=x[0],j=x[1];return(0,c.useEffect)((function(){var e;g(!1),u&&(s&&(null===(e=Object.keys(s))||void 0===e?void 0:e.length)>0?g(!1):(b("Please select your issue"),g(!0)))}),[u,s]),(0,d.jsxs)("div",{className:(0,N.default)(f.cell),children:[(0,d.jsxs)("div",{onClick:function(){return j(!0)},children:[(0,d.jsx)("div",{className:f.borderWrapper,children:s&&(null===(n=Object.keys(s))||void 0===n?void 0:n.length)>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:f.selectTitle,children:"Subject"}),(0,d.jsx)("span",{className:f.required,children:" *"})]}),(0,d.jsxs)("div",{className:f.selectValue,children:[(0,d.jsx)("div",{children:null===s||void 0===s||null===(r=s.oneItem)||void 0===r?void 0:r.name_en}),(0,d.jsx)("div",{children:null===s||void 0===s||null===(t=s.twoItem)||void 0===t?void 0:t.name_en})]})]}),(0,d.jsx)("span",{className:f.icon,children:(0,d.jsx)(a._Qn,{})})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("span",{children:["Subject",(0,d.jsx)("span",{className:f.required,children:" *"})]}),(0,d.jsx)("span",{className:f.icon,children:(0,d.jsx)(a._Qn,{})})]})}),m&&(0,d.jsx)("div",{className:f.warningText,children:p})]}),(0,d.jsx)(o.Z,{navbar:{title:"Subject",showBackArrow:!1,right:(0,d.jsx)(a.X3,{size:24}),onRightClick:function(){return j(!1)},border:!0},visible:y,onClose:function(){return j(!1)},children:(0,d.jsx)(C,{data:i,keygen:function(e){return e.name_en||""},renderItem:function(e){return e.name_en},childrenKey:"child",format:function(e){return e.name_en},onEnd:function(e){var n=X(e.name_en||"",i);null===l||void 0===l||l(n,e),j(!1)},placeholder:"Subject"})})]})};function K(e){var n=e.issueListData,r=e.className,t=e.style,a=e.isLogin,i=e.query,o=e.options,l=e.onSubmit,u=L(),f=W((0,c.useState)(""),2),h=f[0],m=f[1],g=W((0,c.useState)(""),2),v=g[0],p=g[1],b=W((0,c.useState)(""),2),x=b[0],y=b[1],j=W((0,c.useState)(),2),w=j[0],S=j[1],C=W((0,c.useState)(""),2),O=C[0],k=C[1],z=W((0,c.useState)(!1),2),_=z[0],P=z[1],I=W((0,c.useState)(!1),2),E=I[0],V=I[1],q=W((0,c.useState)(!1),2),T=q[0],R=q[1],A=W((0,c.useState)(!1),2),X=A[0],K=A[1];return(0,c.useEffect)((function(){a&&i({limit:1,page:1}).then((function(e){e&&e.order_list&&e.order_list.length>0?K(!0):K(!1)}))}),[a,i]),(0,d.jsxs)("div",{className:(0,N.default)(u.wrapper,r),style:t,children:[(0,d.jsx)(H,{onChange:function(e){return m(e)},value:h,placeholder:"Name",maxLength:100}),(0,d.jsx)(F,{onChange:function(e){return p(e)},value:v,isVerify:_}),a?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(M,{isHaveOrder:X,value:x,isVerify:_,onSelectOrderNumber:function(){return R(!0)},isRequiredOrderNumber:E}),(0,d.jsx)(Z,{query:i,options:o,setVisible:R,visible:T,onConfirm:function(e){return y(e)},formatMoney:function(e,n){return"".concat(n).concat(e)}})]}):(0,d.jsx)($,{value:x,isVerify:_,onChange:function(e){return y(e)},isRequiredOrderNumber:E}),(0,d.jsx)(G,{data:n,value:w,isVerify:_,onChange:function(e,n){V(!(null!==e&&void 0!==e&&e.pre_sale)),S({oneItem:e,twoItem:n})}}),(0,d.jsx)(Q,{onChange:function(e){return k(e)},value:O,isVerify:_}),(0,d.jsx)("div",{className:u.bg}),(0,d.jsx)("div",{className:u.submitParent,children:(0,d.jsx)(s.Z,{className:u.submit,block:!0,onClick:function(){return function(){var e;P(!0);var n=D.success;0!==v.length&&B(v)||(n=D.error),0===O.length&&(n=D.error),void 0===w&&(n=D.error),E&&0===x.length&&(n=D.error);var r={user_name:h,email:v,order_sn:x,one_level_theme:(null===w||void 0===w||null===(e=w.oneItem)||void 0===e?void 0:e.name_en)||"",two_level_theme:(null===w||void 0===w?void 0:w.twoItem.name_en)||"",description:O};l(r,n)}()},children:"SEND"})})]})}},83343:function(e,n,r){r.d(n,{Z:function(){return l}});var t=r(34176),a=r(86010),i=r(67294),o=(0,r(83429).styled)((function(e){var n,r;return{wrapper:{position:"relative",overflow:"hidden",fontSize:e.basic.size.font.md,color:e.cs.gray[800],width:"100%",maxWidth:"100%",maxHeight:"100%",borderRadius:(null===(n=e.comps.textarea)||void 0===n||null===(r=n.radius)||void 0===r?void 0:r.textarea)||e.base.radius.default,background:e.cs.transparent.white[100],"& textarea":{fontSize:e.basic.size.font.md,color:e.cs.gray[800],lineHeight:"20px",background:"transparent",resize:"none",flex:"auto",display:"block",boxSizing:"border-box",width:"100%",maxWidth:"100%",maxHeight:"100%",padding:[12,0],margin:0,border:0,outline:"none",appearance:"none","&::placeholder":{color:e.cs.gray[100]}}},padding:{paddingBottom:34,boxSizing:"border-box"},max:{position:"absolute",right:8,bottom:8,color:e.cs.gray[100],fontSize:e.basic.size.font.md}}}),"std-textarea"),s=r(85893),l=(0,i.memo)((function(e){var n=(0,t.Z)(e).props,r=n.onChange,i=n.value,l=void 0===i?"":i,c=e.rows,u=void 0===c?3:c,d=e.placeholder,f=e.className,h=e.contentClassName,m=e.style,g=e.maxLength,v=o();return(0,s.jsxs)("div",{className:(0,a.default)(v.wrapper,g&&v.padding,f),style:m,children:[(0,s.jsx)("textarea",{className:h,placeholder:d,rows:u,value:l,onChange:r,maxLength:g}),g&&(0,s.jsxs)("span",{className:v.max,children:[l.length,"/",g]})]})}))}}]);