PageSourceSearch

https://clipchat.ai/dist/assets/AdminSitemap-Daz_hRX-.js

js clipchat.ai collected 2026-10-05 11:57:26 UTC 2,997 bytes, 12 lines download raw bytes

1import{j as e,U as a,Y as s,B as t,T as i,al as n,a5 as o,a4 as r,aH as l,ag as d,ak as c,a6 as m,aC as p}from"./vendor-mui-CBxi4-UE.js";import{a as u}from"./vendor-react-DJCar8wk.js";import{u as x,a as h,g}from"./main-fFbGxLEq.js";import"./index-Cc7IhL_s.js";import"./vendor-utils-hGafao2v.js";const j=g`
2  query GetSitemap {
3    getSitemap
4  }
5`,v=g`
6  mutation UpdateSitemap($content: String!) {
7    updateSitemap(input: { content: $content }) {
8      success
9      message
10    }
11  }
12`,f=()=>{const[g,f]=u.useState(""),[y,S]=u.useState(""),[b,C]=u.useState(""),[w,E]=u.useState(""),[I,R]=u.useState(!1),{loading:F,refetch:L}=x(j,{onCompleted:e=>{const a=e.getSitemap||"";f(a),S(a)},onError:e=>{C("Failed to load sitemap.xml: "+e.message)}}),[k,{loading:B}]=h(v,{onCompleted:e=>{e.updateSitemap.success?(S(g),E(e.updateSitemap.message||"Sitemap saved successfully!"),R(!1)):C(e.updateSitemap.message||"Failed to save sitemap")},onError:e=>{C("Failed to save sitemap.xml: "+e.message)}});u.useEffect(()=>{R(g!==y)},[g,y]);return e.jsxs(a,{maxWidth:"lg",sx:{mt:4,mb:4},children:[e.jsxs(s,{elevation:3,sx:{p:4},children:[e.jsxs(t,{sx:{mb:4},children:[e.jsx(i,{variant:"h4",component:"h1",gutterBottom:!0,children:"Sitemap Editor"}),e.jsx(i,{variant:"body1",color:"text.secondary",children:"Edit the sitemap.xml file located at front/public/sitemap.xml"})]}),b&&e.jsx(n,{severity:"error",sx:{mb:3},children:b}),e.jsxs(o,{direction:"row",spacing:2,sx:{mb:3},children:[e.jsx(r,{variant:"contained",color:"primary",startIcon:e.jsx(l,{}),onClick:()=>{k({variables:{content:g}})},disabled:B||!I,children:B?"Saving...":"Save Changes"}),e.jsx(r,{variant:"outlined",startIcon:e.jsx(d,{}),onClick:()=>{I?window.confirm("You have unsaved changes. Are you sure you want to reload?")&&L():L()},disabled:F,children:"Reload"}),I&&e.jsx(i,{variant:"body2",color:"warning.main",sx:{display:"flex",alignItems:"center",ml:2},children:"You have unsaved changes"})]}),F?e.jsx(t,{sx:{display:"flex",justifyContent:"center",py:10},children:e.jsx(c,{})}):e.jsx(m,{multiline:!0,fullWidth:!0,value:g,onChange:e=>{f(e.target.value)},placeholder:"Loading sitemap.xml...",variant:"outlined",sx:{"& .MuiInputBase-root":{fontFamily:"monospace",fontSize:"14px"}},minRows:20,maxRows:40}),e.jsx(t,{sx:{mt:3,p:2,bgcolor:"grey.100",borderRadius:1},children:e.jsxs(i,{variant:"caption",color:"text.secondary",children:[e.jsx("strong",{children:"Tips:"}),e.jsxs("ul",{style:{margin:"8px 0 0 0",paddingLeft:"20px"},children:[e.jsx("li",{children:"The sitemap should be in valid XML format"}),e.jsx("li",{children:"Each URL should be wrapped in <url> tags"}),e.jsx("li",{children:"Include <loc>, <lastmod>, <changefreq>, and <priority> tags as needed"}),e.jsx("li",{children:"Save your changes before leaving this page"})]})]})})]}),e.jsx(p,{open:!!w,autoHideDuration:4e3,onClose:()=>E(""),anchorOrigin:{vertical:"bottom",horizontal:"right"},children:e.jsx(n,{onClose:()=>E(""),severity:"success",children:w})})]})};export{f as default};

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.