(function(){var e={494:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(8111),n(3579);var o=n(1387),r=[{path:"/",redirect:"/products",meta:{title:"محصولات"}},{path:"/forgot-password-v1",name:"forgot-password-v1",meta:{title:"فراموشی رمز عبور"},component:()=>Promise.all([n.e(9891),n.e(6379)]).then(n.bind(n,6379))},{path:"/users",name:"users",meta:{title:"کاربران",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(8626),n.e(2348)]).then(n.bind(n,6595))},{path:"/countries",name:"countries",meta:{title:"کشورها",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(8626),n.e(1203)]).then(n.bind(n,742))},{path:"/brands",name:"brands",meta:{title:"برند ها",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(7353)]).then(n.bind(n,428))},{path:"/cats",name:"cats",meta:{title:"دسته ها",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(8077),n.e(1521)]).then(n.bind(n,900))},{path:"/attributes",name:"attributes",meta:{title:"ویژگی ها",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(518),n.e(1756)]).then(n.bind(n,6863))},{path:"/attributes-value/:id",name:"attributes-value",meta:{title:"مقدار ویژگی",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(5768)]).then(n.bind(n,1919))},{path:"/blogCat",name:"blogCat",meta:{title:"دسته ها",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(2983)]).then(n.bind(n,7626))},{path:"/blogs",name:"blogs",meta:{title:"بلاگ",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(5923)]).then(n.bind(n,9302))},{path:"/addBlog",name:"addBlog",meta:{title:"ایجاد بلاگ",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(8346),n.e(7882),n.e(8880)]).then(n.bind(n,8880))},{path:"/editBlog/:id",name:"editBlog",meta:{title:"ویرایش بلاگ",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(8346),n.e(7882),n.e(2482)]).then(n.bind(n,2482))},{path:"/products",name:"products",meta:{title:"محصولات",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(8346),n.e(7285)]).then(n.bind(n,4920))},{path:"/addProduct",name:"addProduct",meta:{title:"محصولات",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(8346),n.e(5404),n.e(8077),n.e(6215),n.e(518),n.e(1353)]).then(n.bind(n,9734))},{path:"/editProduct/:id",name:"editProduct",meta:{title:"محصولات",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(8346),n.e(5404),n.e(8077),n.e(6215),n.e(7282)]).then(n.bind(n,4729))},{path:"/discounts",name:"discounts",meta:{title:"تخفیف ها",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(8346),n.e(5053)]).then(n.bind(n,7648))},{path:"/addDiscount",name:"addDiscount",meta:{title:"تخفیف ها",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(8346),n.e(5404),n.e(502)]).then(n.bind(n,4141))},{path:"/editDiscount/:id",name:"editDiscount",meta:{title:"تخفیف ها",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(8346),n.e(5404),n.e(3226)]).then(n.bind(n,2993))},{path:"/orders",name:"orders",meta:{title:"سفارسات",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(5894)]).then(n.bind(n,2842))},{path:"/allOrdersItems",name:"allOrdersItems",meta:{title:"سفارسات",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(6714)]).then(n.bind(n,5057))},{path:"/singleOrder/:id",name:"singleOrder",meta:{title:"سفارسات",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(6196)]).then(n.bind(n,8387))},{path:"/approvedOrders",name:"approvedOrders",meta:{title:"سفارسات",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(8346),n.e(5404),n.e(966)]).then(n.bind(n,3405))},{path:"/comments",name:"comments",meta:{title:"نظرات",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(8346),n.e(1321)]).then(n.bind(n,7692))},{path:"/faqs",name:"faqs",meta:{title:"پرسش و پاسخ",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(1105)]).then(n.bind(n,5908))},{path:"/editFaqs/:id",name:"editFaqs",meta:{title:"پرسش و پاسخ",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7571)]).then(n.bind(n,5718))},{path:"/profile",name:"profile",meta:{title:"پروفایل",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(8575),n.e(4860)]).then(n.bind(n,4403))},{path:"/address",name:"address",meta:{title:"پروفایل",requiresAuth:!0},component:()=>Promise.all([n.e(1856),n.e(8575),n.e(3357)]).then(n.bind(n,3357))},{path:"/banners",name:"banners",meta:{title:"بنر ",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(9998)]).then(n.bind(n,1653))},{path:"/addBanner",name:"addBanner",meta:{title:"بنر ",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(8346),n.e(3355)]).then(n.bind(n,8250))},{path:"/editBanner/:id",name:"editBanner",meta:{title:"بنر ",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(8346),n.e(1919)]).then(n.bind(n,9334))},{path:"/idenities",name:"idenities",meta:{title:"مشخضات",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(8346),n.e(8077),n.e(704)]).then(n.bind(n,1495))},{path:"/calls",name:"calls",meta:{title:"پیگیری ها",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(6085)]).then(n.bind(n,2488))},{path:"/settings",name:"settings",meta:{title:"تنظیمات",requiresAuth:!0},component:()=>Promise.all([n.e(9891),n.e(1856),n.e(3662),n.e(7366),n.e(5404),n.e(7882),n.e(5153)]).then(n.bind(n,5153))},{path:"/otpLogin",name:"otpLogin",meta:{title:"ورود"},component:()=>Promise.all([n.e(9891),n.e(351)]).then(n.bind(n,351))},{path:"/login-v2",name:"login-v2",meta:{title:"ورود"},component:()=>n.e(9090).then(n.bind(n,9090))},{path:"/forgot-password-v2",name:"forgot-password-v2",meta:{title:"فراموشی رمز"},component:()=>Promise.all([n.e(9891),n.e(8536)]).then(n.bind(n,8536))},{path:"/reset-password-v2",name:"reset-password-v2",meta:{title:"بازنشانی رمز"},component:()=>n.e(6934).then(n.bind(n,6934))},{path:"/:pathMatch(.*)*",redirect:"/error-404"},{path:"/error-404",name:"error-404",meta:{title:"404"},component:()=>Promise.all([n.e(9891),n.e(3794)]).then(n.bind(n,1642))},{path:"/connection-lost",name:"connection-lost",meta:{title:"Connection Lost"},component:()=>Promise.all([n.e(9891),n.e(5888)]).then(n.bind(n,5888))},{path:"/under-construction",name:"under-construction",meta:{title:"Under Construction"},component:()=>Promise.all([n.e(9891),n.e(1260)]).then(n.bind(n,4253))},{path:"/comming-soon",name:"comming-soon",meta:{title:"Comming Soon"},component:()=>Promise.all([n.e(9891),n.e(7202)]).then(n.bind(n,7170))}],a={D:"TruckShop"};const i=(0,o.aE)({history:(0,o.LA)("/panel"),routes:r});i.beforeResolve((async(e,t,n)=>{try{e.matched.some((e=>e.meta.requiresAuth));for(const o of e.matched)await new Promise(((r,a)=>{o.meta&&o.meta.beforeResolve?o.meta.beforeResolve(e,t,((...e)=>{e.length?(n(...e),a(new Error("Redirected"))):r()})):r()}))}catch(o){return}document.title=e.meta.title+" | "+a.D,n()}));var s=i},634:function(e,t,n){var o={"./layout.js":7581,"./user.js":6596};function r(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=a,e.exports=r,r.id=634},6596:function(e,t,n){"use strict";n.r(t),n.d(t,{actions:function(){return d},getters:function(){return l},mutations:function(){return c}});var o=n(4373),r=n(4874),a=n.n(r);const i="http://85.208.254.227/api/v1/",s={user:null,loading:!1,token:null,isAuthenticated:!1},c={SET_USER(e,t){t?(e.user=t,e.isAuthenticated=!0):(e.user=null,e.isAuthenticated=!1)},SET_TOKEN(e,t){e.token=t},LOGOUT(e){e.user=null,e.token=null,e.isAuthenticated=!1,localStorage.removeItem("token"),localStorage.removeItem("user_profile")},SET_LOADING(e,t){e.loading=t}},d={async loginUser({commit:e},t){try{const{data:n}=await o.A.post(`${i}auth/admin/login`,t,{headers:{"Content-Type":"application/json"}});if(!n)throw new Error("شماره موبایل یا رمز عبور اشتباه است");if("admin"!==n?.data?.user?.role&&"operator"!==n?.data?.user?.role)throw new Error("شماره موبایل یا رمز عبور اشتباه است");e("SET_TOKEN",n.data.token),localStorage.setItem("token",n.data.token),localStorage.setItem("user_profile",JSON.stringify(n.data.user))}catch(n){throw console.error("Login failed:",n.response?.data||n.message),new Error(n.response?.data?.message||"ورود با مشکل مواجه شد ...! لطفا دوباره امتحان کنید")}finally{e("SET_LOADING",!1)}},async verifyOtp({commit:e},{mobile:t,otpCode:n}){try{const r=await o.A.post(`${i}auth/verify-otp`,{mobile:t,otp:n},{headers:{"Content-Type":"application/json"}});if(r.data.success){const t=r?.data?.data?.token,n=r?.data?.data?.user;if("admin"===n?.role||"operator"===n?.role)return localStorage.setItem("token",t),localStorage.setItem("user_profile",JSON.stringify(n)),e("SET_TOKEN",t),e("SET_USER",n),r.data;throw new Error("شماره موبایل یا رمز عبور نامعتبر است")}{const e=r.data.message||"خطا در تایید کد";throw new Error(e)}}catch(r){throw a().fire({icon:"error",text:`${r?.response?.data?.message}`,confirmButtonText:"باشه"}),new Error(r.response?.data?.message||"ورود با مشکل مواجه شد ...! لطفا دوباره امتحان کنید")}},async resetPassword({state:e},{newPassword:t,confirmPassword:n}){if(t!==n)throw new Error("رمز عبور و تکرار آن یکسان نیستند");console.log("asdad",e.token);const r=e.token;if(!r)throw new Error("توکن معتبر یافت نشد، لطفاً دوباره وارد شوید.");try{const e=await o.A.post(`${i}auth/password`,{password:t,password_confirmation:n},{headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}});if(e.data.success)return console.log("Password reset successfully"),e.data;throw new Error("تغییر رمز عبور با مشکل مواجه شد.")}catch(a){throw console.error("Password reset failed:",a.response?.data||a.message),new Error(a.response?.data?.msg||"تغییر رمز عبور با مشکل مواجه شد.")}},async logout({commit:e}){try{const t=localStorage.getItem("token");if(t){const e=await o.A.post(`${i}auth/logout`,{},{headers:{Authorization:`Bearer ${t}`}});e.data.success?console.log(e.data.message):console.error("Logout failed: "+e.data.message)}e("LOGOUT"),localStorage.removeItem("token"),console.log("Logged out successfully from local state")}catch(t){console.error("Error during logout:",t),e("LOGOUT"),localStorage.removeItem("token")}},async verifyLogin({commit:e}){const t=localStorage.getItem("token");if(!t)return e("LOGOUT"),void console.log("No token found, user logged out.");try{const n=await o.A.get(`${i}auth/me`,{headers:{Authorization:`Bearer ${t}`}});if(n.data.success){const t=n.data.data;console.log("API response data:",n.data),console.log("User to be set:",t),e("SET_USER",t)}else console.log("Invalid user data, logging out."),e("LOGOUT")}catch(n){console.error("Error verifying login:",n),e("LOGOUT")}},loadUserFromLocalStorage({commit:e}){const t=localStorage.getItem("token");t&&e("SET_TOKEN",t)}},l={getUser(e){return e.user},getToken(e){return e.token},isAuthenticated(e){return e.isAuthenticated}};t["default"]={namespaced:!0,state:s,mutations:c,actions:d,getters:l}},7473:function(e,t,n){"use strict";var o=n(5130),r=n(6768);function a(e,t,n,o,a,i){const s=(0,r.g2)("router-view");return(0,r.uX)(),(0,r.Wv)(s)}var i={name:"App",components:{}},s=n(1241);const c=(0,s.A)(i,[["render",a]]);var d=c,l=n(494),u=n(782),m=(n(8111),n(7588),n(1701),n(8141)),h=n.n(m);const p={},f={modules:{}};function b(e,t){if(1===t.length)return e;const n=t.shift();return e.modules[n]={modules:{},namespaced:!0,...e.modules[n]},b(e.modules[n],t)}(function(){const e=n(634);e.keys().forEach((t=>{const n=e(t);if(p[t]===n)return;p[t]=n;const o=t.replace(/^\.\//,"").replace(/\.\w+$/,"").split(/\//).map(h()),{modules:r}=b(f,o);r[o.pop()]={namespaced:!0,...n}}))})();var g=f.modules;const A=(0,u.y$)({modules:g,strict:!1,state:{isSidebarHidden:!1,isMobileSidebarActive:!1,isFixedWidth:!1},mutations:{toggleSidebar(e){e.isSidebarHidden=!e.isSidebarHidden},toggleMobileSidebar(e){e.isMobileSidebarActive=!e.isMobileSidebarActive},setFullWidth(e){e.isFixedWidth=!1},setFixedWidth(e){e.isFixedWidth=!0},changeLayoutType(e,t){e.layoutType=t.layoutType}},getters:{isFixedWidth:e=>e.isFixedWidth}});var v=A,E=n(8767),y=n(1805),O=n(3590),w=n(9241);n(110),n(9953);(0,o.Ef)(d).use(v).use(l.A).use(E.Ay).use(y.A).use(O.Ay$).component("Wizard",w.A).mount("#app")},7581:function(e,t,n){"use strict";n.r(t),n.d(t,{actions:function(){return a},mutations:function(){return r},state:function(){return o}});const o={layoutType:"vertical",topbar:"light",mode:"light",position:"fixed",sidebarView:"default",sidebarColor:"light",sidebarCaption:"false",direction:"ltr",color:"preset-1",layoutTheme:"default"},r={CHANGE_LAYOUT(e,t){e.layoutType=t},CHANGE_TOPBAR(e,t){e.topbar=t},CHANGE_MODE(e,t){e.mode=t},CHANGE_SIDEBAR_VIEW(e,t){e.sidebarView=t},CHANGE_SIDEBAR_COLOR(e,t){e.sidebarColor=t},CHANGE_SIDEBAR_CAPTION(e,t){e.sidebarCaption=t},CHANGE_DIRECTION(e,t){e.direction=t},CHANGE_COLOR(e,t){e.color=t},CHANGE_THEMES(e,t){e.layoutTheme=t}},a={changeLayoutType({commit:e},{layoutType:t}){e("CHANGE_LAYOUT",t),document.body.removeAttribute("style")},changeLayoutWidth({commit:e},{layoutWidth:t}){e("CHANGE_LAYOUT_WIDTH",t)},changeSidebarSize({commit:e},{sidebarSize:t}){e("CHANGE_SIDEBAR_TYPE",t)},changeTopbar({commit:e},{topbar:t}){e("CHANGE_TOPBAR",t)},changeMode({commit:e},{mode:t}){e("CHANGE_MODE",t)},changePosition({commit:e},{position:t}){e("CHANGE_POSITION",t)},changeSidebarView({commit:e},{sidebarView:t}){e("CHANGE_SIDEBAR_VIEW",t)},changeSidebarColor({commit:e},{sidebarColor:t}){e("CHANGE_SIDEBAR_COLOR",t)},changeSidebarCaption({commit:e},{sidebarCaption:t}){e("CHANGE_SIDEBAR_CAPTION",t)},changeDirection({commit:e},{direction:t}){e("CHANGE_DIRECTION",t)},changeColor({commit:e},{color:t}){e("CHANGE_COLOR",t)},changeThemes({commit:e},{layoutTheme:t}){e("CHANGE_THEMES",t)}}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var a=t[o]={id:o,loaded:!1,exports:{}};return e[o].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.m=e,function(){var e=[];n.O=function(t,o,r,a){if(!o){var i=1/0;for(l=0;l=a)&&Object.keys(n.O).every((function(e){return n.O[e](o[c])}))?o.splice(c--,1):(s=!1,a0&&e[l-1][2]>a;l--)e[l]=e[l-1];e[l]=[o,r,a]}}(),function(){n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,{a:t}),t}}(),function(){n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}}(),function(){n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,o){return n.f[o](e,t),t}),[]))}}(),function(){n.u=function(e){return"js/"+e+"."+{351:"7c98133b",502:"f4c580a7",518:"e2b86785",704:"8706091f",966:"7bb38c20",1105:"5f5b33c7",1203:"412136f8",1260:"ec36b529",1321:"7a8e4cd7",1353:"7187d530",1521:"26aa8887",1756:"9856eeee",1856:"6e46874d",1919:"df6414e8",2348:"c4bf36ce",2482:"bccd2223",2983:"f00900c5",3226:"e630aa1c",3355:"d0ed0c96",3357:"938cf06e",3662:"8e192036",3794:"c59a7129",4860:"8f4fb82c",5053:"95704f9e",5153:"defe7546",5404:"d69ee8d3",5768:"f1b2dd7b",5888:"d3e11f45",5894:"8d901e03",5923:"029651b2",6085:"57994e86",6196:"90a06f28",6215:"838ca982",6379:"b6df8e20",6714:"aa56bbd4",6934:"c918278d",7202:"66381906",7282:"7b0e4d35",7285:"1636212e",7353:"9f915fe2",7366:"368d4ce7",7571:"9af754dc",7882:"9dd4b9a4",8077:"59f2262a",8346:"1de3f1c4",8536:"24bf1c91",8575:"cf693b49",8626:"c3590687",8880:"a1679da2",9090:"926fdaec",9891:"675e7cc9",9998:"b71d82d0"}[e]+".js"}}(),function(){n.miniCssF=function(e){return"css/"+e+"."+{351:"cb058479",502:"644c3645",704:"61702538",966:"dd75e544",1105:"25b0f704",1203:"1fa6b175",1321:"1c2e67b5",1353:"0f1e0cc5",1521:"9e99b6a1",1756:"a8f32166",1919:"1ef8e781",2348:"bdb4a037",2482:"7ca1fb1d",2983:"16754f31",3226:"75333e5b",3355:"f2ae5603",3357:"a31a5f24",4860:"1f5d3658",5053:"6317593b",5153:"0af903ae",5768:"30642346",5894:"efa1f35c",5923:"e2a2097a",6085:"23eb1537",6196:"b7701381",6714:"548fc01c",6934:"2e78fd2c",7282:"946dace5",7285:"b299370e",7353:"6ad37414",7571:"cb57e4bd",7882:"96db7499",8536:"e8fde554",8575:"0e425933",8880:"dae9879e",9090:"1c7b5779",9998:"025bd462"}[e]+".css"}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="TruckShop:";n.l=function(o,r,a,i){if(e[o])e[o].push(r);else{var s,c;if(void 0!==a)for(var d=document.getElementsByTagName("script"),l=0;l