@aiquants/directory-tree 6.1.1 → 6.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.cjs +1 -6
  2. package/dist/index.js +1448 -1302
  3. package/package.json +3 -3
package/dist/index.cjs CHANGED
@@ -1,6 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),ye=require("@aiquants/virtualscroll"),K=require("tailwind-merge"),le=require("@phosphor-icons/react");function fn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ue=fn(l);var ut={exports:{}},Je={};var vr;function hn(){if(vr)return Je;vr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,i){var c=null;if(i!==void 0&&(c=""+i),a.key!==void 0&&(c=""+a.key),"key"in a){i={};for(var u in a)u!=="key"&&(i[u]=a[u])}else i=a;return a=i.ref,{$$typeof:e,type:n,key:c,ref:a!==void 0?a:null,props:i}}return Je.Fragment=t,Je.jsx=r,Je.jsxs=r,Je}var qe={};var wr;function mn(){return wr||(wr=1,process.env.NODE_ENV!=="production"&&(function(){function e(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===F?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case E:return"Fragment";case $:return"Profiler";case v:return"StrictMode";case M:return"Suspense";case D:return"SuspenseList";case X:return"Activity"}if(typeof o=="object")switch(typeof o.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case y:return"Portal";case P:return o.displayName||"Context";case N:return(o._context.displayName||"Context")+".Consumer";case b:var f=o.render;return o=o.displayName,o||(o=f.displayName||f.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case O:return f=o.displayName||null,f!==null?f:e(o.type)||"Memo";case q:f=o._payload,o=o._init;try{return e(o(f))}catch{}}return null}function t(o){return""+o}function r(o){try{t(o);var f=!1}catch{f=!0}if(f){f=console;var I=f.error,R=typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return I.call(f,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",R),t(o)}}function n(o){if(o===E)return"<>";if(typeof o=="object"&&o!==null&&o.$$typeof===q)return"<...>";try{var f=e(o);return f?"<"+f+">":"<...>"}catch{return"<...>"}}function a(){var o=W.A;return o===null?null:o.getOwner()}function i(){return Error("react-stack-top-frame")}function c(o){if(fe.call(o,"key")){var f=Object.getOwnPropertyDescriptor(o,"key").get;if(f&&f.isReactWarning)return!1}return o.key!==void 0}function u(o,f){function I(){he||(he=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",f))}I.isReactWarning=!0,Object.defineProperty(o,"key",{get:I,configurable:!0})}function m(){var o=e(this.type);return Y[o]||(Y[o]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),o=this.props.ref,o!==void 0?o:null}function S(o,f,I,R,be,C){var L=I.ref;return o={$$typeof:g,type:o,key:f,props:I,_owner:R},(L!==void 0?L:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:m}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(o,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:be}),Object.defineProperty(o,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:C}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function T(o,f,I,R,be,C){var L=f.children;if(L!==void 0)if(R)if(B(L)){for(R=0;R<L.length;R++)x(L[R]);Object.freeze&&Object.freeze(L)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else x(L);if(fe.call(f,"key")){L=e(o);var Z=Object.keys(f).filter(function(Ie){return Ie!=="key"});R=0<Z.length?"{key: someKey, "+Z.join(": ..., ")+": ...}":"{key: someKey}",ge[L+R]||(Z=0<Z.length?"{"+Z.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
- let props = %s;
3
- <%s {...props} />
4
- React keys must be passed directly to JSX without using spread:
5
- let props = %s;
6
- <%s key={someKey} {...props} />`,R,L,Z,L),ge[L+R]=!0)}if(L=null,I!==void 0&&(r(I),L=""+I),c(f)&&(r(f.key),L=""+f.key),"key"in f){I={};for(var me in f)me!=="key"&&(I[me]=f[me])}else I=f;return L&&u(I,typeof o=="function"?o.displayName||o.name||"Unknown":o),S(o,L,I,a(),be,C)}function x(o){_(o)?o._store&&(o._store.validated=1):typeof o=="object"&&o!==null&&o.$$typeof===q&&(o._payload.status==="fulfilled"?_(o._payload.value)&&o._payload.value._store&&(o._payload.value._store.validated=1):o._store&&(o._store.validated=1))}function _(o){return typeof o=="object"&&o!==null&&o.$$typeof===g}var p=l,g=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),P=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),F=Symbol.for("react.client.reference"),W=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe=Object.prototype.hasOwnProperty,B=Array.isArray,re=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(o){return o()}};var he,Y={},G=p.react_stack_bottom_frame.bind(p,i)(),we=re(n(i)),ge={};qe.Fragment=E,qe.jsx=function(o,f,I){var R=1e4>W.recentlyCreatedOwnerStacks++;return T(o,f,I,!1,R?Error("react-stack-top-frame"):G,R?re(n(o)):we)},qe.jsxs=function(o,f,I){var R=1e4>W.recentlyCreatedOwnerStacks++;return T(o,f,I,!0,R?Error("react-stack-top-frame"):G,R?re(n(o)):we)}})()),qe}var Er;function pn(){return Er||(Er=1,process.env.NODE_ENV==="production"?ut.exports=hn():ut.exports=mn()),ut.exports}var h=pn();function yn({title:e,titleId:t,...r},n){return ue.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?ue.createElement("title",{id:t},e):null,ue.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const gn=ue.forwardRef(yn);function bn({title:e,titleId:t,...r},n){return ue.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?ue.createElement("title",{id:t},e):null,ue.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const Sn=ue.forwardRef(bn);function vn({title:e,titleId:t,...r},n){return ue.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?ue.createElement("title",{id:t},e):null,ue.createElement("path",{d:"M19.5 21a3 3 0 0 0 3-3v-4.5a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3V18a3 3 0 0 0 3 3h15ZM1.5 10.146V6a3 3 0 0 1 3-3h5.379a2.25 2.25 0 0 1 1.59.659l2.122 2.121c.14.141.331.22.53.22H19.5a3 3 0 0 1 3 3v1.146A4.483 4.483 0 0 0 19.5 9h-15a4.483 4.483 0 0 0-3 1.146Z"}))}const wn=ue.forwardRef(vn),Or={icon:{light:"#6a7282",dark:"#99a1af"},iconSelected:{light:"#1447e6",dark:"#51a2ff"},checkedRing:{light:"#155dfc",dark:"#51a2ff"}},En={markdown:{light:"#0084d1",dark:"#00bcff"},pdf:{light:"#e7000b",dark:"#ff6467"},spreadsheet:{light:"#007a55",dark:"#00d492"},csv:{light:"#007a55",dark:"#00d492"},document:{light:"#155dfc",dark:"#51a2ff"},presentation:{light:"#ca3500",dark:"#ff8904"},image:{light:"#00786f",dark:"#00d5be"},audio:{light:"#e60076",dark:"#fb64b6"},video:{light:"#7f22fe",dark:"#a684ff"},archive:{light:"#bb4d00",dark:"#ffb900"},code:{light:"#9810fa",dark:"#c27aff"},text:Or.icon},Lr="#71829b",ie={rowHover:"hover:bg-[color:light-dark(#f3f4f6,#1e2939)]",rowSelected:"bg-[color:light-dark(#eff6ff,#162456)]",checkedRing:"inset-ring-1 inset-ring-[color:light-dark(#155dfc,#51a2ff)]",name:"text-[color:light-dark(#364153,#e5e7eb)]",nameSelected:"text-[color:light-dark(#193cb8,#bedbff)]",gridEdge:"text-[color:light-dark(#4a5565,#d1d5dc)]",icon:"text-[color:light-dark(#6a7282,#99a1af)]",iconSelected:"text-[color:light-dark(#1447e6,#51a2ff)]"},de={markdown:"text-[color:light-dark(#0084d1,#00bcff)]",pdf:"text-[color:light-dark(#e7000b,#ff6467)]",spreadsheet:"text-[color:light-dark(#007a55,#00d492)]",csv:"text-[color:light-dark(#007a55,#00d492)]",document:"text-[color:light-dark(#155dfc,#51a2ff)]",presentation:"text-[color:light-dark(#ca3500,#ff8904)]",image:"text-[color:light-dark(#00786f,#00d5be)]",audio:"text-[color:light-dark(#e60076,#fb64b6)]",video:"text-[color:light-dark(#7f22fe,#a684ff)]",archive:"text-[color:light-dark(#bb4d00,#ffb900)]",code:"text-[color:light-dark(#9810fa,#c27aff)]",text:"text-[color:light-dark(#6a7282,#99a1af)]"},jr="text-[length:var(--dt-font-size-body,0.8125rem)]",Rn=`${jr} leading-[max(var(--dt-line-height-body,1.25rem),1.5em)]`,_t=44,xn=12,kn=8,ce=14,In=14,Ar=e=>e===void 0?void 0:{fontSize:typeof e=="number"?`${e}px`:e},oe=e=>({width:e,height:e}),A={container:"directory-tree-container relative h-full overflow-y-hidden pb-[3px] pr-[2px]",containerPending:"cursor-progress",entry:`directory-tree-entry flex items-center cursor-pointer relative select-none ${Rn}`,entryHover:`directory-tree-entry--hover ${ie.rowHover}`,entrySelected:`directory-tree-entry--selected ${ie.rowSelected}`,entryItemSelected:`directory-tree-entry--item-selected ${ie.rowSelected} ${ie.checkedRing}`,expandIcon:`directory-tree-expand-icon flex-shrink-0 flex items-center justify-center ${ie.icon}`,expandIconSelected:`directory-tree-expand-icon--selected ${ie.iconSelected}`,typeIcon:`directory-tree-type-icon flex-shrink-0 flex items-center justify-center ${ie.icon}`,typeIconSelected:`directory-tree-type-icon--selected ${ie.iconSelected}`,name:`directory-tree-name overflow-hidden text-ellipsis whitespace-nowrap ml-1 ${jr} font-normal ${ie.name}`,nameDirectory:"directory-tree-name--directory font-medium",nameSelected:`directory-tree-name--selected font-semibold ${ie.nameSelected}`},Mt=e=>{const t=e.slice(e.lastIndexOf("/")+1),r=t.lastIndexOf(".");return r<=0?"":t.slice(r+1).toLowerCase()},Cn=/^[a-z][a-z\d+.-]*:\/\//i,Rr=e=>Mt(Cn.test(e)?e.split(/[?#]/,1)[0]:e),Mr=e=>Mt(e.name)||Rr(e.relativePath)||Rr(e.absolutePath),Dr=({isDirectory:e,isExpanded:t,showExpandIcons:r,useCanvasExpandIcons:n,expandIconSize:a})=>{const i=a?{width:a,height:a}:void 0,c=a?"":"h-4 w-4";return!(r&&e)||n?h.jsx("span",{className:c,style:i,"aria-hidden":"true"}):t?h.jsx(gn,{className:c,style:i}):h.jsx(Sn,{className:c,style:i})},Pt=(e,t)=>{if(e==null||typeof e=="boolean")return null;if(typeof e=="function")return console.warn(`[DirectoryTree] Function returned by renderer for "${t}". Return a node.`),null;if(typeof e=="object"){if("then"in e)return console.warn(`[DirectoryTree] Promise returned for "${t}". Not supported.`),null;if(Array.isArray(e)){const n=e.map(a=>Pt(a,t)).filter(Boolean);return n.length?n:null}const r=e.type;if(r&&r.$$typeof===Symbol.for("react.lazy"))return console.warn(`[DirectoryTree] Lazy component for "${t}". Not supported.`),null}return e},Tn={markdown:e=>h.jsx(le.FileMd,{className:de.markdown,style:oe(e)}),pdf:e=>h.jsx(le.FilePdf,{className:de.pdf,style:oe(e)}),spreadsheet:e=>h.jsx(le.FileXls,{className:de.spreadsheet,style:oe(e)}),csv:e=>h.jsx(le.FileCsv,{className:de.csv,style:oe(e)}),document:e=>h.jsx(le.FileDoc,{className:de.document,style:oe(e)}),presentation:e=>h.jsx(le.FilePpt,{className:de.presentation,style:oe(e)}),image:e=>h.jsx(le.FileImage,{className:de.image,style:oe(e)}),audio:e=>h.jsx(le.FileAudio,{className:de.audio,style:oe(e)}),video:e=>h.jsx(le.FileVideo,{className:de.video,style:oe(e)}),archive:e=>h.jsx(le.FileZip,{className:de.archive,style:oe(e)}),code:e=>h.jsx(le.FileCode,{className:de.code,style:oe(e)}),text:e=>h.jsx(le.FileText,{className:de.text,style:oe(e)})},_n={markdown:["md","markdown","mdx"],pdf:["pdf"],spreadsheet:["xls","xlsx","xlsm","xlsb","ods"],csv:["csv","tsv"],document:["doc","docx","rtf","odt"],presentation:["ppt","pptx","odp"],image:["png","jpg","jpeg","gif","svg","webp","ico","bmp","tiff","avif"],audio:["mp3","wav","ogg","m4a","flac","aac","wma"],video:["mp4","webm","mov","avi","mkv","wmv","flv"],archive:["zip","tar","gz","7z","rar","tgz","bz2"],code:["js","mjs","cjs","ts","tsx","jsx","json","html","htm","css","scss","py","go","rs","c","cpp","h","hpp","sh","bash","yaml","yml","sql","xml","toml"],text:["txt","log"]},Nn=new Map(Object.entries(_n).flatMap(([e,t])=>t.map(r=>[r,e]))),Pn=new Set(["","application/octet-stream","binary/octet-stream","text/plain","application/x-empty"]),On=e=>(e??"").split(";",1)[0].trim().toLowerCase(),Ln=e=>{if(e==="text/markdown"||e==="text/x-markdown")return"markdown";if(e==="application/pdf")return"pdf";if(e.includes("excel")||e.includes("spreadsheet"))return"spreadsheet";if(e==="text/csv"||e==="text/tab-separated-values")return"csv";if(e.includes("word")||e.includes("google-apps.document")||e==="application/rtf")return"document";if(e.includes("powerpoint")||e.includes("presentation"))return"presentation";if(e.startsWith("image/"))return"image";if(e.startsWith("audio/"))return"audio";if(e.startsWith("video/"))return"video";if(e.includes("zip")||e.includes("tar")||e.includes("compressed")||e.includes("archive"))return"archive";if(e==="application/json"||e.includes("javascript")||e.includes("typescript")||e.includes("xml")||e.startsWith("text/html")||e.startsWith("text/css")||e.includes("x-python")||e.includes("x-sh")||e.includes("x-go")||e.includes("x-rust"))return"code";if(e.startsWith("text/"))return"text"},jn=(e,t,r,n)=>{const a=On(e),i=Ln(a),c=Nn.get((t||(r?Mt(r):"")).toLowerCase()),m=(Pn.has(a)?[c,i]:[i,c]).find(S=>S!==void 0);return m===void 0?h.jsx(le.FileIcon,{className:ie.icon,style:oe(n)}):Tn[m](n)},$r=(e,t,r)=>{const{entry:n,isDirectory:a,isExpanded:i,extension:c,mimeType:u}=e;let m;const S=u||n.mimeType;return n.icon!==void 0?m=n.icon:a?m=i&&t?.directoryExpanded||t?.directory||h.jsx(wn,{style:oe(r)}):c&&t?.fileByExtension?.[c]?m=t.fileByExtension[c]:m=t?.file||jn(S,c,n.name,r),Pt(typeof m=="function"?m(e):m,n.absolutePath)},An=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Fr=e=>{if(!e)return;const t=Object.entries(e).filter(([,r])=>r!=null);if(t.length!==0)return Object.fromEntries(t.map(([r,n])=>[`data-${An(r)}`,String(n)]))},zr=["color","background","backgroundColor","backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundClip","backgroundOrigin","backgroundAttachment","backgroundBlendMode","opacity","boxShadow","filter","backdropFilter","mixBlendMode","borderColor","borderRadius","outline","outlineColor","outlineStyle","outlineWidth","outlineOffset","textShadow","accentColor","caretColor","cursor","fontFamily","fontSize","fontStyle","fontWeight","fontVariant","fontFeatureSettings","fontVariationSettings","fontKerning","letterSpacing","lineHeight","textDecoration","textDecorationColor","textDecorationLine","textDecorationStyle","textDecorationThickness","textUnderlineOffset","textTransform"],Br=["color","opacity"],Mn="the row's box belongs to the tree (height: visual.itemHeight, indent: visual.indentSize, icons: visual.typeIconSize, text size: visual.fontSize)",Dn=new Set(zr),$n=new Set(Br),xr=(e,t)=>{const r=t===void 0?e.option:`${e.option}.${t}`;return e.absolutePath===void 0?r:`${r} of "${e.absolutePath}"`},Hr=(e,t,r,n)=>{if(e!==void 0){if(typeof e!="object"||e===null)throw new RangeError(`${xr(r,void 0)} must be an object of CSS properties or undefined, got ${e===null?"null":typeof e}.`);for(const[a,i]of Object.entries(e))if(i!==void 0&&!t.has(a))throw new RangeError(`${xr(r,a)} cannot be set: ${Mn}, so ${n}.`)}},We=(e,t)=>Hr(e,Dn,t,"a row style accepts only paint and text properties (ROW_STYLE_PROPERTIES)"),Fn=(e,t)=>Hr(e,$n,t,"the expand icon style accepts only the glyph's colour and opacity (EXPAND_ICON_STYLE_PROPERTIES), and the 14 px expand box is the tree's"),zn=500,Wr=({entry:e,isDirectory:t,isExpanded:r,isItemSelected:n,selectionMode:a,onSelectionChange:i,onEntryClick:c,toggleDirectory:u,onToggleDirectoryRecursive:m})=>{const S=l.useRef(null);return l.useEffect(()=>()=>{S.current&&window.clearTimeout(S.current)},[]),l.useCallback(T=>{T.stopPropagation(),a!=="none"&&!t&&i&&i(e,!n);let x=!1;c({entry:e,isDirectory:t,isExpanded:r,preventDefault:()=>{x=!0}}),!(!t||x)&&(S.current?(window.clearTimeout(S.current),S.current=null,m(e)):S.current=window.setTimeout(()=>{u(e.absolutePath),S.current=null},zn))},[t,e,r,m,u,c,a,i,n])},Yr=e=>e==="right"?"dt-grid-cell--right":e==="center"?"dt-grid-cell--center":"",kr=(e,t)=>e.children!==void 0&&t(e.absolutePath),Gr=(e,t)=>({width:e,gridTemplateColumns:t}),Vr=l.memo(({entry:e,indentLevel:t,positionInSet:r,setSize:n,rowIndex:a,flatIndex:i,onRowFocus:c,onRowBlur:u,isSelectedForAria:m,rowHeight:S,isDirOpen:T,columns:x,numericTemplate:_,numericTotal:p,nameWidth:g,rowClassName:y,selection:{onEntryClick:E,selectedPath:v,currentPath:$,mode:N="none",selectedItems:P,onSelectionChange:b},expansion:{toggleDirectory:M,onToggleDirectoryRecursive:D},visual:{iconOverrides:O,showExpandIcons:q=!0,showDirectoryIcons:X=!0,showFileIcons:F=!0,useCanvasExpandIcons:W=!1,expandIconSize:fe,typeIconSize:B,fontSize:re,indentSize:he,highlightStyles:Y,expandIconClassName:G,expandIconStyle:we}})=>{We(e.style,{option:"entry.style",absolutePath:e.absolutePath});const[ge,o]=l.useState(!1),f=e.children!==void 0,I=f&&T(e.absolutePath),R=e.absolutePath===v,be=e.absolutePath===$,C=!f&&!!P?.has(e.absolutePath),L=f?void 0:Mr(e),Z=Wr({entry:e,isDirectory:f,isExpanded:I,isItemSelected:C,selectionMode:N,onSelectionChange:b,onEntryClick:E,toggleDirectory:M,onToggleDirectoryRecursive:D}),me=ge?Y?.hoverClassName!==void 0?Y.hoverClassName:A.entryHover:"",Ie=(()=>{if(f){if(R)return Y?.directorySelectedClassName!==void 0?Y.directorySelectedClassName:A.entrySelected}else if(R||C)return Y?.itemSelectedClassName!==void 0?Y.itemSelectedClassName:K.twMerge(R&&A.entrySelected,C&&A.entryItemSelected);return""})(),j=typeof y=="function"?y(e):y,Se=K.twMerge("dt-grid-row cursor-pointer select-none",me,Ie,j,e.className),U=K.twMerge(A.expandIcon,G,(R||C)&&A.expandIconSelected),Me=K.twMerge(A.typeIcon,(R||C)&&A.typeIconSelected),ne=K.twMerge("dt-grid-name-label ml-1",ie.name,f&&A.nameDirectory,(R||C)&&A.nameSelected),Q=Dr({isDirectory:f,isExpanded:I,showExpandIcons:q,useCanvasExpandIcons:W,expandIconSize:fe}),se=(f?X:F)?$r({entry:e,isDirectory:f,isExpanded:I,isSelected:R,isItemSelected:C,extension:L,mimeType:e.mimeType},O,B):null,Ce={indentLevel:t,isDirectory:f,isExpanded:I},[Ee,...Pe]=x,Re=Ee?.render?Ee.render(e,Ce):e.label??e.name,Ye={...ge?Y?.hoverStyle:{},...f&&R?Y?.directorySelectedStyle:{},...!f&&(R||C)?Y?.itemSelectedStyle:{}};return h.jsxs("div",{className:Se,style:{...Ye,...e.style,height:S},role:"row","aria-expanded":f?I:void 0,"aria-level":t+1,"aria-posinset":r,"aria-setsize":n,"aria-rowindex":a,"aria-selected":N==="none"?void 0:m,"aria-current":be?"page":void 0,...Fr(e.data),"data-entry-type":f?"directory":"file","data-entry-expanded":f?String(I):void 0,"data-entry-selected":R?"true":void 0,"data-entry-item-selected":C?"true":void 0,onClick:Z,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onFocus:H=>c(i,e.absolutePath,H.currentTarget),onBlur:H=>u(e.absolutePath,H.currentTarget),onKeyDown:H=>{if(H.key==="Enter"){if(H.repeat){H.preventDefault();return}Z(H)}},tabIndex:0,children:[h.jsxs("div",{className:K.twMerge("dt-grid-name-cell",Ee?.className),role:"gridcell",style:{width:g,paddingLeft:Math.max(0,t*he)},children:[(q||W)&&h.jsx("span",{className:U,style:{...we,width:ce,height:ce},children:Q}),(f?X:F)&&h.jsx("span",{className:Me,style:{width:B,height:B},children:se}),h.jsx("span",{className:ne,style:Ar(re),children:Re})]}),Pe.length>0&&h.jsx("div",{className:"dt-grid-numeric-viewport",children:h.jsx("div",{className:"dt-grid-numeric-track",style:Gr(p,_),children:Pe.map(H=>h.jsx("div",{className:K.twMerge("dt-grid-cell",Yr(H.align),H.className),role:"gridcell",children:H.render?H.render(e,Ce):null},H.key))})})]})},(e,t)=>{if(e.entry!==t.entry)return!1;const r=kr(e.entry,e.isDirOpen),n=kr(t.entry,t.isDirOpen);return e.indentLevel===t.indentLevel&&e.positionInSet===t.positionInSet&&e.setSize===t.setSize&&e.rowIndex===t.rowIndex&&e.flatIndex===t.flatIndex&&e.isSelectedForAria===t.isSelectedForAria&&e.rowHeight===t.rowHeight&&r===n&&e.columns===t.columns&&e.numericTemplate===t.numericTemplate&&e.numericTotal===t.numericTotal&&e.nameWidth===t.nameWidth&&e.rowClassName===t.rowClassName&&e.selection.selectedPath===t.selection.selectedPath&&e.selection.currentPath===t.selection.currentPath&&e.selection.mode===t.selection.mode&&e.selection.selectedItems===t.selection.selectedItems&&e.visual===t.visual});Vr.displayName="DirectoryTreeGridRow";const Kr=({kind:e,columns:t,numericTemplate:r,numericTotal:n,nameWidth:a,scrollBarWidth:i,className:c,nameContent:u,renderCell:m})=>{const[,...S]=t,T=e==="header"?"dt-grid-name-header":"dt-grid-name-footer",x=e==="header"?"dt-grid-header":"dt-grid-footer",_=e==="header"?"columnheader":"gridcell";return h.jsxs("div",{className:K.twMerge(x,ie.gridEdge,c),role:"row",children:[h.jsx("div",{className:K.twMerge(T,"px-1",t[0]?.className),role:_,style:{width:a},children:u}),S.length>0&&h.jsx("div",{className:"dt-grid-numeric-viewport",children:h.jsx("div",{className:"dt-grid-numeric-track",style:Gr(n,r),children:S.map(p=>h.jsx("div",{className:K.twMerge("dt-grid-cell",Yr(p.align),p.className),role:_,children:m(p)},p.key))})}),h.jsx("div",{className:"dt-grid-scrollbar-spacer",style:{width:i},"aria-hidden":"true"})]})},Bn=({columns:e,className:t,...r})=>h.jsx(Kr,{kind:"header",columns:e,className:t,nameContent:e[0]?.header??null,renderCell:n=>n.header??null,...r}),Ir=(e,t)=>typeof e=="function"?e(t):e??null,Hn=({columns:e,allEntries:t,className:r,...n})=>h.jsx(Kr,{kind:"footer",columns:e,className:r,nameContent:Ir(e[0]?.footer,t),renderCell:a=>Ir(a.footer,t),...n}),Wn=240,Xr=96,Ur=12,Ot=(e,t)=>{const r=e?.width;return typeof r=="number"&&Number.isFinite(r)&&r>0?r:t},Yn=e=>e.slice(1).map(t=>`${Ot(t,Xr)}px`).join(" "),Gn=({measuredWidth:e,columns:t,scrollBarWidth:r=Ur})=>{const n=Ot(t[0],Wn),a=t.slice(1).reduce((m,S)=>m+Ot(S,Xr),0),i=Number.isFinite(e)&&e>0?e:0,c=Math.max(0,i-n-Math.max(0,r)),u=Math.max(0,a-c);return{nameWidth:n,numericTotal:a,numericVisible:c,maxHScroll:u}},Nt=(e,t)=>!Number.isFinite(e)||e<0?0:e>t?t:e,Vn=e=>{const t=[],r=n=>{for(const a of n)t.push(a),a.children&&a.children.length>0&&r(a.children)};return r(e),t},Jr=["entryKindDirectory","entryKindFile"],Lt=[...ye.VIRTUAL_SCROLL_LABEL_KEYS,...Jr],jt=Object.freeze({en:Object.freeze({entryKindDirectory:"directory",entryKindFile:"file"}),ja:Object.freeze({entryKindDirectory:"ディレクトリ",entryKindFile:"ファイル"})}),qr=Object.freeze({en:Object.freeze({...ye.VIRTUAL_SCROLL_LABEL_CATALOGS.en,...jt.en}),ja:Object.freeze({...ye.VIRTUAL_SCROLL_LABEL_CATALOGS.ja,...jt.ja})}),Cr=e=>typeof e=="string"?JSON.stringify(e):e===null?"null":typeof e,Kn=e=>{const t={};let r=!1;for(const n of ye.VIRTUAL_SCROLL_LABEL_KEYS){const a=Object.hasOwn(e,n)?e[n]:void 0;a!==void 0&&(t[n]=a,r=!0)}return r?t:void 0},Zr=(e,t)=>{const r=ye.resolveVirtualScrollLocale(e);if(t===void 0)return qr[r];if(t===null||typeof t!="object")throw new RangeError(`[directory-tree] labels must be an object; got ${Cr(t)}`);const n=Object.getPrototypeOf(t);if(n!==Object.prototype&&n!==null)throw new RangeError(`[directory-tree] labels must be a plain object (prototype Object.prototype or null); got ${Array.isArray(t)?"an array":"an object with a non-plain prototype"}`);for(const c of Object.keys(t))if(!Lt.includes(c))throw new RangeError(`[directory-tree] labels.${c} is not a known label key; expected one of ${Lt.join(", ")}`);const i={...ye.resolveVirtualScrollLabels(r,Kn(t)),...jt[r]};for(const c of Jr){const u=Object.hasOwn(t,c)?t[c]:void 0;if(u!==void 0){if(typeof u!="string"||u.trim()==="")throw new RangeError(`[directory-tree] labels.${c} must be a non-blank string; got ${Cr(u)}`);i[c]=u}}return Object.freeze(i)},Xn=e=>{const t={};for(const r of ye.VIRTUAL_SCROLL_LABEL_KEYS)t[r]=e[r];return Object.freeze(t)},Un=()=>{let e=null;return{mark:t=>{const r=t.composedPath();e=r,setTimeout(()=>{e===r&&(e=null)},0)},landedOn:t=>e?.includes(t)===!0}},Ze=e=>typeof e=="string"?JSON.stringify(e):String(e),At=(e,t)=>{if(typeof t!="number"||!Number.isFinite(t)||t<=0)throw new RangeError(`[directory-tree] visual.${e} must be a finite number greater than 0 (px); got ${Ze(t)}.`);return t},Jn=e=>{if(typeof e=="string"&&e.trim()!==""||typeof e=="number"&&Number.isFinite(e)&&e>0)return e;throw new RangeError(`[directory-tree] visual.fontSize must be a finite number greater than 0 (px) or a CSS font size that is not blank; got ${Ze(e)}.`)},qn=({indentSize:e,typeIconSize:t,fontSize:r})=>({indentSize:e===void 0?xn:At("indentSize",e),typeIconSize:t===void 0?In:At("typeIconSize",t),fontSize:r===void 0?void 0:Jn(r)}),Zn=({indentSize:e,removeRootIndent:t,hasExpandBox:r})=>t?Math.max(0,e-(r?ce:0)):0,Qn=(e,t,r)=>{if(typeof e!="function")return At("itemHeight",e);const n=e(t,r);if(typeof n!="number"||!Number.isFinite(n)||n<=0)throw new RangeError(`[directory-tree] visual.itemHeight returned ${Ze(n)} for ${JSON.stringify(t.absolutePath)} (row ${r}); it must return a finite number greater than 0 (px).`);return n},eo=(e,t,r)=>{const n=t===void 0?kn:t;if(typeof n!="number"||!Number.isFinite(n)||n<=0||n>ce)throw new RangeError(`[directory-tree] visual.expandIconSize must be a finite number greater than 0 and at most ${ce} (the expand box, px) while tree lines are drawn; got ${Ze(n)}.`);const{indentSize:a,typeIconSize:i}=e,c=n/2,u=ce+i-n/2;if(a<c||a>u)throw new RangeError(`[directory-tree] visual.indentSize ${Ze(a)} does not fit the tree lines: with typeIconSize ${i} and an expand glyph of ${n} px it must be from ${c} (half the glyph) to ${u} (the ${ce} px expand box + typeIconSize − half the glyph).`);return{indentSize:a,typeIconSize:i,glyphSize:n,originX:r}},to=({indentSize:e,typeIconSize:t,glyphSize:r})=>Math.min(Math.max(ce+t/2-e,r/2),ce-r/2),ro=(e,t)=>{const r=e.length-1;if(r<=0)return 0;let n=0,a=r-1,i=0;for(;n<=a;){const c=n+a>>>1;e[c]<=t?(i=c,n=c+1):a=c-1}return i},no=(e,t,r)=>{if(r<=0||e.length===0||t.length!==e.length+1)return null;const n=ro(t,r),a=e[n];return a?{path:a.entry.absolutePath,offsetInViewport:r-t[n]}:null},oo=(e,t,r)=>{if(t.length===0||r.length!==t.length+1)return null;for(let n=0;n<t.length;n++)if(t[n].entry.absolutePath===e.path)return Math.max(0,r[n]+e.offsetInViewport);return null},so=(e,t,r)=>{const n=[];for(let a=t;a<r;a++){const i=e[a];if(!(!i||i.length===0))for(const c of i)n.push(c)}return n},ao=(e,t,r)=>{const n=[];for(let a=t;a<r;a++){const i=e[a];if(!(!i||i.length===0))for(const c of i)n.push(c)}return n},lo=(e,t,r,n)=>{const a=Math.max(1,Math.floor(t*n)),i=Math.max(1,Math.floor(r*n));(e.width!==a||e.height!==i)&&(e.width=a,e.height=i);const c=e.style;c.width!==`${t}px`&&(c.width=`${t}px`),c.height!==`${r}px`&&(c.height=`${r}px`)},io=(e,t,r)=>{e.lineWidth=r,e.beginPath();for(const n of t)e.moveTo(n.x1,n.y1),e.lineTo(n.x2,n.y2);e.stroke()},co=(e,t,r,n)=>{if(t.length===0)return;const a=e.strokeStyle,i=e.lineWidth,c=e.lineCap,u=e.lineJoin;e.strokeStyle=r,e.lineCap="round",e.lineJoin="round";for(const m of t){const S=n??m.size,T=Math.max(0,S/2),x=Math.max(1,Math.round(S*.08)),_=Math.max(1,Math.round(S*.14)),p=Math.max(0,T-x*.8),g=Math.max(0,p*.55);e.lineWidth=x,e.beginPath(),e.arc(m.centerX,m.centerY,Math.max(0,T-x*.3),0,Math.PI*2),e.stroke(),e.lineWidth=_,e.beginPath(),e.moveTo(m.centerX-g,m.centerY),e.lineTo(m.centerX+g,m.centerY),e.stroke(),m.isExpanded||(e.beginPath(),e.moveTo(m.centerX,m.centerY-g),e.lineTo(m.centerX,m.centerY+g),e.stroke())}e.strokeStyle=a,e.lineWidth=i,e.lineCap=c,e.lineJoin=u},Qr=l.memo(({segmentsByItem:e,glyphsByItem:t,itemHeight:r,width:n,viewportHeight:a,scrollPosition:i,color:c=Lr,strokeWidth:u=1,renderStartIndex:m,renderEndIndex:S,lookaheadEndIndex:T,devicePixelRatio:x,expandGlyphColor:_,expandGlyphSize:p})=>{const g=l.useRef(null),y=l.useRef(null),E=l.useRef({segmentsByItem:e,glyphsByItem:t,itemHeight:r,width:n,viewportHeight:a,scrollPosition:i,color:c,strokeWidth:u,renderStartIndex:m,renderEndIndex:S,lookaheadEndIndex:T,devicePixelRatio:x,expandGlyphColor:_,expandGlyphSize:p}),v=l.useCallback(()=>{y.current=null;const N=g.current;if(!N)return;const P=N.getContext("2d");if(!P)return;const b=E.current;if(b.width<=0||b.viewportHeight<=0){P.clearRect(0,0,N.width,N.height);return}const M=Number.isFinite(b.devicePixelRatio??NaN)?b.devicePixelRatio:typeof window<"u"&&window.devicePixelRatio||1;lo(N,b.width,b.viewportHeight,M);const D=b.segmentsByItem.length,O=typeof b.renderStartIndex=="number"&&Number.isFinite(b.renderStartIndex)?Math.max(0,Math.floor(b.renderStartIndex)):Math.max(0,Math.floor(b.scrollPosition/b.itemHeight)),q=Math.min(D,Math.ceil((b.scrollPosition+b.viewportHeight)/b.itemHeight)),X=(()=>{if(typeof b.renderEndIndex=="number"&&Number.isFinite(b.renderEndIndex)){const B=Math.floor(b.renderEndIndex);return Math.max(Math.min(D,B+1),O)}return Math.max(q,O)})(),F=(()=>{if(typeof b.lookaheadEndIndex=="number"&&Number.isFinite(b.lookaheadEndIndex)){const B=Math.floor(b.lookaheadEndIndex),re=Math.min(D,B+1);return Math.max(re,X)}return Math.max(q,X)})(),W=so(b.segmentsByItem,O,F),fe=ao(b.glyphsByItem,O,F);P.save(),P.scale(M,M),P.clearRect(0,0,b.width,b.viewportHeight),P.translate(0,-b.scrollPosition),P.strokeStyle=b.color,io(P,W,b.strokeWidth),co(P,fe,b.expandGlyphColor??b.color,b.expandGlyphSize),P.restore()},[]),$=l.useCallback(()=>{y.current===null&&(y.current=window.requestAnimationFrame(v))},[v]);return l.useEffect(()=>{E.current={segmentsByItem:e,glyphsByItem:t,itemHeight:r,width:n,viewportHeight:a,scrollPosition:i,color:c,strokeWidth:u,renderStartIndex:m,renderEndIndex:S,lookaheadEndIndex:T,devicePixelRatio:x,expandGlyphColor:_,expandGlyphSize:p},$()},[e,t,r,n,a,i,c,u,m,S,T,x,_,p,$]),l.useEffect(()=>()=>{y.current!==null&&(window.cancelAnimationFrame(y.current),y.current=null)},[]),h.jsx("canvas",{ref:g,className:"pointer-events-none absolute top-0 left-0 z-0"})});Qr.displayName="TreeLineCanvas";const uo=e=>{const t=new Map;for(let r=0;r<e.length;r++){const n=e[r].entry.absolutePath;t.has(n)||t.set(n,r)}return t},Tr=(e,t)=>e.selectedPath===t?e:{selectedPath:t,selectionGeneration:e.selectionGeneration+1,anchor:e.anchor},fo=(e,t)=>({...e,anchor:{path:t,selectionGeneration:e.selectionGeneration,focused:!0}}),ho=(e,t)=>{const{anchor:r,selectionGeneration:n,selectedPath:a}=t;if(r!==null&&(r.focused||r.selectionGeneration===n)){const i=e.get(r.path);if(i!==void 0)return i}if(a!==null){const i=e.get(a);if(i!==void 0)return i}return 0},mo={msOverflowStyle:"none",scrollbarWidth:"none"},po=()=>{let e=document.getElementById("directory-tree-webkit-scrollbar-hide");e||(e=document.createElement("style"),e.id="directory-tree-webkit-scrollbar-hide",e.textContent=".directory-tree-container::-webkit-scrollbar { display: none; }",document.head.appendChild(e))},yo=()=>()=>{},go=()=>!0,bo=()=>!1,So=e=>{const t=l.useRef(null),r=t.current;return r!==null&&ye.VIRTUAL_SCROLL_LABEL_KEYS.every(n=>r[n]===e[n])?r:(t.current=e,e)},_r=new Set(["top","bottom","center","nearest"]),Nr=e=>{const t=e?.align;if(t===void 0)return"top";if(!_r.has(t))throw new RangeError(`[directory-tree] Unsupported scroll alignment ${JSON.stringify(t)}; expected one of ${[..._r].join(", ")}.`);return t},vo={position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap"},wo=(e,t,r,n,a)=>{const i=[],c=[];let u=0;const m=(S,T,x)=>{const _=a?[...S].sort(a):S;for(let p=0;p<_.length;p++){const g=_[p],y=p===_.length-1,E=[...x,y],v=g.children!==void 0,$=v&&t(g.absolutePath,g.relativePath);let N=T,P=x;n&&(N=T-1,P=x.slice(1)),i.push({entry:g,indentLevel:N,depth:T,positionInSet:p+1,setSize:_.length}),r&&(N>u&&(u=N),c.push({id:g.absolutePath,name:g.name,absolutePath:g.absolutePath,indentLevel:N,isLastChild:y,isDirectory:v,isExpanded:$,ancestorIsLast:[...P],hideLines:n&&T===0})),v&&$&&g.children&&m(g.children,T+1,E)}};return m(e,0,[]),{flatItems:i,lineItems:c,maxIndent:u}},Pr=(e,t)=>{const r=e.length-1;if(r<=0)return 0;let n=0,a=r-1,i=0;for(;n<=a;){const c=n+a>>>1;e[c]<=t?(i=c,n=c+1):a=c-1}return i},Eo=(e,t,r,n,a,i)=>{const c=n?.renderStart??Math.max(0,Pr(i,a)),u=t>0?Pr(i,a+t)+r:c+r,m=e>0?Math.min(e-1,Math.max(c,u)):c,S=n?.renderEnd??m,T=e>0?Math.min(e-1,S+r):S;return{renderStart:c,renderEnd:S,lookaheadEnd:T}},Ro=(e,t,r,n)=>{if(e.length===0)return{segmentsByItem:[],glyphsByItem:[]};const{indentSize:a,typeIconSize:i,glyphSize:c,originX:u}=n,m=Array.from({length:e.length},()=>[]),S=Array.from({length:e.length},()=>[]),T=u+to(n),x=p=>p*a+T,_=c/2+2;for(let p=0;p<e.length;p++){const g=e[p],y=t[p]??0,E=r[p]??0,v=E+y/2,$=e[p+1],N=v+i/2,P=E+y,b=$!==void 0&&$.indentLevel===g.indentLevel+1&&N<P?{key:`${g.id}-connector-children`,x1:x($.indentLevel),y1:N,x2:x($.indentLevel),y2:P,itemIndex:p}:null;if(g.hideLines){b!==null&&(m[p]=[b]);continue}const M=[];for(let O=0;O<g.indentLevel;O++){if(g.ancestorIsLast[O]??!1)continue;let X=!1;for(let F=p;F<e.length;F++){const W=e[F];if(W.indentLevel>O&&W.ancestorIsLast.length>O&&!W.ancestorIsLast[O]){X=!0;break}if(F>p&&W.indentLevel===O)break}if(X){const F=x(O);M.push({key:`${g.id}-ancestor-${O}`,x1:F,y1:E,x2:F,y2:E+y,itemIndex:p})}}const D=x(g.indentLevel);p>0&&M.push({key:`${g.id}-connector-top`,x1:D,y1:E,x2:D,y2:g.isDirectory?v-_:v,itemIndex:p}),!g.isDirectory&&g.isLastChild&&M.push({key:`${g.id}-connector-horizontal`,x1:D,y1:v,x2:u+g.indentLevel*a+ce,y2:v,itemIndex:p}),g.isLastChild||(g.isDirectory?M.push({key:`${g.id}-connector-bottom`,x1:D,y1:v+_,x2:D,y2:E+y,itemIndex:p}):M.push({key:`${g.id}-connector-bottom`,x1:D,y1:v,x2:D,y2:E+y,itemIndex:p})),b!==null&&M.push(b),m[p]=M,g.isDirectory&&(S[p]=[{key:`${g.id}-glyph`,itemIndex:p,centerX:D,centerY:v,size:c,isExpanded:g.isExpanded}])}return{segmentsByItem:m,glyphsByItem:S}},en=l.memo(({entry:e,indentLevel:t,originX:r,depth:n,positionInSet:a,setSize:i,isSelectedForAria:c,flatIndex:u,isActive:m,registerRowRef:S,onNavigationKeyDown:T,onRowFocus:x,onRowBlur:_,rowHeight:p,entryKindDirectory:g,entryKindFile:y,isDirOpen:E,expansion:{toggleDirectory:v,onToggleDirectoryRecursive:$},selection:{onEntryClick:N,selectedPath:P,currentPath:b,mode:M="none",selectedItems:D,onSelectionChange:O},visual:{iconOverrides:q,showExpandIcons:X=!0,showDirectoryIcons:F=!0,showFileIcons:W=!0,useCanvasExpandIcons:fe=!1,expandIconSize:B,typeIconSize:re,fontSize:he,indentSize:Y,highlightStyles:G,entryClassName:we,entryStyle:ge,nameClassName:o,nameStyle:f,directoryNameClassName:I,directoryNameStyle:R,fileNameClassName:be,fileNameStyle:C,expandIconClassName:L,expandIconStyle:Z}})=>{We(e.style,{option:"entry.style",absolutePath:e.absolutePath});const[me,Ie]=l.useState(!1),j=e.children!==void 0,Se=j&&E(e.absolutePath),U=e.absolutePath===P,Me=e.absolutePath===b,ne=!j&&D?.has(e.absolutePath),Q=l.useCallback(ee=>S(u,ee),[S,u]),se=j?void 0:Mr(e),Ce=Wr({entry:e,isDirectory:j,isExpanded:Se,isItemSelected:!!ne,selectionMode:M,onSelectionChange:O,onEntryClick:N,toggleDirectory:v,onToggleDirectoryRecursive:$}),Ee=me?G?.hoverClassName!==void 0?G.hoverClassName:A.entryHover:"",Pe=(()=>{if(j){if(U)return G?.directorySelectedClassName!==void 0?G.directorySelectedClassName:A.entrySelected}else if(U||ne)return G?.itemSelectedClassName!==void 0?G.itemSelectedClassName:K.twMerge(U&&A.entrySelected,ne&&A.entryItemSelected);return""})(),Re=K.twMerge(A.entry,Ee,Pe,we,e.className),Ye=K.twMerge(A.expandIcon,L,(U||ne)&&A.expandIconSelected),H=K.twMerge(A.typeIcon,(U||ne)&&A.typeIconSelected),Qe=K.twMerge(A.name,o,j&&A.nameDirectory,j&&I,!j&&be,(U||ne)&&A.nameSelected),ft=Dr({isDirectory:j,isExpanded:Se,showExpandIcons:X&&t>=0,useCanvasExpandIcons:fe,expandIconSize:B}),Ge=(j?F:W)?$r({entry:e,isDirectory:j,isExpanded:Se,isSelected:U,isItemSelected:!!ne,extension:se,mimeType:e.mimeType},q,re):null,Ve={...me?G?.hoverStyle:{},...j&&U?G?.directorySelectedStyle:{},...!j&&(U||ne)?G?.itemSelectedStyle:{}},et=Fr(e.data),ht={width:re,height:re},Oe=Ar(he),Te=r+t*Y;return h.jsxs("div",{className:Re,style:{...Oe,...Ve,...ge,...e.style,paddingLeft:`${Math.max(0,Te)}px`,transform:Te<0?`translateX(${Te}px)`:void 0,width:Te<0?`calc(100% + ${-Te}px)`:void 0,height:`${p}px`},...et,"data-entry-type":j?"directory":"file","data-entry-expanded":j?String(Se):void 0,"data-entry-selected":U?"true":void 0,"data-entry-item-selected":ne?"true":void 0,onClick:Ce,onMouseEnter:()=>Ie(!0),onMouseLeave:()=>Ie(!1),onFocus:ee=>x(u,e.absolutePath,ee.currentTarget),onBlur:ee=>_(e.absolutePath,ee.currentTarget),ref:Q,onKeyDown:ee=>{if(ee.key==="Enter"||ee.key===" "){ee.preventDefault(),ee.repeat||Ce(ee);return}T(ee,u)},tabIndex:m?0:-1,role:"treeitem","aria-expanded":j?Se:void 0,"aria-level":n+1,"aria-posinset":a,"aria-setsize":i,"aria-selected":M==="none"?void 0:c,"aria-current":Me?"page":void 0,"aria-label":`${e.name} (${j?g:y})`,children:[(X||fe)&&h.jsx("span",{className:Ye,style:{...Z,width:ce,height:ce},children:ft}),(j?F:W)&&h.jsx("span",{className:H,style:ht,children:Ge}),h.jsx("span",{className:Qe,style:{...Oe,...f,...j?R:C},"data-entry-type":j?"directory":"file","data-entry-role":"name",children:e.label??e.name})]})},(e,t)=>{if(e.entry!==t.entry)return!1;const r=e.entry.children!==void 0,n=t.entry.children!==void 0,a=r&&e.isDirOpen(e.entry.absolutePath),i=n&&t.isDirOpen(t.entry.absolutePath);return e.indentLevel===t.indentLevel&&e.originX===t.originX&&e.depth===t.depth&&e.positionInSet===t.positionInSet&&e.setSize===t.setSize&&e.isSelectedForAria===t.isSelectedForAria&&e.flatIndex===t.flatIndex&&e.isActive===t.isActive&&e.rowHeight===t.rowHeight&&e.entryKindDirectory===t.entryKindDirectory&&e.entryKindFile===t.entryKindFile&&a===i&&e.selection.selectedPath===t.selection.selectedPath&&e.selection.currentPath===t.selection.currentPath&&e.selection.mode===t.selection.mode&&e.selection.selectedItems===t.selection.selectedItems&&e.visual.iconOverrides===t.visual.iconOverrides&&e.visual.showExpandIcons===t.visual.showExpandIcons&&e.visual.showDirectoryIcons===t.visual.showDirectoryIcons&&e.visual.showFileIcons===t.visual.showFileIcons&&e.visual.useCanvasExpandIcons===t.visual.useCanvasExpandIcons&&e.visual.expandIconSize===t.visual.expandIconSize&&e.visual.typeIconSize===t.visual.typeIconSize&&e.visual.fontSize===t.visual.fontSize&&e.visual.indentSize===t.visual.indentSize&&e.visual.highlightStyles===t.visual.highlightStyles&&e.visual.entryClassName===t.visual.entryClassName&&e.visual.entryStyle===t.visual.entryStyle&&e.visual.nameClassName===t.visual.nameClassName&&e.visual.nameStyle===t.visual.nameStyle&&e.visual.directoryNameClassName===t.visual.directoryNameClassName&&e.visual.directoryNameStyle===t.visual.directoryNameStyle&&e.visual.fileNameClassName===t.visual.fileNameClassName&&e.visual.fileNameStyle===t.visual.fileNameStyle&&e.visual.expandIconClassName===t.visual.expandIconClassName&&e.visual.expandIconStyle===t.visual.expandIconStyle});en.displayName="DirectoryEntryItem";const tn=e=>{const t=[];if(e.children)for(const r of e.children)r.type==="directory"&&(t.push(r.absolutePath),t.push(...tn(r)));return t},xo=({entries:e,expansion:{toggle:t,isExpanded:r,expandMultiple:n,collapseMultiple:a,isPending:i,alwaysExpanded:c=!1,doubleClickAction:u="recursive"},selection:{onEntryClick:m,selectedPath:S,currentPath:T,mode:x="none",selectedItems:_,onSelectionChange:p},visual:{className:g,style:y,ariaLabel:E,ariaLabelledBy:v,lineColor:$=Lr,showTreeLines:N=!0,showExpandIcons:P=!0,showDirectoryIcons:b=!0,showFileIcons:M=!0,iconOverrides:D,expandIconSize:O,typeIconSize:q,fontSize:X,indentSize:F,itemHeight:W=_t,removeRootIndent:fe=!1,highlightStyles:B,entryClassName:re,entryStyle:he,nameClassName:Y,nameStyle:G,directoryNameClassName:we,directoryNameStyle:ge,fileNameClassName:o,fileNameStyle:f,expandIconClassName:I,expandIconStyle:R}={},virtualScroll:be,grid:C,sort:L,locale:Z,labels:me,ref:Ie})=>{const j=ye.resolveVirtualScrollLocale(Z),Se=l.useMemo(()=>Zr(Z,me),[Z,me]),U=So(Xn(Se)),{entryKindDirectory:Me,entryKindFile:ne}=Se,Q=l.useMemo(()=>qn({indentSize:F,typeIconSize:q,fontSize:X}),[F,q,X]);l.useMemo(()=>{We(he,{option:"visual.entryStyle"}),We(B?.hoverStyle,{option:"visual.highlightStyles.hoverStyle"}),We(B?.directorySelectedStyle,{option:"visual.highlightStyles.directorySelectedStyle"}),We(B?.itemSelectedStyle,{option:"visual.highlightStyles.itemSelectedStyle"}),Fn(R,{option:"visual.expandIconStyle"})},[he,B,R]);const se=C!==void 0,Ce=l.useSyncExternalStore(yo,go,bo),Ee=l.useRef(null),Pe=l.useRef(null),Re=l.useRef(null),[Ye,H]=l.useState(0),[Qe,ft]=l.useState(0),[Ge,Ve]=l.useState(0),[et,ht]=l.useState(null),{overscanCount:Oe=15,className:Te,background:ee,onScroll:Dt,onRangeChange:$t,onScrollAdjust:Ft,liveRegion:zt,initialScrollIndex:Bt,initialScrollOffset:De,initialScrollAnchor:Ht,callbackThrottleMs:Wt=5,contentInsets:Yt,onItemFocus:Gt,viewportHeightOverride:ae,scrollBarOptions:mt,behaviorOptions:Vt,preserveScrollAnchor:Kt=!1,getItemKey:rn,testId:Xt,contentProps:pt}=be??{},Ut=l.useMemo(()=>se?{...pt,role:"rowgroup"}:{...pt,role:"tree","aria-label":v?void 0:E,"aria-labelledby":v,"aria-multiselectable":x==="multiple"?!0:void 0,"aria-busy":i?!0:void 0},[se,pt,E,v,x,i]),Jt=l.useMemo(()=>({...Vt,enableKeyboardNavigation:!1}),[Vt]),[tt,qt]=l.useState(typeof De=="number"?De:0),yt=l.useRef(typeof De=="number"?De:0),Zt=l.useCallback((s,d)=>{yt.current=s,qt(s),Dt?.(s,d)},[Dt]),Qt=l.useCallback(s=>{const{renderingStartIndex:d,renderingEndIndex:w}=s;ht(k=>k&&k.renderStart===d&&k.renderEnd===w?k:{renderStart:d,renderEnd:w}),$t?.(s)},[$t]);l.useEffect(()=>{po()},[]),l.useEffect(()=>{const s=Ee.current,d=se?Pe.current:s,w=()=>{if(s){const z=s.clientWidth;ft(J=>Math.abs(J-z)>1?z:J)}if(typeof ae=="number")H(z=>Math.abs(z-ae)>1?ae:z);else if(d){const z=d.clientHeight;H(J=>Math.abs(J-z)>1?z:J)}};if(!(s||d))return H(0);w();const k=new ResizeObserver(w);return s&&k.observe(s),d&&d!==s&&k.observe(d),()=>k.disconnect()},[ae,se]);const $e=typeof ae=="number"?ae:Ye,ve=l.useCallback(s=>c||(Ce?r(s):!1),[Ce,r,c]),er=K.twMerge(A.container,i&&A.containerPending,g),tr=l.useMemo(()=>({...mo,...y??{},...typeof ae=="number"?{height:ae,minHeight:ae}:{}}),[y,ae]),gt=l.useCallback((s,d)=>{const w=[s.absolutePath,...tn(s)],k=d||u;if(w.every(ke=>ve(ke)))return a(w);if(w.every(ke=>!ve(ke))||k==="recursive")return n(w);if(k==="toggle")return a(w);console.warn(`[DirectoryTree] Unknown double click action: ${k}. No action taken.`)},[ve,n,a,u]),bt=se?!1:fe,{flatItems:Le,lineItems:St,maxIndent:rr}=l.useMemo(()=>wo(e,ve,N,bt,L),[e,ve,N,bt,L]),rt=Zn({indentSize:Q.indentSize,removeRootIndent:bt,hasExpandBox:P||N}),pe=l.useMemo(()=>N?eo(Q,O,rt):null,[N,Q,O,rt]),V=l.useMemo(()=>Le.map((s,d)=>({...s,rowHeight:Qn(W,s.entry,d)})),[Le,W]),_e=l.useMemo(()=>V.map(s=>s.rowHeight),[V]),je=l.useMemo(()=>{const s=new Array(_e.length+1);s[0]=0;for(let d=0;d<_e.length;d++)s[d+1]=s[d]+_e[d];return s},[_e]),nr=l.useCallback(s=>V[s]?.rowHeight??_t,[V]),nn=l.useCallback(s=>V[s]?.entry.absolutePath??s,[V]),or=rn??nn,Fe=S??null,vt=T??null,[sr,Ke]=l.useState(()=>({selectedPath:Fe,selectionGeneration:0,anchor:null})),wt=Tr(sr,Fe);wt!==sr&&Ke(s=>Tr(s,Fe));const nt=l.useMemo(()=>uo(Le),[Le]),ze=l.useMemo(()=>ho(nt,wt),[nt,wt]),Xe=l.useRef(new Map),ot=l.useRef(null),[st]=l.useState(Un),Ue=l.useRef(null),[on,ar]=l.useState(!0),Et=l.useRef(Le);Et.current=Le;const lr=l.useRef(ve);lr.current=ve;const Rt=l.useRef(t);Rt.current=t;const ir=l.useRef(nt);ir.current=nt;const xt=l.useRef(ze);xt.current=ze;const cr=l.useRef(Gt);cr.current=Gt;const Ae=l.useCallback(s=>{const d=Re.current;return!d||d.getViewportSize()<=0?!1:(d.scrollToIndex(s,{align:"nearest"}),!0)},[]),xe=l.useCallback(s=>{const d=Xe.current.get(s);if(d===void 0){Ue.current=s,Ae(s)||(Ue.current=null);return}Ue.current=null,Ae(s),d.focus({preventScroll:!0})},[Ae]),dr=l.useCallback((s,d)=>{if(d)Xe.current.set(s,d),Ue.current===s?(Ue.current=null,d.focus({preventScroll:!0})):d.contains(d.ownerDocument.activeElement)&&Ke(w=>w.anchor===null?w:{...w,anchor:{...w.anchor,focused:!0}});else{const w=Xe.current.get(s);Xe.current.delete(s),w?.contains(w.ownerDocument.activeElement)&&Ke(k=>k.anchor===null?k:{...k,anchor:{...k.anchor,focused:!1}})}s===xt.current&&ar(d!==null)},[]);l.useLayoutEffect(()=>{ar(Xe.current.has(ze))},[ze]);const kt=l.useCallback((s,d,w)=>{const k=ot.current===w;ot.current=null,k||(Ke(z=>fo(z,d)),st.landedOn(w)||Ae(s)),cr.current?.(s)},[Ae,st]),at=l.useCallback(s=>st.mark(s.nativeEvent),[st]),It=l.useCallback((s,d)=>{const{ownerDocument:w}=d;if(!w.hasFocus()&&d.contains(w.activeElement)){ot.current=d;return}ot.current=null,Ke(k=>k.anchor!==null&&k.anchor.path===s?{...k,anchor:{...k.anchor,focused:!1}}:k)},[]),sn=l.useCallback(()=>xe(xt.current),[xe]),Ct=l.useCallback((s,d)=>{const w=Nr(d),k=Et.current.length;if(!Number.isInteger(s)||s<0||s>=k)throw new RangeError(`[directory-tree] scrollToIndex: ${String(s)} is not a row index (${k===0?"the tree has no rows":`expected an integer in 0..${String(k-1)}`}).`);if(w==="nearest"){Ae(s);return}Re.current?.scrollToIndex(s,{align:w})},[Ae]);l.useImperativeHandle(Ie,()=>({scrollToIndex:Ct,scrollToPath:(s,d)=>{Nr(d);const w=ir.current.get(s);return w===void 0?!1:(Ct(w,d),!0)},getScrollAnchor:()=>Re.current?.getScrollAnchor()??null}),[Ct]);const ur=l.useCallback((s,d)=>{if(s.altKey||s.ctrlKey||s.metaKey)return;const w=Et.current,k=w.length-1;if(k<0)return;const z=w[d],J=z?.entry.children!==void 0,ke=J&&lr.current(z.entry.absolutePath);switch(s.key){case"ArrowDown":s.preventDefault(),xe(Math.min(d+1,k));break;case"ArrowUp":s.preventDefault(),xe(Math.max(d-1,0));break;case"Home":s.preventDefault(),xe(0);break;case"End":s.preventDefault(),xe(k);break;case"ArrowRight":s.preventDefault(),J&&!ke?Rt.current(z.entry.absolutePath):J&&d<k&&w[d+1].depth>z.depth&&xe(d+1);break;case"ArrowLeft":{if(s.preventDefault(),J&&ke){Rt.current(z.entry.absolutePath);break}const un=z?.depth??0;for(let dt=d-1;dt>=0;dt--)if(w[dt].depth<un){xe(dt);break}break}}},[xe]),lt=l.useMemo(()=>pe===null||St.length===0?{segmentsByItem:[],glyphsByItem:[]}:Ro(St,_e,je,pe),[St,_e,je,pe]),it=l.useMemo(()=>pe===null||e.length===0?0:pe.originX+rr*pe.indentSize+ce+pe.typeIconSize,[e.length,rr,pe]),{renderStart:fr,renderEnd:hr,lookaheadEnd:mr}=l.useMemo(()=>Eo(V.length,$e,Oe,et,tt,je),[V.length,$e,Oe,et,tt,je]),Tt=l.useMemo(()=>pe===null||it<=0||$e<=0||lt.segmentsByItem.length===0?null:h.jsx("div",{className:"pointer-events-none absolute inset-0 z-1","aria-hidden":"true",children:h.jsx("div",{className:"absolute top-0 left-0",style:{width:it,height:$e},children:h.jsx(Qr,{segmentsByItem:lt.segmentsByItem,glyphsByItem:lt.glyphsByItem,itemHeight:_e[0]??_t,width:it,viewportHeight:$e,scrollPosition:tt,color:$,expandGlyphColor:$,expandGlyphSize:pe.glyphSize,renderStartIndex:fr,renderEndIndex:hr,lookaheadEndIndex:mr})})}),[it,$e,fr,hr,mr,tt,lt,$,pe,_e]),pr=l.useCallback(s=>V[s],[V]),yr=l.useRef(null);l.useLayoutEffect(()=>{const s=yr.current;if(yr.current={items:V,offsets:je},!Kt||!s||s.items===V)return;const d=Re.current,w=d?.getScrollPosition(),k=typeof w=="number"&&w>=0?w:yt.current,z=no(s.items,s.offsets,k);if(!z)return;const J=oo(z,V,je);if(J===null||Math.abs(J-k)<1)return;const ke=d?d.scrollTo(J):J;yt.current=ke,qt(ke)},[V,je,Kt]);const Ne=C?.columns,Be=C?.scrollBarWidth??mt?.width??Ur,te=l.useMemo(()=>Ne?Gn({measuredWidth:Qe,columns:Ne,scrollBarWidth:Be}):null,[Ne,Qe,Be]),ct=l.useMemo(()=>Ne?Yn(Ne):"",[Ne]),an=l.useMemo(()=>C?.showFooter&&Ne?Vn(e):[],[C?.showFooter,Ne,e]),He=te?.maxHScroll??0;l.useEffect(()=>{Ve(s=>Nt(s,He))},[He]);const gr=l.useCallback(s=>Ve(d=>Nt(d+s,He)),[He]),br=l.useMemo(()=>({iconOverrides:D,showExpandIcons:P,showDirectoryIcons:b,showFileIcons:M,useCanvasExpandIcons:N,expandIconSize:O,typeIconSize:Q.typeIconSize,fontSize:Q.fontSize,indentSize:Q.indentSize,highlightStyles:B,expandIconClassName:I,expandIconStyle:R}),[D,P,b,M,N,O,Q,B,I,R]),Sr=l.useMemo(()=>h.jsx(ye.VirtualScroll,{ref:Re,itemCount:V.length,getItem:pr,getItemHeight:nr,getItemKey:or,testId:Xt,contentProps:Ut,locale:j,labels:U,viewportSize:typeof ae=="number"?ae:void 0,overscanCount:Oe,onScroll:Zt,onRangeChange:Qt,onScrollAdjust:Ft,liveRegion:zt,className:Te,onWheelHorizontal:se?gr:void 0,background:h.jsxs(h.Fragment,{children:[se&&te?h.jsx("div",{className:"pointer-events-none absolute top-0 left-0 z-1 h-full overflow-hidden",style:{width:te.nameWidth},"aria-hidden":"true",children:Tt}):Tt,ee]}),initialScrollIndex:Bt,initialScrollOffset:De,initialScrollAnchor:Ht,callbackThrottleMs:Wt,contentInsets:Yt,scrollBarOptions:mt,behaviorOptions:Jt,children:(s,d)=>s?se&&C&&te?h.jsx(Vr,{entry:s.entry,indentLevel:s.indentLevel,positionInSet:s.positionInSet,setSize:s.setSize,rowIndex:d+(C.showHeader??!0?2:1),flatIndex:d,onRowFocus:kt,onRowBlur:It,isSelectedForAria:!!_?.has(s.entry.absolutePath),rowHeight:s.rowHeight,isDirOpen:ve,columns:C.columns,numericTemplate:ct,numericTotal:te.numericTotal,nameWidth:te.nameWidth,rowClassName:C.rowClassName,selection:{onEntryClick:m,selectedPath:Fe,currentPath:vt,mode:x,selectedItems:_,onSelectionChange:p},expansion:{toggleDirectory:t,onToggleDirectoryRecursive:gt},visual:br},s.entry.absolutePath):h.jsx(en,{entry:s.entry,indentLevel:s.indentLevel,originX:rt,depth:s.depth,positionInSet:s.positionInSet,setSize:s.setSize,isSelectedForAria:!!_?.has(s.entry.absolutePath),flatIndex:d,isActive:d===ze,registerRowRef:dr,onNavigationKeyDown:ur,onRowFocus:kt,onRowBlur:It,rowHeight:s.rowHeight,entryKindDirectory:Me,entryKindFile:ne,isDirOpen:ve,expansion:{toggleDirectory:t,onToggleDirectoryRecursive:gt},selection:{onEntryClick:m,selectedPath:Fe,currentPath:vt,mode:x,selectedItems:_,onSelectionChange:p},visual:{iconOverrides:D,showExpandIcons:P,showDirectoryIcons:b,showFileIcons:M,useCanvasExpandIcons:N,expandIconSize:O,typeIconSize:Q.typeIconSize,fontSize:Q.fontSize,indentSize:Q.indentSize,highlightStyles:B,entryClassName:re,entryStyle:he,nameClassName:Y,nameStyle:G,directoryNameClassName:we,directoryNameStyle:ge,fileNameClassName:o,fileNameStyle:f,expandIconClassName:I,expandIconStyle:R}},s.entry.absolutePath):null}),[V.length,pr,nr,or,Xt,Ut,j,U,Me,ne,ze,dr,ur,kt,It,ae,Oe,Zt,Qt,Ft,zt,Te,se,gr,te,Tt,ee,Bt,De,Ht,Wt,Yt,mt,Jt,C,ct,ve,m,Fe,vt,x,_,p,t,gt,br,D,P,b,M,N,O,Q,rt,B,re,he,Y,G,we,ge,o,f,I,R]);if(!(C&&te))return h.jsxs("div",{ref:Ee,className:er,style:tr,onPointerDownCapture:at,onMouseDownCapture:at,children:[Le.length>0&&!on&&h.jsx("span",{tabIndex:0,"data-directory-tree-tab-stop":"",style:vo,onFocus:sn}),Sr]});const ln=C.showHeader??!0,cn=C.showFooter??!1,dn={...tr,"--dt-hscroll":`${Ge}px`};return h.jsxs("div",{ref:Ee,className:K.twMerge(er,"dt-grid"),style:dn,role:"treegrid","aria-label":v?void 0:E,"aria-labelledby":v,"aria-multiselectable":x==="multiple"?!0:void 0,"aria-busy":i?!0:void 0,"aria-rowcount":V.length+(C.showHeader??!0?1:0),onPointerDownCapture:at,onMouseDownCapture:at,children:[ln&&h.jsx("div",{role:"rowgroup",children:h.jsx(Bn,{columns:C.columns,numericTemplate:ct,numericTotal:te.numericTotal,nameWidth:te.nameWidth,scrollBarWidth:Be,className:C.headerClassName})}),h.jsx("div",{ref:Pe,className:"dt-grid-body",children:Sr}),He>0&&h.jsxs("div",{className:"dt-grid-hscrollbar-row",children:[h.jsx("div",{className:"dt-grid-scrollbar-spacer",style:{width:te.nameWidth},"aria-hidden":"true"}),h.jsx(ye.ScrollBar,{horizontal:!0,contentSize:te.numericTotal,viewportSize:te.numericVisible,scrollPosition:Ge,scrollBarWidth:Be,locale:j,labels:U,onScroll:s=>{const d=typeof s=="function"?s(Ge):s,w=Nt(d,He);return Ve(w),w}}),h.jsx("div",{className:"dt-grid-scrollbar-spacer",style:{width:Be},"aria-hidden":"true"})]}),cn&&h.jsx("div",{role:"rowgroup",children:h.jsx(Hn,{columns:C.columns,numericTemplate:ct,numericTotal:te.numericTotal,nameWidth:te.nameWidth,scrollBarWidth:Be,allEntries:an,className:C.footerClassName})})]})},ko=({initialExpanded:e=new Set,storageKey:t}={})=>{const[r,n]=l.useTransition(),[a,i]=l.useState(()=>{if(typeof window<"u"&&t)try{const y=window.localStorage.getItem(t);if(y){const E=JSON.parse(y);return new Set(E)}}catch(y){console.error("[useDirectoryTreeState] Error reading from localStorage",y)}return e}),c=l.useCallback(y=>{n(()=>{i(E=>{const v=new Set(E);return y(v),v})})},[]),u=l.useCallback((y,E)=>{c(v=>{for(const $ of y)E(v,$)})},[c]);l.useEffect(()=>{if(t&&typeof window<"u")try{window.localStorage.setItem(t,JSON.stringify(Array.from(a)))}catch(y){console.warn(`Error setting localStorage key "${t}":`,y)}},[a,t]);const m=l.useCallback(y=>{u([y],(E,v)=>{E.has(v)?E.delete(v):E.add(v)})},[u]),S=l.useCallback(y=>{u([y],(E,v)=>{E.add(v)})},[u]),T=l.useCallback(y=>{u([y],(E,v)=>{E.delete(v)})},[u]),x=l.useCallback(y=>{u(y,(E,v)=>{E.delete(v)})},[u]),_=l.useCallback(y=>{u(y,(E,v)=>{E.add(v)})},[u]),p=l.useCallback(()=>{c(y=>{y.clear()})},[c]),g=l.useCallback(y=>a.has(y),[a]);return{expanded:a,toggle:m,expand:S,collapse:T,collapseMultiple:x,expandMultiple:_,collapseAll:p,isExpanded:g,isPending:r}};exports.DIRECTORY_TREE_LABEL_CATALOGS=qr;exports.DIRECTORY_TREE_LABEL_KEYS=Lt;exports.DirectoryTree=xo;exports.EXPAND_ICON_STYLE_PROPERTIES=Br;exports.FILE_ICON_PAIRS=En;exports.MARK_PAIRS=Or;exports.ROW_STYLE_PROPERTIES=zr;exports.directoryTreeClasses=A;exports.resolveDirectoryTreeLabels=Zr;exports.useDirectoryTreeState=ko;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),i0=require("@aiquants/virtualscroll"),c=require("react"),D=require("tailwind-merge");function v2(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(a,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return a.default=e,Object.freeze(a)}const t=v2(c);function H2({title:e,titleId:a,...n},r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":a},n),e?t.createElement("title",{id:a},e):null,t.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const V2=t.forwardRef(H2);function Z2({title:e,titleId:a,...n},r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":a},n),e?t.createElement("title",{id:a},e):null,t.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const M2=t.forwardRef(Z2);function y2({title:e,titleId:a,...n},r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":a},n),e?t.createElement("title",{id:a},e):null,t.createElement("path",{d:"M19.5 21a3 3 0 0 0 3-3v-4.5a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3V18a3 3 0 0 0 3 3h15ZM1.5 10.146V6a3 3 0 0 1 3-3h5.379a2.25 2.25 0 0 1 1.59.659l2.122 2.121c.14.141.331.22.53.22H19.5a3 3 0 0 1 3 3v1.146A4.483 4.483 0 0 0 19.5 9h-15a4.483 4.483 0 0 0-3 1.146Z"}))}const E2=t.forwardRef(y2),b2=c.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),e0=t.forwardRef((e,a)=>{const{alt:n,color:r,size:o,weight:i,mirrored:s,children:u,weights:m,...g}=e,{color:E="currentColor",size:M,weight:b="regular",mirrored:f=!1,...p}=t.useContext(b2);return t.createElement("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:o??M,height:o??M,fill:r??E,viewBox:"0 0 256 256",transform:s||f?"scale(-1, 1)":void 0,...p,...g},!!n&&t.createElement("title",null,n),u,m.get(i??b))});e0.displayName="IconBase";const w2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Z"}))]]),we=t.forwardRef((e,a)=>t.createElement(e0,{ref:a,...e,weights:w2}));we.displayName="FileIcon";const S2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M96.59,124.91a12,12,0,0,0-13.08,2.6L63,148H44a12,12,0,0,0-12,12v40a12,12,0,0,0,12,12H63l20.48,20.48A12,12,0,0,0,104,224V136A12,12,0,0,0,96.59,124.91ZM80,195l-3.51-3.52A12,12,0,0,0,68,188H56V172H68a12,12,0,0,0,8.49-3.51L80,165Zm80-15a44.55,44.55,0,0,1-21.95,38.36A12,12,0,1,1,126,197.64a20.51,20.51,0,0,0,0-35.28,12,12,0,1,1,12.1-20.72A44.55,44.55,0,0,1,160,180ZM216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v72a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212H180a12,12,0,0,0,0,24h20a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M72,160l24-24v88L72,200H48V160ZM152,32V88h56Z",opacity:"0.2"}),t.createElement("path",{d:"M99.06,128.61a8,8,0,0,0-8.72,1.73L68.69,152H48a8,8,0,0,0-8,8v40a8,8,0,0,0,8,8H68.69l21.65,21.66A8,8,0,0,0,104,224V136A8,8,0,0,0,99.06,128.61ZM88,204.69,77.66,194.34A8,8,0,0,0,72,192H56V168H72a8,8,0,0,0,5.66-2.34L88,155.31ZM152,180a40.55,40.55,0,0,1-20,34.91A8,8,0,0,1,124,201.09a24.49,24.49,0,0,0,0-42.18A8,8,0,0,1,132,145.09,40.55,40.55,0,0,1,152,180Zm61.66-97.66-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v80a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216H168a8,8,0,0,0,0,16h32a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M152,180a40.55,40.55,0,0,1-20,34.91A8,8,0,0,1,124,201.09a24.49,24.49,0,0,0,0-42.18A8,8,0,0,1,132,145.09,40.55,40.55,0,0,1,152,180ZM99.06,128.61a8,8,0,0,0-8.72,1.73L68.69,152H48a8,8,0,0,0-8,8v40a8,8,0,0,0,8,8H68.69l21.65,21.66A8,8,0,0,0,104,224V136A8,8,0,0,0,99.06,128.61ZM216,88V216a16,16,0,0,1-16,16H168a8,8,0,0,1,0-16h32V96H152a8,8,0,0,1-8-8V40H56v80a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M98.3,130.46a6,6,0,0,0-6.54,1.3L69.51,154H48a6,6,0,0,0-6,6v40a6,6,0,0,0,6,6H69.51l22.25,22.24A6,6,0,0,0,102,224V136A6,6,0,0,0,98.3,130.46Zm-8.3,79L76.24,195.76A6,6,0,0,0,72,194H54V166H72a6,6,0,0,0,4.24-1.76L90,150.49ZM150,180a38.53,38.53,0,0,1-19,33.18A6,6,0,0,1,125,202.82a26.5,26.5,0,0,0,0-45.64A6,6,0,0,1,131,146.82,38.53,38.53,0,0,1,150,180Zm62.24-96.24-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v80a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2H168a6,6,0,0,0,0,12h32a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M99.06,128.61a8,8,0,0,0-8.72,1.73L68.69,152H48a8,8,0,0,0-8,8v40a8,8,0,0,0,8,8H68.69l21.65,21.66A8,8,0,0,0,104,224V136A8,8,0,0,0,99.06,128.61ZM88,204.69,77.66,194.34A8,8,0,0,0,72,192H56V168H72a8,8,0,0,0,5.66-2.34L88,155.31ZM152,180a40.55,40.55,0,0,1-20,34.91A8,8,0,0,1,124,201.09a24.49,24.49,0,0,0,0-42.18A8,8,0,0,1,132,145.09,40.55,40.55,0,0,1,152,180Zm61.66-97.66-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v80a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216H168a8,8,0,0,0,0,16h32a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M97.53,132.3a4,4,0,0,0-4.36.87L70.34,156H48a4,4,0,0,0-4,4v40a4,4,0,0,0,4,4H70.34l22.83,22.83A4,4,0,0,0,100,224V136A4,4,0,0,0,97.53,132.3Zm-5.53,82L74.83,197.17A4,4,0,0,0,72,196H52V164H72a4,4,0,0,0,2.83-1.17L92,145.66ZM148,180a36.52,36.52,0,0,1-18,31.45,4,4,0,0,1-4-6.9,28.5,28.5,0,0,0,0-49.1,4,4,0,0,1,4-6.9A36.52,36.52,0,0,1,148,180Zm62.83-94.83-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v80a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4H168a4,4,0,0,0,0,8h32a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156Z"}))]]),Se=t.forwardRef((e,a)=>t.createElement(e0,{ref:a,...e,weights:S2}));Se.displayName="FileAudioIcon";const L2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M180.49,143.51a12,12,0,0,1,0,17l-24,24a12,12,0,0,1-17-17L155,152l-15.52-15.51a12,12,0,1,1,17-17Zm-64-24a12,12,0,0,0-17,0l-24,24a12,12,0,0,0,0,17l24,24a12,12,0,0,0,17-17L101,152l15.52-15.51A12,12,0,0,0,116.49,119.51ZM220,88V216a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88ZM160,57V80h23Zm36,155V104H148a12,12,0,0,1-12-12V44H60V212Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34Zm-104,88a8,8,0,0,1-11.32,11.32l-24-24a8,8,0,0,1,0-11.32l24-24a8,8,0,0,1,11.32,11.32L91.31,152Zm72-12.68-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32l24,24A8,8,0,0,1,181.66,157.66ZM152,88V44l44,44Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M180.24,147.76a6,6,0,0,1,0,8.48l-24,24a6,6,0,0,1-8.48-8.48L167.51,152l-19.75-19.76a6,6,0,1,1,8.48-8.48Zm-72-24a6,6,0,0,0-8.48,0l-24,24a6,6,0,0,0,0,8.48l24,24a6,6,0,1,0,8.48-8.48L88.49,152l19.75-19.76A6,6,0,0,0,108.24,123.76ZM214,88V216a14,14,0,0,1-14,14H56a14,14,0,0,1-14-14V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88Zm-56-6h35.52L158,46.48Zm44,134V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2V216a2,2,0,0,0,2,2H200A2,2,0,0,0,202,216Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M178.83,149.17a4,4,0,0,1,0,5.66l-24,24a4,4,0,0,1-5.66-5.66L170.34,152l-21.17-21.17a4,4,0,1,1,5.66-5.66Zm-72-24a4,4,0,0,0-5.66,0l-24,24a4,4,0,0,0,0,5.66l24,24a4,4,0,1,0,5.66-5.66L85.66,152l21.17-21.17A4,4,0,0,0,106.83,125.17ZM212,88V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-56-4h42.34L156,41.65Zm48,132V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200A4,4,0,0,0,204,216Z"}))]]),Le=t.forwardRef((e,a)=>t.createElement(e0,{ref:a,...e,weights:L2}));Le.displayName="FileCodeIcon";const x2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M48,180c0,8.67,5.49,16,12,16a10.27,10.27,0,0,0,7.33-3.43,12,12,0,1,1,17.34,16.6A34,34,0,0,1,60,220C40.15,220,24,202,24,180s16.15-40,36-40a34,34,0,0,1,24.67,10.83,12,12,0,1,1-17.34,16.6A10.27,10.27,0,0,0,60,164C53.49,164,48,171.31,48,180Zm97.51-5.71c-5.13-3.45-11.33-5.24-16.8-6.82a79.5,79.5,0,0,1-7.91-2.59c2.45-1.18,9.71-1.3,16.07.33A12,12,0,0,0,143,142a69.24,69.24,0,0,0-12-1.86c-9.93-.66-18,1.08-24.1,5.17a24.45,24.45,0,0,0-10.69,17.76c-1.1,8.74,2.48,16.27,10.11,21.19,4.78,3.09,10.36,4.7,15.75,6.26,3,.89,7.94,2.3,9.88,3.53a2,2,0,0,1-.22.71c-1.36,1.55-9.57,1.79-16.39-.06a12,12,0,0,0-6.45,23.11A63.73,63.73,0,0,0,125.09,220c6.47,0,13.74-1.17,19.74-5.15a24.73,24.73,0,0,0,10.95-18C157,187.53,153.32,179.53,145.51,174.27ZM216,140.68A12,12,0,0,0,200.7,148L192,172.3,183.3,148A12,12,0,1,0,160.7,156l20,56a12,12,0,0,0,22.6,0l20-56A12,12,0,0,0,216,140.68ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88v20a12,12,0,1,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,1,1-24,0ZM160,80h23L160,57Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M48,180c0,11,7.18,20,16,20a14.24,14.24,0,0,0,10.22-4.66A8,8,0,0,1,85.78,206.4,30.06,30.06,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30.06,30.06,0,0,1,21.78,9.6,8,8,0,0,1-11.56,11.06A14.24,14.24,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.57,4.57,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.83-.56A8,8,0,0,0,142,145.86c-2.12-.55-21-5.22-32.84,2.76a20.58,20.58,0,0,0-9,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36A8,8,0,0,0,109.94,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.49,174.17,127.6,171.31Zm83.09-26.84a8,8,0,0,0-10.23,4.84L188,184.21l-12.47-34.9a8,8,0,0,0-15.07,5.38l20,56a8,8,0,0,0,15.07,0l20-56A8,8,0,0,0,210.69,144.47ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H212a4,4,0,0,0,4-4V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44ZM48,180c0,11,7.18,20,16,20a14.18,14.18,0,0,0,10.06-4.5,8.21,8.21,0,0,1,10.9-.91,8,8,0,0,1,.82,11.81A30.06,30.06,0,0,1,64,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a30,30,0,0,1,21.39,9.19,8.26,8.26,0,0,1,.73,11.09,8,8,0,0,1-11.9.38A14.17,14.17,0,0,0,64,160C55.18,160,48,169,48,180Zm103.81,16.31a20.82,20.82,0,0,1-9.19,15.23C137.43,215,131,216,125.13,216A61.14,61.14,0,0,1,110,214a8,8,0,1,1,4.3-15.41c4.38,1.2,14.95,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C137.49,174.17,154.05,179,151.81,196.31ZM215.42,155l-19.89,55.68a8,8,0,0,1-15.06,0L160.58,155a8.21,8.21,0,0,1,4.5-10.45,8,8,0,0,1,10.45,4.76L188,184.21l12.47-34.9a8,8,0,0,1,10.45-4.76A8.23,8.23,0,0,1,215.42,155Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M46,180c0,12.13,8.07,22,18,22a16.24,16.24,0,0,0,11.67-5.28,6,6,0,0,1,8.66,8.3A28.06,28.06,0,0,1,64,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,64,158C54.07,158,46,167.86,46,180Zm81.05-6.77c-10.86-3.13-13.41-4.69-13-7.91a6.59,6.59,0,0,1,2.88-5.08c5.6-3.79,17.66-1.82,21.45-.84a6,6,0,0,0,3.06-11.6c-2-.53-20.1-5-31.21,2.48a18.61,18.61,0,0,0-8.08,13.54c-1.8,14.19,12.26,18.25,21.57,20.94,12.12,3.5,14.78,5.33,14.2,9.76a6.85,6.85,0,0,1-3,5.34c-5.61,3.73-17.48,1.64-21.19.62A6,6,0,0,0,110.48,212a59.41,59.41,0,0,0,14.68,2c5.49,0,11.54-.95,16.36-4.14a18.89,18.89,0,0,0,8.31-13.81C151.84,180.39,136.92,176.08,127.05,173.22Zm83-26.88a6,6,0,0,0-7.67,3.63L188,190.15,173.65,150a6,6,0,1,0-11.3,4l20,56a6,6,0,0,0,11.3,0l20-56A6,6,0,0,0,210,146.34ZM214,88v24a6,6,0,1,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,1,1-12,0V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.24,1.76l56,56A6,6,0,0,1,214,88Zm-20.49-6L158,46.48V82Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M48,180c0,11,7.18,20,16,20a14.24,14.24,0,0,0,10.22-4.66A8,8,0,0,1,85.78,206.4,30.06,30.06,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30.06,30.06,0,0,1,21.78,9.6,8,8,0,0,1-11.56,11.06A14.24,14.24,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.57,4.57,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56A8,8,0,0,0,142,145.86c-2.12-.55-21-5.22-32.84,2.76a20.58,20.58,0,0,0-9,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36A8,8,0,0,0,109.94,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.49,174.17,127.6,171.31Zm83.09-26.84a8,8,0,0,0-10.23,4.84L188,184.21l-12.47-34.9a8,8,0,0,0-15.07,5.38l20,56a8,8,0,0,0,15.07,0l20-56A8,8,0,0,0,210.69,144.47ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M44,180c0,13.23,9,24,20,24a18.15,18.15,0,0,0,13.11-5.9,4,4,0,1,1,5.78,5.54A26.11,26.11,0,0,1,64,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a26.11,26.11,0,0,1,18.89,8.36,4,4,0,1,1-5.78,5.54A18.15,18.15,0,0,0,64,156C53,156,44,166.77,44,180Zm82.49-4.85c-10.53-3-15.08-4.91-14.42-10.08a8.51,8.51,0,0,1,3.75-6.49c6.25-4.23,18.77-2.24,23.06-1.11a4,4,0,0,0,2-7.74,61.11,61.11,0,0,0-10.47-1.61c-8.12-.54-14.54.75-19.1,3.82a16.66,16.66,0,0,0-7.22,12.13c-1.58,12.49,10.46,16,20.14,18.77,11.26,3.25,16.47,5.49,15.64,11.94a8.94,8.94,0,0,1-3.91,6.75c-6.27,4.17-18.61,2.05-22.83.88a4,4,0,1,0-2.15,7.7A57.89,57.89,0,0,0,125.19,212c5.18,0,10.83-.86,15.22-3.77a17,17,0,0,0,7.43-12.41C149.64,181.84,136.26,178,126.49,175.15Zm82.85-26.92a4,4,0,0,0-5.11,2.42L188,196.11l-16.23-45.46a4,4,0,1,0-7.54,2.7l20,56a4,4,0,0,0,7.54,0l20-56A4,4,0,0,0,209.34,148.23ZM212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-13.66-4L156,41.65V84Z"}))]]),xe=t.forwardRef((e,a)=>t.createElement(e0,{ref:a,...e,weights:x2}));xe.displayName="FileCsvIcon";const I2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M48,140H32a12,12,0,0,0-12,12v56a12,12,0,0,0,12,12H48a40,40,0,0,0,0-80Zm0,56H44V164h4a16,16,0,0,1,0,32Zm180.3-3.8a12,12,0,0,1,.37,17A34,34,0,0,1,204,220c-19.85,0-36-17.94-36-40s16.15-40,36-40a34,34,0,0,1,24.67,10.83,12,12,0,0,1-17.34,16.6A10.27,10.27,0,0,0,204,164c-6.5,0-12,7.33-12,16s5.5,16,12,16a10.27,10.27,0,0,0,7.33-3.43A12,12,0,0,1,228.3,192.2ZM128,140c-19.85,0-36,17.94-36,40s16.15,40,36,40,36-17.94,36-40S147.85,140,128,140Zm0,56c-6.5,0-12-7.33-12-16s5.5-16,12-16,12,7.33,12,16S134.5,196,128,196ZM48,120a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88a12,12,0,0,0-3.51-8.48l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68A12,12,0,0,0,48,120ZM160,57l23,23H160Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M52,144H36a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8H52a36,36,0,0,0,0-72Zm0,56H44V160h8a20,20,0,0,1,0,40Zm169.53-4.91a8,8,0,0,1,.25,11.31A30.06,30.06,0,0,1,200,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30.06,30.06,0,0,1,21.78,9.6,8,8,0,0,1-11.56,11.06A14.24,14.24,0,0,0,200,160c-8.82,0-16,9-16,20s7.18,20,16,20a14.18,14.18,0,0,0,10.22-4.66A8,8,0,0,1,221.53,195.09ZM128,144c-17.64,0-32,16.15-32,36s14.36,36,32,36,32-16.15,32-36S145.64,144,128,144Zm0,56c-8.82,0-16-9-16-20s7.18-20,16-20,16,9,16,20S136.82,200,128,200ZM48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M44,120H212.07a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152.05,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120Zm108-76,44,44h-44ZM52,144H36a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8H51.33C71,216,87.55,200.52,88,180.87A36,36,0,0,0,52,144Zm-.49,56H44V160h8a20,20,0,0,1,20,20.77C71.59,191.59,62.35,200,51.52,200Zm170.67-4.28a8.26,8.26,0,0,1-.73,11.09,30,30,0,0,1-21.4,9.19c-17.65,0-32-16.15-32-36s14.36-36,32-36a30,30,0,0,1,21.4,9.19,8.26,8.26,0,0,1,.73,11.09,8,8,0,0,1-11.9.38A14.21,14.21,0,0,0,200.06,160c-8.82,0-16,9-16,20s7.18,20,16,20a14.25,14.25,0,0,0,10.23-4.66A8,8,0,0,1,222.19,195.72ZM128,144c-17.65,0-32,16.15-32,36s14.37,36,32,36,32-16.15,32-36S145.69,144,128,144Zm0,56c-8.83,0-16-9-16-20s7.18-20,16-20,16,9,16,20S136.86,200,128,200Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M52,146H36a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6H52a34,34,0,0,0,0-68Zm0,56H42V158H52a22,22,0,0,1,0,44Zm168.15-5.46a6,6,0,0,1,.18,8.48A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a16.23,16.23,0,0,0,11.67-5.28A6,6,0,0,1,220.15,196.54ZM128,146c-16.54,0-30,15.25-30,34s13.46,34,30,34,30-15.25,30-34S144.54,146,128,146Zm0,56c-9.93,0-18-9.87-18-22s8.07-22,18-22,18,9.87,18,22S137.93,202,128,202ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M52,144H36a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8H52a36,36,0,0,0,0-72Zm0,56H44V160h8a20,20,0,0,1,0,40Zm169.53-4.91a8,8,0,0,1,.25,11.31A30.06,30.06,0,0,1,200,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30.06,30.06,0,0,1,21.78,9.6,8,8,0,0,1-11.56,11.06A14.24,14.24,0,0,0,200,160c-8.82,0-16,9-16,20s7.18,20,16,20a14.24,14.24,0,0,0,10.22-4.66A8,8,0,0,1,221.53,195.09ZM128,144c-17.65,0-32,16.15-32,36s14.35,36,32,36,32-16.15,32-36S145.65,144,128,144Zm0,56c-8.82,0-16-9-16-20s7.18-20,16-20,16,9,16,20S136.82,200,128,200ZM48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M52,148H36a4,4,0,0,0-4,4v56a4,4,0,0,0,4,4H52a32,32,0,0,0,0-64Zm0,56H40V156H52a24,24,0,0,1,0,48Zm166.77-6a4,4,0,0,1,.12,5.66A26.11,26.11,0,0,1,200,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a26.11,26.11,0,0,1,18.89,8.36,4,4,0,1,1-5.78,5.54A18.15,18.15,0,0,0,200,156c-11,0-20,10.77-20,24s9,24,20,24a18.15,18.15,0,0,0,13.11-5.9A4,4,0,0,1,218.77,198ZM128,148c-15.44,0-28,14.36-28,32s12.56,32,28,32,28-14.36,28-32S143.44,148,128,148Zm0,56c-11,0-20-10.77-20-24s9-24,20-24,20,10.77,20,24S139,204,128,204ZM48,116a4,4,0,0,0,4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v20a4,4,0,0,0,8,0V88a4,4,0,0,0-1.17-2.83l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72A4,4,0,0,0,48,116ZM156,41.65,198.34,84H156Z"}))]]),Ie=t.forwardRef((e,a)=>t.createElement(e0,{ref:a,...e,weights:I2}));Ie.displayName="FileDocIcon";const C2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M114,145.34a12,12,0,0,0-20,0L79,167.82,72.3,157.73a12,12,0,0,0-20.07.17L13.91,217.51A12,12,0,0,0,24,236H152a12,12,0,0,0,10-18.66ZM46,212,62.5,186.3l6.55,9.81a12,12,0,0,0,20,0l15-22.48L129.58,212ZM216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v84a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212a12,12,0,0,0,0,24h4a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M104,152l48,72H24l36-56,16.36,25.45ZM152,32V88h56Z",opacity:"0.2"}),t.createElement("path",{d:"M110.66,147.56a8,8,0,0,0-13.32,0L76.49,178.85l-9.76-15.18a8,8,0,0,0-13.46,0l-36,56A8,8,0,0,0,24,232H152a8,8,0,0,0,6.66-12.44ZM38.65,216,60,182.79l9.63,15a8,8,0,0,0,13.39.11l21-31.47L137.05,216Zm175-133.66-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v88a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M158.66,219.56A8,8,0,0,1,152,232H24a8,8,0,0,1-6.73-12.33l36-56a8,8,0,0,1,13.46,0l9.76,15.18,20.85-31.29a8,8,0,0,1,13.32,0ZM216,88V216a16,16,0,0,1-16,16h-8a8,8,0,0,1,0-16h8V96H152a8,8,0,0,1-8-8V40H56v88a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M109,148.67a6,6,0,0,0-10,0L76.46,182.5,65.05,164.76a6,6,0,0,0-10.1,0l-36,56A6,6,0,0,0,24,230H152a6,6,0,0,0,5-9.33ZM35,218l25-38.9,11.32,17.6a6,6,0,0,0,10,.08l22.64-34L140.79,218ZM212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v88a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2h-8a6,6,0,0,0,0,12h8a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M110.66,147.56a8,8,0,0,0-13.32,0L76.49,178.85l-9.76-15.18a8,8,0,0,0-13.46,0l-36,56A8,8,0,0,0,24,232H152a8,8,0,0,0,6.66-12.44ZM38.65,216,60,182.79l9.63,15a8,8,0,0,0,13.39.11l21-31.47L137.05,216Zm175-133.66-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v88a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M107.33,149.78a4,4,0,0,0-6.66,0L76.42,186.15,63.36,165.84a4,4,0,0,0-6.72,0l-36,56A4,4,0,0,0,24,228H152a4,4,0,0,0,3.33-6.22ZM31.33,220,60,175.4l13,20.22a4,4,0,0,0,3.33,1.83,3.93,3.93,0,0,0,3.36-1.78L104,159.21,144.53,220ZM210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v88a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4h-8a4,4,0,0,0,0,8h8a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156Z"}))]]),Ce=t.forwardRef((e,a)=>t.createElement(e0,{ref:a,...e,weights:C2}));Ce.displayName="FileImageIcon";const R2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M100,152v56a12,12,0,0,1-24,0V190.07l-6.17,8.81a12,12,0,0,1-19.66,0L44,190.07V208a12,12,0,0,1-24,0V152a12,12,0,0,1,21.83-6.88L60,171.07l18.17-25.95A12,12,0,0,1,100,152Zm84,28a40,40,0,0,1-40,40H128a12,12,0,0,1-12-12V152a12,12,0,0,1,12-12h16A40,40,0,0,1,184,180Zm-24,0a16,16,0,0,0-16-16h-4v32h4A16,16,0,0,0,160,180Zm60-92V224a12,12,0,0,1-24,0V104H148a12,12,0,0,1-12-12V44H60v64a12,12,0,0,1-24,0V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88Zm-60-8h23L160,57Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V224a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM144,144H128a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h16a36,36,0,0,0,0-72Zm0,56h-8V160h8a20,20,0,0,1,0,40Zm-40-48v56a8,8,0,0,1-16,0V177.38L74.55,196.59a8,8,0,0,1-13.1,0L48,177.38V208a8,8,0,0,1-16,0V152a8,8,0,0,1,14.55-4.59L68,178.05l21.45-30.64A8,8,0,0,1,104,152Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H196a4,4,0,0,1,4,4V224a8,8,0,0,0,9.19,7.91,8.15,8.15,0,0,0,6.81-8.16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm-8,56H128a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h15.32c19.66,0,36.21-15.48,36.67-35.13A36,36,0,0,0,144,144Zm-.49,56H136V160h8a20,20,0,0,1,20,20.77C163.58,191.59,154.34,200,143.51,200ZM104,152v55.73A8.17,8.17,0,0,1,96.53,216,8,8,0,0,1,88,208V177.38l-13.32,19a8.3,8.3,0,0,1-4.2,3.2,8,8,0,0,1-9-3L48,177.38v30.35A8.17,8.17,0,0,1,40.53,216,8,8,0,0,1,32,208V152.31a8.27,8.27,0,0,1,4.56-7.53,8,8,0,0,1,10,2.63L68,178.05l21.27-30.39a8.28,8.28,0,0,1,8.06-3.55A8,8,0,0,1,104,152Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V224a6,6,0,0,0,12,0V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM144,146H128a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6h16a34,34,0,0,0,0-68Zm0,56H134V158h10a22,22,0,0,1,0,44Zm-42-50v56a6,6,0,0,1-12,0V171L72.92,195.44a6,6,0,0,1-9.84,0L46,171v37a6,6,0,0,1-12,0V152a6,6,0,0,1,10.92-3.44l23.08,33,23.08-33A6,6,0,0,1,102,152Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V224a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM144,144H128a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h16a36,36,0,0,0,0-72Zm0,56h-8V160h8a20,20,0,0,1,0,40Zm-40-48v56a8,8,0,0,1-16,0V177.38L74.55,196.59a8,8,0,0,1-13.1,0L48,177.38V208a8,8,0,0,1-16,0V152a8,8,0,0,1,14.55-4.59L68,178.05l21.45-30.64A8,8,0,0,1,104,152Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V224a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM144,148H128a4,4,0,0,0-4,4v56a4,4,0,0,0,4,4h16a32,32,0,0,0,0-64Zm0,56H132V156h12a24,24,0,0,1,0,48Zm-44-52v56a4,4,0,0,1-8,0V164.69l-20.72,29.6a4,4,0,0,1-6.56,0L44,164.69V208a4,4,0,0,1-8,0V152a4,4,0,0,1,7.28-2.29L68,185l24.72-35.31A4,4,0,0,1,100,152Z"}))]]),Re=t.forwardRef((e,a)=>t.createElement(e0,{ref:a,...e,weights:R2}));Re.displayName="FileMdIcon";const k2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M200,164v8h12a12,12,0,0,1,0,24H200v12a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12h32a12,12,0,0,1,0,24ZM92,172a32,32,0,0,1-32,32H56v4a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12H60A32,32,0,0,1,92,172Zm-24,0a8,8,0,0,0-8-8H56v16h4A8,8,0,0,0,68,172Zm100,8a40,40,0,0,1-40,40H112a12,12,0,0,1-12-12V152a12,12,0,0,1,12-12h16A40,40,0,0,1,168,180Zm-24,0a16,16,0,0,0-16-16h-4v32h4A16,16,0,0,0,144,180ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88v20a12,12,0,0,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,0,1-24,0ZM160,57V80h23Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M224,152a8,8,0,0,1-8,8H192v16h16a8,8,0,0,1,0,16H192v16a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm88,8a36,36,0,0,1-36,36H112a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8h16A36,36,0,0,1,164,180Zm-16,0a20,20,0,0,0-20-20h-8v40h8A20,20,0,0,0,148,180ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M44,120H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120ZM152,44l44,44H152Zm72,108.53a8.18,8.18,0,0,1-8.25,7.47H192v16h15.73a8.17,8.17,0,0,1,8.25,7.47,8,8,0,0,1-8,8.53H192v15.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152.53ZM64,144H48a8,8,0,0,0-8,8v55.73A8.17,8.17,0,0,0,47.47,216,8,8,0,0,0,56,208v-8h7.4c15.24,0,28.14-11.92,28.59-27.15A28,28,0,0,0,64,144Zm-.35,40H56V160h8a12,12,0,0,1,12,13.16A12.25,12.25,0,0,1,63.65,184ZM128,144H112a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h15.32c19.66,0,36.21-15.48,36.67-35.13A36,36,0,0,0,128,144Zm-.49,56H120V160h8a20,20,0,0,1,20,20.77C147.58,191.59,138.34,200,127.51,200Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M222,152a6,6,0,0,1-6,6H190v20h18a6,6,0,0,1,0,12H190v18a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6h32A6,6,0,0,1,222,152ZM90,172a26,26,0,0,1-26,26H54v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6H64A26,26,0,0,1,90,172Zm-12,0a14,14,0,0,0-14-14H54v28H64A14,14,0,0,0,78,172Zm84,8a34,34,0,0,1-34,34H112a6,6,0,0,1-6-6V152a6,6,0,0,1,6-6h16A34,34,0,0,1,162,180Zm-12,0a22,22,0,0,0-22-22H118v44h10A22,22,0,0,0,150,180ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,0,1-12,0ZM158,82h35.52L158,46.48Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,152a8,8,0,0,1-8,8H192v16h16a8,8,0,0,1,0,16H192v16a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h32A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm88,8a36,36,0,0,1-36,36H112a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8h16A36,36,0,0,1,164,180Zm-16,0a20,20,0,0,0-20-20h-8v40h8A20,20,0,0,0,148,180ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M220,152a4,4,0,0,1-4,4H188v24h20a4,4,0,0,1,0,8H188v20a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4h32A4,4,0,0,1,220,152ZM88,172a24,24,0,0,1-24,24H52v12a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4H64A24,24,0,0,1,88,172Zm-8,0a16,16,0,0,0-16-16H52v32H64A16,16,0,0,0,80,172Zm80,8a32,32,0,0,1-32,32H112a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h16A32,32,0,0,1,160,180Zm-8,0a24,24,0,0,0-24-24H116v48h12A24,24,0,0,0,152,180ZM44,112V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0ZM156,84h42.34L156,41.65Z"}))]]),ke=t.forwardRef((e,a)=>t.createElement(e0,{ref:a,...e,weights:k2}));ke.displayName="FilePdfIcon";const N2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M232,152a12,12,0,0,1-12,12h-8v44a12,12,0,0,1-24,0V164h-8a12,12,0,0,1,0-24h40A12,12,0,0,1,232,152ZM92,172a32,32,0,0,1-32,32H56v4a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12H60A32,32,0,0,1,92,172Zm-24,0a8,8,0,0,0-8-8H56v16h4A8,8,0,0,0,68,172Zm96,0a32,32,0,0,1-32,32h-4v4a12,12,0,0,1-24,0V152a12,12,0,0,1,12-12h16A32,32,0,0,1,164,172Zm-24,0a8,8,0,0,0-8-8h-4v16h4A8,8,0,0,0,140,172ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88v20a12,12,0,0,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,0,1-24,0ZM160,80h23L160,57Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M224,152a8,8,0,0,1-8,8H204v48a8,8,0,0,1-16,0V160H176a8,8,0,0,1,0-16h40A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm84,0a28,28,0,0,1-28,28h-8v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h16A28,28,0,0,1,160,172Zm-16,0a12,12,0,0,0-12-12h-8v24h8A12,12,0,0,0,144,172ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,152.53a8.17,8.17,0,0,1-8.25,7.47H204v47.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V160H176.27a8.17,8.17,0,0,1-8.25-7.47,8,8,0,0,1,8-8.53h40A8,8,0,0,1,224,152.53ZM92,172.85C91.54,188.08,78.64,200,63.4,200H56v7.73A8.17,8.17,0,0,1,48.53,216,8,8,0,0,1,40,208V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172.85Zm-16-2A12.25,12.25,0,0,0,63.65,160H56v24h8A12,12,0,0,0,76,170.84Zm84,2C159.54,188.08,146.64,200,131.4,200H124v7.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V152a8,8,0,0,1,8-8h16A28,28,0,0,1,160,172.85Zm-16-2A12.25,12.25,0,0,0,131.65,160H124v24h8A12,12,0,0,0,144,170.84ZM40,116V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v28a4,4,0,0,1-4,4H44A4,4,0,0,1,40,116ZM152,88h44L152,44Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M222,152a6,6,0,0,1-6,6H202v50a6,6,0,0,1-12,0V158H176a6,6,0,0,1,0-12h40A6,6,0,0,1,222,152ZM90,172a26,26,0,0,1-26,26H54v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6H64A26,26,0,0,1,90,172Zm-12,0a14,14,0,0,0-14-14H54v28H64A14,14,0,0,0,78,172Zm80,0a26,26,0,0,1-26,26H122v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6h16A26,26,0,0,1,158,172Zm-12,0a14,14,0,0,0-14-14H122v28h10A14,14,0,0,0,146,172ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,0,1-12,0ZM158,82h35.52L158,46.48Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M224,152a8,8,0,0,1-8,8H204v48a8,8,0,0,1-16,0V160H176a8,8,0,0,1,0-16h40A8,8,0,0,1,224,152ZM92,172a28,28,0,0,1-28,28H56v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8H64A28,28,0,0,1,92,172Zm-16,0a12,12,0,0,0-12-12H56v24h8A12,12,0,0,0,76,172Zm84,0a28,28,0,0,1-28,28h-8v8a8,8,0,0,1-16,0V152a8,8,0,0,1,8-8h16A28,28,0,0,1,160,172Zm-16,0a12,12,0,0,0-12-12h-8v24h8A12,12,0,0,0,144,172ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.69L160,51.31Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M220,152a4,4,0,0,1-4,4H200v52a4,4,0,0,1-8,0V156H176a4,4,0,0,1,0-8h40A4,4,0,0,1,220,152ZM88,172a24,24,0,0,1-24,24H52v12a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4H64A24,24,0,0,1,88,172Zm-8,0a16,16,0,0,0-16-16H52v32H64A16,16,0,0,0,80,172Zm76,0a24,24,0,0,1-24,24H120v12a4,4,0,0,1-8,0V152a4,4,0,0,1,4-4h16A24,24,0,0,1,156,172Zm-8,0a16,16,0,0,0-16-16H120v32h12A16,16,0,0,0,148,172ZM44,112V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0ZM156,84h42.34L156,41.65Z"}))]]),Ne=t.forwardRef((e,a)=>t.createElement(e0,{ref:a,...e,weights:N2}));Ne.displayName="FilePptIcon";const F2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm112-80a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,132Zm0,40a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,172Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,176H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm-8-56V44l44,44Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Zm-34-82a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,136Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,168Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-36-84a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,136Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,168Z"}))]]),Fe=t.forwardRef((e,a)=>t.createElement(e0,{ref:a,...e,weights:F2}));Fe.displayName="FileTextIcon";const P2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212a12,12,0,0,0,0,24h4a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Zm-1.91,84.69a12,12,0,0,0-11.92-.15L126.5,152.44A20,20,0,0,0,108,140H48a20,20,0,0,0-20,20v48a20,20,0,0,0,20,20h60a20,20,0,0,0,18.5-12.44l19.67,10.93A12,12,0,0,0,164,216V152A12,12,0,0,0,158.09,141.66ZM104,204H52V164h52Zm36-8.39-12-6.67v-9.88l12-6.67Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Zm-88,72a8,8,0,0,0-8-8H48a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V196l32,20V152l-32,20Z",opacity:"0.2"}),t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM155.88,145a8,8,0,0,0-8.12.22l-19.95,12.46A16,16,0,0,0,112,144H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h64a16,16,0,0,0,15.81-13.68l19.95,12.46A8,8,0,0,0,160,216V152A8,8,0,0,0,155.88,145ZM112,208H48V160h64v48Zm32-6.43-16-10V176.43l16-10Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM155.88,145a8,8,0,0,0-8.12.22l-19.95,12.46A16,16,0,0,0,112,144H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h64a16,16,0,0,0,15.81-13.68l19.95,12.46A8,8,0,0,0,160,216V152A8,8,0,0,0,155.88,145ZM144,201.57l-16-10V176.43l16-10Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2h-8a6,6,0,0,0,0,12h8a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158Zm-3.09,100.27a6,6,0,0,0-6.09.16L126,161.17V160a14,14,0,0,0-14-14H48a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h64a14,14,0,0,0,14-14v-1.17l22.82,14.26A6,6,0,0,0,158,216V152A6,6,0,0,0,154.91,146.75ZM114,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V160a2,2,0,0,1,2-2h64a2,2,0,0,1,2,2Zm32-2.83-20-12.5V175.33l20-12.5Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM155.88,145a8,8,0,0,0-8.12.22l-19.95,12.46A16,16,0,0,0,112,144H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h64a16,16,0,0,0,15.81-13.68l19.95,12.46A8,8,0,0,0,160,216V152A8,8,0,0,0,155.88,145ZM112,208H48V160h64v48Zm32-6.43-16-10V176.43l16-10Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4h-8a4,4,0,0,0,0,8h8a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM153.94,148.5a4,4,0,0,0-4.06.11L124,164.78V160a12,12,0,0,0-12-12H48a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12v-4.78l25.88,16.17A4,4,0,0,0,152,220a4.06,4.06,0,0,0,1.94-.5A4,4,0,0,0,156,216V152A4,4,0,0,0,153.94,148.5ZM116,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V160a4,4,0,0,1,4-4h64a4,4,0,0,1,4,4Zm32,.78-24-15V174.22l24-15Z"}))]]),Pe=t.forwardRef((e,a)=>t.createElement(e0,{ref:a,...e,weights:P2}));Pe.displayName="FileVideoIcon";const T2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M160,208a12,12,0,0,1-12,12H120a12,12,0,0,1-12-12V152a12,12,0,0,1,24,0v44h16A12,12,0,0,1,160,208ZM91,142.22A12,12,0,0,0,74.24,145L64,159.34,53.77,145a12,12,0,1,0-19.53,14l15,21-15,21A12,12,0,1,0,53.77,215L64,200.62,74.24,215A12,12,0,0,0,93.77,201l-15-21,15-21A12,12,0,0,0,91,142.22Zm122.53,32.05c-5.12-3.45-11.32-5.24-16.79-6.82a79.69,79.69,0,0,1-7.92-2.59c2.45-1.18,9.71-1.3,16.07.33A12,12,0,0,0,211,142a69,69,0,0,0-12-1.86c-9.93-.66-18,1.08-24.1,5.17a24.45,24.45,0,0,0-10.69,17.76c-1.1,8.74,2.49,16.27,10.11,21.19,4.78,3.09,10.36,4.7,15.75,6.26,3,.89,7.94,2.3,9.88,3.53a2.48,2.48,0,0,1-.21.71c-1.37,1.55-9.58,1.79-16.39-.06a12,12,0,1,0-6.46,23.11A63.75,63.75,0,0,0,193.1,220c6.46,0,13.73-1.17,19.73-5.15a24.73,24.73,0,0,0,10.95-18C225,187.53,221.33,179.53,213.51,174.27ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88v20a12,12,0,1,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,1,1-24,0ZM160,80h23L160,57Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M156,208a8,8,0,0,1-8,8H120a8,8,0,0,1-8-8V152a8,8,0,0,1,16,0v48h20A8,8,0,0,1,156,208ZM92.65,145.49a8,8,0,0,0-11.16,1.86L68,166.24,54.51,147.35a8,8,0,1,0-13,9.3L58.17,180,41.49,203.35a8,8,0,0,0,13,9.3L68,193.76l13.49,18.89a8,8,0,0,0,13-9.3L77.83,180l16.68-23.35A8,8,0,0,0,92.65,145.49Zm98.94,25.82c-4-1.16-8.14-2.35-10.45-3.84-1.25-.82-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56a8,8,0,0,0,4.07-15.48c-2.11-.55-21-5.22-32.83,2.76a20.58,20.58,0,0,0-8.95,14.94c-2,15.89,13.65,20.42,23,23.12,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.33-2.15,3.93-4.6,3.06-15.16,1.56-19.54.35A8,8,0,0,0,173.93,214a60.63,60.63,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.81,20.81,0,0,0,9.18-15.23C218,179,201.48,174.17,191.59,171.31ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,1,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.68L160,51.31Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M44,120H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120ZM152,44l44,44H152Zm4,164.53a8.18,8.18,0,0,1-8.25,7.47H120a8,8,0,0,1-8-8V152.27a8.18,8.18,0,0,1,7.47-8.25,8,8,0,0,1,8.53,8v48h20A8,8,0,0,1,156,208.53ZM94.51,156.65,77.83,180l16.68,23.35a8,8,0,0,1-13,9.3L68,193.76,54.51,212.65a8,8,0,1,1-13-9.3L58.17,180,41.49,156.65a8,8,0,0,1,2.3-11.46,8.19,8.19,0,0,1,10.88,2.38L68,166.24l13.49-18.89a8,8,0,0,1,13,9.3Zm121.28,39.66a20.81,20.81,0,0,1-9.18,15.23C201.42,215,194.94,216,189.12,216a60.63,60.63,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.21,14.94,2.71,19.54-.35.89-.6,1.84-1.52,2.15-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.12a20.58,20.58,0,0,1,8.95-14.94c11.84-8,30.72-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.48-1.17-15.22-2.56-19.82.56a4.54,4.54,0,0,0-2,3.67c-.11.9-.13,1.08,1.12,1.9,2.31,1.49,6.45,2.68,10.45,3.84C201.48,174.17,218,179,215.79,196.31Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M154,208a6,6,0,0,1-6,6H120a6,6,0,0,1-6-6V152a6,6,0,1,1,12,0v50h22A6,6,0,0,1,154,208ZM91.48,147.11a6,6,0,0,0-8.36,1.39L68,169.67,52.88,148.5a6,6,0,1,0-9.76,7L60.63,180,43.12,204.5a6,6,0,1,0,9.76,7L68,190.31l15.12,21.16A6,6,0,0,0,88,214a5.91,5.91,0,0,0,3.48-1.12,6,6,0,0,0,1.4-8.37L75.37,180l17.51-24.51A6,6,0,0,0,91.48,147.11ZM191,173.22c-10.85-3.13-13.41-4.69-13-7.91a6.59,6.59,0,0,1,2.88-5.08c5.6-3.79,17.65-1.83,21.44-.84a6,6,0,0,0,3.07-11.6c-2-.54-20.1-5-31.21,2.48a18.64,18.64,0,0,0-8.08,13.54c-1.8,14.19,12.26,18.25,21.57,20.94,12.12,3.5,14.77,5.33,14.2,9.76a6.85,6.85,0,0,1-3,5.34c-5.61,3.73-17.48,1.64-21.19.62A6,6,0,0,0,174.47,212a59.41,59.41,0,0,0,14.68,2c5.49,0,11.54-.95,16.36-4.14a18.89,18.89,0,0,0,8.31-13.81C215.83,180.39,200.91,176.08,191,173.22ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.24,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,1,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,1,1-12,0ZM158,82H193.5L158,46.48Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M156,208a8,8,0,0,1-8,8H120a8,8,0,0,1-8-8V152a8,8,0,0,1,16,0v48h20A8,8,0,0,1,156,208ZM92.65,145.49a8,8,0,0,0-11.16,1.86L68,166.24,54.51,147.35a8,8,0,1,0-13,9.3L58.17,180,41.49,203.35a8,8,0,0,0,13,9.3L68,193.76l13.49,18.89a8,8,0,0,0,13-9.3L77.83,180l16.68-23.35A8,8,0,0,0,92.65,145.49Zm98.94,25.82c-4-1.16-8.14-2.35-10.45-3.84-1.25-.82-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.72,19.82-.56a8,8,0,0,0,4.07-15.48c-2.11-.55-21-5.22-32.83,2.76a20.58,20.58,0,0,0-8.95,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.33-2.15,3.93-4.6,3.06-15.16,1.55-19.54.35A8,8,0,0,0,173.93,214a60.63,60.63,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.81,20.81,0,0,0,9.18-15.23C218,179,201.48,174.17,191.59,171.31ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,1,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.68L160,51.31Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M152,208a4,4,0,0,1-4,4H120a4,4,0,0,1-4-4V152a4,4,0,0,1,8,0v52h24A4,4,0,0,1,152,208ZM90.32,148.75a4,4,0,0,0-5.58.92L68,173.12,51.25,149.67a4,4,0,0,0-6.5,4.66L63.08,180,44.75,205.67a4,4,0,0,0,.93,5.58A3.91,3.91,0,0,0,48,212a4,4,0,0,0,3.25-1.67L68,186.88l16.74,23.45A4,4,0,0,0,88,212a3.91,3.91,0,0,0,2.32-.75,4,4,0,0,0,.93-5.58L72.91,180l18.34-25.67A4,4,0,0,0,90.32,148.75Zm100.17,26.4c-10.53-3-15.08-4.91-14.43-10.08a8.57,8.57,0,0,1,3.75-6.49c6.26-4.23,18.77-2.24,23.07-1.11a4,4,0,0,0,2-7.74,61.33,61.33,0,0,0-10.48-1.61c-8.11-.54-14.54.75-19.09,3.82a16.63,16.63,0,0,0-7.22,12.13c-1.59,12.49,10.46,16,20.14,18.77,11.25,3.25,16.46,5.49,15.63,11.94a8.93,8.93,0,0,1-3.9,6.75c-6.28,4.17-18.61,2.05-22.83.88a4,4,0,1,0-2.15,7.7A57.7,57.7,0,0,0,189.19,212c5.17,0,10.83-.86,15.22-3.77a17,17,0,0,0,7.43-12.41C213.63,181.84,200.26,178,190.49,175.15ZM204,92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88v24a4,4,0,0,1-8,0Zm-5.65-8L156,41.65V84Z"}))]]),Te=t.forwardRef((e,a)=>t.createElement(e0,{ref:a,...e,weights:T2}));Te.displayName="FileXlsIcon";const O2=new Map([["bold",t.createElement(t.Fragment,null,t.createElement("path",{d:"M188,140H172a12,12,0,0,0-12,12v56a12,12,0,0,0,24,0v-4h4a32,32,0,0,0,0-64Zm0,40h-4V164h4a8,8,0,0,1,0,16Zm-48-28v56a12,12,0,0,1-24,0V152a12,12,0,0,1,24,0ZM96,208a12,12,0,0,1-12,12H52a12,12,0,0,1-10.42-17.95L63.32,164H52a12,12,0,0,1,0-24H84A12,12,0,0,1,94.42,158L72.68,196H84A12,12,0,0,1,96,208ZM216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88A12,12,0,0,0,216.49,79.52ZM160,80V57l23,23Z"}))],["duotone",t.createElement(t.Fragment,null,t.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),t.createElement("path",{d:"M184,144H168a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40h-8V160h8a12,12,0,0,1,0,24Zm-48-32v56a8,8,0,0,1-16,0V152a8,8,0,0,1,16,0ZM96,208a8,8,0,0,1-8,8H56a8,8,0,0,1-7-12l25.16-44H56a8,8,0,0,1,0-16H88a8,8,0,0,1,7,12L69.79,200H88A8,8,0,0,1,96,208ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,80V51.31L188.69,80Z"}))],["fill",t.createElement(t.Fragment,null,t.createElement("path",{d:"M184,144H168a8,8,0,0,0-8,8v55.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8v-8h7.4c15.24,0,28.14-11.92,28.59-27.15A28,28,0,0,0,184,144Zm-.35,40H176V160h8A12,12,0,0,1,196,173.16,12.25,12.25,0,0,1,183.65,184ZM136,152v55.73a8.17,8.17,0,0,1-7.47,8.25,8,8,0,0,1-8.53-8V152.27a8.17,8.17,0,0,1,7.47-8.25A8,8,0,0,1,136,152ZM96,208.53A8.17,8.17,0,0,1,87.73,216H56.23a8.27,8.27,0,0,1-6-2.5A8,8,0,0,1,49.05,204l25.16-44H56.27A8.17,8.17,0,0,1,48,152.53,8,8,0,0,1,56,144H87.77a8.27,8.27,0,0,1,6,2.5A8,8,0,0,1,95,156L69.79,200H88A8,8,0,0,1,96,208.53ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H212a4,4,0,0,0,4-4V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z"}))],["light",t.createElement(t.Fragment,null,t.createElement("path",{d:"M184,146H168a6,6,0,0,0-6,6v56a6,6,0,0,0,12,0V198h10a26,26,0,0,0,0-52Zm0,40H174V158h10a14,14,0,0,1,0,28Zm-50-34v56a6,6,0,0,1-12,0V152a6,6,0,0,1,12,0ZM94,208a6,6,0,0,1-6,6H56a6,6,0,0,1-5.21-9l26.87-47H56a6,6,0,0,1,0-12H88a6,6,0,0,1,5.21,9L66.34,202H88A6,6,0,0,1,94,208ZM212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88A6,6,0,0,0,212.24,83.76ZM158,82V46.48L193.52,82Z"}))],["regular",t.createElement(t.Fragment,null,t.createElement("path",{d:"M184,144H168a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40h-8V160h8a12,12,0,0,1,0,24Zm-48-32v56a8,8,0,0,1-16,0V152a8,8,0,0,1,16,0ZM96,208a8,8,0,0,1-8,8H56a8,8,0,0,1-7-12l25.16-44H56a8,8,0,0,1,0-16H88a8,8,0,0,1,7,12L69.79,200H88A8,8,0,0,1,96,208ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,80V51.31L188.69,80Z"}))],["thin",t.createElement(t.Fragment,null,t.createElement("path",{d:"M184,148H168a4,4,0,0,0-4,4v56a4,4,0,0,0,8,0V196h12a24,24,0,0,0,0-48Zm0,40H172V156h12a16,16,0,0,1,0,32Zm-52-36v56a4,4,0,0,1-8,0V152a4,4,0,0,1,8,0Zm-40.53,2L62.89,204H88a4,4,0,0,1,0,8H56a4,4,0,0,1-3.47-6l28.58-50H56a4,4,0,0,1,0-8H88a4,4,0,0,1,3.47,6ZM210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v20a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,84V41.65L198.34,84Z"}))]]),Oe=t.forwardRef((e,a)=>t.createElement(e0,{ref:a,...e,weights:O2}));Oe.displayName="FileZipIcon";const _e={icon:{light:"#6a7282",dark:"#99a1af"},iconSelected:{light:"#1447e6",dark:"#51a2ff"},checkedRing:{light:"#155dfc",dark:"#51a2ff"}},_2={markdown:{light:"#0084d1",dark:"#00bcff"},pdf:{light:"#e7000b",dark:"#ff6467"},spreadsheet:{light:"#007a55",dark:"#00d492"},csv:{light:"#007a55",dark:"#00d492"},document:{light:"#155dfc",dark:"#51a2ff"},presentation:{light:"#ca3500",dark:"#ff8904"},image:{light:"#00786f",dark:"#00d5be"},audio:{light:"#e60076",dark:"#fb64b6"},video:{light:"#7f22fe",dark:"#a684ff"},archive:{light:"#bb4d00",dark:"#ffb900"},code:{light:"#9810fa",dark:"#c27aff"},text:_e.icon},je="#71829b",r0={rowHover:"hover:bg-[color:light-dark(#f3f4f6,#1e2939)]",rowSelected:"bg-[color:light-dark(#eff6ff,#162456)]",checkedRing:"inset-ring-1 inset-ring-[color:light-dark(#155dfc,#51a2ff)]",name:"text-[color:light-dark(#364153,#e5e7eb)]",nameSelected:"text-[color:light-dark(#193cb8,#bedbff)]",gridEdge:"text-[color:light-dark(#4a5565,#d1d5dc)]",icon:"text-[color:light-dark(#6a7282,#99a1af)]",iconSelected:"text-[color:light-dark(#1447e6,#51a2ff)]"},o0={markdown:"text-[color:light-dark(#0084d1,#00bcff)]",pdf:"text-[color:light-dark(#e7000b,#ff6467)]",spreadsheet:"text-[color:light-dark(#007a55,#00d492)]",csv:"text-[color:light-dark(#007a55,#00d492)]",document:"text-[color:light-dark(#155dfc,#51a2ff)]",presentation:"text-[color:light-dark(#ca3500,#ff8904)]",image:"text-[color:light-dark(#00786f,#00d5be)]",audio:"text-[color:light-dark(#e60076,#fb64b6)]",video:"text-[color:light-dark(#7f22fe,#a684ff)]",archive:"text-[color:light-dark(#bb4d00,#ffb900)]",code:"text-[color:light-dark(#9810fa,#c27aff)]",text:"text-[color:light-dark(#6a7282,#99a1af)]"},$e="text-[length:var(--dt-font-size-body,0.8125rem)]",j2=`${$e} leading-[max(var(--dt-line-height-body,1.25rem),1.5em)]`,w1=44,$2=12,D2=8,l0=14,z2=14,De=e=>e===void 0?void 0:{fontSize:typeof e=="number"?`${e}px`:e},Q=e=>({width:e,height:e}),C={container:"directory-tree-container relative h-full overflow-y-hidden pb-[3px] pr-[2px]",containerPending:"cursor-progress",entry:`directory-tree-entry flex items-center cursor-pointer relative select-none ${j2}`,entryHover:`directory-tree-entry--hover ${r0.rowHover}`,entrySelected:`directory-tree-entry--selected ${r0.rowSelected}`,entryItemSelected:`directory-tree-entry--item-selected ${r0.rowSelected} ${r0.checkedRing}`,expandIcon:`directory-tree-expand-icon flex-shrink-0 flex items-center justify-center ${r0.icon}`,expandIconSelected:`directory-tree-expand-icon--selected ${r0.iconSelected}`,typeIcon:`directory-tree-type-icon flex-shrink-0 flex items-center justify-center ${r0.icon}`,typeIconSelected:`directory-tree-type-icon--selected ${r0.iconSelected}`,name:`directory-tree-name overflow-hidden text-ellipsis whitespace-nowrap ml-1 ${$e} font-normal ${r0.name}`,nameDirectory:"directory-tree-name--directory font-medium",nameSelected:`directory-tree-name--selected font-semibold ${r0.nameSelected}`},k1=e=>{const a=e.slice(e.lastIndexOf("/")+1),n=a.lastIndexOf(".");return n<=0?"":a.slice(n+1).toLowerCase()},B2=/^[a-z][a-z\d+.-]*:\/\//i,ge=e=>k1(B2.test(e)?e.split(/[?#]/,1)[0]:e),ze=e=>k1(e.name)||ge(e.relativePath)||ge(e.absolutePath),Be=({isDirectory:e,isExpanded:a,showExpandIcons:n,useCanvasExpandIcons:r,expandIconSize:o})=>{const i=o?{width:o,height:o}:void 0,s=o?"":"h-4 w-4";return!(n&&e)||r?h.jsx("span",{className:s,style:i,"aria-hidden":"true"}):a?h.jsx(V2,{className:s,style:i}):h.jsx(M2,{className:s,style:i})},L1=(e,a)=>{if(e==null||typeof e=="boolean")return null;if(typeof e=="function")return console.warn(`[DirectoryTree] Function returned by renderer for "${a}". Return a node.`),null;if(typeof e=="object"){if("then"in e)return console.warn(`[DirectoryTree] Promise returned for "${a}". Not supported.`),null;if(Array.isArray(e)){const r=e.map(o=>L1(o,a)).filter(Boolean);return r.length?r:null}const n=e.type;if(n&&n.$$typeof===Symbol.for("react.lazy"))return console.warn(`[DirectoryTree] Lazy component for "${a}". Not supported.`),null}return e},W2={markdown:e=>h.jsx(Re,{className:o0.markdown,style:Q(e)}),pdf:e=>h.jsx(ke,{className:o0.pdf,style:Q(e)}),spreadsheet:e=>h.jsx(Te,{className:o0.spreadsheet,style:Q(e)}),csv:e=>h.jsx(xe,{className:o0.csv,style:Q(e)}),document:e=>h.jsx(Ie,{className:o0.document,style:Q(e)}),presentation:e=>h.jsx(Ne,{className:o0.presentation,style:Q(e)}),image:e=>h.jsx(Ce,{className:o0.image,style:Q(e)}),audio:e=>h.jsx(Se,{className:o0.audio,style:Q(e)}),video:e=>h.jsx(Pe,{className:o0.video,style:Q(e)}),archive:e=>h.jsx(Oe,{className:o0.archive,style:Q(e)}),code:e=>h.jsx(Le,{className:o0.code,style:Q(e)}),text:e=>h.jsx(Fe,{className:o0.text,style:Q(e)})},K2={markdown:["md","markdown","mdx"],pdf:["pdf"],spreadsheet:["xls","xlsx","xlsm","xlsb","ods"],csv:["csv","tsv"],document:["doc","docx","rtf","odt"],presentation:["ppt","pptx","odp"],image:["png","jpg","jpeg","gif","svg","webp","ico","bmp","tiff","avif"],audio:["mp3","wav","ogg","m4a","flac","aac","wma"],video:["mp4","webm","mov","avi","mkv","wmv","flv"],archive:["zip","tar","gz","7z","rar","tgz","bz2"],code:["js","mjs","cjs","ts","tsx","jsx","json","html","htm","css","scss","py","go","rs","c","cpp","h","hpp","sh","bash","yaml","yml","sql","xml","toml"],text:["txt","log"]},Y2=new Map(Object.entries(K2).flatMap(([e,a])=>a.map(n=>[n,e]))),G2=new Set(["","application/octet-stream","binary/octet-stream","text/plain","application/x-empty"]),X2=e=>(e??"").split(";",1)[0].trim().toLowerCase(),U2=e=>{if(e==="text/markdown"||e==="text/x-markdown")return"markdown";if(e==="application/pdf")return"pdf";if(e.includes("excel")||e.includes("spreadsheet"))return"spreadsheet";if(e==="text/csv"||e==="text/tab-separated-values")return"csv";if(e.includes("word")||e.includes("google-apps.document")||e==="application/rtf")return"document";if(e.includes("powerpoint")||e.includes("presentation"))return"presentation";if(e.startsWith("image/"))return"image";if(e.startsWith("audio/"))return"audio";if(e.startsWith("video/"))return"video";if(e.includes("zip")||e.includes("tar")||e.includes("compressed")||e.includes("archive"))return"archive";if(e==="application/json"||e.includes("javascript")||e.includes("typescript")||e.includes("xml")||e.startsWith("text/html")||e.startsWith("text/css")||e.includes("x-python")||e.includes("x-sh")||e.includes("x-go")||e.includes("x-rust"))return"code";if(e.startsWith("text/"))return"text"},J2=(e,a,n,r)=>{const o=X2(e),i=U2(o),s=Y2.get((a||(n?k1(n):"")).toLowerCase()),m=(G2.has(o)?[s,i]:[i,s]).find(g=>g!==void 0);return m===void 0?h.jsx(we,{className:r0.icon,style:Q(r)}):W2[m](r)},We=(e,a,n)=>{const{entry:r,isDirectory:o,isExpanded:i,extension:s,mimeType:u}=e;let m;const g=u||r.mimeType;return r.icon!==void 0?m=r.icon:o?m=i&&a?.directoryExpanded||a?.directory||h.jsx(E2,{style:Q(n)}):s&&a?.fileByExtension?.[s]?m=a.fileByExtension[s]:m=a?.file||J2(g,s,r.name,n),L1(typeof m=="function"?m(e):m,r.absolutePath)},q2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ke=e=>{if(!e)return;const a=Object.entries(e).filter(([,n])=>n!=null);if(a.length!==0)return Object.fromEntries(a.map(([n,r])=>[`data-${q2(n)}`,String(r)]))},Ye=["color","background","backgroundColor","backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundClip","backgroundOrigin","backgroundAttachment","backgroundBlendMode","opacity","boxShadow","filter","backdropFilter","mixBlendMode","borderColor","borderRadius","outline","outlineColor","outlineStyle","outlineWidth","outlineOffset","textShadow","accentColor","caretColor","cursor","fontFamily","fontSize","fontStyle","fontWeight","fontVariant","fontFeatureSettings","fontVariationSettings","fontKerning","letterSpacing","lineHeight","textDecoration","textDecorationColor","textDecorationLine","textDecorationStyle","textDecorationThickness","textUnderlineOffset","textTransform"],Ge=["color","opacity"],Q2="the row's box belongs to the tree (height: visual.itemHeight, indent: visual.indentSize, icons: visual.typeIconSize, text size: visual.fontSize)",et=new Set(Ye),tt=new Set(Ge),ve=(e,a)=>{const n=a===void 0?e.option:`${e.option}.${a}`;return e.absolutePath===void 0?n:`${n} of "${e.absolutePath}"`},Xe=(e,a,n,r)=>{if(e!==void 0){if(typeof e!="object"||e===null)throw new RangeError(`${ve(n,void 0)} must be an object of CSS properties or undefined, got ${e===null?"null":typeof e}.`);for(const[o,i]of Object.entries(e))if(i!==void 0&&!a.has(o))throw new RangeError(`${ve(n,o)} cannot be set: ${Q2}, so ${r}.`)}},D0=(e,a)=>Xe(e,et,a,"a row style accepts only paint and text properties (ROW_STYLE_PROPERTIES)"),at=(e,a)=>Xe(e,tt,a,"the expand icon style accepts only the glyph's colour and opacity (EXPAND_ICON_STYLE_PROPERTIES), and the 14 px expand box is the tree's"),nt=500,Ue=({entry:e,isDirectory:a,isExpanded:n,isItemSelected:r,selectionMode:o,onSelectionChange:i,onEntryClick:s,toggleDirectory:u,onToggleDirectoryRecursive:m})=>{const g=c.useRef(null);return c.useEffect(()=>()=>{g.current&&window.clearTimeout(g.current)},[]),c.useCallback(E=>{E.stopPropagation(),o!=="none"&&!a&&i&&i(e,!r);let M=!1;s({entry:e,isDirectory:a,isExpanded:n,preventDefault:()=>{M=!0}}),!(!a||M)&&(g.current?(window.clearTimeout(g.current),g.current=null,m(e)):g.current=window.setTimeout(()=>{u(e.absolutePath),g.current=null},nt))},[a,e,n,m,u,s,o,i,r])},Je=e=>e==="right"?"dt-grid-cell--right":e==="center"?"dt-grid-cell--center":"",He=(e,a)=>e.children!==void 0&&a(e.absolutePath),qe=(e,a)=>({width:e,gridTemplateColumns:a}),Qe=c.memo(({entry:e,indentLevel:a,positionInSet:n,setSize:r,rowIndex:o,flatIndex:i,onRowFocus:s,onRowBlur:u,isSelectedForAria:m,rowHeight:g,isDirOpen:E,columns:M,numericTemplate:b,numericTotal:f,nameWidth:p,rowClassName:A,selection:{onEntryClick:Z,selectedPath:V,currentPath:P,mode:S="none",selectedItems:L,onSelectionChange:v},expansion:{toggleDirectory:R,onToggleDirectoryRecursive:k},visual:{iconOverrides:I,showExpandIcons:c0=!0,showDirectoryIcons:X=!0,showFileIcons:O=!0,useCanvasExpandIcons:W=!1,expandIconSize:g0,typeIconSize:j,fontSize:d0,indentSize:v0,highlightStyles:U,expandIconClassName:J,expandIconStyle:R0}})=>{D0(e.style,{option:"entry.style",absolutePath:e.absolutePath});const[E0,b0]=c.useState(!1),N=e.children!==void 0,t0=N&&E(e.absolutePath),_=e.absolutePath===V,z0=e.absolutePath===P,w=!N&&!!L?.has(e.absolutePath),k0=N?void 0:ze(e),H0=Ue({entry:e,isDirectory:N,isExpanded:t0,isItemSelected:w,selectionMode:S,onSelectionChange:v,onEntryClick:Z,toggleDirectory:R,onToggleDirectoryRecursive:k}),w0=E0?U?.hoverClassName!==void 0?U.hoverClassName:C.entryHover:"",N0=(()=>{if(N){if(_)return U?.directorySelectedClassName!==void 0?U.directorySelectedClassName:C.entrySelected}else if(_||w)return U?.itemSelectedClassName!==void 0?U.itemSelectedClassName:D.twMerge(_&&C.entrySelected,w&&C.entryItemSelected);return""})(),x=typeof A=="function"?A(e):A,h0=D.twMerge("dt-grid-row cursor-pointer select-none",w0,N0,x,e.className),z=D.twMerge(C.expandIcon,J,(_||w)&&C.expandIconSelected),F0=D.twMerge(C.typeIcon,(_||w)&&C.typeIconSelected),q=D.twMerge("dt-grid-name-label ml-1",r0.name,N&&C.nameDirectory,(_||w)&&C.nameSelected),K=Be({isDirectory:N,isExpanded:t0,showExpandIcons:c0,useCanvasExpandIcons:W,expandIconSize:g0}),a0=(N?X:O)?We({entry:e,isDirectory:N,isExpanded:t0,isSelected:_,isItemSelected:w,extension:k0,mimeType:e.mimeType},I,j):null,V0={indentLevel:a,isDirectory:N,isExpanded:t0},[m0,...S0]=M,f0=m0?.render?m0.render(e,V0):e.label??e.name,B0={...E0?U?.hoverStyle:{},...N&&_?U?.directorySelectedStyle:{},...!N&&(_||w)?U?.itemSelectedStyle:{}};return h.jsxs("div",{className:h0,style:{...B0,...e.style,height:g},role:"row","aria-expanded":N?t0:void 0,"aria-level":a+1,"aria-posinset":n,"aria-setsize":r,"aria-rowindex":o,"aria-selected":S==="none"?void 0:m,"aria-current":z0?"page":void 0,...Ke(e.data),"data-entry-type":N?"directory":"file","data-entry-expanded":N?String(t0):void 0,"data-entry-selected":_?"true":void 0,"data-entry-item-selected":w?"true":void 0,onClick:H0,onMouseEnter:()=>b0(!0),onMouseLeave:()=>b0(!1),onFocus:T=>s(i,e.absolutePath,T.currentTarget),onBlur:T=>u(e.absolutePath,T.currentTarget),onKeyDown:T=>{if(T.key==="Enter"){if(T.repeat){T.preventDefault();return}H0(T)}},tabIndex:0,children:[h.jsxs("div",{className:D.twMerge("dt-grid-name-cell",m0?.className),role:"gridcell",style:{width:p,paddingLeft:Math.max(0,a*v0)},children:[(c0||W)&&h.jsx("span",{className:z,style:{...R0,width:l0,height:l0},children:K}),(N?X:O)&&h.jsx("span",{className:F0,style:{width:j,height:j},children:a0}),h.jsx("span",{className:q,style:De(d0),children:f0})]}),S0.length>0&&h.jsx("div",{className:"dt-grid-numeric-viewport",children:h.jsx("div",{className:"dt-grid-numeric-track",style:qe(f,b),children:S0.map(T=>h.jsx("div",{className:D.twMerge("dt-grid-cell",Je(T.align),T.className),role:"gridcell",children:T.render?T.render(e,V0):null},T.key))})})]})},(e,a)=>{if(e.entry!==a.entry)return!1;const n=He(e.entry,e.isDirOpen),r=He(a.entry,a.isDirOpen);return e.indentLevel===a.indentLevel&&e.positionInSet===a.positionInSet&&e.setSize===a.setSize&&e.rowIndex===a.rowIndex&&e.flatIndex===a.flatIndex&&e.isSelectedForAria===a.isSelectedForAria&&e.rowHeight===a.rowHeight&&n===r&&e.columns===a.columns&&e.numericTemplate===a.numericTemplate&&e.numericTotal===a.numericTotal&&e.nameWidth===a.nameWidth&&e.rowClassName===a.rowClassName&&e.selection.selectedPath===a.selection.selectedPath&&e.selection.currentPath===a.selection.currentPath&&e.selection.mode===a.selection.mode&&e.selection.selectedItems===a.selection.selectedItems&&e.visual===a.visual});Qe.displayName="DirectoryTreeGridRow";const e2=({kind:e,columns:a,numericTemplate:n,numericTotal:r,nameWidth:o,scrollBarWidth:i,className:s,nameContent:u,renderCell:m})=>{const[,...g]=a,E=e==="header"?"dt-grid-name-header":"dt-grid-name-footer",M=e==="header"?"dt-grid-header":"dt-grid-footer",b=e==="header"?"columnheader":"gridcell";return h.jsxs("div",{className:D.twMerge(M,r0.gridEdge,s),role:"row",children:[h.jsx("div",{className:D.twMerge(E,"px-1",a[0]?.className),role:b,style:{width:o},children:u}),g.length>0&&h.jsx("div",{className:"dt-grid-numeric-viewport",children:h.jsx("div",{className:"dt-grid-numeric-track",style:qe(r,n),children:g.map(f=>h.jsx("div",{className:D.twMerge("dt-grid-cell",Je(f.align),f.className),role:b,children:m(f)},f.key))})}),h.jsx("div",{className:"dt-grid-scrollbar-spacer",style:{width:i},"aria-hidden":"true"})]})},rt=({columns:e,className:a,...n})=>h.jsx(e2,{kind:"header",columns:e,className:a,nameContent:e[0]?.header??null,renderCell:r=>r.header??null,...n}),Ve=(e,a)=>typeof e=="function"?e(a):e??null,lt=({columns:e,allEntries:a,className:n,...r})=>h.jsx(e2,{kind:"footer",columns:e,className:n,nameContent:Ve(e[0]?.footer,a),renderCell:o=>Ve(o.footer,a),...r}),ot=240,t2=96,a2=12,x1=(e,a)=>{const n=e?.width;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:a},ct=e=>e.slice(1).map(a=>`${x1(a,t2)}px`).join(" "),st=({measuredWidth:e,columns:a,scrollBarWidth:n=a2})=>{const r=x1(a[0],ot),o=a.slice(1).reduce((m,g)=>m+x1(g,t2),0),i=Number.isFinite(e)&&e>0?e:0,s=Math.max(0,i-r-Math.max(0,n)),u=Math.max(0,o-s);return{nameWidth:r,numericTotal:o,numericVisible:s,maxHScroll:u}},S1=(e,a)=>!Number.isFinite(e)||e<0?0:e>a?a:e,it=e=>{const a=[],n=r=>{for(const o of r)a.push(o),o.children&&o.children.length>0&&n(o.children)};return n(e),a},n2=["entryKindDirectory","entryKindFile"],I1=[...i0.VIRTUAL_SCROLL_LABEL_KEYS,...n2],C1=Object.freeze({en:Object.freeze({entryKindDirectory:"directory",entryKindFile:"file"}),ja:Object.freeze({entryKindDirectory:"ディレクトリ",entryKindFile:"ファイル"})}),r2=Object.freeze({en:Object.freeze({...i0.VIRTUAL_SCROLL_LABEL_CATALOGS.en,...C1.en}),ja:Object.freeze({...i0.VIRTUAL_SCROLL_LABEL_CATALOGS.ja,...C1.ja})}),Ze=e=>typeof e=="string"?JSON.stringify(e):e===null?"null":typeof e,dt=e=>{const a={};let n=!1;for(const r of i0.VIRTUAL_SCROLL_LABEL_KEYS){const o=Object.hasOwn(e,r)?e[r]:void 0;o!==void 0&&(a[r]=o,n=!0)}return n?a:void 0},l2=(e,a)=>{const n=i0.resolveVirtualScrollLocale(e);if(a===void 0)return r2[n];if(a===null||typeof a!="object")throw new RangeError(`[directory-tree] labels must be an object; got ${Ze(a)}`);const r=Object.getPrototypeOf(a);if(r!==Object.prototype&&r!==null)throw new RangeError(`[directory-tree] labels must be a plain object (prototype Object.prototype or null); got ${Array.isArray(a)?"an array":"an object with a non-plain prototype"}`);for(const s of Object.keys(a))if(!I1.includes(s))throw new RangeError(`[directory-tree] labels.${s} is not a known label key; expected one of ${I1.join(", ")}`);const i={...i0.resolveVirtualScrollLabels(n,dt(a)),...C1[n]};for(const s of n2){const u=Object.hasOwn(a,s)?a[s]:void 0;if(u!==void 0){if(typeof u!="string"||u.trim()==="")throw new RangeError(`[directory-tree] labels.${s} must be a non-blank string; got ${Ze(u)}`);i[s]=u}}return Object.freeze(i)},ht=e=>{const a={};for(const n of i0.VIRTUAL_SCROLL_LABEL_KEYS)a[n]=e[n];return Object.freeze(a)},ut=()=>{let e=null;return{mark:a=>{const n=a.composedPath();e=n,setTimeout(()=>{e===n&&(e=null)},0)},landedOn:a=>e?.includes(a)===!0}},U0=e=>typeof e=="string"?JSON.stringify(e):String(e),R1=(e,a)=>{if(typeof a!="number"||!Number.isFinite(a)||a<=0)throw new RangeError(`[directory-tree] visual.${e} must be a finite number greater than 0 (px); got ${U0(a)}.`);return a},mt=e=>{if(typeof e=="string"&&e.trim()!==""||typeof e=="number"&&Number.isFinite(e)&&e>0)return e;throw new RangeError(`[directory-tree] visual.fontSize must be a finite number greater than 0 (px) or a CSS font size that is not blank; got ${U0(e)}.`)},ft=({indentSize:e,typeIconSize:a,fontSize:n})=>({indentSize:e===void 0?$2:R1("indentSize",e),typeIconSize:a===void 0?z2:R1("typeIconSize",a),fontSize:n===void 0?void 0:mt(n)}),At=({indentSize:e,removeRootIndent:a,hasExpandBox:n})=>a?Math.max(0,e-(n?l0:0)):0,pt=(e,a,n)=>{if(typeof e!="function")return R1("itemHeight",e);const r=e(a,n);if(typeof r!="number"||!Number.isFinite(r)||r<=0)throw new RangeError(`[directory-tree] visual.itemHeight returned ${U0(r)} for ${JSON.stringify(a.absolutePath)} (row ${n}); it must return a finite number greater than 0 (px).`);return r},gt=(e,a,n)=>{const r=a===void 0?D2:a;if(typeof r!="number"||!Number.isFinite(r)||r<=0||r>l0)throw new RangeError(`[directory-tree] visual.expandIconSize must be a finite number greater than 0 and at most ${l0} (the expand box, px) while tree lines are drawn; got ${U0(r)}.`);const{indentSize:o,typeIconSize:i}=e,s=r/2,u=l0+i-r/2;if(o<s||o>u)throw new RangeError(`[directory-tree] visual.indentSize ${U0(o)} does not fit the tree lines: with typeIconSize ${i} and an expand glyph of ${r} px it must be from ${s} (half the glyph) to ${u} (the ${l0} px expand box + typeIconSize − half the glyph).`);return{indentSize:o,typeIconSize:i,glyphSize:r,originX:n}},vt=({indentSize:e,typeIconSize:a,glyphSize:n})=>Math.min(Math.max(l0+a/2-e,n/2),l0-n/2),Ht=(e,a)=>{const n=e.length-1;if(n<=0)return 0;let r=0,o=n-1,i=0;for(;r<=o;){const s=r+o>>>1;e[s]<=a?(i=s,r=s+1):o=s-1}return i},Vt=(e,a,n)=>{if(n<=0||e.length===0||a.length!==e.length+1)return null;const r=Ht(a,n),o=e[r];return o?{path:o.entry.absolutePath,offsetInViewport:n-a[r]}:null},Zt=(e,a,n)=>{if(a.length===0||n.length!==a.length+1)return null;for(let r=0;r<a.length;r++)if(a[r].entry.absolutePath===e.path)return Math.max(0,n[r]+e.offsetInViewport);return null},Mt=(e,a,n)=>{const r=[];for(let o=a;o<n;o++){const i=e[o];if(!(!i||i.length===0))for(const s of i)r.push(s)}return r},yt=(e,a,n)=>{const r=[];for(let o=a;o<n;o++){const i=e[o];if(!(!i||i.length===0))for(const s of i)r.push(s)}return r},Et=(e,a,n,r)=>{const o=Math.max(1,Math.floor(a*r)),i=Math.max(1,Math.floor(n*r));(e.width!==o||e.height!==i)&&(e.width=o,e.height=i);const s=e.style;s.width!==`${a}px`&&(s.width=`${a}px`),s.height!==`${n}px`&&(s.height=`${n}px`)},bt=(e,a,n)=>{e.lineWidth=n,e.beginPath();for(const r of a)e.moveTo(r.x1,r.y1),e.lineTo(r.x2,r.y2);e.stroke()},wt=(e,a,n,r)=>{if(a.length===0)return;const o=e.strokeStyle,i=e.lineWidth,s=e.lineCap,u=e.lineJoin;e.strokeStyle=n,e.lineCap="round",e.lineJoin="round";for(const m of a){const g=r??m.size,E=Math.max(0,g/2),M=Math.max(1,Math.round(g*.08)),b=Math.max(1,Math.round(g*.14)),f=Math.max(0,E-M*.8),p=Math.max(0,f*.55);e.lineWidth=M,e.beginPath(),e.arc(m.centerX,m.centerY,Math.max(0,E-M*.3),0,Math.PI*2),e.stroke(),e.lineWidth=b,e.beginPath(),e.moveTo(m.centerX-p,m.centerY),e.lineTo(m.centerX+p,m.centerY),e.stroke(),m.isExpanded||(e.beginPath(),e.moveTo(m.centerX,m.centerY-p),e.lineTo(m.centerX,m.centerY+p),e.stroke())}e.strokeStyle=o,e.lineWidth=i,e.lineCap=s,e.lineJoin=u},o2=c.memo(({segmentsByItem:e,glyphsByItem:a,itemHeight:n,width:r,viewportHeight:o,scrollPosition:i,color:s=je,strokeWidth:u=1,renderStartIndex:m,renderEndIndex:g,lookaheadEndIndex:E,devicePixelRatio:M,expandGlyphColor:b,expandGlyphSize:f})=>{const p=c.useRef(null),A=c.useRef(null),Z=c.useRef({segmentsByItem:e,glyphsByItem:a,itemHeight:n,width:r,viewportHeight:o,scrollPosition:i,color:s,strokeWidth:u,renderStartIndex:m,renderEndIndex:g,lookaheadEndIndex:E,devicePixelRatio:M,expandGlyphColor:b,expandGlyphSize:f}),V=c.useCallback(()=>{A.current=null;const S=p.current;if(!S)return;const L=S.getContext("2d");if(!L)return;const v=Z.current;if(v.width<=0||v.viewportHeight<=0){L.clearRect(0,0,S.width,S.height);return}const R=Number.isFinite(v.devicePixelRatio??NaN)?v.devicePixelRatio:typeof window<"u"&&window.devicePixelRatio||1;Et(S,v.width,v.viewportHeight,R);const k=v.segmentsByItem.length,I=typeof v.renderStartIndex=="number"&&Number.isFinite(v.renderStartIndex)?Math.max(0,Math.floor(v.renderStartIndex)):Math.max(0,Math.floor(v.scrollPosition/v.itemHeight)),c0=Math.min(k,Math.ceil((v.scrollPosition+v.viewportHeight)/v.itemHeight)),X=(()=>{if(typeof v.renderEndIndex=="number"&&Number.isFinite(v.renderEndIndex)){const j=Math.floor(v.renderEndIndex);return Math.max(Math.min(k,j+1),I)}return Math.max(c0,I)})(),O=(()=>{if(typeof v.lookaheadEndIndex=="number"&&Number.isFinite(v.lookaheadEndIndex)){const j=Math.floor(v.lookaheadEndIndex),d0=Math.min(k,j+1);return Math.max(d0,X)}return Math.max(c0,X)})(),W=Mt(v.segmentsByItem,I,O),g0=yt(v.glyphsByItem,I,O);L.save(),L.scale(R,R),L.clearRect(0,0,v.width,v.viewportHeight),L.translate(0,-v.scrollPosition),L.strokeStyle=v.color,bt(L,W,v.strokeWidth),wt(L,g0,v.expandGlyphColor??v.color,v.expandGlyphSize),L.restore()},[]),P=c.useCallback(()=>{A.current===null&&(A.current=window.requestAnimationFrame(V))},[V]);return c.useEffect(()=>{Z.current={segmentsByItem:e,glyphsByItem:a,itemHeight:n,width:r,viewportHeight:o,scrollPosition:i,color:s,strokeWidth:u,renderStartIndex:m,renderEndIndex:g,lookaheadEndIndex:E,devicePixelRatio:M,expandGlyphColor:b,expandGlyphSize:f},P()},[e,a,n,r,o,i,s,u,m,g,E,M,b,f,P]),c.useEffect(()=>()=>{A.current!==null&&(window.cancelAnimationFrame(A.current),A.current=null)},[]),h.jsx("canvas",{ref:p,className:"pointer-events-none absolute top-0 left-0 z-0"})});o2.displayName="TreeLineCanvas";const St=e=>{const a=new Map;for(let n=0;n<e.length;n++){const r=e[n].entry.absolutePath;a.has(r)||a.set(r,n)}return a},Me=(e,a)=>e.selectedPath===a?e:{selectedPath:a,selectionGeneration:e.selectionGeneration+1,anchor:e.anchor},Lt=(e,a)=>({...e,anchor:{path:a,selectionGeneration:e.selectionGeneration,focused:!0}}),xt=(e,a)=>{const{anchor:n,selectionGeneration:r,selectedPath:o}=a;if(n!==null&&(n.focused||n.selectionGeneration===r)){const i=e.get(n.path);if(i!==void 0)return i}if(o!==null){const i=e.get(o);if(i!==void 0)return i}return 0},It={msOverflowStyle:"none",scrollbarWidth:"none"},Ct=()=>{let e=document.getElementById("directory-tree-webkit-scrollbar-hide");e||(e=document.createElement("style"),e.id="directory-tree-webkit-scrollbar-hide",e.textContent=".directory-tree-container::-webkit-scrollbar { display: none; }",document.head.appendChild(e))},Rt=()=>()=>{},kt=()=>!0,Nt=()=>!1,Ft=e=>{const a=c.useRef(null),n=a.current;return n!==null&&i0.VIRTUAL_SCROLL_LABEL_KEYS.every(r=>n[r]===e[r])?n:(a.current=e,e)},ye=new Set(["top","bottom","center","nearest"]),Ee=e=>{const a=e?.align;if(a===void 0)return"top";if(!ye.has(a))throw new RangeError(`[directory-tree] Unsupported scroll alignment ${JSON.stringify(a)}; expected one of ${[...ye].join(", ")}.`);return a},Pt={position:"absolute",width:1,height:1,margin:-1,padding:0,border:0,overflow:"hidden",clipPath:"inset(50%)",whiteSpace:"nowrap"},Tt=(e,a,n,r,o)=>{const i=[],s=[];let u=0;const m=(g,E,M)=>{const b=o?[...g].sort(o):g;for(let f=0;f<b.length;f++){const p=b[f],A=f===b.length-1,Z=[...M,A],V=p.children!==void 0,P=V&&a(p.absolutePath,p.relativePath);let S=E,L=M;r&&(S=E-1,L=M.slice(1)),i.push({entry:p,indentLevel:S,depth:E,positionInSet:f+1,setSize:b.length}),n&&(S>u&&(u=S),s.push({id:p.absolutePath,name:p.name,absolutePath:p.absolutePath,indentLevel:S,isLastChild:A,isDirectory:V,isExpanded:P,ancestorIsLast:[...L],hideLines:r&&E===0})),V&&P&&p.children&&m(p.children,E+1,Z)}};return m(e,0,[]),{flatItems:i,lineItems:s,maxIndent:u}},be=(e,a)=>{const n=e.length-1;if(n<=0)return 0;let r=0,o=n-1,i=0;for(;r<=o;){const s=r+o>>>1;e[s]<=a?(i=s,r=s+1):o=s-1}return i},Ot=(e,a,n,r,o,i)=>{const s=r?.renderStart??Math.max(0,be(i,o)),u=a>0?be(i,o+a)+n:s+n,m=e>0?Math.min(e-1,Math.max(s,u)):s,g=r?.renderEnd??m,E=e>0?Math.min(e-1,g+n):g;return{renderStart:s,renderEnd:g,lookaheadEnd:E}},_t=(e,a,n,r)=>{if(e.length===0)return{segmentsByItem:[],glyphsByItem:[]};const{indentSize:o,typeIconSize:i,glyphSize:s,originX:u}=r,m=Array.from({length:e.length},()=>[]),g=Array.from({length:e.length},()=>[]),E=u+vt(r),M=f=>f*o+E,b=s/2+2;for(let f=0;f<e.length;f++){const p=e[f],A=a[f]??0,Z=n[f]??0,V=Z+A/2,P=e[f+1],S=V+i/2,L=Z+A,v=P!==void 0&&P.indentLevel===p.indentLevel+1&&S<L?{key:`${p.id}-connector-children`,x1:M(P.indentLevel),y1:S,x2:M(P.indentLevel),y2:L,itemIndex:f}:null;if(p.hideLines){v!==null&&(m[f]=[v]);continue}const R=[];for(let I=0;I<p.indentLevel;I++){if(p.ancestorIsLast[I]??!1)continue;let X=!1;for(let O=f;O<e.length;O++){const W=e[O];if(W.indentLevel>I&&W.ancestorIsLast.length>I&&!W.ancestorIsLast[I]){X=!0;break}if(O>f&&W.indentLevel===I)break}if(X){const O=M(I);R.push({key:`${p.id}-ancestor-${I}`,x1:O,y1:Z,x2:O,y2:Z+A,itemIndex:f})}}const k=M(p.indentLevel);f>0&&R.push({key:`${p.id}-connector-top`,x1:k,y1:Z,x2:k,y2:p.isDirectory?V-b:V,itemIndex:f}),!p.isDirectory&&p.isLastChild&&R.push({key:`${p.id}-connector-horizontal`,x1:k,y1:V,x2:u+p.indentLevel*o+l0,y2:V,itemIndex:f}),p.isLastChild||(p.isDirectory?R.push({key:`${p.id}-connector-bottom`,x1:k,y1:V+b,x2:k,y2:Z+A,itemIndex:f}):R.push({key:`${p.id}-connector-bottom`,x1:k,y1:V,x2:k,y2:Z+A,itemIndex:f})),v!==null&&R.push(v),m[f]=R,p.isDirectory&&(g[f]=[{key:`${p.id}-glyph`,itemIndex:f,centerX:k,centerY:V,size:s,isExpanded:p.isExpanded}])}return{segmentsByItem:m,glyphsByItem:g}},c2=c.memo(({entry:e,indentLevel:a,originX:n,depth:r,positionInSet:o,setSize:i,isSelectedForAria:s,flatIndex:u,isActive:m,registerRowRef:g,onNavigationKeyDown:E,onRowFocus:M,onRowBlur:b,rowHeight:f,entryKindDirectory:p,entryKindFile:A,isDirOpen:Z,expansion:{toggleDirectory:V,onToggleDirectoryRecursive:P},selection:{onEntryClick:S,selectedPath:L,currentPath:v,mode:R="none",selectedItems:k,onSelectionChange:I},visual:{iconOverrides:c0,showExpandIcons:X=!0,showDirectoryIcons:O=!0,showFileIcons:W=!0,useCanvasExpandIcons:g0=!1,expandIconSize:j,typeIconSize:d0,fontSize:v0,indentSize:U,highlightStyles:J,entryClassName:R0,entryStyle:E0,nameClassName:b0,nameStyle:N,directoryNameClassName:t0,directoryNameStyle:_,fileNameClassName:z0,fileNameStyle:w,expandIconClassName:k0,expandIconStyle:H0}})=>{D0(e.style,{option:"entry.style",absolutePath:e.absolutePath});const[w0,N0]=c.useState(!1),x=e.children!==void 0,h0=x&&Z(e.absolutePath),z=e.absolutePath===L,F0=e.absolutePath===v,q=!x&&k?.has(e.absolutePath),K=c.useCallback(Y=>g(u,Y),[g,u]),a0=x?void 0:ze(e),V0=Ue({entry:e,isDirectory:x,isExpanded:h0,isItemSelected:!!q,selectionMode:R,onSelectionChange:I,onEntryClick:S,toggleDirectory:V,onToggleDirectoryRecursive:P}),m0=w0?J?.hoverClassName!==void 0?J.hoverClassName:C.entryHover:"",S0=(()=>{if(x){if(z)return J?.directorySelectedClassName!==void 0?J.directorySelectedClassName:C.entrySelected}else if(z||q)return J?.itemSelectedClassName!==void 0?J.itemSelectedClassName:D.twMerge(z&&C.entrySelected,q&&C.entryItemSelected);return""})(),f0=D.twMerge(C.entry,m0,S0,R0,e.className),B0=D.twMerge(C.expandIcon,k0,(z||q)&&C.expandIconSelected),T=D.twMerge(C.typeIcon,(z||q)&&C.typeIconSelected),J0=D.twMerge(C.name,b0,x&&C.nameDirectory,x&&t0,!x&&z0,(z||q)&&C.nameSelected),i1=Be({isDirectory:x,isExpanded:h0,showExpandIcons:X&&a>=0,useCanvasExpandIcons:g0,expandIconSize:j}),W0=(x?O:W)?We({entry:e,isDirectory:x,isExpanded:h0,isSelected:z,isItemSelected:!!q,extension:a0,mimeType:e.mimeType},c0,d0):null,K0={...w0?J?.hoverStyle:{},...x&&z?J?.directorySelectedStyle:{},...!x&&(z||q)?J?.itemSelectedStyle:{}},q0=Ke(e.data),d1={width:d0,height:d0},L0=De(v0),Z0=n+a*U;return h.jsxs("div",{className:f0,style:{...L0,...K0,...E0,...e.style,paddingLeft:`${Math.max(0,Z0)}px`,transform:Z0<0?`translateX(${Z0}px)`:void 0,width:Z0<0?`calc(100% + ${-Z0}px)`:void 0,height:`${f}px`},...q0,"data-entry-type":x?"directory":"file","data-entry-expanded":x?String(h0):void 0,"data-entry-selected":z?"true":void 0,"data-entry-item-selected":q?"true":void 0,onClick:V0,onMouseEnter:()=>N0(!0),onMouseLeave:()=>N0(!1),onFocus:Y=>M(u,e.absolutePath,Y.currentTarget),onBlur:Y=>b(e.absolutePath,Y.currentTarget),ref:K,onKeyDown:Y=>{if(Y.key==="Enter"||Y.key===" "){Y.preventDefault(),Y.repeat||V0(Y);return}E(Y,u)},tabIndex:m?0:-1,role:"treeitem","aria-expanded":x?h0:void 0,"aria-level":r+1,"aria-posinset":o,"aria-setsize":i,"aria-selected":R==="none"?void 0:s,"aria-current":F0?"page":void 0,"aria-label":`${e.name} (${x?p:A})`,children:[(X||g0)&&h.jsx("span",{className:B0,style:{...H0,width:l0,height:l0},children:i1}),(x?O:W)&&h.jsx("span",{className:T,style:d1,children:W0}),h.jsx("span",{className:J0,style:{...L0,...N,...x?_:w},"data-entry-type":x?"directory":"file","data-entry-role":"name",children:e.label??e.name})]})},(e,a)=>{if(e.entry!==a.entry)return!1;const n=e.entry.children!==void 0,r=a.entry.children!==void 0,o=n&&e.isDirOpen(e.entry.absolutePath),i=r&&a.isDirOpen(a.entry.absolutePath);return e.indentLevel===a.indentLevel&&e.originX===a.originX&&e.depth===a.depth&&e.positionInSet===a.positionInSet&&e.setSize===a.setSize&&e.isSelectedForAria===a.isSelectedForAria&&e.flatIndex===a.flatIndex&&e.isActive===a.isActive&&e.rowHeight===a.rowHeight&&e.entryKindDirectory===a.entryKindDirectory&&e.entryKindFile===a.entryKindFile&&o===i&&e.selection.selectedPath===a.selection.selectedPath&&e.selection.currentPath===a.selection.currentPath&&e.selection.mode===a.selection.mode&&e.selection.selectedItems===a.selection.selectedItems&&e.visual.iconOverrides===a.visual.iconOverrides&&e.visual.showExpandIcons===a.visual.showExpandIcons&&e.visual.showDirectoryIcons===a.visual.showDirectoryIcons&&e.visual.showFileIcons===a.visual.showFileIcons&&e.visual.useCanvasExpandIcons===a.visual.useCanvasExpandIcons&&e.visual.expandIconSize===a.visual.expandIconSize&&e.visual.typeIconSize===a.visual.typeIconSize&&e.visual.fontSize===a.visual.fontSize&&e.visual.indentSize===a.visual.indentSize&&e.visual.highlightStyles===a.visual.highlightStyles&&e.visual.entryClassName===a.visual.entryClassName&&e.visual.entryStyle===a.visual.entryStyle&&e.visual.nameClassName===a.visual.nameClassName&&e.visual.nameStyle===a.visual.nameStyle&&e.visual.directoryNameClassName===a.visual.directoryNameClassName&&e.visual.directoryNameStyle===a.visual.directoryNameStyle&&e.visual.fileNameClassName===a.visual.fileNameClassName&&e.visual.fileNameStyle===a.visual.fileNameStyle&&e.visual.expandIconClassName===a.visual.expandIconClassName&&e.visual.expandIconStyle===a.visual.expandIconStyle});c2.displayName="DirectoryEntryItem";const s2=e=>{const a=[];if(e.children)for(const n of e.children)n.type==="directory"&&(a.push(n.absolutePath),a.push(...s2(n)));return a},jt=({entries:e,expansion:{toggle:a,isExpanded:n,expandMultiple:r,collapseMultiple:o,isPending:i,alwaysExpanded:s=!1,doubleClickAction:u="recursive"},selection:{onEntryClick:m,selectedPath:g,currentPath:E,mode:M="none",selectedItems:b,onSelectionChange:f},visual:{className:p,style:A,ariaLabel:Z,ariaLabelledBy:V,lineColor:P=je,showTreeLines:S=!0,showExpandIcons:L=!0,showDirectoryIcons:v=!0,showFileIcons:R=!0,iconOverrides:k,expandIconSize:I,typeIconSize:c0,fontSize:X,indentSize:O,itemHeight:W=w1,removeRootIndent:g0=!1,highlightStyles:j,entryClassName:d0,entryStyle:v0,nameClassName:U,nameStyle:J,directoryNameClassName:R0,directoryNameStyle:E0,fileNameClassName:b0,fileNameStyle:N,expandIconClassName:t0,expandIconStyle:_}={},virtualScroll:z0,grid:w,sort:k0,locale:H0,labels:w0,ref:N0})=>{const x=i0.resolveVirtualScrollLocale(H0),h0=c.useMemo(()=>l2(H0,w0),[H0,w0]),z=Ft(ht(h0)),{entryKindDirectory:F0,entryKindFile:q}=h0,K=c.useMemo(()=>ft({indentSize:O,typeIconSize:c0,fontSize:X}),[O,c0,X]);c.useMemo(()=>{D0(v0,{option:"visual.entryStyle"}),D0(j?.hoverStyle,{option:"visual.highlightStyles.hoverStyle"}),D0(j?.directorySelectedStyle,{option:"visual.highlightStyles.directorySelectedStyle"}),D0(j?.itemSelectedStyle,{option:"visual.highlightStyles.itemSelectedStyle"}),at(_,{option:"visual.expandIconStyle"})},[v0,j,_]);const a0=w!==void 0,V0=c.useSyncExternalStore(Rt,kt,Nt),m0=c.useRef(null),S0=c.useRef(null),f0=c.useRef(null),[B0,T]=c.useState(0),[J0,i1]=c.useState(0),[W0,K0]=c.useState(0),[q0,d1]=c.useState(null),{overscanCount:L0=15,className:Z0,background:Y,onScroll:N1,onRangeChange:F1,onScrollAdjust:P1,liveRegion:T1,initialScrollIndex:O1,initialScrollOffset:P0,initialScrollAnchor:_1,callbackThrottleMs:j1=5,contentInsets:$1,onItemFocus:D1,viewportHeightOverride:n0,scrollBarOptions:h1,behaviorOptions:z1,preserveScrollAnchor:B1=!1,getItemKey:i2,testId:W1,contentProps:u1}=z0??{},K1=c.useMemo(()=>a0?{...u1,role:"rowgroup"}:{...u1,role:"tree","aria-label":V?void 0:Z,"aria-labelledby":V,"aria-multiselectable":M==="multiple"?!0:void 0,"aria-busy":i?!0:void 0},[a0,u1,Z,V,M,i]),Y1=c.useMemo(()=>({...z1,enableKeyboardNavigation:!1}),[z1]),[Q0,G1]=c.useState(typeof P0=="number"?P0:0),m1=c.useRef(typeof P0=="number"?P0:0),X1=c.useCallback((l,d)=>{m1.current=l,G1(l),N1?.(l,d)},[N1]),U1=c.useCallback(l=>{const{renderingStartIndex:d,renderingEndIndex:H}=l;d1(y=>y&&y.renderStart===d&&y.renderEnd===H?y:{renderStart:d,renderEnd:H}),F1?.(l)},[F1]);c.useEffect(()=>{Ct()},[]),c.useEffect(()=>{const l=m0.current,d=a0?S0.current:l,H=()=>{if(l){const F=l.clientWidth;i1(B=>Math.abs(B-F)>1?F:B)}if(typeof n0=="number")T(F=>Math.abs(F-n0)>1?n0:F);else if(d){const F=d.clientHeight;T(B=>Math.abs(B-F)>1?F:B)}};if(!(l||d))return T(0);H();const y=new ResizeObserver(H);return l&&y.observe(l),d&&d!==l&&y.observe(d),()=>y.disconnect()},[n0,a0]);const T0=typeof n0=="number"?n0:B0,u0=c.useCallback(l=>s||(V0?n(l):!1),[V0,n,s]),J1=D.twMerge(C.container,i&&C.containerPending,p),q1=c.useMemo(()=>({...It,...A??{},...typeof n0=="number"?{height:n0,minHeight:n0}:{}}),[A,n0]),f1=c.useCallback((l,d)=>{const H=[l.absolutePath,...s2(l)],y=d||u;if(H.every(p0=>u0(p0)))return o(H);if(H.every(p0=>!u0(p0))||y==="recursive")return r(H);if(y==="toggle")return o(H);console.warn(`[DirectoryTree] Unknown double click action: ${y}. No action taken.`)},[u0,r,o,u]),A1=a0?!1:g0,{flatItems:x0,lineItems:p1,maxIndent:Q1}=c.useMemo(()=>Tt(e,u0,S,A1,k0),[e,u0,S,A1,k0]),e1=At({indentSize:K.indentSize,removeRootIndent:A1,hasExpandBox:L||S}),s0=c.useMemo(()=>S?gt(K,I,e1):null,[S,K,I,e1]),$=c.useMemo(()=>x0.map((l,d)=>({...l,rowHeight:pt(W,l.entry,d)})),[x0,W]),M0=c.useMemo(()=>$.map(l=>l.rowHeight),[$]),I0=c.useMemo(()=>{const l=new Array(M0.length+1);l[0]=0;for(let d=0;d<M0.length;d++)l[d+1]=l[d]+M0[d];return l},[M0]),ee=c.useCallback(l=>$[l]?.rowHeight??w1,[$]),d2=c.useCallback(l=>$[l]?.entry.absolutePath??l,[$]),te=i2??d2,O0=g??null,g1=E??null,[ae,Y0]=c.useState(()=>({selectedPath:O0,selectionGeneration:0,anchor:null})),v1=Me(ae,O0);v1!==ae&&Y0(l=>Me(l,O0));const t1=c.useMemo(()=>St(x0),[x0]),_0=c.useMemo(()=>xt(t1,v1),[t1,v1]),G0=c.useRef(new Map),a1=c.useRef(null),[n1]=c.useState(ut),X0=c.useRef(null),[h2,ne]=c.useState(!0),H1=c.useRef(x0);H1.current=x0;const re=c.useRef(u0);re.current=u0;const V1=c.useRef(a);V1.current=a;const le=c.useRef(t1);le.current=t1;const Z1=c.useRef(_0);Z1.current=_0;const oe=c.useRef(D1);oe.current=D1;const C0=c.useCallback(l=>{const d=f0.current;return!d||d.getViewportSize()<=0?!1:(d.scrollToIndex(l,{align:"nearest"}),!0)},[]),A0=c.useCallback(l=>{const d=G0.current.get(l);if(d===void 0){X0.current=l,C0(l)||(X0.current=null);return}X0.current=null,C0(l),d.focus({preventScroll:!0})},[C0]),ce=c.useCallback((l,d)=>{if(d)G0.current.set(l,d),X0.current===l?(X0.current=null,d.focus({preventScroll:!0})):d.contains(d.ownerDocument.activeElement)&&Y0(H=>H.anchor===null?H:{...H,anchor:{...H.anchor,focused:!0}});else{const H=G0.current.get(l);G0.current.delete(l),H?.contains(H.ownerDocument.activeElement)&&Y0(y=>y.anchor===null?y:{...y,anchor:{...y.anchor,focused:!1}})}l===Z1.current&&ne(d!==null)},[]);c.useLayoutEffect(()=>{ne(G0.current.has(_0))},[_0]);const M1=c.useCallback((l,d,H)=>{const y=a1.current===H;a1.current=null,y||(Y0(F=>Lt(F,d)),n1.landedOn(H)||C0(l)),oe.current?.(l)},[C0,n1]),r1=c.useCallback(l=>n1.mark(l.nativeEvent),[n1]),y1=c.useCallback((l,d)=>{const{ownerDocument:H}=d;if(!H.hasFocus()&&d.contains(H.activeElement)){a1.current=d;return}a1.current=null,Y0(y=>y.anchor!==null&&y.anchor.path===l?{...y,anchor:{...y.anchor,focused:!1}}:y)},[]),u2=c.useCallback(()=>A0(Z1.current),[A0]),E1=c.useCallback((l,d)=>{const H=Ee(d),y=H1.current.length;if(!Number.isInteger(l)||l<0||l>=y)throw new RangeError(`[directory-tree] scrollToIndex: ${String(l)} is not a row index (${y===0?"the tree has no rows":`expected an integer in 0..${String(y-1)}`}).`);if(H==="nearest"){C0(l);return}f0.current?.scrollToIndex(l,{align:H})},[C0]);c.useImperativeHandle(N0,()=>({scrollToIndex:E1,scrollToPath:(l,d)=>{Ee(d);const H=le.current.get(l);return H===void 0?!1:(E1(H,d),!0)},getScrollAnchor:()=>f0.current?.getScrollAnchor()??null}),[E1]);const se=c.useCallback((l,d)=>{if(l.altKey||l.ctrlKey||l.metaKey)return;const H=H1.current,y=H.length-1;if(y<0)return;const F=H[d],B=F?.entry.children!==void 0,p0=B&&re.current(F.entry.absolutePath);switch(l.key){case"ArrowDown":l.preventDefault(),A0(Math.min(d+1,y));break;case"ArrowUp":l.preventDefault(),A0(Math.max(d-1,0));break;case"Home":l.preventDefault(),A0(0);break;case"End":l.preventDefault(),A0(y);break;case"ArrowRight":l.preventDefault(),B&&!p0?V1.current(F.entry.absolutePath):B&&d<y&&H[d+1].depth>F.depth&&A0(d+1);break;case"ArrowLeft":{if(l.preventDefault(),B&&p0){V1.current(F.entry.absolutePath);break}const g2=F?.depth??0;for(let s1=d-1;s1>=0;s1--)if(H[s1].depth<g2){A0(s1);break}break}}},[A0]),l1=c.useMemo(()=>s0===null||p1.length===0?{segmentsByItem:[],glyphsByItem:[]}:_t(p1,M0,I0,s0),[p1,M0,I0,s0]),o1=c.useMemo(()=>s0===null||e.length===0?0:s0.originX+Q1*s0.indentSize+l0+s0.typeIconSize,[e.length,Q1,s0]),{renderStart:ie,renderEnd:de,lookaheadEnd:he}=c.useMemo(()=>Ot($.length,T0,L0,q0,Q0,I0),[$.length,T0,L0,q0,Q0,I0]),b1=c.useMemo(()=>s0===null||o1<=0||T0<=0||l1.segmentsByItem.length===0?null:h.jsx("div",{className:"pointer-events-none absolute inset-0 z-1","aria-hidden":"true",children:h.jsx("div",{className:"absolute top-0 left-0",style:{width:o1,height:T0},children:h.jsx(o2,{segmentsByItem:l1.segmentsByItem,glyphsByItem:l1.glyphsByItem,itemHeight:M0[0]??w1,width:o1,viewportHeight:T0,scrollPosition:Q0,color:P,expandGlyphColor:P,expandGlyphSize:s0.glyphSize,renderStartIndex:ie,renderEndIndex:de,lookaheadEndIndex:he})})}),[o1,T0,ie,de,he,Q0,l1,P,s0,M0]),ue=c.useCallback(l=>$[l],[$]),me=c.useRef(null);c.useLayoutEffect(()=>{const l=me.current;if(me.current={items:$,offsets:I0},!B1||!l||l.items===$)return;const d=f0.current,H=d?.getScrollPosition(),y=typeof H=="number"&&H>=0?H:m1.current,F=Vt(l.items,l.offsets,y);if(!F)return;const B=Zt(F,$,I0);if(B===null||Math.abs(B-y)<1)return;const p0=d?d.scrollTo(B):B;m1.current=p0,G1(p0)},[$,I0,B1]);const y0=w?.columns,j0=w?.scrollBarWidth??h1?.width??a2,G=c.useMemo(()=>y0?st({measuredWidth:J0,columns:y0,scrollBarWidth:j0}):null,[y0,J0,j0]),c1=c.useMemo(()=>y0?ct(y0):"",[y0]),m2=c.useMemo(()=>w?.showFooter&&y0?it(e):[],[w?.showFooter,y0,e]),$0=G?.maxHScroll??0;c.useEffect(()=>{K0(l=>S1(l,$0))},[$0]);const fe=c.useCallback(l=>K0(d=>S1(d+l,$0)),[$0]),Ae=c.useMemo(()=>({iconOverrides:k,showExpandIcons:L,showDirectoryIcons:v,showFileIcons:R,useCanvasExpandIcons:S,expandIconSize:I,typeIconSize:K.typeIconSize,fontSize:K.fontSize,indentSize:K.indentSize,highlightStyles:j,expandIconClassName:t0,expandIconStyle:_}),[k,L,v,R,S,I,K,j,t0,_]),pe=c.useMemo(()=>h.jsx(i0.VirtualScroll,{ref:f0,itemCount:$.length,getItem:ue,getItemHeight:ee,getItemKey:te,testId:W1,contentProps:K1,locale:x,labels:z,viewportSize:typeof n0=="number"?n0:void 0,overscanCount:L0,onScroll:X1,onRangeChange:U1,onScrollAdjust:P1,liveRegion:T1,className:Z0,onWheelHorizontal:a0?fe:void 0,background:h.jsxs(h.Fragment,{children:[a0&&G?h.jsx("div",{className:"pointer-events-none absolute top-0 left-0 z-1 h-full overflow-hidden",style:{width:G.nameWidth},"aria-hidden":"true",children:b1}):b1,Y]}),initialScrollIndex:O1,initialScrollOffset:P0,initialScrollAnchor:_1,callbackThrottleMs:j1,contentInsets:$1,scrollBarOptions:h1,behaviorOptions:Y1,children:(l,d)=>l?a0&&w&&G?h.jsx(Qe,{entry:l.entry,indentLevel:l.indentLevel,positionInSet:l.positionInSet,setSize:l.setSize,rowIndex:d+(w.showHeader??!0?2:1),flatIndex:d,onRowFocus:M1,onRowBlur:y1,isSelectedForAria:!!b?.has(l.entry.absolutePath),rowHeight:l.rowHeight,isDirOpen:u0,columns:w.columns,numericTemplate:c1,numericTotal:G.numericTotal,nameWidth:G.nameWidth,rowClassName:w.rowClassName,selection:{onEntryClick:m,selectedPath:O0,currentPath:g1,mode:M,selectedItems:b,onSelectionChange:f},expansion:{toggleDirectory:a,onToggleDirectoryRecursive:f1},visual:Ae},l.entry.absolutePath):h.jsx(c2,{entry:l.entry,indentLevel:l.indentLevel,originX:e1,depth:l.depth,positionInSet:l.positionInSet,setSize:l.setSize,isSelectedForAria:!!b?.has(l.entry.absolutePath),flatIndex:d,isActive:d===_0,registerRowRef:ce,onNavigationKeyDown:se,onRowFocus:M1,onRowBlur:y1,rowHeight:l.rowHeight,entryKindDirectory:F0,entryKindFile:q,isDirOpen:u0,expansion:{toggleDirectory:a,onToggleDirectoryRecursive:f1},selection:{onEntryClick:m,selectedPath:O0,currentPath:g1,mode:M,selectedItems:b,onSelectionChange:f},visual:{iconOverrides:k,showExpandIcons:L,showDirectoryIcons:v,showFileIcons:R,useCanvasExpandIcons:S,expandIconSize:I,typeIconSize:K.typeIconSize,fontSize:K.fontSize,indentSize:K.indentSize,highlightStyles:j,entryClassName:d0,entryStyle:v0,nameClassName:U,nameStyle:J,directoryNameClassName:R0,directoryNameStyle:E0,fileNameClassName:b0,fileNameStyle:N,expandIconClassName:t0,expandIconStyle:_}},l.entry.absolutePath):null}),[$.length,ue,ee,te,W1,K1,x,z,F0,q,_0,ce,se,M1,y1,n0,L0,X1,U1,P1,T1,Z0,a0,fe,G,b1,Y,O1,P0,_1,j1,$1,h1,Y1,w,c1,u0,m,O0,g1,M,b,f,a,f1,Ae,k,L,v,R,S,I,K,e1,j,d0,v0,U,J,R0,E0,b0,N,t0,_]);if(!(w&&G))return h.jsxs("div",{ref:m0,className:J1,style:q1,onPointerDownCapture:r1,onMouseDownCapture:r1,children:[x0.length>0&&!h2&&h.jsx("span",{tabIndex:0,"data-directory-tree-tab-stop":"",style:Pt,onFocus:u2}),pe]});const f2=w.showHeader??!0,A2=w.showFooter??!1,p2={...q1,"--dt-hscroll":`${W0}px`};return h.jsxs("div",{ref:m0,className:D.twMerge(J1,"dt-grid"),style:p2,role:"treegrid","aria-label":V?void 0:Z,"aria-labelledby":V,"aria-multiselectable":M==="multiple"?!0:void 0,"aria-busy":i?!0:void 0,"aria-rowcount":$.length+(w.showHeader??!0?1:0),onPointerDownCapture:r1,onMouseDownCapture:r1,children:[f2&&h.jsx("div",{role:"rowgroup",children:h.jsx(rt,{columns:w.columns,numericTemplate:c1,numericTotal:G.numericTotal,nameWidth:G.nameWidth,scrollBarWidth:j0,className:w.headerClassName})}),h.jsx("div",{ref:S0,className:"dt-grid-body",children:pe}),$0>0&&h.jsxs("div",{className:"dt-grid-hscrollbar-row",children:[h.jsx("div",{className:"dt-grid-scrollbar-spacer",style:{width:G.nameWidth},"aria-hidden":"true"}),h.jsx(i0.ScrollBar,{horizontal:!0,contentSize:G.numericTotal,viewportSize:G.numericVisible,scrollPosition:W0,scrollBarWidth:j0,locale:x,labels:z,onScroll:l=>{const d=typeof l=="function"?l(W0):l,H=S1(d,$0);return K0(H),H}}),h.jsx("div",{className:"dt-grid-scrollbar-spacer",style:{width:j0},"aria-hidden":"true"})]}),A2&&h.jsx("div",{role:"rowgroup",children:h.jsx(lt,{columns:w.columns,numericTemplate:c1,numericTotal:G.numericTotal,nameWidth:G.nameWidth,scrollBarWidth:j0,allEntries:m2,className:w.footerClassName})})]})},$t=({initialExpanded:e=new Set,storageKey:a}={})=>{const[n,r]=c.useTransition(),[o,i]=c.useState(()=>{if(typeof window<"u"&&a)try{const A=window.localStorage.getItem(a);if(A){const Z=JSON.parse(A);return new Set(Z)}}catch(A){console.error("[useDirectoryTreeState] Error reading from localStorage",A)}return e}),s=c.useCallback(A=>{r(()=>{i(Z=>{const V=new Set(Z);return A(V),V})})},[]),u=c.useCallback((A,Z)=>{s(V=>{for(const P of A)Z(V,P)})},[s]);c.useEffect(()=>{if(a&&typeof window<"u")try{window.localStorage.setItem(a,JSON.stringify(Array.from(o)))}catch(A){console.warn(`Error setting localStorage key "${a}":`,A)}},[o,a]);const m=c.useCallback(A=>{u([A],(Z,V)=>{Z.has(V)?Z.delete(V):Z.add(V)})},[u]),g=c.useCallback(A=>{u([A],(Z,V)=>{Z.add(V)})},[u]),E=c.useCallback(A=>{u([A],(Z,V)=>{Z.delete(V)})},[u]),M=c.useCallback(A=>{u(A,(Z,V)=>{Z.delete(V)})},[u]),b=c.useCallback(A=>{u(A,(Z,V)=>{Z.add(V)})},[u]),f=c.useCallback(()=>{s(A=>{A.clear()})},[s]),p=c.useCallback(A=>o.has(A),[o]);return{expanded:o,toggle:m,expand:g,collapse:E,collapseMultiple:M,expandMultiple:b,collapseAll:f,isExpanded:p,isPending:n}};exports.DIRECTORY_TREE_LABEL_CATALOGS=r2;exports.DIRECTORY_TREE_LABEL_KEYS=I1;exports.DirectoryTree=jt;exports.EXPAND_ICON_STYLE_PROPERTIES=Ge;exports.FILE_ICON_PAIRS=_2;exports.MARK_PAIRS=_e;exports.ROW_STYLE_PROPERTIES=Ye;exports.directoryTreeClasses=C;exports.resolveDirectoryTreeLabels=l2;exports.useDirectoryTreeState=$t;