1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9810],{4180:function(e,n){n.Z={src:"/_next/static/media/samu-giken.1bf2ec60.webp",height:549,width:1920,blurDataURL:"data:image/webp;base64,UklGRmQAAABXRUJQVlA4WAoAAAAQAAAABwAAAQAAQUxQSBEAAAAAGjk6MjtENBAZNi4qQzcvCgBWUDggLAAAAJABAJ0BKggAAgACQDgloAJ0ugADmAD+6ez/dAAp+z/+0s/+pZ/9Sz/NAAAA",blurWidth:8,blurHeight:2}},49810:function(e,n,t){t.d(n,{Z:function(){return B}});var r=t(52676),i=t(75271),l=t(46035),o=t(33022),a=t(40150),s=t(28994),d=t(85304),c=t(4180),u=t(16624),h=t(27026),x=t.n(h),m=t(78051),f=t(98807),p=t(15036),v=t(32623),g=t.n(v);let A=e=>{let{isMobile:n,isDrawerOpen:t,setIsDrawerOpen:i,collapsed:l,setCollapsed:o,fullName:a}=e,{logout:s}=(0,d.a)();return(0,r.jsxs)("div",{style:{borderBottom:"1px solid #e8e8e8",position:"fixed",width:"100%",zIndex:100},className:"flex items-center justify-between h-16 px-6 bg-white",children:[(0,r.jsxs)("div",{className:"flex items-center h-full gap-2",children:[(0,r.jsx)(m.ZP,{onClick:()=>{n?i(!t):o(!l)},"aria-controls":"sidebar",className:"flex items-center justify-center w-8 px-1 py-0",icon:(0,r.jsx)("svg",{className:"w-5 h-5 text-gray-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h6a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z",clipRule:"evenodd"})})}),!n&&(0,r.jsx)(x(),{href:"/",className:"h-full",children:(0,r.jsx)(g(),{src:c.Z,alt:"Samugiken",className:"w-[100%] h-[60px]"})})]}),(0,r.jsx)("div",{className:"flex items-center justify-center",children:(0,r.jsx)("div",{className:"flex items-center justify-center col-row",children:(0,r.jsx)(f.Z,{arrow:!0,placement:"bottomRight",overlayClassName:"shadow-[rgba(0,0,0,0.35)_0_5px_15px] rounded-xl top-10",trigger:["click"],dropdownRender:()=>(0,r.jsxs)("div",{className:"flex flex-col p-3 bg-white rounded-md shadow-md gap-y-1",children:[(0,r.jsx)(x(),{href:"/my-profile",className:"font-medium leading-[normal] text-primary hover:text-primary",children:(0,r.jsx)("div",{className:"cursor-pointer rounded-[4px] p-3 duration-100 hover:bg-primary/10",children:"My Profile"})}),(0,r.jsx)(p.Z,{className:"!my-2"}),(0,r.jsx)(m.ZP,{type:"primary",danger:!0,onClick:s,children:"Logout"})]}),children:(0,r.jsxs)("div",{className:"flex items-center cursor-pointer gap-x-3",children:[(0,r.jsx)("div",{className:"flex items-center gap-2 ml-2",children:(0,r.jsx)("span",{className:"font-semibold",children:a})}),(0,r.jsx)(u.ZP,{name:a,round:!0,maxInitials:1,size:"35",textSizeRatio:2,fgColor:"white",color:"black"})]})})})})]})};var N=t(73640),y=t(62581),R=t(26134),j=t(1952),w=t(7144),E=t(42439),b=t(88483),C=t(42720),Z=t(43146),k=t(57221),O=t(84176),D=t(54216),T=t(12285),S=t(20188),_=t(19254);let I=e=>{var n,t,l,o,a,s,c,u,h,m,f;let{activeMenu:p,activeDropdown:v}=e,[g,A]=(0,i.useState)(p),{user:I}=(0,d.a)(),U=null==I?void 0:I.role.accessRights,P=e=>{A([e])},M=[{key:"dashboard",label:(0,r.jsx)(x(),{href:y.Z.ADMIN_DASHBOARD,children:"Dashboard"}),icon:(0,r.jsx)(j.Z,{width:16,height:16}),onClick:()=>P("dashboard")},...(0,R.f)(null==U?void 0:null===(n=U.PRODUCT)||void 0===n?void 0:n.READ,[{key:"product",label:(0,r.jsx)(x(),{href:y.Z.PRODUCT,children:"Product"}),icon:(0,r.jsx)(w.Z,{width:16,height:16}),onClick:()=>P("product")}]),...(0,R.f)(null==U?void 0:null===(t=U.REVIEW)||void 0===t?void 0:t.READ,[{key:"review",label:(0,r.jsx)(x(),{href:y.Z.REVIEW,children:"Reviews"}),icon:(0,r.jsx)(E.Z,{width:16,height:16}),onClick:()=>P("review")}]),...(0,R.f)(null==U?void 0:null===(l=U.WARRANTY)||void 0===l?void 0:l.READ,[{key:"warranty",label:"Warranty",icon:(0,r.jsx)(_.Z,{width:16,height:16}),children:[{key:"warranty-register",label:(0,r.jsx)(x(),{href:y.Z.WARRANTY_REGISTER,children:"Warranty Register"}),onClick:()=>P("warranty-register")},{key:"warranty-claim",label:(0,r.jsx)(x(),{href:y.Z.WARRANTY_CLAIM,children:"Warranty Claim"}),onClick:()=>P("warranty-claim")}]}]),...(0,R.f)(null==U?void 0:null===(o=U.COUPON)||void 0===o?void 0:o.READ,[{key:"c
1oupon",label:(0,r.jsx)(x(),{href:y.Z.COUPON,children:"Coupon"}),icon:(0,r.jsx)(b.Z,{width:16,height:16}),onClick:()=>P("coupon")}]),...(0,R.f)(null==U?void 0:null===(a=U.ORDER)||void 0===a?void 0:a.READ,[{key:"order",label:(0,r.jsx)(x(),{href:y.Z.ORDER,children:"Orders"}),icon:(0,r.jsx)(_.Z,{width:16,height:16}),onClick:()=>P("order")},{key:"abandonment",label:(0,r.jsx)(x(),{href:y.Z.ABANDONMENT,children:"Abandonment"}),icon:(0,r.jsx)(C.Z,{width:16,height:16}),onClick:()=>P("abandonment")}]),...(0,R.f)(null==U?void 0:null===(s=U.BLOG)||void 0===s?void 0:s.READ,[{key:"blog",label:(0,r.jsx)(x(),{href:y.Z.BLOG,children:"Blog"}),icon:(0,r.jsx)(Z.Z,{width:16,height:16}),onClick:()=>P("blog")}]),...(0,R.f)(null==U?void 0:null===(c=U.OUR_PARTNERS)||void 0===c?void 0:c.READ,[{key:"our-partners",label:(0,r.jsx)(x(),{href:y.Z.OUR_PARTNERS,children:"Our Partners"}),icon:(0,r.jsx)(k.Z,{width:16,height:16}),onClick:()=>P("our-partners")}]),...(0,R.f)(null==U?void 0:null===(u=U.CONTENT_MANAGEMENT)||void 0===u?void 0:u.READ,[{key:"content",label:"Content Management",icon:(0,r.jsx)(O.Z,{width:16,height:16}),children:[{key:"content-banners",label:(0,r.jsx)(x(),{href:y.Z.CONTENT_BANNER,children:"Banners"}),onClick:()=>P("content-banners")},{key:"content-reviews",label:(0,r.jsx)(x(),{href:y.Z.CONTENT_REVIEW,children:"Customer Reviews"}),onClick:()=>P("content-reviews")},{key:"content-videos",label:(0,r.jsx)(x(),{href:y.Z.CONTENT_VIDEO,children:"Product Videos"}),onClick:()=>P("content-videos")},{key:"content-popups",label:(0,r.jsx)(x(),{href:y.Z.CONTENT_POPUP,children:"Popups"}),onClick:()=>P("content-popups")}]}]),...(0,R.f)(null==U?void 0:null===(h=U.USER)||void 0===h?void 0:h.READ,[{key:"user",label:(0,r.jsx)(x(),{href:y.Z.USER,children:"User"}),icon:(0,r.jsx)(D.Z,{width:16,height:16}),onClick:()=>P("user")}]),...(0,R.f)(null==U?void 0:null===(m=U.ROLE)||void 0===m?void 0:m.READ,[{key:"role",label:(0,r.jsx)(x(),{href:y.Z.ROLE,children:"Role"}),icon:(0,r.jsx)(T.Z,{width:16,height:16}),onClick:()=>P("role")}]),...(0,R.f)(null==U?void 0:null===(f=U["SYSTEM_CONFIG/CATEGORY"])||void 0===f?void 0:f.READ,[{key:"system-config",label:(0,r.jsx)(x(),{href:y.Z.SYSTEM_CONFIG,children:"System Config"}),icon:(0,r.jsx)(S.Z,{width:16,height:16}),onClick:()=>P("category")}])];return(0,r.jsx)(N.Z,{theme:"light",mode:"inline",defaultOpenKeys:v||[],defaultSelectedKeys:g,items:M,className:"h-full font-medium"})};var U=t(63309);let{Sider:P,Content:M}=o.default;var B=e=>{let{children:n,user:t,activeMenu:u=[],activeDropdown:h=[],seoConfig:x,withPadding:m=!0,card:f=!0,contentClassName:p}=e,v=(0,s.ac)("(max-width: 768px)"),[N,y]=(0,i.useState)(!1),[R,j]=(0,i.useState)(!1);return(0,r.jsx)(d.H,{user:t,children:(0,r.jsxs)(o.default,{className:"!min-h-screen",children:[(0,r.jsx)(l.PB,{...x}),(0,r.jsx)(A,{isMobile:v,isDrawerOpen:R,setIsDrawerOpen:j,collapsed:N,setCollapsed:y,fullName:(null==t?void 0:t.firstName)+" "+(null==t?void 0:t.lastName)||""}),(0,r.jsx)("div",{className:"mt-[64px]"}),(0,r.jsxs)(o.default,{hasSider:!0,style:{minHeight:"100%"},children:[v?(0,r.jsx)(a.Z,{placement:"left",open:R,onClose:()=>j(!1),width:"250px",styles:{body:{padding:0}},closable:!1,children:(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("div",{className:"py-2",children:(0,r.jsx)(g(),{src:c.Z,alt:"Samugiken",className:"w-[100%] h-[70px]"})}),(0,r.jsx)(I,{activeMenu:u,activeDropdown:h})]})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:N?"duration-200 ml-[80px]":"duration-200 ml-[250px]"}),(0,r.jsx)(P,{trigger:null,collapsible:!0,collapsed:N,theme:"light",width:250,className:"hide-scrollbar",style:{overflow:"scroll",position:"fixed",marginTop:"64px",left:0,top:0,bottom:0,zIndex:100},children:(0,r.jsx)(I,{activeMenu:u,activeDropdown:h})})]}),(0,r.jsx)(M,{className:(0,U.cn)("min-h-full",m&&"px-3 py-5 md:p-9"),children:(0,r.jsx)("div",{className:(0,U.cn)(f&&"rounded-lg bg-white p-8 shadow-sm",p),children:n})})]})]})})}},5409:function(e,n,t){t.d(n,{J:function(){return a}});var r=t(15989),i=t(39771),l=t(91340);let o=r.Z.create({baseURL:i.T5+"/api",headers:{"Content-Type":"application/json"},withCredentials:!0});o.interceptors.request.use(e=>{if((0,l.rD)()){let n=(0,l.Zd)();n&&(e.headers=e.headers||{},e.headers["x-session-id"]=n)}else e.headers&&e.headers["x-session-id"]&&delete e.headers["x-session-id"];return e});let a=r.Z.create({baseURL:i.T5+"/api",headers:{"Content-Type":"multipart/form-data"},maxContentLength:1/0,maxBodyLength:1/0,withCredentials:!0});n.Z=o},85304:function(e,n,t){t.d(n,{H:function(){return x},a:function(){return m}});var r=t(52676),i=t(75271),l=t(76517),o=t(73414),a=t(71030),s=t(83214),d=t(62581),c=t(69504),u=t(91340);let h=(0,i.createContext)(null),x=e=>{let{children:n,user:t}=e,x=(0,o.useRouter)(),{mutate:m}=(0,a.D)({mutationFn:c.kS,onError:e=>l.Am.error((0,s._g)(e)),onSuccess:()=>{x.push(d.Z.LOGIN)}});return(0,i.useEffect)(()=>{t?(0,u.hv)():(0,u.wN)()},[t]),(0,r.jsx)(h.Provider,{value:{user:t,logout:m},children:n})},m=()=>{let e=(0,i.useContext)(h);if(!e)throw Error("useAuth must be used within a AuthProvider");return e}},69504:function(e,n,t){t.d(n,{A9:function(){return d},IU:function(){return l},c0:function(){return s},kS:function(){return o},o9:function(){return a},x4:function(){return i}});var r=t(5409);let i=async e=>r.Z.post("/auth/login",e),l=async e=>r.Z.post("/auth/signup",e),o=async()=>r.Z.post("/auth/logout"),a=async e=>r.Z.post("/auth/forget-password",e),s=async e=>r.Z.post("/auth/password-reset/confirm",e),d=async e=>r.Z.post("/auth/verify-user",e)},62581:function(e,n,t){var r,i;t.d(n,{Z:function(){return r}}),(i=r||(r={})).LOGIN="/login",i.ADMIN_DASHBOARD="/admin/dashboard",i.HOME="/",i.USER="/admin/user",i.ROLE="/admin/role",i.NEW_ROLE="/admin/role/new",i.SYSTEM_CONFIG="/admin/system-config",i.PRODUCT="/admin/product",i.BLOG="/admin/blog",i.ORDER="/admin/order",i.ABANDONMENT="/admin/abandonment",i.WARRANTY_REGISTER="/admin/warranty-register",i.WARRANTY_CLAIM="/admin/warranty-claim",i.COUPON="/admin/coupon",i.OUR_PARTNERS="/admin/our-partners",i.REVIEW="/admin/review",i.CONTENT_BANNER="/admin/content/banners",i.CONTENT_REVIEW="/admin/content/reviews",i.CONTENT_VIDEO="/admin/content/videos",i.CONTENT_POPUP="/admin/content/popups"},26134:function(e,n,t){t.d(n,{f:function(){return r}});let r=(e,n,t)=>void 0===n?void 0!==t?t:Array.isArray(n)?[]:{}:e?n:void 0!==t?t:Array.isArray(n)?[]:{}},83214:function(e,n,t){t.d(n,{_g:function(){return l},i$:function(){return o}});var r=t(52043),i=t.n(r);let l=e=>{if("response"in e){var n,t;return null===(t=e.response)||void 0===t?void 0:null===(n=t.data)||void 0===n?void 0:n.message}return e.message},o=(e,n)=>{let t=i()(e);return e&&t.isValid()?i()(e).format("DD MMM YYYY, hh:mm a"):n||null}},91340:function(e,n,t){t.d(n,{Zd:function(){return l},hv:function(){return a},rD:function(){return s},wN:function(){return o}});let r="session_id",i="session_header_enabled";function l(){try{let e=localStorage.getItem(r);if(e&&e.length>0)return e;let n="undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():d();return localStorage.setItem(r,n),n}catch(e){return d()}}function o(){try{localStorage.setItem(i,"1")}catch(e){}}function a(){try{localStorage.setItem(i,"0"),localStorage.removeItem(r)}catch(e){}}function s(){try{return"1"===localStorage.getItem(i)}catch(e){return!1}}function d(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.