@cyber-harbour/ui 2.2.14 → 2.2.16

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.
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import {a,w,x,u,c,l,z,Pa as Pa$1,Ya,ma,ra,pb,Cb,y,kb,G,ib,H,lb}from'./chunk-M52OIWPI.mjs';export{tb as Alert,A as AlertIcon,za as AndroidIcon,B as ApiIcon,C as ArrowCircleTopRightIcon,D as ArrowRightIcon,ia as BallsMenu,pb as Box,q as BreakpointProvider,E as BugReportIcon,Na as BurgerMenuIcon,sa as BusIcon,z as Button,F as CalendarIcon,ta as CarIcon,Kb as ChatField,ja as CheckIcon,vb as Checkbox,ka as ChevronDownIcon,G as ChevronLeftIcon,H as ChevronRightIcon,la as ChevronUpIcon,Oa as ClockIcon,I as CloseCircleIcon,J as ClosedLockIcon,Db as ContentLoader,fb as ContextMenu,gb as ContextMenuDelimiter,qa as CrossIcon,K as DataSetsIcon,L as DeepSearchIcon,M as DisabledVisibleIcon,N as DocsIcon,O as DownloadIcon,yb as Drawer,Ab as DrawerBody,zb as DrawerHeader,P as EditUserIcon,rb as EmptyData,Q as EnableVisibleIcon,R as EnterArrowLeftIcon,Ra as FaceSearchIcon,mb as FileField,xa as FileIcon,S as FiltersIcon,Ia as FlashIcon,nb as FlexContainer,ob as FlexItem,Ba as FolderAlertIcon,Ja as FolderInfoIcon,ab as Header,bb as HeaderDelimeter,cb as HeaderSection,T as HomepageIcon,Qa as ImageIcon,oa as InfoCircleFilledIcon,U as InfoCircleIcon,kb as Input,ya as IosIcon,ub as Label,qb as Line,wb as LinerProgress,Za as ListMenu,_a as ListMenuItem,$a as ListMenuSection,V as MapRadarIcon,ra as MaximizeIcon,Sa as MessageAsteriskIcon,Aa as MicrosoftIcon,Pa as MinusIcon,Fb as Modal,Hb as ModalBody,Ib as ModalFooter,Gb as ModalHeader,W as MoonIcon,X as OpenLockIcon,Y as OrganizationIcon,Eb as Overlay,eb as Pagination,Ea as PassportIcon,Z as PasswordFinderIcon,Ga as PencilIcon,_ as PhonebookIcon,va as PlaneIcon,ma as PlusIcon,Fa as PointIcon,$ as PrintIcon,aa as Profiler2Icon,ba as ProfilerIcon,Lb as ProgressLoader,Ca as RelationIcon,Da as RelationPointsIcon,Ka as RotateLeftIcon,La as RotateRightIcon,jb as RowActionsMenu,ca as SandBoxIcon,da as SearchIcon,ib as Select,wa as ShipIcon,Ua as Sidebar,Ta as SidebarContext,Wa as SidebarDelimeter,Va as SidebarItem,Xa as SidebarSection,ea as StatisticIcon,Cb as StyledTooltipContent,fa as SunIcon,xb as Switch,db as Table,sb as Tag,Jb as TailwindExample,s as ThemeProvider,Bb as Tooltip,Ya as Typography,pa as UnfoldIcon,ga as UpRightArrowCircleIcon,Ma as UploadImageIcon,Ha as UserInCircleIcon,na as UsersIcon,ha as VectorIcon,ua as WayIcon,f as convertPaletteToRem,w as createComponent,x as createStyledComponent,p as darkTheme,o as darkThemePx,t as destructSpaceProps,u as generatePropertySpaceStyle,k as getBreakpoint,h as getButtonSizeStyles,g as getButtonStyles,i as getInputStyles,v as getResponsiveProps,j as getTypographyStyles,l as hexToRgba,n as lightTheme,m as lightThemePx,e as propToRem,c as pxToRem,d as remToPx,b as resolveThemeColor,r as useBreakpoint,hb as useContextMenuControl,y as useTheme}from'./chunk-M52OIWPI.mjs';import xo,{styled,useTheme,keyframes,css as css$1}from'styled-components';export{ServerStyleSheet,StyleSheetManager}from'styled-components';import {jsx,jsxs}from'react/jsx-runtime';import {useState,useRef,useCallback,useEffect,Fragment,forwardRef,useMemo,useImperativeHandle,useLayoutEffect,memo}from'react';import No from'lodash.clonedeep';import {scaleOrdinal,schemeCategory10,forceSimulation,forceLink,forceManyBody,forceX,forceY,forceCenter,forceCollide}from'd3';import wo from'react-content-loader';import {renderAsync}from'docx-preview';import tn from'lodash.throttle';import nn from'@uiw/react-codemirror';import {vscodeDark,vscodeLight}from'@uiw/codemirror-theme-vscode';import {javascript}from'@codemirror/lang-javascript';import {json}from'@codemirror/lang-json';import {html}from'@codemirror/lang-html';import {css}from'@codemirror/lang-css';import {python}from'@codemirror/lang-python';import {java}from'@codemirror/lang-java';import {cpp}from'@codemirror/lang-cpp';import {php}from'@codemirror/lang-php';import {rust}from'@codemirror/lang-rust';import {xml}from'@codemirror/lang-xml';import {yaml}from'@codemirror/lang-yaml';import {markdown}from'@codemirror/lang-markdown';import {sql}from'@codemirror/lang-sql';import mn from'react-markdown';import bn from'remark-gfm';import {TableVirtuoso}from'react-virtuoso';import Bt from'papaparse';import oa from'copy-to-clipboard';import {Popover}from'react-tiny-popover';import {parse,isValid,getYear,format,getMonth,startOfWeek,startOfMonth,endOfMonth,getDay,previousSunday,nextSaturday,differenceInDays}from'date-fns';import {createPortal}from'react-dom';var Ks=a(({children:r,className:o})=>jsx(oo,{className:o,children:r}),"PageLayout"),oo=styled.div`
1
+ import {a,w,x,u,c,l,z,Ra,_a,na,sa,rb,Eb,y,mb,G,kb,H,nb}from'./chunk-2SG3RPTE.mjs';export{vb as Alert,A as AlertIcon,Ba as AndroidIcon,B as ApiIcon,C as ArrowCircleTopRightIcon,D as ArrowRightIcon,ja as BallsMenu,rb as Box,q as BreakpointProvider,E as BugReportIcon,Pa as BurgerMenuIcon,ta as BusIcon,z as Button,F as CalendarIcon,ua as CarIcon,Mb as ChatField,ka as CheckIcon,xb as Checkbox,la as ChevronDownIcon,G as ChevronLeftIcon,H as ChevronRightIcon,ma as ChevronUpIcon,Qa as ClockIcon,I as CloseCircleIcon,J as ClosedLockIcon,Fb as ContentLoader,hb as ContextMenu,ib as ContextMenuDelimiter,ra as CrossIcon,K as DataSetsIcon,L as DeepSearchIcon,M as DisabledVisibleIcon,N as DocsIcon,O as DownloadIcon,Ab as Drawer,Cb as DrawerBody,Bb as DrawerHeader,P as EditUserIcon,tb as EmptyData,Q as EnableVisibleIcon,R as EnterArrowLeftIcon,Ta as FaceSearchIcon,za as File2Icon,ob as FileField,ya as FileIcon,S as FiltersIcon,Ka as FlashIcon,pb as FlexContainer,qb as FlexItem,Da as FolderAlertIcon,T as FolderIcon,La as FolderInfoIcon,cb as Header,db as HeaderDelimeter,eb as HeaderSection,U as HomepageIcon,Sa as ImageIcon,pa as InfoCircleFilledIcon,V as InfoCircleIcon,mb as Input,Aa as IosIcon,wb as Label,sb as Line,yb as LinerProgress,$a as ListMenu,ab as ListMenuItem,bb as ListMenuSection,W as MapRadarIcon,sa as MaximizeIcon,Ua as MessageAsteriskIcon,Ca as MicrosoftIcon,Ra as MinusIcon,Hb as Modal,Jb as ModalBody,Kb as ModalFooter,Ib as ModalHeader,X as MoonIcon,Y as OpenLockIcon,Z as OrganizationIcon,Gb as Overlay,gb as Pagination,Ga as PassportIcon,_ as PasswordFinderIcon,Ia as PencilIcon,$ as PhonebookIcon,wa as PlaneIcon,na as PlusIcon,Ha as PointIcon,aa as PrintIcon,ba as Profiler2Icon,ca as ProfilerIcon,Nb as ProgressLoader,Ea as RelationIcon,Fa as RelationPointsIcon,Ma as RotateLeftIcon,Na as RotateRightIcon,lb as RowActionsMenu,da as SandBoxIcon,ea as SearchIcon,kb as Select,xa as ShipIcon,Wa as Sidebar,Va as SidebarContext,Ya as SidebarDelimeter,Xa as SidebarItem,Za as SidebarSection,fa as StatisticIcon,Eb as StyledTooltipContent,ga as SunIcon,zb as Switch,fb as Table,ub as Tag,Lb as TailwindExample,s as ThemeProvider,Db as Tooltip,_a as Typography,qa as UnfoldIcon,ha as UpRightArrowCircleIcon,Oa as UploadImageIcon,Ja as UserInCircleIcon,oa as UsersIcon,ia as VectorIcon,va as WayIcon,f as convertPaletteToRem,w as createComponent,x as createStyledComponent,p as darkTheme,o as darkThemePx,t as destructSpaceProps,u as generatePropertySpaceStyle,k as getBreakpoint,h as getButtonSizeStyles,g as getButtonStyles,i as getInputStyles,v as getResponsiveProps,j as getTypographyStyles,l as hexToRgba,n as lightTheme,m as lightThemePx,e as propToRem,c as pxToRem,d as remToPx,b as resolveThemeColor,r as useBreakpoint,jb as useContextMenuControl,y as useTheme}from'./chunk-2SG3RPTE.mjs';import xo,{styled,useTheme,keyframes,css as css$1}from'styled-components';export{ServerStyleSheet,StyleSheetManager}from'styled-components';import {jsx,jsxs}from'react/jsx-runtime';import {useState,useRef,useCallback,useEffect,Fragment,forwardRef,useMemo,useImperativeHandle,useLayoutEffect,memo}from'react';import No from'lodash.clonedeep';import {scaleOrdinal,schemeCategory10,forceSimulation,forceLink,forceManyBody,forceX,forceY,forceCenter,forceCollide}from'd3';import wo from'react-content-loader';import {renderAsync}from'docx-preview';import tn from'lodash.throttle';import nn from'@uiw/react-codemirror';import {vscodeDark,vscodeLight}from'@uiw/codemirror-theme-vscode';import {javascript}from'@codemirror/lang-javascript';import {json}from'@codemirror/lang-json';import {html}from'@codemirror/lang-html';import {css}from'@codemirror/lang-css';import {python}from'@codemirror/lang-python';import {java}from'@codemirror/lang-java';import {cpp}from'@codemirror/lang-cpp';import {php}from'@codemirror/lang-php';import {rust}from'@codemirror/lang-rust';import {xml}from'@codemirror/lang-xml';import {yaml}from'@codemirror/lang-yaml';import {markdown}from'@codemirror/lang-markdown';import {sql}from'@codemirror/lang-sql';import mn from'react-markdown';import bn from'remark-gfm';import {TableVirtuoso}from'react-virtuoso';import Bt from'papaparse';import oa from'copy-to-clipboard';import {Popover}from'react-tiny-popover';import {parse,isValid,getYear,format,getMonth,startOfWeek,startOfMonth,endOfMonth,getDay,previousSunday,nextSaturday,differenceInDays}from'date-fns';import {createPortal}from'react-dom';var Qs=a(({children:r,className:o})=>jsx(oo,{className:o,children:r}),"PageLayout"),oo=styled.div`
2
2
  display: grid;
3
3
  min-height: 100dvh;
4
4
  position: relative;
@@ -9,11 +9,11 @@ import {a,w,x,u,c,l,z,Pa as Pa$1,Ya,ma,ra,pb,Cb,y,kb,G,ib,H,lb}from'./chunk-M52O
9
9
  & > header {
10
10
  grid-area: header;
11
11
  }
12
- `;var rc=a(({children:r,className:o})=>jsx(io,{className:o,children:r}),"PageContent"),io=styled.main`
12
+ `;var nc=a(({children:r,className:o})=>jsx(io,{className:o,children:r}),"PageContent"),io=styled.main`
13
13
  grid-area: content;
14
14
  min-width: 0;
15
15
  background: ${({theme:r})=>r.colors.backgroundBase};
16
- `;var sc=a(({children:r,className:o,top:n=0})=>jsx(lo,{className:o,$top:n,onClick:a=>a.stopPropagation(),children:r}),"SubNav"),lo=styled.div(({theme:r,$top:o})=>`
16
+ `;var lc=a(({children:r,className:o,top:n=0})=>jsx(lo,{className:o,$top:n,onClick:a=>a.stopPropagation(),children:r}),"SubNav"),lo=styled.div(({theme:r,$top:o})=>`
17
17
  display: flex;
