(this["webpackJsonpvennie-portal"]=this["webpackJsonpvennie-portal"]||[]).push([[3],{120:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(1);function r(e){let{errorMsg:t}=e;return t?Object(n.jsx)("div",{style:{fontWeight:500,color:"darkred",textAlign:"center",paddingTop:"20px",paddingBottom:"20px"},children:t}):null}},14:function(e,t,a){"use strict";var n=a(392);const r=a.n(n).a.create({baseURL:"https://api.vennie.tech/prod/v1"});r.interceptors.response.use((e=>e),(e=>{var t;return console.log("error",e.response),null===e||void 0===e||null===(t=e.response)||void 0===t||t.status,Promise.reject(e.response&&e.response.data||"Something went wrong")})),t.a=r},158:function(e,t,a){"use strict";a.d(t,"d",(function(){return y})),a.d(t,"c",(function(){return k})),a.d(t,"b",(function(){return E})),a.d(t,"a",(function(){return M}));const n={animate:{transition:{staggerChildren:.1}}},r={hover:{scale:1.04},tap:{scale:.96}},o={hover:{scale:1.1},tap:{scale:.9}},i={duration:4,ease:"linear"},c=e=>`linear-gradient(${e}deg, #ee7752, #e73c7e, #23a6d5, #23d5ab)`,s=(c(0),c(0),c(0),c(0),c(270),c(270),c(270),c(270),120),l={duration:.64,ease:[.43,.13,.23,.96]},d={duration:.48,ease:[.43,.13,.23,.96]},u={initial:{y:s,opacity:0},animate:{y:0,opacity:1,transition:l},exit:{y:s,opacity:0,transition:d}},p=720,b={scale:1,opacity:1},g={scale:0,opacity:0},h={duration:.64,ease:[.43,.13,.23,.96]},x={duration:.48,ease:[.43,.13,.23,.96]},j=720,m={scale:0,opacity:0},O={duration:.64,ease:[.43,.13,.23,.96]},f={duration:.72,ease:[.43,.13,.23,.96]},y={animate:{scale:[.3,1.1,.9,1.03,.97,1],opacity:[0,1,1,1,1,1],transition:f},exit:{scale:[.9,1.1,.3],opacity:[1,1,0]}};a(0),a(784);var v=a(765),_=(a(399),a(171)),w=a(1);var k=e=>{let{open:t,children:a,...r}=e;return Object(w.jsx)(_.a,{component:v.a.div,initial:!1,animate:t?"animate":"exit",variants:n,...r,children:a})},S=a(775),C=a(785);var E=e=>{let{open:t=!1,children:a,animate:n,onClose:r,animatePresenceProps:o,...i}=e;return Object(w.jsx)(S.a,{...o,children:t&&Object(w.jsx)(C.a,{fullWidth:!0,maxWidth:"xs",open:t,onClose:r,PaperComponent:v.a.div,PaperProps:{sx:{borderRadius:2,bgcolor:"background.paper"},...n||u},...i,children:a})})};var M=e=>{let{children:t,mediumClick:a=!1,sx:n,...i}=e;return Object(w.jsx)(_.a,{component:v.a.div,whileTap:"tap",whileHover:"hover",variants:a?o:r,sx:{display:"inline-flex",...n},...i,children:t})};a(102)},172:function(e,t,a){"use strict";var n=a(0),r=a(219);t.a=()=>Object(n.useContext)(r.a)},211:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(426),r=a(103),o=a(226),i=a(24),c=a(1);function s(e){let{ticketLogEntry:t}=e;const a=new Date(t.created_at);return Object(c.jsxs)(n.a,{hover:!0,children:[Object(c.jsx)(r.a,{component:"th",scope:"row",children:t.external_id}),Object(c.jsx)(r.a,{children:a.toDateString()}),Object(c.jsx)(r.a,{children:Object(c.jsx)(i.b,{to:`/ticket/${t.id}`,children:Object(c.jsx)(o.a,{variant:"contained",color:"primary",children:"View Details"})})})]})}},218:function(e,t,a){"use strict";a.d(t,"a",(function(){return b})),a.d(t,"b",(function(){return g}));var n=a(0),r=a(14),o=a(393);a(236);const i=e=>{if(!e)return!1;const t=Object(o.a)(e),a=Date.now()/1e3;return t.exp>a},c=e=>{e?(localStorage.setItem("accessToken",e),r.a.defaults.headers.common.Authorization=`Bearer ${e}`):(localStorage.removeItem("accessToken"),delete r.a.defaults.headers.common.Authorization)},s=()=>r.a.get("/users/me");var l=a(1);const d={isAuthenticated:!1,isInitialized:!1,user:null},u={INITIALIZE:(e,t)=>{const{isAuthenticated:a,user:n}=t.payload;return{...e,isAuthenticated:a,isInitialized:!0,user:n}},LOGIN:(e,t)=>{const{user:a}=t.payload;return{...e,isAuthenticated:!0,user:a}},LOGOUT:e=>({...e,isAuthenticated:!1,user:null}),REGISTER:(e,t)=>{const{user:a}=t.payload;return{...e,isAuthenticated:!0,user:a}}},p=(e,t)=>u[t.type]?u[t.type](e,t):e,b=Object(n.createContext)({isAuthenticated:!1,isInitialized:!1,user:null,method:"jwt",login:async(e,t)=>({success:!1,error:null}),logout:async()=>{},register:async e=>{},resetPassword:async e=>{},updateProfile:()=>{}});function g(e){let{children:t}=e;const[a,o]=Object(n.useReducer)(p,d);Object(n.useEffect)((()=>{(async()=>{try{const e=window.localStorage.getItem("accessToken");if(e&&i(e)){c(e);const t=await s();o({type:"INITIALIZE",payload:{isAuthenticated:!0,user:t.data}})}else o({type:"INITIALIZE",payload:{isAuthenticated:!1,user:null}})}catch(e){console.error(e),o({type:"INITIALIZE",payload:{isAuthenticated:!1,user:null}})}})()}),[]);const u=async(e,t)=>{try{const a=new URLSearchParams;a.append("username",e),a.append("password",t);const n=await r.a.post("https://api.vennie.tech/prod/v1/auth/jwt/login",a);c(n.data.access_token);const i=await r.a.get("https://api.vennie.tech/prod/v1/users/me");return i.data&&n.data.access_token?(localStorage.setItem("accessToken",n.data.access_token),o({type:"LOGIN",payload:{user:{email:e,username:i.data}}}),{success:!0,error:null}):{success:!1,error:i.data.error||n.data.error||n.statusText}}catch(a){return console.log(a),{success:!1,error:a}}};return Object(l.jsx)(b.Provider,{value:{...a,method:"jwt",login:u,logout:async()=>{c(null),o({type:"LOGOUT"})},register:async e=>{201===(await r.a.post("https://api.vennie.tech/prod/v1/auth/register",{email:e.email,password:e.password})).status&&u(e.email,e.password)},resetPassword:async e=>{},updateProfile:()=>{}},children:t})}},219:function(e,t,a){"use strict";a.d(t,"b",(function(){return p})),a.d(t,"a",(function(){return u}));var n=a(7),r=a.n(n),o=a(0);var i=a(45),c=a(1);const s=[{name:"default",...i.a.light.primary},{name:"purple",lighter:"#EBD6FD",light:"#B985F4",main:"#7635dc",dark:"#431A9E",darker:"#200A69",contrastText:"#fff"},{name:"cyan",lighter:"#D1FFFC",light:"#76F2FF",main:"#1CCAFF",dark:"#0E77B7",darker:"#053D7A",contrastText:i.a.light.grey[800]},{name:"blue",lighter:"#CCDFFF",light:"#6697FF",main:"#0045FF",dark:"#0027B7",darker:"#00137A",contrastText:"#fff"},{name:"orange",lighter:"#FEF4D4",light:"#FED680",main:"#fda92d",dark:"#B66816",darker:"#793908",contrastText:i.a.light.grey[800]},{name:"red",lighter:"#FFE3D5",light:"#FFC1AC",main:"#FF3030",dark:"#B71833",darker:"#7A0930",contrastText:"#fff"}];function l(e){let t;const a=s[0],n=s[1],r=s[2],o=s[3],i=s[4],c=s[5];switch(e){case"purple":t=n;break;case"cyan":t=r;break;case"blue":t=o;break;case"orange":t=i;break;case"red":t=c;break;default:t=a}return t}l.propTypes={themeColor:r.a.oneOf(["default","purple","cyan","blue","orange","red"])};const d={themeMode:"light",themeDirection:"ltr",themeColor:"default",themeStretch:!1,onChangeMode:()=>{},onChangeDirection:()=>{},onChangeColor:()=>{},onToggleStretch:()=>{},setColor:s[0],colorOption:[]},u=Object(o.createContext)(d);function p(e){let{children:t}=e;const[a,n]=function(e,t){const[a,n]=Object(o.useState)((()=>{const a=localStorage.getItem(e);return null===a?t:JSON.parse(a)}));return Object(o.useEffect)((()=>{const t=t=>{t.storageArea===localStorage&&t.key===e&&n(JSON.parse(t.newValue))};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}}),[e,t]),[a,t=>{n((a=>{const n="function"===typeof t?t(a):t;return localStorage.setItem(e,JSON.stringify(n)),n}))}]}("settings",{themeMode:d.themeMode,themeDirection:d.themeDirection,themeColor:d.themeColor,themeStretch:d.themeStretch});return Object(c.jsx)(u.Provider,{value:{...a,onChangeMode:e=>{n({...a,themeMode:e.target.value})},onChangeDirection:e=>{n({...a,themeDirection:e.target.value})},onChangeColor:e=>{n({...a,themeColor:e.target.value})},setColor:l(a.themeColor),colorOption:s.map((e=>({name:e.name,value:e.main}))),onToggleStretch:()=>{n({...a,themeStretch:!a.themeStretch})}},children:t})}},283:function(e,t,a){"use strict";var n=a(202),r=a(0),o=a(171),i=a(1);const c=Object(r.forwardRef)(((e,t)=>{let{children:a,title:r="",...c}=e;return Object(i.jsxs)(o.a,{ref:t,...c,children:[Object(i.jsx)(n.a,{children:Object(i.jsx)("title",{children:r})}),a]})}));t.a=c},284:function(e,t,a){"use strict";var n=a(0),r=a(32);var o=a(43);t.a=e=>{const[t,a]=Object(n.useState)(!0),[i,c]=Object(n.useState)(null),[s,l]=Object(n.useState)(""),[d,u]=Object(n.useState)(""),[p,b]=Object(n.useState)(""),[g,h]=Object(n.useState)(null),[x,j]=Object(n.useState)(null),[m,O]=Object(n.useState)(!1),[f,y]=Object(n.useState)(!1),[v,_]=Object(n.useState)(""),[w,k]=Object(n.useState)(!1),[S,C]=Object(n.useState)(!1),[E,M]=Object(n.useState)(!1),[A,I]=Object(n.useState)(!1),[F,$]=Object(n.useState)(!1),[R,L]=Object(n.useState)({}),[z,B]=Object(n.useState)(!1),[T,D]=Object(n.useState)("english"),[P,N]=Object(n.useState)(!1),[W,H]=Object(n.useState)(!1),[U,G]=Object(n.useState)(null),[V,q]=Object(n.useState)(!1),[Z,J]=Object(n.useState)(""),[Q,K]=Object(n.useState)(!1),[X,Y]=Object(n.useState)(null),[ee,te]=Object(n.useState)(!1),[ae,ne]=Object(n.useState)(!1),[re,oe]=Object(n.useState)(""),[ie,ce]=Object(n.useState)(!1),[se,le]=Object(n.useState)(""),[de,ue]=Object(n.useState)(!1),[pe,be]=Object(n.useState)(null),[ge,he]=Object(n.useState)(!1),[xe,je]=Object(n.useState)({}),[me,Oe]=Object(n.useState)(!1),[fe,ye]=Object(n.useState)(!1),[ve,_e]=Object(n.useState)(!1),[we,ke]=Object(n.useState)(!1),[Se,Ce]=Object(n.useState)(!1),[Ee,Me]=Object(n.useState)(!1),[Ae,Ie]=Object(n.useState)(!1),[Fe,$e]=Object(n.useState)(!1),[Re,Le]=Object(n.useState)(""),[ze,Be]=Object(n.useState)(null),[Te,De]=Object(n.useState)(!1),[Pe,Ne]=Object(n.useState)(!1);Object(n.useEffect)((()=>{He(),Ge(),Ue(),We(),Ve(),localStorage.removeItem("connected")}),[]);const We=async()=>{try{var e,t;a(!0);const n=await Object(r.i)(),i=(await Object(r.m)()).data.environment;if(null!==(e=n.data)&&void 0!==e&&e.user_id){const e="dev"===i?`https://api-dev.vennie.tech/dev/v1/zendesk/ticket/${n.data.user_id}`:`https://api.vennie.tech/prod/v1/zendesk/ticket/${n.data.user_id}`;oe(e)}null!==(t=n.data)&&void 0!==t&&t.language&&D(n.data.language),"stealth_mode"in n.data&&q(n.data.stealth_mode),"stealth_email"in n.data&&J(n.data.stealth_email),"is_processing_disabled"in n.data&&ce(n.data.is_processing_disabled),"is_stealth_email_on"in n.data&&K(n.data.is_stealth_email_on),"actions_config"in n.data&&n.data.actions_config&&function(e){je(e),o.a.ENABLE_REFUND_REQUIRE_IMAGE in e&&"boolean"===typeof e.refund_require_image&&_e(e.refund_require_image);o.a.ENABLE_VOUCHERS in e&&"boolean"===typeof e.vouchers_enabled&&ke(e.vouchers_enabled);o.a.ENABLE_MANUAL_VOUCHER_APPROVAL in e&&"boolean"===typeof e.manual_voucher_approval_on&&Ce(e.manual_voucher_approval_on);o.a.ENABLE_REPLACE_EXCHANGE in e&&"boolean"===typeof e.enable_replace_exchange&&Oe(e.enable_replace_exchange);o.a.ENABLE_SAME_ITEM_REPLACEMENT in e&&"boolean"===typeof e.enable_same_item_replacement&&ye(e.enable_same_item_replacement);o.a.ENABLE_CANCEL_ORDER in e&&"boolean"===typeof e.enable_cancel_order&&Me(e.enable_cancel_order);o.a.ENABLE_CANCEL_APPROVAL in e&&"boolean"===typeof e.enable_cancel_approval&&Ie(e.enable_cancel_approval)}(n.data.actions_config),"opt_in_message_enabled"in n.data&&$e(n.data.opt_in_message_enabled),"opt_in_message"in n.data&&"string"===typeof n.data.opt_in_message&&n.data.opt_in_message.length>5?Le(n.data.opt_in_message):await Ze(),"is_shopify_market"in n.data&&Ne(n.data.is_shopify_market),setTimeout((()=>{a(!1)}),100)}catch(n){console.error(n)}};const He=async()=>{try{var e;const t=await Object(r.q)();c(null===(e=t.data)||void 0===e?void 0:e.subdomain)}catch(t){console.log(t)}},Ue=async()=>{try{const i=await Object(r.l)();var e,t,a,n,o;if(200===i.status)if(null!==(e=i.data)&&void 0!==e&&e.config)if(h(i.data.config),null!==(t=i.data)&&void 0!==t&&null!==(a=t.config)&&void 0!==a&&a.api_key)b(null===(n=i.data)||void 0===n||null===(o=n.config)||void 0===o?void 0:o.api_key)}catch(i){console.error(i)}},Ge=async()=>{try{$(!0);const e=await Object(r.k)();$(!1),e.data?L(e.data):L({empty:!0})}catch(e){$(!1),console.log(e)}},Ve=async()=>{try{const e=await Object(r.n)("zendesk_agent");200===e.status&&null!==e.data.token&&he(!0)}catch(e){console.log(e)}},qe=(e,t)=>{e===o.a.ENABLE_REFUND_REQUIRE_IMAGE?_e(t):e===o.a.ENABLE_VOUCHERS?ke(t):e===o.a.ENABLE_MANUAL_VOUCHER_APPROVAL?Ce(t):e===o.a.ENABLE_REPLACE_EXCHANGE?Oe(t):e===o.a.ENABLE_SAME_ITEM_REPLACEMENT?ye(t):e===o.a.ENABLE_CANCEL_ORDER?Me(t):e===o.a.ENABLE_CANCEL_APPROVAL&&Ie(t)},Ze=async()=>{try{var e;const a=await Object(r.o)();var t;if(null!==(e=a.data)&&void 0!==e&&e.opt_in_message)Le(null===(t=a.data)||void 0===t?void 0:t.opt_in_message)}catch(a){console.error(a)}};return{accountLoading:t,subdomain:i,apiEmailInput:s,apiKeyInput:d,apiKey:p,configSaveErr:x,configSaveLoading:m,configSaveSuccess:f,subdomainDraft:v,setSubdomainDraft:_,modalLoading:w,showSubModal:S,setShowSubModal:C,connectorLoading:E,confirmationModalOpen:A,setConfirmationModalOpen:I,billingLoading:F,billingInfo:R,billingSaveLoading:z,language:T,langSaveLoading:P,langSaveSuccess:W,stealthModeOn:V,setStealthModeOn:q,isStealthEmailOn:Q,setIsStealthEmailOn:K,stealthEmail:Z,saveStealthError:X,stealthSaveLoading:ee,stealthSaveSuccess:ae,webhookUrl:re,isProcessingDisabled:ie,saveZendeskConfig:async()=>{if(g)if(s&&d){O(!0),j(null);const e=btoa(`${s}/token:${d}`),t={...g};t.api_key=e;const a=await Object(r.s)(t);O(!1),200===a.status?(y(!0),setTimeout((()=>{y(!1)}),2e3)):j(a.statusText)}else j("Input agent email and API key");else j("Invalid config")},handleAddSubdomainClick:async()=>{k(!0);try{await Object(r.t)(v);He()}catch(e){console.log(e)}k(!1),C(!1)},handleEditSubdomainClick:()=>{i&&(_(i),C(!0))},handleConnectClick:async t=>{M(!0);try{const{data:{url:a}}=await Object(r.j)(t),n=window.open(a,"Oauth","width=800,height=600,resizable,scrollbars");window.addEventListener("storage",(t=>{const a=localStorage.getItem("connected");"connected"===t.key&&null!==t.newValue&&("failed"===a?(M(!1),clearInterval(o)):"zendesk_admin"===a?(async()=>{try{await Object(r.w)()}catch(e){console.log(e)}})():"zendesk_agent"===a&&e("Zendesk Connected!")),localStorage.removeItem("connected")}));const o=setInterval((()=>{n&&null!==n&&void 0!==n&&n.closed&&(M(!1),clearInterval(o),localStorage.removeItem("connected"))}),5e3)}catch(a){console.error(a)}},handleCompanyInfoChange:e=>{const{value:t,name:a}=e.target;L({...R,[a]:t})},handleApiKeyChange:e=>{const{value:t}=e.target;u(t)},handleApiEmailChange:e=>{const{value:t}=e.target;l(t)},handleSaveCompanyInfoClick:()=>{!function(e){for(const t in e)if(Object.hasOwn(e,t))return!1;return!0}(R)?(async()=>{try{B(!0),await Object(r.z)(R),e("Info updated!"),B(!1)}catch(t){e("Failed to save!"),console.log(t)}})():(async()=>{try{B(!0),await Object(r.f)(R),e("Info Saved!"),B(!1),Ge()}catch(t){e("Failed to save!"),console.log(t)}})()},changeSelectedLanguage:e=>{D(e.target.value)},saveLanguage:async()=>{try{N(!0);const e=await Object(r.b)(T);N(!1),200===e.status?(H(!0),setTimeout((()=>{H(!1)}),2e3)):G("Save failed, try again or contact support")}catch(e){N(!1),G(`${e}`)}},saveStealthModeSettings:async e=>{try{te(!0),J(e);const t=await Object(r.c)({stealthModeOn:V,stealthEmail:e,isStealthEmailOn:Q});await Object(r.A)(ie);te(!1),200===t.status?(ne(!0),setTimeout((()=>{ne(!1)}),2e3)):Y("Save failed, try again or contact support")}catch(t){te(!1),Y(`${t}`)}},changeIsProcessingDisabled:async e=>{ce(e)},getZendeskAuthUrl:async()=>{try{ue(!0);const e=await Object(r.j)("zendesk_agent");ue(!1),200===e.status?le(e.data.url):be(e.data.detail||"Failed to get auth url")}catch(e){console.log(e)}},zendeskOAuthUrl:se,authUrlLoading:de,authUrlError:pe,hasZendeskToken:ge,refundRequireImage:ve,updateSubscriptionConfigForUser:async t=>{try{if(200===(await Object(r.D)(t)).status)return e("Subscription config updated successfully"),!0;throw new Error("Failed to update subscription config")}catch(a){throw console.error(a),a}},changeActionsConfig:async(e,t)=>{try{qe(e,t);const a={...xe,[e]:t};je(a);const n=await Object(r.y)(a);return 200===n.status?{success:!0}:{success:!1,error:n.data.detail}}catch(a){return{success:!1,error:`${a}`}}},enableReplaceExchange:me,enableSameItemReplacement:fe,vouchersEnabled:we,manualVoucherApprovalOn:Se,optInMessageEnabled:Fe,optInMessage:Re,changeOptInMessageEnabled:async(t,a)=>(await Object(r.v)(t,a)).success?($e(t),Le(a),{success:!0}):(e("Failed to update opt-in message!",{variant:"error"}),{success:!1,error:"Failed to update opt-in message!"}),messageUsage:ze,messageUsageLoading:Te,checkMessageUsage:async()=>{De(!0);try{const e=await Object(r.e)();Be(e.data.current_month_count)}catch(t){throw console.error("Error fetching message usage:",t),e("Failed to fetch message usage",{variant:"error"}),new Error("Failed to fetch message usage")}finally{De(!1)}},getZendeskSubdomain:He,isOrderCancelActionOn:Ee,isCancelApprovalOn:Ae,isShopifyMarket:Pe}}},287:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);function r(){const e=Object(n.useRef)(!0);return Object(n.useEffect)((()=>()=>{e.current=!1}),[]),e}},288:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(417),r=a(5),o=a(67),i=a(171),c=a(1);const s=Object(r.a)("div")({flexGrow:1,height:"100%",overflow:"hidden"}),l=Object(r.a)(n.a)((e=>{let{theme:t}=e;return{maxHeight:"100%","& .simplebar-scrollbar":{"&:before":{backgroundColor:Object(o.a)(t.palette.grey[600],.48)},"&.simplebar-visible:before":{opacity:1}},"& .simplebar-track.simplebar-vertical":{width:10},"& .simplebar-track.simplebar-horizontal .simplebar-scrollbar":{height:6},"& .simplebar-mask":{zIndex:"inherit"}}}));function d(e){let{children:t,sx:a,...n}=e;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?Object(c.jsx)(i.a,{sx:{overflowX:"auto",...a},...n,children:t}):Object(c.jsx)(s,{children:Object(c.jsx)(l,{timeout:500,clickOnTrack:!1,sx:a,...n,children:t})})}},289:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(24),r=a(10),o=a(5),i=a(93),c=a(1);const s=Object(o.a)("header")((e=>{let{theme:t}=e;return{top:0,left:0,lineHeight:0,width:"100%",position:"absolute",padding:t.spacing(3,3,0),[t.breakpoints.up("sm")]:{padding:t.spacing(5,5,0)}}}));function l(){return Object(c.jsxs)(c.Fragment,{children:[Object(c.jsx)(s,{children:Object(c.jsx)(n.b,{to:"/",children:Object(c.jsx)(i.a,{})})}),Object(c.jsx)(r.b,{})]})}},292:function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"c",(function(){return i})),a.d(t,"d",(function(){return c})),a.d(t,"b",(function(){return s}));var n=a(14);const r="/test",o=async e=>await n.a.post(`${r}/create`,e),i=async e=>await n.a.post(`${r}/initial_test`,e),c=async e=>await n.a.post(`${r}/initial_ticket_test`,e),s=async()=>await n.a.get(`${r}/test_cases`)},295:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(693),r=a(5),o=a(67),i=a(1);const c=Object(r.a)("span")((e=>{let{theme:t}=e;return{[t.breakpoints.up("sm")]:{top:-7,zIndex:1,width:12,right:20,height:12,content:"''",position:"absolute",borderRadius:"0 0 4px 0",transform:"rotate(-135deg)",background:t.palette.background.paper,borderRight:`solid 1px ${Object(o.a)(t.palette.grey[500],.12)}`,borderBottom:`solid 1px ${Object(o.a)(t.palette.grey[500],.12)}`}}}));function s(e){let{children:t,sx:a,...r}=e;return Object(i.jsxs)(n.b,{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{sx:{mt:1.5,ml:.5,overflow:"inherit",boxShadow:e=>e.customShadows.z20,border:e=>`solid 1px ${e.palette.grey[5008]}`,width:200,...a}},...r,children:[Object(i.jsx)(c,{}),t]})}},297:function(e,t,a){"use strict";var n=a(0),r=a(66),o=a(292);t.a=e=>{const[t,a]=Object(n.useState)(null),[i,c]=Object(n.useState)(null),[s,l]=Object(n.useState)(null),[d,u]=Object(n.useState)([]),[p,b]=Object(n.useState)([]),[g,h]=Object(n.useState)([]),[x,j]=Object(n.useState)(!1),[m,O]=Object(n.useState)(null),[f,y]=Object(n.useState)([]);async function v(e){try{const p=await Object(r.e)(e),b=await Object(r.d)(e);var t;if(200===b.status)c((null===(t=b.data)||void 0===t?void 0:t.log_entry)||null);if(console.log(p.data),200===p.status){var n,o,i;a(p.data);const e=null===(n=p.data)||void 0===n||null===(o=n.ticket_data)||void 0===o||null===(i=o.comments_data)||void 0===i?void 0:i.comments;if(Array.isArray(e)){const t=e.filter((e=>e.public));u(t)}}else{var s,d;console.log("entryResponse.data?.detail"),console.log(null===(s=p.data)||void 0===s?void 0:s.detail),l((null===(d=p.data)||void 0===d?void 0:d.detail)||"Failed to load processing entry")}}catch(p){console.error(p);const e=(null===p||void 0===p?void 0:p.detail)||"Failed to load processing entry";l(`${e}`)}}Object(n.useEffect)((()=>{e&&(v(e),async function(e){try{const a=await Object(r.h)(e);var t;if(200===a.status)y(a.data.processing_runs);else l((null===(t=a.data)||void 0===t?void 0:t.detail)||"Failed to load processing runs")}catch(a){console.error(a);const e=(null===a||void 0===a?void 0:a.detail)||"Failed to load processing entry";l(`${e}`)}}(e))}),[e]);const _=async()=>{e&&await v(e)};return{processingEntry:t,logEntry:i,loadError:s,changeSelectedMessages:e=>{if(p.includes(e)){const t=p.filter((t=>t!==e)),a=g.filter((t=>t.id!==e));b(t),h(a)}else{const t=d.find((t=>t.id===e));if(!t)return;b([...p,e]),h([...g,t])}},allComments:d,selectedCommentIds:p,selectedTestMessages:g,runTicketTest:async function(){try{j(!0);const e={ticket_data:t,selected_messages:g};await Object(o.d)(e)}catch(e){j(!1),console.log(e),O(`${e}`)}},isTestRunning:x,testError:m,processingRuns:f,reloadProcessingEntry:_,saveTicketAsBug:async()=>{if(!t)return;const e=!(null!==t&&void 0!==t&&t.is_bug);200===(await Object(r.l)(null===t||void 0===t?void 0:t.id,e)).status?_():console.log("Error saving ticket as bug")},confirmVerifyImages:async(e,a,n)=>{try{const i=null===t||void 0===t?void 0:t.external_id;if(!i)return{success:!1,error:"No external ID found"};const c=await Object(r.n)(e,i,a,n);return 200===c.status?{success:!0}:{success:!1,error:(null===(o=c.data)||void 0===o?void 0:o.detail)||"Failed to confirm images"};var o}catch(i){return console.error(i),{success:!1,error:`${i}`}}},setBugSeverity:async e=>{try{if(!i)return{success:!1,error:"No log entry found"};const a=await Object(r.j)(i.id,e);return 200===a.status?(_(),{success:!0}):{success:!1,error:(null===(t=a.data)||void 0===t?void 0:t.detail)||"Failed to set bug severity"};var t}catch(a){return console.error(a),{success:!1,error:`${a}`}}},setReadyForTest:async e=>{try{if(!i)return{success:!1,error:"No log entry found"};const a=await Object(r.k)(i.id,e);return 200===a.status?(_(),{success:!0}):{success:!1,error:(null===(t=a.data)||void 0===t?void 0:t.detail)||"Failed to set ready for test"};var t}catch(a){return console.error(a),{success:!1,error:`${a}`}}}}}},298:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(226),r=a(1);function o(e){let{btnText:t}=e;return Object(r.jsx)(n.a,{onClick:()=>{window.history.go(-1)},style:{backgroundColor:"#ececec"},children:t||"Back"})}},32:function(e,t,a){"use strict";a.d(t,"q",(function(){return r})),a.d(t,"l",(function(){return o})),a.d(t,"s",(function(){return i})),a.d(t,"t",(function(){return c})),a.d(t,"j",(function(){return s})),a.d(t,"x",(function(){return l})),a.d(t,"w",(function(){return d})),a.d(t,"k",(function(){return u})),a.d(t,"r",(function(){return p})),a.d(t,"f",(function(){return b})),a.d(t,"z",(function(){return g})),a.d(t,"i",(function(){return h})),a.d(t,"b",(function(){return x})),a.d(t,"c",(function(){return j})),a.d(t,"d",(function(){return m})),a.d(t,"p",(function(){return O})),a.d(t,"C",(function(){return f})),a.d(t,"A",(function(){return y})),a.d(t,"n",(function(){return v})),a.d(t,"m",(function(){return _})),a.d(t,"y",(function(){return w})),a.d(t,"D",(function(){return k})),a.d(t,"g",(function(){return S})),a.d(t,"a",(function(){return C})),a.d(t,"h",(function(){return E})),a.d(t,"o",(function(){return M})),a.d(t,"v",(function(){return A})),a.d(t,"u",(function(){return I})),a.d(t,"e",(function(){return F})),a.d(t,"B",(function(){return $}));var n=a(14);const r=async()=>n.a.get("/zendesk/subdomain"),o=async()=>n.a.get("/zendesk/config"),i=async e=>n.a.put("/zendesk/config",{new_config:e}),c=async e=>n.a.put("/zendesk/subdomain",{subdomain:e}),s=async e=>n.a.get(`/service_oauth/auth_url/${e}`),l=async(e,t)=>n.a.post(`/service_oauth/callback/${e}`,{url_params:t}),d=async()=>n.a.post("/zendesk/setup"),u=async()=>n.a.get("/billing"),p=async()=>n.a.get("/billing/subscription_data"),b=async e=>("empty"in e&&delete e.empty,await n.a.post("/billing",e)),g=async e=>n.a.put("/billing",e),h=async()=>n.a.get("/account/settings"),x=async e=>n.a.post("/account/change_language",{new_lang:e}),j=async e=>await n.a.post("/account/change_stealth_mode",{new_stealth_mode:e.stealthModeOn,new_stealth_email:e.stealthEmail,is_stealth_email_on:e.isStealthEmailOn}),m=async e=>await n.a.post("/account/change_bot_style",{is_bot_formal:e.isBotFormal,bot_style_instructions:e.botStyleInstructions,new_lang:e.newLanguage}),O=async()=>n.a.get("/shopify/config"),f=async e=>n.a.post("/shopify/update_shop_url",{shop_url:e}),y=async e=>n.a.post("/account/change_processing_disabled",{is_processing_disabled:e}),v=async e=>n.a.get(`/service_oauth/get_token/${e}`),_=async()=>n.a.get("/account/environment"),w=async e=>n.a.post("/account/update_actions_config",{actions_config:e}),k=async e=>n.a.put("/billing/subscription_config",{subscription_config:e}),S=async()=>n.a.post("/billing/create-stripe-customer"),C=async e=>n.a.post("/billing/attach-payment-method",{payment_method_id:e}),E=async e=>n.a.post("/billing/create-subscription",{package:e}),M=async()=>n.a.get("/account/opt_in_message"),A=async(e,t)=>{try{return{success:!0,...(await n.a.post("/account/set_opt_in_status_and_message",{enabled:e,custom_message:t})).data}}catch(a){return console.error("Error updating opt-in message status:",a),{success:!1,error:a.message||"An error occurred"}}},I=async(e,t)=>await n.a.post("/processing_log/opt_in_decision",{ticket_log_id:e,decision:t}),F=async()=>n.a.get("/account/current_message_usage"),$=async e=>n.a.post("/account/update_is_shopify_market",{is_shopify_market:e})},362:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(171),r=a(1);function o(e){let{src:t,color:a="inherit",sx:o}=e;return Object(r.jsx)(n.a,{component:"span",sx:{width:24,height:24,mask:`url(${t}) no-repeat center / contain`,WebkitMask:`url(${t}) no-repeat center / contain`,bgcolor:`${a}.main`,..."inherit"===a&&{bgcolor:"currentColor"},..."action"===a&&{bgcolor:"action.active"},..."disabled"===a&&{bgcolor:"action.disabled"},..."paper"===a&&{bgcolor:"background.paper"},...o}})}},363:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(24),r=a(5),o=a(102),i=a(93),c=a(77),s=a(1);const l=Object(r.a)("header")((e=>{let{theme:t}=e;return{top:0,zIndex:9,lineHeight:0,width:"100%",display:"flex",alignItems:"center",position:"absolute",padding:t.spacing(3),justifyContent:"space-between",[t.breakpoints.up("md")]:{alignItems:"flex-start",padding:t.spacing(7,5,0,7)}}}));function d(e){let{children:t}=e;return Object(s.jsxs)(l,{children:[Object(s.jsx)(n.b,{to:"/",children:Object(s.jsx)(i.a,{})}),Object(s.jsx)(c.a,{width:"smDown",children:Object(s.jsx)(o.a,{variant:"body2",sx:{mt:{md:-2}},children:t})})]})}},385:function(e,t,a){"use strict";var n=a(0),r=a(66);t.a=()=>{const[e,t]=Object(n.useState)([]),[a,o]=Object(n.useState)(1),[i,c]=Object(n.useState)(null),[s,l]=Object(n.useState)(!1);async function d(a,n){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{var i;c(null);const l=await Object(r.f)(a,30,n);if(Array.isArray(null===(i=l.data)||void 0===i?void 0:i.logs)){let a=l.data.logs;n&&(a=a.sort(((e,t)=>t.bug_severity-e.bug_severity))),t(o?a:[...e,...a])}else{var s;c((null===(s=l.data)||void 0===s?void 0:s.detail)||"An error occurred while loading logs")}}catch(l){console.error(l)}}Object(n.useEffect)((()=>{d(a,s)}),[]);return{logs:e,loadError:i,loadMoreLogs:async function(){const e=a+1;o(e),d(e,s)},showOnlyBugs:s,toggleLoadOlyBugs:async function(){const e=!s;l(e),d(a,e,!0)},getLogByTicketId:async e=>{try{const o=await Object(r.c)(e);var t,a,n;return 200===o.status?null!==(t=o.data)&&void 0!==t&&t.log_entry?{log:o.data.log_entry,success:!0,error:null}:{success:!1,error:(null===(a=o.data)||void 0===a?void 0:a.detail)||"An error occurred while loading log"}:404===o.status?{success:!0,error:"No ticket found with that ID"}:{success:!1,error:(null===(n=o.data)||void 0===n?void 0:n.detail)||"An error occurred while loading log"}}catch(o){console.error(o);return{success:!1,error:(null===o||void 0===o?void 0:o.message)||(null===o||void 0===o?void 0:o.detail)||`${o}`}}}}}},386:function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a(697),o=a(691),i=a(410),c=a.n(i),s=a(120),l=a(387),d=a(698),u=a(211),p=a(1);function b(e){let{getLogByTicketId:t,renderComponent:a}=e;const[i,b]=Object(n.useState)(""),[g,h]=Object(n.useState)(null),[x,j]=Object(n.useState)(null),[m,O]=Object(n.useState)(!1);return Object(p.jsxs)(r.a,{style:{padding:"10px",marginTop:"20px",marginBottom:"20px",maxWidth:"800px",boxShadow:"0px 0px 0px rgba(0, 0, 0, 0)"},children:[Object(p.jsx)("h4",{children:"Search by ticket ID"}),Object(p.jsxs)("div",{style:{display:"flex",gap:"20px",marginBottom:"20px"},children:[Object(p.jsx)(o.a,{onChange:e=>{b(e.target.value)},size:"small",value:i,fullWidth:!0,name:"first_name"}),Object(p.jsx)(d.a,{onClick:()=>{j(null),t(i).then((e=>{console.log("found log:",e),e.success?e.log?h(e.log):j("No ticket found with that ID"):j(e.error||"An error occurred while searching for the ticket")})).catch((e=>{j((null===e||void 0===e?void 0:e.message)||(null===e||void 0===e?void 0:e.detail)||`${e}`)}))},startIcon:Object(p.jsx)(c.a,{}),variant:"contained",loading:m,children:"Search"})]}),x&&Object(p.jsx)(s.a,{errorMsg:x}),g&&("TicketLogRow"===a?Object(p.jsx)(l.a,{ticketLogEntry:g}):Object(p.jsx)(u.a,{ticketLogEntry:g}))]})}},387:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(426),r=a(103),o=a(226),i=(a(0),a(690)),c=a(24),s=a(1);function l(e){let{ticketLogEntry:t}=e;const a=new Date(t.created_at);return Object(s.jsxs)(n.a,{sx:{"&:last-child td, &:last-child th":{border:0}},hover:!0,children:[Object(s.jsx)(r.a,{component:"th",scope:"row",children:t.external_id}),Object(s.jsxs)(r.a,{children:["bug"===t.ticket_status&&Object(s.jsx)("div",{style:{color:"red"},children:Object(s.jsx)("b",{children:"Bug"})}),"bug-testing"===t.ticket_status&&Object(s.jsx)("div",{style:{color:"green"},children:Object(s.jsx)("b",{children:"Ready for testing"})})]}),Object(s.jsx)(r.a,{children:("bug"===t.ticket_status||"bug-testing"===t.ticket_status)&&Object(s.jsxs)("div",{children:[1===t.bug_severity&&Object(s.jsx)("div",{style:{color:"black",padding:"10px 20px",borderRadius:"5px",backgroundColor:"#f1cf00",width:"100px",textAlign:"center"},children:Object(s.jsx)("b",{children:"Low"})}),2===t.bug_severity&&Object(s.jsx)("div",{style:{color:"white",padding:"10px 20px",borderRadius:"5px",backgroundColor:"#f16400",width:"100px",textAlign:"center"},children:"Medium"}),3===t.bug_severity&&Object(s.jsx)("div",{style:{color:"white",padding:"10px 20px",borderRadius:"5px",backgroundColor:"#f10000",width:"100px",textAlign:"center"},children:"High"})]})}),Object(s.jsx)(r.a,{children:a.toDateString()}),Object(s.jsx)(r.a,{children:Object(s.jsx)(c.b,{to:`/processing-entry/${t.id}`,children:Object(s.jsx)(o.a,{onClick:()=>{},startIcon:Object(s.jsx)(i.a,{}),variant:"contained",children:"View Processing Entry"})})})]})}},389:function(e,t,a){"use strict";a.d(t,"a",(function(){return A}));var n=a(0),r=a(178),o=a(24),i=a(121),c=a(177),s=a(31),l=a(290),d=a.n(l),u=a(296),p=a.n(u),b=a(291),g=a.n(b),h=a(698),x=a(694),j=a(768),m=a(691),O=a(794),f=a(788),y=a(795),v=a(771),_=a(423),w=a(54),k=a(287),S=a(77),C=a(39),E=a(1);const M={LOGIN_BAD_CREDENTIALS:"The email/password that you entered are not correct"};function A(e){let{onLogin:t}=e;const{login:a}=Object(w.a)(),l=Object(k.a)(),{enqueueSnackbar:u,closeSnackbar:b}=Object(i.b)(),[A,I]=Object(n.useState)(!1),[F,$]=Object(n.useState)(null),R=r.b().shape({email:r.c().email("Email must be a valid email address").required("Email is required"),password:r.c().required("Password is required")}),L=Object(c.c)({initialValues:{email:"",password:"",remember:!0,afterSubmit:""},validationSchema:R,onSubmit:async(e,n)=>{let{setErrors:r,setSubmitting:o,resetForm:i}=n;try{const n=await a(e.email,e.password);var c;if(n.success)u("Login success",{variant:"success",action:e=>Object(E.jsx)(S.b,{size:"small",onClick:()=>b(e),children:Object(E.jsx)(s.a,{icon:p.a})})}),t&&t();else"string"===typeof(null===(c=n.error)||void 0===c?void 0:c.detail)?n.error.detail.includes("LOGIN_BAD_CREDENTIALS")?$("Incorrect password or email address"):$(n.error.detail):$(`${n.error}`);l.current&&o(!1)}catch(d){const e=d;console.log("ima error",d),console.error(d),i(),l.current&&(console.log("set errors"),o(!1),r({afterSubmit:M[e.detail]}))}}}),{errors:z,touched:B,values:T,isSubmitting:D,handleSubmit:P,getFieldProps:N}=L;return Object(E.jsx)(c.b,{value:L,children:Object(E.jsxs)(c.a,{autoComplete:"off",noValidate:!0,onSubmit:P,children:[Object(E.jsxs)(x.a,{spacing:3,children:[z.afterSubmit&&Object(E.jsx)(j.a,{severity:"error",children:z.afterSubmit}),F&&Object(E.jsx)(j.a,{severity:"error",children:F}),Object(E.jsx)(m.a,{fullWidth:!0,autoComplete:"username",type:"email",label:"Email address",...N("email"),error:Boolean(B.email&&z.email),helperText:B.email&&z.email}),Object(E.jsx)(m.a,{fullWidth:!0,autoComplete:"current-password",type:A?"text":"password",label:"Password",...N("password"),InputProps:{endAdornment:Object(E.jsx)(O.a,{position:"end",children:Object(E.jsx)(f.a,{onClick:()=>{I((e=>!e))},edge:"end",children:Object(E.jsx)(s.a,{icon:A?d.a:g.a})})})},error:Boolean(B.password&&z.password),helperText:B.password&&z.password})]}),Object(E.jsxs)(x.a,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{my:2},children:[Object(E.jsx)(y.a,{control:Object(E.jsx)(v.a,{...N("remember"),checked:T.remember}),label:"Remember me"}),Object(E.jsx)(_.a,{component:o.b,variant:"subtitle2",to:C.a.resetPassword,children:"Forgot password?"})]}),Object(E.jsx)(h.a,{fullWidth:!0,size:"large",type:"submit",variant:"contained",loading:D,children:"Login"})]})})}},39:function(e,t,a){"use strict";function n(e,t){return`${e}${t}`}a.d(t,"b",(function(){return i})),a.d(t,"a",(function(){return c}));const r="/",o="/auth",i={root:r,general:{statistics:n(r,"statistics"),trial:n(r,"trial"),home:n(r,"home"),qa:n(r,"qa"),tov:n(r,"tov"),settings:n(r,"settings/general"),settingsConnectors:n(r,"settings/connectors"),settingsActions:n(r,"settings/actions"),settingsBilling:n(r,"settings/billing"),planSelect:n(r,"settings/plan-select"),optin:n(r,"optin"),tickets:n(r,"tickets")}},c={root:o,login:n(o,"/login"),loginUnprotected:n(o,"/login-unprotected"),register:n(o,"/register"),registerUnprotected:n(o,"/register-unprotected"),resetPassword:n(o,"/reset-password"),newPassword:n(o,"/new-password"),verify:n(o,"/verify")}},404:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return f}));var n=a(24),r=a(5),o=a(423),i=a(696),c=a(694),s=a(171),l=a(102),d=a(226),u=a(39),p=a(54),b=a(363),g=a(283),h=a(77),x=a(389),j=a(1);const m=Object(r.a)(g.a)((e=>{let{theme:t}=e;return{[t.breakpoints.up("md")]:{display:"flex"}}})),O=Object(r.a)("div")((e=>{let{theme:t}=e;return{maxWidth:480,margin:"auto",display:"flex",minHeight:"100vh",flexDirection:"column",justifyContent:"center",padding:t.spacing(12,0)}}));function f(){const{method:e,login:t}=Object(p.a)();return Object(j.jsxs)(m,{title:"Login | Vennie",children:[Object(j.jsxs)(b.a,{children:["Don\u2019t have an account? \xa0",Object(j.jsx)(o.a,{underline:"none",variant:"subtitle2",component:n.b,to:u.a.register,children:"Get started"})]}),Object(j.jsx)(i.a,{maxWidth:"sm",children:Object(j.jsxs)(O,{children:[Object(j.jsx)(c.a,{direction:"row",alignItems:"center",sx:{mb:5},children:Object(j.jsxs)(s.a,{sx:{flexGrow:1},children:[Object(j.jsx)(l.a,{variant:"h4",gutterBottom:!0,children:"Sign in to Vennie"}),Object(j.jsx)(l.a,{sx:{color:"text.secondary"},children:"Enter your details below."})]})}),"auth0"!==e?Object(j.jsx)(x.a,{}):Object(j.jsx)(d.a,{fullwidth:!0,size:"large",type:"submit",variant:"contained",onClick:async()=>{try{await t()}catch(e){console.error(e)}},children:"Login"}),Object(j.jsx)(h.a,{width:"smUp",children:Object(j.jsxs)(l.a,{variant:"body2",align:"center",sx:{mt:3},children:["Don\u2019t have an account?\xa0",Object(j.jsx)(o.a,{variant:"subtitle2",component:n.b,to:u.a.register,children:"Get started"})]})})]})})]})}},43:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));let n=function(e){return e.ENABLE_VOUCHERS="vouchers_enabled",e.ENABLE_MANUAL_VOUCHER_APPROVAL="manual_voucher_approval_on",e.ENABLE_REPLACE_EXCHANGE="enable_replace_exchange",e.ENABLE_SAME_ITEM_REPLACEMENT="enable_same_item_replacement",e.ENABLE_REFUND_REQUIRE_IMAGE="refund_require_image",e.ENABLE_CANCEL_ORDER="enable_cancel_order",e.ENABLE_CANCEL_APPROVAL="enable_cancel_approval",e.ENABLE_PRODUCT_INFORMATION="enable_product_info",e.ENABLE_CHANGE_ADDRESS="enable_change_address",e.ENABLE_CHANGE_ADDRESS_APPROVAL="enable_change_address_approval",e.ENABLE_ORDER_TRACKING="enable_order_tracking",e}({})},45:function(e,t,a){"use strict";var n=a(67);function r(e,t){return`linear-gradient(to bottom, ${e}, ${t})`}const o={0:"#FFFFFF",100:"#F9FAFB",200:"#F4F6F8",300:"#DFE3E8",400:"#C4CDD5",500:"#919EAB",600:"#637381",700:"#454F5B",800:"#212B36",900:"#161C24",5008:Object(n.a)("#919EAB",.08),50012:Object(n.a)("#919EAB",.12),50016:Object(n.a)("#919EAB",.16),50024:Object(n.a)("#919EAB",.24),50032:Object(n.a)("#919EAB",.32),50048:Object(n.a)("#919EAB",.48),50056:Object(n.a)("#919EAB",.56),50080:Object(n.a)("#919EAB",.8)},i={lighter:"#ad9dc8D",light:"#765aa1",main:"#593B8C",dark:"#452d79",darker:"#362367",contrastText:"#fff"},c={lighter:"#D0F2FF",light:"#74CAFF",main:"#1890FF",dark:"#0C53B7",darker:"#04297A",contrastText:"#fff"},s={lighter:"#E9FCD4",light:"#AAF27F",main:"#AAF27F",dark:"#229A16",darker:"#08660D",contrastText:o[800]},l={lighter:"#FFF7CD",light:"#FFE16A",main:"#FFC107",dark:"#B78103",darker:"#7A4F01",contrastText:o[800]},d={lighter:"#FFE7D9",light:"#FFA48D",main:"#FF4842",dark:"#B72136",darker:"#7A0C2E",contrastText:"#fff"},u={primary:r(i.light,i.main),info:r(c.light,c.main),success:r(s.light,s.main),warning:r(l.light,l.main),error:r(d.light,d.main)},p={common:{black:"#000",white:"#fff"},primary:{...i},secondary:{lighter:"#fbe967",light:"#f9d54e",main:"#f5be46",dark:"#f1a73f",darker:"#e98132",contrastText:"#000"},info:{...c},success:{...s},warning:{...l},error:{...d},grey:o,gradients:u,divider:o[50024],chart:{violet:["#826AF9","#9E86FF","#D0AEFF","#F7D2FF"],blue:["#2D99FF","#83CFFF","#A5F3FF","#CCFAFF"],green:["#2CD9C5","#60F1C8","#A4F7CC","#C0F2DC"],yellow:["#FFE700","#FFEF5A","#FFF7AE","#FFF3D6"],red:["#FF6C40","#FF8F6D","#FFBD98","#FFF2D4"]},action:{hover:o[5008],selected:o[50016],disabled:o[50080],disabledBackground:o[50024],focus:o[50024],hoverOpacity:.08,disabledOpacity:.48}},b={light:{...p,text:{primary:o[800],secondary:o[600],disabled:o[500]},background:{paper:"#fff",default:"#fff",neutral:o[200]},action:{active:o[600],...p.action}},dark:{...p,text:{primary:"#fff",secondary:o[500],disabled:o[600]},background:{paper:o[800],default:o[900],neutral:o[50016]},action:{active:o[500],...p.action}}};t.a=b},478:function(e,t){},480:function(e,t){},516:function(e,t){},518:function(e,t){},519:function(e,t){},524:function(e,t){},526:function(e,t){},54:function(e,t,a){"use strict";var n=a(0),r=a(218);t.a=()=>Object(n.useContext)(r.a)},546:function(e,t){},562:function(e,t){},565:function(e,t){},66:function(e,t,a){"use strict";a.d(t,"f",(function(){return r})),a.d(t,"c",(function(){return o})),a.d(t,"d",(function(){return i})),a.d(t,"e",(function(){return c})),a.d(t,"h",(function(){return s})),a.d(t,"g",(function(){return l})),a.d(t,"m",(function(){return d})),a.d(t,"l",(function(){return u})),a.d(t,"j",(function(){return p})),a.d(t,"k",(function(){return b})),a.d(t,"n",(function(){return g})),a.d(t,"a",(function(){return h})),a.d(t,"b",(function(){return x})),a.d(t,"i",(function(){return j}));var n=a(14);const r=async function(e,t){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n.a.get("/processing_log/account_logs",{params:{page:e,page_size:t,only_bugs:a}})},o=async e=>n.a.get(`/processing_log/ticket_log/${e}`),i=async e=>n.a.get(`/processing_log/log/${e}`),c=async e=>n.a.get(`/processing_log/processing_entry/${e}`),s=async e=>n.a.get(`/processing_log/processing_runs/${e}`),l=async e=>n.a.get(`/processing_log/processing_run/${e}`),d=async(e,t)=>n.a.post(`/processing_log/add_vennie_comment/${e}`,{comments:t}),u=async(e,t)=>n.a.post("/processing_log/set_is_bug",{processing_id:e,is_bug:t}),p=async(e,t)=>n.a.post("/processing_log/set_bug_severity",{ticket_log_id:e,bug_severity:t}),b=async(e,t)=>n.a.post("/processing_log/set_bug_ready_testing",{ticket_log_id:e,is_bug_testing:t}),g=async(e,t,a,r)=>n.a.post("/processing_log/set_replace_item_image_verify/",{processing_entry_id:e,external_id:t,is_approved:a,is_test:r}),h=async(e,t,a)=>await n.a.post("/processing_log/create_log_entry",{external_ticket_id:e,ticket_type:t,ticket_status:a}),x=async(e,t)=>await n.a.post("/processing_log/create_processing_entry",{ticket_log_id:e,external_ticket_id:t}),j=async(e,t,a,r)=>await n.a.post("/processing_log/report_wrong",{link_type:e,processing_entry_id:t,answer_action_id:a,comment:r})},682:function(e,t,a){"use strict";a.r(t);a(447);var n=a(51),r=a.n(n),o=a(0),i=a(24),c=a(202),s=a(219),l=a(749),d=a(42),u=a(1);const p={collapseClick:!1,collapseHover:!1,onToggleCollapse:()=>{},onHoverEnter:()=>{},onHoverLeave:()=>{}},b=Object(o.createContext)(p);function g(e){let{children:t}=e;const a=Object(d.a)(),n=Object(l.a)(a.breakpoints.down("xs")),[r,i]=Object(o.useState)({click:!1,hover:!1});Object(o.useEffect)((()=>{n&&i({click:!1,hover:!1})}),[n]);return Object(u.jsx)(b.Provider,{value:{isCollapse:r.click&&!r.hover,collapseClick:r.click,collapseHover:r.hover,onToggleCollapse:()=>{i({...r,click:!r.click})},onHoverEnter:()=>{r.click&&i({...r,hover:!0})},onHoverLeave:()=>{i({...r,hover:!1})}},children:t})}var h=a(218),x=a(10),j=a(5);var m=()=>Object(o.useContext)(b),O=a(67),f=(a(766),a(790),a(171)),y=a(694),v=a(777),_=a(93),w=a(288),k=a(31),S=a(9),C=a(286),E=a.n(C),M=a(294),A=a.n(M),I=a(781),F=a(752),$=a(753),R=a(754),L=a(782),z=a(783);const B=Object(j.a)((e=>Object(u.jsx)(I.a,{disableSticky:!0,disableGutters:!0,...e})))((e=>{let{theme:t}=e;return{...t.typography.overline,marginTop:t.spacing(3),marginBottom:t.spacing(2),paddingLeft:t.spacing(5),color:t.palette.text.primary}})),T=Object(j.a)(F.a)((e=>{let{theme:t}=e;return{...t.typography.body2,height:48,position:"relative",textTransform:"capitalize",paddingLeft:t.spacing(5),paddingRight:t.spacing(2.5),color:t.palette.text.secondary,"&:before":{top:0,right:0,width:3,bottom:0,content:"''",display:"none",position:"absolute",borderTopLeftRadius:4,borderBottomLeftRadius:4,backgroundColor:t.palette.primary.main}}})),D=Object(j.a)($.a)({width:22,height:22,display:"flex",alignItems:"center",justifyContent:"center"});function P(e){let{item:t,isShow:a}=e;const n=Object(d.a)(),{pathname:r}=Object(x.m)(),{title:c,path:s,icon:l,info:p,children:b}=t,g=!!s&&!!Object(S.q)({path:s,end:!1},r),[h,j]=Object(o.useState)(g),m=()=>{j(!h)},y={color:"primary.main",fontWeight:"fontWeightMedium",bgcolor:Object(O.a)(n.palette.primary.main,n.palette.action.selectedOpacity),"&:before":{display:"block"}},v={color:"text.primary",fontWeight:"fontWeightMedium"};return b?Object(u.jsxs)(u.Fragment,{children:[Object(u.jsxs)(T,{onClick:m,sx:{...g&&y},children:[Object(u.jsx)(D,{children:l&&l}),a&&Object(u.jsxs)(u.Fragment,{children:[Object(u.jsx)(R.a,{disableTypography:!0,primary:c}),p&&p,Object(u.jsx)(f.a,{component:k.a,icon:h?A.a:E.a,sx:{width:16,height:16,ml:1}})]})]}),a&&Object(u.jsx)(L.a,{in:h,timeout:"auto",unmountOnExit:!0,children:Object(u.jsx)(z.a,{component:"div",disablePadding:!0,children:b.map((e=>{const{title:t,path:a}=e,n=!!a&&!!Object(S.q)({path:a,end:!1},r);return Object(u.jsxs)(T,{component:i.c,to:a,sx:{...n&&v},children:[Object(u.jsx)(D,{children:Object(u.jsx)(f.a,{component:"span",sx:{width:4,height:4,display:"flex",borderRadius:"50%",alignItems:"center",justifyContent:"center",bgcolor:"text.disabled",transition:e=>e.transitions.create("transform"),...n&&{transform:"scale(2)",bgcolor:"primary.main"}}})}),Object(u.jsx)(R.a,{disableTypography:!0,primary:t})]},t)}))})})]}):Object(u.jsxs)(T,{component:i.c,to:s,sx:{...g&&y},children:[Object(u.jsx)(D,{children:l&&l}),a&&Object(u.jsxs)(u.Fragment,{children:[Object(u.jsx)(R.a,{disableTypography:!0,primary:c}),p&&p]})]})}function N(e){let{navConfig:t,isShow:a=!0,...n}=e;return Object(u.jsx)(f.a,{...n,children:t.map((e=>{const{subheader:t,items:n}=e;return Object(u.jsxs)(z.a,{disablePadding:!0,children:[a&&Object(u.jsx)(B,{children:t}),n.map((e=>Object(u.jsx)(P,{item:e,isShow:a},e.title)))]},t)}))})}var W=a(77),H=a(39),U=a(362);const G=e=>Object(u.jsx)(U.a,{src:`/static/icons/navbar/${e}.svg`,sx:{width:"100%",height:"100%"}}),V={home:G("ic_dashboard"),user:G("ic_user"),ecommerce:G("ic_ecommerce"),analytics:G("ic_analytics"),dashboard:G("ic_dashboard"),bot:G("ic_chat"),faq:G("ic_list"),tov:G("ic_user_voice"),settings:G("ic_settings"),tickets:G("ep--tickets")};var q=[{subheader:"",items:[{title:"Dashboard",path:H.b.general.home,icon:V.home},{title:"Tickets",path:H.b.general.tickets,icon:V.tickets},{title:"QA Database",path:H.b.general.qa,icon:V.faq},{title:"Tone Of Voice",path:H.b.general.tov,icon:V.tov},{title:"Settings",icon:V.settings,children:[{title:"General",path:H.b.general.settings,icon:V.settings},{title:"Integrations",path:H.b.general.settingsConnectors,icon:V.settings},{title:"Actions",path:H.b.general.settingsActions,icon:V.settings},{title:"Billing",path:H.b.general.settingsBilling,icon:V.settings}]}]}],Z=a(400),J=a.n(Z),Q=a(774),K=a(789),X=a(226),Y=a(54),ee=a(295);const te=[{label:"Home",icon:J.a,linkTo:"/statistics"}];function ae(){const e=Object(o.useRef)(null),{logout:t}=Object(Y.a)(),[a,n]=Object(o.useState)(!1),r=()=>{n(!1)};return Object(u.jsxs)(u.Fragment,{children:[Object(u.jsx)(W.b,{ref:e,onClick:()=>{n(!0)},sx:{padding:0,width:44,height:44,...a&&{"&:before":{zIndex:1,content:"''",width:"100%",height:"100%",borderRadius:"50%",position:"absolute",bgcolor:e=>Object(O.a)(e.palette.grey[900],.72)}}},children:Object(u.jsx)(Q.a,{alt:"My Avatar",src:"/static/mock-images/avatars/avatar_default.jpg"})}),Object(u.jsxs)(ee.a,{open:a,onClose:r,anchorEl:e.current,sx:{width:220},children:[te.map((e=>Object(u.jsxs)(K.a,{to:e.linkTo,component:i.b,onClick:r,sx:{typography:"body2",py:1,px:2.5},children:[Object(u.jsx)(f.a,{component:k.a,icon:e.icon,sx:{mr:2,width:24,height:24}}),e.label]},e.label))),Object(u.jsx)(f.a,{sx:{p:2,pt:1.5},children:Object(u.jsx)(X.a,{onClick:t,fullWidth:!0,color:"inherit",variant:"outlined",children:"Logout"})})]})]})}const ne=Object(j.a)("div")((e=>{let{theme:t}=e;return{[t.breakpoints.up("xs")]:{flexShrink:0,transition:t.transitions.create("width",{duration:t.transitions.duration.complex})}}}));Object(j.a)("div")((e=>{let{theme:t}=e;return{display:"flex",alignItems:"center",padding:t.spacing(2,2.5),borderRadius:t.shape.borderRadiusSm,backgroundColor:t.palette.grey[50012]}}));function re(e){let{onCloseSidebar:t}=e;const{pathname:a}=Object(x.m)(),n=!0,{isCollapse:r,collapseClick:c,collapseHover:s,onToggleCollapse:l,onHoverEnter:d,onHoverLeave:p}=m();Object(o.useEffect)((()=>{t()}),[a]);const b=Object(u.jsxs)(w.a,{sx:{height:"100%","& .simplebar-content":{height:"100%",display:"flex",flexDirection:"column"}},children:[Object(u.jsx)(y.a,{spacing:3,sx:{px:2.5,pt:3,pb:2,...r&&{alignItems:"center"}},children:Object(u.jsx)(y.a,{direction:"row",alignItems:"center",justifyContent:"space-between",children:Object(u.jsx)(f.a,{component:i.b,to:"/",sx:{display:"inline-flex"},children:Object(u.jsx)(_.a,{})})})}),Object(u.jsx)(N,{navConfig:q,isShow:!r}),Object(u.jsx)(f.a,{sx:{display:"flex",justifyContent:"center",mt:"auto",mb:8},children:Object(u.jsx)(ae,{})})]});return Object(u.jsx)(ne,{sx:{width:220},children:Object(u.jsx)(v.a,{open:n,variant:"persistent",onMouseEnter:d,onMouseLeave:p,PaperProps:{sx:{width:220,bgcolor:"background.default",...r&&{width:102},...s&&{borderRight:0,backdropFilter:"blur(6px)",WebkitBackdropFilter:"blur(6px)",boxShadow:e=>e.customShadows.z20,bgcolor:e=>Object(O.a)(e.palette.background.default,.88)}}},children:b})})}const oe=Object(j.a)("div")({display:"flex",minHeight:"100%",overflow:"hidden"}),ie=Object(j.a)("div")((e=>{let{theme:t}=e;return{flexGrow:1,overflow:"auto",minHeight:"100%",paddingTop:88,paddingBottom:t.spacing(10),[t.breakpoints.up("lg")]:{paddingTop:116,paddingLeft:t.spacing(2),paddingRight:t.spacing(2)}}}));function ce(){const e=Object(d.a)(),t=Object(l.a)(e.breakpoints.down("xs")),{collapseClick:a}=m(),[n,r]=Object(o.useState)(!1);return Object(o.useEffect)((()=>{r(!t),console.log(t)}),[t]),Object(u.jsxs)(oe,{children:[Object(u.jsx)(re,{isOpenSidebar:n,onCloseSidebar:()=>r(!1)}),Object(u.jsx)(ie,{sx:{transition:e.transitions.create("margin",{duration:e.transitions.duration.complex}),...a&&{ml:"102px"}},children:Object(u.jsx)(x.b,{})})]})}var se=a(289),le=a(223),de=a.n(le),ue=a(765),pe=a(695);const be=Object(j.a)("div")((e=>{let{theme:t}=e;return{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:t.palette.background.default}}));function ge(){const e=Object(d.a)();return Object(u.jsx)(pe.a,{styles:{"#nprogress":{pointerEvents:"none","& .bar":{top:0,left:0,height:2,width:"100%",position:"fixed",zIndex:e.zIndex.snackbar,backgroundColor:e.palette.primary.main,boxShadow:`0 0 2px ${e.palette.primary.main}`},"& .peg":{right:0,opacity:1,width:100,height:"100%",display:"block",position:"absolute",transform:"rotate(3deg) translate(0px, -4px)",boxShadow:`0 0 10px ${e.palette.primary.main}, 0 0 5px ${e.palette.primary.main}`}}}})}function he(){return de.a.configure({showSpinner:!1}),Object(o.useMemo)((()=>{de.a.start()}),[]),Object(o.useEffect)((()=>{de.a.done()}),[]),null}function xe(e){let{...t}=e;return Object(u.jsxs)(u.Fragment,{children:[Object(u.jsx)(he,{}),Object(u.jsxs)(be,{...t,children:[Object(u.jsx)(ue.a.div,{initial:{rotateY:0},animate:{rotateY:360},transition:{duration:2,ease:"easeInOut",repeatDelay:1,repeat:1/0},children:Object(u.jsx)(_.a,{sx:{width:64,height:64}})}),Object(u.jsx)(f.a,{component:ue.a.div,animate:{scale:[1.2,1,1,1.2,1.2],rotate:[270,0,0,270,270],opacity:[.25,1,1,1,.25],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:100,height:100,borderRadius:"25%",position:"absolute",border:e=>`solid 3px ${Object(O.a)(e.palette.primary.dark,.24)}`}}),Object(u.jsx)(f.a,{component:ue.a.div,animate:{scale:[1,1.2,1.2,1,1],rotate:[0,270,270,0,0],opacity:[1,.25,.25,.25,1],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:120,height:120,borderRadius:"25%",position:"absolute",border:e=>`solid 8px ${Object(O.a)(e.palette.primary.dark,.24)}`}})]})]})}function je(e){let{children:t}=e;const{isAuthenticated:a}=Object(Y.a)();return a?Object(u.jsx)(x.a,{to:H.b.root}):Object(u.jsx)(u.Fragment,{children:t})}var me=a(404);function Oe(e){let{children:t}=e;const{isAuthenticated:a}=Object(Y.a)(),{pathname:n}=Object(x.m)(),[r,i]=Object(o.useState)(null);return a?r&&n!==r?(i(null),Object(u.jsx)(x.a,{to:r})):Object(u.jsx)(u.Fragment,{children:t}):(n!==r&&i(n),Object(u.jsx)(me.default,{}))}var fe=a(102),ye=a(797),ve=a(776),_e=a(798),we=a(799),ke=a(426),Se=a(103),Ce=a(779),Ee=a(800),Me=a(690),Ae=a(385),Ie=a(120),Fe=a(211),$e=a(386);function Re(){const{logs:e,loadError:t,loadMoreLogs:a,getLogByTicketId:n}=Object(Ae.a)(),[r,i]=Object(o.useState)("created_at"),[c,s]=Object(o.useState)("desc"),l=e=>{s(r===e&&"asc"===c?"desc":"asc"),i(e)},d=e.slice().sort(((e,t)=>e[r]<t[r]?"asc"===c?-1:1:e[r]>t[r]?"asc"===c?1:-1:0));return Object(u.jsxs)(f.a,{sx:{padding:3},children:[Object(u.jsx)(fe.a,{variant:"h4",gutterBottom:!0,children:"Customer Ticket List"}),Object(u.jsx)($e.a,{getLogByTicketId:n,renderComponent:"CustomerTicketRow"}),t&&Object(u.jsx)(Ie.a,{errorMsg:t}),Object(u.jsx)(ye.a,{component:ve.a,sx:{mt:3},children:Object(u.jsxs)(_e.a,{sx:{minWidth:650},"aria-label":"Customer ticket list",children:[Object(u.jsx)(we.a,{children:Object(u.jsxs)(ke.a,{children:[Object(u.jsx)(Se.a,{children:Object(u.jsx)(Ce.a,{active:"external_id"===r,direction:"external_id"===r?c:"asc",onClick:()=>l("external_id"),children:"Ticket NR"})}),Object(u.jsx)(Se.a,{children:Object(u.jsx)(Ce.a,{active:"created_at"===r,direction:"created_at"===r?c:"asc",onClick:()=>l("created_at"),children:"Created Date"})}),Object(u.jsx)(Se.a,{children:"Actions"})]})}),Object(u.jsxs)(Ee.a,{children:[d.map((e=>Object(u.jsx)(Fe.a,{ticketLogEntry:e},e.id))),0===d.length&&Object(u.jsx)(ke.a,{sx:{height:"100px"},children:Object(u.jsx)(Se.a,{colSpan:4,align:"center",children:Object(u.jsx)(fe.a,{variant:"body1",color:"textSecondary",children:"No tickets found"})})})]})]})}),d.length>29&&Object(u.jsx)("div",{style:{display:"flex",justifyContent:"center",marginTop:"100px"},children:Object(u.jsx)(X.a,{onClick:a,startIcon:Object(u.jsx)(Me.a,{}),variant:"contained",children:"Load more tickets"})})]})}var Le=a(297),ze=a(763),Be=a(780),Te=a(298),De=a(697),Pe=a(773),Ne=a(802),We=a(127),He=a.n(We),Ue=a(803),Ge=a(801);var Ve=e=>{var t,a,n,r;let{run:o,index:i}=e;const c=new Date(o.created_at);return o.is_test?null:Object(u.jsxs)(De.a,{sx:{padding:"20px",mb:2,overflow:"auto"},children:[Object(u.jsxs)(fe.a,{variant:"h6",gutterBottom:!0,children:["Run ",c.toLocaleString()]}),Object(u.jsxs)(z.a,{children:[Object(u.jsx)(Pe.a,{children:Object(u.jsxs)("div",{style:{color:"#4f5256",fontSize:"14px"},children:[Object(u.jsx)("div",{style:{marginBottom:"10px"},children:Object(u.jsx)("b",{children:"Final Status"})}),Object(u.jsx)("div",{style:{whiteSpace:"pre-line"},children:null!==(t=o.final_status)&&void 0!==t?t:"No Final Status available."})]})}),Object(u.jsx)(ze.a,{sx:{my:2}}),(null===(a=o.run_data)||void 0===a?void 0:a.answer_action_data)&&Object(u.jsxs)(u.Fragment,{children:[Object(u.jsx)(Pe.a,{children:Object(u.jsx)("div",{children:Object(u.jsxs)(Ge.a,{children:[Object(u.jsxs)(Ne.a,{expandIcon:Object(u.jsx)(He.a,{}),"aria-controls":"panel3-content",id:"panel3-header",children:[Object(u.jsx)(He.a,{style:{marginRight:"10px"}})," Picked Policies"]}),Object(u.jsx)(Ue.a,{children:Object(u.jsx)("div",{style:{paddingLeft:"10px"},children:o.run_data.answer_action_data.picked_policies&&o.run_data.answer_action_data.picked_policies.length>0?Object(u.jsx)("ul",{children:o.run_data.answer_action_data.picked_policies.map(((e,t)=>Object(u.jsxs)(f.a,{mb:2,component:"li",children:[Object(u.jsx)("strong",{children:"Question:"})," ",e.question,Object(u.jsx)("br",{}),Object(u.jsx)("strong",{children:"Answer:"})," ",e.answer]},t)))}):"No Picked Policies available."})})]})})}),Object(u.jsx)(ze.a,{sx:{my:2}}),Object(u.jsx)(Pe.a,{children:Object(u.jsxs)("div",{style:{color:"#4f5256",fontSize:"14px"},children:[Object(u.jsx)("div",{style:{marginBottom:"10px"},children:Object(u.jsx)("b",{children:"Final Response"})}),Object(u.jsx)("div",{style:{whiteSpace:"pre-line"},children:null!==(n=null===(r=o.run_data.answer_action_data.final_response)||void 0===r?void 0:r.message)&&void 0!==n?n:"No Final Response available."})]})})]})]})]},i)},qe=a(284);var Ze=e=>{var t,a,n,r,o,i;let{processingEntry:c}=e;const s=c?new Date(c.created_at):null;return Object(u.jsxs)(f.a,{sx:{padding:"5px",overflow:"auto"},children:[Object(u.jsxs)(z.a,{children:[Object(u.jsx)(Pe.a,{children:Object(u.jsx)(R.a,{primary:"Ticket ID:",secondary:c.external_id})}),Object(u.jsx)(Pe.a,{children:Object(u.jsx)(R.a,{primary:"Created at:",secondary:null===s||void 0===s?void 0:s.toLocaleString()})}),Object(u.jsx)(Pe.a,{children:Object(u.jsx)(R.a,{primary:"Subject:",secondary:null!==(t=null===(a=c.ticket_data)||void 0===a||null===(n=a.ticket_data)||void 0===n?void 0:n.subject)&&void 0!==t?t:"No Subject available."})})]}),Object(u.jsx)(ze.a,{sx:{marginY:"20px"}}),Object(u.jsxs)(Ge.a,{defaultExpanded:!1,style:{boxShadow:"none"},children:[Object(u.jsx)(Ne.a,{expandIcon:Object(u.jsx)(He.a,{}),children:Object(u.jsxs)("div",{style:{display:"flex",gap:"10px"},children:[Object(u.jsx)(He.a,{}),Object(u.jsx)("div",{children:"Messages"})]})}),Object(u.jsx)(Ue.a,{children:(null===(r=c.ticket_data)||void 0===r||null===(o=r.comments_data)||void 0===o||null===(i=o.comments)||void 0===i?void 0:i.length)>0?c.ticket_data.comments_data.comments.map(((e,t)=>{var a,n,r,o,i,c,s;const l="email"===(null===e||void 0===e||null===(a=e.via)||void 0===a?void 0:a.channel),d=(null===e||void 0===e||null===(n=e.via)||void 0===n||null===(r=n.source)||void 0===r||null===(o=r.from)||void 0===o?void 0:o.address)||"",p=(null===e||void 0===e||null===(i=e.via)||void 0===i||null===(c=i.source)||void 0===c||null===(s=c.from)||void 0===s?void 0:s.name)||"Anonymous",b=l?`${p} ${d}`:"Agent",g=new Date(e.created_at).toLocaleString([],{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});return Object(u.jsxs)(De.a,{sx:{marginBottom:"10px",padding:"10px"},children:[Object(u.jsx)("div",{children:Object(u.jsxs)("b",{children:[b," - ",g," (",e.public?"Public":"Internal note",")"]})}),Object(u.jsx)("div",{style:{whiteSpace:"pre-line"},children:e.body}),Object(u.jsx)(fe.a,{variant:"caption",children:(h=e.created_at,new Date(h).toLocaleString())}),Array.isArray(e.attachments)&&e.attachments.length>0&&Object(u.jsx)(Pe.a,{children:Object(u.jsx)(R.a,{primary:"Attachments:",secondary:Object(u.jsx)(f.a,{children:e.attachments.map(((e,t)=>Object(u.jsx)(f.a,{children:Object(u.jsx)("a",{href:e.content_url,target:"_blank",rel:"noreferrer",children:e.file_name})},t)))})})})]},t);var h})):Object(u.jsx)(fe.a,{children:"No comments available"})})]})]})},Je=a(121);function Qe(){const{enqueueSnackbar:e}=Object(Je.b)(),{logId:t}=Object(x.q)(),{logEntry:a,loadError:n,processingRuns:r,processingEntry:i}=Object(Le.a)(t),{subdomain:c,getZendeskSubdomain:s}=Object(qe.a)(e),[l,d]=Object(o.useState)("");return Object(o.useEffect)((()=>{c&&d(`https://${c}.zendesk.com/agent/tickets/${null===a||void 0===a?void 0:a.external_id}`)}),[c,null===a||void 0===a?void 0:a.external_id]),n?Object(u.jsx)(Ie.a,{errorMsg:n}):r?Object(u.jsxs)(f.a,{sx:{padding:3},children:[Object(u.jsxs)(f.a,{sx:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[Object(u.jsx)(Te.a,{btnText:"Back"}),l&&Object(u.jsx)(X.a,{variant:"contained",color:"primary",onClick:()=>window.open(l,"_blank"),children:"Open in Zendesk"})]}),Object(u.jsx)(ze.a,{style:{marginTop:"20px",marginBottom:"20px"}}),Object(u.jsx)(fe.a,{variant:"h4",children:"Ticket Information"}),i&&Object(u.jsx)(Ze,{processingEntry:i}),Object(u.jsx)(ze.a,{sx:{marginY:"50px"}}),Object(u.jsx)(fe.a,{variant:"h4",gutterBottom:!0,children:"Processing Runs"}),Object(u.jsx)(Be.a,{container:!0,sx:{marginTop:2},children:r.map(((e,t)=>Object(u.jsx)(Be.a,{item:!0,xs:12,children:Object(u.jsx)(Ve,{index:t,run:e})},t)))})]}):Object(u.jsx)(fe.a,{variant:"h5",children:"Loading..."})}const Ke=e=>t=>{const{pathname:a}=Object(x.m)(),n=a.includes("/dashboard");return Object(u.jsx)(o.Suspense,{fallback:Object(u.jsx)(xe,{sx:{...!n&&{top:0,left:0,width:1,zIndex:9999,position:"fixed"}}}),children:Object(u.jsx)(e,{...t})})};function Xe(){return Object(x.s)([{path:"auth",children:[{path:"login",element:Object(u.jsx)(je,{children:Object(u.jsx)(mt,{})})},{path:"register",element:Object(u.jsx)(je,{children:Object(u.jsx)(Ot,{})})},{path:"reset-password",element:Object(u.jsx)(ft,{})},{path:"new-password",element:Object(u.jsx)(yt,{})},{path:"verify",element:Object(u.jsx)(vt,{})}]},{path:"/",element:Object(u.jsx)(Oe,{children:Object(u.jsx)(ce,{})}),children:[{path:"welcome",element:Object(u.jsx)(et,{})},{element:Object(u.jsx)(x.a,{to:"/home",replace:!0}),index:!0},{path:"home",element:Object(u.jsx)(Ye,{})},{path:"trial",element:Object(u.jsx)(pt,{})},{path:"qa",element:Object(u.jsx)(bt,{})},{path:"add-ticket-policy",element:Object(u.jsx)(gt,{})},{path:"tov",element:Object(u.jsx)(at,{})},{path:"bot-list",element:Object(u.jsx)(tt,{})},{path:"settings/general",element:Object(u.jsx)(st,{})},{path:"settings/connectors",element:Object(u.jsx)(lt,{})},{path:"settings/actions",element:Object(u.jsx)(dt,{})},{path:"settings/billing",element:Object(u.jsx)(ut,{})},{path:"settings/plan-select",element:Object(u.jsx)(ht,{})},{path:"testing",element:Object(u.jsx)(_t,{})},{path:"create-test",element:Object(u.jsx)(wt,{})},{path:"processing",element:Object(u.jsx)(kt,{})},{path:"usage",element:Object(u.jsx)(Mt,{})},{path:"processing-entry/:logId",element:Object(u.jsx)(St,{})},{path:"processing/replacement/check-images/:logId",element:Object(u.jsx)(Ct,{})},{path:"app",children:[{element:Object(u.jsx)(x.a,{to:"/dashboard/app/four",replace:!0})},{path:"four",element:Object(u.jsx)(nt,{})},{path:"five",element:Object(u.jsx)(rt,{})},{path:"six",element:Object(u.jsx)(ot,{})}]},{path:"tickets",element:Object(u.jsx)(Re,{})},{path:"ticket/:logId",element:Object(u.jsx)(Qe,{})}]},{path:"/service_oauth/callback/:service",element:Object(u.jsx)(Oe,{children:Object(u.jsx)(ct,{})})},{path:"/optin/:ticket_log_id",element:Object(u.jsx)(xt,{})},{path:"/shopify",element:Object(u.jsx)(At,{})},{path:"/register-callback-shopify",element:Object(u.jsx)(It,{})},{path:"/terms-and-privacy",element:Object(u.jsx)(jt,{})},{path:"/report-wrong/:link_type/:processing_entry_id/:answer_action_id",element:Object(u.jsx)(Et,{})},{path:"*",element:Object(u.jsx)(se.a,{}),children:[{path:"404",element:Object(u.jsx)(it,{})},{path:"*",element:Object(u.jsx)(x.a,{to:"/404",replace:!0})}]},{path:"*",element:Object(u.jsx)(x.a,{to:"/404",replace:!0})}])}const Ye=Ke(Object(o.lazy)((()=>a.e(17).then(a.bind(null,912))))),et=Ke(Object(o.lazy)((()=>a.e(20).then(a.bind(null,870))))),tt=Ke(Object(o.lazy)((()=>Promise.all([a.e(7),a.e(39)]).then(a.bind(null,896))))),at=Ke(Object(o.lazy)((()=>a.e(26).then(a.bind(null,905))))),nt=Ke(Object(o.lazy)((()=>a.e(34).then(a.bind(null,873))))),rt=Ke(Object(o.lazy)((()=>a.e(33).then(a.bind(null,874))))),ot=Ke(Object(o.lazy)((()=>a.e(35).then(a.bind(null,875))))),it=Ke(Object(o.lazy)((()=>Promise.all([a.e(1),a.e(32)]).then(a.bind(null,876))))),ct=(Ke(Object(o.lazy)((()=>Promise.all([a.e(9),a.e(38)]).then(a.bind(null,890))))),Ke(Object(o.lazy)((()=>a.e(19).then(a.bind(null,877)))))),st=Ke(Object(o.lazy)((()=>a.e(11).then(a.bind(null,895))))),lt=Ke(Object(o.lazy)((()=>a.e(14).then(a.bind(null,897))))),dt=Ke(Object(o.lazy)((()=>a.e(12).then(a.bind(null,891))))),ut=Ke(Object(o.lazy)((()=>Promise.all([a.e(0),a.e(16)]).then(a.bind(null,902))))),pt=Ke(Object(o.lazy)((()=>Promise.all([a.e(6),a.e(40)]).then(a.bind(null,893))))),bt=Ke(Object(o.lazy)((()=>Promise.all([a.e(8),a.e(23)]).then(a.bind(null,906))))),gt=Ke(Object(o.lazy)((()=>a.e(30).then(a.bind(null,882))))),ht=Ke(Object(o.lazy)((()=>Promise.all([a.e(0),a.e(27)]).then(a.bind(null,811))))),xt=Ke(Object(o.lazy)((()=>a.e(24).then(a.bind(null,883))))),jt=Ke(Object(o.lazy)((()=>a.e(36).then(a.bind(null,884))))),mt=Ke(Object(o.lazy)((()=>Promise.resolve().then(a.bind(null,404))))),Ot=Ke(Object(o.lazy)((()=>a.e(25).then(a.bind(null,885))))),ft=Ke(Object(o.lazy)((()=>Promise.all([a.e(1),a.e(37)]).then(a.bind(null,907))))),yt=Ke(Object(o.lazy)((()=>a.e(28).then(a.bind(null,913))))),vt=Ke(Object(o.lazy)((()=>a.e(29).then(a.bind(null,908))))),_t=Ke(Object(o.lazy)((()=>a.e(21).then(a.bind(null,909))))),wt=Ke(Object(o.lazy)((()=>a.e(15).then(a.bind(null,914))))),kt=Ke(Object(o.lazy)((()=>a.e(41).then(a.bind(null,886))))),St=Ke(Object(o.lazy)((()=>Promise.all([a.e(2),a.e(13)]).then(a.bind(null,900))))),Ct=Ke(Object(o.lazy)((()=>a.e(22).then(a.bind(null,915))))),Et=Ke(Object(o.lazy)((()=>a.e(42).then(a.bind(null,916))))),Mt=Ke(Object(o.lazy)((()=>Promise.all([a.e(2),a.e(31)]).then(a.bind(null,910))))),At=Ke(Object(o.lazy)((()=>a.e(18).then(a.bind(null,887))))),It=Ke(Object(o.lazy)((()=>Promise.all([a.e(0),a.e(10)]).then(a.bind(null,888)))));var Ft=a(764),$t=a(418),Rt=a(750),Lt=a(769),zt=a(172);var Bt={borderRadius:8,borderRadiusSm:12,borderRadiusMd:16},Tt=a(45);function Dt(e){return e/16+"rem"}function Pt(e){let{sm:t,md:a,lg:n}=e;return{"@media (min-width:600px)":{fontSize:Dt(t)},"@media (min-width:900px)":{fontSize:Dt(a)},"@media (min-width:1200px)":{fontSize:Dt(n)}}}var Nt={fontFamily:"Public Sans, sans-serif",fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,h1:{fontWeight:700,lineHeight:1.25,fontSize:Dt(40),...Pt({sm:52,md:58,lg:64})},h2:{fontWeight:700,lineHeight:64/48,fontSize:Dt(32),...Pt({sm:40,md:44,lg:48})},h3:{fontWeight:700,lineHeight:1.5,fontSize:Dt(24),...Pt({sm:26,md:30,lg:32})},h4:{fontWeight:700,lineHeight:1.5,fontSize:Dt(20),...Pt({sm:20,md:24,lg:24})},h5:{fontWeight:700,lineHeight:1.5,fontSize:Dt(18),...Pt({sm:19,md:20,lg:20})},h6:{fontWeight:700,lineHeight:28/18,fontSize:Dt(17),...Pt({sm:18,md:18,lg:18})},subtitle1:{fontWeight:600,lineHeight:1.5,fontSize:Dt(16)},subtitle2:{fontWeight:600,lineHeight:22/14,fontSize:Dt(14)},body1:{lineHeight:1.5,fontSize:Dt(16)},body2:{lineHeight:22/14,fontSize:Dt(14)},caption:{lineHeight:1.5,fontSize:Dt(12)},overline:{fontWeight:700,lineHeight:1.5,fontSize:Dt(12),letterSpacing:1.1,textTransform:"uppercase"},button:{fontWeight:700,lineHeight:24/14,fontSize:Dt(14),textTransform:"capitalize"}};var Wt={values:{xs:0,sm:600,md:900,lg:1200,xl:1536}},Ht=a(173);var Ut=a(411),Gt=a.n(Ut);var Vt=a(214),qt=a.n(Vt),Zt=a(215),Jt=a.n(Zt),Qt=a(216),Kt=a.n(Qt),Xt=a(217),Yt=a.n(Xt);var ea=a(412),ta=a.n(ea),aa=a(425);const na={width:20,height:20},ra={width:28,height:28},oa=Object(u.jsx)(aa.a,{children:Object(u.jsx)(k.a,{icon:ta.a})});var ia=a(413),ca=a.n(ia);var sa=a(414),la=a.n(sa),da=a(415),ua=a.n(da),pa=a(416),ba=a.n(pa);const ga={width:20,height:20};function ha(e){return Object(u.jsx)(aa.a,{...e,children:Object(u.jsx)("path",{d:"M17 3a4 4 0 014 4v10a4 4 0 01-4 4H7a4 4 0 01-4-4V7a4 4 0 014-4h10zm0 2H7a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2z"})})}function xa(e){return Object(u.jsx)(aa.a,{...e,children:Object(u.jsx)("path",{d:"M17 3a4 4 0 014 4v10a4 4 0 01-4 4H7a4 4 0 01-4-4V7a4 4 0 014-4h10zm-1.372 4.972a1.006 1.006 0 00-.928.388l-3.78 5-1.63-2.08a1.001 1.001 0 00-1.58 1.23l2.44 3.11a1 1 0 001.58-.01l4.57-6v-.03a1.006 1.006 0 00-.672-1.608z"})})}function ja(e){return Object(u.jsx)(aa.a,{...e,children:Object(u.jsx)("path",{d:"M17 3a4 4 0 014 4v10a4 4 0 01-4 4H7a4 4 0 01-4-4V7a4 4 0 014-4h10zm-1.75 8h-6.5a.75.75 0 00-.75.75v.5c0 .414.336.75.75.75h6.5a.75.75 0 00.75-.75v-.5a.75.75 0 00-.75-.75z"})})}function ma(e){return Object(Ht.merge)(function(e){return{MuiFab:{defaultProps:{color:"primary"},styleOverrides:{root:{boxShadow:e.customShadows.z8,"&:hover":{boxShadow:"none",backgroundColor:e.palette.grey[400]}},primary:{boxShadow:e.customShadows.primary,"&:hover":{backgroundColor:e.palette.primary.dark}},secondary:{boxShadow:e.customShadows.secondary,"&:hover":{backgroundColor:e.palette.secondary.dark}},extended:{"& svg":{marginRight:e.spacing(1)}}}}}}(e),function(e){return{MuiTab:{styleOverrides:{root:{padding:0,fontWeight:e.typography.fontWeightMedium,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,"&.Mui-selected":{color:e.palette.text.primary},marginRight:e.spacing(5),"@media (min-width: 600px)":{minWidth:48}},labelIcon:{minHeight:48,flexDirection:"row","& > *:first-of-type":{marginBottom:0,marginRight:e.spacing(1)}},wrapper:{flexDirection:"row",whiteSpace:"nowrap"},textColorInherit:{opacity:1,color:e.palette.text.secondary}}},MuiTabPanel:{styleOverrides:{root:{padding:0}}},MuiTabScrollButton:{styleOverrides:{root:{width:48,borderRadius:"50%"}}}}}(e),function(e){return{MuiChip:{defaultProps:{deleteIcon:Object(u.jsx)(k.a,{icon:Gt.a})},styleOverrides:{colorDefault:{"& .MuiChip-avatarMedium, .MuiChip-avatarSmall":{color:e.palette.text.secondary}},outlined:{borderColor:e.palette.grey[50032],"&.MuiChip-colorPrimary":{borderColor:e.palette.primary.main},"&.MuiChip-colorSecondary":{borderColor:e.palette.secondary.main}},avatarColorInfo:{color:e.palette.info.contrastText,backgroundColor:e.palette.info.dark},avatarColorSuccess:{color:e.palette.success.contrastText,backgroundColor:e.palette.success.dark},avatarColorWarning:{color:e.palette.warning.contrastText,backgroundColor:e.palette.warning.dark},avatarColorError:{color:e.palette.error.contrastText,backgroundColor:e.palette.error.dark}}}}}(e),function(e){return{MuiCard:{styleOverrides:{root:{boxShadow:e.customShadows.z16,borderRadius:e.shape.borderRadiusMd,position:"relative",zIndex:0}}},MuiCardHeader:{defaultProps:{titleTypographyProps:{variant:"h6"},subheaderTypographyProps:{variant:"body2",marginTop:e.spacing(.5)}},styleOverrides:{root:{padding:e.spacing(3,3,0)}}},MuiCardContent:{styleOverrides:{root:{padding:e.spacing(3)}}}}}(e),function(e){return{MuiMenuItem:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:e.palette.action.selected,"&:hover":{backgroundColor:e.palette.action.hover}}}}}}}(e),{MuiGrid:{styleOverrides:{}}},{MuiLink:{defaultProps:{underline:"hover"},styleOverrides:{root:{}}}},function(e){return{MuiInputBase:{styleOverrides:{root:{"&.Mui-disabled":{"& svg":{color:e.palette.text.disabled}}},input:{"&::placeholder":{opacity:1,color:e.palette.text.disabled}}}},MuiInput:{styleOverrides:{underline:{"&:before":{borderBottomColor:e.palette.grey[50056]}}}},MuiFilledInput:{styleOverrides:{root:{backgroundColor:e.palette.grey[50012],"&:hover":{backgroundColor:e.palette.grey[50016]},"&.Mui-focused":{backgroundColor:e.palette.action.focus},"&.Mui-disabled":{backgroundColor:e.palette.action.disabledBackground}},underline:{"&:before":{borderBottomColor:e.palette.grey[50056]}}}},MuiOutlinedInput:{styleOverrides:{root:{"& .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.grey[50032]},"&.Mui-disabled":{"& .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.action.disabledBackground}}}}}}}(e),function(e){return{MuiRadio:{styleOverrides:{root:{padding:e.spacing(1),svg:{fontSize:24,"&[font-size=small]":{fontSize:20}}}}}}}(e),{MuiBadge:{styleOverrides:{dot:{width:10,height:10,borderRadius:"50%"}}}},function(e){return{MuiListItemIcon:{styleOverrides:{root:{color:"inherit",minWidth:"auto",marginRight:e.spacing(2)}}},MuiListItemAvatar:{styleOverrides:{root:{minWidth:"auto",marginRight:e.spacing(2)}}},MuiListItemText:{styleOverrides:{root:{marginTop:0,marginBottom:0},multiline:{marginTop:0,marginBottom:0}}}}}(e),function(e){return{MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:e.palette.action.selected,"&:hover":{backgroundColor:e.palette.action.hover}}}}},MuiTableCell:{styleOverrides:{root:{borderBottom:"none"},head:{color:e.palette.text.secondary,backgroundColor:e.palette.background.neutral,"&:first-of-type":{paddingLeft:e.spacing(3),borderTopLeftRadius:e.shape.borderRadius,borderBottomLeftRadius:e.shape.borderRadius,boxShadow:`inset 8px 0 0 ${e.palette.background.paper}`},"&:last-of-type":{paddingRight:e.spacing(3),borderTopRightRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,boxShadow:`inset -8px 0 0 ${e.palette.background.paper}`}},stickyHeader:{backgroundColor:e.palette.background.paper,backgroundImage:`linear-gradient(to bottom, ${e.palette.background.neutral} 0%, ${e.palette.background.neutral} 100%)`},body:{"&:first-of-type":{paddingLeft:e.spacing(3)},"&:last-of-type":{paddingRight:e.spacing(3)}}}},MuiTablePagination:{styleOverrides:{root:{borderTop:`solid 1px ${e.palette.divider}`},toolbar:{height:64},select:{"&:focus":{borderRadius:e.shape.borderRadius}},selectIcon:{width:20,height:20,marginTop:2}}}}}(e),{MuiPaper:{defaultProps:{elevation:0},styleOverrides:{root:{backgroundImage:"none"}}}},function(e){const t="light"===e.palette.mode,a=a=>({color:e.palette[a][t?"darker":"lighter"],backgroundColor:e.palette[a][t?"lighter":"darker"],"& .MuiAlert-icon":{color:e.palette[a][t?"main":"light"]}}),n=t=>({color:e.palette[t].contrastText}),r=a=>({color:e.palette[a][t?"darker":"lighter"],border:`solid 1px ${e.palette[a][t?"light":"dark"]}`,backgroundColor:e.palette[a][t?"lighter":"darker"],"& .MuiAlert-icon":{color:e.palette[a][t?"main":"light"]}});return{MuiAlert:{defaultProps:{iconMapping:{error:Object(u.jsx)(k.a,{icon:qt.a}),info:Object(u.jsx)(k.a,{icon:Jt.a}),success:Object(u.jsx)(k.a,{icon:Yt.a}),warning:Object(u.jsx)(k.a,{icon:Kt.a})}},styleOverrides:{message:{"& .MuiAlertTitle-root":{marginBottom:e.spacing(.5)}},action:{"& button:not(:first-of-type)":{marginLeft:e.spacing(1)}},standardInfo:a("info"),standardSuccess:a("success"),standardWarning:a("warning"),standardError:a("error"),filledInfo:n("info"),filledSuccess:n("success"),filledWarning:n("warning"),filledError:n("error"),outlinedInfo:r("info"),outlinedSuccess:r("success"),outlinedWarning:r("warning"),outlinedError:r("error")}}}}(e),function(e){const t="light"===e.palette.mode;return{MuiSwitch:{styleOverrides:{thumb:{boxShadow:e.customShadows.z1},track:{opacity:1,backgroundColor:e.palette.grey[500]},switchBase:{left:0,right:"auto","&:not(:.Mui-checked)":{color:e.palette.grey[t?100:300]},"&.Mui-checked.Mui-disabled, &.Mui-disabled":{color:e.palette.grey[t?400:600]},"&.Mui-disabled+.MuiSwitch-track":{opacity:1,backgroundColor:`${e.palette.action.disabledBackground} !important`}}}}}}(e),{MuiSelect:{defaultProps:{IconComponent:ca.a},styleOverrides:{root:{}}}},function(e){return{MuiButton:{styleOverrides:{root:{"&:hover":{boxShadow:"none"}},sizeLarge:{height:48},containedInherit:{color:e.palette.grey[800],boxShadow:e.customShadows.z8,"&:hover":{backgroundColor:e.palette.grey[400]}},containedPrimary:{boxShadow:e.customShadows.primary},containedSecondary:{boxShadow:e.customShadows.secondary},containedInfo:{boxShadow:e.customShadows.info},containedSuccess:{boxShadow:e.customShadows.success},containedWarning:{boxShadow:e.customShadows.warning},containedError:{boxShadow:e.customShadows.error},outlinedInherit:{border:`1px solid ${e.palette.grey[50032]}`,"&:hover":{backgroundColor:e.palette.action.hover}},textInherit:{"&:hover":{backgroundColor:e.palette.action.hover}}}}}}(e),function(e){return{MuiRating:{defaultProps:{emptyIcon:oa,icon:oa},styleOverrides:{root:{"&.Mui-disabled":{opacity:.48}},iconEmpty:{color:e.palette.grey[50048]},sizeSmall:{"& svg":{...na}},sizeLarge:{"& svg":{...ra}}}}}}(e),function(e){return{MuiDialog:{styleOverrides:{paper:{boxShadow:e.customShadows.z24,"&.MuiPaper-rounded":{borderRadius:e.shape.borderRadiusMd},"&.MuiDialog-paperFullScreen":{borderRadius:0},"&.MuiDialog-paper .MuiDialogActions-root":{padding:e.spacing(3)},"@media (max-width: 600px)":{margin:e.spacing(2)},"@media (max-width: 663.95px)":{"&.MuiDialog-paperWidthSm.MuiDialog-paperScrollBody":{maxWidth:"100%"}}},paperFullWidth:{width:"100%"}}},MuiDialogTitle:{styleOverrides:{root:{padding:e.spacing(3,3,0)}}},MuiDialogContent:{styleOverrides:{root:{borderTop:0,borderBottom:0,padding:e.spacing(3)}}},MuiDialogActions:{styleOverrides:{root:{"& > :not(:first-of-type)":{marginLeft:e.spacing(1.5)}}}}}}(e),function(e){return{MuiAvatar:{styleOverrides:{colorDefault:{color:e.palette.text.secondary,backgroundColor:e.palette.grey[400]}}},MuiAvatarGroup:{styleOverrides:{avatar:{fontSize:16,fontWeight:e.typography.fontWeightMedium,"&:first-of-type":{fontSize:14,color:e.palette.primary.main,backgroundColor:e.palette.primary.lighter}}}}}}(e),function(e){const t="light"===e.palette.mode;return{MuiSlider:{defaultProps:{size:"small"},styleOverrides:{root:{"&.Mui-disabled":{color:e.palette.action.disabled}},markLabel:{fontSize:13,color:e.palette.text.disabled},valueLabel:{borderRadius:8,backgroundColor:e.palette.grey[t?800:700]}}}}}(e),function(e){const t="light"===e.palette.mode;return{MuiDrawer:{styleOverrides:{modal:{'&[role="presentation"]':{"& .MuiDrawer-paperAnchorLeft":{boxShadow:`8px 24px 24px 12px ${Object(O.a)(e.palette.grey[900],t?.16:.48)}`},"& .MuiDrawer-paperAnchorRight":{boxShadow:`-8px 24px 24px 12px ${Object(O.a)(e.palette.grey[900],t?.16:.48)}`}}}}}}}(e),{},function(e){return{MuiStepConnector:{styleOverrides:{line:{borderColor:e.palette.divider}}}}}(e),function(e){const t="light"===e.palette.mode;return{MuiTooltip:{styleOverrides:{tooltip:{backgroundColor:e.palette.grey[t?800:700]},arrow:{color:e.palette.grey[t?800:700]}}}}}(e),function(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z12}}}}}(e),{MuiSvgIcon:{styleOverrides:{fontSizeSmall:{width:20,height:20,fontSize:"inherit"},fontSizeLarge:{width:32,height:32,fontSize:"inherit"}}}},function(e){return{MuiCheckbox:{defaultProps:{icon:Object(u.jsx)(ha,{}),checkedIcon:Object(u.jsx)(xa,{}),indeterminateIcon:Object(u.jsx)(ja,{})},styleOverrides:{root:{padding:e.spacing(1),"&.Mui-checked.Mui-disabled, &.Mui-disabled":{color:e.palette.action.disabled},"& .MuiSvgIcon-fontSizeMedium":{width:24,height:24},"& .MuiSvgIcon-fontSizeSmall":{width:20,height:20},svg:{fontSize:24,"&[font-size=small]":{fontSize:20}}}}}}}(e),function(e){return{MuiDataGrid:{styleOverrides:{root:{borderRadius:0,border:"1px solid transparent","& .MuiTablePagination-root":{borderTop:0},"& .MuiDataGrid-toolbarContainer":{padding:e.spacing(2),backgroundColor:e.palette.background.neutral,"& .MuiButton-root":{marginRight:e.spacing(1.5),color:e.palette.text.primary,"&:hover":{backgroundColor:e.palette.action.hover}}},"& .MuiDataGrid-cell, .MuiDataGrid-columnsContainer":{borderBottom:`1px solid ${e.palette.divider}`},"& .MuiDataGrid-columnSeparator":{color:e.palette.divider},'& .MuiDataGrid-columnHeader[data-field="__check__"]':{padding:0}}}},MuiGridMenu:{styleOverrides:{root:{"& .MuiDataGrid-gridMenuList":{boxShadow:e.customShadows.z20,borderRadius:e.shape.borderRadius},"& .MuiMenuItem-root":{...e.typography.body2}}}},MuiGridFilterForm:{styleOverrides:{root:{padding:e.spacing(1.5,0),"& .MuiFormControl-root":{margin:e.spacing(0,.5)},"& .MuiInput-root":{marginTop:e.spacing(3),"&::before, &::after":{display:"none"},"& .MuiNativeSelect-select, .MuiInput-input":{...e.typography.body2,padding:e.spacing(.75,1),borderRadius:e.shape.borderRadius,backgroundColor:e.palette.background.neutral},"& .MuiSvgIcon-root":{right:4}}}}},MuiGridPanelFooter:{styleOverrides:{root:{padding:e.spacing(2),justifyContent:"flex-end","& .MuiButton-root":{"&:first-of-type":{marginRight:e.spacing(1.5),color:e.palette.text.primary,"&:hover":{backgroundColor:e.palette.action.hover}},"&:last-of-type":{color:e.palette.common.white,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark}}}}}}}}(e),function(e){return{MuiSkeleton:{defaultProps:{animation:"wave"},styleOverrides:{root:{backgroundColor:e.palette.background.neutral}}}}}(e),function(e){return{MuiTimelineDot:{styleOverrides:{root:{boxShadow:"none"}}},MuiTimelineConnector:{styleOverrides:{root:{backgroundColor:e.palette.divider}}}}}(e),function(e){return{MuiTreeView:{defaultProps:{defaultCollapseIcon:Object(u.jsx)(k.a,{icon:ua.a,...ga}),defaultExpandIcon:Object(u.jsx)(k.a,{icon:la.a,...ga}),defaultEndIcon:Object(u.jsx)(f.a,{component:k.a,icon:ba.a,...ga,sx:{color:"text.secondary"}})}},MuiTreeItem:{styleOverrides:{label:{...e.typography.body2},iconContainer:{width:"auto"}}}}}(e),function(e){const t=Object(O.a)(e.palette.grey[900],.48),a=Object(O.a)(e.palette.grey[900],1);return{MuiBackdrop:{styleOverrides:{root:{background:["rgb(22,28,36)",`-moz-linear-gradient(75deg, ${t} 0%, ${a} 100%)`,`-webkit-linear-gradient(75deg, ${t} 0%, ${a} 100%)`,`linear-gradient(75deg, ${t} 0%, ${a} 100%)`],"&.MuiBackdrop-invisible":{background:"transparent"}}}}}}(e),{MuiSnackbarContent:{styleOverrides:{root:{}}}},function(e){const t="light"===e.palette.mode;return{MuiLinearProgress:{styleOverrides:{root:{borderRadius:4,overflow:"hidden"},bar:{borderRadius:4},colorPrimary:{backgroundColor:e.palette.primary[t?"lighter":"darker"]},buffer:{backgroundColor:"transparent"}}}}}(e),{MuiContainer:{styleOverrides:{root:{}}}},function(e){return{MuiAccordion:{styleOverrides:{root:{"&.Mui-expanded":{boxShadow:e.customShadows.z8,borderRadius:e.shape.borderRadius},"&.Mui-disabled":{backgroundColor:"transparent"}}}},MuiAccordionSummary:{styleOverrides:{root:{paddingLeft:e.spacing(2),paddingRight:e.spacing(1),"&.Mui-disabled":{opacity:1,color:e.palette.action.disabled,"& .MuiTypography-root":{color:"inherit"}}},expandIconWrapper:{color:"inherit"}}}}}(e),{MuiIconButton:{styleOverrides:{root:{}}}},function(e){return{MuiTypography:{styleOverrides:{paragraph:{marginBottom:e.spacing(2)},gutterBottom:{marginBottom:e.spacing(1)}}}}}(e),function(e){return{MuiPaginationItem:{styleOverrides:{root:{"&.Mui-selected":{fontWeight:e.typography.fontWeightBold}},textPrimary:{"&.Mui-selected":{color:e.palette.primary.main,backgroundColor:Object(O.a)(e.palette.primary.main,.08),"&:hover, &.Mui-focusVisible":{backgroundColor:`${Object(O.a)(e.palette.primary.main,.24)} !important`}}},outlined:{border:`1px solid ${e.palette.grey[50032]}`},outlinedPrimary:{"&.Mui-selected":{backgroundColor:Object(O.a)(e.palette.primary.main,.08),border:`1px solid ${Object(O.a)(e.palette.primary.main,.24)}`}}}}}}(e),function(e){const t=t=>({props:{variant:"contained",color:t},style:{boxShadow:e.customShadows[t]}});return{MuiButtonGroup:{variants:[{props:{variant:"contained",color:"inherit"},style:{boxShadow:e.customShadows.z8}},t("primary"),t("secondary"),t("info"),t("success"),t("warning"),t("error"),{props:{disabled:!0},style:{boxShadow:"none","& .MuiButtonGroup-grouped.Mui-disabled":{color:e.palette.action.disabled,borderColor:`${e.palette.action.disabledBackground} !important`,"&.MuiButton-contained":{backgroundColor:e.palette.action.disabledBackground}}}}],styleOverrides:{root:{"&:hover":{boxShadow:"none"}}}}}}(e),function(e){return{MuiBreadcrumbs:{styleOverrides:{separator:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}}}}}(e),function(e){return{MuiAutocomplete:{styleOverrides:{paper:{boxShadow:e.customShadows.z20}}}}}(e),function(e){return{MuiFormControlLabel:{styleOverrides:{label:{...e.typography.body2}}},MuiFormHelperText:{styleOverrides:{root:{marginTop:e.spacing(1)}}},MuiFormLabel:{styleOverrides:{root:{color:e.palette.text.disabled}}}}}(e),function(e){const t="light"===e.palette.mode;return{MuiToggleButton:{styleOverrides:{root:{color:e.palette.grey[500],border:`solid 1px ${e.palette.grey[50032]}`,"&.Mui-selected":{color:e.palette.grey[t?600:0],backgroundColor:e.palette.action.selected},"&.Mui-disabled":{color:e.palette.grey[50048]}}}}}}(e),{MuiLoadingButton:{styleOverrides:{root:{"&.MuiButton-text":{"& .MuiLoadingButton-startIconPendingStart":{marginLeft:0},"& .MuiLoadingButton-endIconPendingEnd":{marginRight:0}}}}}})}const Oa=Tt.a.light.grey[500],fa="#000000",ya=e=>{const t=Object(O.a)(e,.2),a=Object(O.a)(e,.14),n=Object(O.a)(e,.12);return["none",`0px 2px 1px -1px ${t},0px 1px 1px 0px ${a},0px 1px 3px 0px ${n}`,`0px 3px 1px -2px ${t},0px 2px 2px 0px ${a},0px 1px 5px 0px ${n}`,`0px 3px 3px -2px ${t},0px 3px 4px 0px ${a},0px 1px 8px 0px ${n}`,`0px 2px 4px -1px ${t},0px 4px 5px 0px ${a},0px 1px 10px 0px ${n}`,`0px 3px 5px -1px ${t},0px 5px 8px 0px ${a},0px 1px 14px 0px ${n}`,`0px 3px 5px -1px ${t},0px 6px 10px 0px ${a},0px 1px 18px 0px ${n}`,`0px 4px 5px -2px ${t},0px 7px 10px 1px ${a},0px 2px 16px 1px ${n}`,`0px 5px 5px -3px ${t},0px 8px 10px 1px ${a},0px 3px 14px 2px ${n}`,`0px 5px 6px -3px ${t},0px 9px 12px 1px ${a},0px 3px 16px 2px ${n}`,`0px 6px 6px -3px ${t},0px 10px 14px 1px ${a},0px 4px 18px 3px ${n}`,`0px 6px 7px -4px ${t},0px 11px 15px 1px ${a},0px 4px 20px 3px ${n}`,`0px 7px 8px -4px ${t},0px 12px 17px 2px ${a},0px 5px 22px 4px ${n}`,`0px 7px 8px -4px ${t},0px 13px 19px 2px ${a},0px 5px 24px 4px ${n}`,`0px 7px 9px -4px ${t},0px 14px 21px 2px ${a},0px 5px 26px 4px ${n}`,`0px 8px 9px -5px ${t},0px 15px 22px 2px ${a},0px 6px 28px 5px ${n}`,`0px 8px 10px -5px ${t},0px 16px 24px 2px ${a},0px 6px 30px 5px ${n}`,`0px 8px 11px -5px ${t},0px 17px 26px 2px ${a},0px 6px 32px 5px ${n}`,`0px 9px 11px -5px ${t},0px 18px 28px 2px ${a},0px 7px 34px 6px ${n}`,`0px 9px 12px -6px ${t},0px 19px 29px 2px ${a},0px 7px 36px 6px ${n}`,`0px 10px 13px -6px ${t},0px 20px 31px 3px ${a},0px 8px 38px 7px ${n}`,`0px 10px 13px -6px ${t},0px 21px 33px 3px ${a},0px 8px 40px 7px ${n}`,`0px 10px 14px -6px ${t},0px 22px 35px 3px ${a},0px 8px 42px 7px ${n}`,`0px 11px 14px -7px ${t},0px 23px 36px 3px ${a},0px 9px 44px 8px ${n}`,`0px 11px 15px -7px ${t},0px 24px 38px 3px ${a},0px 9px 46px 8px ${n}`]},va=e=>{const t=Object(O.a)(e,.24);return{z1:`0 1px 2px 0 ${t}`,z8:`0 8px 16px 0 ${t}`,z12:`0 0 2px 0 ${t}, 0 12px 24px 0 ${t}`,z16:`0 0 2px 0 ${t}, 0 16px 32px -4px ${t}`,z20:`0 0 2px 0 ${t}, 0 20px 40px -4px ${t}`,z24:`0 0 4px 0 ${t}, 0 24px 48px 0 ${t}`,primary:`0 8px 16px 0 ${Object(O.a)(Tt.a.light.primary.main,.24)}`,secondary:`0 8px 16px 0 ${Object(O.a)(Tt.a.light.secondary.main,.24)}`,info:`0 8px 16px 0 ${Object(O.a)(Tt.a.light.info.main,.24)}`,success:`0 8px 16px 0 ${Object(O.a)(Tt.a.light.success.main,.24)}`,warning:`0 8px 16px 0 ${Object(O.a)(Tt.a.light.warning.main,.24)}`,error:`0 8px 16px 0 ${Object(O.a)(Tt.a.light.error.main,.24)}`}},_a={light:va(Oa),dark:va(fa)};var wa={light:ya(Oa),dark:ya(fa)};function ka(e){let{children:t}=e;const{themeMode:a,themeDirection:n}=Object(zt.a)(),r="light"===a,i=Object(o.useMemo)((()=>({palette:r?{...Tt.a.light,mode:"light"}:{...Tt.a.dark,mode:"dark"},shape:Bt,typography:Nt,breakpoints:Wt,direction:n,shadows:r?wa.light:wa.dark,customShadows:r?_a.light:_a.dark})),[r,n]),c=Object($t.a)(i);return c.components=ma(c),Object(u.jsx)(Rt.a,{injectFirst:!0,children:Object(u.jsxs)(Lt.a,{theme:c,children:[Object(u.jsx)(Ft.a,{}),t]})})}function Sa(){const e=Object(d.a)();return Object(u.jsx)(pe.a,{styles:{"*":{margin:0,padding:0,boxSizing:"border-box"},html:{width:"100%",height:"100%",WebkitOverflowScrolling:"touch"},body:{width:"100%",height:"100%"},"#root":{width:"100%",height:"100%"},input:{"&[type=number]":{MozAppearance:"textfield","&::-webkit-outer-spin-button":{margin:0,WebkitAppearance:"none"},"&::-webkit-inner-spin-button":{margin:0,WebkitAppearance:"none"}}},textarea:{"&::-webkit-input-placeholder":{color:e.palette.text.disabled},"&::-moz-placeholder":{opacity:1,color:e.palette.text.disabled},"&:-ms-input-placeholder":{color:e.palette.text.disabled},"&::placeholder":{color:e.palette.text.disabled}},img:{display:"block",maxWidth:"100%"},".blur-up":{WebkitFilter:"blur(5px)",filter:"blur(5px)",transition:"filter 400ms, -webkit-filter 400ms"},".blur-up.lazyloaded ":{WebkitFilter:"blur(0)",filter:"blur(0)"}}})}function Ca(){const{pathname:e}=Object(x.m)();return Object(o.useEffect)((()=>{window.scrollTo(0,0)}),[e]),null}function Ea(e){let{children:t}=e;const a=Object(d.a)(),{setColor:n}=Object(zt.a)(),r=Object(o.useMemo)((()=>({...a,palette:{...a.palette,primary:n},customShadows:{...a.customShadows,primary:`0 8px 16px 0 ${Object(O.a)(n.main,.24)}`}})),[n,a]),i=Object($t.a)(r);return i.components=ma(i),Object(u.jsx)(Lt.a,{theme:i,children:t})}function Ma(){const e=Object(d.a)(),t="light"===e.palette.mode;return Object(u.jsx)(pe.a,{styles:{"#root":{"& .SnackbarContent-root":{width:"100%",padding:e.spacing(1.5),margin:e.spacing(.25,0),boxShadow:e.customShadows.z8,borderRadius:e.shape.borderRadius,color:e.palette.grey[t?0:800],backgroundColor:e.palette.grey[t?900:0],"&.SnackbarItem-variantSuccess, &.SnackbarItem-variantError, &.SnackbarItem-variantWarning, &.SnackbarItem-variantInfo":{color:e.palette.text.primary,backgroundColor:e.palette.background.paper}},"& .SnackbarItem-message":{padding:"0 !important",fontWeight:e.typography.fontWeightMedium},"& .SnackbarItem-action":{marginRight:0,color:e.palette.action.active,"& svg":{width:20,height:20}}}}})}function Aa(e){let{icon:t,color:a}=e;return Object(u.jsx)(f.a,{component:"span",sx:{mr:1.5,width:40,height:40,display:"flex",borderRadius:1.5,alignItems:"center",justifyContent:"center",color:`${a}.main`,bgcolor:e=>Object(O.a)(e.palette[a].main,.16)},children:Object(u.jsx)(k.a,{icon:t,width:24,height:24})})}function Ia(e){let{children:t}=e;return Object(u.jsxs)(u.Fragment,{children:[Object(u.jsx)(Ma,{}),Object(u.jsx)(Je.a,{dense:!0,maxSnack:5,autoHideDuration:3e3,anchorOrigin:{vertical:"top",horizontal:"right"},iconVariant:{success:Object(u.jsx)(Aa,{icon:Yt.a,color:"success"}),error:Object(u.jsx)(Aa,{icon:qt.a,color:"error"}),warning:Object(u.jsx)(Aa,{icon:Kt.a,color:"warning"}),info:Object(u.jsx)(Aa,{icon:Jt.a,color:"info"})},children:t})]})}function Fa(){const{isInitialized:e}=Object(Y.a)();return Object(u.jsx)(ka,{children:Object(u.jsx)(Ea,{children:Object(u.jsxs)(Ia,{children:[Object(u.jsx)(Sa,{}),Object(u.jsx)(ge,{}),Object(u.jsx)(Ca,{}),e?Object(u.jsx)(Xe,{}):Object(u.jsx)(xe,{})]})})})}var $a=e=>{e&&e instanceof Function&&a.e(43).then(a.bind(null,889)).then((t=>{let{getCLS:a,getFID:n,getFCP:r,getLCP:o,getTTFB:i}=t;a(e),n(e),r(e),o(e),i(e)}))};r.a.render(Object(u.jsx)(o.StrictMode,{children:Object(u.jsx)(c.b,{children:Object(u.jsx)(h.b,{children:Object(u.jsx)(s.b,{children:Object(u.jsx)(g,{children:Object(u.jsx)(i.a,{children:Object(u.jsx)(Fa,{})})})})})})}),document.getElementById("root")),$a()},77:function(e,t,a){"use strict";a.d(t,"b",(function(){return s})),a.d(t,"a",(function(){return p}));var n=a(0),r=(a(42),a(774),a(1));a(173),a(24);var o=a(171);a(423),a(102),a(772);o.a;a(787);var i=a(158);var c=a(788);var s=Object(n.forwardRef)(((e,t)=>{let{children:a,...n}=e;return Object(r.jsx)(i.a,{sx:{},children:Object(r.jsx)(c.a,{ref:t,...n,children:a})})})),l=a(7),d=a.n(l),u=a(749);function p(e){let{width:t,children:a}=e;const n=t.substring(0,2),r=Object(u.a)((e=>e.breakpoints.up(n))),o=Object(u.a)((e=>e.breakpoints.down(n)));return t.includes("Down")?o?null:a:t.includes("Up")?r?null:a:null}p.propTypes={children:d.a.node,width:d.a.oneOf(["xsDown","smDown","mdDown","lgDown","xlDown","xsUp","smUp","mdUp","lgUp","xlUp"]).isRequired}},93:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(171),r=a(1);function o(e){let{sx:t}=e;return Object(r.jsx)(n.a,{sx:{width:40,height:40,...t},children:Object(r.jsx)("svg",{version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 100 100",style:{enableBackground:"new 0 0 100 100"},children:Object(r.jsx)("polygon",{style:{fill:"#593B8C"},points:"49.7,66.6 32.6,37.6 43.4,37.6 53.1,57.2 47.5,57 55.9,37.6 66.1,37.6 49.9,66.6 "})})})}}},[[682,4,5]]]);
//# sourceMappingURL=main.f3701f20.chunk.js.map