vzcode 3.1.0 → 3.2.0

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.
@@ -120,7 +120,7 @@ ${String(t)}`),new Response(n,{status:500,headers:{"Content-Type":"text/plain"}}
120
120
  "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
121
121
  );
122
122
  `}});if($r(t))return Kr.createElement(K$,{renderAppShell:e,title:"Unhandled Thrown Response!"},Kr.createElement("h1",{style:{fontSize:"24px"}},t.status," ",t.statusText),n);let r;if(t instanceof Error)r=t;else{let i=t==null?"Unknown Error":typeof t=="object"&&"toString"in t?t.toString():JSON.stringify(t);r=new Error(i)}return Kr.createElement(K$,{renderAppShell:e,title:"Application Error!"},Kr.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),Kr.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},r.stack),n)}function sne({hasRootLayout:t}){let e=Md();if(t===void 0)throw new Error("Missing 'hasRootLayout' prop");return Kr.createElement(PN,{renderAppShell:!t,error:e})}function one(t){const e={};for(const n of t.matches)ane(e,n);return e}function ane(t,e){e=Array.isArray(e)?e:[e];for(const n of e)t[n.id]={links:n.links,meta:n.meta,default:lne}}var lne=()=>null,J$="/__manifest",une="use",eT=Z5[une];function cne(t){if(eT)return eT(t);throw new Error("React Router v7 requires React 19+ for RSC features.")}async function fne({request:t,serverResponse:e,createFromReadableStream:n,renderHTML:r,hydrate:i=!0}){const s=new URL(t.url);if(dne(s)||pne(s)||t.headers.has("rsc-action-id")||e.headers.get("React-Router-Resource")==="true")return e;if(!e.body)throw new Error("Missing body in server response");const l=e.clone();let u=null;i&&(u=e.clone());const c=e.body;let f,d=[];const p=()=>f?new ReadableStream({start(v){f.forEach(S=>v.enqueue(S)),d.push(v)}}):(f=[],c.pipeThrough(new TransformStream({transform(v,S){f.push(v),S.enqueue(v),d.forEach(x=>x.enqueue(v))},flush(){d.forEach(v=>v.close()),d=[]}})));let g=null;const O=()=>{const v=Promise.resolve(n(p()));return Object.defineProperties(v,{_deepestRenderedBoundaryId:{get(){return g},set(S){g=S}},formState:{get(){return v.then(S=>S.type==="render"?S.formState:void 0)}}})};let y,b;try{if(!l.body)throw new Error("Failed to clone server response");const v=await n(l.body);if(e.status===lk&&v.type==="redirect"){if(go(v.location))throw new Error("Invalid redirect location");const C=new Headers(e.headers);return C.delete("Content-Encoding"),C.delete("Content-Length"),C.delete("Content-Type"),C.delete("X-Remix-Response"),C.set("Location",v.location),new Response(u?.body||"",{headers:C,status:v.status,statusText:e.statusText})}let S=new Headers,x=e.status,P=e.statusText,E=await r(O,{onError(C){if(typeof C=="object"&&C&&"digest"in C&&typeof C.digest=="string"){if(y=Hw(C.digest),y)return C.digest;let I=Yw(C.digest);if(I)return b=I,x=I.status,P=I.statusText,C.digest}},onHeaders(C){for(const[I,T]of C)S.append(I,T)}});const D=new Headers(S);for(const[C,I]of e.headers)D.append(C,I);if(D.set("Content-Type","text/html; charset=utf-8"),y){if(go(y.location))throw new Error("Invalid redirect location");return D.set("Location",y.location),new Response(E,{status:y.status,headers:D})}const R=new TransformStream({flush(C){if(y){if(go(y.location))return;C.enqueue(new TextEncoder().encode(`<meta http-equiv="refresh" content="0;url=${I$(y.location)}"/>`))}}});if(!i)return new Response(E.pipeThrough(R),{status:x,statusText:P,headers:D});if(!u?.body)throw new Error("Failed to clone server response");const _=E.pipeThrough(G$(u.body)).pipeThrough(R);return new Response(_,{status:x,statusText:P,headers:D})}catch(v){if(v instanceof Response)return v;if(y){if(go(y.location))throw new Error("Invalid redirect location");return new Response(`Redirect: ${y.location}`,{status:y.status,headers:{Location:y.location}})}try{let S=b??v,[x,P]=$r(S)?[S.status,S.statusText]:[500,""],E,D=new Headers;const R=await r(()=>{const B=Promise.resolve(n(p())).then(A=>Object.assign(A,{status:x,errors:g?{[g]:S}:{}}));return Object.defineProperties(B,{_deepestRenderedBoundaryId:{get(){return g},set(A){g=A}},formState:{get(){return B.then(A=>A.type==="render"?A.formState:void 0)}}})},{onError(T){if(typeof T=="object"&&T&&"digest"in T&&typeof T.digest=="string"){if(E=Hw(T.digest),E)return T.digest;let B=Yw(T.digest);if(B)return x=B.status,P=B.statusText,T.digest}},onHeaders(T){for(const[B,A]of T)D.append(B,A)}}),_=new Headers(D);for(const[T,B]of e.headers)_.append(T,B);if(_.set("Content-Type","text/html; charset=utf-8"),E){if(go(E.location))throw new Error("Invalid redirect location");return _.set("Location",E.location),new Response(R,{status:E.status,headers:_})}const C=new TransformStream({flush(T){if(E){if(go(E.location))return;T.enqueue(new TextEncoder().encode(`<meta http-equiv="refresh" content="0;url=${I$(E.location)}"/>`))}}});if(!i)return new Response(R.pipeThrough(C),{status:x,statusText:P,headers:_});if(!u?.body)throw new Error("Failed to clone server response");const I=R.pipeThrough(G$(u.body)).pipeThrough(C);return new Response(I,{status:x,statusText:P,headers:_})}catch{}throw v}}function hne({getPayload:t}){const e=t(),n=cne(e);if(n.type==="redirect")throw go(n.location)?new Error("Invalid redirect location"):new Response(null,{status:n.status,headers:{Location:n.location}});if(n.type!=="render")return null;let r={...n.loaderData};for(const a of n.matches)jd(a.id,a.clientLoader,a.hasLoader,!1)&&(a.hydrateFallbackElement||!a.hasLoader)&&delete r[a.id];const i={get _deepestRenderedBoundaryId(){return e._deepestRenderedBoundaryId??null},set _deepestRenderedBoundaryId(a){e._deepestRenderedBoundaryId=a},actionData:n.actionData,actionHeaders:{},basename:n.basename,errors:n.errors,loaderData:r,loaderHeaders:{},location:n.location,statusCode:200,matches:n.matches.map(a=>({params:a.params,pathname:a.pathname,pathnameBase:a.pathnameBase,route:{id:a.id,action:a.hasAction||!!a.clientAction,handle:a.handle,hasErrorBoundary:a.hasErrorBoundary,loader:a.hasLoader||!!a.clientLoader,index:a.index,path:a.path,shouldRevalidate:a.shouldRevalidate}}))},s=Sk(n.matches.reduceRight((a,l)=>{const u={id:l.id,action:l.hasAction||!!l.clientAction,element:l.element,errorElement:l.errorElement,handle:l.handle,hasErrorBoundary:!!l.errorElement,hydrateFallbackElement:l.hydrateFallbackElement,index:l.index,loader:l.hasLoader||!!l.clientLoader,path:l.path,shouldRevalidate:l.shouldRevalidate};return a.length>0&&(u.children=a),[u]},[]),i),o={future:{v8_middleware:!1,v8_trailingSlashAwareDataRequests:!0,v8_passThroughRequests:!0},isSpaMode:!1,ssr:!0,criticalCss:"",manifest:{routes:{},version:"1",url:"",entry:{module:"",imports:[]}},routeDiscovery:n.routeDiscovery.mode==="initial"?{mode:"initial",manifestPath:J$}:{mode:"lazy",manifestPath:n.routeDiscovery.manifestPath||J$},routeModules:one(n)};return M.createElement(Kx.Provider,{value:!0},M.createElement(ine,{location:n.location},M.createElement(aa.Provider,{value:o},M.createElement(wk,{context:i,router:s,hydrate:!1,nonce:n.nonce}))))}function dne(t){return t.pathname.endsWith(".rsc")}function pne(t){return t.pathname.endsWith(".manifest")}function _N({state:t,routes:e,getRouteInfo:n,location:r,basename:i,isSpaMode:s}){let o={...t,loaderData:{...t.loaderData}},a=_g(e,r,i);if(a)for(let l of a){let u=l.route.id,c=n(u);jd(u,c.clientLoader,c.hasLoader,s)&&(c.hasHydrateFallback||!c.hasLoader)?delete o.loaderData[u]:c.hasLoader||(o.loaderData[u]=null)}return o}var Rk=V5();function EN(t){return M.createElement(gj,{flushSync:Rk.flushSync,...t})}var Qt=null,rh=null;function mne(){if(!Qt&&window.__reactRouterContext&&window.__reactRouterManifest&&window.__reactRouterRouteModules){if(window.__reactRouterManifest.sri===!0){const t=document.querySelector("script[rr-importmap]");if(t?.textContent)try{window.__reactRouterManifest.sri=JSON.parse(t.textContent).integrity}catch(e){console.error("Failed to parse import map",e)}}Qt={context:window.__reactRouterContext,manifest:window.__reactRouterManifest,routeModules:window.__reactRouterRouteModules,stateDecodingPromise:void 0,router:void 0,routerInitialized:!1}}}function gne({getContext:t,instrumentations:e}){if(mne(),!Qt)throw new Error("You must be using the SSR features of React Router in order to skip passing a `router` prop to `<RouterProvider>`");let n=Qt;if(!Qt.stateDecodingPromise){let o=Qt.context.stream;It(o,"No stream found for single fetch decoding"),Qt.context.stream=void 0,Qt.stateDecodingPromise=Dg(o,window).then(a=>{Qt.context.state=a.value,n.stateDecodingPromise.value=!0}).catch(a=>{n.stateDecodingPromise.error=a})}if(Qt.stateDecodingPromise.error)throw Qt.stateDecodingPromise.error;if(!Qt.stateDecodingPromise.value)throw Qt.stateDecodingPromise;let r=Dd(Qt.manifest.routes,Qt.routeModules,Qt.context.state,Qt.context.ssr,Qt.context.isSpaMode),i;if(Qt.context.isSpaMode){let{loaderData:o}=Qt.context.state;Qt.manifest.routes.root?.hasLoader&&o&&"root"in o&&(i={loaderData:{root:o.root}})}else i=_N({state:Qt.context.state,routes:r,getRouteInfo:o=>({clientLoader:Qt.routeModules[o]?.clientLoader,hasLoader:Qt.manifest.routes[o]?.hasLoader===!0,hasHydrateFallback:Qt.routeModules[o]?.HydrateFallback!=null}),location:window.location,basename:window.__reactRouterContext?.basename,isSpaMode:Qt.context.isSpaMode});window.history.state&&window.history.state.masked&&window.history.replaceState({...window.history.state,masked:void 0},"");let s=$d({routes:r,history:Pg(),basename:Qt.context.basename,getContext:t,hydrationData:i,hydrationRouteProperties:Id,instrumentations:e,mapRouteProperties:Ou,future:{v8_passThroughRequests:Qt.context.future.v8_passThroughRequests},dataStrategy:jj(()=>s,Qt.manifest,Qt.routeModules,Qt.context.ssr,Qt.context.basename,Qt.context.future.v8_trailingSlashAwareDataRequests),patchRoutesOnNavigation:Xj(()=>s,Qt.manifest,Qt.routeModules,Qt.context.ssr,Qt.context.routeDiscovery,Qt.context.isSpaMode,Qt.context.basename)});return Qt.router=s,s.state.initialized&&(Qt.routerInitialized=!0,s.initialize()),s.createRoutesForHMR=Zj,window.__reactRouterDataRouter=s,s}function One(t){rh||(rh=gne({getContext:t.getContext,instrumentations:t.instrumentations}));let[e,n]=M.useState(void 0);M.useEffect(()=>{},[]),M.useEffect(()=>{},[e]);let[r,i]=M.useState(rh.state.location);return M.useLayoutEffect(()=>{Qt&&Qt.router&&!Qt.routerInitialized&&(Qt.routerInitialized=!0,Qt.router.initialize())},[]),M.useLayoutEffect(()=>{if(Qt&&Qt.router)return Qt.router.subscribe(s=>{s.location!==r&&i(s.location)})},[r]),It(Qt,"ssrInfo unavailable for HydratedRouter"),Hj(rh,Qt.manifest,Qt.routeModules,Qt.context.ssr,Qt.context.routeDiscovery,Qt.context.isSpaMode),M.createElement(M.Fragment,null,M.createElement(aa.Provider,{value:{manifest:Qt.manifest,routeModules:Qt.routeModules,future:Qt.context.future,criticalCss:e,ssr:Qt.context.ssr,isSpaMode:Qt.context.isSpaMode,routeDiscovery:Qt.context.routeDiscovery}},M.createElement(gk,{location:r},M.createElement(EN,{router:rh,useTransitions:t.useTransitions,onError:t.onError}))),M.createElement(M.Fragment,null))}const yne=Object.freeze(Object.defineProperty({__proto__:null,Await:XJ,BrowserRouter:tN,Form:yk,HashRouter:ote,HydratedRouter:One,IDLE_BLOCKER:Ua,IDLE_FETCHER:Cg,IDLE_NAVIGATION:Th,Link:Ok,Links:Xee,MemoryRouter:ZJ,Meta:Kee,NavLink:rN,Navigate:VJ,NavigationType:p4,Outlet:yj,PrefetchPageLinks:mk,Route:vj,Router:pl,RouterContextProvider:ko,RouterProvider:EN,Routes:WJ,Scripts:Kj,ScrollRestoration:iN,ServerRouter:wte,StaticRouter:mte,StaticRouterProvider:wk,UNSAFE_AwaitContextProvider:bJ,UNSAFE_DataRouterContext:To,UNSAFE_DataRouterStateContext:oa,UNSAFE_ErrorResponseImpl:ki,UNSAFE_FetchersContext:Qd,UNSAFE_FrameworkContext:aa,UNSAFE_LocationContext:gu,UNSAFE_NavigationContext:hi,UNSAFE_RSCDefaultRootErrorBoundary:sne,UNSAFE_RemixErrorBoundary:gk,UNSAFE_RouteContext:zi,UNSAFE_ServerMode:mN,UNSAFE_SingleFetchRedirectSymbol:sa,UNSAFE_ViewTransitionContext:Td,UNSAFE_WithComponentProps:JJ,UNSAFE_WithErrorBoundaryProps:tee,UNSAFE_WithHydrateFallbackProps:eee,UNSAFE_createBrowserHistory:Pg,UNSAFE_createClientRoutes:Dd,UNSAFE_createClientRoutesWithHMRRevalidationOptOut:Zj,UNSAFE_createHashHistory:zx,UNSAFE_createMemoryHistory:qx,UNSAFE_createRouter:$d,UNSAFE_decodeViaTurboStream:Dg,UNSAFE_getHydrationData:_N,UNSAFE_getPatchRoutesOnNavigationFunction:Xj,UNSAFE_getTurboStreamSingleFetchDataStrategy:jj,UNSAFE_hydrationRouteProperties:Id,UNSAFE_invariant:It,UNSAFE_mapRouteProperties:Ou,UNSAFE_shouldHydrateRouteLoader:jd,UNSAFE_useFogOFWarDiscovery:Hj,UNSAFE_useScrollRestoration:lN,UNSAFE_withComponentProps:wj,UNSAFE_withErrorBoundaryProps:Pj,UNSAFE_withHydrateFallbackProps:xj,createBrowserRouter:rte,createContext:CK,createCookie:kk,createCookieSessionStorage:Kte,createHashRouter:ite,createMemoryRouter:mj,createMemorySessionStorage:Jte,createPath:br,createRequestHandler:Ute,createRoutesFromChildren:ad,createRoutesFromElements:GJ,createRoutesStub:Ste,createSearchParams:Fm,createSession:Ck,createSessionStorage:xN,createStaticHandler:Ote,createStaticRouter:Sk,data:k4,generatePath:UK,href:ene,isCookie:Pk,isRouteErrorResponse:$r,isSession:Gte,matchPath:Vc,matchRoutes:_g,parsePath:_i,redirect:Ad,redirectDocument:P4,renderMatches:KJ,replace:_4,resolvePath:S4,unstable_HistoryRouter:nN,unstable_RSCStaticRouter:hne,unstable_routeRSCServerRequest:fne,unstable_setDevServerHooks:Dte,unstable_usePrompt:pte,unstable_useRoute:NJ,unstable_useRouterState:LJ,useActionData:Mg,useAsyncError:IJ,useAsyncValue:hj,useBeforeUnload:hte,useBlocker:dj,useFetcher:cte,useFetchers:fte,useFormAction:aN,useHref:nj,useInRouterContext:dl,useLinkClickHandler:oN,useLoaderData:Qg,useLocation:di,useMatch:kJ,useMatches:Tg,useNavigate:Ag,useNavigation:fj,useNavigationType:xJ,useOutlet:oj,useOutletContext:_J,useParams:$g,useResolvedPath:of,useRevalidator:QJ,useRouteError:Md,useRouteLoaderData:MJ,useRoutes:aj,useSearchParams:ate,useSubmit:bk,useViewTransitionState:uN},Symbol.toStringTag,{value:"Module"})),{useSearchParams:vne}=yne,bne=({content:t,openTab:e,setActiveFileId:n,tabList:r,activeFileId:i})=>{const[s,o]=vne(),a=M.useMemo(()=>({file:s.get("file"),tabs:s.get("tabs")}),[s]),l=M.useRef(!1);M.useEffect(()=>{if(l.current||!t)return;const{tabList:f,activeFileId:d}=PK({tabStateParams:a,content:t});l.current=!0,f.forEach(e),n(d)},[t,s,n,e,l,a]);const u=M.useRef(t);M.useEffect(()=>{u.current=t},[t]);const c=M.useRef(o);M.useEffect(()=>{c.current=o},[o]),M.useEffect(()=>{if(!u.current)return;const f=_K({tabList:r,activeFileId:i,content:u.current});c.current(d=>{const p=new URLSearchParams(d);return f.file?p.set("file",f.file):p.delete("file"),f.tabs?p.set("tabs",f.tabs):p.delete("tabs"),p})},[r,i])},yu=(t,e)=>{if(t.id===e)return t;if(t.type==="splitPane")for(const n of t.children){const r=yu(n,e);if(r)return r}},al=({pane:t,activePaneId:e,newTabList:n,newActiveFileId:r})=>t.type==="splitPane"?{...t,children:t.children.map(i=>al({pane:i,activePaneId:e,newTabList:n,newActiveFileId:r}))}:t.id===e?{...t,tabList:n!==void 0?n:t.tabList,activeFileId:r!==void 0?r:t.activeFileId}:t,wne=(t,e)=>{if(e.type!=="close_tabs")return t;const{pane:n,activePaneId:r}=t,i=yu(n,r);if(i.type!=="leafPane")throw new Error("closeTabsReducer: activePane is not a leafPane");const s=i.tabList.filter(l=>!e.fileIdsToClose.includes(l.fileId));if(!e.fileIdsToClose.includes(i.activeFileId))return{...t,pane:al({pane:n,activePaneId:r,newTabList:s})};let o=null;const a=i.tabList.findIndex(l=>l.fileId===i.activeFileId);for(let l=a-1;l>=0;l--)if(!e.fileIdsToClose.includes(i.tabList[l].fileId)){o=i.tabList[l].fileId;break}if(!o){for(let l=a+1;l<i.tabList.length;l++)if(!e.fileIdsToClose.includes(i.tabList[l].fileId)){o=i.tabList[l].fileId;break}}return{...t,pane:al({pane:n,activePaneId:r,newTabList:s,newActiveFileId:o})}},Sne=(t,e)=>{if(e.type!=="open_tab")return t;const{pane:n,activePaneId:r}=t,i=yu(n,r);if(i.type!=="leafPane")throw new Error("closeTabsReducer: activePane is not a leafPane");const s=i.tabList.findIndex(d=>d.fileId===e.fileId),o=s!==-1,a=o&&i.tabList[s].isTransient,l=i.tabList.findIndex(d=>d.isTransient&&d.fileId!==e.fileId),u={fileId:e.fileId,isTransient:e.isTransient};let c;o?a?c=i.tabList.map(d=>d.fileId===e.fileId?u:d):c=[...i.tabList]:l!==-1?(c=[...i.tabList],c[l]=u):c=[...i.tabList,u];const f=!e.isTransient;return{...t,pane:al({pane:n,activePaneId:r,newTabList:c,newActiveFileId:e.fileId}),editorWantsFocus:f}},xne=(t,e)=>{if(e.type!=="set_active_file_id")return t;const{pane:n,activePaneId:r}=t;if(yu(n,r).type!=="leafPane")throw new Error("closeTabsReducer: activePane is not a leafPane");return{...t,pane:al({pane:n,activePaneId:r,newActiveFileId:e.activeFileId})}},kne=(t,e)=>{if(e.type!=="set_active_file_left")return t;const{pane:n,activePaneId:r}=t,i=yu(n,r);if(i.type!=="leafPane")throw new Error("closeTabsReducer: activePane is not a leafPane");let s=i.tabList.findIndex(o=>o.fileId===i.activeFileId);return s-=1,s<0&&(s=i.tabList.length-1),{...t,pane:al({pane:n,activePaneId:r,newActiveFileId:i.tabList[s].fileId})}},Pne=(t,e)=>{if(e.type!=="set_active_file_right")return t;const{pane:n,activePaneId:r}=t,i=yu(n,r);if(i.type!=="leafPane")throw new Error("closeTabsReducer: activePane is not a leafPane");let s=i.tabList.findIndex(o=>o.fileId===i.activeFileId);return s+=1,s>i.tabList.length-1&&(s=0),{...t,pane:al({pane:n,activePaneId:r,newActiveFileId:i.tabList[s].fileId})}},_ne=(t,e)=>e.type==="set_is_settings_open"?{...t,isSettingsOpen:e.value}:t,Ene=(t,e)=>e.type==="set_is_doc_open"?{...t,isDocOpen:e.value}:t,Cne=(t,e)=>e.type==="set_theme"?{...t,theme:e.themeLabel}:t,Rne=(t,e)=>e.type==="editor_no_longer_wants_focus"?{...t,editorWantsFocus:!1}:t,Ane=(t,e)=>e.type==="set_username"?{...t,username:e.username}:t;function $ne(t,e){const n=t?.data?.files;if(!n)return{};const r=Object.keys(n),i={};for(let s=0;s<r.length;s++){const o=n[r[s]];if(o.text){const a=o.name,l=o.text.split(`
123
- `),u=[];for(let c=0;c<l.length;c++){const f=l[c].toLowerCase().indexOf(e.toLowerCase());f!==-1&&u.push({line:c+1,index:f,text:l[c],isClosed:!1})}u.length>0&&(i[r[s]]={name:a,matches:u,visibility:"open"})}}return i}function Tne(t,e,n){return{...t,[e]:{...t[e],visibility:n}}}const Qne=(t,e)=>e.type==="set_is_search_open"?{...t,isSearchOpen:e.value}:t,Mne=(t,e)=>e.type==="set_search"?{...t,search:{...t.search,pattern:e.value,results:{},focusedIndex:0,focusedChildIndex:null,focused:!0}}:t,Ine=(t,e)=>e.type==="set_search_results"?{...t,search:{...t.search,pattern:t.search.pattern,results:$ne(e.files,t.search.pattern),focused:t.search.focused}}:t,Dne=(t,e)=>e.type==="set_search_file_visibility"?{...t,search:{...t.search,pattern:t.search.pattern,results:Tne(t.search.results,e.id,e.visibility)}}:t,jne=(t,e)=>e.type==="hide_search_results_line"?{...t,search:{...t.search,results:{...t.search.results,[e.id]:{...t.search.results[e.id],matches:t.search.results[e.id].matches.filter((n,r)=>n.line!==e.line)}}}}:t,Nne=(t,e)=>e.type==="set_active_search_index"?{...t,search:{...t.search,focusedIndex:e.focusedIndex,focusedChildIndex:e.childIndex}}:t,Lne=(t,e)=>e.type==="toggle_search_focused"?{...t,search:{...t.search,focused:!t.search.focused}}:t,Fne=(t,e)=>e.type==="set_is_ai_chat_open"?{...t,isAIChatOpen:e.value,isSearchOpen:e.value?!1:t.isSearchOpen}:t,Bne=(t,e)=>e.type==="toggle_ai_chat_focused"?{...t,aiChatFocused:!t.aiChatFocused}:t,qne=(t,e)=>e.type==="set_ai_chat_mode"?{...t,aiChatMode:e.mode}:t,zne=(t,e)=>e.type==="toggle_auto_follow"?{...t,enableAutoFollow:!t.enableAutoFollow}:t,Une=(t,e)=>{if(e.type==="update_presence_indicator"){const n=t.sidebarPresenceIndicators.find(r=>r.username===e.presenceIndicator.username);return{...t,sidebarPresenceIndicators:n?t.sidebarPresenceIndicators.map(r=>r.username===e.presenceIndicator.username?e.presenceIndicator:r):[...t.sidebarPresenceIndicators,e.presenceIndicator]}}return t},Zne=(t,e)=>{if(e.type!=="split_current_pane")return t;const n=t.activePaneId,r={id:`${n}-1`,type:"leafPane",tabList:[],activeFileId:null},i={id:`${n}-2`,type:"leafPane",tabList:[],activeFileId:null},s={id:n,type:"splitPane",orientation:"horizontal",children:[r,i]},o=al({pane:t.pane,activePaneId:n,newTabList:void 0,newActiveFileId:void 0}),a=(u,c)=>u.id===c?s:u.type==="splitPane"?{...u,children:u.children.map(f=>a(f,c))}:u,l=a(o,n);return{...t,pane:l,activePaneId:r.id}},Vne=(t,e)=>e.type==="set_is_visual_editor_open"?{...t,isVisualEditorOpen:e.value}:t,Wne=({defaultTheme:t,initialUsername:e="Anonymous",initialSidebarView:n="ai-chat"})=>({pane:{id:"root",type:"leafPane",tabList:[],activeFileId:null},activePaneId:"root",theme:t,search:{pattern:"",results:{},focused:!1,focusedIndex:null,focusedChildIndex:null},isVisualEditorOpen:n==="visual",isSearchOpen:!1,isAIChatOpen:n==="ai-chat",aiChatFocused:!1,aiChatMode:"edit",isSettingsOpen:!1,isDocOpen:!1,editorWantsFocus:!1,username:e,enableAutoFollow:!1,sidebarPresenceIndicators:[]}),Xne=[xne,kne,Pne,Sne,wne,Cne,Mne,Ine,Dne,jne,Nne,Lne,Qne,Fne,Vne,Bne,qne,_ne,Ene,Rne,Ane,zne,Une,Zne],Hne=(t,e)=>Xne.reduce((n,r)=>r(n,e),t),Yne=({docPresence:t,enableAutoFollow:e,openTab:n,activePane:r})=>{const i=M.useRef(e);M.useEffect(()=>{i.current=e},[e]);const s=M.useRef(r?.activeFileId);M.useEffect(()=>{s.current=r?.activeFileId},[r?.activeFileId]),M.useEffect(()=>{if(!t)return;const o=(a,l)=>{if(!l||!i.current)return;const u=l.start[1];u!==s.current&&n({fileId:u,isTransient:!0})};return t.on("receive",o),()=>{t.off("receive",o)}},[t,n])},Gne=t=>t?.isRetry==="true"||t?.isUndo==="true",Kne=t=>t?t.filter(e=>e.role==="user").map(e=>e.content):[];function Jne({content:t,submitOperation:e,aiChatMode:n,aiChatEndpoint:r,aiChatOptions:i,autoForkAndRetryAI:s,handleChatError:o,onAIChatMessageSubmitted:a}){const[l,u]=M.useState(""),c=!1,[f,d]=M.useState(()=>Cb()),[p,g]=M.useState(null),O=p||f,y=t?.chats?.[O],b=M.useMemo(()=>Kne(y?.messages),[y?.messages]),[v,S]=M.useState(-1),[x,P]=M.useState(""),[E,D]=M.useState(null),R=M.useCallback((B,A)=>{D(B),B&&o&&o(B,A)},[o]);M.useEffect(()=>{const B=t?.currentChatDraft;typeof B=="string"&&B.trim()&&(u(B),e(A=>{const X={...A};return X.currentChatDraft=void 0,X}))},[t?.currentChatDraft]);const _=M.useCallback(()=>{if(b.length===0)return;v===-1&&P(l);const B=v<b.length-1?v+1:v;S(B),u(b[b.length-1-B])},[b,v,l]),C=M.useCallback(()=>{if(v===-1)return;const B=v-1;B===-1?(S(-1),u(x),P("")):(S(B),u(b[b.length-1-B]))},[b,v,x]),I=M.useCallback(()=>{v!==-1&&(S(-1),P(""))},[v]),T=M.useCallback(async(B,A)=>{const X=B||l;if(!X||typeof X!="string"||!X.trim())return;const G=l.trim();u(""),S(-1),P(""),R(null);const W=A?.isRetry==="true",te=A?.isUndo==="true";a&&i?.vizId&&a({messageLength:X.trim().length,isRetry:W,isUndo:te});const J=Gne(A);let U;if(J)U=O;else{const z=Cb();d(z),g(z),U=z}try{const z=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...i,content:X.trim(),chatId:U,mode:n,...A})});if(!z.ok)throw new Error(`HTTP error! status: ${z.status}`);const Y=await z.json();if(Y.outcome==="failure"&&Y.error){const L=Y.error.message;if(L==="You do not have permission to use AI chat on this visualization. Only users with edit access can use this feature. Fork the viz to edit it.")if(s)try{await s(G,n);return}catch(se){console.error("Auto-fork failed:",se),R("Failed to fork visualization. Please try forking manually.");return}else{R(L,X.trim());return}R(L,X.trim());return}return Y}catch(z){console.error("Error getting AI response:",z),R("Failed to send message. Please try again.",X.trim())}},[l,r,i,O,n,s,a,c,R]);return{aiChatMessage:l,setAIChatMessage:u,currentChatId:f,selectedChatId:p,setSelectedChatId:g,aiErrorMessage:E,setAIErrorMessage:R,handleSendMessage:T,navigateMessageHistoryUp:_,navigateMessageHistoryDown:C,resetMessageHistoryNavigation:I}}const ere=({content:t,shareDBDoc:e,submitOperation:n,localPresence:r,docPresence:i,prettierWorker:s,initialUsername:o,initialSidebarView:a,renderVisualEditorEmptyState:l,codeError:u=null,connected:c,pending:f,liveKitToken:d,setLiveKitToken:p,liveKitRoomName:g,setLiveKitRoom:O,liveKitConnection:y,setLiveKitConnection:b,aiChatEndpoint:v,aiChatOptions:S,autoForkAndRetryAI:x,clearStoredAIPrompt:P,getStoredAIPrompt:E,additionalWidgets:D,iframeRef:R,handleChatError:_,onAIChatMessageSubmitted:C})=>{const{prettierError:I,runPrettierRef:T}=mK({shareDBDoc:e,submitOperation:n,prettierWorker:s}),{runtimeError:B,handleRuntimeError:A,clearRuntimeError:X}=kK(),G=xK(n),W=M.useRef(null),te=M.useRef(null),J=M.useRef(null),U=R||J,z=B||I||u,[Y,L]=M.useReducer(Hne,{defaultTheme:yV,initialUsername:o,initialSidebarView:a},Wne),{pane:se,activePaneId:ee,theme:ue,search:Z,isSearchOpen:V,isVisualEditorOpen:H,isAIChatOpen:he,aiChatFocused:ve,isSettingsOpen:Ae,isDocOpen:Re,editorWantsFocus:F,username:me,enableAutoFollow:Oe,sidebarPresenceIndicators:ie,aiChatMode:re}=Y,pe=yu(se,ee);if(pe.type!=="leafPane")throw new Error("Expected leafPane");const{setActiveFileId:Me,setActiveFileLeft:je,setActiveFileRight:_e,openTab:q,closeTabs:ye,setTheme:xe,setIsSearchOpen:ce,setSearch:Se,setSearchResults:Ee,setSearchFileVisibility:Ue,setSearchLineVisibility:Ge,setSearchFocusedIndex:Ne,toggleSearchFocused:Ve,setIsVisualEditorOpen:qe,setIsAIChatOpen:Ke,toggleAIChatFocused:it,setAIChatMode:at,setIsSettingsOpen:kt,setIsDocOpen:We,closeSettings:St,closeDoc:Wt,editorNoLongerWantsFocus:jt,setUsername:At,toggleAutoFollow:Jt,updatePresenceIndicator:kn,splitCurrentPane:gn}=bV(L);bne({content:t,openTab:q,setActiveFileId:Me,tabList:pe.tabList,activeFileId:pe.activeFileId});const{isDirectoryOpen:ln,toggleDirectory:jn}=dK({activePane:pe,content:t}),un=wV();vV(un,ue);const{createFile:Xn,renameFile:Mn,deleteFile:Hn,createDirectory:An,renameDirectory:le,deleteDirectory:fe,deleteAllFiles:ge}=oK({submitOperation:n,closeTabs:ye,openTab:q,editorCache:un,content:t}),[Ce,Pe]=M.useState(!1),Be=M.useCallback(()=>{Pe(!0)},[]),Xe=M.useCallback(()=>{Pe(!1)},[]),He=M.useCallback(yn=>{Xn(yn),Pe(!1)},[Xn,Pe]),[Ze,lt]=M.useState(!1),ct=M.useCallback(()=>{lt(!0)},[]),pt=M.useCallback(()=>{lt(!1)},[]),gt=M.useCallback(yn=>{An(yn),lt(!1)},[An,lt]),ft=t?t.files:null;fK({closeTabs:ye,activeFileId:pe.activeFileId,activePaneId:ee,handleOpenCreateFileModal:Be,setActiveFileLeft:je,setActiveFileRight:_e,toggleSearchFocused:Ve,runPrettierRef:T,runCodeRef:G,sidebarRef:W,editorCache:un,codeEditorRef:te});const[dt,st]=M.useState(null);Yne({docPresence:i,enableAutoFollow:Oe,openTab:q,activePane:pe});const[bt,Nt]=M.useState(!1),{aiChatMessage:Bt,setAIChatMessage:On,currentChatId:zn,selectedChatId:Yn,setSelectedChatId:tr,aiErrorMessage:In,setAIErrorMessage:nr,handleSendMessage:Pt,navigateMessageHistoryUp:Zt,navigateMessageHistoryDown:Pn,resetMessageHistoryNavigation:Yt}=Jne({content:t,submitOperation:n,aiChatMode:re,aiChatEndpoint:v,aiChatOptions:S,autoForkAndRetryAI:x,handleChatError:_,onAIChatMessageSubmitted:C}),rr=M.useRef(null),Vt="config.json";return M.useEffect(()=>{let yn=null;for(const en in ft)if(ft[en].name===Vt){yn=en;break}if(!yn||!ft||!ft[yn])return;let _n;try{_n=JSON.parse(ft[yn].text)}catch{return}const ir=rr.current;if(rr.current=_n,!ir)return;const Nn={};for(const en in _n)_n[en]!==ir[en]&&(typeof _n[en]=="object"&&typeof ir[en]=="object"?JSON.stringify(_n[en])!==JSON.stringify(ir[en])&&(Nn[en]=_n[en]):Nn[en]=_n[en]);for(const en in ir)en in _n||(Nn[en]=void 0);if(Object.keys(Nn).length>0)try{U.current?.contentWindow?.postMessage(Nn)}catch(en){console.error("Failed to send config changes to iframe:",en)}},[ft,U]),{content:t,shareDBDoc:e,submitOperation:n,localPresence:r,docPresence:i,files:ft,createFile:Xn,renameFile:Mn,deleteFile:Hn,createDirectory:An,renameDirectory:le,deleteDirectory:fe,deleteAllFiles:ge,setActiveFileId:Me,setActiveFileLeft:je,setActiveFileRight:_e,activePaneId:ee,pane:se,activePane:pe,openTab:q,closeTabs:ye,search:Z,isSearchOpen:V,setIsSearchOpen:ce,setSearch:Se,setSearchResults:Ee,setSearchFileVisibility:Ue,setSearchLineVisibility:Ge,setSearchFocusedIndex:Ne,toggleSearchFocused:Ve,renderVisualEditorEmptyState:l,isVisualEditorOpen:H,setIsVisualEditorOpen:qe,isAIChatOpen:he,setIsAIChatOpen:Ke,aiChatFocused:ve,toggleAIChatFocused:it,aiChatMode:Y.aiChatMode,setAIChatMode:at,aiChatEndpoint:v,aiChatOptions:S,isSettingsOpen:Ae,setIsSettingsOpen:kt,closeSettings:St,isDocOpen:Re,setIsDocOpen:We,closeDoc:Wt,theme:ue,setTheme:xe,username:me,setUsername:At,isDirectoryOpen:ln,toggleDirectory:jn,editorCache:un,editorWantsFocus:F,editorNoLongerWantsFocus:jt,errorMessage:z,handleRuntimeError:A,clearRuntimeError:X,isCreateFileModalOpen:Ce,handleOpenCreateFileModal:Be,handleCloseCreateFileModal:Xe,handleCreateFileClick:He,isCreateDirModalOpen:Ze,handleOpenCreateDirModal:ct,handleCloseCreateDirModal:pt,handleCreateDirClick:gt,runPrettierRef:T,runCodeRef:G,sidebarRef:W,codeEditorRef:te,iframeRef:U,connected:c,pending:f,hoveredItemId:dt,setHoveredItemId:st,enableAutoFollow:Oe,toggleAutoFollow:Jt,updatePresenceIndicator:kn,sidebarPresenceIndicators:ie,splitCurrentPane:gn,liveKitRoomName:g,setLiveKitRoom:O,liveKitToken:d,setLiveKitToken:p,liveKitConnection:y,setLiveKitConnection:b,voiceChatModalOpen:bt,setVoiceChatModalOpen:Nt,aiChatMessage:Bt,setAIChatMessage:On,currentChatId:zn,selectedChatId:Yn,setSelectedChatId:tr,aiErrorMessage:In,setAIErrorMessage:nr,handleSendMessage:Pt,navigateMessageHistoryUp:Zt,navigateMessageHistoryDown:Pn,resetMessageHistoryNavigation:Yt,autoForkAndRetryAI:x,clearStoredAIPrompt:P,getStoredAIPrompt:E,additionalWidgets:D,enableMinimalEditFlow:tK,onAIChatMessageSubmitted:C}},pr=M.createContext(null),tre=({children:t,...e})=>{const n=ere(e);return j.jsx(pr.Provider,{value:n,children:t})},fu=({variant:t="secondary",size:e,type:n="button",className:r="",...i})=>j.jsx("button",{...i,type:n,className:`vz-ui-button vz-ui-button--${t} ${e?`vz-ui-button--${e}`:""} ${r}`}),Ak=M.createContext(void 0),nre=({controlId:t,className:e="",children:n})=>{const r=M.useId();return j.jsx(Ak.Provider,{value:t||r,children:j.jsx("div",{className:`vz-ui-field ${e}`,children:n})})},rre=({children:t,...e})=>{const n=M.useContext(Ak);return j.jsx("label",{...e,htmlFor:e.htmlFor??n,className:`vz-ui-label ${e.className||""}`,children:t})},CN=M.forwardRef(({className:t="",id:e,...n},r)=>{const i=M.useContext(Ak);return j.jsx("input",{...n,id:e??i,ref:r,className:`vz-ui-control ${t}`})});CN.displayName="VZControl";const ire=({children:t,className:e=""})=>j.jsx("small",{className:`vz-ui-help ${e}`,children:t}),dr=Object.assign(({children:t})=>j.jsx(j.Fragment,{children:t}),{Group:nre,Label:rre,Control:CN,Text:ire}),$k=M.createContext(null),sre=({show:t,onHide:e,children:n,className:r="",onKeyDown:i})=>{const s=M.useRef(null),o=M.useId();return M.useEffect(()=>{const a=s.current;if(!(!a||!t))return a.open||a.showModal(),()=>{a.open&&a.close()}},[t]),!t||typeof document>"u"?null:Rk.createPortal(j.jsx($k.Provider,{value:{close:e,titleId:o},children:j.jsx("dialog",{ref:s,className:`vz-ui-modal ${r}`,"aria-labelledby":o,onKeyDown:i,onCancel:a=>{a.preventDefault(),e()},onClick:a=>{a.target===a.currentTarget&&e()},children:j.jsx("div",{className:"vz-ui-modal-content",children:n})})}),document.body)},ore=({children:t,closeButton:e,onClick:n})=>{const r=M.useContext($k);return j.jsxs("div",{className:"vz-ui-modal-header",children:[t,e&&j.jsx("button",{type:"button",className:"vz-ui-close","aria-label":"Close dialog",onClick:n??r?.close,children:"×"})]})},are=({children:t})=>{const e=M.useContext($k);return j.jsx("h2",{className:"vz-ui-modal-title",id:e?.titleId,children:t})},lre=({children:t,className:e=""})=>j.jsx("div",{className:`vz-ui-modal-body ${e}`,children:t}),ure=({children:t})=>j.jsx("div",{className:"vz-ui-modal-footer",children:t}),ar=Object.assign(sre,{Header:ore,Title:are,Body:lre,Footer:ure}),ji=({id:t,children:e})=>j.jsx("span",{id:t,role:"tooltip",className:"vz-ui-tooltip",children:e}),Ni=({children:t,overlay:e,placement:n="top"})=>{const r=M.useRef(null),[i,s]=M.useState(null),o=M.useCallback(()=>{const a=r.current?.getBoundingClientRect();if(!a)return;const l=a.left+a.width/2,u=a.top+a.height/2,c=8,f=n==="right"?{left:a.right+c,top:u,transform:"translateY(-50%)"}:n==="left"?{left:a.left-c,top:u,transform:"translate(-100%, -50%)"}:n==="bottom"?{left:l,top:a.bottom+c,transform:"translateX(-50%)"}:{left:l,top:a.top-c,transform:"translate(-50%, -100%)"};s(f)},[n]);return M.useEffect(()=>{if(i)return window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o)}},[i,o]),j.jsxs("span",{ref:r,className:"vz-ui-tooltip-anchor",tabIndex:0,onPointerEnter:o,onPointerLeave:()=>s(null),onFocus:o,onBlur:()=>s(null),children:[t,i&&typeof document<"u"&&Rk.createPortal(j.jsx("span",{className:"vz-ui-tooltip-floating",style:i,children:e}),document.body)]})},cre=({enableUsernameField:t=!0})=>{const{isDocOpen:e,closeDoc:n}=M.useContext(pr);return e?j.jsxs(ar,{className:"vz-settings",show:e,onHide:n,animation:!1,children:[j.jsx(ar.Header,{closeButton:!0,children:j.jsx(ar.Title,{children:"Keyboard Shortcuts"})}),j.jsxs(ar.Body,{children:[j.jsx(dr.Group,{children:j.jsx(dr.Text,{children:"Keyboard shortcuts and interactive widgets for quick actions"})}),j.jsx(dr.Group,{children:j.jsxs("ul",{children:[j.jsxs("li",{children:[j.jsxs("strong",{children:[j.jsx("kbd",{children:"Ctrl"})," + ",j.jsx("kbd",{children:"S"})]})," ","or"," ",j.jsxs("strong",{children:[j.jsx("kbd",{children:"Shift↑"})," + ",j.jsx("kbd",{children:"Enter←"})]})," ",j.jsx("br",{}),j.jsx("span",{children:"Run and format code"})]}),j.jsxs("li",{children:[j.jsxs("strong",{children:[j.jsx("kbd",{children:"Alt"})," + Drag on a number"]}),j.jsx("br",{}),j.jsx("span",{children:"Modify the number by dragging left or right"})]}),j.jsxs("li",{children:[j.jsxs("strong",{children:[j.jsx("kbd",{children:"Alt"})," + Click on a hex color"]}),j.jsx("br",{}),j.jsx("span",{children:"Open a color picker to modify the color"})]}),j.jsxs("li",{children:[j.jsxs("strong",{children:[j.jsx("kbd",{children:"Alt"})," + ",j.jsx("kbd",{children:"W"})]})," ",j.jsx("br",{}),j.jsx("span",{children:"Close the current tab"})]}),j.jsxs("li",{children:[j.jsxs("strong",{children:[j.jsx("kbd",{children:"Alt"})," + ",j.jsx("kbd",{children:"N"})]})," ","or"," ",j.jsxs("strong",{children:[j.jsx("kbd",{children:"Ctrl"})," + ",j.jsx("kbd",{children:"Shift↑"})," +"," ",j.jsx("kbd",{children:"N"})]})," ",j.jsx("br",{}),j.jsx("span",{children:"Open the create file modal"})]}),j.jsxs("li",{children:[j.jsxs("strong",{children:[j.jsx("kbd",{children:"Alt"})," + ",j.jsx("kbd",{children:"PgUp↑"})]})," ",j.jsx("br",{}),j.jsx("span",{children:"Change the active tab to the previous one"})]}),j.jsxs("li",{children:[j.jsxs("strong",{children:[j.jsx("kbd",{children:"Alt"})," + ",j.jsx("kbd",{children:"PgDn↓"})]})," ",j.jsx("br",{}),j.jsx("span",{children:"Change the active tab to the next one"})]}),j.jsxs("li",{children:[j.jsx("strong",{children:"Most VSCode Shortcuts"})," ",j.jsx("br",{}),"See VSCode docs:"," ",j.jsx("a",{href:"https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf",target:"_blank",children:"Windows"}),","," ",j.jsx("a",{href:"https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf",target:"_blank",children:"MacOS"}),","," ",j.jsx("a",{href:"https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf",target:"_blank",children:"Linux"})]})]})})]}),j.jsx(ar.Footer,{children:j.jsx(fu,{variant:"primary",onClick:n,children:"Done"})})]}):null},fre=["10px","12px","14px","16px","18px","20px","24px"],hre=["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Helvetica Neue","Arial","sans-serif","Courier New","Georgia","Tahoma","Verdana","Times New Roman","Trebuchet MS","Comic Sans MS"],dre=t=>{const e="abcdefghijklmnopqrstuvwxyz0123456789",n="72px",r=document.createElement("span");r.style.fontSize=n,r.style.visibility="hidden",r.style.position="absolute",r.innerHTML=e,document.body.appendChild(r);const i="monospace";r.style.fontFamily=i;const s=r.offsetWidth;r.style.fontFamily=`${t}, ${i}`;const o=r.offsetWidth;return document.body.removeChild(r),o!==s},pre=({enableUsernameField:t=!0})=>{const{isSettingsOpen:e,closeSettings:n,theme:r,setTheme:i,username:s,setUsername:o,sidebarRef:a}=M.useContext(pr),[l,u]=M.useState("Roboto Mono"),[c,f]=M.useState("16px"),[d,p]=M.useState([]);M.useEffect(()=>{if(typeof window<"u"){const b=window.localStorage.getItem("vzcodeSelectedFont"),v=window.localStorage.getItem("vzcodeSelectedFontSize");b!==null&&u(b),v!==null&&f(v)}},[]),M.useEffect(()=>{(()=>{const v=[];for(const S of hre)dre(S)&&v.push(S);p(v)})()},[]);const g=M.useCallback(()=>{u("Roboto Mono"),f("16px"),i(Pw[0].label),t&&o(""),localStorage.removeItem("vzcodeSelectedFont"),localStorage.removeItem("vzcodeSelectedFontSize")},[t,i,o]);M.useEffect(()=>{a.current?.closest(".app")?.style.setProperty("--vzcode-font-family",l)},[l,a]),M.useEffect(()=>{a.current?.closest(".app")?.style.setProperty("--vzcode-font-size",c)},[c,a]);const O=M.useRef(null),y=M.useCallback(()=>{o(O.current?.value||"")},[o]);return M.useEffect(()=>{if(e){const b=v=>{v.key==="Enter"&&n()};return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}}},[e,n]),e?j.jsxs(ar,{className:"vz-settings",show:e,onHide:n,animation:!1,children:[j.jsx(ar.Header,{closeButton:!0,children:j.jsx(ar.Title,{children:"Editor Settings"})}),j.jsxs(ar.Body,{children:[t?j.jsxs(dr.Group,{controlId:"vz-settings-username",children:[j.jsx(dr.Label,{children:"Username"}),j.jsx(dr.Control,{type:"text",ref:O,onChange:y,placeholder:"Enter username",value:s}),j.jsx(dr.Text,{children:"Enter a username to be displayed on your cursor"})]}):null,j.jsxs(dr.Group,{controlId:"vz-settings-theme",children:[j.jsx(dr.Label,{children:"Theme"}),j.jsx("select",{id:"vz-settings-theme",className:"vz-ui-select",value:r,onChange:b=>i(b.target.value),children:Pw.map(({label:b})=>j.jsx("option",{value:b,children:b},b))})]}),j.jsxs(dr.Group,{controlId:"vz-settings-font",children:[j.jsx(dr.Label,{children:"Font"}),j.jsx("select",{id:"vz-settings-font",className:"vz-ui-select",onChange:b=>u(b.target.value),value:l,children:d.map(b=>j.jsx("option",{value:b,children:b},b))})]}),j.jsxs(dr.Group,{controlId:"vz-settings-size",children:[j.jsx(dr.Label,{children:"Font Size"}),j.jsx("select",{id:"vz-settings-size",className:"vz-ui-select",onChange:b=>f(b.target.value),value:c,children:fre.map(b=>j.jsx("option",{value:b,children:b},b))})]})]}),j.jsxs(ar.Footer,{children:[j.jsx(fu,{variant:"secondary",onClick:g,children:"Reset to Default"}),j.jsx(fu,{variant:"primary",onClick:n,children:"Done"})]})]}):null};const mre=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gre=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),tT=t=>{const e=gre(t);return e.charAt(0).toUpperCase()+e.slice(1)},RN=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim(),Ore=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var yre={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"};const vre=M.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>M.createElement("svg",{ref:l,...yre,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:RN("lucide",i),...!s&&!Ore(a)&&{"aria-hidden":"true"},...a},[...o.map(([u,c])=>M.createElement(u,c)),...Array.isArray(s)?s:[s]]));const Fg=(t,e)=>{const n=M.forwardRef(({className:r,...i},s)=>M.createElement(vre,{ref:s,iconNode:e,className:RN(`lucide-${mre(tT(t))}`,`lucide-${t}`,r),...i}));return n.displayName=tT(t),n};const bre=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M9 14h6",key:"159ibu"}],["path",{d:"M12 17v-6",key:"1y8rbf"}]],wre=Fg("clipboard-plus",bre);const Sre=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],xre=Fg("copy",Sre);const kre=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Pre=Fg("download",kre);const _re=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Ere=Fg("trash-2",_re),Cre=t=>{const e={name:"files"};for(const n of Object.keys(t)){const r=t[n],i=r.name.split("/"),s=i.length;let o=e;for(let a=0;a<s-1;a++){let l;const u=i[a];if(o.children)for(let c=0;c<o.children.length;c++){const f=o.children[c];if(f.name===u){l=f;break}}l||(l={name:i[a],path:i.slice(0,a+1).join("/")},(o.children||(o.children=[])).push(l)),o=l}r.text!==null&&(o.children||(o.children=[])).push({name:i[s-1],file:r,fileId:n})}return e},Rre=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:j.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"})}),Are=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:j.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})}),$re=()=>j.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[j.jsx("path",{d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 0 1 0 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 0 1 0-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281Z"}),j.jsx("path",{d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]}),Vm=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:j.jsx("path",{d:"M6 18L18 6M6 6L18 18",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Tre=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:j.jsx("path",{fill:"none",stroke:"currentColor",d:"M14.7404 9L14.3942 18M9.60577 18L9.25962 9M19.2276 5.79057C19.5696 5.84221 19.9104 5.89747 20.25 5.95629M19.2276 5.79057L18.1598 19.6726C18.0696 20.8448 17.0921 21.75 15.9164 21.75H8.08357C6.90786 21.75 5.93037 20.8448 5.8402 19.6726L4.77235 5.79057M19.2276 5.79057C18.0812 5.61744 16.9215 5.48485 15.75 5.39432M3.75 5.95629C4.08957 5.89747 4.43037 5.84221 4.77235 5.79057M4.77235 5.79057C5.91878 5.61744 7.07849 5.48485 8.25 5.39432M15.75 5.39432V4.47819C15.75 3.29882 14.8393 2.31423 13.6606 2.27652C13.1092 2.25889 12.5556 2.25 12 2.25C11.4444 2.25 10.8908 2.25889 10.3394 2.27652C9.16065 2.31423 8.25 3.29882 8.25 4.47819V5.39432M15.75 5.39432C14.5126 5.2987 13.262 5.25 12 5.25C10.738 5.25 9.48744 5.2987 8.25 5.39432",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Qre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:j.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 12.75c1.148 0 2.278.08 3.383.237 1.037.146 1.866.966 1.866 2.013 0 3.728-2.35 6.75-5.25 6.75S6.75 18.728 6.75 15c0-1.046.83-1.867 1.866-2.013A24.204 24.204 0 0 1 12 12.75Zm0 0c2.883 0 5.647.508 8.207 1.44a23.91 23.91 0 0 1-1.152 6.06M12 12.75c-2.883 0-5.647.508-8.208 1.44.125 2.104.52 4.136 1.153 6.06M12 12.75a2.25 2.25 0 0 0 2.248-2.354M12 12.75a2.25 2.25 0 0 1-2.248-2.354M12 8.25c.995 0 1.971-.08 2.922-.236.403-.066.74-.358.795-.762a3.778 3.778 0 0 0-.399-2.25M12 8.25c-.995 0-1.97-.08-2.922-.236-.402-.066-.74-.358-.795-.762a3.734 3.734 0 0 1 .4-2.253M12 8.25a2.25 2.25 0 0 0-2.248 2.146M12 8.25a2.25 2.25 0 0 1 2.248 2.146M8.683 5a6.032 6.032 0 0 1-1.155-1.002c.07-.63.27-1.222.574-1.747m.581 2.749A3.75 3.75 0 0 1 15.318 5m0 0c.427-.283.815-.62 1.155-.999a4.471 4.471 0 0 0-.575-1.752M4.921 6a24.048 24.048 0 0 0-.392 3.314c1.668.546 3.416.914 5.223 1.082M19.08 6c.205 1.08.337 2.187.392 3.314a23.882 23.882 0 0 1-5.223 1.082"})}),AN=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:j.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})}),$N=({height:t=16,fill:e="currentcolor"})=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:t,viewBox:"4 4 16 16",children:j.jsx("path",{stroke:e,fill:"none",d:"M8 17l9-5-9-5v10z",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),Mre=()=>j.jsx("svg",{width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:j.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"})}),Ire=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:j.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"})}),Dre=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:j.jsx("path",{fill:"currentColor",d:"m16.114 1.553 6.333 6.333a1.75 1.75 0 0 1-.603 2.869l-1.63.633a5.67 5.67 0 0 0-3.395 3.725l-1.131 3.959a1.75 1.75 0 0 1-2.92.757L9 16.061l-5.595 5.594a.749.749 0 1 1-1.06-1.06L7.939 15l-3.768-3.768a1.75 1.75 0 0 1 .757-2.92l3.959-1.131a5.666 5.666 0 0 0 3.725-3.395l.633-1.63a1.75 1.75 0 0 1 2.869-.603ZM5.232 10.171l8.597 8.597a.25.25 0 0 0 .417-.108l1.131-3.959A7.17 7.17 0 0 1 19.67 9.99l1.63-.634a.25.25 0 0 0 .086-.409l-6.333-6.333a.25.25 0 0 0-.409.086l-.634 1.63a7.17 7.17 0 0 1-4.711 4.293L5.34 9.754a.25.25 0 0 0-.108.417Z"})}),jre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:j.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"})}),Nre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:j.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"})}),Lre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M3 3h18v18H3V3zm16.525 13.707c-.131-.821-.666-1.511-2.252-2.155-.552-.259-1.165-.438-1.349-.854-.068-.248-.078-.382-.034-.529.113-.484.687-.629 1.137-.495.293.09.563.315.732.676.775-.507.775-.507 1.316-.844-.203-.314-.304-.451-.439-.586-.473-.528-1.103-.798-2.126-.775l-.528.067c-.507.124-.991.395-1.283.754-.855.968-.608 2.655.427 3.354 1.023.765 2.521.933 2.712 1.653.18.878-.652 1.159-1.475 1.058-.607-.136-.945-.439-1.316-1.002l-1.372.788c.157.359.337.517.607.832 1.305 1.316 4.568 1.249 5.153-.754.021-.067.18-.528.056-1.237l.034.049zm-6.737-5.434h-1.686c0 1.453-.007 2.898-.007 4.354 0 .924.047 1.772-.104 2.033-.247.517-.886.451-1.175.359-.297-.146-.448-.349-.623-.641-.047-.078-.082-.146-.095-.146l-1.368.844c.229.473.563.879.994 1.137.641.383 1.502.507 2.404.305.588-.17 1.095-.519 1.358-1.059.384-.697.302-1.553.299-2.509.008-1.541 0-3.083 0-4.635l.003-.042z"})}),Fre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M3 3h18v18H3V3m10.71 14.86c.5.98 1.51 1.73 3.09 1.73 1.6 0 2.8-.83 2.8-2.36 0-1.41-.81-2.04-2.25-2.66l-.42-.18c-.73-.31-1.04-.52-1.04-1.02 0-.41.31-.73.81-.73.48 0 .8.21 1.09.73l1.31-.87c-.55-.96-1.33-1.33-2.4-1.33-1.51 0-2.48.96-2.48 2.23 0 1.38.81 2.03 2.03 2.55l.42.18c.78.34 1.24.55 1.24 1.13 0 .48-.45.83-1.15.83-.83 0-1.31-.43-1.67-1.03l-1.38.8M13 11.25H8v1.5h1.5V20h1.75v-7.25H13v-1.5z"})}),Bre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M14.23 12.004a2.236 2.236 0 01-2.235 2.236 2.236 2.236 0 01-2.236-2.236 2.236 2.236 0 012.235-2.236 2.236 2.236 0 012.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38a2.167 2.167 0 00-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44a23.476 23.476 0 00-3.107-.534A23.892 23.892 0 0012.769 4.7c1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442a22.73 22.73 0 00-3.113.538 15.02 15.02 0 01-.254-1.42c-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87a25.64 25.64 0 01-4.412.005 26.64 26.64 0 01-1.183-1.86c-.372-.64-.71-1.29-1.018-1.946a25.17 25.17 0 011.013-1.954c.38-.66.773-1.286 1.18-1.868A25.245 25.245 0 0112 8.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933a25.952 25.952 0 00-1.345-2.32zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493a23.966 23.966 0 00-1.1-2.98c.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98a23.142 23.142 0 00-1.086 2.964c-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39a25.819 25.819 0 001.341-2.338zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143a22.005 22.005 0 01-2.006-.386c.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295a1.185 1.185 0 01-.553-.132c-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z"})}),qre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M10.354 21.125a4.44 4.44 0 01-4.765-1.767 4.109 4.109 0 01-.703-3.107 3.898 3.898 0 01.134-.522l.105-.321.287.21a7.21 7.21 0 002.186 1.092l.208.063-.02.208a1.253 1.253 0 00.226.83 1.337 1.337 0 001.435.533 1.231 1.231 0 00.343-.15l5.59-3.562a1.164 1.164 0 00.524-.778 1.242 1.242 0 00-.211-.937 1.338 1.338 0 00-1.435-.533 1.23 1.23 0 00-.343.15l-2.133 1.36a4.078 4.078 0 01-1.135.499 4.44 4.44 0 01-4.765-1.766 4.108 4.108 0 01-.702-3.108 3.855 3.855 0 011.742-2.582l5.589-3.563a4.072 4.072 0 011.135-.499 4.44 4.44 0 014.765 1.767 4.109 4.109 0 01.703 3.107 3.943 3.943 0 01-.134.522l-.105.321-.286-.21a7.204 7.204 0 00-2.187-1.093l-.208-.063.02-.207a1.255 1.255 0 00-.226-.831 1.337 1.337 0 00-1.435-.532 1.231 1.231 0 00-.343.15L8.62 9.368a1.162 1.162 0 00-.524.778 1.24 1.24 0 00.211.937 1.338 1.338 0 001.435.533 1.235 1.235 0 00.344-.151l2.132-1.36a4.067 4.067 0 011.135-.498 4.44 4.44 0 014.765 1.766 4.108 4.108 0 01.702 3.108 3.857 3.857 0 01-1.742 2.583l-5.589 3.562a4.072 4.072 0 01-1.135.499m10.358-17.95C18.484-.015 14.082-.96 10.9 1.068L5.31 4.63a6.412 6.412 0 00-2.896 4.295 6.753 6.753 0 00.666 4.336 6.43 6.43 0 00-.96 2.396 6.833 6.833 0 001.168 5.167c2.229 3.19 6.63 4.135 9.812 2.108l5.59-3.562a6.41 6.41 0 002.896-4.295 6.756 6.756 0 00-.665-4.336 6.429 6.429 0 00.958-2.396 6.831 6.831 0 00-1.167-5.168z"})}),zre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M4.136 3.012h15.729l-1.431 16.15-6.451 1.826-6.414-1.826-1.433-16.15zm5.266 7.302l-.173-2.035 7.533.002.173-1.963-9.87-.002.522 5.998h6.835l-.243 2.566-2.179.602-2.214-.605-.141-1.58H7.691l.247 3.123L12 17.506l4.028-1.08.558-6.111H9.402v-.001z"})}),Ure=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M4.192 3.143h15.615l-1.42 16.034-6.404 1.812-6.369-1.813L4.192 3.143zM16.9 6.424l-9.8-.002.158 1.949 7.529.002-.189 2.02H9.66l.179 1.913h4.597l-.272 2.62-2.164.598-2.197-.603-.141-1.569h-1.94l.216 2.867L12 17.484l3.995-1.137.905-9.923z"})}),Zre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M5 3h2v2H5v5a2 2 0 01-2 2 2 2 0 012 2v5h2v2H5c-1.07-.27-2-.9-2-2v-4a2 2 0 00-2-2H0v-2h1a2 2 0 002-2V5a2 2 0 012-2m14 0a2 2 0 012 2v4a2 2 0 002 2h1v2h-1a2 2 0 00-2 2v4a2 2 0 01-2 2h-2v-2h2v-5a2 2 0 012-2 2 2 0 01-2-2V5h-2V3h2m-7 12a1 1 0 011 1 1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1m-4 0a1 1 0 011 1 1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1m8 0a1 1 0 011 1 1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1z"})}),Vre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M20.56 18H3.44C2.65 18 2 17.37 2 16.59V7.41C2 6.63 2.65 6 3.44 6h17.12c.79 0 1.44.63 1.44 1.41v9.18c0 .78-.65 1.41-1.44 1.41M6.81 15.19v-3.66l1.92 2.35 1.92-2.35v3.66h1.93V8.81h-1.93l-1.92 2.35-1.92-2.35H4.89v6.38h1.92M19.69 12h-1.92V8.81h-1.92V12h-1.93l2.89 3.28L19.69 12z"})}),Wre=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",width:32,height:32,children:j.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})}),TN=t=>(t.children&&(t.children.sort((e,n)=>{const r=e.file?1:0,i=n.file?1:0;return r-i||e.name.localeCompare(n.name)}),t.children.forEach(TN)),t);function Xre(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Hre=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Yre=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gre={};function nT(t,e){return(Gre.jsx?Yre:Hre).test(t)}const Kre=/[ \t\n\f\r]/g;function Jre(t){return typeof t=="object"?t.type==="text"?rT(t.value):!1:rT(t)}function rT(t){return t.replace(Kre,"")===""}class Ld{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}Ld.prototype.normal={};Ld.prototype.property={};Ld.prototype.space=void 0;function QN(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ld(n,r,e)}function oS(t){return t.toLowerCase()}class Ui{constructor(e,n){this.attribute=n,this.property=e}}Ui.prototype.attribute="";Ui.prototype.booleanish=!1;Ui.prototype.boolean=!1;Ui.prototype.commaOrSpaceSeparated=!1;Ui.prototype.commaSeparated=!1;Ui.prototype.defined=!1;Ui.prototype.mustUseProperty=!1;Ui.prototype.number=!1;Ui.prototype.overloadedBoolean=!1;Ui.prototype.property="";Ui.prototype.spaceSeparated=!1;Ui.prototype.space=void 0;let eie=0;const rn=vu(),_r=vu(),aS=vu(),ot=vu(),Jn=vu(),Pc=vu(),Gi=vu();function vu(){return 2**++eie}const lS=Object.freeze(Object.defineProperty({__proto__:null,boolean:rn,booleanish:_r,commaOrSpaceSeparated:Gi,commaSeparated:Pc,number:ot,overloadedBoolean:aS,spaceSeparated:Jn},Symbol.toStringTag,{value:"Module"})),Bv=Object.keys(lS);class Tk extends Ui{constructor(e,n,r,i){let s=-1;if(super(e,n),iT(this,"space",i),typeof r=="number")for(;++s<Bv.length;){const o=Bv[s];iT(this,Bv[s],(r&lS[o])===lS[o])}}}Tk.prototype.defined=!0;function iT(t,e,n){n&&(t[e]=n)}function lf(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const s=new Tk(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[oS(r)]=r,n[oS(s.attribute)]=r}return new Ld(e,n,t.space)}const MN=lf({properties:{ariaActiveDescendant:null,ariaAtomic:_r,ariaAutoComplete:null,ariaBusy:_r,ariaChecked:_r,ariaColCount:ot,ariaColIndex:ot,ariaColSpan:ot,ariaControls:Jn,ariaCurrent:null,ariaDescribedBy:Jn,ariaDetails:null,ariaDisabled:_r,ariaDropEffect:Jn,ariaErrorMessage:null,ariaExpanded:_r,ariaFlowTo:Jn,ariaGrabbed:_r,ariaHasPopup:null,ariaHidden:_r,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Jn,ariaLevel:ot,ariaLive:null,ariaModal:_r,ariaMultiLine:_r,ariaMultiSelectable:_r,ariaOrientation:null,ariaOwns:Jn,ariaPlaceholder:null,ariaPosInSet:ot,ariaPressed:_r,ariaReadOnly:_r,ariaRelevant:null,ariaRequired:_r,ariaRoleDescription:Jn,ariaRowCount:ot,ariaRowIndex:ot,ariaRowSpan:ot,ariaSelected:_r,ariaSetSize:ot,ariaSort:null,ariaValueMax:ot,ariaValueMin:ot,ariaValueNow:ot,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function IN(t,e){return e in t?t[e]:e}function DN(t,e){return IN(t,e.toLowerCase())}const tie=lf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pc,acceptCharset:Jn,accessKey:Jn,action:null,allow:null,allowFullScreen:rn,allowPaymentRequest:rn,allowUserMedia:rn,alt:null,as:null,async:rn,autoCapitalize:null,autoComplete:Jn,autoFocus:rn,autoPlay:rn,blocking:Jn,capture:null,charSet:null,checked:rn,cite:null,className:Jn,cols:ot,colSpan:null,content:null,contentEditable:_r,controls:rn,controlsList:Jn,coords:ot|Pc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:rn,defer:rn,dir:null,dirName:null,disabled:rn,download:aS,draggable:_r,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:rn,formTarget:null,headers:Jn,height:ot,hidden:aS,high:ot,href:null,hrefLang:null,htmlFor:Jn,httpEquiv:Jn,id:null,imageSizes:null,imageSrcSet:null,inert:rn,inputMode:null,integrity:null,is:null,isMap:rn,itemId:null,itemProp:Jn,itemRef:Jn,itemScope:rn,itemType:Jn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:rn,low:ot,manifest:null,max:null,maxLength:ot,media:null,method:null,min:null,minLength:ot,multiple:rn,muted:rn,name:null,nonce:null,noModule:rn,noValidate:rn,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:rn,optimum:ot,pattern:null,ping:Jn,placeholder:null,playsInline:rn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:rn,referrerPolicy:null,rel:Jn,required:rn,reversed:rn,rows:ot,rowSpan:ot,sandbox:Jn,scope:null,scoped:rn,seamless:rn,selected:rn,shadowRootClonable:rn,shadowRootDelegatesFocus:rn,shadowRootMode:null,shape:null,size:ot,sizes:null,slot:null,span:ot,spellCheck:_r,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ot,step:null,style:null,tabIndex:ot,target:null,title:null,translate:null,type:null,typeMustMatch:rn,useMap:null,value:_r,width:ot,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Jn,axis:null,background:null,bgColor:null,border:ot,borderColor:null,bottomMargin:ot,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:rn,declare:rn,event:null,face:null,frame:null,frameBorder:null,hSpace:ot,leftMargin:ot,link:null,longDesc:null,lowSrc:null,marginHeight:ot,marginWidth:ot,noResize:rn,noHref:rn,noShade:rn,noWrap:rn,object:null,profile:null,prompt:null,rev:null,rightMargin:ot,rules:null,scheme:null,scrolling:_r,standby:null,summary:null,text:null,topMargin:ot,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ot,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:rn,disableRemotePlayback:rn,prefix:null,property:null,results:ot,security:null,unselectable:null},space:"html",transform:DN}),nie=lf({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Gi,accentHeight:ot,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ot,amplitude:ot,arabicForm:null,ascent:ot,attributeName:null,attributeType:null,azimuth:ot,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ot,by:null,calcMode:null,capHeight:ot,className:Jn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ot,diffuseConstant:ot,direction:null,display:null,dur:null,divisor:ot,dominantBaseline:null,download:rn,dx:null,dy:null,edgeMode:null,editable:null,elevation:ot,enableBackground:null,end:null,event:null,exponent:ot,externalResourcesRequired:null,fill:null,fillOpacity:ot,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Pc,g2:Pc,glyphName:Pc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ot,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ot,horizOriginX:ot,horizOriginY:ot,id:null,ideographic:ot,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ot,k:ot,k1:ot,k2:ot,k3:ot,k4:ot,kernelMatrix:Gi,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ot,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ot,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ot,overlineThickness:ot,paintOrder:null,panose1:null,path:null,pathLength:ot,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Jn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ot,pointsAtY:ot,pointsAtZ:ot,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Gi,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Gi,rev:Gi,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Gi,requiredFeatures:Gi,requiredFonts:Gi,requiredFormats:Gi,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ot,specularExponent:ot,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ot,strikethroughThickness:ot,string:null,stroke:null,strokeDashArray:Gi,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ot,strokeOpacity:ot,strokeWidth:null,style:null,surfaceScale:ot,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Gi,tabIndex:ot,tableValues:null,target:null,targetX:ot,targetY:ot,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Gi,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ot,underlineThickness:ot,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ot,values:null,vAlphabetic:ot,vMathematical:ot,vectorEffect:null,vHanging:ot,vIdeographic:ot,version:null,vertAdvY:ot,vertOriginX:ot,vertOriginY:ot,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ot,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:IN}),jN=lf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),NN=lf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:DN}),LN=lf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),rie={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},iie=/[A-Z]/g,sT=/-[a-z]/g,sie=/^data[-\w.:]+$/i;function oie(t,e){const n=oS(e);let r=e,i=Ui;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&sie.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(sT,lie);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!sT.test(s)){let o=s.replace(iie,aie);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=Tk}return new i(r,e)}function aie(t){return"-"+t.toLowerCase()}function lie(t){return t.charAt(1).toUpperCase()}const uie=QN([MN,tie,jN,NN,LN],"html"),Qk=QN([MN,nie,jN,NN,LN],"svg");function cie(t){return t.join(" ").trim()}var Xu={},qv,oT;function fie(){if(oT)return qv;oT=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,l=`
123
+ `),u=[];for(let c=0;c<l.length;c++){const f=l[c].toLowerCase().indexOf(e.toLowerCase());f!==-1&&u.push({line:c+1,index:f,text:l[c],isClosed:!1})}u.length>0&&(i[r[s]]={name:a,matches:u,visibility:"open"})}}return i}function Tne(t,e,n){return{...t,[e]:{...t[e],visibility:n}}}const Qne=(t,e)=>e.type==="set_is_search_open"?{...t,isSearchOpen:e.value}:t,Mne=(t,e)=>e.type==="set_search"?{...t,search:{...t.search,pattern:e.value,results:{},focusedIndex:0,focusedChildIndex:null,focused:!0}}:t,Ine=(t,e)=>e.type==="set_search_results"?{...t,search:{...t.search,pattern:t.search.pattern,results:$ne(e.files,t.search.pattern),focused:t.search.focused}}:t,Dne=(t,e)=>e.type==="set_search_file_visibility"?{...t,search:{...t.search,pattern:t.search.pattern,results:Tne(t.search.results,e.id,e.visibility)}}:t,jne=(t,e)=>e.type==="hide_search_results_line"?{...t,search:{...t.search,results:{...t.search.results,[e.id]:{...t.search.results[e.id],matches:t.search.results[e.id].matches.filter((n,r)=>n.line!==e.line)}}}}:t,Nne=(t,e)=>e.type==="set_active_search_index"?{...t,search:{...t.search,focusedIndex:e.focusedIndex,focusedChildIndex:e.childIndex}}:t,Lne=(t,e)=>e.type==="toggle_search_focused"?{...t,search:{...t.search,focused:!t.search.focused}}:t,Fne=(t,e)=>e.type==="set_is_ai_chat_open"?{...t,isAIChatOpen:e.value,isSearchOpen:e.value?!1:t.isSearchOpen}:t,Bne=(t,e)=>e.type==="toggle_ai_chat_focused"?{...t,aiChatFocused:!t.aiChatFocused}:t,qne=(t,e)=>e.type==="set_ai_chat_mode"?{...t,aiChatMode:e.mode}:t,zne=(t,e)=>e.type==="toggle_auto_follow"?{...t,enableAutoFollow:!t.enableAutoFollow}:t,Une=(t,e)=>{if(e.type==="update_presence_indicator"){const n=t.sidebarPresenceIndicators.find(r=>r.username===e.presenceIndicator.username);return{...t,sidebarPresenceIndicators:n?t.sidebarPresenceIndicators.map(r=>r.username===e.presenceIndicator.username?e.presenceIndicator:r):[...t.sidebarPresenceIndicators,e.presenceIndicator]}}return t},Zne=(t,e)=>{if(e.type!=="split_current_pane")return t;const n=t.activePaneId,r={id:`${n}-1`,type:"leafPane",tabList:[],activeFileId:null},i={id:`${n}-2`,type:"leafPane",tabList:[],activeFileId:null},s={id:n,type:"splitPane",orientation:"horizontal",children:[r,i]},o=al({pane:t.pane,activePaneId:n,newTabList:void 0,newActiveFileId:void 0}),a=(u,c)=>u.id===c?s:u.type==="splitPane"?{...u,children:u.children.map(f=>a(f,c))}:u,l=a(o,n);return{...t,pane:l,activePaneId:r.id}},Vne=(t,e)=>e.type==="set_is_visual_editor_open"?{...t,isVisualEditorOpen:e.value}:t,Wne=({defaultTheme:t,initialUsername:e="Anonymous",initialSidebarView:n="ai-chat"})=>({pane:{id:"root",type:"leafPane",tabList:[],activeFileId:null},activePaneId:"root",theme:t,search:{pattern:"",results:{},focused:!1,focusedIndex:null,focusedChildIndex:null},isVisualEditorOpen:n==="visual",isSearchOpen:!1,isAIChatOpen:n==="ai-chat",aiChatFocused:!1,aiChatMode:"edit",isSettingsOpen:!1,isDocOpen:!1,editorWantsFocus:!1,username:e,enableAutoFollow:!1,sidebarPresenceIndicators:[]}),Xne=[xne,kne,Pne,Sne,wne,Cne,Mne,Ine,Dne,jne,Nne,Lne,Qne,Fne,Vne,Bne,qne,_ne,Ene,Rne,Ane,zne,Une,Zne],Hne=(t,e)=>Xne.reduce((n,r)=>r(n,e),t),Yne=({docPresence:t,enableAutoFollow:e,openTab:n,activePane:r})=>{const i=M.useRef(e);M.useEffect(()=>{i.current=e},[e]);const s=M.useRef(r?.activeFileId);M.useEffect(()=>{s.current=r?.activeFileId},[r?.activeFileId]),M.useEffect(()=>{if(!t)return;const o=(a,l)=>{if(!l||!i.current)return;const u=l.start[1];u!==s.current&&n({fileId:u,isTransient:!0})};return t.on("receive",o),()=>{t.off("receive",o)}},[t,n])},Gne=t=>t?.isRetry==="true"||t?.isUndo==="true",Kne=t=>t?t.filter(e=>e.role==="user").map(e=>e.content):[];function Jne({content:t,submitOperation:e,aiChatMode:n,aiChatEndpoint:r,aiChatOptions:i,autoForkAndRetryAI:s,handleChatError:o,onAIChatMessageSubmitted:a}){const[l,u]=M.useState(""),c=!1,[f,d]=M.useState(()=>Cb()),[p,g]=M.useState(null),O=p||f,y=t?.chats?.[O],b=M.useMemo(()=>Kne(y?.messages),[y?.messages]),[v,S]=M.useState(-1),[x,P]=M.useState(""),[E,D]=M.useState(null),R=M.useCallback((B,A)=>{D(B),B&&o&&o(B,A)},[o]);M.useEffect(()=>{const B=t?.currentChatDraft;typeof B=="string"&&B.trim()&&(u(B),e(A=>{const X={...A};return X.currentChatDraft=void 0,X}))},[t?.currentChatDraft]);const _=M.useCallback(()=>{if(b.length===0)return;v===-1&&P(l);const B=v<b.length-1?v+1:v;S(B),u(b[b.length-1-B])},[b,v,l]),C=M.useCallback(()=>{if(v===-1)return;const B=v-1;B===-1?(S(-1),u(x),P("")):(S(B),u(b[b.length-1-B]))},[b,v,x]),I=M.useCallback(()=>{v!==-1&&(S(-1),P(""))},[v]),T=M.useCallback(async(B,A)=>{const X=B||l;if(!X||typeof X!="string"||!X.trim())return;const G=l.trim();u(""),S(-1),P(""),R(null);const W=A?.isRetry==="true",te=A?.isUndo==="true";a&&i?.vizId&&a({messageLength:X.trim().length,isRetry:W,isUndo:te});const J=Gne(A);let U;if(J)U=O;else{const z=Cb();d(z),g(z),U=z}try{const z=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...i,content:X.trim(),chatId:U,mode:n,...A})});if(!z.ok)throw new Error(`HTTP error! status: ${z.status}`);const Y=await z.json();if(Y.outcome==="failure"&&Y.error){const L=Y.error.message;if(L==="You do not have permission to use AI chat on this visualization. Only users with edit access can use this feature. Fork the viz to edit it.")if(s)try{await s(G,n);return}catch(se){console.error("Auto-fork failed:",se),R("Failed to fork visualization. Please try forking manually.");return}else{R(L,X.trim());return}R(L,X.trim());return}return Y}catch(z){console.error("Error getting AI response:",z),R("Failed to send message. Please try again.",X.trim())}},[l,r,i,O,n,s,a,c,R]);return{aiChatMessage:l,setAIChatMessage:u,currentChatId:f,selectedChatId:p,setSelectedChatId:g,aiErrorMessage:E,setAIErrorMessage:R,handleSendMessage:T,navigateMessageHistoryUp:_,navigateMessageHistoryDown:C,resetMessageHistoryNavigation:I}}const ere=({content:t,shareDBDoc:e,submitOperation:n,localPresence:r,docPresence:i,prettierWorker:s,initialUsername:o,initialSidebarView:a,renderVisualEditorEmptyState:l,codeError:u=null,connected:c,pending:f,liveKitToken:d,setLiveKitToken:p,liveKitRoomName:g,setLiveKitRoom:O,liveKitConnection:y,setLiveKitConnection:b,aiChatEndpoint:v,aiChatOptions:S,autoForkAndRetryAI:x,clearStoredAIPrompt:P,getStoredAIPrompt:E,additionalWidgets:D,iframeRef:R,handleChatError:_,onAIChatMessageSubmitted:C})=>{const{prettierError:I,runPrettierRef:T}=mK({shareDBDoc:e,submitOperation:n,prettierWorker:s}),{runtimeError:B,handleRuntimeError:A,clearRuntimeError:X}=kK(),G=xK(n),W=M.useRef(null),te=M.useRef(null),J=M.useRef(null),U=R||J,z=B||I||u,[Y,L]=M.useReducer(Hne,{defaultTheme:yV,initialUsername:o,initialSidebarView:a},Wne),{pane:se,activePaneId:ee,theme:ue,search:Z,isSearchOpen:V,isVisualEditorOpen:H,isAIChatOpen:he,aiChatFocused:ve,isSettingsOpen:Ae,isDocOpen:Re,editorWantsFocus:F,username:me,enableAutoFollow:Oe,sidebarPresenceIndicators:ie,aiChatMode:re}=Y,pe=yu(se,ee);if(pe.type!=="leafPane")throw new Error("Expected leafPane");const{setActiveFileId:Me,setActiveFileLeft:je,setActiveFileRight:_e,openTab:q,closeTabs:ye,setTheme:xe,setIsSearchOpen:ce,setSearch:Se,setSearchResults:Ee,setSearchFileVisibility:Ue,setSearchLineVisibility:Ge,setSearchFocusedIndex:Ne,toggleSearchFocused:Ve,setIsVisualEditorOpen:qe,setIsAIChatOpen:Ke,toggleAIChatFocused:it,setAIChatMode:at,setIsSettingsOpen:kt,setIsDocOpen:We,closeSettings:St,closeDoc:Wt,editorNoLongerWantsFocus:jt,setUsername:At,toggleAutoFollow:Jt,updatePresenceIndicator:kn,splitCurrentPane:gn}=bV(L);bne({content:t,openTab:q,setActiveFileId:Me,tabList:pe.tabList,activeFileId:pe.activeFileId});const{isDirectoryOpen:ln,toggleDirectory:jn}=dK({activePane:pe,content:t}),un=wV();vV(un,ue);const{createFile:Xn,renameFile:Mn,deleteFile:Hn,createDirectory:An,renameDirectory:le,deleteDirectory:fe,deleteAllFiles:ge}=oK({submitOperation:n,closeTabs:ye,openTab:q,editorCache:un,content:t}),[Ce,Pe]=M.useState(!1),Be=M.useCallback(()=>{Pe(!0)},[]),Xe=M.useCallback(()=>{Pe(!1)},[]),He=M.useCallback(yn=>{Xn(yn),Pe(!1)},[Xn,Pe]),[Ze,lt]=M.useState(!1),ct=M.useCallback(()=>{lt(!0)},[]),pt=M.useCallback(()=>{lt(!1)},[]),gt=M.useCallback(yn=>{An(yn),lt(!1)},[An,lt]),ft=t?t.files:null;fK({closeTabs:ye,activeFileId:pe.activeFileId,activePaneId:ee,handleOpenCreateFileModal:Be,setActiveFileLeft:je,setActiveFileRight:_e,toggleSearchFocused:Ve,runPrettierRef:T,runCodeRef:G,sidebarRef:W,editorCache:un,codeEditorRef:te});const[dt,st]=M.useState(null);Yne({docPresence:i,enableAutoFollow:Oe,openTab:q,activePane:pe});const[bt,Nt]=M.useState(!1),{aiChatMessage:Bt,setAIChatMessage:On,currentChatId:zn,selectedChatId:Yn,setSelectedChatId:tr,aiErrorMessage:In,setAIErrorMessage:nr,handleSendMessage:Pt,navigateMessageHistoryUp:Zt,navigateMessageHistoryDown:Pn,resetMessageHistoryNavigation:Yt}=Jne({content:t,submitOperation:n,aiChatMode:re,aiChatEndpoint:v,aiChatOptions:S,autoForkAndRetryAI:x,handleChatError:_,onAIChatMessageSubmitted:C}),rr=M.useRef(null),Vt="config.json";return M.useEffect(()=>{let yn=null;for(const en in ft)if(ft[en].name===Vt){yn=en;break}if(!yn||!ft||!ft[yn])return;let _n;try{_n=JSON.parse(ft[yn].text)}catch{return}const ir=rr.current;if(rr.current=_n,!ir)return;const Nn={};for(const en in _n)_n[en]!==ir[en]&&(typeof _n[en]=="object"&&typeof ir[en]=="object"?JSON.stringify(_n[en])!==JSON.stringify(ir[en])&&(Nn[en]=_n[en]):Nn[en]=_n[en]);for(const en in ir)en in _n||(Nn[en]=void 0);if(Object.keys(Nn).length>0)try{U.current?.contentWindow?.postMessage(Nn)}catch(en){console.error("Failed to send config changes to iframe:",en)}},[ft,U]),{content:t,shareDBDoc:e,submitOperation:n,localPresence:r,docPresence:i,files:ft,createFile:Xn,renameFile:Mn,deleteFile:Hn,createDirectory:An,renameDirectory:le,deleteDirectory:fe,deleteAllFiles:ge,setActiveFileId:Me,setActiveFileLeft:je,setActiveFileRight:_e,activePaneId:ee,pane:se,activePane:pe,openTab:q,closeTabs:ye,search:Z,isSearchOpen:V,setIsSearchOpen:ce,setSearch:Se,setSearchResults:Ee,setSearchFileVisibility:Ue,setSearchLineVisibility:Ge,setSearchFocusedIndex:Ne,toggleSearchFocused:Ve,renderVisualEditorEmptyState:l,isVisualEditorOpen:H,setIsVisualEditorOpen:qe,isAIChatOpen:he,setIsAIChatOpen:Ke,aiChatFocused:ve,toggleAIChatFocused:it,aiChatMode:Y.aiChatMode,setAIChatMode:at,aiChatEndpoint:v,aiChatOptions:S,isSettingsOpen:Ae,setIsSettingsOpen:kt,closeSettings:St,isDocOpen:Re,setIsDocOpen:We,closeDoc:Wt,theme:ue,setTheme:xe,username:me,setUsername:At,isDirectoryOpen:ln,toggleDirectory:jn,editorCache:un,editorWantsFocus:F,editorNoLongerWantsFocus:jt,errorMessage:z,handleRuntimeError:A,clearRuntimeError:X,isCreateFileModalOpen:Ce,handleOpenCreateFileModal:Be,handleCloseCreateFileModal:Xe,handleCreateFileClick:He,isCreateDirModalOpen:Ze,handleOpenCreateDirModal:ct,handleCloseCreateDirModal:pt,handleCreateDirClick:gt,runPrettierRef:T,runCodeRef:G,sidebarRef:W,codeEditorRef:te,iframeRef:U,connected:c,pending:f,hoveredItemId:dt,setHoveredItemId:st,enableAutoFollow:Oe,toggleAutoFollow:Jt,updatePresenceIndicator:kn,sidebarPresenceIndicators:ie,splitCurrentPane:gn,liveKitRoomName:g,setLiveKitRoom:O,liveKitToken:d,setLiveKitToken:p,liveKitConnection:y,setLiveKitConnection:b,voiceChatModalOpen:bt,setVoiceChatModalOpen:Nt,aiChatMessage:Bt,setAIChatMessage:On,currentChatId:zn,selectedChatId:Yn,setSelectedChatId:tr,aiErrorMessage:In,setAIErrorMessage:nr,handleSendMessage:Pt,navigateMessageHistoryUp:Zt,navigateMessageHistoryDown:Pn,resetMessageHistoryNavigation:Yt,autoForkAndRetryAI:x,clearStoredAIPrompt:P,getStoredAIPrompt:E,additionalWidgets:D,enableMinimalEditFlow:tK,onAIChatMessageSubmitted:C}},pr=M.createContext(null),tre=({children:t,...e})=>{const n=ere(e);return j.jsx(pr.Provider,{value:n,children:t})},fu=({variant:t="secondary",size:e,type:n="button",className:r="",...i})=>j.jsx("button",{...i,type:n,className:`vz-ui-button vz-ui-button--${t} ${e?`vz-ui-button--${e}`:""} ${r}`}),Ak=M.createContext(void 0),nre=({controlId:t,className:e="",children:n})=>{const r=M.useId();return j.jsx(Ak.Provider,{value:t||r,children:j.jsx("div",{className:`vz-ui-field ${e}`,children:n})})},rre=({children:t,...e})=>{const n=M.useContext(Ak);return j.jsx("label",{...e,htmlFor:e.htmlFor??n,className:`vz-ui-label ${e.className||""}`,children:t})},CN=M.forwardRef(({className:t="",id:e,...n},r)=>{const i=M.useContext(Ak);return j.jsx("input",{...n,id:e??i,ref:r,className:`vz-ui-control ${t}`})});CN.displayName="VZControl";const ire=({children:t,className:e=""})=>j.jsx("small",{className:`vz-ui-help ${e}`,children:t}),dr=Object.assign(({children:t})=>j.jsx(j.Fragment,{children:t}),{Group:nre,Label:rre,Control:CN,Text:ire}),$k=M.createContext(null),sre=({show:t,onHide:e,children:n,className:r="",onKeyDown:i})=>{const s=M.useRef(null),o=M.useId();return M.useEffect(()=>{const a=s.current;if(!(!a||!t))return a.open||a.showModal(),()=>{a.open&&a.close()}},[t]),!t||typeof document>"u"?null:Rk.createPortal(j.jsx($k.Provider,{value:{close:e,titleId:o},children:j.jsx("dialog",{ref:s,className:`vz-ui-modal ${r}`,"aria-labelledby":o,onKeyDown:i,onCancel:a=>{a.preventDefault(),e()},onClick:a=>{a.target===a.currentTarget&&e()},children:j.jsx("div",{className:"vz-ui-modal-content",children:n})})}),document.body)},ore=({children:t,closeButton:e,onClick:n})=>{const r=M.useContext($k);return j.jsxs("div",{className:"vz-ui-modal-header",children:[t,e&&j.jsx("button",{type:"button",className:"vz-ui-close","aria-label":"Close dialog",onClick:n??r?.close,children:"×"})]})},are=({children:t})=>{const e=M.useContext($k);return j.jsx("h2",{className:"vz-ui-modal-title",id:e?.titleId,children:t})},lre=({children:t,className:e=""})=>j.jsx("div",{className:`vz-ui-modal-body ${e}`,children:t}),ure=({children:t})=>j.jsx("div",{className:"vz-ui-modal-footer",children:t}),ar=Object.assign(sre,{Header:ore,Title:are,Body:lre,Footer:ure}),ji=({id:t,children:e})=>j.jsx("span",{id:t,role:"tooltip",className:"vz-ui-tooltip",children:e}),Ni=({children:t,overlay:e,placement:n="top"})=>{const r=M.useRef(null),[i,s]=M.useState(null),o=M.useCallback(()=>{const a=r.current?.getBoundingClientRect();if(!a)return;const l=a.left+a.width/2,u=a.top+a.height/2,c=8,f=n==="right"?{left:a.right+c,top:u,transform:"translateY(-50%)"}:n==="left"?{left:a.left-c,top:u,transform:"translate(-100%, -50%)"}:n==="bottom"?{left:l,top:a.bottom+c,transform:"translateX(-50%)"}:{left:l,top:a.top-c,transform:"translate(-50%, -100%)"};s(f)},[n]);return M.useEffect(()=>{if(i)return window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o)}},[i,o]),j.jsxs("span",{ref:r,className:"vz-ui-tooltip-anchor",onPointerEnter:o,onPointerLeave:()=>s(null),onFocus:o,onBlur:()=>s(null),children:[t,i&&typeof document<"u"&&Rk.createPortal(j.jsx("span",{className:"vz-ui-tooltip-floating",style:i,children:e}),document.body)]})},cre=({enableUsernameField:t=!0})=>{const{isDocOpen:e,closeDoc:n}=M.useContext(pr);return e?j.jsxs(ar,{className:"vz-settings",show:e,onHide:n,animation:!1,children:[j.jsx(ar.Header,{closeButton:!0,children:j.jsx(ar.Title,{children:"Keyboard Shortcuts"})}),j.jsxs(ar.Body,{children:[j.jsx(dr.Group,{children:j.jsx(dr.Text,{children:"Keyboard shortcuts and interactive widgets for quick actions"})}),j.jsx(dr.Group,{children:j.jsxs("ul",{children:[j.jsxs("li",{children:[j.jsxs("strong",{children:[j.jsx("kbd",{children:"Ctrl"})," + ",j.jsx("kbd",{children:"S"})]})," ","or"," ",j.jsxs("strong",{children:[j.jsx("kbd",{children:"Shift↑"})," + ",j.jsx("kbd",{children:"Enter←"})]})," ",j.jsx("br",{}),j.jsx("span",{children:"Run and format code"})]}),j.jsxs("li",{children:[j.jsxs("strong",{children:[j.jsx("kbd",{children:"Alt"})," + Drag on a number"]}),j.jsx("br",{}),j.jsx("span",{children:"Modify the number by dragging left or right"})]}),j.jsxs("li",{children:[j.jsxs("strong",{children:[j.jsx("kbd",{children:"Alt"})," + Click on a hex color"]}),j.jsx("br",{}),j.jsx("span",{children:"Open a color picker to modify the color"})]}),j.jsxs("li",{children:[j.jsxs("strong",{children:[j.jsx("kbd",{children:"Alt"})," + ",j.jsx("kbd",{children:"W"})]})," ",j.jsx("br",{}),j.jsx("span",{children:"Close the current tab"})]}),j.jsxs("li",{children:[j.jsxs("strong",{children:[j.jsx("kbd",{children:"Alt"})," + ",j.jsx("kbd",{children:"N"})]})," ","or"," ",j.jsxs("strong",{children:[j.jsx("kbd",{children:"Ctrl"})," + ",j.jsx("kbd",{children:"Shift↑"})," +"," ",j.jsx("kbd",{children:"N"})]})," ",j.jsx("br",{}),j.jsx("span",{children:"Open the create file modal"})]}),j.jsxs("li",{children:[j.jsxs("strong",{children:[j.jsx("kbd",{children:"Alt"})," + ",j.jsx("kbd",{children:"PgUp↑"})]})," ",j.jsx("br",{}),j.jsx("span",{children:"Change the active tab to the previous one"})]}),j.jsxs("li",{children:[j.jsxs("strong",{children:[j.jsx("kbd",{children:"Alt"})," + ",j.jsx("kbd",{children:"PgDn↓"})]})," ",j.jsx("br",{}),j.jsx("span",{children:"Change the active tab to the next one"})]}),j.jsxs("li",{children:[j.jsx("strong",{children:"Most VSCode Shortcuts"})," ",j.jsx("br",{}),"See VSCode docs:"," ",j.jsx("a",{href:"https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf",target:"_blank",children:"Windows"}),","," ",j.jsx("a",{href:"https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf",target:"_blank",children:"MacOS"}),","," ",j.jsx("a",{href:"https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf",target:"_blank",children:"Linux"})]})]})})]}),j.jsx(ar.Footer,{children:j.jsx(fu,{variant:"primary",onClick:n,children:"Done"})})]}):null},fre=["10px","12px","14px","16px","18px","20px","24px"],hre=["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Helvetica Neue","Arial","sans-serif","Courier New","Georgia","Tahoma","Verdana","Times New Roman","Trebuchet MS","Comic Sans MS"],dre=t=>{const e="abcdefghijklmnopqrstuvwxyz0123456789",n="72px",r=document.createElement("span");r.style.fontSize=n,r.style.visibility="hidden",r.style.position="absolute",r.innerHTML=e,document.body.appendChild(r);const i="monospace";r.style.fontFamily=i;const s=r.offsetWidth;r.style.fontFamily=`${t}, ${i}`;const o=r.offsetWidth;return document.body.removeChild(r),o!==s},pre=({enableUsernameField:t=!0})=>{const{isSettingsOpen:e,closeSettings:n,theme:r,setTheme:i,username:s,setUsername:o,sidebarRef:a}=M.useContext(pr),[l,u]=M.useState("Roboto Mono"),[c,f]=M.useState("16px"),[d,p]=M.useState([]);M.useEffect(()=>{if(typeof window<"u"){const b=window.localStorage.getItem("vzcodeSelectedFont"),v=window.localStorage.getItem("vzcodeSelectedFontSize");b!==null&&u(b),v!==null&&f(v)}},[]),M.useEffect(()=>{(()=>{const v=[];for(const S of hre)dre(S)&&v.push(S);p(v)})()},[]);const g=M.useCallback(()=>{u("Roboto Mono"),f("16px"),i(Pw[0].label),t&&o(""),localStorage.removeItem("vzcodeSelectedFont"),localStorage.removeItem("vzcodeSelectedFontSize")},[t,i,o]);M.useEffect(()=>{a.current?.closest(".app")?.style.setProperty("--vzcode-font-family",l)},[l,a]),M.useEffect(()=>{a.current?.closest(".app")?.style.setProperty("--vzcode-font-size",c)},[c,a]);const O=M.useRef(null),y=M.useCallback(()=>{o(O.current?.value||"")},[o]);return M.useEffect(()=>{if(e){const b=v=>{v.key==="Enter"&&n()};return window.addEventListener("keydown",b),()=>{window.removeEventListener("keydown",b)}}},[e,n]),e?j.jsxs(ar,{className:"vz-settings",show:e,onHide:n,animation:!1,children:[j.jsx(ar.Header,{closeButton:!0,children:j.jsx(ar.Title,{children:"Editor Settings"})}),j.jsxs(ar.Body,{children:[t?j.jsxs(dr.Group,{controlId:"vz-settings-username",children:[j.jsx(dr.Label,{children:"Username"}),j.jsx(dr.Control,{type:"text",ref:O,onChange:y,placeholder:"Enter username",value:s}),j.jsx(dr.Text,{children:"Enter a username to be displayed on your cursor"})]}):null,j.jsxs(dr.Group,{controlId:"vz-settings-theme",children:[j.jsx(dr.Label,{children:"Theme"}),j.jsx("select",{id:"vz-settings-theme",className:"vz-ui-select",value:r,onChange:b=>i(b.target.value),children:Pw.map(({label:b})=>j.jsx("option",{value:b,children:b},b))})]}),j.jsxs(dr.Group,{controlId:"vz-settings-font",children:[j.jsx(dr.Label,{children:"Font"}),j.jsx("select",{id:"vz-settings-font",className:"vz-ui-select",onChange:b=>u(b.target.value),value:l,children:d.map(b=>j.jsx("option",{value:b,children:b},b))})]}),j.jsxs(dr.Group,{controlId:"vz-settings-size",children:[j.jsx(dr.Label,{children:"Font Size"}),j.jsx("select",{id:"vz-settings-size",className:"vz-ui-select",onChange:b=>f(b.target.value),value:c,children:fre.map(b=>j.jsx("option",{value:b,children:b},b))})]})]}),j.jsxs(ar.Footer,{children:[j.jsx(fu,{variant:"secondary",onClick:g,children:"Reset to Default"}),j.jsx(fu,{variant:"primary",onClick:n,children:"Done"})]})]}):null};const mre=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gre=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,r)=>r?r.toUpperCase():n.toLowerCase()),tT=t=>{const e=gre(t);return e.charAt(0).toUpperCase()+e.slice(1)},RN=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim(),Ore=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var yre={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"};const vre=M.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},l)=>M.createElement("svg",{ref:l,...yre,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:RN("lucide",i),...!s&&!Ore(a)&&{"aria-hidden":"true"},...a},[...o.map(([u,c])=>M.createElement(u,c)),...Array.isArray(s)?s:[s]]));const Fg=(t,e)=>{const n=M.forwardRef(({className:r,...i},s)=>M.createElement(vre,{ref:s,iconNode:e,className:RN(`lucide-${mre(tT(t))}`,`lucide-${t}`,r),...i}));return n.displayName=tT(t),n};const bre=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M9 14h6",key:"159ibu"}],["path",{d:"M12 17v-6",key:"1y8rbf"}]],wre=Fg("clipboard-plus",bre);const Sre=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],xre=Fg("copy",Sre);const kre=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Pre=Fg("download",kre);const _re=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Ere=Fg("trash-2",_re),Cre=t=>{const e={name:"files"};for(const n of Object.keys(t)){const r=t[n],i=r.name.split("/"),s=i.length;let o=e;for(let a=0;a<s-1;a++){let l;const u=i[a];if(o.children)for(let c=0;c<o.children.length;c++){const f=o.children[c];if(f.name===u){l=f;break}}l||(l={name:i[a],path:i.slice(0,a+1).join("/")},(o.children||(o.children=[])).push(l)),o=l}r.text!==null&&(o.children||(o.children=[])).push({name:i[s-1],file:r,fileId:n})}return e},Rre=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:j.jsx("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"})}),Are=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:j.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m3.75 9v6m3-3H9m1.5-12H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})}),$re=()=>j.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:[j.jsx("path",{d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 0 1 0 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 0 1 0-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281Z"}),j.jsx("path",{d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"})]}),Vm=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:j.jsx("path",{d:"M6 18L18 6M6 6L18 18",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Tre=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:j.jsx("path",{fill:"none",stroke:"currentColor",d:"M14.7404 9L14.3942 18M9.60577 18L9.25962 9M19.2276 5.79057C19.5696 5.84221 19.9104 5.89747 20.25 5.95629M19.2276 5.79057L18.1598 19.6726C18.0696 20.8448 17.0921 21.75 15.9164 21.75H8.08357C6.90786 21.75 5.93037 20.8448 5.8402 19.6726L4.77235 5.79057M19.2276 5.79057C18.0812 5.61744 16.9215 5.48485 15.75 5.39432M3.75 5.95629C4.08957 5.89747 4.43037 5.84221 4.77235 5.79057M4.77235 5.79057C5.91878 5.61744 7.07849 5.48485 8.25 5.39432M15.75 5.39432V4.47819C15.75 3.29882 14.8393 2.31423 13.6606 2.27652C13.1092 2.25889 12.5556 2.25 12 2.25C11.4444 2.25 10.8908 2.25889 10.3394 2.27652C9.16065 2.31423 8.25 3.29882 8.25 4.47819V5.39432M15.75 5.39432C14.5126 5.2987 13.262 5.25 12 5.25C10.738 5.25 9.48744 5.2987 8.25 5.39432",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Qre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:j.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 12.75c1.148 0 2.278.08 3.383.237 1.037.146 1.866.966 1.866 2.013 0 3.728-2.35 6.75-5.25 6.75S6.75 18.728 6.75 15c0-1.046.83-1.867 1.866-2.013A24.204 24.204 0 0 1 12 12.75Zm0 0c2.883 0 5.647.508 8.207 1.44a23.91 23.91 0 0 1-1.152 6.06M12 12.75c-2.883 0-5.647.508-8.208 1.44.125 2.104.52 4.136 1.153 6.06M12 12.75a2.25 2.25 0 0 0 2.248-2.354M12 12.75a2.25 2.25 0 0 1-2.248-2.354M12 8.25c.995 0 1.971-.08 2.922-.236.403-.066.74-.358.795-.762a3.778 3.778 0 0 0-.399-2.25M12 8.25c-.995 0-1.97-.08-2.922-.236-.402-.066-.74-.358-.795-.762a3.734 3.734 0 0 1 .4-2.253M12 8.25a2.25 2.25 0 0 0-2.248 2.146M12 8.25a2.25 2.25 0 0 1 2.248 2.146M8.683 5a6.032 6.032 0 0 1-1.155-1.002c.07-.63.27-1.222.574-1.747m.581 2.749A3.75 3.75 0 0 1 15.318 5m0 0c.427-.283.815-.62 1.155-.999a4.471 4.471 0 0 0-.575-1.752M4.921 6a24.048 24.048 0 0 0-.392 3.314c1.668.546 3.416.914 5.223 1.082M19.08 6c.205 1.08.337 2.187.392 3.314a23.882 23.882 0 0 1-5.223 1.082"})}),AN=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:j.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})}),$N=({height:t=16,fill:e="currentcolor"})=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:t,viewBox:"4 4 16 16",children:j.jsx("path",{stroke:e,fill:"none",d:"M8 17l9-5-9-5v10z",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})}),Mre=()=>j.jsx("svg",{width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:j.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z"})}),Ire=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"24",height:"24",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:j.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"})}),Dre=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",children:j.jsx("path",{fill:"currentColor",d:"m16.114 1.553 6.333 6.333a1.75 1.75 0 0 1-.603 2.869l-1.63.633a5.67 5.67 0 0 0-3.395 3.725l-1.131 3.959a1.75 1.75 0 0 1-2.92.757L9 16.061l-5.595 5.594a.749.749 0 1 1-1.06-1.06L7.939 15l-3.768-3.768a1.75 1.75 0 0 1 .757-2.92l3.959-1.131a5.666 5.666 0 0 0 3.725-3.395l.633-1.63a1.75 1.75 0 0 1 2.869-.603ZM5.232 10.171l8.597 8.597a.25.25 0 0 0 .417-.108l1.131-3.959A7.17 7.17 0 0 1 19.67 9.99l1.63-.634a.25.25 0 0 0 .086-.409l-6.333-6.333a.25.25 0 0 0-.409.086l-.634 1.63a7.17 7.17 0 0 1-4.711 4.293L5.34 9.754a.25.25 0 0 0-.108.417Z"})}),jre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:j.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z"})}),Nre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:j.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"})}),Lre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M3 3h18v18H3V3zm16.525 13.707c-.131-.821-.666-1.511-2.252-2.155-.552-.259-1.165-.438-1.349-.854-.068-.248-.078-.382-.034-.529.113-.484.687-.629 1.137-.495.293.09.563.315.732.676.775-.507.775-.507 1.316-.844-.203-.314-.304-.451-.439-.586-.473-.528-1.103-.798-2.126-.775l-.528.067c-.507.124-.991.395-1.283.754-.855.968-.608 2.655.427 3.354 1.023.765 2.521.933 2.712 1.653.18.878-.652 1.159-1.475 1.058-.607-.136-.945-.439-1.316-1.002l-1.372.788c.157.359.337.517.607.832 1.305 1.316 4.568 1.249 5.153-.754.021-.067.18-.528.056-1.237l.034.049zm-6.737-5.434h-1.686c0 1.453-.007 2.898-.007 4.354 0 .924.047 1.772-.104 2.033-.247.517-.886.451-1.175.359-.297-.146-.448-.349-.623-.641-.047-.078-.082-.146-.095-.146l-1.368.844c.229.473.563.879.994 1.137.641.383 1.502.507 2.404.305.588-.17 1.095-.519 1.358-1.059.384-.697.302-1.553.299-2.509.008-1.541 0-3.083 0-4.635l.003-.042z"})}),Fre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M3 3h18v18H3V3m10.71 14.86c.5.98 1.51 1.73 3.09 1.73 1.6 0 2.8-.83 2.8-2.36 0-1.41-.81-2.04-2.25-2.66l-.42-.18c-.73-.31-1.04-.52-1.04-1.02 0-.41.31-.73.81-.73.48 0 .8.21 1.09.73l1.31-.87c-.55-.96-1.33-1.33-2.4-1.33-1.51 0-2.48.96-2.48 2.23 0 1.38.81 2.03 2.03 2.55l.42.18c.78.34 1.24.55 1.24 1.13 0 .48-.45.83-1.15.83-.83 0-1.31-.43-1.67-1.03l-1.38.8M13 11.25H8v1.5h1.5V20h1.75v-7.25H13v-1.5z"})}),Bre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M14.23 12.004a2.236 2.236 0 01-2.235 2.236 2.236 2.236 0 01-2.236-2.236 2.236 2.236 0 012.235-2.236 2.236 2.236 0 012.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38a2.167 2.167 0 00-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44a23.476 23.476 0 00-3.107-.534A23.892 23.892 0 0012.769 4.7c1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442a22.73 22.73 0 00-3.113.538 15.02 15.02 0 01-.254-1.42c-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87a25.64 25.64 0 01-4.412.005 26.64 26.64 0 01-1.183-1.86c-.372-.64-.71-1.29-1.018-1.946a25.17 25.17 0 011.013-1.954c.38-.66.773-1.286 1.18-1.868A25.245 25.245 0 0112 8.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933a25.952 25.952 0 00-1.345-2.32zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493a23.966 23.966 0 00-1.1-2.98c.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98a23.142 23.142 0 00-1.086 2.964c-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39a25.819 25.819 0 001.341-2.338zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143a22.005 22.005 0 01-2.006-.386c.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295a1.185 1.185 0 01-.553-.132c-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z"})}),qre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M10.354 21.125a4.44 4.44 0 01-4.765-1.767 4.109 4.109 0 01-.703-3.107 3.898 3.898 0 01.134-.522l.105-.321.287.21a7.21 7.21 0 002.186 1.092l.208.063-.02.208a1.253 1.253 0 00.226.83 1.337 1.337 0 001.435.533 1.231 1.231 0 00.343-.15l5.59-3.562a1.164 1.164 0 00.524-.778 1.242 1.242 0 00-.211-.937 1.338 1.338 0 00-1.435-.533 1.23 1.23 0 00-.343.15l-2.133 1.36a4.078 4.078 0 01-1.135.499 4.44 4.44 0 01-4.765-1.766 4.108 4.108 0 01-.702-3.108 3.855 3.855 0 011.742-2.582l5.589-3.563a4.072 4.072 0 011.135-.499 4.44 4.44 0 014.765 1.767 4.109 4.109 0 01.703 3.107 3.943 3.943 0 01-.134.522l-.105.321-.286-.21a7.204 7.204 0 00-2.187-1.093l-.208-.063.02-.207a1.255 1.255 0 00-.226-.831 1.337 1.337 0 00-1.435-.532 1.231 1.231 0 00-.343.15L8.62 9.368a1.162 1.162 0 00-.524.778 1.24 1.24 0 00.211.937 1.338 1.338 0 001.435.533 1.235 1.235 0 00.344-.151l2.132-1.36a4.067 4.067 0 011.135-.498 4.44 4.44 0 014.765 1.766 4.108 4.108 0 01.702 3.108 3.857 3.857 0 01-1.742 2.583l-5.589 3.562a4.072 4.072 0 01-1.135.499m10.358-17.95C18.484-.015 14.082-.96 10.9 1.068L5.31 4.63a6.412 6.412 0 00-2.896 4.295 6.753 6.753 0 00.666 4.336 6.43 6.43 0 00-.96 2.396 6.833 6.833 0 001.168 5.167c2.229 3.19 6.63 4.135 9.812 2.108l5.59-3.562a6.41 6.41 0 002.896-4.295 6.756 6.756 0 00-.665-4.336 6.429 6.429 0 00.958-2.396 6.831 6.831 0 00-1.167-5.168z"})}),zre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M4.136 3.012h15.729l-1.431 16.15-6.451 1.826-6.414-1.826-1.433-16.15zm5.266 7.302l-.173-2.035 7.533.002.173-1.963-9.87-.002.522 5.998h6.835l-.243 2.566-2.179.602-2.214-.605-.141-1.58H7.691l.247 3.123L12 17.506l4.028-1.08.558-6.111H9.402v-.001z"})}),Ure=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M4.192 3.143h15.615l-1.42 16.034-6.404 1.812-6.369-1.813L4.192 3.143zM16.9 6.424l-9.8-.002.158 1.949 7.529.002-.189 2.02H9.66l.179 1.913h4.597l-.272 2.62-2.164.598-2.197-.603-.141-1.569h-1.94l.216 2.867L12 17.484l3.995-1.137.905-9.923z"})}),Zre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M5 3h2v2H5v5a2 2 0 01-2 2 2 2 0 012 2v5h2v2H5c-1.07-.27-2-.9-2-2v-4a2 2 0 00-2-2H0v-2h1a2 2 0 002-2V5a2 2 0 012-2m14 0a2 2 0 012 2v4a2 2 0 002 2h1v2h-1a2 2 0 00-2 2v4a2 2 0 01-2 2h-2v-2h2v-5a2 2 0 012-2 2 2 0 01-2-2V5h-2V3h2m-7 12a1 1 0 011 1 1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1m-4 0a1 1 0 011 1 1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1m8 0a1 1 0 011 1 1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1z"})}),Vre=()=>j.jsx("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"none",children:j.jsx("path",{d:"M20.56 18H3.44C2.65 18 2 17.37 2 16.59V7.41C2 6.63 2.65 6 3.44 6h17.12c.79 0 1.44.63 1.44 1.41v9.18c0 .78-.65 1.41-1.44 1.41M6.81 15.19v-3.66l1.92 2.35 1.92-2.35v3.66h1.93V8.81h-1.93l-1.92 2.35-1.92-2.35H4.89v6.38h1.92M19.69 12h-1.92V8.81h-1.92V12h-1.93l2.89 3.28L19.69 12z"})}),Wre=()=>j.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"size-6",width:32,height:32,children:j.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"})}),TN=t=>(t.children&&(t.children.sort((e,n)=>{const r=e.file?1:0,i=n.file?1:0;return r-i||e.name.localeCompare(n.name)}),t.children.forEach(TN)),t);function Xre(t,e){const n={};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Hre=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Yre=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Gre={};function nT(t,e){return(Gre.jsx?Yre:Hre).test(t)}const Kre=/[ \t\n\f\r]/g;function Jre(t){return typeof t=="object"?t.type==="text"?rT(t.value):!1:rT(t)}function rT(t){return t.replace(Kre,"")===""}class Ld{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}Ld.prototype.normal={};Ld.prototype.property={};Ld.prototype.space=void 0;function QN(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ld(n,r,e)}function oS(t){return t.toLowerCase()}class Ui{constructor(e,n){this.attribute=n,this.property=e}}Ui.prototype.attribute="";Ui.prototype.booleanish=!1;Ui.prototype.boolean=!1;Ui.prototype.commaOrSpaceSeparated=!1;Ui.prototype.commaSeparated=!1;Ui.prototype.defined=!1;Ui.prototype.mustUseProperty=!1;Ui.prototype.number=!1;Ui.prototype.overloadedBoolean=!1;Ui.prototype.property="";Ui.prototype.spaceSeparated=!1;Ui.prototype.space=void 0;let eie=0;const rn=vu(),_r=vu(),aS=vu(),ot=vu(),Jn=vu(),Pc=vu(),Gi=vu();function vu(){return 2**++eie}const lS=Object.freeze(Object.defineProperty({__proto__:null,boolean:rn,booleanish:_r,commaOrSpaceSeparated:Gi,commaSeparated:Pc,number:ot,overloadedBoolean:aS,spaceSeparated:Jn},Symbol.toStringTag,{value:"Module"})),Bv=Object.keys(lS);class Tk extends Ui{constructor(e,n,r,i){let s=-1;if(super(e,n),iT(this,"space",i),typeof r=="number")for(;++s<Bv.length;){const o=Bv[s];iT(this,Bv[s],(r&lS[o])===lS[o])}}}Tk.prototype.defined=!0;function iT(t,e,n){n&&(t[e]=n)}function lf(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const s=new Tk(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[oS(r)]=r,n[oS(s.attribute)]=r}return new Ld(e,n,t.space)}const MN=lf({properties:{ariaActiveDescendant:null,ariaAtomic:_r,ariaAutoComplete:null,ariaBusy:_r,ariaChecked:_r,ariaColCount:ot,ariaColIndex:ot,ariaColSpan:ot,ariaControls:Jn,ariaCurrent:null,ariaDescribedBy:Jn,ariaDetails:null,ariaDisabled:_r,ariaDropEffect:Jn,ariaErrorMessage:null,ariaExpanded:_r,ariaFlowTo:Jn,ariaGrabbed:_r,ariaHasPopup:null,ariaHidden:_r,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Jn,ariaLevel:ot,ariaLive:null,ariaModal:_r,ariaMultiLine:_r,ariaMultiSelectable:_r,ariaOrientation:null,ariaOwns:Jn,ariaPlaceholder:null,ariaPosInSet:ot,ariaPressed:_r,ariaReadOnly:_r,ariaRelevant:null,ariaRequired:_r,ariaRoleDescription:Jn,ariaRowCount:ot,ariaRowIndex:ot,ariaRowSpan:ot,ariaSelected:_r,ariaSetSize:ot,ariaSort:null,ariaValueMax:ot,ariaValueMin:ot,ariaValueNow:ot,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function IN(t,e){return e in t?t[e]:e}function DN(t,e){return IN(t,e.toLowerCase())}const tie=lf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pc,acceptCharset:Jn,accessKey:Jn,action:null,allow:null,allowFullScreen:rn,allowPaymentRequest:rn,allowUserMedia:rn,alt:null,as:null,async:rn,autoCapitalize:null,autoComplete:Jn,autoFocus:rn,autoPlay:rn,blocking:Jn,capture:null,charSet:null,checked:rn,cite:null,className:Jn,cols:ot,colSpan:null,content:null,contentEditable:_r,controls:rn,controlsList:Jn,coords:ot|Pc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:rn,defer:rn,dir:null,dirName:null,disabled:rn,download:aS,draggable:_r,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:rn,formTarget:null,headers:Jn,height:ot,hidden:aS,high:ot,href:null,hrefLang:null,htmlFor:Jn,httpEquiv:Jn,id:null,imageSizes:null,imageSrcSet:null,inert:rn,inputMode:null,integrity:null,is:null,isMap:rn,itemId:null,itemProp:Jn,itemRef:Jn,itemScope:rn,itemType:Jn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:rn,low:ot,manifest:null,max:null,maxLength:ot,media:null,method:null,min:null,minLength:ot,multiple:rn,muted:rn,name:null,nonce:null,noModule:rn,noValidate:rn,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:rn,optimum:ot,pattern:null,ping:Jn,placeholder:null,playsInline:rn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:rn,referrerPolicy:null,rel:Jn,required:rn,reversed:rn,rows:ot,rowSpan:ot,sandbox:Jn,scope:null,scoped:rn,seamless:rn,selected:rn,shadowRootClonable:rn,shadowRootDelegatesFocus:rn,shadowRootMode:null,shape:null,size:ot,sizes:null,slot:null,span:ot,spellCheck:_r,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ot,step:null,style:null,tabIndex:ot,target:null,title:null,translate:null,type:null,typeMustMatch:rn,useMap:null,value:_r,width:ot,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Jn,axis:null,background:null,bgColor:null,border:ot,borderColor:null,bottomMargin:ot,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:rn,declare:rn,event:null,face:null,frame:null,frameBorder:null,hSpace:ot,leftMargin:ot,link:null,longDesc:null,lowSrc:null,marginHeight:ot,marginWidth:ot,noResize:rn,noHref:rn,noShade:rn,noWrap:rn,object:null,profile:null,prompt:null,rev:null,rightMargin:ot,rules:null,scheme:null,scrolling:_r,standby:null,summary:null,text:null,topMargin:ot,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ot,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:rn,disableRemotePlayback:rn,prefix:null,property:null,results:ot,security:null,unselectable:null},space:"html",transform:DN}),nie=lf({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Gi,accentHeight:ot,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ot,amplitude:ot,arabicForm:null,ascent:ot,attributeName:null,attributeType:null,azimuth:ot,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ot,by:null,calcMode:null,capHeight:ot,className:Jn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ot,diffuseConstant:ot,direction:null,display:null,dur:null,divisor:ot,dominantBaseline:null,download:rn,dx:null,dy:null,edgeMode:null,editable:null,elevation:ot,enableBackground:null,end:null,event:null,exponent:ot,externalResourcesRequired:null,fill:null,fillOpacity:ot,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Pc,g2:Pc,glyphName:Pc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ot,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ot,horizOriginX:ot,horizOriginY:ot,id:null,ideographic:ot,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ot,k:ot,k1:ot,k2:ot,k3:ot,k4:ot,kernelMatrix:Gi,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ot,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ot,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ot,overlineThickness:ot,paintOrder:null,panose1:null,path:null,pathLength:ot,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Jn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ot,pointsAtY:ot,pointsAtZ:ot,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Gi,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Gi,rev:Gi,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Gi,requiredFeatures:Gi,requiredFonts:Gi,requiredFormats:Gi,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ot,specularExponent:ot,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ot,strikethroughThickness:ot,string:null,stroke:null,strokeDashArray:Gi,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ot,strokeOpacity:ot,strokeWidth:null,style:null,surfaceScale:ot,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Gi,tabIndex:ot,tableValues:null,target:null,targetX:ot,targetY:ot,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Gi,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ot,underlineThickness:ot,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ot,values:null,vAlphabetic:ot,vMathematical:ot,vectorEffect:null,vHanging:ot,vIdeographic:ot,version:null,vertAdvY:ot,vertOriginX:ot,vertOriginY:ot,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ot,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:IN}),jN=lf({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),NN=lf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:DN}),LN=lf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),rie={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},iie=/[A-Z]/g,sT=/-[a-z]/g,sie=/^data[-\w.:]+$/i;function oie(t,e){const n=oS(e);let r=e,i=Ui;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&sie.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(sT,lie);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!sT.test(s)){let o=s.replace(iie,aie);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=Tk}return new i(r,e)}function aie(t){return"-"+t.toLowerCase()}function lie(t){return t.charAt(1).toUpperCase()}const uie=QN([MN,tie,jN,NN,LN],"html"),Qk=QN([MN,nie,jN,NN,LN],"svg");function cie(t){return t.join(" ").trim()}var Xu={},qv,oT;function fie(){if(oT)return qv;oT=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,l=`
124
124
  `,u="/",c="*",f="",d="comment",p="declaration";qv=function(O,y){if(typeof O!="string")throw new TypeError("First argument must be a string");if(!O)return[];y=y||{};var b=1,v=1;function S(B){var A=B.match(e);A&&(b+=A.length);var X=B.lastIndexOf(l);v=~X?B.length-X:v+B.length}function x(){var B={line:b,column:v};return function(A){return A.position=new P(B),R(),A}}function P(B){this.start=B,this.end={line:b,column:v},this.source=y.source}P.prototype.content=O;function E(B){var A=new Error(y.source+":"+b+":"+v+": "+B);if(A.reason=B,A.filename=y.source,A.line=b,A.column=v,A.source=O,!y.silent)throw A}function D(B){var A=B.exec(O);if(A){var X=A[0];return S(X),O=O.slice(X.length),A}}function R(){D(n)}function _(B){var A;for(B=B||[];A=C();)A!==!1&&B.push(A);return B}function C(){var B=x();if(!(u!=O.charAt(0)||c!=O.charAt(1))){for(var A=2;f!=O.charAt(A)&&(c!=O.charAt(A)||u!=O.charAt(A+1));)++A;if(A+=2,f===O.charAt(A-1))return E("End of comment missing");var X=O.slice(2,A-2);return v+=2,S(X),O=O.slice(A),v+=2,B({type:d,comment:X})}}function I(){var B=x(),A=D(r);if(A){if(C(),!D(i))return E("property missing ':'");var X=D(s),G=B({type:p,property:g(A[0].replace(t,f)),value:X?g(X[0].replace(t,f)):f});return D(o),G}}function T(){var B=[];_(B);for(var A;A=I();)A!==!1&&(B.push(A),_(B));return B}return R(),T()};function g(O){return O?O.replace(a,f):f}return qv}var aT;function hie(){if(aT)return Xu;aT=1;var t=Xu&&Xu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Xu,"__esModule",{value:!0}),Xu.default=n;var e=t(fie());function n(r,i){var s=null;if(!r||typeof r!="string")return s;var o=(0,e.default)(r),a=typeof i=="function";return o.forEach(function(l){if(l.type==="declaration"){var u=l.property,c=l.value;a?i(u,c,l):c&&(s=s||{},s[u]=c)}}),s}return Xu}var ih={},lT;function die(){if(lT)return ih;lT=1,Object.defineProperty(ih,"__esModule",{value:!0}),ih.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(u){return!u||n.test(u)||t.test(u)},o=function(u,c){return c.toUpperCase()},a=function(u,c){return"".concat(c,"-")},l=function(u,c){return c===void 0&&(c={}),s(u)?u:(u=u.toLowerCase(),c.reactCompat?u=u.replace(i,a):u=u.replace(r,a),u.replace(e,o))};return ih.camelCase=l,ih}var sh,uT;function pie(){if(uT)return sh;uT=1;var t=sh&&sh.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},e=t(hie()),n=die();function r(i,s){var o={};return!i||typeof i!="string"||(0,e.default)(i,function(a,l){a&&l&&(o[(0,n.camelCase)(a,s)]=l)}),o}return r.default=r,sh=r,sh}var mie=pie();const gie=du(mie),FN=BN("end"),Mk=BN("start");function BN(t){return e;function e(n){const r=n&&n.position&&n.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Oie(t){const e=Mk(t),n=FN(t);if(e&&n)return{start:e,end:n}}function Ih(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?cT(t.position):"start"in t||"end"in t?cT(t):"line"in t||"column"in t?uS(t):""}function uS(t){return fT(t&&t.line)+":"+fT(t&&t.column)}function cT(t){return uS(t&&t.start)+"-"+uS(t&&t.end)}function fT(t){return t&&typeof t=="number"?t:1}class pi extends Error{constructor(e,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof e=="string"?i=e:!s.cause&&e&&(o=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const a=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=Ih(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}}pi.prototype.file="";pi.prototype.name="";pi.prototype.reason="";pi.prototype.message="";pi.prototype.stack="";pi.prototype.column=void 0;pi.prototype.line=void 0;pi.prototype.ancestors=void 0;pi.prototype.cause=void 0;pi.prototype.fatal=void 0;pi.prototype.place=void 0;pi.prototype.ruleId=void 0;pi.prototype.source=void 0;const Ik={}.hasOwnProperty,yie=new Map,vie=/[A-Z]/g,bie=new Set(["table","tbody","thead","tfoot","tr"]),wie=new Set(["td","th"]),qN="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Sie(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Aie(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Rie(n,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?Qk:uie,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=zN(i,t,void 0);return s&&typeof s!="string"?s:i.create(t,i.Fragment,{children:s||void 0},void 0)}function zN(t,e,n){if(e.type==="element")return xie(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return kie(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return _ie(t,e,n);if(e.type==="mdxjsEsm")return Pie(t,e);if(e.type==="root")return Eie(t,e,n);if(e.type==="text")return Cie(t,e)}function xie(t,e,n){const r=t.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Qk,t.schema=i),t.ancestors.push(e);const s=ZN(t,e.tagName,!1),o=$ie(t,e);let a=jk(t,e);return bie.has(e.tagName)&&(a=a.filter(function(l){return typeof l=="string"?!Jre(l):!0})),UN(t,o,s,e),Dk(o,a),t.ancestors.pop(),t.schema=r,t.create(e,s,o,n)}function kie(t,e){if(e.data&&e.data.estree&&t.evaluater){const r=e.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}cd(t,e.position)}function Pie(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);cd(t,e.position)}function _ie(t,e,n){const r=t.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=Qk,t.schema=i),t.ancestors.push(e);const s=e.name===null?t.Fragment:ZN(t,e.name,!0),o=Tie(t,e),a=jk(t,e);return UN(t,o,s,e),Dk(o,a),t.ancestors.pop(),t.schema=r,t.create(e,s,o,n)}function Eie(t,e,n){const r={};return Dk(r,jk(t,e)),t.create(e,t.Fragment,r,n)}function Cie(t,e){return e.value}function UN(t,e,n,r){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=r)}function Dk(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function Rie(t,e,n){return r;function r(i,s,o,a){const u=Array.isArray(o.children)?n:e;return a?u(s,o,a):u(s,o)}}function Aie(t,e){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=Mk(r);return e(i,s,o,a,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function $ie(t,e){const n={};let r,i;for(i in e.properties)if(i!=="children"&&Ik.call(e.properties,i)){const s=Qie(t,i,e.properties[i]);if(s){const[o,a]=s;t.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&wie.has(e.tagName)?r=a:n[o]=a}}if(r){const s=n.style||(n.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Tie(t,e){const n={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,t.evaluater.evaluateExpression(a.argument))}else cd(t,e.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const a=r.value.data.estree.body[0];a.type,s=t.evaluater.evaluateExpression(a.expression)}else cd(t,e.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function jk(t,e){const n=[];let r=-1;const i=t.passKeys?new Map:yie;for(;++r<e.children.length;){const s=e.children[r];let o;if(t.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const u=i.get(l)||0;o=l+"-"+u,i.set(l,u+1)}}const a=zN(t,s,o);a!==void 0&&n.push(a)}return n}function Qie(t,e,n){const r=oie(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Xre(n):cie(n)),r.property==="style"){let i=typeof n=="object"?n:Mie(t,String(n));return t.stylePropertyNameCase==="css"&&(i=Iie(i)),["style",i]}return[t.elementAttributeNameCase==="react"&&r.space?rie[r.property]||r.property:r.attribute,n]}}function Mie(t,e){try{return gie(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const r=n,i=new pi("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=qN+"#cannot-parse-style-attribute",i}}function ZN(t,e,n){let r;if(!n)r={type:"Literal",value:e};else if(e.includes(".")){const i=e.split(".");let s=-1,o;for(;++s<i.length;){const a=nT(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:a,computed:!!(s&&a.type==="Literal"),optional:!1}:a}r=o}else r=nT(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(r.type==="Literal"){const i=r.value;return Ik.call(t.components,i)?t.components[i]:i}if(t.evaluater)return t.evaluater.evaluateExpression(r);cd(t)}function cd(t,e){const n=new pi("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=qN+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Iie(t){const e={};let n;for(n in t)Ik.call(t,n)&&(e[Die(n)]=t[n]);return e}function Die(t){let e=t.replace(vie,jie);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function jie(t){return"-"+t.toLowerCase()}const zv={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Nie={};function Nk(t,e){const n=Nie,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return VN(t,r,i)}function VN(t,e,n){if(Lie(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return hT(t.children,e,n)}return Array.isArray(t)?hT(t,e,n):""}function hT(t,e,n){const r=[];let i=-1;for(;++i<t.length;)r[i]=VN(t[i],e,n);return r.join("")}function Lie(t){return!!(t&&typeof t=="object")}const dT=document.createElement("i");function Lk(t){const e="&"+t+";";dT.innerHTML=e;const n=dT.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function ns(t,e,n,r){const i=t.length;let s=0,o;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(e,n),t.splice(...o);else for(n&&t.splice(e,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(e,0),t.splice(...o),s+=1e4,e+=1e4}function ms(t,e){return t.length>0?(ns(t,t.length,0,e),t):e}const pT={}.hasOwnProperty;function WN(t){const e={};let n=-1;for(;++n<t.length;)Fie(e,t[n]);return e}function Fie(t,e){let n;for(n in e){const i=(pT.call(t,n)?t[n]:void 0)||(t[n]={}),s=e[n];let o;if(s)for(o in s){pT.call(i,o)||(i[o]=[]);const a=s[o];Bie(i[o],Array.isArray(a)?a:a?[a]:[])}}}function Bie(t,e){let n=-1;const r=[];for(;++n<e.length;)(e[n].add==="after"?t:r).push(e[n]);ns(t,0,0,r)}function XN(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function zs(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const bi=ml(/[A-Za-z]/),ui=ml(/[\dA-Za-z]/),qie=ml(/[#-'*+\--9=?A-Z^-~]/);function Wm(t){return t!==null&&(t<32||t===127)}const cS=ml(/\d/),zie=ml(/[\dA-Fa-f]/),Uie=ml(/[!-/:-@[-`{-~]/);function Ut(t){return t!==null&&t<-2}function Wn(t){return t!==null&&(t<0||t===32)}function dn(t){return t===-2||t===-1||t===32}const Bg=ml(new RegExp("\\p{P}|\\p{S}","u")),hu=ml(/\s/);function ml(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function uf(t){const e=[];let n=-1,r=0,i=0;for(;++n<t.length;){const s=t.charCodeAt(n);let o="";if(s===37&&ui(t.charCodeAt(n+1))&&ui(t.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const a=t.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),i=1):o="�"}else o=String.fromCharCode(s);o&&(e.push(t.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return e.join("")+t.slice(r)}function xn(t,e,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return dn(l)?(t.enter(n),a(l)):e(l)}function a(l){return dn(l)&&s++<i?(t.consume(l),a):(t.exit(n),e(l))}}const Zie={tokenize:Vie};function Vie(t){const e=t.attempt(this.parser.constructs.contentInitial,r,i);let n;return e;function r(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),xn(t,e,"linePrefix")}function i(a){return t.enter("paragraph"),s(a)}function s(a){const l=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return Ut(a)?(t.consume(a),t.exit("chunkText"),s):(t.consume(a),o)}}const Wie={tokenize:Xie},mT={tokenize:Hie};function Xie(t){const e=this,n=[];let r=0,i,s,o;return a;function a(S){if(r<n.length){const x=n[r];return e.containerState=x[1],t.attempt(x[0].continuation,l,u)(S)}return u(S)}function l(S){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&v();const x=e.events.length;let P=x,E;for(;P--;)if(e.events[P][0]==="exit"&&e.events[P][1].type==="chunkFlow"){E=e.events[P][1].end;break}b(r);let D=x;for(;D<e.events.length;)e.events[D][1].end={...E},D++;return ns(e.events,P+1,0,e.events.slice(x)),e.events.length=D,u(S)}return a(S)}function u(S){if(r===n.length){if(!i)return d(S);if(i.currentConstruct&&i.currentConstruct.concrete)return g(S);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(mT,c,f)(S)}function c(S){return i&&v(),b(r),d(S)}function f(S){return e.parser.lazy[e.now().line]=r!==n.length,o=e.now().offset,g(S)}function d(S){return e.containerState={},t.attempt(mT,p,g)(S)}function p(S){return r++,n.push([e.currentConstruct,e.containerState]),d(S)}function g(S){if(S===null){i&&v(),b(0),t.consume(S);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),O(S)}function O(S){if(S===null){y(t.exit("chunkFlow"),!0),b(0),t.consume(S);return}return Ut(S)?(t.consume(S),y(t.exit("chunkFlow")),r=0,e.interrupt=void 0,a):(t.consume(S),O)}function y(S,x){const P=e.sliceStream(S);if(x&&P.push(null),S.previous=s,s&&(s.next=S),s=S,i.defineSkip(S.start),i.write(P),e.parser.lazy[S.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<o&&(!i.events[E][1].end||i.events[E][1].end.offset>o))return;const D=e.events.length;let R=D,_,C;for(;R--;)if(e.events[R][0]==="exit"&&e.events[R][1].type==="chunkFlow"){if(_){C=e.events[R][1].end;break}_=!0}for(b(r),E=D;E<e.events.length;)e.events[E][1].end={...C},E++;ns(e.events,R+1,0,e.events.slice(D)),e.events.length=E}}function b(S){let x=n.length;for(;x-- >S;){const P=n[x];e.containerState=P[1],P[0].exit.call(e,t)}n.length=S}function v(){i.write([null]),s=void 0,i=void 0,e.containerState._closeFlow=void 0}}function Hie(t,e,n){return xn(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Yc(t){if(t===null||Wn(t)||hu(t))return 1;if(Bg(t))return 2}function qg(t,e,n){const r=[];let i=-1;for(;++i<t.length;){const s=t[i].resolveAll;s&&!r.includes(s)&&(e=s(e,n),r.push(s))}return e}const fS={name:"attention",resolveAll:Yie,tokenize:Gie};function Yie(t,e){let n=-1,r,i,s,o,a,l,u,c;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(r=n;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&e.sliceSerialize(t[r][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[r][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;l=t[r][1].end.offset-t[r][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const f={...t[r][1].end},d={...t[n][1].start};gT(f,-l),gT(d,l),o={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...t[r][1].end}},a={type:l>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:d},s={type:l>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},t[r][1].end={...o.start},t[n][1].start={...a.end},u=[],t[r][1].end.offset-t[r][1].start.offset&&(u=ms(u,[["enter",t[r][1],e],["exit",t[r][1],e]])),u=ms(u,[["enter",i,e],["enter",o,e],["exit",o,e],["enter",s,e]]),u=ms(u,qg(e.parser.constructs.insideSpan.null,t.slice(r+1,n),e)),u=ms(u,[["exit",s,e],["enter",a,e],["exit",a,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(c=2,u=ms(u,[["enter",t[n][1],e],["exit",t[n][1],e]])):c=0,ns(t,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function Gie(t,e){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Yc(r);let s;return o;function o(l){return s=l,t.enter("attentionSequence"),a(l)}function a(l){if(l===s)return t.consume(l),a;const u=t.exit("attentionSequence"),c=Yc(l),f=!c||c===2&&i||n.includes(l),d=!i||i===2&&c||n.includes(r);return u._open=!!(s===42?f:f&&(i||!d)),u._close=!!(s===42?d:d&&(c||!f)),e(l)}}function gT(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const Kie={name:"autolink",tokenize:Jie};function Jie(t,e,n){let r=0;return i;function i(p){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(p),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(p){return bi(p)?(t.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||ui(p)?(r=1,a(p)):u(p)}function a(p){return p===58?(t.consume(p),r=0,l):(p===43||p===45||p===46||ui(p))&&r++<32?(t.consume(p),a):(r=0,u(p))}function l(p){return p===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(p),t.exit("autolinkMarker"),t.exit("autolink"),e):p===null||p===32||p===60||Wm(p)?n(p):(t.consume(p),l)}function u(p){return p===64?(t.consume(p),c):qie(p)?(t.consume(p),u):n(p)}function c(p){return ui(p)?f(p):n(p)}function f(p){return p===46?(t.consume(p),r=0,c):p===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(p),t.exit("autolinkMarker"),t.exit("autolink"),e):d(p)}function d(p){if((p===45||ui(p))&&r++<63){const g=p===45?d:f;return t.consume(p),g}return n(p)}}const Fd={partial:!0,tokenize:ese};function ese(t,e,n){return r;function r(s){return dn(s)?xn(t,i,"linePrefix")(s):i(s)}function i(s){return s===null||Ut(s)?e(s):n(s)}}const HN={continuation:{tokenize:nse},exit:rse,name:"blockQuote",tokenize:tse};function tse(t,e,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(o),t.exit("blockQuoteMarker"),s}return n(o)}function s(o){return dn(o)?(t.enter("blockQuotePrefixWhitespace"),t.consume(o),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(o))}}function nse(t,e,n){const r=this;return i;function i(o){return dn(o)?xn(t,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return t.attempt(HN,e,n)(o)}}function rse(t){t.exit("blockQuote")}const YN={name:"characterEscape",tokenize:ise};function ise(t,e,n){return r;function r(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),i}function i(s){return Uie(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(s)}}const GN={name:"characterReference",tokenize:sse};function sse(t,e,n){const r=this;let i=0,s,o;return a;function a(f){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),l}function l(f){return f===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(f),t.exit("characterReferenceMarkerNumeric"),u):(t.enter("characterReferenceValue"),s=31,o=ui,c(f))}function u(f){return f===88||f===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(f),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,o=zie,c):(t.enter("characterReferenceValue"),s=7,o=cS,c(f))}function c(f){if(f===59&&i){const d=t.exit("characterReferenceValue");return o===ui&&!Lk(r.sliceSerialize(d))?n(f):(t.enter("characterReferenceMarker"),t.consume(f),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return o(f)&&i++<s?(t.consume(f),c):n(f)}}const OT={partial:!0,tokenize:ase},yT={concrete:!0,name:"codeFenced",tokenize:ose};function ose(t,e,n){const r=this,i={partial:!0,tokenize:P};let s=0,o=0,a;return l;function l(E){return u(E)}function u(E){const D=r.events[r.events.length-1];return s=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,a=E,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===a?(o++,t.consume(E),c):o<3?n(E):(t.exit("codeFencedFenceSequence"),dn(E)?xn(t,f,"whitespace")(E):f(E))}function f(E){return E===null||Ut(E)?(t.exit("codeFencedFence"),r.interrupt?e(E):t.check(OT,O,x)(E)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),d(E))}function d(E){return E===null||Ut(E)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),f(E)):dn(E)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),xn(t,p,"whitespace")(E)):E===96&&E===a?n(E):(t.consume(E),d)}function p(E){return E===null||Ut(E)?f(E):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),g(E))}function g(E){return E===null||Ut(E)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),f(E)):E===96&&E===a?n(E):(t.consume(E),g)}function O(E){return t.attempt(i,x,y)(E)}function y(E){return t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),b}function b(E){return s>0&&dn(E)?xn(t,v,"linePrefix",s+1)(E):v(E)}function v(E){return E===null||Ut(E)?t.check(OT,O,x)(E):(t.enter("codeFlowValue"),S(E))}function S(E){return E===null||Ut(E)?(t.exit("codeFlowValue"),v(E)):(t.consume(E),S)}function x(E){return t.exit("codeFenced"),e(E)}function P(E,D,R){let _=0;return C;function C(X){return E.enter("lineEnding"),E.consume(X),E.exit("lineEnding"),I}function I(X){return E.enter("codeFencedFence"),dn(X)?xn(E,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):T(X)}function T(X){return X===a?(E.enter("codeFencedFenceSequence"),B(X)):R(X)}function B(X){return X===a?(_++,E.consume(X),B):_>=o?(E.exit("codeFencedFenceSequence"),dn(X)?xn(E,A,"whitespace")(X):A(X)):R(X)}function A(X){return X===null||Ut(X)?(E.exit("codeFencedFence"),D(X)):R(X)}}}function ase(t,e,n){const r=this;return i;function i(o){return o===null?n(o):(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):e(o)}}const Uv={name:"codeIndented",tokenize:use},lse={partial:!0,tokenize:cse};function use(t,e,n){const r=this;return i;function i(u){return t.enter("codeIndented"),xn(t,s,"linePrefix",5)(u)}function s(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):Ut(u)?t.attempt(lse,o,l)(u):(t.enter("codeFlowValue"),a(u))}function a(u){return u===null||Ut(u)?(t.exit("codeFlowValue"),o(u)):(t.consume(u),a)}function l(u){return t.exit("codeIndented"),e(u)}}function cse(t,e,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Ut(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i):xn(t,s,"linePrefix",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(o):Ut(o)?i(o):n(o)}}const fse={name:"codeText",previous:dse,resolve:hse,tokenize:pse};function hse(t){let e=t.length-4,n=3,r,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(r=n;++r<e;)if(t[r][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(r=n-1,e++;++r<=e;)i===void 0?r!==e&&t[r][1].type!=="lineEnding"&&(i=r):(r===e||t[r][1].type==="lineEnding")&&(t[i][1].type="codeTextData",r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return t}function dse(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function pse(t,e,n){let r=0,i,s;return o;function o(f){return t.enter("codeText"),t.enter("codeTextSequence"),a(f)}function a(f){return f===96?(t.consume(f),r++,a):(t.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(t.enter("space"),t.consume(f),t.exit("space"),l):f===96?(s=t.enter("codeTextSequence"),i=0,c(f)):Ut(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),l):(t.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||Ut(f)?(t.exit("codeTextData"),l(f)):(t.consume(f),u)}function c(f){return f===96?(t.consume(f),i++,c):i===r?(t.exit("codeTextSequence"),t.exit("codeText"),e(f)):(s.type="codeTextData",u(f))}}class mse{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,n,r){const i=n||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&oh(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),oh(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),oh(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);oh(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);oh(this.left,n.reverse())}}}function oh(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function KN(t){const e={};let n=-1,r,i,s,o,a,l,u;const c=new mse(t);for(;++n<c.length;){for(;n in e;)n=e[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,gse(c,n)),n=e[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(o=c.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...c.get(i)[1].start},a=c.slice(i,n),a.unshift(r),c.splice(i,n-i+1,a))}}return ns(t,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function gse(t,e){const n=t.get(e)[1],r=t.get(e)[2];let i=e-1;const s=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const a=o.events,l=[],u={};let c,f,d=-1,p=n,g=0,O=0;const y=[O];for(;p;){for(;t.get(++i)[1]!==p;);s.push(i),p._tokenizer||(c=r.sliceStream(p),p.next||c.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++d<a.length;)a[d][0]==="exit"&&a[d-1][0]==="enter"&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(O=d+1,y.push(O),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),d=y.length;d--;){const b=a.slice(y[d],y[d+1]),v=s.pop();l.push([v,v+b.length-1]),t.splice(v,2,b)}for(l.reverse(),d=-1;++d<l.length;)u[g+l[d][0]]=g+l[d][1],g+=l[d][1]-l[d][0]-1;return u}const Ose={resolve:vse,tokenize:bse},yse={partial:!0,tokenize:wse};function vse(t){return KN(t),t}function bse(t,e){let n;return r;function r(a){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?s(a):Ut(a)?t.check(yse,o,s)(a):(t.consume(a),i)}function s(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function o(a){return t.consume(a),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function wse(t,e,n){const r=this;return i;function i(o){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),xn(t,s,"linePrefix")}function s(o){if(o===null||Ut(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(o):t.interrupt(r.parser.constructs.flow,n,e)(o)}}function JN(t,e,n,r,i,s,o,a,l){const u=l||Number.POSITIVE_INFINITY;let c=0;return f;function f(b){return b===60?(t.enter(r),t.enter(i),t.enter(s),t.consume(b),t.exit(s),d):b===null||b===32||b===41||Wm(b)?n(b):(t.enter(r),t.enter(o),t.enter(a),t.enter("chunkString",{contentType:"string"}),O(b))}function d(b){return b===62?(t.enter(s),t.consume(b),t.exit(s),t.exit(i),t.exit(r),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===62?(t.exit("chunkString"),t.exit(a),d(b)):b===null||b===60||Ut(b)?n(b):(t.consume(b),b===92?g:p)}function g(b){return b===60||b===62||b===92?(t.consume(b),p):p(b)}function O(b){return!c&&(b===null||b===41||Wn(b))?(t.exit("chunkString"),t.exit(a),t.exit(o),t.exit(r),e(b)):c<u&&b===40?(t.consume(b),c++,O):b===41?(t.consume(b),c--,O):b===null||b===32||b===40||Wm(b)?n(b):(t.consume(b),b===92?y:O)}function y(b){return b===40||b===41||b===92?(t.consume(b),O):O(b)}}function eL(t,e,n,r,i,s){const o=this;let a=0,l;return u;function u(p){return t.enter(r),t.enter(i),t.consume(p),t.exit(i),t.enter(s),c}function c(p){return a>999||p===null||p===91||p===93&&!l||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(t.exit(s),t.enter(i),t.consume(p),t.exit(i),t.exit(r),e):Ut(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),c):(t.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||Ut(p)||a++>999?(t.exit("chunkString"),c(p)):(t.consume(p),l||(l=!dn(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(t.consume(p),a++,f):f(p)}}function tL(t,e,n,r,i,s){let o;return a;function a(d){return d===34||d===39||d===40?(t.enter(r),t.enter(i),t.consume(d),t.exit(i),o=d===40?41:d,l):n(d)}function l(d){return d===o?(t.enter(i),t.consume(d),t.exit(i),t.exit(r),e):(t.enter(s),u(d))}function u(d){return d===o?(t.exit(s),l(o)):d===null?n(d):Ut(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),xn(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||Ut(d)?(t.exit("chunkString"),u(d)):(t.consume(d),d===92?f:c)}function f(d){return d===o||d===92?(t.consume(d),c):c(d)}}function Dh(t,e){let n;return r;function r(i){return Ut(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,r):dn(i)?xn(t,r,n?"linePrefix":"lineSuffix")(i):e(i)}}const Sse={name:"definition",tokenize:kse},xse={partial:!0,tokenize:Pse};function kse(t,e,n){const r=this;let i;return s;function s(p){return t.enter("definition"),o(p)}function o(p){return eL.call(r,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=zs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(t.enter("definitionMarker"),t.consume(p),t.exit("definitionMarker"),l):n(p)}function l(p){return Wn(p)?Dh(t,u)(p):u(p)}function u(p){return JN(t,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function c(p){return t.attempt(xse,f,f)(p)}function f(p){return dn(p)?xn(t,d,"whitespace")(p):d(p)}function d(p){return p===null||Ut(p)?(t.exit("definition"),r.parser.defined.push(i),e(p)):n(p)}}function Pse(t,e,n){return r;function r(a){return Wn(a)?Dh(t,i)(a):n(a)}function i(a){return tL(t,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function s(a){return dn(a)?xn(t,o,"whitespace")(a):o(a)}function o(a){return a===null||Ut(a)?e(a):n(a)}}const _se={name:"hardBreakEscape",tokenize:Ese};function Ese(t,e,n){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),i}function i(s){return Ut(s)?(t.exit("hardBreakEscape"),e(s)):n(s)}}const Cse={name:"headingAtx",resolve:Rse,tokenize:Ase};function Rse(t,e){let n=t.length-2,r=3,i,s;return t[r][1].type==="whitespace"&&(r+=2),n-2>r&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&t[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:t[r][1].start,end:t[n][1].end},s={type:"chunkText",start:t[r][1].start,end:t[n][1].end,contentType:"text"},ns(t,r,n-r+1,[["enter",i,e],["enter",s,e],["exit",s,e],["exit",i,e]])),t}function Ase(t,e,n){let r=0;return i;function i(c){return t.enter("atxHeading"),s(c)}function s(c){return t.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(t.consume(c),o):c===null||Wn(c)?(t.exit("atxHeadingSequence"),a(c)):n(c)}function a(c){return c===35?(t.enter("atxHeadingSequence"),l(c)):c===null||Ut(c)?(t.exit("atxHeading"),e(c)):dn(c)?xn(t,a,"whitespace")(c):(t.enter("atxHeadingText"),u(c))}function l(c){return c===35?(t.consume(c),l):(t.exit("atxHeadingSequence"),a(c))}function u(c){return c===null||c===35||Wn(c)?(t.exit("atxHeadingText"),a(c)):(t.consume(c),u)}}const $se=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],vT=["pre","script","style","textarea"],Tse={concrete:!0,name:"htmlFlow",resolveTo:Ise,tokenize:Dse},Qse={partial:!0,tokenize:Nse},Mse={partial:!0,tokenize:jse};function Ise(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function Dse(t,e,n){const r=this;let i,s,o,a,l;return u;function u(L){return c(L)}function c(L){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(L),f}function f(L){return L===33?(t.consume(L),d):L===47?(t.consume(L),s=!0,O):L===63?(t.consume(L),i=3,r.interrupt?e:U):bi(L)?(t.consume(L),o=String.fromCharCode(L),y):n(L)}function d(L){return L===45?(t.consume(L),i=2,p):L===91?(t.consume(L),i=5,a=0,g):bi(L)?(t.consume(L),i=4,r.interrupt?e:U):n(L)}function p(L){return L===45?(t.consume(L),r.interrupt?e:U):n(L)}function g(L){const se="CDATA[";return L===se.charCodeAt(a++)?(t.consume(L),a===se.length?r.interrupt?e:T:g):n(L)}function O(L){return bi(L)?(t.consume(L),o=String.fromCharCode(L),y):n(L)}function y(L){if(L===null||L===47||L===62||Wn(L)){const se=L===47,ee=o.toLowerCase();return!se&&!s&&vT.includes(ee)?(i=1,r.interrupt?e(L):T(L)):$se.includes(o.toLowerCase())?(i=6,se?(t.consume(L),b):r.interrupt?e(L):T(L)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(L):s?v(L):S(L))}return L===45||ui(L)?(t.consume(L),o+=String.fromCharCode(L),y):n(L)}function b(L){return L===62?(t.consume(L),r.interrupt?e:T):n(L)}function v(L){return dn(L)?(t.consume(L),v):C(L)}function S(L){return L===47?(t.consume(L),C):L===58||L===95||bi(L)?(t.consume(L),x):dn(L)?(t.consume(L),S):C(L)}function x(L){return L===45||L===46||L===58||L===95||ui(L)?(t.consume(L),x):P(L)}function P(L){return L===61?(t.consume(L),E):dn(L)?(t.consume(L),P):S(L)}function E(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(t.consume(L),l=L,D):dn(L)?(t.consume(L),E):R(L)}function D(L){return L===l?(t.consume(L),l=null,_):L===null||Ut(L)?n(L):(t.consume(L),D)}function R(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||Wn(L)?P(L):(t.consume(L),R)}function _(L){return L===47||L===62||dn(L)?S(L):n(L)}function C(L){return L===62?(t.consume(L),I):n(L)}function I(L){return L===null||Ut(L)?T(L):dn(L)?(t.consume(L),I):n(L)}function T(L){return L===45&&i===2?(t.consume(L),G):L===60&&i===1?(t.consume(L),W):L===62&&i===4?(t.consume(L),z):L===63&&i===3?(t.consume(L),U):L===93&&i===5?(t.consume(L),J):Ut(L)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(Qse,Y,B)(L)):L===null||Ut(L)?(t.exit("htmlFlowData"),B(L)):(t.consume(L),T)}function B(L){return t.check(Mse,A,Y)(L)}function A(L){return t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),X}function X(L){return L===null||Ut(L)?B(L):(t.enter("htmlFlowData"),T(L))}function G(L){return L===45?(t.consume(L),U):T(L)}function W(L){return L===47?(t.consume(L),o="",te):T(L)}function te(L){if(L===62){const se=o.toLowerCase();return vT.includes(se)?(t.consume(L),z):T(L)}return bi(L)&&o.length<8?(t.consume(L),o+=String.fromCharCode(L),te):T(L)}function J(L){return L===93?(t.consume(L),U):T(L)}function U(L){return L===62?(t.consume(L),z):L===45&&i===2?(t.consume(L),U):T(L)}function z(L){return L===null||Ut(L)?(t.exit("htmlFlowData"),Y(L)):(t.consume(L),z)}function Y(L){return t.exit("htmlFlow"),e(L)}}function jse(t,e,n){const r=this;return i;function i(o){return Ut(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):e(o)}}function Nse(t,e,n){return r;function r(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(Fd,e,n)}}const Lse={name:"htmlText",tokenize:Fse};function Fse(t,e,n){const r=this;let i,s,o;return a;function a(U){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(U),l}function l(U){return U===33?(t.consume(U),u):U===47?(t.consume(U),P):U===63?(t.consume(U),S):bi(U)?(t.consume(U),R):n(U)}function u(U){return U===45?(t.consume(U),c):U===91?(t.consume(U),s=0,g):bi(U)?(t.consume(U),v):n(U)}function c(U){return U===45?(t.consume(U),p):n(U)}function f(U){return U===null?n(U):U===45?(t.consume(U),d):Ut(U)?(o=f,W(U)):(t.consume(U),f)}function d(U){return U===45?(t.consume(U),p):f(U)}function p(U){return U===62?G(U):U===45?d(U):f(U)}function g(U){const z="CDATA[";return U===z.charCodeAt(s++)?(t.consume(U),s===z.length?O:g):n(U)}function O(U){return U===null?n(U):U===93?(t.consume(U),y):Ut(U)?(o=O,W(U)):(t.consume(U),O)}function y(U){return U===93?(t.consume(U),b):O(U)}function b(U){return U===62?G(U):U===93?(t.consume(U),b):O(U)}function v(U){return U===null||U===62?G(U):Ut(U)?(o=v,W(U)):(t.consume(U),v)}function S(U){return U===null?n(U):U===63?(t.consume(U),x):Ut(U)?(o=S,W(U)):(t.consume(U),S)}function x(U){return U===62?G(U):S(U)}function P(U){return bi(U)?(t.consume(U),E):n(U)}function E(U){return U===45||ui(U)?(t.consume(U),E):D(U)}function D(U){return Ut(U)?(o=D,W(U)):dn(U)?(t.consume(U),D):G(U)}function R(U){return U===45||ui(U)?(t.consume(U),R):U===47||U===62||Wn(U)?_(U):n(U)}function _(U){return U===47?(t.consume(U),G):U===58||U===95||bi(U)?(t.consume(U),C):Ut(U)?(o=_,W(U)):dn(U)?(t.consume(U),_):G(U)}function C(U){return U===45||U===46||U===58||U===95||ui(U)?(t.consume(U),C):I(U)}function I(U){return U===61?(t.consume(U),T):Ut(U)?(o=I,W(U)):dn(U)?(t.consume(U),I):_(U)}function T(U){return U===null||U===60||U===61||U===62||U===96?n(U):U===34||U===39?(t.consume(U),i=U,B):Ut(U)?(o=T,W(U)):dn(U)?(t.consume(U),T):(t.consume(U),A)}function B(U){return U===i?(t.consume(U),i=void 0,X):U===null?n(U):Ut(U)?(o=B,W(U)):(t.consume(U),B)}function A(U){return U===null||U===34||U===39||U===60||U===61||U===96?n(U):U===47||U===62||Wn(U)?_(U):(t.consume(U),A)}function X(U){return U===47||U===62||Wn(U)?_(U):n(U)}function G(U){return U===62?(t.consume(U),t.exit("htmlTextData"),t.exit("htmlText"),e):n(U)}function W(U){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(U),t.exit("lineEnding"),te}function te(U){return dn(U)?xn(t,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):J(U)}function J(U){return t.enter("htmlTextData"),o(U)}}const Fk={name:"labelEnd",resolveAll:Use,resolveTo:Zse,tokenize:Vse},Bse={tokenize:Wse},qse={tokenize:Xse},zse={tokenize:Hse};function Use(t){let e=-1;const n=[];for(;++e<t.length;){const r=t[e][1];if(n.push(t[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",e+=i}}return t.length!==n.length&&ns(t,0,t.length,n),t}function Zse(t,e){let n=t.length,r=0,i,s,o,a;for(;n--;)if(i=t[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},u={type:"label",start:{...t[s][1].start},end:{...t[o][1].end}},c={type:"labelText",start:{...t[s+r+2][1].end},end:{...t[o-2][1].start}};return a=[["enter",l,e],["enter",u,e]],a=ms(a,t.slice(s+1,s+r+3)),a=ms(a,[["enter",c,e]]),a=ms(a,qg(e.parser.constructs.insideSpan.null,t.slice(s+r+4,o-3),e)),a=ms(a,[["exit",c,e],t[o-2],t[o-1],["exit",u,e]]),a=ms(a,t.slice(o+1)),a=ms(a,[["exit",l,e]]),ns(t,s,t.length,a),t}function Vse(t,e,n){const r=this;let i=r.events.length,s,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return a;function a(d){return s?s._inactive?f(d):(o=r.parser.defined.includes(zs(r.sliceSerialize({start:s.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelEnd"),l):n(d)}function l(d){return d===40?t.attempt(Bse,c,o?c:f)(d):d===91?t.attempt(qse,c,o?u:f)(d):o?c(d):f(d)}function u(d){return t.attempt(zse,c,f)(d)}function c(d){return e(d)}function f(d){return s._balanced=!0,n(d)}}function Wse(t,e,n){return r;function r(f){return t.enter("resource"),t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),i}function i(f){return Wn(f)?Dh(t,s)(f):s(f)}function s(f){return f===41?c(f):JN(t,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return Wn(f)?Dh(t,l)(f):c(f)}function a(f){return n(f)}function l(f){return f===34||f===39||f===40?tL(t,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return Wn(f)?Dh(t,c)(f):c(f)}function c(f){return f===41?(t.enter("resourceMarker"),t.consume(f),t.exit("resourceMarker"),t.exit("resource"),e):n(f)}}function Xse(t,e,n){const r=this;return i;function i(a){return eL.call(r,t,s,o,"reference","referenceMarker","referenceString")(a)}function s(a){return r.parser.defined.includes(zs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function o(a){return n(a)}}function Hse(t,e,n){return r;function r(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),i}function i(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),e):n(s)}}const Yse={name:"labelStartImage",resolveAll:Fk.resolveAll,tokenize:Gse};function Gse(t,e,n){const r=this;return i;function i(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),s}function s(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),o):n(a)}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):e(a)}}const Kse={name:"labelStartLink",resolveAll:Fk.resolveAll,tokenize:Jse};function Jse(t,e,n){const r=this;return i;function i(o){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(o),t.exit("labelMarker"),t.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):e(o)}}const Zv={name:"lineEnding",tokenize:eoe};function eoe(t,e){return n;function n(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),xn(t,e,"linePrefix")}}const J1={name:"thematicBreak",tokenize:toe};function toe(t,e,n){let r=0,i;return s;function s(u){return t.enter("thematicBreak"),o(u)}function o(u){return i=u,a(u)}function a(u){return u===i?(t.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||Ut(u))?(t.exit("thematicBreak"),e(u)):n(u)}function l(u){return u===i?(t.consume(u),r++,l):(t.exit("thematicBreakSequence"),dn(u)?xn(t,a,"whitespace")(u):a(u))}}const Ii={continuation:{tokenize:soe},exit:aoe,name:"list",tokenize:ioe},noe={partial:!0,tokenize:loe},roe={partial:!0,tokenize:ooe};function ioe(t,e,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(p){const g=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:cS(p)){if(r.containerState.type||(r.containerState.type=g,t.enter(g,{_container:!0})),g==="listUnordered")return t.enter("listItemPrefix"),p===42||p===45?t.check(J1,n,u)(p):u(p);if(!r.interrupt||p===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(p)}return n(p)}function l(p){return cS(p)&&++o<10?(t.consume(p),l):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(t.exit("listItemValue"),u(p)):n(p)}function u(p){return t.enter("listItemMarker"),t.consume(p),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,t.check(Fd,r.interrupt?n:c,t.attempt(noe,d,f))}function c(p){return r.containerState.initialBlankLine=!0,s++,d(p)}function f(p){return dn(p)?(t.enter("listItemPrefixWhitespace"),t.consume(p),t.exit("listItemPrefixWhitespace"),d):n(p)}function d(p){return r.containerState.size=s+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(p)}}function soe(t,e,n){const r=this;return r.containerState._closeFlow=void 0,t.check(Fd,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,xn(t,e,"listItemIndent",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!dn(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(roe,e,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,xn(t,t.attempt(Ii,e,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function ooe(t,e,n){const r=this;return xn(t,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?e(s):n(s)}}function aoe(t){t.exit(this.containerState.type)}function loe(t,e,n){const r=this;return xn(t,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!dn(s)&&o&&o[1].type==="listItemPrefixWhitespace"?e(s):n(s)}}const bT={name:"setextUnderline",resolveTo:uoe,tokenize:coe};function uoe(t,e){let n=t.length,r,i,s;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){r=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!s&&t[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",s?(t.splice(i,0,["enter",o,e]),t.splice(s+1,0,["exit",t[r][1],e]),t[r][1].end={...t[s][1].end}):t[r][1]=o,t.push(["exit",o,e]),t}function coe(t,e,n){const r=this;let i;return s;function s(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(t.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return t.enter("setextHeadingLineSequence"),a(u)}function a(u){return u===i?(t.consume(u),a):(t.exit("setextHeadingLineSequence"),dn(u)?xn(t,l,"lineSuffix")(u):l(u))}function l(u){return u===null||Ut(u)?(t.exit("setextHeadingLine"),e(u)):n(u)}}const foe={tokenize:hoe};function hoe(t){const e=this,n=t.attempt(Fd,r,t.attempt(this.parser.constructs.flowInitial,i,xn(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Ose,i)),"linePrefix")));return n;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const doe={resolveAll:rL()},poe=nL("string"),moe=nL("text");function nL(t){return{resolveAll:rL(t==="text"?goe:void 0),tokenize:e};function e(n){const r=this,i=this.parser.constructs[t],s=n.attempt(i,o,a);return o;function o(c){return u(c)?s(c):a(c)}function a(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),l}function l(c){return u(c)?(n.exit("data"),s(c)):(n.consume(c),l)}function u(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d<f.length;){const p=f[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function rL(t){return e;function e(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return t?t(n,r):n}}function goe(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const r=t[n-1][1],i=e.sliceStream(r);let s=i.length,o=-1,a=0,l;for(;s--;){const u=i[s];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(u===-2)l=!0,a++;else if(u!==-1){s++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(a=0),a){const u={type:n===t.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(t.splice(n,0,["enter",u,e],["exit",u,e]),n+=2)}n++}return t}const Ooe={42:Ii,43:Ii,45:Ii,48:Ii,49:Ii,50:Ii,51:Ii,52:Ii,53:Ii,54:Ii,55:Ii,56:Ii,57:Ii,62:HN},yoe={91:Sse},voe={[-2]:Uv,[-1]:Uv,32:Uv},boe={35:Cse,42:J1,45:[bT,J1],60:Tse,61:bT,95:J1,96:yT,126:yT},woe={38:GN,92:YN},Soe={[-5]:Zv,[-4]:Zv,[-3]:Zv,33:Yse,38:GN,42:fS,60:[Kie,Lse],91:Kse,92:[_se,YN],93:Fk,95:fS,96:fse},xoe={null:[fS,doe]},koe={null:[42,95]},Poe={null:[]},_oe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:koe,contentInitial:yoe,disable:Poe,document:Ooe,flow:boe,flowInitial:voe,insideSpan:xoe,string:woe,text:Soe},Symbol.toStringTag,{value:"Module"}));function Eoe(t,e,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let o=[],a=[];const l={attempt:D(P),check:D(E),consume:v,enter:S,exit:x,interrupt:D(E,{interrupt:!0})},u={code:null,containerState:{},defineSkip:O,events:[],now:g,parser:t,previous:null,sliceSerialize:d,sliceStream:p,write:f};let c=e.tokenize.call(u,l);return e.resolveAll&&s.push(e),u;function f(I){return o=ms(o,I),y(),o[o.length-1]!==null?[]:(R(e,0),u.events=qg(s,u.events,u),u.events)}function d(I,T){return Roe(p(I),T)}function p(I){return Coe(o,I)}function g(){const{_bufferIndex:I,_index:T,line:B,column:A,offset:X}=r;return{_bufferIndex:I,_index:T,line:B,column:A,offset:X}}function O(I){i[I.line]=I.column,C()}function y(){let I;for(;r._index<o.length;){const T=o[r._index];if(typeof T=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<T.length;)b(T.charCodeAt(r._bufferIndex));else b(T)}}function b(I){c=c(I)}function v(I){Ut(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,C()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=I}function S(I,T){const B=T||{};return B.type=I,B.start=g(),u.events.push(["enter",B,u]),a.push(B),B}function x(I){const T=a.pop();return T.end=g(),u.events.push(["exit",T,u]),T}function P(I,T){R(I,T.from)}function E(I,T){T.restore()}function D(I,T){return B;function B(A,X,G){let W,te,J,U;return Array.isArray(A)?Y(A):"tokenize"in A?Y([A]):z(A);function z(ue){return Z;function Z(V){const H=V!==null&&ue[V],he=V!==null&&ue.null,ve=[...Array.isArray(H)?H:H?[H]:[],...Array.isArray(he)?he:he?[he]:[]];return Y(ve)(V)}}function Y(ue){return W=ue,te=0,ue.length===0?G:L(ue[te])}function L(ue){return Z;function Z(V){return U=_(),J=ue,ue.partial||(u.currentConstruct=ue),ue.name&&u.parser.constructs.disable.null.includes(ue.name)?ee():ue.tokenize.call(T?Object.assign(Object.create(u),T):u,l,se,ee)(V)}}function se(ue){return I(J,U),X}function ee(ue){return U.restore(),++te<W.length?L(W[te]):G}}}function R(I,T){I.resolveAll&&!s.includes(I)&&s.push(I),I.resolve&&ns(u.events,T,u.events.length-T,I.resolve(u.events.slice(T),u)),I.resolveTo&&(u.events=I.resolveTo(u.events,u))}function _(){const I=g(),T=u.previous,B=u.currentConstruct,A=u.events.length,X=Array.from(a);return{from:A,restore:G};function G(){r=I,u.previous=T,u.currentConstruct=B,u.events.length=A,a=X,C()}}function C(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Coe(t,e){const n=e.start._index,r=e.start._bufferIndex,i=e.end._index,s=e.end._bufferIndex;let o;if(n===i)o=[t[n].slice(r,s)];else{if(o=t.slice(n,i),r>-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}s>0&&o.push(t[i].slice(0,s))}return o}function Roe(t,e){let n=-1;const r=[];let i;for(;++n<t.length;){const s=t[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
125
125
  `;break}case-3:{o=`\r
126
126
  `;break}case-2:{o=e?" ":" ";break}case-1:{if(!e&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function Aoe(t){const r={constructs:WN([_oe,...(t||{}).extensions||[]]),content:i(Zie),defined:[],document:i(Wie),flow:i(foe),lazy:{},string:i(poe),text:i(moe)};return r;function i(s){return o;function o(a){return Eoe(r,s,a)}}}function $oe(t){for(;!KN(t););return t}const wT=/[\0\t\n\r]/g;function Toe(){let t=1,e="",n=!0,r;return i;function i(s,o,a){const l=[];let u,c,f,d,p;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),f=0,e="",n&&(s.charCodeAt(0)===65279&&f++,n=void 0);f<s.length;){if(wT.lastIndex=f,u=wT.exec(s),d=u&&u.index!==void 0?u.index:s.length,p=s.charCodeAt(d),!u){e=s.slice(f);break}if(p===10&&f===d&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<d&&(l.push(s.slice(f,d)),t+=d-f),p){case 0:{l.push(65533),t++;break}case 9:{for(c=Math.ceil(t/4)*4,l.push(-2);t++<c;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:r=!0,t=1}f=d+1}return a&&(r&&l.push(-5),e&&l.push(e),l.push(null)),l}}const Qoe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Moe(t){return t.replace(Qoe,Ioe)}function Ioe(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return XN(n.slice(s?2:1),s?16:10)}return Lk(n)||t}const iL={}.hasOwnProperty;function Doe(t,e,n){return typeof e!="string"&&(n=e,e=void 0),joe(n)($oe(Aoe(n).document().write(Toe()(t,e,!0))))}function joe(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(pe),autolinkProtocol:_,autolinkEmail:_,atxHeading:s(me),blockQuote:s(he),characterEscape:_,characterReference:_,codeFenced:s(ve),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(ve,o),codeText:s(Ae,o),codeTextData:_,data:_,codeFlowValue:_,definition:s(Re),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(F),hardBreakEscape:s(Oe),hardBreakTrailing:s(Oe),htmlFlow:s(ie,o),htmlFlowData:_,htmlText:s(ie,o),htmlTextData:_,image:s(re),label:o,link:s(pe),listItem:s(je),listItemValue:d,listOrdered:s(Me,f),listUnordered:s(Me),paragraph:s(_e),reference:L,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(me),strong:s(q),thematicBreak:s(xe)},exit:{atxHeading:l(),atxHeadingSequence:P,autolink:l(),autolinkEmail:H,autolinkProtocol:V,blockQuote:l(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:ee,characterReferenceMarkerNumeric:ee,characterReferenceValue:ue,characterReference:Z,codeFenced:l(y),codeFencedFence:O,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:C,codeIndented:l(b),codeText:l(X),codeTextData:C,data:C,definition:l(),definitionDestinationString:x,definitionLabelString:v,definitionTitleString:S,emphasis:l(),hardBreakEscape:l(T),hardBreakTrailing:l(T),htmlFlow:l(B),htmlFlowData:C,htmlText:l(A),htmlTextData:C,image:l(W),label:J,labelText:te,lineEnding:I,link:l(G),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:se,resourceDestinationString:U,resourceTitleString:z,resource:Y,setextHeading:l(R),setextHeadingLineSequence:D,setextHeadingText:E,strong:l(),thematicBreak:l()}};sL(e,(t||{}).mdastExtensions||[]);const n={};return r;function r(ce){let Se={type:"root",children:[]};const Ee={stack:[Se],tokenStack:[],config:e,enter:a,exit:u,buffer:o,resume:c,data:n},Ue=[];let Ge=-1;for(;++Ge<ce.length;)if(ce[Ge][1].type==="listOrdered"||ce[Ge][1].type==="listUnordered")if(ce[Ge][0]==="enter")Ue.push(Ge);else{const Ne=Ue.pop();Ge=i(ce,Ne,Ge)}for(Ge=-1;++Ge<ce.length;){const Ne=e[ce[Ge][0]];iL.call(Ne,ce[Ge][1].type)&&Ne[ce[Ge][1].type].call(Object.assign({sliceSerialize:ce[Ge][2].sliceSerialize},Ee),ce[Ge][1])}if(Ee.tokenStack.length>0){const Ne=Ee.tokenStack[Ee.tokenStack.length-1];(Ne[1]||ST).call(Ee,void 0,Ne[0])}for(Se.position={start:Ma(ce.length>0?ce[0][1].start:{line:1,column:1,offset:0}),end:Ma(ce.length>0?ce[ce.length-2][1].end:{line:1,column:1,offset:0})},Ge=-1;++Ge<e.transforms.length;)Se=e.transforms[Ge](Se)||Se;return Se}function i(ce,Se,Ee){let Ue=Se-1,Ge=-1,Ne=!1,Ve,qe,Ke,it;for(;++Ue<=Ee;){const at=ce[Ue];switch(at[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{at[0]==="enter"?Ge++:Ge--,it=void 0;break}case"lineEndingBlank":{at[0]==="enter"&&(Ve&&!it&&!Ge&&!Ke&&(Ke=Ue),it=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:it=void 0}if(!Ge&&at[0]==="enter"&&at[1].type==="listItemPrefix"||Ge===-1&&at[0]==="exit"&&(at[1].type==="listUnordered"||at[1].type==="listOrdered")){if(Ve){let kt=Ue;for(qe=void 0;kt--;){const We=ce[kt];if(We[1].type==="lineEnding"||We[1].type==="lineEndingBlank"){if(We[0]==="exit")continue;qe&&(ce[qe][1].type="lineEndingBlank",Ne=!0),We[1].type="lineEnding",qe=kt}else if(!(We[1].type==="linePrefix"||We[1].type==="blockQuotePrefix"||We[1].type==="blockQuotePrefixWhitespace"||We[1].type==="blockQuoteMarker"||We[1].type==="listItemIndent"))break}Ke&&(!qe||Ke<qe)&&(Ve._spread=!0),Ve.end=Object.assign({},qe?ce[qe][1].start:at[1].end),ce.splice(qe||Ue,0,["exit",Ve,at[2]]),Ue++,Ee++}if(at[1].type==="listItemPrefix"){const kt={type:"listItem",_spread:!1,start:Object.assign({},at[1].start),end:void 0};Ve=kt,ce.splice(Ue,0,["enter",kt,at[2]]),Ue++,Ee++,Ke=void 0,it=!0}}}return ce[Se][1]._spread=Ne,Ee}function s(ce,Se){return Ee;function Ee(Ue){a.call(this,ce(Ue),Ue),Se&&Se.call(this,Ue)}}function o(){this.stack.push({type:"fragment",children:[]})}function a(ce,Se,Ee){this.stack[this.stack.length-1].children.push(ce),this.stack.push(ce),this.tokenStack.push([Se,Ee||void 0]),ce.position={start:Ma(Se.start),end:void 0}}function l(ce){return Se;function Se(Ee){ce&&ce.call(this,Ee),u.call(this,Ee)}}function u(ce,Se){const Ee=this.stack.pop(),Ue=this.tokenStack.pop();if(Ue)Ue[0].type!==ce.type&&(Se?Se.call(this,ce,Ue[0]):(Ue[1]||ST).call(this,ce,Ue[0]));else throw new Error("Cannot close `"+ce.type+"` ("+Ih({start:ce.start,end:ce.end})+"): it’s not open");Ee.position.end=Ma(ce.end)}function c(){return Nk(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(ce){if(this.data.expectingFirstListItemValue){const Se=this.stack[this.stack.length-2];Se.start=Number.parseInt(this.sliceSerialize(ce),10),this.data.expectingFirstListItemValue=void 0}}function p(){const ce=this.resume(),Se=this.stack[this.stack.length-1];Se.lang=ce}function g(){const ce=this.resume(),Se=this.stack[this.stack.length-1];Se.meta=ce}function O(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const ce=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ce.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const ce=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ce.replace(/(\r?\n|\r)$/g,"")}function v(ce){const Se=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=Se,Ee.identifier=zs(this.sliceSerialize(ce)).toLowerCase()}function S(){const ce=this.resume(),Se=this.stack[this.stack.length-1];Se.title=ce}function x(){const ce=this.resume(),Se=this.stack[this.stack.length-1];Se.url=ce}function P(ce){const Se=this.stack[this.stack.length-1];if(!Se.depth){const Ee=this.sliceSerialize(ce).length;Se.depth=Ee}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function D(ce){const Se=this.stack[this.stack.length-1];Se.depth=this.sliceSerialize(ce).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function _(ce){const Ee=this.stack[this.stack.length-1].children;let Ue=Ee[Ee.length-1];(!Ue||Ue.type!=="text")&&(Ue=ye(),Ue.position={start:Ma(ce.start),end:void 0},Ee.push(Ue)),this.stack.push(Ue)}function C(ce){const Se=this.stack.pop();Se.value+=this.sliceSerialize(ce),Se.position.end=Ma(ce.end)}function I(ce){const Se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ee=Se.children[Se.children.length-1];Ee.position.end=Ma(ce.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(Se.type)&&(_.call(this,ce),C.call(this,ce))}function T(){this.data.atHardBreak=!0}function B(){const ce=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ce}function A(){const ce=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ce}function X(){const ce=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ce}function G(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=Se,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function W(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=Se,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function te(ce){const Se=this.sliceSerialize(ce),Ee=this.stack[this.stack.length-2];Ee.label=Moe(Se),Ee.identifier=zs(Se).toLowerCase()}function J(){const ce=this.stack[this.stack.length-1],Se=this.resume(),Ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ee.type==="link"){const Ue=ce.children;Ee.children=Ue}else Ee.alt=Se}function U(){const ce=this.resume(),Se=this.stack[this.stack.length-1];Se.url=ce}function z(){const ce=this.resume(),Se=this.stack[this.stack.length-1];Se.title=ce}function Y(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function se(ce){const Se=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=Se,Ee.identifier=zs(this.sliceSerialize(ce)).toLowerCase(),this.data.referenceType="full"}function ee(ce){this.data.characterReferenceType=ce.type}function ue(ce){const Se=this.sliceSerialize(ce),Ee=this.data.characterReferenceType;let Ue;Ee?(Ue=XN(Se,Ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ue=Lk(Se);const Ge=this.stack[this.stack.length-1];Ge.value+=Ue}function Z(ce){const Se=this.stack.pop();Se.position.end=Ma(ce.end)}function V(ce){C.call(this,ce);const Se=this.stack[this.stack.length-1];Se.url=this.sliceSerialize(ce)}function H(ce){C.call(this,ce);const Se=this.stack[this.stack.length-1];Se.url="mailto:"+this.sliceSerialize(ce)}function he(){return{type:"blockquote",children:[]}}function ve(){return{type:"code",lang:null,meta:null,value:""}}function Ae(){return{type:"inlineCode",value:""}}function Re(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function F(){return{type:"emphasis",children:[]}}function me(){return{type:"heading",depth:0,children:[]}}function Oe(){return{type:"break"}}function ie(){return{type:"html",value:""}}function re(){return{type:"image",title:null,url:"",alt:null}}function pe(){return{type:"link",title:null,url:"",children:[]}}function Me(ce){return{type:"list",ordered:ce.type==="listOrdered",start:null,spread:ce._spread,children:[]}}function je(ce){return{type:"listItem",spread:ce._spread,checked:null,children:[]}}function _e(){return{type:"paragraph",children:[]}}function q(){return{type:"strong",children:[]}}function ye(){return{type:"text",value:""}}function xe(){return{type:"thematicBreak"}}}function Ma(t){return{line:t.line,column:t.column,offset:t.offset}}function sL(t,e){let n=-1;for(;++n<e.length;){const r=e[n];Array.isArray(r)?sL(t,r):Noe(t,r)}}function Noe(t,e){let n;for(n in e)if(iL.call(e,n))switch(n){case"canContainEols":{const r=e[n];r&&t[n].push(...r);break}case"transforms":{const r=e[n];r&&t[n].push(...r);break}case"enter":case"exit":{const r=e[n];r&&Object.assign(t[n],r);break}}}function ST(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Ih({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Ih({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Ih({start:e.start,end:e.end})+") is still open")}function Loe(t){const e=this;e.parser=n;function n(r){return Doe(r,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function Foe(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function Boe(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
@@ -280,7 +280,7 @@ ${String(t)}`),new Response(n,{status:500,headers:{"Content-Type":"text/plain"}}
280
280
  `)}const ufe=({fileName:t,beforeContent:e,afterContent:n})=>{const r=M.useMemo(()=>ofe("temp-id",t,e,n),[t,e,n]),i=M.useMemo(()=>r?zL(r,{drawFileList:!1,matching:"words",diffStyle:"word",outputFormat:"line-by-line"}):"",[r]),s=M.useMemo(()=>{const o=r.split(`
281
281
  `);let a=0,l=0;return o.forEach(u=>{u.startsWith("+")&&!u.startsWith("+++")?a++:u.startsWith("-")&&!u.startsWith("---")&&l++}),{additions:a,deletions:l}},[r]);return r?j.jsxs("div",{className:"diff-view","data-file":t,children:[j.jsx("div",{className:"diff-summary",children:j.jsxs("div",{className:"diff-stats",children:[j.jsx("span",{className:"files-changed",children:t}),s.additions>0&&j.jsxs("span",{className:"additions",children:["+",s.additions]}),s.deletions>0&&j.jsxs("span",{className:"deletions",children:["-",s.deletions]})]})}),j.jsx("div",{className:"diff-files",dangerouslySetInnerHTML:{__html:i}})]}):null},cfe=(t,e=60)=>{const n=t.querySelector(".d2h-diff-tbody tr");n&&(n.scrollIntoView({behavior:"smooth",block:"start"}),window.scrollBy(0,-e),t.setAttribute&&(t.tabIndex=-1,t.focus()))},ffe=(t=60)=>{const e=document.querySelector("#appHeader")||document.querySelector(".app-header")||document.querySelector("header");return e?e.getBoundingClientRect().height:t},hfe=t=>{const e=t.querySelectorAll(".d2h-file-wrapper"),n=t.querySelectorAll(".d2h-diff-tbody tr");return{hasFiles:e.length>0,fileCount:e.length,hasDiffLines:n.length>0,diffLineCount:n.length,isEmpty:e.length===0&&n.length===0,isMultiFile:e.length>1}},dfe=t=>{const e=hfe(t);let n="";e.isEmpty?n="No changes to review":e.isMultiFile?n=`${e.fileCount} files changed. Review diff content.`:n="1 file changed. Review diff content.";let r=document.getElementById("diff-announcements");r||(r=document.createElement("div"),r.id="diff-announcements",r.setAttribute("aria-live","polite"),r.setAttribute("aria-atomic","true"),r.style.position="absolute",r.style.left="-10000px",r.style.width="1px",r.style.height="1px",r.style.overflow="hidden",document.body.appendChild(r)),r.textContent=n},UL=M.forwardRef(({diffData:t,onOpenFile:e},n)=>{const r=M.useRef(null),i=Object.values(t).filter(f=>f.length>0),s=[],o=[];for(const f of i)r2(f)?s.push(f):o.push(f);let a=0,l=0;for(const f of o){const d=afe(f);a+=d.additions,l+=d.deletions}const u=lfe(t),c=zL(u,{drawFileList:!1,matching:"words",diffStyle:"word",outputFormat:"line-by-line"});return M.useImperativeHandle(n,()=>({scrollToFirstHunk:()=>{if(r.current){const f=ffe();cfe(r.current,f)}},focusDiffContainer:()=>{r.current&&(r.current.tabIndex=-1,r.current.focus())},announceSummary:()=>{r.current&&dfe(r.current)},getFirstHunkElement:()=>r.current?r.current.querySelector(".d2h-diff-tbody tr"):null}),[]),M.useEffect(()=>{if(!r.current)return;const f=g=>{const O=g.target;if(O.classList.contains("d2h-file-name")){g.preventDefault(),g.stopPropagation();const y=O.textContent?.trim();y&&e&&e(y)}},p=r.current.querySelectorAll(".d2h-file-name");return p.forEach(g=>{g.addEventListener("click",f),g.style.cursor="pointer",g.style.textDecoration="underline",g.style.color="#58a6ff"}),()=>{p.forEach(g=>{g.removeEventListener("click",f)})}},[c,e]),i.length===0?null:j.jsxs("div",{className:"diff-view",children:[j.jsx("div",{className:"diff-summary",id:"diff-summary",children:j.jsxs("div",{className:"diff-stats",children:[j.jsxs("span",{className:"files-changed",children:[i.length," file",i.length!==1?"s":""," changed"]}),a>0&&j.jsxs("span",{className:"additions",children:["+",a]}),l>0&&j.jsxs("span",{className:"deletions",children:["-",l]}),s.length>0&&j.jsxs("span",{className:"deletions",children:[s.length," deleted"]})]})}),s.map((f,d)=>{const p=sfe(f);return j.jsx("div",{className:"deleted-file",children:j.jsxs("div",{className:"deleted-file-header",children:[j.jsx("span",{className:"deleted-file-name",children:p}),j.jsx("span",{className:"deleted-file-status",children:"File deleted"})]})},d)}),o.length>0&&j.jsx("div",{className:"diff-files",ref:r,tabIndex:-1,role:"region","aria-label":"Code diff content","aria-describedby":"diff-summary",dangerouslySetInnerHTML:{__html:c}})]})});UL.displayName="DiffView";const ZL=M.forwardRef(({id:t,role:e,content:n,timestamp:r,events:i=[],isActive:s,children:o,chatId:a,showAdditionalWidgets:l=!1,isStreaming:u=!1,diffData:c,model:f,additionalWidgets:d,handleSendMessage:p,enableDiffView:g=!0,onOpenFile:O},y)=>{const b=M.useMemo(()=>wK(r).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),[r]),v=M.useMemo(()=>`ai-chat-message ${e}${u?" streaming":""}`,[e,u]);return j.jsxs("div",{className:v,children:[j.jsxs("div",{className:"ai-chat-message-content",children:[e==="assistant"&&f&&j.jsx("div",{className:"model-indicator",children:f}),n&&j.jsx(gS,{remarkPlugins:[yS],children:n}),g&&c&&Object.keys(c).length>0&&j.jsx(UL,{diffData:c,ref:y,onOpenFile:O}),i.map((S,x)=>{switch(S.type){case"text_chunk":return j.jsx("div",{className:"text-chunk",children:j.jsx(gS,{remarkPlugins:[yS],children:S.content})},`text-${x}`);case"file_complete":return j.jsx(ufe,{fileName:S.fileName,beforeContent:S.beforeContent||"",afterContent:S.afterContent||""},`file-${S.fileName}-${x}`);case"file_start":return null;default:return null}}),l&&d&&a&&!u&&d({messageId:t,chatId:a,handleSendMessage:p}),s&&o]}),j.jsx("div",{className:"ai-chat-message-time",children:b})]})});ZL.displayName="Message";const pfe=()=>j.jsx("div",{className:"ai-chat-message assistant",children:j.jsx("div",{className:"ai-chat-message-content",children:j.jsxs("div",{className:"ai-chat-typing",children:[j.jsx("span",{}),j.jsx("span",{}),j.jsx("span",{})]})})}),mfe=M.memo(pfe),gfe=({content:t,isVisible:e})=>!e||!t?null:j.jsxs("div",{className:"thinking-scratchpad",children:[j.jsxs("div",{className:"thinking-scratchpad-header",children:[j.jsx("span",{className:"thinking-scratchpad-icon",children:"🧠"}),j.jsx("span",{className:"thinking-scratchpad-title",children:"AI is thinking..."})]}),j.jsx("div",{className:"thinking-scratchpad-content",role:"log","aria-live":"polite","aria-relevant":"additions",children:j.jsx(gS,{remarkPlugins:[yS],children:t})})]}),Ofe=M.memo(gfe),yfe=[{x:40,y:0,r:4},{x:28.28,y:28.28,r:4.85},{x:0,y:40,r:5.71},{x:-28.29,y:28.28,r:6.57},{x:-40,y:0,r:7.42},{x:-28.29,y:-28.29,r:8.28},{x:-.01,y:-40,r:9.14},{x:28.28,y:-28.29,r:10}],vfe=({height:t=40,fill:e="currentcolor",fadeIn:n=!0})=>{const[r,i]=M.useState(!1);return M.useEffect(()=>{i(!0)},[]),r&&j.jsx("div",{className:`vz-spinner${n?" fade-in":""}`,children:j.jsx("svg",{height:t,viewBox:"0 0 100 100",style:{opacity:1},children:j.jsx("g",{transform:"translate(50, 50)",fill:e,children:j.jsx("g",{className:"vz-spinner-dots",children:yfe.map(({x:s,y:o,r:a},l)=>j.jsx("circle",{cx:s,cy:o,r:a},l))})})})})},bfe=({status:t,fileName:e,additionalWidgets:n})=>{const r=s=>{switch(s){case"Analyzing request...":return j.jsxs(j.Fragment,{children:["🔍 ",j.jsx("span",{children:"Analyzing request..."})]});case"Formulating a plan...":return j.jsxs(j.Fragment,{children:["💭 ",j.jsx("span",{children:"Formulating a plan..."})]});case"Describing changes...":return j.jsxs(j.Fragment,{children:["📝 ",j.jsx("span",{children:"Describing changes..."})]});case"Thinking...":return j.jsxs(j.Fragment,{children:["🤔 ",j.jsx("span",{children:"Thinking..."})]});case"Done":return j.jsxs("div",{className:"file-editing-done-container",children:[j.jsxs("div",{className:"file-editing-done-status",children:["✅ ",j.jsx("span",{children:"Done"})]}),n&&j.jsx("div",{className:"file-editing-done-widgets",children:n})]});default:return s.startsWith("Editing ")&&e?j.jsxs(j.Fragment,{children:["✏️"," ",j.jsxs("span",{children:["Editing ",j.jsx("code",{children:e}),"..."]})]}):s.startsWith("Editing ")?j.jsxs(j.Fragment,{children:["✏️ ",j.jsx("span",{children:s})]}):j.jsx("span",{children:s})}},i=t!=="Done";return j.jsx("div",{className:"file-editing-indicator",children:j.jsxs("div",{className:"file-editing-header",children:[i&&j.jsx("div",{className:"file-editing-icon",children:j.jsx(vfe,{height:16,fadeIn:!1})}),j.jsx("div",{className:"file-editing-text",children:r(t)})]})})},wfe=({messages:t,isLoading:e,chatId:n,aiScratchpad:r,currentStatus:i,model:s,onNewEvent:o,onJumpToLatest:a,beforeRender:l,afterRender:u,additionalWidgets:c,handleSendMessage:f,enableDiffView:d,onOpenFile:p})=>{const g=M.useRef(null),O=M.useRef(null),[y,b]=M.useState(e);M.useEffect(()=>{const C=l(),I=t.length>0&&t[t.length-1].diffData;let T=null;I&&O.current&&(T=O.current.getFirstHunkElement()),o(T),u(C)},[t,o,l,u]),M.useEffect(()=>{y&&!e&&a(),b(e)},[e,y,a]);const v=t[t.length-1],S=v?.role==="assistant"&&v.content!=="",x=e&&!S,P=!!(r&&r.trim()),D=(()=>{if(v&&v.role==="assistant"){const C=v;if(C.streamingEvents&&C.streamingEvents.length>0){const I=new Map;C.streamingEvents.forEach(T=>{T.type==="file_start"?I.set(T.fileName,!1):T.type==="file_complete"&&I.set(T.fileName,!0)});for(const[T,B]of I)if(!B)return{status:`Editing ${T}...`,fileName:T}}}return i?{status:i}:null})(),R=!!D,_=t.map((C,I)=>C.role==="assistant"?I:-1).filter(C=>C!==-1).pop();return j.jsxs("div",{className:"ai-chat-messages",role:"log","aria-live":"polite","aria-relevant":"additions",children:[t.map((C,I)=>{const T=I===t.length-1,B=C,A=!!B.isProgressive,X=C.role==="assistant"&&I===_;return j.jsxs(ZL,{id:C.id,role:C.role,content:A?void 0:C.content,timestamp:C.timestamp,events:A?B.streamingEvents||[]:[],isActive:I===_,chatId:n,showAdditionalWidgets:X,isStreaming:A,diffData:C.diffData,model:C.role==="assistant"?s:void 0,additionalWidgets:c,handleSendMessage:f,enableDiffView:d,onOpenFile:p,ref:T&&C.diffData?O:null,children:[A&&P&&j.jsx(Ofe,{content:r||"",isVisible:P}),A&&R&&j.jsx(bfe,{status:D?.status||"",fileName:D?.fileName,additionalWidgets:D?.status==="Done"&&X&&c&&n?c({messageId:C.id,chatId:n,handleSendMessage:f}):void 0}),A&&x&&j.jsx(mfe,{})]},C.id)}),j.jsx("div",{ref:g})]})},Sfe=M.memo(wfe),xfe=t=>{const[e,n]=M.useState(!1),r=M.useRef(null),i=M.useRef(t);M.useEffect(()=>{i.current=t},[t]);const s=M.useCallback(()=>{if(r.current)return r.current;const l=window.SpeechRecognition||window.webkitSpeechRecognition;if(!l)return null;const u=new l;return u.continuous=!0,u.interimResults=!0,u.onresult=c=>{let f="",d="";for(let p=0;p<c.results.length;p++){const g=c.results[p];g.isFinal?f+=g[0].transcript:d+=g[0].transcript}i.current(f+d)},u.onerror=c=>{console.error("Speech recognition error",c.error),n(!1)},u.onend=()=>{n(!1)},r.current=u,u},[]),o=M.useCallback(()=>{const l=s();if(!l){console.error("Speech recognition not supported in this browser");return}e?(l.stop(),n(!1)):(l.start(),n(!0))},[s,e]),a=M.useCallback(()=>{r.current&&e&&(r.current.stop(),n(!1))},[e]);return M.useEffect(()=>()=>{r.current?.abort()},[]),{isSpeaking:e,toggleSpeechRecognition:o,stopSpeaking:a}},kfe=()=>j.jsx("svg",{fill:"#000000",height:"24",width:"24",stroke:"currentColor",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",enableBackground:"new 0 0 512 512",children:j.jsx("g",{children:j.jsxs("g",{children:[j.jsx("path",{fill:"currentColor",d:"m439.5,236c0-11.3-9.1-20.4-20.4-20.4s-20.4,9.1-20.4,20.4c0,70-64,126.9-142.7,126.9-78.7,0-142.7-56.9-142.7-126.9 0-11.3-9.1-20.4-20.4-20.4s-20.4,9.1-20.4,20.4c0,86.2 71.5,157.4 163.1,166.7v57.5h-23.6c-11.3,0-20.4,9.1-20.4,20.4 0,11.3 9.1,20.4 20.4,20.4h88c11.3,0 20.4-9.1 20.4-20.4 0-11.3-9.1-20.4-20.4-20.4h-23.6v-57.5c91.6-9.3 163.1-80.5 163.1-166.7z"}),j.jsx("path",{fill:"currentColor",d:"m256,323.5c51,0 92.3-41.3 92.3-92.3v-127.9c0-51-41.3-92.3-92.3-92.3s-92.3,41.3-92.3,92.3v127.9c0,51 41.3,92.3 92.3,92.3zm-52.3-220.2c0-28.8 23.5-52.3 52.3-52.3s52.3,23.5 52.3,52.3v127.9c0,28.8-23.5,52.3-52.3,52.3s-52.3-23.5-52.3-52.3v-127.9z"})]})})}),Pfe=()=>j.jsx("svg",{fill:"#000000",height:"24",width:"24",stroke:"currentColor",version:"1.1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",enableBackground:"new 0 0 512 512",children:j.jsx("g",{children:j.jsxs("g",{children:[j.jsx("path",{fill:"currentColor",d:"m439.5,236c0-11.3-9.1-20.4-20.4-20.4s-20.4,9.1-20.4,20.4c0,70-64,126.9-142.7,126.9-78.7,0-142.7-56.9-142.7-126.9 0-11.3-9.1-20.4-20.4-20.4s-20.4,9.1-20.4,20.4c0,86.2 71.5,157.4 163.1,166.7v57.5h-23.6c-11.3,0-20.4,9.1-20.4,20.4 0,11.3 9.1,20.4 20.4,20.4h88c11.3,0 20.4-9.1 20.4-20.4 0-11.3-9.1-20.4-20.4-20.4h-23.6v-57.5c91.6-9.3 163.1-80.5 163.1-166.7z"}),j.jsx("path",{fill:"currentColor",d:"m256,323.5c51,0 92.3-41.3 92.3-92.3v-127.9c0-51-41.3-92.3-92.3-92.3s-92.3,41.3-92.3,92.3v127.9c0,51 41.3,92.3 92.3,92.3zm-52.3-220.2c0-28.8 23.5-52.3 52.3-52.3s52.3,23.5 52.3,52.3v127.9c0,28.8-23.5,52.3-52.3,52.3s-52.3-23.5-52.3-52.3v-127.9z"}),j.jsx("line",{x1:"100",y1:"100",x2:"412",y2:"412",stroke:"currentColor",strokeWidth:"40",strokeLinecap:"round"})]})})}),_fe=({isSpeaking:t,onToggle:e})=>{const n=t?"Stop voice typing":"Start voice typing";return j.jsx("button",{type:"button",className:`vz-chat-button ${t?"vz-chat-button--danger":"vz-chat-button--outline-secondary"}`,onClick:e,"aria-label":n,title:n,style:{borderColor:t?void 0:"#e0e8ff",borderRadius:"0.375rem",borderWidth:"1px",borderStyle:"solid"},children:t?j.jsx(Pfe,{}):j.jsx(kfe,{})})},Efe=({aiChatMessage:t,setAIChatMessage:e,onSendMessage:n,focused:r,aiChatMode:i,setAIChatMode:s,navigateMessageHistoryUp:o,navigateMessageHistoryDown:a,resetMessageHistoryNavigation:l,enableAskMode:u=!1,enableVoiceInput:c=!1})=>{const f=M.useRef(null),{isSpeaking:d,toggleSpeechRecognition:p,stopSpeaking:g}=xfe(e);M.useEffect(()=>{r&&f.current&&f.current.focus()},[r]);const O=M.useCallback(v=>{if(v.key==="Enter"&&!v.shiftKey)v.preventDefault(),n();else if(v.key==="Enter"&&v.shiftKey)v.stopPropagation();else if(v.key==="ArrowUp"){const S=v.target,{selectionStart:x,value:P}=S;P.substring(0,x).split(`
282
282
  `).length===1&&x===0&&(v.preventDefault(),o())}else if(v.key==="ArrowDown"){const S=v.target,{selectionStart:x,value:P}=S,D=P.substring(x).split(`
283
- `);D.length===1&&D[0]===""&&(v.preventDefault(),a())}},[n,o,a]),y=M.useCallback(()=>{d&&g(),n()},[n,d,g]),b=M.useCallback(v=>{e(v.target.value),l()},[e,l]);return j.jsxs("div",{className:"ai-chat-input-container",children:[u&&j.jsxs("div",{className:"ai-chat-mode-toggle",style:{marginBottom:"8px"},children:[j.jsxs("div",{className:"vz-chat-button-group",children:[j.jsx("button",{type:"button",id:"ai-chat-mode-ask",className:`vz-chat-button ${i==="ask"?"vz-chat-button--primary":"vz-chat-button--outline-primary"}`,"aria-pressed":i==="ask",onClick:()=>s("ask"),children:"💬 Ask"}),j.jsx("button",{type:"button",id:"ai-chat-mode-edit",className:`vz-chat-button ${i==="edit"?"vz-chat-button--primary":"vz-chat-button--outline-primary"}`,"aria-pressed":i==="edit",onClick:()=>s("edit"),children:"✏️ Edit"})]}),j.jsx("div",{className:"ai-chat-mode-description",children:i==="ask"?"Ask questions without editing files":"Get answers and code edits"})]}),j.jsxs("div",{className:"ai-chat-input-group",children:[j.jsx("textarea",{rows:10,value:t,onChange:b,onKeyDown:O,ref:f,placeholder:i==="edit"?"Ask me to make code changes...":"Ask me anything about your code...",spellCheck:"false","aria-label":"Chat message input"}),j.jsxs("div",{className:"ai-chat-input-footer",children:[j.jsx("span",{className:"ai-chat-hint",children:t?"Press Enter to send":""}),j.jsxs("div",{style:{display:"flex",gap:"8px"},children:[c&&j.jsx(_fe,{isSpeaking:d,onToggle:p}),j.jsx("button",{type:"button",onClick:y,disabled:!t.trim(),className:`ai-chat-send-button vz-chat-button ${t.trim()?"vz-chat-button--primary":"vz-chat-button--outline-secondary"}`,"aria-label":"Send message",title:"Send message (Enter)",children:"Send"})]})]})]})]})},Cfe=M.memo(Efe);function Rfe(t,e=2){return t.scrollTop+t.clientHeight>=t.scrollHeight-e}function a5(t,{epsilon:e=1,stableFrames:n=3,maxWaitMs:r=1e3}={}){return new Promise(i=>{let s=t.scrollTop,o=0,a=0;const l=performance.now(),u=()=>{const c=t.scrollTop;Math.abs(c-s)>e?o=0:o+=1,s=c;const d=performance.now()-l>r;if(o>=n&&Rfe(t)||d){cancelAnimationFrame(a),i();return}a=requestAnimationFrame(u)};a=requestAnimationFrame(u)})}const Afe=(t={})=>{const{threshold:e=24}=t,n=M.useRef(null),[r,i]=M.useState("AUTO_SCROLL_ON"),[s,o]=M.useState(!1),a=M.useRef(),l=M.useRef(!1),u=M.useCallback(y=>y.scrollHeight-y.clientHeight-y.scrollTop<=e,[e]),c=M.useCallback(()=>{const y=n.current;if(!y){o(!1);return}const b=r==="AUTO_SCROLL_OFF"&&!u(y);o(b)},[r,u]),f=M.useCallback(()=>{if(l.current)return;const y=n.current;y&&(u(y)?i("AUTO_SCROLL_ON"):i("AUTO_SCROLL_OFF"))},[u]);M.useEffect(()=>{const y=n.current;if(y)return y.addEventListener("scroll",f,{passive:!0}),()=>{y.removeEventListener("scroll",f)}},[f]),M.useEffect(()=>{c()},[c]);const d=M.useCallback(y=>{r==="AUTO_SCROLL_ON"&&(a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(async()=>{const b=n.current;if(b){if(l.current=!0,y){const v=b.getBoundingClientRect(),x=y.getBoundingClientRect().top-v.top+b.scrollTop;b.scrollTo({top:x,behavior:"smooth"})}else b.scrollTo({top:b.scrollHeight,behavior:"smooth"});await a5(b),l.current=!1}}))},[r]),p=M.useCallback(async y=>{const b=n.current;if(b){if(l.current=!0,i("AUTO_SCROLL_ON"),y){const v=b.getBoundingClientRect(),x=y.getBoundingClientRect().top-v.top+b.scrollTop;b.scrollTo({top:x,behavior:"smooth"})}else b.scrollTo({top:b.scrollHeight,behavior:"smooth"});await a5(b),l.current=!1}},[]),g=M.useCallback(()=>{const y=n.current;return y?y.scrollHeight:0},[]),O=M.useCallback(y=>{if(r==="AUTO_SCROLL_OFF"){const b=n.current;if(b){const v=b.scrollHeight-y;b.scrollTop+=v}}},[r]);return M.useEffect(()=>()=>{a.current&&cancelAnimationFrame(a.current)},[]),{containerRef:n,autoScrollState:r,showJumpButton:s,onNewEvent:d,onJumpToLatest:p,beforeRender:g,afterRender:O}},$fe=({visible:t,onClick:e,className:n=""})=>{const r=M.useCallback(()=>{e()},[e]),i=M.useCallback(s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),e())},[e]);return t?j.jsx("button",{className:`jump-to-latest-button ${n}`.trim(),onClick:r,onKeyDown:i,"aria-label":"Jump to latest",tabIndex:0,type:"button",children:j.jsx("span",{className:"jump-to-latest-icon","aria-hidden":"true",children:"▼"})}):null},l5=!1,Tfe=!1,Qfe=({aiChatFocused:t,content:e,aiChatMode:n,aiChatMessage:r,currentChatId:i,selectedChatId:s,setSelectedChatId:o,aiErrorMessage:a,setAIChatMode:l,getStoredAIPrompt:u,setAIChatMessage:c,handleSendMessage:f,setAIErrorMessage:d,navigateMessageHistoryUp:p,navigateMessageHistoryDown:g,resetMessageHistoryNavigation:O,enableMinimalEditFlow:y=!1,additionalWidgets:b,enableDiffView:v=!0,enableAskMode:S=!1,enableVoiceInput:x=!1,onOpenFile:P})=>{const{containerRef:E,showJumpButton:D,onNewEvent:R,onJumpToLatest:_,beforeRender:C,afterRender:I}=Afe({threshold:24}),T=s,B=T?e?.chats?.[T]:null,A=M.useMemo(()=>B?.messages||[],[B?.messages]);B?.aiStatus;const X=B?.aiScratchpad,G=B?.currentStatus,W=B?.model,te=M.useMemo(()=>A.map((se,ee)=>({...se,id:se.id||`msg-${ee}`})),[A]),J=!s||A.length===0,U=e?.chats||{},Y=Object.values(U).filter(se=>se.messages.length>0).length>0,L=M.useCallback(()=>(s||o(i),f()),[s,o,i,f]);return M.useEffect(()=>{if(u){const se=u();se&&(c(se.prompt),l(se.modelName==="ask"?"ask":"edit"))}},[u,c,l]),j.jsxs("div",{className:"ai-chat-container",children:[j.jsx("div",{className:"ai-chat-content",children:j.jsxs("div",{className:"ai-chat-messages-container",ref:E,children:[J?j.jsxs("div",{className:"ai-chat-empty",children:[j.jsx("div",{className:"ai-chat-empty-icon",children:"✨"}),j.jsx("h3",{className:"ai-chat-empty-title",children:"Edit with AI"}),j.jsx("div",{className:"ai-chat-empty-text",children:"How can I help you?"}),Y&&Tfe,l5,l5]}):j.jsx(Sfe,{messages:te,isLoading:!1,chatId:s||i,aiScratchpad:X,currentStatus:G,model:W,onNewEvent:R,onJumpToLatest:_,beforeRender:C,afterRender:I,additionalWidgets:b,handleSendMessage:f,enableDiffView:v,onOpenFile:P}),a&&j.jsx("div",{className:"ai-chat-error",children:j.jsxs("div",{className:"ai-chat-error-content",children:[j.jsx("span",{className:"ai-chat-error-icon",children:"⚠️"}),j.jsx("span",{className:"ai-chat-error-message",children:a}),j.jsx("button",{className:"ai-chat-error-dismiss",onClick:()=>d(null),"aria-label":"Dismiss error",children:"×"})]})}),j.jsx($fe,{visible:D,onClick:_})]})}),j.jsx("div",{className:"ai-chat-input-fixed",children:j.jsx(Cfe,{aiChatMessage:r,setAIChatMessage:c,onSendMessage:L,focused:t??!1,aiChatMode:n,setAIChatMode:l,enableAskMode:S,enableVoiceInput:x,navigateMessageHistoryUp:p,navigateMessageHistoryDown:g,resetMessageHistoryNavigation:O})})]})},Mfe=()=>{const{content:t,aiChatFocused:e,aiChatMode:n,aiChatMessage:r,currentChatId:i,selectedChatId:s,setSelectedChatId:o,aiErrorMessage:a,setAIChatMode:l,getStoredAIPrompt:u,setAIChatMessage:c,handleSendMessage:f,setAIErrorMessage:d,navigateMessageHistoryUp:p,navigateMessageHistoryDown:g,resetMessageHistoryNavigation:O,enableMinimalEditFlow:y,additionalWidgets:b,openTab:v,setIsAIChatOpen:S}=M.useContext(pr),x=M.useCallback(P=>{if(!t)return;const E=zw(t,P);E&&(v({fileId:E,isTransient:!1}),S(!1))},[t,v,S]);return j.jsx(Qfe,{content:t,aiChatFocused:e,aiChatMode:n,setAIChatMode:l,aiChatMessage:r,setAIChatMessage:c,aiErrorMessage:a,setAIErrorMessage:d,currentChatId:i,selectedChatId:s,setSelectedChatId:o,handleSendMessage:f,navigateMessageHistoryUp:p,navigateMessageHistoryDown:g,resetMessageHistoryNavigation:O,getStoredAIPrompt:u,onOpenFile:x,additionalWidgets:b,enableDiffView:JG,enableAskMode:eK,enableVoiceInput:GG,enableMinimalEditFlow:y})};function Ife(t){const e=t.split(".");switch(e[e.length-1]){case"jsx":case"tsx":return j.jsx(Bre,{});case"js":return j.jsx(Lre,{});case"ts":return j.jsx(Fre,{});case"json":return j.jsx(Zre,{});case"md":case"prompt":return j.jsx(Vre,{});case"html":return j.jsx(zre,{});case"css":return j.jsx(Ure,{});case"svelte":return j.jsx(qre,{});default:return j.jsx(AN,{})}}const i2=({name:t})=>j.jsx("i",{className:"file-icon",children:M.useMemo(()=>Ife(t),[t])}),VL=({show:t,onClose:e,onConfirm:n,isDirectory:r,name:i})=>{const s=M.useCallback(o=>{o.key==="Enter"&&n()},[n]);return M.useEffect(()=>(t?window.addEventListener("keydown",s):window.removeEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}),[t,s]),j.jsxs(ar,{show:t,onHide:e,centered:!0,children:[j.jsx(ar.Header,{closeButton:!0,onClick:e,children:j.jsxs(ar.Title,{children:["Delete"," ",i==="all files"?"All Files":r?"Directory":"File"]})}),j.jsx(ar.Body,{children:j.jsx("p",{children:i==="all files"?"This will delete all files in the project.":j.jsxs(j.Fragment,{children:["This will delete the"," ",r?"directory":"file"," ",j.jsx("strong",{children:i}),"."]})})}),j.jsxs(ar.Footer,{children:[j.jsx(fu,{variant:"secondary",type:"button",onClick:e,children:"Cancel"}),j.jsx(fu,{variant:"primary",onClick:n,children:"Delete"})]})]})},WL=({id:t,name:e,children:n,handleClick:r,handleDoubleClick:i,handleRenameClick:s,handleDeleteClick:o,isDirectory:a=!1,isActive:l=!1,renameFileTooltipText:u=a?"Rename Directory":"Rename File",deleteFileTooltipText:c=a?"Delete Directory":"Delete File"})=>{const{hoveredItemId:f,setHoveredItemId:d}=M.useContext(pr),p=f===t,g=M.useCallback(X=>{d(X?t:null)},[t,d]),[O,y]=M.useState(!1),[b,v]=M.useState(""),[S,x]=M.useState(!1),P=M.useRef(null),E=M.useCallback(X=>{X.key==="Escape"?y(!1):X.key==="Enter"&&P.current.blur()},[]),D=M.useCallback(()=>{y(!1),P.current.value.trim()===""?x(!0):s(P.current.value)},[s]),R=M.useCallback(X=>{X.stopPropagation(),y(!O),v(e)},[e,O]);M.useEffect(()=>{O&&P.current.focus()},[O]);const _=M.useCallback(X=>{X.stopPropagation(),x(!0)},[]),C=M.useCallback(()=>{x(!1)},[]),I=M.useCallback(X=>{X?.stopPropagation(),x(!1),o()},[o]),T=M.useCallback(()=>{g(!0)},[g]),B=M.useCallback(()=>{g(!1)},[g]),A=M.useCallback(()=>{v(P.current.value)},[]);return j.jsxs("div",{className:`file-or-directory ${l?"active-file":""}`,onClick:O?null:r,onDoubleClick:O||!i?null:i,onMouseEnter:T,onMouseLeave:B,children:[j.jsx("div",{className:"name",children:O?j.jsxs(j.Fragment,{children:[j.jsx(i2,{name:b}),j.jsx("input",{className:"rename-input",ref:P,type:"text","aria-label":"Field name",value:b,onKeyDown:E,onBlur:D,onChange:A})]}):n}),p&&!O?j.jsxs("div",{className:"utils",style:{position:"relative"},children:[j.jsx(Ni,{placement:"top",overlay:j.jsx(ji,{id:"rename-file-tooltip",children:u}),children:j.jsx("i",{onClick:R,className:"vz-icon-button",children:j.jsx(Rre,{})})}),j.jsx(Ni,{placement:"top",overlay:j.jsx(ji,{id:"delete-file-tooltip",children:c}),children:j.jsx("i",{onClick:_,className:"vz-icon-button",children:j.jsx(Tre,{})})})]}):null,S&&j.jsx(VL,{show:S,onClose:C,onConfirm:I,isDirectory:a,name:e})]})},Dfe=({name:t,path:e,children:n,handleFileClick:r,handleFileDoubleClick:i})=>{const{renameDirectory:s,deleteDirectory:o,isDirectoryOpen:a,toggleDirectory:l}=M.useContext(pr),u=M.useCallback(()=>{l(e)},[l,e]),c=M.useCallback(()=>{o(e)},[o,e]),f=M.useCallback(p=>{s(e,t,p)},[s,e,t]),d=M.useMemo(()=>a(e),[a,e]);return j.jsxs(j.Fragment,{children:[j.jsxs(WL,{id:e,name:t,handleClick:u,handleDeleteClick:c,handleRenameClick:f,isDirectory:!0,children:[j.jsx("div",{className:"arrow-wrapper",style:{transform:`rotate(${d?90:0}deg)`},children:j.jsx($N,{})}),j.jsx("div",{className:"name",children:t})]}),n&&d?j.jsx("div",{className:"indentation",children:n.map(p=>{const{fileId:g}=p,{path:O}=p;return j.jsx(XL,{entity:p,handleFileClick:r,handleFileDoubleClick:i},g||O)})}):null]})},jfe=({presence:t})=>j.jsx("div",{className:"presence-indicators",children:t.map((e,n)=>{const i=`rgb(${zD(e.username)})`;return j.jsx("div",{className:"presence-indicator",style:{backgroundColor:i},children:e.username[0]},n)})}),Nfe=({name:t,fileId:e,handleFileClick:n,handleFileDoubleClick:r,isActive:i,presence:s})=>{const{renameFile:o,deleteFile:a}=M.useContext(pr),l=M.useCallback(()=>{n(e)},[e,n]),u=M.useCallback(()=>{r(e)},[e,r]),c=M.useCallback(()=>{a(e)},[e,a]),f=M.useCallback(d=>{o(e,d)},[e,o]);return j.jsxs(WL,{id:e,name:t,handleClick:l,handleDoubleClick:u,handleDeleteClick:c,handleRenameClick:f,isActive:i,children:[j.jsx(jfe,{presence:s}),j.jsx(i2,{name:t}),t]})},XL=({entity:t,handleFileClick:e,handleFileDoubleClick:n})=>{const{activePane:r,sidebarPresenceIndicators:i}=M.useContext(pr),{name:s,file:o,fileId:a}=t,{path:l,children:u}=t,c=i?.filter(f=>f.fileId===a)||[];return o?j.jsx(Nfe,{fileId:a,name:s,handleFileClick:e,handleFileDoubleClick:n,isActive:a===r.activeFileId,presence:c}):j.jsx(Dfe,{name:s,path:l,children:u,handleFileClick:e,handleFileDoubleClick:n})};function u5(t,e,n,r){const i=t.state.doc.line(n).from+r;t.dispatch({selection:{anchor:i,head:i+e.length},scrollIntoView:!0,effects:rt.scrollIntoView(i,{y:"center"})})}function c5(t,e){const n=t.scrollTop,r=n+t.clientHeight,i=e.offsetTop-t.offsetTop,s=i+e.clientHeight;return i>=n+100&&s<=r-100}const Lfe=()=>{const[t,e]=M.useState(!1),[n,r]=M.useState(!1),{search:i,setSearch:s,activePaneId:o,setActiveFileId:a,setSearchResults:l,setSearchFileVisibility:u,setSearchLineVisibility:c,setSearchFocusedIndex:f,shareDBDoc:d,editorCache:p,openTab:g}=M.useContext(pr),{pattern:O,results:y,focusedIndex:b,focusedChildIndex:v,focused:S}=i,x=M.useRef(null),P=Object.entries(y).filter(([C,I])=>I.visibility!=="closed");M.useEffect(()=>{if(t){r(O.trim().length>=1);const C=setTimeout(()=>{O.trim().length>=1&&x.current&&(l(d),r(!1))},2e3);return()=>clearTimeout(C)}else e(!0)},[O,t,l,d]);const E=M.useCallback((C,I)=>{u(d,C,I.visibility==="open"&&v===null?"flattened":"open")},[u,d,v]),D=M.useCallback(C=>{u(d,C,"closed")},[u,d]),R=M.useCallback((C,I)=>{a(C),f(I,null)},[a,f]),_=C=>{if(C.preventDefault(),P.length===0)return;const I=P[b][1].matches.length;switch(C.key){case"Tab":f(b,null);break;case"ArrowUp":if(b==0&&v==null)break;if(v===null||I==0){const X=P[b-1][1].matches.length;f(b-1,X>0?X-1:null)}else v===0?f(b,null):f(b,v-1);break;case"ArrowDown":if(b==P.length-1&&v==I-1)break;v===null&&I>0?f(b,0):v==I-1||I==0?f(b+1,null):f(b,v+1);break;case"ArrowLeft":v!==null?f(b,null):E(P[b][0],P[b][1]);break;case"ArrowRight":P[b][1].visibility!=="open"?E(P[b][0],P[b][1]):v===null&&I!==0&&f(b,0);break;case"Enter":case" ":const A=P[b][0];if(g({fileId:A,isTransient:!0}),a(A),v!==null){const X=P[b][1].matches[v].line,G=P[b][1].matches[v].index,W=Jh(A,o);p.has(W)&&u5(p.get(W).editor,O,X,G)}break}const T=P[b][0],B=document.getElementById("sidebar-view-container");if(B)if(v===null){const A=document.getElementById(T);c5(B,A)||A.scrollIntoView({block:"center"})}else{const A=P[b][1].matches[v].line,X=document.getElementById(T+"-"+A);c5(B,X)||X.scrollIntoView({block:"center"})}};return M.useEffect(()=>{x.current&&x.current.focus()},[S]),j.jsxs("div",{children:[j.jsx(dr.Group,{className:"sidebar-search-form",controlId:"searchName",children:j.jsx(dr.Control,{type:"text",value:O,onChange:C=>s(C.target.value),ref:x,spellCheck:"false"})}),Object.keys(y).length>=1&&O.trim().length>=1?j.jsx("div",{onKeyDown:_,tabIndex:0,className:"search-results",children:P.map(([C,I],T)=>{const B=I.matches;return j.jsxs("div",{className:"search-result",children:[j.jsxs("div",{onClick:()=>R(C,T),id:C,className:`search-file-heading
283
+ `);D.length===1&&D[0]===""&&(v.preventDefault(),a())}},[n,o,a]),y=M.useCallback(()=>{d&&g(),n()},[n,d,g]),b=M.useCallback(v=>{e(v.target.value),l()},[e,l]);return j.jsxs("div",{className:"ai-chat-input-container",children:[u&&j.jsxs("div",{className:"ai-chat-mode-toggle",style:{marginBottom:"8px"},children:[j.jsxs("div",{className:"vz-chat-button-group",children:[j.jsx("button",{type:"button",id:"ai-chat-mode-ask",className:`vz-chat-button ${i==="ask"?"vz-chat-button--primary":"vz-chat-button--outline-primary"}`,"aria-pressed":i==="ask",onClick:()=>s("ask"),children:"💬 Ask"}),j.jsx("button",{type:"button",id:"ai-chat-mode-edit",className:`vz-chat-button ${i==="edit"?"vz-chat-button--primary":"vz-chat-button--outline-primary"}`,"aria-pressed":i==="edit",onClick:()=>s("edit"),children:"✏️ Edit"})]}),j.jsx("div",{className:"ai-chat-mode-description",children:i==="ask"?"Ask questions without editing files":"Get answers and code edits"})]}),j.jsxs("div",{className:"ai-chat-input-group",children:[j.jsx("textarea",{rows:10,value:t,onChange:b,onKeyDown:O,ref:f,placeholder:i==="edit"?"Ask me to make code changes...":"Ask me anything about your code...",spellCheck:"false","aria-label":"Chat message input"}),j.jsxs("div",{className:"ai-chat-input-footer",children:[j.jsx("span",{className:"ai-chat-hint",children:t?"Press Enter to send":""}),j.jsxs("div",{style:{display:"flex",gap:"8px"},children:[c&&j.jsx(_fe,{isSpeaking:d,onToggle:p}),j.jsx("button",{type:"button",onClick:y,disabled:!t.trim(),className:`ai-chat-send-button vz-chat-button ${t.trim()?"vz-chat-button--primary":"vz-chat-button--outline-secondary"}`,"aria-label":"Send message",title:"Send message (Enter)",children:"Send"})]})]})]})]})},Cfe=M.memo(Efe);function Rfe(t,e=2){return t.scrollTop+t.clientHeight>=t.scrollHeight-e}function a5(t,{epsilon:e=1,stableFrames:n=3,maxWaitMs:r=1e3}={}){return new Promise(i=>{let s=t.scrollTop,o=0,a=0;const l=performance.now(),u=()=>{const c=t.scrollTop;Math.abs(c-s)>e?o=0:o+=1,s=c;const d=performance.now()-l>r;if(o>=n&&Rfe(t)||d){cancelAnimationFrame(a),i();return}a=requestAnimationFrame(u)};a=requestAnimationFrame(u)})}const Afe=(t={})=>{const{threshold:e=24}=t,n=M.useRef(null),[r,i]=M.useState("AUTO_SCROLL_ON"),[s,o]=M.useState(!1),a=M.useRef(),l=M.useRef(!1),u=M.useCallback(y=>y.scrollHeight-y.clientHeight-y.scrollTop<=e,[e]),c=M.useCallback(()=>{const y=n.current;if(!y){o(!1);return}const b=r==="AUTO_SCROLL_OFF"&&!u(y);o(b)},[r,u]),f=M.useCallback(()=>{if(l.current)return;const y=n.current;y&&(u(y)?i("AUTO_SCROLL_ON"):i("AUTO_SCROLL_OFF"))},[u]);M.useEffect(()=>{const y=n.current;if(y)return y.addEventListener("scroll",f,{passive:!0}),()=>{y.removeEventListener("scroll",f)}},[f]),M.useEffect(()=>{c()},[c]);const d=M.useCallback(y=>{r==="AUTO_SCROLL_ON"&&(a.current&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(async()=>{const b=n.current;if(b){if(l.current=!0,y){const v=b.getBoundingClientRect(),x=y.getBoundingClientRect().top-v.top+b.scrollTop;b.scrollTo({top:x,behavior:"smooth"})}else b.scrollTo({top:b.scrollHeight,behavior:"smooth"});await a5(b),l.current=!1}}))},[r]),p=M.useCallback(async y=>{const b=n.current;if(b){if(l.current=!0,i("AUTO_SCROLL_ON"),y){const v=b.getBoundingClientRect(),x=y.getBoundingClientRect().top-v.top+b.scrollTop;b.scrollTo({top:x,behavior:"smooth"})}else b.scrollTo({top:b.scrollHeight,behavior:"smooth"});await a5(b),l.current=!1}},[]),g=M.useCallback(()=>{const y=n.current;return y?y.scrollHeight:0},[]),O=M.useCallback(y=>{if(r==="AUTO_SCROLL_OFF"){const b=n.current;if(b){const v=b.scrollHeight-y;b.scrollTop+=v}}},[r]);return M.useEffect(()=>()=>{a.current&&cancelAnimationFrame(a.current)},[]),{containerRef:n,autoScrollState:r,showJumpButton:s,onNewEvent:d,onJumpToLatest:p,beforeRender:g,afterRender:O}},$fe=({visible:t,onClick:e,className:n=""})=>{const r=M.useCallback(()=>{e()},[e]),i=M.useCallback(s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),e())},[e]);return t?j.jsx("button",{className:`jump-to-latest-button ${n}`.trim(),onClick:r,onKeyDown:i,"aria-label":"Jump to latest",tabIndex:0,type:"button",children:j.jsx("span",{className:"jump-to-latest-icon","aria-hidden":"true",children:"▼"})}):null},l5=!1,Tfe=!1,Qfe=({aiChatFocused:t,content:e,aiChatMode:n,aiChatMessage:r,currentChatId:i,selectedChatId:s,setSelectedChatId:o,aiErrorMessage:a,setAIChatMode:l,getStoredAIPrompt:u,setAIChatMessage:c,handleSendMessage:f,setAIErrorMessage:d,navigateMessageHistoryUp:p,navigateMessageHistoryDown:g,resetMessageHistoryNavigation:O,enableMinimalEditFlow:y=!1,additionalWidgets:b,enableDiffView:v=!0,enableAskMode:S=!1,enableVoiceInput:x=!1,onOpenFile:P})=>{const{containerRef:E,showJumpButton:D,onNewEvent:R,onJumpToLatest:_,beforeRender:C,afterRender:I}=Afe({threshold:24}),T=s,B=T?e?.chats?.[T]:null,A=M.useMemo(()=>B?.messages||[],[B?.messages]);B?.aiStatus;const X=B?.aiScratchpad,G=B?.currentStatus,W=B?.model,te=M.useMemo(()=>A.map((se,ee)=>({...se,id:se.id||`msg-${ee}`})),[A]),J=!s||A.length===0,U=e?.chats||{},Y=Object.values(U).filter(se=>se.messages.length>0).length>0,L=M.useCallback(()=>(s||o(i),f()),[s,o,i,f]);return M.useEffect(()=>{if(u){const se=u();se&&(c(se.prompt),l(se.modelName==="ask"?"ask":"edit"))}},[u,c,l]),j.jsxs("div",{className:"ai-chat-container",children:[j.jsx("div",{className:"ai-chat-content",children:j.jsxs("div",{className:"ai-chat-messages-container",ref:E,children:[J?j.jsxs("div",{className:"ai-chat-empty",children:[j.jsx("div",{className:"ai-chat-empty-icon",children:"✨"}),j.jsx("h3",{className:"ai-chat-empty-title",children:"Edit with AI"}),j.jsx("div",{className:"ai-chat-empty-text",children:"How can I help you?"}),Y&&Tfe,l5,l5]}):j.jsx(Sfe,{messages:te,isLoading:!1,chatId:s||i,aiScratchpad:X,currentStatus:G,model:W,onNewEvent:R,onJumpToLatest:_,beforeRender:C,afterRender:I,additionalWidgets:b,handleSendMessage:f,enableDiffView:v,onOpenFile:P}),a&&j.jsx("div",{className:"ai-chat-error",children:j.jsxs("div",{className:"ai-chat-error-content",children:[j.jsx("span",{className:"ai-chat-error-icon",children:"⚠️"}),j.jsx("span",{className:"ai-chat-error-message",children:a}),j.jsx("button",{className:"ai-chat-error-dismiss",onClick:()=>d(null),"aria-label":"Dismiss error",children:"×"})]})}),j.jsx($fe,{visible:D,onClick:_})]})}),j.jsx("div",{className:"ai-chat-input-fixed",children:j.jsx(Cfe,{aiChatMessage:r,setAIChatMessage:c,onSendMessage:L,focused:t??!1,aiChatMode:n,setAIChatMode:l,enableAskMode:S,enableVoiceInput:x,navigateMessageHistoryUp:p,navigateMessageHistoryDown:g,resetMessageHistoryNavigation:O})})]})},Mfe=()=>{const{content:t,aiChatFocused:e,aiChatMode:n,aiChatMessage:r,currentChatId:i,selectedChatId:s,setSelectedChatId:o,aiErrorMessage:a,setAIChatMode:l,getStoredAIPrompt:u,setAIChatMessage:c,handleSendMessage:f,setAIErrorMessage:d,navigateMessageHistoryUp:p,navigateMessageHistoryDown:g,resetMessageHistoryNavigation:O,enableMinimalEditFlow:y,additionalWidgets:b,openTab:v,setIsAIChatOpen:S}=M.useContext(pr),x=M.useCallback(P=>{if(!t)return;const E=zw(t,P);E&&(v({fileId:E,isTransient:!1}),S(!1))},[t,v,S]);return j.jsx(Qfe,{content:t,aiChatFocused:e,aiChatMode:n,setAIChatMode:l,aiChatMessage:r,setAIChatMessage:c,aiErrorMessage:a,setAIErrorMessage:d,currentChatId:i,selectedChatId:s,setSelectedChatId:o,handleSendMessage:f,navigateMessageHistoryUp:p,navigateMessageHistoryDown:g,resetMessageHistoryNavigation:O,getStoredAIPrompt:u,onOpenFile:x,additionalWidgets:b,enableDiffView:JG,enableAskMode:eK,enableVoiceInput:GG,enableMinimalEditFlow:y})};function Ife(t){const e=t.split(".");switch(e[e.length-1]){case"jsx":case"tsx":return j.jsx(Bre,{});case"js":return j.jsx(Lre,{});case"ts":return j.jsx(Fre,{});case"json":return j.jsx(Zre,{});case"md":case"prompt":return j.jsx(Vre,{});case"html":return j.jsx(zre,{});case"css":return j.jsx(Ure,{});case"svelte":return j.jsx(qre,{});default:return j.jsx(AN,{})}}const i2=({name:t})=>j.jsx("i",{className:"file-icon",children:M.useMemo(()=>Ife(t),[t])}),VL=({show:t,onClose:e,onConfirm:n,isDirectory:r,name:i})=>{const s=M.useCallback(o=>{o.key==="Enter"&&n()},[n]);return M.useEffect(()=>(t?window.addEventListener("keydown",s):window.removeEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}),[t,s]),j.jsxs(ar,{show:t,onHide:e,centered:!0,children:[j.jsx(ar.Header,{closeButton:!0,onClick:e,children:j.jsxs(ar.Title,{children:["Delete"," ",i==="all files"?"All Files":r?"Directory":"File"]})}),j.jsx(ar.Body,{children:j.jsx("p",{children:i==="all files"?"This will delete all files in the project.":j.jsxs(j.Fragment,{children:["This will delete the"," ",r?"directory":"file"," ",j.jsx("strong",{children:i}),"."]})})}),j.jsxs(ar.Footer,{children:[j.jsx(fu,{variant:"secondary",type:"button",onClick:e,children:"Cancel"}),j.jsx(fu,{variant:"danger",onClick:n,children:"Delete"})]})]})},WL=({id:t,name:e,children:n,handleClick:r,handleDoubleClick:i,handleRenameClick:s,handleDeleteClick:o,isDirectory:a=!1,isActive:l=!1,renameFileTooltipText:u=a?"Rename Directory":"Rename File",deleteFileTooltipText:c=a?"Delete Directory":"Delete File"})=>{const{hoveredItemId:f,setHoveredItemId:d}=M.useContext(pr),p=f===t,g=M.useCallback(X=>{d(X?t:null)},[t,d]),[O,y]=M.useState(!1),[b,v]=M.useState(""),[S,x]=M.useState(!1),P=M.useRef(null),E=M.useCallback(X=>{X.key==="Escape"?y(!1):X.key==="Enter"&&P.current.blur()},[]),D=M.useCallback(()=>{y(!1),P.current.value.trim()===""?x(!0):s(P.current.value)},[s]),R=M.useCallback(X=>{X.stopPropagation(),y(!O),v(e)},[e,O]);M.useEffect(()=>{O&&P.current.focus()},[O]);const _=M.useCallback(X=>{X.stopPropagation(),x(!0)},[]),C=M.useCallback(()=>{x(!1)},[]),I=M.useCallback(X=>{X?.stopPropagation(),x(!1),o()},[o]),T=M.useCallback(()=>{g(!0)},[g]),B=M.useCallback(()=>{g(!1)},[g]),A=M.useCallback(()=>{v(P.current.value)},[]);return j.jsxs("div",{className:`file-or-directory ${l?"active-file":""}`,onClick:O?null:r,onDoubleClick:O||!i?null:i,onMouseEnter:T,onMouseLeave:B,children:[j.jsx("div",{className:"name",children:O?j.jsxs(j.Fragment,{children:[j.jsx(i2,{name:b}),j.jsx("input",{className:"rename-input",ref:P,type:"text","aria-label":"Field name",value:b,onKeyDown:E,onBlur:D,onChange:A})]}):n}),p&&!O?j.jsxs("div",{className:"utils",style:{position:"relative"},children:[j.jsx(Ni,{placement:"top",overlay:j.jsx(ji,{id:"rename-file-tooltip",children:u}),children:j.jsx("button",{type:"button","aria-label":u,onClick:R,className:"vz-icon-button",children:j.jsx(Rre,{})})}),j.jsx(Ni,{placement:"top",overlay:j.jsx(ji,{id:"delete-file-tooltip",children:c}),children:j.jsx("button",{type:"button","aria-label":c,onClick:_,className:"vz-icon-button",children:j.jsx(Tre,{})})})]}):null,S&&j.jsx(VL,{show:S,onClose:C,onConfirm:I,isDirectory:a,name:e})]})},Dfe=({name:t,path:e,children:n,handleFileClick:r,handleFileDoubleClick:i})=>{const{renameDirectory:s,deleteDirectory:o,isDirectoryOpen:a,toggleDirectory:l}=M.useContext(pr),u=M.useCallback(()=>{l(e)},[l,e]),c=M.useCallback(()=>{o(e)},[o,e]),f=M.useCallback(p=>{s(e,t,p)},[s,e,t]),d=M.useMemo(()=>a(e),[a,e]);return j.jsxs(j.Fragment,{children:[j.jsxs(WL,{id:e,name:t,handleClick:u,handleDeleteClick:c,handleRenameClick:f,isDirectory:!0,children:[j.jsx("div",{className:"arrow-wrapper",style:{transform:`rotate(${d?90:0}deg)`},children:j.jsx($N,{})}),j.jsx("div",{className:"name",children:t})]}),n&&d?j.jsx("div",{className:"indentation",children:n.map(p=>{const{fileId:g}=p,{path:O}=p;return j.jsx(XL,{entity:p,handleFileClick:r,handleFileDoubleClick:i},g||O)})}):null]})},jfe=({presence:t})=>j.jsx("div",{className:"presence-indicators",children:t.map((e,n)=>{const i=`rgb(${zD(e.username)})`;return j.jsx("div",{className:"presence-indicator",style:{backgroundColor:i},children:e.username[0]},n)})}),Nfe=({name:t,fileId:e,handleFileClick:n,handleFileDoubleClick:r,isActive:i,presence:s})=>{const{renameFile:o,deleteFile:a}=M.useContext(pr),l=M.useCallback(()=>{n(e)},[e,n]),u=M.useCallback(()=>{r(e)},[e,r]),c=M.useCallback(()=>{a(e)},[e,a]),f=M.useCallback(d=>{o(e,d)},[e,o]);return j.jsxs(WL,{id:e,name:t,handleClick:l,handleDoubleClick:u,handleDeleteClick:c,handleRenameClick:f,isActive:i,children:[j.jsx(jfe,{presence:s}),j.jsx(i2,{name:t}),t]})},XL=({entity:t,handleFileClick:e,handleFileDoubleClick:n})=>{const{activePane:r,sidebarPresenceIndicators:i}=M.useContext(pr),{name:s,file:o,fileId:a}=t,{path:l,children:u}=t,c=i?.filter(f=>f.fileId===a)||[];return o?j.jsx(Nfe,{fileId:a,name:s,handleFileClick:e,handleFileDoubleClick:n,isActive:a===r.activeFileId,presence:c}):j.jsx(Dfe,{name:s,path:l,children:u,handleFileClick:e,handleFileDoubleClick:n})};function u5(t,e,n,r){const i=t.state.doc.line(n).from+r;t.dispatch({selection:{anchor:i,head:i+e.length},scrollIntoView:!0,effects:rt.scrollIntoView(i,{y:"center"})})}function c5(t,e){const n=t.scrollTop,r=n+t.clientHeight,i=e.offsetTop-t.offsetTop,s=i+e.clientHeight;return i>=n+100&&s<=r-100}const Lfe=()=>{const[t,e]=M.useState(!1),[n,r]=M.useState(!1),{search:i,setSearch:s,activePaneId:o,setActiveFileId:a,setSearchResults:l,setSearchFileVisibility:u,setSearchLineVisibility:c,setSearchFocusedIndex:f,shareDBDoc:d,editorCache:p,openTab:g}=M.useContext(pr),{pattern:O,results:y,focusedIndex:b,focusedChildIndex:v,focused:S}=i,x=M.useRef(null),P=Object.entries(y).filter(([C,I])=>I.visibility!=="closed");M.useEffect(()=>{if(t){r(O.trim().length>=1);const C=setTimeout(()=>{O.trim().length>=1&&x.current&&(l(d),r(!1))},2e3);return()=>clearTimeout(C)}else e(!0)},[O,t,l,d]);const E=M.useCallback((C,I)=>{u(d,C,I.visibility==="open"&&v===null?"flattened":"open")},[u,d,v]),D=M.useCallback(C=>{u(d,C,"closed")},[u,d]),R=M.useCallback((C,I)=>{a(C),f(I,null)},[a,f]),_=C=>{if(C.preventDefault(),P.length===0)return;const I=P[b][1].matches.length;switch(C.key){case"Tab":f(b,null);break;case"ArrowUp":if(b==0&&v==null)break;if(v===null||I==0){const X=P[b-1][1].matches.length;f(b-1,X>0?X-1:null)}else v===0?f(b,null):f(b,v-1);break;case"ArrowDown":if(b==P.length-1&&v==I-1)break;v===null&&I>0?f(b,0):v==I-1||I==0?f(b+1,null):f(b,v+1);break;case"ArrowLeft":v!==null?f(b,null):E(P[b][0],P[b][1]);break;case"ArrowRight":P[b][1].visibility!=="open"?E(P[b][0],P[b][1]):v===null&&I!==0&&f(b,0);break;case"Enter":case" ":const A=P[b][0];if(g({fileId:A,isTransient:!0}),a(A),v!==null){const X=P[b][1].matches[v].line,G=P[b][1].matches[v].index,W=Jh(A,o);p.has(W)&&u5(p.get(W).editor,O,X,G)}break}const T=P[b][0],B=document.getElementById("sidebar-view-container");if(B)if(v===null){const A=document.getElementById(T);c5(B,A)||A.scrollIntoView({block:"center"})}else{const A=P[b][1].matches[v].line,X=document.getElementById(T+"-"+A);c5(B,X)||X.scrollIntoView({block:"center"})}};return M.useEffect(()=>{x.current&&x.current.focus()},[S]),j.jsxs("div",{children:[j.jsx(dr.Group,{className:"sidebar-search-form",controlId:"searchName",children:j.jsx(dr.Control,{type:"text",value:O,onChange:C=>s(C.target.value),ref:x,spellCheck:"false"})}),Object.keys(y).length>=1&&O.trim().length>=1?j.jsx("div",{onKeyDown:_,tabIndex:0,className:"search-results",children:P.map(([C,I],T)=>{const B=I.matches;return j.jsxs("div",{className:"search-result",children:[j.jsxs("div",{onClick:()=>R(C,T),id:C,className:`search-file-heading
284
284
  ${b==T&&v==null?"active":""}`,children:[j.jsxs("div",{className:"search-file-title",children:[j.jsx("div",{className:"arrow-wrapper",onClick:()=>E(C,I),style:{transform:`rotate(${I.visibility==="open"?90:0}deg)`},children:j.jsx($N,{})}),j.jsxs("div",{className:"search-file-name",children:[j.jsx(i2,{name:I.name}),j.jsx("h5",{children:I.name})]})]}),j.jsx("div",{className:"search-file-info",children:T==b&&v==null?j.jsx("span",{className:"search-file-close",onClick:A=>{A.stopPropagation(),D(C),f(Math.max(0,T-1),null)},children:j.jsx(Vm,{})}):j.jsx("h6",{className:"search-file-count",children:B.length})})]}),j.jsx("div",{className:"search-file-lines",children:(I.visibility==="open"||I.visibility==="flattened"&&T==b&&v!==null)&&I.matches.map((A,X)=>{const G=A.text.substring(0,A.index),W=A.text.substring(A.index,A.index+O.length),te=A.text.substring(A.index+O.length),J=I.name+"-"+A.line;return j.jsxs("div",{tabIndex:T==b?0:-1,id:C+"-"+A.line,className:`search-line
285
285
  ${b==T&&v==X?"active":""}`,children:[j.jsxs("p",{onClick:()=>{f(T,X),g({fileId:C,isTransient:!0}),a(C);const U=Jh(C,o);p.has(U)&&u5(p.get(U).editor,O,A.line,A.index)},children:[G,j.jsx("span",{className:"search-pattern",children:W}),te]},I.name+" - "+A.line+" - "+A.index),b==T&&v===X&&j.jsx("span",{className:"search-file-close",onClick:U=>{U.stopPropagation(),c(d,C,A.line),X==0&&f(T,null)},children:j.jsx(Vm,{})})]},J)})})]},I.name)})}):j.jsx("div",{className:"search-state",children:j.jsx("h6",{children:n?"Searching...":"No Results"})})]})},js=!1,Ffe=t=>["text/","application/json","application/javascript","application/typescript","application/xml","application/x-httpd-php"].some(r=>t.type.startsWith(r))||t.name.match(/\.(txt|js|jsx|ts|tsx|md|css|scss|html|xml|json|php|py|rb|java|c|cpp|h|hpp)$/i)!==null,lb=t=>["image/"].some(r=>t.type.startsWith(r))||t.name.match(/\.(png|jpg|jpeg|gif|bmp|svg|webp)$/i)!==null,Bfe=()=>{const[t,e]=M.useState(!1),[n,r]=M.useState(!1),{createFile:i}=M.useContext(pr),s=M.useCallback(d=>{d.preventDefault(),d.stopPropagation(),e(!0)},[]),o=M.useCallback(d=>{d.preventDefault(),d.stopPropagation(),t||e(!0)},[t]),a=M.useCallback(d=>{d.preventDefault(),d.stopPropagation(),e(!1)},[]),l=M.useCallback(d=>new Promise((p,g)=>{if(!Ffe(d)){g(new Error(`File ${d.name} is not a text file`));return}const O=new FileReader;O.onload=y=>{y.target?.result?p(y.target.result):g(new Error(`Failed to read file ${d.name}`))},O.onerror=()=>{g(new Error(`Error reading file ${d.name}`))},O.readAsText(d)}),[]),u=M.useCallback(d=>new Promise((p,g)=>{if(!lb(d)){g(new Error(`File ${d.name} is not an image file`));return}if(d.type==="image/svg+xml"||d.name.toLowerCase().endsWith(".svg")){const y=new FileReader;y.onload=b=>{b.target?.result?p(b.target.result):g(new Error(`Failed to read SVG file ${d.name}`))},y.onerror=()=>g(new Error(`Error reading SVG file ${d.name}`)),y.readAsText(d);return}const O=new FileReader;O.onload=y=>{if(y.target?.result){const b=y.target.result.split(",")[1];p(b)}else g(new Error(`Failed to read image file ${d.name}`))},O.onerror=()=>{g(new Error(`Error reading image file ${d.name}`))},O.readAsDataURL(d)}),[]),c=M.useCallback(async(d,p)=>{try{if(js&&console.log(`[useDragAndDrop] Processing entry: ${d.name} at path: ${p}`),d.isFile)js&&console.log(`[useDragAndDrop] Processing file: ${d.name}`),d.file(async g=>{try{if(lb(g)){const O=await u(g);js&&console.log(`[useDragAndDrop] Creating image file: ${p}${g.name}`),i(`${p}${g.name}`,O)}else{const O=await l(g);js&&console.log(`[useDragAndDrop] Creating text file: ${p}${g.name}`),i(`${p}${g.name}`,O)}}catch(O){console.error(`Error processing file ${g.name}:`,O)}});else if(d.isDirectory)return js&&console.log(`[useDragAndDrop] Processing directory: ${d.name}`),new Promise(g=>{const O=d.createReader(),y=()=>{O.readEntries(async b=>{if(b.length===0){js&&console.log(`[useDragAndDrop] Finished reading directory: ${d.name}`),g();return}const v=`${p}${d.name}/`;js&&console.log(`[useDragAndDrop] Reading ${b.length} entries in directory: ${v}`),await Promise.all(b.map(S=>c(S,v))),y()})};y()})}catch(g){console.error(`Error processing entry ${d.name}:`,g)}},[i,l,u]),f=M.useCallback(async d=>{d.preventDefault(),d.stopPropagation(),e(!1),r(!0);try{const p=d.dataTransfer.items;js&&console.log(`[useDragAndDrop] Processing ${p.length} dropped items`);const g=[];for(const O of Array.from(p)){const y=O.webkitGetAsEntry?.()||O.getAsEntry?.()||O.createEntry?.();if(y)js&&console.log(`[useDragAndDrop] Got entry for: ${y.name}`),g.push(y);else if(O.kind==="file"){const b=O.getAsFile();if(b){js&&console.log(`[useDragAndDrop] Processing dropped file: ${b.name}`);try{if(lb(b)){const v=await u(b);i(b.name,v)}else{const v=await l(b);i(b.name,v)}}catch(v){console.error(`Error processing file ${b.name}:`,v)}}}}js&&console.log(`[useDragAndDrop] Processing ${g.length} entries`),await Promise.all(g.map(O=>c(O,"")))}catch(p){console.error("Error processing dropped items:",p)}finally{r(!1)}},[i,c,l,u]);return{isDragOver:t,isProcessing:n,handleDragEnter:s,handleDragOver:o,handleDragLeave:a,handleDrop:f}};function qfe(t,e){const n={},d=[{regex:/^\s*###\s*`([^`]+)`\s*\n```(?:\w+)?\n([\s\S]*?)```/gm,format:"Backtick-Heading Format",key:"backtick-heading"},{regex:/^\s*###\s*File:\s*\*\*(.+?)\*\*\s*\n```(?:\w+)?\n([\s\S]*?)```/gm,format:"File Bold Format",key:"file-bold"},{regex:/^\s*###\s*\d+\.\s*`([^`]+)`(?:[^\n]*\n)*?\s*```(?:\w+)?\n([\s\S]*?)```/gm,format:"Numbered Backtick Format",key:"numbered-backtick"},{regex:/^### \*\*([^\n`]+?)\*\*\s*\n```(?:\w+)?\n([\s\S]*?)```/gm,format:"Heading Bold Format",key:"heading-bold"},{regex:/^\s*###\s*(?!`|File:|\d+\.)\s*([^\n`]+?)\s*\n```(?:\w+)?\n([\s\S]*?)```/gm,format:"Standard Heading Format",key:"standard-heading"},{regex:/^\s*(?!###|\*\*|`)([^\n#*`]+?):\s*\n```(?:\w+)?\n([\s\S]*?)```/gm,format:"Colon Format",key:"colon"},{regex:/^\s*(?!###)\*\*([^\n*`]+?)\*\*(?:[^\n]*)\s*\n```(?:\w+)?\n([\s\S]*?)```/gm,format:"Bold Format",key:"bold"},{regex:/^\s*# ([^\n`]+?)\s*\n```(?:\w+)?\n([\s\S]*?)```/gm,format:"Hash Format",key:"hash"},{regex:/^\s*\d+\.\s*\*\*([^\n`]+?)\*\*[\s\S]*?\n```(?:\w+)?\n([\s\S]*?)```/gm,format:"Numbered Bold Format",key:"numbered-bold"}];let p=d;{const O=d.find(y=>y.key===e);if(!O)throw new Error(`Unsupported format: ${e}`);p=[O]}let g="Unknown Format";for(const{regex:O,format:y}of p){O.lastIndex=0;const b={};let v;for(;(v=O.exec(t))!==null;){let S=v[1].trim();y==="Bold Format"&&(S=S.replace(/\s*\([^)]*\).*$/,"").trim());const x=v[2].trim();b[S]=x}if(Object.keys(b).length>0){Object.assign(n,b),g=y;break}}return{files:n,format:g}}const zfe=t=>t.endsWith(".html")?"html":t.endsWith(".js")?"javascript":t.endsWith(".css")?"css":"",Ufe=t=>Object.entries(t).map(([e,n])=>[`**${e}**
286
286
  `,"```"+zfe(e),n,"```\n"].join(`
@@ -351,6 +351,6 @@ Image files available:
351
351
  \0`,se+=s(z,2),se+=E.magic,se+=s(S,2),se+=s(x,2),se+=s(U.crc32,4),se+=s(U.compressedSize,4),se+=s(U.uncompressedSize,4),se+=s(R.length,2),se+=s(X.length,2),{fileRecord:f.LOCAL_FILE_HEADER+se+R+X,dirRecord:f.CENTRAL_FILE_HEADER+s(L,2)+se+s(I.length,2)+"\0\0\0\0"+s(Y,4)+s(y,4)+R+X+I}}var a=n("../utils"),l=n("../stream/GenericWorker"),u=n("../utf8"),c=n("../crc32"),f=n("../signature");function d(p,g,O,y){l.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=g,this.zipPlatform=O,this.encodeFileName=y,this.streamFiles=p,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(d,l),d.prototype.push=function(p){var g=p.meta.percent||0,O=this.entriesCount,y=this._sources.length;this.accumulate?this.contentBuffer.push(p):(this.bytesWritten+=p.data.length,l.prototype.push.call(this,{data:p.data,meta:{currentFile:this.currentFile,percent:O?(g+100*(O-y-1))/O:100}}))},d.prototype.openedSource=function(p){this.currentSourceOffset=this.bytesWritten,this.currentFile=p.file.name;var g=this.streamFiles&&!p.file.dir;if(g){var O=o(p,g,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:O.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(p){this.accumulate=!1;var g=this.streamFiles&&!p.file.dir,O=o(p,g,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(O.dirRecord),g)this.push({data:(function(y){return f.DATA_DESCRIPTOR+s(y.crc32,4)+s(y.compressedSize,4)+s(y.uncompressedSize,4)})(p),meta:{percent:100}});else for(this.push({data:O.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var p=this.bytesWritten,g=0;g<this.dirRecords.length;g++)this.push({data:this.dirRecords[g],meta:{percent:100}});var O=this.bytesWritten-p,y=(function(b,v,S,x,P){var E=a.transformTo("string",P(x));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+s(b,2)+s(b,2)+s(v,4)+s(S,4)+s(E.length,2)+E})(this.dirRecords.length,O,p,this.zipComment,this.encodeFileName);this.push({data:y,meta:{percent:100}})},d.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},d.prototype.registerPrevious=function(p){this._sources.push(p);var g=this;return p.on("data",function(O){g.processChunk(O)}),p.on("end",function(){g.closedSource(g.previous.streamInfo),g._sources.length?g.prepareNextSource():g.end()}),p.on("error",function(O){g.error(O)}),this},d.prototype.resume=function(){return!!l.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},d.prototype.error=function(p){var g=this._sources;if(!l.prototype.error.call(this,p))return!1;for(var O=0;O<g.length;O++)try{g[O].error(p)}catch{}return!0},d.prototype.lock=function(){l.prototype.lock.call(this);for(var p=this._sources,g=0;g<p.length;g++)p[g].lock()},r.exports=d},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(n,r,i){var s=n("../compressions"),o=n("./ZipFileWorker");i.generateWorker=function(a,l,u){var c=new o(l.streamFiles,u,l.platform,l.encodeFileName),f=0;try{a.forEach(function(d,p){f++;var g=(function(v,S){var x=v||S,P=s[x];if(!P)throw new Error(x+" is not a valid compression method !");return P})(p.options.compression,l.compression),O=p.options.compressionOptions||l.compressionOptions||{},y=p.dir,b=p.date;p._compressWorker(g,O).withStreamInfo("file",{name:d,dir:y,date:b,comment:p.comment||"",unixPermissions:p.unixPermissions,dosPermissions:p.dosPermissions}).pipe(c)}),c.entriesCount=f}catch(d){c.error(d)}return c}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(n,r,i){function s(){if(!(this instanceof s))return new s;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new s;for(var a in this)typeof this[a]!="function"&&(o[a]=this[a]);return o}}(s.prototype=n("./object")).loadAsync=n("./load"),s.support=n("./support"),s.defaults=n("./defaults"),s.version="3.10.1",s.loadAsync=function(o,a){return new s().loadAsync(o,a)},s.external=n("./external"),r.exports=s},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(n,r,i){var s=n("./utils"),o=n("./external"),a=n("./utf8"),l=n("./zipEntries"),u=n("./stream/Crc32Probe"),c=n("./nodejsUtils");function f(d){return new o.Promise(function(p,g){var O=d.decompressed.getContentWorker().pipe(new u);O.on("error",function(y){g(y)}).on("end",function(){O.streamInfo.crc32!==d.decompressed.crc32?g(new Error("Corrupted zip : CRC32 mismatch")):p()}).resume()})}r.exports=function(d,p){var g=this;return p=s.extend(p||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),c.isNode&&c.isStream(d)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):s.prepareContent("the loaded zip file",d,!0,p.optimizedBinaryString,p.base64).then(function(O){var y=new l(p);return y.load(O),y}).then(function(O){var y=[o.Promise.resolve(O)],b=O.files;if(p.checkCRC32)for(var v=0;v<b.length;v++)y.push(f(b[v]));return o.Promise.all(y)}).then(function(O){for(var y=O.shift(),b=y.files,v=0;v<b.length;v++){var S=b[v],x=S.fileNameStr,P=s.resolve(S.fileNameStr);g.file(P,S.decompressed,{binary:!0,optimizedBinaryString:!0,date:S.date,dir:S.dir,comment:S.fileCommentStr.length?S.fileCommentStr:null,unixPermissions:S.unixPermissions,dosPermissions:S.dosPermissions,createFolders:p.createFolders}),S.dir||(g.file(P).unsafeOriginalName=x)}return y.zipComment.length&&(g.comment=y.zipComment),g})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(n,r,i){var s=n("../utils"),o=n("../stream/GenericWorker");function a(l,u){o.call(this,"Nodejs stream input adapter for "+l),this._upstreamEnded=!1,this._bindStream(u)}s.inherits(a,o),a.prototype._bindStream=function(l){var u=this;(this._stream=l).pause(),l.on("data",function(c){u.push({data:c,meta:{percent:0}})}).on("error",function(c){u.isPaused?this.generatedError=c:u.error(c)}).on("end",function(){u.isPaused?u._upstreamEnded=!0:u.end()})},a.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(n,r,i){var s=n("readable-stream").Readable;function o(a,l,u){s.call(this,l),this._helper=a;var c=this;a.on("data",function(f,d){c.push(f)||c._helper.pause(),u&&u(d)}).on("error",function(f){c.emit("error",f)}).on("end",function(){c.push(null)})}n("../utils").inherits(o,s),o.prototype._read=function(){this._helper.resume()},r.exports=o},{"../utils":32,"readable-stream":16}],14:[function(n,r,i){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(s,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(s,o);if(typeof s=="number")throw new Error('The "data" argument must not be a number');return new Buffer(s,o)},allocBuffer:function(s){if(Buffer.alloc)return Buffer.alloc(s);var o=new Buffer(s);return o.fill(0),o},isBuffer:function(s){return Buffer.isBuffer(s)},isStream:function(s){return s&&typeof s.on=="function"&&typeof s.pause=="function"&&typeof s.resume=="function"}}},{}],15:[function(n,r,i){function s(P,E,D){var R,_=a.getTypeOf(E),C=a.extend(D||{},c);C.date=C.date||new Date,C.compression!==null&&(C.compression=C.compression.toUpperCase()),typeof C.unixPermissions=="string"&&(C.unixPermissions=parseInt(C.unixPermissions,8)),C.unixPermissions&&16384&C.unixPermissions&&(C.dir=!0),C.dosPermissions&&16&C.dosPermissions&&(C.dir=!0),C.dir&&(P=b(P)),C.createFolders&&(R=y(P))&&v.call(this,R,!0);var I=_==="string"&&C.binary===!1&&C.base64===!1;D&&D.binary!==void 0||(C.binary=!I),(E instanceof f&&E.uncompressedSize===0||C.dir||!E||E.length===0)&&(C.base64=!1,C.binary=!0,E="",C.compression="STORE",_="string");var T=null;T=E instanceof f||E instanceof l?E:g.isNode&&g.isStream(E)?new O(P,E):a.prepareContent(P,E,C.binary,C.optimizedBinaryString,C.base64);var B=new d(P,T,C);this.files[P]=B}var o=n("./utf8"),a=n("./utils"),l=n("./stream/GenericWorker"),u=n("./stream/StreamHelper"),c=n("./defaults"),f=n("./compressedObject"),d=n("./zipObject"),p=n("./generate"),g=n("./nodejsUtils"),O=n("./nodejs/NodejsStreamInputAdapter"),y=function(P){P.slice(-1)==="/"&&(P=P.substring(0,P.length-1));var E=P.lastIndexOf("/");return 0<E?P.substring(0,E):""},b=function(P){return P.slice(-1)!=="/"&&(P+="/"),P},v=function(P,E){return E=E!==void 0?E:c.createFolders,P=b(P),this.files[P]||s.call(this,P,null,{dir:!0,createFolders:E}),this.files[P]};function S(P){return Object.prototype.toString.call(P)==="[object RegExp]"}var x={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(P){var E,D,R;for(E in this.files)R=this.files[E],(D=E.slice(this.root.length,E.length))&&E.slice(0,this.root.length)===this.root&&P(D,R)},filter:function(P){var E=[];return this.forEach(function(D,R){P(D,R)&&E.push(R)}),E},file:function(P,E,D){if(arguments.length!==1)return P=this.root+P,s.call(this,P,E,D),this;if(S(P)){var R=P;return this.filter(function(C,I){return!I.dir&&R.test(C)})}var _=this.files[this.root+P];return _&&!_.dir?_:null},folder:function(P){if(!P)return this;if(S(P))return this.filter(function(_,C){return C.dir&&P.test(_)});var E=this.root+P,D=v.call(this,E),R=this.clone();return R.root=D.name,R},remove:function(P){P=this.root+P;var E=this.files[P];if(E||(P.slice(-1)!=="/"&&(P+="/"),E=this.files[P]),E&&!E.dir)delete this.files[P];else for(var D=this.filter(function(_,C){return C.name.slice(0,P.length)===P}),R=0;R<D.length;R++)delete this.files[D[R].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(P){var E,D={};try{if((D=a.extend(P||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=D.type.toLowerCase(),D.compression=D.compression.toUpperCase(),D.type==="binarystring"&&(D.type="string"),!D.type)throw new Error("No output type specified.");a.checkSupport(D.type),D.platform!=="darwin"&&D.platform!=="freebsd"&&D.platform!=="linux"&&D.platform!=="sunos"||(D.platform="UNIX"),D.platform==="win32"&&(D.platform="DOS");var R=D.comment||this.comment||"";E=p.generateWorker(this,D,R)}catch(_){(E=new l("error")).error(_)}return new u(E,D.type||"string",D.mimeType)},generateAsync:function(P,E){return this.generateInternalStream(P).accumulate(E)},generateNodeStream:function(P,E){return(P=P||{}).type||(P.type="nodebuffer"),this.generateInternalStream(P).toNodejsStream(E)}};r.exports=x},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(n,r,i){r.exports=n("stream")},{stream:void 0}],17:[function(n,r,i){var s=n("./DataReader");function o(a){s.call(this,a);for(var l=0;l<this.data.length;l++)a[l]=255&a[l]}n("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data[this.zero+a]},o.prototype.lastIndexOfSignature=function(a){for(var l=a.charCodeAt(0),u=a.charCodeAt(1),c=a.charCodeAt(2),f=a.charCodeAt(3),d=this.length-4;0<=d;--d)if(this.data[d]===l&&this.data[d+1]===u&&this.data[d+2]===c&&this.data[d+3]===f)return d-this.zero;return-1},o.prototype.readAndCheckSignature=function(a){var l=a.charCodeAt(0),u=a.charCodeAt(1),c=a.charCodeAt(2),f=a.charCodeAt(3),d=this.readData(4);return l===d[0]&&u===d[1]&&c===d[2]&&f===d[3]},o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./DataReader":18}],18:[function(n,r,i){var s=n("../utils");function o(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var l,u=0;for(this.checkOffset(a),l=this.index+a-1;l>=this.index;l--)u=(u<<8)+this.byteAt(l);return this.index+=a,u},readString:function(a){return s.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},r.exports=o},{"../utils":32}],19:[function(n,r,i){var s=n("./Uint8ArrayReader");function o(a){s.call(this,a)}n("../utils").inherits(o,s),o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(n,r,i){var s=n("./DataReader");function o(a){s.call(this,a)}n("../utils").inherits(o,s),o.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},o.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},o.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},o.prototype.readData=function(a){this.checkOffset(a);var l=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./DataReader":18}],21:[function(n,r,i){var s=n("./ArrayReader");function o(a){s.call(this,a)}n("../utils").inherits(o,s),o.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var l=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,l},r.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(n,r,i){var s=n("../utils"),o=n("../support"),a=n("./ArrayReader"),l=n("./StringReader"),u=n("./NodeBufferReader"),c=n("./Uint8ArrayReader");r.exports=function(f){var d=s.getTypeOf(f);return s.checkSupport(d),d!=="string"||o.uint8array?d==="nodebuffer"?new u(f):o.uint8array?new c(s.transformTo("uint8array",f)):new a(s.transformTo("array",f)):new l(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(n,r,i){i.LOCAL_FILE_HEADER="PK",i.CENTRAL_FILE_HEADER="PK",i.CENTRAL_DIRECTORY_END="PK",i.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",i.ZIP64_CENTRAL_DIRECTORY_END="PK",i.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(n,r,i){var s=n("./GenericWorker"),o=n("../utils");function a(l){s.call(this,"ConvertWorker to "+l),this.destType=l}o.inherits(a,s),a.prototype.processChunk=function(l){this.push({data:o.transformTo(this.destType,l.data),meta:l.meta})},r.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(n,r,i){var s=n("./GenericWorker"),o=n("../crc32");function a(){s.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}n("../utils").inherits(a,s),a.prototype.processChunk=function(l){this.streamInfo.crc32=o(l.data,this.streamInfo.crc32||0),this.push(l)},r.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(n,r,i){var s=n("../utils"),o=n("./GenericWorker");function a(l){o.call(this,"DataLengthProbe for "+l),this.propName=l,this.withStreamInfo(l,0)}s.inherits(a,o),a.prototype.processChunk=function(l){if(l){var u=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=u+l.data.length}o.prototype.processChunk.call(this,l)},r.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(n,r,i){var s=n("../utils"),o=n("./GenericWorker");function a(l){o.call(this,"DataWorker");var u=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,l.then(function(c){u.dataIsReady=!0,u.data=c,u.max=c&&c.length||0,u.type=s.getTypeOf(c),u.isPaused||u._tickAndRepeat()},function(c){u.error(c)})}s.inherits(a,o),a.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,s.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(s.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var l=null,u=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":l=this.data.substring(this.index,u);break;case"uint8array":l=this.data.subarray(this.index,u);break;case"array":case"nodebuffer":l=this.data.slice(this.index,u)}return this.index=u,this.push({data:l,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(n,r,i){function s(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}s.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,a){return this._listeners[o].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,a){if(this._listeners[o])for(var l=0;l<this._listeners[o].length;l++)this._listeners[o][l].call(this,a)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var a=this;return o.on("data",function(l){a.processChunk(l)}),o.on("end",function(){a.end()}),o.on("error",function(l){a.error(l)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,a){return this.extraStreamInfo[o]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},r.exports=s},{}],29:[function(n,r,i){var s=n("../utils"),o=n("./ConvertWorker"),a=n("./GenericWorker"),l=n("../base64"),u=n("../support"),c=n("../external"),f=null;if(u.nodestream)try{f=n("../nodejs/NodejsStreamOutputAdapter")}catch{}function d(g,O){return new c.Promise(function(y,b){var v=[],S=g._internalType,x=g._outputType,P=g._mimeType;g.on("data",function(E,D){v.push(E),O&&O(D)}).on("error",function(E){v=[],b(E)}).on("end",function(){try{var E=(function(D,R,_){switch(D){case"blob":return s.newBlob(s.transformTo("arraybuffer",R),_);case"base64":return l.encode(R);default:return s.transformTo(D,R)}})(x,(function(D,R){var _,C=0,I=null,T=0;for(_=0;_<R.length;_++)T+=R[_].length;switch(D){case"string":return R.join("");case"array":return Array.prototype.concat.apply([],R);case"uint8array":for(I=new Uint8Array(T),_=0;_<R.length;_++)I.set(R[_],C),C+=R[_].length;return I;case"nodebuffer":return Buffer.concat(R);default:throw new Error("concat : unsupported type '"+D+"'")}})(S,v),P);y(E)}catch(D){b(D)}v=[]}).resume()})}function p(g,O,y){var b=O;switch(O){case"blob":case"arraybuffer":b="uint8array";break;case"base64":b="string"}try{this._internalType=b,this._outputType=O,this._mimeType=y,s.checkSupport(b),this._worker=g.pipe(new o(b)),g.lock()}catch(v){this._worker=new a("error"),this._worker.error(v)}}p.prototype={accumulate:function(g){return d(this,g)},on:function(g,O){var y=this;return g==="data"?this._worker.on(g,function(b){O.call(y,b.data,b.meta)}):this._worker.on(g,function(){s.delay(O,arguments,y)}),this},resume:function(){return s.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(g){if(s.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new f(this,{objectMode:this._outputType!=="nodebuffer"},g)}},r.exports=p},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(n,r,i){if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",i.nodebuffer=typeof Buffer<"u",i.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")i.blob=!1;else{var s=new ArrayBuffer(0);try{i.blob=new Blob([s],{type:"application/zip"}).size===0}catch{try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(s),i.blob=o.getBlob("application/zip").size===0}catch{i.blob=!1}}}try{i.nodestream=!!n("readable-stream").Readable}catch{i.nodestream=!1}},{"readable-stream":16}],31:[function(n,r,i){for(var s=n("./utils"),o=n("./support"),a=n("./nodejsUtils"),l=n("./stream/GenericWorker"),u=new Array(256),c=0;c<256;c++)u[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;u[254]=u[254]=1;function f(){l.call(this,"utf-8 decode"),this.leftOver=null}function d(){l.call(this,"utf-8 encode")}i.utf8encode=function(p){return o.nodebuffer?a.newBufferFrom(p,"utf-8"):(function(g){var O,y,b,v,S,x=g.length,P=0;for(v=0;v<x;v++)(64512&(y=g.charCodeAt(v)))==55296&&v+1<x&&(64512&(b=g.charCodeAt(v+1)))==56320&&(y=65536+(y-55296<<10)+(b-56320),v++),P+=y<128?1:y<2048?2:y<65536?3:4;for(O=o.uint8array?new Uint8Array(P):new Array(P),v=S=0;S<P;v++)(64512&(y=g.charCodeAt(v)))==55296&&v+1<x&&(64512&(b=g.charCodeAt(v+1)))==56320&&(y=65536+(y-55296<<10)+(b-56320),v++),y<128?O[S++]=y:(y<2048?O[S++]=192|y>>>6:(y<65536?O[S++]=224|y>>>12:(O[S++]=240|y>>>18,O[S++]=128|y>>>12&63),O[S++]=128|y>>>6&63),O[S++]=128|63&y);return O})(p)},i.utf8decode=function(p){return o.nodebuffer?s.transformTo("nodebuffer",p).toString("utf-8"):(function(g){var O,y,b,v,S=g.length,x=new Array(2*S);for(O=y=0;O<S;)if((b=g[O++])<128)x[y++]=b;else if(4<(v=u[b]))x[y++]=65533,O+=v-1;else{for(b&=v===2?31:v===3?15:7;1<v&&O<S;)b=b<<6|63&g[O++],v--;1<v?x[y++]=65533:b<65536?x[y++]=b:(b-=65536,x[y++]=55296|b>>10&1023,x[y++]=56320|1023&b)}return x.length!==y&&(x.subarray?x=x.subarray(0,y):x.length=y),s.applyFromCharCode(x)})(p=s.transformTo(o.uint8array?"uint8array":"array",p))},s.inherits(f,l),f.prototype.processChunk=function(p){var g=s.transformTo(o.uint8array?"uint8array":"array",p.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var O=g;(g=new Uint8Array(O.length+this.leftOver.length)).set(this.leftOver,0),g.set(O,this.leftOver.length)}else g=this.leftOver.concat(g);this.leftOver=null}var y=(function(v,S){var x;for((S=S||v.length)>v.length&&(S=v.length),x=S-1;0<=x&&(192&v[x])==128;)x--;return x<0||x===0?S:x+u[v[x]]>S?x:S})(g),b=g;y!==g.length&&(o.uint8array?(b=g.subarray(0,y),this.leftOver=g.subarray(y,g.length)):(b=g.slice(0,y),this.leftOver=g.slice(y,g.length))),this.push({data:i.utf8decode(b),meta:p.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=f,s.inherits(d,l),d.prototype.processChunk=function(p){this.push({data:i.utf8encode(p.data),meta:p.meta})},i.Utf8EncodeWorker=d},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(n,r,i){var s=n("./support"),o=n("./base64"),a=n("./nodejsUtils"),l=n("./external");function u(O){return O}function c(O,y){for(var b=0;b<O.length;++b)y[b]=255&O.charCodeAt(b);return y}n("setimmediate"),i.newBlob=function(O,y){i.checkSupport("blob");try{return new Blob([O],{type:y})}catch{try{var b=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return b.append(O),b.getBlob(y)}catch{throw new Error("Bug : can't construct the Blob.")}}};var f={stringifyByChunk:function(O,y,b){var v=[],S=0,x=O.length;if(x<=b)return String.fromCharCode.apply(null,O);for(;S<x;)y==="array"||y==="nodebuffer"?v.push(String.fromCharCode.apply(null,O.slice(S,Math.min(S+b,x)))):v.push(String.fromCharCode.apply(null,O.subarray(S,Math.min(S+b,x)))),S+=b;return v.join("")},stringifyByChar:function(O){for(var y="",b=0;b<O.length;b++)y+=String.fromCharCode(O[b]);return y},applyCanBeUsed:{uint8array:(function(){try{return s.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return s.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}})()}};function d(O){var y=65536,b=i.getTypeOf(O),v=!0;if(b==="uint8array"?v=f.applyCanBeUsed.uint8array:b==="nodebuffer"&&(v=f.applyCanBeUsed.nodebuffer),v)for(;1<y;)try{return f.stringifyByChunk(O,b,y)}catch{y=Math.floor(y/2)}return f.stringifyByChar(O)}function p(O,y){for(var b=0;b<O.length;b++)y[b]=O[b];return y}i.applyFromCharCode=d;var g={};g.string={string:u,array:function(O){return c(O,new Array(O.length))},arraybuffer:function(O){return g.string.uint8array(O).buffer},uint8array:function(O){return c(O,new Uint8Array(O.length))},nodebuffer:function(O){return c(O,a.allocBuffer(O.length))}},g.array={string:d,array:u,arraybuffer:function(O){return new Uint8Array(O).buffer},uint8array:function(O){return new Uint8Array(O)},nodebuffer:function(O){return a.newBufferFrom(O)}},g.arraybuffer={string:function(O){return d(new Uint8Array(O))},array:function(O){return p(new Uint8Array(O),new Array(O.byteLength))},arraybuffer:u,uint8array:function(O){return new Uint8Array(O)},nodebuffer:function(O){return a.newBufferFrom(new Uint8Array(O))}},g.uint8array={string:d,array:function(O){return p(O,new Array(O.length))},arraybuffer:function(O){return O.buffer},uint8array:u,nodebuffer:function(O){return a.newBufferFrom(O)}},g.nodebuffer={string:d,array:function(O){return p(O,new Array(O.length))},arraybuffer:function(O){return g.nodebuffer.uint8array(O).buffer},uint8array:function(O){return p(O,new Uint8Array(O.length))},nodebuffer:u},i.transformTo=function(O,y){if(y=y||"",!O)return y;i.checkSupport(O);var b=i.getTypeOf(y);return g[b][O](y)},i.resolve=function(O){for(var y=O.split("/"),b=[],v=0;v<y.length;v++){var S=y[v];S==="."||S===""&&v!==0&&v!==y.length-1||(S===".."?b.pop():b.push(S))}return b.join("/")},i.getTypeOf=function(O){return typeof O=="string"?"string":Object.prototype.toString.call(O)==="[object Array]"?"array":s.nodebuffer&&a.isBuffer(O)?"nodebuffer":s.uint8array&&O instanceof Uint8Array?"uint8array":s.arraybuffer&&O instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(O){if(!s[O.toLowerCase()])throw new Error(O+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(O){var y,b,v="";for(b=0;b<(O||"").length;b++)v+="\\x"+((y=O.charCodeAt(b))<16?"0":"")+y.toString(16).toUpperCase();return v},i.delay=function(O,y,b){setImmediate(function(){O.apply(b||null,y||[])})},i.inherits=function(O,y){function b(){}b.prototype=y.prototype,O.prototype=new b},i.extend=function(){var O,y,b={};for(O=0;O<arguments.length;O++)for(y in arguments[O])Object.prototype.hasOwnProperty.call(arguments[O],y)&&b[y]===void 0&&(b[y]=arguments[O][y]);return b},i.prepareContent=function(O,y,b,v,S){return l.Promise.resolve(y).then(function(x){return s.blob&&(x instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(x))!==-1)&&typeof FileReader<"u"?new l.Promise(function(P,E){var D=new FileReader;D.onload=function(R){P(R.target.result)},D.onerror=function(R){E(R.target.error)},D.readAsArrayBuffer(x)}):x}).then(function(x){var P=i.getTypeOf(x);return P?(P==="arraybuffer"?x=i.transformTo("uint8array",x):P==="string"&&(S?x=o.decode(x):b&&v!==!0&&(x=(function(E){return c(E,s.uint8array?new Uint8Array(E.length):new Array(E.length))})(x))),x):l.Promise.reject(new Error("Can't read the data of '"+O+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(n,r,i){var s=n("./reader/readerFor"),o=n("./utils"),a=n("./signature"),l=n("./zipEntry"),u=n("./support");function c(f){this.files=[],this.loadOptions=f}c.prototype={checkSignature:function(f){if(!this.reader.readAndCheckSignature(f)){this.reader.index-=4;var d=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+o.pretty(d)+", expected "+o.pretty(f)+")")}},isSignature:function(f,d){var p=this.reader.index;this.reader.setIndex(f);var g=this.reader.readString(4)===d;return this.reader.setIndex(p),g},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var f=this.reader.readData(this.zipCommentLength),d=u.uint8array?"uint8array":"array",p=o.transformTo(d,f);this.zipComment=this.loadOptions.decodeFileName(p)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var f,d,p,g=this.zip64EndOfCentralSize-44;0<g;)f=this.reader.readInt(2),d=this.reader.readInt(4),p=this.reader.readData(d),this.zip64ExtensibleData[f]={id:f,length:d,value:p}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var f,d;for(f=0;f<this.files.length;f++)d=this.files[f],this.reader.setIndex(d.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),d.readLocalPart(this.reader),d.handleUTF8(),d.processAttributes()},readCentralDir:function(){var f;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(f=new l({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(f);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var f=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(f<0)throw this.isSignature(0,a.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(f);var d=f;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(f=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(f),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var p=this.centralDirOffset+this.centralDirSize;this.zip64&&(p+=20,p+=12+this.zip64EndOfCentralSize);var g=d-p;if(0<g)this.isSignature(d,a.CENTRAL_FILE_HEADER)||(this.reader.zero=g);else if(g<0)throw new Error("Corrupted zip: missing "+Math.abs(g)+" bytes.")},prepareReader:function(f){this.reader=s(f)},load:function(f){this.prepareReader(f),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=c},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(n,r,i){var s=n("./reader/readerFor"),o=n("./utils"),a=n("./compressedObject"),l=n("./crc32"),u=n("./utf8"),c=n("./compressions"),f=n("./support");function d(p,g){this.options=p,this.loadOptions=g}d.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(p){var g,O;if(p.skip(22),this.fileNameLength=p.readInt(2),O=p.readInt(2),this.fileName=p.readData(this.fileNameLength),p.skip(O),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((g=(function(y){for(var b in c)if(Object.prototype.hasOwnProperty.call(c,b)&&c[b].magic===y)return c[b];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,g,p.readData(this.compressedSize))},readCentralPart:function(p){this.versionMadeBy=p.readInt(2),p.skip(2),this.bitFlag=p.readInt(2),this.compressionMethod=p.readString(2),this.date=p.readDate(),this.crc32=p.readInt(4),this.compressedSize=p.readInt(4),this.uncompressedSize=p.readInt(4);var g=p.readInt(2);if(this.extraFieldsLength=p.readInt(2),this.fileCommentLength=p.readInt(2),this.diskNumberStart=p.readInt(2),this.internalFileAttributes=p.readInt(2),this.externalFileAttributes=p.readInt(4),this.localHeaderOffset=p.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");p.skip(g),this.readExtraFields(p),this.parseZIP64ExtraField(p),this.fileComment=p.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var p=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),p==0&&(this.dosPermissions=63&this.externalFileAttributes),p==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var p=s(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=p.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=p.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=p.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=p.readInt(4))}},readExtraFields:function(p){var g,O,y,b=p.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});p.index+4<b;)g=p.readInt(2),O=p.readInt(2),y=p.readData(O),this.extraFields[g]={id:g,length:O,value:y};p.setIndex(b)},handleUTF8:function(){var p=f.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=u.utf8decode(this.fileName),this.fileCommentStr=u.utf8decode(this.fileComment);else{var g=this.findExtraFieldUnicodePath();if(g!==null)this.fileNameStr=g;else{var O=o.transformTo(p,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(O)}var y=this.findExtraFieldUnicodeComment();if(y!==null)this.fileCommentStr=y;else{var b=o.transformTo(p,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(b)}}},findExtraFieldUnicodePath:function(){var p=this.extraFields[28789];if(p){var g=s(p.value);return g.readInt(1)!==1||l(this.fileName)!==g.readInt(4)?null:u.utf8decode(g.readData(p.length-5))}return null},findExtraFieldUnicodeComment:function(){var p=this.extraFields[25461];if(p){var g=s(p.value);return g.readInt(1)!==1||l(this.fileComment)!==g.readInt(4)?null:u.utf8decode(g.readData(p.length-5))}return null}},r.exports=d},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(n,r,i){function s(g,O,y){this.name=g,this.dir=y.dir,this.date=y.date,this.comment=y.comment,this.unixPermissions=y.unixPermissions,this.dosPermissions=y.dosPermissions,this._data=O,this._dataBinary=y.binary,this.options={compression:y.compression,compressionOptions:y.compressionOptions}}var o=n("./stream/StreamHelper"),a=n("./stream/DataWorker"),l=n("./utf8"),u=n("./compressedObject"),c=n("./stream/GenericWorker");s.prototype={internalStream:function(g){var O=null,y="string";try{if(!g)throw new Error("No output type specified.");var b=(y=g.toLowerCase())==="string"||y==="text";y!=="binarystring"&&y!=="text"||(y="string"),O=this._decompressWorker();var v=!this._dataBinary;v&&!b&&(O=O.pipe(new l.Utf8EncodeWorker)),!v&&b&&(O=O.pipe(new l.Utf8DecodeWorker))}catch(S){(O=new c("error")).error(S)}return new o(O,y,"")},async:function(g,O){return this.internalStream(g).accumulate(O)},nodeStream:function(g,O){return this.internalStream(g||"nodebuffer").toNodejsStream(O)},_compressWorker:function(g,O){if(this._data instanceof u&&this._data.compression.magic===g.magic)return this._data.getCompressedWorker();var y=this._decompressWorker();return this._dataBinary||(y=y.pipe(new l.Utf8EncodeWorker)),u.createWorkerFrom(y,g,O)},_decompressWorker:function(){return this._data instanceof u?this._data.getContentWorker():this._data instanceof c?this._data:new a(this._data)}};for(var f=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],d=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},p=0;p<f.length;p++)s.prototype[f[p]]=d;r.exports=s},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(n,r,i){(function(s){var o,a,l=s.MutationObserver||s.WebKitMutationObserver;if(l){var u=0,c=new l(g),f=s.document.createTextNode("");c.observe(f,{characterData:!0}),o=function(){f.data=u=++u%2}}else if(s.setImmediate||s.MessageChannel===void 0)o="document"in s&&"onreadystatechange"in s.document.createElement("script")?function(){var O=s.document.createElement("script");O.onreadystatechange=function(){g(),O.onreadystatechange=null,O.parentNode.removeChild(O),O=null},s.document.documentElement.appendChild(O)}:function(){setTimeout(g,0)};else{var d=new s.MessageChannel;d.port1.onmessage=g,o=function(){d.port2.postMessage(0)}}var p=[];function g(){var O,y;a=!0;for(var b=p.length;b;){for(y=p,p=[],O=-1;++O<b;)y[O]();b=p.length}a=!1}r.exports=function(O){p.push(O)!==1||a||o()}}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(n,r,i){var s=n("immediate");function o(){}var a={},l=["REJECTED"],u=["FULFILLED"],c=["PENDING"];function f(b){if(typeof b!="function")throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,b!==o&&O(this,b)}function d(b,v,S){this.promise=b,typeof v=="function"&&(this.onFulfilled=v,this.callFulfilled=this.otherCallFulfilled),typeof S=="function"&&(this.onRejected=S,this.callRejected=this.otherCallRejected)}function p(b,v,S){s(function(){var x;try{x=v(S)}catch(P){return a.reject(b,P)}x===b?a.reject(b,new TypeError("Cannot resolve promise with itself")):a.resolve(b,x)})}function g(b){var v=b&&b.then;if(b&&(typeof b=="object"||typeof b=="function")&&typeof v=="function")return function(){v.apply(b,arguments)}}function O(b,v){var S=!1;function x(D){S||(S=!0,a.reject(b,D))}function P(D){S||(S=!0,a.resolve(b,D))}var E=y(function(){v(P,x)});E.status==="error"&&x(E.value)}function y(b,v){var S={};try{S.value=b(v),S.status="success"}catch(x){S.status="error",S.value=x}return S}(r.exports=f).prototype.finally=function(b){if(typeof b!="function")return this;var v=this.constructor;return this.then(function(S){return v.resolve(b()).then(function(){return S})},function(S){return v.resolve(b()).then(function(){throw S})})},f.prototype.catch=function(b){return this.then(null,b)},f.prototype.then=function(b,v){if(typeof b!="function"&&this.state===u||typeof v!="function"&&this.state===l)return this;var S=new this.constructor(o);return this.state!==c?p(S,this.state===u?b:v,this.outcome):this.queue.push(new d(S,b,v)),S},d.prototype.callFulfilled=function(b){a.resolve(this.promise,b)},d.prototype.otherCallFulfilled=function(b){p(this.promise,this.onFulfilled,b)},d.prototype.callRejected=function(b){a.reject(this.promise,b)},d.prototype.otherCallRejected=function(b){p(this.promise,this.onRejected,b)},a.resolve=function(b,v){var S=y(g,v);if(S.status==="error")return a.reject(b,S.value);var x=S.value;if(x)O(b,x);else{b.state=u,b.outcome=v;for(var P=-1,E=b.queue.length;++P<E;)b.queue[P].callFulfilled(v)}return b},a.reject=function(b,v){b.state=l,b.outcome=v;for(var S=-1,x=b.queue.length;++S<x;)b.queue[S].callRejected(v);return b},f.resolve=function(b){return b instanceof this?b:a.resolve(new this(o),b)},f.reject=function(b){var v=new this(o);return a.reject(v,b)},f.all=function(b){var v=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var S=b.length,x=!1;if(!S)return this.resolve([]);for(var P=new Array(S),E=0,D=-1,R=new this(o);++D<S;)_(b[D],D);return R;function _(C,I){v.resolve(C).then(function(T){P[I]=T,++E!==S||x||(x=!0,a.resolve(R,P))},function(T){x||(x=!0,a.reject(R,T))})}},f.race=function(b){var v=this;if(Object.prototype.toString.call(b)!=="[object Array]")return this.reject(new TypeError("must be an array"));var S=b.length,x=!1;if(!S)return this.resolve([]);for(var P=-1,E=new this(o);++P<S;)D=b[P],v.resolve(D).then(function(R){x||(x=!0,a.resolve(E,R))},function(R){x||(x=!0,a.reject(E,R))});var D;return E}},{immediate:36}],38:[function(n,r,i){var s={};(0,n("./lib/utils/common").assign)(s,n("./lib/deflate"),n("./lib/inflate"),n("./lib/zlib/constants")),r.exports=s},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(n,r,i){var s=n("./zlib/deflate"),o=n("./utils/common"),a=n("./utils/strings"),l=n("./zlib/messages"),u=n("./zlib/zstream"),c=Object.prototype.toString,f=0,d=-1,p=0,g=8;function O(b){if(!(this instanceof O))return new O(b);this.options=o.assign({level:d,method:g,chunkSize:16384,windowBits:15,memLevel:8,strategy:p,to:""},b||{});var v=this.options;v.raw&&0<v.windowBits?v.windowBits=-v.windowBits:v.gzip&&0<v.windowBits&&v.windowBits<16&&(v.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var S=s.deflateInit2(this.strm,v.level,v.method,v.windowBits,v.memLevel,v.strategy);if(S!==f)throw new Error(l[S]);if(v.header&&s.deflateSetHeader(this.strm,v.header),v.dictionary){var x;if(x=typeof v.dictionary=="string"?a.string2buf(v.dictionary):c.call(v.dictionary)==="[object ArrayBuffer]"?new Uint8Array(v.dictionary):v.dictionary,(S=s.deflateSetDictionary(this.strm,x))!==f)throw new Error(l[S]);this._dict_set=!0}}function y(b,v){var S=new O(v);if(S.push(b,!0),S.err)throw S.msg||l[S.err];return S.result}O.prototype.push=function(b,v){var S,x,P=this.strm,E=this.options.chunkSize;if(this.ended)return!1;x=v===~~v?v:v===!0?4:0,typeof b=="string"?P.input=a.string2buf(b):c.call(b)==="[object ArrayBuffer]"?P.input=new Uint8Array(b):P.input=b,P.next_in=0,P.avail_in=P.input.length;do{if(P.avail_out===0&&(P.output=new o.Buf8(E),P.next_out=0,P.avail_out=E),(S=s.deflate(P,x))!==1&&S!==f)return this.onEnd(S),!(this.ended=!0);P.avail_out!==0&&(P.avail_in!==0||x!==4&&x!==2)||(this.options.to==="string"?this.onData(a.buf2binstring(o.shrinkBuf(P.output,P.next_out))):this.onData(o.shrinkBuf(P.output,P.next_out)))}while((0<P.avail_in||P.avail_out===0)&&S!==1);return x===4?(S=s.deflateEnd(this.strm),this.onEnd(S),this.ended=!0,S===f):x!==2||(this.onEnd(f),!(P.avail_out=0))},O.prototype.onData=function(b){this.chunks.push(b)},O.prototype.onEnd=function(b){b===f&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=b,this.msg=this.strm.msg},i.Deflate=O,i.deflate=y,i.deflateRaw=function(b,v){return(v=v||{}).raw=!0,y(b,v)},i.gzip=function(b,v){return(v=v||{}).gzip=!0,y(b,v)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(n,r,i){var s=n("./zlib/inflate"),o=n("./utils/common"),a=n("./utils/strings"),l=n("./zlib/constants"),u=n("./zlib/messages"),c=n("./zlib/zstream"),f=n("./zlib/gzheader"),d=Object.prototype.toString;function p(O){if(!(this instanceof p))return new p(O);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},O||{});var y=this.options;y.raw&&0<=y.windowBits&&y.windowBits<16&&(y.windowBits=-y.windowBits,y.windowBits===0&&(y.windowBits=-15)),!(0<=y.windowBits&&y.windowBits<16)||O&&O.windowBits||(y.windowBits+=32),15<y.windowBits&&y.windowBits<48&&(15&y.windowBits)==0&&(y.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var b=s.inflateInit2(this.strm,y.windowBits);if(b!==l.Z_OK)throw new Error(u[b]);this.header=new f,s.inflateGetHeader(this.strm,this.header)}function g(O,y){var b=new p(y);if(b.push(O,!0),b.err)throw b.msg||u[b.err];return b.result}p.prototype.push=function(O,y){var b,v,S,x,P,E,D=this.strm,R=this.options.chunkSize,_=this.options.dictionary,C=!1;if(this.ended)return!1;v=y===~~y?y:y===!0?l.Z_FINISH:l.Z_NO_FLUSH,typeof O=="string"?D.input=a.binstring2buf(O):d.call(O)==="[object ArrayBuffer]"?D.input=new Uint8Array(O):D.input=O,D.next_in=0,D.avail_in=D.input.length;do{if(D.avail_out===0&&(D.output=new o.Buf8(R),D.next_out=0,D.avail_out=R),(b=s.inflate(D,l.Z_NO_FLUSH))===l.Z_NEED_DICT&&_&&(E=typeof _=="string"?a.string2buf(_):d.call(_)==="[object ArrayBuffer]"?new Uint8Array(_):_,b=s.inflateSetDictionary(this.strm,E)),b===l.Z_BUF_ERROR&&C===!0&&(b=l.Z_OK,C=!1),b!==l.Z_STREAM_END&&b!==l.Z_OK)return this.onEnd(b),!(this.ended=!0);D.next_out&&(D.avail_out!==0&&b!==l.Z_STREAM_END&&(D.avail_in!==0||v!==l.Z_FINISH&&v!==l.Z_SYNC_FLUSH)||(this.options.to==="string"?(S=a.utf8border(D.output,D.next_out),x=D.next_out-S,P=a.buf2string(D.output,S),D.next_out=x,D.avail_out=R-x,x&&o.arraySet(D.output,D.output,S,x,0),this.onData(P)):this.onData(o.shrinkBuf(D.output,D.next_out)))),D.avail_in===0&&D.avail_out===0&&(C=!0)}while((0<D.avail_in||D.avail_out===0)&&b!==l.Z_STREAM_END);return b===l.Z_STREAM_END&&(v=l.Z_FINISH),v===l.Z_FINISH?(b=s.inflateEnd(this.strm),this.onEnd(b),this.ended=!0,b===l.Z_OK):v!==l.Z_SYNC_FLUSH||(this.onEnd(l.Z_OK),!(D.avail_out=0))},p.prototype.onData=function(O){this.chunks.push(O)},p.prototype.onEnd=function(O){O===l.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=O,this.msg=this.strm.msg},i.Inflate=p,i.inflate=g,i.inflateRaw=function(O,y){return(y=y||{}).raw=!0,g(O,y)},i.ungzip=g},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(n,r,i){var s=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";i.assign=function(l){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var c=u.shift();if(c){if(typeof c!="object")throw new TypeError(c+"must be non-object");for(var f in c)c.hasOwnProperty(f)&&(l[f]=c[f])}}return l},i.shrinkBuf=function(l,u){return l.length===u?l:l.subarray?l.subarray(0,u):(l.length=u,l)};var o={arraySet:function(l,u,c,f,d){if(u.subarray&&l.subarray)l.set(u.subarray(c,c+f),d);else for(var p=0;p<f;p++)l[d+p]=u[c+p]},flattenChunks:function(l){var u,c,f,d,p,g;for(u=f=0,c=l.length;u<c;u++)f+=l[u].length;for(g=new Uint8Array(f),u=d=0,c=l.length;u<c;u++)p=l[u],g.set(p,d),d+=p.length;return g}},a={arraySet:function(l,u,c,f,d){for(var p=0;p<f;p++)l[d+p]=u[c+p]},flattenChunks:function(l){return[].concat.apply([],l)}};i.setTyped=function(l){l?(i.Buf8=Uint8Array,i.Buf16=Uint16Array,i.Buf32=Int32Array,i.assign(i,o)):(i.Buf8=Array,i.Buf16=Array,i.Buf32=Array,i.assign(i,a))},i.setTyped(s)},{}],42:[function(n,r,i){var s=n("./common"),o=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch{o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{a=!1}for(var l=new s.Buf8(256),u=0;u<256;u++)l[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function c(f,d){if(d<65537&&(f.subarray&&a||!f.subarray&&o))return String.fromCharCode.apply(null,s.shrinkBuf(f,d));for(var p="",g=0;g<d;g++)p+=String.fromCharCode(f[g]);return p}l[254]=l[254]=1,i.string2buf=function(f){var d,p,g,O,y,b=f.length,v=0;for(O=0;O<b;O++)(64512&(p=f.charCodeAt(O)))==55296&&O+1<b&&(64512&(g=f.charCodeAt(O+1)))==56320&&(p=65536+(p-55296<<10)+(g-56320),O++),v+=p<128?1:p<2048?2:p<65536?3:4;for(d=new s.Buf8(v),O=y=0;y<v;O++)(64512&(p=f.charCodeAt(O)))==55296&&O+1<b&&(64512&(g=f.charCodeAt(O+1)))==56320&&(p=65536+(p-55296<<10)+(g-56320),O++),p<128?d[y++]=p:(p<2048?d[y++]=192|p>>>6:(p<65536?d[y++]=224|p>>>12:(d[y++]=240|p>>>18,d[y++]=128|p>>>12&63),d[y++]=128|p>>>6&63),d[y++]=128|63&p);return d},i.buf2binstring=function(f){return c(f,f.length)},i.binstring2buf=function(f){for(var d=new s.Buf8(f.length),p=0,g=d.length;p<g;p++)d[p]=f.charCodeAt(p);return d},i.buf2string=function(f,d){var p,g,O,y,b=d||f.length,v=new Array(2*b);for(p=g=0;p<b;)if((O=f[p++])<128)v[g++]=O;else if(4<(y=l[O]))v[g++]=65533,p+=y-1;else{for(O&=y===2?31:y===3?15:7;1<y&&p<b;)O=O<<6|63&f[p++],y--;1<y?v[g++]=65533:O<65536?v[g++]=O:(O-=65536,v[g++]=55296|O>>10&1023,v[g++]=56320|1023&O)}return c(v,g)},i.utf8border=function(f,d){var p;for((d=d||f.length)>f.length&&(d=f.length),p=d-1;0<=p&&(192&f[p])==128;)p--;return p<0||p===0?d:p+l[f[p]]>d?p:d}},{"./common":41}],43:[function(n,r,i){r.exports=function(s,o,a,l){for(var u=65535&s|0,c=s>>>16&65535|0,f=0;a!==0;){for(a-=f=2e3<a?2e3:a;c=c+(u=u+o[l++]|0)|0,--f;);u%=65521,c%=65521}return u|c<<16|0}},{}],44:[function(n,r,i){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(n,r,i){var s=(function(){for(var o,a=[],l=0;l<256;l++){o=l;for(var u=0;u<8;u++)o=1&o?3988292384^o>>>1:o>>>1;a[l]=o}return a})();r.exports=function(o,a,l,u){var c=s,f=u+l;o^=-1;for(var d=u;d<f;d++)o=o>>>8^c[255&(o^a[d])];return-1^o}},{}],46:[function(n,r,i){var s,o=n("../utils/common"),a=n("./trees"),l=n("./adler32"),u=n("./crc32"),c=n("./messages"),f=0,d=4,p=0,g=-2,O=-1,y=4,b=2,v=8,S=9,x=286,P=30,E=19,D=2*x+1,R=15,_=3,C=258,I=C+_+1,T=42,B=113,A=1,X=2,G=3,W=4;function te(F,me){return F.msg=c[me],me}function J(F){return(F<<1)-(4<F?9:0)}function U(F){for(var me=F.length;0<=--me;)F[me]=0}function z(F){var me=F.state,Oe=me.pending;Oe>F.avail_out&&(Oe=F.avail_out),Oe!==0&&(o.arraySet(F.output,me.pending_buf,me.pending_out,Oe,F.next_out),F.next_out+=Oe,me.pending_out+=Oe,F.total_out+=Oe,F.avail_out-=Oe,me.pending-=Oe,me.pending===0&&(me.pending_out=0))}function Y(F,me){a._tr_flush_block(F,0<=F.block_start?F.block_start:-1,F.strstart-F.block_start,me),F.block_start=F.strstart,z(F.strm)}function L(F,me){F.pending_buf[F.pending++]=me}function se(F,me){F.pending_buf[F.pending++]=me>>>8&255,F.pending_buf[F.pending++]=255&me}function ee(F,me){var Oe,ie,re=F.max_chain_length,pe=F.strstart,Me=F.prev_length,je=F.nice_match,_e=F.strstart>F.w_size-I?F.strstart-(F.w_size-I):0,q=F.window,ye=F.w_mask,xe=F.prev,ce=F.strstart+C,Se=q[pe+Me-1],Ee=q[pe+Me];F.prev_length>=F.good_match&&(re>>=2),je>F.lookahead&&(je=F.lookahead);do if(q[(Oe=me)+Me]===Ee&&q[Oe+Me-1]===Se&&q[Oe]===q[pe]&&q[++Oe]===q[pe+1]){pe+=2,Oe++;do;while(q[++pe]===q[++Oe]&&q[++pe]===q[++Oe]&&q[++pe]===q[++Oe]&&q[++pe]===q[++Oe]&&q[++pe]===q[++Oe]&&q[++pe]===q[++Oe]&&q[++pe]===q[++Oe]&&q[++pe]===q[++Oe]&&pe<ce);if(ie=C-(ce-pe),pe=ce-C,Me<ie){if(F.match_start=me,je<=(Me=ie))break;Se=q[pe+Me-1],Ee=q[pe+Me]}}while((me=xe[me&ye])>_e&&--re!=0);return Me<=F.lookahead?Me:F.lookahead}function ue(F){var me,Oe,ie,re,pe,Me,je,_e,q,ye,xe=F.w_size;do{if(re=F.window_size-F.lookahead-F.strstart,F.strstart>=xe+(xe-I)){for(o.arraySet(F.window,F.window,xe,xe,0),F.match_start-=xe,F.strstart-=xe,F.block_start-=xe,me=Oe=F.hash_size;ie=F.head[--me],F.head[me]=xe<=ie?ie-xe:0,--Oe;);for(me=Oe=xe;ie=F.prev[--me],F.prev[me]=xe<=ie?ie-xe:0,--Oe;);re+=xe}if(F.strm.avail_in===0)break;if(Me=F.strm,je=F.window,_e=F.strstart+F.lookahead,q=re,ye=void 0,ye=Me.avail_in,q<ye&&(ye=q),Oe=ye===0?0:(Me.avail_in-=ye,o.arraySet(je,Me.input,Me.next_in,ye,_e),Me.state.wrap===1?Me.adler=l(Me.adler,je,ye,_e):Me.state.wrap===2&&(Me.adler=u(Me.adler,je,ye,_e)),Me.next_in+=ye,Me.total_in+=ye,ye),F.lookahead+=Oe,F.lookahead+F.insert>=_)for(pe=F.strstart-F.insert,F.ins_h=F.window[pe],F.ins_h=(F.ins_h<<F.hash_shift^F.window[pe+1])&F.hash_mask;F.insert&&(F.ins_h=(F.ins_h<<F.hash_shift^F.window[pe+_-1])&F.hash_mask,F.prev[pe&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=pe,pe++,F.insert--,!(F.lookahead+F.insert<_)););}while(F.lookahead<I&&F.strm.avail_in!==0)}function Z(F,me){for(var Oe,ie;;){if(F.lookahead<I){if(ue(F),F.lookahead<I&&me===f)return A;if(F.lookahead===0)break}if(Oe=0,F.lookahead>=_&&(F.ins_h=(F.ins_h<<F.hash_shift^F.window[F.strstart+_-1])&F.hash_mask,Oe=F.prev[F.strstart&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=F.strstart),Oe!==0&&F.strstart-Oe<=F.w_size-I&&(F.match_length=ee(F,Oe)),F.match_length>=_)if(ie=a._tr_tally(F,F.strstart-F.match_start,F.match_length-_),F.lookahead-=F.match_length,F.match_length<=F.max_lazy_match&&F.lookahead>=_){for(F.match_length--;F.strstart++,F.ins_h=(F.ins_h<<F.hash_shift^F.window[F.strstart+_-1])&F.hash_mask,Oe=F.prev[F.strstart&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=F.strstart,--F.match_length!=0;);F.strstart++}else F.strstart+=F.match_length,F.match_length=0,F.ins_h=F.window[F.strstart],F.ins_h=(F.ins_h<<F.hash_shift^F.window[F.strstart+1])&F.hash_mask;else ie=a._tr_tally(F,0,F.window[F.strstart]),F.lookahead--,F.strstart++;if(ie&&(Y(F,!1),F.strm.avail_out===0))return A}return F.insert=F.strstart<_-1?F.strstart:_-1,me===d?(Y(F,!0),F.strm.avail_out===0?G:W):F.last_lit&&(Y(F,!1),F.strm.avail_out===0)?A:X}function V(F,me){for(var Oe,ie,re;;){if(F.lookahead<I){if(ue(F),F.lookahead<I&&me===f)return A;if(F.lookahead===0)break}if(Oe=0,F.lookahead>=_&&(F.ins_h=(F.ins_h<<F.hash_shift^F.window[F.strstart+_-1])&F.hash_mask,Oe=F.prev[F.strstart&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=F.strstart),F.prev_length=F.match_length,F.prev_match=F.match_start,F.match_length=_-1,Oe!==0&&F.prev_length<F.max_lazy_match&&F.strstart-Oe<=F.w_size-I&&(F.match_length=ee(F,Oe),F.match_length<=5&&(F.strategy===1||F.match_length===_&&4096<F.strstart-F.match_start)&&(F.match_length=_-1)),F.prev_length>=_&&F.match_length<=F.prev_length){for(re=F.strstart+F.lookahead-_,ie=a._tr_tally(F,F.strstart-1-F.prev_match,F.prev_length-_),F.lookahead-=F.prev_length-1,F.prev_length-=2;++F.strstart<=re&&(F.ins_h=(F.ins_h<<F.hash_shift^F.window[F.strstart+_-1])&F.hash_mask,Oe=F.prev[F.strstart&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=F.strstart),--F.prev_length!=0;);if(F.match_available=0,F.match_length=_-1,F.strstart++,ie&&(Y(F,!1),F.strm.avail_out===0))return A}else if(F.match_available){if((ie=a._tr_tally(F,0,F.window[F.strstart-1]))&&Y(F,!1),F.strstart++,F.lookahead--,F.strm.avail_out===0)return A}else F.match_available=1,F.strstart++,F.lookahead--}return F.match_available&&(ie=a._tr_tally(F,0,F.window[F.strstart-1]),F.match_available=0),F.insert=F.strstart<_-1?F.strstart:_-1,me===d?(Y(F,!0),F.strm.avail_out===0?G:W):F.last_lit&&(Y(F,!1),F.strm.avail_out===0)?A:X}function H(F,me,Oe,ie,re){this.good_length=F,this.max_lazy=me,this.nice_length=Oe,this.max_chain=ie,this.func=re}function he(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=v,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*D),this.dyn_dtree=new o.Buf16(2*(2*P+1)),this.bl_tree=new o.Buf16(2*(2*E+1)),U(this.dyn_ltree),U(this.dyn_dtree),U(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(R+1),this.heap=new o.Buf16(2*x+1),U(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*x+1),U(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ve(F){var me;return F&&F.state?(F.total_in=F.total_out=0,F.data_type=b,(me=F.state).pending=0,me.pending_out=0,me.wrap<0&&(me.wrap=-me.wrap),me.status=me.wrap?T:B,F.adler=me.wrap===2?0:1,me.last_flush=f,a._tr_init(me),p):te(F,g)}function Ae(F){var me=ve(F);return me===p&&(function(Oe){Oe.window_size=2*Oe.w_size,U(Oe.head),Oe.max_lazy_match=s[Oe.level].max_lazy,Oe.good_match=s[Oe.level].good_length,Oe.nice_match=s[Oe.level].nice_length,Oe.max_chain_length=s[Oe.level].max_chain,Oe.strstart=0,Oe.block_start=0,Oe.lookahead=0,Oe.insert=0,Oe.match_length=Oe.prev_length=_-1,Oe.match_available=0,Oe.ins_h=0})(F.state),me}function Re(F,me,Oe,ie,re,pe){if(!F)return g;var Me=1;if(me===O&&(me=6),ie<0?(Me=0,ie=-ie):15<ie&&(Me=2,ie-=16),re<1||S<re||Oe!==v||ie<8||15<ie||me<0||9<me||pe<0||y<pe)return te(F,g);ie===8&&(ie=9);var je=new he;return(F.state=je).strm=F,je.wrap=Me,je.gzhead=null,je.w_bits=ie,je.w_size=1<<je.w_bits,je.w_mask=je.w_size-1,je.hash_bits=re+7,je.hash_size=1<<je.hash_bits,je.hash_mask=je.hash_size-1,je.hash_shift=~~((je.hash_bits+_-1)/_),je.window=new o.Buf8(2*je.w_size),je.head=new o.Buf16(je.hash_size),je.prev=new o.Buf16(je.w_size),je.lit_bufsize=1<<re+6,je.pending_buf_size=4*je.lit_bufsize,je.pending_buf=new o.Buf8(je.pending_buf_size),je.d_buf=1*je.lit_bufsize,je.l_buf=3*je.lit_bufsize,je.level=me,je.strategy=pe,je.method=Oe,Ae(F)}s=[new H(0,0,0,0,function(F,me){var Oe=65535;for(Oe>F.pending_buf_size-5&&(Oe=F.pending_buf_size-5);;){if(F.lookahead<=1){if(ue(F),F.lookahead===0&&me===f)return A;if(F.lookahead===0)break}F.strstart+=F.lookahead,F.lookahead=0;var ie=F.block_start+Oe;if((F.strstart===0||F.strstart>=ie)&&(F.lookahead=F.strstart-ie,F.strstart=ie,Y(F,!1),F.strm.avail_out===0)||F.strstart-F.block_start>=F.w_size-I&&(Y(F,!1),F.strm.avail_out===0))return A}return F.insert=0,me===d?(Y(F,!0),F.strm.avail_out===0?G:W):(F.strstart>F.block_start&&(Y(F,!1),F.strm.avail_out),A)}),new H(4,4,8,4,Z),new H(4,5,16,8,Z),new H(4,6,32,32,Z),new H(4,4,16,16,V),new H(8,16,32,32,V),new H(8,16,128,128,V),new H(8,32,128,256,V),new H(32,128,258,1024,V),new H(32,258,258,4096,V)],i.deflateInit=function(F,me){return Re(F,me,v,15,8,0)},i.deflateInit2=Re,i.deflateReset=Ae,i.deflateResetKeep=ve,i.deflateSetHeader=function(F,me){return F&&F.state?F.state.wrap!==2?g:(F.state.gzhead=me,p):g},i.deflate=function(F,me){var Oe,ie,re,pe;if(!F||!F.state||5<me||me<0)return F?te(F,g):g;if(ie=F.state,!F.output||!F.input&&F.avail_in!==0||ie.status===666&&me!==d)return te(F,F.avail_out===0?-5:g);if(ie.strm=F,Oe=ie.last_flush,ie.last_flush=me,ie.status===T)if(ie.wrap===2)F.adler=0,L(ie,31),L(ie,139),L(ie,8),ie.gzhead?(L(ie,(ie.gzhead.text?1:0)+(ie.gzhead.hcrc?2:0)+(ie.gzhead.extra?4:0)+(ie.gzhead.name?8:0)+(ie.gzhead.comment?16:0)),L(ie,255&ie.gzhead.time),L(ie,ie.gzhead.time>>8&255),L(ie,ie.gzhead.time>>16&255),L(ie,ie.gzhead.time>>24&255),L(ie,ie.level===9?2:2<=ie.strategy||ie.level<2?4:0),L(ie,255&ie.gzhead.os),ie.gzhead.extra&&ie.gzhead.extra.length&&(L(ie,255&ie.gzhead.extra.length),L(ie,ie.gzhead.extra.length>>8&255)),ie.gzhead.hcrc&&(F.adler=u(F.adler,ie.pending_buf,ie.pending,0)),ie.gzindex=0,ie.status=69):(L(ie,0),L(ie,0),L(ie,0),L(ie,0),L(ie,0),L(ie,ie.level===9?2:2<=ie.strategy||ie.level<2?4:0),L(ie,3),ie.status=B);else{var Me=v+(ie.w_bits-8<<4)<<8;Me|=(2<=ie.strategy||ie.level<2?0:ie.level<6?1:ie.level===6?2:3)<<6,ie.strstart!==0&&(Me|=32),Me+=31-Me%31,ie.status=B,se(ie,Me),ie.strstart!==0&&(se(ie,F.adler>>>16),se(ie,65535&F.adler)),F.adler=1}if(ie.status===69)if(ie.gzhead.extra){for(re=ie.pending;ie.gzindex<(65535&ie.gzhead.extra.length)&&(ie.pending!==ie.pending_buf_size||(ie.gzhead.hcrc&&ie.pending>re&&(F.adler=u(F.adler,ie.pending_buf,ie.pending-re,re)),z(F),re=ie.pending,ie.pending!==ie.pending_buf_size));)L(ie,255&ie.gzhead.extra[ie.gzindex]),ie.gzindex++;ie.gzhead.hcrc&&ie.pending>re&&(F.adler=u(F.adler,ie.pending_buf,ie.pending-re,re)),ie.gzindex===ie.gzhead.extra.length&&(ie.gzindex=0,ie.status=73)}else ie.status=73;if(ie.status===73)if(ie.gzhead.name){re=ie.pending;do{if(ie.pending===ie.pending_buf_size&&(ie.gzhead.hcrc&&ie.pending>re&&(F.adler=u(F.adler,ie.pending_buf,ie.pending-re,re)),z(F),re=ie.pending,ie.pending===ie.pending_buf_size)){pe=1;break}pe=ie.gzindex<ie.gzhead.name.length?255&ie.gzhead.name.charCodeAt(ie.gzindex++):0,L(ie,pe)}while(pe!==0);ie.gzhead.hcrc&&ie.pending>re&&(F.adler=u(F.adler,ie.pending_buf,ie.pending-re,re)),pe===0&&(ie.gzindex=0,ie.status=91)}else ie.status=91;if(ie.status===91)if(ie.gzhead.comment){re=ie.pending;do{if(ie.pending===ie.pending_buf_size&&(ie.gzhead.hcrc&&ie.pending>re&&(F.adler=u(F.adler,ie.pending_buf,ie.pending-re,re)),z(F),re=ie.pending,ie.pending===ie.pending_buf_size)){pe=1;break}pe=ie.gzindex<ie.gzhead.comment.length?255&ie.gzhead.comment.charCodeAt(ie.gzindex++):0,L(ie,pe)}while(pe!==0);ie.gzhead.hcrc&&ie.pending>re&&(F.adler=u(F.adler,ie.pending_buf,ie.pending-re,re)),pe===0&&(ie.status=103)}else ie.status=103;if(ie.status===103&&(ie.gzhead.hcrc?(ie.pending+2>ie.pending_buf_size&&z(F),ie.pending+2<=ie.pending_buf_size&&(L(ie,255&F.adler),L(ie,F.adler>>8&255),F.adler=0,ie.status=B)):ie.status=B),ie.pending!==0){if(z(F),F.avail_out===0)return ie.last_flush=-1,p}else if(F.avail_in===0&&J(me)<=J(Oe)&&me!==d)return te(F,-5);if(ie.status===666&&F.avail_in!==0)return te(F,-5);if(F.avail_in!==0||ie.lookahead!==0||me!==f&&ie.status!==666){var je=ie.strategy===2?(function(_e,q){for(var ye;;){if(_e.lookahead===0&&(ue(_e),_e.lookahead===0)){if(q===f)return A;break}if(_e.match_length=0,ye=a._tr_tally(_e,0,_e.window[_e.strstart]),_e.lookahead--,_e.strstart++,ye&&(Y(_e,!1),_e.strm.avail_out===0))return A}return _e.insert=0,q===d?(Y(_e,!0),_e.strm.avail_out===0?G:W):_e.last_lit&&(Y(_e,!1),_e.strm.avail_out===0)?A:X})(ie,me):ie.strategy===3?(function(_e,q){for(var ye,xe,ce,Se,Ee=_e.window;;){if(_e.lookahead<=C){if(ue(_e),_e.lookahead<=C&&q===f)return A;if(_e.lookahead===0)break}if(_e.match_length=0,_e.lookahead>=_&&0<_e.strstart&&(xe=Ee[ce=_e.strstart-1])===Ee[++ce]&&xe===Ee[++ce]&&xe===Ee[++ce]){Se=_e.strstart+C;do;while(xe===Ee[++ce]&&xe===Ee[++ce]&&xe===Ee[++ce]&&xe===Ee[++ce]&&xe===Ee[++ce]&&xe===Ee[++ce]&&xe===Ee[++ce]&&xe===Ee[++ce]&&ce<Se);_e.match_length=C-(Se-ce),_e.match_length>_e.lookahead&&(_e.match_length=_e.lookahead)}if(_e.match_length>=_?(ye=a._tr_tally(_e,1,_e.match_length-_),_e.lookahead-=_e.match_length,_e.strstart+=_e.match_length,_e.match_length=0):(ye=a._tr_tally(_e,0,_e.window[_e.strstart]),_e.lookahead--,_e.strstart++),ye&&(Y(_e,!1),_e.strm.avail_out===0))return A}return _e.insert=0,q===d?(Y(_e,!0),_e.strm.avail_out===0?G:W):_e.last_lit&&(Y(_e,!1),_e.strm.avail_out===0)?A:X})(ie,me):s[ie.level].func(ie,me);if(je!==G&&je!==W||(ie.status=666),je===A||je===G)return F.avail_out===0&&(ie.last_flush=-1),p;if(je===X&&(me===1?a._tr_align(ie):me!==5&&(a._tr_stored_block(ie,0,0,!1),me===3&&(U(ie.head),ie.lookahead===0&&(ie.strstart=0,ie.block_start=0,ie.insert=0))),z(F),F.avail_out===0))return ie.last_flush=-1,p}return me!==d?p:ie.wrap<=0?1:(ie.wrap===2?(L(ie,255&F.adler),L(ie,F.adler>>8&255),L(ie,F.adler>>16&255),L(ie,F.adler>>24&255),L(ie,255&F.total_in),L(ie,F.total_in>>8&255),L(ie,F.total_in>>16&255),L(ie,F.total_in>>24&255)):(se(ie,F.adler>>>16),se(ie,65535&F.adler)),z(F),0<ie.wrap&&(ie.wrap=-ie.wrap),ie.pending!==0?p:1)},i.deflateEnd=function(F){var me;return F&&F.state?(me=F.state.status)!==T&&me!==69&&me!==73&&me!==91&&me!==103&&me!==B&&me!==666?te(F,g):(F.state=null,me===B?te(F,-3):p):g},i.deflateSetDictionary=function(F,me){var Oe,ie,re,pe,Me,je,_e,q,ye=me.length;if(!F||!F.state||(pe=(Oe=F.state).wrap)===2||pe===1&&Oe.status!==T||Oe.lookahead)return g;for(pe===1&&(F.adler=l(F.adler,me,ye,0)),Oe.wrap=0,ye>=Oe.w_size&&(pe===0&&(U(Oe.head),Oe.strstart=0,Oe.block_start=0,Oe.insert=0),q=new o.Buf8(Oe.w_size),o.arraySet(q,me,ye-Oe.w_size,Oe.w_size,0),me=q,ye=Oe.w_size),Me=F.avail_in,je=F.next_in,_e=F.input,F.avail_in=ye,F.next_in=0,F.input=me,ue(Oe);Oe.lookahead>=_;){for(ie=Oe.strstart,re=Oe.lookahead-(_-1);Oe.ins_h=(Oe.ins_h<<Oe.hash_shift^Oe.window[ie+_-1])&Oe.hash_mask,Oe.prev[ie&Oe.w_mask]=Oe.head[Oe.ins_h],Oe.head[Oe.ins_h]=ie,ie++,--re;);Oe.strstart=ie,Oe.lookahead=_-1,ue(Oe)}return Oe.strstart+=Oe.lookahead,Oe.block_start=Oe.strstart,Oe.insert=Oe.lookahead,Oe.lookahead=0,Oe.match_length=Oe.prev_length=_-1,Oe.match_available=0,F.next_in=je,F.input=_e,F.avail_in=Me,Oe.wrap=pe,p},i.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(n,r,i){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(n,r,i){r.exports=function(s,o){var a,l,u,c,f,d,p,g,O,y,b,v,S,x,P,E,D,R,_,C,I,T,B,A,X;a=s.state,l=s.next_in,A=s.input,u=l+(s.avail_in-5),c=s.next_out,X=s.output,f=c-(o-s.avail_out),d=c+(s.avail_out-257),p=a.dmax,g=a.wsize,O=a.whave,y=a.wnext,b=a.window,v=a.hold,S=a.bits,x=a.lencode,P=a.distcode,E=(1<<a.lenbits)-1,D=(1<<a.distbits)-1;e:do{S<15&&(v+=A[l++]<<S,S+=8,v+=A[l++]<<S,S+=8),R=x[v&E];t:for(;;){if(v>>>=_=R>>>24,S-=_,(_=R>>>16&255)===0)X[c++]=65535&R;else{if(!(16&_)){if((64&_)==0){R=x[(65535&R)+(v&(1<<_)-1)];continue t}if(32&_){a.mode=12;break e}s.msg="invalid literal/length code",a.mode=30;break e}C=65535&R,(_&=15)&&(S<_&&(v+=A[l++]<<S,S+=8),C+=v&(1<<_)-1,v>>>=_,S-=_),S<15&&(v+=A[l++]<<S,S+=8,v+=A[l++]<<S,S+=8),R=P[v&D];n:for(;;){if(v>>>=_=R>>>24,S-=_,!(16&(_=R>>>16&255))){if((64&_)==0){R=P[(65535&R)+(v&(1<<_)-1)];continue n}s.msg="invalid distance code",a.mode=30;break e}if(I=65535&R,S<(_&=15)&&(v+=A[l++]<<S,(S+=8)<_&&(v+=A[l++]<<S,S+=8)),p<(I+=v&(1<<_)-1)){s.msg="invalid distance too far back",a.mode=30;break e}if(v>>>=_,S-=_,(_=c-f)<I){if(O<(_=I-_)&&a.sane){s.msg="invalid distance too far back",a.mode=30;break e}if(B=b,(T=0)===y){if(T+=g-_,_<C){for(C-=_;X[c++]=b[T++],--_;);T=c-I,B=X}}else if(y<_){if(T+=g+y-_,(_-=y)<C){for(C-=_;X[c++]=b[T++],--_;);if(T=0,y<C){for(C-=_=y;X[c++]=b[T++],--_;);T=c-I,B=X}}}else if(T+=y-_,_<C){for(C-=_;X[c++]=b[T++],--_;);T=c-I,B=X}for(;2<C;)X[c++]=B[T++],X[c++]=B[T++],X[c++]=B[T++],C-=3;C&&(X[c++]=B[T++],1<C&&(X[c++]=B[T++]))}else{for(T=c-I;X[c++]=X[T++],X[c++]=X[T++],X[c++]=X[T++],2<(C-=3););C&&(X[c++]=X[T++],1<C&&(X[c++]=X[T++]))}break}}break}}while(l<u&&c<d);l-=C=S>>3,v&=(1<<(S-=C<<3))-1,s.next_in=l,s.next_out=c,s.avail_in=l<u?u-l+5:5-(l-u),s.avail_out=c<d?d-c+257:257-(c-d),a.hold=v,a.bits=S}},{}],49:[function(n,r,i){var s=n("../utils/common"),o=n("./adler32"),a=n("./crc32"),l=n("./inffast"),u=n("./inftrees"),c=1,f=2,d=0,p=-2,g=1,O=852,y=592;function b(T){return(T>>>24&255)+(T>>>8&65280)+((65280&T)<<8)+((255&T)<<24)}function v(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new s.Buf16(320),this.work=new s.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function S(T){var B;return T&&T.state?(B=T.state,T.total_in=T.total_out=B.total=0,T.msg="",B.wrap&&(T.adler=1&B.wrap),B.mode=g,B.last=0,B.havedict=0,B.dmax=32768,B.head=null,B.hold=0,B.bits=0,B.lencode=B.lendyn=new s.Buf32(O),B.distcode=B.distdyn=new s.Buf32(y),B.sane=1,B.back=-1,d):p}function x(T){var B;return T&&T.state?((B=T.state).wsize=0,B.whave=0,B.wnext=0,S(T)):p}function P(T,B){var A,X;return T&&T.state?(X=T.state,B<0?(A=0,B=-B):(A=1+(B>>4),B<48&&(B&=15)),B&&(B<8||15<B)?p:(X.window!==null&&X.wbits!==B&&(X.window=null),X.wrap=A,X.wbits=B,x(T))):p}function E(T,B){var A,X;return T?(X=new v,(T.state=X).window=null,(A=P(T,B))!==d&&(T.state=null),A):p}var D,R,_=!0;function C(T){if(_){var B;for(D=new s.Buf32(512),R=new s.Buf32(32),B=0;B<144;)T.lens[B++]=8;for(;B<256;)T.lens[B++]=9;for(;B<280;)T.lens[B++]=7;for(;B<288;)T.lens[B++]=8;for(u(c,T.lens,0,288,D,0,T.work,{bits:9}),B=0;B<32;)T.lens[B++]=5;u(f,T.lens,0,32,R,0,T.work,{bits:5}),_=!1}T.lencode=D,T.lenbits=9,T.distcode=R,T.distbits=5}function I(T,B,A,X){var G,W=T.state;return W.window===null&&(W.wsize=1<<W.wbits,W.wnext=0,W.whave=0,W.window=new s.Buf8(W.wsize)),X>=W.wsize?(s.arraySet(W.window,B,A-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(X<(G=W.wsize-W.wnext)&&(G=X),s.arraySet(W.window,B,A-X,G,W.wnext),(X-=G)?(s.arraySet(W.window,B,A-X,X,0),W.wnext=X,W.whave=W.wsize):(W.wnext+=G,W.wnext===W.wsize&&(W.wnext=0),W.whave<W.wsize&&(W.whave+=G))),0}i.inflateReset=x,i.inflateReset2=P,i.inflateResetKeep=S,i.inflateInit=function(T){return E(T,15)},i.inflateInit2=E,i.inflate=function(T,B){var A,X,G,W,te,J,U,z,Y,L,se,ee,ue,Z,V,H,he,ve,Ae,Re,F,me,Oe,ie,re=0,pe=new s.Buf8(4),Me=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!T||!T.state||!T.output||!T.input&&T.avail_in!==0)return p;(A=T.state).mode===12&&(A.mode=13),te=T.next_out,G=T.output,U=T.avail_out,W=T.next_in,X=T.input,J=T.avail_in,z=A.hold,Y=A.bits,L=J,se=U,me=d;e:for(;;)switch(A.mode){case g:if(A.wrap===0){A.mode=13;break}for(;Y<16;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}if(2&A.wrap&&z===35615){pe[A.check=0]=255&z,pe[1]=z>>>8&255,A.check=a(A.check,pe,2,0),Y=z=0,A.mode=2;break}if(A.flags=0,A.head&&(A.head.done=!1),!(1&A.wrap)||(((255&z)<<8)+(z>>8))%31){T.msg="incorrect header check",A.mode=30;break}if((15&z)!=8){T.msg="unknown compression method",A.mode=30;break}if(Y-=4,F=8+(15&(z>>>=4)),A.wbits===0)A.wbits=F;else if(F>A.wbits){T.msg="invalid window size",A.mode=30;break}A.dmax=1<<F,T.adler=A.check=1,A.mode=512&z?10:12,Y=z=0;break;case 2:for(;Y<16;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}if(A.flags=z,(255&A.flags)!=8){T.msg="unknown compression method",A.mode=30;break}if(57344&A.flags){T.msg="unknown header flags set",A.mode=30;break}A.head&&(A.head.text=z>>8&1),512&A.flags&&(pe[0]=255&z,pe[1]=z>>>8&255,A.check=a(A.check,pe,2,0)),Y=z=0,A.mode=3;case 3:for(;Y<32;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}A.head&&(A.head.time=z),512&A.flags&&(pe[0]=255&z,pe[1]=z>>>8&255,pe[2]=z>>>16&255,pe[3]=z>>>24&255,A.check=a(A.check,pe,4,0)),Y=z=0,A.mode=4;case 4:for(;Y<16;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}A.head&&(A.head.xflags=255&z,A.head.os=z>>8),512&A.flags&&(pe[0]=255&z,pe[1]=z>>>8&255,A.check=a(A.check,pe,2,0)),Y=z=0,A.mode=5;case 5:if(1024&A.flags){for(;Y<16;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}A.length=z,A.head&&(A.head.extra_len=z),512&A.flags&&(pe[0]=255&z,pe[1]=z>>>8&255,A.check=a(A.check,pe,2,0)),Y=z=0}else A.head&&(A.head.extra=null);A.mode=6;case 6:if(1024&A.flags&&(J<(ee=A.length)&&(ee=J),ee&&(A.head&&(F=A.head.extra_len-A.length,A.head.extra||(A.head.extra=new Array(A.head.extra_len)),s.arraySet(A.head.extra,X,W,ee,F)),512&A.flags&&(A.check=a(A.check,X,ee,W)),J-=ee,W+=ee,A.length-=ee),A.length))break e;A.length=0,A.mode=7;case 7:if(2048&A.flags){if(J===0)break e;for(ee=0;F=X[W+ee++],A.head&&F&&A.length<65536&&(A.head.name+=String.fromCharCode(F)),F&&ee<J;);if(512&A.flags&&(A.check=a(A.check,X,ee,W)),J-=ee,W+=ee,F)break e}else A.head&&(A.head.name=null);A.length=0,A.mode=8;case 8:if(4096&A.flags){if(J===0)break e;for(ee=0;F=X[W+ee++],A.head&&F&&A.length<65536&&(A.head.comment+=String.fromCharCode(F)),F&&ee<J;);if(512&A.flags&&(A.check=a(A.check,X,ee,W)),J-=ee,W+=ee,F)break e}else A.head&&(A.head.comment=null);A.mode=9;case 9:if(512&A.flags){for(;Y<16;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}if(z!==(65535&A.check)){T.msg="header crc mismatch",A.mode=30;break}Y=z=0}A.head&&(A.head.hcrc=A.flags>>9&1,A.head.done=!0),T.adler=A.check=0,A.mode=12;break;case 10:for(;Y<32;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}T.adler=A.check=b(z),Y=z=0,A.mode=11;case 11:if(A.havedict===0)return T.next_out=te,T.avail_out=U,T.next_in=W,T.avail_in=J,A.hold=z,A.bits=Y,2;T.adler=A.check=1,A.mode=12;case 12:if(B===5||B===6)break e;case 13:if(A.last){z>>>=7&Y,Y-=7&Y,A.mode=27;break}for(;Y<3;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}switch(A.last=1&z,Y-=1,3&(z>>>=1)){case 0:A.mode=14;break;case 1:if(C(A),A.mode=20,B!==6)break;z>>>=2,Y-=2;break e;case 2:A.mode=17;break;case 3:T.msg="invalid block type",A.mode=30}z>>>=2,Y-=2;break;case 14:for(z>>>=7&Y,Y-=7&Y;Y<32;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}if((65535&z)!=(z>>>16^65535)){T.msg="invalid stored block lengths",A.mode=30;break}if(A.length=65535&z,Y=z=0,A.mode=15,B===6)break e;case 15:A.mode=16;case 16:if(ee=A.length){if(J<ee&&(ee=J),U<ee&&(ee=U),ee===0)break e;s.arraySet(G,X,W,ee,te),J-=ee,W+=ee,U-=ee,te+=ee,A.length-=ee;break}A.mode=12;break;case 17:for(;Y<14;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}if(A.nlen=257+(31&z),z>>>=5,Y-=5,A.ndist=1+(31&z),z>>>=5,Y-=5,A.ncode=4+(15&z),z>>>=4,Y-=4,286<A.nlen||30<A.ndist){T.msg="too many length or distance symbols",A.mode=30;break}A.have=0,A.mode=18;case 18:for(;A.have<A.ncode;){for(;Y<3;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}A.lens[Me[A.have++]]=7&z,z>>>=3,Y-=3}for(;A.have<19;)A.lens[Me[A.have++]]=0;if(A.lencode=A.lendyn,A.lenbits=7,Oe={bits:A.lenbits},me=u(0,A.lens,0,19,A.lencode,0,A.work,Oe),A.lenbits=Oe.bits,me){T.msg="invalid code lengths set",A.mode=30;break}A.have=0,A.mode=19;case 19:for(;A.have<A.nlen+A.ndist;){for(;H=(re=A.lencode[z&(1<<A.lenbits)-1])>>>16&255,he=65535&re,!((V=re>>>24)<=Y);){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}if(he<16)z>>>=V,Y-=V,A.lens[A.have++]=he;else{if(he===16){for(ie=V+2;Y<ie;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}if(z>>>=V,Y-=V,A.have===0){T.msg="invalid bit length repeat",A.mode=30;break}F=A.lens[A.have-1],ee=3+(3&z),z>>>=2,Y-=2}else if(he===17){for(ie=V+3;Y<ie;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}Y-=V,F=0,ee=3+(7&(z>>>=V)),z>>>=3,Y-=3}else{for(ie=V+7;Y<ie;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}Y-=V,F=0,ee=11+(127&(z>>>=V)),z>>>=7,Y-=7}if(A.have+ee>A.nlen+A.ndist){T.msg="invalid bit length repeat",A.mode=30;break}for(;ee--;)A.lens[A.have++]=F}}if(A.mode===30)break;if(A.lens[256]===0){T.msg="invalid code -- missing end-of-block",A.mode=30;break}if(A.lenbits=9,Oe={bits:A.lenbits},me=u(c,A.lens,0,A.nlen,A.lencode,0,A.work,Oe),A.lenbits=Oe.bits,me){T.msg="invalid literal/lengths set",A.mode=30;break}if(A.distbits=6,A.distcode=A.distdyn,Oe={bits:A.distbits},me=u(f,A.lens,A.nlen,A.ndist,A.distcode,0,A.work,Oe),A.distbits=Oe.bits,me){T.msg="invalid distances set",A.mode=30;break}if(A.mode=20,B===6)break e;case 20:A.mode=21;case 21:if(6<=J&&258<=U){T.next_out=te,T.avail_out=U,T.next_in=W,T.avail_in=J,A.hold=z,A.bits=Y,l(T,se),te=T.next_out,G=T.output,U=T.avail_out,W=T.next_in,X=T.input,J=T.avail_in,z=A.hold,Y=A.bits,A.mode===12&&(A.back=-1);break}for(A.back=0;H=(re=A.lencode[z&(1<<A.lenbits)-1])>>>16&255,he=65535&re,!((V=re>>>24)<=Y);){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}if(H&&(240&H)==0){for(ve=V,Ae=H,Re=he;H=(re=A.lencode[Re+((z&(1<<ve+Ae)-1)>>ve)])>>>16&255,he=65535&re,!(ve+(V=re>>>24)<=Y);){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}z>>>=ve,Y-=ve,A.back+=ve}if(z>>>=V,Y-=V,A.back+=V,A.length=he,H===0){A.mode=26;break}if(32&H){A.back=-1,A.mode=12;break}if(64&H){T.msg="invalid literal/length code",A.mode=30;break}A.extra=15&H,A.mode=22;case 22:if(A.extra){for(ie=A.extra;Y<ie;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}A.length+=z&(1<<A.extra)-1,z>>>=A.extra,Y-=A.extra,A.back+=A.extra}A.was=A.length,A.mode=23;case 23:for(;H=(re=A.distcode[z&(1<<A.distbits)-1])>>>16&255,he=65535&re,!((V=re>>>24)<=Y);){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}if((240&H)==0){for(ve=V,Ae=H,Re=he;H=(re=A.distcode[Re+((z&(1<<ve+Ae)-1)>>ve)])>>>16&255,he=65535&re,!(ve+(V=re>>>24)<=Y);){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}z>>>=ve,Y-=ve,A.back+=ve}if(z>>>=V,Y-=V,A.back+=V,64&H){T.msg="invalid distance code",A.mode=30;break}A.offset=he,A.extra=15&H,A.mode=24;case 24:if(A.extra){for(ie=A.extra;Y<ie;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}A.offset+=z&(1<<A.extra)-1,z>>>=A.extra,Y-=A.extra,A.back+=A.extra}if(A.offset>A.dmax){T.msg="invalid distance too far back",A.mode=30;break}A.mode=25;case 25:if(U===0)break e;if(ee=se-U,A.offset>ee){if((ee=A.offset-ee)>A.whave&&A.sane){T.msg="invalid distance too far back",A.mode=30;break}ue=ee>A.wnext?(ee-=A.wnext,A.wsize-ee):A.wnext-ee,ee>A.length&&(ee=A.length),Z=A.window}else Z=G,ue=te-A.offset,ee=A.length;for(U<ee&&(ee=U),U-=ee,A.length-=ee;G[te++]=Z[ue++],--ee;);A.length===0&&(A.mode=21);break;case 26:if(U===0)break e;G[te++]=A.length,U--,A.mode=21;break;case 27:if(A.wrap){for(;Y<32;){if(J===0)break e;J--,z|=X[W++]<<Y,Y+=8}if(se-=U,T.total_out+=se,A.total+=se,se&&(T.adler=A.check=A.flags?a(A.check,G,se,te-se):o(A.check,G,se,te-se)),se=U,(A.flags?z:b(z))!==A.check){T.msg="incorrect data check",A.mode=30;break}Y=z=0}A.mode=28;case 28:if(A.wrap&&A.flags){for(;Y<32;){if(J===0)break e;J--,z+=X[W++]<<Y,Y+=8}if(z!==(4294967295&A.total)){T.msg="incorrect length check",A.mode=30;break}Y=z=0}A.mode=29;case 29:me=1;break e;case 30:me=-3;break e;case 31:return-4;default:return p}return T.next_out=te,T.avail_out=U,T.next_in=W,T.avail_in=J,A.hold=z,A.bits=Y,(A.wsize||se!==T.avail_out&&A.mode<30&&(A.mode<27||B!==4))&&I(T,T.output,T.next_out,se-T.avail_out)?(A.mode=31,-4):(L-=T.avail_in,se-=T.avail_out,T.total_in+=L,T.total_out+=se,A.total+=se,A.wrap&&se&&(T.adler=A.check=A.flags?a(A.check,G,se,T.next_out-se):o(A.check,G,se,T.next_out-se)),T.data_type=A.bits+(A.last?64:0)+(A.mode===12?128:0)+(A.mode===20||A.mode===15?256:0),(L==0&&se===0||B===4)&&me===d&&(me=-5),me)},i.inflateEnd=function(T){if(!T||!T.state)return p;var B=T.state;return B.window&&(B.window=null),T.state=null,d},i.inflateGetHeader=function(T,B){var A;return T&&T.state?(2&(A=T.state).wrap)==0?p:((A.head=B).done=!1,d):p},i.inflateSetDictionary=function(T,B){var A,X=B.length;return T&&T.state?(A=T.state).wrap!==0&&A.mode!==11?p:A.mode===11&&o(1,B,X,0)!==A.check?-3:I(T,B,X,X)?(A.mode=31,-4):(A.havedict=1,d):p},i.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(n,r,i){var s=n("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],u=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(c,f,d,p,g,O,y,b){var v,S,x,P,E,D,R,_,C,I=b.bits,T=0,B=0,A=0,X=0,G=0,W=0,te=0,J=0,U=0,z=0,Y=null,L=0,se=new s.Buf16(16),ee=new s.Buf16(16),ue=null,Z=0;for(T=0;T<=15;T++)se[T]=0;for(B=0;B<p;B++)se[f[d+B]]++;for(G=I,X=15;1<=X&&se[X]===0;X--);if(X<G&&(G=X),X===0)return g[O++]=20971520,g[O++]=20971520,b.bits=1,0;for(A=1;A<X&&se[A]===0;A++);for(G<A&&(G=A),T=J=1;T<=15;T++)if(J<<=1,(J-=se[T])<0)return-1;if(0<J&&(c===0||X!==1))return-1;for(ee[1]=0,T=1;T<15;T++)ee[T+1]=ee[T]+se[T];for(B=0;B<p;B++)f[d+B]!==0&&(y[ee[f[d+B]]++]=B);if(D=c===0?(Y=ue=y,19):c===1?(Y=o,L-=257,ue=a,Z-=257,256):(Y=l,ue=u,-1),T=A,E=O,te=B=z=0,x=-1,P=(U=1<<(W=G))-1,c===1&&852<U||c===2&&592<U)return 1;for(;;){for(R=T-te,C=y[B]<D?(_=0,y[B]):y[B]>D?(_=ue[Z+y[B]],Y[L+y[B]]):(_=96,0),v=1<<T-te,A=S=1<<W;g[E+(z>>te)+(S-=v)]=R<<24|_<<16|C|0,S!==0;);for(v=1<<T-1;z&v;)v>>=1;if(v!==0?(z&=v-1,z+=v):z=0,B++,--se[T]==0){if(T===X)break;T=f[d+y[B]]}if(G<T&&(z&P)!==x){for(te===0&&(te=G),E+=A,J=1<<(W=T-te);W+te<X&&!((J-=se[W+te])<=0);)W++,J<<=1;if(U+=1<<W,c===1&&852<U||c===2&&592<U)return 1;g[x=z&P]=G<<24|W<<16|E-O|0}}return z!==0&&(g[E+z]=T-te<<24|64<<16|0),b.bits=G,0}},{"../utils/common":41}],51:[function(n,r,i){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(n,r,i){var s=n("../utils/common"),o=0,a=1;function l(re){for(var pe=re.length;0<=--pe;)re[pe]=0}var u=0,c=29,f=256,d=f+1+c,p=30,g=19,O=2*d+1,y=15,b=16,v=7,S=256,x=16,P=17,E=18,D=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],R=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],C=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],I=new Array(2*(d+2));l(I);var T=new Array(2*p);l(T);var B=new Array(512);l(B);var A=new Array(256);l(A);var X=new Array(c);l(X);var G,W,te,J=new Array(p);function U(re,pe,Me,je,_e){this.static_tree=re,this.extra_bits=pe,this.extra_base=Me,this.elems=je,this.max_length=_e,this.has_stree=re&&re.length}function z(re,pe){this.dyn_tree=re,this.max_code=0,this.stat_desc=pe}function Y(re){return re<256?B[re]:B[256+(re>>>7)]}function L(re,pe){re.pending_buf[re.pending++]=255&pe,re.pending_buf[re.pending++]=pe>>>8&255}function se(re,pe,Me){re.bi_valid>b-Me?(re.bi_buf|=pe<<re.bi_valid&65535,L(re,re.bi_buf),re.bi_buf=pe>>b-re.bi_valid,re.bi_valid+=Me-b):(re.bi_buf|=pe<<re.bi_valid&65535,re.bi_valid+=Me)}function ee(re,pe,Me){se(re,Me[2*pe],Me[2*pe+1])}function ue(re,pe){for(var Me=0;Me|=1&re,re>>>=1,Me<<=1,0<--pe;);return Me>>>1}function Z(re,pe,Me){var je,_e,q=new Array(y+1),ye=0;for(je=1;je<=y;je++)q[je]=ye=ye+Me[je-1]<<1;for(_e=0;_e<=pe;_e++){var xe=re[2*_e+1];xe!==0&&(re[2*_e]=ue(q[xe]++,xe))}}function V(re){var pe;for(pe=0;pe<d;pe++)re.dyn_ltree[2*pe]=0;for(pe=0;pe<p;pe++)re.dyn_dtree[2*pe]=0;for(pe=0;pe<g;pe++)re.bl_tree[2*pe]=0;re.dyn_ltree[2*S]=1,re.opt_len=re.static_len=0,re.last_lit=re.matches=0}function H(re){8<re.bi_valid?L(re,re.bi_buf):0<re.bi_valid&&(re.pending_buf[re.pending++]=re.bi_buf),re.bi_buf=0,re.bi_valid=0}function he(re,pe,Me,je){var _e=2*pe,q=2*Me;return re[_e]<re[q]||re[_e]===re[q]&&je[pe]<=je[Me]}function ve(re,pe,Me){for(var je=re.heap[Me],_e=Me<<1;_e<=re.heap_len&&(_e<re.heap_len&&he(pe,re.heap[_e+1],re.heap[_e],re.depth)&&_e++,!he(pe,je,re.heap[_e],re.depth));)re.heap[Me]=re.heap[_e],Me=_e,_e<<=1;re.heap[Me]=je}function Ae(re,pe,Me){var je,_e,q,ye,xe=0;if(re.last_lit!==0)for(;je=re.pending_buf[re.d_buf+2*xe]<<8|re.pending_buf[re.d_buf+2*xe+1],_e=re.pending_buf[re.l_buf+xe],xe++,je===0?ee(re,_e,pe):(ee(re,(q=A[_e])+f+1,pe),(ye=D[q])!==0&&se(re,_e-=X[q],ye),ee(re,q=Y(--je),Me),(ye=R[q])!==0&&se(re,je-=J[q],ye)),xe<re.last_lit;);ee(re,S,pe)}function Re(re,pe){var Me,je,_e,q=pe.dyn_tree,ye=pe.stat_desc.static_tree,xe=pe.stat_desc.has_stree,ce=pe.stat_desc.elems,Se=-1;for(re.heap_len=0,re.heap_max=O,Me=0;Me<ce;Me++)q[2*Me]!==0?(re.heap[++re.heap_len]=Se=Me,re.depth[Me]=0):q[2*Me+1]=0;for(;re.heap_len<2;)q[2*(_e=re.heap[++re.heap_len]=Se<2?++Se:0)]=1,re.depth[_e]=0,re.opt_len--,xe&&(re.static_len-=ye[2*_e+1]);for(pe.max_code=Se,Me=re.heap_len>>1;1<=Me;Me--)ve(re,q,Me);for(_e=ce;Me=re.heap[1],re.heap[1]=re.heap[re.heap_len--],ve(re,q,1),je=re.heap[1],re.heap[--re.heap_max]=Me,re.heap[--re.heap_max]=je,q[2*_e]=q[2*Me]+q[2*je],re.depth[_e]=(re.depth[Me]>=re.depth[je]?re.depth[Me]:re.depth[je])+1,q[2*Me+1]=q[2*je+1]=_e,re.heap[1]=_e++,ve(re,q,1),2<=re.heap_len;);re.heap[--re.heap_max]=re.heap[1],(function(Ee,Ue){var Ge,Ne,Ve,qe,Ke,it,at=Ue.dyn_tree,kt=Ue.max_code,We=Ue.stat_desc.static_tree,St=Ue.stat_desc.has_stree,Wt=Ue.stat_desc.extra_bits,jt=Ue.stat_desc.extra_base,At=Ue.stat_desc.max_length,Jt=0;for(qe=0;qe<=y;qe++)Ee.bl_count[qe]=0;for(at[2*Ee.heap[Ee.heap_max]+1]=0,Ge=Ee.heap_max+1;Ge<O;Ge++)At<(qe=at[2*at[2*(Ne=Ee.heap[Ge])+1]+1]+1)&&(qe=At,Jt++),at[2*Ne+1]=qe,kt<Ne||(Ee.bl_count[qe]++,Ke=0,jt<=Ne&&(Ke=Wt[Ne-jt]),it=at[2*Ne],Ee.opt_len+=it*(qe+Ke),St&&(Ee.static_len+=it*(We[2*Ne+1]+Ke)));if(Jt!==0){do{for(qe=At-1;Ee.bl_count[qe]===0;)qe--;Ee.bl_count[qe]--,Ee.bl_count[qe+1]+=2,Ee.bl_count[At]--,Jt-=2}while(0<Jt);for(qe=At;qe!==0;qe--)for(Ne=Ee.bl_count[qe];Ne!==0;)kt<(Ve=Ee.heap[--Ge])||(at[2*Ve+1]!==qe&&(Ee.opt_len+=(qe-at[2*Ve+1])*at[2*Ve],at[2*Ve+1]=qe),Ne--)}})(re,pe),Z(q,Se,re.bl_count)}function F(re,pe,Me){var je,_e,q=-1,ye=pe[1],xe=0,ce=7,Se=4;for(ye===0&&(ce=138,Se=3),pe[2*(Me+1)+1]=65535,je=0;je<=Me;je++)_e=ye,ye=pe[2*(je+1)+1],++xe<ce&&_e===ye||(xe<Se?re.bl_tree[2*_e]+=xe:_e!==0?(_e!==q&&re.bl_tree[2*_e]++,re.bl_tree[2*x]++):xe<=10?re.bl_tree[2*P]++:re.bl_tree[2*E]++,q=_e,Se=(xe=0)===ye?(ce=138,3):_e===ye?(ce=6,3):(ce=7,4))}function me(re,pe,Me){var je,_e,q=-1,ye=pe[1],xe=0,ce=7,Se=4;for(ye===0&&(ce=138,Se=3),je=0;je<=Me;je++)if(_e=ye,ye=pe[2*(je+1)+1],!(++xe<ce&&_e===ye)){if(xe<Se)for(;ee(re,_e,re.bl_tree),--xe!=0;);else _e!==0?(_e!==q&&(ee(re,_e,re.bl_tree),xe--),ee(re,x,re.bl_tree),se(re,xe-3,2)):xe<=10?(ee(re,P,re.bl_tree),se(re,xe-3,3)):(ee(re,E,re.bl_tree),se(re,xe-11,7));q=_e,Se=(xe=0)===ye?(ce=138,3):_e===ye?(ce=6,3):(ce=7,4)}}l(J);var Oe=!1;function ie(re,pe,Me,je){se(re,(u<<1)+(je?1:0),3),(function(_e,q,ye,xe){H(_e),L(_e,ye),L(_e,~ye),s.arraySet(_e.pending_buf,_e.window,q,ye,_e.pending),_e.pending+=ye})(re,pe,Me)}i._tr_init=function(re){Oe||((function(){var pe,Me,je,_e,q,ye=new Array(y+1);for(_e=je=0;_e<c-1;_e++)for(X[_e]=je,pe=0;pe<1<<D[_e];pe++)A[je++]=_e;for(A[je-1]=_e,_e=q=0;_e<16;_e++)for(J[_e]=q,pe=0;pe<1<<R[_e];pe++)B[q++]=_e;for(q>>=7;_e<p;_e++)for(J[_e]=q<<7,pe=0;pe<1<<R[_e]-7;pe++)B[256+q++]=_e;for(Me=0;Me<=y;Me++)ye[Me]=0;for(pe=0;pe<=143;)I[2*pe+1]=8,pe++,ye[8]++;for(;pe<=255;)I[2*pe+1]=9,pe++,ye[9]++;for(;pe<=279;)I[2*pe+1]=7,pe++,ye[7]++;for(;pe<=287;)I[2*pe+1]=8,pe++,ye[8]++;for(Z(I,d+1,ye),pe=0;pe<p;pe++)T[2*pe+1]=5,T[2*pe]=ue(pe,5);G=new U(I,D,f+1,d,y),W=new U(T,R,0,p,y),te=new U(new Array(0),_,0,g,v)})(),Oe=!0),re.l_desc=new z(re.dyn_ltree,G),re.d_desc=new z(re.dyn_dtree,W),re.bl_desc=new z(re.bl_tree,te),re.bi_buf=0,re.bi_valid=0,V(re)},i._tr_stored_block=ie,i._tr_flush_block=function(re,pe,Me,je){var _e,q,ye=0;0<re.level?(re.strm.data_type===2&&(re.strm.data_type=(function(xe){var ce,Se=4093624447;for(ce=0;ce<=31;ce++,Se>>>=1)if(1&Se&&xe.dyn_ltree[2*ce]!==0)return o;if(xe.dyn_ltree[18]!==0||xe.dyn_ltree[20]!==0||xe.dyn_ltree[26]!==0)return a;for(ce=32;ce<f;ce++)if(xe.dyn_ltree[2*ce]!==0)return a;return o})(re)),Re(re,re.l_desc),Re(re,re.d_desc),ye=(function(xe){var ce;for(F(xe,xe.dyn_ltree,xe.l_desc.max_code),F(xe,xe.dyn_dtree,xe.d_desc.max_code),Re(xe,xe.bl_desc),ce=g-1;3<=ce&&xe.bl_tree[2*C[ce]+1]===0;ce--);return xe.opt_len+=3*(ce+1)+5+5+4,ce})(re),_e=re.opt_len+3+7>>>3,(q=re.static_len+3+7>>>3)<=_e&&(_e=q)):_e=q=Me+5,Me+4<=_e&&pe!==-1?ie(re,pe,Me,je):re.strategy===4||q===_e?(se(re,2+(je?1:0),3),Ae(re,I,T)):(se(re,4+(je?1:0),3),(function(xe,ce,Se,Ee){var Ue;for(se(xe,ce-257,5),se(xe,Se-1,5),se(xe,Ee-4,4),Ue=0;Ue<Ee;Ue++)se(xe,xe.bl_tree[2*C[Ue]+1],3);me(xe,xe.dyn_ltree,ce-1),me(xe,xe.dyn_dtree,Se-1)})(re,re.l_desc.max_code+1,re.d_desc.max_code+1,ye+1),Ae(re,re.dyn_ltree,re.dyn_dtree)),V(re),je&&H(re)},i._tr_tally=function(re,pe,Me){return re.pending_buf[re.d_buf+2*re.last_lit]=pe>>>8&255,re.pending_buf[re.d_buf+2*re.last_lit+1]=255&pe,re.pending_buf[re.l_buf+re.last_lit]=255&Me,re.last_lit++,pe===0?re.dyn_ltree[2*Me]++:(re.matches++,pe--,re.dyn_ltree[2*(A[Me]+f+1)]++,re.dyn_dtree[2*Y(pe)]++),re.last_lit===re.lit_bufsize-1},i._tr_align=function(re){se(re,2,3),ee(re,S,I),(function(pe){pe.bi_valid===16?(L(pe,pe.bi_buf),pe.bi_buf=0,pe.bi_valid=0):8<=pe.bi_valid&&(pe.pending_buf[pe.pending++]=255&pe.bi_buf,pe.bi_buf>>=8,pe.bi_valid-=8)})(re)}},{"../utils/common":41}],53:[function(n,r,i){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(n,r,i){(function(s){(function(o,a){if(!o.setImmediate){var l,u,c,f,d=1,p={},g=!1,O=o.document,y=Object.getPrototypeOf&&Object.getPrototypeOf(o);y=y&&y.setTimeout?y:o,l={}.toString.call(o.process)==="[object process]"?function(x){process.nextTick(function(){v(x)})}:(function(){if(o.postMessage&&!o.importScripts){var x=!0,P=o.onmessage;return o.onmessage=function(){x=!1},o.postMessage("","*"),o.onmessage=P,x}})()?(f="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",S,!1):o.attachEvent("onmessage",S),function(x){o.postMessage(f+x,"*")}):o.MessageChannel?((c=new MessageChannel).port1.onmessage=function(x){v(x.data)},function(x){c.port2.postMessage(x)}):O&&"onreadystatechange"in O.createElement("script")?(u=O.documentElement,function(x){var P=O.createElement("script");P.onreadystatechange=function(){v(x),P.onreadystatechange=null,u.removeChild(P),P=null},u.appendChild(P)}):function(x){setTimeout(v,0,x)},y.setImmediate=function(x){typeof x!="function"&&(x=new Function(""+x));for(var P=new Array(arguments.length-1),E=0;E<P.length;E++)P[E]=arguments[E+1];var D={callback:x,args:P};return p[d]=D,l(d),d++},y.clearImmediate=b}function b(x){delete p[x]}function v(x){if(g)setTimeout(v,0,x);else{var P=p[x];if(P){g=!0;try{(function(E){var D=E.callback,R=E.args;switch(R.length){case 0:D();break;case 1:D(R[0]);break;case 2:D(R[0],R[1]);break;case 3:D(R[0],R[1],R[2]);break;default:D.apply(a,R)}})(P)}finally{b(x),g=!1}}}}function S(x){x.source===o&&typeof x.data=="string"&&x.data.indexOf(f)===0&&v(+x.data.slice(f.length))}})(typeof self>"u"?s===void 0?this:s:self)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(db)),db.exports}var the=ehe();const nhe=du(the),rhe=(t,e,n,r,i)=>({handleCopyForAI:async()=>{if(!t||Object.keys(t).length===0){n("No files to copy"),setTimeout(()=>n("Copy for AI"),2e3);return}try{const{files:l,imageFiles:u}=b5.prepareFilesForPrompt(t);let f=Ufe(l);u.length>0&&(f+=`
352
352
 
353
353
  <!-- Image files (not included): `+u.join(", ")+" -->"),await navigator.clipboard.writeText(f),n("Copied!"),setTimeout(()=>n("Copy for AI"),2e3)}catch(l){console.error("Failed to copy files for AI:",l),n("Error"),setTimeout(()=>n("Copy for AI"),2e3)}},handlePasteForAI:async()=>{if(e)try{const u=(await navigator.clipboard.readText()).replace(/\r\n?/g,`
354
- `);if(!u.trim()){r("Empty clipboard"),setTimeout(()=>r("Paste for AI"),2e3);return}const c=qfe(u,"bold");if(c.files&&Object.keys(c.files).length>0){const f=b5.mergeFileChanges(t||{},c.files);e(d=>({...d,files:f,runId:u4()})),r("Pasted!"),setTimeout(()=>r("Paste for AI"),2e3)}else r("No files found"),setTimeout(()=>r("Paste for AI"),2e3)}catch(l){console.error("Failed to paste files from AI:",l),r("Error"),setTimeout(()=>r("Paste for AI"),2e3)}},handleExportToZip:async()=>{if(!t||Object.keys(t).length===0){i("No files to export"),setTimeout(()=>i("Export to ZIP"),2e3);return}try{const l=new nhe;Object.entries(t).forEach(([d,p])=>{const g=p.name||d,O=p.text||"";l.file(g,O)});const u=await l.generateAsync({type:"blob"}),c=URL.createObjectURL(u),f=document.createElement("a");f.href=c,f.download="viz-files.zip",f.click(),URL.revokeObjectURL(c),i("Exported!"),setTimeout(()=>i("Export to ZIP"),2e3)}catch(l){console.error("Failed to export files to ZIP:",l),i("Error"),setTimeout(()=>i("Export to ZIP"),2e3)}}});function ihe(t,e){e.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:{source:"vzcode-sidebar"}}))}function she({aiChatButtonEvent:t,target:e,openAIChat:n}){if(t){ihe(t,e);return}n()}const ohe=({children:t})=>j.jsx("div",{className:"empty-state",children:t});function qd(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Hg(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function bu(){}var dd=.7,Jm=1/dd,Cc="\\s*([+-]?\\d+)\\s*",pd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Co="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ahe=/^#([0-9a-f]{3,8})$/,lhe=new RegExp(`^rgb\\(${Cc},${Cc},${Cc}\\)$`),uhe=new RegExp(`^rgb\\(${Co},${Co},${Co}\\)$`),che=new RegExp(`^rgba\\(${Cc},${Cc},${Cc},${pd}\\)$`),fhe=new RegExp(`^rgba\\(${Co},${Co},${Co},${pd}\\)$`),hhe=new RegExp(`^hsl\\(${pd},${Co},${Co}\\)$`),dhe=new RegExp(`^hsla\\(${pd},${Co},${Co},${pd}\\)$`),S5={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};qd(bu,zd,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:x5,formatHex:x5,formatHex8:phe,formatHsl:mhe,formatRgb:k5,toString:k5});function x5(){return this.rgb().formatHex()}function phe(){return this.rgb().formatHex8()}function mhe(){return YL(this).formatHsl()}function k5(){return this.rgb().formatRgb()}function zd(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ahe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?P5(e):n===3?new ci(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?A1(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?A1(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=lhe.exec(t))?new ci(e[1],e[2],e[3],1):(e=uhe.exec(t))?new ci(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=che.exec(t))?A1(e[1],e[2],e[3],e[4]):(e=fhe.exec(t))?A1(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=hhe.exec(t))?C5(e[1],e[2]/100,e[3]/100,1):(e=dhe.exec(t))?C5(e[1],e[2]/100,e[3]/100,e[4]):S5.hasOwnProperty(t)?P5(S5[t]):t==="transparent"?new ci(NaN,NaN,NaN,0):null}function P5(t){return new ci(t>>16&255,t>>8&255,t&255,1)}function A1(t,e,n,r){return r<=0&&(t=e=n=NaN),new ci(t,e,n,r)}function HL(t){return t instanceof bu||(t=zd(t)),t?(t=t.rgb(),new ci(t.r,t.g,t.b,t.opacity)):new ci}function ghe(t,e,n,r){return arguments.length===1?HL(t):new ci(t,e,n,r??1)}function ci(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}qd(ci,ghe,Hg(bu,{brighter(t){return t=t==null?Jm:Math.pow(Jm,t),new ci(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?dd:Math.pow(dd,t),new ci(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ci(ou(this.r),ou(this.g),ou(this.b),eg(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_5,formatHex:_5,formatHex8:Ohe,formatRgb:E5,toString:E5}));function _5(){return`#${nu(this.r)}${nu(this.g)}${nu(this.b)}`}function Ohe(){return`#${nu(this.r)}${nu(this.g)}${nu(this.b)}${nu((isNaN(this.opacity)?1:this.opacity)*255)}`}function E5(){const t=eg(this.opacity);return`${t===1?"rgb(":"rgba("}${ou(this.r)}, ${ou(this.g)}, ${ou(this.b)}${t===1?")":`, ${t})`}`}function eg(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ou(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function nu(t){return t=ou(t),(t<16?"0":"")+t.toString(16)}function C5(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Bs(t,e,n,r)}function YL(t){if(t instanceof Bs)return new Bs(t.h,t.s,t.l,t.opacity);if(t instanceof bu||(t=zd(t)),!t)return new Bs;if(t instanceof Bs)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=NaN,a=s-i,l=(s+i)/2;return a?(e===s?o=(n-r)/a+(n<r)*6:n===s?o=(r-e)/a+2:o=(e-n)/a+4,a/=l<.5?s+i:2-s-i,o*=60):a=l>0&&l<1?0:o,new Bs(o,a,l,t.opacity)}function yhe(t,e,n,r){return arguments.length===1?YL(t):new Bs(t,e,n,r??1)}function Bs(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}qd(Bs,yhe,Hg(bu,{brighter(t){return t=t==null?Jm:Math.pow(Jm,t),new Bs(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?dd:Math.pow(dd,t),new Bs(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ci(pb(t>=240?t-240:t+120,i,r),pb(t,i,r),pb(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Bs(R5(this.h),$1(this.s),$1(this.l),eg(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=eg(this.opacity);return`${t===1?"hsl(":"hsla("}${R5(this.h)}, ${$1(this.s)*100}%, ${$1(this.l)*100}%${t===1?")":`, ${t})`}`}}));function R5(t){return t=(t||0)%360,t<0?t+360:t}function $1(t){return Math.max(0,Math.min(1,t||0))}function pb(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const vhe=Math.PI/180,bhe=180/Math.PI,tg=18,GL=.96422,KL=1,JL=.82521,e6=4/29,Rc=6/29,t6=3*Rc*Rc,whe=Rc*Rc*Rc;function n6(t){if(t instanceof Ro)return new Ro(t.l,t.a,t.b,t.opacity);if(t instanceof Ko)return r6(t);t instanceof ci||(t=HL(t));var e=yb(t.r),n=yb(t.g),r=yb(t.b),i=mb((.2225045*e+.7168786*n+.0606169*r)/KL),s,o;return e===n&&n===r?s=o=i:(s=mb((.4360747*e+.3850649*n+.1430804*r)/GL),o=mb((.0139322*e+.0971045*n+.7141733*r)/JL)),new Ro(116*i-16,500*(s-i),200*(i-o),t.opacity)}function She(t,e,n,r){return arguments.length===1?n6(t):new Ro(t,e,n,r??1)}function Ro(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}qd(Ro,She,Hg(bu,{brighter(t){return new Ro(this.l+tg*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ro(this.l-tg*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=GL*gb(e),t=KL*gb(t),n=JL*gb(n),new ci(Ob(3.1338561*e-1.6168667*t-.4906146*n),Ob(-.9787684*e+1.9161415*t+.033454*n),Ob(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function mb(t){return t>whe?Math.pow(t,1/3):t/t6+e6}function gb(t){return t>Rc?t*t*t:t6*(t-e6)}function Ob(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function yb(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xhe(t){if(t instanceof Ko)return new Ko(t.h,t.c,t.l,t.opacity);if(t instanceof Ro||(t=n6(t)),t.a===0&&t.b===0)return new Ko(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*bhe;return new Ko(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Gc(t,e,n,r){return arguments.length===1?xhe(t):new Ko(t,e,n,r??1)}function Ko(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function r6(t){if(isNaN(t.h))return new Ro(t.l,0,0,t.opacity);var e=t.h*vhe;return new Ro(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}qd(Ko,Gc,Hg(bu,{brighter(t){return new Ko(this.h,this.c,this.l+tg*(t??1),this.opacity)},darker(t){return new Ko(this.h,this.c,this.l-tg*(t??1),this.opacity)},rgb(){return r6(this).rgb()}}));function vb(t){const e=zd(t),n=Gc(e||"black");return{h:Number.isFinite(n.h)?n.h:0,c:Number.isFinite(n.c)?n.c:0,l:Number.isFinite(n.l)?n.l:0}}function bb(t,e){return typeof t=="number"&&Number.isFinite(t)?t:e}function khe(t,e){const n=Gc(t.h,t.c,t.l);return n.displayable()?n.formatHex():e}const Phe="config.json",_he=(t,e,n)=>(t-e)/(n-e)*100,Ehe=(t,e,n)=>{const r=n-e,i=r<10?2:r<100?1:0;return Number(t).toFixed(i)},Che=(t,e,n)=>{try{return Gc(t,e,n).displayable()}catch{return!1}},wb=(t,e,n)=>{if(!t)return;const r=t.width,i=t.height,s=t.getContext("2d");if(!s)return;const o=s.createImageData(r,i);for(let a=0;a<r;a++){let l,u,c;if(e==="h")l=a*360/(r-1),u=Math.max(0,Math.min(n.c,100)),c=Math.max(0,Math.min(n.l,100));else if(e==="c"){const d=a*100/(r-1);l=Math.max(0,Math.min(n.h,360)),u=d,c=Math.max(0,Math.min(n.l,100))}else{const d=a*100/(r-1);l=Math.max(0,Math.min(n.h,360)),u=Math.max(0,Math.min(n.c,100)),c=d}let f;if(Che(l,u,c)){const p=Gc(l,u,c).rgb();f={r:p.r,g:p.g,b:p.b}}else f={r:128,g:128,b:128};for(let d=0;d<i;d++){const p=4*(d*r+a);o.data[p]=f.r,o.data[p+1]=f.g,o.data[p+2]=f.b,o.data[p+3]=255}}s.putImageData(o,0,0)},i6=t=>{if(typeof t!="string"||!t)return null;const e=t.split(".");return e.every(n=>n.length>0&&n!=="__proto__"&&n!=="constructor"&&n!=="prototype")?e:null},s2=(t,e)=>{const n=i6(e);if(!n)return{found:!1,value:void 0};let r=t;for(const i of n){if(r===null||typeof r!="object"||Array.isArray(r)||!Object.prototype.hasOwnProperty.call(r,i))return{found:!1,value:void 0};r=r[i]}return{found:!0,value:r}},ql=(t,e)=>{const{found:n,value:r}=s2(t,e);return n?r:void 0},Rhe=(t,e,n)=>{const r=i6(e);if(!r)throw new Error("Invalid or unsafe property path: "+e);const i={...t};let s=i;for(let a=0;a<r.length-1;a++){const l=r[a];s[l]==null||typeof s[l]!="object"||Array.isArray(s[l])?s[l]={}:s[l]={...s[l]},s=s[l]}const o=r[r.length-1];return s[o]=n,i},A5=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);function Ahe(t){if(t===null)return"missing-config";let e;try{e=JSON.parse(t)}catch{return"invalid-config"}if(!A5(e))return"invalid-config";if(!Object.prototype.hasOwnProperty.call(e,"visualEditorWidgets"))return"missing-widgets";const n=e.visualEditorWidgets;if(!Array.isArray(n))return"invalid-widgets";if(!n.length)return"empty-widgets";for(const r of n){if(!A5(r)||typeof r.property!="string"||!r.property||typeof r.label!="string"||!r.label.trim())return"invalid-widgets";const{found:i,value:s}=s2(e,r.property);if(!i)return"invalid-widgets";switch(r.type){case"slider":if(!Number.isFinite(s)||!Number.isFinite(r.min)||!Number.isFinite(r.max)||r.min>=r.max||r.step!==void 0&&(!Number.isFinite(r.step)||r.step<=0))return"invalid-widgets";break;case"checkbox":if(typeof s!="boolean")return"invalid-widgets";break;case"textInput":if(typeof s!="string")return"invalid-widgets";break;case"dropdown":if(typeof s!="string"||!Array.isArray(r.options)||r.options.length===0||!r.options.every(o=>typeof o=="string")||!r.options.includes(s))return"invalid-widgets";break;case"color":{if(typeof s!="string")return"invalid-widgets";const o=zd(s)?.rgb();if(!o||!Number.isFinite(o.r)||!Number.isFinite(o.g)||!Number.isFinite(o.b)||o.opacity!==1)return"invalid-widgets";break}default:return"invalid-widgets"}}return null}function $he(t,e,n,r){if(!e)return t;const i=t.files[e];if(!i)return t;let s;try{s=JSON.parse(i.text)}catch{return t}if(!s||typeof s!="object"||Array.isArray(s)||!s2(s,n).found)return t;let o;try{o=Rhe(s,n,r)}catch{return t}return{...t,files:{...t.files,[e]:{...i,text:JSON.stringify(o,null,2)}}}}const The=({property:t,label:e,min:n,max:r,step:i,currentValue:s,onChange:o})=>{const a=_he(s,n,r);return j.jsxs("div",{className:"visual-editor-slider",children:[j.jsxs("div",{className:"slider-header",children:[j.jsx("label",{htmlFor:t,className:"slider-label",children:e}),j.jsx("span",{className:"slider-value",children:Ehe(s,n,r)})]}),j.jsxs("div",{className:"slider-container",children:[j.jsx("input",{type:"range",id:t,className:"slider-input",min:n,max:r,step:i,value:s,onChange:o}),j.jsx("div",{className:"slider-track-fill",style:{width:`${a}%`}})]}),j.jsxs("div",{className:"slider-bounds",children:[j.jsx("span",{className:"min-value",children:n}),j.jsx("span",{className:"max-value",children:r})]})]})},Qhe=({property:t,label:e,currentValue:n,onChange:r})=>j.jsxs("div",{className:"visual-editor-checkbox",children:[j.jsxs("div",{className:"checkbox-header",children:[j.jsx("label",{htmlFor:t,className:"checkbox-label",children:e}),j.jsx("span",{className:"checkbox-value",children:n?"On":"Off"})]}),j.jsxs("div",{className:"checkbox-container",children:[j.jsx("input",{type:"checkbox",id:t,className:"checkbox-input",checked:n,onChange:r}),j.jsx("div",{className:"checkbox-visual",children:j.jsx("div",{className:`checkbox-indicator ${n?"checked":""}`})})]})]}),Mhe=({property:t,label:e,currentValue:n,onChange:r})=>j.jsxs("div",{className:"visual-editor-text-input",children:[j.jsx("div",{className:"text-input-header",children:j.jsx("label",{htmlFor:t,className:"text-input-label",children:e})}),j.jsx("div",{className:"text-input-container",children:j.jsx("input",{type:"text",id:t,className:"text-input-field",value:n||"",onChange:r})})]}),Ihe=({property:t,label:e,options:n,currentValue:r,isOpen:i,onToggle:s,onOptionClick:o})=>j.jsxs("div",{className:"visual-editor-dropdown",children:[j.jsx("div",{className:"dropdown-header",children:j.jsx("label",{htmlFor:t,className:"dropdown-label",children:e})}),j.jsxs("div",{className:"dropdown-container",children:[j.jsxs("button",{type:"button",className:`dropdown-button ${i?"open":""}`,onClick:s,"aria-expanded":i,"aria-haspopup":"listbox",children:[j.jsx("span",{className:"dropdown-button-text",children:r}),j.jsx("div",{className:`dropdown-arrow ${i?"open":""}`,children:j.jsx("svg",{width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:j.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),i&&j.jsx("div",{className:"dropdown-options",children:n.map(a=>j.jsx("button",{type:"button",className:`dropdown-option ${a===r?"selected":""}`,onClick:()=>o(a),children:a},a))})]})]}),Dhe=({property:t,label:e,currentHex:n,currentH:r,currentC:i,currentL:s,onColorChange:o})=>{const a=M.useRef({});return M.useEffect(()=>{const l={h:r,c:i,l:s};wb(a.current[`${t}_l_bg`],"l",l),wb(a.current[`${t}_c_bg`],"c",l),wb(a.current[`${t}_h_bg`],"h",l)},[t,r,i,s]),j.jsxs("div",{className:"visual-editor-color",children:[j.jsxs("div",{className:"color-header",children:[j.jsx("label",{className:"color-label",children:e}),j.jsx("span",{className:"color-value",children:n})]}),j.jsx("div",{className:"color-preview",style:{backgroundColor:n}}),j.jsxs("div",{className:"lch-sliders",children:[j.jsxs("div",{className:"lch-slider",children:[j.jsxs("div",{className:"slider-header",children:[j.jsx("label",{className:"slider-label",children:"Lightness"}),j.jsx("span",{className:"slider-value",children:Math.round(s)})]}),j.jsxs("div",{className:"slider-container",children:[j.jsx("canvas",{ref:l=>{a.current[`${t}_l_bg`]=l},className:"slider-bg-canvas",width:200}),j.jsx("input",{type:"range",className:"slider-input",min:0,max:100,step:1,value:s,onChange:o(t,"l")})]}),j.jsxs("div",{className:"slider-bounds",children:[j.jsx("span",{className:"min-value",children:"0"}),j.jsx("span",{className:"max-value",children:"100"})]})]}),j.jsxs("div",{className:"lch-slider",children:[j.jsxs("div",{className:"slider-header",children:[j.jsx("label",{className:"slider-label",children:"Chroma"}),j.jsx("span",{className:"slider-value",children:Math.round(i)})]}),j.jsxs("div",{className:"slider-container",children:[j.jsx("canvas",{ref:l=>{a.current[`${t}_c_bg`]=l},className:"slider-bg-canvas",width:200}),j.jsx("input",{type:"range",className:"slider-input",min:0,max:100,step:1,value:i,onChange:o(t,"c")})]}),j.jsxs("div",{className:"slider-bounds",children:[j.jsx("span",{className:"min-value",children:"0"}),j.jsx("span",{className:"max-value",children:"100"})]})]}),j.jsxs("div",{className:"lch-slider",children:[j.jsxs("div",{className:"slider-header",children:[j.jsx("label",{className:"slider-label",children:"Hue"}),j.jsxs("span",{className:"slider-value",children:[Math.round(r),"°"]})]}),j.jsxs("div",{className:"slider-container",children:[j.jsx("canvas",{ref:l=>{a.current[`${t}_h_bg`]=l},className:"slider-bg-canvas",width:200}),j.jsx("input",{type:"range",className:"slider-input",min:0,max:360,step:1,value:r,onChange:o(t,"h")})]}),j.jsxs("div",{className:"slider-bounds",children:[j.jsx("span",{className:"min-value",children:"0°"}),j.jsx("span",{className:"max-value",children:"360°"})]})]})]})]})},jhe=()=>{const{files:t,submitOperation:e,renderVisualEditorEmptyState:n}=M.useContext(pr),[r,i]=M.useState({}),[s,o]=M.useState(null);let a=null;if(t){for(const S in t)if(t[S].name===Phe){a=S;break}}const l=M.useMemo(()=>{if(!t||!a)return null;try{return JSON.parse(t[a].text)}catch(S){return console.error("Error parsing config.json:",S),null}},[a,t]),u=M.useCallback((S,x,P={})=>{i(E=>({...E,[S]:x,...P})),e(E=>$he(E,a,S,x))},[a,e]),c=M.useCallback(S=>x=>u(S,parseFloat(x.currentTarget.value)),[u]),f=M.useCallback(S=>x=>u(S,x.currentTarget.checked),[u]),d=M.useCallback(S=>x=>u(S,x.currentTarget.value),[u]),p=M.useCallback((S,x)=>u(S,x),[u]),g=M.useCallback(S=>{o(x=>x===S?null:S)},[]),O=M.useCallback((S,x)=>{p(S,x),o(null)},[p]);M.useEffect(()=>{const S=x=>{s&&(x.target.closest(".visual-editor-dropdown")||o(null))};return document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}},[s]);const y=M.useCallback((S,x)=>P=>{const E=parseFloat(P.currentTarget.value),D=ql(l,S)??"#000000",R=vb(D),_={h:r[`${S}_h`]??R.h,c:r[`${S}_c`]??R.c,l:r[`${S}_l`]??R.l};_[x]=E;const C=khe(_,D);u(S,C,{[`${S}_h`]:_.h,[`${S}_c`]:_.c,[`${S}_l`]:_.l})},[l,u,r]),b=M.useMemo(()=>Array.isArray(l?.visualEditorWidgets)?l.visualEditorWidgets:[],[l]);M.useEffect(()=>{const S={};b.forEach(x=>{const P=ql(l,x.property);if(P!==void 0&&(S[x.property]=P),x.type==="color"&&typeof P=="string"){const E=vb(P);S[`${x.property}_h`]=E.h,S[`${x.property}_c`]=E.c,S[`${x.property}_l`]=E.l}}),i(S)},[l,b]);const v=Ahe(a===null?null:t?.[a]?.text??null);if(v){const S=n?.(v);if(S!=null)return j.jsx(j.Fragment,{children:S});const x={"missing-config":"To begin using the visual editor, create a config.json.","invalid-config":"Your config.json file is not valid JSON.","missing-widgets":"Add a visualEditorWidgets array to config.json.","invalid-widgets":"Your visualEditorWidgets configuration is invalid.","empty-widgets":"Add at least one widget to visualEditorWidgets."};return j.jsx(ohe,{children:x[v]})}return j.jsx("div",{className:"visual-editor",children:b.map((S,x)=>{if(S.type==="slider"){const P=r[S.property]??ql(l,S.property)??S.min;return j.jsx(The,{property:S.property,label:S.label,min:S.min,max:S.max,step:S.step,currentValue:P,onChange:c(S.property)},S.property)}else if(S.type==="checkbox"){const P=r[S.property]??ql(l,S.property)??!1;return j.jsx(Qhe,{property:S.property,label:S.label,currentValue:P,onChange:f(S.property)},S.property)}else if(S.type==="textInput"){const P=r[S.property]??ql(l,S.property)??"";return j.jsx(Mhe,{property:S.property,label:S.label,currentValue:P,onChange:d(S.property)},S.property)}else if(S.type==="dropdown"){const P=r[S.property]??ql(l,S.property)??S.options?.[0]??"",E=s===S.property;return j.jsx(Ihe,{property:S.property,label:S.label,options:S.options,currentValue:P,isOpen:E,onToggle:()=>g(S.property),onOptionClick:D=>O(S.property,D)},S.property)}else if(S.type==="color"){const P=r[S.property]??ql(l,S.property)??"#000000",E=vb(P),D=bb(r[`${S.property}_h`],E.h),R=bb(r[`${S.property}_c`],E.c),_=bb(r[`${S.property}_l`],E.l);return j.jsx(Dhe,{property:S.property,label:S.label,currentHex:P,currentH:D,currentC:R,currentL:_,onColorChange:y},S.property)}})})},Nhe=({enableAIChat:t=KG,aiChatButtonEvent:e,createFileTooltipText:n=j.jsxs(j.Fragment,{children:[j.jsx("strong",{children:"New file"}),j.jsx("div",{children:"(Alt + N or Ctrl + Shift + N)"})]}),createDirTooltipText:r=j.jsxs("div",{children:[j.jsx("strong",{children:"New Directory"}),j.jsx("div",{children:"(Ctrl + Shift + D)"})]}),openSettingsTooltipText:i=j.jsxs("div",{children:[j.jsx("strong",{children:"Open Settings"}),j.jsx("div",{children:"(Ctrl + Shift + S or Ctrl + ,)"})]}),openKeyboardShortcuts:s=j.jsxs("div",{children:[j.jsx("strong",{children:"Keyboard Shortcuts"}),j.jsx("div",{children:"(Ctrl + Shift + K)"})]}),reportBugTooltipText:o=j.jsx("div",{children:j.jsx("strong",{children:"Report Bug"})}),searchToolTipText:a=j.jsxs("div",{children:[j.jsx("strong",{children:"Search"}),j.jsx("div",{children:"(Ctrl + Shift + F)"})]}),filesToolTipText:l=j.jsxs("div",{children:[j.jsx("strong",{children:"Files"}),j.jsx("div",{children:"(Ctrl + Shift + E)"})]}),enableAutoFollowTooltipText:u=j.jsxs("div",{children:[j.jsx("strong",{children:"Enable Auto Follow"}),j.jsx("div",{children:"(Ctrl + Shift + A)"})]}),disableAutoFollowTooltipText:c=j.jsxs("div",{children:[j.jsx("strong",{children:"Disable Auto Follow"}),j.jsx("div",{children:"(Ctrl + Shift + A)"})]}),voiceChatToolTipText:f=j.jsx("div",{children:j.jsx("strong",{children:"Open Voice Chat Menu"})}),aiChatToolTipText:d=j.jsx("div",{children:j.jsx("strong",{children:"Edit with AI"})}),visualEditorToolTipText:p=j.jsx("div",{children:j.jsx("strong",{children:"Visual Editor"})})})=>{const{files:g,openTab:O,setIsSettingsOpen:y,setIsDocOpen:b,isSearchOpen:v,setIsSearchOpen:S,isVisualEditorOpen:x,setIsVisualEditorOpen:P,isAIChatOpen:E,setIsAIChatOpen:D,handleOpenCreateFileModal:R,handleOpenCreateDirModal:_,connected:C,pending:I,sidebarRef:T,enableAutoFollow:B,toggleAutoFollow:A,docPresence:X,updatePresenceIndicator:G,setVoiceChatModalOpen:W,submitOperation:te,deleteAllFiles:J}=M.useContext(pr),U=M.useMemo(()=>g?TN(Cre(g)):null,[g]),z=M.useCallback(()=>{b(!0)},[b]),Y=M.useCallback(()=>{y(!0)},[y]),[L,se]=M.useState("Copy for AI"),[ee,ue]=M.useState("Paste for AI"),[Z,V]=M.useState("Export to ZIP"),[H,he]=M.useState(!1),{handleCopyForAI:ve,handlePasteForAI:Ae,handleExportToZip:Re}=M.useMemo(()=>rhe(g,te,se,ue,V),[g,te]),F=M.useCallback(()=>{he(!0)},[]),me=M.useCallback(()=>{he(!1)},[]),Oe=M.useCallback(()=>{he(!1),J()},[J]),{sidebarWidth:ie,setSidebarView:re}=M.useContext(rg),pe=M.useCallback(Ve=>{O({fileId:Ve,isTransient:!0})},[O]),Me=M.useCallback(Ve=>{O({fileId:Ve,isTransient:!1})},[O]),je=U&&U.children&&U.children.length>0,{isDragOver:_e,handleDragEnter:q,handleDragOver:ye,handleDragLeave:xe,handleDrop:ce}=Bfe();M.useEffect(()=>{},[X]),M.useEffect(()=>{if(X){const Ve=(qe,Ke)=>{if(!Ke)return;const it={username:Ke.username,fileId:Ke.start[1]};G(it)};return X.on("receive",Ve),()=>{X.off("receive",Ve)}}},[X,G]);const[Se,Ee]=M.useState(!1),[Ue,Ge]=M.useState(!0),Ne=M.useRef(I);return M.useEffect(()=>{Ue&&C&&Ge(!1)},[C,Ue]),M.useEffect(()=>{if(Ne.current&&!I&&C&&!Ue){Ee(!0);const Ve=setTimeout(()=>{Ee(!1)},1500);return()=>clearTimeout(Ve)}Ne.current=I},[I,C,Ue]),M.useEffect(()=>{re(E)},[E,re]),j.jsxs("div",{className:"vz-sidebar",style:{width:ie+"px"},children:[j.jsxs("div",{className:"full-box",ref:T,tabIndex:-1,children:[j.jsxs("div",{className:"sidebar-section-buttons",children:[t&&j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"ai-chat-tooltip",children:d}),children:j.jsx("i",{id:"ai-chat-icon",className:"vz-icon-button",onClick:()=>she({aiChatButtonEvent:e,target:window,openAIChat:()=>{D(!0),S(!1),re(!0)}}),children:j.jsx(Bx,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"files-tooltip",children:l}),children:j.jsx("i",{id:"files-icon",className:"vz-icon-button",onClick:()=>{S(!1),D(!1),P(!1),re(!1)},children:j.jsx(jre,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"search-tooltip",children:a}),children:j.jsx("i",{id:"search-icon",className:"vz-icon-button",onClick:()=>{S(!0),D(!1),P(!1),re(!1)},children:j.jsx(Nre,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"visual-editor-tooltip",children:p}),children:j.jsx("i",{id:"visual-editor-icon",className:"vz-icon-button",onClick:()=>{P(!0),D(!1),S(!1),re(!1)},children:j.jsx(Wre,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"open-keyboard-shortcuts",children:s}),children:j.jsx("i",{id:"shortcut-icon",className:"vz-icon-button",onClick:z,children:j.jsx(Ire,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"report-bug-tooltip",children:o}),children:j.jsx("a",{href:"https://github.com/vizhub-core/vzcode/issues/new",target:"_blank",rel:"noopener noreferrer",children:j.jsx("i",{id:"bug-icon",className:"vz-icon-button",children:j.jsx(Qre,{})})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"open-settings-tooltip",children:i}),children:j.jsx("i",{id:"settings-icon",className:"vz-icon-button",onClick:Y,children:j.jsx($re,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"create-file-tooltip",children:n}),children:j.jsx("i",{id:"new-file-icon",className:"vz-icon-button",onClick:R,children:j.jsx(Are,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"create-dir-tooltip",children:r}),children:j.jsx("i",{id:"new-directory-icon",className:"vz-icon-button",onClick:_,children:j.jsx(AN,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"toggle-auto-follow",children:B?c:u}),children:j.jsxs("i",{id:"auto-focus-icon",className:`vz-icon-button${B?" vz-color-success-01":""}`,onClick:A,children:[j.jsx("i",{}),j.jsx(Dre,{})]})}),s4]}),j.jsx("div",{className:"files",id:"sidebar-view-container",onDragEnter:q,onDragOver:ye,onDragLeave:xe,onDrop:ce,children:E?j.jsx("div",{className:"sidebar-ai-chat",children:j.jsx(Mfe,{})}):v?j.jsx("div",{className:"sidebar-search",children:j.jsx(Lfe,{})}):x?j.jsx("div",{className:"sidebar-visual-editor",children:j.jsx(jhe,{})}):j.jsx("div",{className:"sidebar-files",children:_e?j.jsxs("div",{className:"empty drag-over",children:[j.jsx("div",{className:"empty-text",children:`It looks like you don't have any files yet! Click the "Create file" button above to create your first file.`}),j.jsx("div",{className:"empty-text",children:"Drop files here!"})]}):je?U.children.map(Ve=>{const{fileId:qe}=Ve,{path:Ke}=Ve,it=qe||Ke;return j.jsx(XL,{entity:Ve,handleFileClick:pe,handleFileDoubleClick:Me},it)}):j.jsxs("div",{className:"empty",children:[j.jsx("div",{className:"empty-text",children:`It looks like you don't have any files yet! Click the "Create file" button above to create your first file.`}),j.jsx("div",{className:"empty-text",children:"Drop files here!"})]})})})]}),!E&&!v&&j.jsxs("div",{className:"ai-buttons",children:[je&&j.jsxs("button",{className:"ai-button export-button",onClick:Re,title:"Export files to ZIP",children:[j.jsx(Pre,{size:14,"aria-hidden":"true"}),Z]}),je&&j.jsxs("button",{className:"ai-button copy-button",onClick:ve,title:"Copy files formatted for AI",children:[j.jsx(xre,{size:14,"aria-hidden":"true"}),L]}),j.jsxs("button",{className:"ai-button paste-button",onClick:Ae,title:"Paste files from AI",children:[j.jsx(wre,{size:14,"aria-hidden":"true"}),ee]}),je&&j.jsxs("button",{className:"ai-button delete-all-button",onClick:F,title:"Delete all files",children:[j.jsx(Ere,{size:14,"aria-hidden":"true"}),"Delete all files"]})]}),j.jsxs("div",{className:"connection-status",children:[Ue?"Connecting...":C?I?"Saving...":Se?"Saved.":"Connected":"Connection Lost",j.jsx("div",{className:"connection",children:j.jsx("div",{className:`connection-status-indicator ${Ue?"pending":C?I?"pending":"connected":"disconnected"}`})})]}),H&&j.jsx(VL,{show:H,onClose:me,onConfirm:Oe,isDirectory:!1,name:"all files"})]})},Lhe=({initialFileName:t=""})=>{const[e,n]=M.useState(t),r=M.useRef(null),{files:i,isCreateDirModalOpen:s,handleCloseCreateDirModal:o,handleCreateDirClick:a}=M.useContext(pr);M.useEffect(()=>{s&&r.current&&r.current.focus()},[s]);const l=M.useCallback(d=>{n(d.target.value)},[]),u=M.useCallback(()=>{a(e),n("")},[e,a]),c=M.useCallback(d=>{let p;p=/^[a-zA-Z0-9](?:[a-zA-Z0-9 ./+=_-]*[a-zA-Z0-9])?$/.test(d);for(const O in i)d+"/"===i[O].name&&(p=!1);return p},[i]),f=M.useCallback(d=>{d.key==="Enter"&&c(e)&&(d.ctrlKey||d.shiftKey||!d.altKey&&!d.metaKey)&&u()},[u,c,e]);return s?j.jsxs(ar,{show:s,onHide:o,animation:!1,onKeyDown:f,children:[j.jsx(ar.Header,{closeButton:!0,children:j.jsx(ar.Title,{children:"Create Directory"})}),j.jsx(ar.Body,{children:j.jsxs(dr.Group,{controlId:"fileName",children:[j.jsx(dr.Label,{children:"Directory Name"}),j.jsx(dr.Control,{type:"text",value:e,onChange:l,ref:r,spellCheck:"false"}),j.jsx(dr.Text,{children:"Enter the name for your file"})]})}),j.jsx(ar.Footer,{children:j.jsx(fu,{variant:"primary",onClick:u,disabled:!c(e),children:"Create Directory"})})]}):null},Fhe=({initialFileName:t=""})=>{const[e,n]=M.useState(t),r=M.useRef(null),{files:i,isCreateFileModalOpen:s,handleCloseCreateFileModal:o,handleCreateFileClick:a}=M.useContext(pr);M.useEffect(()=>{s&&r.current&&r.current.focus()},[s]);const l=M.useCallback(d=>{n(d.target.value)},[]),u=M.useCallback(()=>{a(e),n("")},[e,a]),c=M.useCallback(d=>{let p;p=/^[a-zA-Z0-9](?:[a-zA-Z0-9 ./+=_-]*[a-zA-Z0-9])?$/.test(d);for(const O in i)d===i[O].name&&(p=!1);return p},[i]),f=M.useCallback(d=>{d.key==="Enter"&&c(e)&&(d.ctrlKey||d.shiftKey||!d.altKey&&!d.metaKey)&&u()},[u,c,e]);return s?j.jsxs(ar,{show:s,onHide:o,animation:!1,onKeyDown:f,children:[j.jsx(ar.Header,{closeButton:!0,children:j.jsx(ar.Title,{children:"Create File"})}),j.jsx(ar.Body,{children:j.jsxs(dr.Group,{controlId:"fileName",children:[j.jsx(dr.Label,{children:"File Name"}),j.jsx(dr.Control,{type:"text",value:e,onChange:l,ref:r,spellCheck:"false"}),j.jsx(dr.Text,{children:"Enter the name for your file"})]})}),j.jsx(ar.Footer,{children:j.jsx(fu,{variant:"primary",onClick:u,disabled:!c(e),children:"Create File"})})]}):null},Bhe=({enableUsernameField:t=!0,enableAIChat:e,aiChatButtonEvent:n}={})=>j.jsxs("div",{className:"left",children:[j.jsx(Nhe,{enableAIChat:e,aiChatButtonEvent:n}),j.jsx(pre,{enableUsernameField:t}),j.jsx(cre,{enableUsernameField:t}),j.jsx(Fhe,{}),j.jsx(Lhe,{}),s4]}),qhe=t=>{const e=t.split("/");return e.length===1?e[e.length-1]:e[e.length-2]+"/"+e[e.length-1]},zhe=({fileId:t,isTransient:e,isActive:n,setActiveFileId:r,openTab:i,closeTabs:s,fileName:o})=>{const a=M.useCallback(f=>{f.stopPropagation(),s([t])},[s,t]),l=M.useMemo(()=>qhe(o),[o]),u=M.useCallback(()=>{r(t)},[t,r]),c=M.useCallback(()=>{i({fileId:t})},[t,i]);return j.jsxs("div",{className:`tab ${n?"active":""} ${e?"transient":""}`,onClick:u,onDoubleClick:c,children:[l,j.jsx("i",{className:"vz-icon-button",onClick:a,children:j.jsx(Vm,{})})]})},Uhe=({activeFileId:t,tabList:e})=>{const{files:n,setActiveFileId:r,openTab:i,closeTabs:s}=M.useContext(pr);return j.jsx("div",{className:"vz-tab-list",children:n&&e.filter(o=>o.fileId in n).map(o=>j.jsx(zhe,{fileId:o.fileId,isTransient:o.isTransient,isActive:o.fileId===t,setActiveFileId:r,openTab:i,closeTabs:s,fileName:n[o.fileId].name},o.fileId))})},Zhe=["files"],Vhe=({customInteractRules:t,aiCopilotEndpoint:e,esLintSource:n,enableBuiltInAIChat:r=!0})=>{const{activePane:i,shareDBDoc:s,submitOperation:o,localPresence:a,docPresence:l,username:u,editorCache:c,editorWantsFocus:f,editorNoLongerWantsFocus:d,theme:p,codeEditorRef:g,enableAutoFollow:O,setIsAIChatOpen:y,setAIChatMessage:b}=M.useContext(pr),v=M.useRef(null),S=M.useCallback(()=>{v.current?clearTimeout(v.current):o(R=>({...R,isInteracting:!0})),v.current=setTimeout(()=>{v.current=null,o(({isInteracting:R,..._})=>({..._}))},800)},[o]),x=M.useRef(u);x.current=u;const P=M.useRef(O);M.useEffect(()=>{P.current=O},[O]);const[E,D]=M.useState(null);return M.useEffect(()=>{if(!s)return;let R=!0;return(async()=>{const C=await sK({fileId:i.activeFileId,shareDBDoc:s,filesPath:Zhe,localPresence:a,docPresence:l,theme:p,onInteract:S,editorCache:c,usernameRef:x,customInteractRules:t,enableAutoFollowRef:P,aiCopilotEndpoint:e,esLintSource:n,setIsAIChatOpen:y,setAIChatMessage:b,enableBuiltInAIChat:r});R&&D(C)})(),()=>{R=!1}},[i,s,a,l,p,S,c,t,e,n,y,b,r]),M.useLayoutEffect(()=>{if(!g.current||!E)return;const R=g.current;return R.appendChild(E.editor.dom),E.editor.scrollDOM.scrollTo({top:E.scrollPosition??0}),()=>{E&&R?.contains(E.editor.dom)&&(E.scrollPosition=E.editor.scrollDOM.scrollTop,R.removeChild(E.editor.dom))}},[g,E]),M.useEffect(()=>{f&&E&&(E.editor.focus(),d())},[f,E,d]),j.jsx("div",{className:"vz-code-editor",ref:g,tabIndex:-1})},Whe=()=>{const{activePane:t,content:e}=M.useContext(pr),n=t?.activeFileId,r=n&&e?.files?.[n];if(!r)return j.jsx("div",{className:"image-viewer-error",children:"No file selected"});if(!r.name.match(/\.(png|jpg|jpeg|gif|bmp|svg|webp)$/i))return j.jsx("div",{className:"image-viewer-error",children:"Not an image file"});const o=(u=>{switch(u.split(".").pop()?.toLowerCase()){case"jpg":case"jpeg":return"image/jpeg";case"png":return"image/png";case"gif":return"image/gif";case"bmp":return"image/bmp";case"svg":return"image/svg+xml";case"webp":return"image/webp";default:return"image/png"}})(r.name),l=r.name.split(".").pop()?.toLowerCase()==="svg"&&!r.text.startsWith("PHN2Zw")?`data:${o};utf8,${encodeURIComponent(r.text)}`:`data:${o};base64,${r.text}`;return j.jsx("div",{className:"image-viewer",children:j.jsx("div",{className:"image-viewer-content",children:j.jsx("img",{src:l,alt:r.name,className:"image-viewer-img",onError:u=>{console.error("Failed to load image:",r.name),u.target.style.display="none"}})})})},Xhe=({errorMessage:t,content:e})=>{const[n,r]=M.useState(!0);M.useEffect(()=>{t!==null&&r(!0)},[t]);const i=M.useCallback(()=>{r(!1)},[]);return M.useEffect(()=>{const s=o=>{o.key==="Escape"&&i()};return document.addEventListener("keydown",s,!0),()=>{document.removeEventListener("keydown",s,!0)}},[i]),n&&t!==null?j.jsxs("div",{className:"vz-code-error-overlay",children:[j.jsx("pre",{children:t}),j.jsx("i",{className:"vz-icon-button error-dismiss-button",onClick:i,children:j.jsx(Vm,{})})]}):null},$5=t=>{const[e]=t.split("-");return parseInt(e,36)},Hhe=(t,e)=>{const n=$5(t),r=$5(e);return n>r},Yhe=(t,e,n,r)=>{n.current.has(t)?n.current.set(t,e):(n.current.set(t,e),r(i=>[...i,{user:e,join:!0,presenceId:t}]))},Ghe=(t,e,n)=>{const r=e.current.get(t);r&&(e.current.delete(t),n(i=>[...i,{user:r,join:!1,presenceId:t}]))},Khe=({docPresence:t,localPresence:e})=>{const[n,r]=M.useState([]),i=M.useRef(new Map);return M.useEffect(()=>{if(t){const s=(o,a)=>{const l=a!==null;if(Hhe(o,e.presenceId)){if(l){const c=t.remotePresences[o]?.username;Yhe(o,c,i,r)}else Ghe(o,i,r);const u=setTimeout(()=>{r(c=>c.slice(1))},5e3);return()=>{clearTimeout(u)}}};return t.on("receive",s),()=>{t.off("receive",s)}}},[t,e]),n.length>0?j.jsx("div",{className:"vz-notification",children:n.map(({user:s,join:o,presenceId:a})=>j.jsx("div",{className:"vz-notification-item",children:o?`${s} has joined the session.`:`${s} has left the session.`},a))}):null},Jhe=()=>(Math.random()+"").slice(2),ede=100,tde=2e3,nde=(t,e=!0)=>{const n=t.name?.substring(0,ede).trim(),r=(e?t.text?.substring(0,tde):t.text).trim();return["`"+n+"`:","```",r,"```"].join(`
354
+ `);if(!u.trim()){r("Empty clipboard"),setTimeout(()=>r("Paste for AI"),2e3);return}const c=qfe(u,"bold");if(c.files&&Object.keys(c.files).length>0){const f=b5.mergeFileChanges(t||{},c.files);e(d=>({...d,files:f,runId:u4()})),r("Pasted!"),setTimeout(()=>r("Paste for AI"),2e3)}else r("No files found"),setTimeout(()=>r("Paste for AI"),2e3)}catch(l){console.error("Failed to paste files from AI:",l),r("Error"),setTimeout(()=>r("Paste for AI"),2e3)}},handleExportToZip:async()=>{if(!t||Object.keys(t).length===0){i("No files to export"),setTimeout(()=>i("Export to ZIP"),2e3);return}try{const l=new nhe;Object.entries(t).forEach(([d,p])=>{const g=p.name||d,O=p.text||"";l.file(g,O)});const u=await l.generateAsync({type:"blob"}),c=URL.createObjectURL(u),f=document.createElement("a");f.href=c,f.download="viz-files.zip",f.click(),URL.revokeObjectURL(c),i("Exported!"),setTimeout(()=>i("Export to ZIP"),2e3)}catch(l){console.error("Failed to export files to ZIP:",l),i("Error"),setTimeout(()=>i("Export to ZIP"),2e3)}}});function ihe(t,e){e.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:{source:"vzcode-sidebar"}}))}function she({aiChatButtonEvent:t,target:e,openAIChat:n}){if(t){ihe(t,e);return}n()}const ohe=({children:t})=>j.jsx("div",{className:"empty-state",children:t});function qd(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Hg(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function bu(){}var dd=.7,Jm=1/dd,Cc="\\s*([+-]?\\d+)\\s*",pd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Co="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ahe=/^#([0-9a-f]{3,8})$/,lhe=new RegExp(`^rgb\\(${Cc},${Cc},${Cc}\\)$`),uhe=new RegExp(`^rgb\\(${Co},${Co},${Co}\\)$`),che=new RegExp(`^rgba\\(${Cc},${Cc},${Cc},${pd}\\)$`),fhe=new RegExp(`^rgba\\(${Co},${Co},${Co},${pd}\\)$`),hhe=new RegExp(`^hsl\\(${pd},${Co},${Co}\\)$`),dhe=new RegExp(`^hsla\\(${pd},${Co},${Co},${pd}\\)$`),S5={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};qd(bu,zd,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:x5,formatHex:x5,formatHex8:phe,formatHsl:mhe,formatRgb:k5,toString:k5});function x5(){return this.rgb().formatHex()}function phe(){return this.rgb().formatHex8()}function mhe(){return YL(this).formatHsl()}function k5(){return this.rgb().formatRgb()}function zd(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ahe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?P5(e):n===3?new ci(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?A1(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?A1(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=lhe.exec(t))?new ci(e[1],e[2],e[3],1):(e=uhe.exec(t))?new ci(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=che.exec(t))?A1(e[1],e[2],e[3],e[4]):(e=fhe.exec(t))?A1(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=hhe.exec(t))?C5(e[1],e[2]/100,e[3]/100,1):(e=dhe.exec(t))?C5(e[1],e[2]/100,e[3]/100,e[4]):S5.hasOwnProperty(t)?P5(S5[t]):t==="transparent"?new ci(NaN,NaN,NaN,0):null}function P5(t){return new ci(t>>16&255,t>>8&255,t&255,1)}function A1(t,e,n,r){return r<=0&&(t=e=n=NaN),new ci(t,e,n,r)}function HL(t){return t instanceof bu||(t=zd(t)),t?(t=t.rgb(),new ci(t.r,t.g,t.b,t.opacity)):new ci}function ghe(t,e,n,r){return arguments.length===1?HL(t):new ci(t,e,n,r??1)}function ci(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}qd(ci,ghe,Hg(bu,{brighter(t){return t=t==null?Jm:Math.pow(Jm,t),new ci(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?dd:Math.pow(dd,t),new ci(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ci(ou(this.r),ou(this.g),ou(this.b),eg(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_5,formatHex:_5,formatHex8:Ohe,formatRgb:E5,toString:E5}));function _5(){return`#${nu(this.r)}${nu(this.g)}${nu(this.b)}`}function Ohe(){return`#${nu(this.r)}${nu(this.g)}${nu(this.b)}${nu((isNaN(this.opacity)?1:this.opacity)*255)}`}function E5(){const t=eg(this.opacity);return`${t===1?"rgb(":"rgba("}${ou(this.r)}, ${ou(this.g)}, ${ou(this.b)}${t===1?")":`, ${t})`}`}function eg(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ou(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function nu(t){return t=ou(t),(t<16?"0":"")+t.toString(16)}function C5(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Bs(t,e,n,r)}function YL(t){if(t instanceof Bs)return new Bs(t.h,t.s,t.l,t.opacity);if(t instanceof bu||(t=zd(t)),!t)return new Bs;if(t instanceof Bs)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),s=Math.max(e,n,r),o=NaN,a=s-i,l=(s+i)/2;return a?(e===s?o=(n-r)/a+(n<r)*6:n===s?o=(r-e)/a+2:o=(e-n)/a+4,a/=l<.5?s+i:2-s-i,o*=60):a=l>0&&l<1?0:o,new Bs(o,a,l,t.opacity)}function yhe(t,e,n,r){return arguments.length===1?YL(t):new Bs(t,e,n,r??1)}function Bs(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}qd(Bs,yhe,Hg(bu,{brighter(t){return t=t==null?Jm:Math.pow(Jm,t),new Bs(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?dd:Math.pow(dd,t),new Bs(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ci(pb(t>=240?t-240:t+120,i,r),pb(t,i,r),pb(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Bs(R5(this.h),$1(this.s),$1(this.l),eg(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=eg(this.opacity);return`${t===1?"hsl(":"hsla("}${R5(this.h)}, ${$1(this.s)*100}%, ${$1(this.l)*100}%${t===1?")":`, ${t})`}`}}));function R5(t){return t=(t||0)%360,t<0?t+360:t}function $1(t){return Math.max(0,Math.min(1,t||0))}function pb(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const vhe=Math.PI/180,bhe=180/Math.PI,tg=18,GL=.96422,KL=1,JL=.82521,e6=4/29,Rc=6/29,t6=3*Rc*Rc,whe=Rc*Rc*Rc;function n6(t){if(t instanceof Ro)return new Ro(t.l,t.a,t.b,t.opacity);if(t instanceof Ko)return r6(t);t instanceof ci||(t=HL(t));var e=yb(t.r),n=yb(t.g),r=yb(t.b),i=mb((.2225045*e+.7168786*n+.0606169*r)/KL),s,o;return e===n&&n===r?s=o=i:(s=mb((.4360747*e+.3850649*n+.1430804*r)/GL),o=mb((.0139322*e+.0971045*n+.7141733*r)/JL)),new Ro(116*i-16,500*(s-i),200*(i-o),t.opacity)}function She(t,e,n,r){return arguments.length===1?n6(t):new Ro(t,e,n,r??1)}function Ro(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}qd(Ro,She,Hg(bu,{brighter(t){return new Ro(this.l+tg*(t??1),this.a,this.b,this.opacity)},darker(t){return new Ro(this.l-tg*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=GL*gb(e),t=KL*gb(t),n=JL*gb(n),new ci(Ob(3.1338561*e-1.6168667*t-.4906146*n),Ob(-.9787684*e+1.9161415*t+.033454*n),Ob(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function mb(t){return t>whe?Math.pow(t,1/3):t/t6+e6}function gb(t){return t>Rc?t*t*t:t6*(t-e6)}function Ob(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function yb(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xhe(t){if(t instanceof Ko)return new Ko(t.h,t.c,t.l,t.opacity);if(t instanceof Ro||(t=n6(t)),t.a===0&&t.b===0)return new Ko(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*bhe;return new Ko(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Gc(t,e,n,r){return arguments.length===1?xhe(t):new Ko(t,e,n,r??1)}function Ko(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function r6(t){if(isNaN(t.h))return new Ro(t.l,0,0,t.opacity);var e=t.h*vhe;return new Ro(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}qd(Ko,Gc,Hg(bu,{brighter(t){return new Ko(this.h,this.c,this.l+tg*(t??1),this.opacity)},darker(t){return new Ko(this.h,this.c,this.l-tg*(t??1),this.opacity)},rgb(){return r6(this).rgb()}}));function vb(t){const e=zd(t),n=Gc(e||"black");return{h:Number.isFinite(n.h)?n.h:0,c:Number.isFinite(n.c)?n.c:0,l:Number.isFinite(n.l)?n.l:0}}function bb(t,e){return typeof t=="number"&&Number.isFinite(t)?t:e}function khe(t,e){const n=Gc(t.h,t.c,t.l);return n.displayable()?n.formatHex():e}const Phe="config.json",_he=(t,e,n)=>(t-e)/(n-e)*100,Ehe=(t,e,n)=>{const r=n-e,i=r<10?2:r<100?1:0;return Number(t).toFixed(i)},Che=(t,e,n)=>{try{return Gc(t,e,n).displayable()}catch{return!1}},wb=(t,e,n)=>{if(!t)return;const r=t.width,i=t.height,s=t.getContext("2d");if(!s)return;const o=s.createImageData(r,i);for(let a=0;a<r;a++){let l,u,c;if(e==="h")l=a*360/(r-1),u=Math.max(0,Math.min(n.c,100)),c=Math.max(0,Math.min(n.l,100));else if(e==="c"){const d=a*100/(r-1);l=Math.max(0,Math.min(n.h,360)),u=d,c=Math.max(0,Math.min(n.l,100))}else{const d=a*100/(r-1);l=Math.max(0,Math.min(n.h,360)),u=Math.max(0,Math.min(n.c,100)),c=d}let f;if(Che(l,u,c)){const p=Gc(l,u,c).rgb();f={r:p.r,g:p.g,b:p.b}}else f={r:128,g:128,b:128};for(let d=0;d<i;d++){const p=4*(d*r+a);o.data[p]=f.r,o.data[p+1]=f.g,o.data[p+2]=f.b,o.data[p+3]=255}}s.putImageData(o,0,0)},i6=t=>{if(typeof t!="string"||!t)return null;const e=t.split(".");return e.every(n=>n.length>0&&n!=="__proto__"&&n!=="constructor"&&n!=="prototype")?e:null},s2=(t,e)=>{const n=i6(e);if(!n)return{found:!1,value:void 0};let r=t;for(const i of n){if(r===null||typeof r!="object"||Array.isArray(r)||!Object.prototype.hasOwnProperty.call(r,i))return{found:!1,value:void 0};r=r[i]}return{found:!0,value:r}},ql=(t,e)=>{const{found:n,value:r}=s2(t,e);return n?r:void 0},Rhe=(t,e,n)=>{const r=i6(e);if(!r)throw new Error("Invalid or unsafe property path: "+e);const i={...t};let s=i;for(let a=0;a<r.length-1;a++){const l=r[a];s[l]==null||typeof s[l]!="object"||Array.isArray(s[l])?s[l]={}:s[l]={...s[l]},s=s[l]}const o=r[r.length-1];return s[o]=n,i},A5=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);function Ahe(t){if(t===null)return"missing-config";let e;try{e=JSON.parse(t)}catch{return"invalid-config"}if(!A5(e))return"invalid-config";if(!Object.prototype.hasOwnProperty.call(e,"visualEditorWidgets"))return"missing-widgets";const n=e.visualEditorWidgets;if(!Array.isArray(n))return"invalid-widgets";if(!n.length)return"empty-widgets";for(const r of n){if(!A5(r)||typeof r.property!="string"||!r.property||typeof r.label!="string"||!r.label.trim())return"invalid-widgets";const{found:i,value:s}=s2(e,r.property);if(!i)return"invalid-widgets";switch(r.type){case"slider":if(!Number.isFinite(s)||!Number.isFinite(r.min)||!Number.isFinite(r.max)||r.min>=r.max||r.step!==void 0&&(!Number.isFinite(r.step)||r.step<=0))return"invalid-widgets";break;case"checkbox":if(typeof s!="boolean")return"invalid-widgets";break;case"textInput":if(typeof s!="string")return"invalid-widgets";break;case"dropdown":if(typeof s!="string"||!Array.isArray(r.options)||r.options.length===0||!r.options.every(o=>typeof o=="string")||!r.options.includes(s))return"invalid-widgets";break;case"color":{if(typeof s!="string")return"invalid-widgets";const o=zd(s)?.rgb();if(!o||!Number.isFinite(o.r)||!Number.isFinite(o.g)||!Number.isFinite(o.b)||o.opacity!==1)return"invalid-widgets";break}default:return"invalid-widgets"}}return null}function $he(t,e,n,r){if(!e)return t;const i=t.files[e];if(!i)return t;let s;try{s=JSON.parse(i.text)}catch{return t}if(!s||typeof s!="object"||Array.isArray(s)||!s2(s,n).found)return t;let o;try{o=Rhe(s,n,r)}catch{return t}return{...t,files:{...t.files,[e]:{...i,text:JSON.stringify(o,null,2)}}}}const The=({property:t,label:e,min:n,max:r,step:i,currentValue:s,onChange:o})=>{const a=_he(s,n,r);return j.jsxs("div",{className:"visual-editor-slider",children:[j.jsxs("div",{className:"slider-header",children:[j.jsx("label",{htmlFor:t,className:"slider-label",children:e}),j.jsx("span",{className:"slider-value",children:Ehe(s,n,r)})]}),j.jsxs("div",{className:"slider-container",children:[j.jsx("input",{type:"range",id:t,className:"slider-input",min:n,max:r,step:i,value:s,onChange:o}),j.jsx("div",{className:"slider-track-fill",style:{width:`${a}%`}})]}),j.jsxs("div",{className:"slider-bounds",children:[j.jsx("span",{className:"min-value",children:n}),j.jsx("span",{className:"max-value",children:r})]})]})},Qhe=({property:t,label:e,currentValue:n,onChange:r})=>j.jsxs("div",{className:"visual-editor-checkbox",children:[j.jsxs("div",{className:"checkbox-header",children:[j.jsx("label",{htmlFor:t,className:"checkbox-label",children:e}),j.jsx("span",{className:"checkbox-value",children:n?"On":"Off"})]}),j.jsxs("div",{className:"checkbox-container",children:[j.jsx("input",{type:"checkbox",id:t,className:"checkbox-input",checked:n,onChange:r}),j.jsx("div",{className:"checkbox-visual",children:j.jsx("div",{className:`checkbox-indicator ${n?"checked":""}`})})]})]}),Mhe=({property:t,label:e,currentValue:n,onChange:r})=>j.jsxs("div",{className:"visual-editor-text-input",children:[j.jsx("div",{className:"text-input-header",children:j.jsx("label",{htmlFor:t,className:"text-input-label",children:e})}),j.jsx("div",{className:"text-input-container",children:j.jsx("input",{type:"text",id:t,className:"text-input-field",value:n||"",onChange:r})})]}),Ihe=({property:t,label:e,options:n,currentValue:r,isOpen:i,onToggle:s,onOptionClick:o})=>j.jsxs("div",{className:"visual-editor-dropdown",children:[j.jsx("div",{className:"dropdown-header",children:j.jsx("label",{htmlFor:t,className:"dropdown-label",children:e})}),j.jsxs("div",{className:"dropdown-container",children:[j.jsxs("button",{type:"button",className:`dropdown-button ${i?"open":""}`,onClick:s,"aria-expanded":i,"aria-haspopup":"listbox",children:[j.jsx("span",{className:"dropdown-button-text",children:r}),j.jsx("div",{className:`dropdown-arrow ${i?"open":""}`,children:j.jsx("svg",{width:"12",height:"8",viewBox:"0 0 12 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:j.jsx("path",{d:"M1 1.5L6 6.5L11 1.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),i&&j.jsx("div",{className:"dropdown-options",children:n.map(a=>j.jsx("button",{type:"button",className:`dropdown-option ${a===r?"selected":""}`,onClick:()=>o(a),children:a},a))})]})]}),Dhe=({property:t,label:e,currentHex:n,currentH:r,currentC:i,currentL:s,onColorChange:o})=>{const a=M.useRef({});return M.useEffect(()=>{const l={h:r,c:i,l:s};wb(a.current[`${t}_l_bg`],"l",l),wb(a.current[`${t}_c_bg`],"c",l),wb(a.current[`${t}_h_bg`],"h",l)},[t,r,i,s]),j.jsxs("div",{className:"visual-editor-color",children:[j.jsxs("div",{className:"color-header",children:[j.jsx("label",{className:"color-label",children:e}),j.jsx("span",{className:"color-value",children:n})]}),j.jsx("div",{className:"color-preview",style:{backgroundColor:n}}),j.jsxs("div",{className:"lch-sliders",children:[j.jsxs("div",{className:"lch-slider",children:[j.jsxs("div",{className:"slider-header",children:[j.jsx("label",{className:"slider-label",children:"Lightness"}),j.jsx("span",{className:"slider-value",children:Math.round(s)})]}),j.jsxs("div",{className:"slider-container",children:[j.jsx("canvas",{ref:l=>{a.current[`${t}_l_bg`]=l},className:"slider-bg-canvas",width:200}),j.jsx("input",{type:"range",className:"slider-input",min:0,max:100,step:1,value:s,onChange:o(t,"l")})]}),j.jsxs("div",{className:"slider-bounds",children:[j.jsx("span",{className:"min-value",children:"0"}),j.jsx("span",{className:"max-value",children:"100"})]})]}),j.jsxs("div",{className:"lch-slider",children:[j.jsxs("div",{className:"slider-header",children:[j.jsx("label",{className:"slider-label",children:"Chroma"}),j.jsx("span",{className:"slider-value",children:Math.round(i)})]}),j.jsxs("div",{className:"slider-container",children:[j.jsx("canvas",{ref:l=>{a.current[`${t}_c_bg`]=l},className:"slider-bg-canvas",width:200}),j.jsx("input",{type:"range",className:"slider-input",min:0,max:100,step:1,value:i,onChange:o(t,"c")})]}),j.jsxs("div",{className:"slider-bounds",children:[j.jsx("span",{className:"min-value",children:"0"}),j.jsx("span",{className:"max-value",children:"100"})]})]}),j.jsxs("div",{className:"lch-slider",children:[j.jsxs("div",{className:"slider-header",children:[j.jsx("label",{className:"slider-label",children:"Hue"}),j.jsxs("span",{className:"slider-value",children:[Math.round(r),"°"]})]}),j.jsxs("div",{className:"slider-container",children:[j.jsx("canvas",{ref:l=>{a.current[`${t}_h_bg`]=l},className:"slider-bg-canvas",width:200}),j.jsx("input",{type:"range",className:"slider-input",min:0,max:360,step:1,value:r,onChange:o(t,"h")})]}),j.jsxs("div",{className:"slider-bounds",children:[j.jsx("span",{className:"min-value",children:"0°"}),j.jsx("span",{className:"max-value",children:"360°"})]})]})]})]})},jhe=()=>{const{files:t,submitOperation:e,renderVisualEditorEmptyState:n}=M.useContext(pr),[r,i]=M.useState({}),[s,o]=M.useState(null);let a=null;if(t){for(const S in t)if(t[S].name===Phe){a=S;break}}const l=M.useMemo(()=>{if(!t||!a)return null;try{return JSON.parse(t[a].text)}catch(S){return console.error("Error parsing config.json:",S),null}},[a,t]),u=M.useCallback((S,x,P={})=>{i(E=>({...E,[S]:x,...P})),e(E=>$he(E,a,S,x))},[a,e]),c=M.useCallback(S=>x=>u(S,parseFloat(x.currentTarget.value)),[u]),f=M.useCallback(S=>x=>u(S,x.currentTarget.checked),[u]),d=M.useCallback(S=>x=>u(S,x.currentTarget.value),[u]),p=M.useCallback((S,x)=>u(S,x),[u]),g=M.useCallback(S=>{o(x=>x===S?null:S)},[]),O=M.useCallback((S,x)=>{p(S,x),o(null)},[p]);M.useEffect(()=>{const S=x=>{s&&(x.target.closest(".visual-editor-dropdown")||o(null))};return document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}},[s]);const y=M.useCallback((S,x)=>P=>{const E=parseFloat(P.currentTarget.value),D=ql(l,S)??"#000000",R=vb(D),_={h:r[`${S}_h`]??R.h,c:r[`${S}_c`]??R.c,l:r[`${S}_l`]??R.l};_[x]=E;const C=khe(_,D);u(S,C,{[`${S}_h`]:_.h,[`${S}_c`]:_.c,[`${S}_l`]:_.l})},[l,u,r]),b=M.useMemo(()=>Array.isArray(l?.visualEditorWidgets)?l.visualEditorWidgets:[],[l]);M.useEffect(()=>{const S={};b.forEach(x=>{const P=ql(l,x.property);if(P!==void 0&&(S[x.property]=P),x.type==="color"&&typeof P=="string"){const E=vb(P);S[`${x.property}_h`]=E.h,S[`${x.property}_c`]=E.c,S[`${x.property}_l`]=E.l}}),i(S)},[l,b]);const v=Ahe(a===null?null:t?.[a]?.text??null);if(v){const S=n?.(v);if(S!=null)return j.jsx(j.Fragment,{children:S});const x={"missing-config":"To begin using the visual editor, create a config.json.","invalid-config":"Your config.json file is not valid JSON.","missing-widgets":"Add a visualEditorWidgets array to config.json.","invalid-widgets":"Your visualEditorWidgets configuration is invalid.","empty-widgets":"Add at least one widget to visualEditorWidgets."};return j.jsx(ohe,{children:x[v]})}return j.jsx("div",{className:"visual-editor",children:b.map((S,x)=>{if(S.type==="slider"){const P=r[S.property]??ql(l,S.property)??S.min;return j.jsx(The,{property:S.property,label:S.label,min:S.min,max:S.max,step:S.step,currentValue:P,onChange:c(S.property)},S.property)}else if(S.type==="checkbox"){const P=r[S.property]??ql(l,S.property)??!1;return j.jsx(Qhe,{property:S.property,label:S.label,currentValue:P,onChange:f(S.property)},S.property)}else if(S.type==="textInput"){const P=r[S.property]??ql(l,S.property)??"";return j.jsx(Mhe,{property:S.property,label:S.label,currentValue:P,onChange:d(S.property)},S.property)}else if(S.type==="dropdown"){const P=r[S.property]??ql(l,S.property)??S.options?.[0]??"",E=s===S.property;return j.jsx(Ihe,{property:S.property,label:S.label,options:S.options,currentValue:P,isOpen:E,onToggle:()=>g(S.property),onOptionClick:D=>O(S.property,D)},S.property)}else if(S.type==="color"){const P=r[S.property]??ql(l,S.property)??"#000000",E=vb(P),D=bb(r[`${S.property}_h`],E.h),R=bb(r[`${S.property}_c`],E.c),_=bb(r[`${S.property}_l`],E.l);return j.jsx(Dhe,{property:S.property,label:S.label,currentHex:P,currentH:D,currentC:R,currentL:_,onColorChange:y},S.property)}})})},Nhe=({enableAIChat:t=KG,aiChatButtonEvent:e,createFileTooltipText:n=j.jsxs(j.Fragment,{children:[j.jsx("strong",{children:"New file"}),j.jsx("div",{children:"(Alt + N or Ctrl + Shift + N)"})]}),createDirTooltipText:r=j.jsxs("div",{children:[j.jsx("strong",{children:"New Directory"}),j.jsx("div",{children:"(Ctrl + Shift + D)"})]}),openSettingsTooltipText:i=j.jsxs("div",{children:[j.jsx("strong",{children:"Open Settings"}),j.jsx("div",{children:"(Ctrl + Shift + S or Ctrl + ,)"})]}),openKeyboardShortcuts:s=j.jsxs("div",{children:[j.jsx("strong",{children:"Keyboard Shortcuts"}),j.jsx("div",{children:"(Ctrl + Shift + K)"})]}),reportBugTooltipText:o=j.jsx("div",{children:j.jsx("strong",{children:"Report Bug"})}),searchToolTipText:a=j.jsxs("div",{children:[j.jsx("strong",{children:"Search"}),j.jsx("div",{children:"(Ctrl + Shift + F)"})]}),filesToolTipText:l=j.jsxs("div",{children:[j.jsx("strong",{children:"Files"}),j.jsx("div",{children:"(Ctrl + Shift + E)"})]}),enableAutoFollowTooltipText:u=j.jsxs("div",{children:[j.jsx("strong",{children:"Enable Auto Follow"}),j.jsx("div",{children:"(Ctrl + Shift + A)"})]}),disableAutoFollowTooltipText:c=j.jsxs("div",{children:[j.jsx("strong",{children:"Disable Auto Follow"}),j.jsx("div",{children:"(Ctrl + Shift + A)"})]}),voiceChatToolTipText:f=j.jsx("div",{children:j.jsx("strong",{children:"Open Voice Chat Menu"})}),aiChatToolTipText:d=j.jsx("div",{children:j.jsx("strong",{children:"Edit with AI"})}),visualEditorToolTipText:p=j.jsx("div",{children:j.jsx("strong",{children:"Visual Editor"})})})=>{const{files:g,openTab:O,setIsSettingsOpen:y,setIsDocOpen:b,isSearchOpen:v,setIsSearchOpen:S,isVisualEditorOpen:x,setIsVisualEditorOpen:P,isAIChatOpen:E,setIsAIChatOpen:D,handleOpenCreateFileModal:R,handleOpenCreateDirModal:_,connected:C,pending:I,sidebarRef:T,enableAutoFollow:B,toggleAutoFollow:A,docPresence:X,updatePresenceIndicator:G,setVoiceChatModalOpen:W,submitOperation:te,deleteAllFiles:J}=M.useContext(pr),U=M.useMemo(()=>g?TN(Cre(g)):null,[g]),z=M.useCallback(()=>{b(!0)},[b]),Y=M.useCallback(()=>{y(!0)},[y]),[L,se]=M.useState("Copy for AI"),[ee,ue]=M.useState("Paste for AI"),[Z,V]=M.useState("Export to ZIP"),[H,he]=M.useState(!1),{handleCopyForAI:ve,handlePasteForAI:Ae,handleExportToZip:Re}=M.useMemo(()=>rhe(g,te,se,ue,V),[g,te]),F=M.useCallback(()=>{he(!0)},[]),me=M.useCallback(()=>{he(!1)},[]),Oe=M.useCallback(()=>{he(!1),J()},[J]),{sidebarWidth:ie,setSidebarView:re}=M.useContext(rg),pe=M.useCallback(Ve=>{O({fileId:Ve,isTransient:!0})},[O]),Me=M.useCallback(Ve=>{O({fileId:Ve,isTransient:!1})},[O]),je=U&&U.children&&U.children.length>0,{isDragOver:_e,handleDragEnter:q,handleDragOver:ye,handleDragLeave:xe,handleDrop:ce}=Bfe();M.useEffect(()=>{},[X]),M.useEffect(()=>{if(X){const Ve=(qe,Ke)=>{if(!Ke)return;const it={username:Ke.username,fileId:Ke.start[1]};G(it)};return X.on("receive",Ve),()=>{X.off("receive",Ve)}}},[X,G]);const[Se,Ee]=M.useState(!1),[Ue,Ge]=M.useState(!0),Ne=M.useRef(I);return M.useEffect(()=>{Ue&&C&&Ge(!1)},[C,Ue]),M.useEffect(()=>{if(Ne.current&&!I&&C&&!Ue){Ee(!0);const Ve=setTimeout(()=>{Ee(!1)},1500);return()=>clearTimeout(Ve)}Ne.current=I},[I,C,Ue]),M.useEffect(()=>{re(E)},[E,re]),j.jsxs("div",{className:"vz-sidebar",style:{width:ie+"px"},children:[j.jsxs("div",{className:"full-box",ref:T,tabIndex:-1,children:[j.jsxs("div",{className:"sidebar-section-buttons",children:[t&&j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"ai-chat-tooltip",children:d}),children:j.jsx("button",{type:"button",id:"ai-chat-icon","aria-label":"AI chat","aria-pressed":E,className:"vz-icon-button",onClick:()=>she({aiChatButtonEvent:e,target:window,openAIChat:()=>{D(!0),S(!1),re(!0)}}),children:j.jsx(Bx,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"files-tooltip",children:l}),children:j.jsx("button",{type:"button",id:"files-icon","aria-label":"Files","aria-pressed":!E&&!v&&!x,className:"vz-icon-button",onClick:()=>{S(!1),D(!1),P(!1),re(!1)},children:j.jsx(jre,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"search-tooltip",children:a}),children:j.jsx("button",{type:"button",id:"search-icon","aria-label":"Search","aria-pressed":v,className:"vz-icon-button",onClick:()=>{S(!0),D(!1),P(!1),re(!1)},children:j.jsx(Nre,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"visual-editor-tooltip",children:p}),children:j.jsx("button",{type:"button",id:"visual-editor-icon","aria-label":"Visual editor","aria-pressed":x,className:"vz-icon-button",onClick:()=>{P(!0),D(!1),S(!1),re(!1)},children:j.jsx(Wre,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"open-keyboard-shortcuts",children:s}),children:j.jsx("button",{type:"button",id:"shortcut-icon","aria-label":"Keyboard shortcuts",className:"vz-icon-button",onClick:z,children:j.jsx(Ire,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"report-bug-tooltip",children:o}),children:j.jsx("a",{href:"https://github.com/vizhub-core/vzcode/issues/new","aria-label":"Report a bug",target:"_blank",rel:"noopener noreferrer",children:j.jsx("span",{id:"bug-icon",className:"vz-icon-button",children:j.jsx(Qre,{})})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"open-settings-tooltip",children:i}),children:j.jsx("button",{type:"button",id:"settings-icon","aria-label":"Editor settings",className:"vz-icon-button",onClick:Y,children:j.jsx($re,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"create-file-tooltip",children:n}),children:j.jsx("button",{type:"button",id:"new-file-icon","aria-label":"Create file",className:"vz-icon-button",onClick:R,children:j.jsx(Are,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"create-dir-tooltip",children:r}),children:j.jsx("button",{type:"button",id:"new-directory-icon","aria-label":"Create directory",className:"vz-icon-button",onClick:_,children:j.jsx(AN,{})})}),j.jsx(Ni,{placement:"right",overlay:j.jsx(ji,{id:"toggle-auto-follow",children:B?c:u}),children:j.jsx("button",{type:"button",id:"auto-focus-icon","aria-label":"Follow collaborator cursor","aria-pressed":B,className:`vz-icon-button${B?" vz-color-success-01":""}`,onClick:A,children:j.jsx(Dre,{})})}),s4]}),j.jsx("div",{className:"files",id:"sidebar-view-container",onDragEnter:q,onDragOver:ye,onDragLeave:xe,onDrop:ce,children:E?j.jsx("div",{className:"sidebar-ai-chat",children:j.jsx(Mfe,{})}):v?j.jsx("div",{className:"sidebar-search",children:j.jsx(Lfe,{})}):x?j.jsx("div",{className:"sidebar-visual-editor",children:j.jsx(jhe,{})}):j.jsx("div",{className:"sidebar-files",children:_e?j.jsxs("div",{className:"empty drag-over",children:[j.jsx("div",{className:"empty-text",children:`It looks like you don't have any files yet! Click the "Create file" button above to create your first file.`}),j.jsx("div",{className:"empty-text",children:"Drop files here!"})]}):je?U.children.map(Ve=>{const{fileId:qe}=Ve,{path:Ke}=Ve,it=qe||Ke;return j.jsx(XL,{entity:Ve,handleFileClick:pe,handleFileDoubleClick:Me},it)}):j.jsxs("div",{className:"empty",children:[j.jsx("div",{className:"empty-text",children:`It looks like you don't have any files yet! Click the "Create file" button above to create your first file.`}),j.jsx("div",{className:"empty-text",children:"Drop files here!"})]})})})]}),!E&&!v&&j.jsxs("div",{className:"ai-buttons",children:[je&&j.jsxs("button",{className:"ai-button export-button",onClick:Re,title:"Export files to ZIP",children:[j.jsx(Pre,{size:14,"aria-hidden":"true"}),Z]}),je&&j.jsxs("button",{className:"ai-button copy-button",onClick:ve,title:"Copy files formatted for AI",children:[j.jsx(xre,{size:14,"aria-hidden":"true"}),L]}),j.jsxs("button",{className:"ai-button paste-button",onClick:Ae,title:"Paste files from AI",children:[j.jsx(wre,{size:14,"aria-hidden":"true"}),ee]}),je&&j.jsxs("button",{className:"ai-button delete-all-button",onClick:F,title:"Delete all files",children:[j.jsx(Ere,{size:14,"aria-hidden":"true"}),"Delete all files"]})]}),j.jsxs("div",{className:"connection-status",children:[Ue?"Connecting...":C?I?"Saving...":Se?"Saved.":"Connected":"Connection Lost",j.jsx("div",{className:"connection",children:j.jsx("div",{className:`connection-status-indicator ${Ue?"pending":C?I?"pending":"connected":"disconnected"}`})})]}),H&&j.jsx(VL,{show:H,onClose:me,onConfirm:Oe,isDirectory:!1,name:"all files"})]})},Lhe=({initialFileName:t=""})=>{const[e,n]=M.useState(t),r=M.useRef(null),{files:i,isCreateDirModalOpen:s,handleCloseCreateDirModal:o,handleCreateDirClick:a}=M.useContext(pr);M.useEffect(()=>{s&&r.current&&r.current.focus()},[s]);const l=M.useCallback(d=>{n(d.target.value)},[]),u=M.useCallback(()=>{a(e),n("")},[e,a]),c=M.useCallback(d=>{let p;p=/^[a-zA-Z0-9](?:[a-zA-Z0-9 ./+=_-]*[a-zA-Z0-9])?$/.test(d);for(const O in i)d+"/"===i[O].name&&(p=!1);return p},[i]),f=M.useCallback(d=>{d.key==="Enter"&&c(e)&&(d.ctrlKey||d.shiftKey||!d.altKey&&!d.metaKey)&&u()},[u,c,e]);return s?j.jsxs(ar,{show:s,onHide:o,animation:!1,onKeyDown:f,children:[j.jsx(ar.Header,{closeButton:!0,children:j.jsx(ar.Title,{children:"Create Directory"})}),j.jsx(ar.Body,{children:j.jsxs(dr.Group,{controlId:"fileName",children:[j.jsx(dr.Label,{children:"Directory Name"}),j.jsx(dr.Control,{type:"text",value:e,onChange:l,ref:r,spellCheck:"false"}),j.jsx(dr.Text,{children:"Enter the name for your file"})]})}),j.jsx(ar.Footer,{children:j.jsx(fu,{variant:"primary",onClick:u,disabled:!c(e),children:"Create Directory"})})]}):null},Fhe=({initialFileName:t=""})=>{const[e,n]=M.useState(t),r=M.useRef(null),{files:i,isCreateFileModalOpen:s,handleCloseCreateFileModal:o,handleCreateFileClick:a}=M.useContext(pr);M.useEffect(()=>{s&&r.current&&r.current.focus()},[s]);const l=M.useCallback(d=>{n(d.target.value)},[]),u=M.useCallback(()=>{a(e),n("")},[e,a]),c=M.useCallback(d=>{let p;p=/^[a-zA-Z0-9](?:[a-zA-Z0-9 ./+=_-]*[a-zA-Z0-9])?$/.test(d);for(const O in i)d===i[O].name&&(p=!1);return p},[i]),f=M.useCallback(d=>{d.key==="Enter"&&c(e)&&(d.ctrlKey||d.shiftKey||!d.altKey&&!d.metaKey)&&u()},[u,c,e]);return s?j.jsxs(ar,{show:s,onHide:o,animation:!1,onKeyDown:f,children:[j.jsx(ar.Header,{closeButton:!0,children:j.jsx(ar.Title,{children:"Create File"})}),j.jsx(ar.Body,{children:j.jsxs(dr.Group,{controlId:"fileName",children:[j.jsx(dr.Label,{children:"File Name"}),j.jsx(dr.Control,{type:"text",value:e,onChange:l,ref:r,spellCheck:"false"}),j.jsx(dr.Text,{children:"Enter the name for your file"})]})}),j.jsx(ar.Footer,{children:j.jsx(fu,{variant:"primary",onClick:u,disabled:!c(e),children:"Create File"})})]}):null},Bhe=({enableUsernameField:t=!0,enableAIChat:e,aiChatButtonEvent:n}={})=>j.jsxs("div",{className:"left",children:[j.jsx(Nhe,{enableAIChat:e,aiChatButtonEvent:n}),j.jsx(pre,{enableUsernameField:t}),j.jsx(cre,{enableUsernameField:t}),j.jsx(Fhe,{}),j.jsx(Lhe,{}),s4]}),qhe=t=>{const e=t.split("/");return e.length===1?e[e.length-1]:e[e.length-2]+"/"+e[e.length-1]},zhe=({fileId:t,isTransient:e,isActive:n,setActiveFileId:r,openTab:i,closeTabs:s,fileName:o})=>{const a=M.useCallback(f=>{f.stopPropagation(),s([t])},[s,t]),l=M.useMemo(()=>qhe(o),[o]),u=M.useCallback(()=>{r(t)},[t,r]),c=M.useCallback(()=>{i({fileId:t})},[t,i]);return j.jsxs("div",{className:`tab ${n?"active":""} ${e?"transient":""}`,children:[j.jsx("button",{type:"button",className:"tab-activate","aria-current":n?"page":void 0,onClick:u,onDoubleClick:c,children:l}),j.jsx("button",{type:"button",className:"vz-icon-button","aria-label":`Close ${l}`,onClick:a,children:j.jsx(Vm,{})})]})},Uhe=({activeFileId:t,tabList:e})=>{const{files:n,setActiveFileId:r,openTab:i,closeTabs:s}=M.useContext(pr);return j.jsx("div",{className:"vz-tab-list",children:n&&e.filter(o=>o.fileId in n).map(o=>j.jsx(zhe,{fileId:o.fileId,isTransient:o.isTransient,isActive:o.fileId===t,setActiveFileId:r,openTab:i,closeTabs:s,fileName:n[o.fileId].name},o.fileId))})},Zhe=["files"],Vhe=({customInteractRules:t,aiCopilotEndpoint:e,esLintSource:n,enableBuiltInAIChat:r=!0})=>{const{activePane:i,shareDBDoc:s,submitOperation:o,localPresence:a,docPresence:l,username:u,editorCache:c,editorWantsFocus:f,editorNoLongerWantsFocus:d,theme:p,codeEditorRef:g,enableAutoFollow:O,setIsAIChatOpen:y,setAIChatMessage:b}=M.useContext(pr),v=M.useRef(null),S=M.useCallback(()=>{v.current?clearTimeout(v.current):o(R=>({...R,isInteracting:!0})),v.current=setTimeout(()=>{v.current=null,o(({isInteracting:R,..._})=>({..._}))},800)},[o]),x=M.useRef(u);x.current=u;const P=M.useRef(O);M.useEffect(()=>{P.current=O},[O]);const[E,D]=M.useState(null);return M.useEffect(()=>{if(!s)return;let R=!0;return(async()=>{const C=await sK({fileId:i.activeFileId,shareDBDoc:s,filesPath:Zhe,localPresence:a,docPresence:l,theme:p,onInteract:S,editorCache:c,usernameRef:x,customInteractRules:t,enableAutoFollowRef:P,aiCopilotEndpoint:e,esLintSource:n,setIsAIChatOpen:y,setAIChatMessage:b,enableBuiltInAIChat:r});R&&D(C)})(),()=>{R=!1}},[i,s,a,l,p,S,c,t,e,n,y,b,r]),M.useLayoutEffect(()=>{if(!g.current||!E)return;const R=g.current;return R.appendChild(E.editor.dom),E.editor.scrollDOM.scrollTo({top:E.scrollPosition??0}),()=>{E&&R?.contains(E.editor.dom)&&(E.scrollPosition=E.editor.scrollDOM.scrollTop,R.removeChild(E.editor.dom))}},[g,E]),M.useEffect(()=>{f&&E&&(E.editor.focus(),d())},[f,E,d]),j.jsx("div",{className:"vz-code-editor",ref:g,tabIndex:-1})},Whe=()=>{const{activePane:t,content:e}=M.useContext(pr),n=t?.activeFileId,r=n&&e?.files?.[n];if(!r)return j.jsx("div",{className:"image-viewer-error",children:"No file selected"});if(!r.name.match(/\.(png|jpg|jpeg|gif|bmp|svg|webp)$/i))return j.jsx("div",{className:"image-viewer-error",children:"Not an image file"});const o=(u=>{switch(u.split(".").pop()?.toLowerCase()){case"jpg":case"jpeg":return"image/jpeg";case"png":return"image/png";case"gif":return"image/gif";case"bmp":return"image/bmp";case"svg":return"image/svg+xml";case"webp":return"image/webp";default:return"image/png"}})(r.name),l=r.name.split(".").pop()?.toLowerCase()==="svg"&&!r.text.startsWith("PHN2Zw")?`data:${o};utf8,${encodeURIComponent(r.text)}`:`data:${o};base64,${r.text}`;return j.jsx("div",{className:"image-viewer",children:j.jsx("div",{className:"image-viewer-content",children:j.jsx("img",{src:l,alt:r.name,className:"image-viewer-img",onError:u=>{console.error("Failed to load image:",r.name),u.target.style.display="none"}})})})},Xhe=({errorMessage:t,content:e})=>{const[n,r]=M.useState(!0);M.useEffect(()=>{t!==null&&r(!0)},[t]);const i=M.useCallback(()=>{r(!1)},[]);return M.useEffect(()=>{const s=o=>{o.key==="Escape"&&i()};return document.addEventListener("keydown",s,!0),()=>{document.removeEventListener("keydown",s,!0)}},[i]),n&&t!==null?j.jsxs("div",{className:"vz-code-error-overlay",children:[j.jsx("pre",{children:t}),j.jsx("i",{className:"vz-icon-button error-dismiss-button",onClick:i,children:j.jsx(Vm,{})})]}):null},$5=t=>{const[e]=t.split("-");return parseInt(e,36)},Hhe=(t,e)=>{const n=$5(t),r=$5(e);return n>r},Yhe=(t,e,n,r)=>{n.current.has(t)?n.current.set(t,e):(n.current.set(t,e),r(i=>[...i,{user:e,join:!0,presenceId:t}]))},Ghe=(t,e,n)=>{const r=e.current.get(t);r&&(e.current.delete(t),n(i=>[...i,{user:r,join:!1,presenceId:t}]))},Khe=({docPresence:t,localPresence:e})=>{const[n,r]=M.useState([]),i=M.useRef(new Map);return M.useEffect(()=>{if(t){const s=(o,a)=>{const l=a!==null;if(Hhe(o,e.presenceId)){if(l){const c=t.remotePresences[o]?.username;Yhe(o,c,i,r)}else Ghe(o,i,r);const u=setTimeout(()=>{r(c=>c.slice(1))},5e3);return()=>{clearTimeout(u)}}};return t.on("receive",s),()=>{t.off("receive",s)}}},[t,e]),n.length>0?j.jsx("div",{className:"vz-notification",children:n.map(({user:s,join:o,presenceId:a})=>j.jsx("div",{className:"vz-notification-item",children:o?`${s} has joined the session.`:`${s} has left the session.`},a))}):null},Jhe=()=>(Math.random()+"").slice(2),ede=100,tde=2e3,nde=(t,e=!0)=>{const n=t.name?.substring(0,ede).trim(),r=(e?t.text?.substring(0,tde):t.text).trim();return["`"+n+"`:","```",r,"```"].join(`
355
355
  `)},rde="/ai-assist",ide=async({view:t,shareDBDoc:e,fileId:n,tabList:r,aiAssistEndpoint:i=rde,aiAssistOptions:s={},aiStreamId:o})=>{const a=e.data.files[n].name,l=t.state.sliceDoc(0,t.state.selection.main.from),u=t.state.sliceDoc(t.state.selection.main.to),c=l+"<FILL_ME>"+u,f={name:a,text:c},d=t.state.selection.main.to;let p=nde(f,!1);const O=await(await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...s,inputText:p,fileId:n,insertionCursor:d,aiStreamId:o})})).json();O.error&&console.error("[startAIAssist] error from server:",O.error)},sde=[{x:40,y:0,r:4},{x:28.28,y:28.28,r:4.85},{x:0,y:40,r:5.71},{x:-28.29,y:28.28,r:6.57},{x:-40,y:0,r:7.42},{x:-28.29,y:-28.29,r:8.28},{x:-.01,y:-40,r:9.14},{x:28.28,y:-28.29,r:10}],ode=({height:t=40,fill:e="currentcolor",fadeIn:n=!0})=>{const[r,i]=M.useState(!1);return M.useEffect(()=>{i(!0)},[]),r&&j.jsx("div",{className:`vz-spinner${n?" fade-in":""}`,children:j.jsx("svg",{height:t,viewBox:"0 0 100 100",style:{opacity:1},children:j.jsx("g",{transform:"translate(50, 50)",fill:e,children:j.jsx("g",{className:"vz-spinner-dots",children:sde.map(({x:s,y:o,r:a},l)=>j.jsx("circle",{cx:s,cy:o,r:a},l))})})})})},ade=({aiAssistEndpoint:t,aiAssistOptions:e,aiAssistTooltipText:n="Start AI Assist",aiAssistClickOverride:r,activeFileId:i,tabList:s,paneId:o})=>{const{shareDBDoc:a,editorCache:l,runPrettierRef:u,runCodeRef:c}=M.useContext(pr),[f,d]=M.useState(null),p=M.useCallback(async()=>{if(!(f!==null)){const y=Jhe();d(y),await ide({view:l.get(Jh(i,o)).editor,shareDBDoc:a,fileId:i,tabList:s,aiStreamId:y,aiAssistEndpoint:t,aiAssistOptions:e}),await new Promise(S=>setTimeout(S,1e3));const b=u.current;b!==null&&b();const v=c.current;v!==null&&v(),d(S=>S===y?null:S)}},[i,o,f,t,e,l,c,u,a,s]),g=f===null;return j.jsx("div",{className:"vz-code-ai-assist-widget",children:f?j.jsx(ode,{}):g&&j.jsx(Ni,{placement:"left",overlay:j.jsx(ji,{id:"ai-assist-widget-tooltip",children:n}),children:j.jsx("i",{className:"vz-icon-button",onClick:r||p,children:j.jsx(Bx,{})})})})},lde=!1,ude=({runCodeWidgetTooltipText:t=j.jsxs(j.Fragment,{children:[j.jsx("strong",{children:"Run Code"}),j.jsx("div",{children:"(Shift + Enter or Ctrl + s)"})]})})=>{const{runCodeRef:e,runPrettierRef:n,splitCurrentPane:r}=M.useContext(pr),[i,s]=M.useState(!1),o=M.useCallback(a=>{s(!0);const l=n.current;l!==null&&l();const u=e.current;u!==null&&u(),setTimeout(()=>s(!1),1e3)},[e,n]);return M.useCallback(()=>{r()},[r]),M.useEffect(()=>{const a=l=>{(l.ctrlKey&&l.key==="s"||l.shiftKey&&l.key==="Enter")&&(l.preventDefault(),o())};return window.addEventListener("keydown",a),()=>{window.removeEventListener("keydown",a)}},[o]),j.jsxs("div",{children:[j.jsx("div",{className:"vz-code-split-view-widget",children:lde}),j.jsx("div",{className:"vz-code-run-code-widget",children:j.jsx(Ni,{placement:"bottom",overlay:j.jsx(ji,{id:"run-code-widget-tooltip",children:t}),children:j.jsx("i",{className:`vz-icon-button ${i?"rotate-icon":""}`,onClick:o,children:j.jsx(Mre,{})})})})]})},cde=t=>t.match(/\.(png|jpg|jpeg|gif|bmp|svg|webp)$/i)!==null,fde=({pane:t,content:e,customInteractRules:n,enableAIAssist:r,aiAssistEndpoint:i,aiAssistOptions:s,aiAssistTooltipText:o,aiAssistClickOverride:a,aiCopilotEndpoint:l,esLintSource:u,enableBuiltInAIChat:c})=>{const[f,d]=M.useState(!1);return M.useEffect(()=>{d(!0)},[]),j.jsxs(j.Fragment,{children:[j.jsx(Uhe,{activeFileId:t.activeFileId,tabList:t.tabList}),f&&e&&t.activeFileId&&(()=>{const p=e.files[t.activeFileId];return p&&cde(p.name)?j.jsx(Whe,{}):j.jsx(Vhe,{customInteractRules:n,aiCopilotEndpoint:l,esLintSource:u,enableBuiltInAIChat:c})})(),f&&r&&e&&t.activeFileId?j.jsx(ade,{aiAssistEndpoint:i,aiAssistOptions:s,aiAssistTooltipText:o,aiAssistClickOverride:a,paneId:t.id,activeFileId:t.activeFileId,tabList:t.tabList}):null,j.jsx(ude,{})]})},hde=({enableAIAssist:t=!1,aiAssistEndpoint:e,aiAssistOptions:n,aiAssistTooltipText:r,aiAssistClickOverride:i,aiCopilotEndpoint:s,customInteractRules:o,esLintSource:a,enableAIChat:l=!0,aiChatButtonEvent:u})=>{const c=l&&!u,{codeEditorWidth:f}=M.useContext(rg),{content:d,localPresence:p,docPresence:g,pane:O,activePane:y,errorMessage:b}=M.useContext(pr);if(y.type!=="leafPane")throw new Error("Expected leafPane");return y.activeFileId!==null?j.jsxs("div",{className:"middle",style:{width:f+"px"},children:[j.jsx(fde,{pane:O,content:d,customInteractRules:o,enableAIAssist:t,aiAssistEndpoint:e,aiAssistOptions:n,aiAssistTooltipText:r,aiAssistClickOverride:i,aiCopilotEndpoint:s,esLintSource:a,enableBuiltInAIChat:c}),j.jsx(Xhe,{errorMessage:b,content:d}),j.jsx(Khe,{docPresence:g,localPresence:p})]}):null},dde=20,pde=200,T5=4,Q5=({side:t,isSidebarVisible:e=!0})=>{const{sidebarWidth:n,codeEditorWidth:r,moveSplitPane:i,isDraggingRight:s,isDraggingLeft:o,setIsDragging:a}=M.useContext(rg),{activePane:l}=M.useContext(pr),u=t==="left"||l.activeFileId,c=M.useRef(0),f=M.useCallback(b=>{b.preventDefault(),c.current=b.clientX,a(!0,t),document.body.style.cursor="col-resize"},[a,t]),d=M.useCallback(b=>{b.preventDefault();const v=b.clientX-c.current;c.current=b.clientX,i(v,t)},[i,t]),p=M.useCallback(()=>{a(!1,t),document.body.style.cursor="default"},[a,t]),g=t==="left"&&o||t==="right"&&s;M.useEffect(()=>{if(g)return document.addEventListener("mousemove",d),document.addEventListener("mouseup",p),()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",p)}},[g,d,p]);const O=g?pde:dde,y=(t==="left"?n:e?n+r:r)-O/2;return u?j.jsx("div",{className:"vz-resizer",onMouseDown:f,style:{left:y+O/2-1.5,width:O},children:j.jsx("div",{className:"vz-resizer-thumb",style:{left:T5/2-1.5,width:T5}})}):null};var tn;(function(t){t[t.NONE=0]="NONE";const n=1;t[t._abstract=n]="_abstract";const r=n+1;t[t._accessor=r]="_accessor";const i=r+1;t[t._as=i]="_as";const s=i+1;t[t._assert=s]="_assert";const o=s+1;t[t._asserts=o]="_asserts";const a=o+1;t[t._async=a]="_async";const l=a+1;t[t._await=l]="_await";const u=l+1;t[t._checks=u]="_checks";const c=u+1;t[t._constructor=c]="_constructor";const f=c+1;t[t._declare=f]="_declare";const d=f+1;t[t._enum=d]="_enum";const p=d+1;t[t._exports=p]="_exports";const g=p+1;t[t._from=g]="_from";const O=g+1;t[t._get=O]="_get";const y=O+1;t[t._global=y]="_global";const b=y+1;t[t._implements=b]="_implements";const v=b+1;t[t._infer=v]="_infer";const S=v+1;t[t._interface=S]="_interface";const x=S+1;t[t._is=x]="_is";const P=x+1;t[t._keyof=P]="_keyof";const E=P+1;t[t._mixins=E]="_mixins";const D=E+1;t[t._module=D]="_module";const R=D+1;t[t._namespace=R]="_namespace";const _=R+1;t[t._of=_]="_of";const C=_+1;t[t._opaque=C]="_opaque";const I=C+1;t[t._out=I]="_out";const T=I+1;t[t._override=T]="_override";const B=T+1;t[t._private=B]="_private";const A=B+1;t[t._protected=A]="_protected";const X=A+1;t[t._proto=X]="_proto";const G=X+1;t[t._public=G]="_public";const W=G+1;t[t._readonly=W]="_readonly";const te=W+1;t[t._require=te]="_require";const J=te+1;t[t._satisfies=J]="_satisfies";const U=J+1;t[t._set=U]="_set";const z=U+1;t[t._static=z]="_static";const Y=z+1;t[t._symbol=Y]="_symbol";const L=Y+1;t[t._type=L]="_type";const se=L+1;t[t._unique=se]="_unique";const ee=se+1;t[t._using=ee]="_using"})(tn||(tn={}));var on;(function(t){t[t.PRECEDENCE_MASK=15]="PRECEDENCE_MASK";const n=16;t[t.IS_KEYWORD=n]="IS_KEYWORD";const r=32;t[t.IS_ASSIGN=r]="IS_ASSIGN";const i=64;t[t.IS_RIGHT_ASSOCIATIVE=i]="IS_RIGHT_ASSOCIATIVE";const s=128;t[t.IS_PREFIX=s]="IS_PREFIX";const o=256;t[t.IS_POSTFIX=o]="IS_POSTFIX";const a=512;t[t.IS_EXPRESSION_START=a]="IS_EXPRESSION_START";const l=512;t[t.num=l]="num";const u=1536;t[t.bigint=u]="bigint";const c=2560;t[t.decimal=c]="decimal";const f=3584;t[t.regexp=f]="regexp";const d=4608;t[t.string=d]="string";const p=5632;t[t.name=p]="name";const g=6144;t[t.eof=g]="eof";const O=7680;t[t.bracketL=O]="bracketL";const y=8192;t[t.bracketR=y]="bracketR";const b=9728;t[t.braceL=b]="braceL";const v=10752;t[t.braceBarL=v]="braceBarL";const S=11264;t[t.braceR=S]="braceR";const x=12288;t[t.braceBarR=x]="braceBarR";const P=13824;t[t.parenL=P]="parenL";const E=14336;t[t.parenR=E]="parenR";const D=15360;t[t.comma=D]="comma";const R=16384;t[t.semi=R]="semi";const _=17408;t[t.colon=_]="colon";const C=18432;t[t.doubleColon=C]="doubleColon";const I=19456;t[t.dot=I]="dot";const T=20480;t[t.question=T]="question";const B=21504;t[t.questionDot=B]="questionDot";const A=22528;t[t.arrow=A]="arrow";const X=23552;t[t.template=X]="template";const G=24576;t[t.ellipsis=G]="ellipsis";const W=25600;t[t.backQuote=W]="backQuote";const te=27136;t[t.dollarBraceL=te]="dollarBraceL";const J=27648;t[t.at=J]="at";const U=29184;t[t.hash=U]="hash";const z=29728;t[t.eq=z]="eq";const Y=30752;t[t.assign=Y]="assign";const L=32640;t[t.preIncDec=L]="preIncDec";const se=33664;t[t.postIncDec=se]="postIncDec";const ee=34432;t[t.bang=ee]="bang";const ue=35456;t[t.tilde=ue]="tilde";const Z=35841;t[t.pipeline=Z]="pipeline";const V=36866;t[t.nullishCoalescing=V]="nullishCoalescing";const H=37890;t[t.logicalOR=H]="logicalOR";const he=38915;t[t.logicalAND=he]="logicalAND";const ve=39940;t[t.bitwiseOR=ve]="bitwiseOR";const Ae=40965;t[t.bitwiseXOR=Ae]="bitwiseXOR";const Re=41990;t[t.bitwiseAND=Re]="bitwiseAND";const F=43015;t[t.equality=F]="equality";const me=44040;t[t.lessThan=me]="lessThan";const Oe=45064;t[t.greaterThan=Oe]="greaterThan";const ie=46088;t[t.relationalOrEqual=ie]="relationalOrEqual";const re=47113;t[t.bitShiftL=re]="bitShiftL";const pe=48137;t[t.bitShiftR=pe]="bitShiftR";const Me=49802;t[t.plus=Me]="plus";const je=50826;t[t.minus=je]="minus";const _e=51723;t[t.modulo=_e]="modulo";const q=52235;t[t.star=q]="star";const ye=53259;t[t.slash=ye]="slash";const xe=54348;t[t.exponent=xe]="exponent";const ce=55296;t[t.jsxName=ce]="jsxName";const Se=56320;t[t.jsxText=Se]="jsxText";const Ee=57344;t[t.jsxEmptyText=Ee]="jsxEmptyText";const Ue=58880;t[t.jsxTagStart=Ue]="jsxTagStart";const Ge=59392;t[t.jsxTagEnd=Ge]="jsxTagEnd";const Ne=60928;t[t.typeParameterStart=Ne]="typeParameterStart";const Ve=61440;t[t.nonNullAssertion=Ve]="nonNullAssertion";const qe=62480;t[t._break=qe]="_break";const Ke=63504;t[t._case=Ke]="_case";const it=64528;t[t._catch=it]="_catch";const at=65552;t[t._continue=at]="_continue";const kt=66576;t[t._debugger=kt]="_debugger";const We=67600;t[t._default=We]="_default";const St=68624;t[t._do=St]="_do";const Wt=69648;t[t._else=Wt]="_else";const jt=70672;t[t._finally=jt]="_finally";const At=71696;t[t._for=At]="_for";const Jt=73232;t[t._function=Jt]="_function";const kn=73744;t[t._if=kn]="_if";const gn=74768;t[t._return=gn]="_return";const ln=75792;t[t._switch=ln]="_switch";const jn=77456;t[t._throw=jn]="_throw";const un=77840;t[t._try=un]="_try";const Xn=78864;t[t._var=Xn]="_var";const Mn=79888;t[t._let=Mn]="_let";const Hn=80912;t[t._const=Hn]="_const";const An=81936;t[t._while=An]="_while";const le=82960;t[t._with=le]="_with";const fe=84496;t[t._new=fe]="_new";const ge=85520;t[t._this=ge]="_this";const Ce=86544;t[t._super=Ce]="_super";const Pe=87568;t[t._class=Pe]="_class";const Be=88080;t[t._extends=Be]="_extends";const Xe=89104;t[t._export=Xe]="_export";const He=90640;t[t._import=He]="_import";const Ze=91664;t[t._yield=Ze]="_yield";const lt=92688;t[t._null=lt]="_null";const ct=93712;t[t._true=ct]="_true";const pt=94736;t[t._false=pt]="_false";const gt=95256;t[t._in=gt]="_in";const ft=96280;t[t._instanceof=ft]="_instanceof";const dt=97936;t[t._typeof=dt]="_typeof";const st=98960;t[t._void=st]="_void";const bt=99984;t[t._delete=bt]="_delete";const Nt=100880;t[t._async=Nt]="_async";const Bt=101904;t[t._get=Bt]="_get";const On=102928;t[t._set=On]="_set";const zn=103952;t[t._declare=zn]="_declare";const Yn=104976;t[t._readonly=Yn]="_readonly";const tr=106e3;t[t._abstract=tr]="_abstract";const In=107024;t[t._static=In]="_static";const nr=107536;t[t._public=nr]="_public";const Pt=108560;t[t._private=Pt]="_private";const Zt=109584;t[t._protected=Zt]="_protected";const Pn=110608;t[t._override=Pn]="_override";const Yt=112144;t[t._as=Yt]="_as";const rr=113168;t[t._enum=rr]="_enum";const Vt=114192;t[t._type=Vt]="_type";const yn=115216;t[t._implements=yn]="_implements"})(on||(on={}));var au;(function(t){t[t.backSpace=8]="backSpace";const n=10;t[t.lineFeed=n]="lineFeed";const r=9;t[t.tab=r]="tab";const i=13;t[t.carriageReturn=i]="carriageReturn";const s=14;t[t.shiftOut=s]="shiftOut";const o=32;t[t.space=o]="space";const a=33;t[t.exclamationMark=a]="exclamationMark";const l=34;t[t.quotationMark=l]="quotationMark";const u=35;t[t.numberSign=u]="numberSign";const c=36;t[t.dollarSign=c]="dollarSign";const f=37;t[t.percentSign=f]="percentSign";const d=38;t[t.ampersand=d]="ampersand";const p=39;t[t.apostrophe=p]="apostrophe";const g=40;t[t.leftParenthesis=g]="leftParenthesis";const O=41;t[t.rightParenthesis=O]="rightParenthesis";const y=42;t[t.asterisk=y]="asterisk";const b=43;t[t.plusSign=b]="plusSign";const v=44;t[t.comma=v]="comma";const S=45;t[t.dash=S]="dash";const x=46;t[t.dot=x]="dot";const P=47;t[t.slash=P]="slash";const E=48;t[t.digit0=E]="digit0";const D=49;t[t.digit1=D]="digit1";const R=50;t[t.digit2=R]="digit2";const _=51;t[t.digit3=_]="digit3";const C=52;t[t.digit4=C]="digit4";const I=53;t[t.digit5=I]="digit5";const T=54;t[t.digit6=T]="digit6";const B=55;t[t.digit7=B]="digit7";const A=56;t[t.digit8=A]="digit8";const X=57;t[t.digit9=X]="digit9";const G=58;t[t.colon=G]="colon";const W=59;t[t.semicolon=W]="semicolon";const te=60;t[t.lessThan=te]="lessThan";const J=61;t[t.equalsTo=J]="equalsTo";const U=62;t[t.greaterThan=U]="greaterThan";const z=63;t[t.questionMark=z]="questionMark";const Y=64;t[t.atSign=Y]="atSign";const L=65;t[t.uppercaseA=L]="uppercaseA";const se=66;t[t.uppercaseB=se]="uppercaseB";const ee=67;t[t.uppercaseC=ee]="uppercaseC";const ue=68;t[t.uppercaseD=ue]="uppercaseD";const Z=69;t[t.uppercaseE=Z]="uppercaseE";const V=70;t[t.uppercaseF=V]="uppercaseF";const H=71;t[t.uppercaseG=H]="uppercaseG";const he=72;t[t.uppercaseH=he]="uppercaseH";const ve=73;t[t.uppercaseI=ve]="uppercaseI";const Ae=74;t[t.uppercaseJ=Ae]="uppercaseJ";const Re=75;t[t.uppercaseK=Re]="uppercaseK";const F=76;t[t.uppercaseL=F]="uppercaseL";const me=77;t[t.uppercaseM=me]="uppercaseM";const Oe=78;t[t.uppercaseN=Oe]="uppercaseN";const ie=79;t[t.uppercaseO=ie]="uppercaseO";const re=80;t[t.uppercaseP=re]="uppercaseP";const pe=81;t[t.uppercaseQ=pe]="uppercaseQ";const Me=82;t[t.uppercaseR=Me]="uppercaseR";const je=83;t[t.uppercaseS=je]="uppercaseS";const _e=84;t[t.uppercaseT=_e]="uppercaseT";const q=85;t[t.uppercaseU=q]="uppercaseU";const ye=86;t[t.uppercaseV=ye]="uppercaseV";const xe=87;t[t.uppercaseW=xe]="uppercaseW";const ce=88;t[t.uppercaseX=ce]="uppercaseX";const Se=89;t[t.uppercaseY=Se]="uppercaseY";const Ee=90;t[t.uppercaseZ=Ee]="uppercaseZ";const Ue=91;t[t.leftSquareBracket=Ue]="leftSquareBracket";const Ge=92;t[t.backslash=Ge]="backslash";const Ne=93;t[t.rightSquareBracket=Ne]="rightSquareBracket";const Ve=94;t[t.caret=Ve]="caret";const qe=95;t[t.underscore=qe]="underscore";const Ke=96;t[t.graveAccent=Ke]="graveAccent";const it=97;t[t.lowercaseA=it]="lowercaseA";const at=98;t[t.lowercaseB=at]="lowercaseB";const kt=99;t[t.lowercaseC=kt]="lowercaseC";const We=100;t[t.lowercaseD=We]="lowercaseD";const St=101;t[t.lowercaseE=St]="lowercaseE";const Wt=102;t[t.lowercaseF=Wt]="lowercaseF";const jt=103;t[t.lowercaseG=jt]="lowercaseG";const At=104;t[t.lowercaseH=At]="lowercaseH";const Jt=105;t[t.lowercaseI=Jt]="lowercaseI";const kn=106;t[t.lowercaseJ=kn]="lowercaseJ";const gn=107;t[t.lowercaseK=gn]="lowercaseK";const ln=108;t[t.lowercaseL=ln]="lowercaseL";const jn=109;t[t.lowercaseM=jn]="lowercaseM";const un=110;t[t.lowercaseN=un]="lowercaseN";const Xn=111;t[t.lowercaseO=Xn]="lowercaseO";const Mn=112;t[t.lowercaseP=Mn]="lowercaseP";const Hn=113;t[t.lowercaseQ=Hn]="lowercaseQ";const An=114;t[t.lowercaseR=An]="lowercaseR";const le=115;t[t.lowercaseS=le]="lowercaseS";const fe=116;t[t.lowercaseT=fe]="lowercaseT";const ge=117;t[t.lowercaseU=ge]="lowercaseU";const Ce=118;t[t.lowercaseV=Ce]="lowercaseV";const Pe=119;t[t.lowercaseW=Pe]="lowercaseW";const Be=120;t[t.lowercaseX=Be]="lowercaseX";const Xe=121;t[t.lowercaseY=Xe]="lowercaseY";const He=122;t[t.lowercaseZ=He]="lowercaseZ";const Ze=123;t[t.leftCurlyBrace=Ze]="leftCurlyBrace";const lt=124;t[t.verticalBar=lt]="verticalBar";const ct=125;t[t.rightCurlyBrace=ct]="rightCurlyBrace";const pt=126;t[t.tilde=pt]="tilde";const gt=160;t[t.nonBreakingSpace=gt]="nonBreakingSpace";const ft=5760;t[t.oghamSpaceMark=ft]="oghamSpaceMark";const dt=8232;t[t.lineSeparator=dt]="lineSeparator";const st=8233;t[t.paragraphSeparator=st]="paragraphSeparator"})(au||(au={}));const s6=[9,11,12,au.space,au.nonBreakingSpace,au.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],mde=new Uint8Array(65536);for(const t of s6)mde[t]=1;function gde(t){if(t<48)return t===36;if(t<58)return!0;if(t<65)return!1;if(t<91)return!0;if(t<97)return t===95;if(t<123)return!0;if(t<128)return!1;throw new Error("Should not be called with non-ASCII char code.")}const cf=new Uint8Array(65536);for(let t=0;t<128;t++)cf[t]=gde(t)?1:0;for(let t=128;t<65536;t++)cf[t]=1;for(const t of s6)cf[t]=0;cf[8232]=0;cf[8233]=0;const Ode=cf.slice();for(let t=au.digit0;t<=au.digit9;t++)Ode[t]=0;new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8451,8613,-1,8829,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1,-1,-1,-1,-1,-1,162,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,189,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,216,-1,-1,-1,-1,-1,-1,tn._abstract<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,270,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,297,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,324,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,351,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,378,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,405,-1,-1,-1,-1,-1,-1,-1,-1,tn._accessor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._as<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,459,-1,-1,-1,-1,-1,594,-1,-1,-1,-1,-1,-1,486,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,513,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,540,-1,-1,-1,-1,-1,-1,tn._assert<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,567,-1,-1,-1,-1,-1,-1,-1,tn._asserts<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,621,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,648,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._async<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,702,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,729,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,756,-1,-1,-1,-1,-1,-1,tn._await<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,810,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,837,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,864,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,891,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._break<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,945,-1,-1,-1,-1,-1,-1,1107,-1,-1,-1,1242,-1,-1,1350,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,972,1026,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,999,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._case<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1053,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1080,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._catch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1134,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1161,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1188,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1215,-1,-1,-1,-1,-1,-1,-1,tn._checks<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1269,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1296,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1323,-1,-1,-1,-1,-1,-1,-1,(on._class<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1377,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1404,1620,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1431,-1,-1,-1,-1,-1,-1,(on._const<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1458,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1485,-1,-1,-1,-1,-1,-1,-1,-1,1512,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1539,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1566,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1593,-1,-1,-1,-1,-1,-1,-1,-1,tn._constructor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1647,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1674,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1701,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1728,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._continue<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1782,-1,-1,-1,-1,-1,-1,-1,-1,-1,2349,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1809,1971,-1,-1,2106,-1,-1,-1,-1,-1,2241,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1836,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1863,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1890,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1917,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1944,-1,-1,-1,-1,-1,-1,-1,-1,(on._debugger<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1998,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2025,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2052,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2079,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._declare<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2133,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2160,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2187,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2214,-1,-1,-1,-1,-1,-1,(on._default<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2268,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2295,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2322,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._delete<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._do<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2403,-1,2484,-1,-1,-1,-1,-1,-1,-1,-1,-1,2565,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2430,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2457,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._else<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2511,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2538,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._enum<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2592,-1,-1,-1,2727,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2619,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2646,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2673,-1,-1,-1,-1,-1,-1,(on._export<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2700,-1,-1,-1,-1,-1,-1,-1,tn._exports<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2754,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2781,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2808,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2835,-1,-1,-1,-1,-1,-1,-1,(on._extends<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2889,-1,-1,-1,-1,-1,-1,-1,2997,-1,-1,-1,-1,-1,3159,-1,-1,3213,-1,-1,3294,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2916,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2943,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2970,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._false<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3024,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3051,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3078,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3105,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3132,-1,(on._finally<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3186,-1,-1,-1,-1,-1,-1,-1,-1,(on._for<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3240,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3267,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._from<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3321,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3348,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3375,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3402,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3429,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3456,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._function<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3510,-1,-1,-1,-1,-1,-1,3564,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3537,-1,-1,-1,-1,-1,-1,tn._get<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3591,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3618,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3645,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3672,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._global<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3726,-1,-1,-1,-1,-1,-1,3753,4077,-1,-1,-1,-1,4590,-1,-1,-1,-1,-1,-1,-1,(on._if<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3780,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3807,-1,-1,3996,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3834,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3861,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3888,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3915,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3942,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3969,-1,-1,-1,-1,-1,-1,-1,tn._implements<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4023,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4050,-1,-1,-1,-1,-1,-1,(on._import<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._in<<1)+1,-1,-1,-1,-1,-1,4104,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4185,4401,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4131,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4158,-1,-1,-1,-1,-1,-1,-1,-1,tn._infer<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4212,-1,-1,-1,-1,-1,-1,-1,4239,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4266,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4293,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4320,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4347,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4374,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._instanceof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4428,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4455,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4482,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4509,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4563,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._interface<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._is<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4644,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4671,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4698,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4725,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._keyof<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4779,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4806,-1,-1,-1,-1,-1,-1,(on._let<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4860,-1,-1,-1,-1,-1,4995,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4887,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4914,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4941,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4968,-1,-1,-1,-1,-1,-1,-1,tn._mixins<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5022,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5049,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5076,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5103,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._module<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5157,-1,-1,-1,5373,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5427,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5184,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5211,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5238,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5265,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5292,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5319,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5346,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._namespace<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5400,-1,-1,-1,(on._new<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5454,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5481,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._null<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5535,-1,-1,-1,-1,-1,-1,-1,-1,-1,5562,-1,-1,-1,-1,5697,5751,-1,-1,-1,-1,tn._of<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5589,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5643,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5670,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._opaque<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5724,-1,-1,-1,-1,-1,-1,tn._out<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5778,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5805,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5832,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5859,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5886,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5913,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._override<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5967,-1,-1,6345,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5994,-1,-1,-1,-1,-1,6129,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6021,-1,-1,-1,-1,-1,6048,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6075,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6102,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._private<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6156,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6183,-1,-1,-1,-1,-1,-1,-1,-1,-1,6318,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6210,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6237,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6264,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6291,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._protected<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._proto<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6372,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6399,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6426,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6453,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._public<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6507,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6534,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6696,-1,-1,6831,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6561,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6588,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6615,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6642,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6669,-1,tn._readonly<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6723,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6750,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6777,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6804,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._require<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6858,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6885,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6912,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._return<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6966,-1,-1,-1,7182,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7236,7371,-1,7479,-1,7614,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6993,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7020,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7047,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7074,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7101,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7128,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7155,-1,-1,-1,-1,-1,-1,-1,tn._satisfies<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7209,-1,-1,-1,-1,-1,-1,tn._set<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7263,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7290,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7317,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7344,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._static<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7398,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7425,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7452,-1,-1,-1,-1,-1,-1,-1,-1,(on._super<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7506,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7533,-1,-1,-1,-1,-1,-1,-1,-1,-1,7560,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7587,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._switch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7641,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7668,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7695,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7722,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._symbol<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7776,-1,-1,-1,-1,-1,-1,-1,-1,-1,7938,-1,-1,-1,-1,-1,-1,8046,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7803,-1,-1,-1,-1,-1,-1,-1,-1,7857,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7830,-1,-1,-1,-1,-1,-1,-1,(on._this<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7884,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7911,-1,-1,-1,(on._throw<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7965,-1,-1,-1,8019,-1,-1,-1,-1,-1,-1,7992,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._true<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._try<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8073,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8100,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._type<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8127,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8154,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._typeof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8208,-1,-1,-1,-1,8343,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8235,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8262,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8289,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8316,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._unique<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8370,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8397,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8424,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,tn._using<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8478,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8532,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8505,-1,-1,-1,-1,-1,-1,-1,-1,(on._var<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8559,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8586,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._void<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8640,8748,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8667,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8694,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8721,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._while<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8775,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8802,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._with<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8856,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8883,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8910,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8937,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(on._yield<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);var M5;(function(t){t[t.Access=0]="Access";const n=1;t[t.ExportAccess=n]="ExportAccess";const r=n+1;t[t.TopLevelDeclaration=r]="TopLevelDeclaration";const i=r+1;t[t.FunctionScopedDeclaration=i]="FunctionScopedDeclaration";const s=i+1;t[t.BlockScopedDeclaration=s]="BlockScopedDeclaration";const o=s+1;t[t.ObjectShorthandTopLevelDeclaration=o]="ObjectShorthandTopLevelDeclaration";const a=o+1;t[t.ObjectShorthandFunctionScopedDeclaration=a]="ObjectShorthandFunctionScopedDeclaration";const l=a+1;t[t.ObjectShorthandBlockScopedDeclaration=l]="ObjectShorthandBlockScopedDeclaration";const u=l+1;t[t.ObjectShorthand=u]="ObjectShorthand";const c=u+1;t[t.ImportDeclaration=c]="ImportDeclaration";const f=c+1;t[t.ObjectKey=f]="ObjectKey";const d=f+1;t[t.ImportAccess=d]="ImportAccess"})(M5||(M5={}));var I5;(function(t){t[t.NoChildren=0]="NoChildren";const n=1;t[t.OneChild=n]="OneChild";const r=n+1;t[t.StaticChildren=r]="StaticChildren";const i=r+1;t[t.KeyAfterPropSpread=i]="KeyAfterPropSpread"})(I5||(I5={}));var D5="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yde=new Uint8Array(64),vde=new Uint8Array(128);for(let t=0;t<D5.length;t++){const e=D5.charCodeAt(t);yde[t]=e,vde[e]=t}var em={exports:{}},bde=em.exports,j5;function wde(){return j5||(j5=1,(function(t,e){(function(n,r){t.exports=r()})(bde,(function(){const n=/^[\w+.-]+:\/\//,r=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,i=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function s(v){return n.test(v)}function o(v){return v.startsWith("//")}function a(v){return v.startsWith("/")}function l(v){return v.startsWith("file:")}function u(v){return/^[.?#]/.test(v)}function c(v){const S=r.exec(v);return d(S[1],S[2]||"",S[3],S[4]||"",S[5]||"/",S[6]||"",S[7]||"")}function f(v){const S=i.exec(v),x=S[2];return d("file:","",S[1]||"","",a(x)?x:"/"+x,S[3]||"",S[4]||"")}function d(v,S,x,P,E,D,R){return{scheme:v,user:S,host:x,port:P,path:E,query:D,hash:R,type:7}}function p(v){if(o(v)){const x=c("http:"+v);return x.scheme="",x.type=6,x}if(a(v)){const x=c("http://foo.com"+v);return x.scheme="",x.host="",x.type=5,x}if(l(v))return f(v);if(s(v))return c(v);const S=c("http://foo.com/"+v);return S.scheme="",S.host="",S.type=v?v.startsWith("?")?3:v.startsWith("#")?2:4:1,S}function g(v){if(v.endsWith("/.."))return v;const S=v.lastIndexOf("/");return v.slice(0,S+1)}function O(v,S){y(S,S.type),v.path==="/"?v.path=S.path:v.path=g(S.path)+v.path}function y(v,S){const x=S<=4,P=v.path.split("/");let E=1,D=0,R=!1;for(let C=1;C<P.length;C++){const I=P[C];if(!I){R=!0;continue}if(R=!1,I!=="."){if(I===".."){D?(R=!0,D--,E--):x&&(P[E++]=I);continue}P[E++]=I,D++}}let _="";for(let C=1;C<E;C++)_+="/"+P[C];(!_||R&&!_.endsWith("/.."))&&(_+="/"),v.path=_}function b(v,S){if(!v&&!S)return"";const x=p(v);let P=x.type;if(S&&P!==7){const D=p(S),R=D.type;switch(P){case 1:x.hash=D.hash;case 2:x.query=D.query;case 3:case 4:O(x,D);case 5:x.user=D.user,x.host=D.host,x.port=D.port;case 6:x.scheme=D.scheme}R>P&&(P=R)}y(x,P);const E=x.query+x.hash;switch(P){case 2:case 3:return E;case 4:{const D=x.path.slice(1);return D?u(S||v)&&!u(D)?"./"+D+E:D+E:E||"."}case 5:return x.path+E;default:return x.scheme+"//"+x.user+x.host+x.port+x.path+E}}return b}))})(em)),em.exports}wde();var dh={},ph={},Ns={},N5;function PS(){if(N5)return Ns;N5=1;var t=Ns&&Ns.__extends||(function(){var s=function(o,a){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var c in u)u.hasOwnProperty(c)&&(l[c]=u[c])},s(o,a)};return function(o,a){s(o,a);function l(){this.constructor=o}o.prototype=a===null?Object.create(a):(l.prototype=a.prototype,new l)}})();Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.DetailContext=Ns.NoopContext=Ns.VError=void 0;var e=(function(s){t(o,s);function o(a,l){var u=s.call(this,l)||this;return u.path=a,Object.setPrototypeOf(u,o.prototype),u}return o})(Error);Ns.VError=e;var n=(function(){function s(){}return s.prototype.fail=function(o,a,l){return!1},s.prototype.unionResolver=function(){return this},s.prototype.createContext=function(){return this},s.prototype.resolveUnion=function(o){},s})();Ns.NoopContext=n;var r=(function(){function s(){this._propNames=[""],this._messages=[null],this._score=0}return s.prototype.fail=function(o,a,l){return this._propNames.push(o),this._messages.push(a),this._score+=l,!1},s.prototype.unionResolver=function(){return new i},s.prototype.resolveUnion=function(o){for(var a,l,u=o,c=null,f=0,d=u.contexts;f<d.length;f++){var p=d[f];(!c||p._score>=c._score)&&(c=p)}c&&c._score>0&&((a=this._propNames).push.apply(a,c._propNames),(l=this._messages).push.apply(l,c._messages))},s.prototype.getError=function(o){for(var a=[],l=this._propNames.length-1;l>=0;l--){var u=this._propNames[l];o+=typeof u=="number"?"["+u+"]":u?"."+u:"";var c=this._messages[l];c&&a.push(o+" "+c)}return new e(o,a.join("; "))},s.prototype.getErrorDetail=function(o){for(var a=[],l=this._propNames.length-1;l>=0;l--){var u=this._propNames[l];o+=typeof u=="number"?"["+u+"]":u?"."+u:"";var c=this._messages[l];c&&a.push({path:o,message:c})}for(var f=null,l=a.length-1;l>=0;l--)f&&(a[l].nested=[f]),f=a[l];return f},s})();Ns.DetailContext=r;var i=(function(){function s(){this.contexts=[]}return s.prototype.createContext=function(){var o=new r;return this.contexts.push(o),o},s})();return Ns}var L5;function F5(){return L5||(L5=1,(function(t){var e=ph&&ph.__extends||(function(){var ee=function(ue,Z){return ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(V,H){V.__proto__=H}||function(V,H){for(var he in H)H.hasOwnProperty(he)&&(V[he]=H[he])},ee(ue,Z)};return function(ue,Z){ee(ue,Z);function V(){this.constructor=ue}ue.prototype=Z===null?Object.create(Z):(V.prototype=Z.prototype,new V)}})();Object.defineProperty(t,"__esModule",{value:!0}),t.basicTypes=t.BasicType=t.TParamList=t.TParam=t.param=t.TFunc=t.func=t.TProp=t.TOptional=t.opt=t.TIface=t.iface=t.TEnumLiteral=t.enumlit=t.TEnumType=t.enumtype=t.TIntersection=t.intersection=t.TUnion=t.union=t.TTuple=t.tuple=t.TArray=t.array=t.TLiteral=t.lit=t.TName=t.name=t.TType=void 0;var n=PS(),r=(function(){function ee(){}return ee})();t.TType=r;function i(ee){return typeof ee=="string"?o(ee):ee}function s(ee,ue){var Z=ee[ue];if(!Z)throw new Error("Unknown type "+ue);return Z}function o(ee){return new a(ee)}t.name=o;var a=(function(ee){e(ue,ee);function ue(Z){var V=ee.call(this)||this;return V.name=Z,V._failMsg="is not a "+Z,V}return ue.prototype.getChecker=function(Z,V,H){var he=this,ve=s(Z,this.name),Ae=ve.getChecker(Z,V,H);return ve instanceof te||ve instanceof ue?Ae:function(Re,F){return Ae(Re,F)?!0:F.fail(null,he._failMsg,0)}},ue})(r);t.TName=a;function l(ee){return new u(ee)}t.lit=l;var u=(function(ee){e(ue,ee);function ue(Z){var V=ee.call(this)||this;return V.value=Z,V.name=JSON.stringify(Z),V._failMsg="is not "+V.name,V}return ue.prototype.getChecker=function(Z,V){var H=this;return function(he,ve){return he===H.value?!0:ve.fail(null,H._failMsg,-1)}},ue})(r);t.TLiteral=u;function c(ee){return new f(i(ee))}t.array=c;var f=(function(ee){e(ue,ee);function ue(Z){var V=ee.call(this)||this;return V.ttype=Z,V}return ue.prototype.getChecker=function(Z,V){var H=this.ttype.getChecker(Z,V);return function(he,ve){if(!Array.isArray(he))return ve.fail(null,"is not an array",0);for(var Ae=0;Ae<he.length;Ae++){var Re=H(he[Ae],ve);if(!Re)return ve.fail(Ae,null,1)}return!0}},ue})(r);t.TArray=f;function d(){for(var ee=[],ue=0;ue<arguments.length;ue++)ee[ue]=arguments[ue];return new p(ee.map(function(Z){return i(Z)}))}t.tuple=d;var p=(function(ee){e(ue,ee);function ue(Z){var V=ee.call(this)||this;return V.ttypes=Z,V}return ue.prototype.getChecker=function(Z,V){var H=this.ttypes.map(function(ve){return ve.getChecker(Z,V)}),he=function(ve,Ae){if(!Array.isArray(ve))return Ae.fail(null,"is not an array",0);for(var Re=0;Re<H.length;Re++){var F=H[Re](ve[Re],Ae);if(!F)return Ae.fail(Re,null,1)}return!0};return V?function(ve,Ae){return he(ve,Ae)?ve.length<=H.length?!0:Ae.fail(H.length,"is extraneous",2):!1}:he},ue})(r);t.TTuple=p;function g(){for(var ee=[],ue=0;ue<arguments.length;ue++)ee[ue]=arguments[ue];return new O(ee.map(function(Z){return i(Z)}))}t.union=g;var O=(function(ee){e(ue,ee);function ue(Z){var V=ee.call(this)||this;V.ttypes=Z;var H=Z.map(function(ve){return ve instanceof a||ve instanceof u?ve.name:null}).filter(function(ve){return ve}),he=Z.length-H.length;return H.length?(he>0&&H.push(he+" more"),V._failMsg="is none of "+H.join(", ")):V._failMsg="is none of "+he+" types",V}return ue.prototype.getChecker=function(Z,V){var H=this,he=this.ttypes.map(function(ve){return ve.getChecker(Z,V)});return function(ve,Ae){for(var Re=Ae.unionResolver(),F=0;F<he.length;F++){var me=he[F](ve,Re.createContext());if(me)return!0}return Ae.resolveUnion(Re),Ae.fail(null,H._failMsg,0)}},ue})(r);t.TUnion=O;function y(){for(var ee=[],ue=0;ue<arguments.length;ue++)ee[ue]=arguments[ue];return new b(ee.map(function(Z){return i(Z)}))}t.intersection=y;var b=(function(ee){e(ue,ee);function ue(Z){var V=ee.call(this)||this;return V.ttypes=Z,V}return ue.prototype.getChecker=function(Z,V){var H=new Set,he=this.ttypes.map(function(ve){return ve.getChecker(Z,V,H)});return function(ve,Ae){var Re=he.every(function(F){return F(ve,Ae)});return Re?!0:Ae.fail(null,null,0)}},ue})(r);t.TIntersection=b;function v(ee){return new S(ee)}t.enumtype=v;var S=(function(ee){e(ue,ee);function ue(Z){var V=ee.call(this)||this;return V.members=Z,V.validValues=new Set,V._failMsg="is not a valid enum value",V.validValues=new Set(Object.keys(Z).map(function(H){return Z[H]})),V}return ue.prototype.getChecker=function(Z,V){var H=this;return function(he,ve){return H.validValues.has(he)?!0:ve.fail(null,H._failMsg,0)}},ue})(r);t.TEnumType=S;function x(ee,ue){return new P(ee,ue)}t.enumlit=x;var P=(function(ee){e(ue,ee);function ue(Z,V){var H=ee.call(this)||this;return H.enumName=Z,H.prop=V,H._failMsg="is not "+Z+"."+V,H}return ue.prototype.getChecker=function(Z,V){var H=this,he=s(Z,this.enumName);if(!(he instanceof S))throw new Error("Type "+this.enumName+" used in enumlit is not an enum type");var ve=he.members[this.prop];if(!he.members.hasOwnProperty(this.prop))throw new Error("Unknown value "+this.enumName+"."+this.prop+" used in enumlit");return function(Ae,Re){return Ae===ve?!0:Re.fail(null,H._failMsg,-1)}},ue})(r);t.TEnumLiteral=P;function E(ee){return Object.keys(ee).map(function(ue){return D(ue,ee[ue])})}function D(ee,ue){return ue instanceof I?new T(ee,ue.ttype,!0):new T(ee,i(ue),!1)}function R(ee,ue){return new _(ee,E(ue))}t.iface=R;var _=(function(ee){e(ue,ee);function ue(Z,V){var H=ee.call(this)||this;return H.bases=Z,H.props=V,H.propSet=new Set(V.map(function(he){return he.name})),H}return ue.prototype.getChecker=function(Z,V,H){var he=this,ve=this.bases.map(function(ie){return s(Z,ie).getChecker(Z,V)}),Ae=this.props.map(function(ie){return ie.ttype.getChecker(Z,V)}),Re=new n.NoopContext,F=this.props.map(function(ie,re){return!ie.isOpt&&!Ae[re](void 0,Re)}),me=function(ie,re){if(typeof ie!="object"||ie===null)return re.fail(null,"is not an object",0);for(var pe=0;pe<ve.length;pe++)if(!ve[pe](ie,re))return!1;for(var pe=0;pe<Ae.length;pe++){var Me=he.props[pe].name,je=ie[Me];if(je===void 0){if(F[pe])return re.fail(Me,"is missing",1)}else{var _e=Ae[pe](je,re);if(!_e)return re.fail(Me,null,1)}}return!0};if(!V)return me;var Oe=this.propSet;return H&&(this.propSet.forEach(function(ie){return H.add(ie)}),Oe=H),function(ie,re){if(!me(ie,re))return!1;for(var pe in ie)if(!Oe.has(pe))return re.fail(pe,"is extraneous",2);return!0}},ue})(r);t.TIface=_;function C(ee){return new I(i(ee))}t.opt=C;var I=(function(ee){e(ue,ee);function ue(Z){var V=ee.call(this)||this;return V.ttype=Z,V}return ue.prototype.getChecker=function(Z,V){var H=this.ttype.getChecker(Z,V);return function(he,ve){return he===void 0||H(he,ve)}},ue})(r);t.TOptional=I;var T=(function(){function ee(ue,Z,V){this.name=ue,this.ttype=Z,this.isOpt=V}return ee})();t.TProp=T;function B(ee){for(var ue=[],Z=1;Z<arguments.length;Z++)ue[Z-1]=arguments[Z];return new A(new W(ue),i(ee))}t.func=B;var A=(function(ee){e(ue,ee);function ue(Z,V){var H=ee.call(this)||this;return H.paramList=Z,H.result=V,H}return ue.prototype.getChecker=function(Z,V){return function(H,he){return typeof H=="function"?!0:he.fail(null,"is not a function",0)}},ue})(r);t.TFunc=A;function X(ee,ue,Z){return new G(ee,i(ue),!!Z)}t.param=X;var G=(function(){function ee(ue,Z,V){this.name=ue,this.ttype=Z,this.isOpt=V}return ee})();t.TParam=G;var W=(function(ee){e(ue,ee);function ue(Z){var V=ee.call(this)||this;return V.params=Z,V}return ue.prototype.getChecker=function(Z,V){var H=this,he=this.params.map(function(F){return F.ttype.getChecker(Z,V)}),ve=new n.NoopContext,Ae=this.params.map(function(F,me){return!F.isOpt&&!he[me](void 0,ve)}),Re=function(F,me){if(!Array.isArray(F))return me.fail(null,"is not an array",0);for(var Oe=0;Oe<he.length;Oe++){var ie=H.params[Oe];if(F[Oe]===void 0){if(Ae[Oe])return me.fail(ie.name,"is missing",1)}else{var re=he[Oe](F[Oe],me);if(!re)return me.fail(ie.name,null,1)}}return!0};return V?function(F,me){return Re(F,me)?F.length<=he.length?!0:me.fail(he.length,"is extraneous",2):!1}:Re},ue})(r);t.TParamList=W;var te=(function(ee){e(ue,ee);function ue(Z,V){var H=ee.call(this)||this;return H.validator=Z,H.message=V,H}return ue.prototype.getChecker=function(Z,V){var H=this;return function(he,ve){return H.validator(he)?!0:ve.fail(null,H.message,0)}},ue})(r);t.BasicType=te,t.basicTypes={any:new te(function(ee){return!0},"is invalid"),number:new te(function(ee){return typeof ee=="number"},"is not a number"),object:new te(function(ee){return typeof ee=="object"&&ee},"is not an object"),boolean:new te(function(ee){return typeof ee=="boolean"},"is not a boolean"),string:new te(function(ee){return typeof ee=="string"},"is not a string"),symbol:new te(function(ee){return typeof ee=="symbol"},"is not a symbol"),void:new te(function(ee){return ee==null},"is not void"),undefined:new te(function(ee){return ee===void 0},"is not undefined"),null:new te(function(ee){return ee===null},"is not null"),never:new te(function(ee){return!1},"is unexpected"),Date:new te(U("[object Date]"),"is not a Date"),RegExp:new te(U("[object RegExp]"),"is not a RegExp")};var J=Object.prototype.toString;function U(ee){return function(ue){return typeof ue=="object"&&ue&&J.call(ue)===ee}}typeof Buffer<"u"&&(t.basicTypes.Buffer=new te(function(ee){return Buffer.isBuffer(ee)},"is not a Buffer"));for(var z=function(ee){t.basicTypes[ee.name]=new te(function(ue){return ue instanceof ee},"is not a "+ee.name)},Y=0,L=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];Y<L.length;Y++){var se=L[Y];z(se)}})(ph)),ph}var B5;function Sde(){return B5||(B5=1,(function(t){var e=dh&&dh.__spreadArrays||function(){for(var l=0,u=0,c=arguments.length;u<c;u++)l+=arguments[u].length;for(var f=Array(l),d=0,u=0;u<c;u++)for(var p=arguments[u],g=0,O=p.length;g<O;g++,d++)f[d]=p[g];return f};Object.defineProperty(t,"__esModule",{value:!0}),t.Checker=t.createCheckers=void 0;var n=F5(),r=PS(),i=F5();Object.defineProperty(t,"TArray",{enumerable:!0,get:function(){return i.TArray}}),Object.defineProperty(t,"TEnumType",{enumerable:!0,get:function(){return i.TEnumType}}),Object.defineProperty(t,"TEnumLiteral",{enumerable:!0,get:function(){return i.TEnumLiteral}}),Object.defineProperty(t,"TFunc",{enumerable:!0,get:function(){return i.TFunc}}),Object.defineProperty(t,"TIface",{enumerable:!0,get:function(){return i.TIface}}),Object.defineProperty(t,"TLiteral",{enumerable:!0,get:function(){return i.TLiteral}}),Object.defineProperty(t,"TName",{enumerable:!0,get:function(){return i.TName}}),Object.defineProperty(t,"TOptional",{enumerable:!0,get:function(){return i.TOptional}}),Object.defineProperty(t,"TParam",{enumerable:!0,get:function(){return i.TParam}}),Object.defineProperty(t,"TParamList",{enumerable:!0,get:function(){return i.TParamList}}),Object.defineProperty(t,"TProp",{enumerable:!0,get:function(){return i.TProp}}),Object.defineProperty(t,"TTuple",{enumerable:!0,get:function(){return i.TTuple}}),Object.defineProperty(t,"TType",{enumerable:!0,get:function(){return i.TType}}),Object.defineProperty(t,"TUnion",{enumerable:!0,get:function(){return i.TUnion}}),Object.defineProperty(t,"TIntersection",{enumerable:!0,get:function(){return i.TIntersection}}),Object.defineProperty(t,"array",{enumerable:!0,get:function(){return i.array}}),Object.defineProperty(t,"enumlit",{enumerable:!0,get:function(){return i.enumlit}}),Object.defineProperty(t,"enumtype",{enumerable:!0,get:function(){return i.enumtype}}),Object.defineProperty(t,"func",{enumerable:!0,get:function(){return i.func}}),Object.defineProperty(t,"iface",{enumerable:!0,get:function(){return i.iface}}),Object.defineProperty(t,"lit",{enumerable:!0,get:function(){return i.lit}}),Object.defineProperty(t,"name",{enumerable:!0,get:function(){return i.name}}),Object.defineProperty(t,"opt",{enumerable:!0,get:function(){return i.opt}}),Object.defineProperty(t,"param",{enumerable:!0,get:function(){return i.param}}),Object.defineProperty(t,"tuple",{enumerable:!0,get:function(){return i.tuple}}),Object.defineProperty(t,"union",{enumerable:!0,get:function(){return i.union}}),Object.defineProperty(t,"intersection",{enumerable:!0,get:function(){return i.intersection}}),Object.defineProperty(t,"BasicType",{enumerable:!0,get:function(){return i.BasicType}});var s=PS();Object.defineProperty(t,"VError",{enumerable:!0,get:function(){return s.VError}});function o(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];for(var c=Object.assign.apply(Object,e([{},n.basicTypes],l)),f={},d=0,p=l;d<p.length;d++)for(var g=p[d],O=0,y=Object.keys(g);O<y.length;O++){var b=y[O];f[b]=new a(c,g[b])}return f}t.createCheckers=o;var a=(function(){function l(u,c,f){if(f===void 0&&(f="value"),this.suite=u,this.ttype=c,this._path=f,this.props=new Map,c instanceof n.TIface)for(var d=0,p=c.props;d<p.length;d++){var g=p[d];this.props.set(g.name,g.ttype)}this.checkerPlain=this.ttype.getChecker(u,!1),this.checkerStrict=this.ttype.getChecker(u,!0)}return l.prototype.setReportedPath=function(u){this._path=u},l.prototype.check=function(u){return this._doCheck(this.checkerPlain,u)},l.prototype.test=function(u){return this.checkerPlain(u,new r.NoopContext)},l.prototype.validate=function(u){return this._doValidate(this.checkerPlain,u)},l.prototype.strictCheck=function(u){return this._doCheck(this.checkerStrict,u)},l.prototype.strictTest=function(u){return this.checkerStrict(u,new r.NoopContext)},l.prototype.strictValidate=function(u){return this._doValidate(this.checkerStrict,u)},l.prototype.getProp=function(u){var c=this.props.get(u);if(!c)throw new Error("Type has no property "+u);return new l(this.suite,c,this._path+"."+u)},l.prototype.methodArgs=function(u){var c=this._getMethod(u);return new l(this.suite,c.paramList)},l.prototype.methodResult=function(u){var c=this._getMethod(u);return new l(this.suite,c.result)},l.prototype.getArgs=function(){if(!(this.ttype instanceof n.TFunc))throw new Error("getArgs() applied to non-function");return new l(this.suite,this.ttype.paramList)},l.prototype.getResult=function(){if(!(this.ttype instanceof n.TFunc))throw new Error("getResult() applied to non-function");return new l(this.suite,this.ttype.result)},l.prototype.getType=function(){return this.ttype},l.prototype._doCheck=function(u,c){var f=new r.NoopContext;if(!u(c,f)){var d=new r.DetailContext;throw u(c,d),d.getError(this._path)}},l.prototype._doValidate=function(u,c){var f=new r.NoopContext;if(u(c,f))return null;var d=new r.DetailContext;return u(c,d),d.getErrorDetail(this._path)},l.prototype._getMethod=function(u){var c=this.props.get(u);if(!c)throw new Error("Type has no property "+u);if(!(c instanceof n.TFunc))throw new Error("Property "+u+" is not a method");return c},l})();t.Checker=a})(dh)),dh}var Ln=Sde();const xde=Ln.union(Ln.lit("jsx"),Ln.lit("typescript"),Ln.lit("flow"),Ln.lit("imports"),Ln.lit("react-hot-loader"),Ln.lit("jest")),kde=Ln.iface([],{compiledFilename:"string"}),Pde=Ln.iface([],{transforms:Ln.array("Transform"),disableESTransforms:Ln.opt("boolean"),jsxRuntime:Ln.opt(Ln.union(Ln.lit("classic"),Ln.lit("automatic"),Ln.lit("preserve"))),production:Ln.opt("boolean"),jsxImportSource:Ln.opt("string"),jsxPragma:Ln.opt("string"),jsxFragmentPragma:Ln.opt("string"),keepUnusedImports:Ln.opt("boolean"),preserveDynamicImport:Ln.opt("boolean"),injectCreateRequireForImportRequire:Ln.opt("boolean"),enableLegacyTypeScriptModuleInterop:Ln.opt("boolean"),enableLegacyBabel5ModuleInterop:Ln.opt("boolean"),sourceMapOptions:Ln.opt("SourceMapOptions"),filePath:Ln.opt("string")}),_de={Transform:xde,SourceMapOptions:kde,Options:Pde},{Options:ape}=Ln.createCheckers(_de);var q5;(function(t){t[t.TSFunctionType=0]="TSFunctionType";const n=1;t[t.TSConstructorType=n]="TSConstructorType";const r=n+1;t[t.TSAbstractConstructorType=r]="TSAbstractConstructorType"})(q5||(q5={}));var Sb={},z5;function Ede(){return z5||(z5=1,(function(t){t.__esModule=!0,t.LinesAndColumns=void 0;var e=`
356
356
  `,n="\r",r=(function(){function i(s){this.string=s;for(var o=[0],a=0;a<s.length;)switch(s[a]){case e:a+=e.length,o.push(a);break;case n:a+=n.length,s[a]===e&&(a+=e.length),o.push(a);break;default:a++;break}this.offsets=o}return i.prototype.locationForIndex=function(s){if(s<0||s>this.string.length)return null;for(var o=0,a=this.offsets;a[o+1]<=s;)o++;var l=s-a[o];return{line:o,column:l}},i.prototype.indexForLocation=function(s){var o=s.line,a=s.column;return o<0||o>=this.offsets.length||a<0||a>this.lengthOfLine(o)?null:this.offsets[o]+a},i.prototype.lengthOfLine=function(s){var o=this.offsets[s],a=s===this.offsets.length-1?this.string.length:this.offsets[s+1];return a-o},i})();t.LinesAndColumns=r,t.default=r})(Sb)),Sb}Ede();const o6=()=>(Math.random()+"").slice(2),Cde=t=>async e=>{const n=o6();return new Promise(r=>{const i=s=>{s.data.type==="invalidateVizCacheResponse"&&s.data.requestId===n&&(t.removeEventListener("message",i),r())};t.addEventListener("message",i),t.postMessage({type:"invalidateVizCacheRequest",changedVizIds:e,requestId:n})})},Rde=({worker:t,setBuildErrorMessage:e})=>({files:n,enableSourcemap:r,vizId:i})=>{const s=o6();return new Promise(o=>{const a=u=>{const c=u.data;if(c.type==="buildResponse"&&c.requestId===s){t.removeEventListener("message",a);const f=c.buildResult,d=c.error;e?.(d||null),o(f)}};t.addEventListener("message",a);const l={type:"buildRequest",files:n,enableSourcemap:r,requestId:s,vizId:i};t.postMessage(l)})},xb="IDLE",kb="ENQUEUED",U5="PENDING_CLEAN",Pb="PENDING_DIRTY",Ade=({iframe:t,worker:e,setBuildErrorMessage:n,getLatestContent:r,resolveSlugKey:i,writeFile:s,handleRuntimeError:o})=>{let a=xb,l=null;const u=Rde({worker:e,setBuildErrorMessage:n}),c=({data:O})=>{if(O.type==="contentRequest"&&r){const{vizId:y}=O;r(y).then(b=>{e.postMessage({type:"contentResponse",vizId:y,content:b})})}else if(O.type==="resolveSlugRequest"){const{slugKey:y,requestId:b}=O;if(i)i(y).then(v=>{const S={type:"resolveSlugResponse",vizId:v,requestId:b};e.postMessage(S)});else{const v={type:"resolveSlugResponse",vizId:null,requestId:b};e.postMessage(v)}}};e.addEventListener("message",c);const f=O=>{const y=O.data;(y.type==="runDone"||y.type==="runError")&&y.type==="runError"&&n&&n(y.error.message),y.type==="runtimeError"&&o&&o(y.formattedErrorMessage),y.type==="writeFile"&&s&&y.fileName&&y.content&&s(y.fileName,y.content)};window.addEventListener("message",f);const d=()=>{e.removeEventListener("message",c),window.removeEventListener("message",f)},p=async({files:O,enableHotReloading:y=!1,enableSourcemap:b=!1,vizId:v,clearConsole:S=!0})=>{a=U5;const x=await u({files:O,enableSourcemap:b,vizId:v});if(x){const{html:P,runtimeVersion:E,js:D,css:R}=x;if(S&&console.clear(),y&&(E==="v3"||E==="v4")){if(R){const _={type:"runCSS",css:R};if(!t.contentWindow)throw new Error("iframe.contentWindow is null - this should never happen");t.contentWindow.postMessage(_,window.location.origin)}if(D){const _={type:"runJS",js:D};if(!t.contentWindow)throw new Error("iframe.contentWindow is null - this should never happen");t.contentWindow.postMessage(_,window.location.origin)}}else t.srcdoc=P||""}a===Pb?(requestAnimationFrame(()=>{if(!l)throw new Error("latestFiles is not defined and state is PENDING_DIRTY - this should never happen");p({files:l,enableHotReloading:y,enableSourcemap:b,vizId:v,clearConsole:S})}),a=kb):a=xb},g=({files:O,enableHotReloading:y=!1,enableSourcemap:b=!1,vizId:v=void 0,clearConsole:S=!0})=>{if(l=null,a===xb)a=kb,p({files:O,enableHotReloading:y,enableSourcemap:b,vizId:v,clearConsole:S});else if(a===U5)l=O,a=Pb;else if(a===Pb)l=O;else if(a===kb)l=O;else throw new Error(`Unexpected state: ${a}`)};return{invalidateVizCache:Cde(e),run:g,cleanup:d}};function $de(t){return new Worker("/assets/buildWorker-BZlya278.js",{name:t?.name})}const Tde=()=>{const t=M.useRef(null),e=M.useRef(!0),n=M.useRef(void 0),{content:r,handleRuntimeError:i,clearRuntimeError:s,iframeRef:o}=M.useContext(pr),a=M.useMemo(()=>r?bK(r.files):null,[r]),l=r?.isInteracting||!1,u=r?.runId,c=r?.hardRerun||!1,f=u!==n.current;return f&&(n.current=u),M.useEffect(()=>{if(a){if(!t.current&&o.current){const d=new $de;t.current=Ade({iframe:o.current,worker:d,setBuildErrorMessage:p=>{p&&console.error("Build error:",p)},handleRuntimeError:i})}(e.current||l||f)&&(s(),t.current?.run({files:a,enableHotReloading:l,enableSourcemap:!0,vizId:"example-viz",clearConsole:!1}),e.current=!1)}},[a,l,f,c,s,i,o]),j.jsx("div",{className:"right",children:j.jsx("iframe",{ref:o})})},Qde="vzCodeUsername",Mde="Anonymous",Ide=()=>{let t=Mde;if(typeof window<"u"){const e=window.localStorage.getItem(Qde);e!==null&&(t=e)}return t},Dde=t=>{const e=M.useRef(t);M.useEffect(()=>{e.current!==t&&(e.current=t,window.localStorage.setItem("vzCodeUsername",t))},[t])},jde=t=>e=>{const n=t.data,r=fF(n,e(n));r&&t&&t.submitOp(r)},Nde=t=>M.useCallback(()=>jde(t),[t])(),Lde=1e3,Fde=t=>{const e=M.useRef(),[n,r]=M.useState(!1),i=M.useCallback(()=>{t&&t.whenNothingPending(()=>{r(!1)})},[t,r]);return M.useEffect(()=>{t&&t.on("before op",()=>{r(!0),clearTimeout(e.current),e.current=setTimeout(()=>{i()},Lde)})},[t,i]),n},Bde=({connection:t})=>{const[e,n]=M.useState(null),[r,i]=M.useState(null),[s,o]=M.useState(null),[a,l]=M.useState(null),[u,c]=M.useState(!1);M.useEffect(()=>{t.on("connected",()=>{c(!0)}),t.on("disconnected",()=>{c(!1)});const p="documents",g="1",O=t.get(p,g);return O.subscribe(()=>{n(O),l(O.data),O.on("op",()=>{l(O.data)});const y=t.getDocPresence(p,g);y.subscribe(function(v){if(v)throw v});const b=()=>{const v=Date.now().toString(36),S=_w();return`${v}-${S}`};i(y.create(b())),o(y)}),()=>{}},[t]);const f=Fde(e),d=Nde(e);return{shareDBDoc:e,content:a,localPresence:r,docPresence:s,submitOperation:d,connected:u,pending:f}};function qde(t){return new Worker("/assets/worker-BfgPD8zR.js",{name:t?.name})}let zde=0;const _b=new Map,Ude=()=>{const[t,e]=M.useState(null);return M.useEffect(()=>{e(new qde)},[]),M.useEffect(()=>{if(!t)return;const r=i=>{const{diagnostics:s,requestId:o,error:a}=i.data;a&&console.error("[ESLint] Error:",a);const l=_b.get(o);l&&(l(s),_b.delete(o))};return t.addEventListener("message",r),()=>{t.removeEventListener("message",r),t.terminate()}},[t]),{esLintSource:M.useCallback(async r=>{const i=r.state.field(o4);try{const s=r.state.doc.toString(),o=zde++;return new Promise(a=>{_b.set(o,a),t.postMessage({code:s,requestId:o,fileName:i})})}catch(s){return console.error("[ESLint] Error in linter:",s),[]}},[t])}},Zde=t=>new URLSearchParams(t).get("file")?"files":"ai-chat",Vde=new hF;X5.types.register(Gl.type);const{Connection:Wde}=X5,Xde=window.location.protocol==="https:"?"wss://":"ws://",Hde=new WebSocket(Xde+window.location.host+"/ws"),Yde=new Wde(Hde),Gde=()=>{const{username:t}=M.useContext(pr);return Dde(t),null};function Kde(){const{shareDBDoc:t,content:e,localPresence:n,docPresence:r,submitOperation:i,connected:s,pending:o}=Bde({connection:Yde}),[a,l]=M.useState(void 0),[u,c]=M.useState(Cb()),[f,d]=M.useState(!1),{esLintSource:p}=Ude(),g=Ide(),[O]=M.useState(()=>Zde(window.location.search)),y=j.jsxs(j.Fragment,{children:[j.jsxs("div",{className:"app",children:[j.jsx(Bhe,{}),j.jsx(hde,{aiCopilotEndpoint:null,esLintSource:p}),j.jsx(Tde,{}),j.jsx(Q5,{side:"left"}),j.jsx(Q5,{side:"right"})]}),j.jsx(Gde,{})]});return j.jsx(SF,{children:j.jsx(tre,{content:e,shareDBDoc:t,submitOperation:i,localPresence:n,docPresence:r,prettierWorker:Vde,initialUsername:g,initialSidebarView:O,connected:s,pending:o,liveKitRoomName:u,setLiveKitRoom:c,liveKitToken:a,setLiveKitToken:l,liveKitConnection:f,setLiveKitConnection:d,aiChatEndpoint:"/ai-chat-message",aiChatOptions:{},children:y})})}window.addEventListener("error",t=>{if(t.error instanceof RangeError&&t.error.message.includes("Trying to find position for a DOM position outside of the document"))return console.log("Suppressed CodeMirror DOM position error:",t.error),!0});W5.createRoot(document.getElementById("root")).render(j.jsx(tN,{children:j.jsx(Kde,{})}));