PageSourceSearch

https://travel-to-mongolia.com/_next/static/chunks/pages/dashboard/tour-d83e2d74e7cdd9d0.js

js travel-to-mongolia.com collected 2026-10-09 22:07:12 UTC 17,225 bytes, 16 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4188],{6354:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var a=r(7294),l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
2 * @license lucide-react v0.330.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */ let n=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),s=(e,t)=>{let r=(0,a.forwardRef)(({color:r="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:c="",children:d,...u},h)=>(0,a.createElement)("svg",{ref:h,...l,width:s,height:s,stroke:r,strokeWidth:o?24*Number(i)/Number(s):i,className:["lucide",`lucide-${n(e)}`,c].join(" "),...u},[...t.map(([e,t])=>(0,a.createElement)(e,t)),...Array.isArray(d)?d:[d]]));return r.displayName=`${e}`,r}},7764:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var a=r(6354);/**
7 * @license lucide-react v0.330.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */ let l=(0,a.Z)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},4699:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/tour",function(){return r(4596)}])},5477:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var a=r(5893),l=r(7294);let n=l.forwardRef(function({title:e,titleId:t,...r},a){return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:a,"aria-labelledby":t},r),e?l.createElement("title",{id:t},e):null,l.createElement("path",{fillRule:"evenodd",d:"M12 5.25a.75.75 0 01.75.75v5.25H18a.75.75 0 010 1.5h-5.25V18a.75.75 0 01-1.5 0v-5.25H6a.75.75 0 010-1.5h5.25V6a.75.75 0 01.75-.75z",clipRule:"evenodd"}))});var s=r(1664),i=r.n(s);let o=e=>(0,a.jsxs)(i(),{href:e.link,className:"inline-flex items-center lg:px-4 py-2 text-white bg-green-500 rounded hover:bg-green-600",children:[(0,a.jsx)(n,{name:"plusicon",className:"mr-2 text-white w-7 h-7"}),(0,a.jsx)("span",{className:"pr-2",children:e.name})]});var c=o},8310:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var a=r(5893);r(7294);var l=r(6354);/**
12 * @license lucide-react v0.330.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */ let n=(0,l.Z)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),s=(0,l.Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),i=e=>{let{paginate:t,currentPage:r,itemsPerPage:l,totalItems:i}=e,o=[];for(let c=1;c<=Math.ceil(i/l);c++)o.push(c);return(0,a.jsxs)("div",{className:"flex justify-center mt-4",children:[(0,a.jsx)("button",{className:"bg-gray-300 border w-10 h-10 rounded-md",onClick:()=>t(r-1),disabled:1===r,children:(0,a.jsx)(n,{className:"mx-auto"})}),o.map(e=>(0,a.jsx)("button",{className:"".concat(r===e?"bg-gray-300":"bg-white"," w-10 h-10 rounded-md border text-gray-700 mx-1"),onClick:()=>t(e),children:e},e)),(0,a.jsx)("button",{className:"bg-gray-300 border rounded-md w-10 h-10",onClick:()=>t(r+1),disabled:r===Math.ceil(i/l),children:(0,a.jsx)(s,{className:"mx-auto"})})]})};var o=i},4501:function(e,t,r){"use strict";var a=r(5893);r(7294);let l=e=>{let{searchTerm:t,handleSearch:r}=e;return(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)("input",{type:"search",id:"default-search",value:t,onChange:r,className:"block p-3 ps-10 text-sm text-gray-900 border border-gray-300 rounded-md bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:placeholder-gray-400 dark:focus:ring-blue-500 w-[90%] lg:w-auto mx-auto dark:focus:border-blue-500",placeholder:"Search...",required:!0})})};t.Z=l},4596:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return E}});var a=r(5893),l=r(8946),n=r(7294),s=r(4559),i=r(9828),o=r(6650),c=r(5675),d=r.n(c),u=r(1664),h=r.n(u),m=r(1163),x=r(2920);r(4213);var g=r(8005),f=r(9204),p=r(5349);r(6256);let v=e=>{let{tourData:t,handleClick:r}=e;return(0,m.useRouter)(),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("table",{className:"w-full",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"text-xs font-semibold tracking-wide text-left text-gray-500 uppercase bg-white border-b",children:[(0,a.jsx)("th",{className:"px-4 py-3",children:"Title"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Subtitle"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Status"}),(0,a.jsx)("th",{className:"px-4 py-3",children:"Show Home"}),(0,a.jsx)("th",{className:"px-4 py-3"})]})}),(0,a.jsx)("tbody",{className:"bg-white divide-y",children:t.map(e=>(0,a.jsxs)("tr",{className:"text-gray-700 bg-white hover:bg-gray-100",children:[(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsxs)("div",{className:"flex items-center text-sm",children:[(0,a.jsxs)("div",{className:"relative hidden w-10 h-8 mr-3 rounded-full md:block",children:[(0,a.jsx)(d(),{className:"object-cover w-full h-full rounded",src:e.thumbnail,alt:"Bg",width:100,height:100,loading:"lazy"}),(0,a.jsx)("div",{className:"absolute inset-0 rounded-full shadow-inner","aria-hidden":"true"})]}),(0,a.jsx)("div",{children:(0,a.jsx)("p",{className:"font-semibold",children:e.title})})]})}),(0,a.jsx)("td",{className:"px-4 py-3 text-sm",children:e.sub_title}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs",children:(0,a.jsx)("span",{className:"px-2 py-1 font-semibold leading-tight ".concat(e.publish?"bg-green-100":"bg-red-100"," text-gray-700  rounded-full"),children:e.publish?"Published":"Not published"})}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs",children:(0,a.jsx)("span",{className:"px-2 py-1 font-semibold leading-tight ".concat(e.home?"bg-green-100":"bg-red-100"," text-gray-700  rounded-full"),children:e.home?"Published":"Not published"})}),(0,a.jsxs)("td",{className:"px-4 py-3 text-sm",children:[(0,a.jsx)(h(),{href:{pathname:"/dashboard/tour/toggle/[slug]",query:{slug:e.id,category_id:e.category_id,header_id:e.header_id}},children:(0,a.jsx)("button",{className:"inline-flex items-center px-2 py-2 mr-2 text-sm font-medium text-white bg-green-500 rounded-md hover:bg-green-600",children:(0,a.jsx)(g.Z,{className:"w-5 h-5 "})})}),(0,a.jsx)(h(),{href:{pathname:"/dashboard/tour/[id]",query:{id:e.id,category_id:e.category_id,header_id:e.header_id}},children:(0,a.jsx)("button",{className:"inline-flex items-center px-2 py-2 mr-2 text-sm font-medium text-white bg-indigo-500 rounded-md hover:bg-indigo-600",children:(0,a.jsx)(f.Z,{className:"w-5 h-5 "})})}),(0,a.jsx)("button",{onClick:()=>
16r(e.id,e.category_id,e.header_id,e.image,e.thumbnail),className:"inline-flex items-center px-2 py-2 mr-2 text-sm font-medium text-white bg-red-600 rounded-md hover:bg-red-700",children:(0,a.jsx)(p.Z,{className:"w-5 h-5"})}),(0,a.jsx)(x.Ix,{})]})]},e.id))})]})})};var w=r(5477),b=r(8310),j=r(4501),y=r(7764);let N=()=>{let[e,t]=(0,n.useState)([]),[r,l]=(0,n.useState)(""),[c,d]=(0,n.useState)(1),[u,h]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let e=(0,i.IO)((0,i.B$)(s.db,"posts"),(0,i.ar)("project","==",sessionStorage.getItem("Project")),(0,i.ar)("header_id","==","tou"));(0,i.PL)(e).then(e=>{t(e.docs.map(e=>({...e.data(),id:e.id})))})},[]);let m=async()=>{try{let e=(0,i.IO)((0,i.B$)(s.db,"posts"),(0,i.ar)("project","==",sessionStorage.getItem("Project")),(0,i.ar)("header_id","==","tou"));(0,i.PL)(e).then(e=>{t(e.docs.map(e=>({...e.data(),id:e.id})))})}catch(r){console.log(r)}},g=async(e,t,r,a,l)=>{await (0,i.oe)((0,i.JU)(s.db,"headers",r,"categories",t,"posts",e));let n=(0,o.cF)();if(a){let c=(0,o.iH)(n,a);(0,o.oq)(c).then(()=>{x.Am.success("Image Successfully deleted!",{position:x.Am.POSITION.TOP_RIGHT,autoClose:1500})}).catch(e=>{console.log(e)}).finally(()=>{x.Am.success("Successfully deleted!",{position:x.Am.POSITION.TOP_RIGHT,autoClose:1500})})}if(l){let d=(0,o.iH)(n,l);(0,o.oq)(d).then(()=>{x.Am.success("Thumbnail Successfully deleted!",{position:x.Am.POSITION.TOP_RIGHT,autoClose:1500})}).catch(e=>{console.log(e)}).finally(()=>{})}m()},[f,p]=(0,n.useState)(!1),N=()=>{p(!f),h(!u)},k=e=>{l(e.target.value),d(1)},E=e.filter(e=>e.title.toLowerCase().includes(r.toLowerCase())),L=10*c,C=E.slice(L-10,L),Z=e=>{d(e)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"grid px-4 py-3 font-semibold tracking-wide text-gray-900 uppercase border bg-gray-50 sm:grid-cols-9",children:[(0,a.jsx)("h1",{className:"py-2 ",children:"Tours"}),(0,a.jsx)("div",{className:"my-auto col-end-8 mr-[2%] lg:block ".concat(f?"menu-open":""),children:(0,a.jsxs)("div",{className:"flex flex-col lg:flex-row items-center ",children:[(0,a.jsx)("div",{className:"lg:w-1/2 lg:block hidden",children:(0,a.jsx)("form",{className:"max-w-md mx-auto",onSubmit:e=>e.preventDefault(),children:(0,a.jsx)(j.Z,{searchTerm:r,handleSearch:k})})}),(0,a.jsx)("div",{className:" lg:hidden ".concat(u?"hidden":""),onClick:N,children:(0,a.jsx)(y.Z,{})}),f&&(0,a.jsx)("div",{className:"lg:hidden ",children:(0,a.jsx)("form",{className:"max-w-sm mx-auto",onSubmit:e=>e.preventDefault(),children:(0,a.jsx)(j.Z,{searchTerm:r,handleSearch:k})})})]})}),(0,a.jsx)("div",{className:"col-end-10",children:(0,a.jsx)(w.Z,{name:"Create",link:"/dashboard/tour/create"})})]}),(0,a.jsx)("div",{className:"w-full overflow-x-auto",children:(0,a.jsx)(v,{tourData:C,handleClick:g})}),(0,a.jsx)(b.Z,{itemsPerPage:10,totalItems:E.length,paginate:Z,currentPage:c}),(0,a.jsx)(x.Ix,{})]})},k=()=>(0,a.jsx)(l.Z,{children:(0,a.jsx)(N,{})});var E=k},1163:function(e,t,r){e.exports=r(880)},5973:function(e,t,r){"use strict";var a=r(7294);let l=a.forwardRef(function({title:e,titleId:t,...r},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:l,"aria-labelledby":t},r),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"}))});t.Z=l},3529:function(e,t,r){"use strict";var a=r(7294);let l=a.forwardRef(function({title:e,titleId:t,...r},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:l,"aria-labelledby":t},r),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 3v1.5M3 21v-6m0 0l2.77-.693a9 9 0 016.208.682l.108.054a9 9 0 006.086.71l3.114-.732a48.524 48.524 0 01-.005-10.499l-3.11.732a9 9 0 01-6.085-.711l-.108-.054a9 9 0 00-6.208-.682L3 4.5M3 15V4.5"}))});t.Z=l},4475:function(e,t,r){"use strict";var a=r(7294);let l=a.forwardRef(function({title:e,titleId:t,...r},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:l,"aria-labelledby":t},r),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12.75 3.03v.568c0 .334.148.65.405.864l1.068.89c.442.369.535 1.01.216 1.49l-.51.766a2.25 2.25 0 01-1.161.886l-.143.048a1.107 1.107 0 00-.57 1.664c.369.555.169 1.307-.427 1.605L9 13.125l.423 1.059a.956.956 0 01-1.652.928l-.679-.906a1.125 1.125 0 00-1.906.172L4.5 15.75l-.612.153M12.75 3.031a9 9 0 00-8.862 12.872M12.75 3.031a9 9 0 016.69 14.036m0 0l-.177-.529A2.25 2.25 0 0017.128 15H16.5l-.324-.324a1.453 1.453 0 00-2.328.377l-.036.073a1.586 1.586 0 01-.982.816l-.99.282c-.55.157-.894.702-.8 1.267l.073.438c.08.474.49.821.97.821.846 0 1.598.542 1.865 1.345l.215.643m5.276-3.67a9.012 9.012 0 01-5.276 3.67m0 0a9 9 0 01-10.275-4.835M15.75 9c0 .896-.393 1.7-1.016 2.25"}))});t.Z=l},2237:function(e,t,r){"use strict";var a=r(7294);let l=a.forwardRef(function({title:e,titleId:t,...r},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:l,"aria-labelledby":t},r),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"}))});t.Z=l},311:function(e,t,r){"use strict";var a=r(7294);let l=a.forwardRef(function({title:e,titleId:t,...r},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:l,"aria-labelledby":t},r),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"}))});t.Z=l},7814:function(e,t,r){"use strict";var a=r(7294);let l=a.forwardRef(function({title:e,titleId:t,...r},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:l,"aria-labelledby":t},r),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"}))});t.Z=l},2291:function(e,t,r){"use strict";var a=r(7294);let l=a.forwardRef(function({title:e,titleId:t,...r},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:l,"aria-labelledby":t},r),e?a.createElement("title",{id:t},e):null,a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.42 15.17L17.25 21A2.652 2.652 0 0021 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 11-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 004.486-6.336l-3.276 3.277a3.004 3.004 0 01-2.25-2.25l3.276-3.276a4.5 4.5 0 00-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437l1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008z"}))});t.Z=l},9204:function(e,t,r){"use strict";var a=r(7294);let l=a.forwardRef(function({title:e,titleId:t,...r},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
16currentColor","aria-hidden":"true",ref:l,"aria-labelledby":t},r),e?a.createElement("title",{id:t},e):null,a.createElement("path",{d:"M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z"}))});t.Z=l},8005:function(e,t,r){"use strict";var a=r(7294);let l=a.forwardRef(function({title:e,titleId:t,...r},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:l,"aria-labelledby":t},r),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M12 3.75a.75.75 0 01.75.75v6.75h6.75a.75.75 0 010 1.5h-6.75v6.75a.75.75 0 01-1.5 0v-6.75H4.5a.75.75 0 010-1.5h6.75V4.5a.75.75 0 01.75-.75z",clipRule:"evenodd"}))});t.Z=l},5349:function(e,t,r){"use strict";var a=r(7294);let l=a.forwardRef(function({title:e,titleId:t,...r},l){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:l,"aria-labelledby":t},r),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M16.5 4.478v.227a48.816 48.816 0 013.878.512.75.75 0 11-.256 1.478l-.209-.035-1.005 13.07a3 3 0 01-2.991 2.77H8.084a3 3 0 01-2.991-2.77L4.087 6.66l-.209.035a.75.75 0 01-.256-1.478A48.567 48.567 0 017.5 4.705v-.227c0-1.564 1.213-2.9 2.816-2.951a52.662 52.662 0 013.369 0c1.603.051 2.815 1.387 2.815 2.951zm-6.136-1.452a51.196 51.196 0 013.273 0C14.39 3.05 15 3.684 15 4.478v.113a49.488 49.488 0 00-6 0v-.113c0-.794.609-1.428 1.364-1.452zm-.355 5.945a.75.75 0 10-1.5.058l.347 9a.75.75 0 101.499-.058l-.346-9zm5.48.058a.75.75 0 10-1.498-.058l-.347 9a.75.75 0 001.5.058l.345-9z",clipRule:"evenodd"}))});t.Z=l}},function(e){e.O(0,[2016,4597,6869,3061,8946,9774,2888,179],function(){return e(e.s=4699)}),_N_E=e.O()}]);

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.