1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3324,45532],{3324:(e,t,r)=>{r.r(t),r.d(t,{default:()=>G});var l=r(95155),n=r(43866),a=r(26399),s=r(12115),i=r(52619),o=r.n(i),c=r(20063),d=r(63892),u=r(45532),m=r(2644);let h=(0,s.memo)(function(e){var t,r;let{onToggle:n}=e,a=(0,c.usePathname)(),s=(0,m.tg)(a)&&"/"!==a,{data:i}=(0,u.useGetStatsQuery)(void 0,{skip:s}),h=(null==i||null==(r=i.data)||null==(t=r.reading_list)?void 0:t.count)||0,x=()=>{window.innerWidth<1024&&n&&n()},g=(null==a?void 0:a.startsWith("/collections/"))&&"/collections/unsorted"!==a&&!(null==a?void 0:a.startsWith("/collections/unsorted/"));return(0,l.jsxs)("div",{className:"sidebar-top flex-shrink-0",children:[[{href:"/",label:"Dashboard",iconName:"Grid",count:0},{href:"/favorites",label:"Favorites",iconName:"Heart",count:0},{href:"/reading-list",label:"Reading List",iconName:"Reading",count:h},{href:"/collections/unsorted",label:"Raw & Unsorted",iconName:"Folderblue",count:0}].map(e=>(0,l.jsxs)(o(),{href:e.href,onClick:x,className:"h-[32px] sidebar-item select-none mx-[12px] rounded-[8px] py-1 hover:bg-[#ececec] dark:hover:bg-gray-600 flex justify-between\n ".concat((a===e.href||"/collections/unsorted"===e.href&&(null==a?void 0:a.startsWith("/collections/unsorted")))&&!g?"bg-[#ececec] dark:bg-gray-600":""),children:[(0,l.jsxs)("div",{className:"flex items-center px-[12px]",children:[(0,l.jsx)(d.A,{name:e.iconName,width:16,height:16,...e.iconColor?{color:e.iconColor}:{className:"text-[#5d5d5d] dark:text-gray-200"}}),(0,l.jsx)("span",{className:"text-gray-800 dark:text-gray-200 ml-[12px] font-medium text-sm",children:e.label})]}),e.badge?(0,l.jsx)("div",{className:"flex items-center pr-[12px]",children:(0,l.jsx)("span",{className:"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300 text-xs px-1.5 py-0.5 rounded-[6px] font-medium",children:e.badge})}):e.count>0?(0,l.jsx)("div",{className:"flex items-center pr-[12px]",children:(0,l.jsx)("span",{className:"bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300 text-xs px-1.5 py-0.5 rounded-[6px] font-medium",children:e.count})}):null]},e.href)),(0,l.jsx)("div",{className:"mx-5 mt-2.5 mb-2"})]})});var x=r(35569),g=r(30863),p=r(19191),f=r(16105),v=r(38207),y=r(94266),b=r(98394),j=r(91285),w=r(98053),k=r(53606),N=r(18514);let C=function(e){let{collection:t,children:r,onAddNestedCollection:n,onEdit:a,onDelete:i,onOpenChange:o,onSelect:c}=e,[u,m]=(0,s.useState)(!1),[h,x]=(0,s.useState)(!1);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(j.Ay,{trigger:r,onOpenChange:e=>{m(e),null==o||o(e)},contentClassName:"min-w-[220px]",align:"start",side:"bottom",children:[(0,l.jsxs)(j._2,{className:"flex items-center gap-3 cursor-pointer",onClick:()=>{m(!1),null==c||c()},children:[(0,l.jsx)(k.A,{size:20,className:"text-[#5D5D5D] dark:text-gray-200"}),(0,l.jsx)("span",{className:"font-medium text-sm",children:"Select"})]}),(!t.permission||"admin"===t.permission||"edit"===t.permission||"owner"===t.permission)&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(j._2,{className:"flex items-center gap-3 cursor-pointer",onClick:n,children:[(0,l.jsx)(d.A,{name:"Folderblue",width:20,height:20}),(0,l.jsx)("span",{className:"font-medium text-sm",children:"Add Nested Collection"})]}),(0,l.jsxs)(j._2,{className:"flex items-center gap-3 cursor-pointer",onClick:a,children:[(0,l.jsx)(N.A,{size:20,className:"text-[#5D5D5D] dark:text-gray-200"}),(0,l.jsx)("span",{className:"font-medium text-sm",children:"Rename"})]}),(0,l.jsxs)(j._2,{className:"flex items-center gap-3 cursor-pointer",onClick:()=>{m(!1),x(!0)},children:[(0,l.jsx)(d.A,{name:"Trash",width:20,height:20,color:"#EF4444"}),(0,l.jsx)("span",{className:"font-medium text-sm text-red-500",children:"Delete"})]})]})]}),(0,l.jsx)(w.Lt,{open:h,onOpenChange:x,children:(0,l.jsxs)(w.EO,{children:[(0,l.jsxs)(w.wd,{children:[(0,l.jsx)(w.r7,{children:"Are you absolutely sure?"}),(0,l.jsx)(w.$v,{children:"This action cannot be undone. This will permanently delete your resource"})]}),(0,l.jsxs)(w.ck,{children:[(0,l.jsx)(w.Zr,{children:"Cancel"}),(0,l.jsx)(w.Rx,{onClick:e=>{e.stopPropagation(),m(!1),x(!1),i()},className:"bg-red-600 hover:bg-red-700 text-white",children:"Delete"})]})]})})]})},S=(0,s.createContext)(void 0),A=e=>{let{children:t}
1=e,[r,n]=(0,s.useState)(new Set),[a,i]=(0,s.useState)(!1),o=(0,s.useCallback)(e=>{n(t=>{let r=new Set(t);return r.has(e)?(r.delete(e),0===r.size&&i(!1)):r.add(e),r})},[]),c=(0,s.useCallback)(()=>{n(new Set)},[]),d=(0,s.useCallback)(e=>{n(new Set(e))},[]),u=(0,s.useCallback)(e=>{i(!0),e&&n(new Set([e]))},[]),m=(0,s.useCallback)(()=>{i(!1),c()},[c]),h=(0,s.useCallback)(e=>r.has(e),[r]),x=(0,s.useMemo)(()=>({selectedCollectionIds:r,isSelectionMode:a,toggleSelection:o,clearSelections:c,selectAll:d,enterSelectionMode:u,exitSelectionMode:m,isSelected:h,selectedCount:r.size}),[r,a,o,c,d,u,m,h]);return(0,l.jsx)(S.Provider,{value:x,children:t})},D=()=>{let e=(0,s.useContext)(S);if(!e)throw Error("useCollectionSelection must be used within a CollectionSelectionProvider");return e};var E=r(79933),F=r(34633),I=r(94994),M=r(20781);function R(e){let{isOpen:t,onClose:r,collection:n,onSuccess:a}=e,{toast:i}=(0,E.dj)(),[o,c]=(0,s.useState)(""),[d,u]=(0,s.useState)(!1),[m]=(0,f.useUpdateCollectionMutation)();(0,s.useEffect)(()=>{t&&n&&c(n.title||n.name||"")},[t,n]);let h=()=>{r(),c("")},x=async()=>{if(!o.trim())return;let e={name:o};u(!0);try{await m({collectionId:n.id,payload:e}).unwrap(),h(),i({title:"Collection renamed",description:'Collection has been renamed to "'.concat(o,'"')}),a&&a()}catch(t){if(e.name)try{await m({collectionId:n.id,payload:{title:o}}).unwrap(),h(),i({title:"Collection renamed",description:'Collection has been renamed to "'.concat(o,'"')}),a&&a();return}catch(e){console.error("Retry also failed:",e)}i({variant:"destructive",title:"Error",description:"Failed to rename collection. Please try again."})}finally{u(!1)}};return(0,l.jsx)(I.A,{isOpen:t,onClose:h,title:"Rename Collection",size:"sm",children:(0,l.jsxs)("div",{className:"space-y-4",children:[(0,l.jsx)("div",{children:(0,l.jsx)("input",{id:"collection-name",type:"text",value:o,onChange:e=>c(e.target.value),onKeyDown:e=>{"Enter"===e.key&&o.trim()?x():"Escape"===e.key&&h()},placeholder:"Collection Name",className:"w-full px-3 py-2 border border-gray-100 rounded-md focus:outline-none ",autoFocus:!0})}),(0,l.jsxs)("div",{className:"flex justify-end gap-3 w-full pt-2",children:[(0,l.jsx)(M.$,{className:"min-w-[100px] min-w-[66] h-[40p
1x]",variant:"dark",onClick:h,disabled:d,children:"Cancel"}),(0,l.jsx)(M.$,{className:"min-w-[100px] min-w-[66] h-[40px]",variant:"black",onClick:x,disabled:d||!o.trim(),children:d?"Renaming...":"Rename"})]})]})})}let O="COLLECTION",L=(0,s.memo)(e=>{let{collection:t,level:r,hasChildren:n,isExpanded:a,onToggle:i,isDragOverlay:u,isMenuOpen:m,onMenuOpen:h,onMenuClose:x,isSelected:g,onToggleSidebar:j,canAcceptNesting:w=!1,isDragActive:k=!1,onDrop:N,onDragMove:S,onDragEnd:A,onDragStart:I,onDragStartWithId:M}=e,L=(0,c.useRouter)(),{toast:P}=(0,E.dj)(),_=(0,s.useRef)(null),T=(0,s.useRef)(null),[z,U]=(0,s.useState)(""),[q,W]=(0,s.useState)(!1),[Z,B]=(0,s.useState)(!1),[Q,$]=(0,s.useState)(!1),[G,Y]=(0,s.useState)(!1),[J,K]=(0,s.useState)(!1),[H,V]=(0,s.useState)(null),X=(0,s.useRef)(!1),[ee]=(0,f.useUpdateCollectionMutation)(),[et]=(0,f.useDeleteCollectionMutation)(),{updateSelectedCollectionId:er,expandedState:el,toggleExpandedState:en}=(0,p.D)(),{isSelectionMode:ea,isSelected:es,toggleSelection:ei,enterSelectionMode:eo}=D(),[{isDragging:ec},ed]=(0,y.i)({type:O,item:()=>(X.current=n&&a,{id:t.id.toString(),collection:t}),canDrag:!q&&!ea&&!t.isUnsorted,end:()=>{X.current&&(X.current=!1),A&&A()},collect:e=>({isDragging:e.isDragging()})});(0,s.useEffect)(()=>{ec&&(I&&I(),n&&a&&M&&M(t.id.toString()))},[ec,n,a,t.id,I,M]);let[{isOver:eu},em]=(0,b.H)({accept:O,hover:(e,r)=>{if(!T.current||e.id===t.id.toString())return;let l=r.getClientOffset(),n=T.current.getBoundingClientRect();if(!l)return;let a=(l.y-n.top)/n.height;a<.33?V("before"):a>.67?V("after"):V("inside"),S&&S(l.y)},drop:e=>{N&&H&&e.id!==t.id.toString()&&N(e.id,t.id.toString(),H),V(null)},collect:e=>({isOver:e.isOver()})});ed(em(T));(0,s.useEffect)(()=>{if(q){var e,t;null==_||null==(e=_.current)||e.focus(),null==_||null==(t=_.current)||t.select()}},[q]);let eh=async e=>{if(27==e.keyCode)W(!1);else if(13==e.keyCode){B(!0);try{await ee({collectionId:t.id,payload:{title:z}}).unwrap(),W(!1)}catch(e){console.error("Failed to update collection:",e)}finally{B(!1)}}},ex=async()=>{try{await et(null==t?void 0:t.id).unwrap(),P({title:"Collection deleted",description:'Collection "'.concat(t.title||t.name,'" has been deleted successfully')}),window.location.pathname.includes("/collections/".concat(t.id))&&(t.parent_id?L.push("/collections/".concat(t.parent_id)):L.push("/"))}catch(t){var e,r;422===t.status&&(null==(r=t.data)||null==(e=r.message)?void 0:e.includes("dependent resources exist"))?P({variant:"destructive",title:"Cannot delete collection",description:"This collection contains resources. Please move or delete all resources first, then try again."}):P({variant:"destructive",title:"Error",description:"Failed to delete collection. Please try again."})}},eg=eu&&"before"===H,ep=eu&&"after"===H,ef=eu&&"inside"===H,ev=ec&&X.current;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{ref:T,style:{opacity:ec?.4:1},className:"h-[36px] pl-[12px] ".concat(n?"pr-[9px]":"pr-[32px]"," w-full cursor-pointer flex justify-between items-center group relative whitespace-nowrap overflow-hidden rounded-[8px] transition-colors duration-150 ").concat(!k?"hover:bg-[#ececec] dark:hover:bg-gray-600 active:bg-[#e0e0e0] dark:active:bg-gray-700":"","\n ").concat(m?"bg-[#ececec] dark:bg-gray-600":"","\n ").concat(g||Q?"bg-[#ececec] dark:bg-gray-600":"","\n ").concat(u?"bg-[#ececec] dark:bg-gray-600":"","\n ").concat(ea&&es(t.id)?"bg-[#E6F5FF] hover:bg-[#CCE9FF]":"","\n ").concat(ef?"ring-2 ring-inset ring-blue-400 dark:ring-blue-500 bg-blue-50 dark:bg-blue-900/20":""),onMouseLeave:()=>{V(null)},children:[eg&&(0,l.jsx)("div",{className:"absolute top-0 left-0 right-0 h-[2px] bg-blue-400 dark:bg-blue-500 pointer-events-none",style:{transform:"translateY(-1px)"}}),ep&&(0,l.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-[2px] bg-blue-400 dark:bg-blue-500 pointer-events-none",style:{transform:"translateY(1px)"}}),q?(0,l.jsx)("div",{className:"flex items-center w-full h-full overflow-hidden",children:(0,l.jsxs)("div",{style:{marginLeft:"".concat(r>0?16*r:0,"px")},className:"flex items-center overflow-hidden",children:[n&&(0,l.jsx)("div",{className:"w-4 h-4",children:(0,l.jsx)(v.c,{className:"text-gray-500 w-4 h-4"})}),(0,l.jsx)("div",{className:"emoji-wrapper",children:Z?(0,l.jsx)("div",{className:"spinner"}):"emoji"===t.icon_type?(0,l.jsx)("span",{className:"text-lg",children:t.icon}):(0,l.jsx)(d.A,{name:"Folderblue",width:18,height:18,color:"#0D99FF"})}),(0,l.jsx)("input",{ref:_,type:"text",value:z,onChange:e=>U(e.target.value),onKeyUp:eh,className:"w-full h-full outline-none bg-transparent text-sm font-medium text-gray-900 dark:text-gray-100 placeholder-gray-400 dark:placeholder-gray-500 ml-2",placeholder:"Enter collection name..."})]})}):(0,l.jsxs)("div",{className:"flex items-center w-full h-full overflow-hidden",children:[ea&&(0,l.jsx)("div",{className:"flex items-center justify-center w-5 h-5 ml-1 mr-2",children:(0,l.jsx)("input",{type:"checkbox",checked:es(String(t.id)),onChange:e=>{e.preventDefault(),e.stopPropagation(),ei(String(t.id))},className:"w-3.5 h-3.5 text-[#0D99FF] border-gray-100 rounded focus:ring-[#0D99FF] cursor-pointer"})}),ea?(0,l.jsx)("div",{onClick:e=>{e.preventDefault(),e.stopPropagation(),ei(String(t.id))},className:"flex items-center flex-1 h-full overflow-hidden cursor-pointer",children:(0,l.jsxs)("div",{style:{marginLeft:"".concat(r>0?16*r:0,"px")}
1,className:"flex items-center overflow-hidden min-w-0",children:[(0,l.jsx)("div",{className:"emoji-wrapper flex-shrink-0",children:"emoji"===t.icon_type?(0,l.jsx)("span",{className:"text-lg",children:t.icon}):(0,l.jsx)(d.A,{name:"Folderblue",width:18,height:18,color:"#0D99FF"})}),(0,l.jsx)("span",{className:"text-[14px] font-medium text-gray-900 dark:text-gray-200 ml-[10px] truncate min-w-0",children:t.title||t.name})]})}):(0,l.jsx)(o(),{href:"/collections/".concat(t.id),className:"flex items-center flex-1 h-full overflow-hidden",onClick:()=>{window.innerWidth<1024&&j&&j()},children:(0,l.jsxs)("div",{style:{marginLeft:"".concat(r>0?16*r:0,"px")},className:"flex items-center overflow-hidden min-w-0",children:[(0,l.jsx)("div",{className:"emoji-wrapper flex-shrink-0",children:"emoji"===t.icon_type?(0,l.jsx)("span",{className:"text-lg",children:t.icon}):(0,l.jsx)(d.A,{name:"Folderblue",width:18,height:18,color:"#0D99FF"})}),(0,l.jsx)("span",{className:"text-[14px] font-medium text-gray-900 dark:text-gray-200 ml-[10px] truncate min-w-0",children:t.title||t.name})]})})]}),(0,l.jsx)("div",{className:"opacity-100 lg:opacity-0 lg:group-hover:opacity-100 ".concat(Q?"lg:!opacity-100":""," transition-opacity ").concat(n?"mr-2":"absolute right-2"),children:(0,l.jsx)(C,{collection:t,onAddNestedCollection:()=>{Y(!0),$(!1)},onEdit:()=>{K(!0),$(!1)},onDelete:ex,onOpenChange:$,onSelect:()=>{eo(String(t.id))},children:(0,l.jsx)("button",{onClick:e=>{e.stopPropagation()},className:"p-1 flex items-center justify-center rounded-sm hover:bg-[#d9d9d9] dark:hover:bg-gray-700 cursor-pointer",children:(0,l.jsx)(d.A,{name:"Moremenu",width:16,height:16,color:"#5d5d5d"})})})}),!q&&(0,l.jsx)("div",{className:"flex items-center",children:!u&&(0,l.jsx)("div",{className:"flex items-center invisible group-hover:visible ".concat(m?"!visible":"")})}),n?(0,l.jsx)("div",{onClick:e=>{e.preventDefault(),i()},className:"p-1 flex items-center justify-center cursor-pointer rounded-sm hover:bg-[#d9d9d9] dark:hover:bg-gray-700",children:(0,l.jsx)("div",{className:"transform transition-transform duration-200 ".concat(a&&!ev?"":"-rotate-90"),children:(0,l.jsx)(d.A,{name:"ArrowDown",color:"#5d5d5d",width:16,height:16})})}):null]}),(0,l.jsx)(F.A,{isOpen:G,onClose:()=>Y(!1),parentCollection:{id:t.id,title:t.title,name:t.name,icon:t.icon,icon_type:t.icon_type},onSuccess:e=>{a||i(),er(e),L.push("/collections/".concat(e))}}),(0,l.jsx)(R,{isOpen:J,onClose:()=>K(!1),collection:{id:t.id,title:t.title,name:t.name},onSuccess:()=>{}})]})},(e,t)=>e.collection.id===t.collection.id&&e.collection.title===t.collection.title&&e.collection.icon===t.collection.icon&&e.collection.icon_type===t.collection.icon_type&&e.level===t.level&&e.hasChildren===t.hasChildren&&e.isExpanded===t.isExpanded&&e.isMenuOpen===t.isMenuOpen&&e.isSelected===t.isSelected&&e.isDragOverlay===t.isDragOverlay&&e.canAcceptNesting===t.canAcceptNesting&&e.isDragActive===t.isDragActive),P=e=>{let{collections:t,selectedCollectionId:r,onToggle:n,scrollRef:a}=e,{selectedCollectionId:i,toggleExpandedState:o,expandedState:c}=(0,p.D)(),d=void 0!==r?r:i,[u]=(0,f.useBatchReorderCollectionsMutation)(),[m,h]=(0,s.useState)(null),x=(0,s.useRef)(null),{toast:v}=(0,E.dj)(),y=(0,s.useRef)(null),b=(0,s.useRef)(!1),j=(0,s.useRef)(0),[w,k]=(0,s.useState)(null),[N,C]=(0,s.useState)(!1),S=(0,s.useMemo)(()=>{let e=new Map;return t.forEach(t=>{let r=String(t.id);e.set(r,t)}),e},[t]),A=(0,s.useCallback)(e=>{if(null!=e)return S.get(String(e))},[S]),D=(0,s.useMemo)(()=>t.filter(e=>{var t,r,l,n;if(!e.parentId)return!0;if(w){let l=null!=(t=e.parentId)?t:null;for(;l;){if(String(l)===w)return!1;let e=A(l);l=null!=(r=null==e?void 0:e.parentId)?r:null}}let a=null!=(l=e.parentId)?l:null;for(;a;){if(!c[String(a)])return!1;let e=A(a);a=null!=(n=null==e?void 0:e.parentId)?n:null}return!0}),[t,A,c,w]),F=(0,s.useCallback)(e=>h(e),[]),I=(0,s.useCallback)(()=>h(null),[]),M=(0,s.useCallback)(()=>{var e;if(!b.current)return;let t=(null==a?void 0:a.current)||(null==(e=x.current)?void 0:e.querySelector('[style*="overflow"]'));if(!t)return;let r=j.current,l=t.getBoundingClientRect(),n=r-l.top,s=l.bottom-r,i=0;n<100&&n>0?i=-Math.min(20,(100-n)/100*20):s<100&&s>0&&(i=Math.min(20,(100-s)/100*20)),0!==i&&(t.scrollTop+=i),b.current&&(y.current=requestAnimationFrame(M))},[a]),R=(0,s.useCallback)(e=>{j.current=e},[]),O=(0,s.useCallback)(()=>{b.current||(b.current=!0,y.current&&cancelAnimationFrame(y.current),y.current=requestAnimationFrame(M))},[M]),P=(0,s.useCallback)(()=>{b.current=!1,y.current&&(cancelAnimationFrame(y.current),y.current=null),k(null)},[]);(0,s.useEffect)(()=>()=>{y.current&&cancelAnimationFrame(y.current)},[]),(0,s.useEffect)(()=>{let e=()=>{C(window.innerWidth<1024)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let _=(0,s.useCallback)(async(e,r,l)=>{var n,a,s;let i=A(e),d=A(r);if(!i||!d||i.isUnsorted||d.isUnsorted)return;let m=(e,t)=>
1{if(!e)return!1;if(String(e)===String(t))return!0;let r=A(e);return!!r&&!!r.parentId&&m(r.parentId,t)};if(m(d.id,i.id))return void v({variant:"destructive",title:"Invalid move",description:"Cannot move a collection into itself or its descendants"});let h=[],x=(e,t)=>String(e)===String(t),g=(e,t)=>null==e&&null==t||null!=e&&null!=t&&String(e)===String(t);if("inside"===l){let e=t.filter(e=>x(e.parentId,d.id)&&!x(e.id,i.id)).sort((e,t)=>{var r,l;return(null!=(r=e.order)?r:0)-(null!=(l=t.order)?l:0)});[i,...e].forEach((e,t)=>{h.push({id:Number(e.id),order:t,parent_id:Number(d.id)})});let r=null!=(n=i.parentId)?n:null;x(r,d.id)||t.filter(e=>g(e.parentId,r)&&!x(e.id,i.id)&&!e.isUnsorted).sort((e,t)=>{var r,l;return(null!=(r=e.order)?r:0)-(null!=(l=t.order)?l:0)}).forEach((e,t)=>{h.push({id:Number(e.id),order:t,parent_id:null===r?null:Number(r)})}),c[String(d.id)]||o(String(d.id))}else{let e=null!=(a=d.parentId)?a:null,r=t.filter(t=>g(t.parentId,e)&&!x(t.id,i.id)&&!t.isUnsorted).sort((e,t)=>{var r,l;return(null!=(r=e.order)?r:0)-(null!=(l=t.order)?l:0)}),n=r.findIndex(e=>x(e.id,d.id));if(-1===n)return;let o=[...r];o.splice("before"===l?n:n+1,0,{...i,parentId:e}),o.forEach((t,r)=>{h.push({id:Number(t.id),order:r,parent_id:null===e?null:Number(e)})});let c=null!=(s=i.parentId)?s:null;g(c,e)||t.filter(e=>g(e.parentId,c)&&!x(e.id,i.id)&&!e.isUnsorted).sort((e,t)=>{var r,l;return(null!=(r=e.order)?r:0)-(null!=(l=t.order)?l:0)}).forEach((e,t)=>{h.push({id:Number(e.id),order:t,parent_id:null===c?null:Number(c)})})}try{h.length>0&&await u({updates:h}).unwrap()}catch(e){v({variant:"destructive",title:"Error",description:"Failed to reorder collections. Please try again."})}},[A,t,c,o,u,v]),T=(0,s.useRef)(new Map),z=(0,s.useRef)(new Map),U=(0,s.useCallback)(e=>(T.current.has(e)||T.current.set(e,()=>o(e)),T.current.get(e)),[o]),q=(0,s.useCallback)(e=>(z.current.has(e)||z.current.set(e,()=>F(e)),z.current.get(e)),[F]),W=(0,s.useCallback)((e,t)=>(0,l.jsx)("div",{className:"px-[12px]",children:(0,l.jsx)(L,{collection:t,level:t.level,hasChildren:t.hasChildren||!1,isExpanded:c[t.id]||!1,onToggle:U(t.id),isDragOverlay:!1,isMenuOpen:m===t.id,onMenuOpen:q(t.id),onMenuClose:I,isSelected:String(t.id)===String(d),onToggleSidebar:n,canAcceptNesting:!1,isDragActive:!1,onDrop:_,onDragMove:R,onDragEnd:P,onDragStart:O,onDragStartWithId:e=>k(e)})}),[c,U,m,q,I,d,n,_,R,O,P]),Z=(0,s.useCallback)(e=>{let{index:t,style:r}=e,n=D[t];return n?(0,l.jsx)("div",{style:r,children:W(t,n)}):null},[D,W]);return(0,l.jsx)("div",{className:"w-full overflow-x-hidden",ref:x,children:N?(0,l.jsx)("div",{className:"flex flex-col",children:D.map((e,t)=>(0,l.jsx)("div",{children:W(t,e)},e.id))}):(0,l.jsx)(g.Y1,{height:36*D.length,itemCount:D.length,itemSize:36,width:"100%",overscanCount:10,itemKey:e=>{var t,r;return String(null!=(r=null==(t=D[e])?void 0:t.id)?r:e)},children:Z})})};var _=r(53529),T=r(47089),z=r(63958),U=r(69193);function q(e){let{count:t=5}=e,{resolvedTheme:r}=(0,U.D)(),n="dark"===r,a=n?"#262626":"#f5f5f5",s=n?"#1A1A1A":"#fafafa";return(0,l.jsx)("div",{className:"w-full",children:Array.from({length:t}).map((e,t)=>(0,l.jsx)("div",{className:"transition-all duration-300 ease-[cubic-bezier(0.4,0,0.2,1)] mx-[12px] my-[2px]",children:(0,l.jsxs)("div",{className:"h-[32px] pl-[12px] pr-[16px] w-full flex items-center rounded-[8px]",children:[(0,l.jsx)("div",{className:"flex-shrink-0",children:(0,l.jsx)(z.A,{width:18,height:18,className:"rounded",baseColor:a,highlightColor:s})}),(0,l.jsx)("div",{className:"ml-[12px] flex-1",children:(0,l.jsx)(z.A,{height:16,baseColor:a,highlightColor:s})})]})},t))})}var W=r(16119);let Z=()=>{let{selectedCount:e,selectedCollectionIds:t,exitSelectionMode:r,clearSelections:n}=D(),[a,i]=(0,s.useState)(!1),[o,c]=(0,s.useState)(!1),[u,m]=(0,s.useState)(!1),{toast:h}=(0,E.dj)(),[x,{isLoading:g}]=(0,f.useBatchDeleteCollectionsMutation)(),[p,{isLoading:v}]=(0,f.useBatchMergeCollectionsMutation)(),[y,{isLoading:b}]=(0,f.useBatchMoveCollectionsMutation)();if(0===e)return null;let j=async()=>{try{let e=Array.from(t),l=e[0],n=e.slice(1);await p({collectionIds:n,targetCollectionId:l}).unwrap(),h({title:"Collections merged successfully",description:"".concat(n.length," collections have been merged.")}),c(!1),r()}catch(e){h({variant:"destructive",title:"Failed to merge collections",description:"Please try again later."})}},k=async()=>{try{let l=Array.from(t);await x({collectionIds:l}).unwrap(),h({title:"Collections deleted successfully",description:"".concat(e," collections have been deleted.")}),i(!1),r()}catch(e){h({variant:"destructive",title:"Failed to delete collections",description:"Please try again later."})}},N=async l=>{try{let n=Array.from(t);await y({collectionIds:n,targetParentId:(null==l?void 0:l.id)||null}).unwrap(),h({title:"Collections moved successfully",description:"".concat(e," collections have been moved.")}),m(!1),r()}
1catch(e){h({variant:"destructive",title:"Failed to move collections",description:"Please try again later."})}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"sticky top-0 z-10 w-full pointer-events-none pb-2 px-3",children:(0,l.jsx)("div",{className:"bg-white/95 backdrop-blur-lg rounded-md border border-gray-200/50 px-2 py-1 pointer-events-auto w-full",children:(0,l.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[(0,l.jsx)("button",{onClick:()=>{if(e<2)return void h({variant:"destructive",title:"Select at least 2 collections",description:"You need to select at least 2 collections to merge them."});c(!0)},className:"flex items-center justify-center gap-0.5 px-1.5 py-1.5 rounded-md bg-gray-50 hover:bg-gray-100 active:bg-gray-200 transition-all disabled:opacity-50 cursor-pointer flex-shrink-0",disabled:v,title:"Merge collections",children:(0,l.jsx)("span",{className:"text-[10px] font-medium text-gray-900 whitespace-nowrap",children:v?"...":(0,l.jsxs)(l.Fragment,{children:["Merge ",(0,l.jsxs)("span",{className:"text-gray-500 ml-0.5",children:["(",e,")"]})]})})}),(0,l.jsx)("button",{onClick:()=>{m(!0)},className:"flex items-center justify-center gap-0.5 px-1.5 py-1.5 rounded-md bg-gray-50 hover:bg-gray-100 active:bg-gray-200 transition-all disabled:opacity-50 cursor-pointer flex-shrink-0",disabled:b,title:"Move collections",children:(0,l.jsx)("span",{className:"text-[10px] font-medium text-gray-900 whitespace-nowrap",children:b?"...":(0,l.jsxs)(l.Fragment,{children:["Move ",(0,l.jsxs)("span",{className:"text-gray-500 ml-0.5",children:["(",e,")"]})]})})}),(0,l.jsx)("div",{className:"h-5 w-px bg-gray-300 flex-shrink-0"}),(0,l.jsx)("button",{onClick:()=>{i(!0)},className:"flex items-center justify-center w-7 h-7 rounded-md hover:bg-red-50 active:bg-red-100 text-red-600 transition-all disabled:opacity-50 cursor-pointer flex-shrink-0",disabled:g,title:"Delete collections",children:(0,l.jsx)(d.A,{name:"Trash",width:14,height:14,color:"#EF4444"})}),(0,l.jsx)("button",{onClick:r,className:"flex items-center justify-center w-7 h-7 rounded-md hover:bg-gray-100 active:bg-gray-200 transition-all cursor-pointer flex-shrink-0",title:"Exit selection mode",children:(0,l.jsx)(d.A,{name:"Close",width:14,height:14,color:"#667085"})})]})})}),(0,l.jsx)(w.Lt,{open:a,onOpenChange:i,children:(0,l.jsxs)(w.EO,{children:[(0,l.jsxs)(w.wd,{children:[(0,l.jsxs)(w.r7,{children:["Delete ",e," collections?"]}),(0,l.jsx)(w.$v,{children:"This action cannot be undone. This will permanently delete the selected collections and all their nested collections."})]}),(0,l.jsxs)(w.ck,{children:[(0,l.jsx)(w.Zr,{children:"Cancel"}),(0,l.jsx)(w.Rx,{onClick:k,className:"bg-red-600 hover:bg-red-700 text-white",disabled:g,children:g?"Deleting...":"Delete"})]})]})}),(0,l.jsx)(w.Lt,{open:o,onOpenChange:c,children:(0,l.jsxs)(w.EO,{children:[(0,l.jsxs)(w.wd,{children:[(0,l.jsxs)(w.r7,{children:["Merge ",e," collections"]}),(0,l.jsx)(w.$v,{children:"The first selected collection will be the target. All other selected collections will be merged into it and then deleted."})]}),(0,l.jsxs)(w.ck,{children:[(0,l.jsx)(w.Zr,{children:"Cancel"}),(0,l.jsx)(w.Rx,{onClick:j,disabled:v,children:v?"Merging...":"Merge Collections"})]})]})}),(0,l.jsx)(W.MoveResourceModal,{isOpen:u,onClose:()=>m(!1),onSelect:N,selectedCollection:null,isLoading:b,loadingCollectionId:null})]})},B=e=>{let{searchQuery:t,onSearchChange:r,onClose:n}=e,a=(0,s.useRef)(null);return(0,s.useEffect)(()=>{a.current&&a.current.focus()},[]),(0,l.jsx)("div",{className:"sticky top-0 z-10 w-full pointer-events-none pb-2 px-3",children:(0,l.jsx)("div",{className:"bg-white/95 dark:bg-gray-700/95 backdrop-blur-lg rounded-md border border-gray-200/50 dark:border-gray-600/50 px-2 py-1 pointer-events-auto w-full",children:(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("div",{className:"flex-shrink-0 text-gray-500 dark:text-gray-400",children:(0,l.jsx)(d.A,{name:"Search",width:14,height:14})}),(0,l.jsx)("input",{ref:a,type:"text",value:t,onChange:e=>r(e.target.value),onKeyDown:e=>{"Escape"===e.key&&n()},placeholder:"Search collections...",className:"flex-1 text-xs bg-transparent border-none outline-none text-gray-900 dark:text-gray-100 placeholder-gray-400 dark:placeholder-gray-500"}),(0,l.jsx)("button",{onClick:n,className:"flex items-center justify-center w-7 h-7 rounded-md hover:bg-gray-100 dark:hover:bg-gray-600 active:bg-gray-200 dark:active:bg-gray-700 transition-all cursor-pointer flex-shrink-0 text-gray-500 dark:text-gray-400",title:"Close search",children:(0,l.jsx)(d.A,{name:"Close",width:14,height:14})})]})})})};var Q=r(77411);function $(e){var t;let{onToggle:r,scrollRef:n}=e;(0,c.useRouter)();let a=(0,c.usePathname)(),{expandedState:i,toggleExpandedState:o,selectedCollectionId:u,collapseAllCollections:m,updateSelectedCollectionId:h}=(0,p.D)(),g=(0,_.A)(),f=(null==a?void 0:a.startsWith("/collections/"))?(null==g?void 0:g.id)||u:null,v=null==(t=i.collections)||t,[y,b]=(0,s.use
1State)(!1),[j,w]=(0,s.useState)(!1),[k,N]=(0,s.useState)(""),{data:C,isLoading:S}=(0,x.useGetResourcesQuery)(),[,{isLoading:D}]=(0,T.useSwitchAccountMutation)(),{personal:E,shared:I}=(null==C?void 0:C.data)||{personal:{collections:[],order:[]},shared:{collections:[],order:[]}},M=(0,s.useMemo)(()=>(0,Q.y)((null==E?void 0:E.collections)||[],{respectExpanded:!1,showAll:!0}),[null==E?void 0:E.collections]),R=(0,s.useMemo)(()=>((null==E?void 0:E.collections)||[]).filter(e=>null===e.parent_id||void 0===e.parent_id).length,[null==E?void 0:E.collections]),O=(0,s.useMemo)(()=>{if(!k.trim())return M;let e=k.toLowerCase();return M.filter(t=>{var r,l;let n=(null==(r=t.name)?void 0:r.toLowerCase())||"",a=(null==(l=t.description)?void 0:l.toLowerCase())||"";return n.includes(e)||a.includes(e)})},[M,k]);return(0,l.jsx)(A,{children:(0,l.jsxs)("div",{className:"sidebar-section relative @container",children:[D&&!S&&(0,l.jsx)("div",{className:"absolute inset-0 bg-white/90 dark:bg-gray-900/90 flex items-center justify-center z-50 rounded-lg",children:(0,l.jsxs)("div",{className:"text-center",children:[(0,l.jsx)("div",{className:"w-4 h-4 border border-gray-300 dark:border-gray-600 border-t-blue-500 dark:border-t-blue-400 rounded-full animate-spin mx-auto mb-2"}),(0,l.jsx)("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Switching account..."})]})}),(0,l.jsx)("div",{className:"sidebar-section-header",children:(0,l.jsxs)("div",{className:"flex items-center justify-between px-6 py-2",children:[(0,l.jsx)("div",{className:"flex items-center",children:(0,l.jsx)("span",{className:"font-semibold text-[11px] uppercase tracking-[0.06em] text-gray-500 dark:text-gray-400",children:"Collections"})}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("button",{onClick:()=>w(!0),className:"w-6 h-6 flex items-center justify-center rounded-md hover:bg-gray-100 dark:hover:bg-gray-600 transition-colors cursor-pointer p-0.5",title:"Search collections",children:(0,l.jsx)(d.A,{name:"Search",width:14,height:14,color:"#5d5d5d"})}),(0,l.jsx)("button",{onClick:()=>b(!0),className:"w-6 h-6 flex items-center justify-center rounded-md hover:bg-gray-100 dark:hover:bg-gray-600 transition-colors cursor-pointer p-0.5",title:"Create new collection",children:(0,l.jsx)(d.A,{name:"PlusSmall",width:18,height:18,color:"#5d5d5d"})}),(0,l.jsx)("button",{onClick:()=>o("collections"),className:"w-6 h-6 flex items-center justify-center transition-transform duration-200 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-600 rounded-md p-0.5",children:(0,l.jsx)("div",{className:"transition-transform duration-200",style:{transform:v?"rotate(0deg)":"rotate(-90deg)"},children:(0,l.jsx)(d.A,{name:"ArrowDown",width:18,height:18,color:"#5d5d5d"})})})]})]})}),v&&(0,l.jsxs)(l.Fragment,{children:[j&&(0,l.jsx)(B,{searchQuery:k,onSearchChange:N,onClose:()=>{w(!1),N("")}}),!j&&(0,l.jsx)(Z,{}),(0,l.jsx)("div",{className:"sidebar-section-content",children:S||!C?(0,l.jsx)(q,{count:20}):(0,l.jsx)(P,{collections:j?O:M,selectedCollectionId:(null==f?void 0:f.toString())||"",onToggle:r,scrollRef:n})}),!S&&C&&R<2&&!j&&(0,l.jsx)("div",{className:"px-[12px]",children:(0,l.jsxs)("button",{onClick:()=>b(!0),className:"h-[32px] w-full pl-[12px] pr-[9px] flex items-center gap-[8px] rounded-[8px] hover:bg-[#ececec] dark:hover:bg-gray-600 transition-colors cursor-pointer",children:[(0,l.jsx)(d.A,{name:"PlusSmall",width:16,height:16,className:"text-gray-700 dark:text-gray-400 flex-shrink-0"}),(0,l.jsx)("span",{className:"text-sm text-gray-700 dark:text-gray-400",children:"Add New"})]})})]}),(0,l.jsx)(F.A,{isOpen:y,onClose:()=>b(!1),onSuccess:e=>{h(e)}})]})})}function G(e){let{onToggle:t,scrollRef:r}=e;return(0,l.jsxs)(n.Q,{backend:a.t2,children:[(0,l.jsx)(h,{onToggle:t}),(0,l.jsx)("div",{className:"pb-4",children:(0,l.jsx)($,{onToggle:t,scrollRef:r})})]})}},3998:(e,t,r)=>{r.d(t,{$:()=>c,r:()=>o});var l=r(95155),n=r(12115),a=r(32467),s=r(83101),i=r(64269);let o=(0,s.F)("inline-flex items-center justify-center rounded-md text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none disabled:opacity-50 disabled:pointer-events-none ring-offset-background",{variants:{variant:{default:"text-primary-foreground",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground outline-none focus:outline-none",fullGhost:"bg-white hover:bg-accent hover:text-accent-foreground outline-none focus:outline-none",link:"underline-offset-4 hover:underline text-primary"},size:{default:"h-10 py-2 px-4",lg:"h-11 px-8 rounded-md",sm:"h-9 px-3 rounded-md",xs:"h-7 px-3 rounded-md",xxs:"h-5 px-2 rounded-md"},width:{full:"w-full"}},defaultVariants:{variant:"default",size:"default"}}),c=n.forwardRef((e,t)=>
1{let{className:r,variant:n,size:s,width:c,asChild:d=!1,...u}=e,m=d?a.DX:"button";return(0,l.jsx)(m,{className:(0,i.cn)(o({variant:n,size:s,width:c,className:r})),ref:t,...u})});c.displayName="Button"},19191:(e,t,r)=>{r.d(t,{D:()=>i,SelectedCollectionProvider:()=>s});var l=r(95155),n=r(12115);let a=(0,n.createContext)(void 0),s=e=>{let{children:t}=e,[r,s]=(0,n.useState)(null),[i,o]=(0,n.useState)({}),c=(0,n.useRef)({}),d=(0,n.useCallback)(function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(c.current[e]&&clearTimeout(c.current[e]),r)return void localStorage.setItem(e,t);if("requestIdleCallback"in window){let r=window.requestIdleCallback(()=>{localStorage.setItem(e,t),delete c.current[e]});c.current[e]=r}else{let r=window.setTimeout(()=>{localStorage.setItem(e,t),delete c.current[e]},50);c.current[e]=r}},[]);(0,n.useEffect)(()=>{let e=localStorage.getItem("selectedCollectionId");e&&s(parseInt(e,10));let t=localStorage.getItem("expandedState");t&&o(JSON.parse(t))},[]);let u=(0,n.useCallback)(e=>{s(e),d("selectedCollectionId",e.toString())},[d]),m=(0,n.useCallback)(e=>{o(t=>{let r={...t,[e]:!t[e]};return d("expandedState",JSON.stringify(r)),r})},[d]),h=(0,n.useCallback)(()=>{let e=Object.keys(i).reduce((e,t)=>{if("collections"===t){var r;e[t]=null==(r=i[t])||r}else e[t]=!1;return e},{});o(e),d("expandedState",JSON.stringify(e))},[i,d]),x=(0,n.useMemo)(()=>({selectedCollectionId:r,updateSelectedCollectionId:u,expandedState:i,toggleExpandedState:m,collapseAllCollections:h}),[r,u,i,m,h]);return(0,l.jsx)(a.Provider,{value:x,children:t})},i=()=>{let e=(0,n.useContext)(a);if(void 0===e)throw Error("useSelectedCollection must be used within a SelectedCollectionProvider");return e}},45532:(e,t,r)=>{r.r(t),r.d(t,{statsApi:()=>a,useCreateFeedbackMutation:()=>o,useGetFeedbacksQuery:()=>i,useGetStatsQuery:()=>s});var l=r(61321),n=r(49973);let a=(0,l.xP)({reducerPath:"statsApi",baseQuery:n.W,tagTypes:["Stats","Feedbacks"],endpoints:e=>({getStats:e.query({query:()=>({url:"/stats"}),providesTags:["Stats"]}),getFeedbacks:e.query({query:()=>({url:"/feedbacks"}),providesTags:["Feedbacks"]}),createFeedback:e.mutation({query:e=>({url:"feedbacks",method:"POST",body:{feedback:{feedback_type:e.feedback_type,title:e.title,description:e.description,metadata:e.metadata||{}}}}),invalidatesTags:["Feedbacks"]})})}),{useGetStatsQuery:s,useGetFeedbacksQuery:i,useCreateFeedbackMutation:o}=a},69193:(e,t,r)=>{r.d(t,{N:()=>m,D:()=>h});var l=r(95155),n=r(12115);let a={mode:"system",variant:"default"},s="theme",i="theme-mode",o="theme-variant",c=(0,n.createContext)(void 0);function d(){try{let e=localStorage.getItem(i);if(e&&["light","dark","system"].includes(e))return e;let t=localStorage.getItem(s);if(t&&["light","dark","system"].includes(t))return t}catch(e){}return a.mode}function u(){try{let e=localStorage.getItem(o);if(e&&["default","ocean","forest","sunset"].includes(e))return e}catch(e){}return a.variant}function m(e){let{children:t}=e,[r,a]=(0,n.useState)(d),[m,h]=(0,n.useState)(u),[x,g]=(0,n.useState)(()=>{var e;return"system"===(e=d())?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e});(0,n.useEffect)(()=>{try{if(!localStorage.getItem(i)){let e=localStorage.getItem(s);e&&["light","dark","system"].includes(e)&&localStorage.setItem(i,e)}}catch(e){}},[]),(0,n.useEffect)(()=>{let e=()=>{"system"===r?g(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"):g(r)};e();let t=window.matchMedia("(prefers-color-scheme: dark)"),l=()=>{"system"===r&&e()};return t.addEventListener("change",l),()=>t.removeEventListener("change",l)},[r]),(0,n.useEffect)(()=>{let e=document.documentElement;e.classList.remove("light","dark"),e.classList.add(x),e.setAttribute("data-theme",m)},[x,m]);let p=(0,n.useCallback)(e=>{a(e),localStorage.setItem(s,e),localStorage.setItem(i,e)},[]),f=(0,n.useCallback)(e=>{a(e),localStorage.setItem(i,e),localStorage.setItem(s,e)},[]),v=(0,n.useCallback)(e=>{h(e),localStorage.setItem(o,e)},[]),y=(0,n.useMemo)(()=>({theme:r,setTheme:p,resolvedTheme:x,mode:r,variant:m,setMode:f,setVariant:v}),[r,p,x,r,m,f,v]);return(0,l.jsx)(c.Provider,{value:y,children:t})}function h(){let e=(0,n.useContext)(c);if(void 0===e)throw Error("useTheme must be used within ThemeProvider");return e}},98053:(e,t,r)=>{r.d(t,{$v:()=>g,EO:()=>u,Lt:()=>o,Rx:()=>p,Zr:()=>f,ck:()=>h,r7:()=>x,wd:()=>m});var l=r(95155),n=r(12115),a=r(35646),s=r(64269),i=r(3998);let o=a.bL;a.l9;let c=e=>{let{className:t,children:r,...n}=e;return(0,l.jsx)(a.ZL,{className:(0,s.cn)(t),...n,children:(0,l.jsx)("div",{className:"fixed inset-0 z-[12015] flex items-end justify-center sm:items-center",children:r})})};c.displayName=a.ZL.displayName;let d=n.forwardRef((e,t)=>
1{let{className:r,children:n,...i}=e;return(0,l.jsx)(a.hJ,{className:(0,s.cn)("fixed inset-0 z-[12020] bg-black/50 dark:bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r),...i,ref:t})});d.displayName=a.hJ.displayName;let u=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,l.jsxs)(c,{children:[(0,l.jsx)(d,{}),(0,l.jsx)(a.UC,{ref:t,className:(0,s.cn)("fixed z-[12025] grid w-full max-w-lg scale-100 gap-4 border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 p-6 opacity-100 shadow-xl animate-in fade-in-90 slide-in-from-bottom-10 sm:rounded-lg sm:zoom-in-90 sm:slide-in-from-bottom-0 md:w-full",r),...n})]})});u.displayName=a.UC.displayName;let m=e=>{let{className:t,...r}=e;return(0,l.jsx)("div",{className:(0,s.cn)("flex flex-col space-y-2 text-center sm:text-left",t),...r})};m.displayName="AlertDialogHeader";let h=e=>{let{className:t,...r}=e;return(0,l.jsx)("div",{className:(0,s.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...r})};h.displayName="AlertDialogFooter";let x=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,l.jsx)(a.hE,{ref:t,className:(0,s.cn)("text-lg font-semibold text-gray-900 dark:text-gray-100",r),...n})});x.displayName=a.hE.displayName;let g=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,l.jsx)(a.VY,{ref:t,className:(0,s.cn)("text-sm text-gray-600 dark:text-gray-300",r),...n})});g.displayName=a.VY.displayName;let p=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,l.jsx)(a.rc,{ref:t,className:(0,s.cn)((0,i.r)(),r),...n})});p.displayName=a.rc.displayName;let f=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,l.jsx)(a.ZD,{ref:t,className:(0,s.cn)((0,i.r)({variant:"outline"}),"mt-2 sm:mt-0","bg-white text-gray-900 border-gray-200 hover:bg-gray-50","dark:bg-gray-700 dark:text-gray-100 dark:border-gray-600 dark:hover:bg-gray-650",r),...n})});f.displayName=a.ZD.displayName}}]);
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.