PageSourceSearch

https://araf.az/_next/static/chunks/1739.4e4f6d33d19f600c.js

js araf.az collected 2026-09-25 11:08:46 UTC 38,707 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1739],{11739:function(e,t,a){a.r(t),a.d(t,{default:function(){return U}});var s=a(27573),r=a(81695),n=a(7653),l=a(58912),i=a(26492),o=a(96825),c=a(38333),d=a(6315),x=a(51856),u=a(10997),h=a(95731),m=a(73166),p=a(24903),g=a(96631),b=a(54169),f=a(90295),y=a(3172),j=a(10269),v=a(75721),N=a(84115),w=a(59135),k=a(79951),S=a(78031),C=a(87354),E=a(20054),F=a(2966),B=a(38983),Z=a(14699),T=a(35995),O=a(20144),D=a(2240),_=a(48924),A=a(79901),M=a(43029),I=a(61883);let J=[{value:"text",label:"Text",hint:"Searches text in content fields (not in tag/class)",placeholder:"+1 234 567 890",replacePlaceholder:"+1 987 654 321"},{value:"class",label:"CSS Class",hint:"Matches whole class tokens only (py-10, not py-100)",placeholder:"py-10",replacePlaceholder:"py-20"},{value:"json",label:"JSON",hint:"Raw search in design JSON. Items that would break are skipped on replace.",placeholder:'{"tag":"div","class":"cta-block"...}',replacePlaceholder:'{"tag":"section","class":"cta-new"...}'}];function R(e){let{searchEndpoint:t,replaceEndpoint:a,idsField:r,projectId:l,extraSearchBody:i,onClose:o,onDone:c}=e,[d,x]=(0,n.useState)("text"),[u,m]=(0,n.useState)(""),[p,g]=(0,n.useState)(""),[b,y]=(0,n.useState)("search"),[N,w]=(0,n.useState)(!1),[k,S]=(0,n.useState)(""),[C,F]=(0,n.useState)([]),[B,Z]=(0,n.useState)(new Set),[T,O]=(0,n.useState)(null),D=l?"?project_id=".concat(l):"",R=J.find(e=>e.value===d),z="w-full px-3.5 py-2.5 border border-gray-200 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-[#F07B6E]/25 focus:border-[#F07B6E] transition-shadow",P=async()=>{if(!u){S("Enter search text");return}w(!0),S("");try{let e=await fetch("".concat(t).concat(D),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({find:u,mode:d,...i||{}})}),a=await e.json();if(!e.ok){S(a.detail||"Search failed"),w(!1);return}F(a),Z(new Set(a.map(e=>e.id))),y("replace")}catch(e){S("Search failed")}w(!1)},L=async()=>{if(0===B.size){S("Select at least one item");return}w(!0),S("");try{let e=await fetch("".concat(a).concat(D),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({find:u,replace:p,mode:d,[r]:Array.from(B)})}),t=await e.json();if(!e.ok){S(t.detail||"Replace failed"),w(!1);return}O(t),y("report"),c()}catch(e){S("Replace failed")}w(!1)},H=e=>{Z(t=>{let a=new Set(t);return a.has(e)?a.delete(e):a.add(e),a})},V=C.length>0&&B.size===C.length,K="json"===d;return(0,s.jsx)(_.h,{children:(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-gray-900/40 backdrop-blur-[2px]",onClick:o,children:(0,s.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl ring-1 ring-black/5 ".concat(K?"w-[680px]":"w-[580px]"," max-h-[85vh] flex flex-col overflow-hidden"),onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-100 shrink-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-lg bg-[#F07B6E]/10 flex items-center justify-center",children:(0,s.jsx)(f.Z,{className:"w-4 h-4 text-[#F07B6E]"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-semibold text-gray-900 text-[15px]",children:"Find & Replace"}),(0,s.jsxs)("p",{className:"text-xs text-gray-400",children:["search"===b&&"Step 1 — Search for content","replace"===b&&"Step 2 — Select items and set replacement","report"===b&&"Done"]})]})]}),(0,s.jsx)("button",{onClick:o,className:"p-2 rounded-lg hover:bg-gray-100 text-gray-400 transition-colors",children:(0,s.jsx)(j.Z,{className:"w-4 h-4"})})]}),(0,s.jsxs)("div",{className:"flex-1 overflow-auto px-6 py-5 space-y-4",children:["search"===b&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex gap-1 p-1 bg-gray-50 border border-gray-100 rounded-xl",children:J.map(e=>(0,s.jsx)("button",{onClick:()=>x(e.value),className:"flex-1 px-3 py-2 text-[13px] rounded-lg transition-all ".concat(d===e.value?"bg-white shadow-sm ring-1 ring-black/5 text-gray-900 font-medium":"text-gray-500 hover:text-gray-700"),children:e.label},e.value))}),(0,s.jsx)("p",{className:"text-xs text-gray-400 px-1",children:R.hint}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[13px] font-medium text-gray-700 mb-1.5",children:"Find"}),K?(0,s.jsx)("textarea",{autoFocus:!0,value:u,onChange:e=>m(e.target.value),placeholder:R.placeholder,rows:8,className:"".concat(z," font-mono text-[12px] resize-y min-h-[160px]")}):(0,s.jsx)("input",{autoFocus:!0,value:u,onChange:e=>m(e.target.value),onKeyDown:e=>"Enter"===e.key&&P(),placeholder:R.placeholder,className:z})]})]}),"replace"===b&&(0,s.jsx)(s.Fragment,{children:0===C.length?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-10 text-gray-400",children:[(0,s.jsx)(h.Z,{className:"w-8 h-8 mb-2 opacity-40"}),(0,s.jsxs)("p",{className:"text-sm",children:["No matches for ",(0,s.jsxs)("span",{className:"font-medium text-gray-600",children:['"',K?"JSON snippet":u,'"']})]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("p",{className:"text-[13px] text-gray-500",children:[(0,s.jsxs)("span",{className:"font-semibold text-gray-900",children:['"',K?"JSON snippet":u,'"']})," found in ",(0,s.jsx)("span",{className:"font-medium text-gray-700",children:C.length})," item(s)"]}),(0,s.jsx)("button",{onClick:()=>Z(V?new Set:new Set(C.map(e=>e.id))),className:"text-[13px] text-[#F07B6E] hover:underline font-medium",children:V?"Deselect all":"Select all"})]}),(0,s.jsx)("div",{className:"border border-gray-100 rounded-xl divide-y divide-gray-50 max-h-52 overflow-auto shadow-sm",children:C.map(e=>(0,s.jsxs)("label",{className:"flex items-center gap-3 px-3.5 py-2.5 hover:bg-gray-50/70 cursor-pointer transition-colors",children:[(0,s.jsx)("input",{type:"checkbox",checked:B.has(e.id),onChange:()=>H(e.id),className:"w-4 h-4 rounded accent-[#F07B6E]"}),(0,s.jsx)("span",{className:"flex-1 text-sm text-gray-900 truncate",children:e.name}),(0,s.jsx)("span",{className:"text-[11px] font-medium text-gray-500 bg-gray-100 rounded-full px-2 py-0.5",children:e.match_count})]},e.id))}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-[13px] font-medium text-gray-700 mb-1.5",children:"Replace with"}),K?(0,s.jsx)("textarea",{autoFocus:!0,value:p,onChange:e=>g(e.target.value),placeholder:R.replacePlaceholder,rows:8,className:"".concat(z," font-mono text-[12px] resize-y min-h-[160px]")}):(0,s.jsx)("input",{autoFocus:!0,value:p,onChange:e=>g(e.target.value),placeholder:R.replacePlaceholder,className:z}),(0,s.jsx)("p",{className:"text-xs text-gray-400 mt-1.5 px-1",children:"Leave empty to remove the found text"})]})]})}),"report"===b&&T&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 bg-green-50 border border-green-100 rounded-xl p-4",children:[(0,s.jsx)(A.Z,{className:"w-5 h-5 text-green-500 shrink-0"}),(0,s.jsxs)("p",{className:"text-sm text-green-800 font-medium",children:[T.total_matches," replacement(s) in ",T.replaced.length," item(s)"]})]}),T.replaced.length>0&&(0,s.jsx)("div",{className:"border border-gray-100 rounded-xl divide-y divide-gray-50 max-h-52 overflow-auto",children:T.replaced.map(e=>(0,s.jsxs)("div",{className:"flex items-center justify-between px-3.5 py-2.5 text-sm",children:[(0,s.jsx)("span",{className:"truncate text-gray-900",children:e.name}),(0,s.jsx)("span",{className:"text-[11px] font-medium text-gray-500 bg-gray-100 rounded-full px-2 py-0.5",children:e.replaced_count})]},e.id))}
1),T.skipped_invalid_json.length>0&&(0,s.jsxs)("div",{className:"flex items-start gap-2.5 text-amber-700 bg-amber-50 border border-amber-100 rounded-xl p-3.5",children:[(0,s.jsx)(E.Z,{className:"w-4 h-4 mt-0.5 shrink-0"}),(0,s.jsxs)("p",{className:"text-xs leading-relaxed",children:[T.skipped_invalid_json.length," item(s) skipped — replacement would produce invalid JSON (IDs: ",T.skipped_invalid_json.join(", "),")"]})]})]}),k&&(0,s.jsx)("p",{className:"text-[13px] text-red-500",children:k})]}),(0,s.jsxs)("div",{className:"flex gap-2.5 px-6 py-4 border-t border-gray-100 bg-gray-50/60 shrink-0",children:["search"===b&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{onClick:o,className:"px-4 py-2.5 border border-gray-200 rounded-xl text-sm font-medium text-gray-600 hover:bg-white transition-colors",children:"Cancel"}),(0,s.jsx)("div",{className:"flex-1"}),(0,s.jsxs)("button",{onClick:P,disabled:N||!u,className:"px-5 py-2.5 bg-[#F07B6E] text-white text-sm font-medium rounded-xl hover:bg-[#E06B5E] disabled:opacity-40 flex items-center gap-2 transition-colors shadow-sm",children:[N?(0,s.jsx)(v.Z,{className:"w-4 h-4 animate-spin"}):(0,s.jsx)(h.Z,{className:"w-4 h-4"}),"Search ",(0,s.jsx)(M.Z,{className:"w-3.5 h-3.5"})]})]}),"replace"===b&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{onClick:()=>{y("search"),S("")},className:"px-4 py-2.5 border border-gray-200 rounded-xl text-sm font-medium text-gray-600 hover:bg-white flex items-center gap-1.5 transition-colors",children:[(0,s.jsx)(I.Z,{className:"w-3.5 h-3.5"})," Back"]}),(0,s.jsx)("div",{className:"flex-1"}),C.length>0&&(0,s.jsxs)("button",{onClick:L,disabled:N||0===B.size,className:"px-5 py-2.5 bg-[#F07B6E] text-white text-sm font-medium rounded-xl hover:bg-[#E06B5E] disabled:opacity-40 flex items-center gap-2 transition-colors shadow-sm",children:[N?(0,s.jsx)(v.Z,{className:"w-4 h-4 animate-spin"}):(0,s.jsx)(f.Z,{className:"w-4 h-4"}),"Replace Selected (",B.size,")"]})]}),"report"===b&&(0,s.jsx)("button",{onClick:o,className:"flex-1 px-4 py-2.5 bg-[#F07B6E] text-white text-sm font-medium rounded-xl hover:bg-[#E06B5E] transition-colors",children:"Done"})]})]})})})}var z=a(27658);function P(e){let{preview:t,projectId:a,onClose:r,onExpand:l,onMouseEnter:i,onMouseLeave:o}
1=e,[c,d]=(0,n.useState)(null),[x,u]=(0,n.useState)(!0),h=(0,n.useRef)(new Map);(0,n.useEffect)(()=>{let e=h.current.get(t.id);if(void 0!==e){d(e),u(!1);return}u(!0),d(null);let s=a?"?project_id=".concat(a):"",r=!1;return fetch("/api/v1/modules/cms/sections/".concat(t.id).concat(s),{credentials:"include"}).then(e=>e.ok?e.json():null).then(e=>{var a;if(r)return;let s=null!==(a=null==e?void 0:e.design)&&void 0!==a?a:null;if("string"==typeof s)try{s=JSON.parse(s)}catch(e){s=null}h.current.set(t.id,s),d(s),u(!1)}).catch(()=>{r||u(!1)}),()=>{r=!0}},[t.id,a]),(0,n.useEffect)(()=>{let e=e=>{"Escape"===e.key&&r()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[r]);let m=e=>(0,s.jsx)("div",{className:"overflow-auto bg-gray-50 ".concat(e),children:x?(0,s.jsx)("div",{className:"flex items-center justify-center h-40",children:(0,s.jsx)(v.Z,{className:"w-5 h-5 animate-spin text-gray-300"})}):c?(0,s.jsx)(z.Qm,{design:c}):(0,s.jsx)("div",{className:"flex items-center justify-center h-40 text-gray-400 text-sm",children:"No design data"})});if("hover"===t.mode){let e=window.innerHeight,a=t.anchor.y<e/2,r={left:12,right:12,maxHeight:Math.max(220,Math.min(a?e-t.anchor.y-10-12:t.anchor.y-10-12,.7*e)),...a?{top:t.anchor.y+10}:{bottom:e-t.anchor.y+10}};return(0,s.jsx)(_.h,{children:(0,s.jsxs)("div",{className:"fixed z-40 bg-white rounded-xl shadow-2xl ring-1 ring-black/10 overflow-hidden flex flex-col",style:r,onMouseEnter:i,onMouseLeave:o,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 border-b border-gray-100 bg-gray-50/80 shrink-0",children:[(0,s.jsx)("h3",{className:"font-medium text-gray-900 text-[12px] truncate",children:t.name}),(0,s.jsx)("span",{className:"text-[10px] text-gray-400 shrink-0 ml-2",children:"Scroll to explore \xb7 Click eye to expand"})]}),m("flex-1")]})})}return(0,s.jsx)(_.h,{children:(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-gray-900/40 backdrop-blur-[2px]",onClick:r,children:(0,s.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl ring-1 ring-black/5 w-[92vw] max-w-6xl max-h-[88vh] flex flex-col overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-gray-100 shrink-0",children:[(0,s.jsx)("h3",{className:"font-medium text-gray-900 text-[14px] truncate",children:t.name}),(0,s.jsx)("button",{onClick:r,className:"p-2 rounded-lg hover:bg-gray-100 text-gray-400 transition-colors",children:(0,s.jsx)(j.Z,{className:"w-4 h-4"})})]}),m("flex-1")]})})})}function L(e,t,a){try{let s=localStorage.getItem(e);if(null===s)return t;return a?JSON.parse(s):s}catch(e){return t}}function H(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=[]}return Array.isArray(e)?e:[]}function V(e){let t=H(e);return t.length?[...t].sort().join(", "):"ï¿¿"}function K(e){let{checked:t,onChange:a}=e;return(0,s.jsx)("button",{onClick:e=>{e.stopPropagation(),a()},className:"relative inline-flex h-[18px] w-[30px] items-center rounded-full transition-colors ".concat(t?"bg-[#F07B6E]":"bg-gray-200"),children:(0,s.jsx)("span",{className:"inline-block h-[14px] w-[14px] transform rounded-full bg-white shadow-sm transition-transform ".concat(t?"translate-x-[14px]":"translate-x-[2px]")})})}function G(e){let{id:t,dragEnabled:a,isSelected:r,children:n}=e,{attributes:l,listeners:i,setNodeRef:c,transform:d,transition:x,isDragging:u}=(0,T.nB)({id:t,disabled:!a});return(0,s.jsxs)("tr",{ref:c,style:{transform:O.ux.Transform.toString(d),transition:x},className:"group ".concat(u?"bg-white shadow-lg relative z-10":""," transition-colors ").concat(r?"bg-[#F07B6E]/[0.04]":"hover:bg-gray-50/80"),children:[(0,s.jsx)("td",{className:"border-b border-gray-100 px-1 py-0 w-8 text-center",children:(0,s.jsx)("button",{...a?{...l,...i}:{},className:"p-1 rounded align-middle ".concat(a?"cursor-grab active:cursor-grabbing text-gray-400 hover:text-gray-600 hover:bg-gray-100":"cursor-not-allowed text-gray-200"),title:a?"Drag to reorder":"Disable sorting, grouping and filters to reorder",children:(0,s.jsx)(o.Z,{className:"w-[15px] h-[15px]"})})}),n]})}function W(e){let{title:t,projectId:a,apiEndpoint:r,cloneTable:o,columns:F,bulkEndpoints:B,onEdit:O,onCreate:A,toggleField:M="enabled",previewEnabled:I=!1,searchField:J="name"}=e,z="dta-".concat(r),W=(0,n.useMemo)(()=>F.map(e=>
1e.key),[F]),[Q,U]=(0,n.useState)([]),[X,Y]=(0,n.useState)(!0),[$,ee]=(0,n.useState)(()=>L("".concat(z,"-search"),"",!1)),[et,ea]=(0,n.useState)(()=>L("".concat(z,"-tag"),"",!1)),[es,er]=(0,n.useState)(()=>L("".concat(z,"-status"),"",!1)),[en,el]=(0,n.useState)(()=>(L("".concat(z,"-sort"),[],!0)||[]).filter(e=>W.includes(e.id))),[ei,eo]=(0,n.useState)(()=>L("".concat(z,"-cols"),{},!0)),[ec,ed]=(0,n.useState)(()=>{let e=L("".concat(z,"-group"),"",!1);return W.includes(e)?e:""}),[ex,eu]=(0,n.useState)(new Set),[eh,em]=(0,n.useState)(new Set),[ep,eg]=(0,n.useState)(!1),[eb,ef]=(0,n.useState)(!1),[ey,ej]=(0,n.useState)(null),[ev,eN]=(0,n.useState)(null),[ew,ek]=(0,n.useState)(!1),[eS,eC]=(0,n.useState)(null),[eE,eF]=(0,n.useState)(null),eB=(0,n.useRef)(null),eZ=(0,n.useRef)(0),eT=(0,Z.Dy)((0,Z.VT)(Z.we,{activationConstraint:{distance:4}})),eO=a?"?project_id=".concat(a):"",eD=r.split("?")[0],e_=async()=>{let e=eZ.current,t=await fetch("".concat(r).concat(eO),{credentials:"include"}),a=t.ok?await t.json():[];e===eZ.current&&(U(Array.isArray(a)?a:[]),Y(!1))};(0,n.useEffect)(()=>{e_()},[a,r]),(0,n.useEffect)(()=>{localStorage.setItem("".concat(z,"-search"),$)},[$]),(0,n.useEffect)(()=>{localStorage.setItem("".concat(z,"-tag"),et)},[et]),(0,n.useEffect)(()=>{localStorage.setItem("".concat(z,"-status"),es)},[es]),(0,n.useEffect)(()=>{localStorage.setItem("".concat(z,"-sort"),JSON.stringify(en))},[en]),(0,n.useEffect)(()=>{localStorage.setItem("".concat(z,"-cols"),JSON.stringify(ei))},[ei]),(0,n.useEffect)(()=>{localStorage.setItem("".concat(z,"-group"),ec)},[ec]);let eA=e=>H(e.tags),eM=(0,n.useMemo)(()=>{let e=new Set;return Q.forEach(t=>eA(t).forEach(t=>e.add(t))),Array.from(e).sort()},[Q]),eI=(0,n.useMemo)(()=>Q.filter(e=>(!$||!!String(e[J]||"").toLowerCase().includes($.toLowerCase()))&&(!et||!!eA(e).includes(et))&&("active"!==es||!!e[M])&&
1("inactive"!==es||!e[M])),[Q,$,et,es]),eJ=(0,n.useMemo)(()=>F.map(e=>({id:e.key,accessorKey:e.key,header:e.label,enableSorting:!1!==e.sortable,..."tags"===e.sortType?{sortingFn:(t,a)=>V(t.original[e.key]).localeCompare(V(a.original[e.key]))}:{},cell:t=>{var a;let{row:s}=t;return e.render?e.render(s.original[e.key],s.original):String(null!==(a=s.original[e.key])&&void 0!==a?a:"")}})),[F]),eR=(0,l.b7)({data:eI,columns:eJ,state:{sorting:en,columnVisibility:ei},onSortingChange:el,onColumnVisibilityChange:eo,getCoreRowModel:(0,i.sC)(),getSortedRowModel:(0,i.tj)()}),ez=eR.getRowModel().rows,eP=!!o&&!ec&&!$&&!et&&!es&&0===en.length,eL=(0,n.useMemo)(()=>{let e=[];return en.length>0&&e.push("sorting"),ec&&e.push("grouping"),$&&e.push("search"),et&&e.push("tag filter"),es&&e.push("status filter"),e},[en,ec,$,et,es]),eH=async e=>{let{active:t,over:a}=e;if(!a||t.id===a.id||!o)return;let s=Q.findIndex(e=>e.id===t.id),r=Q.findIndex(e=>e.id===a.id);if(-1===s||-1===r)return;eZ.current++;let n=(0,T.Rp)(Q,s,r).map((e,t)=>({...e,sort_order:t}));U(n),await fetch("/api/v1/common/reorder".concat(eO),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({table:o,items:n.map((e,t)=>({id:e.id,sort_order:t}))})})},eV=(0,n.useMemo)(()=>{if(!ec)return null;let e=new Map;for(let a of ez){let s;if("tags"===ec){let e=eA(a.original);s=e.length?[...e].sort().join(", "):"No tag"}else if(ec===M)s=a.original[M]?"Active":"Inactive";else{var t;s=String(null!==(t=a.original[ec])&&void 0!==t?t:"(empty)")}e.has(s)||e.set(s,[]),e.get(s).push(a)}return Array.from(e.entries()).sort((e,t)=>e[0].localeCompare(t[0]))},[ez,ec]),eK=eI.map(e=>e.id),eG=eK.length>0&&eK.every(e=>eh.has(e)),eW=e=>{em(t=>{let a=new Set(t);return a.has(e)?a.delete(e):a.add(e),a})},eq=async(e,t,a)=>{U(s=>s.map(s=>s.id===e?{...s,[t]:a}:s)),await fetch("".concat(eD,"/").concat(e).concat(eO),{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({[t]:a})}),e_()},eQ=e=>eq(e.id,M,!e[M]),eU=async e=>{o&&(await fetch("/api/v1/common/clone".concat(eO),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({table:o,id:e.id})}),e_())},eX=async e=>{let t=[];if(null==B?void 0:B.usage)try{let a=await fetch("".concat(B.usage).concat(eO),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({[B.idsField]:e})});a.ok&&(t=await a.json())}catch(e){}eN({ids:e,usages:t})},eY=async()=>{if(!ev)return;ek(!0);let e=ev.ids;if(1!==e.length&&B)await fetch("".concat(B.delete).concat(eO),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({[B.idsField]:e})});else for(let t of e)await fetch("".concat(eD,"/").concat(t).concat(eO),{method:"DELETE",credentials:"include"});eN(null),ek(!1),em(new Set),e_()},e$=async e=>{B&&0!==eh.size&&(ek(!0),await fetch("".concat(B.status).concat(eO),{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({[B.idsField]:Array.from(eh),enabled:e})}),ek(!1),em(new Set),e_())},e0=(e,t)=>{eB.current&&(clearTimeout(eB.current),eB.current=null);let a=t.currentTarget.getBoundingClientRect();ej(t=>(null==t?void 0:t.mode)==="modal"?t:{id:e.id,name:e.name,anchor:{x:a.left,y:a.top+a.height/2},mode:"hover"})},e1=()=>{eB.current&&clearTimeout(eB.current),eB.current=setTimeout(()=>{ej(e=>(null==e?void 0:e.mode)==="modal"?e:null)},250)},e5=(e,t)=>{let a=t.currentTarget.getBoundingClientRect();ej({id:e.id,name:e.name,anchor:{x:a.left,y:a.top+a.height/2},mode:"modal"})},e2=(e,t)=>{var a;eC({id:e.id,key:t,value:String(null!==(a=e[t])&&void 0!==a?a:"")})},e4=()=>{var e;if(!eS)return;let{id:t,key:a,value:s}=eS;eC(null);let r=Q.find(e=>e.id===t);r&&String(null!==(e=r[a])&&void 0!==e?e:"")!==s&&""!==s.trim()&&eq(t,a,s.trim())},e3=(e,t,a)=>{let s=a.currentTarget.getBoundingClientRect();eF({id:e.id,key:t,tags:eA(e),input:"",anchor:{x:s.left,y:s.bottom}})},e6=()=>{if(!eE)return;let{id:e,key:t,tags:a,input:s}=eE,r=s.trim()?[...a,s.trim().toLowerCase()].filter((e,t,a)=>a.indexOf(e)===t):a;eF(null),eq(e,t,r)},e7=eR.getVisibleLeafColumns().length,e9=(e,t)=>
1{let a=t.original,r=F.find(t=>t.key===e.column.id);return(null==r?void 0:r.editable)==="text"?eS&&eS.id===a.id&&eS.key===r.key?(0,s.jsx)("input",{autoFocus:!0,value:eS.value,onChange:e=>eC({...eS,value:e.target.value}),onBlur:e4,onKeyDown:e=>{"Enter"===e.key&&e4(),"Escape"===e.key&&eC(null)},className:"w-full px-2 py-1 -mx-2 border border-[#F07B6E]/50 rounded-md text-[13px] focus:outline-none focus:ring-2 focus:ring-[#F07B6E]/20 bg-white"}):(0,s.jsx)("span",{onClick:()=>e2(a,r.key),className:"cursor-text hover:bg-[#F07B6E]/[0.06] rounded px-1 -mx-1 transition-colors",title:"Click to edit",children:(0,l.ie)(e.column.columnDef.cell,e.getContext())}):(null==r?void 0:r.editable)==="tags"?(0,s.jsx)("div",{onClick:e=>e3(a,r.key,e),className:"cursor-pointer hover:bg-[#F07B6E]/[0.06] rounded px-1 -mx-1 transition-colors min-h-[20px]",title:"Click to edit tags",children:(0,l.ie)(e.column.columnDef.cell,e.getContext())}):(0,l.ie)(e.column.columnDef.cell,e.getContext())},e8=e=>{let t=e.original,a=eh.has(t.id);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("td",{className:"border-b border-r border-gray-100 px-2 py-0 w-9 text-center",children:(0,s.jsx)("input",{type:"checkbox",checked:a,onChange:()=>eW(t.id),className:"w-[15px] h-[15px] rounded accent-[#F07B6E] align-middle transition-opacity ".concat(a?"opacity-100":"opacity-40 group-hover:opacity-100")})}),e.getVisibleCells().map((t,a)=>(0,s.jsx)("td",{className:"border-b border-gray-100 px-3.5 h-[42px] text-[13px] text-gray-800 ".concat(a<e7-1?"border-r border-gray-50":""),children:e9(t,e)},t.id)),(0,s.jsx)("td",{className:"border-b border-l border-gray-100 px-2.5 w-[170px]",children:(0,s.jsxs)("div",{className:"flex items-center justify-end gap-0.5",children:[(0,s.jsx)(K,{checked:!!t[M],onChange:()=>eQ(t)}),(0,s.jsx)("div",{className:"w-1.5"}),I&&(0,s.jsx)("button",{onClick:e=>e5(t,e),onMouseEnter:e=>e0(t,e),onMouseLeave:e1,className:"p-1.5 rounded-md transition-colors ".concat((null==ey?void 0:ey.id)===t.id?"bg-[#F07B6E]/10 text-[#F07B6E]":"hover:bg-gray-100 text-gray-400 hover:text-gray-600"),title:"Hover to preview, click to expand",children:(0,s.jsx)(c.Z,{className:"w-[15px] h-[15px]"})}),O&&(0,s.jsx)("button",{onClick:()=>O(t),className:"p-1.5 rounded-md hover:bg-gray-100 text-gray-400 hover:text-gray-600 transition-colors",title:"Edit",children:(0,s.jsx)(d.Z,{className:"w-[15px] h-[15px]"})}),o&&(0,s.jsx)("button",{onClick:()=>eU(t),className:"p-1.5 rounded-md hover:bg-gray-100 text-gray-400 hover:text-gray-600 transition-colors",title:"Clone",children:(0,s.jsx)(x.Z,{className:"w-[15px] h-[15px]"})}),(0,s.jsx)("button",{onClick:()=>eX([t.id]),className:"p-1.5 rounded-md hover:bg-red-50 text-gray-400 hover:text-red-500 transition-colors",title:"Delete",children:(0,s.jsx)(u.Z,{className:"w-[15px] h-[15px]"})})]})})]})},te=e=>(0,s.jsx)(G,{id:e.original.id,dragEnabled:eP,isSelected:eh.has(e.original.id),children:e8(e)},e.original.id),tt=F.filter(e=>e.groupable),ta="flex items-center gap-1.5 px-3 h-[34px] border border-gray-200 rounded-full text-[13px] bg-white hover:border-gray-300 transition-colors",ts=(0,n.useMemo)(()=>{if(!eE)return null;let e=window.innerHeight,t=window.innerWidth;return{left:Math.min(eE.anchor.x,t-280-12),width:280,...eE.anchor.y+140>e-12?{bottom:e-eE.anchor.y+28}:{top:eE.anchor.y+6}}},[eE]);return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,s.jsx)("h2",{className:"text-[19px] font-semibold text-gray-900 tracking-tight",children:t}),(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(h.Z,{className:"w-[15px] h-[15px] absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"}),(0,s.jsx)("input",{value:$,onChange:e=>ee(e.target.value),placeholder:"Search...",className:"pl-9 pr-3 h-[34px] border border-gray-200 rounded-full text-[13px] w-48 bg-white focus:outline-none focus:ring-2 focus:ring-[#F07B6E]/20 focus:border-[#F07B6E]/50 transition-shadow"})]}),eM.length>0&&(0,s.jsxs)("div",{className:ta,children:[(0,s.jsx)(m.Z,{className:"w-[14px] h-[14px] text-gray-400"}),(0,s.jsxs)("select",{value:et,onChange:e=>ea(e.target.value),className:"text-[13px] bg-transparent focus:outline-none cursor-pointer",children:[(0,s.jsx)("option",{value:"",children:"All tags"}),eM.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]})]}),(0,s.jsxs)("div",{className:ta,children:[(0,s.jsx)(p.Z,{className:"w-[14px] h-[14px] text-gray-400"}),(0,s.jsxs)("select",{value:es,onChange:e=>er(e.target.value),className:"text-[13px] bg-transparent focus:outline-none cursor-pointer",children:[(0,s.jsx)("option",{value:"",children:"All status"}),(0,s.jsx)("option",{value:"active",children:"Active"}),(0,s.jsx)("option",{value:"inactive",children:"Inactive"})]})]}),(0,s.jsxs)("div",{className:ta,children:[(0,s.jsx)(g.Z,{className:"w-[14px] h-[14px] text-gray-400"}),(0,s.jsxs)("select",{value:ec,onChange:e=>ed(e.target.value),className:"text-[13px] bg-transparent focus:outline-none cursor-pointer",children:[(0,s.jsx)("option",{value:"",children:"No grouping"}),tt.map(e=>(0,s.jsxs)("option",{value:e.key,children:["Group by ",e.label]},e.key))]})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("button",{onClick:()=>eg(e=>!e),className:ta,children:[(0,s.jsx)(b.Z,{className:"w-[14px] h-[14px] text-gray-400"})," Columns"]}),ep&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed inset-0 z-10",onClick:()=>eg(!1)}),(0,s.jsxs)("div",{className:"absolute right-0 top-full mt-1.5 z-20 bg-white border border-gray-100 rounded-xl shadow-lg ring-1 ring-black/5 p-1.5 w-52",children:[(0,s.jsx)("p",{className:"px-2.5 py-1.5 text-[11px] font-medium text-gray-400 uppercase tracking-wide",children:"Show columns"}),eR.getAllLeafColumns().map(e=>(0,s.jsxs)("label",{className:"flex items-center gap-2.5 px-2.5 py-1.5 hover:bg-gray-50 rounded-lg cursor-pointer text-[13px] text-gray-700",children:[(0,s.jsx)("input",{type:"checkbox",checked:e.getIsVisible(),onChange:e.getToggleVisibilityHandler(),className:"w-[15px] h-[15px] rounded accent-[#F07B6E]"}),String(e.columnDef.header)]},e.id))]})]})]}),B&&(0,s.jsxs)("button",{onClick:()=>ef(!0),className:ta,children:[(0,s.jsx)(f.Z,{className:"w-[14px] h-[14px] text-gray-400"})," Find & Replace"]}),A&&(0,s.jsxs)("button",{onClick:A,className:"flex items-center gap-1.5 px-4 h-[34px] bg-[#F07B6E] text-white rounded-full text-[13px] font-medium hover:bg-[#
1E06B5E] transition-colors shadow-sm",children:[(0,s.jsx)(y.Z,{className:"w-4 h-4"})," Add"]})]})]}),eh.size>0&&B&&(0,s.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 bg-white border border-[#F07B6E]/30 rounded-xl shadow-sm",children:[(0,s.jsxs)("span",{className:"text-[13px] text-gray-900 font-medium",children:[eh.size," selected"]}),(0,s.jsx)("div",{className:"flex-1"}),(0,s.jsxs)("button",{onClick:()=>e$(!0),disabled:ew,className:"flex items-center gap-1.5 px-3 h-8 rounded-lg text-[13px] text-gray-700 hover:bg-gray-50 border border-gray-200 disabled:opacity-50 transition-colors",children:[(0,s.jsx)(p.Z,{className:"w-3.5 h-3.5 text-green-500"})," Enable"]}),(0,s.jsxs)("button",{onClick:()=>e$(!1),disabled:ew,className:"flex items-center gap-1.5 px-3 h-8 rounded-lg text-[13px] text-gray-700 hover:bg-gray-50 border border-gray-200 disabled:opacity-50 transition-colors",children:[(0,s.jsx)(p.Z,{className:"w-3.5 h-3.5 text-gray-400"})," Disable"]}),(0,s.jsxs)("button",{onClick:()=>eX(Array.from(eh)),disabled:ew,className:"flex items-center gap-1.5 px-3 h-8 rounded-lg text-[13px] text-red-500 hover:bg-red-50 border border-red-200 disabled:opacity-50 transition-colors",children:[(0,s.jsx)(u.Z,{className:"w-3.5 h-3.5"})," Delete"]}),(0,s.jsx)("div",{className:"w-px h-5 bg-gray-200 mx-1"}),(0,s.jsx)("button",{onClick:()=>em(new Set),className:"p-1.5 rounded-lg hover:bg-gray-100 text-gray-400 transition-colors",children:(0,s.jsx)(j.Z,{className:"w-4 h-4"})})]}),(0,s.jsxs)("div",{className:"border border-gray-200 rounded-xl bg-white shadow-sm overflow-hidden",children:[(0,s.jsx)("div",{className:"overflow-x-auto",children:X?(0,s.jsx)("div",{className:"flex items-center justify-center h-40",children:(0,s.jsx)(v.Z,{className:"w-6 h-6 animate-spin text-gray-300"})}):0===eI.length?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center h-44 text-gray-300",children:[(0,s.jsx)(N.Z,{className:"w-9 h-9 mb-2"}),(0,s.jsx)("p",{className:"text-[13px] text-gray-400",children:"No items found"})]}):(0,s.jsx)(Z.LB,{sensors:eT,collisionDetection:Z.pE,modifiers:[D.DL],onDragEnd:eH,children:(0,s.jsxs)("table",{className:"w-full border-collapse",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"bg-gray-50",children:[(0,s.jsx)("th",{className:"border-b border-gray-200 px-1 h-[38px] w-8"}),(0,s.jsx)("th",{className:"border-b border-r border-gray-200 px-2 py-0 h-[38px] w-9 text-center",children:(0,s.jsx)("input",{type:"checkbox",checked:eG,onChange:()=>em(eG?new Set:new Set(eK)),className:"w-[15px] h-[15px] rounded accent-[#F07B6E] align-middle"})}),eR.getHeaderGroups()[0].headers.map((e,t)=>{let a=e.column.getCanSort();return(0,s.jsx)("th",{className:"border-b border-gray-200 px-3.5 h-[38px] text-left ".concat(t<e7-1?"border-r border-gray-100":""),children:a?(0,s.jsxs)("button",{onClick:e.column.getToggleSortingHandler(),className:"flex items-center gap-1.5 text-[12px] font-medium text-gray-500 hover:text-gray-900 transition-colors w-full",children:[(0,l.ie)(e.column.columnDef.header,e.getContext()),"asc"===e.column.getIsSorted()?(0,s.jsx)(w.Z,{className:"w-3 h-3 text-[#F07B6E]"}):"desc"===e.column.getIsSorted()?(0,s.jsx)(k.Z,{className:"w-3 h-3 text-[#F07B6E]"}):(0,s.jsx)(S.Z,{className:"w-3 h-3 opacity-30"})]}):(0,s.jsx)("span",{className:"flex items-center text-[12px] font-medium text-gray-500 w-full",children:(0,l.ie)(e.column.columnDef.header,e.getContext())})},e.id)}),(0,s.jsx)("th",{className:"border-b border-l border-gray-200 px-3.5 h-[38px] w-[170px] text-right text-[12px] font-medium text-gray-500",children:"Actions"})]})}),(0,s.jsx)("tbody",{children:eV?eV.map(e=>{let[t,a]=e;return(0,s.jsx)(q,{name:t,count:a.length,collapsed:ex.has(t),onToggle:()=>eu(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a}),colSpan:e7+3,children:a.map(te)},t)}):(0,s.jsx)(T.Fo,{items:ez.map(e=>e.original.id),strategy:T.qw,children:ez.map(te)})})]})})}),!X&&eI.length>0&&(0,s.jsxs)("div",{className:"px-4 py-2 border-t border-gray-100 bg-gray-50/50 text-[12px] text-gray-400 flex items-center gap-2",children:[(0,s.jsxs)("span",{children:[eI.length," item",1!==eI.length?"s":"",eI.length!==Q.length?" of ".concat(Q.length):""]}),!eP&&o&&eL.length>0&&(0,s.jsxs)("span",{className:"text-gray-300",children:["\xb7 Reordering disabled: ",eL.join(", ")," active",(0,s.jsx)("button",{onClick:()=>{el([]),ed(""),ee(""),ea(""),er("")},className:"ml-1.5 text-[#F07B6E] hover:underline",children:"Clear"})]})]})]}),eE&&ts&&(0,s.jsxs)(_.h,{children:[(0,s.jsx)("div",{className:"fixed inset-0 z-40",onClick:e6}),(0,s.jsxs)("div",{className:"fixed z-50 bg-white border border-gray-100 rounded-xl shadow-xl ring-1 ring-black/5 p-3",style:ts,children:[(0,s.jsxs)("div",{className:"flex flex-wrap gap-1.5 mb-2",children:[0===eE.tags.length&&(0,s.jsx)("span",{className:"text-xs text-gray-300",children:"No tags"}),eE.tags.map(e=>(0,s.jsxs)("span",{className:"flex items-center gap-1 text-[11px] font-medium bg-gray-100 text-gray-700 rounded-full pl-2 pr-1 py-0.5",children:[e,(0,s.jsx)("button",{onClick:()=>eF({...eE,tags:eE.tags.filter(t=>t!==e)}),className:"p-0.5 rounded-full hover:bg-gray-200 text-gray-400",children:(0,s.jsx)(j.Z,{className:"w-3 h-3"})})]},e))]}),(0,s.jsxs)("div",{className:"flex gap-1.5",children:[(0,s.jsx)("input",{autoFocus:!0,value:eE.input,onChange:e=>eF({...eE,input:e.target.value}),onKeyDown:e=>{"Enter"===e.key&&eE.input.trim()&&eF({...eE,tags:[...eE.tags,eE.input.trim().toLowerCase()].filter((e,t,a)=>a.indexOf(e)===t),input:""}),"Escape"===e.key&&eF(null)},placeholder:"Add tag, press Enter",className:"flex-1 px-2.5 py-1.5 border border-gray-200 rounded-lg text-[12px] focus:outline-none focus:ring-2 focus:ring-[#F07B6E]/20"}),(0,s.jsx)("button",{onClick:e6,className:"p-1.5 bg-[#F07B6E] text-white rounded-lg hover:bg-[#
1E06B5E] transition-colors",children:(0,s.jsx)(C.Z,{className:"w-3.5 h-3.5"})})]})]})]}),eb&&B&&(0,s.jsx)(R,{searchEndpoint:B.search,replaceEndpoint:B.replace,idsField:B.idsField,projectId:a,onClose:()=>ef(!1),onDone:e_}),ey&&I&&(0,s.jsx)(P,{preview:ey,projectId:a,onClose:()=>ej(null),onExpand:()=>ej(e=>e?{...e,mode:"modal"}:null),onMouseEnter:()=>{eB.current&&(clearTimeout(eB.current),eB.current=null)},onMouseLeave:e1}),ev&&(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-gray-900/40 backdrop-blur-[2px]",onClick:()=>!ew&&eN(null),children:(0,s.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl ring-1 ring-black/5 w-[480px] max-h-[70vh] flex flex-col overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,s.jsx)("div",{className:"px-6 py-4 border-b border-gray-100",children:(0,s.jsxs)("h3",{className:"font-semibold text-gray-900 text-[15px]",children:["Delete ",ev.ids.length>1?"".concat(ev.ids.length," items"):"item","?"]})}),(0,s.jsx)("div",{className:"flex-1 overflow-auto px-6 py-5 space-y-3",children:ev.usages.filter(e=>e.used_count>0).length>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-start gap-2.5 text-amber-700 bg-amber-50 border border-amber-100 rounded-xl p-3.5",children:[(0,s.jsx)(E.Z,{className:"w-4 h-4 mt-0.5 shrink-0"}),(0,s.jsx)("p",{className:"text-xs leading-relaxed",children:"These items are in use. Deleting will remove them from all places listed below."})]}),(0,s.jsx)("div",{className:"border border-gray-100 rounded-xl divide-y divide-gray-50 max-h-48 overflow-auto",children:ev.usages.filter(e=>e.used_count>0).map(e=>{let t=Q.find(t=>t.id===e.section_id);return(0,s.jsxs)("div",{className:"px-3.5 py-2.5",children:[(0,s.jsx)("p",{className:"text-[13px] font-medium text-gray-900",children:(null==t?void 0:t.name)||"#".concat(e.section_id)}),(0,s.jsx)("p",{className:"text-xs text-gray-400 mt-0.5",children:e.usages.map((e,t)=>(0,s.jsxs)("span",{children:[t>0&&" \xb7 ","all"===e.scope?'All "'.concat(e.name,'"'):e.name]},t))})]},e.section_id)})})]}):(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"This action cannot be undone."})}),(0,s.jsxs)("div",{className:"flex gap-2.5 px-6 py-4 border-t border-gray-100 bg-gray-50/60",children:[(0,s.jsx)("button",{onClick:()=>eN(null),disabled:ew,className:"flex-1 px-4 py-2.5 border border-gray-200 rounded-xl text-sm font-medium text-gray-600 hover:bg-white disabled:opacity-50 transition-colors",children:"Cancel"}),(0,s.jsxs)("button",{onClick:eY,disabled:ew,className:"flex-1 px-4 py-2.5 bg-red-500 text-white text-sm font-medium rounded-xl hover:bg-red-600 disabled:opacity-50 flex items-center justify-center gap-2 transition-colors",children:[ew&&(0,s.jsx)(v.Z,{className:"w-4 h-4 animate-spin"})," Delete"]})]})]})})]})}function q(e){let{name:t,count:a,collapsed:r,onToggle:n,colSpan:l,children:i}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("tr",{className:"bg-gray-50/80 cursor-pointer hover:bg-gray-100/80 transition-colors",onClick:n,children:(0,s.jsx)("td",{colSpan:l,className:"border-b border-gray-200 px-3.5 py-2",children:(0,s.jsxs)("div",{className:"flex items-center gap-2 text-[13px] font-semibold text-gray-700",children:[r?(0,s.jsx)(F.Z,{className:"w-4 h-4 text-gray-400"}):(0,s.jsx)(B.Z,{className:"w-4 h-4 text-gray-400"}),t,(0,s.jsx)("span",{className:"text-[11px] font-medium text-gray-400 bg-white border border-gray-200 rounded-full px-2 py-0.5",children:a})]})})}),!r&&i]})}var Q=a(29420);function U(e){let{projectId:t}=e,a=(0,r.useRouter)();return(0,s.jsx)(W,{title:"Sections",projectId:t,apiEndpoint:"/api/v1/modules/cms/sections",cloneTable:"cms_sections",onEdit:e=>a.push("/manage/cms/sections/".concat(e.id)),onCreate:()=>a.push("/manage/cms/sections/new"),previewEnabled:!0,bulkEndpoints:{search:"/api/v1/modules/cms/bulk/sections/search",replace:"/api/v1/modules/cms/bulk/sections/replace",status:"/api/v1/modules/cms/bulk/sections/status",delete:"/api/v1/modules/cms/bulk/sections/delete",usage:"/api/v1/modules/cms/bulk/sections/usage",idsField:"section_ids"},columns:[{key:"name",label:"Name",sortable:!0,editable:"text"},{key:"tags",label:"Tags",sortable:!0,sortType:"tags",groupable:!0,editable:"tags",render:e=>{let t=e;if("string"==typeof t)try{t=JSON.parse(t)}catch(e){t=[]}return Array.isArray(t)&&0!==t.length?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>(0,s.jsx)(Q.C,{variant:"outline",className:"rounded-none text-xs",children:e},e))}):(0,s.jsx)("span",{className:"text-gray-300 text-xs",children:"—"})}},{key:"enabled",label:"Status",sortable:!0,groupable:!0,render:e=>(0,s.jsx)(Q.C,{variant:e?"default":"secondary",className:"rounded-none",children:e?"Active":"Inactive"})}]})}},4586:function(e,t,a){a.d(t,{cn:function(){return n}});var s=a(10607),r=a(25579);function n(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,r.m6)((0,s.W)(t))}},29420:function(e,t,a){a.d(t,{C:function(){return i}});var s=a(27573);a(7653);var r=a(49289),n=a(4586);let l=(0,r.j)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-[#F07B6E] text-white shadow hover:bg-[#F07B6E]/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i(e){let{className:t,variant:a,...r}=e;return(0,s.jsx)("div",{className:(0,n.cn)(l({variant:a}),t),...r})}},48924:function(e,t,a){a.d(t,{h:function(){return n}});var s=a(7653),r=a(3458);function n(e){let{children:t}
1=e,[a,n]=(0,s.useState)(!1);return((0,s.useEffect)(()=>{n(!0)},[]),a)?(0,r.createPortal)(t,document.body):null}}}]);

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.