18
18
  flex-direction: column;
19
19
  justify-content: space-between;
@@ -33,12 +33,12 @@ import {a,w,x,u,c,l,z,Pa as Pa$1,Ya,ma,ra,pb,Cb,y,kb,G,ib,H,lb}from'./chunk-M52O
33
33
  position: sticky;
34
34
  border-right: 1px solid ${r.colors.stroke.light};
35
35
  }
36
- `);var vc=w(({maxWidth:r,...o})=>jsx(ho,{...o,$maxWidth:r})),ho=x(styled.div(({theme:r,$maxWidth:o,px:n=20})=>`
36
+ `);var wc=w(({maxWidth:r,...o})=>jsx(ho,{...o,$maxWidth:r})),ho=x(styled.div(({theme:r,$maxWidth:o,px:n=20})=>`
37
37
  ${u(r,"padding-inline",n)}
38
38
  width: 100%;
39
39
  min-width: 0;
40
40
  max-width: ${typeof o=="number"?c(o,r.baseSize):o||"100%"};
41
- `),{ignoreStyles:["padding-inline"]});var vo=20,yo="splitter_columns_widths",ur=a((r,o,n)=>{let a=localStorage.getItem(r);if(a)try{let d=JSON.parse(a);if(Array.isArray(d)&&d.length===o)return d}catch{}else if(n.length===o)return n;return Array(o).fill(100/o)},"getSavedWidths"),Dc=a(({columns:r,initialWidths:o,layoutClassname:n="",splitterClassname:a="",minWidth:d=vo,storageKey:s=yo})=>{let[p,w]=useState(()=>ur(s,r.length,o)),x=useRef(null),R=useRef(null),E=useRef(d),g=useRef(p),I=useCallback(S=>{if(R.current===null||!x.current)return;let C=x.current.getBoundingClientRect(),D=C.width,$=S-C.left,U=[...g.current],Q=R.current,oe=Q+1,ie=U.slice(0,Q).reduce((we,ve)=>we+ve,0),ye=$/D*100-ie,le=U[Q]+U[oe]-ye;ye>=E.current&&le>=E.current&&(U[Q]=ye,U[oe]=le,w(U),g.current=U);},[]),B=useCallback(S=>I(S.clientX),[I]),t=useCallback(S=>{S.preventDefault(),I(S.touches[0].clientX);},[I]),z=useCallback(()=>{R.current=null,localStorage.setItem(s,JSON.stringify(g.current)),document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",z),document.removeEventListener("touchmove",t),document.removeEventListener("touchend",z);},[B,t,s]),k=useCallback(S=>C=>{C.preventDefault(),R.current=S,document.addEventListener("mousemove",B,{passive:false}),document.addEventListener("mouseup",z);},[B,z]),P=useCallback(S=>C=>{C.preventDefault(),R.current=S,document.addEventListener("touchmove",t,{passive:false}),document.addEventListener("touchend",z);},[t,z]);return useEffect(()=>{let S=ur(s,r.length,o);g.current=S,w(S);},[r.length,o,s]),jsx("div",{ref:x,className:`flex select-none ${n}`,children:r.map(({content:S,className:C},D)=>jsxs(Fragment,{children:[jsx("div",{className:C,style:{flex:`${p[D]} 1 0%`},children:S}),D<r.length-1&&jsx("div",{onMouseDown:k(D),onTouchStart:P(D),className:`hidden lg:flex! lg:sticky lg:top-0 border-s border-gray-200 dark:border-neutral-700 ${a}`,children:jsx("span",{className:"absolute top-1/2 start-1/2 -translate-x-1/2 -translate-y-1/2 block w-5 h-8 flex justify-center items-center bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700 text-gray-400 dark:text-neutral-500 rounded-md cursor-col-resize hover:bg-gray-100 dark:hover:bg-neutral-700",children:jsxs("svg",{className:"shrink-0 size-5",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("circle",{cx:"9",cy:"12",r:"1"}),jsx("circle",{cx:"9",cy:"5",r:"1"}),jsx("circle",{cx:"9",cy:"19",r:"1"}),jsx("circle",{cx:"15",cy:"12",r:"1"}),jsx("circle",{cx:"15",cy:"5",r:"1"}),jsx("circle",{cx:"15",cy:"19",r:"1"})]})})})]},`${D}`))})},"SplitterLayout");var So=xo.div`
41
+ `),{ignoreStyles:["padding-inline"]});var vo=20,yo="splitter_columns_widths",ur=a((r,o,n)=>{let a=localStorage.getItem(r);if(a)try{let d=JSON.parse(a);if(Array.isArray(d)&&d.length===o)return d}catch{}else if(n.length===o)return n;return Array(o).fill(100/o)},"getSavedWidths"),Mc=a(({columns:r,initialWidths:o,layoutClassname:n="",splitterClassname:a="",minWidth:d=vo,storageKey:s=yo})=>{let[p,w]=useState(()=>ur(s,r.length,o)),x=useRef(null),R=useRef(null),E=useRef(d),g=useRef(p),I=useCallback(S=>{if(R.current===null||!x.current)return;let C=x.current.getBoundingClientRect(),D=C.width,$=S-C.left,U=[...g.current],Q=R.current,oe=Q+1,ie=U.slice(0,Q).reduce((we,ve)=>we+ve,0),ye=$/D*100-ie,le=U[Q]+U[oe]-ye;ye>=E.current&&le>=E.current&&(U[Q]=ye,U[oe]=le,w(U),g.current=U);},[]),B=useCallback(S=>I(S.clientX),[I]),t=useCallback(S=>{S.preventDefault(),I(S.touches[0].clientX);},[I]),z=useCallback(()=>{R.current=null,localStorage.setItem(s,JSON.stringify(g.current)),document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",z),document.removeEventListener("touchmove",t),document.removeEventListener("touchend",z);},[B,t,s]),k=useCallback(S=>C=>{C.preventDefault(),R.current=S,document.addEventListener("mousemove",B,{passive:false}),document.addEventListener("mouseup",z);},[B,z]),P=useCallback(S=>C=>{C.preventDefault(),R.current=S,document.addEventListener("touchmove",t,{passive:false}),document.addEventListener("touchend",z);},[t,z]);return useEffect(()=>{let S=ur(s,r.length,o);g.current=S,w(S);},[r.length,o,s]),jsx("div",{ref:x,className:`flex select-none ${n}`,children:r.map(({content:S,className:C},D)=>jsxs(Fragment,{children:[jsx("div",{className:C,style:{flex:`${p[D]} 1 0%`},children:S}),D<r.length-1&&jsx("div",{onMouseDown:k(D),onTouchStart:P(D),className:`hidden lg:flex! lg:sticky lg:top-0 border-s border-gray-200 dark:border-neutral-700 ${a}`,children:jsx("span",{className:"absolute top-1/2 start-1/2 -translate-x-1/2 -translate-y-1/2 block w-5 h-8 flex justify-center items-center bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700 text-gray-400 dark:text-neutral-500 rounded-md cursor-col-resize hover:bg-gray-100 dark:hover:bg-neutral-700",children:jsxs("svg",{className:"shrink-0 size-5",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("circle",{cx:"9",cy:"12",r:"1"}),jsx("circle",{cx:"9",cy:"5",r:"1"}),jsx("circle",{cx:"9",cy:"19",r:"1"}),jsx("circle",{cx:"15",cy:"12",r:"1"}),jsx("circle",{cx:"15",cy:"5",r:"1"}),jsx("circle",{cx:"15",cy:"19",r:"1"})]})})})]},`${D}`))})},"SplitterLayout");var So=xo.div`
42
42
  width: 100%;
43
43
  height: 100%;
44
44
  display: flex;
@@ -51,7 +51,7 @@ import {a,w,x,u,c,l,z,Pa as Pa$1,Ya,ma,ra,pb,Cb,y,kb,G,ib,H,lb}from'./chunk-M52O
51
51
  width: 100%;
52
52
  min-width: 0;
53
53
  position: relative;
54
- `,Xo=styled.canvas``;Wo.displayName="Graph2D";var tl=w(({isActive:r,position:o,top:n=0,left:a=0,right:d,bottom:s,...p})=>jsx(Uo,{$isActive:r,$position:o,$top:n,$left:a,$right:d,$bottom:s,...p})),Uo=xo.div(({$isActive:r,$top:o,$left:n,$right:a,$bottom:d,$position:s,theme:p})=>`
54
+ `,Xo=styled.canvas``;Wo.displayName="Graph2D";var ol=w(({isActive:r,position:o,top:n=0,left:a=0,right:d,bottom:s,...p})=>jsx(Uo,{$isActive:r,$position:o,$top:n,$left:a,$right:d,$bottom:s,...p})),Uo=xo.div(({$isActive:r,$top:o,$left:n,$right:a,$bottom:d,$position:s,theme:p})=>`
55
55
  ${r?`
56
56
  position: ${s};
57
57
  z-index: 1000;
@@ -63,7 +63,7 @@ ${r?`
63
63
  `:""}
64
64
 
65
65
  min-width: 0;
66
- `);var Go=[.1,.25,.5,.75,1,1.5,2,3,4,5],Ko=5,Jo=.1,Qo=140;function bt(r,o,n,a){return {x:r<n?(n-r)/2:0,y:o<a?(a-o)/2:0}}a(bt,"computePadding");var br=a(({url:r,alt:o="image",naturalWidth:n,naturalHeight:a$1,zoomSteps:d=Go,maxZoom:s=Ko,minZoom:p=Jo,showMinimap:w=true,minimapWidth:x=Qo,className:R,onZoomChange:E})=>{let[g,I]=useState("adaptive"),[B,t]=useState(1),[z$1,k]=useState(false),P=useRef(false),[S,C]=useState(false),[D,$]=useState(false),[U,Q]=useState({left:0,top:0}),oe=useRef(0),[ie,ye]=useState({width:0,height:0}),le=useRef({width:0,height:0}),we=useRef(null),ve=useRef(null),Y=useRef({x:0,y:0,scrollLeft:0,scrollTop:0}),H=useRef(g),V=useRef(B),W=useRef(E);H.current=g,V.current=B,W.current=E;let Z=n||le.current.width,ne=a$1||le.current.height,ae=useMemo(()=>[...d].sort((v,T)=>v-T),[d]),X=useCallback(()=>ie.width===0||Z===0?1:Math.min(ie.width/Z,ie.height/ne,1),[ie,Z,ne]),ee=useCallback((v,T)=>{if(T==="in"){let _=ae.find(F=>F>v+.001);return _!==void 0?Math.min(_,s):v}let j=ae.findLast(_=>_<v-.001);return j!==void 0?Math.max(j,p):v},[ae,s,p]),de=useCallback(()=>H.current==="adaptive"?X():V.current,[X]),ce=useCallback(v=>{I("manual"),t(v),W.current?.(v,"manual");},[]),ue=useCallback(()=>{I("adaptive"),W.current?.(X(),"adaptive");},[X]),Se=useCallback(v=>{requestAnimationFrame(()=>{let T=ve.current;if(!T)return;let j=T.getBoundingClientRect(),_=Z*v,F=ne*v,b=bt(_,F,j.width,j.height);T.scrollLeft=_/2+b.x-j.width/2,T.scrollTop=F/2+b.y-j.height/2;});},[Z,ne]);useEffect(()=>{I("adaptive"),t(1),C(false),$(false),le.current={width:0,height:0};},[r]),useEffect(()=>{let v=ve.current;if(!v)return;let T=new ResizeObserver(j=>{let _=j[0];if(!_)return;let{width:F,height:b}=_.contentRect;ye(O=>O.width===F&&O.height===b?O:{width:F,height:b});});return T.observe(v),()=>T.disconnect()},[]),useEffect(()=>{let v=ve.current;if(!v)return;let T=a(()=>{cancelAnimationFrame(oe.current),oe.current=requestAnimationFrame(()=>{let j=v.scrollLeft,_=v.scrollTop;Q(F=>F.left===j&&F.top===_?F:{left:j,top:_});});},"handleScroll");return v.addEventListener("scroll",T,{passive:true}),()=>{v.removeEventListener("scroll",T),cancelAnimationFrame(oe.current);}},[]),useEffect(()=>{let v=ve.current;if(!v||!S)return;let T=a(j=>{if(!(j.ctrlKey||j.metaKey))return;j.preventDefault();let _=de(),F=j.deltaY>0?"out":"in",b=ee(_,F),O=X();if(F==="out"&&b<=O){ue();return}let L=v.getBoundingClientRect(),G,K,te=le.current.width||1,me=le.current.height||1;if(H.current==="adaptive"){let pe=we.current;if(!pe)return;let he=pe.getBoundingClientRect();G=(j.clientX-he.left)/(he.width/te),K=(j.clientY-he.top)/(he.height/me);}else {let pe=te*_,he=me*_,He=bt(pe,he,L.width,L.height);G=(v.scrollLeft+j.clientX-L.left-He.x)/_,K=(v.scrollTop+j.clientY-L.top-He.y)/_;}ce(b),requestAnimationFrame(()=>{let pe=v.getBoundingClientRect(),he=bt(te*b,me*b,pe.width,pe.height);v.scrollLeft=G*b+he.x-(j.clientX-pe.left),v.scrollTop=K*b+he.y-(j.clientY-pe.top);});},"handleWheel");return v.addEventListener("wheel",T,{passive:false}),()=>v.removeEventListener("wheel",T)},[S,de,ee,X,ce,ue]),useEffect(()=>{if(g!=="manual")return;let v=ve.current;if(!v)return;let T=a(F=>{F.button===0&&(F.preventDefault(),P.current=true,k(true),Y.current={x:F.clientX,y:F.clientY,scrollLeft:v.scrollLeft,scrollTop:v.scrollTop});},"handleMouseDown"),j=a(F=>{if(!P.current)return;let{x:b,y:O,scrollLeft:L,scrollTop:G}=Y.current;v.scrollLeft=L-(F.clientX-b),v.scrollTop=G-(F.clientY-O);},"handleMouseMove"),_=a(()=>{P.current=false,k(false);},"handleMouseUp");return v.addEventListener("mousedown",T),window.addEventListener("mousemove",j),window.addEventListener("mouseup",_),()=>{v.removeEventListener("mousedown",T),window.removeEventListener("mousemove",j),window.removeEventListener("mouseup",_);}},[g]);let _e=useCallback(()=>{g==="manual"&&ue();},[g,ue]),qe=useCallback(()=>{let v=de(),T=ee(v,"in");T!==v&&(ce(T),Se(T));},[de,ee,ce,Se]),Ee=useCallback(()=>{let v=de(),T=ee(v,"out");if(T<=X()){ue();return}ce(T),Se(T);},[de,ee,X,ue,ce,Se]),Fe=useCallback(()=>{ce(1),Se(1);},[ce,Se]),Ce=useCallback(()=>{let v=we.current;v&&(le.current={width:v.naturalWidth,height:v.naturalHeight},C(true),$(false));},[]),Me=g==="adaptive"?X():B,Ne=Z*Me,Ue=ne*Me,Be=ie.width,et=ie.height,Oe=g==="manual"?bt(Ne,Ue,Be,et):{x:0,y:0},Lt=w&&g==="manual"&&(Ne>Be||Ue>et),e=Z>0?x/Z:0,l=ne*e,c=Be>0?Be/B*e:0,u=et>0?et/B*e:0,h=Math.max(0,U.left-Oe.x)/B*e,y=Math.max(0,U.top-Oe.y)/B*e,f=g==="adaptive"?"Fit":`${Math.round(B*100)}%`,m=ee(Me,"in")!==Me,M=g==="manual"||Me>p,N=g==="adaptive"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{width:Ne,height:Ue,maxWidth:"none",maxHeight:"none",marginLeft:Oe.x,marginTop:Oe.y,flexShrink:0},A={cursor:g==="manual"?z$1?"grabbing":"grab":"default"};return jsxs("div",{className:`h-full w-full flex flex-col min-h-0 min-w-0 overflow-hidden ${R??""}`,children:[jsxs("div",{className:"flex w-full items-center px-8.5 py-3 gap-1 shrink-0",children:[jsx(z,{variant:"outlined","aria-label":"zoom-out",color:"default",size:"small",icon:jsx(Pa$1,{style:{width:20,height:20}}),onClick:Ee,disabled:!M,p:7,className:"bg-white! dark:bg-neutral-800! hover:bg-blue-50! dark:hover:bg-neutral-700! h-[38px]!"}),jsx("button",{type:"button",onClick:g==="manual"?ue:void 0,className:"flex items-center justify-center bg-white dark:bg-neutral-800 h-[38px] min-w-16 px-3 select-none border border-gray-300 dark:border-neutral-600 rounded-md","aria-label":f,children:jsx(Ya,{style:{fontSize:12,fontWeight:500},children:f})}),jsx(z,{variant:"outlined","aria-label":"zoom-in",size:"small",color:"default",icon:jsx(ma,{style:{width:14,height:14}}),onClick:qe,disabled:!m,className:"bg-white! dark:bg-neutral-800! hover:bg-blue-50! dark:hover:bg-neutral-700! h-[38px]!",p:10}),jsx(z,{variant:"outlined","aria-label":"fit-to-container",size:"small",color:g==="adaptive"?"primary":"default",icon:jsx(ra,{style:{width:14,height:14}}),onClick:ue,className:`${g==="adaptive"?"bg-blue-50!":"bg-white! dark:bg-neutral-800! hover:bg-blue-50! dark:hover:bg-neutral-700!"} ml-auto h-[38px]!`,p:10}),jsx(z,{variant:"outlined","aria-label":"original-size",size:"small",color:g==="manual"&&B===1?"primary":"default",onClick:Fe,className:`${g==="manual"&&B===1?"bg-blue-50!":"bg-white! dark:bg-neutral-800! hover:bg-blue-50! dark:hover:bg-neutral-700!"} h-[38px]!`,py:10,px:11,children:jsx(Ya,{style:{fontSize:12,fontWeight:500,lineHeight:1},children:"1:1"})})]}),jsxs("div",{className:"flex-1 min-h-0 min-w-0 relative",children:[jsx("div",{ref:ve,className:`h-full w-full ${g==="adaptive"?"flex items-center justify-center overflow-hidden":"overflow-auto"}`,style:A,onDoubleClick:_e,children:D?jsx("div",{className:"flex items-center justify-center h-full w-full",children:jsx(Ya,{color:"text.lighter",children:"Failed to load image"})}):jsx("img",{ref:we,src:r,alt:o,draggable:false,className:"block select-none",style:N,onLoad:Ce,onError:()=>$(true)})}),Lt&&jsxs("div",{className:"absolute bottom-3 right-3 rounded-lg overflow-hidden shadow-lg pointer-events-none",style:{width:x,height:l,backdropFilter:"blur(8px)",background:"rgba(255,255,255,0.75)"},children:[jsx("img",{src:r,alt:"",draggable:false,className:"block w-full h-full object-contain"}),jsx("div",{className:"absolute border-2 border-blue-500 rounded-sm",style:{width:Math.min(c,x),height:Math.min(u,l),left:Math.max(0,Math.min(h,x-c)),top:Math.max(0,Math.min(y,l-u)),background:"rgba(59,130,246,0.1)"}})]})]})]})},"ImageDriver");var yr=a(({url:r})=>jsx("div",{className:"flex flex-col justify-center items-center w-full h-full py-5.5 px-8.5",children:jsx("audio",{controls:true,src:r,className:"w-full"})}),"AudioDriver");var zt=a(({url:r})=>{let[o,n]=useState(null),[a$1,d]=useState(false),[s,p]=useState(true),[w,x]=useState(null);return useEffect(()=>{d(true);},[]),useEffect(()=>{if(!a$1)return;a(async()=>{try{let E=await import('./PdfDriver-DTZKADSW.mjs');n(()=>E.PdfDriver),p(!1);}catch(E){console.error("Failed to load PDF driver:",E),x("Failed to load PDF viewer"),p(false);}},"loadPdfDriver")();},[a$1]),a$1?s?jsx("div",{className:"flex items-center justify-center h-full w-full",children:jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"Loading PDF viewer..."})}):w||!o?jsx("div",{className:"flex items-center justify-center h-full w-full",children:jsx("div",{className:"text-red-500 text-center",children:jsx("p",{children:w||"PDF viewer unavailable"})})}):jsx(o,{url:r}):jsx("div",{className:"flex items-center justify-center h-full w-full",children:jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"Loading PDF viewer..."})})},"PdfDriverWrapper");var kr=50,rn=1e4,Sr=a(({url:r,blob:o})=>{let n=useRef(null),a$1=useRef(null),[d,s]=useState(null),[p,w]=useState(true),[x,R]=useState(1),E=useRef(false),[g,I]=useState({width:0,height:0}),B=useRef(0),t=a(()=>{E.current=true,R(k=>Math.min(k+.25,4));},"handleZoomIn"),z$1=a(()=>{E.current=true,R(k=>Math.max(k-.25,.25));},"handleZoomOut");return useEffect(()=>{a(async()=>{if(a$1.current)try{w(!0),s(null);let P=o;if(!P&&r&&(P=await(await fetch(r)).blob()),!P){s("\u041D\u0435 \u043D\u0430\u0434\u0430\u043D\u043E \u0434\u043B\u044F DOCX \u0444\u0430\u0439\u043B\u0443");return}if(P.size/(1024*1024)>kr){s(`\u0424\u0430\u0439\u043B \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0438\u0439 (> ${kr} \u041C\u0411)`);return}a$1.current.innerHTML="";let C=renderAsync(P,a$1.current,void 0,{debug:!0,experimental:!0,hideWrapperOnPrint:!0,breakPages:!0,ignoreLastRenderedPageBreak:!1}),D=new Promise((U,Q)=>setTimeout(()=>Q(new Error("\u0420\u0435\u043D\u0434\u0435\u0440\u0438\u043D\u0433 DOCX \u0437\u0430\u0439\u043D\u044F\u0432 \u043D\u0430\u0434\u0442\u043E \u0431\u0430\u0433\u0430\u0442\u043E \u0447\u0430\u0441\u0443")),rn));await Promise.race([C,D]),await new Promise(U=>requestAnimationFrame(U));let $=a$1.current.querySelector(".docx-wrapper");if($&&(B.current=$.offsetWidth,I({width:$.offsetWidth,height:$.offsetHeight})),n.current&&B.current>0){let U=n.current.clientWidth,Q=Math.min(U/B.current,1);R(Q);}w(!1);}catch(P){s(P?.message||"\u041D\u0435 \u0432\u0434\u0430\u043B\u043E\u0441\u044F \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0438 DOCX \u0444\u0430\u0439\u043B"),w(false);}},"renderDocument")();},[r,o]),useEffect(()=>{if(!n.current)return;let k=tn(S=>{if(!(E.current||B.current===0))for(let C of S){let D=C.contentRect.width,$=Math.min(D/B.current,1);R($);}},150),P=new ResizeObserver(k);return P.observe(n.current),()=>{P.disconnect(),k.cancel();}},[]),jsxs("div",{className:"h-full w-full flex flex-col px-0.5",children:[jsxs("div",{className:"flex justify-center items-stretch px-8 py-3 gap-1 border-b border-gray-200 dark:border-neutral-700",children:[jsx(z,{variant:"outlined","aria-label":"zoom-out",color:"default",size:"small",icon:jsx(Pa$1,{style:{width:20,height:20}}),onClick:z$1,disabled:x<=.25,className:"bg-white! dark:bg-neutral-800! hover:bg-blue-50! dark:hover:bg-neutral-700!",p:7}),jsxs(pb,{py:8,px:8,className:"flex items-center justify-between gap-1.5 min-w-21 rounded-[5px]!",children:[jsx(Ya,{color:"text.lighter",style:{fontSize:10},children:"Scale:"}),jsxs(Ya,{children:[Math.round(x*100),"%"]})]}),jsx(z,{variant:"outlined","aria-label":"zoom-in",size:"small",color:"default",icon:jsx(ma,{style:{width:14,height:14}}),onClick:t,disabled:x>=4,className:"bg-white! dark:bg-neutral-800! hover:bg-blue-50! dark:hover:bg-neutral-700!",p:10})]}),!!d&&!p&&jsx("div",{className:"text-red-500 p-8",children:d}),p&&jsx("div",{className:"flex items-center justify-center p-8",children:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F..."}),jsx("div",{ref:n,className:"w-full h-full overflow-auto bg-gray-400 dark:bg-neutral-700 [&::-webkit-scrollbar-thumb]:bg-gray-100 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-600 [&::-webkit-scrollbar-track]:bg-gray-400 dark:[&::-webkit-scrollbar-track]:bg-neutral-700",style:{scrollbarGutter:"stable both-edges"},children:jsx("div",{style:{width:g.width>0?g.width*x:void 0,height:g.height>0?g.height*x:void 0,overflow:"hidden",margin:"0 auto"},children:jsx("div",{ref:a$1,className:`[&>div.docx-wrapper_table_*]:wrap-break-word!
66
+ `);var Go=[.1,.25,.5,.75,1,1.5,2,3,4,5],Ko=5,Jo=.1,Qo=140;function bt(r,o,n,a){return {x:r<n?(n-r)/2:0,y:o<a?(a-o)/2:0}}a(bt,"computePadding");var br=a(({url:r,alt:o="image",naturalWidth:n,naturalHeight:a$1,zoomSteps:d=Go,maxZoom:s=Ko,minZoom:p=Jo,showMinimap:w=true,minimapWidth:x=Qo,className:R,onZoomChange:E})=>{let[g,I]=useState("adaptive"),[B,t]=useState(1),[z$1,k]=useState(false),P=useRef(false),[S,C]=useState(false),[D,$]=useState(false),[U,Q]=useState({left:0,top:0}),oe=useRef(0),[ie,ye]=useState({width:0,height:0}),le=useRef({width:0,height:0}),we=useRef(null),ve=useRef(null),Y=useRef({x:0,y:0,scrollLeft:0,scrollTop:0}),H=useRef(g),V=useRef(B),W=useRef(E);H.current=g,V.current=B,W.current=E;let Z=n||le.current.width,ne=a$1||le.current.height,ae=useMemo(()=>[...d].sort((v,T)=>v-T),[d]),X=useCallback(()=>ie.width===0||Z===0?1:Math.min(ie.width/Z,ie.height/ne,1),[ie,Z,ne]),ee=useCallback((v,T)=>{if(T==="in"){let _=ae.find(F=>F>v+.001);return _!==void 0?Math.min(_,s):v}let j=ae.findLast(_=>_<v-.001);return j!==void 0?Math.max(j,p):v},[ae,s,p]),de=useCallback(()=>H.current==="adaptive"?X():V.current,[X]),ce=useCallback(v=>{I("manual"),t(v),W.current?.(v,"manual");},[]),ue=useCallback(()=>{I("adaptive"),W.current?.(X(),"adaptive");},[X]),Se=useCallback(v=>{requestAnimationFrame(()=>{let T=ve.current;if(!T)return;let j=T.getBoundingClientRect(),_=Z*v,F=ne*v,b=bt(_,F,j.width,j.height);T.scrollLeft=_/2+b.x-j.width/2,T.scrollTop=F/2+b.y-j.height/2;});},[Z,ne]);useEffect(()=>{I("adaptive"),t(1),C(false),$(false),le.current={width:0,height:0};},[r]),useEffect(()=>{let v=ve.current;if(!v)return;let T=new ResizeObserver(j=>{let _=j[0];if(!_)return;let{width:F,height:b}=_.contentRect;ye(O=>O.width===F&&O.height===b?O:{width:F,height:b});});return T.observe(v),()=>T.disconnect()},[]),useEffect(()=>{let v=ve.current;if(!v)return;let T=a(()=>{cancelAnimationFrame(oe.current),oe.current=requestAnimationFrame(()=>{let j=v.scrollLeft,_=v.scrollTop;Q(F=>F.left===j&&F.top===_?F:{left:j,top:_});});},"handleScroll");return v.addEventListener("scroll",T,{passive:true}),()=>{v.removeEventListener("scroll",T),cancelAnimationFrame(oe.current);}},[]),useEffect(()=>{let v=ve.current;if(!v||!S)return;let T=a(j=>{if(!(j.ctrlKey||j.metaKey))return;j.preventDefault();let _=de(),F=j.deltaY>0?"out":"in",b=ee(_,F),O=X();if(F==="out"&&b<=O){ue();return}let L=v.getBoundingClientRect(),G,K,te=le.current.width||1,me=le.current.height||1;if(H.current==="adaptive"){let pe=we.current;if(!pe)return;let he=pe.getBoundingClientRect();G=(j.clientX-he.left)/(he.width/te),K=(j.clientY-he.top)/(he.height/me);}else {let pe=te*_,he=me*_,He=bt(pe,he,L.width,L.height);G=(v.scrollLeft+j.clientX-L.left-He.x)/_,K=(v.scrollTop+j.clientY-L.top-He.y)/_;}ce(b),requestAnimationFrame(()=>{let pe=v.getBoundingClientRect(),he=bt(te*b,me*b,pe.width,pe.height);v.scrollLeft=G*b+he.x-(j.clientX-pe.left),v.scrollTop=K*b+he.y-(j.clientY-pe.top);});},"handleWheel");return v.addEventListener("wheel",T,{passive:false}),()=>v.removeEventListener("wheel",T)},[S,de,ee,X,ce,ue]),useEffect(()=>{if(g!=="manual")return;let v=ve.current;if(!v)return;let T=a(F=>{F.button===0&&(F.preventDefault(),P.current=true,k(true),Y.current={x:F.clientX,y:F.clientY,scrollLeft:v.scrollLeft,scrollTop:v.scrollTop});},"handleMouseDown"),j=a(F=>{if(!P.current)return;let{x:b,y:O,scrollLeft:L,scrollTop:G}=Y.current;v.scrollLeft=L-(F.clientX-b),v.scrollTop=G-(F.clientY-O);},"handleMouseMove"),_=a(()=>{P.current=false,k(false);},"handleMouseUp");return v.addEventListener("mousedown",T),window.addEventListener("mousemove",j),window.addEventListener("mouseup",_),()=>{v.removeEventListener("mousedown",T),window.removeEventListener("mousemove",j),window.removeEventListener("mouseup",_);}},[g]);let _e=useCallback(()=>{g==="manual"&&ue();},[g,ue]),qe=useCallback(()=>{let v=de(),T=ee(v,"in");T!==v&&(ce(T),Se(T));},[de,ee,ce,Se]),Ee=useCallback(()=>{let v=de(),T=ee(v,"out");if(T<=X()){ue();return}ce(T),Se(T);},[de,ee,X,ue,ce,Se]),Fe=useCallback(()=>{ce(1),Se(1);},[ce,Se]),Ce=useCallback(()=>{let v=we.current;v&&(le.current={width:v.naturalWidth,height:v.naturalHeight},C(true),$(false));},[]),Me=g==="adaptive"?X():B,Ne=Z*Me,Ue=ne*Me,Be=ie.width,et=ie.height,Oe=g==="manual"?bt(Ne,Ue,Be,et):{x:0,y:0},Lt=w&&g==="manual"&&(Ne>Be||Ue>et),e=Z>0?x/Z:0,l=ne*e,c=Be>0?Be/B*e:0,u=et>0?et/B*e:0,h=Math.max(0,U.left-Oe.x)/B*e,y=Math.max(0,U.top-Oe.y)/B*e,f=g==="adaptive"?"Fit":`${Math.round(B*100)}%`,m=ee(Me,"in")!==Me,M=g==="manual"||Me>p,N=g==="adaptive"?{maxWidth:"100%",maxHeight:"100%",objectFit:"contain"}:{width:Ne,height:Ue,maxWidth:"none",maxHeight:"none",marginLeft:Oe.x,marginTop:Oe.y,flexShrink:0},A={cursor:g==="manual"?z$1?"grabbing":"grab":"default"};return jsxs("div",{className:`h-full w-full flex flex-col min-h-0 min-w-0 overflow-hidden ${R??""}`,children:[jsxs("div",{className:"flex w-full items-center px-8.5 py-3 gap-1 shrink-0",children:[jsx(z,{variant:"outlined","aria-label":"zoom-out",color:"default",size:"small",icon:jsx(Ra,{style:{width:20,height:20}}),onClick:Ee,disabled:!M,p:7,className:"bg-white! dark:bg-neutral-800! hover:bg-blue-50! dark:hover:bg-neutral-700! h-[38px]!"}),jsx("button",{type:"button",onClick:g==="manual"?ue:void 0,className:"flex items-center justify-center bg-white dark:bg-neutral-800 h-[38px] min-w-16 px-3 select-none border border-gray-300 dark:border-neutral-600 rounded-md","aria-label":f,children:jsx(_a,{style:{fontSize:12,fontWeight:500},children:f})}),jsx(z,{variant:"outlined","aria-label":"zoom-in",size:"small",color:"default",icon:jsx(na,{style:{width:14,height:14}}),onClick:qe,disabled:!m,className:"bg-white! dark:bg-neutral-800! hover:bg-blue-50! dark:hover:bg-neutral-700! h-[38px]!",p:10}),jsx(z,{variant:"outlined","aria-label":"fit-to-container",size:"small",color:g==="adaptive"?"primary":"default",icon:jsx(sa,{style:{width:14,height:14}}),onClick:ue,className:`${g==="adaptive"?"bg-blue-50!":"bg-white! dark:bg-neutral-800! hover:bg-blue-50! dark:hover:bg-neutral-700!"} ml-auto h-[38px]!`,p:10}),jsx(z,{variant:"outlined","aria-label":"original-size",size:"small",color:g==="manual"&&B===1?"primary":"default",onClick:Fe,className:`${g==="manual"&&B===1?"bg-blue-50!":"bg-white! dark:bg-neutral-800! hover:bg-blue-50! dark:hover:bg-neutral-700!"} h-[38px]!`,py:10,px:11,children:jsx(_a,{style:{fontSize:12,fontWeight:500,lineHeight:1},children:"1:1"})})]}),jsxs("div",{className:"flex-1 min-h-0 min-w-0 relative",children:[jsx("div",{ref:ve,className:`h-full w-full ${g==="adaptive"?"flex items-center justify-center overflow-hidden":"overflow-auto"}`,style:A,onDoubleClick:_e,children:D?jsx("div",{className:"flex items-center justify-center h-full w-full",children:jsx(_a,{color:"text.lighter",children:"Failed to load image"})}):jsx("img",{ref:we,src:r,alt:o,draggable:false,className:"block select-none",style:N,onLoad:Ce,onError:()=>$(true)})}),Lt&&jsxs("div",{className:"absolute bottom-3 right-3 rounded-lg overflow-hidden shadow-lg pointer-events-none",style:{width:x,height:l,backdropFilter:"blur(8px)",background:"rgba(255,255,255,0.75)"},children:[jsx("img",{src:r,alt:"",draggable:false,className:"block w-full h-full object-contain"}),jsx("div",{className:"absolute border-2 border-blue-500 rounded-sm",style:{width:Math.min(c,x),height:Math.min(u,l),left:Math.max(0,Math.min(h,x-c)),top:Math.max(0,Math.min(y,l-u)),background:"rgba(59,130,246,0.1)"}})]})]})]})},"ImageDriver");var yr=a(({url:r})=>jsx("div",{className:"flex flex-col justify-center items-center w-full h-full py-5.5 px-8.5",children:jsx("audio",{controls:true,src:r,className:"w-full"})}),"AudioDriver");var zt=a(({url:r})=>{let[o,n]=useState(null),[a$1,d]=useState(false),[s,p]=useState(true),[w,x]=useState(null);return useEffect(()=>{d(true);},[]),useEffect(()=>{if(!a$1)return;a(async()=>{try{let E=await import('./PdfDriver-NHJHMC53.mjs');n(()=>E.PdfDriver),p(!1);}catch(E){console.error("Failed to load PDF driver:",E),x("Failed to load PDF viewer"),p(false);}},"loadPdfDriver")();},[a$1]),a$1?s?jsx("div",{className:"flex items-center justify-center h-full w-full",children:jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"Loading PDF viewer..."})}):w||!o?jsx("div",{className:"flex items-center justify-center h-full w-full",children:jsx("div",{className:"text-red-500 text-center",children:jsx("p",{children:w||"PDF viewer unavailable"})})}):jsx(o,{url:r}):jsx("div",{className:"flex items-center justify-center h-full w-full",children:jsx("div",{className:"text-gray-500 dark:text-gray-400",children:"Loading PDF viewer..."})})},"PdfDriverWrapper");var kr=50,rn=1e4,Sr=a(({url:r,blob:o})=>{let n=useRef(null),a$1=useRef(null),[d,s]=useState(null),[p,w]=useState(true),[x,R]=useState(1),E=useRef(false),[g,I]=useState({width:0,height:0}),B=useRef(0),t=a(()=>{E.current=true,R(k=>Math.min(k+.25,4));},"handleZoomIn"),z$1=a(()=>{E.current=true,R(k=>Math.max(k-.25,.25));},"handleZoomOut");return useEffect(()=>{a(async()=>{if(a$1.current)try{w(!0),s(null);let P=o;if(!P&&r&&(P=await(await fetch(r)).blob()),!P){s("\u041D\u0435 \u043D\u0430\u0434\u0430\u043D\u043E \u0434\u043B\u044F DOCX \u0444\u0430\u0439\u043B\u0443");return}if(P.size/(1024*1024)>kr){s(`\u0424\u0430\u0439\u043B \u0437\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0438\u0439 (> ${kr} \u041C\u0411)`);return}a$1.current.innerHTML="";let C=renderAsync(P,a$1.current,void 0,{debug:!0,experimental:!0,hideWrapperOnPrint:!0,breakPages:!0,ignoreLastRenderedPageBreak:!1}),D=new Promise((U,Q)=>setTimeout(()=>Q(new Error("\u0420\u0435\u043D\u0434\u0435\u0440\u0438\u043D\u0433 DOCX \u0437\u0430\u0439\u043D\u044F\u0432 \u043D\u0430\u0434\u0442\u043E \u0431\u0430\u0433\u0430\u0442\u043E \u0447\u0430\u0441\u0443")),rn));await Promise.race([C,D]),await new Promise(U=>requestAnimationFrame(U));let $=a$1.current.querySelector(".docx-wrapper");if($&&(B.current=$.offsetWidth,I({width:$.offsetWidth,height:$.offsetHeight})),n.current&&B.current>0){let U=n.current.clientWidth,Q=Math.min(U/B.current,1);R(Q);}w(!1);}catch(P){s(P?.message||"\u041D\u0435 \u0432\u0434\u0430\u043B\u043E\u0441\u044F \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0438 DOCX \u0444\u0430\u0439\u043B"),w(false);}},"renderDocument")();},[r,o]),useEffect(()=>{if(!n.current)return;let k=tn(S=>{if(!(E.current||B.current===0))for(let C of S){let D=C.contentRect.width,$=Math.min(D/B.current,1);R($);}},150),P=new ResizeObserver(k);return P.observe(n.current),()=>{P.disconnect(),k.cancel();}},[]),jsxs("div",{className:"h-full w-full flex flex-col px-0.5",children:[jsxs("div",{className:"flex justify-center items-stretch px-8 py-3 gap-1 border-b border-gray-200 dark:border-neutral-700",children:[jsx(z,{variant:"outlined","aria-label":"zoom-out",color:"default",size:"small",icon:jsx(Ra,{style:{width:20,height:20}}),onClick:z$1,disabled:x<=.25,className:"bg-white! dark:bg-neutral-800! hover:bg-blue-50! dark:hover:bg-neutral-700!",p:7}),jsxs(rb,{py:8,px:8,className:"flex items-center justify-between gap-1.5 min-w-21 rounded-[5px]!",children:[jsx(_a,{color:"text.lighter",style:{fontSize:10},children:"Scale:"}),jsxs(_a,{children:[Math.round(x*100),"%"]})]}),jsx(z,{variant:"outlined","aria-label":"zoom-in",size:"small",color:"default",icon:jsx(na,{style:{width:14,height:14}}),onClick:t,disabled:x>=4,className:"bg-white! dark:bg-neutral-800! hover:bg-blue-50! dark:hover:bg-neutral-700!",p:10})]}),!!d&&!p&&jsx("div",{className:"text-red-500 p-8",children:d}),p&&jsx("div",{className:"flex items-center justify-center p-8",children:"\u0417\u0430\u0432\u0430\u043D\u0442\u0430\u0436\u0435\u043D\u043D\u044F..."}),jsx("div",{ref:n,className:"w-full h-full overflow-auto bg-gray-400 dark:bg-neutral-700 [&::-webkit-scrollbar-thumb]:bg-gray-100 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-600 [&::-webkit-scrollbar-track]:bg-gray-400 dark:[&::-webkit-scrollbar-track]:bg-neutral-700",style:{scrollbarGutter:"stable both-edges"},children:jsx("div",{style:{width:g.width>0?g.width*x:void 0,height:g.height>0?g.height*x:void 0,overflow:"hidden",margin:"0 auto"},children:jsx("div",{ref:a$1,className:`[&>div.docx-wrapper_table_*]:wrap-break-word!
67
67
  [&>div.docx-wrapper_table]:table-fixed!
68
68
  [&>div.docx-wrapper_table_td]:w-fit!
69
69
  [&>div.docx-wrapper_table_col]:w-fit!
@@ -169,7 +169,7 @@ self.onmessage = async (e) => {
169
169
  }
170
170
  }
171
171
  };
172
- `,st=null,ct=null;function Ot(){if(!st){let r=new Blob([Mn],{type:"application/javascript"});ct=URL.createObjectURL(r),st=new Worker(ct);}return st}a(Ot,"getSearchWorker");function Ir(){st?.terminate(),st=null,ct&&(URL.revokeObjectURL(ct),ct=null);}a(Ir,"terminateSearchWorker");function zr(r,o){let[n,a]=useState(""),[d,s]=useState("idle"),[p,w]=useState(null),[x,R]=useState({searched:0,total:0,found:0}),E=useRef(null),g=useCallback(t=>{if(!r||o===0)return;if(!t.trim()){w(null),s("idle"),R({searched:0,total:0,found:0});return}s("searching"),R({searched:0,total:o,found:0});let z=Ot();z.onmessage=k=>{let{type:P}=k.data;P==="progress"&&R({searched:k.data.searched,total:k.data.total,found:k.data.found}),P==="done"&&(w(k.data.matchedIndices),s("done")),P==="cancelled"&&s("idle"),P==="error"&&(s("idle"),console.error("Search worker error:",k.data.message));},z.postMessage({type:"cancel"}),z.postMessage({type:"search",sessionId:r,query:t,chunkCount:o,chunkSize:1e3});},[r,o]),I=useCallback(t=>{a(t),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{g(t);},300);},[g]),B=useCallback(()=>{a(""),w(null),s("idle"),R({searched:0,total:0,found:0}),Ot().postMessage({type:"cancel"});},[]);return useEffect(()=>()=>{E.current&&clearTimeout(E.current),Ir();},[]),{query:n,onQueryChange:I,clearSearch:B,searchState:d,matchedIndices:p,searchProgress:x}}a(zr,"useCsvSearch");var _n={loading:"Loading...",rows:"rows",retry:"Retry",searchPlaceholder:"Search...",searchFound:"found",searching:"Searching..."};function An(r,o,n){let a=1/0,d=-1/0,s=Math.min(n,r.length-1);for(let p=o;p<=s;p++){let w=r[p];w<a&&(a=w),w>d&&(d=w);}return {min:a,max:d}}a(An,"getMinMax");function jn(r,o,n){let a=Math.min(100,n),d=r.map(()=>[]);for(let s=0;s<a;s++){let p=o(s);if(p)for(let w=0;w<r.length;w++){let x=p[r[w]]??"";d[w].push(x.length);}}return r.map((s,p)=>{let w=s.length*9,x=d[p];if(x.length===0)return Math.min(Math.max(150,w+24),800);x.sort((B,t)=>B-t);let R=Math.floor(x.length*.9),g=x[R]*7.5+24,I=Math.max(w+24,g);return Math.min(Math.max(50,I),800)})}a(jn,"estimateColumnWidths");var $t=a(r=>{let{state:o,headers:n,totalRows:a$1,getRow:d,error:s,progress:p,prefetchRange:w,sessionId:x,chunkCount:R,pinChunks:E}=Lr(r),g={..._n,...r.labels},{query:I,onQueryChange:B,clearSearch:t,searchState:z$1,matchedIndices:k}=zr(x,R),P=k!==null,S=P?k.length:a$1,[C,D]=useState([]),$=useRef(null),U=useRef(null),Q=useRef(false),oe=useRef(false);useEffect(()=>{oe.current=false,Q.current=false,D([]);},[x]),useEffect(()=>{if(n.length===0||Q.current||oe.current||a$1===0)return;let Y=d(0);!Y||!n.some(H=>Y[H]!==void 0)||(oe.current=true,D(jn(n,d,a$1)));},[n,a$1,d]),useEffect(()=>()=>U.current?.(),[]);let ie=useCallback((Y,H)=>{Y.preventDefault(),Q.current=true;let V=Y.clientX,W=C[H]??150;$.current={index:H,startX:V,startWidth:W};let Z=a(ae=>{if(!$.current)return;let X=ae.clientX-V,ee=Math.max(50,W+X);D(de=>{let ce=[...de];return ce[H]=ee,ce});},"onMouseMove"),ne=a(()=>{$.current=null,U.current=null,document.removeEventListener("mousemove",Z),document.removeEventListener("mouseup",ne);},"onMouseUp");U.current=ne,document.addEventListener("mousemove",Z),document.addEventListener("mouseup",ne);},[C]),ye=C.reduce((Y,H)=>Y+H,0),le=useCallback(()=>jsx(On,{children:n.map((Y,H)=>jsxs(Hn,{style:{width:C[H]},children:[Y,jsx(Wn,{onMouseDown:V=>ie(V,H)})]},H))}),[n,C,ie]),we=useCallback(Y=>{if(P&&k){let H=1/0,V=-1/0,W=new Set,Z=Math.min(Y.endIndex,k.length-1);for(let ne=Y.startIndex;ne<=Z;ne++){let ae=k[ne];ae<H&&(H=ae),ae>V&&(V=ae),W.add(Math.floor(ae/1e3));}E(Array.from(W)),H!==1/0&&w(H,V);}else E([]),w(Y.startIndex,Y.endIndex);},[w,E,P,k]),ve=useCallback(Y=>{let H=P&&k?k[Y]:Y,V=d(H);return V?n.map((W,Z)=>jsx(jr,{style:{width:C[Z]},children:V[W]??""},Z)):n.map((W,Z)=>jsx(jr,{style:{width:C[Z]},children:jsx(Yn,{})},Z))},[d,n,C,P,k]);return useEffect(()=>{if(S>0)if(P&&k){let{min:Y,max:H}=An(k,0,50);Y!==1/0&&w(Y,H);}else w(0,50);},[S,P,k,w]),o==="idle"||o==="loading"||o==="streaming"?jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3",children:[jsx("div",{className:"h-10 w-10 rounded-full border-2 border-gray-200 dark:border-neutral-700 animate-spin border-s-transparent"}),o==="streaming"&&a$1>0&&jsxs(Ya,{variant:"body",color:"text.lighter",style:{fontSize:12},children:[g.loading," ",a$1.toLocaleString()," ",g.rows,p>0?` (${Math.round(p*100)}%)`:""]})]}):jsxs("div",{className:"h-full w-full flex flex-col",children:[jsxs("div",{className:"flex items-center justify-between px-4 py-2 gap-3",children:[jsx(Ya,{variant:"body",color:"text.lighter",style:{fontSize:12,whiteSpace:"nowrap"},children:`${S.toLocaleString()} ${P?g.searchFound:g.rows}${P?` / ${a$1.toLocaleString()}`:""}`}),jsxs(qn,{children:[jsx(Un,{type:"text",value:I,onChange:Y=>B(Y.target.value),placeholder:g.searchPlaceholder}),z$1==="searching"?jsx(Vn,{children:jsx(Kn,{})}):I?jsx(Zn,{onClick:t,type:"button",children:"\u2715"}):null]})]}),o==="partial_error"&&jsxs(pb,{className:"flex items-center justify-between mx-4 mb-2 px-3 py-2 rounded bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-900",children:[jsx(Ya,{variant:"body",className:"text-red-600 dark:text-red-400",style:{fontSize:12},children:s}),r.onRetry&&jsx(z,{onClick:()=>r.onRetry(s??""),variant:"outlined",size:"small",children:g.retry})]}),jsx("div",{className:"flex-1 min-h-0",children:n.length>0&&jsx(TableVirtuoso,{totalCount:S,increaseViewportBy:300,fixedHeaderContent:le,itemContent:ve,rangeChanged:we,style:{height:"100%"},components:{Table:a(({style:Y,context:H,...V})=>jsx(Fn,{style:{...Y,minWidth:"100%",width:ye},...V}),"Table"),TableHead:Bn,TableRow:a(({context:Y,...H})=>jsx($n,{...H}),"TableRow")}},P?"filtered":"all")})]})},"CsvDriver"),Fn=styled.table(({theme:r})=>`
172
+ `,st=null,ct=null;function Ot(){if(!st){let r=new Blob([Mn],{type:"application/javascript"});ct=URL.createObjectURL(r),st=new Worker(ct);}return st}a(Ot,"getSearchWorker");function Ir(){st?.terminate(),st=null,ct&&(URL.revokeObjectURL(ct),ct=null);}a(Ir,"terminateSearchWorker");function zr(r,o){let[n,a]=useState(""),[d,s]=useState("idle"),[p,w]=useState(null),[x,R]=useState({searched:0,total:0,found:0}),E=useRef(null),g=useCallback(t=>{if(!r||o===0)return;if(!t.trim()){w(null),s("idle"),R({searched:0,total:0,found:0});return}s("searching"),R({searched:0,total:o,found:0});let z=Ot();z.onmessage=k=>{let{type:P}=k.data;P==="progress"&&R({searched:k.data.searched,total:k.data.total,found:k.data.found}),P==="done"&&(w(k.data.matchedIndices),s("done")),P==="cancelled"&&s("idle"),P==="error"&&(s("idle"),console.error("Search worker error:",k.data.message));},z.postMessage({type:"cancel"}),z.postMessage({type:"search",sessionId:r,query:t,chunkCount:o,chunkSize:1e3});},[r,o]),I=useCallback(t=>{a(t),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{g(t);},300);},[g]),B=useCallback(()=>{a(""),w(null),s("idle"),R({searched:0,total:0,found:0}),Ot().postMessage({type:"cancel"});},[]);return useEffect(()=>()=>{E.current&&clearTimeout(E.current),Ir();},[]),{query:n,onQueryChange:I,clearSearch:B,searchState:d,matchedIndices:p,searchProgress:x}}a(zr,"useCsvSearch");var _n={loading:"Loading...",rows:"rows",retry:"Retry",searchPlaceholder:"Search...",searchFound:"found",searching:"Searching..."};function An(r,o,n){let a=1/0,d=-1/0,s=Math.min(n,r.length-1);for(let p=o;p<=s;p++){let w=r[p];w<a&&(a=w),w>d&&(d=w);}return {min:a,max:d}}a(An,"getMinMax");function jn(r,o,n){let a=Math.min(100,n),d=r.map(()=>[]);for(let s=0;s<a;s++){let p=o(s);if(p)for(let w=0;w<r.length;w++){let x=p[r[w]]??"";d[w].push(x.length);}}return r.map((s,p)=>{let w=s.length*9,x=d[p];if(x.length===0)return Math.min(Math.max(150,w+24),800);x.sort((B,t)=>B-t);let R=Math.floor(x.length*.9),g=x[R]*7.5+24,I=Math.max(w+24,g);return Math.min(Math.max(50,I),800)})}a(jn,"estimateColumnWidths");var $t=a(r=>{let{state:o,headers:n,totalRows:a$1,getRow:d,error:s,progress:p,prefetchRange:w,sessionId:x,chunkCount:R,pinChunks:E}=Lr(r),g={..._n,...r.labels},{query:I,onQueryChange:B,clearSearch:t,searchState:z$1,matchedIndices:k}=zr(x,R),P=k!==null,S=P?k.length:a$1,[C,D]=useState([]),$=useRef(null),U=useRef(null),Q=useRef(false),oe=useRef(false);useEffect(()=>{oe.current=false,Q.current=false,D([]);},[x]),useEffect(()=>{if(n.length===0||Q.current||oe.current||a$1===0)return;let Y=d(0);!Y||!n.some(H=>Y[H]!==void 0)||(oe.current=true,D(jn(n,d,a$1)));},[n,a$1,d]),useEffect(()=>()=>U.current?.(),[]);let ie=useCallback((Y,H)=>{Y.preventDefault(),Q.current=true;let V=Y.clientX,W=C[H]??150;$.current={index:H,startX:V,startWidth:W};let Z=a(ae=>{if(!$.current)return;let X=ae.clientX-V,ee=Math.max(50,W+X);D(de=>{let ce=[...de];return ce[H]=ee,ce});},"onMouseMove"),ne=a(()=>{$.current=null,U.current=null,document.removeEventListener("mousemove",Z),document.removeEventListener("mouseup",ne);},"onMouseUp");U.current=ne,document.addEventListener("mousemove",Z),document.addEventListener("mouseup",ne);},[C]),ye=C.reduce((Y,H)=>Y+H,0),le=useCallback(()=>jsx(On,{children:n.map((Y,H)=>jsxs(Hn,{style:{width:C[H]},children:[Y,jsx(Wn,{onMouseDown:V=>ie(V,H)})]},H))}),[n,C,ie]),we=useCallback(Y=>{if(P&&k){let H=1/0,V=-1/0,W=new Set,Z=Math.min(Y.endIndex,k.length-1);for(let ne=Y.startIndex;ne<=Z;ne++){let ae=k[ne];ae<H&&(H=ae),ae>V&&(V=ae),W.add(Math.floor(ae/1e3));}E(Array.from(W)),H!==1/0&&w(H,V);}else E([]),w(Y.startIndex,Y.endIndex);},[w,E,P,k]),ve=useCallback(Y=>{let H=P&&k?k[Y]:Y,V=d(H);return V?n.map((W,Z)=>jsx(jr,{style:{width:C[Z]},children:V[W]??""},Z)):n.map((W,Z)=>jsx(jr,{style:{width:C[Z]},children:jsx(Yn,{})},Z))},[d,n,C,P,k]);return useEffect(()=>{if(S>0)if(P&&k){let{min:Y,max:H}=An(k,0,50);Y!==1/0&&w(Y,H);}else w(0,50);},[S,P,k,w]),o==="idle"||o==="loading"||o==="streaming"?jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3",children:[jsx("div",{className:"h-10 w-10 rounded-full border-2 border-gray-200 dark:border-neutral-700 animate-spin border-s-transparent"}),o==="streaming"&&a$1>0&&jsxs(_a,{variant:"body",color:"text.lighter",style:{fontSize:12},children:[g.loading," ",a$1.toLocaleString()," ",g.rows,p>0?` (${Math.round(p*100)}%)`:""]})]}):jsxs("div",{className:"h-full w-full flex flex-col",children:[jsxs("div",{className:"flex items-center justify-between px-4 py-2 gap-3",children:[jsx(_a,{variant:"body",color:"text.lighter",style:{fontSize:12,whiteSpace:"nowrap"},children:`${S.toLocaleString()} ${P?g.searchFound:g.rows}${P?` / ${a$1.toLocaleString()}`:""}`}),jsxs(qn,{children:[jsx(Un,{type:"text",value:I,onChange:Y=>B(Y.target.value),placeholder:g.searchPlaceholder}),z$1==="searching"?jsx(Vn,{children:jsx(Kn,{})}):I?jsx(Zn,{onClick:t,type:"button",children:"\u2715"}):null]})]}),o==="partial_error"&&jsxs(rb,{className:"flex items-center justify-between mx-4 mb-2 px-3 py-2 rounded bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-900",children:[jsx(_a,{variant:"body",className:"text-red-600 dark:text-red-400",style:{fontSize:12},children:s}),r.onRetry&&jsx(z,{onClick:()=>r.onRetry(s??""),variant:"outlined",size:"small",children:g.retry})]}),jsx("div",{className:"flex-1 min-h-0",children:n.length>0&&jsx(TableVirtuoso,{totalCount:S,increaseViewportBy:300,fixedHeaderContent:le,itemContent:ve,rangeChanged:we,style:{height:"100%"},components:{Table:a(({style:Y,context:H,...V})=>jsx(Fn,{style:{...Y,minWidth:"100%",width:ye},...V}),"Table"),TableHead:Bn,TableRow:a(({context:Y,...H})=>jsx($n,{...H}),"TableRow")}},P?"filtered":"all")})]})},"CsvDriver"),Fn=styled.table(({theme:r})=>`
173
173
  border-collapse: separate;
174
174
  border-spacing: 0;
175
175
  table-layout: fixed;
@@ -273,7 +273,7 @@ self.onmessage = async (e) => {
273
273
  border-top-color: ${r.colors.text?.light};
274
274
  border-radius: 50%;
275
275
  animation: ${Gn} 0.6s linear infinite;
276
- `);var Wr=memo(a(function({extension:o,blob:n,path:a,buffer:d,stream:s,csvLabels:p,onCsvRetry:w,not_supported_message:x=" Sorry, this file type isn\u2019t supported yet."}){let R=o.toLocaleLowerCase().trim(),E;if(a?E=a:n&&(E=URL.createObjectURL(n)),["csv","tsv"].includes(R))return jsx($t,{url:E,blob:n,stream:s,labels:p,onRetry:w});if(E){if(["jpeg","jpg","png","gif","bmp","ico","svg","tiff","webp"].includes(R))return jsx(br,{url:E});if(["aac","ac3","aiff","amr","dts","flac","m4a","mp3","ogg","opus","wav","wma"].includes(R))return jsx(yr,{url:E});if(["3gp","avi","dv","flv","m2ts","m4v","mkv","mov","mp4","mpeg","mpg","mts","ogv","vob","webm"].includes(R))return jsx(Er,{url:E});if(o==="pdf")return jsx(zt,{url:E});if(["txt","js","jsx","ts","tsx","json","html","css","scss","py","java","cpp","c","cs","php","rb","go","rs","swift","kt","xml","yaml","yml","md","sql","sh","bash","cfg","conf","env","htm","ini","log","markdown","ndjson","properties","rst","toml"].includes(R))return jsx(Pr,{url:E,extension:R})}return R==="docx"?jsx(Sr,{url:E,blob:n}):jsx("div",{className:"h-full flex flex-col justify-center items-center",children:jsx(pb,{className:"mx-5",children:jsx(Ya,{variant:"h2",color:"text.light",weight:500,className:"text-center",children:x})})})},"Driver"));var Xd=a(r=>jsx("div",{className:"h-full w-full",children:jsx(Wr,{...r})}),"FileViewer");var Yr=250,ru=a(({text:r,speed:o=50,onDone:n,markdown:a$1=false,markdownComponents:d={},className:s,...p})=>{let[w,x]=useState(""),R=useRef(null),E=useRef(null);return useEffect(()=>{let g=false;if(o>0){x(""),R.current=performance.now();let I=a(B=>{if(g||!R.current)return;let t=B-R.current,z=t/o>Yr?o/2:o,k=t/o>Yr?1.5:1,P=Math.floor(t/z*k);if(P>=r.length){x(r),g=true,n?.();return}x(r.slice(0,P)),E.current=requestAnimationFrame(I);},"tick");E.current=requestAnimationFrame(I);}else x(r),n?.();return ()=>{E.current&&cancelAnimationFrame(E.current);}},[r,o,n]),a$1?jsx("div",{className:s,children:jsx(mn,{remarkPlugins:[bn],components:d,...p,children:w})}):jsx(Ya,{className:s,...p,children:w})},"Typewriter");var ca={timeout:2e3,message:"Copied!"},gu=a(({text:r,children:o,format:n="text/plain",tooltip:a$1,positions:d=["top"],className:s})=>{let[p,w]=useState(false),x=useRef(null),R={...ca,...a$1},E=Array.isArray(d)?d[0]:d,g=a(async()=>{"clipboard"in navigator?await navigator.clipboard.writeText(r):oa(r,{format:n}),w(true),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>w(false),R.timeout);},"handleCopy");return useEffect(()=>()=>{x.current&&clearTimeout(x.current);},[]),jsx(Popover,{padding:6,positions:d,isOpen:p,align:"center",onClickOutside:()=>w(false),content:!!a$1?.message&&jsx(Cb,{className:s,$position:E,$offset:6,children:a$1.message}),containerStyle:{zIndex:"9999"},children:jsx("div",{className:"inline-block",onMouseLeave:()=>w(false),children:o({copy:g})})})},"CopyToClipboard");var Ur=a(r=>new Date(r?Array.isArray(r)?r[1]||r[0]||new Date:r:new Date),"getInitValue"),Rt=a((r,o)=>{let n;if(o){let d=parse(r||"",o,new Date);if(isValid(d)&&getYear(d)>=1970)return d}let a=new Date(r||"");return isNaN(a.getTime())?n:a},"parseDate"),ba=a((r,o)=>{let n=r?Rt(r,o):void 0;return n&&o?format(n,o):r},"renderDate"),Pu=a(({value:r,range:o,inline:n=false,minDate:a=new Date(getYear(new Date)-5,0,1),maxDate:d=new Date(getYear(new Date)+5,11,31),format:s="dd.MM.yyyy",onChange:p,...w})=>{let[x,R]=useState(getMonth(Ur(r))),[E,g]=useState(getYear(Ur(r))),I=useMemo(()=>{if(r){if(Array.isArray(r)){let t=Rt(r[0],s),z=Rt(r[1],s);return [t,z]}return Rt(r,s)}},[r]),B=useCallback(t=>{if(o){let z=!!(I&&Array.isArray(I)&&I[0]),k=!!(I&&Array.isArray(I)&&I[1]);!z||z&&k?p?.([t.toString(),""]):z&&!k&&(t<I[0]?p?.([t.toString(),I[0].toString()]):p?.([I[0].toString(),t.toString()]));}else p?.(t.toString());},[o,I,p]);return n?jsx(Zr,{month:x,year:E,minDate:a,maxDate:d,selectedDate:I,onSelectDate:B,onChangeMonth:R,onChangeYear:g}):o?jsx(va,{range:true,value:r,onChange:p,...w}):jsx(ya,{value:r,onChange:p,minDate:a,maxDate:d,month:x,year:E,selectedDate:I,onChangeMonth:R,onChangeYear:g,onSelectDate:B,formatStr:s,...w})},"DatePicker"),va=a(({minDate:r,maxDate:o,value:n,onChange:a})=>null,"DatePickerGroupInput"),ya=a(({placeholder:r,value:o,onChange:n,inputProps:a,...d})=>{let[s,p]=useState(false),w=y(),x=useCallback(()=>{p(false);},[]);return jsx(Popover,{positions:["bottom","top","right","left"],align:"start",isOpen:s,onClickOutside:()=>p(false),content:jsx(pb,{children:jsx(Zr,{...d,onClose:x})}),containerStyle:{zIndex:`${w.zIndex.popover}`},children:jsx("div",{onClick:()=>p(true),children:jsx(kb,{...a,placeholder:r,value:ba(o,d.formatStr),onChange:R=>n?.(R.target.value)})})})},"DatePickerInput"),Zr=a(({month:r,year:o,selectedDate:n,minDate:a,maxDate:d,onSelectDate:s,onChangeMonth:p,onChangeYear:w,onClose:x})=>{let R=useMemo(()=>new Array(12).fill(null).map((S,C)=>{let D=new Date(0,C);return {value:C+1,inputDisplay:format(D,"MMMM")}}),[]),E=useMemo(()=>{let S=getYear(a),D=getYear(d)-S+1;return new Array(D).fill(null).map(($,U)=>{let Q=S+U;return {value:Q,inputDisplay:Q.toString()}})},[a,d]),g=useMemo(()=>new Array(7).fill(null).map((S,C)=>{let D=startOfWeek(new Date,{weekStartsOn:C});return format(D,"EEE")}),[]),I=useMemo(()=>{let S=startOfMonth(new Date(o,r)),C=endOfMonth(new Date(o,r)),D=getDay(S)===0?S:previousSunday(S),$=getDay(C)===6?C:nextSaturday(C),U=differenceInDays($,D),Q=differenceInDays(S,D);return new Array(U+1).fill(null).map((oe,ie)=>new Date(o,r,ie-Q+1))},[r,o]),B=useCallback(()=>{r===0?(w(o-1),p(11)):p(r-1);},[r,o]),t=useCallback(()=>{r===11?(w(o+1),p(0)):p(r+1);},[r,o]),z$1=useMemo(()=>a?!(o<getYear(a)||o===getYear(a)&&r<=getMonth(a)):true,[r,o,a]),k=useMemo(()=>d?!(o>getYear(d)||o===getYear(d)&&r>=getMonth(d)):true,[r,o,d]),P=useCallback(S=>{S.stopPropagation();},[]);return jsxs("div",{className:"flex flex-col date-picker-calendar",onClick:P,children:[jsxs("div",{className:"flex justify-center items-center gap-2 pb-3",children:[z$1&&jsx(z,{size:"small",variant:"empty",icon:jsx(G,{}),onClick:B}),jsxs("div",{className:"flex-1 flex justify-center gap-1",children:[jsx(ib,{placeholder:"",hasBorder:false,selected:r+1,options:R,onSelect:S=>p(S-1),maxWidth:150,maxHeight:300}),jsx(ib,{placeholder:"",hasBorder:false,selected:o,options:E,onSelect:S=>w(S),maxWidth:100,maxHeight:300})]}),k&&jsx(z,{size:"small",variant:"empty",icon:jsx(H,{}),onClick:t})]}),jsx("div",{className:"grid grid-cols-7 gap-2",children:g.map(S=>jsx("div",{className:"text-center",children:S},S))}),jsx("div",{className:"grid grid-cols-7 gap-2 mt-2",children:I.map(S=>{let C=getMonth(S)===r,D=format(S,"yyyy-MM-dd")===format(new Date,"yyyy-MM-dd"),$=n&&(Array.isArray(n)&&(n[0]&&format(S,"yyyy-MM-dd")===format(n[0],"yyyy-MM-dd")||n[1]&&format(S,"yyyy-MM-dd")===format(n[1],"yyyy-MM-dd"))||!Array.isArray(n)&&format(S,"yyyy-MM-dd")===format(n,"yyyy-MM-dd")),U=n&&Array.isArray(n)&&n[0]&&n[1]&&S>n[0]&&S<n[1],Q=a&&differenceInDays(S,a)<0||d&&differenceInDays(S,d)>0||!C;return jsx(wa,{date:S,isCurrentMonth:C,isCurrentDay:D,isSelected:!!$,isInRange:!!U,isDisabled:!!Q,onSelectDate:oe=>{s(oe),x?.();}},S.toISOString())})})]})},"DatePickerCalendar"),wa=a(({date:r,isCurrentMonth:o,isCurrentDay:n,isSelected:a$1,isInRange:d,isDisabled:s,onSelectDate:p})=>jsx("div",{className:`text-center p-2 cursor-pointer rounded ${s?"text-gray-400 dark:text-neutral-600 cursor-not-allowed":a$1?"bg-blue-500 text-white":d?"bg-blue-100 dark:bg-blue-900/30":n?"text-blue-500":o?"text-black dark:text-white":"text-gray-400 dark:text-neutral-600"} ${s?"":a$1?"hover:bg-blue-600":"hover:bg-gray-100 dark:hover:bg-neutral-700"}`,onClick:a(x=>{s||p(r);},"handleClick"),children:format(r,"d")}),"CalendarDay");var Sa=a(r=>{switch(r){case "primary":return "bg-blue-100 border-blue-200 dark:bg-blue-800/10 dark:border-blue-900";case "error":return "bg-red-100 border-red-200 dark:bg-red-800/10 dark:border-red-900";case "warning":return "bg-yellow-100 border-yellow-200 dark:bg-yellow-800/10 dark:border-yellow-900";case "success":return "bg-teal-100 border-teal-200 dark:bg-teal-800/10 dark:border-teal-900";case "default":default:return "bg-white border border-gray-200 dark:bg-neutral-800 dark:border-neutral-700"}},"getColorStyle"),Da=a(r=>{switch(r){case "primary":return "text-blue-800 dark:text-blue-500";case "error":return "text-red-800 dark:text-red-500";case "warning":return "text-yellow-800 dark:text-yellow-500";case "success":return "text-teal-800 dark:text-teal-500";case "default":default:return "text-gray-800 dark:text-white"}},"getTextColor"),Ca=a(r=>{switch(r){case "bottom":return "translate-y-4";case "top":default:return "-translate-y-4"}},"getTransitionStarting"),Jr=a(({id:r,color:o="default",message:n,duration:a,transitionDirection:d,cancelable:s=true,onClose:p})=>{let[w,x]=useState(false),[R,E]=useState(false),g=useRef(null),I=useCallback(()=>{x(true),g.current=setTimeout(()=>{p(r);},300);},[r,p]);return useEffect(()=>{if(E(true),a&&a<1/0){let B=setTimeout(()=>{I();},a);return ()=>clearTimeout(B)}},[a,I]),useEffect(()=>()=>{g.current&&clearTimeout(g.current);},[]),jsx("div",{className:`max-w-xs
276
+ `);var Wr=memo(a(function({extension:o,blob:n,path:a,buffer:d,stream:s,csvLabels:p,onCsvRetry:w,not_supported_message:x=" Sorry, this file type isn\u2019t supported yet."}){let R=o.toLocaleLowerCase().trim(),E;if(a?E=a:n&&(E=URL.createObjectURL(n)),["csv","tsv"].includes(R))return jsx($t,{url:E,blob:n,stream:s,labels:p,onRetry:w});if(E){if(["jpeg","jpg","png","gif","bmp","ico","svg","tiff","webp"].includes(R))return jsx(br,{url:E});if(["aac","ac3","aiff","amr","dts","flac","m4a","mp3","ogg","opus","wav","wma"].includes(R))return jsx(yr,{url:E});if(["3gp","avi","dv","flv","m2ts","m4v","mkv","mov","mp4","mpeg","mpg","mts","ogv","vob","webm"].includes(R))return jsx(Er,{url:E});if(o==="pdf")return jsx(zt,{url:E});if(["txt","js","jsx","ts","tsx","json","html","css","scss","py","java","cpp","c","cs","php","rb","go","rs","swift","kt","xml","yaml","yml","md","sql","sh","bash","cfg","conf","env","htm","ini","log","markdown","ndjson","properties","rst","toml"].includes(R))return jsx(Pr,{url:E,extension:R})}return R==="docx"?jsx(Sr,{url:E,blob:n}):jsx("div",{className:"h-full flex flex-col justify-center items-center",children:jsx(rb,{className:"mx-5",children:jsx(_a,{variant:"h2",color:"text.light",weight:500,className:"text-center",children:x})})})},"Driver"));var qd=a(r=>jsx("div",{className:"h-full w-full",children:jsx(Wr,{...r})}),"FileViewer");var Yr=250,nu=a(({text:r,speed:o=50,onDone:n,markdown:a$1=false,markdownComponents:d={},className:s,...p})=>{let[w,x]=useState(""),R=useRef(null),E=useRef(null);return useEffect(()=>{let g=false;if(o>0){x(""),R.current=performance.now();let I=a(B=>{if(g||!R.current)return;let t=B-R.current,z=t/o>Yr?o/2:o,k=t/o>Yr?1.5:1,P=Math.floor(t/z*k);if(P>=r.length){x(r),g=true,n?.();return}x(r.slice(0,P)),E.current=requestAnimationFrame(I);},"tick");E.current=requestAnimationFrame(I);}else x(r),n?.();return ()=>{E.current&&cancelAnimationFrame(E.current);}},[r,o,n]),a$1?jsx("div",{className:s,children:jsx(mn,{remarkPlugins:[bn],components:d,...p,children:w})}):jsx(_a,{className:s,...p,children:w})},"Typewriter");var ca={timeout:2e3,message:"Copied!"},mu=a(({text:r,children:o,format:n="text/plain",tooltip:a$1,positions:d=["top"],className:s})=>{let[p,w]=useState(false),x=useRef(null),R={...ca,...a$1},E=Array.isArray(d)?d[0]:d,g=a(async()=>{"clipboard"in navigator?await navigator.clipboard.writeText(r):oa(r,{format:n}),w(true),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>w(false),R.timeout);},"handleCopy");return useEffect(()=>()=>{x.current&&clearTimeout(x.current);},[]),jsx(Popover,{padding:6,positions:d,isOpen:p,align:"center",onClickOutside:()=>w(false),content:!!a$1?.message&&jsx(Eb,{className:s,$position:E,$offset:6,children:a$1.message}),containerStyle:{zIndex:"9999"},children:jsx("div",{className:"inline-block",onMouseLeave:()=>w(false),children:o({copy:g})})})},"CopyToClipboard");var Ur=a(r=>new Date(r?Array.isArray(r)?r[1]||r[0]||new Date:r:new Date),"getInitValue"),Rt=a((r,o)=>{let n;if(o){let d=parse(r||"",o,new Date);if(isValid(d)&&getYear(d)>=1970)return d}let a=new Date(r||"");return isNaN(a.getTime())?n:a},"parseDate"),ba=a((r,o)=>{let n=r?Rt(r,o):void 0;return n&&o?format(n,o):r},"renderDate"),Eu=a(({value:r,range:o,inline:n=false,minDate:a=new Date(getYear(new Date)-5,0,1),maxDate:d=new Date(getYear(new Date)+5,11,31),format:s="dd.MM.yyyy",onChange:p,...w})=>{let[x,R]=useState(getMonth(Ur(r))),[E,g]=useState(getYear(Ur(r))),I=useMemo(()=>{if(r){if(Array.isArray(r)){let t=Rt(r[0],s),z=Rt(r[1],s);return [t,z]}return Rt(r,s)}},[r]),B=useCallback(t=>{if(o){let z=!!(I&&Array.isArray(I)&&I[0]),k=!!(I&&Array.isArray(I)&&I[1]);!z||z&&k?p?.([t.toString(),""]):z&&!k&&(t<I[0]?p?.([t.toString(),I[0].toString()]):p?.([I[0].toString(),t.toString()]));}else p?.(t.toString());},[o,I,p]);return n?jsx(Zr,{month:x,year:E,minDate:a,maxDate:d,selectedDate:I,onSelectDate:B,onChangeMonth:R,onChangeYear:g}):o?jsx(va,{range:true,value:r,onChange:p,...w}):jsx(ya,{value:r,onChange:p,minDate:a,maxDate:d,month:x,year:E,selectedDate:I,onChangeMonth:R,onChangeYear:g,onSelectDate:B,formatStr:s,...w})},"DatePicker"),va=a(({minDate:r,maxDate:o,value:n,onChange:a})=>null,"DatePickerGroupInput"),ya=a(({placeholder:r,value:o,onChange:n,inputProps:a,...d})=>{let[s,p]=useState(false),w=y(),x=useCallback(()=>{p(false);},[]);return jsx(Popover,{positions:["bottom","top","right","left"],align:"start",isOpen:s,onClickOutside:()=>p(false),content:jsx(rb,{children:jsx(Zr,{...d,onClose:x})}),containerStyle:{zIndex:`${w.zIndex.popover}`},children:jsx("div",{onClick:()=>p(true),children:jsx(mb,{...a,placeholder:r,value:ba(o,d.formatStr),onChange:R=>n?.(R.target.value)})})})},"DatePickerInput"),Zr=a(({month:r,year:o,selectedDate:n,minDate:a,maxDate:d,onSelectDate:s,onChangeMonth:p,onChangeYear:w,onClose:x})=>{let R=useMemo(()=>new Array(12).fill(null).map((S,C)=>{let D=new Date(0,C);return {value:C+1,inputDisplay:format(D,"MMMM")}}),[]),E=useMemo(()=>{let S=getYear(a),D=getYear(d)-S+1;return new Array(D).fill(null).map(($,U)=>{let Q=S+U;return {value:Q,inputDisplay:Q.toString()}})},[a,d]),g=useMemo(()=>new Array(7).fill(null).map((S,C)=>{let D=startOfWeek(new Date,{weekStartsOn:C});return format(D,"EEE")}),[]),I=useMemo(()=>{let S=startOfMonth(new Date(o,r)),C=endOfMonth(new Date(o,r)),D=getDay(S)===0?S:previousSunday(S),$=getDay(C)===6?C:nextSaturday(C),U=differenceInDays($,D),Q=differenceInDays(S,D);return new Array(U+1).fill(null).map((oe,ie)=>new Date(o,r,ie-Q+1))},[r,o]),B=useCallback(()=>{r===0?(w(o-1),p(11)):p(r-1);},[r,o]),t=useCallback(()=>{r===11?(w(o+1),p(0)):p(r+1);},[r,o]),z$1=useMemo(()=>a?!(o<getYear(a)||o===getYear(a)&&r<=getMonth(a)):true,[r,o,a]),k=useMemo(()=>d?!(o>getYear(d)||o===getYear(d)&&r>=getMonth(d)):true,[r,o,d]),P=useCallback(S=>{S.stopPropagation();},[]);return jsxs("div",{className:"flex flex-col date-picker-calendar",onClick:P,children:[jsxs("div",{className:"flex justify-center items-center gap-2 pb-3",children:[z$1&&jsx(z,{size:"small",variant:"empty",icon:jsx(G,{}),onClick:B}),jsxs("div",{className:"flex-1 flex justify-center gap-1",children:[jsx(kb,{placeholder:"",hasBorder:false,selected:r+1,options:R,onSelect:S=>p(S-1),maxWidth:150,maxHeight:300}),jsx(kb,{placeholder:"",hasBorder:false,selected:o,options:E,onSelect:S=>w(S),maxWidth:100,maxHeight:300})]}),k&&jsx(z,{size:"small",variant:"empty",icon:jsx(H,{}),onClick:t})]}),jsx("div",{className:"grid grid-cols-7 gap-2",children:g.map(S=>jsx("div",{className:"text-center",children:S},S))}),jsx("div",{className:"grid grid-cols-7 gap-2 mt-2",children:I.map(S=>{let C=getMonth(S)===r,D=format(S,"yyyy-MM-dd")===format(new Date,"yyyy-MM-dd"),$=n&&(Array.isArray(n)&&(n[0]&&format(S,"yyyy-MM-dd")===format(n[0],"yyyy-MM-dd")||n[1]&&format(S,"yyyy-MM-dd")===format(n[1],"yyyy-MM-dd"))||!Array.isArray(n)&&format(S,"yyyy-MM-dd")===format(n,"yyyy-MM-dd")),U=n&&Array.isArray(n)&&n[0]&&n[1]&&S>n[0]&&S<n[1],Q=a&&differenceInDays(S,a)<0||d&&differenceInDays(S,d)>0||!C;return jsx(wa,{date:S,isCurrentMonth:C,isCurrentDay:D,isSelected:!!$,isInRange:!!U,isDisabled:!!Q,onSelectDate:oe=>{s(oe),x?.();}},S.toISOString())})})]})},"DatePickerCalendar"),wa=a(({date:r,isCurrentMonth:o,isCurrentDay:n,isSelected:a$1,isInRange:d,isDisabled:s,onSelectDate:p})=>jsx("div",{className:`text-center p-2 cursor-pointer rounded ${s?"text-gray-400 dark:text-neutral-600 cursor-not-allowed":a$1?"bg-blue-500 text-white":d?"bg-blue-100 dark:bg-blue-900/30":n?"text-blue-500":o?"text-black dark:text-white":"text-gray-400 dark:text-neutral-600"} ${s?"":a$1?"hover:bg-blue-600":"hover:bg-gray-100 dark:hover:bg-neutral-700"}`,onClick:a(x=>{s||p(r);},"handleClick"),children:format(r,"d")}),"CalendarDay");var Sa=a(r=>{switch(r){case "primary":return "bg-blue-100 border-blue-200 dark:bg-blue-950 dark:border-blue-900";case "error":return "bg-red-100 border-red-200 dark:bg-red-950 dark:border-red-900";case "warning":return "bg-yellow-100 border-yellow-200 dark:bg-amber-950 dark:border-amber-900";case "success":return "bg-teal-100 border-teal-200 dark:bg-teal-950 dark:border-teal-900";case "default":default:return "bg-white border border-gray-200 dark:bg-neutral-900 dark:border-neutral-700"}},"getColorStyle"),Da=a(r=>{switch(r){case "primary":return "text-blue-800 dark:text-blue-500";case "error":return "text-red-800 dark:text-red-500";case "warning":return "text-yellow-800 dark:text-yellow-500";case "success":return "text-teal-800 dark:text-teal-500";case "default":default:return "text-gray-800 dark:text-white"}},"getTextColor"),Ca=a(r=>{switch(r){case "bottom":return "translate-y-4";case "top":default:return "-translate-y-4"}},"getTransitionStarting"),Jr=a(({id:r,color:o="default",message:n,duration:a,transitionDirection:d,cancelable:s=true,onClose:p})=>{let[w,x]=useState(false),[R,E]=useState(false),g=useRef(null),I=useCallback(()=>{x(true),g.current=setTimeout(()=>{p(r);},300);},[r,p]);return useEffect(()=>{if(E(true),a&&a<1/0){let B=setTimeout(()=>{I();},a);return ()=>clearTimeout(B)}},[a,I]),useEffect(()=>()=>{g.current&&clearTimeout(g.current);},[]),jsx("div",{className:`max-w-xs
277
277
  border
278
278
  w-full
279
279
  text-sm
@@ -283,6 +283,6 @@ self.onmessage = async (e) => {
283
283
  duration-300
284
284
  ${w||!R?"opacity-0":"opacity-100"}
285
285
  ${R?"translate-y-0":Ca(d)}
286
- ${Sa(o)} ${Da(o)}`,children:jsxs("div",{className:"flex p-4",style:{wordBreak:"break-word"},children:[n,s&&jsx("div",{className:"ms-auto",children:jsx("button",{type:"button",className:"inline-flex shrink-0 justify-center items-center size-5 rounded-lg opacity-50 hover:opacity-100 focus:outline-hidden focus:opacity-100 cursor-pointer","aria-label":"Close",onClick:I,children:jsxs("svg",{className:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M18 6 6 18"}),jsx("path",{d:"m6 6 12 12"})]})})})]})})},"Toast");var Pa=a((r,o)=>{switch(r){case "top-right":return `top-${o} right-${o}`;case "top-left":return `top-${o} left-${o}`;case "bottom-right":return `bottom-${o} right-${o}`;case "bottom-left":return `bottom-${o} left-${o}`;default:return `top-${o} right-${o}`}},"getPosition"),Ou=a(({items:r,onClose:o,position:n="top-right",offset:a=4})=>{let d=useMemo(()=>n.startsWith("top")?"top":"bottom",[n]);return jsx("div",{className:`fixed flex min-w-0 max-w-xs w-full flex-col z-50 gap-2 ${Pa(n,a)}`,children:r.map(s=>jsx(Jr,{transitionDirection:d,...s,onClose:o},s.id))})},"ToastsList");var Gu=a(({onChange:r,disabled:o,multiple:n,dragText:a$1="Drop file to upload",className:d})=>{let[s,p]=useState(false),[w,x]=useState(false),[R,E]=useState(false);return useEffect(()=>{if(o)return;let g=0,I=a(k=>{k.preventDefault(),g++,g===1&&p(true);},"handleDragEnter"),B=a(k=>{k.preventDefault(),g--,g===0&&p(false);},"handleDragLeave"),t=a(k=>{k.preventDefault();},"handleDragOver"),z=a(async k=>{if(k.preventDefault(),g=0,p(false),!w)try{x(!0);let P=await lb(k.dataTransfer.items);r(n?P:P.length>0?[P[0]]:[]);}catch(P){console.error("\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u0447\u0438\u0442\u0430\u043D\u043D\u0456 \u0444\u0430\u0439\u043B\u0456\u0432:",P);}finally{x(false);}},"handleDrop");return document.addEventListener("dragenter",I),document.addEventListener("dragleave",B),document.addEventListener("dragover",t),document.addEventListener("drop",z),()=>{document.removeEventListener("dragenter",I),document.removeEventListener("dragleave",B),document.removeEventListener("dragover",t),document.removeEventListener("drop",z);}},[o,w,n,r]),useEffect(()=>{E(true);},[]),R&&s?createPortal(jsx("div",{className:`fixed top-0 bottom-0 left-0 right-0 flex items-center justify-center bg-[rgba(251,250,250,0.9)] dark:bg-[rgba(12,10,18,0.9)] z-9999 ${d}`,children:jsx(Ya,{variant:"h3",className:"px-3 py-2 bg-white dark:bg-neutral-800 rounded-md border border-gray-200 dark:border-neutral-700",children:a$1})}),document.body):null},"GlobalDropZone");
287
- export{vc as Container,gu as CopyToClipboard,Pu as DatePicker,Zr as DatePickerCalendar,Xd as FileViewer,tl as FullscreenCard,Gu as GlobalDropZone,Wo as Graph2D,rc as PageContent,Ks as PageLayout,Dc as SplitterLayout,lo as Styled,oo as StyledContainer,io as StyledMain,sc as SubNav,Ou as ToastsList,ru as Typewriter};//# sourceMappingURL=index.mjs.map
286
+ ${Sa(o)} ${Da(o)}`,children:jsxs("div",{className:"flex p-4 items-center",style:{wordBreak:"break-word"},children:[n,s&&jsx("div",{className:"ms-auto self-start flex",children:jsx("button",{type:"button",className:"inline-flex shrink-0 justify-center items-center size-5 rounded-lg opacity-50 hover:opacity-100 focus:outline-hidden focus:opacity-100 cursor-pointer border-none","aria-label":"Close",onClick:I,children:jsxs("svg",{className:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[jsx("path",{d:"M18 6 6 18"}),jsx("path",{d:"m6 6 12 12"})]})})})]})})},"Toast");var Pa=a((r,o)=>{switch(r){case "top-right":return `top-${o} right-${o}`;case "top-left":return `top-${o} left-${o}`;case "bottom-right":return `bottom-${o} right-${o}`;case "bottom-left":return `bottom-${o} left-${o}`;default:return `top-${o} right-${o}`}},"getPosition"),Wu=a(({items:r,onClose:o,position:n="top-right",offset:a=4})=>{let d=useMemo(()=>n.startsWith("top")?"top":"bottom",[n]);return jsx("div",{className:`fixed flex min-w-0 max-w-xs w-full flex-col z-50 gap-2 ${Pa(n,a)}`,children:r.map(s=>jsx(Jr,{transitionDirection:d,...s,onClose:o},s.id))})},"ToastsList");var Ju=a(({onChange:r,disabled:o,multiple:n,dragText:a$1="Drop file to upload",className:d})=>{let[s,p]=useState(false),[w,x]=useState(false),[R,E]=useState(false);return useEffect(()=>{if(o)return;let g=0,I=a(k=>{k.preventDefault(),g++,g===1&&p(true);},"handleDragEnter"),B=a(k=>{k.preventDefault(),g--,g===0&&p(false);},"handleDragLeave"),t=a(k=>{k.preventDefault();},"handleDragOver"),z=a(async k=>{if(k.preventDefault(),g=0,p(false),!w)try{x(!0);let P=await nb(k.dataTransfer.items);r(n?P:P.length>0?[P[0]]:[]);}catch(P){console.error("\u041F\u043E\u043C\u0438\u043B\u043A\u0430 \u043F\u0440\u0438 \u0447\u0438\u0442\u0430\u043D\u043D\u0456 \u0444\u0430\u0439\u043B\u0456\u0432:",P);}finally{x(false);}},"handleDrop");return document.addEventListener("dragenter",I),document.addEventListener("dragleave",B),document.addEventListener("dragover",t),document.addEventListener("drop",z),()=>{document.removeEventListener("dragenter",I),document.removeEventListener("dragleave",B),document.removeEventListener("dragover",t),document.removeEventListener("drop",z);}},[o,w,n,r]),useEffect(()=>{E(true);},[]),R&&s?createPortal(jsx("div",{className:`fixed top-0 bottom-0 left-0 right-0 flex items-center justify-center bg-[rgba(251,250,250,0.9)] dark:bg-[rgba(12,10,18,0.9)] z-9999 ${d}`,children:jsx(_a,{variant:"h3",className:"px-3 py-2 bg-white dark:bg-neutral-800 rounded-md border border-gray-200 dark:border-neutral-700",children:a$1})}),document.body):null},"GlobalDropZone");
287
+ export{wc as Container,mu as CopyToClipboard,Eu as DatePicker,Zr as DatePickerCalendar,qd as FileViewer,ol as FullscreenCard,Ju as GlobalDropZone,Wo as Graph2D,nc as PageContent,Qs as PageLayout,Mc as SplitterLayout,lo as Styled,oo as StyledContainer,io as StyledMain,lc as SubNav,Wu as ToastsList,nu as Typewriter};//# sourceMappingURL=index.mjs.map
288
288
  //# sourceMappingURL=index.mjs.map