expxagents 0.18.0 → 0.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/src/commands/info.d.ts +2 -0
- package/dist/cli/src/commands/info.js +28 -0
- package/dist/cli/src/commands/login.d.ts +2 -0
- package/dist/cli/src/commands/login.js +41 -0
- package/dist/cli/src/commands/logout.d.ts +2 -0
- package/dist/cli/src/commands/logout.js +8 -0
- package/dist/cli/src/commands/publish.d.ts +2 -0
- package/dist/cli/src/commands/publish.js +24 -0
- package/dist/cli/src/commands/registry-install.d.ts +2 -0
- package/dist/cli/src/commands/registry-install.js +28 -0
- package/dist/cli/src/commands/search.d.ts +2 -0
- package/dist/cli/src/commands/search.js +35 -0
- package/dist/cli/src/commands/whoami.d.ts +2 -0
- package/dist/cli/src/commands/whoami.js +23 -0
- package/dist/cli/src/index.js +14 -0
- package/dist/dashboard/assets/{BufferResource-BZC_atPt.js → BufferResource-CLv7EZ_5.js} +1 -1
- package/dist/dashboard/assets/{CanvasRenderer-BakjfL_q.js → CanvasRenderer-B6OT6Eju.js} +1 -1
- package/dist/dashboard/assets/{JarvisView-Bn7dwIiz.js → JarvisView-DY_DfOO_.js} +1 -1
- package/dist/dashboard/assets/{RenderTargetSystem-CBLACb3V.js → RenderTargetSystem-oHTzuh-F.js} +1 -1
- package/dist/dashboard/assets/{ThreeBackground-DcXSelDi.js → ThreeBackground-DNuijkpe.js} +1 -1
- package/dist/dashboard/assets/{WebGLRenderer-D9cKbOni.js → WebGLRenderer-Cbi_mVTn.js} +1 -1
- package/dist/dashboard/assets/{WebGPURenderer-KbvRWq3V.js → WebGPURenderer-Cu04nEL8.js} +1 -1
- package/dist/dashboard/assets/{browserAll-BSDNyYL5.js → browserAll-DtIBJ0M2.js} +1 -1
- package/dist/dashboard/assets/{index-CCq_Zs-m.js → index-C_t8dRMU.js} +7 -7
- package/dist/dashboard/assets/{webworkerAll-ByXVHd6c.js → webworkerAll-zhS3J6-M.js} +1 -1
- package/dist/dashboard/index.html +1 -1
- package/dist/server/api/registry-routes.d.ts.map +1 -1
- package/dist/server/api/registry-routes.js +45 -239
- package/dist/server/api/registry-routes.js.map +1 -1
- package/dist/server/app.d.ts.map +1 -1
- package/dist/server/app.js +25 -5
- package/dist/server/app.js.map +1 -1
- package/dist/server/config.d.ts +1 -0
- package/dist/server/config.d.ts.map +1 -1
- package/dist/server/config.js +3 -0
- package/dist/server/config.js.map +1 -1
- package/dist/server/services/squad-registry.d.ts +0 -17
- package/dist/server/services/squad-registry.d.ts.map +1 -1
- package/dist/server/services/squad-registry.js +0 -23
- package/dist/server/services/squad-registry.js.map +1 -1
- package/package.json +3 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ThreeBackground-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ThreeBackground-DNuijkpe.js","assets/three-BZk_I9Ly.js","assets/browserAll-DtIBJ0M2.js","assets/webworkerAll-zhS3J6-M.js","assets/WebGPURenderer-Cu04nEL8.js","assets/BufferResource-CLv7EZ_5.js","assets/RenderTargetSystem-oHTzuh-F.js","assets/WebGLRenderer-Cbi_mVTn.js","assets/CanvasRenderer-B6OT6Eju.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var U8=Object.defineProperty;var P8=(t,e,n)=>e in t?U8(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var KA=(t,e,n)=>P8(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();const O8="modulepreload",z8=function(t){return"/"+t},LM={},Gf=function(e,n,i){let o=Promise.resolve();if(n&&n.length>0){let d=function(p){return Promise.all(p.map(g=>Promise.resolve(g).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=d(n.map(p=>{if(p=z8(p),p in LM)return;LM[p]=!0;const g=p.endsWith(".css"),x=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${x}`))return;const y=document.createElement("link");if(y.rel=g?"stylesheet":O8,g||(y.as="script"),y.crossOrigin="",y.href=p,h&&y.setAttribute("nonce",h),document.head.appendChild(y),g)return new Promise((E,N)=>{y.addEventListener("load",E),y.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${p}`)))})}))}function l(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return o.then(d=>{for(const f of d||[])f.status==="rejected"&&l(f.reason);return e().catch(l)})};function Qf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var WA={exports:{}},AS={},QA={exports:{}},p1={exports:{}};p1.exports;var IM;function B8(){return IM||(IM=1,(function(t,e){/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.development.js
|
|
@@ -286,7 +286,7 @@ You might need to use a local HTTP server (instead of file://): https://react.de
|
|
|
286
286
|
|
|
287
287
|
Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let g=_c(),x;if(e){let A=typeof e=="string"?hv(e):e;zr(h==="/"||((D=A.pathname)==null?void 0:D.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${A.pathname}" was given in the \`location\` prop.`),x=A}else x=g;let y=x.pathname||"/",E=y;if(h!=="/"){let A=h.replace(/^\//,"").split("/");E="/"+y.replace(/^\//,"").split("/").slice(A.length).join("/")}let N=D3(t,{pathname:E});yc(p||N!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),yc(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let T=OB(N&&N.map(A=>Object.assign({},A,{params:Object.assign({},d,A.params),pathname:hd([h,i.encodeLocation?i.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?h:hd([h,i.encodeLocation?i.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),o,n);return e&&T?O.createElement(J1.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...x},navigationType:"POP"}},T):T}function MB(){let t=HB(),e=xB(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},l={padding:"2px 4px",backgroundColor:i},d=null;return console.error("Error handled by React Router default ErrorBoundary:",t),d=O.createElement(O.Fragment,null,O.createElement("p",null,"💿 Hey developer 👋"),O.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",O.createElement("code",{style:l},"ErrorBoundary")," or"," ",O.createElement("code",{style:l},"errorElement")," prop on your route.")),O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},e),n?O.createElement("pre",{style:o},n):null,d)}var VB=O.createElement(MB,null),O3=class extends O.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const n=AB(t.digest);n&&(t=n)}let e=t!==void 0?O.createElement(Ec.Provider,{value:this.props.routeContext},O.createElement(HR.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?O.createElement(UB,{error:t},e):e}};O3.contextType=EB;var rC=new WeakMap;function UB({children:t,error:e}){let{basename:n}=O.useContext(fl);if(typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let i=DB(e.digest);if(i){let o=rC.get(e);if(o)throw o;let l=R3(i.location,n);if(T3&&!rC.get(e))if(l.isExternal||i.reloadDocument)window.location.href=l.absoluteURL||l.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(l.to,{replace:i.replace}));throw rC.set(e,d),d}return O.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l.absoluteURL||l.to}`})}}return t}function PB({routeContext:t,match:e,children:n}){let i=O.useContext(mv);return i&&i.static&&i.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=e.route.id),O.createElement(Ec.Provider,{value:t},n)}function OB(t,e=[],n){let i=n==null?void 0:n.state;if(t==null){if(!i)return null;if(i.errors)t=i.matches;else if(e.length===0&&!i.initialized&&i.matches.length>0)t=i.matches;else return null}let o=t,l=i==null?void 0:i.errors;if(l!=null){let g=o.findIndex(x=>x.route.id&&(l==null?void 0:l[x.route.id])!==void 0);zr(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,g+1))}let d=!1,f=-1;if(n&&i){d=i.renderFallback;for(let g=0;g<o.length;g++){let x=o[g];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(f=g),x.route.id){let{loaderData:y,errors:E}=i,N=x.route.loader&&!y.hasOwnProperty(x.route.id)&&(!E||E[x.route.id]===void 0);if(x.route.lazy||N){n.isStatic&&(d=!0),f>=0?o=o.slice(0,f+1):o=[o[0]];break}}}}let h=n==null?void 0:n.onError,p=i&&h?(g,x)=>{var y,E;h(g,{location:i.location,params:((E=(y=i.matches)==null?void 0:y[0])==null?void 0:E.params)??{},unstable_pattern:yB(i.matches),errorInfo:x})}:void 0;return o.reduceRight((g,x,y)=>{let E,N=!1,T=null,D=null;i&&(E=l&&x.route.id?l[x.route.id]:void 0,T=x.route.errorElement||VB,d&&(f<0&&y===0?(z3("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,D=null):f===y&&(N=!0,D=x.route.hydrateFallbackElement||null)));let A=e.concat(o.slice(0,y+1)),M=()=>{let j;return E?j=T:N?j=D:x.route.Component?j=O.createElement(x.route.Component,null):x.route.element?j=x.route.element:j=g,O.createElement(PB,{match:x,routeContext:{outlet:g,matches:A,isDataRoute:i!=null},children:j})};return i&&(x.route.ErrorBoundary||x.route.errorElement||y===0)?O.createElement(O3,{location:i.location,revalidation:i.revalidation,component:T,error:E,children:M(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:p}):M()},null)}function qR(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zB(t){let e=O.useContext(mv);return zr(e,qR(t)),e}function BB(t){let e=O.useContext(eD);return zr(e,qR(t)),e}function LB(t){let e=O.useContext(Ec);return zr(e,qR(t)),e}function FR(t){let e=LB(t),n=e.matches[e.matches.length-1];return zr(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function IB(){return FR("useRouteId")}function HB(){var i;let t=O.useContext(HR),e=BB("useRouteError"),n=FR("useRouteError");return t!==void 0?t:(i=e.errors)==null?void 0:i[n]}function qB(){let{router:t}=zB("useNavigate"),e=FR("useNavigate"),n=O.useRef(!1);return U3(()=>{n.current=!0}),O.useCallback(async(o,l={})=>{yc(n.current,V3),n.current&&(typeof o=="number"?await t.navigate(o):await t.navigate(o,{fromRouteId:e,...l}))},[t,e])}var nV={};function z3(t,e,n){!e&&!nV[t]&&(nV[t]=!0,yc(!1,n))}O.memo(FB);function FB({routes:t,future:e,state:n,isStatic:i,onError:o}){return P3(t,void 0,{state:n,isStatic:i,onError:o})}function GB({to:t,replace:e,state:n,relative:i}){zr(pv(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=O.useContext(fl);yc(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:l}=O.useContext(Ec),{pathname:d}=_c(),f=tD(),h=JN(t,IR(l),d,i==="path"),p=JSON.stringify(h);return O.useEffect(()=>{f(JSON.parse(p),{replace:e,state:n,relative:i})},[f,p,i,e,n]),null}function rV(t){return jB(t.context)}function ys(t){zr(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function YB({basename:t="/",children:e=null,location:n,navigationType:i="POP",navigator:o,static:l=!1,unstable_useTransitions:d}){zr(!pv(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=t.replace(/^\/*/,"/"),h=O.useMemo(()=>({basename:f,navigator:o,static:l,unstable_useTransitions:d,future:{}}),[f,o,l,d]);typeof n=="string"&&(n=hv(n));let{pathname:p="/",search:g="",hash:x="",state:y=null,key:E="default",unstable_mask:N}=n,T=O.useMemo(()=>{let D=Xf(p,f);return D==null?null:{location:{pathname:D,search:g,hash:x,state:y,key:E,unstable_mask:N},navigationType:i}},[f,p,g,x,y,E,i,N]);return yc(T!=null,`<Router basename="${f}"> is not able to match the URL "${p}${g}${x}" because it does not start with the basename, so the <Router> won't render anything.`),T==null?null:O.createElement(fl.Provider,{value:h},O.createElement(J1.Provider,{children:e,value:T}))}function $B({children:t,location:e}){return kB(UT(t),e)}function UT(t,e=[]){let n=[];return O.Children.forEach(t,(i,o)=>{if(!O.isValidElement(i))return;let l=[...e,o];if(i.type===O.Fragment){n.push.apply(n,UT(i.props.children,l));return}zr(i.type===ys,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),zr(!i.props.index||!i.props.children,"An index route cannot have child routes.");let d={id:i.props.id||l.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(d.children=UT(i.props.children,l)),n.push(d)}),n}var gN="get",bN="application/x-www-form-urlencoded";function nD(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function XB(t){return nD(t)&&t.tagName.toLowerCase()==="button"}function KB(t){return nD(t)&&t.tagName.toLowerCase()==="form"}function WB(t){return nD(t)&&t.tagName.toLowerCase()==="input"}function QB(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function ZB(t,e){return t.button===0&&(!e||e==="_self")&&!QB(t)}var CS=null;function JB(){if(CS===null)try{new FormData(document.createElement("form"),0),CS=!1}catch{CS=!0}return CS}var eL=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function iC(t){return t!=null&&!eL.has(t)?(yc(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${bN}"`),null):t}function tL(t,e){let n,i,o,l,d;if(KB(t)){let f=t.getAttribute("action");i=f?Xf(f,e):null,n=t.getAttribute("method")||gN,o=iC(t.getAttribute("enctype"))||bN,l=new FormData(t)}else if(XB(t)||WB(t)&&(t.type==="submit"||t.type==="image")){let f=t.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=t.getAttribute("formaction")||f.getAttribute("action");if(i=h?Xf(h,e):null,n=t.getAttribute("formmethod")||f.getAttribute("method")||gN,o=iC(t.getAttribute("formenctype"))||iC(f.getAttribute("enctype"))||bN,l=new FormData(f,t),!JB()){let{name:p,type:g,value:x}=t;if(g==="image"){let y=p?`${p}.`:"";l.append(`${y}x`,"0"),l.append(`${y}y`,"0")}else p&&l.append(p,x)}}else{if(nD(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=gN,i=null,o=bN,d=t}return l&&o==="text/plain"&&(d=l,l=void 0),{action:i,method:n.toLowerCase(),encType:o,formData:l,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function GR(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function nL(t,e,n,i){let o=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${i}`:o.pathname=`${o.pathname}.${i}`:o.pathname==="/"?o.pathname=`_root.${i}`:e&&Xf(o.pathname,e)==="/"?o.pathname=`${e.replace(/\/$/,"")}/_root.${i}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${i}`,o}async function rL(t,e){if(t.id in e)return e[t.id];try{let n=await import(t.module);return e[t.id]=n,n}catch(n){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function iL(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function sL(t,e,n){let i=await Promise.all(t.map(async o=>{let l=e.routes[o.route.id];if(l){let d=await rL(l,n);return d.links?d.links():[]}return[]}));return uL(i.flat(1).filter(iL).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function iV(t,e,n,i,o,l){let d=(h,p)=>n[p]?h.route.id!==n[p].route.id:!0,f=(h,p)=>{var g;return n[p].pathname!==h.pathname||((g=n[p].route.path)==null?void 0:g.endsWith("*"))&&n[p].params["*"]!==h.params["*"]};return l==="assets"?e.filter((h,p)=>d(h,p)||f(h,p)):l==="data"?e.filter((h,p)=>{var x;let g=i.routes[h.route.id];if(!g||!g.hasLoader)return!1;if(d(h,p)||f(h,p))return!0;if(h.route.shouldRevalidate){let y=h.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((x=n[0])==null?void 0:x.params)||{},nextUrl:new URL(t,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function oL(t,e,{includeHydrateFallback:n}={}){return aL(t.map(i=>{let o=e.routes[i.route.id];if(!o)return[];let l=[o.module];return o.clientActionModule&&(l=l.concat(o.clientActionModule)),o.clientLoaderModule&&(l=l.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(l=l.concat(o.hydrateFallbackModule)),o.imports&&(l=l.concat(o.imports)),l}).flat(1))}function aL(t){return[...new Set(t)]}function lL(t){let e={},n=Object.keys(t).sort();for(let i of n)e[i]=t[i];return e}function uL(t,e){let n=new Set;return new Set(e),t.reduce((i,o)=>{let l=JSON.stringify(lL(o));return n.has(l)||(n.add(l),i.push({key:l,link:o})),i},[])}function B3(){let t=O.useContext(mv);return GR(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function cL(){let t=O.useContext(eD);return GR(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var YR=O.createContext(void 0);YR.displayName="FrameworkContext";function L3(){let t=O.useContext(YR);return GR(t,"You must render this element inside a <HydratedRouter> element"),t}function dL(t,e){let n=O.useContext(YR),[i,o]=O.useState(!1),[l,d]=O.useState(!1),{onFocus:f,onBlur:h,onMouseEnter:p,onMouseLeave:g,onTouchStart:x}=e,y=O.useRef(null);O.useEffect(()=>{if(t==="render"&&d(!0),t==="viewport"){let T=A=>{A.forEach(M=>{d(M.isIntersecting)})},D=new IntersectionObserver(T,{threshold:.5});return y.current&&D.observe(y.current),()=>{D.disconnect()}}},[t]),O.useEffect(()=>{if(i){let T=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(T)}}},[i]);let E=()=>{o(!0)},N=()=>{o(!1),d(!1)};return n?t!=="intent"?[l,y,{}]:[l,y,{onFocus:QE(f,E),onBlur:QE(h,N),onMouseEnter:QE(p,E),onMouseLeave:QE(g,N),onTouchStart:QE(x,E)}]:[!1,y,{}]}function QE(t,e){return n=>{t&&t(n),n.defaultPrevented||e(n)}}function fL({page:t,...e}){let{router:n}=B3(),i=O.useMemo(()=>D3(n.routes,t,n.basename),[n.routes,t,n.basename]);return i?O.createElement(mL,{page:t,matches:i,...e}):null}function hL(t){let{manifest:e,routeModules:n}=L3(),[i,o]=O.useState([]);return O.useEffect(()=>{let l=!1;return sL(t,e,n).then(d=>{l||o(d)}),()=>{l=!0}},[t,e,n]),i}function mL({page:t,matches:e,...n}){let i=_c(),{future:o,manifest:l,routeModules:d}=L3(),{basename:f}=B3(),{loaderData:h,matches:p}=cL(),g=O.useMemo(()=>iV(t,e,p,l,i,"data"),[t,e,p,l,i]),x=O.useMemo(()=>iV(t,e,p,l,i,"assets"),[t,e,p,l,i]),y=O.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let T=new Set,D=!1;if(e.forEach(M=>{var U;let j=l.routes[M.route.id];!j||!j.hasLoader||(!g.some(B=>B.route.id===M.route.id)&&M.route.id in h&&((U=d[M.route.id])!=null&&U.shouldRevalidate)||j.hasClientLoader?D=!0:T.add(M.route.id))}),T.size===0)return[];let A=nL(t,f,o.unstable_trailingSlashAwareDataRequests,"data");return D&&T.size>0&&A.searchParams.set("_routes",e.filter(M=>T.has(M.route.id)).map(M=>M.route.id).join(",")),[A.pathname+A.search]},[f,o.unstable_trailingSlashAwareDataRequests,h,i,l,g,e,t,d]),E=O.useMemo(()=>oL(x,l),[x,l]),N=hL(x);return O.createElement(O.Fragment,null,y.map(T=>O.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...n})),E.map(T=>O.createElement("link",{key:T,rel:"modulepreload",href:T,...n})),N.map(({key:T,link:D})=>O.createElement("link",{key:T,nonce:n.nonce,...D,crossOrigin:D.crossOrigin??n.crossOrigin})))}function pL(...t){return e=>{t.forEach(n=>{typeof n=="function"?n(e):n!=null&&(n.current=e)})}}var gL=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{gL&&(window.__reactRouterVersion="7.13.1")}catch{}function bL({basename:t,children:e,unstable_useTransitions:n,window:i}){let o=O.useRef();o.current==null&&(o.current=X8({window:i,v5Compat:!0}));let l=o.current,[d,f]=O.useState({action:l.action,location:l.location}),h=O.useCallback(p=>{n===!1?f(p):O.startTransition(()=>f(p))},[n]);return O.useLayoutEffect(()=>l.listen(h),[l,h]),O.createElement(YB,{basename:t,children:e,location:d.location,navigationType:d.action,navigator:l,unstable_useTransitions:n})}var I3=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,H3=O.forwardRef(function({onClick:e,discover:n="render",prefetch:i="none",relative:o,reloadDocument:l,replace:d,unstable_mask:f,state:h,target:p,to:g,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:E,...N},T){let{basename:D,navigator:A,unstable_useTransitions:M}=O.useContext(fl),j=typeof g=="string"&&I3.test(g),U=R3(g,D);g=U.to;let B=CB(g,{relative:o}),P=_c(),K=null;if(f){let Q=JN(f,[],P.unstable_mask?P.unstable_mask.pathname:"/",!0);D!=="/"&&(Q.pathname=Q.pathname==="/"?D:hd([D,Q.pathname])),K=A.createHref(Q)}let[oe,X,I]=dL(i,N),G=vL(g,{replace:d,unstable_mask:f,state:h,target:p,preventScrollReset:x,relative:o,viewTransition:y,unstable_defaultShouldRevalidate:E,unstable_useTransitions:M});function Y(Q){e&&e(Q),Q.defaultPrevented||G(Q)}let J=!(U.isExternal||l),$=O.createElement("a",{...N,...I,href:(J?K:void 0)||U.absoluteURL||B,onClick:J?Y:e,ref:pL(T,X),target:p,"data-discover":!j&&n==="render"?"true":void 0});return oe&&!j?O.createElement(O.Fragment,null,$,O.createElement(fL,{page:B})):$});H3.displayName="Link";var q3=O.forwardRef(function({"aria-current":e="page",caseSensitive:n=!1,className:i="",end:o=!1,style:l,to:d,viewTransition:f,children:h,...p},g){let x=e_(d,{relative:p.relative}),y=_c(),E=O.useContext(eD),{navigator:N,basename:T}=O.useContext(fl),D=E!=null&&NL(x)&&f===!0,A=N.encodeLocation?N.encodeLocation(x).pathname:x.pathname,M=y.pathname,j=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;n||(M=M.toLowerCase(),j=j?j.toLowerCase():null,A=A.toLowerCase()),j&&T&&(j=Xf(j,T)||j);const U=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let B=M===A||!o&&M.startsWith(A)&&M.charAt(U)==="/",P=j!=null&&(j===A||!o&&j.startsWith(A)&&j.charAt(A.length)==="/"),K={isActive:B,isPending:P,isTransitioning:D},oe=B?e:void 0,X;typeof i=="function"?X=i(K):X=[i,B?"active":null,P?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let I=typeof l=="function"?l(K):l;return O.createElement(H3,{...p,"aria-current":oe,className:X,ref:g,style:I,to:d,viewTransition:f},typeof h=="function"?h(K):h)});q3.displayName="NavLink";var xL=O.forwardRef(({discover:t="render",fetcherKey:e,navigate:n,reloadDocument:i,replace:o,state:l,method:d=gN,action:f,onSubmit:h,relative:p,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:y,...E},N)=>{let{unstable_useTransitions:T}=O.useContext(fl),D=wL(),A=SL(f,{relative:p}),M=d.toLowerCase()==="get"?"get":"post",j=typeof f=="string"&&I3.test(f),U=B=>{if(h&&h(B),B.defaultPrevented)return;B.preventDefault();let P=B.nativeEvent.submitter,K=(P==null?void 0:P.getAttribute("formmethod"))||d,oe=()=>D(P||B.currentTarget,{fetcherKey:e,method:K,navigate:n,replace:o,state:l,relative:p,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:y});T&&n!==!1?O.startTransition(()=>oe()):oe()};return O.createElement("form",{ref:N,method:M,action:A,onSubmit:i?h:U,...E,"data-discover":!j&&t==="render"?"true":void 0})});xL.displayName="Form";function yL(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function F3(t){let e=O.useContext(mv);return zr(e,yL(t)),e}function vL(t,{target:e,replace:n,unstable_mask:i,state:o,preventScrollReset:l,relative:d,viewTransition:f,unstable_defaultShouldRevalidate:h,unstable_useTransitions:p}={}){let g=tD(),x=_c(),y=e_(t,{relative:d});return O.useCallback(E=>{if(ZB(E,e)){E.preventDefault();let N=n!==void 0?n:V1(x)===V1(y),T=()=>g(t,{replace:N,unstable_mask:i,state:o,preventScrollReset:l,relative:d,viewTransition:f,unstable_defaultShouldRevalidate:h});p?O.startTransition(()=>T()):T()}},[x,g,y,n,i,o,e,t,l,d,f,h,p])}var EL=0,_L=()=>`__${String(++EL)}__`;function wL(){let{router:t}=F3("useSubmit"),{basename:e}=O.useContext(fl),n=IB(),i=t.fetch,o=t.navigate;return O.useCallback(async(l,d={})=>{let{action:f,method:h,encType:p,formData:g,body:x}=tL(l,e);if(d.navigate===!1){let y=d.fetcherKey||_L();await i(y,n,d.action||f,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:g,body:x,formMethod:d.method||h,formEncType:d.encType||p,flushSync:d.flushSync})}else await o(d.action||f,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:g,body:x,formMethod:d.method||h,formEncType:d.encType||p,replace:d.replace,state:d.state,fromRouteId:n,flushSync:d.flushSync,viewTransition:d.viewTransition})},[i,o,e,n])}function SL(t,{relative:e}={}){let{basename:n}=O.useContext(fl),i=O.useContext(Ec);zr(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),l={...e_(t||".",{relative:e})},d=_c();if(t==null){l.search=d.search;let f=new URLSearchParams(l.search),h=f.getAll("index");if(h.some(g=>g==="")){f.delete("index"),h.filter(x=>x).forEach(x=>f.append("index",x));let g=f.toString();l.search=g?`?${g}`:""}}return(!t||t===".")&&o.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(l.pathname=l.pathname==="/"?n:hd([n,l.pathname])),V1(l)}function NL(t,{relative:e}={}){let n=O.useContext(k3);zr(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=F3("useViewTransitionState"),o=e_(t,{relative:e});if(!n.isTransitioning)return!1;let l=Xf(n.currentLocation.pathname,i)||n.currentLocation.pathname,d=Xf(n.nextLocation.pathname,i)||n.nextLocation.pathname;return AN(o.pathname,d)!=null||AN(o.pathname,l)!=null}N3();const sV=t=>{let e;const n=new Set,i=(p,g)=>{const x=typeof p=="function"?p(e):p;if(!Object.is(x,e)){const y=e;e=g??(typeof x!="object"||x===null)?x:Object.assign({},e,x),n.forEach(E=>E(e,y))}},o=()=>e,f={setState:i,getState:o,getInitialState:()=>h,subscribe:p=>(n.add(p),()=>n.delete(p))},h=e=t(i,o,f);return f},DL=(t=>t?sV(t):sV),AL=t=>t;function CL(t,e=AL){const n=g1.useSyncExternalStore(t.subscribe,g1.useCallback(()=>e(t.getState()),[t,e]),g1.useCallback(()=>e(t.getInitialState()),[t,e]));return g1.useDebugValue(n),n}const oV=t=>{const e=DL(t),n=i=>CL(e,i);return Object.assign(n,e),n},Zf=(t=>t?oV(t):oV),ou=Zf(t=>({user:null,isAuthenticated:!1,loading:!1,error:null,login:async(e,n)=>{t({loading:!0,error:null});try{const i=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,password:n}),credentials:"include"}),o=await i.json();if(!i.ok){t({loading:!1,error:o.error||"Login failed"});return}t({user:o.user,isAuthenticated:!0,loading:!1,error:null})}catch{t({loading:!1,error:"Network error"})}},logout:async()=>{try{await fetch("/api/auth/logout",{method:"POST",credentials:"include"})}catch{}t({user:null,isAuthenticated:!1,error:null})},checkAuth:async()=>{t({loading:!0});try{const e=await fetch("/api/auth/me",{credentials:"include"});if(e.ok){const n=await e.json();t({user:n.user,isAuthenticated:!0,loading:!1})}else t({user:null,isAuthenticated:!1,loading:!1})}catch{t({user:null,isAuthenticated:!1,loading:!1})}},reset:()=>t({user:null,isAuthenticated:!1,loading:!1,error:null})})),Us=Zf((t,e)=>({squads:[],selectedSquad:null,activeStates:{},uiComponents:{},fetchSquads:async()=>{try{const n=await fetch("/api/squads",{credentials:"include"});if(n.ok){const i=await n.json();t({squads:i.squads})}}catch{}},selectSquad:n=>t({selectedSquad:n}),setSquadState:(n,i)=>t(o=>({activeStates:{...o.activeStates,[n]:i}})),clearSquadState:n=>t(i=>{const{[n]:o,...l}=i.activeStates;return{activeStates:l}}),setUiComponents:(n,i)=>t(o=>({uiComponents:{...o.uiComponents,[n]:i}})),reset:()=>t({squads:[],selectedSquad:null,activeStates:{},uiComponents:{}})}));let TL=0;function aV(){return`local-${Date.now()}-${++TL}`}const vs=Zf((t,e)=>({conversations:[],messages:[],conversationId:null,streaming:!1,streamingText:"",activity:null,error:null,addUserMessage:n=>{const i={id:aV(),role:"user",content:n,createdAt:new Date().toISOString()};t(o=>{const l=o.conversationId,d=l&&!o.messages.some(f=>f.role==="user")?o.conversations.map(f=>f.id===l?{...f,preview:n.slice(0,80)}:f):o.conversations;return{messages:[...o.messages,i],error:null,conversations:d}})},setConversationId:n=>{t({conversationId:n})},startStreaming:()=>{t({streaming:!0,streamingText:"",activity:null,error:null})},appendChunk:n=>{t(i=>({streamingText:i.streamingText+n,activity:null}))},setActivity:n=>{t({activity:n})},finishStreaming:n=>{const{streamingText:i}=e(),o={id:n,role:"assistant",content:i,createdAt:new Date().toISOString()};t(l=>({messages:[...l.messages,o],streaming:!1,streamingText:"",activity:null}))},addAgentDm:n=>{const i={id:aV(),role:"agent_dm",content:n.content,agentId:n.agentId,agentName:n.agentName,createdAt:new Date().toISOString()};t(o=>({messages:[...o.messages,i]}))},setError:n=>{t({error:n,streaming:!1,streamingText:"",activity:null})},loadConversations:async n=>{try{const i=await fetch(`/api/squads/${n}/conversations`,{credentials:"include"});if(!i.ok)return;const l=((await i.json()).data||[]).map(d=>({id:d.id,createdAt:d.created_at,preview:""}));for(const d of l)try{const f=await fetch(`/api/conversations/${d.id}/messages?limit=1`,{credentials:"include"});if(f.ok){const p=((await f.json()).data||[])[0];p&&(d.preview=p.content.slice(0,80))}}catch{}t({conversations:l})}catch{}},selectConversation:async n=>{t({conversationId:n,messages:[],streaming:!1,streamingText:"",activity:null,error:null});try{const i=await fetch(`/api/conversations/${n}/messages`,{credentials:"include"});if(!i.ok)return;const l=((await i.json()).data||[]).map(d=>({id:d.id,role:d.role,content:d.content,agentId:d.agent_id??void 0,agentName:d.agent_name??void 0,createdAt:d.created_at}));t({messages:l})}catch{}},deleteConversation:async(n,i)=>{try{if(!(await fetch(`/api/conversations/${n}`,{method:"DELETE",credentials:"include"})).ok)return;const{conversationId:l}=e();t(d=>({conversations:d.conversations.filter(f=>f.id!==n)})),l===n&&t({conversationId:null,messages:[]})}catch{}},loadHistory:async n=>{try{const i=await fetch(`/api/squads/${n}/conversations`,{credentials:"include"});if(!i.ok)return;const o=await i.json();if(!o.data||o.data.length===0){t({conversationId:null,messages:[],conversations:[]});return}const l=(o.data||[]).map(x=>({id:x.id,createdAt:x.created_at,preview:""})),d=o.data[0];t({conversationId:d.id,conversations:l});const f=await fetch(`/api/conversations/${d.id}/messages`,{credentials:"include"});if(!f.ok)return;const p=((await f.json()).data||[]).map(x=>({id:x.id,role:x.role,content:x.content,agentId:x.agent_id??void 0,agentName:x.agent_name??void 0,createdAt:x.created_at})),g=p.find(x=>x.role==="user");if(g){const x=l.findIndex(y=>y.id===d.id);x>=0&&(l[x].preview=g.content.slice(0,80))}t({messages:p,conversations:l});for(const x of l)if(x.id!==d.id)try{const y=await fetch(`/api/conversations/${x.id}/messages?limit=1`,{credentials:"include"});if(y.ok){const N=((await y.json()).data||[])[0];N&&(x.preview=N.content.slice(0,80))}}catch{}t({conversations:[...l]})}catch{}},reset:()=>t({conversations:[],messages:[],conversationId:null,streaming:!1,streamingText:"",error:null})}));function RL(t){const n=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,i=new WebSocket(n),o=[];let l=!0;function d(f){i.readyState===WebSocket.OPEN?i.send(JSON.stringify(f)):i.readyState===WebSocket.CONNECTING&&o.push(f)}return i.onopen=()=>{var f,h;l||(h=(f=t.current).onReconnect)==null||h.call(f),l=!1;for(const p of o)i.send(JSON.stringify(p));o.length=0},i.onmessage=f=>{var h,p,g,x,y,E,N,T,D,A,M,j,U,B,P,K,oe,X,I;try{const G=JSON.parse(f.data),Y=t.current;switch(G.type){case"squad:state":(h=Y.onSquadState)==null||h.call(Y,G.squadName,G.state);break;case"squad:inactive":(p=Y.onSquadInactive)==null||p.call(Y,G.squadName,G.reason);break;case"chat:chunk":(g=Y.onChatChunk)==null||g.call(Y,G.squadName,G.conversationId,G.delta);break;case"chat:activity":(x=Y.onChatActivity)==null||x.call(Y,G.squadName,G.tool,G.summary);break;case"chat:done":(y=Y.onChatDone)==null||y.call(Y,G.squadName,G.conversationId,G.messageId);break;case"chat:error":(E=Y.onChatError)==null||E.call(Y,G.squadName,G.error);break;case"chat:agent_dm":(N=Y.onChatAgentDm)==null||N.call(Y,G.squadName,G.conversationId,G.agentId,G.agentName,G.message);break;case"chat:conversation_created":(T=Y.onChatConversationCreated)==null||T.call(Y,G.squadName,G.conversationId);break;case"agent:output_chunk":(D=Y.onAgentOutputChunk)==null||D.call(Y,G.squadName,G.agentId,G.agentName,G.delta);break;case"agent:step_start":(A=Y.onAgentStepStart)==null||A.call(Y,G.squadName,G.agentId,G.agentName,G.stepIndex,G.stepLabel);break;case"agent:step_complete":(M=Y.onAgentStepComplete)==null||M.call(Y,G.squadName,G.agentId,G.agentName,G.stepIndex,G.stepLabel);break;case"squad:checkpoint":(j=Y.onSquadCheckpoint)==null||j.call(Y,G.squadName,G.agentId,G.agentName,G.question);break;case"schedule:started":(U=Y.onScheduleStarted)==null||U.call(Y,G.squadName,G.jobId,G.attempt);break;case"schedule:chunk":(B=Y.onScheduleChunk)==null||B.call(Y,G.squadName,G.jobId,G.delta);break;case"schedule:done":(P=Y.onScheduleDone)==null||P.call(Y,G.squadName,G.jobId,G.summary,G.attempt);break;case"schedule:error":(K=Y.onScheduleError)==null||K.call(Y,G.squadName,G.jobId,G.error,G.attempt,G.willRetry);break;case"schedule:status_changed":(oe=Y.onScheduleStatusChanged)==null||oe.call(Y,G.squadName,G.status);break;case"kanban:task_updated":(X=Y.onKanbanTaskUpdated)==null||X.call(Y,G);break;case"a2ui:update":(I=Y.onA2uiUpdate)==null||I.call(Y,G.squadName,G.components);break}}catch{}},{subscribe:f=>{d({type:"squad:subscribe",squadName:f})},unsubscribe:f=>{d({type:"squad:unsubscribe",squadName:f})},sendChat:(f,h,p)=>{const g={type:"chat:send",squadName:f,message:h};p&&p.length>0&&(g.files=p),d(g)},newConversation:f=>{d({type:"chat:new_conversation",squadName:f})},sendCheckpointResponse:(f,h)=>{d({type:"squad:checkpoint_response",squadName:f,answer:h})},disconnect:()=>{i.close()}}}function jL(t={}){const e=O.useRef(null),n=O.useRef(t),i=O.useRef(new Set);n.current=t,O.useEffect(()=>{const p=RL(n);e.current=p;for(const g of i.current)p.subscribe(g);return()=>{p.disconnect()}},[]);const o=O.useCallback(p=>{var g;i.current.add(p),(g=e.current)==null||g.subscribe(p)},[]),l=O.useCallback(p=>{var g;i.current.delete(p),(g=e.current)==null||g.unsubscribe(p)},[]),d=O.useCallback((p,g,x)=>{var y;(y=e.current)==null||y.sendChat(p,g,x)},[]),f=O.useCallback(p=>{var g;(g=e.current)==null||g.newConversation(p)},[]),h=O.useCallback((p,g)=>{var x;(x=e.current)==null||x.sendCheckpointResponse(p,g)},[]);return{subscribe:o,unsubscribe:l,sendChat:d,newConversation:f,sendCheckpointResponse:h}}function kL(t){const e=Math.floor(t/3600),n=Math.floor(t%3600/60),i=t%60,o=l=>l.toString().padStart(2,"0");return e>0?`${e}h ${o(n)}m ${o(i)}s`:`${n}m ${o(i)}s`}function ML({state:t}){const[e,n]=O.useState(0);return O.useEffect(()=>{if(!(t!=null&&t.startedAt)||t.status!=="running"){n(0);return}const i=new Date(t.startedAt).getTime(),o=()=>n(Math.floor((Date.now()-i)/1e3));o();const l=setInterval(o,1e3);return()=>clearInterval(l)},[t==null?void 0:t.startedAt,t==null?void 0:t.status]),v.jsxDEV("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"var(--statusbar-height)",padding:"0 var(--sp-4)",background:"var(--surface-1)",borderTop:"1px solid var(--border-subtle)",fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)"},children:t?v.jsxDEV(v.Fragment,{children:[v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)"},children:[v.jsxDEV("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:t.status==="running"?"var(--status-active)":t.status==="checkpoint"?"var(--status-warning)":"var(--status-idle)",boxShadow:t.status==="running"?"0 0 8px var(--status-active-glow)":"none",animation:t.status==="running"?"statusPulse 2s ease-in-out infinite":"none"}},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/StatusBar.tsx",lineNumber:37,columnNumber:13},this),v.jsxDEV("span",{style:{color:"var(--text-secondary)"},children:["Step ",t.step.current,"/",t.step.total]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/StatusBar.tsx",lineNumber:52,columnNumber:13},this),v.jsxDEV("span",{style:{color:"var(--border-strong)"},children:"│"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/StatusBar.tsx",lineNumber:55,columnNumber:13},this),v.jsxDEV("span",{children:t.step.label},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/StatusBar.tsx",lineNumber:56,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/StatusBar.tsx",lineNumber:36,columnNumber:11},this),v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)"},children:[t.handoff&&v.jsxDEV("span",{style:{color:"var(--accent)"},children:[t.handoff.from," → ",t.handoff.to]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/StatusBar.tsx",lineNumber:62,columnNumber:15},this),t.status==="running"&&v.jsxDEV("span",{style:{color:"var(--text-secondary)"},children:kL(e)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/StatusBar.tsx",lineNumber:67,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/StatusBar.tsx",lineNumber:60,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/StatusBar.tsx",lineNumber:34,columnNumber:9},this):v.jsxDEV(v.Fragment,{children:[v.jsxDEV("span",{children:"Ready"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/StatusBar.tsx",lineNumber:75,columnNumber:11},this),v.jsxDEV("span",{children:"ExpxAgents Mission Control"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/StatusBar.tsx",lineNumber:76,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/StatusBar.tsx",lineNumber:74,columnNumber:9},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/StatusBar.tsx",lineNumber:21,columnNumber:5},this)}let PT=null;function VL(t){PT=t}function G3(t,e,n){PT&&PT(t,e,n)}let OT=null;function UL(t){OT=t}function PL(t){OT&&OT(t)}let zT=null;function OL(t){zT=t}function zL(t,e){zT&&zT(t,e)}const xN=32,cc=96,Am=64,qt={floor:13158600,floorHighlight:14211288,floorGrout:12105912,wall:15261904,wallTrim:11577496,baseboard:7035464,desk:15263976,deskTop:16119285,deskShadow:13684944,deskLeg:1710618,deskEdge:14737632,monitor:2236976,monitorScreen:1981020,monitorScreenGlow:2773120,monitorStand:3355456,keyboard:3355456,keyboardKey:4473941,chairSeat:2899536,chairBack:3426654,chairBase:4473924,chairWheel:3355443,plant:5025616,plantDark:3706428,plantLight:6732650,pot:9133628,potRim:10515018,soil:4863264,bookshelf:8020808,bookshelfEdge:9139029,bookColors:[15022389,2001125,4431943,16750592,9315498,35195,16635957],rug:6044974,rugPattern:8016448,rugBorder:4861472},BT=[5227511,5025616,16750592,15022389,9315498,16771899],BL={idle:8947848,working:5025616,delivering:5227511,done:5025616,checkpoint:16750592},oo={counter:4073251,counterTop:6111287,machine:3622735,machineTop:4545124,machineLight:5025616,cup:14142664,cupShadow:12364452,saucer:14735052,sink:7901340,faucet:11583173,menu:5125166},tl={table:6111287,tableTop:7162945,tableEdge:5125166,tableLeg:4073251,chair:3622735,chairSeat:4545124,chairBack:5533306,carpet:2503224,carpetPattern:3030340,whiteboard:15527921,whiteboardFrame:7901340},Yg={background:1713022,backgroundGlow:2635155,statusRunning:5025616,statusIdle:8947848,statusCheckpoint:16750592,statusCompleted:5025616},Tm={floor:11579568,tile:11053224,grout:10066329,stripe:12632256},Uo={floor:14477552,tile:12966120,tileGrout:11453652,wall:14740208,stall:11583173,stallDoor:9479342,sink:15527921,sinkBowl:16777215,mirror:11789820,mirrorFrame:7901340,toilet:16448250,toiletSeat:15658734,pipe:9479342},la={floor:6111287,carpet:5125166,carpetBorder:4073251,desk:4073251,deskTop:6111287,deskEdge:2890510,chair:1713022,chairSeat:2635155,window:8508666,windowFrame:5533306,windowSill:7901340,bookshelf:7162945,globe:4367861,nameplate:16766720},Zy={wall:7901340,wallHighlight:10795204,doorFrame:6111287},gs={floor:16115411,tile:15259072,tileGrout:13942952,counter:6111287,counterTop:7951688,fridge:15527921,fridgeDoor:14737632,fridgeHandle:10395294,table:9268835,tableTop:10586239,chair:7162945,coffeeMaker:3622735,coffeeMakerLight:5025616,lamp:16766287},ua={floor:14142664,carpet:6323595,carpetBorder:4545124,sofa:5533306,sofaCushion:6323595,sofaArm:4545124,tv:2171169,tvScreen:2503224,tvStand:4342338,sideTable:7951688,magazine:15684432,magazineAlt:4367861},If=480,rl=360,Mg=400,Ji=60,nl=120,sC=120,lV=160,uV=120,cV=160,LL=64,IL=80,HL=cc+32,qL=Am+48,dV=2,Y3=10,Of=80;function TS(t,e,n){const i=Math.max(0,Math.min(1,n));return t+(e-t)*i}function FL(t){return t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2}const GL=["nw","ne","sw","se"],YL={nw:"right",ne:"left",sw:"top",se:"top"};function CN(t){const e=Y3,n=Math.max(1,t),i={nw:0,ne:0,sw:0,se:0},o=[];for(let se=0;se<n;se++){const q=GL[se%4];o.push({quadrant:q,slot:i[q]}),i[q]++}const l=Math.max(1,i.nw),d=Math.max(1,i.ne),f=Math.max(1,i.sw),h=Math.max(1,i.se),p=Math.max(Mg,nl),g=l*(rl+e),x=d*(rl+e),y=Math.max(g+p,x+nl),E=f*(rl+e),N=h*(rl+e),T=Math.max(lV,cV),D=Math.max(E+T+e,N+T+e),A=Math.max(If,nl+e+Mg),M=Math.max(If,nl),j=Math.max(If,sC),U=Math.max(If,uV),B=Math.max(A,j),P=Math.max(M,U),K=e+B+e+Ji+e+P+e,oe=e+y+e+Ji+e+D+e,X={x:e+B+e,y:e,width:Ji,height:oe-2*e},I={x:e,y:e+y+e,width:K-2*e,height:Ji},G={x:X.x+X.width/2,y:I.y+I.height/2},Y={x:X.x-e-Mg,y:I.y-e-Mg,width:Mg,height:Mg},J={x:Y.x-e-nl,y:I.y-e-nl,width:nl,height:nl},$={x:X.x+Ji+e,y:I.y-e-nl,width:nl,height:nl},Q={x:X.x-e-sC,y:I.y+Ji+e+f*(rl+e),width:sC,height:lV},z={x:X.x+Ji+e,y:I.y+Ji+e+h*(rl+e),width:uV,height:cV},ee=[],te={};for(let se=0;se<n;se++){const{quadrant:q,slot:L}=o[se],ae=YL[q];let Z;q==="nw"?Z={x:X.x-e-If,y:Y.y-e-(L+1)*rl-L*e}:q==="ne"?Z={x:X.x+Ji+e,y:$.y-e-(L+1)*rl-L*e}:q==="sw"?Z={x:X.x-e-If,y:I.y+Ji+e+L*(rl+e)}:Z={x:X.x+Ji+e,y:I.y+Ji+e+L*(rl+e)},ee.push({origin:Z,width:If,height:rl,quadrant:q,doorSide:ae}),ae==="right"||ae==="left"?te[`squad-${se}`]={x:X.x+Ji/2,y:Z.y+rl/2}:te[`squad-${se}`]={x:Z.x+If/2,y:I.y+Ji/2}}return te.ceo={x:X.x+Ji/2,y:Y.y+Mg/2},te["bathroom-male"]={x:J.x+nl/2,y:I.y+Ji/2},te["bathroom-female"]={x:$.x+nl/2,y:I.y+Ji/2},te.kitchen={x:X.x+Ji/2,y:Q.y+Q.height/2},te["rest-area"]={x:X.x+Ji/2,y:z.y+z.height/2},{totalWidth:K,totalHeight:oe,squadOrigins:ee,ceoOffice:Y,corridorH:I,corridorV:X,bathroomMale:J,bathroomFemale:$,kitchen:Q,restArea:z,doorPoints:te,corridorHub:G}}function Xy(t,e,n,i){const o=t%dV,l=Math.floor(t/dV);return{x:e.x+LL+o*HL,y:e.y+IL+l*qL}}function w1(t,e,n){return{x:t.x+e-80,y:t.y+n-80}}function $3(t,e,n){return{x:t.x+e-160,y:t.y+Math.floor(n/2)}}function $L(t,e){const n=e==="male"?t.bathroomMale:t.bathroomFemale;return{x:n.x+n.width/2,y:n.y+n.height/2}}function XL(t){return{x:t.kitchen.x+t.kitchen.width/2,y:t.kitchen.y+t.kitchen.height/2}}function KL(t){return{x:t.restArea.x+t.restArea.width/2,y:t.restArea.y+t.restArea.height/2}}function WL(t){const e=t.corridorV;if(e.height>0&&Math.random()<.5)return{x:e.x+10+Math.random()*Math.max(0,e.width-20),y:e.y+10+Math.random()*Math.max(0,e.height-20)};const n=t.corridorH;return{x:n.x+20+Math.random()*Math.max(0,n.width-40),y:n.y+10+Math.random()*Math.max(0,n.height-20)}}function fV(t,e){const n=e.corridorH;return t.x>=n.x&&t.x<=n.x+n.width&&t.y>=n.y&&t.y<=n.y+n.height}function hV(t,e){const n=e.corridorV;return t.x>=n.x&&t.x<=n.x+n.width&&t.y>=n.y&&t.y<=n.y+n.height}function QL(t,e){if(t==="ceo"){const i=e.ceoOffice;return{x:i.x+i.width/2,y:i.y+i.height/2}}if(t==="bathroom-male"){const i=e.bathroomMale;return{x:i.x+i.width/2,y:i.y+i.height/2}}if(t==="bathroom-female"){const i=e.bathroomFemale;return{x:i.x+i.width/2,y:i.y+i.height/2}}if(t==="kitchen"){const i=e.kitchen;return{x:i.x+i.width/2,y:i.y+i.height/2}}if(t==="rest-area"){const i=e.restArea;return{x:i.x+i.width/2,y:i.y+i.height/2}}const n=t.match(/^squad-(\d+)$/);if(n){const i=parseInt(n[1],10),o=e.squadOrigins[i];if(o)return{x:o.origin.x+o.width/2,y:o.origin.y+o.height/2}}return e.corridorHub}function S1(t,e,n,i){const o=i.doorPoints[e],l=i.doorPoints[n];if(!o||!l)return[t];const d=i.corridorHub,f=QL(n,i),h=fV(o,i)&&fV(l,i),p=hV(o,i)&&hV(l,i);return h||p?[t,o,l,f]:[t,o,d,l,f]}function RS(t,e){const n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)}const mV=500,pV=50;let gV=0;function bV(t){return{idle:"idle",working:"working",delivering:"walking",done:"idle",checkpoint:"checkpoint"}[t]??"idle"}const Wr=Zf(t=>({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{},appendBubble:(e,n,i)=>{const o=`${e}:${n}`;t(l=>{var h;let f=(((h=l.bubbles[o])==null?void 0:h.text)??"")+i;return f.length>mV&&(f=f.slice(f.length-mV)),{bubbles:{...l.bubbles,[o]:{text:f,updatedAt:Date.now()}}}})},clearBubble:(e,n)=>{const i=`${e}:${n}`;t(o=>{const{[i]:l,...d}=o.bubbles;return{bubbles:d}})},clearAllBubbles:()=>t({bubbles:{}}),addActivity:(e,n,i)=>{const l={id:++gV,agentName:n,action:i,timestamp:Date.now()};t(d=>{var g;const h=[...((g=d.activityLog[e])==null?void 0:g.entries)??[],l],p=h.length>pV?h.slice(h.length-pV):h;return{activityLog:{...d.activityLog,[e]:{entries:p}}}})},setCheckpoint:(e,n,i,o)=>t(l=>({checkpoints:{...l.checkpoints,[e]:{agentId:n,agentName:i,question:o}}})),clearCheckpoint:e=>t(n=>{const{[e]:i,...o}=n.checkpoints;return{checkpoints:o}}),setActiveRoom:e=>t({activeRoom:e}),syncRooms:e=>t(n=>{const i=e;let o;return i.length===0?o=null:n.activeRoom===null||!i.includes(n.activeRoom)?o=i[0]:o=n.activeRoom,{rooms:i,activeRoom:o}}),setAgents:(e,n)=>t(i=>{const o=i.agentVisuals[e]??[],l=new Map(o.map(E=>[E.id,E])),d={x:0,y:0},f=CN(i.rooms.length),h=i.rooms.indexOf(e),p=f.squadOrigins[h],g=(p==null?void 0:p.width)??480,x=(p==null?void 0:p.height)??360,y=n.map((E,N)=>{const T=l.get(E.id);if(T){const M=E.status?bV(E.status):T.status,j=M!==T.status;let U=T.targetPosition;return j&&(M==="working"||M==="checkpoint"?U=Xy(N,d):U=w1(d,g,x)),{...T,name:E.name,avatar:E.avatar,deskIndex:N,status:M,targetPosition:U}}const D=E.status?bV(E.status):"idle",A=D==="working"||D==="checkpoint"?Xy(N,d):w1(d,g,x);return{id:E.id,name:E.name,avatar:E.avatar,colorIndex:N%6,status:D,deskIndex:N,position:A,targetPosition:null}});return{agentVisuals:{...i.agentVisuals,[e]:y}}}),setAgentStatus:(e,n,i)=>t(o=>{const l=o.agentVisuals[e];if(!l)return o;const d={x:0,y:0},f=CN(o.rooms.length),h=o.rooms.indexOf(e),p=f.squadOrigins[h],g=(p==null?void 0:p.width)??480,x=(p==null?void 0:p.height)??360,y=l.map(E=>{if(E.id!==n)return E;let N;return i==="working"||i==="checkpoint"?N=Xy(E.deskIndex,d):N=w1(d,g,x),{...E,status:i,targetPosition:N}});return{agentVisuals:{...o.agentVisuals,[e]:y}}}),reset:()=>{gV=0,t({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{}})}})),Ele={background:"#0a0a0f",grid:"rgba(0, 200, 255, 0.06)",orbStandby:"#1a3a5c",orbListening:"#00c8ff",orbProcessing:"#ff8c00",orbSpeaking:"#00ff88",panelBg:"rgba(0, 200, 255, 0.08)",panelBorder:"rgba(0, 200, 255, 0.25)",textPrimary:"#e0e8f0",textAccent:"#00c8ff",textAva:"#c084fc",particleStart:"#00c8ff"},ZL={orbRadius:60,orbRingWidth:3,gridSpacing:40,particleCount:65,particleMinRadius:1,particleMaxRadius:3,waveformBars:32,waveformMaxHeight:40,panelWidth:180,panelPadding:12,transcriptLineHeight:20,standbyTimeoutMs:15e3,ttsSplitLength:300};let X3=0;function JL(){return`jarvis-${Date.now()}-${++X3}`}let sd=null;const oC=Zf((t,e)=>({mode:"STANDBY",messages:[],streamingText:"",selectedSquad:null,userName:"",setMode:n=>t({mode:n}),addMessage:(n,i)=>{const o={id:JL(),role:n,content:i,createdAt:new Date().toISOString()};t(l=>({messages:[...l.messages,o]}))},appendChunk:n=>{t(i=>({streamingText:i.streamingText+n}))},finalizeMessage:n=>{const{streamingText:i}=e(),o={id:n,role:"assistant",content:i,createdAt:new Date().toISOString()};t(l=>({messages:[...l.messages,o],streamingText:""}))},selectSquad:n=>t({selectedSquad:n}),setUserName:n=>t({userName:n}),startStandbyTimer:()=>{sd&&clearTimeout(sd),sd=setTimeout(()=>{t({mode:"STANDBY"}),sd=null},ZL.standbyTimeoutMs)},resetStandbyTimer:()=>{e().startStandbyTimer()},clearStandbyTimer:()=>{sd&&(clearTimeout(sd),sd=null)},reset:()=>{sd&&(clearTimeout(sd),sd=null),X3=0,t({mode:"STANDBY",messages:[],streamingText:"",selectedSquad:null,userName:""})}})),Oo=Zf((t,e)=>({jobs:[],loading:!1,history:{},historyLoading:{},fetchJobs:async()=>{t({loading:!0});try{const n=await fetch("/api/scheduler",{credentials:"include"});if(n.ok){const i=await n.json();t({jobs:i.data,loading:!1})}else t({loading:!1})}catch{t({loading:!1})}},createJob:async n=>(await fetch("/api/scheduler",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})).ok?(e().fetchJobs(),!0):!1,deleteJob:async n=>{await fetch(`/api/scheduler/${n}`,{method:"DELETE",credentials:"include"}),e().fetchJobs()},pauseJob:async n=>{await fetch(`/api/scheduler/${n}/pause`,{method:"POST",credentials:"include"}),e().fetchJobs()},resumeJob:async n=>{await fetch(`/api/scheduler/${n}/resume`,{method:"POST",credentials:"include"}),e().fetchJobs()},triggerJob:async n=>{await fetch(`/api/scheduler/${n}/trigger`,{method:"POST",credentials:"include"})},updateJobStatus:(n,i)=>{t(o=>({jobs:o.jobs.map(l=>l.squad_name===n?{...l,status:i}:l)}))},fetchHistory:async n=>{t(i=>({historyLoading:{...i.historyLoading,[n]:!0}}));try{const i=await fetch(`/api/scheduler/${n}/history?limit=50`,{credentials:"include"});if(i.ok){const o=await i.json();t(l=>({history:{...l.history,[n]:o.data},historyLoading:{...l.historyLoading,[n]:!1}}))}else t(o=>({historyLoading:{...o.historyLoading,[n]:!1}}))}catch{t(i=>({historyLoading:{...i.historyLoading,[n]:!1}}))}}})),e7=600*1e3;function t7(){const[t,e]=O.useState(null),[n,i]=O.useState(!1),[o,l]=O.useState(!1),d=O.useCallback(async()=>{try{const h=await fetch("/api/system/version",{credentials:"include"});if(h.ok){const p=await h.json();e(p)}}catch{}},[]);O.useEffect(()=>{d();const h=setInterval(d,e7);return()=>clearInterval(h)},[d]);const f=async()=>{i(!0);try{await fetch("/api/system/update",{method:"POST",credentials:"include"})}catch{i(!1)}};return!(t!=null&&t.updateAvailable)||o?null:v.jsxDEV("div",{"data-testid":"update-banner",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"var(--sp-3)",padding:"8px var(--sp-4)",background:"var(--surface-2)",borderBottom:"1px solid var(--accent)",fontFamily:"var(--font-mono)",fontSize:"0.72rem",color:"var(--text-secondary)",animation:"fadeIn 0.3s var(--ease-out) both"},children:n?v.jsxDEV("span",{style:{color:"var(--accent)"},children:["Updating to v",t.latest,"... Server will restart automatically."]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/UpdateBanner.tsx",lineNumber:67,columnNumber:9},this):v.jsxDEV(v.Fragment,{children:[v.jsxDEV("span",{children:["New version available: ",v.jsxDEV("strong",{style:{color:"var(--accent)"},children:["v",t.latest]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/UpdateBanner.tsx",lineNumber:73,columnNumber:36},this),v.jsxDEV("span",{style:{color:"var(--text-muted)",marginLeft:6},children:["(current: v",t.current,")"]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/UpdateBanner.tsx",lineNumber:74,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/UpdateBanner.tsx",lineNumber:72,columnNumber:11},this),v.jsxDEV("button",{"data-testid":"btn-update",onClick:f,style:{padding:"3px 12px",borderRadius:"var(--radius-xs)",fontFamily:"var(--font-mono)",fontSize:"0.68rem",fontWeight:600,cursor:"pointer",border:"none",background:"var(--accent)",color:"var(--text-inverse)",transition:"opacity 0.15s ease"},children:"Update"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/UpdateBanner.tsx",lineNumber:76,columnNumber:11},this),v.jsxDEV("button",{"data-testid":"btn-dismiss-update",onClick:()=>l(!0),style:{padding:"2px 6px",background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",fontFamily:"var(--font-mono)",fontSize:"0.68rem"},children:"✕"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/UpdateBanner.tsx",lineNumber:94,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/UpdateBanner.tsx",lineNumber:71,columnNumber:9},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/UpdateBanner.tsx",lineNumber:50,columnNumber:5},this)}function n7(){if(typeof window>"u")return"dark";const t=localStorage.getItem("expx-theme");return t==="light"||t==="dark"?t:"dark"}function xV(t){document.documentElement.setAttribute("data-theme",t),localStorage.setItem("expx-theme",t)}const TN=Zf((t,e)=>({theme:n7(),toggle:()=>{const n=e().theme==="dark"?"light":"dark";xV(n),t({theme:n})},setTheme:n=>{xV(n),t({theme:n})}}));function r7(){const[t,e]=O.useState(null),[n,i]=O.useState(!0),[o,l]=O.useState(null),d=O.useCallback(async()=>{i(!0),l(null);try{const f=await fetch("/api/system/info");if(f.ok){const h=await f.json();e(h)}else l("Server unavailable")}catch{l("Cannot reach server")}finally{i(!1)}},[]);return O.useEffect(()=>{d()},[d]),{info:t,loading:n,error:o,refetch:d}}const jS=Zf((t,e)=>({models:[],selectedModel:"",loading:!1,error:null,engine:"",fetchModels:async()=>{var n;t({loading:!0,error:null});try{const i=await fetch("/api/system/models");if(i.ok){const o=await i.json();t({models:o.models,selectedModel:o.default||((n=o.models[0])==null?void 0:n.id)||"",engine:o.engine,loading:!1})}else t({error:"Failed to fetch models",loading:!1})}catch{t({error:"Cannot reach server",loading:!1})}},setSelectedModel:n=>{t({selectedModel:n})}}));function i7(){const{info:t,refetch:e}=r7(),n=jS(G=>G.models),i=jS(G=>G.selectedModel),o=jS(G=>G.fetchModels),l=jS(G=>G.setSelectedModel),[d,f]=O.useState(!1),[h,p]=O.useState(!1),[g,x]=O.useState(""),[y,E]=O.useState(0),[N,T]=O.useState(!1),D=O.useRef(null),A=O.useRef(null),M=O.useRef(null);if(O.useEffect(()=>{(t==null?void 0:t.engine)==="opencode"&&n.length===0&&o()},[t==null?void 0:t.engine,n.length,o]),O.useEffect(()=>{function G(Y){D.current&&!D.current.contains(Y.target)&&f(!1),A.current&&!A.current.contains(Y.target)&&(p(!1),x(""))}return document.addEventListener("mousedown",G),()=>document.removeEventListener("mousedown",G)},[]),O.useEffect(()=>{h&&M.current&&M.current.focus()},[h]),!t)return null;const j=t.engine,U=j==="opencode",B=U?"#f97316":"#4ade80",P=n.find(G=>G.id===i),K=async G=>{if(!(N||!window.confirm(`Switch from ${j==="opencode"?"OpenCode":"Claude Code"} to ${G==="opencode"?"OpenCode":G==="claude-code"?"Claude Code":"Auto"}?
|
|
288
288
|
|
|
289
|
-
Active sessions will be aborted.`))){T(!0),f(!1);try{const J=await fetch("/api/system/engine",{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({engine:G})});if(J.ok)(await J.json()).ok&&(e(),alert(`Engine switched to ${G==="opencode"?"OpenCode":G==="claude-code"?"Claude Code":"Auto"}!`));else{const $=await J.json();alert(`Failed to switch engine: ${$.error}`)}}catch{alert("Failed to switch engine")}finally{T(!1)}}},oe=[{id:"opencode",label:"OpenCode",icon:"⚡",desc:"Use OpenCode as AI backend"},{id:"claude-code",label:"Claude Code",icon:"🤖",desc:"Use Claude Code as AI backend"},{id:"auto",label:"Auto",icon:"🔄",desc:"Auto-detect available engine"}],X=n.filter(G=>{const Y=g.toLowerCase();return G.name.toLowerCase().includes(Y)||G.id.toLowerCase().includes(Y)||G.provider.toLowerCase().includes(Y)}),I=G=>{G.key==="ArrowDown"?(G.preventDefault(),E(Y=>Math.min(Y+1,X.length-1))):G.key==="ArrowUp"?(G.preventDefault(),E(Y=>Math.max(Y-1,0))):G.key==="Enter"&&X[y]?(G.preventDefault(),l(X[y].id),p(!1),x("")):G.key==="Escape"&&(p(!1),x(""))};return v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:6},children:[v.jsxDEV("div",{ref:D,style:{position:"relative"},children:[v.jsxDEV("button",{onClick:()=>{f(!d)},style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",fontWeight:600,color:B,background:`${B}18`,border:`1px solid ${B}44`,padding:"2px 6px",borderRadius:"var(--radius-xs)",letterSpacing:"0.04em",display:"flex",alignItems:"center",gap:4,cursor:"pointer"},children:[v.jsxDEV("span",{style:{width:5,height:5,borderRadius:"50%",background:B,boxShadow:`0 0 4px ${B}`}},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:150,columnNumber:11},this),j==="opencode"?"OpenCode":j==="claude-code"?"Claude Code":"Auto",v.jsxDEV("span",{style:{fontSize:"0.5rem",opacity:.7,marginLeft:2},children:"⚙"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:160,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:130,columnNumber:9},this),d&&v.jsxDEV("div",{style:{position:"absolute",top:"100%",left:0,marginTop:4,background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderRadius:6,boxShadow:"0 4px 16px rgba(0,0,0,0.3)",zIndex:1001,minWidth:220,overflow:"hidden"},children:[v.jsxDEV("div",{style:{padding:"8px 12px",borderBottom:"1px solid var(--border-subtle)",fontSize:"0.6rem",color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:"Switch Engine"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:179,columnNumber:13},this),oe.map(G=>v.jsxDEV("button",{onClick:()=>K(G.id),disabled:N,style:{width:"100%",padding:"8px 12px",background:j===G.id?`${B}12`:"transparent",border:"none",textAlign:"left",cursor:N?"not-allowed":"pointer",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:j===G.id?B:"var(--text-secondary)",borderBottom:"1px solid var(--border-subtle)",opacity:N?.5:1},children:[v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:2},children:[v.jsxDEV("span",{children:G.icon},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:212,columnNumber:19},this),v.jsxDEV("span",{style:{fontWeight:600},children:G.label},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:213,columnNumber:19},this),j===G.id&&v.jsxDEV("span",{style:{fontSize:"0.5rem",background:B,color:"#000",padding:"1px 4px",borderRadius:3},children:"Active"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:215,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:211,columnNumber:17},this),v.jsxDEV("div",{style:{fontSize:"0.55rem",color:"var(--text-muted)",paddingLeft:20},children:G.desc},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:220,columnNumber:17},this)]},G.id,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:191,columnNumber:15},this))]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:164,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:129,columnNumber:7},this),U&&n.length>0&&v.jsxDEV("div",{ref:A,style:{position:"relative"},children:[v.jsxDEV("button",{onClick:()=>{p(!h),x(""),E(0)},style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",fontWeight:600,color:B,background:`${B}18`,border:`1px solid ${B}44`,padding:"2px 6px",borderRadius:"var(--radius-xs)",letterSpacing:"0.04em",display:"flex",alignItems:"center",gap:4,cursor:"pointer"},children:[(P==null?void 0:P.name)||i||"Select Model",v.jsxDEV("span",{style:{fontSize:"0.5rem",opacity:.7,marginLeft:2},children:"▼"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:255,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:232,columnNumber:11},this),h&&v.jsxDEV("div",{style:{position:"absolute",top:"100%",right:0,marginTop:4,background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderRadius:6,boxShadow:"0 4px 16px rgba(0,0,0,0.3)",zIndex:1e3,minWidth:280,overflow:"hidden",display:"flex",flexDirection:"column"},children:[v.jsxDEV("div",{style:{padding:"8px 10px",borderBottom:"1px solid var(--border-subtle)",display:"flex",alignItems:"center",gap:6},children:[v.jsxDEV("span",{style:{color:"var(--text-muted)",fontSize:"0.7rem"},children:"🔍"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:285,columnNumber:17},this),v.jsxDEV("input",{ref:M,type:"text",placeholder:"Search models...",value:g,onChange:G=>{x(G.target.value),E(0)},onKeyDown:I,style:{flex:1,background:"transparent",border:"none",outline:"none",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-primary)"}},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:286,columnNumber:17},this),g&&v.jsxDEV("button",{onClick:()=>x(""),style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)",fontSize:"0.65rem",padding:0},children:"✕"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:307,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:276,columnNumber:15},this),v.jsxDEV("div",{style:{overflowY:"auto",maxHeight:240},children:X.length===0?v.jsxDEV("div",{style:{padding:"12px",textAlign:"center",color:"var(--text-muted)",fontSize:"0.65rem",fontFamily:"var(--font-mono)"},children:"No models found"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:324,columnNumber:19},this):X.map((G,Y)=>v.jsxDEV("button",{onClick:()=>{l(G.id),p(!1),x("")},onMouseEnter:()=>E(Y),style:{width:"100%",padding:"6px 12px",background:Y===y?`${B}20`:i===G.id?`${B}12`:"transparent",border:"none",textAlign:"left",cursor:"pointer",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:Y===y||i===G.id?B:"var(--text-secondary)",borderBottom:"1px solid var(--border-subtle)"},children:[v.jsxDEV("div",{style:{fontWeight:600,marginBottom:2},children:G.name},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:368,columnNumber:23},this),v.jsxDEV("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.55rem",color:"var(--text-muted)"},children:[v.jsxDEV("span",{children:G.provider},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:377,columnNumber:25},this),v.jsxDEV("span",{style:{opacity:.6},children:["$",G.cost.input,"/$",G.cost.output]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:378,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:369,columnNumber:23},this)]},G.id,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:337,columnNumber:21},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:322,columnNumber:15},this),v.jsxDEV("div",{style:{padding:"4px 12px",borderTop:"1px solid var(--border-subtle)",fontSize:"0.55rem",color:"var(--text-muted)",fontFamily:"var(--font-mono)",display:"flex",justifyContent:"space-between"},children:[v.jsxDEV("span",{children:"↑↓ Navigate • Enter Select • Esc Close"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:397,columnNumber:17},this),v.jsxDEV("span",{children:[X.length," models"]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:398,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:386,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:259,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:231,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:127,columnNumber:5},this)}const s7=O.lazy(()=>Gf(()=>import("./ThreeBackground-DcXSelDi.js"),__vite__mapDeps([0,1])).then(t=>({default:t.ThreeBackground})));O.lazy(()=>Gf(()=>Promise.resolve().then(()=>cle),void 0).then(t=>({default:t.MarketplaceView})));const o7=[{to:"/office",label:"Office",icon:"⬡"},{to:"/chat",label:"Chat",icon:"◈"},{to:"/kanban",label:"Kanban",icon:"▦"},{to:"/marketplace",label:"Marketplace",icon:"🏪"},{to:"/dashboard",label:"Dashboard",icon:"▣"},{to:"/scheduler",label:"Scheduler",icon:"⏣"},{to:"/email",label:"Email",icon:"✉"},{to:"/orgchart",label:"Org Chart",icon:"◎"},{to:"/graph",label:"Graph",icon:"◇"},{to:"/files",label:"Files",icon:"▤"},{to:"/knowledge",label:"Knowledge",icon:"◆"},{to:"/settings",label:"Settings",icon:"⚙"}];function a7(){const t=ou(ce=>ce.user),e=ou(ce=>ce.isAuthenticated),n=ou(ce=>ce.loading),i=ou(ce=>ce.logout),o=ou(ce=>ce.checkAuth),l=tD(),d=_c();d.pathname==="/office"||d.pathname;const f=d.pathname==="/jarvis",h=TN(ce=>ce.theme),p=TN(ce=>ce.toggle),g=Us(ce=>ce.squads),x=Us(ce=>ce.selectedSquad),y=Us(ce=>x?ce.activeStates[x]:null),E=Us(ce=>ce.fetchSquads),N=Us(ce=>ce.setSquadState),T=Us(ce=>ce.clearSquadState),D=O.useCallback((ce,Ce)=>{N(ce,Ce);const De=Wr.getState();De.rooms.includes(ce)||De.syncRooms([...De.rooms,ce]),Ce.status!=="checkpoint"&&De.clearCheckpoint(ce),Ce.agents&&De.setAgents(ce,Ce.agents.map(Ae=>({id:Ae.id,name:Ae.name,status:Ae.status})))},[N]),A=O.useCallback(ce=>{T(ce);const Ce=Wr.getState(),De=Ce.agentVisuals[ce];if(De)for(const Ae of De)Ce.setAgentStatus(ce,Ae.id,"idle")},[T]),M=O.useCallback((ce,Ce)=>{vs.setState(De=>({conversationId:Ce,messages:[],conversations:[{id:Ce,createdAt:new Date().toISOString(),preview:""},...De.conversations.filter(Ae=>Ae.id!==Ce)]}))},[]),j=O.useCallback((ce,Ce,De)=>{if(ce==="_jarvis"){oC.getState().appendChunk(De);return}const Ae=vs.getState();Ae.streaming||Ae.startStreaming(),Ae.appendChunk(De)},[]),U=O.useCallback((ce,Ce,De)=>{if(ce==="_jarvis"){oC.getState().finalizeMessage(De);return}vs.getState().finishStreaming(De)},[]),B=O.useCallback((ce,Ce)=>{if(ce==="_jarvis"){oC.getState().setMode("LISTENING");return}vs.getState().setError(Ce)},[]),P=O.useCallback((ce,Ce,De)=>{ce!=="_jarvis"&&vs.getState().setActivity(`${Ce}${De?" "+De:""}`)},[]),K=O.useCallback((ce,Ce,De,Ae,xe)=>{vs.getState().addAgentDm({agentId:De,agentName:Ae,content:xe})},[]),oe=O.useCallback((ce,Ce,De,Ae)=>{Wr.getState().appendBubble(ce,Ce,Ae)},[]),X=O.useCallback((ce,Ce,De,Ae,xe)=>{Wr.getState().addActivity(ce,De,`started "${xe}"`),Wr.getState().setAgentStatus(ce,Ce,"working")},[]),I=O.useCallback((ce,Ce,De,Ae,xe)=>{Wr.getState().addActivity(ce,De,`completed "${xe}"`),Wr.getState().setAgentStatus(ce,Ce,"idle")},[]),G=O.useCallback((ce,Ce,De,Ae)=>{Wr.getState().setCheckpoint(ce,Ce,De,Ae),Wr.getState().setAgentStatus(ce,Ce,"checkpoint")},[]),Y=O.useCallback(()=>{Wr.getState().clearAllBubbles()},[]),J=O.useCallback((ce,Ce,De)=>{Oo.getState().fetchJobs()},[]),$=O.useCallback((ce,Ce,De,Ae)=>{Oo.getState().fetchJobs()},[]),Q=O.useCallback((ce,Ce,De,Ae,xe)=>{Oo.getState().fetchJobs()},[]),z=O.useCallback((ce,Ce)=>{Oo.getState().updateJobStatus(ce,Ce)},[]),ee=O.useCallback(ce=>{window.dispatchEvent(new CustomEvent("kanban:task_updated",{detail:ce}))},[]),te=O.useCallback((ce,Ce)=>{Us.getState().setUiComponents(ce,Ce)},[]),{subscribe:se,unsubscribe:q,sendChat:L,newConversation:ae,sendCheckpointResponse:Z}=jL({onSquadState:D,onSquadInactive:A,onChatConversationCreated:M,onChatChunk:j,onChatActivity:P,onChatDone:U,onChatError:B,onChatAgentDm:K,onAgentOutputChunk:oe,onAgentStepStart:X,onAgentStepComplete:I,onSquadCheckpoint:G,onReconnect:Y,onScheduleStarted:J,onScheduleDone:$,onScheduleError:Q,onScheduleStatusChanged:z,onKanbanTaskUpdated:ee,onA2uiUpdate:te});O.useEffect(()=>{VL(L)},[L]),O.useEffect(()=>{UL(ae)},[ae]),O.useEffect(()=>{OL(Z)},[Z]),O.useEffect(()=>{E().then(()=>{const{squads:ce}=Us.getState();if(ce.length>0){const Ce=Wr.getState(),De=ce.map(qe=>qe.code),Ae=Ce.rooms,xe=[...new Set([...Ae,...De])];Ce.syncRooms(xe);for(const qe of ce)!Ce.agentVisuals[qe.code]&&qe.agents&&qe.agents.length>0&&Ce.setAgents(qe.code,qe.agents.map(ke=>({id:ke.id,name:ke.name,avatar:ke.avatar,status:"idle"})))}})},[E]);const ge=Wr(ce=>ce.rooms);return O.useEffect(()=>{for(const ce of ge)se(ce);return()=>{for(const ce of ge)q(ce)}},[ge,se,q]),O.useEffect(()=>(se("_expxagents"),()=>q("_expxagents")),[se,q]),O.useEffect(()=>{if(f)return se("_jarvis"),()=>q("_jarvis")},[f,se,q]),O.useEffect(()=>{e||o()},[]),O.useEffect(()=>{!n&&!e&&l("/login",{state:{from:d.pathname}})},[n,e,l,d.pathname]),f?v.jsxDEV(rV,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:264,columnNumber:12},this):v.jsxDEV("div",{className:"noise-bg",style:{display:"flex",flexDirection:"column",height:"100vh",background:"var(--surface-0)",color:"var(--text-primary)"},children:[v.jsxDEV("header",{"data-layout":"header",style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"var(--header-height)",padding:"0 var(--sp-4)",background:"var(--surface-1)",borderBottom:"1px solid var(--border-subtle)",position:"relative",zIndex:10},children:[v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)"},children:[v.jsxDEV("div",{style:{width:28,height:28,borderRadius:"var(--radius-sm)",background:"linear-gradient(135deg, var(--accent), var(--accent-dim))",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"0.8rem",fontWeight:700,color:"var(--text-inverse)",boxShadow:"0 0 12px var(--accent-glow-strong)"},children:"EX"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:289,columnNumber:11},this),v.jsxDEV("span",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"0.95rem",color:"var(--text-primary)",letterSpacing:"-0.02em"},children:"ExpxAgents"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:304,columnNumber:11},this),v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)",background:"var(--surface-3)",padding:"2px 6px",borderRadius:"var(--radius-xs)",letterSpacing:"0.05em"},children:"MISSION CONTROL"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:313,columnNumber:11},this),v.jsxDEV(i7,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:324,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:288,columnNumber:9},this),v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-4)"},children:[v.jsxDEV("button",{"data-testid":"btn-restart-server",onClick:async()=>{if(confirm("Restart the server? It will be briefly unavailable."))try{await fetch("/api/system/restart",{method:"POST",credentials:"include"})}catch{}},title:"Restart server",style:{background:"none",border:"1px solid var(--border-subtle)",color:"var(--text-muted)",cursor:"pointer",fontFamily:"var(--font-mono)",fontSize:"0.7rem",padding:"3px 8px",borderRadius:"var(--radius-xs)",transition:"all var(--duration-fast) var(--ease-out)",display:"flex",alignItems:"center",gap:4},onMouseEnter:ce=>{ce.currentTarget.style.color="var(--accent)",ce.currentTarget.style.borderColor="var(--accent)"},onMouseLeave:ce=>{ce.currentTarget.style.color="var(--text-muted)",ce.currentTarget.style.borderColor="var(--border-subtle)"},children:"↻ Restart"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:333,columnNumber:11},this),v.jsxDEV("button",{"data-testid":"btn-toggle-theme",onClick:p,title:`Switch to ${h==="dark"?"light":"dark"} mode`,style:{background:"none",border:"1px solid var(--border-subtle)",color:"var(--text-muted)",cursor:"pointer",fontFamily:"var(--font-mono)",fontSize:"0.85rem",padding:"3px 8px",borderRadius:"var(--radius-xs)",transition:"all var(--duration-fast) var(--ease-out)",display:"flex",alignItems:"center",gap:4,lineHeight:1},onMouseEnter:ce=>{ce.currentTarget.style.color="var(--accent)",ce.currentTarget.style.borderColor="var(--accent)"},onMouseLeave:ce=>{ce.currentTarget.style.color="var(--text-muted)",ce.currentTarget.style.borderColor="var(--border-subtle)"},children:h==="dark"?"☀":"☽"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:367,columnNumber:11},this),v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",fontFamily:"var(--font-mono)",fontSize:"0.75rem",color:"var(--text-secondary)"},children:[v.jsxDEV("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:"var(--status-active)",boxShadow:"0 0 8px var(--status-active-glow)",animation:"statusPulse 2s ease-in-out infinite"}},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:405,columnNumber:13},this),v.jsxDEV("span",{children:t==null?void 0:t.username},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:414,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:397,columnNumber:11},this),v.jsxDEV("button",{onClick:i,className:"btn-ghost",style:{background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",fontFamily:"var(--font-display)",fontSize:"0.75rem",padding:"4px 8px",borderRadius:"var(--radius-xs)",transition:"color var(--duration-fast) var(--ease-out)"},onMouseEnter:ce=>ce.currentTarget.style.color="var(--status-error)",onMouseLeave:ce=>ce.currentTarget.style.color="var(--text-muted)",children:"Logout"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:416,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:328,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:276,columnNumber:7},this),v.jsxDEV(t7,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:438,columnNumber:7},this),v.jsxDEV("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[v.jsxDEV("aside",{"data-layout":"sidebar",style:{width:"var(--sidebar-width)",background:"var(--surface-1)",borderRight:"1px solid var(--border-subtle)",display:"flex",flexDirection:"column",overflowY:"auto"},children:[v.jsxDEV("nav",{style:{padding:"var(--sp-3)",display:"flex",flexDirection:"column",gap:"var(--sp-1)",flex:1},children:[v.jsxDEV("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.1em",padding:"0 var(--sp-2)",marginBottom:"var(--sp-1)"},children:"Navigation"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:459,columnNumber:13},this),o7.map(ce=>v.jsxDEV(q3,{to:ce.to,style:({isActive:Ce})=>({display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"8px 10px",borderRadius:"var(--radius-sm)",textDecoration:"none",fontSize:"0.82rem",fontWeight:Ce?600:400,color:Ce?"var(--accent)":"var(--text-secondary)",background:Ce?"var(--accent-glow)":"transparent",border:Ce?"1px solid var(--accent-glow)":"1px solid transparent",transition:"all var(--duration-fast) var(--ease-out)"}),children:[v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.85rem",width:20,textAlign:"center",opacity:.7},children:ce.icon},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:490,columnNumber:17},this),ce.label]},ce.to,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:472,columnNumber:15},this)),v.jsxDEV("div",{style:{height:1,margin:"var(--sp-2) var(--sp-2)",background:"var(--border-subtle)"}},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:502,columnNumber:13},this),v.jsxDEV("a",{href:"/docs",target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"8px 10px",borderRadius:"var(--radius-sm)",textDecoration:"none",fontSize:"0.82rem",fontWeight:400,color:"var(--text-secondary)",background:"transparent",border:"1px solid transparent",transition:"all var(--duration-fast) var(--ease-out)"},onMouseEnter:ce=>{ce.currentTarget.style.color="var(--accent)",ce.currentTarget.style.background="var(--accent-glow)",ce.currentTarget.style.borderColor="var(--accent-glow)"},onMouseLeave:ce=>{ce.currentTarget.style.color="var(--text-secondary)",ce.currentTarget.style.background="transparent",ce.currentTarget.style.borderColor="transparent"},children:[v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.85rem",width:20,textAlign:"center",opacity:.7},children:"≡"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:536,columnNumber:15},this),"Docs",v.jsxDEV("span",{style:{marginLeft:"auto",fontFamily:"var(--font-mono)",fontSize:"0.55rem",opacity:.6},children:"↗"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:544,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:507,columnNumber:13},this),v.jsxDEV("a",{href:"/jarvis",target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"8px 10px",borderRadius:"var(--radius-sm)",textDecoration:"none",fontSize:"0.82rem",fontWeight:500,color:"var(--status-active)",background:"var(--status-active-glow)",border:"1px solid var(--status-active-glow)",transition:"all var(--duration-fast) var(--ease-out)"},children:[v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.85rem",width:20,textAlign:"center",opacity:.7},children:"◉"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:570,columnNumber:15},this),"Ava",v.jsxDEV("span",{style:{marginLeft:"auto",fontFamily:"var(--font-mono)",fontSize:"0.55rem",opacity:.6},children:"↗"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:578,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:551,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:452,columnNumber:11},this),v.jsxDEV("div",{style:{padding:"var(--sp-3)",borderTop:"1px solid var(--border-subtle)",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",display:"flex",justifyContent:"space-between"},children:[v.jsxDEV("span",{children:[g.length," squad",g.length!==1?"s":""]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:597,columnNumber:13},this),v.jsxDEV("span",{children:"v0.1.0"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:598,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:588,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:443,columnNumber:9},this),v.jsxDEV("main",{className:"grid-bg",style:{flex:1,overflow:"hidden",position:"relative"},children:[v.jsxDEV(O.Suspense,{fallback:null,children:v.jsxDEV(s7,{opacity:.4},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:609,columnNumber:13},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:608,columnNumber:11},this),v.jsxDEV("div",{style:{position:"relative",zIndex:1,height:"100%",overflow:"auto"},children:v.jsxDEV(rV,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:612,columnNumber:13},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:611,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:603,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:441,columnNumber:7},this),v.jsxDEV("div",{"data-layout":"statusbar",children:v.jsxDEV(ML,{state:y},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:619,columnNumber:9},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:618,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:268,columnNumber:5},this)}const l7=O.lazy(()=>Gf(()=>import("./ThreeBackground-DcXSelDi.js"),__vite__mapDeps([0,1])).then(t=>({default:t.ThreeBackground})));function u7(){var N;const[t,e]=O.useState(""),[n,i]=O.useState(""),o=ou(T=>T.login),l=ou(T=>T.loading),d=ou(T=>T.error),f=ou(T=>T.isAuthenticated),h=tD(),g=((N=_c().state)==null?void 0:N.from)||"/";O.useEffect(()=>{f&&h(g,{replace:!0})},[f,h,g]);const x=T=>{T.preventDefault(),o(t,n)},y=TN(T=>T.theme),E=TN(T=>T.toggle);return v.jsxDEV("div",{className:"noise-bg",style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"var(--surface-0)",position:"relative",overflow:"hidden"},children:[v.jsxDEV(O.Suspense,{fallback:null,children:v.jsxDEV(l7,{opacity:.6},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:41,columnNumber:33},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:41,columnNumber:7},this),v.jsxDEV("button",{onClick:E,title:`Switch to ${y==="dark"?"light":"dark"} mode`,style:{position:"absolute",top:16,right:16,zIndex:10,background:"var(--surface-2)",border:"1px solid var(--border-default)",color:"var(--text-secondary)",cursor:"pointer",fontSize:"1rem",padding:"6px 10px",borderRadius:"var(--radius-sm)",transition:"all var(--duration-fast) var(--ease-out)",lineHeight:1},children:y==="dark"?"☀":"☽"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:43,columnNumber:7},this),v.jsxDEV("div",{style:{animation:"fadeInUp 0.6s var(--ease-out) both",width:360,position:"relative",zIndex:1},children:[v.jsxDEV("div",{style:{textAlign:"center",marginBottom:"var(--sp-8)"},children:[v.jsxDEV("div",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:48,height:48,borderRadius:"var(--radius-md)",background:"linear-gradient(135deg, var(--accent), var(--accent-dim))",fontSize:"1.1rem",fontWeight:800,color:"var(--text-inverse)",boxShadow:"var(--shadow-glow-strong)",marginBottom:"var(--sp-4)"},children:"EX"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:75,columnNumber:11},this),v.jsxDEV("h1",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"1.4rem",color:"var(--text-primary)",letterSpacing:"-0.02em",marginBottom:"var(--sp-1)"},children:"ExpxAgents"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:91,columnNumber:11},this),v.jsxDEV("p",{style:{fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.15em"},children:"Mission Control"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:101,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:71,columnNumber:9},this),v.jsxDEV("form",{onSubmit:x,className:"glass",style:{padding:"var(--sp-6)",borderRadius:"var(--radius-lg)",boxShadow:"var(--shadow-lg)"},children:[d&&v.jsxDEV("div",{style:{padding:"var(--sp-2) var(--sp-3)",marginBottom:"var(--sp-4)",borderRadius:"var(--radius-sm)",background:"var(--status-error-glow)",border:"1px solid rgba(255, 64, 112, 0.2)",color:"var(--status-error)",fontSize:"0.8rem",fontFamily:"var(--font-mono)"},children:d},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:123,columnNumber:13},this),v.jsxDEV("div",{style:{marginBottom:"var(--sp-3)"},children:[v.jsxDEV("label",{style:{display:"block",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:"var(--sp-1)"},children:"Username"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:138,columnNumber:13},this),v.jsxDEV("input",{type:"text",className:"input",placeholder:"Enter username",value:t,onChange:T=>e(T.target.value),autoFocus:!0},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:149,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:137,columnNumber:11},this),v.jsxDEV("div",{style:{marginBottom:"var(--sp-5)"},children:[v.jsxDEV("label",{style:{display:"block",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:"var(--sp-1)"},children:"Password"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:160,columnNumber:13},this),v.jsxDEV("input",{type:"password",className:"input",placeholder:"Enter password",value:n,onChange:T=>i(T.target.value)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:171,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:159,columnNumber:11},this),v.jsxDEV("button",{type:"submit",disabled:l,className:"btn btn-accent",style:{width:"100%",padding:"var(--sp-3)",fontSize:"0.85rem",cursor:l?"wait":"pointer",opacity:l?.7:1},children:l?"Authenticating...":"Access Mission Control"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:180,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:113,columnNumber:9},this),v.jsxDEV("p",{style:{textAlign:"center",marginTop:"var(--sp-4)",fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)"},children:"AI Squad Orchestration Platform"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:197,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:64,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:32,columnNumber:5},this)}var aC={exports:{}},ZE={},yV;function c7(){if(yV)return ZE;yV=1;/**
|
|
289
|
+
Active sessions will be aborted.`))){T(!0),f(!1);try{const J=await fetch("/api/system/engine",{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({engine:G})});if(J.ok)(await J.json()).ok&&(e(),alert(`Engine switched to ${G==="opencode"?"OpenCode":G==="claude-code"?"Claude Code":"Auto"}!`));else{const $=await J.json();alert(`Failed to switch engine: ${$.error}`)}}catch{alert("Failed to switch engine")}finally{T(!1)}}},oe=[{id:"opencode",label:"OpenCode",icon:"⚡",desc:"Use OpenCode as AI backend"},{id:"claude-code",label:"Claude Code",icon:"🤖",desc:"Use Claude Code as AI backend"},{id:"auto",label:"Auto",icon:"🔄",desc:"Auto-detect available engine"}],X=n.filter(G=>{const Y=g.toLowerCase();return G.name.toLowerCase().includes(Y)||G.id.toLowerCase().includes(Y)||G.provider.toLowerCase().includes(Y)}),I=G=>{G.key==="ArrowDown"?(G.preventDefault(),E(Y=>Math.min(Y+1,X.length-1))):G.key==="ArrowUp"?(G.preventDefault(),E(Y=>Math.max(Y-1,0))):G.key==="Enter"&&X[y]?(G.preventDefault(),l(X[y].id),p(!1),x("")):G.key==="Escape"&&(p(!1),x(""))};return v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:6},children:[v.jsxDEV("div",{ref:D,style:{position:"relative"},children:[v.jsxDEV("button",{onClick:()=>{f(!d)},style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",fontWeight:600,color:B,background:`${B}18`,border:`1px solid ${B}44`,padding:"2px 6px",borderRadius:"var(--radius-xs)",letterSpacing:"0.04em",display:"flex",alignItems:"center",gap:4,cursor:"pointer"},children:[v.jsxDEV("span",{style:{width:5,height:5,borderRadius:"50%",background:B,boxShadow:`0 0 4px ${B}`}},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:150,columnNumber:11},this),j==="opencode"?"OpenCode":j==="claude-code"?"Claude Code":"Auto",v.jsxDEV("span",{style:{fontSize:"0.5rem",opacity:.7,marginLeft:2},children:"⚙"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:160,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:130,columnNumber:9},this),d&&v.jsxDEV("div",{style:{position:"absolute",top:"100%",left:0,marginTop:4,background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderRadius:6,boxShadow:"0 4px 16px rgba(0,0,0,0.3)",zIndex:1001,minWidth:220,overflow:"hidden"},children:[v.jsxDEV("div",{style:{padding:"8px 12px",borderBottom:"1px solid var(--border-subtle)",fontSize:"0.6rem",color:"var(--text-muted)",fontFamily:"var(--font-mono)"},children:"Switch Engine"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:179,columnNumber:13},this),oe.map(G=>v.jsxDEV("button",{onClick:()=>K(G.id),disabled:N,style:{width:"100%",padding:"8px 12px",background:j===G.id?`${B}12`:"transparent",border:"none",textAlign:"left",cursor:N?"not-allowed":"pointer",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:j===G.id?B:"var(--text-secondary)",borderBottom:"1px solid var(--border-subtle)",opacity:N?.5:1},children:[v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:2},children:[v.jsxDEV("span",{children:G.icon},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:212,columnNumber:19},this),v.jsxDEV("span",{style:{fontWeight:600},children:G.label},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:213,columnNumber:19},this),j===G.id&&v.jsxDEV("span",{style:{fontSize:"0.5rem",background:B,color:"#000",padding:"1px 4px",borderRadius:3},children:"Active"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:215,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:211,columnNumber:17},this),v.jsxDEV("div",{style:{fontSize:"0.55rem",color:"var(--text-muted)",paddingLeft:20},children:G.desc},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:220,columnNumber:17},this)]},G.id,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:191,columnNumber:15},this))]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:164,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:129,columnNumber:7},this),U&&n.length>0&&v.jsxDEV("div",{ref:A,style:{position:"relative"},children:[v.jsxDEV("button",{onClick:()=>{p(!h),x(""),E(0)},style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",fontWeight:600,color:B,background:`${B}18`,border:`1px solid ${B}44`,padding:"2px 6px",borderRadius:"var(--radius-xs)",letterSpacing:"0.04em",display:"flex",alignItems:"center",gap:4,cursor:"pointer"},children:[(P==null?void 0:P.name)||i||"Select Model",v.jsxDEV("span",{style:{fontSize:"0.5rem",opacity:.7,marginLeft:2},children:"▼"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:255,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:232,columnNumber:11},this),h&&v.jsxDEV("div",{style:{position:"absolute",top:"100%",right:0,marginTop:4,background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderRadius:6,boxShadow:"0 4px 16px rgba(0,0,0,0.3)",zIndex:1e3,minWidth:280,overflow:"hidden",display:"flex",flexDirection:"column"},children:[v.jsxDEV("div",{style:{padding:"8px 10px",borderBottom:"1px solid var(--border-subtle)",display:"flex",alignItems:"center",gap:6},children:[v.jsxDEV("span",{style:{color:"var(--text-muted)",fontSize:"0.7rem"},children:"🔍"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:285,columnNumber:17},this),v.jsxDEV("input",{ref:M,type:"text",placeholder:"Search models...",value:g,onChange:G=>{x(G.target.value),E(0)},onKeyDown:I,style:{flex:1,background:"transparent",border:"none",outline:"none",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-primary)"}},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:286,columnNumber:17},this),g&&v.jsxDEV("button",{onClick:()=>x(""),style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)",fontSize:"0.65rem",padding:0},children:"✕"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:307,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:276,columnNumber:15},this),v.jsxDEV("div",{style:{overflowY:"auto",maxHeight:240},children:X.length===0?v.jsxDEV("div",{style:{padding:"12px",textAlign:"center",color:"var(--text-muted)",fontSize:"0.65rem",fontFamily:"var(--font-mono)"},children:"No models found"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:324,columnNumber:19},this):X.map((G,Y)=>v.jsxDEV("button",{onClick:()=>{l(G.id),p(!1),x("")},onMouseEnter:()=>E(Y),style:{width:"100%",padding:"6px 12px",background:Y===y?`${B}20`:i===G.id?`${B}12`:"transparent",border:"none",textAlign:"left",cursor:"pointer",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:Y===y||i===G.id?B:"var(--text-secondary)",borderBottom:"1px solid var(--border-subtle)"},children:[v.jsxDEV("div",{style:{fontWeight:600,marginBottom:2},children:G.name},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:368,columnNumber:23},this),v.jsxDEV("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.55rem",color:"var(--text-muted)"},children:[v.jsxDEV("span",{children:G.provider},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:377,columnNumber:25},this),v.jsxDEV("span",{style:{opacity:.6},children:["$",G.cost.input,"/$",G.cost.output]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:378,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:369,columnNumber:23},this)]},G.id,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:337,columnNumber:21},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:322,columnNumber:15},this),v.jsxDEV("div",{style:{padding:"4px 12px",borderTop:"1px solid var(--border-subtle)",fontSize:"0.55rem",color:"var(--text-muted)",fontFamily:"var(--font-mono)",display:"flex",justifyContent:"space-between"},children:[v.jsxDEV("span",{children:"↑↓ Navigate • Enter Select • Esc Close"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:397,columnNumber:17},this),v.jsxDEV("span",{children:[X.length," models"]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:398,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:386,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:259,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:231,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/EngineBadge.tsx",lineNumber:127,columnNumber:5},this)}const s7=O.lazy(()=>Gf(()=>import("./ThreeBackground-DNuijkpe.js"),__vite__mapDeps([0,1])).then(t=>({default:t.ThreeBackground})));O.lazy(()=>Gf(()=>Promise.resolve().then(()=>cle),void 0).then(t=>({default:t.MarketplaceView})));const o7=[{to:"/office",label:"Office",icon:"⬡"},{to:"/chat",label:"Chat",icon:"◈"},{to:"/kanban",label:"Kanban",icon:"▦"},{to:"/marketplace",label:"Marketplace",icon:"🏪"},{to:"/dashboard",label:"Dashboard",icon:"▣"},{to:"/scheduler",label:"Scheduler",icon:"⏣"},{to:"/email",label:"Email",icon:"✉"},{to:"/orgchart",label:"Org Chart",icon:"◎"},{to:"/graph",label:"Graph",icon:"◇"},{to:"/files",label:"Files",icon:"▤"},{to:"/knowledge",label:"Knowledge",icon:"◆"},{to:"/settings",label:"Settings",icon:"⚙"}];function a7(){const t=ou(ce=>ce.user),e=ou(ce=>ce.isAuthenticated),n=ou(ce=>ce.loading),i=ou(ce=>ce.logout),o=ou(ce=>ce.checkAuth),l=tD(),d=_c();d.pathname==="/office"||d.pathname;const f=d.pathname==="/jarvis",h=TN(ce=>ce.theme),p=TN(ce=>ce.toggle),g=Us(ce=>ce.squads),x=Us(ce=>ce.selectedSquad),y=Us(ce=>x?ce.activeStates[x]:null),E=Us(ce=>ce.fetchSquads),N=Us(ce=>ce.setSquadState),T=Us(ce=>ce.clearSquadState),D=O.useCallback((ce,Ce)=>{N(ce,Ce);const De=Wr.getState();De.rooms.includes(ce)||De.syncRooms([...De.rooms,ce]),Ce.status!=="checkpoint"&&De.clearCheckpoint(ce),Ce.agents&&De.setAgents(ce,Ce.agents.map(Ae=>({id:Ae.id,name:Ae.name,status:Ae.status})))},[N]),A=O.useCallback(ce=>{T(ce);const Ce=Wr.getState(),De=Ce.agentVisuals[ce];if(De)for(const Ae of De)Ce.setAgentStatus(ce,Ae.id,"idle")},[T]),M=O.useCallback((ce,Ce)=>{vs.setState(De=>({conversationId:Ce,messages:[],conversations:[{id:Ce,createdAt:new Date().toISOString(),preview:""},...De.conversations.filter(Ae=>Ae.id!==Ce)]}))},[]),j=O.useCallback((ce,Ce,De)=>{if(ce==="_jarvis"){oC.getState().appendChunk(De);return}const Ae=vs.getState();Ae.streaming||Ae.startStreaming(),Ae.appendChunk(De)},[]),U=O.useCallback((ce,Ce,De)=>{if(ce==="_jarvis"){oC.getState().finalizeMessage(De);return}vs.getState().finishStreaming(De)},[]),B=O.useCallback((ce,Ce)=>{if(ce==="_jarvis"){oC.getState().setMode("LISTENING");return}vs.getState().setError(Ce)},[]),P=O.useCallback((ce,Ce,De)=>{ce!=="_jarvis"&&vs.getState().setActivity(`${Ce}${De?" "+De:""}`)},[]),K=O.useCallback((ce,Ce,De,Ae,xe)=>{vs.getState().addAgentDm({agentId:De,agentName:Ae,content:xe})},[]),oe=O.useCallback((ce,Ce,De,Ae)=>{Wr.getState().appendBubble(ce,Ce,Ae)},[]),X=O.useCallback((ce,Ce,De,Ae,xe)=>{Wr.getState().addActivity(ce,De,`started "${xe}"`),Wr.getState().setAgentStatus(ce,Ce,"working")},[]),I=O.useCallback((ce,Ce,De,Ae,xe)=>{Wr.getState().addActivity(ce,De,`completed "${xe}"`),Wr.getState().setAgentStatus(ce,Ce,"idle")},[]),G=O.useCallback((ce,Ce,De,Ae)=>{Wr.getState().setCheckpoint(ce,Ce,De,Ae),Wr.getState().setAgentStatus(ce,Ce,"checkpoint")},[]),Y=O.useCallback(()=>{Wr.getState().clearAllBubbles()},[]),J=O.useCallback((ce,Ce,De)=>{Oo.getState().fetchJobs()},[]),$=O.useCallback((ce,Ce,De,Ae)=>{Oo.getState().fetchJobs()},[]),Q=O.useCallback((ce,Ce,De,Ae,xe)=>{Oo.getState().fetchJobs()},[]),z=O.useCallback((ce,Ce)=>{Oo.getState().updateJobStatus(ce,Ce)},[]),ee=O.useCallback(ce=>{window.dispatchEvent(new CustomEvent("kanban:task_updated",{detail:ce}))},[]),te=O.useCallback((ce,Ce)=>{Us.getState().setUiComponents(ce,Ce)},[]),{subscribe:se,unsubscribe:q,sendChat:L,newConversation:ae,sendCheckpointResponse:Z}=jL({onSquadState:D,onSquadInactive:A,onChatConversationCreated:M,onChatChunk:j,onChatActivity:P,onChatDone:U,onChatError:B,onChatAgentDm:K,onAgentOutputChunk:oe,onAgentStepStart:X,onAgentStepComplete:I,onSquadCheckpoint:G,onReconnect:Y,onScheduleStarted:J,onScheduleDone:$,onScheduleError:Q,onScheduleStatusChanged:z,onKanbanTaskUpdated:ee,onA2uiUpdate:te});O.useEffect(()=>{VL(L)},[L]),O.useEffect(()=>{UL(ae)},[ae]),O.useEffect(()=>{OL(Z)},[Z]),O.useEffect(()=>{E().then(()=>{const{squads:ce}=Us.getState();if(ce.length>0){const Ce=Wr.getState(),De=ce.map(qe=>qe.code),Ae=Ce.rooms,xe=[...new Set([...Ae,...De])];Ce.syncRooms(xe);for(const qe of ce)!Ce.agentVisuals[qe.code]&&qe.agents&&qe.agents.length>0&&Ce.setAgents(qe.code,qe.agents.map(ke=>({id:ke.id,name:ke.name,avatar:ke.avatar,status:"idle"})))}})},[E]);const ge=Wr(ce=>ce.rooms);return O.useEffect(()=>{for(const ce of ge)se(ce);return()=>{for(const ce of ge)q(ce)}},[ge,se,q]),O.useEffect(()=>(se("_expxagents"),()=>q("_expxagents")),[se,q]),O.useEffect(()=>{if(f)return se("_jarvis"),()=>q("_jarvis")},[f,se,q]),O.useEffect(()=>{e||o()},[]),O.useEffect(()=>{!n&&!e&&l("/login",{state:{from:d.pathname}})},[n,e,l,d.pathname]),f?v.jsxDEV(rV,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:264,columnNumber:12},this):v.jsxDEV("div",{className:"noise-bg",style:{display:"flex",flexDirection:"column",height:"100vh",background:"var(--surface-0)",color:"var(--text-primary)"},children:[v.jsxDEV("header",{"data-layout":"header",style:{display:"flex",justifyContent:"space-between",alignItems:"center",height:"var(--header-height)",padding:"0 var(--sp-4)",background:"var(--surface-1)",borderBottom:"1px solid var(--border-subtle)",position:"relative",zIndex:10},children:[v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)"},children:[v.jsxDEV("div",{style:{width:28,height:28,borderRadius:"var(--radius-sm)",background:"linear-gradient(135deg, var(--accent), var(--accent-dim))",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"0.8rem",fontWeight:700,color:"var(--text-inverse)",boxShadow:"0 0 12px var(--accent-glow-strong)"},children:"EX"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:289,columnNumber:11},this),v.jsxDEV("span",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"0.95rem",color:"var(--text-primary)",letterSpacing:"-0.02em"},children:"ExpxAgents"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:304,columnNumber:11},this),v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)",background:"var(--surface-3)",padding:"2px 6px",borderRadius:"var(--radius-xs)",letterSpacing:"0.05em"},children:"MISSION CONTROL"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:313,columnNumber:11},this),v.jsxDEV(i7,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:324,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:288,columnNumber:9},this),v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-4)"},children:[v.jsxDEV("button",{"data-testid":"btn-restart-server",onClick:async()=>{if(confirm("Restart the server? It will be briefly unavailable."))try{await fetch("/api/system/restart",{method:"POST",credentials:"include"})}catch{}},title:"Restart server",style:{background:"none",border:"1px solid var(--border-subtle)",color:"var(--text-muted)",cursor:"pointer",fontFamily:"var(--font-mono)",fontSize:"0.7rem",padding:"3px 8px",borderRadius:"var(--radius-xs)",transition:"all var(--duration-fast) var(--ease-out)",display:"flex",alignItems:"center",gap:4},onMouseEnter:ce=>{ce.currentTarget.style.color="var(--accent)",ce.currentTarget.style.borderColor="var(--accent)"},onMouseLeave:ce=>{ce.currentTarget.style.color="var(--text-muted)",ce.currentTarget.style.borderColor="var(--border-subtle)"},children:"↻ Restart"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:333,columnNumber:11},this),v.jsxDEV("button",{"data-testid":"btn-toggle-theme",onClick:p,title:`Switch to ${h==="dark"?"light":"dark"} mode`,style:{background:"none",border:"1px solid var(--border-subtle)",color:"var(--text-muted)",cursor:"pointer",fontFamily:"var(--font-mono)",fontSize:"0.85rem",padding:"3px 8px",borderRadius:"var(--radius-xs)",transition:"all var(--duration-fast) var(--ease-out)",display:"flex",alignItems:"center",gap:4,lineHeight:1},onMouseEnter:ce=>{ce.currentTarget.style.color="var(--accent)",ce.currentTarget.style.borderColor="var(--accent)"},onMouseLeave:ce=>{ce.currentTarget.style.color="var(--text-muted)",ce.currentTarget.style.borderColor="var(--border-subtle)"},children:h==="dark"?"☀":"☽"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:367,columnNumber:11},this),v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",fontFamily:"var(--font-mono)",fontSize:"0.75rem",color:"var(--text-secondary)"},children:[v.jsxDEV("span",{style:{display:"inline-block",width:6,height:6,borderRadius:"50%",background:"var(--status-active)",boxShadow:"0 0 8px var(--status-active-glow)",animation:"statusPulse 2s ease-in-out infinite"}},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:405,columnNumber:13},this),v.jsxDEV("span",{children:t==null?void 0:t.username},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:414,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:397,columnNumber:11},this),v.jsxDEV("button",{onClick:i,className:"btn-ghost",style:{background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",fontFamily:"var(--font-display)",fontSize:"0.75rem",padding:"4px 8px",borderRadius:"var(--radius-xs)",transition:"color var(--duration-fast) var(--ease-out)"},onMouseEnter:ce=>ce.currentTarget.style.color="var(--status-error)",onMouseLeave:ce=>ce.currentTarget.style.color="var(--text-muted)",children:"Logout"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:416,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:328,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:276,columnNumber:7},this),v.jsxDEV(t7,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:438,columnNumber:7},this),v.jsxDEV("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[v.jsxDEV("aside",{"data-layout":"sidebar",style:{width:"var(--sidebar-width)",background:"var(--surface-1)",borderRight:"1px solid var(--border-subtle)",display:"flex",flexDirection:"column",overflowY:"auto"},children:[v.jsxDEV("nav",{style:{padding:"var(--sp-3)",display:"flex",flexDirection:"column",gap:"var(--sp-1)",flex:1},children:[v.jsxDEV("div",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.1em",padding:"0 var(--sp-2)",marginBottom:"var(--sp-1)"},children:"Navigation"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:459,columnNumber:13},this),o7.map(ce=>v.jsxDEV(q3,{to:ce.to,style:({isActive:Ce})=>({display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"8px 10px",borderRadius:"var(--radius-sm)",textDecoration:"none",fontSize:"0.82rem",fontWeight:Ce?600:400,color:Ce?"var(--accent)":"var(--text-secondary)",background:Ce?"var(--accent-glow)":"transparent",border:Ce?"1px solid var(--accent-glow)":"1px solid transparent",transition:"all var(--duration-fast) var(--ease-out)"}),children:[v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.85rem",width:20,textAlign:"center",opacity:.7},children:ce.icon},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:490,columnNumber:17},this),ce.label]},ce.to,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:472,columnNumber:15},this)),v.jsxDEV("div",{style:{height:1,margin:"var(--sp-2) var(--sp-2)",background:"var(--border-subtle)"}},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:502,columnNumber:13},this),v.jsxDEV("a",{href:"/docs",target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"8px 10px",borderRadius:"var(--radius-sm)",textDecoration:"none",fontSize:"0.82rem",fontWeight:400,color:"var(--text-secondary)",background:"transparent",border:"1px solid transparent",transition:"all var(--duration-fast) var(--ease-out)"},onMouseEnter:ce=>{ce.currentTarget.style.color="var(--accent)",ce.currentTarget.style.background="var(--accent-glow)",ce.currentTarget.style.borderColor="var(--accent-glow)"},onMouseLeave:ce=>{ce.currentTarget.style.color="var(--text-secondary)",ce.currentTarget.style.background="transparent",ce.currentTarget.style.borderColor="transparent"},children:[v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.85rem",width:20,textAlign:"center",opacity:.7},children:"≡"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:536,columnNumber:15},this),"Docs",v.jsxDEV("span",{style:{marginLeft:"auto",fontFamily:"var(--font-mono)",fontSize:"0.55rem",opacity:.6},children:"↗"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:544,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:507,columnNumber:13},this),v.jsxDEV("a",{href:"/jarvis",target:"_blank",rel:"noopener noreferrer",style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"8px 10px",borderRadius:"var(--radius-sm)",textDecoration:"none",fontSize:"0.82rem",fontWeight:500,color:"var(--status-active)",background:"var(--status-active-glow)",border:"1px solid var(--status-active-glow)",transition:"all var(--duration-fast) var(--ease-out)"},children:[v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.85rem",width:20,textAlign:"center",opacity:.7},children:"◉"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:570,columnNumber:15},this),"Ava",v.jsxDEV("span",{style:{marginLeft:"auto",fontFamily:"var(--font-mono)",fontSize:"0.55rem",opacity:.6},children:"↗"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:578,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:551,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:452,columnNumber:11},this),v.jsxDEV("div",{style:{padding:"var(--sp-3)",borderTop:"1px solid var(--border-subtle)",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",display:"flex",justifyContent:"space-between"},children:[v.jsxDEV("span",{children:[g.length," squad",g.length!==1?"s":""]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:597,columnNumber:13},this),v.jsxDEV("span",{children:"v0.1.0"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:598,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:588,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:443,columnNumber:9},this),v.jsxDEV("main",{className:"grid-bg",style:{flex:1,overflow:"hidden",position:"relative"},children:[v.jsxDEV(O.Suspense,{fallback:null,children:v.jsxDEV(s7,{opacity:.4},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:609,columnNumber:13},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:608,columnNumber:11},this),v.jsxDEV("div",{style:{position:"relative",zIndex:1,height:"100%",overflow:"auto"},children:v.jsxDEV(rV,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:612,columnNumber:13},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:611,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:603,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:441,columnNumber:7},this),v.jsxDEV("div",{"data-layout":"statusbar",children:v.jsxDEV(ML,{state:y},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:619,columnNumber:9},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:618,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/App.tsx",lineNumber:268,columnNumber:5},this)}const l7=O.lazy(()=>Gf(()=>import("./ThreeBackground-DNuijkpe.js"),__vite__mapDeps([0,1])).then(t=>({default:t.ThreeBackground})));function u7(){var N;const[t,e]=O.useState(""),[n,i]=O.useState(""),o=ou(T=>T.login),l=ou(T=>T.loading),d=ou(T=>T.error),f=ou(T=>T.isAuthenticated),h=tD(),g=((N=_c().state)==null?void 0:N.from)||"/";O.useEffect(()=>{f&&h(g,{replace:!0})},[f,h,g]);const x=T=>{T.preventDefault(),o(t,n)},y=TN(T=>T.theme),E=TN(T=>T.toggle);return v.jsxDEV("div",{className:"noise-bg",style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"var(--surface-0)",position:"relative",overflow:"hidden"},children:[v.jsxDEV(O.Suspense,{fallback:null,children:v.jsxDEV(l7,{opacity:.6},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:41,columnNumber:33},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:41,columnNumber:7},this),v.jsxDEV("button",{onClick:E,title:`Switch to ${y==="dark"?"light":"dark"} mode`,style:{position:"absolute",top:16,right:16,zIndex:10,background:"var(--surface-2)",border:"1px solid var(--border-default)",color:"var(--text-secondary)",cursor:"pointer",fontSize:"1rem",padding:"6px 10px",borderRadius:"var(--radius-sm)",transition:"all var(--duration-fast) var(--ease-out)",lineHeight:1},children:y==="dark"?"☀":"☽"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:43,columnNumber:7},this),v.jsxDEV("div",{style:{animation:"fadeInUp 0.6s var(--ease-out) both",width:360,position:"relative",zIndex:1},children:[v.jsxDEV("div",{style:{textAlign:"center",marginBottom:"var(--sp-8)"},children:[v.jsxDEV("div",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:48,height:48,borderRadius:"var(--radius-md)",background:"linear-gradient(135deg, var(--accent), var(--accent-dim))",fontSize:"1.1rem",fontWeight:800,color:"var(--text-inverse)",boxShadow:"var(--shadow-glow-strong)",marginBottom:"var(--sp-4)"},children:"EX"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:75,columnNumber:11},this),v.jsxDEV("h1",{style:{fontFamily:"var(--font-display)",fontWeight:700,fontSize:"1.4rem",color:"var(--text-primary)",letterSpacing:"-0.02em",marginBottom:"var(--sp-1)"},children:"ExpxAgents"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:91,columnNumber:11},this),v.jsxDEV("p",{style:{fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.15em"},children:"Mission Control"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:101,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:71,columnNumber:9},this),v.jsxDEV("form",{onSubmit:x,className:"glass",style:{padding:"var(--sp-6)",borderRadius:"var(--radius-lg)",boxShadow:"var(--shadow-lg)"},children:[d&&v.jsxDEV("div",{style:{padding:"var(--sp-2) var(--sp-3)",marginBottom:"var(--sp-4)",borderRadius:"var(--radius-sm)",background:"var(--status-error-glow)",border:"1px solid rgba(255, 64, 112, 0.2)",color:"var(--status-error)",fontSize:"0.8rem",fontFamily:"var(--font-mono)"},children:d},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:123,columnNumber:13},this),v.jsxDEV("div",{style:{marginBottom:"var(--sp-3)"},children:[v.jsxDEV("label",{style:{display:"block",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:"var(--sp-1)"},children:"Username"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:138,columnNumber:13},this),v.jsxDEV("input",{type:"text",className:"input",placeholder:"Enter username",value:t,onChange:T=>e(T.target.value),autoFocus:!0},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:149,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:137,columnNumber:11},this),v.jsxDEV("div",{style:{marginBottom:"var(--sp-5)"},children:[v.jsxDEV("label",{style:{display:"block",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:"var(--sp-1)"},children:"Password"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:160,columnNumber:13},this),v.jsxDEV("input",{type:"password",className:"input",placeholder:"Enter password",value:n,onChange:T=>i(T.target.value)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:171,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:159,columnNumber:11},this),v.jsxDEV("button",{type:"submit",disabled:l,className:"btn btn-accent",style:{width:"100%",padding:"var(--sp-3)",fontSize:"0.85rem",cursor:l?"wait":"pointer",opacity:l?.7:1},children:l?"Authenticating...":"Access Mission Control"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:180,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:113,columnNumber:9},this),v.jsxDEV("p",{style:{textAlign:"center",marginTop:"var(--sp-4)",fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)"},children:"AI Squad Orchestration Platform"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:197,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:64,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/components/LoginPage.tsx",lineNumber:32,columnNumber:5},this)}var aC={exports:{}},ZE={},yV;function c7(){if(yV)return ZE;yV=1;/**
|
|
290
290
|
* @license React
|
|
291
291
|
* react-jsx-runtime.development.js
|
|
292
292
|
*
|
|
@@ -299,7 +299,7 @@ Active sessions will be aborted.`))){T(!0),f(!1);try{const J=await fetch("/api/s
|
|
|
299
299
|
<%s {...props} />
|
|
300
300
|
React keys must be passed directly to JSX without using spread:
|
|
301
301
|
let props = %s;
|
|
302
|
-
<%s key={someKey} {...props} />`,ge,De,Ae,De),q[De+ge]=!0)}if(De=null,Z!==void 0&&(n(Z),De=""+Z),d(ae)&&(n(ae.key),De=""+ae.key),"key"in ae){Z={};for(var xe in ae)xe!=="key"&&(Z[xe]=ae[xe])}else Z=ae;return De&&f(Z,typeof L=="function"?L.displayName||L.name||"Unknown":L),p(L,De,Z,o(),ce,Ce)}function x(L){y(L)?L._store&&(L._store.validated=1):typeof L=="object"&&L!==null&&L.$$typeof===X&&(L._payload.status==="fulfilled"?y(L._payload.value)&&L._payload.value._store&&(L._payload.value._store.validated=1):L._store&&(L._store.validated=1))}function y(L){return typeof L=="object"&&L!==null&&L.$$typeof===N}var E=Vm(),N=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),U=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),G=Symbol.for("react.client.reference"),Y=E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=Object.prototype.hasOwnProperty,$=Array.isArray,Q=console.createTask?console.createTask:function(){return null};E={react_stack_bottom_frame:function(L){return L()}};var z,ee={},te=E.react_stack_bottom_frame.bind(E,l)(),se=Q(i(l)),q={};ZE.Fragment=D,ZE.jsx=function(L,ae,Z){var ge=1e4>Y.recentlyCreatedOwnerStacks++;return g(L,ae,Z,!1,ge?Error("react-stack-top-frame"):te,ge?Q(i(L)):se)},ZE.jsxs=function(L,ae,Z){var ge=1e4>Y.recentlyCreatedOwnerStacks++;return g(L,ae,Z,!0,ge?Error("react-stack-top-frame"):te,ge?Q(i(L)):se)}})(),ZE}var vV;function d7(){return vV||(vV=1,aC.exports=c7()),aC.exports}var Be=d7();function K3(t,e,n){if(!t)return;if(n(t)===!0)return t;let i=t.child;for(;i;){const o=K3(i,e,n);if(o)return o;i=i.sibling}}function W3(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const $R=W3(O.createContext(null));let Q3=class extends O.Component{render(){return O.createElement($R.Provider,{value:this._reactInternals},this.props.children)}};function f7(){const t=O.useContext($R);if(t===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=O.useId();return O.useMemo(()=>{for(const n of[t,t==null?void 0:t.alternate]){if(!n)continue;const i=K3(n,!1,o=>{let l=o.memoizedState;for(;l;){if(l.memoizedState===e)return!0;l=l.next}});if(i)return i}},[t,e])}const h7=Symbol.for("react.context"),m7=t=>t!==null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===h7;function p7(){const t=f7(),[e]=O.useState(()=>new Map);e.clear();let n=t;for(;n;){const i=n.type;m7(i)&&i!==$R&&!e.has(i)&&e.set(i,O.use(W3(i))),n=n.return}return e}function g7(){const t=p7();return O.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>i=>O.createElement(e,null,O.createElement(n.Provider,{...i,value:t.get(n)})),e=>O.createElement(Q3,{...e})),[t])}var hn=(t=>(t.Application="application",t.WebGLPipes="webgl-pipes",t.WebGLPipesAdaptor="webgl-pipes-adaptor",t.WebGLSystem="webgl-system",t.WebGPUPipes="webgpu-pipes",t.WebGPUPipesAdaptor="webgpu-pipes-adaptor",t.WebGPUSystem="webgpu-system",t.CanvasSystem="canvas-system",t.CanvasPipesAdaptor="canvas-pipes-adaptor",t.CanvasPipes="canvas-pipes",t.Asset="asset",t.LoadParser="load-parser",t.ResolveParser="resolve-parser",t.CacheParser="cache-parser",t.DetectionParser="detection-parser",t.MaskEffect="mask-effect",t.BlendMode="blend-mode",t.TextureSource="texture-source",t.Environment="environment",t.ShapeBuilder="shape-builder",t.Batcher="batcher",t))(hn||{});const LT=t=>{if(typeof t=="function"||typeof t=="object"&&t.extension){if(!t.extension)throw new Error("Extension class must have an extension object");t={...typeof t.extension!="object"?{type:t.extension}:t.extension,ref:t}}if(typeof t=="object")t={...t};else throw new Error("Invalid extension type");return typeof t.type=="string"&&(t.type=[t.type]),t},kS=(t,e)=>LT(t).priority??e,Zr={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...t){return t.map(LT).forEach(e=>{e.type.forEach(n=>{var i,o;return(o=(i=this._removeHandlers)[n])==null?void 0:o.call(i,e)})}),this},add(...t){return t.map(LT).forEach(e=>{e.type.forEach(n=>{var l,d;const i=this._addHandlers,o=this._queue;i[n]?(d=i[n])==null||d.call(i,e):(o[n]=o[n]||[],(l=o[n])==null||l.push(e))})}),this},handle(t,e,n){var d;const i=this._addHandlers,o=this._removeHandlers;if(i[t]||o[t])throw new Error(`Extension type ${t} already has a handler`);i[t]=e,o[t]=n;const l=this._queue;return l[t]&&((d=l[t])==null||d.forEach(f=>e(f)),delete l[t]),this},handleByMap(t,e){return this.handle(t,n=>{n.name&&(e[n.name]=n.ref)},n=>{n.name&&delete e[n.name]})},handleByNamedList(t,e,n=-1){return this.handle(t,i=>{e.findIndex(l=>l.name===i.name)>=0||(e.push({name:i.name,value:i.ref}),e.sort((l,d)=>kS(d.value,n)-kS(l.value,n)))},i=>{const o=e.findIndex(l=>l.name===i.name);o!==-1&&e.splice(o,1)})},handleByList(t,e,n=-1){return this.handle(t,i=>{e.includes(i.ref)||(e.push(i.ref),e.sort((o,l)=>kS(l,n)-kS(o,n)))},i=>{const o=e.indexOf(i.ref);o!==-1&&e.splice(o,1)})},mixin(t,...e){for(const n of e)Object.defineProperties(t.prototype,Object.getOwnPropertyDescriptors(n))}},b7={extension:{type:hn.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Gf(()=>import("./browserAll-BSDNyYL5.js"),__vite__mapDeps([2,3]))}},x7={extension:{type:hn.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await Gf(()=>import("./webworkerAll-ByXVHd6c.js"),[])}};class Vs{constructor(e,n,i){this._x=n||0,this._y=i||0,this._observer=e}clone(e){return new Vs(e??this._observer,this._x,this._y)}set(e=0,n=e){return(this._x!==e||this._y!==n)&&(this._x=e,this._y=n,this._observer._onUpdate(this)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this._observer._onUpdate(this)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this._observer._onUpdate(this))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this._observer._onUpdate(this))}}var lC={exports:{}},EV;function y7(){return EV||(EV=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(n=!1));function o(h,p,g){this.fn=h,this.context=p,this.once=g||!1}function l(h,p,g,x,y){if(typeof g!="function")throw new TypeError("The listener must be a function");var E=new o(g,x||h,y),N=n?n+p:p;return h._events[N]?h._events[N].fn?h._events[N]=[h._events[N],E]:h._events[N].push(E):(h._events[N]=E,h._eventsCount++),h}function d(h,p){--h._eventsCount===0?h._events=new i:delete h._events[p]}function f(){this._events=new i,this._eventsCount=0}f.prototype.eventNames=function(){var p=[],g,x;if(this._eventsCount===0)return p;for(x in g=this._events)e.call(g,x)&&p.push(n?x.slice(1):x);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(g)):p},f.prototype.listeners=function(p){var g=n?n+p:p,x=this._events[g];if(!x)return[];if(x.fn)return[x.fn];for(var y=0,E=x.length,N=new Array(E);y<E;y++)N[y]=x[y].fn;return N},f.prototype.listenerCount=function(p){var g=n?n+p:p,x=this._events[g];return x?x.fn?1:x.length:0},f.prototype.emit=function(p,g,x,y,E,N){var T=n?n+p:p;if(!this._events[T])return!1;var D=this._events[T],A=arguments.length,M,j;if(D.fn){switch(D.once&&this.removeListener(p,D.fn,void 0,!0),A){case 1:return D.fn.call(D.context),!0;case 2:return D.fn.call(D.context,g),!0;case 3:return D.fn.call(D.context,g,x),!0;case 4:return D.fn.call(D.context,g,x,y),!0;case 5:return D.fn.call(D.context,g,x,y,E),!0;case 6:return D.fn.call(D.context,g,x,y,E,N),!0}for(j=1,M=new Array(A-1);j<A;j++)M[j-1]=arguments[j];D.fn.apply(D.context,M)}else{var U=D.length,B;for(j=0;j<U;j++)switch(D[j].once&&this.removeListener(p,D[j].fn,void 0,!0),A){case 1:D[j].fn.call(D[j].context);break;case 2:D[j].fn.call(D[j].context,g);break;case 3:D[j].fn.call(D[j].context,g,x);break;case 4:D[j].fn.call(D[j].context,g,x,y);break;default:if(!M)for(B=1,M=new Array(A-1);B<A;B++)M[B-1]=arguments[B];D[j].fn.apply(D[j].context,M)}}return!0},f.prototype.on=function(p,g,x){return l(this,p,g,x,!1)},f.prototype.once=function(p,g,x){return l(this,p,g,x,!0)},f.prototype.removeListener=function(p,g,x,y){var E=n?n+p:p;if(!this._events[E])return this;if(!g)return d(this,E),this;var N=this._events[E];if(N.fn)N.fn===g&&(!y||N.once)&&(!x||N.context===x)&&d(this,E);else{for(var T=0,D=[],A=N.length;T<A;T++)(N[T].fn!==g||y&&!N[T].once||x&&N[T].context!==x)&&D.push(N[T]);D.length?this._events[E]=D.length===1?D[0]:D:d(this,E)}return this},f.prototype.removeAllListeners=function(p){var g;return p?(g=n?n+p:p,this._events[g]&&d(this,g)):(this._events=new i,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prefixed=n,f.EventEmitter=f,t.exports=f})(lC)),lC.exports}var v7=y7();const pd=Qf(v7),E7=Math.PI*2,_7=180/Math.PI,w7=Math.PI/180;class ao{constructor(e=0,n=0){this.x=0,this.y=0,this.x=e,this.y=n}clone(){return new ao(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,n=e){return this.x=e,this.y=n,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return uC.x=0,uC.y=0,uC}}const uC=new ao;class Sn{constructor(e=1,n=0,i=0,o=1,l=0,d=0){this.array=null,this.a=e,this.b=n,this.c=i,this.d=o,this.tx=l,this.ty=d}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,n,i,o,l,d){return this.a=e,this.b=n,this.c=i,this.d=o,this.tx=l,this.ty=d,this}toArray(e,n){this.array||(this.array=new Float32Array(9));const i=n||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(e,n){n=n||new ao;const i=e.x,o=e.y;return n.x=this.a*i+this.c*o+this.tx,n.y=this.b*i+this.d*o+this.ty,n}applyInverse(e,n){n=n||new ao;const i=this.a,o=this.b,l=this.c,d=this.d,f=this.tx,h=this.ty,p=1/(i*d+l*-o),g=e.x,x=e.y;return n.x=d*p*g+-l*p*x+(h*l-f*d)*p,n.y=i*p*x+-o*p*g+(-h*i+f*o)*p,n}translate(e,n){return this.tx+=e,this.ty+=n,this}scale(e,n){return this.a*=e,this.d*=n,this.c*=e,this.b*=n,this.tx*=e,this.ty*=n,this}rotate(e){const n=Math.cos(e),i=Math.sin(e),o=this.a,l=this.c,d=this.tx;return this.a=o*n-this.b*i,this.b=o*i+this.b*n,this.c=l*n-this.d*i,this.d=l*i+this.d*n,this.tx=d*n-this.ty*i,this.ty=d*i+this.ty*n,this}append(e){const n=this.a,i=this.b,o=this.c,l=this.d;return this.a=e.a*n+e.b*o,this.b=e.a*i+e.b*l,this.c=e.c*n+e.d*o,this.d=e.c*i+e.d*l,this.tx=e.tx*n+e.ty*o+this.tx,this.ty=e.tx*i+e.ty*l+this.ty,this}appendFrom(e,n){const i=e.a,o=e.b,l=e.c,d=e.d,f=e.tx,h=e.ty,p=n.a,g=n.b,x=n.c,y=n.d;return this.a=i*p+o*x,this.b=i*g+o*y,this.c=l*p+d*x,this.d=l*g+d*y,this.tx=f*p+h*x+n.tx,this.ty=f*g+h*y+n.ty,this}setTransform(e,n,i,o,l,d,f,h,p){return this.a=Math.cos(f+p)*l,this.b=Math.sin(f+p)*l,this.c=-Math.sin(f-h)*d,this.d=Math.cos(f-h)*d,this.tx=e-(i*this.a+o*this.c),this.ty=n-(i*this.b+o*this.d),this}prepend(e){const n=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const i=this.a,o=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=o*e.a+this.d*e.c,this.d=o*e.b+this.d*e.d}return this.tx=n*e.a+this.ty*e.c+e.tx,this.ty=n*e.b+this.ty*e.d+e.ty,this}decompose(e){const n=this.a,i=this.b,o=this.c,l=this.d,d=e.pivot,f=-Math.atan2(-o,l),h=Math.atan2(i,n),p=Math.abs(f+h);return p<1e-5||Math.abs(E7-p)<1e-5?(e.rotation=h,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=f,e.skew.y=h),e.scale.x=Math.sqrt(n*n+i*i),e.scale.y=Math.sqrt(o*o+l*l),e.position.x=this.tx+(d.x*n+d.y*o),e.position.y=this.ty+(d.x*i+d.y*l),e}invert(){const e=this.a,n=this.b,i=this.c,o=this.d,l=this.tx,d=e*o-n*i;return this.a=o/d,this.b=-n/d,this.c=-i/d,this.d=e/d,this.tx=(i*this.ty-o*l)/d,this.ty=-(e*this.ty-n*l)/d,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new Sn;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}equals(e){return e.a===this.a&&e.b===this.b&&e.c===this.c&&e.d===this.d&&e.tx===this.tx&&e.ty===this.ty}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return N7.identity()}static get shared(){return S7.identity()}}const S7=new Sn,N7=new Sn,Bg=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Lg=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Ig=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Hg=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],IT=[],Z3=[],MS=Math.sign;function D7(){for(let t=0;t<16;t++){const e=[];IT.push(e);for(let n=0;n<16;n++){const i=MS(Bg[t]*Bg[n]+Ig[t]*Lg[n]),o=MS(Lg[t]*Bg[n]+Hg[t]*Lg[n]),l=MS(Bg[t]*Ig[n]+Ig[t]*Hg[n]),d=MS(Lg[t]*Ig[n]+Hg[t]*Hg[n]);for(let f=0;f<16;f++)if(Bg[f]===i&&Lg[f]===o&&Ig[f]===l&&Hg[f]===d){e.push(f);break}}}for(let t=0;t<16;t++){const e=new Sn;e.set(Bg[t],Lg[t],Ig[t],Hg[t],0,0),Z3.push(e)}}D7();const pr={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:t=>Bg[t],uY:t=>Lg[t],vX:t=>Ig[t],vY:t=>Hg[t],inv:t=>t&8?t&15:-t&7,add:(t,e)=>IT[t][e],sub:(t,e)=>IT[t][pr.inv(e)],rotate180:t=>t^4,isVertical:t=>(t&3)===2,byDirection:(t,e)=>Math.abs(t)*2<=Math.abs(e)?e>=0?pr.S:pr.N:Math.abs(e)*2<=Math.abs(t)?t>0?pr.E:pr.W:e>0?t>0?pr.SE:pr.SW:t>0?pr.NE:pr.NW,matrixAppendRotationInv:(t,e,n=0,i=0,o=0,l=0)=>{const d=Z3[pr.inv(e)],f=d.a,h=d.b,p=d.c,g=d.d,x=n-Math.min(0,f*o,p*l,f*o+p*l),y=i-Math.min(0,h*o,g*l,h*o+g*l),E=t.a,N=t.b,T=t.c,D=t.d;t.a=f*E+h*T,t.b=f*N+h*D,t.c=p*E+g*T,t.d=p*N+g*D,t.tx=x*E+y*T+t.tx,t.ty=x*N+y*D+t.ty},transformRectCoords:(t,e,n,i)=>{const{x:o,y:l,width:d,height:f}=t,{x:h,y:p,width:g,height:x}=e;return n===pr.E?(i.set(o+h,l+p,d,f),i):n===pr.S?i.set(g-l-f+h,o+p,f,d):n===pr.W?i.set(g-o-d+h,x-l-f+p,d,f):n===pr.N?i.set(l+h,x-o-d+p,f,d):i.set(o+h,l+p,d,f)}},VS=[new ao,new ao,new ao,new ao];class _i{constructor(e=0,n=0,i=0,o=0){this.type="rectangle",this.x=Number(e),this.y=Number(n),this.width=Number(i),this.height=Number(o)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new _i(0,0,0,0)}clone(){return new _i(this.x,this.y,this.width,this.height)}copyFromBounds(e){return this.x=e.minX,this.y=e.minY,this.width=e.maxX-e.minX,this.height=e.maxY-e.minY,this}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.copyFrom(this),e}contains(e,n){return this.width<=0||this.height<=0?!1:e>=this.x&&e<this.x+this.width&&n>=this.y&&n<this.y+this.height}strokeContains(e,n,i,o=.5){const{width:l,height:d}=this;if(l<=0||d<=0)return!1;const f=this.x,h=this.y,p=i*(1-o),g=i-p,x=f-p,y=f+l+p,E=h-p,N=h+d+p,T=f+g,D=f+l-g,A=h+g,M=h+d-g;return e>=x&&e<=y&&n>=E&&n<=N&&!(e>T&&e<D&&n>A&&n<M)}intersects(e,n){if(!n){const oe=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=oe)return!1;const I=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>I}const i=this.left,o=this.right,l=this.top,d=this.bottom;if(o<=i||d<=l)return!1;const f=VS[0].set(e.left,e.top),h=VS[1].set(e.left,e.bottom),p=VS[2].set(e.right,e.top),g=VS[3].set(e.right,e.bottom);if(p.x<=f.x||h.y<=f.y)return!1;const x=Math.sign(n.a*n.d-n.b*n.c);if(x===0||(n.apply(f,f),n.apply(h,h),n.apply(p,p),n.apply(g,g),Math.max(f.x,h.x,p.x,g.x)<=i||Math.min(f.x,h.x,p.x,g.x)>=o||Math.max(f.y,h.y,p.y,g.y)<=l||Math.min(f.y,h.y,p.y,g.y)>=d))return!1;const y=x*(h.y-f.y),E=x*(f.x-h.x),N=y*i+E*l,T=y*o+E*l,D=y*i+E*d,A=y*o+E*d;if(Math.max(N,T,D,A)<=y*f.x+E*f.y||Math.min(N,T,D,A)>=y*g.x+E*g.y)return!1;const M=x*(f.y-p.y),j=x*(p.x-f.x),U=M*i+j*l,B=M*o+j*l,P=M*i+j*d,K=M*o+j*d;return!(Math.max(U,B,P,K)<=M*f.x+j*f.y||Math.min(U,B,P,K)>=M*g.x+j*g.y)}pad(e=0,n=e){return this.x-=e,this.y-=n,this.width+=e*2,this.height+=n*2,this}fit(e){const n=Math.max(this.x,e.x),i=Math.min(this.x+this.width,e.x+e.width),o=Math.max(this.y,e.y),l=Math.min(this.y+this.height,e.y+e.height);return this.x=n,this.width=Math.max(i-n,0),this.y=o,this.height=Math.max(l-o,0),this}ceil(e=1,n=.001){const i=Math.ceil((this.x+this.width-n)*e)/e,o=Math.ceil((this.y+this.height-n)*e)/e;return this.x=Math.floor((this.x+n)*e)/e,this.y=Math.floor((this.y+n)*e)/e,this.width=i-this.x,this.height=o-this.y,this}scale(e,n=e){return this.x*=e,this.y*=n,this.width*=e,this.height*=n,this}enlarge(e){const n=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),o=Math.min(this.y,e.y),l=Math.max(this.y+this.height,e.y+e.height);return this.x=n,this.width=i-n,this.y=o,this.height=l-o,this}getBounds(e){return e||(e=new _i),e.copyFrom(this),e}containsRect(e){if(this.width<=0||this.height<=0)return!1;const n=e.x,i=e.y,o=e.x+e.width,l=e.y+e.height;return n>=this.x&&n<this.x+this.width&&i>=this.y&&i<this.y+this.height&&o>=this.x&&o<this.x+this.width&&l>=this.y&&l<this.y+this.height}set(e,n,i,o){return this.x=e,this.y=n,this.width=i,this.height=o,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const cC={default:-1};function gi(t="default"){return cC[t]===void 0&&(cC[t]=-1),++cC[t]}const _V=new Set,pi="8.0.0",A7="8.3.4",Hy={quiet:!1,noColor:!1},Bn=((t,e,n=3)=>{if(Hy.quiet||_V.has(e))return;let i=new Error().stack;const o=`${e}
|
|
302
|
+
<%s key={someKey} {...props} />`,ge,De,Ae,De),q[De+ge]=!0)}if(De=null,Z!==void 0&&(n(Z),De=""+Z),d(ae)&&(n(ae.key),De=""+ae.key),"key"in ae){Z={};for(var xe in ae)xe!=="key"&&(Z[xe]=ae[xe])}else Z=ae;return De&&f(Z,typeof L=="function"?L.displayName||L.name||"Unknown":L),p(L,De,Z,o(),ce,Ce)}function x(L){y(L)?L._store&&(L._store.validated=1):typeof L=="object"&&L!==null&&L.$$typeof===X&&(L._payload.status==="fulfilled"?y(L._payload.value)&&L._payload.value._store&&(L._payload.value._store.validated=1):L._store&&(L._store.validated=1))}function y(L){return typeof L=="object"&&L!==null&&L.$$typeof===N}var E=Vm(),N=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),U=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),G=Symbol.for("react.client.reference"),Y=E.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=Object.prototype.hasOwnProperty,$=Array.isArray,Q=console.createTask?console.createTask:function(){return null};E={react_stack_bottom_frame:function(L){return L()}};var z,ee={},te=E.react_stack_bottom_frame.bind(E,l)(),se=Q(i(l)),q={};ZE.Fragment=D,ZE.jsx=function(L,ae,Z){var ge=1e4>Y.recentlyCreatedOwnerStacks++;return g(L,ae,Z,!1,ge?Error("react-stack-top-frame"):te,ge?Q(i(L)):se)},ZE.jsxs=function(L,ae,Z){var ge=1e4>Y.recentlyCreatedOwnerStacks++;return g(L,ae,Z,!0,ge?Error("react-stack-top-frame"):te,ge?Q(i(L)):se)}})(),ZE}var vV;function d7(){return vV||(vV=1,aC.exports=c7()),aC.exports}var Be=d7();function K3(t,e,n){if(!t)return;if(n(t)===!0)return t;let i=t.child;for(;i;){const o=K3(i,e,n);if(o)return o;i=i.sibling}}function W3(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const $R=W3(O.createContext(null));let Q3=class extends O.Component{render(){return O.createElement($R.Provider,{value:this._reactInternals},this.props.children)}};function f7(){const t=O.useContext($R);if(t===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=O.useId();return O.useMemo(()=>{for(const n of[t,t==null?void 0:t.alternate]){if(!n)continue;const i=K3(n,!1,o=>{let l=o.memoizedState;for(;l;){if(l.memoizedState===e)return!0;l=l.next}});if(i)return i}},[t,e])}const h7=Symbol.for("react.context"),m7=t=>t!==null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===h7;function p7(){const t=f7(),[e]=O.useState(()=>new Map);e.clear();let n=t;for(;n;){const i=n.type;m7(i)&&i!==$R&&!e.has(i)&&e.set(i,O.use(W3(i))),n=n.return}return e}function g7(){const t=p7();return O.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>i=>O.createElement(e,null,O.createElement(n.Provider,{...i,value:t.get(n)})),e=>O.createElement(Q3,{...e})),[t])}var hn=(t=>(t.Application="application",t.WebGLPipes="webgl-pipes",t.WebGLPipesAdaptor="webgl-pipes-adaptor",t.WebGLSystem="webgl-system",t.WebGPUPipes="webgpu-pipes",t.WebGPUPipesAdaptor="webgpu-pipes-adaptor",t.WebGPUSystem="webgpu-system",t.CanvasSystem="canvas-system",t.CanvasPipesAdaptor="canvas-pipes-adaptor",t.CanvasPipes="canvas-pipes",t.Asset="asset",t.LoadParser="load-parser",t.ResolveParser="resolve-parser",t.CacheParser="cache-parser",t.DetectionParser="detection-parser",t.MaskEffect="mask-effect",t.BlendMode="blend-mode",t.TextureSource="texture-source",t.Environment="environment",t.ShapeBuilder="shape-builder",t.Batcher="batcher",t))(hn||{});const LT=t=>{if(typeof t=="function"||typeof t=="object"&&t.extension){if(!t.extension)throw new Error("Extension class must have an extension object");t={...typeof t.extension!="object"?{type:t.extension}:t.extension,ref:t}}if(typeof t=="object")t={...t};else throw new Error("Invalid extension type");return typeof t.type=="string"&&(t.type=[t.type]),t},kS=(t,e)=>LT(t).priority??e,Zr={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...t){return t.map(LT).forEach(e=>{e.type.forEach(n=>{var i,o;return(o=(i=this._removeHandlers)[n])==null?void 0:o.call(i,e)})}),this},add(...t){return t.map(LT).forEach(e=>{e.type.forEach(n=>{var l,d;const i=this._addHandlers,o=this._queue;i[n]?(d=i[n])==null||d.call(i,e):(o[n]=o[n]||[],(l=o[n])==null||l.push(e))})}),this},handle(t,e,n){var d;const i=this._addHandlers,o=this._removeHandlers;if(i[t]||o[t])throw new Error(`Extension type ${t} already has a handler`);i[t]=e,o[t]=n;const l=this._queue;return l[t]&&((d=l[t])==null||d.forEach(f=>e(f)),delete l[t]),this},handleByMap(t,e){return this.handle(t,n=>{n.name&&(e[n.name]=n.ref)},n=>{n.name&&delete e[n.name]})},handleByNamedList(t,e,n=-1){return this.handle(t,i=>{e.findIndex(l=>l.name===i.name)>=0||(e.push({name:i.name,value:i.ref}),e.sort((l,d)=>kS(d.value,n)-kS(l.value,n)))},i=>{const o=e.findIndex(l=>l.name===i.name);o!==-1&&e.splice(o,1)})},handleByList(t,e,n=-1){return this.handle(t,i=>{e.includes(i.ref)||(e.push(i.ref),e.sort((o,l)=>kS(l,n)-kS(o,n)))},i=>{const o=e.indexOf(i.ref);o!==-1&&e.splice(o,1)})},mixin(t,...e){for(const n of e)Object.defineProperties(t.prototype,Object.getOwnPropertyDescriptors(n))}},b7={extension:{type:hn.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await Gf(()=>import("./browserAll-DtIBJ0M2.js"),__vite__mapDeps([2,3]))}},x7={extension:{type:hn.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await Gf(()=>import("./webworkerAll-zhS3J6-M.js"),[])}};class Vs{constructor(e,n,i){this._x=n||0,this._y=i||0,this._observer=e}clone(e){return new Vs(e??this._observer,this._x,this._y)}set(e=0,n=e){return(this._x!==e||this._y!==n)&&(this._x=e,this._y=n,this._observer._onUpdate(this)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this._observer._onUpdate(this)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this._observer._onUpdate(this))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this._observer._onUpdate(this))}}var lC={exports:{}},EV;function y7(){return EV||(EV=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(n=!1));function o(h,p,g){this.fn=h,this.context=p,this.once=g||!1}function l(h,p,g,x,y){if(typeof g!="function")throw new TypeError("The listener must be a function");var E=new o(g,x||h,y),N=n?n+p:p;return h._events[N]?h._events[N].fn?h._events[N]=[h._events[N],E]:h._events[N].push(E):(h._events[N]=E,h._eventsCount++),h}function d(h,p){--h._eventsCount===0?h._events=new i:delete h._events[p]}function f(){this._events=new i,this._eventsCount=0}f.prototype.eventNames=function(){var p=[],g,x;if(this._eventsCount===0)return p;for(x in g=this._events)e.call(g,x)&&p.push(n?x.slice(1):x);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(g)):p},f.prototype.listeners=function(p){var g=n?n+p:p,x=this._events[g];if(!x)return[];if(x.fn)return[x.fn];for(var y=0,E=x.length,N=new Array(E);y<E;y++)N[y]=x[y].fn;return N},f.prototype.listenerCount=function(p){var g=n?n+p:p,x=this._events[g];return x?x.fn?1:x.length:0},f.prototype.emit=function(p,g,x,y,E,N){var T=n?n+p:p;if(!this._events[T])return!1;var D=this._events[T],A=arguments.length,M,j;if(D.fn){switch(D.once&&this.removeListener(p,D.fn,void 0,!0),A){case 1:return D.fn.call(D.context),!0;case 2:return D.fn.call(D.context,g),!0;case 3:return D.fn.call(D.context,g,x),!0;case 4:return D.fn.call(D.context,g,x,y),!0;case 5:return D.fn.call(D.context,g,x,y,E),!0;case 6:return D.fn.call(D.context,g,x,y,E,N),!0}for(j=1,M=new Array(A-1);j<A;j++)M[j-1]=arguments[j];D.fn.apply(D.context,M)}else{var U=D.length,B;for(j=0;j<U;j++)switch(D[j].once&&this.removeListener(p,D[j].fn,void 0,!0),A){case 1:D[j].fn.call(D[j].context);break;case 2:D[j].fn.call(D[j].context,g);break;case 3:D[j].fn.call(D[j].context,g,x);break;case 4:D[j].fn.call(D[j].context,g,x,y);break;default:if(!M)for(B=1,M=new Array(A-1);B<A;B++)M[B-1]=arguments[B];D[j].fn.apply(D[j].context,M)}}return!0},f.prototype.on=function(p,g,x){return l(this,p,g,x,!1)},f.prototype.once=function(p,g,x){return l(this,p,g,x,!0)},f.prototype.removeListener=function(p,g,x,y){var E=n?n+p:p;if(!this._events[E])return this;if(!g)return d(this,E),this;var N=this._events[E];if(N.fn)N.fn===g&&(!y||N.once)&&(!x||N.context===x)&&d(this,E);else{for(var T=0,D=[],A=N.length;T<A;T++)(N[T].fn!==g||y&&!N[T].once||x&&N[T].context!==x)&&D.push(N[T]);D.length?this._events[E]=D.length===1?D[0]:D:d(this,E)}return this},f.prototype.removeAllListeners=function(p){var g;return p?(g=n?n+p:p,this._events[g]&&d(this,g)):(this._events=new i,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prefixed=n,f.EventEmitter=f,t.exports=f})(lC)),lC.exports}var v7=y7();const pd=Qf(v7),E7=Math.PI*2,_7=180/Math.PI,w7=Math.PI/180;class ao{constructor(e=0,n=0){this.x=0,this.y=0,this.x=e,this.y=n}clone(){return new ao(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,n=e){return this.x=e,this.y=n,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return uC.x=0,uC.y=0,uC}}const uC=new ao;class Sn{constructor(e=1,n=0,i=0,o=1,l=0,d=0){this.array=null,this.a=e,this.b=n,this.c=i,this.d=o,this.tx=l,this.ty=d}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,n,i,o,l,d){return this.a=e,this.b=n,this.c=i,this.d=o,this.tx=l,this.ty=d,this}toArray(e,n){this.array||(this.array=new Float32Array(9));const i=n||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(e,n){n=n||new ao;const i=e.x,o=e.y;return n.x=this.a*i+this.c*o+this.tx,n.y=this.b*i+this.d*o+this.ty,n}applyInverse(e,n){n=n||new ao;const i=this.a,o=this.b,l=this.c,d=this.d,f=this.tx,h=this.ty,p=1/(i*d+l*-o),g=e.x,x=e.y;return n.x=d*p*g+-l*p*x+(h*l-f*d)*p,n.y=i*p*x+-o*p*g+(-h*i+f*o)*p,n}translate(e,n){return this.tx+=e,this.ty+=n,this}scale(e,n){return this.a*=e,this.d*=n,this.c*=e,this.b*=n,this.tx*=e,this.ty*=n,this}rotate(e){const n=Math.cos(e),i=Math.sin(e),o=this.a,l=this.c,d=this.tx;return this.a=o*n-this.b*i,this.b=o*i+this.b*n,this.c=l*n-this.d*i,this.d=l*i+this.d*n,this.tx=d*n-this.ty*i,this.ty=d*i+this.ty*n,this}append(e){const n=this.a,i=this.b,o=this.c,l=this.d;return this.a=e.a*n+e.b*o,this.b=e.a*i+e.b*l,this.c=e.c*n+e.d*o,this.d=e.c*i+e.d*l,this.tx=e.tx*n+e.ty*o+this.tx,this.ty=e.tx*i+e.ty*l+this.ty,this}appendFrom(e,n){const i=e.a,o=e.b,l=e.c,d=e.d,f=e.tx,h=e.ty,p=n.a,g=n.b,x=n.c,y=n.d;return this.a=i*p+o*x,this.b=i*g+o*y,this.c=l*p+d*x,this.d=l*g+d*y,this.tx=f*p+h*x+n.tx,this.ty=f*g+h*y+n.ty,this}setTransform(e,n,i,o,l,d,f,h,p){return this.a=Math.cos(f+p)*l,this.b=Math.sin(f+p)*l,this.c=-Math.sin(f-h)*d,this.d=Math.cos(f-h)*d,this.tx=e-(i*this.a+o*this.c),this.ty=n-(i*this.b+o*this.d),this}prepend(e){const n=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){const i=this.a,o=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=o*e.a+this.d*e.c,this.d=o*e.b+this.d*e.d}return this.tx=n*e.a+this.ty*e.c+e.tx,this.ty=n*e.b+this.ty*e.d+e.ty,this}decompose(e){const n=this.a,i=this.b,o=this.c,l=this.d,d=e.pivot,f=-Math.atan2(-o,l),h=Math.atan2(i,n),p=Math.abs(f+h);return p<1e-5||Math.abs(E7-p)<1e-5?(e.rotation=h,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=f,e.skew.y=h),e.scale.x=Math.sqrt(n*n+i*i),e.scale.y=Math.sqrt(o*o+l*l),e.position.x=this.tx+(d.x*n+d.y*o),e.position.y=this.ty+(d.x*i+d.y*l),e}invert(){const e=this.a,n=this.b,i=this.c,o=this.d,l=this.tx,d=e*o-n*i;return this.a=o/d,this.b=-n/d,this.c=-i/d,this.d=e/d,this.tx=(i*this.ty-o*l)/d,this.ty=-(e*this.ty-n*l)/d,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const e=new Sn;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}equals(e){return e.a===this.a&&e.b===this.b&&e.c===this.c&&e.d===this.d&&e.tx===this.tx&&e.ty===this.ty}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return N7.identity()}static get shared(){return S7.identity()}}const S7=new Sn,N7=new Sn,Bg=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Lg=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Ig=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Hg=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],IT=[],Z3=[],MS=Math.sign;function D7(){for(let t=0;t<16;t++){const e=[];IT.push(e);for(let n=0;n<16;n++){const i=MS(Bg[t]*Bg[n]+Ig[t]*Lg[n]),o=MS(Lg[t]*Bg[n]+Hg[t]*Lg[n]),l=MS(Bg[t]*Ig[n]+Ig[t]*Hg[n]),d=MS(Lg[t]*Ig[n]+Hg[t]*Hg[n]);for(let f=0;f<16;f++)if(Bg[f]===i&&Lg[f]===o&&Ig[f]===l&&Hg[f]===d){e.push(f);break}}}for(let t=0;t<16;t++){const e=new Sn;e.set(Bg[t],Lg[t],Ig[t],Hg[t],0,0),Z3.push(e)}}D7();const pr={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:t=>Bg[t],uY:t=>Lg[t],vX:t=>Ig[t],vY:t=>Hg[t],inv:t=>t&8?t&15:-t&7,add:(t,e)=>IT[t][e],sub:(t,e)=>IT[t][pr.inv(e)],rotate180:t=>t^4,isVertical:t=>(t&3)===2,byDirection:(t,e)=>Math.abs(t)*2<=Math.abs(e)?e>=0?pr.S:pr.N:Math.abs(e)*2<=Math.abs(t)?t>0?pr.E:pr.W:e>0?t>0?pr.SE:pr.SW:t>0?pr.NE:pr.NW,matrixAppendRotationInv:(t,e,n=0,i=0,o=0,l=0)=>{const d=Z3[pr.inv(e)],f=d.a,h=d.b,p=d.c,g=d.d,x=n-Math.min(0,f*o,p*l,f*o+p*l),y=i-Math.min(0,h*o,g*l,h*o+g*l),E=t.a,N=t.b,T=t.c,D=t.d;t.a=f*E+h*T,t.b=f*N+h*D,t.c=p*E+g*T,t.d=p*N+g*D,t.tx=x*E+y*T+t.tx,t.ty=x*N+y*D+t.ty},transformRectCoords:(t,e,n,i)=>{const{x:o,y:l,width:d,height:f}=t,{x:h,y:p,width:g,height:x}=e;return n===pr.E?(i.set(o+h,l+p,d,f),i):n===pr.S?i.set(g-l-f+h,o+p,f,d):n===pr.W?i.set(g-o-d+h,x-l-f+p,d,f):n===pr.N?i.set(l+h,x-o-d+p,f,d):i.set(o+h,l+p,d,f)}},VS=[new ao,new ao,new ao,new ao];class _i{constructor(e=0,n=0,i=0,o=0){this.type="rectangle",this.x=Number(e),this.y=Number(n),this.width=Number(i),this.height=Number(o)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new _i(0,0,0,0)}clone(){return new _i(this.x,this.y,this.width,this.height)}copyFromBounds(e){return this.x=e.minX,this.y=e.minY,this.width=e.maxX-e.minX,this.height=e.maxY-e.minY,this}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.copyFrom(this),e}contains(e,n){return this.width<=0||this.height<=0?!1:e>=this.x&&e<this.x+this.width&&n>=this.y&&n<this.y+this.height}strokeContains(e,n,i,o=.5){const{width:l,height:d}=this;if(l<=0||d<=0)return!1;const f=this.x,h=this.y,p=i*(1-o),g=i-p,x=f-p,y=f+l+p,E=h-p,N=h+d+p,T=f+g,D=f+l-g,A=h+g,M=h+d-g;return e>=x&&e<=y&&n>=E&&n<=N&&!(e>T&&e<D&&n>A&&n<M)}intersects(e,n){if(!n){const oe=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=oe)return!1;const I=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>I}const i=this.left,o=this.right,l=this.top,d=this.bottom;if(o<=i||d<=l)return!1;const f=VS[0].set(e.left,e.top),h=VS[1].set(e.left,e.bottom),p=VS[2].set(e.right,e.top),g=VS[3].set(e.right,e.bottom);if(p.x<=f.x||h.y<=f.y)return!1;const x=Math.sign(n.a*n.d-n.b*n.c);if(x===0||(n.apply(f,f),n.apply(h,h),n.apply(p,p),n.apply(g,g),Math.max(f.x,h.x,p.x,g.x)<=i||Math.min(f.x,h.x,p.x,g.x)>=o||Math.max(f.y,h.y,p.y,g.y)<=l||Math.min(f.y,h.y,p.y,g.y)>=d))return!1;const y=x*(h.y-f.y),E=x*(f.x-h.x),N=y*i+E*l,T=y*o+E*l,D=y*i+E*d,A=y*o+E*d;if(Math.max(N,T,D,A)<=y*f.x+E*f.y||Math.min(N,T,D,A)>=y*g.x+E*g.y)return!1;const M=x*(f.y-p.y),j=x*(p.x-f.x),U=M*i+j*l,B=M*o+j*l,P=M*i+j*d,K=M*o+j*d;return!(Math.max(U,B,P,K)<=M*f.x+j*f.y||Math.min(U,B,P,K)>=M*g.x+j*g.y)}pad(e=0,n=e){return this.x-=e,this.y-=n,this.width+=e*2,this.height+=n*2,this}fit(e){const n=Math.max(this.x,e.x),i=Math.min(this.x+this.width,e.x+e.width),o=Math.max(this.y,e.y),l=Math.min(this.y+this.height,e.y+e.height);return this.x=n,this.width=Math.max(i-n,0),this.y=o,this.height=Math.max(l-o,0),this}ceil(e=1,n=.001){const i=Math.ceil((this.x+this.width-n)*e)/e,o=Math.ceil((this.y+this.height-n)*e)/e;return this.x=Math.floor((this.x+n)*e)/e,this.y=Math.floor((this.y+n)*e)/e,this.width=i-this.x,this.height=o-this.y,this}scale(e,n=e){return this.x*=e,this.y*=n,this.width*=e,this.height*=n,this}enlarge(e){const n=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),o=Math.min(this.y,e.y),l=Math.max(this.y+this.height,e.y+e.height);return this.x=n,this.width=i-n,this.y=o,this.height=l-o,this}getBounds(e){return e||(e=new _i),e.copyFrom(this),e}containsRect(e){if(this.width<=0||this.height<=0)return!1;const n=e.x,i=e.y,o=e.x+e.width,l=e.y+e.height;return n>=this.x&&n<this.x+this.width&&i>=this.y&&i<this.y+this.height&&o>=this.x&&o<this.x+this.width&&l>=this.y&&l<this.y+this.height}set(e,n,i,o){return this.x=e,this.y=n,this.width=i,this.height=o,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const cC={default:-1};function gi(t="default"){return cC[t]===void 0&&(cC[t]=-1),++cC[t]}const _V=new Set,pi="8.0.0",A7="8.3.4",Hy={quiet:!1,noColor:!1},Bn=((t,e,n=3)=>{if(Hy.quiet||_V.has(e))return;let i=new Error().stack;const o=`${e}
|
|
303
303
|
Deprecated since v${t}`,l=typeof console.groupCollapsed=="function"&&!Hy.noColor;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",o):(i=i.split(`
|
|
304
304
|
`).splice(n).join(`
|
|
305
305
|
`),l?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",o),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",o),console.warn(i))),_V.add(e)});Object.defineProperties(Bn,{quiet:{get:()=>Hy.quiet,set:t=>{Hy.quiet=t},enumerable:!0,configurable:!1},noColor:{get:()=>Hy.noColor,set:t=>{Hy.noColor=t},enumerable:!0,configurable:!1}});const J3=()=>{};function Jy(t){return t+=t===0?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t+1}function wV(t){return!(t&t-1)&&!!t}function e5(t){const e={};for(const n in t)t[n]!==void 0&&(e[n]=t[n]);return e}const SV=Object.create(null);function C7(t){const e=SV[t];return e===void 0&&(SV[t]=gi("resource")),e}const t5=class n5 extends pd{constructor(e={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,e={...n5.defaultOptions,...e},this.addressMode=e.addressMode,this.addressModeU=e.addressModeU??this.addressModeU,this.addressModeV=e.addressModeV??this.addressModeV,this.addressModeW=e.addressModeW??this.addressModeW,this.scaleMode=e.scaleMode,this.magFilter=e.magFilter??this.magFilter,this.minFilter=e.minFilter??this.minFilter,this.mipmapFilter=e.mipmapFilter??this.mipmapFilter,this.lodMinClamp=e.lodMinClamp,this.lodMaxClamp=e.lodMaxClamp,this.compare=e.compare,this.maxAnisotropy=e.maxAnisotropy??1}set addressMode(e){this.addressModeU=e,this.addressModeV=e,this.addressModeW=e}get addressMode(){return this.addressModeU}set wrapMode(e){Bn(pi,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=e}get wrapMode(){return this.addressMode}set scaleMode(e){this.magFilter=e,this.minFilter=e,this.mipmapFilter=e}get scaleMode(){return this.magFilter}set maxAnisotropy(e){this._maxAnisotropy=Math.min(e,16),this._maxAnisotropy>1&&(this.scaleMode="linear")}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this._sharedResourceId=null,this.emit("change",this)}_generateResourceId(){const e=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=C7(e),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};t5.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let ev=t5;const r5=class i5 extends pd{constructor(e={}){super(),this.options=e,this._gpuData=Object.create(null),this._gcLastUsed=-1,this.uid=gi("textureSource"),this._resourceType="textureSource",this._resourceId=gi("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=!1,this.format="rgba8unorm",this.dimension="2d",this.viewDimension="2d",this.arrayLayerCount=1,this.antialias=!1,this._touched=0,this._batchTick=-1,this._textureBindLocation=-1,e={...i5.defaultOptions,...e},this.label=e.label??"",this.resource=e.resource,this.autoGarbageCollect=e.autoGarbageCollect,this._resolution=e.resolution,e.width?this.pixelWidth=e.width*this._resolution:this.pixelWidth=this.resource?this.resourceWidth??1:1,e.height?this.pixelHeight=e.height*this._resolution:this.pixelHeight=this.resource?this.resourceHeight??1:1,this.width=this.pixelWidth/this._resolution,this.height=this.pixelHeight/this._resolution,this.format=e.format,this.dimension=e.dimensions,this.viewDimension=e.viewDimension??e.dimensions,this.arrayLayerCount=e.arrayLayerCount,this.mipLevelCount=e.mipLevelCount,this.autoGenerateMipmaps=e.autoGenerateMipmaps,this.sampleCount=e.sampleCount,this.antialias=e.antialias,this.alphaMode=e.alphaMode,this.style=new ev(e5(e)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(e){var n,i;this.style!==e&&((n=this._style)==null||n.off("change",this._onStyleChange,this),this._style=e,(i=this._style)==null||i.on("change",this._onStyleChange,this),this._onStyleChange())}set maxAnisotropy(e){this._style.maxAnisotropy=e}get maxAnisotropy(){return this._style.maxAnisotropy}get addressMode(){return this._style.addressMode}set addressMode(e){this._style.addressMode=e}get repeatMode(){return this._style.addressMode}set repeatMode(e){this._style.addressMode=e}get magFilter(){return this._style.magFilter}set magFilter(e){this._style.magFilter=e}get minFilter(){return this._style.minFilter}set minFilter(e){this._style.minFilter=e}get mipmapFilter(){return this._style.mipmapFilter}set mipmapFilter(e){this._style.mipmapFilter=e}get lodMinClamp(){return this._style.lodMinClamp}set lodMinClamp(e){this._style.lodMinClamp=e}get lodMaxClamp(){return this._style.lodMaxClamp}set lodMaxClamp(e){this._style.lodMaxClamp=e}_onStyleChange(){this.emit("styleChange",this)}update(){if(this.resource){const e=this._resolution;if(this.resize(this.resourceWidth/e,this.resourceHeight/e))return}this.emit("update",this)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this._style&&(this._style.destroy(),this._style=null),this.uploadMethodId=null,this.resource=null,this.removeAllListeners()}unload(){var e,n;this._resourceId=gi("resource"),this.emit("change",this),this.emit("unload",this);for(const i in this._gpuData)(n=(e=this._gpuData[i])==null?void 0:e.destroy)==null||n.call(e);this._gpuData=Object.create(null)}get resourceWidth(){const{resource:e}=this;return e.naturalWidth||e.videoWidth||e.displayWidth||e.width}get resourceHeight(){const{resource:e}=this;return e.naturalHeight||e.videoHeight||e.displayHeight||e.height}get resolution(){return this._resolution}set resolution(e){this._resolution!==e&&(this._resolution=e,this.width=this.pixelWidth/e,this.height=this.pixelHeight/e)}resize(e,n,i){i||(i=this._resolution),e||(e=this.width),n||(n=this.height);const o=Math.round(e*i),l=Math.round(n*i);return this.width=o/i,this.height=l/i,this._resolution=i,this.pixelWidth===o&&this.pixelHeight===l?!1:(this._refreshPOT(),this.pixelWidth=o,this.pixelHeight=l,this.emit("resize",this),this._resourceId=gi("resource"),this.emit("change",this),!0)}updateMipmaps(){this.autoGenerateMipmaps&&this.mipLevelCount>1&&this.emit("updateMipmaps",this)}set wrapMode(e){this._style.wrapMode=e}get wrapMode(){return this._style.wrapMode}set scaleMode(e){this._style.scaleMode=e}get scaleMode(){return this._style.scaleMode}_refreshPOT(){this.isPowerOfTwo=wV(this.pixelWidth)&&wV(this.pixelHeight)}static test(e){throw new Error("Unimplemented")}};r5.defaultOptions={resolution:1,format:"bgra8unorm",alphaMode:"premultiply-alpha-on-upload",dimensions:"2d",viewDimension:"2d",arrayLayerCount:1,mipLevelCount:1,autoGenerateMipmaps:!1,sampleCount:1,antialias:!1,autoGarbageCollect:!1};let cu=r5;class XR extends cu{constructor(e){const n=e.resource||new Float32Array(e.width*e.height*4);let i=e.format;i||(n instanceof Float32Array?i="rgba32float":n instanceof Int32Array||n instanceof Uint32Array?i="rgba32uint":n instanceof Int16Array||n instanceof Uint16Array?i="rgba16uint":(n instanceof Int8Array,i="bgra8unorm")),super({...e,resource:n,format:i}),this.uploadMethodId="buffer"}static test(e){return e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array}}XR.extension=hn.TextureSource;const NV=new Sn;class T7{constructor(e,n){this.mapCoord=new Sn,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,typeof n>"u"?this.clampMargin=e.width<10?0:.5:this.clampMargin=n,this.isSimple=!1,this.texture=e}get texture(){return this._texture}set texture(e){var n;this.texture!==e&&((n=this._texture)==null||n.removeListener("update",this.update,this),this._texture=e,this._texture.addListener("update",this.update,this),this.update())}multiplyUvs(e,n){n===void 0&&(n=e);const i=this.mapCoord;for(let o=0;o<e.length;o+=2){const l=e[o],d=e[o+1];n[o]=l*i.a+d*i.c+i.tx,n[o+1]=l*i.b+d*i.d+i.ty}return n}update(){const e=this._texture;this._updateID++;const n=e.uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const i=e.orig,o=e.trim;o&&(NV.set(i.width/o.width,0,0,i.height/o.height,-o.x/o.width,-o.y/o.height),this.mapCoord.append(NV));const l=e.source,d=this.uClampFrame,f=this.clampMargin/l._resolution,h=this.clampOffset/l._resolution;return d[0]=(e.frame.x+f+h)/l.width,d[1]=(e.frame.y+f+h)/l.height,d[2]=(e.frame.x+e.frame.width-f+h)/l.width,d[3]=(e.frame.y+e.frame.height-f+h)/l.height,this.uClampOffset[0]=this.clampOffset/l.pixelWidth,this.uClampOffset[1]=this.clampOffset/l.pixelHeight,this.isSimple=e.frame.width===l.width&&e.frame.height===l.height&&e.rotate===0,!0}}class ur extends pd{constructor({source:e,label:n,frame:i,orig:o,trim:l,defaultAnchor:d,defaultBorders:f,rotate:h,dynamic:p}={}){if(super(),this.uid=gi("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new _i,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=n,this.source=(e==null?void 0:e.source)??new cu,this.noFrame=!i,i)this.frame.copyFrom(i);else{const{width:g,height:x}=this._source;this.frame.width=g,this.frame.height=x}this.orig=o||this.frame,this.trim=l,this.rotate=h??0,this.defaultAnchor=d,this.defaultBorders=f,this.destroyed=!1,this.dynamic=p||!1,this.updateUvs()}set source(e){this._source&&this._source.off("resize",this.update,this),this._source=e,e.on("resize",this.update,this),this.emit("update",this)}get source(){return this._source}get textureMatrix(){return this._textureMatrix||(this._textureMatrix=new T7(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){const{uvs:e,frame:n}=this,{width:i,height:o}=this._source,l=n.x/i,d=n.y/o,f=n.width/i,h=n.height/o;let p=this.rotate;if(p){const g=f/2,x=h/2,y=l+g,E=d+x;p=pr.add(p,pr.NW),e.x0=y+g*pr.uX(p),e.y0=E+x*pr.uY(p),p=pr.add(p,2),e.x1=y+g*pr.uX(p),e.y1=E+x*pr.uY(p),p=pr.add(p,2),e.x2=y+g*pr.uX(p),e.y2=E+x*pr.uY(p),p=pr.add(p,2),e.x3=y+g*pr.uX(p),e.y3=E+x*pr.uY(p)}else e.x0=l,e.y0=d,e.x1=l+f,e.y1=d,e.x2=l+f,e.y2=d+h,e.x3=l,e.y3=d+h}destroy(e=!1){this._source&&(this._source.off("resize",this.update,this),e&&(this._source.destroy(),this._source=null)),this._textureMatrix=null,this.destroyed=!0,this.emit("destroy",this),this.removeAllListeners()}update(){this.noFrame&&(this.frame.width=this._source.width,this.frame.height=this._source.height),this.updateUvs(),this.emit("update",this)}get baseTexture(){return Bn(pi,"Texture.baseTexture is now Texture.source"),this._source}}ur.EMPTY=new ur({label:"EMPTY",source:new cu({label:"EMPTY"})});ur.EMPTY.destroy=J3;ur.WHITE=new ur({source:new XR({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"});ur.WHITE.destroy=J3;function s5(t,e,n){const{width:i,height:o}=n.orig,l=n.trim;if(l){const d=l.width,f=l.height;t.minX=l.x-e._x*i,t.maxX=t.minX+d,t.minY=l.y-e._y*o,t.maxY=t.minY+f}else t.minX=-e._x*i,t.maxX=t.minX+i,t.minY=-e._y*o,t.maxY=t.minY+o}const DV=new Sn;class uu{constructor(e=1/0,n=1/0,i=-1/0,o=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=DV,this.minX=e,this.minY=n,this.maxX=i,this.maxY=o}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new _i);const e=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(e.x=0,e.y=0,e.width=0,e.height=0):e.copyFromBounds(this),e}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=DV,this}set(e,n,i,o){this.minX=e,this.minY=n,this.maxX=i,this.maxY=o}addFrame(e,n,i,o,l){l||(l=this.matrix);const d=l.a,f=l.b,h=l.c,p=l.d,g=l.tx,x=l.ty;let y=this.minX,E=this.minY,N=this.maxX,T=this.maxY,D=d*e+h*n+g,A=f*e+p*n+x;D<y&&(y=D),A<E&&(E=A),D>N&&(N=D),A>T&&(T=A),D=d*i+h*n+g,A=f*i+p*n+x,D<y&&(y=D),A<E&&(E=A),D>N&&(N=D),A>T&&(T=A),D=d*e+h*o+g,A=f*e+p*o+x,D<y&&(y=D),A<E&&(E=A),D>N&&(N=D),A>T&&(T=A),D=d*i+h*o+g,A=f*i+p*o+x,D<y&&(y=D),A<E&&(E=A),D>N&&(N=D),A>T&&(T=A),this.minX=y,this.minY=E,this.maxX=N,this.maxY=T}addRect(e,n){this.addFrame(e.x,e.y,e.x+e.width,e.y+e.height,n)}addBounds(e,n){this.addFrame(e.minX,e.minY,e.maxX,e.maxY,n)}addBoundsMask(e){this.minX=this.minX>e.minX?this.minX:e.minX,this.minY=this.minY>e.minY?this.minY:e.minY,this.maxX=this.maxX<e.maxX?this.maxX:e.maxX,this.maxY=this.maxY<e.maxY?this.maxY:e.maxY}applyMatrix(e){const n=this.minX,i=this.minY,o=this.maxX,l=this.maxY,{a:d,b:f,c:h,d:p,tx:g,ty:x}=e;let y=d*n+h*i+g,E=f*n+p*i+x;this.minX=y,this.minY=E,this.maxX=y,this.maxY=E,y=d*o+h*i+g,E=f*o+p*i+x,this.minX=y<this.minX?y:this.minX,this.minY=E<this.minY?E:this.minY,this.maxX=y>this.maxX?y:this.maxX,this.maxY=E>this.maxY?E:this.maxY,y=d*n+h*l+g,E=f*n+p*l+x,this.minX=y<this.minX?y:this.minX,this.minY=E<this.minY?E:this.minY,this.maxX=y>this.maxX?y:this.maxX,this.maxY=E>this.maxY?E:this.maxY,y=d*o+h*l+g,E=f*o+p*l+x,this.minX=y<this.minX?y:this.minX,this.minY=E<this.minY?E:this.minY,this.maxX=y>this.maxX?y:this.maxX,this.maxY=E>this.maxY?E:this.maxY}fit(e){return this.minX<e.left&&(this.minX=e.left),this.maxX>e.right&&(this.maxX=e.right),this.minY<e.top&&(this.minY=e.top),this.maxY>e.bottom&&(this.maxY=e.bottom),this}fitBounds(e,n,i,o){return this.minX<e&&(this.minX=e),this.maxX>n&&(this.maxX=n),this.minY<i&&(this.minY=i),this.maxY>o&&(this.maxY=o),this}pad(e,n=e){return this.minX-=e,this.maxX+=e,this.minY-=n,this.maxY+=n,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new uu(this.minX,this.minY,this.maxX,this.maxY)}scale(e,n=e){return this.minX*=e,this.minY*=n,this.maxX*=e,this.maxY*=n,this}get x(){return this.minX}set x(e){const n=this.maxX-this.minX;this.minX=e,this.maxX=e+n}get y(){return this.minY}set y(e){const n=this.maxY-this.minY;this.minY=e,this.maxY=e+n}get width(){return this.maxX-this.minX}set width(e){this.maxX=this.minX+e}get height(){return this.maxY-this.minY}set height(e){this.maxY=this.minY+e}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}addVertexData(e,n,i,o){let l=this.minX,d=this.minY,f=this.maxX,h=this.maxY;o||(o=this.matrix);const p=o.a,g=o.b,x=o.c,y=o.d,E=o.tx,N=o.ty;for(let T=n;T<i;T+=2){const D=e[T],A=e[T+1],M=p*D+x*A+E,j=g*D+y*A+N;l=M<l?M:l,d=j<d?j:d,f=M>f?M:f,h=j>h?j:h}this.minX=l,this.minY=d,this.maxX=f,this.maxY=h}containsPoint(e,n){return this.minX<=e&&this.minY<=n&&this.maxX>=e&&this.maxY>=n}toString(){return`[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(e){return this.minX=e.minX,this.minY=e.minY,this.maxX=e.maxX,this.maxY=e.maxY,this}}var R7={grad:.9,turn:360,rad:360/(2*Math.PI)},zf=function(t){return typeof t=="string"?t.length>0:typeof t=="number"},Es=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=Math.pow(10,e)),Math.round(n*t)/n+0},au=function(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=1),t>n?n:t>e?t:e},o5=function(t){return(t=isFinite(t)?t%360:0)>0?t:t+360},AV=function(t){return{r:au(t.r,0,255),g:au(t.g,0,255),b:au(t.b,0,255),a:au(t.a)}},dC=function(t){return{r:Es(t.r),g:Es(t.g),b:Es(t.b),a:Es(t.a,3)}},j7=/^#([0-9a-f]{3,8})$/i,US=function(t){var e=t.toString(16);return e.length<2?"0"+e:e},a5=function(t){var e=t.r,n=t.g,i=t.b,o=t.a,l=Math.max(e,n,i),d=l-Math.min(e,n,i),f=d?l===e?(n-i)/d:l===n?2+(i-e)/d:4+(e-n)/d:0;return{h:60*(f<0?f+6:f),s:l?d/l*100:0,v:l/255*100,a:o}},l5=function(t){var e=t.h,n=t.s,i=t.v,o=t.a;e=e/360*6,n/=100,i/=100;var l=Math.floor(e),d=i*(1-n),f=i*(1-(e-l)*n),h=i*(1-(1-e+l)*n),p=l%6;return{r:255*[i,f,d,d,h,i][p],g:255*[h,i,i,f,d,d][p],b:255*[d,d,h,i,i,f][p],a:o}},CV=function(t){return{h:o5(t.h),s:au(t.s,0,100),l:au(t.l,0,100),a:au(t.a)}},TV=function(t){return{h:Es(t.h),s:Es(t.s),l:Es(t.l),a:Es(t.a,3)}},RV=function(t){return l5((n=(e=t).s,{h:e.h,s:(n*=((i=e.l)<50?i:100-i)/100)>0?2*n/(i+n)*100:0,v:i+n,a:e.a}));var e,n,i},N1=function(t){return{h:(e=a5(t)).h,s:(o=(200-(n=e.s))*(i=e.v)/100)>0&&o<200?n*i/100/(o<=100?o:200-o)*100:0,l:o/2,a:e.a};var e,n,i,o},k7=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,M7=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,V7=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,U7=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,HT={string:[[function(t){var e=j7.exec(t);return e?(t=e[1]).length<=4?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?Es(parseInt(t[3]+t[3],16)/255,2):1}:t.length===6||t.length===8?{r:parseInt(t.substr(0,2),16),g:parseInt(t.substr(2,2),16),b:parseInt(t.substr(4,2),16),a:t.length===8?Es(parseInt(t.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(t){var e=V7.exec(t)||U7.exec(t);return e?e[2]!==e[4]||e[4]!==e[6]?null:AV({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(t){var e=k7.exec(t)||M7.exec(t);if(!e)return null;var n,i,o=CV({h:(n=e[1],i=e[2],i===void 0&&(i="deg"),Number(n)*(R7[i]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return RV(o)},"hsl"]],object:[[function(t){var e=t.r,n=t.g,i=t.b,o=t.a,l=o===void 0?1:o;return zf(e)&&zf(n)&&zf(i)?AV({r:Number(e),g:Number(n),b:Number(i),a:Number(l)}):null},"rgb"],[function(t){var e=t.h,n=t.s,i=t.l,o=t.a,l=o===void 0?1:o;if(!zf(e)||!zf(n)||!zf(i))return null;var d=CV({h:Number(e),s:Number(n),l:Number(i),a:Number(l)});return RV(d)},"hsl"],[function(t){var e=t.h,n=t.s,i=t.v,o=t.a,l=o===void 0?1:o;if(!zf(e)||!zf(n)||!zf(i))return null;var d=(function(f){return{h:o5(f.h),s:au(f.s,0,100),v:au(f.v,0,100),a:au(f.a)}})({h:Number(e),s:Number(n),v:Number(i),a:Number(l)});return l5(d)},"hsv"]]},jV=function(t,e){for(var n=0;n<e.length;n++){var i=e[n][0](t);if(i)return[i,e[n][1]]}return[null,void 0]},P7=function(t){return typeof t=="string"?jV(t.trim(),HT.string):typeof t=="object"&&t!==null?jV(t,HT.object):[null,void 0]},fC=function(t,e){var n=N1(t);return{h:n.h,s:au(n.s+100*e,0,100),l:n.l,a:n.a}},hC=function(t){return(299*t.r+587*t.g+114*t.b)/1e3/255},kV=function(t,e){var n=N1(t);return{h:n.h,s:n.s,l:au(n.l+100*e,0,100),a:n.a}},qT=(function(){function t(e){this.parsed=P7(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return t.prototype.isValid=function(){return this.parsed!==null},t.prototype.brightness=function(){return Es(hC(this.rgba),2)},t.prototype.isDark=function(){return hC(this.rgba)<.5},t.prototype.isLight=function(){return hC(this.rgba)>=.5},t.prototype.toHex=function(){return e=dC(this.rgba),n=e.r,i=e.g,o=e.b,d=(l=e.a)<1?US(Es(255*l)):"","#"+US(n)+US(i)+US(o)+d;var e,n,i,o,l,d},t.prototype.toRgb=function(){return dC(this.rgba)},t.prototype.toRgbString=function(){return e=dC(this.rgba),n=e.r,i=e.g,o=e.b,(l=e.a)<1?"rgba("+n+", "+i+", "+o+", "+l+")":"rgb("+n+", "+i+", "+o+")";var e,n,i,o,l},t.prototype.toHsl=function(){return TV(N1(this.rgba))},t.prototype.toHslString=function(){return e=TV(N1(this.rgba)),n=e.h,i=e.s,o=e.l,(l=e.a)<1?"hsla("+n+", "+i+"%, "+o+"%, "+l+")":"hsl("+n+", "+i+"%, "+o+"%)";var e,n,i,o,l},t.prototype.toHsv=function(){return e=a5(this.rgba),{h:Es(e.h),s:Es(e.s),v:Es(e.v),a:Es(e.a,3)};var e},t.prototype.invert=function(){return od({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},t.prototype.saturate=function(e){return e===void 0&&(e=.1),od(fC(this.rgba,e))},t.prototype.desaturate=function(e){return e===void 0&&(e=.1),od(fC(this.rgba,-e))},t.prototype.grayscale=function(){return od(fC(this.rgba,-1))},t.prototype.lighten=function(e){return e===void 0&&(e=.1),od(kV(this.rgba,e))},t.prototype.darken=function(e){return e===void 0&&(e=.1),od(kV(this.rgba,-e))},t.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},t.prototype.alpha=function(e){return typeof e=="number"?od({r:(n=this.rgba).r,g:n.g,b:n.b,a:e}):Es(this.rgba.a,3);var n},t.prototype.hue=function(e){var n=N1(this.rgba);return typeof e=="number"?od({h:e,s:n.s,l:n.l,a:n.a}):Es(n.h)},t.prototype.isEqual=function(e){return this.toHex()===od(e).toHex()},t})(),od=function(t){return t instanceof qT?t:new qT(t)},MV=[],O7=function(t){t.forEach(function(e){MV.indexOf(e)<0&&(e(qT,HT),MV.push(e))})};function z7(t,e){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var o in n)i[n[o]]=o;var l={};t.prototype.toName=function(d){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var f,h,p=i[this.toHex()];if(p)return p;if(d!=null&&d.closest){var g=this.toRgb(),x=1/0,y="black";if(!l.length)for(var E in n)l[E]=new t(n[E]).toRgb();for(var N in n){var T=(f=g,h=l[N],Math.pow(f.r-h.r,2)+Math.pow(f.g-h.g,2)+Math.pow(f.b-h.b,2));T<x&&(x=T,y=N)}return y}},e.string.push([function(d){var f=d.toLowerCase(),h=f==="transparent"?"#0000":n[f];return h?new t(h).toRgb():null},"name"])}O7([z7]);const tv=class b1{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(e){return this.value=e,this}set value(e){if(e instanceof b1)this._value=this._cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,e))&&(this._value=this._cloneSource(e),this._normalize(this._value))}}get value(){return this._value}_cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}_isSourceEqual(e,n){const i=typeof e;if(i!==typeof n)return!1;if(i==="number"||i==="string"||e instanceof Number)return e===n;if(Array.isArray(e)&&Array.isArray(n)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(n))return e.length!==n.length?!1:e.every((l,d)=>l===n[d]);if(e!==null&&n!==null){const l=Object.keys(e),d=Object.keys(n);return l.length!==d.length?!1:l.every(f=>e[f]===n[f])}return e===n}toRgba(){const[e,n,i,o]=this._components;return{r:e,g:n,b:i,a:o}}toRgb(){const[e,n,i]=this._components;return{r:e,g:n,b:i}}toRgbaString(){const[e,n,i]=this.toUint8RgbArray();return`rgba(${e},${n},${i},${this.alpha})`}toUint8RgbArray(e){const[n,i,o]=this._components;return this._arrayRgb||(this._arrayRgb=[]),e||(e=this._arrayRgb),e[0]=Math.round(n*255),e[1]=Math.round(i*255),e[2]=Math.round(o*255),e}toArray(e){this._arrayRgba||(this._arrayRgba=[]),e||(e=this._arrayRgba);const[n,i,o,l]=this._components;return e[0]=n,e[1]=i,e[2]=o,e[3]=l,e}toRgbArray(e){this._arrayRgb||(this._arrayRgb=[]),e||(e=this._arrayRgb);const[n,i,o]=this._components;return e[0]=n,e[1]=i,e[2]=o,e}toNumber(){return this._int}toBgrNumber(){const[e,n,i]=this.toUint8RgbArray();return(i<<16)+(n<<8)+e}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[n,i,o,l]=b1._temp.setValue(e)._components;return this._components[0]*=n,this._components[1]*=i,this._components[2]*=o,this._components[3]*=l,this._refreshInt(),this._value=null,this}premultiply(e,n=!0){return n&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this._refreshInt(),this._value=null,this}toPremultiplied(e,n=!0){if(e===1)return(255<<24)+this._int;if(e===0)return n?0:this._int;let i=this._int>>16&255,o=this._int>>8&255,l=this._int&255;return n&&(i=i*e+.5|0,o=o*e+.5|0,l=l*e+.5|0),(e*255<<24)+(i<<16)+(o<<8)+l}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const n=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-n.length)+n}setAlpha(e){return this._components[3]=this._clamp(e),this._value=null,this}_normalize(e){let n,i,o,l;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const d=e;n=(d>>16&255)/255,i=(d>>8&255)/255,o=(d&255)/255,l=1}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4)e=this._clamp(e),[n,i,o,l=1]=e;else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4)e=this._clamp(e,0,255),[n,i,o,l=255]=e,n/=255,i/=255,o/=255,l/=255;else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const f=b1.HEX_PATTERN.exec(e);f&&(e=`#${f[2]}`)}const d=od(e);d.isValid()&&({r:n,g:i,b:o,a:l}=d.rgba,n/=255,i/=255,o/=255)}if(n!==void 0)this._components[0]=n,this._components[1]=i,this._components[2]=o,this._components[3]=l,this._refreshInt();else throw new Error(`Unable to convert color ${e}`)}_refreshInt(){this._clamp(this._components);const[e,n,i]=this._components;this._int=(e*255<<16)+(n*255<<8)+(i*255|0)}_clamp(e,n=0,i=1){return typeof e=="number"?Math.min(Math.max(e,n),i):(e.forEach((o,l)=>{e[l]=Math.min(Math.max(o,n),i)}),e)}static isColorLike(e){return typeof e=="number"||typeof e=="string"||e instanceof Number||e instanceof b1||Array.isArray(e)||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Float32Array||e.r!==void 0&&e.g!==void 0&&e.b!==void 0||e.r!==void 0&&e.g!==void 0&&e.b!==void 0&&e.a!==void 0||e.h!==void 0&&e.s!==void 0&&e.l!==void 0||e.h!==void 0&&e.s!==void 0&&e.l!==void 0&&e.a!==void 0||e.h!==void 0&&e.s!==void 0&&e.v!==void 0||e.h!==void 0&&e.s!==void 0&&e.v!==void 0&&e.a!==void 0}};tv.shared=new tv;tv._temp=new tv;tv.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let es=tv;const B7={cullArea:null,cullable:!1,cullableChildren:!0};let mC=0;const VV=500;function Ho(...t){mC!==VV&&(mC++,mC===VV?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...t))}const t_={_registeredResources:new Set,register(t){this._registeredResources.add(t)},unregister(t){this._registeredResources.delete(t)},release(){this._registeredResources.forEach(t=>t.clear())},get registeredCount(){return this._registeredResources.size},isRegistered(t){return this._registeredResources.has(t)},reset(){this._registeredResources.clear()}};class L7{constructor(e,n){this._pool=[],this._count=0,this._index=0,this._classType=e,n&&this.prepopulate(n)}prepopulate(e){for(let n=0;n<e;n++)this._pool[this._index++]=new this._classType;this._count+=e}get(e){var i;let n;return this._index>0?n=this._pool[--this._index]:(n=new this._classType,this._count++),(i=n.init)==null||i.call(n,e),n}return(e){var n;(n=e.reset)==null||n.call(e),this._pool[this._index++]=e}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){if(this._pool.length>0&&this._pool[0].destroy)for(let e=0;e<this._index;e++)this._pool[e].destroy();this._pool.length=0,this._count=0,this._index=0}}class I7{constructor(){this._poolsByClass=new Map}prepopulate(e,n){this.getPool(e).prepopulate(n)}get(e,n){return this.getPool(e).get(n)}return(e){this.getPool(e.constructor).return(e)}getPool(e){return this._poolsByClass.has(e)||this._poolsByClass.set(e,new L7(e)),this._poolsByClass.get(e)}stats(){const e={};return this._poolsByClass.forEach(n=>{const i=e[n._classType.name]?n._classType.name+n._classType.ID:n._classType.name;e[i]={free:n.totalFree,used:n.totalUsed,size:n.totalSize}}),e}clear(){this._poolsByClass.forEach(e=>e.clear()),this._poolsByClass.clear()}}const pa=new I7;t_.register(pa);const H7={get isCachedAsTexture(){var t;return!!((t=this.renderGroup)!=null&&t.isCachedAsTexture)},cacheAsTexture(t){typeof t=="boolean"&&t===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(t===!0?{}:t))},updateCacheTexture(){var t;(t=this.renderGroup)==null||t.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(t){Bn("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(t)}};function q7(t,e,n){const i=t.length;let o;if(e>=i||n===0)return;n=e+n>i?i-e:n;const l=i-n;for(o=e;o<l;++o)t[o]=t[o+n];t.length=l}const F7={allowChildren:!0,removeChildren(t=0,e){var l;const n=e??this.children.length,i=n-t,o=[];if(i>0&&i<=n){for(let f=n-1;f>=t;f--){const h=this.children[f];h&&(o.push(h),h.parent=null)}q7(this.children,t,n);const d=this.renderGroup||this.parentRenderGroup;d&&d.removeChildren(o);for(let f=0;f<o.length;++f){const h=o[f];(l=h.parentRenderLayer)==null||l.detach(h),this.emit("childRemoved",h,this,f),o[f].emit("removed",this)}return o.length>0&&this._didViewChangeTick++,o}else if(i===0&&this.children.length===0)return o;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(t){const e=this.getChildAt(t);return this.removeChild(e)},getChildAt(t){if(t<0||t>=this.children.length)throw new Error(`getChildAt: Index (${t}) does not exist.`);return this.children[t]},setChildIndex(t,e){if(e<0||e>=this.children.length)throw new Error(`The index ${e} supplied is out of bounds ${this.children.length}`);this.getChildIndex(t),this.addChildAt(t,e)},getChildIndex(t){const e=this.children.indexOf(t);if(e===-1)throw new Error("The supplied Container must be a child of the caller");return e},addChildAt(t,e){this.allowChildren||Bn(pi,"addChildAt: Only Containers will be allowed to add children in v8.0.0");const{children:n}=this;if(e<0||e>n.length)throw new Error(`${t}addChildAt: The index ${e} supplied is out of bounds ${n.length}`);const i=t.parent===this;if(t.parent){const l=t.parent.children.indexOf(t);if(i){if(l===e)return t;t.parent.children.splice(l,1)}else t.removeFromParent()}e===n.length?n.push(t):n.splice(e,0,t),t.parent=this,t.didChange=!0,t._updateFlags=15;const o=this.renderGroup||this.parentRenderGroup;return o&&o.addChild(t),this.sortableChildren&&(this.sortDirty=!0),i||(this.emit("childAdded",t,this,e),t.emit("added",this)),t},swapChildren(t,e){if(t===e)return;const n=this.getChildIndex(t),i=this.getChildIndex(e);this.children[n]=e,this.children[i]=t;const o=this.renderGroup||this.parentRenderGroup;o&&(o.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){var t;(t=this.parent)==null||t.removeChild(this)},reparentChild(...t){return t.length===1?this.reparentChildAt(t[0],this.children.length):(t.forEach(e=>this.reparentChildAt(e,this.children.length)),t[0])},reparentChildAt(t,e){if(t.parent===this)return this.setChildIndex(t,e),t;const n=t.worldTransform.clone();t.removeFromParent(),this.addChildAt(t,e);const i=this.worldTransform.clone();return i.invert(),n.prepend(i),t.setFromMatrix(n),t},replaceChild(t,e){t.updateLocalTransform(),this.addChildAt(e,this.getChildIndex(t)),e.setFromMatrix(t.localTransform),e.updateLocalTransform(),this.removeChild(t)}},G7={collectRenderables(t,e,n){this.parentRenderLayer&&this.parentRenderLayer!==n||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(t,e,n):this.renderGroup?e.renderPipes.renderGroup.addRenderGroup(this.renderGroup,t):this.collectRenderablesWithEffects(t,e,n))},collectRenderablesSimple(t,e,n){const i=this.children,o=i.length;for(let l=0;l<o;l++)i[l].collectRenderables(t,e,n)},collectRenderablesWithEffects(t,e,n){const{renderPipes:i}=e;for(let o=0;o<this.effects.length;o++){const l=this.effects[o];i[l.pipe].push(l,this,t)}this.collectRenderablesSimple(t,e,n);for(let o=this.effects.length-1;o>=0;o--){const l=this.effects[o];i[l.pipe].pop(l,this,t)}}};class UV{constructor(){this.pipe="filter",this.priority=1}destroy(){for(let e=0;e<this.filters.length;e++)this.filters[e].destroy();this.filters=null,this.filterArea=null}}class Y7{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(e=>{this.add({test:e.test,maskClass:e})}))}add(e){this._tests.push(e)}getMaskEffect(e){this._initialized||this.init();for(let n=0;n<this._tests.length;n++){const i=this._tests[n];if(i.test(e))return pa.get(i.maskClass,e)}return e}returnMaskEffect(e){pa.return(e)}}const FT=new Y7;Zr.handleByList(hn.MaskEffect,FT._effectClasses);const $7={_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){const t=this.renderGroup||this.parentRenderGroup;t&&(t.structureDidChange=!0)},addEffect(t){this.effects.indexOf(t)===-1&&(this.effects.push(t),this.effects.sort((n,i)=>n.priority-i.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(t){const e=this.effects.indexOf(t);e!==-1&&(this.effects.splice(e,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(t){const e=this._maskEffect;(e==null?void 0:e.mask)!==t&&(e&&(this.removeEffect(e),FT.returnMaskEffect(e),this._maskEffect=null),t!=null&&(this._maskEffect=FT.getMaskEffect(t),this.addEffect(this._maskEffect)))},get mask(){var t;return(t=this._maskEffect)==null?void 0:t.mask},setMask(t){this._maskOptions={...this._maskOptions,...t},t.mask&&(this.mask=t.mask),this._markStructureAsChanged()},set filters(t){var l;!Array.isArray(t)&&t&&(t=[t]);const e=this._filterEffect||(this._filterEffect=new UV);t=t;const n=(t==null?void 0:t.length)>0,i=((l=e.filters)==null?void 0:l.length)>0,o=n!==i;t=Array.isArray(t)?t.slice(0):t,e.filters=Object.freeze(t),o&&(n?this.addEffect(e):(this.removeEffect(e),e.filters=t??null))},get filters(){var t;return(t=this._filterEffect)==null?void 0:t.filters},set filterArea(t){this._filterEffect||(this._filterEffect=new UV),this._filterEffect.filterArea=t},get filterArea(){var t;return(t=this._filterEffect)==null?void 0:t.filterArea}},X7={label:null,get name(){return Bn(pi,"Container.name property has been removed, use Container.label instead"),this.label},set name(t){Bn(pi,"Container.name property has been removed, use Container.label instead"),this.label=t},getChildByName(t,e=!1){return this.getChildByLabel(t,e)},getChildByLabel(t,e=!1){const n=this.children;for(let i=0;i<n.length;i++){const o=n[i];if(o.label===t||t instanceof RegExp&&t.test(o.label))return o}if(e)for(let i=0;i<n.length;i++){const l=n[i].getChildByLabel(t,!0);if(l)return l}return null},getChildrenByLabel(t,e=!1,n=[]){const i=this.children;for(let o=0;o<i.length;o++){const l=i[o];(l.label===t||t instanceof RegExp&&t.test(l.label))&&n.push(l)}if(e)for(let o=0;o<i.length;o++)i[o].getChildrenByLabel(t,!0,n);return n}},Io=pa.getPool(Sn),Yf=pa.getPool(uu),K7=new Sn,W7={getFastGlobalBounds(t,e){e||(e=new uu),e.clear(),this._getGlobalBoundsRecursive(!!t,e,this.parentRenderLayer),e.isValid||e.set(0,0,0,0);const n=this.renderGroup||this.parentRenderGroup;return e.applyMatrix(n.worldTransform),e},_getGlobalBoundsRecursive(t,e,n){let i=e;if(t&&this.parentRenderLayer&&this.parentRenderLayer!==n||this.localDisplayStatus!==7||!this.measurable)return;const o=!!this.effects.length;if((this.renderGroup||o)&&(i=Yf.get().clear()),this.boundsArea)e.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){const d=this.bounds;i.addFrame(d.minX,d.minY,d.maxX,d.maxY,this.groupTransform)}const l=this.children;for(let d=0;d<l.length;d++)l[d]._getGlobalBoundsRecursive(t,i,n)}if(o){let l=!1;const d=this.renderGroup||this.parentRenderGroup;for(let f=0;f<this.effects.length;f++)this.effects[f].addBounds&&(l||(l=!0,i.applyMatrix(d.worldTransform)),this.effects[f].addBounds(i,!0));l&&i.applyMatrix(d.worldTransform.copyTo(K7).invert()),e.addBounds(i),Yf.return(i)}else this.renderGroup&&(e.addBounds(i,this.relativeGroupTransform),Yf.return(i))}};function u5(t,e,n){n.clear();let i,o;return t.parent?e?i=t.parent.worldTransform:(o=Io.get().identity(),i=KR(t,o)):i=Sn.IDENTITY,c5(t,n,i,e),o&&Io.return(o),n.isValid||n.set(0,0,0,0),n}function c5(t,e,n,i){var f,h;if(!t.visible||!t.measurable)return;let o;i?o=t.worldTransform:(t.updateLocalTransform(),o=Io.get(),o.appendFrom(t.localTransform,n));const l=e,d=!!t.effects.length;if(d&&(e=Yf.get().clear()),t.boundsArea)e.addRect(t.boundsArea,o);else{const p=t.bounds;p&&!p.isEmpty()&&(e.matrix=o,e.addBounds(p));for(let g=0;g<t.children.length;g++)c5(t.children[g],e,o,i)}if(d){for(let p=0;p<t.effects.length;p++)(h=(f=t.effects[p]).addBounds)==null||h.call(f,e);l.addBounds(e,Sn.IDENTITY),Yf.return(e)}i||Io.return(o)}function KR(t,e){const n=t.parent;return n&&(KR(n,e),n.updateLocalTransform(),e.append(n.localTransform)),e}function d5(t,e){if(t===16777215||!e)return e;if(e===16777215||!t)return t;const n=t>>16&255,i=t>>8&255,o=t&255,l=e>>16&255,d=e>>8&255,f=e&255,h=n*l/255|0,p=i*d/255|0,g=o*f/255|0;return(h<<16)+(p<<8)+g}const PV=16777215;function OV(t,e){return t===PV?e:e===PV?t:d5(t,e)}function yN(t){return((t&255)<<16)+(t&65280)+(t>>16&255)}const Q7={getGlobalAlpha(t){if(t)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let e=this.alpha,n=this.parent;for(;n;)e*=n.alpha,n=n.parent;return e},getGlobalTransform(t=new Sn,e){if(e)return t.copyFrom(this.worldTransform);this.updateLocalTransform();const n=KR(this,Io.get().identity());return t.appendFrom(this.localTransform,n),Io.return(n),t},getGlobalTint(t){if(t)return this.renderGroup?yN(this.renderGroup.worldColor):this.parentRenderGroup?yN(OV(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let e=this.localColor,n=this.parent;for(;n;)e=OV(e,n.localColor),n=n.parent;return yN(e)}};function f5(t,e,n){return e.clear(),n||(n=Sn.IDENTITY),h5(t,e,n,t,!0),e.isValid||e.set(0,0,0,0),e}function h5(t,e,n,i,o){var h,p;let l;if(o)l=Io.get(),l=n.copyTo(l);else{if(!t.visible||!t.measurable)return;t.updateLocalTransform();const g=t.localTransform;l=Io.get(),l.appendFrom(g,n)}const d=e,f=!!t.effects.length;if(f&&(e=Yf.get().clear()),t.boundsArea)e.addRect(t.boundsArea,l);else{t.renderPipeId&&(e.matrix=l,e.addBounds(t.bounds));const g=t.children;for(let x=0;x<g.length;x++)h5(g[x],e,l,i,!1)}if(f){for(let g=0;g<t.effects.length;g++)(p=(h=t.effects[g]).addLocalBounds)==null||p.call(h,e,i);d.addBounds(e,Sn.IDENTITY),Yf.return(e)}Io.return(l)}function m5(t,e){const n=t.children;for(let i=0;i<n.length;i++){const o=n[i],l=o.uid,d=(o._didViewChangeTick&65535)<<16|o._didContainerChangeTick&65535,f=e.index;(e.data[f]!==l||e.data[f+1]!==d)&&(e.data[e.index]=l,e.data[e.index+1]=d,e.didChange=!0),e.index=f+2,o.children.length&&m5(o,e)}return e.didChange}const Z7=new Sn,J7={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(t,e){const n=Math.sign(this.scale.x)||1;e!==0?this.scale.x=t/e*n:this.scale.x=n},_setHeight(t,e){const n=Math.sign(this.scale.y)||1;e!==0?this.scale.y=t/e*n:this.scale.y=n},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new uu});const t=this._localBoundsCacheData;return t.index=1,t.didChange=!1,t.data[0]!==this._didViewChangeTick&&(t.didChange=!0,t.data[0]=this._didViewChangeTick),m5(this,t),t.didChange&&f5(this,t.localBounds,Z7),t.localBounds},getBounds(t,e){return u5(this,t,e||new uu)}},eI={_onRender:null,set onRender(t){const e=this.renderGroup||this.parentRenderGroup;if(!t){this._onRender&&(e==null||e.removeOnRender(this)),this._onRender=null;return}this._onRender||e==null||e.addOnRender(this),this._onRender=t},get onRender(){return this._onRender}},tI={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(t){this._zIndex!==t&&(this._zIndex=t,this.depthOfChildModified())},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(nI))}};function nI(t,e){return t._zIndex-e._zIndex}const rI={getGlobalPosition(t=new ao,e=!1){return this.parent?this.parent.toGlobal(this._position,t,e):(t.x=this._position.x,t.y=this._position.y),t},toGlobal(t,e,n=!1){const i=this.getGlobalTransform(Io.get(),n);return e=i.apply(t,e),Io.return(i),e},toLocal(t,e,n,i){e&&(t=e.toGlobal(t,n,i));const o=this.getGlobalTransform(Io.get(),i);return n=o.applyInverse(t,n),Io.return(o),n}};class WR{constructor(){this.uid=gi("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0}reset(){this.instructionSize=0}destroy(){this.instructions.length=0,this.renderables.length=0,this.renderPipes=null,this.gcTick=0}add(e){this.instructions[this.instructionSize++]=e}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"])}}let iI=0;class sI{constructor(e){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this.textureStyle=new ev(this.textureOptions)}createTexture(e,n,i,o){const l=new cu({...this.textureOptions,width:e,height:n,resolution:1,antialias:i,autoGarbageCollect:!1,autoGenerateMipmaps:o});return new ur({source:l,label:`texturePool_${iI++}`})}getOptimalTexture(e,n,i=1,o,l=!1){let d=Math.ceil(e*i-1e-6),f=Math.ceil(n*i-1e-6);d=Jy(d),f=Jy(f);const h=o?1:0,p=l?1:0,g=(d<<17)+(f<<2)+(p<<1)+h;this._texturePool[g]||(this._texturePool[g]=[]);let x=this._texturePool[g].pop();return x||(x=this.createTexture(d,f,o,l)),x.source._resolution=i,x.source.width=d/i,x.source.height=f/i,x.source.pixelWidth=d,x.source.pixelHeight=f,x.frame.x=0,x.frame.y=0,x.frame.width=e,x.frame.height=n,x.updateUvs(),this._poolKeyHash[x.uid]=g,x}getSameSizeTexture(e,n=!1){const i=e.source;return this.getOptimalTexture(e.width,e.height,i._resolution,n)}returnTexture(e,n=!1){const i=this._poolKeyHash[e.uid];n&&(e.source.style=this.textureStyle),this._texturePool[i].push(e)}clear(e){if(e=e!==!1,e)for(const n in this._texturePool){const i=this._texturePool[n];if(i)for(let o=0;o<i.length;o++)i[o].destroy(!0)}this._texturePool={}}}const rD=new sI;t_.register(rD);class oI{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new Sn,this.worldColorAlpha=4294967295,this.worldColor=16777215,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.gcTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new WR,this._onRenderContainers=[],this.textureNeedsUpdate=!0,this.isCachedAsTexture=!1,this._matrixDirty=7}init(e){this.root=e,e._onRender&&this.addOnRender(e),e.didChange=!0;const n=e.children;for(let i=0;i<n.length;i++){const o=n[i];o._updateFlags=15,this.addChild(o)}}enableCacheAsTexture(e={}){this.textureOptions=e,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(rD.returnTexture(this.texture,!0),this.texture=null)}updateCacheTexture(){this.textureNeedsUpdate=!0;const e=this._parentCacheAsTextureRenderGroup;e&&!e.textureNeedsUpdate&&e.updateCacheTexture()}reset(){this.renderGroupChildren.length=0;for(const e in this.childrenToUpdate){const n=this.childrenToUpdate[e];n.list.fill(null),n.index=0}this.childrenRenderablesToUpdate.index=0,this.childrenRenderablesToUpdate.list.fill(null),this.root=null,this.updateTick=0,this.structureDidChange=!0,this._onRenderContainers.length=0,this.renderGroupParent=null,this.disableCacheAsTexture()}get localTransform(){return this.root.localTransform}addRenderGroupChild(e){e.renderGroupParent&&e.renderGroupParent._removeRenderGroupChild(e),e.renderGroupParent=this,this.renderGroupChildren.push(e)}_removeRenderGroupChild(e){const n=this.renderGroupChildren.indexOf(e);n>-1&&this.renderGroupChildren.splice(n,1),e.renderGroupParent=null}addChild(e){if(this.structureDidChange=!0,e.parentRenderGroup=this,e.updateTick=-1,e.parent===this.root?e.relativeRenderGroupDepth=1:e.relativeRenderGroupDepth=e.parent.relativeRenderGroupDepth+1,e.didChange=!0,this.onChildUpdate(e),e.renderGroup){this.addRenderGroupChild(e.renderGroup);return}e._onRender&&this.addOnRender(e);const n=e.children;for(let i=0;i<n.length;i++)this.addChild(n[i])}removeChild(e){if(this.structureDidChange=!0,e._onRender&&(e.renderGroup||this.removeOnRender(e)),e.parentRenderGroup=null,e.renderGroup){this._removeRenderGroupChild(e.renderGroup);return}const n=e.children;for(let i=0;i<n.length;i++)this.removeChild(n[i])}removeChildren(e){for(let n=0;n<e.length;n++)this.removeChild(e[n])}onChildUpdate(e){let n=this.childrenToUpdate[e.relativeRenderGroupDepth];n||(n=this.childrenToUpdate[e.relativeRenderGroupDepth]={index:0,list:[]}),n.list[n.index++]=e}updateRenderable(e){e.globalDisplayStatus<7||(this.instructionSet.renderPipes[e.renderPipeId].updateRenderable(e),e.didViewUpdate=!1)}onChildViewUpdate(e){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=e}get isRenderable(){return this.root.localDisplayStatus===7&&this.worldAlpha>0}addOnRender(e){this._onRenderContainers.push(e)}removeOnRender(e){this._onRenderContainers.splice(this._onRenderContainers.indexOf(e),1)}runOnRender(e){for(let n=0;n<this._onRenderContainers.length;n++)this._onRenderContainers[n]._onRender(e)}destroy(){this.disableCacheAsTexture(),this.renderGroupParent=null,this.root=null,this.childrenRenderablesToUpdate=null,this.childrenToUpdate=null,this.renderGroupChildren=null,this._onRenderContainers=null,this.instructionSet=null}getChildren(e=[]){const n=this.root.children;for(let i=0;i<n.length;i++)this._getChildren(n[i],e);return e}_getChildren(e,n=[]){if(n.push(e),e.renderGroup)return n;const i=e.children;for(let o=0;o<i.length;o++)this._getChildren(i[o],n);return n}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return(this._matrixDirty&1)===0?this._inverseWorldTransform:(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new Sn),this._inverseWorldTransform.copyFrom(this.worldTransform).invert())}get textureOffsetInverseTransform(){return(this._matrixDirty&2)===0?this._textureOffsetInverseTransform:(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new Sn),this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x,-this._textureBounds.y))}get inverseParentTextureTransform(){if((this._matrixDirty&4)===0)return this._inverseParentTextureTransform;this._matrixDirty&=-5;const e=this._parentCacheAsTextureRenderGroup;return e?(this._inverseParentTextureTransform||(this._inverseParentTextureTransform=new Sn),this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(e.inverseWorldTransform).translate(-e._textureBounds.x,-e._textureBounds.y)):this.worldTransform}get cacheToLocalTransform(){return this.isCachedAsTexture?this.textureOffsetInverseTransform:this._parentCacheAsTextureRenderGroup?this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform:null}}function aI(t,e,n={}){for(const i in e)!n[i]&&e[i]!==void 0&&(t[i]=e[i])}const pC=new Vs(null),PS=new Vs(null),gC=new Vs(null,1,1),OS=new Vs(null),zV=1,lI=2,bC=4;class Ps extends pd{constructor(e={}){var n,i;super(),this.uid=gi("renderable"),this._updateFlags=15,this.renderGroup=null,this.parentRenderGroup=null,this.parentRenderGroupIndex=0,this.didChange=!1,this.didViewUpdate=!1,this.relativeRenderGroupDepth=0,this.children=[],this.parent=null,this.includeInBuild=!0,this.measurable=!0,this.isSimple=!0,this.parentRenderLayer=null,this.updateTick=-1,this.localTransform=new Sn,this.relativeGroupTransform=new Sn,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new Vs(this,0,0),this._scale=gC,this._pivot=PS,this._origin=OS,this._skew=pC,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._rotation=0,this.localColor=16777215,this.localAlpha=1,this.groupAlpha=1,this.groupColor=16777215,this.groupColorAlpha=4294967295,this.localBlendMode="inherit",this.groupBlendMode="normal",this.localDisplayStatus=7,this.globalDisplayStatus=7,this._didContainerChangeTick=0,this._didViewChangeTick=0,this._didLocalTransformChangeId=-1,this.effects=[],aI(this,e,{children:!0,parent:!0,effects:!0}),(n=e.children)==null||n.forEach(o=>this.addChild(o)),(i=e.parent)==null||i.addChild(this)}static mixin(e){Bn("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),Zr.mixin(Ps,e)}set _didChangeId(e){this._didViewChangeTick=e>>12&4095,this._didContainerChangeTick=e&4095}get _didChangeId(){return this._didContainerChangeTick&4095|(this._didViewChangeTick&4095)<<12}addChild(...e){if(this.allowChildren||Bn(pi,"addChild: Only Containers will be allowed to add children in v8.0.0"),e.length>1){for(let o=0;o<e.length;o++)this.addChild(e[o]);return e[0]}const n=e[0],i=this.renderGroup||this.parentRenderGroup;return n.parent===this?(this.children.splice(this.children.indexOf(n),1),this.children.push(n),i&&(i.structureDidChange=!0),n):(n.parent&&n.parent.removeChild(n),this.children.push(n),this.sortableChildren&&(this.sortDirty=!0),n.parent=this,n.didChange=!0,n._updateFlags=15,i&&i.addChild(n),this.emit("childAdded",n,this,this.children.length-1),n.emit("added",this),this._didViewChangeTick++,n._zIndex!==0&&n.depthOfChildModified(),n)}removeChild(...e){if(e.length>1){for(let o=0;o<e.length;o++)this.removeChild(e[o]);return e[0]}const n=e[0],i=this.children.indexOf(n);return i>-1&&(this._didViewChangeTick++,this.children.splice(i,1),this.renderGroup?this.renderGroup.removeChild(n):this.parentRenderGroup&&this.parentRenderGroup.removeChild(n),n.parentRenderLayer&&n.parentRenderLayer.detach(n),n.parent=null,this.emit("childRemoved",n,this,i),n.emit("removed",this)),n}_onUpdate(e){e&&e===this._skew&&this._updateSkew(),this._didContainerChangeTick++,!this.didChange&&(this.didChange=!0,this.parentRenderGroup&&this.parentRenderGroup.onChildUpdate(this))}set isRenderGroup(e){!!this.renderGroup!==e&&(e?this.enableRenderGroup():this.disableRenderGroup())}get isRenderGroup(){return!!this.renderGroup}enableRenderGroup(){if(this.renderGroup)return;const e=this.parentRenderGroup;e==null||e.removeChild(this),this.renderGroup=pa.get(oI,this),this.groupTransform=Sn.IDENTITY,e==null||e.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;const e=this.parentRenderGroup;e==null||e.removeChild(this),pa.return(this.renderGroup),this.renderGroup=null,this.groupTransform=this.relativeGroupTransform,e==null||e.addChild(this),this._updateIsSimple()}_updateIsSimple(){this.isSimple=!this.renderGroup&&this.effects.length===0}get worldTransform(){return this._worldTransform||(this._worldTransform=new Sn),this.renderGroup?this._worldTransform.copyFrom(this.renderGroup.worldTransform):this.parentRenderGroup&&this._worldTransform.appendFrom(this.relativeGroupTransform,this.parentRenderGroup.worldTransform),this._worldTransform}get x(){return this._position.x}set x(e){this._position.x=e}get y(){return this._position.y}set y(e){this._position.y=e}get position(){return this._position}set position(e){this._position.copyFrom(e)}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this._onUpdate(this._skew))}get angle(){return this.rotation*_7}set angle(e){this.rotation=e*w7}get pivot(){return this._pivot===PS&&(this._pivot=new Vs(this,0,0)),this._pivot}set pivot(e){this._pivot===PS&&(this._pivot=new Vs(this,0,0),this._origin!==OS&&Ho("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof e=="number"?this._pivot.set(e):this._pivot.copyFrom(e)}get skew(){return this._skew===pC&&(this._skew=new Vs(this,0,0)),this._skew}set skew(e){this._skew===pC&&(this._skew=new Vs(this,0,0)),this._skew.copyFrom(e)}get scale(){return this._scale===gC&&(this._scale=new Vs(this,1,1)),this._scale}set scale(e){this._scale===gC&&(this._scale=new Vs(this,0,0)),typeof e=="string"&&(e=parseFloat(e)),typeof e=="number"?this._scale.set(e):this._scale.copyFrom(e)}get origin(){return this._origin===OS&&(this._origin=new Vs(this,0,0)),this._origin}set origin(e){this._origin===OS&&(this._origin=new Vs(this,0,0),this._pivot!==PS&&Ho("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof e=="number"?this._origin.set(e):this._origin.copyFrom(e)}get width(){return Math.abs(this.scale.x*this.getLocalBounds().width)}set width(e){const n=this.getLocalBounds().width;this._setWidth(e,n)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(e){const n=this.getLocalBounds().height;this._setHeight(e,n)}getSize(e){e||(e={});const n=this.getLocalBounds();return e.width=Math.abs(this.scale.x*n.width),e.height=Math.abs(this.scale.y*n.height),e}setSize(e,n){const i=this.getLocalBounds();typeof e=="object"?(n=e.height??e.width,e=e.width):n??(n=e),e!==void 0&&this._setWidth(e,i.width),n!==void 0&&this._setHeight(n,i.height)}_updateSkew(){const e=this._rotation,n=this._skew;this._cx=Math.cos(e+n._y),this._sx=Math.sin(e+n._y),this._cy=-Math.sin(e-n._x),this._sy=Math.cos(e-n._x)}updateTransform(e){return this.position.set(typeof e.x=="number"?e.x:this.position.x,typeof e.y=="number"?e.y:this.position.y),this.scale.set(typeof e.scaleX=="number"?e.scaleX||1:this.scale.x,typeof e.scaleY=="number"?e.scaleY||1:this.scale.y),this.rotation=typeof e.rotation=="number"?e.rotation:this.rotation,this.skew.set(typeof e.skewX=="number"?e.skewX:this.skew.x,typeof e.skewY=="number"?e.skewY:this.skew.y),this.pivot.set(typeof e.pivotX=="number"?e.pivotX:this.pivot.x,typeof e.pivotY=="number"?e.pivotY:this.pivot.y),this.origin.set(typeof e.originX=="number"?e.originX:this.origin.x,typeof e.originY=="number"?e.originY:this.origin.y),this}setFromMatrix(e){e.decompose(this)}updateLocalTransform(){const e=this._didContainerChangeTick;if(this._didLocalTransformChangeId===e)return;this._didLocalTransformChangeId=e;const n=this.localTransform,i=this._scale,o=this._pivot,l=this._origin,d=this._position,f=i._x,h=i._y,p=o._x,g=o._y,x=-l._x,y=-l._y;n.a=this._cx*f,n.b=this._sx*f,n.c=this._cy*h,n.d=this._sy*h,n.tx=d._x-(p*n.a+g*n.c)+(x*n.a+y*n.c)-x,n.ty=d._y-(p*n.b+g*n.d)+(x*n.b+y*n.d)-y}set alpha(e){e!==this.localAlpha&&(this.localAlpha=e,this._updateFlags|=zV,this._onUpdate())}get alpha(){return this.localAlpha}set tint(e){const i=es.shared.setValue(e??16777215).toBgrNumber();i!==this.localColor&&(this.localColor=i,this._updateFlags|=zV,this._onUpdate())}get tint(){return yN(this.localColor)}set blendMode(e){this.localBlendMode!==e&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=lI,this.localBlendMode=e,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(this.localDisplayStatus&2)}set visible(e){const n=e?2:0;(this.localDisplayStatus&2)!==n&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=bC,this.localDisplayStatus^=2,this._onUpdate(),this.emit("visibleChanged",e))}get culled(){return!(this.localDisplayStatus&4)}set culled(e){const n=e?0:4;(this.localDisplayStatus&4)!==n&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=bC,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(this.localDisplayStatus&1)}set renderable(e){const n=e?1:0;(this.localDisplayStatus&1)!==n&&(this._updateFlags|=bC,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(e=!1){var o;if(this.destroyed)return;this.destroyed=!0;let n;if(this.children.length&&(n=this.removeChildren(0,this.children.length)),this.removeFromParent(),this.parent=null,this._maskEffect=null,this._filterEffect=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._origin=null,this._skew=null,this.emit("destroyed",this),this.removeAllListeners(),(typeof e=="boolean"?e:e==null?void 0:e.children)&&n)for(let l=0;l<n.length;++l)n[l].destroy(e);(o=this.renderGroup)==null||o.destroy(),this.renderGroup=null}}Zr.mixin(Ps,F7,W7,rI,eI,J7,$7,X7,tI,B7,H7,Q7,G7);class QR extends Ps{constructor(e){super(e),this.canBundle=!0,this.allowChildren=!1,this._roundPixels=0,this._lastUsed=-1,this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this._bounds=new uu(0,1,0,0),this._boundsDirty=!0,this.autoGarbageCollect=e.autoGarbageCollect??!0}get bounds(){return this._boundsDirty?(this.updateBounds(),this._boundsDirty=!1,this._bounds):this._bounds}get roundPixels(){return!!this._roundPixels}set roundPixels(e){this._roundPixels=e?1:0}containsPoint(e){const n=this.bounds,{x:i,y:o}=e;return i>=n.minX&&i<=n.maxX&&o>=n.minY&&o<=n.maxY}onViewUpdate(){if(this._didViewChangeTick++,this._boundsDirty=!0,this.didViewUpdate)return;this.didViewUpdate=!0;const e=this.renderGroup||this.parentRenderGroup;e&&e.onChildViewUpdate(this)}unload(){var e;this.emit("unload",this);for(const n in this._gpuData)(e=this._gpuData[n])==null||e.destroy();this._gpuData=Object.create(null),this.onViewUpdate()}destroy(e){this.unload(),super.destroy(e),this._bounds=null}collectRenderablesSimple(e,n,i){const{renderPipes:o}=n;o.blendMode.pushBlendMode(this,this.groupBlendMode,e);const d=o[this.renderPipeId];d!=null&&d.addRenderable&&d.addRenderable(this,e),this.didViewUpdate=!1;const f=this.children,h=f.length;for(let p=0;p<h;p++)f[p].collectRenderables(e,n,i);o.blendMode.popBlendMode(e)}}class nv extends QR{constructor(e=ur.EMPTY){e instanceof ur&&(e={texture:e});const{texture:n=ur.EMPTY,anchor:i,roundPixels:o,width:l,height:d,...f}=e;super({label:"Sprite",...f}),this.renderPipeId="sprite",this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new Vs({_onUpdate:()=>{this.onViewUpdate()}}),i?this.anchor=i:n.defaultAnchor&&(this.anchor=n.defaultAnchor),this.texture=n,this.allowChildren=!1,this.roundPixels=o??!1,l!==void 0&&(this.width=l),d!==void 0&&(this.height=d)}static from(e,n=!1){return e instanceof ur?new nv(e):new nv(ur.from(e,n))}set texture(e){e||(e=ur.EMPTY);const n=this._texture;n!==e&&(n&&n.dynamic&&n.off("update",this.onViewUpdate,this),e.dynamic&&e.on("update",this.onViewUpdate,this),this._texture=e,this._width&&this._setWidth(this._width,this._texture.orig.width),this._height&&this._setHeight(this._height,this._texture.orig.height),this.onViewUpdate())}get texture(){return this._texture}get visualBounds(){return s5(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return Bn("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){const e=this._anchor,n=this._texture,i=this._bounds,{width:o,height:l}=n.orig;i.minX=-e._x*o,i.maxX=i.minX+o,i.minY=-e._y*l,i.maxY=i.minY+l}destroy(e=!1){if(super.destroy(e),typeof e=="boolean"?e:e==null?void 0:e.texture){const i=typeof e=="boolean"?e:e==null?void 0:e.textureSource;this._texture.destroy(i)}this._texture=null,this._visualBounds=null,this._bounds=null,this._anchor=null}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e)}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(e){this._setWidth(e,this._texture.orig.width),this._width=e}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(e){this._setHeight(e,this._texture.orig.height),this._height=e}getSize(e){return e||(e={}),e.width=Math.abs(this.scale.x)*this._texture.orig.width,e.height=Math.abs(this.scale.y)*this._texture.orig.height,e}setSize(e,n){typeof e=="object"?(n=e.height??e.width,e=e.width):n??(n=e),e!==void 0&&this._setWidth(e,this._texture.orig.width),n!==void 0&&this._setHeight(n,this._texture.orig.height)}}const uI=new uu;function p5(t,e,n){const i=uI;t.measurable=!0,u5(t,n,i),e.addBoundsMask(i),t.measurable=!1}function g5(t,e,n){const i=Yf.get();t.measurable=!0;const o=Io.get().identity(),l=b5(t,n,o);f5(t,i,l),t.measurable=!1,e.addBoundsMask(i),Io.return(o),Yf.return(i)}function b5(t,e,n){return t?(t!==e&&(b5(t.parent,e,n),t.updateLocalTransform(),n.append(t.localTransform)),n):(Ho("Mask bounds, renderable is not inside the root container"),n)}class x5{constructor(e){this.priority=0,this.inverse=!1,this.pipe="alphaMask",e!=null&&e.mask&&this.init(e.mask)}init(e){this.mask=e,this.renderMaskToTexture=!(e instanceof nv),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask=null)}addBounds(e,n){this.inverse||p5(this.mask,e,n)}addLocalBounds(e,n){g5(this.mask,e,n)}containsPoint(e,n){const i=this.mask;return n(i,e)}destroy(){this.reset()}static test(e){return e instanceof nv}}x5.extension=hn.MaskEffect;class y5{constructor(e){this.priority=0,this.pipe="colorMask",e!=null&&e.mask&&this.init(e.mask)}init(e){this.mask=e}destroy(){}static test(e){return typeof e=="number"}}y5.extension=hn.MaskEffect;class v5{constructor(e){this.priority=0,this.pipe="stencilMask",e!=null&&e.mask&&this.init(e.mask)}init(e){this.mask=e,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null)}addBounds(e,n){p5(this.mask,e,n)}addLocalBounds(e,n){g5(this.mask,e,n)}containsPoint(e,n){const i=this.mask;return n(i,e)}destroy(){this.reset()}static test(e){return e instanceof Ps}}v5.extension=hn.MaskEffect;const cI={createCanvas:(t,e)=>{const n=document.createElement("canvas");return n.width=t,n.height=e,n},createImage:()=>new Image,getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(t,e)=>fetch(t,e),parseXML:t=>new DOMParser().parseFromString(t,"text/xml")};let BV=cI;const ll={get(){return BV},set(t){BV=t}};class E5 extends cu{constructor(e){e.resource||(e.resource=ll.get().createCanvas()),e.width||(e.width=e.resource.width,e.autoDensity||(e.width/=e.resolution)),e.height||(e.height=e.resource.height,e.autoDensity||(e.height/=e.resolution)),super(e),this.uploadMethodId="image",this.autoDensity=e.autoDensity,this.resizeCanvas(),this.transparent=!!e.transparent}resizeCanvas(){this.autoDensity&&"style"in this.resource&&(this.resource.style.width=`${this.width}px`,this.resource.style.height=`${this.height}px`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(e=this.width,n=this.height,i=this._resolution){const o=super.resize(e,n,i);return o&&this.resizeCanvas(),o}static test(e){return globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&e instanceof OffscreenCanvas}get context2D(){return this._context2D||(this._context2D=this.resource.getContext("2d"))}}E5.extension=hn.TextureSource;class RN extends cu{constructor(e){super(e),this.uploadMethodId="image",this.autoGarbageCollect=!0}static test(e){return globalThis.HTMLImageElement&&e instanceof HTMLImageElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap||globalThis.VideoFrame&&e instanceof VideoFrame}}RN.extension=hn.TextureSource;var jN=(t=>(t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY",t))(jN||{});class xC{constructor(e,n=null,i=0,o=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=e,this._context=n,this.priority=i,this._once=o}match(e,n=null){return this._fn===e&&this._context===n}emit(e){this._fn&&(this._context?this._fn.call(this._context,e):this._fn(e));const n=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),n}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this._fn=null,this._context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const n=this.next;return this.next=e?null:n,this.previous=null,n}}const _5=class il{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new xC(null,null,1/0),this.deltaMS=1/il.targetFPMS,this.elapsedMS=1/il.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,n,i=jN.NORMAL){return this._addListener(new xC(e,n,i))}addOnce(e,n,i=jN.NORMAL){return this._addListener(new xC(e,n,i,!0))}_addListener(e){let n=this._head.next,i=this._head;if(!n)e.connect(i);else{for(;n;){if(e.priority>n.priority){e.connect(i);break}i=n,n=n.next}e.previous||e.connect(i)}return this._startIfPossible(),this}remove(e,n){let i=this._head.next;for(;i;)i.match(e,n)?i=i.destroy():i=i.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,n=this._head;for(;n=n.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let n;if(e>this.lastTime){if(n=this.elapsedMS=e-this.lastTime,n>this._maxElapsedMS&&(n=this._maxElapsedMS),n*=this.speed,this._minElapsedMS){const l=e-this._lastFrame|0;if(l<this._minElapsedMS)return;this._lastFrame=e-l%this._minElapsedMS}this.deltaMS=n,this.deltaTime=this.deltaMS*il.targetFPMS;const i=this._head;let o=i.next;for(;o;)o=o.emit(this);i.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const n=Math.min(Math.max(0,e)/1e3,il.targetFPMS);this._maxElapsedMS=1/n,this._minElapsedMS&&e>this.maxFPS&&(this.maxFPS=e)}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){e===0?this._minElapsedMS=0:(e<this.minFPS&&(this.minFPS=e),this._minElapsedMS=1/(e/1e3))}static get shared(){if(!il._shared){const e=il._shared=new il;e.autoStart=!0,e._protected=!0}return il._shared}static get system(){if(!il._system){const e=il._system=new il;e.autoStart=!0,e._protected=!0}return il._system}};_5.targetFPMS=.06;let qy=_5,yC;async function dI(){return yC??(yC=(async()=>{var d;const e=ll.get().createCanvas(1,1).getContext("webgl");if(!e)return"premultiply-alpha-on-upload";const n=await new Promise(f=>{const h=document.createElement("video");h.onloadeddata=()=>f(h),h.onerror=()=>f(null),h.autoplay=!1,h.crossOrigin="anonymous",h.preload="auto",h.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",h.load()});if(!n)return"premultiply-alpha-on-upload";const i=e.createTexture();e.bindTexture(e.TEXTURE_2D,i);const o=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,o),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,i,0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n);const l=new Uint8Array(4);return e.readPixels(0,0,1,1,e.RGBA,e.UNSIGNED_BYTE,l),e.deleteFramebuffer(o),e.deleteTexture(i),(d=e.getExtension("WEBGL_lose_context"))==null||d.loseContext(),l[0]<=l[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),yC}const iD=class w5 extends cu{constructor(e){super(e),this.isReady=!1,this.uploadMethodId="video",e={...w5.defaultOptions,...e},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=e.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=e.autoPlay!==!1,this.alphaMode=e.alphaMode??"premultiply-alpha-on-upload",this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),e.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){const e=qy.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-e)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;const e=this.resource,n=this.options;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart),e.addEventListener("pause",this._onPlayStop),e.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._mediaReady():(n.preload||e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlayThrough),e.addEventListener("error",this._onError,!0)),this.alphaMode=await dI(),this._load=new Promise((i,o)=>{this.isValid?i(this):(this._resolve=i,this._reject=o,n.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${n.preloadTimeoutMs}ms`))})),e.load())}),this._load}_onError(e){this.resource.removeEventListener("error",this._onError,!0),this.emit("error",e),this._reject&&(this._reject(e),this._reject=null,this._resolve=null)}_isSourcePlaying(){const e=this.resource;return!e.paused&&!e.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener("canplay",this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener("canplaythrough",this._onCanPlay),this._preloadTimeout&&(clearTimeout(this._preloadTimeout),this._preloadTimeout=void 0),this._mediaReady()}_mediaReady(){const e=this.resource;this.isValid&&(this.isReady=!0,this.resize(e.videoWidth,e.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();const e=this.resource;e&&(e.removeEventListener("play",this._onPlayStart),e.removeEventListener("pause",this._onPlayStop),e.removeEventListener("seeked",this._onSeeked),e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlayThrough),e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(qy.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(qy.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(qy.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(e){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement}};iD.extension=hn.TextureSource;iD.defaultOptions={...cu.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1};iD.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let fI=iD;const Py=(t,e,n=!1)=>(Array.isArray(t)||(t=[t]),e?t.map(i=>typeof i=="string"||n?e(i):i):t);class hI{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){const n=this._cache.get(e);return n||Ho(`[Assets] Asset id ${e} was not found in the Cache`),n}set(e,n){const i=Py(e);let o;for(let h=0;h<this.parsers.length;h++){const p=this.parsers[h];if(p.test(n)){o=p.getCacheableAssets(i,n);break}}const l=new Map(Object.entries(o||{}));o||i.forEach(h=>{l.set(h,n)});const d=[...l.keys()],f={cacheKeys:d,keys:i};i.forEach(h=>{this._cacheMap.set(h,f)}),d.forEach(h=>{const p=o?o[h]:n;this._cache.has(h)&&this._cache.get(h)!==p&&Ho("[Cache] already has key:",h),this._cache.set(h,l.get(h))})}remove(e){if(!this._cacheMap.has(e)){Ho(`[Assets] Asset id ${e} was not found in the Cache`);return}const n=this._cacheMap.get(e);n.cacheKeys.forEach(o=>{this._cache.delete(o)}),n.keys.forEach(o=>{this._cacheMap.delete(o)})}get parsers(){return this._parsers}}const Oy=new hI,GT=[];Zr.handleByList(hn.TextureSource,GT);function S5(t={}){const e=t&&t.resource,n=e?t.resource:t,i=e?t:{resource:t};for(let o=0;o<GT.length;o++){const l=GT[o];if(l.test(n))return new l(i)}throw new Error(`Could not find a source type for resource: ${i.resource}`)}function mI(t={},e=!1){const n=t&&t.resource,i=n?t.resource:t,o=n?t:{resource:t};if(!e&&Oy.has(i))return Oy.get(i);const l=new ur({source:S5(o)});return l.on("destroy",()=>{Oy.has(i)&&Oy.remove(i)}),e||Oy.set(i,l),l}function pI(t,e=!1){return typeof t=="string"?Oy.get(t):t instanceof cu?new ur({source:t}):mI(t,e)}ur.from=pI;cu.from=S5;Zr.add(x5,y5,v5,fI,RN,E5,XR);var N5=(t=>(t[t.Low=0]="Low",t[t.Normal=1]="Normal",t[t.High=2]="High",t))(N5||{});function lc(t){if(typeof t!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(t)}`)}function JE(t){return t.split("?")[0].split("#")[0]}function gI(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function bI(t,e,n){return t.replace(new RegExp(gI(e),"g"),n)}function xI(t,e){let n="",i=0,o=-1,l=0,d=-1;for(let f=0;f<=t.length;++f){if(f<t.length)d=t.charCodeAt(f);else{if(d===47)break;d=47}if(d===47){if(!(o===f-1||l===1))if(o!==f-1&&l===2){if(n.length<2||i!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){const h=n.lastIndexOf("/");if(h!==n.length-1){h===-1?(n="",i=0):(n=n.slice(0,h),i=n.length-1-n.lastIndexOf("/")),o=f,l=0;continue}}else if(n.length===2||n.length===1){n="",i=0,o=f,l=0;continue}}}else n.length>0?n+=`/${t.slice(o+1,f)}`:n=t.slice(o+1,f),i=f-o-1;o=f,l=0}else d===46&&l!==-1?++l:l=-1}return n}const U1={toPosix(t){return bI(t,"\\","/")},isUrl(t){return/^https?:/.test(this.toPosix(t))},isDataUrl(t){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(t)},isBlobUrl(t){return t.startsWith("blob:")},hasProtocol(t){return/^[^/:]+:/.test(this.toPosix(t))},getProtocol(t){lc(t),t=this.toPosix(t);const e=/^file:\/\/\//.exec(t);if(e)return e[0];const n=/^[^/:]+:\/{0,2}/.exec(t);return n?n[0]:""},toAbsolute(t,e,n){if(lc(t),this.isDataUrl(t)||this.isBlobUrl(t))return t;const i=JE(this.toPosix(e??ll.get().getBaseUrl())),o=JE(this.toPosix(n??this.rootname(i)));return t=this.toPosix(t),t.startsWith("/")?U1.join(o,t.slice(1)):this.isAbsolute(t)?t:this.join(i,t)},normalize(t){if(lc(t),t.length===0)return".";if(this.isDataUrl(t)||this.isBlobUrl(t))return t;t=this.toPosix(t);let e="";const n=t.startsWith("/");this.hasProtocol(t)&&(e=this.rootname(t),t=t.slice(e.length));const i=t.endsWith("/");return t=xI(t),t.length>0&&i&&(t+="/"),n?`/${t}`:e+t},isAbsolute(t){return lc(t),t=this.toPosix(t),this.hasProtocol(t)?!0:t.startsWith("/")},join(...t){if(t.length===0)return".";let e;for(let n=0;n<t.length;++n){const i=t[n];if(lc(i),i.length>0)if(e===void 0)e=i;else{const o=t[n-1]??"";this.joinExtensions.includes(this.extname(o).toLowerCase())?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(t){if(lc(t),t.length===0)return".";t=this.toPosix(t);let e=t.charCodeAt(0);const n=e===47;let i=-1,o=!0;const l=this.getProtocol(t),d=t;t=t.slice(l.length);for(let f=t.length-1;f>=1;--f)if(e=t.charCodeAt(f),e===47){if(!o){i=f;break}}else o=!1;return i===-1?n?"/":this.isUrl(d)?l+t:l:n&&i===1?"//":l+t.slice(0,i)},rootname(t){lc(t),t=this.toPosix(t);let e="";if(t.startsWith("/")?e="/":e=this.getProtocol(t),this.isUrl(t)){const n=t.indexOf("/",e.length);n!==-1?e=t.slice(0,n):e=t,e.endsWith("/")||(e+="/")}return e},basename(t,e){lc(t),e&&lc(e),t=JE(this.toPosix(t));let n=0,i=-1,o=!0,l;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";let d=e.length-1,f=-1;for(l=t.length-1;l>=0;--l){const h=t.charCodeAt(l);if(h===47){if(!o){n=l+1;break}}else f===-1&&(o=!1,f=l+1),d>=0&&(h===e.charCodeAt(d)?--d===-1&&(i=l):(d=-1,i=f))}return n===i?i=f:i===-1&&(i=t.length),t.slice(n,i)}for(l=t.length-1;l>=0;--l)if(t.charCodeAt(l)===47){if(!o){n=l+1;break}}else i===-1&&(o=!1,i=l+1);return i===-1?"":t.slice(n,i)},extname(t){lc(t),t=JE(this.toPosix(t));let e=-1,n=0,i=-1,o=!0,l=0;for(let d=t.length-1;d>=0;--d){const f=t.charCodeAt(d);if(f===47){if(!o){n=d+1;break}continue}i===-1&&(o=!1,i=d+1),f===46?e===-1?e=d:l!==1&&(l=1):e!==-1&&(l=-1)}return e===-1||i===-1||l===0||l===1&&e===i-1&&e===n+1?"":t.slice(e,i)},parse(t){lc(t);const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;t=JE(this.toPosix(t));let n=t.charCodeAt(0);const i=this.isAbsolute(t);let o;e.root=this.rootname(t),i||this.hasProtocol(t)?o=1:o=0;let l=-1,d=0,f=-1,h=!0,p=t.length-1,g=0;for(;p>=o;--p){if(n=t.charCodeAt(p),n===47){if(!h){d=p+1;break}continue}f===-1&&(h=!1,f=p+1),n===46?l===-1?l=p:g!==1&&(g=1):l!==-1&&(g=-1)}return l===-1||f===-1||g===0||g===1&&l===f-1&&l===d+1?f!==-1&&(d===0&&i?e.base=e.name=t.slice(1,f):e.base=e.name=t.slice(d,f)):(d===0&&i?(e.name=t.slice(1,l),e.base=t.slice(1,f)):(e.name=t.slice(d,l),e.base=t.slice(d,f)),e.ext=t.slice(l,f)),e.dir=this.dirname(t),e},sep:"/",delimiter:":",joinExtensions:[".html"]};function D5(t,e,n,i,o){const l=e[n];for(let d=0;d<l.length;d++){const f=l[d];n<e.length-1?D5(t.replace(i[n],f),e,n+1,i,o):o.push(t.replace(i[n],f))}}function yI(t){const e=/\{(.*?)\}/g,n=t.match(e),i=[];if(n){const o=[];n.forEach(l=>{const d=l.substring(1,l.length-1).split(",");o.push(d)}),D5(t,o,0,n,i)}else i.push(t);return i}const LV=t=>!Array.isArray(t);class A5{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,n)=>`${e}${this._bundleIdConnector}${n}`,extractAssetIdFromBundle:(e,n)=>n.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...e){e.forEach(n=>{this._preferredOrder.push(n),n.priority||(n.priority=Object.keys(n.params))}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(e){if(typeof e=="string")this._defaultSearchParams=e;else{const n=e;this._defaultSearchParams=Object.keys(n).map(i=>`${encodeURIComponent(i)}=${encodeURIComponent(n[i])}`).join("&")}}getAlias(e){const{alias:n,src:i}=e;return Py(n||i,l=>typeof l=="string"?l:Array.isArray(l)?l.map(d=>(d==null?void 0:d.src)??d):l!=null&&l.src?l.src:l,!0)}removeAlias(e,n){this._assetMap[e]&&(n&&n!==this._resolverHash[e]||(delete this._resolverHash[e],delete this._assetMap[e]))}addManifest(e){this._manifest&&Ho("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=e,e.bundles.forEach(n=>{this.addBundle(n.name,n.assets)})}addBundle(e,n){const i=[];let o=n;Array.isArray(n)||(o=Object.entries(n).map(([l,d])=>typeof d=="string"||Array.isArray(d)?{alias:l,src:d}:{alias:l,...d})),o.forEach(l=>{const d=l.src,f=l.alias;let h;if(typeof f=="string"){const p=this._createBundleAssetId(e,f);i.push(p),h=[f,p]}else{const p=f.map(g=>this._createBundleAssetId(e,g));i.push(...p),h=[...f,...p]}this.add({...l,alias:h,src:d})}),this._bundles[e]=i}add(e){const n=[];Array.isArray(e)?n.push(...e):n.push(e);let i;i=l=>{this.hasKey(l)&&Ho(`[Resolver] already has key: ${l} overwriting`)},Py(n).forEach(l=>{const{src:d}=l;let{data:f,format:h,loadParser:p,parser:g}=l;const x=Py(d).map(T=>typeof T=="string"?yI(T):Array.isArray(T)?T:[T]),y=this.getAlias(l);Array.isArray(y)?y.forEach(i):i(y);const E=[],N=T=>{const D=this._parsers.find(A=>A.test(T));return{src:T,...D==null?void 0:D.parse(T)}};x.forEach(T=>{T.forEach(D=>{let A={};if(typeof D!="object"?A=N(D):(f=D.data??f,h=D.format??h,(D.loadParser||D.parser)&&(p=D.loadParser??p,g=D.parser??g),A={...N(D.src),...D}),!y)throw new Error(`[Resolver] alias is undefined for this asset: ${A.src}`);A=this._buildResolvedAsset(A,{aliases:y,data:f,format:h,loadParser:p,parser:g,progressSize:l.progressSize}),E.push(A)})}),y.forEach(T=>{this._assetMap[T]=E})})}resolveBundle(e){const n=LV(e);e=Py(e);const i={};return e.forEach(o=>{const l=this._bundles[o];if(l){const d=this.resolve(l),f={};for(const h in d){const p=d[h];f[this._extractAssetIdFromBundle(o,h)]=p}i[o]=f}}),n?i[e[0]]:i}resolveUrl(e){const n=this.resolve(e);if(typeof e!="string"){const i={};for(const o in n)i[o]=n[o].src;return i}return n.src}resolve(e){const n=LV(e);e=Py(e);const i={};return e.forEach(o=>{if(!this._resolverHash[o])if(this._assetMap[o]){let l=this._assetMap[o];const d=this._getPreferredOrder(l);d==null||d.priority.forEach(f=>{d.params[f].forEach(h=>{const p=l.filter(g=>g[f]?g[f]===h:!1);p.length&&(l=p)})}),this._resolverHash[o]=l[0]}else this._resolverHash[o]=this._buildResolvedAsset({alias:[o],src:o},{});i[o]=this._resolverHash[o]}),n?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let n=0;n<e.length;n++){const i=e[n],o=this._preferredOrder.find(l=>l.params.format.includes(i.format));if(o)return o}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;const n=/\?/.test(e)?"&":"?";return`${e}${n}${this._defaultSearchParams}`}_buildResolvedAsset(e,n){const{aliases:i,data:o,loadParser:l,parser:d,format:f,progressSize:h}=n;return(this._basePath||this._rootPath)&&(e.src=U1.toAbsolute(e.src,this._basePath,this._rootPath)),e.alias=i??e.alias??[e.src],e.src=this._appendDefaultSearchParams(e.src),e.data={...o||{},...e.data},e.loadParser=l??e.loadParser,e.parser=d??e.parser,e.format=f??e.format??vI(e.src),h!==void 0&&(e.progressSize=h),e}}A5.RETINA_PREFIX=/@([0-9\.]+)x/;function vI(t){return t.split(".").pop().split("?").shift().split("#").shift()}const IV=(t,e)=>{const n=e.split("?")[1];return n&&(t+=`?${n}`),t},C5=class x1{constructor(e,n){this.linkedSheets=[];let i=e;(e==null?void 0:e.source)instanceof cu&&(i={texture:e,data:n});const{texture:o,data:l,cachePrefix:d=""}=i;this.cachePrefix=d,this._texture=o instanceof ur?o:null,this.textureSource=o.source,this.textures={},this.animations={},this.data=l;const f=parseFloat(l.meta.scale);f?(this.resolution=f,o.source.resolution=this.resolution):this.resolution=o.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(e=>{this._callback=e,this._batchIndex=0,this._frameKeys.length<=x1.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}parseSync(){return this._processFrames(0,!0),this._processAnimations(),this.textures}_processFrames(e,n=!1){let i=e;const o=n?1/0:x1.BATCH_SIZE;for(;i-e<o&&i<this._frameKeys.length;){const l=this._frameKeys[i],d=this._frames[l],f=d.frame;if(f){let h=null,p=null;const g=d.trimmed!==!1&&d.sourceSize?d.sourceSize:d.frame,x=new _i(0,0,Math.floor(g.w)/this.resolution,Math.floor(g.h)/this.resolution);d.rotated?h=new _i(Math.floor(f.x)/this.resolution,Math.floor(f.y)/this.resolution,Math.floor(f.h)/this.resolution,Math.floor(f.w)/this.resolution):h=new _i(Math.floor(f.x)/this.resolution,Math.floor(f.y)/this.resolution,Math.floor(f.w)/this.resolution,Math.floor(f.h)/this.resolution),d.trimmed!==!1&&d.spriteSourceSize&&(p=new _i(Math.floor(d.spriteSourceSize.x)/this.resolution,Math.floor(d.spriteSourceSize.y)/this.resolution,Math.floor(f.w)/this.resolution,Math.floor(f.h)/this.resolution)),this.textures[l]=new ur({source:this.textureSource,frame:h,orig:x,trim:p,rotate:d.rotated?2:0,defaultAnchor:d.anchor,defaultBorders:d.borders,label:l.toString()})}i++}}_processAnimations(){const e=this.data.animations||{};for(const n in e){this.animations[n]=[];for(let i=0;i<e[n].length;i++){const o=e[n][i];this.animations[n].push(this.textures[o])}}}_parseComplete(){const e=this._callback;this._callback=null,this._batchIndex=0,e.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*x1.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*x1.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(e=!1){var n;for(const i in this.textures)this.textures[i].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,e&&((n=this._texture)==null||n.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};C5.BATCH_SIZE=1e3;let HV=C5;const EI=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];function T5(t,e,n){const i={};if(t.forEach(o=>{i[o]=e}),Object.keys(e.textures).forEach(o=>{i[`${e.cachePrefix}${o}`]=e.textures[o]}),!n){const o=U1.dirname(t[0]);e.linkedSheets.forEach((l,d)=>{const f=T5([`${o}/${e.data.meta.related_multi_packs[d]}`],l,!0);Object.assign(i,f)})}return i}const _I={extension:hn.Asset,cache:{test:t=>t instanceof HV,getCacheableAssets:(t,e)=>T5(t,e,!1)},resolver:{extension:{type:hn.ResolveParser,name:"resolveSpritesheet"},test:t=>{const n=t.split("?")[0].split("."),i=n.pop(),o=n.pop();return i==="json"&&EI.includes(o)},parse:t=>{var n;const e=t.split(".");return{resolution:parseFloat(((n=A5.RETINA_PREFIX.exec(t))==null?void 0:n[1])??"1"),format:e[e.length-2],src:t}}},loader:{name:"spritesheetLoader",id:"spritesheet",extension:{type:hn.LoadParser,priority:N5.Normal,name:"spritesheetLoader"},async testParse(t,e){return U1.extname(e.src).toLowerCase()===".json"&&!!t.frames},async parse(t,e,n){var x,y;const{texture:i,imageFilename:o,textureOptions:l,cachePrefix:d}=(e==null?void 0:e.data)??{};let f=U1.dirname(e.src);f&&f.lastIndexOf("/")!==f.length-1&&(f+="/");let h;if(i instanceof ur)h=i;else{const E=IV(f+(o??t.meta.image),e.src);h=(await n.load([{src:E,data:l}]))[E]}const p=new HV({texture:h.source,data:t,cachePrefix:d});await p.parse();const g=(x=t==null?void 0:t.meta)==null?void 0:x.related_multi_packs;if(Array.isArray(g)){const E=[];for(const T of g){if(typeof T!="string")continue;let D=f+T;(y=e.data)!=null&&y.ignoreMultiPack||(D=IV(D,e.src),E.push(n.load({src:D,data:{textureOptions:l,ignoreMultiPack:!0}})))}const N=await Promise.all(E);p.linkedSheets=N,N.forEach(T=>{T.linkedSheets=[p].concat(p.linkedSheets.filter(D=>D!==T))})}return p},async unload(t,e,n){await n.unload(t.textureSource._sourceOrigin),t.destroy(!1)}}};Zr.add(_I);const vC=Object.create(null),qV=Object.create(null);function ZR(t,e){let n=qV[t];return n===void 0&&(vC[e]===void 0&&(vC[e]=1),qV[t]=n=vC[e]++),n}let Ay;function R5(){return(!Ay||Ay!=null&&Ay.isContextLost())&&(Ay=ll.get().createCanvas().getContext("webgl",{})),Ay}let zS;function wI(){if(!zS){zS="mediump";const t=R5();t&&t.getShaderPrecisionFormat&&(zS=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision?"highp":"mediump")}return zS}function SI(t,e,n){return e?t:n?(t=t.replace("out vec4 finalColor;",""),`
|
|
@@ -320,7 +320,7 @@ Deprecated since v${t}`,l=typeof console.groupCollapsed=="function"&&!Hy.noColor
|
|
|
320
320
|
`}function NI(t,e,n){const i=n?e.maxSupportedFragmentPrecision:e.maxSupportedVertexPrecision;if(t.substring(0,9)!=="precision"){let o=n?e.requestedFragmentPrecision:e.requestedVertexPrecision;return o==="highp"&&i!=="highp"&&(o="mediump"),`precision ${o} float;
|
|
321
321
|
${t}`}else if(i!=="highp"&&t.substring(0,15)==="precision highp")return t.replace("precision highp","precision mediump");return t}function DI(t,e){return e?`#version 300 es
|
|
322
322
|
${t}`:t}const AI={},CI={};function TI(t,{name:e="pixi-program"},n=!0){e=e.replace(/\s+/g,"-"),e+=n?"-fragment":"-vertex";const i=n?AI:CI;return i[e]?(i[e]++,e+=`-${i[e]}`):i[e]=1,t.indexOf("#define SHADER_NAME")!==-1?t:`${`#define SHADER_NAME ${e}`}
|
|
323
|
-
${t}`}function RI(t,e){return e?t.replace("#version 300 es",""):t}const EC={stripVersion:RI,ensurePrecision:NI,addProgramDefines:SI,setProgramName:TI,insertVersion:DI},e1=Object.create(null),j5=class YT{constructor(e){e={...YT.defaultOptions,...e};const n=e.fragment.indexOf("#version 300 es")!==-1,i={stripVersion:n,ensurePrecision:{requestedFragmentPrecision:e.preferredFragmentPrecision,requestedVertexPrecision:e.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:wI()},setProgramName:{name:e.name},addProgramDefines:n,insertVersion:n};let o=e.fragment,l=e.vertex;Object.keys(EC).forEach(d=>{const f=i[d];o=EC[d](o,f,!0),l=EC[d](l,f,!1)}),this.fragment=o,this.vertex=l,this.transformFeedbackVaryings=e.transformFeedbackVaryings,this._key=ZR(`${this.vertex}:${this.fragment}`,"gl-program")}destroy(){this.fragment=null,this.vertex=null,this._attributeData=null,this._uniformData=null,this._uniformBlockData=null,this.transformFeedbackVaryings=null,e1[this._cacheKey]=null}static from(e){const n=`${e.vertex}:${e.fragment}`;return e1[n]||(e1[n]=new YT(e),e1[n]._cacheKey=n),e1[n]}};j5.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};let JR=j5;const FV={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}};function jI(t){return FV[t]??FV.float32}const kI={f32:"float32","vec2<f32>":"float32x2","vec3<f32>":"float32x3","vec4<f32>":"float32x4",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",i32:"sint32","vec2<i32>":"sint32x2","vec3<i32>":"sint32x3","vec4<i32>":"sint32x4",vec2i:"sint32x2",vec3i:"sint32x3",vec4i:"sint32x4",u32:"uint32","vec2<u32>":"uint32x2","vec3<u32>":"uint32x3","vec4<u32>":"uint32x4",vec2u:"uint32x2",vec3u:"uint32x3",vec4u:"uint32x4",bool:"uint32","vec2<bool>":"uint32x2","vec3<bool>":"uint32x3","vec4<bool>":"uint32x4"},GV=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|\)|$)/g;function YV(t,e){let n;for(;(n=GV.exec(t))!==null;){const i=kI[n[3]]??"float32";e[n[2]]={location:parseInt(n[1],10),format:i,stride:jI(i).stride,offset:0,instance:!1,start:0}}GV.lastIndex=0}function MI(t){return t.replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"")}function VI({source:t,entryPoint:e}){const n={},i=MI(t),o=i.indexOf(`fn ${e}(`);if(o===-1)return n;const l=i.indexOf("->",o);if(l===-1)return n;const d=i.substring(o,l);if(YV(d,n),Object.keys(n).length===0){const f=d.match(/\(\s*\w+\s*:\s*(\w+)/);if(f){const h=f[1],p=new RegExp(`struct\\s+${h}\\s*\\{([^}]+)\\}`,"s"),g=i.match(p);g&&YV(g[1],n)}}return n}function _C(t){var x,y;const e=/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g,n=/@group\((\d+)\)/,i=/@binding\((\d+)\)/,o=/var(<[^>]+>)? (\w+)/,l=/:\s*([\w<>]+)/,d=/struct\s+(\w+)\s*{([^}]+)}/g,f=/(\w+)\s*:\s*([\w\<\>]+)/g,h=/struct\s+(\w+)/,p=(x=t.match(e))==null?void 0:x.map(E=>({group:parseInt(E.match(n)[1],10),binding:parseInt(E.match(i)[1],10),name:E.match(o)[2],isUniform:E.match(o)[1]==="<uniform>",type:E.match(l)[1]}));if(!p)return{groups:[],structs:[]};const g=((y=t.match(d))==null?void 0:y.map(E=>{const N=E.match(h)[1],T=E.match(f).reduce((D,A)=>{const[M,j]=A.split(":");return D[M.trim()]=j.trim(),D},{});return T?{name:N,members:T}:null}).filter(({name:E})=>p.some(N=>N.type===E||N.type.includes(`<${E}>`))))??[];return{groups:p,structs:g}}var qg=(t=>(t[t.VERTEX=1]="VERTEX",t[t.FRAGMENT=2]="FRAGMENT",t[t.COMPUTE=4]="COMPUTE",t))(qg||{});function UI({groups:t}){const e=[];for(let n=0;n<t.length;n++){const i=t[n];e[i.group]||(e[i.group]=[]),i.isUniform?e[i.group].push({binding:i.binding,visibility:qg.VERTEX|qg.FRAGMENT,buffer:{type:"uniform"}}):i.type==="sampler"?e[i.group].push({binding:i.binding,visibility:qg.FRAGMENT,sampler:{type:"filtering"}}):i.type==="texture_2d"||i.type.startsWith("texture_2d<")?e[i.group].push({binding:i.binding,visibility:qg.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}}):i.type==="texture_2d_array"||i.type.startsWith("texture_2d_array<")?e[i.group].push({binding:i.binding,visibility:qg.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d-array",multisampled:!1}}):(i.type==="texture_cube"||i.type.startsWith("texture_cube<"))&&e[i.group].push({binding:i.binding,visibility:qg.FRAGMENT,texture:{sampleType:"float",viewDimension:"cube",multisampled:!1}})}for(let n=0;n<e.length;n++)e[n]||(e[n]=[]);return e}function PI({groups:t}){const e=[];for(let n=0;n<t.length;n++){const i=t[n];e[i.group]||(e[i.group]={}),e[i.group][i.name]=i.binding}return e}function OI(t,e){const n=new Set,i=new Set,o=[...t.structs,...e.structs].filter(d=>n.has(d.name)?!1:(n.add(d.name),!0)),l=[...t.groups,...e.groups].filter(d=>{const f=`${d.name}-${d.binding}`;return i.has(f)?!1:(i.add(f),!0)});return{structs:o,groups:l}}const t1=Object.create(null);class n_{constructor(e){var f,h;this._layoutKey=0,this._attributeLocationsKey=0;const{fragment:n,vertex:i,layout:o,gpuLayout:l,name:d}=e;if(this.name=d,this.fragment=n,this.vertex=i,n.source===i.source){const p=_C(n.source);this.structsAndGroups=p}else{const p=_C(i.source),g=_C(n.source);this.structsAndGroups=OI(p,g)}this.layout=o??PI(this.structsAndGroups),this.gpuLayout=l??UI(this.structsAndGroups),this.autoAssignGlobalUniforms=((f=this.layout[0])==null?void 0:f.globalUniforms)!==void 0,this.autoAssignLocalUniforms=((h=this.layout[1])==null?void 0:h.localUniforms)!==void 0,this._generateProgramKey()}_generateProgramKey(){const{vertex:e,fragment:n}=this,i=e.source+n.source+e.entryPoint+n.entryPoint;this._layoutKey=ZR(i,"program")}get attributeData(){return this._attributeData??(this._attributeData=VI(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null,t1[this._cacheKey]=null}static from(e){const n=`${e.vertex.source}:${e.fragment.source}:${e.fragment.entryPoint}:${e.vertex.entryPoint}`;return t1[n]||(t1[n]=new n_(e),t1[n]._cacheKey=n),t1[n]}}const k5=["f32","i32","vec2<f32>","vec3<f32>","vec4<f32>","mat2x2<f32>","mat3x3<f32>","mat4x4<f32>","mat3x2<f32>","mat4x2<f32>","mat2x3<f32>","mat4x3<f32>","mat2x4<f32>","mat3x4<f32>","vec2<i32>","vec3<i32>","vec4<i32>"],zI=k5.reduce((t,e)=>(t[e]=!0,t),{});function BI(t,e){switch(t){case"f32":return 0;case"vec2<f32>":return new Float32Array(2*e);case"vec3<f32>":return new Float32Array(3*e);case"vec4<f32>":return new Float32Array(4*e);case"mat2x2<f32>":return new Float32Array([1,0,0,1]);case"mat3x3<f32>":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4x4<f32>":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const M5=class V5{constructor(e,n){this._touched=0,this.uid=gi("uniform"),this._resourceType="uniformGroup",this._resourceId=gi("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,n={...V5.defaultOptions,...n},this.uniformStructures=e;const i={};for(const o in e){const l=e[o];if(l.name=o,l.size=l.size??1,!zI[l.type]){const d=l.type.match(/^array<(\w+(?:<\w+>)?),\s*(\d+)>$/);if(d){const[,f,h]=d;throw new Error(`Uniform type ${l.type} is not supported. Use type: '${f}', size: ${h} instead.`)}throw new Error(`Uniform type ${l.type} is not supported. Supported uniform types are: ${k5.join(", ")}`)}l.value??(l.value=BI(l.type,l.size)),i[o]=l.value}this.uniforms=i,this._dirtyId=1,this.ubo=n.ubo,this.isStatic=n.isStatic,this._signature=ZR(Object.keys(i).map(o=>`${o}-${e[o].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};M5.defaultOptions={ubo:!1,isStatic:!1};let U5=M5;class vN{constructor(e){this.resources=Object.create(null),this._dirty=!0;let n=0;for(const i in e){const o=e[i];this.setResource(o,n++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;const e=[];let n=0;for(const i in this.resources)e[n++]=this.resources[i]._resourceId;this._key=e.join("|")}setResource(e,n){var o,l;const i=this.resources[n];e!==i&&((o=i==null?void 0:i.off)==null||o.call(i,"change",this.onResourceChange,this),(l=e.on)==null||l.call(e,"change",this.onResourceChange,this),this.resources[n]=e,this._dirty=!0)}getResource(e){return this.resources[e]}_touch(e,n){const i=this.resources;for(const o in i)i[o]._gcLastUsed=e,i[o]._touched=n}destroy(){var n;const e=this.resources;for(const i in e){const o=e[i];(n=o==null?void 0:o.off)==null||n.call(o,"change",this.onResourceChange,this)}this.resources=null}onResourceChange(e){this._dirty=!0,e.destroyed?this.destroy():this._updateKey()}}var $T=(t=>(t[t.WEBGL=1]="WEBGL",t[t.WEBGPU=2]="WEBGPU",t[t.CANVAS=4]="CANVAS",t[t.BOTH=3]="BOTH",t))($T||{});class sD extends pd{constructor(e){super(),this.uid=gi("shader"),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[],this._destroyed=!1;let{gpuProgram:n,glProgram:i,groups:o,resources:l,compatibleRenderers:d,groupMap:f}=e;this.gpuProgram=n,this.glProgram=i,d===void 0&&(d=0,n&&(d|=$T.WEBGPU),i&&(d|=$T.WEBGL)),this.compatibleRenderers=d;const h={};if(!l&&!o&&(l={}),l&&o)throw new Error("[Shader] Cannot have both resources and groups");if(!n&&o&&!f)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!n&&o&&f)for(const p in f)for(const g in f[p]){const x=f[p][g];h[x]={group:p,binding:g,name:x}}else if(n&&o&&!f){const p=n.structsAndGroups.groups;f={},p.forEach(g=>{f[g.group]=f[g.group]||{},f[g.group][g.binding]=g.name,h[g.name]=g})}else if(l){o={},f={},n&&n.structsAndGroups.groups.forEach(x=>{f[x.group]=f[x.group]||{},f[x.group][x.binding]=x.name,h[x.name]=x});let p=0;for(const g in l)h[g]||(o[99]||(o[99]=new vN,this._ownedBindGroups.push(o[99])),h[g]={group:99,binding:p,name:g},f[99]=f[99]||{},f[99][p]=g,p++);for(const g in l){const x=g;let y=l[g];!y.source&&!y._resourceType&&(y=new U5(y));const E=h[x];E&&(o[E.group]||(o[E.group]=new vN,this._ownedBindGroups.push(o[E.group])),o[E.group].setResource(y,E.binding))}}this.groups=o,this._uniformBindMap=f,this.resources=this._buildResourceAccessor(o,h)}addResource(e,n,i){var o,l;(o=this._uniformBindMap)[n]||(o[n]={}),(l=this._uniformBindMap[n])[i]||(l[i]=e),this.groups[n]||(this.groups[n]=new vN,this._ownedBindGroups.push(this.groups[n]))}_buildResourceAccessor(e,n){const i={};for(const o in n){const l=n[o];Object.defineProperty(i,l.name,{get(){return e[l.group].getResource(l.binding)},set(d){e[l.group].setResource(d,l.binding)}})}return i}destroy(e=!1){var n,i;this._destroyed||(this._destroyed=!0,this.emit("destroy",this),e&&((n=this.gpuProgram)==null||n.destroy(),(i=this.glProgram)==null||i.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(o=>{o.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null)}static from(e){const{gpu:n,gl:i,...o}=e;let l,d;return n&&(l=n_.from(n)),i&&(d=JR.from(i)),new sD({gpuProgram:l,glProgram:d,...o})}}const LI={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8,min:9,max:10},wC=0,SC=1,NC=2,DC=3,AC=4,CC=5,XT=class P5{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<wC)}set blend(e){!!(this.data&1<<wC)!==e&&(this.data^=1<<wC)}get offsets(){return!!(this.data&1<<SC)}set offsets(e){!!(this.data&1<<SC)!==e&&(this.data^=1<<SC)}set cullMode(e){if(e==="none"){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace=e==="front"}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(this.data&1<<NC)}set culling(e){!!(this.data&1<<NC)!==e&&(this.data^=1<<NC)}get depthTest(){return!!(this.data&1<<DC)}set depthTest(e){!!(this.data&1<<DC)!==e&&(this.data^=1<<DC)}get depthMask(){return!!(this.data&1<<CC)}set depthMask(e){!!(this.data&1<<CC)!==e&&(this.data^=1<<CC)}get clockwiseFrontFace(){return!!(this.data&1<<AC)}set clockwiseFrontFace(e){!!(this.data&1<<AC)!==e&&(this.data^=1<<AC)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!=="none",this._blendMode=e,this._blendModeId=LI[e]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const e=new P5;return e.depthTest=!1,e.blend=!0,e}};XT.default2d=XT.for2d();let ej=XT;const O5=class KT extends sD{constructor(e){e={...KT.defaultOptions,...e},super(e),this.enabled=!0,this._state=ej.for2d(),this.blendMode=e.blendMode,this.padding=e.padding,typeof e.antialias=="boolean"?this.antialias=e.antialias?"on":"off":this.antialias=e.antialias,this.resolution=e.resolution,this.blendRequired=e.blendRequired,this.clipToViewport=e.clipToViewport,this.addResource("uTexture",0,1),e.blendRequired&&this.addResource("uBackTexture",0,3)}apply(e,n,i,o){e.applyFilter(this,n,i,o)}get blendMode(){return this._state.blendMode}set blendMode(e){this._state.blendMode=e}static from(e){const{gpu:n,gl:i,...o}=e;let l,d;return n&&(l=n_.from(n)),i&&(d=JR.from(i)),new KT({gpuProgram:l,glProgram:d,...o})}};O5.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};let sb=O5;const WT=[];Zr.handleByNamedList(hn.Environment,WT);async function II(t){if(!t)for(let e=0;e<WT.length;e++){const n=WT[e];if(n.value.test()){await n.value.load();return}}}let n1;function HI(){if(typeof n1=="boolean")return n1;try{n1=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{n1=!1}return n1}function $V(t,e,n=2){const i=e&&e.length,o=i?e[0]*n:t.length;let l=z5(t,0,o,n,!0);const d=[];if(!l||l.next===l.prev)return d;let f,h,p;if(i&&(l=$I(t,e,l,n)),t.length>80*n){f=t[0],h=t[1];let g=f,x=h;for(let y=n;y<o;y+=n){const E=t[y],N=t[y+1];E<f&&(f=E),N<h&&(h=N),E>g&&(g=E),N>x&&(x=N)}p=Math.max(g-f,x-h),p=p!==0?32767/p:0}return P1(l,d,n,f,h,p,0),d}function z5(t,e,n,i,o){let l;if(o===i9(t,e,n,i)>0)for(let d=e;d<n;d+=i)l=XV(d/i|0,t[d],t[d+1],l);else for(let d=n-i;d>=e;d-=i)l=XV(d/i|0,t[d],t[d+1],l);return l&&rv(l,l.next)&&(z1(l),l=l.next),l}function Zg(t,e){if(!t)return t;e||(e=t);let n=t,i;do if(i=!1,!n.steiner&&(rv(n,n.next)||Qr(n.prev,n,n.next)===0)){if(z1(n),n=e=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==e);return e}function P1(t,e,n,i,o,l,d){if(!t)return;!d&&l&&ZI(t,i,o,l);let f=t;for(;t.prev!==t.next;){const h=t.prev,p=t.next;if(l?FI(t,i,o,l):qI(t)){e.push(h.i,t.i,p.i),z1(t),t=p.next,f=p.next;continue}if(t=p,t===f){d?d===1?(t=GI(Zg(t),e),P1(t,e,n,i,o,l,2)):d===2&&YI(t,e,n,i,o,l):P1(Zg(t),e,n,i,o,l,1);break}}}function qI(t){const e=t.prev,n=t,i=t.next;if(Qr(e,n,i)>=0)return!1;const o=e.x,l=n.x,d=i.x,f=e.y,h=n.y,p=i.y,g=Math.min(o,l,d),x=Math.min(f,h,p),y=Math.max(o,l,d),E=Math.max(f,h,p);let N=i.next;for(;N!==e;){if(N.x>=g&&N.x<=y&&N.y>=x&&N.y<=E&&y1(o,f,l,h,d,p,N.x,N.y)&&Qr(N.prev,N,N.next)>=0)return!1;N=N.next}return!0}function FI(t,e,n,i){const o=t.prev,l=t,d=t.next;if(Qr(o,l,d)>=0)return!1;const f=o.x,h=l.x,p=d.x,g=o.y,x=l.y,y=d.y,E=Math.min(f,h,p),N=Math.min(g,x,y),T=Math.max(f,h,p),D=Math.max(g,x,y),A=QT(E,N,e,n,i),M=QT(T,D,e,n,i);let j=t.prevZ,U=t.nextZ;for(;j&&j.z>=A&&U&&U.z<=M;){if(j.x>=E&&j.x<=T&&j.y>=N&&j.y<=D&&j!==o&&j!==d&&y1(f,g,h,x,p,y,j.x,j.y)&&Qr(j.prev,j,j.next)>=0||(j=j.prevZ,U.x>=E&&U.x<=T&&U.y>=N&&U.y<=D&&U!==o&&U!==d&&y1(f,g,h,x,p,y,U.x,U.y)&&Qr(U.prev,U,U.next)>=0))return!1;U=U.nextZ}for(;j&&j.z>=A;){if(j.x>=E&&j.x<=T&&j.y>=N&&j.y<=D&&j!==o&&j!==d&&y1(f,g,h,x,p,y,j.x,j.y)&&Qr(j.prev,j,j.next)>=0)return!1;j=j.prevZ}for(;U&&U.z<=M;){if(U.x>=E&&U.x<=T&&U.y>=N&&U.y<=D&&U!==o&&U!==d&&y1(f,g,h,x,p,y,U.x,U.y)&&Qr(U.prev,U,U.next)>=0)return!1;U=U.nextZ}return!0}function GI(t,e){let n=t;do{const i=n.prev,o=n.next.next;!rv(i,o)&&L5(i,n,n.next,o)&&O1(i,o)&&O1(o,i)&&(e.push(i.i,n.i,o.i),z1(n),z1(n.next),n=t=o),n=n.next}while(n!==t);return Zg(n)}function YI(t,e,n,i,o,l){let d=t;do{let f=d.next.next;for(;f!==d.prev;){if(d.i!==f.i&&t9(d,f)){let h=I5(d,f);d=Zg(d,d.next),h=Zg(h,h.next),P1(d,e,n,i,o,l,0),P1(h,e,n,i,o,l,0);return}f=f.next}d=d.next}while(d!==t)}function $I(t,e,n,i){const o=[];for(let l=0,d=e.length;l<d;l++){const f=e[l]*i,h=l<d-1?e[l+1]*i:t.length,p=z5(t,f,h,i,!1);p===p.next&&(p.steiner=!0),o.push(e9(p))}o.sort(XI);for(let l=0;l<o.length;l++)n=KI(o[l],n);return n}function XI(t,e){let n=t.x-e.x;if(n===0&&(n=t.y-e.y,n===0)){const i=(t.next.y-t.y)/(t.next.x-t.x),o=(e.next.y-e.y)/(e.next.x-e.x);n=i-o}return n}function KI(t,e){const n=WI(t,e);if(!n)return e;const i=I5(n,t);return Zg(i,i.next),Zg(n,n.next)}function WI(t,e){let n=e;const i=t.x,o=t.y;let l=-1/0,d;if(rv(t,n))return n;do{if(rv(t,n.next))return n.next;if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){const x=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(x<=i&&x>l&&(l=x,d=n.x<n.next.x?n:n.next,x===i))return d}n=n.next}while(n!==e);if(!d)return null;const f=d,h=d.x,p=d.y;let g=1/0;n=d;do{if(i>=n.x&&n.x>=h&&i!==n.x&&B5(o<p?i:l,o,h,p,o<p?l:i,o,n.x,n.y)){const x=Math.abs(o-n.y)/(i-n.x);O1(n,t)&&(x<g||x===g&&(n.x>d.x||n.x===d.x&&QI(d,n)))&&(d=n,g=x)}n=n.next}while(n!==f);return d}function QI(t,e){return Qr(t.prev,t,e.prev)<0&&Qr(e.next,t,t.next)<0}function ZI(t,e,n,i){let o=t;do o.z===0&&(o.z=QT(o.x,o.y,e,n,i)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next;while(o!==t);o.prevZ.nextZ=null,o.prevZ=null,JI(o)}function JI(t){let e,n=1;do{let i=t,o;t=null;let l=null;for(e=0;i;){e++;let d=i,f=0;for(let p=0;p<n&&(f++,d=d.nextZ,!!d);p++);let h=n;for(;f>0||h>0&&d;)f!==0&&(h===0||!d||i.z<=d.z)?(o=i,i=i.nextZ,f--):(o=d,d=d.nextZ,h--),l?l.nextZ=o:t=o,o.prevZ=l,l=o;i=d}l.nextZ=null,n*=2}while(e>1);return t}function QT(t,e,n,i,o){return t=(t-n)*o|0,e=(e-i)*o|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function e9(t){let e=t,n=t;do(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next;while(e!==t);return n}function B5(t,e,n,i,o,l,d,f){return(o-d)*(e-f)>=(t-d)*(l-f)&&(t-d)*(i-f)>=(n-d)*(e-f)&&(n-d)*(l-f)>=(o-d)*(i-f)}function y1(t,e,n,i,o,l,d,f){return!(t===d&&e===f)&&B5(t,e,n,i,o,l,d,f)}function t9(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!n9(t,e)&&(O1(t,e)&&O1(e,t)&&r9(t,e)&&(Qr(t.prev,t,e.prev)||Qr(t,e.prev,e))||rv(t,e)&&Qr(t.prev,t,t.next)>0&&Qr(e.prev,e,e.next)>0)}function Qr(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function rv(t,e){return t.x===e.x&&t.y===e.y}function L5(t,e,n,i){const o=LS(Qr(t,e,n)),l=LS(Qr(t,e,i)),d=LS(Qr(n,i,t)),f=LS(Qr(n,i,e));return!!(o!==l&&d!==f||o===0&&BS(t,n,e)||l===0&&BS(t,i,e)||d===0&&BS(n,t,i)||f===0&&BS(n,e,i))}function BS(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function LS(t){return t>0?1:t<0?-1:0}function n9(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&L5(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function O1(t,e){return Qr(t.prev,t,t.next)<0?Qr(t,e,t.next)>=0&&Qr(t,t.prev,e)>=0:Qr(t,e,t.prev)<0||Qr(t,t.next,e)<0}function r9(t,e){let n=t,i=!1;const o=(t.x+e.x)/2,l=(t.y+e.y)/2;do n.y>l!=n.next.y>l&&n.next.y!==n.y&&o<(n.next.x-n.x)*(l-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==t);return i}function I5(t,e){const n=ZT(t.i,t.x,t.y),i=ZT(e.i,e.x,e.y),o=t.next,l=e.prev;return t.next=e,e.prev=t,n.next=o,o.prev=n,i.next=n,n.prev=i,l.next=i,i.prev=l,i}function XV(t,e,n,i){const o=ZT(t,e,n);return i?(o.next=i.next,o.prev=i,i.next.prev=o,i.next=o):(o.prev=o,o.next=o),o}function z1(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function ZT(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function i9(t,e,n,i){let o=0;for(let l=e,d=n-i;l<n;l+=i)o+=(t[d]-t[l])*(t[l+1]+t[d+1]),d=l;return o}const s9=$V.default||$V;var H5=(t=>(t[t.NONE=0]="NONE",t[t.COLOR=16384]="COLOR",t[t.STENCIL=1024]="STENCIL",t[t.DEPTH=256]="DEPTH",t[t.COLOR_DEPTH=16640]="COLOR_DEPTH",t[t.COLOR_STENCIL=17408]="COLOR_STENCIL",t[t.DEPTH_STENCIL=1280]="DEPTH_STENCIL",t[t.ALL=17664]="ALL",t))(H5||{});class o9{constructor(e){this.items=[],this._name=e}emit(e,n,i,o,l,d,f,h){const{name:p,items:g}=this;for(let x=0,y=g.length;x<y;x++)g[x][p](e,n,i,o,l,d,f,h);return this}add(e){return e[this._name]&&(this.remove(e),this.items.push(e)),this}remove(e){const n=this.items.indexOf(e);return n!==-1&&this.items.splice(n,1),this}contains(e){return this.items.indexOf(e)!==-1}removeAll(){return this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}const a9=["init","destroy","contextChange","resolutionChange","resetState","renderEnd","renderStart","render","update","postrender","prerender"],q5=class F5 extends pd{constructor(e){super(),this.tick=0,this.uid=gi("renderer"),this.runners=Object.create(null),this.renderPipes=Object.create(null),this._initOptions={},this._systemsHash=Object.create(null),this.type=e.type,this.name=e.name,this.config=e;const n=[...a9,...this.config.runners??[]];this._addRunners(...n),this._unsafeEvalCheck()}async init(e={}){const n=e.skipExtensionImports===!0?!0:e.manageImports===!1;await II(n),this._addSystems(this.config.systems),this._addPipes(this.config.renderPipes,this.config.renderPipeAdaptors);for(const i in this._systemsHash)e={...this._systemsHash[i].constructor.defaultOptions,...e};e={...F5.defaultOptions,...e},this._roundPixels=e.roundPixels?1:0;for(let i=0;i<this.runners.init.items.length;i++)await this.runners.init.items[i].init(e);this._initOptions=e}render(e,n){this.tick++;let i=e;if(i instanceof Ps&&(i={container:i},n&&(Bn(pi,"passing a second argument is deprecated, please use render options instead"),i.target=n.renderTexture)),i.target||(i.target=this.view.renderTarget),i.target===this.view.renderTarget&&(this._lastObjectRendered=i.container,i.clearColor??(i.clearColor=this.background.colorRgba),i.clear??(i.clear=this.background.clearBeforeRender)),i.clearColor){const o=Array.isArray(i.clearColor)&&i.clearColor.length===4;i.clearColor=o?i.clearColor:es.shared.setValue(i.clearColor).toArray()}i.transform||(i.container.updateLocalTransform(),i.transform=i.container.localTransform),i.container.visible&&(i.container.enableRenderGroup(),this.runners.prerender.emit(i),this.runners.renderStart.emit(i),this.runners.render.emit(i),this.runners.renderEnd.emit(i),this.runners.postrender.emit(i))}resize(e,n,i){const o=this.view.resolution;this.view.resize(e,n,i),this.emit("resize",this.view.screen.width,this.view.screen.height,this.view.resolution),i!==void 0&&i!==o&&this.runners.resolutionChange.emit(i)}clear(e={}){const n=this;e.target||(e.target=n.renderTarget.renderTarget),e.clearColor||(e.clearColor=this.background.colorRgba),e.clear??(e.clear=H5.ALL);const{clear:i,clearColor:o,target:l,mipLevel:d,layer:f}=e;es.shared.setValue(o??this.background.colorRgba),n.renderTarget.clear(l,i,es.shared.toArray(),d??0,f??0)}get resolution(){return this.view.resolution}set resolution(e){this.view.resolution=e,this.runners.resolutionChange.emit(e)}get width(){return this.view.texture.frame.width}get height(){return this.view.texture.frame.height}get canvas(){return this.view.canvas}get lastObjectRendered(){return this._lastObjectRendered}get renderingToScreen(){return this.renderTarget.renderingToScreen}get screen(){return this.view.screen}_addRunners(...e){e.forEach(n=>{this.runners[n]=new o9(n)})}_addSystems(e){let n;for(n in e){const i=e[n];this._addSystem(i.value,i.name)}}_addSystem(e,n){const i=new e(this);if(this[n])throw new Error(`Whoops! The name "${n}" is already in use`);this[n]=i,this._systemsHash[n]=i;for(const o in this.runners)this.runners[o].add(i);return this}_addPipes(e,n){const i=n.reduce((o,l)=>(o[l.name]=l.value,o),{});e.forEach(o=>{const l=o.value,d=o.name,f=i[d];this.renderPipes[d]=new l(this,f?new f:null),this.runners.destroy.add(this.renderPipes[d])})}destroy(e=!1){this.runners.destroy.items.reverse(),this.runners.destroy.emit(e),(e===!0||typeof e=="object"&&e.releaseGlobalResources)&&t_.release(),Object.values(this.runners).forEach(n=>{n.destroy()}),this._systemsHash=null,this.renderPipes=null,this.removeAllListeners()}generateTexture(e){return this.textureGenerator.generateTexture(e)}get roundPixels(){return!!this._roundPixels}_unsafeEvalCheck(){if(!HI())throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}resetState(){this.runners.resetState.emit()}};q5.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};let G5=q5,IS;function l9(t){return IS!==void 0||(IS=(()=>{var n;const e={stencil:!0,failIfMajorPerformanceCaveat:t??G5.defaultOptions.failIfMajorPerformanceCaveat};try{if(!ll.get().getWebGLRenderingContext())return!1;let o=ll.get().createCanvas().getContext("webgl",e);const l=!!((n=o==null?void 0:o.getContextAttributes())!=null&&n.stencil);if(o){const d=o.getExtension("WEBGL_lose_context");d&&d.loseContext()}return o=null,l}catch{return!1}})()),IS}let HS;async function u9(t={}){return HS!==void 0||(HS=await(async()=>{const e=ll.get().getNavigator().gpu;if(!e)return!1;try{return await(await e.requestAdapter(t)).requestDevice(),!0}catch{return!1}})()),HS}const KV=["webgl","webgpu","canvas"];async function c9(t){let e=[];t.preference?(e.push(t.preference),KV.forEach(l=>{l!==t.preference&&e.push(l)})):e=KV.slice();let n,i={};for(let l=0;l<e.length;l++){const d=e[l];if(d==="webgpu"&&await u9()){const{WebGPURenderer:f}=await Gf(async()=>{const{WebGPURenderer:h}=await import("./WebGPURenderer-KbvRWq3V.js");return{WebGPURenderer:h}},__vite__mapDeps([4,5,6]));n=f,i={...t,...t.webgpu};break}else if(d==="webgl"&&l9(t.failIfMajorPerformanceCaveat??G5.defaultOptions.failIfMajorPerformanceCaveat)){const{WebGLRenderer:f}=await Gf(async()=>{const{WebGLRenderer:h}=await import("./WebGLRenderer-D9cKbOni.js");return{WebGLRenderer:h}},__vite__mapDeps([7,5,6]));n=f,i={...t,...t.webgl};break}else if(d==="canvas"){const{CanvasRenderer:f}=await Gf(async()=>{const{CanvasRenderer:h}=await import("./CanvasRenderer-BakjfL_q.js");return{CanvasRenderer:h}},__vite__mapDeps([8,6]));n=f,i={...t,...t.canvasOptions};break}}if(delete i.webgpu,delete i.webgl,delete i.canvasOptions,!n)throw new Error("No available renderer for the current environment");const o=new n;return await o.init(i),o}const Y5="8.17.0";class $5{static init(){var e;(e=globalThis.__PIXI_APP_INIT__)==null||e.call(globalThis,this,Y5)}static destroy(){}}$5.extension=hn.Application;class d9{constructor(e){this._renderer=e}init(){var e;(e=globalThis.__PIXI_RENDERER_INIT__)==null||e.call(globalThis,this._renderer,Y5)}destroy(){this._renderer=null}}d9.extension={type:[hn.WebGLSystem,hn.WebGPUSystem],name:"initHook",priority:-10};class X5{static init(e){Object.defineProperty(this,"resizeTo",{configurable:!0,set(n){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=n,n&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let n,i;if(this._resizeTo===globalThis.window)n=globalThis.innerWidth,i=globalThis.innerHeight;else{const{clientWidth:o,clientHeight:l}=this._resizeTo;n=o,i=l}this.renderer.resize(n,i),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}X5.extension=hn.Application;class K5{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{configurable:!0,set(n){this._ticker&&this._ticker.remove(this.render,this),this._ticker=n,n&&n.add(this.render,this,jN.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?qy.shared:new qy,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}K5.extension=hn.Application;Zr.add(X5);Zr.add(K5);const W5=class JT{constructor(...e){this.stage=new Ps,e[0]!==void 0&&Bn(pi,"Application constructor options are deprecated, please use Application.init() instead.")}async init(e){e={...e},this.stage||(this.stage=new Ps),this.renderer=await c9(e),JT._plugins.forEach(n=>{n.init.call(this,e)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return Bn(pi,"Application.view is deprecated, please use Application.canvas instead."),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(e=!1,n=!1){const i=JT._plugins.slice(0);i.reverse(),i.forEach(o=>{o.destroy.call(this)}),this.stage.destroy(n),this.stage=null,this.renderer.destroy(e),this.renderer=null}};W5._plugins=[];let tj=W5;Zr.handleByList(hn.Application,tj._plugins);Zr.add($5);var TC,WV;function f9(){if(WV)return TC;WV=1,TC=n;var t={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function n(l){var d=[];return l.replace(e,function(f,h,p){var g=h.toLowerCase();for(p=o(p),g=="m"&&p.length>2&&(d.push([h].concat(p.splice(0,2))),g="l",h=h=="m"?"l":"L");;){if(p.length==t[g])return p.unshift(h),d.push(p);if(p.length<t[g])throw new Error("malformed path data");d.push([h].concat(p.splice(0,t[g])))}}),d}var i=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function o(l){var d=l.match(i);return d?d.map(Number):[]}return TC}var h9=f9();const m9=Qf(h9);function p9(t,e){const n=m9(t),i=[];let o=null,l=0,d=0;for(let f=0;f<n.length;f++){const h=n[f],p=h[0],g=h;switch(p){case"M":l=g[1],d=g[2],e.moveTo(l,d);break;case"m":l+=g[1],d+=g[2],e.moveTo(l,d);break;case"H":l=g[1],e.lineTo(l,d);break;case"h":l+=g[1],e.lineTo(l,d);break;case"V":d=g[1],e.lineTo(l,d);break;case"v":d+=g[1],e.lineTo(l,d);break;case"L":l=g[1],d=g[2],e.lineTo(l,d);break;case"l":l+=g[1],d+=g[2],e.lineTo(l,d);break;case"C":l=g[5],d=g[6],e.bezierCurveTo(g[1],g[2],g[3],g[4],l,d);break;case"c":e.bezierCurveTo(l+g[1],d+g[2],l+g[3],d+g[4],l+g[5],d+g[6]),l+=g[5],d+=g[6];break;case"S":l=g[3],d=g[4],e.bezierCurveToShort(g[1],g[2],l,d);break;case"s":e.bezierCurveToShort(l+g[1],d+g[2],l+g[3],d+g[4]),l+=g[3],d+=g[4];break;case"Q":l=g[3],d=g[4],e.quadraticCurveTo(g[1],g[2],l,d);break;case"q":e.quadraticCurveTo(l+g[1],d+g[2],l+g[3],d+g[4]),l+=g[3],d+=g[4];break;case"T":l=g[1],d=g[2],e.quadraticCurveToShort(l,d);break;case"t":l+=g[1],d+=g[2],e.quadraticCurveToShort(l,d);break;case"A":l=g[6],d=g[7],e.arcToSvg(g[1],g[2],g[3],g[4],g[5],l,d);break;case"a":l+=g[6],d+=g[7],e.arcToSvg(g[1],g[2],g[3],g[4],g[5],l,d);break;case"Z":case"z":e.closePath(),i.length>0&&(o=i.pop(),o?(l=o.startX,d=o.startY):(l=0,d=0)),o=null;break;default:Ho(`Unknown SVG path command: ${p}`)}p!=="Z"&&p!=="z"&&o===null&&(o={startX:l,startY:d},i.push(o))}return e}class nj{constructor(e=0,n=0,i=0){this.type="circle",this.x=e,this.y=n,this.radius=i}clone(){return new nj(this.x,this.y,this.radius)}contains(e,n){if(this.radius<=0)return!1;const i=this.radius*this.radius;let o=this.x-e,l=this.y-n;return o*=o,l*=l,o+l<=i}strokeContains(e,n,i,o=.5){if(this.radius===0)return!1;const l=this.x-e,d=this.y-n,f=this.radius,h=(1-o)*i,p=Math.sqrt(l*l+d*d);return p<=f+h&&p>f-(i-h)}getBounds(e){return e||(e=new _i),e.x=this.x-this.radius,e.y=this.y-this.radius,e.width=this.radius*2,e.height=this.radius*2,e}copyFrom(e){return this.x=e.x,this.y=e.y,this.radius=e.radius,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}class rj{constructor(e=0,n=0,i=0,o=0){this.type="ellipse",this.x=e,this.y=n,this.halfWidth=i,this.halfHeight=o}clone(){return new rj(this.x,this.y,this.halfWidth,this.halfHeight)}contains(e,n){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let i=(e-this.x)/this.halfWidth,o=(n-this.y)/this.halfHeight;return i*=i,o*=o,i+o<=1}strokeContains(e,n,i,o=.5){const{halfWidth:l,halfHeight:d}=this;if(l<=0||d<=0)return!1;const f=i*(1-o),h=i-f,p=l-h,g=d-h,x=l+f,y=d+f,E=e-this.x,N=n-this.y,T=E*E/(p*p)+N*N/(g*g),D=E*E/(x*x)+N*N/(y*y);return T>1&&D<=1}getBounds(e){return e||(e=new _i),e.x=this.x-this.halfWidth,e.y=this.y-this.halfHeight,e.width=this.halfWidth*2,e.height=this.halfHeight*2,e}copyFrom(e){return this.x=e.x,this.y=e.y,this.halfWidth=e.halfWidth,this.halfHeight=e.halfHeight,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`}}function g9(t,e,n,i,o,l){const d=t-n,f=e-i,h=o-n,p=l-i,g=d*h+f*p,x=h*h+p*p;let y=-1;x!==0&&(y=g/x);let E,N;y<0?(E=n,N=i):y>1?(E=o,N=l):(E=n+y*h,N=i+y*p);const T=t-E,D=e-N;return T*T+D*D}let b9,x9;class D1{constructor(...e){this.type="polygon";let n=Array.isArray(e[0])?e[0]:e;if(typeof n[0]!="number"){const i=[];for(let o=0,l=n.length;o<l;o++)i.push(n[o].x,n[o].y);n=i}this.points=n,this.closePath=!0}isClockwise(){let e=0;const n=this.points,i=n.length;for(let o=0;o<i;o+=2){const l=n[o],d=n[o+1],f=n[(o+2)%i],h=n[(o+3)%i];e+=(f-l)*(h+d)}return e<0}containsPolygon(e){const n=this.getBounds(b9),i=e.getBounds(x9);if(!n.containsRect(i))return!1;const o=e.points;for(let l=0;l<o.length;l+=2){const d=o[l],f=o[l+1];if(!this.contains(d,f))return!1}return!0}clone(){const e=this.points.slice(),n=new D1(e);return n.closePath=this.closePath,n}contains(e,n){let i=!1;const o=this.points.length/2;for(let l=0,d=o-1;l<o;d=l++){const f=this.points[l*2],h=this.points[l*2+1],p=this.points[d*2],g=this.points[d*2+1];h>n!=g>n&&e<(p-f)*((n-h)/(g-h))+f&&(i=!i)}return i}strokeContains(e,n,i,o=.5){const l=i*i,d=l*(1-o),f=l-d,{points:h}=this,p=h.length-(this.closePath?0:2);for(let g=0;g<p;g+=2){const x=h[g],y=h[g+1],E=h[(g+2)%h.length],N=h[(g+3)%h.length],T=g9(e,n,x,y,E,N),D=Math.sign((E-x)*(n-y)-(N-y)*(e-x));if(T<=(D<0?f:d))return!0}return!1}getBounds(e){e||(e=new _i);const n=this.points;let i=1/0,o=-1/0,l=1/0,d=-1/0;for(let f=0,h=n.length;f<h;f+=2){const p=n[f],g=n[f+1];i=p<i?p:i,o=p>o?p:o,l=g<l?g:l,d=g>d?g:d}return e.x=i,e.width=o-i,e.y=l,e.height=d-l,e}copyFrom(e){return this.points=e.points.slice(),this.closePath=e.closePath,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce((e,n)=>`${e}, ${n}`,"")}]`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return Bn("8.11.0","Polygon.lastX is deprecated, please use Polygon.lastX instead."),this.points[this.points.length-2]}get y(){return Bn("8.11.0","Polygon.y is deprecated, please use Polygon.lastY instead."),this.points[this.points.length-1]}get startX(){return this.points[0]}get startY(){return this.points[1]}}const qS=(t,e,n,i,o,l,d)=>{const f=t-n,h=e-i,p=Math.sqrt(f*f+h*h);return p>=o-l&&p<=o+d};class ij{constructor(e=0,n=0,i=0,o=0,l=20){this.type="roundedRectangle",this.x=e,this.y=n,this.width=i,this.height=o,this.radius=l}getBounds(e){return e||(e=new _i),e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}clone(){return new ij(this.x,this.y,this.width,this.height,this.radius)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.copyFrom(this),e}contains(e,n){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&n>=this.y&&n<=this.y+this.height){const i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+i&&n<=this.y+this.height-i||e>=this.x+i&&e<=this.x+this.width-i)return!0;let o=e-(this.x+i),l=n-(this.y+i);const d=i*i;if(o*o+l*l<=d||(o=e-(this.x+this.width-i),o*o+l*l<=d)||(l=n-(this.y+this.height-i),o*o+l*l<=d)||(o=e-(this.x+i),o*o+l*l<=d))return!0}return!1}strokeContains(e,n,i,o=.5){const{x:l,y:d,width:f,height:h,radius:p}=this,g=i*(1-o),x=i-g,y=l+p,E=d+p,N=f-p*2,T=h-p*2,D=l+f,A=d+h;return(e>=l-g&&e<=l+x||e>=D-x&&e<=D+g)&&n>=E&&n<=E+T||(n>=d-g&&n<=d+x||n>=A-x&&n<=A+g)&&e>=y&&e<=y+N?!0:e<y&&n<E&&qS(e,n,y,E,p,x,g)||e>D-p&&n<E&&qS(e,n,D-p,E,p,x,g)||e>D-p&&n>A-p&&qS(e,n,D-p,A-p,p,x,g)||e<y&&n>A-p&&qS(e,n,y,A-p,p,x,g)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}const Q5={};function y9(t,e,n){let i=2166136261;for(let o=0;o<e;o++)i^=t[o].uid,i=Math.imul(i,16777619),i>>>=0;return Q5[i]||v9(t,e,i,n)}function v9(t,e,n,i){const o={};let l=0;for(let f=0;f<i;f++){const h=f<e?t[f]:ur.EMPTY.source;o[l++]=h.source,o[l++]=h.style}const d=new vN(o);return Q5[n]=d,d}class QV{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData),this.size=this.rawBinaryData.byteLength}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}get float64View(){return this._float64Array||(this._float64Array=new Float64Array(this.rawBinaryData)),this._float64Array}get bigUint64View(){return this._bigUint64Array||(this._bigUint64Array=new BigUint64Array(this.rawBinaryData)),this._bigUint64Array}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this.uint32View=null,this.float32View=null,this.uint16View=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._int32View=null,this._float64Array=null,this._bigUint64Array=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}}function ZV(t,e,n,i){if(n??(n=0),i??(i=Math.min(t.byteLength-n,e.byteLength)),!(n&7)&&!(i&7)){const o=i/8;new Float64Array(e,0,o).set(new Float64Array(t,n,o))}else if(!(n&3)&&!(i&3)){const o=i/4;new Float32Array(e,0,o).set(new Float32Array(t,n,o))}else new Uint8Array(e).set(new Uint8Array(t,n,i))}const E9={normal:"normal-npm",add:"add-npm",screen:"screen-npm"};var _9=(t=>(t[t.DISABLED=0]="DISABLED",t[t.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",t[t.MASK_ACTIVE=2]="MASK_ACTIVE",t[t.INVERSE_MASK_ACTIVE=3]="INVERSE_MASK_ACTIVE",t[t.RENDERING_MASK_REMOVE=4]="RENDERING_MASK_REMOVE",t[t.NONE=5]="NONE",t))(_9||{});function JV(t,e){return e.alphaMode==="no-premultiply-alpha"&&E9[t]||t}const w9=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
|
|
323
|
+
${t}`}function RI(t,e){return e?t.replace("#version 300 es",""):t}const EC={stripVersion:RI,ensurePrecision:NI,addProgramDefines:SI,setProgramName:TI,insertVersion:DI},e1=Object.create(null),j5=class YT{constructor(e){e={...YT.defaultOptions,...e};const n=e.fragment.indexOf("#version 300 es")!==-1,i={stripVersion:n,ensurePrecision:{requestedFragmentPrecision:e.preferredFragmentPrecision,requestedVertexPrecision:e.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:wI()},setProgramName:{name:e.name},addProgramDefines:n,insertVersion:n};let o=e.fragment,l=e.vertex;Object.keys(EC).forEach(d=>{const f=i[d];o=EC[d](o,f,!0),l=EC[d](l,f,!1)}),this.fragment=o,this.vertex=l,this.transformFeedbackVaryings=e.transformFeedbackVaryings,this._key=ZR(`${this.vertex}:${this.fragment}`,"gl-program")}destroy(){this.fragment=null,this.vertex=null,this._attributeData=null,this._uniformData=null,this._uniformBlockData=null,this.transformFeedbackVaryings=null,e1[this._cacheKey]=null}static from(e){const n=`${e.vertex}:${e.fragment}`;return e1[n]||(e1[n]=new YT(e),e1[n]._cacheKey=n),e1[n]}};j5.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};let JR=j5;const FV={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}};function jI(t){return FV[t]??FV.float32}const kI={f32:"float32","vec2<f32>":"float32x2","vec3<f32>":"float32x3","vec4<f32>":"float32x4",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",i32:"sint32","vec2<i32>":"sint32x2","vec3<i32>":"sint32x3","vec4<i32>":"sint32x4",vec2i:"sint32x2",vec3i:"sint32x3",vec4i:"sint32x4",u32:"uint32","vec2<u32>":"uint32x2","vec3<u32>":"uint32x3","vec4<u32>":"uint32x4",vec2u:"uint32x2",vec3u:"uint32x3",vec4u:"uint32x4",bool:"uint32","vec2<bool>":"uint32x2","vec3<bool>":"uint32x3","vec4<bool>":"uint32x4"},GV=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|\)|$)/g;function YV(t,e){let n;for(;(n=GV.exec(t))!==null;){const i=kI[n[3]]??"float32";e[n[2]]={location:parseInt(n[1],10),format:i,stride:jI(i).stride,offset:0,instance:!1,start:0}}GV.lastIndex=0}function MI(t){return t.replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"")}function VI({source:t,entryPoint:e}){const n={},i=MI(t),o=i.indexOf(`fn ${e}(`);if(o===-1)return n;const l=i.indexOf("->",o);if(l===-1)return n;const d=i.substring(o,l);if(YV(d,n),Object.keys(n).length===0){const f=d.match(/\(\s*\w+\s*:\s*(\w+)/);if(f){const h=f[1],p=new RegExp(`struct\\s+${h}\\s*\\{([^}]+)\\}`,"s"),g=i.match(p);g&&YV(g[1],n)}}return n}function _C(t){var x,y;const e=/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g,n=/@group\((\d+)\)/,i=/@binding\((\d+)\)/,o=/var(<[^>]+>)? (\w+)/,l=/:\s*([\w<>]+)/,d=/struct\s+(\w+)\s*{([^}]+)}/g,f=/(\w+)\s*:\s*([\w\<\>]+)/g,h=/struct\s+(\w+)/,p=(x=t.match(e))==null?void 0:x.map(E=>({group:parseInt(E.match(n)[1],10),binding:parseInt(E.match(i)[1],10),name:E.match(o)[2],isUniform:E.match(o)[1]==="<uniform>",type:E.match(l)[1]}));if(!p)return{groups:[],structs:[]};const g=((y=t.match(d))==null?void 0:y.map(E=>{const N=E.match(h)[1],T=E.match(f).reduce((D,A)=>{const[M,j]=A.split(":");return D[M.trim()]=j.trim(),D},{});return T?{name:N,members:T}:null}).filter(({name:E})=>p.some(N=>N.type===E||N.type.includes(`<${E}>`))))??[];return{groups:p,structs:g}}var qg=(t=>(t[t.VERTEX=1]="VERTEX",t[t.FRAGMENT=2]="FRAGMENT",t[t.COMPUTE=4]="COMPUTE",t))(qg||{});function UI({groups:t}){const e=[];for(let n=0;n<t.length;n++){const i=t[n];e[i.group]||(e[i.group]=[]),i.isUniform?e[i.group].push({binding:i.binding,visibility:qg.VERTEX|qg.FRAGMENT,buffer:{type:"uniform"}}):i.type==="sampler"?e[i.group].push({binding:i.binding,visibility:qg.FRAGMENT,sampler:{type:"filtering"}}):i.type==="texture_2d"||i.type.startsWith("texture_2d<")?e[i.group].push({binding:i.binding,visibility:qg.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}}):i.type==="texture_2d_array"||i.type.startsWith("texture_2d_array<")?e[i.group].push({binding:i.binding,visibility:qg.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d-array",multisampled:!1}}):(i.type==="texture_cube"||i.type.startsWith("texture_cube<"))&&e[i.group].push({binding:i.binding,visibility:qg.FRAGMENT,texture:{sampleType:"float",viewDimension:"cube",multisampled:!1}})}for(let n=0;n<e.length;n++)e[n]||(e[n]=[]);return e}function PI({groups:t}){const e=[];for(let n=0;n<t.length;n++){const i=t[n];e[i.group]||(e[i.group]={}),e[i.group][i.name]=i.binding}return e}function OI(t,e){const n=new Set,i=new Set,o=[...t.structs,...e.structs].filter(d=>n.has(d.name)?!1:(n.add(d.name),!0)),l=[...t.groups,...e.groups].filter(d=>{const f=`${d.name}-${d.binding}`;return i.has(f)?!1:(i.add(f),!0)});return{structs:o,groups:l}}const t1=Object.create(null);class n_{constructor(e){var f,h;this._layoutKey=0,this._attributeLocationsKey=0;const{fragment:n,vertex:i,layout:o,gpuLayout:l,name:d}=e;if(this.name=d,this.fragment=n,this.vertex=i,n.source===i.source){const p=_C(n.source);this.structsAndGroups=p}else{const p=_C(i.source),g=_C(n.source);this.structsAndGroups=OI(p,g)}this.layout=o??PI(this.structsAndGroups),this.gpuLayout=l??UI(this.structsAndGroups),this.autoAssignGlobalUniforms=((f=this.layout[0])==null?void 0:f.globalUniforms)!==void 0,this.autoAssignLocalUniforms=((h=this.layout[1])==null?void 0:h.localUniforms)!==void 0,this._generateProgramKey()}_generateProgramKey(){const{vertex:e,fragment:n}=this,i=e.source+n.source+e.entryPoint+n.entryPoint;this._layoutKey=ZR(i,"program")}get attributeData(){return this._attributeData??(this._attributeData=VI(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null,t1[this._cacheKey]=null}static from(e){const n=`${e.vertex.source}:${e.fragment.source}:${e.fragment.entryPoint}:${e.vertex.entryPoint}`;return t1[n]||(t1[n]=new n_(e),t1[n]._cacheKey=n),t1[n]}}const k5=["f32","i32","vec2<f32>","vec3<f32>","vec4<f32>","mat2x2<f32>","mat3x3<f32>","mat4x4<f32>","mat3x2<f32>","mat4x2<f32>","mat2x3<f32>","mat4x3<f32>","mat2x4<f32>","mat3x4<f32>","vec2<i32>","vec3<i32>","vec4<i32>"],zI=k5.reduce((t,e)=>(t[e]=!0,t),{});function BI(t,e){switch(t){case"f32":return 0;case"vec2<f32>":return new Float32Array(2*e);case"vec3<f32>":return new Float32Array(3*e);case"vec4<f32>":return new Float32Array(4*e);case"mat2x2<f32>":return new Float32Array([1,0,0,1]);case"mat3x3<f32>":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4x4<f32>":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const M5=class V5{constructor(e,n){this._touched=0,this.uid=gi("uniform"),this._resourceType="uniformGroup",this._resourceId=gi("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,n={...V5.defaultOptions,...n},this.uniformStructures=e;const i={};for(const o in e){const l=e[o];if(l.name=o,l.size=l.size??1,!zI[l.type]){const d=l.type.match(/^array<(\w+(?:<\w+>)?),\s*(\d+)>$/);if(d){const[,f,h]=d;throw new Error(`Uniform type ${l.type} is not supported. Use type: '${f}', size: ${h} instead.`)}throw new Error(`Uniform type ${l.type} is not supported. Supported uniform types are: ${k5.join(", ")}`)}l.value??(l.value=BI(l.type,l.size)),i[o]=l.value}this.uniforms=i,this._dirtyId=1,this.ubo=n.ubo,this.isStatic=n.isStatic,this._signature=ZR(Object.keys(i).map(o=>`${o}-${e[o].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};M5.defaultOptions={ubo:!1,isStatic:!1};let U5=M5;class vN{constructor(e){this.resources=Object.create(null),this._dirty=!0;let n=0;for(const i in e){const o=e[i];this.setResource(o,n++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;const e=[];let n=0;for(const i in this.resources)e[n++]=this.resources[i]._resourceId;this._key=e.join("|")}setResource(e,n){var o,l;const i=this.resources[n];e!==i&&((o=i==null?void 0:i.off)==null||o.call(i,"change",this.onResourceChange,this),(l=e.on)==null||l.call(e,"change",this.onResourceChange,this),this.resources[n]=e,this._dirty=!0)}getResource(e){return this.resources[e]}_touch(e,n){const i=this.resources;for(const o in i)i[o]._gcLastUsed=e,i[o]._touched=n}destroy(){var n;const e=this.resources;for(const i in e){const o=e[i];(n=o==null?void 0:o.off)==null||n.call(o,"change",this.onResourceChange,this)}this.resources=null}onResourceChange(e){this._dirty=!0,e.destroyed?this.destroy():this._updateKey()}}var $T=(t=>(t[t.WEBGL=1]="WEBGL",t[t.WEBGPU=2]="WEBGPU",t[t.CANVAS=4]="CANVAS",t[t.BOTH=3]="BOTH",t))($T||{});class sD extends pd{constructor(e){super(),this.uid=gi("shader"),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[],this._destroyed=!1;let{gpuProgram:n,glProgram:i,groups:o,resources:l,compatibleRenderers:d,groupMap:f}=e;this.gpuProgram=n,this.glProgram=i,d===void 0&&(d=0,n&&(d|=$T.WEBGPU),i&&(d|=$T.WEBGL)),this.compatibleRenderers=d;const h={};if(!l&&!o&&(l={}),l&&o)throw new Error("[Shader] Cannot have both resources and groups");if(!n&&o&&!f)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!n&&o&&f)for(const p in f)for(const g in f[p]){const x=f[p][g];h[x]={group:p,binding:g,name:x}}else if(n&&o&&!f){const p=n.structsAndGroups.groups;f={},p.forEach(g=>{f[g.group]=f[g.group]||{},f[g.group][g.binding]=g.name,h[g.name]=g})}else if(l){o={},f={},n&&n.structsAndGroups.groups.forEach(x=>{f[x.group]=f[x.group]||{},f[x.group][x.binding]=x.name,h[x.name]=x});let p=0;for(const g in l)h[g]||(o[99]||(o[99]=new vN,this._ownedBindGroups.push(o[99])),h[g]={group:99,binding:p,name:g},f[99]=f[99]||{},f[99][p]=g,p++);for(const g in l){const x=g;let y=l[g];!y.source&&!y._resourceType&&(y=new U5(y));const E=h[x];E&&(o[E.group]||(o[E.group]=new vN,this._ownedBindGroups.push(o[E.group])),o[E.group].setResource(y,E.binding))}}this.groups=o,this._uniformBindMap=f,this.resources=this._buildResourceAccessor(o,h)}addResource(e,n,i){var o,l;(o=this._uniformBindMap)[n]||(o[n]={}),(l=this._uniformBindMap[n])[i]||(l[i]=e),this.groups[n]||(this.groups[n]=new vN,this._ownedBindGroups.push(this.groups[n]))}_buildResourceAccessor(e,n){const i={};for(const o in n){const l=n[o];Object.defineProperty(i,l.name,{get(){return e[l.group].getResource(l.binding)},set(d){e[l.group].setResource(d,l.binding)}})}return i}destroy(e=!1){var n,i;this._destroyed||(this._destroyed=!0,this.emit("destroy",this),e&&((n=this.gpuProgram)==null||n.destroy(),(i=this.glProgram)==null||i.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(o=>{o.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null)}static from(e){const{gpu:n,gl:i,...o}=e;let l,d;return n&&(l=n_.from(n)),i&&(d=JR.from(i)),new sD({gpuProgram:l,glProgram:d,...o})}}const LI={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8,min:9,max:10},wC=0,SC=1,NC=2,DC=3,AC=4,CC=5,XT=class P5{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<wC)}set blend(e){!!(this.data&1<<wC)!==e&&(this.data^=1<<wC)}get offsets(){return!!(this.data&1<<SC)}set offsets(e){!!(this.data&1<<SC)!==e&&(this.data^=1<<SC)}set cullMode(e){if(e==="none"){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace=e==="front"}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(this.data&1<<NC)}set culling(e){!!(this.data&1<<NC)!==e&&(this.data^=1<<NC)}get depthTest(){return!!(this.data&1<<DC)}set depthTest(e){!!(this.data&1<<DC)!==e&&(this.data^=1<<DC)}get depthMask(){return!!(this.data&1<<CC)}set depthMask(e){!!(this.data&1<<CC)!==e&&(this.data^=1<<CC)}get clockwiseFrontFace(){return!!(this.data&1<<AC)}set clockwiseFrontFace(e){!!(this.data&1<<AC)!==e&&(this.data^=1<<AC)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!=="none",this._blendMode=e,this._blendModeId=LI[e]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const e=new P5;return e.depthTest=!1,e.blend=!0,e}};XT.default2d=XT.for2d();let ej=XT;const O5=class KT extends sD{constructor(e){e={...KT.defaultOptions,...e},super(e),this.enabled=!0,this._state=ej.for2d(),this.blendMode=e.blendMode,this.padding=e.padding,typeof e.antialias=="boolean"?this.antialias=e.antialias?"on":"off":this.antialias=e.antialias,this.resolution=e.resolution,this.blendRequired=e.blendRequired,this.clipToViewport=e.clipToViewport,this.addResource("uTexture",0,1),e.blendRequired&&this.addResource("uBackTexture",0,3)}apply(e,n,i,o){e.applyFilter(this,n,i,o)}get blendMode(){return this._state.blendMode}set blendMode(e){this._state.blendMode=e}static from(e){const{gpu:n,gl:i,...o}=e;let l,d;return n&&(l=n_.from(n)),i&&(d=JR.from(i)),new KT({gpuProgram:l,glProgram:d,...o})}};O5.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};let sb=O5;const WT=[];Zr.handleByNamedList(hn.Environment,WT);async function II(t){if(!t)for(let e=0;e<WT.length;e++){const n=WT[e];if(n.value.test()){await n.value.load();return}}}let n1;function HI(){if(typeof n1=="boolean")return n1;try{n1=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{n1=!1}return n1}function $V(t,e,n=2){const i=e&&e.length,o=i?e[0]*n:t.length;let l=z5(t,0,o,n,!0);const d=[];if(!l||l.next===l.prev)return d;let f,h,p;if(i&&(l=$I(t,e,l,n)),t.length>80*n){f=t[0],h=t[1];let g=f,x=h;for(let y=n;y<o;y+=n){const E=t[y],N=t[y+1];E<f&&(f=E),N<h&&(h=N),E>g&&(g=E),N>x&&(x=N)}p=Math.max(g-f,x-h),p=p!==0?32767/p:0}return P1(l,d,n,f,h,p,0),d}function z5(t,e,n,i,o){let l;if(o===i9(t,e,n,i)>0)for(let d=e;d<n;d+=i)l=XV(d/i|0,t[d],t[d+1],l);else for(let d=n-i;d>=e;d-=i)l=XV(d/i|0,t[d],t[d+1],l);return l&&rv(l,l.next)&&(z1(l),l=l.next),l}function Zg(t,e){if(!t)return t;e||(e=t);let n=t,i;do if(i=!1,!n.steiner&&(rv(n,n.next)||Qr(n.prev,n,n.next)===0)){if(z1(n),n=e=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==e);return e}function P1(t,e,n,i,o,l,d){if(!t)return;!d&&l&&ZI(t,i,o,l);let f=t;for(;t.prev!==t.next;){const h=t.prev,p=t.next;if(l?FI(t,i,o,l):qI(t)){e.push(h.i,t.i,p.i),z1(t),t=p.next,f=p.next;continue}if(t=p,t===f){d?d===1?(t=GI(Zg(t),e),P1(t,e,n,i,o,l,2)):d===2&&YI(t,e,n,i,o,l):P1(Zg(t),e,n,i,o,l,1);break}}}function qI(t){const e=t.prev,n=t,i=t.next;if(Qr(e,n,i)>=0)return!1;const o=e.x,l=n.x,d=i.x,f=e.y,h=n.y,p=i.y,g=Math.min(o,l,d),x=Math.min(f,h,p),y=Math.max(o,l,d),E=Math.max(f,h,p);let N=i.next;for(;N!==e;){if(N.x>=g&&N.x<=y&&N.y>=x&&N.y<=E&&y1(o,f,l,h,d,p,N.x,N.y)&&Qr(N.prev,N,N.next)>=0)return!1;N=N.next}return!0}function FI(t,e,n,i){const o=t.prev,l=t,d=t.next;if(Qr(o,l,d)>=0)return!1;const f=o.x,h=l.x,p=d.x,g=o.y,x=l.y,y=d.y,E=Math.min(f,h,p),N=Math.min(g,x,y),T=Math.max(f,h,p),D=Math.max(g,x,y),A=QT(E,N,e,n,i),M=QT(T,D,e,n,i);let j=t.prevZ,U=t.nextZ;for(;j&&j.z>=A&&U&&U.z<=M;){if(j.x>=E&&j.x<=T&&j.y>=N&&j.y<=D&&j!==o&&j!==d&&y1(f,g,h,x,p,y,j.x,j.y)&&Qr(j.prev,j,j.next)>=0||(j=j.prevZ,U.x>=E&&U.x<=T&&U.y>=N&&U.y<=D&&U!==o&&U!==d&&y1(f,g,h,x,p,y,U.x,U.y)&&Qr(U.prev,U,U.next)>=0))return!1;U=U.nextZ}for(;j&&j.z>=A;){if(j.x>=E&&j.x<=T&&j.y>=N&&j.y<=D&&j!==o&&j!==d&&y1(f,g,h,x,p,y,j.x,j.y)&&Qr(j.prev,j,j.next)>=0)return!1;j=j.prevZ}for(;U&&U.z<=M;){if(U.x>=E&&U.x<=T&&U.y>=N&&U.y<=D&&U!==o&&U!==d&&y1(f,g,h,x,p,y,U.x,U.y)&&Qr(U.prev,U,U.next)>=0)return!1;U=U.nextZ}return!0}function GI(t,e){let n=t;do{const i=n.prev,o=n.next.next;!rv(i,o)&&L5(i,n,n.next,o)&&O1(i,o)&&O1(o,i)&&(e.push(i.i,n.i,o.i),z1(n),z1(n.next),n=t=o),n=n.next}while(n!==t);return Zg(n)}function YI(t,e,n,i,o,l){let d=t;do{let f=d.next.next;for(;f!==d.prev;){if(d.i!==f.i&&t9(d,f)){let h=I5(d,f);d=Zg(d,d.next),h=Zg(h,h.next),P1(d,e,n,i,o,l,0),P1(h,e,n,i,o,l,0);return}f=f.next}d=d.next}while(d!==t)}function $I(t,e,n,i){const o=[];for(let l=0,d=e.length;l<d;l++){const f=e[l]*i,h=l<d-1?e[l+1]*i:t.length,p=z5(t,f,h,i,!1);p===p.next&&(p.steiner=!0),o.push(e9(p))}o.sort(XI);for(let l=0;l<o.length;l++)n=KI(o[l],n);return n}function XI(t,e){let n=t.x-e.x;if(n===0&&(n=t.y-e.y,n===0)){const i=(t.next.y-t.y)/(t.next.x-t.x),o=(e.next.y-e.y)/(e.next.x-e.x);n=i-o}return n}function KI(t,e){const n=WI(t,e);if(!n)return e;const i=I5(n,t);return Zg(i,i.next),Zg(n,n.next)}function WI(t,e){let n=e;const i=t.x,o=t.y;let l=-1/0,d;if(rv(t,n))return n;do{if(rv(t,n.next))return n.next;if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){const x=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(x<=i&&x>l&&(l=x,d=n.x<n.next.x?n:n.next,x===i))return d}n=n.next}while(n!==e);if(!d)return null;const f=d,h=d.x,p=d.y;let g=1/0;n=d;do{if(i>=n.x&&n.x>=h&&i!==n.x&&B5(o<p?i:l,o,h,p,o<p?l:i,o,n.x,n.y)){const x=Math.abs(o-n.y)/(i-n.x);O1(n,t)&&(x<g||x===g&&(n.x>d.x||n.x===d.x&&QI(d,n)))&&(d=n,g=x)}n=n.next}while(n!==f);return d}function QI(t,e){return Qr(t.prev,t,e.prev)<0&&Qr(e.next,t,t.next)<0}function ZI(t,e,n,i){let o=t;do o.z===0&&(o.z=QT(o.x,o.y,e,n,i)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next;while(o!==t);o.prevZ.nextZ=null,o.prevZ=null,JI(o)}function JI(t){let e,n=1;do{let i=t,o;t=null;let l=null;for(e=0;i;){e++;let d=i,f=0;for(let p=0;p<n&&(f++,d=d.nextZ,!!d);p++);let h=n;for(;f>0||h>0&&d;)f!==0&&(h===0||!d||i.z<=d.z)?(o=i,i=i.nextZ,f--):(o=d,d=d.nextZ,h--),l?l.nextZ=o:t=o,o.prevZ=l,l=o;i=d}l.nextZ=null,n*=2}while(e>1);return t}function QT(t,e,n,i,o){return t=(t-n)*o|0,e=(e-i)*o|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function e9(t){let e=t,n=t;do(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next;while(e!==t);return n}function B5(t,e,n,i,o,l,d,f){return(o-d)*(e-f)>=(t-d)*(l-f)&&(t-d)*(i-f)>=(n-d)*(e-f)&&(n-d)*(l-f)>=(o-d)*(i-f)}function y1(t,e,n,i,o,l,d,f){return!(t===d&&e===f)&&B5(t,e,n,i,o,l,d,f)}function t9(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!n9(t,e)&&(O1(t,e)&&O1(e,t)&&r9(t,e)&&(Qr(t.prev,t,e.prev)||Qr(t,e.prev,e))||rv(t,e)&&Qr(t.prev,t,t.next)>0&&Qr(e.prev,e,e.next)>0)}function Qr(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function rv(t,e){return t.x===e.x&&t.y===e.y}function L5(t,e,n,i){const o=LS(Qr(t,e,n)),l=LS(Qr(t,e,i)),d=LS(Qr(n,i,t)),f=LS(Qr(n,i,e));return!!(o!==l&&d!==f||o===0&&BS(t,n,e)||l===0&&BS(t,i,e)||d===0&&BS(n,t,i)||f===0&&BS(n,e,i))}function BS(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function LS(t){return t>0?1:t<0?-1:0}function n9(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&L5(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function O1(t,e){return Qr(t.prev,t,t.next)<0?Qr(t,e,t.next)>=0&&Qr(t,t.prev,e)>=0:Qr(t,e,t.prev)<0||Qr(t,t.next,e)<0}function r9(t,e){let n=t,i=!1;const o=(t.x+e.x)/2,l=(t.y+e.y)/2;do n.y>l!=n.next.y>l&&n.next.y!==n.y&&o<(n.next.x-n.x)*(l-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==t);return i}function I5(t,e){const n=ZT(t.i,t.x,t.y),i=ZT(e.i,e.x,e.y),o=t.next,l=e.prev;return t.next=e,e.prev=t,n.next=o,o.prev=n,i.next=n,n.prev=i,l.next=i,i.prev=l,i}function XV(t,e,n,i){const o=ZT(t,e,n);return i?(o.next=i.next,o.prev=i,i.next.prev=o,i.next=o):(o.prev=o,o.next=o),o}function z1(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function ZT(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function i9(t,e,n,i){let o=0;for(let l=e,d=n-i;l<n;l+=i)o+=(t[d]-t[l])*(t[l+1]+t[d+1]),d=l;return o}const s9=$V.default||$V;var H5=(t=>(t[t.NONE=0]="NONE",t[t.COLOR=16384]="COLOR",t[t.STENCIL=1024]="STENCIL",t[t.DEPTH=256]="DEPTH",t[t.COLOR_DEPTH=16640]="COLOR_DEPTH",t[t.COLOR_STENCIL=17408]="COLOR_STENCIL",t[t.DEPTH_STENCIL=1280]="DEPTH_STENCIL",t[t.ALL=17664]="ALL",t))(H5||{});class o9{constructor(e){this.items=[],this._name=e}emit(e,n,i,o,l,d,f,h){const{name:p,items:g}=this;for(let x=0,y=g.length;x<y;x++)g[x][p](e,n,i,o,l,d,f,h);return this}add(e){return e[this._name]&&(this.remove(e),this.items.push(e)),this}remove(e){const n=this.items.indexOf(e);return n!==-1&&this.items.splice(n,1),this}contains(e){return this.items.indexOf(e)!==-1}removeAll(){return this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}const a9=["init","destroy","contextChange","resolutionChange","resetState","renderEnd","renderStart","render","update","postrender","prerender"],q5=class F5 extends pd{constructor(e){super(),this.tick=0,this.uid=gi("renderer"),this.runners=Object.create(null),this.renderPipes=Object.create(null),this._initOptions={},this._systemsHash=Object.create(null),this.type=e.type,this.name=e.name,this.config=e;const n=[...a9,...this.config.runners??[]];this._addRunners(...n),this._unsafeEvalCheck()}async init(e={}){const n=e.skipExtensionImports===!0?!0:e.manageImports===!1;await II(n),this._addSystems(this.config.systems),this._addPipes(this.config.renderPipes,this.config.renderPipeAdaptors);for(const i in this._systemsHash)e={...this._systemsHash[i].constructor.defaultOptions,...e};e={...F5.defaultOptions,...e},this._roundPixels=e.roundPixels?1:0;for(let i=0;i<this.runners.init.items.length;i++)await this.runners.init.items[i].init(e);this._initOptions=e}render(e,n){this.tick++;let i=e;if(i instanceof Ps&&(i={container:i},n&&(Bn(pi,"passing a second argument is deprecated, please use render options instead"),i.target=n.renderTexture)),i.target||(i.target=this.view.renderTarget),i.target===this.view.renderTarget&&(this._lastObjectRendered=i.container,i.clearColor??(i.clearColor=this.background.colorRgba),i.clear??(i.clear=this.background.clearBeforeRender)),i.clearColor){const o=Array.isArray(i.clearColor)&&i.clearColor.length===4;i.clearColor=o?i.clearColor:es.shared.setValue(i.clearColor).toArray()}i.transform||(i.container.updateLocalTransform(),i.transform=i.container.localTransform),i.container.visible&&(i.container.enableRenderGroup(),this.runners.prerender.emit(i),this.runners.renderStart.emit(i),this.runners.render.emit(i),this.runners.renderEnd.emit(i),this.runners.postrender.emit(i))}resize(e,n,i){const o=this.view.resolution;this.view.resize(e,n,i),this.emit("resize",this.view.screen.width,this.view.screen.height,this.view.resolution),i!==void 0&&i!==o&&this.runners.resolutionChange.emit(i)}clear(e={}){const n=this;e.target||(e.target=n.renderTarget.renderTarget),e.clearColor||(e.clearColor=this.background.colorRgba),e.clear??(e.clear=H5.ALL);const{clear:i,clearColor:o,target:l,mipLevel:d,layer:f}=e;es.shared.setValue(o??this.background.colorRgba),n.renderTarget.clear(l,i,es.shared.toArray(),d??0,f??0)}get resolution(){return this.view.resolution}set resolution(e){this.view.resolution=e,this.runners.resolutionChange.emit(e)}get width(){return this.view.texture.frame.width}get height(){return this.view.texture.frame.height}get canvas(){return this.view.canvas}get lastObjectRendered(){return this._lastObjectRendered}get renderingToScreen(){return this.renderTarget.renderingToScreen}get screen(){return this.view.screen}_addRunners(...e){e.forEach(n=>{this.runners[n]=new o9(n)})}_addSystems(e){let n;for(n in e){const i=e[n];this._addSystem(i.value,i.name)}}_addSystem(e,n){const i=new e(this);if(this[n])throw new Error(`Whoops! The name "${n}" is already in use`);this[n]=i,this._systemsHash[n]=i;for(const o in this.runners)this.runners[o].add(i);return this}_addPipes(e,n){const i=n.reduce((o,l)=>(o[l.name]=l.value,o),{});e.forEach(o=>{const l=o.value,d=o.name,f=i[d];this.renderPipes[d]=new l(this,f?new f:null),this.runners.destroy.add(this.renderPipes[d])})}destroy(e=!1){this.runners.destroy.items.reverse(),this.runners.destroy.emit(e),(e===!0||typeof e=="object"&&e.releaseGlobalResources)&&t_.release(),Object.values(this.runners).forEach(n=>{n.destroy()}),this._systemsHash=null,this.renderPipes=null,this.removeAllListeners()}generateTexture(e){return this.textureGenerator.generateTexture(e)}get roundPixels(){return!!this._roundPixels}_unsafeEvalCheck(){if(!HI())throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}resetState(){this.runners.resetState.emit()}};q5.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};let G5=q5,IS;function l9(t){return IS!==void 0||(IS=(()=>{var n;const e={stencil:!0,failIfMajorPerformanceCaveat:t??G5.defaultOptions.failIfMajorPerformanceCaveat};try{if(!ll.get().getWebGLRenderingContext())return!1;let o=ll.get().createCanvas().getContext("webgl",e);const l=!!((n=o==null?void 0:o.getContextAttributes())!=null&&n.stencil);if(o){const d=o.getExtension("WEBGL_lose_context");d&&d.loseContext()}return o=null,l}catch{return!1}})()),IS}let HS;async function u9(t={}){return HS!==void 0||(HS=await(async()=>{const e=ll.get().getNavigator().gpu;if(!e)return!1;try{return await(await e.requestAdapter(t)).requestDevice(),!0}catch{return!1}})()),HS}const KV=["webgl","webgpu","canvas"];async function c9(t){let e=[];t.preference?(e.push(t.preference),KV.forEach(l=>{l!==t.preference&&e.push(l)})):e=KV.slice();let n,i={};for(let l=0;l<e.length;l++){const d=e[l];if(d==="webgpu"&&await u9()){const{WebGPURenderer:f}=await Gf(async()=>{const{WebGPURenderer:h}=await import("./WebGPURenderer-Cu04nEL8.js");return{WebGPURenderer:h}},__vite__mapDeps([4,5,6]));n=f,i={...t,...t.webgpu};break}else if(d==="webgl"&&l9(t.failIfMajorPerformanceCaveat??G5.defaultOptions.failIfMajorPerformanceCaveat)){const{WebGLRenderer:f}=await Gf(async()=>{const{WebGLRenderer:h}=await import("./WebGLRenderer-Cbi_mVTn.js");return{WebGLRenderer:h}},__vite__mapDeps([7,5,6]));n=f,i={...t,...t.webgl};break}else if(d==="canvas"){const{CanvasRenderer:f}=await Gf(async()=>{const{CanvasRenderer:h}=await import("./CanvasRenderer-B6OT6Eju.js");return{CanvasRenderer:h}},__vite__mapDeps([8,6]));n=f,i={...t,...t.canvasOptions};break}}if(delete i.webgpu,delete i.webgl,delete i.canvasOptions,!n)throw new Error("No available renderer for the current environment");const o=new n;return await o.init(i),o}const Y5="8.17.0";class $5{static init(){var e;(e=globalThis.__PIXI_APP_INIT__)==null||e.call(globalThis,this,Y5)}static destroy(){}}$5.extension=hn.Application;class d9{constructor(e){this._renderer=e}init(){var e;(e=globalThis.__PIXI_RENDERER_INIT__)==null||e.call(globalThis,this._renderer,Y5)}destroy(){this._renderer=null}}d9.extension={type:[hn.WebGLSystem,hn.WebGPUSystem],name:"initHook",priority:-10};class X5{static init(e){Object.defineProperty(this,"resizeTo",{configurable:!0,set(n){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=n,n&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let n,i;if(this._resizeTo===globalThis.window)n=globalThis.innerWidth,i=globalThis.innerHeight;else{const{clientWidth:o,clientHeight:l}=this._resizeTo;n=o,i=l}this.renderer.resize(n,i),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}X5.extension=hn.Application;class K5{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{configurable:!0,set(n){this._ticker&&this._ticker.remove(this.render,this),this._ticker=n,n&&n.add(this.render,this,jN.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?qy.shared:new qy,e.autoStart&&this.start()}static destroy(){if(this._ticker){const e=this._ticker;this.ticker=null,e.destroy()}}}K5.extension=hn.Application;Zr.add(X5);Zr.add(K5);const W5=class JT{constructor(...e){this.stage=new Ps,e[0]!==void 0&&Bn(pi,"Application constructor options are deprecated, please use Application.init() instead.")}async init(e){e={...e},this.stage||(this.stage=new Ps),this.renderer=await c9(e),JT._plugins.forEach(n=>{n.init.call(this,e)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return Bn(pi,"Application.view is deprecated, please use Application.canvas instead."),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(e=!1,n=!1){const i=JT._plugins.slice(0);i.reverse(),i.forEach(o=>{o.destroy.call(this)}),this.stage.destroy(n),this.stage=null,this.renderer.destroy(e),this.renderer=null}};W5._plugins=[];let tj=W5;Zr.handleByList(hn.Application,tj._plugins);Zr.add($5);var TC,WV;function f9(){if(WV)return TC;WV=1,TC=n;var t={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function n(l){var d=[];return l.replace(e,function(f,h,p){var g=h.toLowerCase();for(p=o(p),g=="m"&&p.length>2&&(d.push([h].concat(p.splice(0,2))),g="l",h=h=="m"?"l":"L");;){if(p.length==t[g])return p.unshift(h),d.push(p);if(p.length<t[g])throw new Error("malformed path data");d.push([h].concat(p.splice(0,t[g])))}}),d}var i=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function o(l){var d=l.match(i);return d?d.map(Number):[]}return TC}var h9=f9();const m9=Qf(h9);function p9(t,e){const n=m9(t),i=[];let o=null,l=0,d=0;for(let f=0;f<n.length;f++){const h=n[f],p=h[0],g=h;switch(p){case"M":l=g[1],d=g[2],e.moveTo(l,d);break;case"m":l+=g[1],d+=g[2],e.moveTo(l,d);break;case"H":l=g[1],e.lineTo(l,d);break;case"h":l+=g[1],e.lineTo(l,d);break;case"V":d=g[1],e.lineTo(l,d);break;case"v":d+=g[1],e.lineTo(l,d);break;case"L":l=g[1],d=g[2],e.lineTo(l,d);break;case"l":l+=g[1],d+=g[2],e.lineTo(l,d);break;case"C":l=g[5],d=g[6],e.bezierCurveTo(g[1],g[2],g[3],g[4],l,d);break;case"c":e.bezierCurveTo(l+g[1],d+g[2],l+g[3],d+g[4],l+g[5],d+g[6]),l+=g[5],d+=g[6];break;case"S":l=g[3],d=g[4],e.bezierCurveToShort(g[1],g[2],l,d);break;case"s":e.bezierCurveToShort(l+g[1],d+g[2],l+g[3],d+g[4]),l+=g[3],d+=g[4];break;case"Q":l=g[3],d=g[4],e.quadraticCurveTo(g[1],g[2],l,d);break;case"q":e.quadraticCurveTo(l+g[1],d+g[2],l+g[3],d+g[4]),l+=g[3],d+=g[4];break;case"T":l=g[1],d=g[2],e.quadraticCurveToShort(l,d);break;case"t":l+=g[1],d+=g[2],e.quadraticCurveToShort(l,d);break;case"A":l=g[6],d=g[7],e.arcToSvg(g[1],g[2],g[3],g[4],g[5],l,d);break;case"a":l+=g[6],d+=g[7],e.arcToSvg(g[1],g[2],g[3],g[4],g[5],l,d);break;case"Z":case"z":e.closePath(),i.length>0&&(o=i.pop(),o?(l=o.startX,d=o.startY):(l=0,d=0)),o=null;break;default:Ho(`Unknown SVG path command: ${p}`)}p!=="Z"&&p!=="z"&&o===null&&(o={startX:l,startY:d},i.push(o))}return e}class nj{constructor(e=0,n=0,i=0){this.type="circle",this.x=e,this.y=n,this.radius=i}clone(){return new nj(this.x,this.y,this.radius)}contains(e,n){if(this.radius<=0)return!1;const i=this.radius*this.radius;let o=this.x-e,l=this.y-n;return o*=o,l*=l,o+l<=i}strokeContains(e,n,i,o=.5){if(this.radius===0)return!1;const l=this.x-e,d=this.y-n,f=this.radius,h=(1-o)*i,p=Math.sqrt(l*l+d*d);return p<=f+h&&p>f-(i-h)}getBounds(e){return e||(e=new _i),e.x=this.x-this.radius,e.y=this.y-this.radius,e.width=this.radius*2,e.height=this.radius*2,e}copyFrom(e){return this.x=e.x,this.y=e.y,this.radius=e.radius,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}class rj{constructor(e=0,n=0,i=0,o=0){this.type="ellipse",this.x=e,this.y=n,this.halfWidth=i,this.halfHeight=o}clone(){return new rj(this.x,this.y,this.halfWidth,this.halfHeight)}contains(e,n){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let i=(e-this.x)/this.halfWidth,o=(n-this.y)/this.halfHeight;return i*=i,o*=o,i+o<=1}strokeContains(e,n,i,o=.5){const{halfWidth:l,halfHeight:d}=this;if(l<=0||d<=0)return!1;const f=i*(1-o),h=i-f,p=l-h,g=d-h,x=l+f,y=d+f,E=e-this.x,N=n-this.y,T=E*E/(p*p)+N*N/(g*g),D=E*E/(x*x)+N*N/(y*y);return T>1&&D<=1}getBounds(e){return e||(e=new _i),e.x=this.x-this.halfWidth,e.y=this.y-this.halfHeight,e.width=this.halfWidth*2,e.height=this.halfHeight*2,e}copyFrom(e){return this.x=e.x,this.y=e.y,this.halfWidth=e.halfWidth,this.halfHeight=e.halfHeight,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`}}function g9(t,e,n,i,o,l){const d=t-n,f=e-i,h=o-n,p=l-i,g=d*h+f*p,x=h*h+p*p;let y=-1;x!==0&&(y=g/x);let E,N;y<0?(E=n,N=i):y>1?(E=o,N=l):(E=n+y*h,N=i+y*p);const T=t-E,D=e-N;return T*T+D*D}let b9,x9;class D1{constructor(...e){this.type="polygon";let n=Array.isArray(e[0])?e[0]:e;if(typeof n[0]!="number"){const i=[];for(let o=0,l=n.length;o<l;o++)i.push(n[o].x,n[o].y);n=i}this.points=n,this.closePath=!0}isClockwise(){let e=0;const n=this.points,i=n.length;for(let o=0;o<i;o+=2){const l=n[o],d=n[o+1],f=n[(o+2)%i],h=n[(o+3)%i];e+=(f-l)*(h+d)}return e<0}containsPolygon(e){const n=this.getBounds(b9),i=e.getBounds(x9);if(!n.containsRect(i))return!1;const o=e.points;for(let l=0;l<o.length;l+=2){const d=o[l],f=o[l+1];if(!this.contains(d,f))return!1}return!0}clone(){const e=this.points.slice(),n=new D1(e);return n.closePath=this.closePath,n}contains(e,n){let i=!1;const o=this.points.length/2;for(let l=0,d=o-1;l<o;d=l++){const f=this.points[l*2],h=this.points[l*2+1],p=this.points[d*2],g=this.points[d*2+1];h>n!=g>n&&e<(p-f)*((n-h)/(g-h))+f&&(i=!i)}return i}strokeContains(e,n,i,o=.5){const l=i*i,d=l*(1-o),f=l-d,{points:h}=this,p=h.length-(this.closePath?0:2);for(let g=0;g<p;g+=2){const x=h[g],y=h[g+1],E=h[(g+2)%h.length],N=h[(g+3)%h.length],T=g9(e,n,x,y,E,N),D=Math.sign((E-x)*(n-y)-(N-y)*(e-x));if(T<=(D<0?f:d))return!0}return!1}getBounds(e){e||(e=new _i);const n=this.points;let i=1/0,o=-1/0,l=1/0,d=-1/0;for(let f=0,h=n.length;f<h;f+=2){const p=n[f],g=n[f+1];i=p<i?p:i,o=p>o?p:o,l=g<l?g:l,d=g>d?g:d}return e.x=i,e.width=o-i,e.y=l,e.height=d-l,e}copyFrom(e){return this.points=e.points.slice(),this.closePath=e.closePath,this}copyTo(e){return e.copyFrom(this),e}toString(){return`[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce((e,n)=>`${e}, ${n}`,"")}]`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return Bn("8.11.0","Polygon.lastX is deprecated, please use Polygon.lastX instead."),this.points[this.points.length-2]}get y(){return Bn("8.11.0","Polygon.y is deprecated, please use Polygon.lastY instead."),this.points[this.points.length-1]}get startX(){return this.points[0]}get startY(){return this.points[1]}}const qS=(t,e,n,i,o,l,d)=>{const f=t-n,h=e-i,p=Math.sqrt(f*f+h*h);return p>=o-l&&p<=o+d};class ij{constructor(e=0,n=0,i=0,o=0,l=20){this.type="roundedRectangle",this.x=e,this.y=n,this.width=i,this.height=o,this.radius=l}getBounds(e){return e||(e=new _i),e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}clone(){return new ij(this.x,this.y,this.width,this.height,this.radius)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.copyFrom(this),e}contains(e,n){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&n>=this.y&&n<=this.y+this.height){const i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+i&&n<=this.y+this.height-i||e>=this.x+i&&e<=this.x+this.width-i)return!0;let o=e-(this.x+i),l=n-(this.y+i);const d=i*i;if(o*o+l*l<=d||(o=e-(this.x+this.width-i),o*o+l*l<=d)||(l=n-(this.y+this.height-i),o*o+l*l<=d)||(o=e-(this.x+i),o*o+l*l<=d))return!0}return!1}strokeContains(e,n,i,o=.5){const{x:l,y:d,width:f,height:h,radius:p}=this,g=i*(1-o),x=i-g,y=l+p,E=d+p,N=f-p*2,T=h-p*2,D=l+f,A=d+h;return(e>=l-g&&e<=l+x||e>=D-x&&e<=D+g)&&n>=E&&n<=E+T||(n>=d-g&&n<=d+x||n>=A-x&&n<=A+g)&&e>=y&&e<=y+N?!0:e<y&&n<E&&qS(e,n,y,E,p,x,g)||e>D-p&&n<E&&qS(e,n,D-p,E,p,x,g)||e>D-p&&n>A-p&&qS(e,n,D-p,A-p,p,x,g)||e<y&&n>A-p&&qS(e,n,y,A-p,p,x,g)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}const Q5={};function y9(t,e,n){let i=2166136261;for(let o=0;o<e;o++)i^=t[o].uid,i=Math.imul(i,16777619),i>>>=0;return Q5[i]||v9(t,e,i,n)}function v9(t,e,n,i){const o={};let l=0;for(let f=0;f<i;f++){const h=f<e?t[f]:ur.EMPTY.source;o[l++]=h.source,o[l++]=h.style}const d=new vN(o);return Q5[n]=d,d}class QV{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData),this.size=this.rawBinaryData.byteLength}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}get float64View(){return this._float64Array||(this._float64Array=new Float64Array(this.rawBinaryData)),this._float64Array}get bigUint64View(){return this._bigUint64Array||(this._bigUint64Array=new BigUint64Array(this.rawBinaryData)),this._bigUint64Array}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this.uint32View=null,this.float32View=null,this.uint16View=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._int32View=null,this._float64Array=null,this._bigUint64Array=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}}function ZV(t,e,n,i){if(n??(n=0),i??(i=Math.min(t.byteLength-n,e.byteLength)),!(n&7)&&!(i&7)){const o=i/8;new Float64Array(e,0,o).set(new Float64Array(t,n,o))}else if(!(n&3)&&!(i&3)){const o=i/4;new Float32Array(e,0,o).set(new Float32Array(t,n,o))}else new Uint8Array(e).set(new Uint8Array(t,n,i))}const E9={normal:"normal-npm",add:"add-npm",screen:"screen-npm"};var _9=(t=>(t[t.DISABLED=0]="DISABLED",t[t.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",t[t.MASK_ACTIVE=2]="MASK_ACTIVE",t[t.INVERSE_MASK_ACTIVE=3]="INVERSE_MASK_ACTIVE",t[t.RENDERING_MASK_REMOVE=4]="RENDERING_MASK_REMOVE",t[t.NONE=5]="NONE",t))(_9||{});function JV(t,e){return e.alphaMode==="no-premultiply-alpha"&&E9[t]||t}const w9=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
|
|
324
324
|
`);function S9(t){let e="";for(let n=0;n<t;++n)n>0&&(e+=`
|
|
325
325
|
else `),n<t-1&&(e+=`if(test == ${n}.0){}`);return e}function N9(t,e){if(t===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const n=e.createShader(e.FRAGMENT_SHADER);try{for(;;){const i=w9.replace(/%forloop%/gi,S9(t));if(e.shaderSource(n,i),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS))t=t/2|0;else break}}finally{e.deleteShader(n)}return t}let Cy=null;function D9(){var e;if(Cy)return Cy;const t=R5();return Cy=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),Cy=N9(Cy,t),(e=t.getExtension("WEBGL_lose_context"))==null||e.loseContext(),Cy}class A9{constructor(){this.ids=Object.create(null),this.textures=[],this.count=0}clear(){for(let e=0;e<this.count;e++){const n=this.textures[e];this.textures[e]=null,this.ids[n.uid]=null}this.count=0}}class C9{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.textures=new A9,this.blendMode="normal",this.topology="triangle-strip",this.canBundle=!0}destroy(){this.textures=null,this.gpuBindGroup=null,this.bindGroup=null,this.batcher=null,this.elements=null}}const A1=[];let kN=0;t_.register({clear:()=>{if(A1.length>0)for(const t of A1)t&&t.destroy();A1.length=0,kN=0}});function eU(){return kN>0?A1[--kN]:new C9}function tU(t){t.elements=null,A1[kN++]=t}let r1=0;const Z5=class J5{constructor(e){this.uid=gi("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._elements=[],e={...J5.defaultOptions,...e},e.maxTextures||(Bn("v8.8.0","maxTextures is a required option for Batcher now, please pass it in the options"),e.maxTextures=D9());const{maxTextures:n,attributesInitialSize:i,indicesInitialSize:o}=e;this.attributeBuffer=new QV(i*4),this.indexBuffer=new Uint16Array(o),this.maxTextures=n}begin(){this.elementSize=0,this.elementStart=0,this.indexSize=0,this.attributeSize=0;for(let e=0;e<this.batchIndex;e++)tU(this.batches[e]);this.batchIndex=0,this._batchIndexStart=0,this._batchIndexSize=0,this.dirty=!0}add(e){this._elements[this.elementSize++]=e,e._indexStart=this.indexSize,e._attributeStart=this.attributeSize,e._batcher=this,this.indexSize+=e.indexSize,this.attributeSize+=e.attributeSize*this.vertexSize}checkAndUpdateTexture(e,n){const i=e._batch.textures.ids[n._source.uid];return!i&&i!==0?!1:(e._textureId=i,e.texture=n,!0)}updateElement(e){this.dirty=!0;const n=this.attributeBuffer;e.packAsQuad?this.packQuadAttributes(e,n.float32View,n.uint32View,e._attributeStart,e._textureId):this.packAttributes(e,n.float32View,n.uint32View,e._attributeStart,e._textureId)}break(e){const n=this._elements;if(!n[this.elementStart])return;let i=eU(),o=i.textures;o.clear();const l=n[this.elementStart];let d=JV(l.blendMode,l.texture._source),f=l.topology;this.attributeSize*4>this.attributeBuffer.size&&this._resizeAttributeBuffer(this.attributeSize*4),this.indexSize>this.indexBuffer.length&&this._resizeIndexBuffer(this.indexSize);const h=this.attributeBuffer.float32View,p=this.attributeBuffer.uint32View,g=this.indexBuffer;let x=this._batchIndexSize,y=this._batchIndexStart,E="startBatch",N=[];const T=this.maxTextures;for(let D=this.elementStart;D<this.elementSize;++D){const A=n[D];n[D]=null;const j=A.texture._source,U=JV(A.blendMode,j),B=d!==U||f!==A.topology;if(j._batchTick===r1&&!B){A._textureId=j._textureBindLocation,x+=A.indexSize,A.packAsQuad?(this.packQuadAttributes(A,h,p,A._attributeStart,A._textureId),this.packQuadIndex(g,A._indexStart,A._attributeStart/this.vertexSize)):(this.packAttributes(A,h,p,A._attributeStart,A._textureId),this.packIndex(A,g,A._indexStart,A._attributeStart/this.vertexSize)),A._batch=i,N.push(A);continue}j._batchTick=r1,(o.count>=T||B)&&(this._finishBatch(i,y,x-y,o,d,f,e,E,N),E="renderBatch",y=x,d=U,f=A.topology,i=eU(),o=i.textures,o.clear(),N=[],++r1),A._textureId=j._textureBindLocation=o.count,o.ids[j.uid]=o.count,o.textures[o.count++]=j,A._batch=i,N.push(A),x+=A.indexSize,A.packAsQuad?(this.packQuadAttributes(A,h,p,A._attributeStart,A._textureId),this.packQuadIndex(g,A._indexStart,A._attributeStart/this.vertexSize)):(this.packAttributes(A,h,p,A._attributeStart,A._textureId),this.packIndex(A,g,A._indexStart,A._attributeStart/this.vertexSize))}o.count>0&&(this._finishBatch(i,y,x-y,o,d,f,e,E,N),y=x,++r1),this.elementStart=this.elementSize,this._batchIndexStart=y,this._batchIndexSize=x}_finishBatch(e,n,i,o,l,d,f,h,p){e.gpuBindGroup=null,e.bindGroup=null,e.action=h,e.batcher=this,e.textures=o,e.blendMode=l,e.topology=d,e.start=n,e.size=i,e.elements=p,++r1,this.batches[this.batchIndex++]=e,f.add(e)}finish(e){this.break(e)}ensureAttributeBuffer(e){e*4<=this.attributeBuffer.size||this._resizeAttributeBuffer(e*4)}ensureIndexBuffer(e){e<=this.indexBuffer.length||this._resizeIndexBuffer(e)}_resizeAttributeBuffer(e){const n=Math.max(e,this.attributeBuffer.size*2),i=new QV(n);ZV(this.attributeBuffer.rawBinaryData,i.rawBinaryData),this.attributeBuffer=i}_resizeIndexBuffer(e){const n=this.indexBuffer;let i=Math.max(e,n.length*1.5);i+=i%2;const o=i>65535?new Uint32Array(i):new Uint16Array(i);if(o.BYTES_PER_ELEMENT!==n.BYTES_PER_ELEMENT)for(let l=0;l<n.length;l++)o[l]=n[l];else ZV(n.buffer,o.buffer);this.indexBuffer=o}packQuadIndex(e,n,i){e[n]=i+0,e[n+1]=i+1,e[n+2]=i+2,e[n+3]=i+0,e[n+4]=i+2,e[n+5]=i+3}packIndex(e,n,i,o){const l=e.indices,d=e.indexSize,f=e.indexOffset,h=e.attributeOffset;for(let p=0;p<d;p++)n[i++]=o+l[p+f]-h}destroy(e={}){var n;if(this.batches!==null){for(let i=0;i<this.batchIndex;i++)tU(this.batches[i]);this.batches=null,this.geometry.destroy(!0),this.geometry=null,e.shader&&((n=this.shader)==null||n.destroy(),this.shader=null);for(let i=0;i<this._elements.length;i++)this._elements[i]&&(this._elements[i]._batch=null);this._elements=null,this.indexBuffer=null,this.attributeBuffer.destroy(),this.attributeBuffer=null}}};Z5.defaultOptions={maxTextures:null,attributesInitialSize:4,indicesInitialSize:6};let T9=Z5;var fa=(t=>(t[t.MAP_READ=1]="MAP_READ",t[t.MAP_WRITE=2]="MAP_WRITE",t[t.COPY_SRC=4]="COPY_SRC",t[t.COPY_DST=8]="COPY_DST",t[t.INDEX=16]="INDEX",t[t.VERTEX=32]="VERTEX",t[t.UNIFORM=64]="UNIFORM",t[t.STORAGE=128]="STORAGE",t[t.INDIRECT=256]="INDIRECT",t[t.QUERY_RESOLVE=512]="QUERY_RESOLVE",t[t.STATIC=1024]="STATIC",t))(fa||{});class B1 extends pd{constructor(e){let{data:n,size:i}=e;const{usage:o,label:l,shrinkToFit:d}=e;super(),this._gpuData=Object.create(null),this._gcLastUsed=-1,this.autoGarbageCollect=!0,this.uid=gi("buffer"),this._resourceType="buffer",this._resourceId=gi("resource"),this._touched=0,this._updateID=1,this._dataInt32=null,this.shrinkToFit=!0,this.destroyed=!1,n instanceof Array&&(n=new Float32Array(n)),this._data=n,i??(i=n==null?void 0:n.byteLength);const f=!!n;this.descriptor={size:i,usage:o,mappedAtCreation:f,label:l},this.shrinkToFit=d??!0}get data(){return this._data}set data(e){this.setDataWithSize(e,e.length,!0)}get dataInt32(){return this._dataInt32||(this._dataInt32=new Int32Array(this.data.buffer)),this._dataInt32}get static(){return!!(this.descriptor.usage&fa.STATIC)}set static(e){e?this.descriptor.usage|=fa.STATIC:this.descriptor.usage&=~fa.STATIC}setDataWithSize(e,n,i){if(this._updateID++,this._updateSize=n*e.BYTES_PER_ELEMENT,this._data===e){i&&this.emit("update",this);return}const o=this._data;if(this._data=e,this._dataInt32=null,!o||o.length!==e.length){!this.shrinkToFit&&o&&e.byteLength<o.byteLength?i&&this.emit("update",this):(this.descriptor.size=e.byteLength,this._resourceId=gi("resource"),this.emit("change",this));return}i&&this.emit("update",this)}update(e){this._updateSize=e??this._updateSize,this._updateID++,this.emit("update",this)}unload(){var e;this.emit("unload",this);for(const n in this._gpuData)(e=this._gpuData[n])==null||e.destroy();this._gpuData=Object.create(null)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this.emit("change",this),this._data=null,this.descriptor=null,this.removeAllListeners()}}function e4(t,e){if(!(t instanceof B1)){let n=e?fa.INDEX:fa.VERTEX;t instanceof Array&&(e?(t=new Uint32Array(t),n=fa.INDEX|fa.COPY_DST):(t=new Float32Array(t),n=fa.VERTEX|fa.COPY_DST)),t=new B1({data:t,label:e?"index-mesh-buffer":"vertex-mesh-buffer",usage:n})}return t}function R9(t,e,n){const i=t.getAttribute(e);if(!i)return n.minX=0,n.minY=0,n.maxX=0,n.maxY=0,n;const o=i.buffer.data;let l=1/0,d=1/0,f=-1/0,h=-1/0;const p=o.BYTES_PER_ELEMENT,g=(i.offset||0)/p,x=(i.stride||8)/p;for(let y=g;y<o.length;y+=x){const E=o[y],N=o[y+1];E>f&&(f=E),N>h&&(h=N),E<l&&(l=E),N<d&&(d=N)}return n.minX=l,n.minY=d,n.maxX=f,n.maxY=h,n}function j9(t){return(t instanceof B1||Array.isArray(t)||t.BYTES_PER_ELEMENT)&&(t={buffer:t}),t.buffer=e4(t.buffer,!1),t}class k9 extends pd{constructor(e={}){super(),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=gi("geometry"),this._layoutKey=0,this.instanceCount=1,this._bounds=new uu,this._boundsDirty=!0;const{attributes:n,indexBuffer:i,topology:o}=e;if(this.buffers=[],this.attributes={},n)for(const l in n)this.addAttribute(l,n[l]);this.instanceCount=e.instanceCount??1,i&&this.addIndex(i),this.topology=o||"triangle-list"}onBufferUpdate(){this._boundsDirty=!0,this.emit("update",this)}getAttribute(e){return this.attributes[e]}getIndex(){return this.indexBuffer}getBuffer(e){return this.getAttribute(e).buffer}getSize(){for(const e in this.attributes){const n=this.attributes[e];return n.buffer.data.length/(n.stride/4||n.size)}return 0}addAttribute(e,n){const i=j9(n);this.buffers.indexOf(i.buffer)===-1&&(this.buffers.push(i.buffer),i.buffer.on("update",this.onBufferUpdate,this),i.buffer.on("change",this.onBufferUpdate,this)),this.attributes[e]=i}addIndex(e){this.indexBuffer=e4(e,!0),this.buffers.push(this.indexBuffer)}get bounds(){return this._boundsDirty?(this._boundsDirty=!1,R9(this,"aPosition",this._bounds)):this._bounds}unload(){var e;this.emit("unload",this);for(const n in this._gpuData)(e=this._gpuData[n])==null||e.destroy();this._gpuData=Object.create(null)}destroy(e=!1){var n;this.emit("destroy",this),this.removeAllListeners(),e&&this.buffers.forEach(i=>i.destroy()),this.unload(),(n=this.indexBuffer)==null||n.destroy(),this.attributes=null,this.buffers=null,this.indexBuffer=null,this._bounds=null}}const M9=new Float32Array(1),V9=new Uint32Array(1);class U9 extends k9{constructor(){const n=new B1({data:M9,label:"attribute-batch-buffer",usage:fa.VERTEX|fa.COPY_DST,shrinkToFit:!1}),i=new B1({data:V9,label:"index-batch-buffer",usage:fa.INDEX|fa.COPY_DST,shrinkToFit:!1}),o=24;super({attributes:{aPosition:{buffer:n,format:"float32x2",stride:o,offset:0},aUV:{buffer:n,format:"float32x2",stride:o,offset:8},aColor:{buffer:n,format:"unorm8x4",stride:o,offset:16},aTextureIdAndRound:{buffer:n,format:"uint16x2",stride:o,offset:20}},indexBuffer:i})}}function nU(t,e,n){if(t)for(const i in t){const o=i.toLocaleLowerCase(),l=e[o];if(l){let d=t[i];i==="header"&&(d=d.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),n&&l.push(`//----${n}----//`),l.push(d)}else Ho(`${i} placement hook does not exist in shader`)}}const P9=/\{\{(.*?)\}\}/g;function rU(t){var i;const e={};return(((i=t.match(P9))==null?void 0:i.map(o=>o.replace(/[{()}]/g,"")))??[]).forEach(o=>{e[o]=[]}),e}function iU(t,e){let n;const i=/@in\s+([^;]+);/g;for(;(n=i.exec(t))!==null;)e.push(n[1])}function sU(t,e,n=!1){const i=[];iU(e,i),t.forEach(f=>{f.header&&iU(f.header,i)});const o=i;n&&o.sort();const l=o.map((f,h)=>` @location(${h}) ${f},`).join(`
|
|
326
326
|
`);let d=e.replace(/@in\s+[^;]+;\s*/g,"");return d=d.replace("{{in}}",`
|
|
@@ -1147,9 +1147,9 @@ DASHBOARD_DIST=../dashboard/dist # Path para os assets do dashboard`},void 0,!1
|
|
|
1147
1147
|
"wsUrl": "ws://127.0.0.1:3002",
|
|
1148
1148
|
"version": "0.18.0",
|
|
1149
1149
|
"engine": "opencode"
|
|
1150
|
-
}`},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1206,columnNumber:9},this),v.jsxDEV(bs,{id:"api",children:"API Reference"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1216,columnNumber:9},this),v.jsxDEV(gt,{children:["Todas as rotas (exceto ",v.jsxDEV(kn,{children:"/health"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1217,columnNumber:35},this)," e ",v.jsxDEV(kn,{children:"/api/webhooks/*"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1217,columnNumber:62},this),") requerem autenticação JWT via cookie."]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1217,columnNumber:9},this),v.jsxDEV(dn,{id:"api-auth",children:"Autenticação"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1219,columnNumber:9},this),v.jsxDEV(xs,{headers:["Método","Rota","Descrição"],rows:[["POST","/api/auth/login","Login — retorna JWT no cookie"],["POST","/api/auth/logout","Logout — limpa o cookie"],["GET","/api/auth/me","Dados do usuário autenticado"]]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1220,columnNumber:9},this),v.jsxDEV(dn,{id:"api-system",children:"Sistema"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1229,columnNumber:9},this),v.jsxDEV(xs,{headers:["Método","Rota","Descrição"],rows:[["GET","/api/system/info","Info do servidor (porta, URL, versão, engine) — sem auth"],["GET","/api/system/models","Lista modelos disponíveis (OpenCode ou Claude Code)"],["PATCH","/api/system/engine","Troca engine (claude-code | opencode | auto) — requer auth"],["GET","/api/system/version","Verifica atualização disponível"],["POST","/api/system/restart","Reinicia o servidor"]]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1230,columnNumber:9},this),v.jsxDEV(dn,{id:"api-squads",children:"Squads"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1241,columnNumber:9},this),v.jsxDEV(xs,{headers:["Método","Rota","Descrição"],rows:[["GET","/api/squads","Lista todas as squads"],["GET","/api/squads/:code","Detalhes de uma squad"],["GET","/api/squads/:code/state","Estado atual do pipeline"]]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1242,columnNumber:9},this),v.jsxDEV(dn,{id:"api-kanban",children:"Kanban"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1251,columnNumber:9},this),v.jsxDEV(xs,{headers:["Método","Rota","Descrição"],rows:[["GET","/api/kanban/tasks","Todas as tarefas (todos as squads)"],["GET","/api/kanban/:squad/tasks","Tarefas de uma squad"],["POST","/api/kanban/:squad/tasks","Criar tarefa manual"],["PATCH","/api/kanban/:squad/tasks/:id","Atualizar status/resultado"],["DELETE","/api/kanban/:squad/tasks/:id","Remover tarefa"]]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1252,columnNumber:9},this),v.jsxDEV(dn,{id:"api-scheduler",children:"Scheduler"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1263,columnNumber:9},this),v.jsxDEV(xs,{headers:["Método","Rota","Descrição"],rows:[["GET","/api/scheduler/jobs","Lista todos os jobs agendados"],["POST","/api/scheduler/jobs/:squad/enable","Ativar agendamento"],["POST","/api/scheduler/jobs/:squad/disable","Desativar agendamento"],["POST","/api/scheduler/jobs/:squad/run","Executar job manualmente"]]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1264,columnNumber:9},this),v.jsxDEV(dn,{id:"api-dashboard",children:"Dashboard"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1274,columnNumber:9},this),v.jsxDEV(xs,{headers:["Método","Rota","Descrição"],rows:[["GET","/api/dashboard/stats","Todos os dados do painel de operações"],["POST","/api/dashboard/sessions/:id/kill","Encerrar pipeline em execução"]]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1275,columnNumber:9},this),v.jsxDEV(dn,{id:"api-webhook",children:"Webhooks"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1283,columnNumber:9},this),v.jsxDEV(xs,{headers:["Método","Rota","Descrição"],rows:[["POST","/api/webhooks/:squad","Disparar squad via webhook externo"]]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1284,columnNumber:9},this),v.jsxDEV(bs,{id:"releases",children:"Releases"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1292,columnNumber:9},this),v.jsxDEV(ca,{version:"0.18.0",date:"2026-03-19",type:"feat",items:["OpenCode Integration: MCP Server, OpenCode Agents e engine abstrato","AgentEngine interface: unifica Claude Code Bridge e OpenCode Bridge","Factory de engines: seleção automática via AGENT_ENGINE (auto | claude-code | opencode)","MCP Server standalone em src/mcp/expxagents-mcp.ts (5 tools)","3 OpenCode Agents: squad-designer, squad-operator, skills-engine","REST API /api/chat/send e /api/chat/stop para integração MCP","AGENTS.md para discovery de agentes no OpenCode",".opencode/agents/ com definições de agentes customizados","compatibility: opencode no frontmatter SKILL.md"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1294,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.14",date:"2026-03-19",type:"fix",items:["Fix: modo foco agora oculta corretamente o header, sidebar e status bar via data-layout attributes","Fix: queries SQLite do dashboard agora usam localtime para correta exibição por fuso horário",'Fix: gráfico "Ritmo por Hora" exibe dados no horário local do servidor (não UTC)']},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1309,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.13",date:"2026-03-19",type:"fix",items:['Fix: botão "Todos" restaurado no Kanban — disponível mas não pré-selecionado por padrão']},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1318,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.12",date:"2026-03-19",type:"feat",items:["Botão ⛶ Foco em Kanban e Dashboard — oculta toda a navegação para modo tela cheia",'Kanban: "Todos" não é mais selecionado por padrão ao entrar na página']},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1325,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.11",date:"2026-03-19",type:"feat",items:["Pipeline cards no dashboard agora mostram barra de progresso (N/total etapas)","Chips de agentes por sessão com status: trabalhando (âmbar), concluído (verde), falha (vermelho), aguardando (cinza)","Novo endpoint GET /api/dashboard/stats inclui sessionAgents por atividade em execução"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1333,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.10",date:"2026-03-19",type:"feat",items:["Modal de pipeline: clique em qualquer card de pipeline ativo para ver detalhes","Opção de encerrar pipeline com confirmação em 2 etapas","Kill registry conecta bridge de chat e bridge do scheduler"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1342,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.9",date:"2026-03-18",type:"fix",items:['Dashboard: labels corretos — "Falhas" (não "Em Atraso"), "Squads Rodando", "Pipelines Ativos"',"Ranking de squads corrigido para ordenar por score (done/total) em vez de count absoluto","Kanban task info dentro de cada card de pipeline ativo"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1351,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.7",date:"2026-03-18",type:"feat",items:["Painel de Operações completo: KPIs, métricas (Regularidade/Qualidade/Eficiência), gráficos de ritmo","Performance por Squad, Top Performers, Top Regularidade, Top Eficiência","Sessões ativas em tempo real com timer de execução"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1360,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.6",date:"2026-03-18",type:"fix",items:["CLI reorganize: substituído spawn do claude por chamadas diretas à API Anthropic (fix do hang)","Classificação em batches de 10 com fallback heurístico baseado em keywords"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1369,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.0",date:"2026-03-17",type:"feat",items:["Hierarquia de squads: Setor → Grupo → Sessão → Squad com descoberta recursiva","Comando reorganize para migrar squads existentes para a hierarquia","CLI list agrupa squads pela hierarquia","run/stop usam findSquadDir() para localizar squads em qualquer nível"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1377,columnNumber:9},this),v.jsxDEV(ca,{version:"0.16.2",date:"2026-03-14",type:"feat",items:["Sincronização do painel de detalhes do kanban com updates em tempo real","Exibição de duração e output nas tarefas","Step-by-step kanban transitions via watcher events"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1387,columnNumber:9},this),v.jsxDEV(ca,{version:"0.16.0",date:"2026-03-12",type:"feat",items:["Integração pipeline → kanban: tasks criadas automaticamente por step","Webhook deduplicação e spend control por squad","Session journal para rastreamento histórico","Avatar e nomes humanos para agentes"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1396,columnNumber:9},this),v.jsxDEV(ca,{version:"0.15.0",date:"2026-03-05",type:"feat",items:["A2UI: agentes podem atualizar o dashboard escrevendo ui.json","Anthropic runner, OpenAI runner e factory de providers","POST /api/webhooks/:squad para triggers externos sem JWT","--tunnel flag no comando server (localtunnel)"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1406,columnNumber:9},this),v.jsxDEV(ca,{version:"0.14.0",date:"2026-02-28",type:"feat",items:["Scheduler integrado com node-cron por squad","View Scheduler no dashboard","Email engine com AWS SES, leads, campanhas e SNS webhook"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1416,columnNumber:9},this),v.jsxDEV("div",{style:{height:60}},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1425,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:305,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:252,columnNumber:5},this)}function J6(){const{isAuthenticated:t}=ou(),[e,n]=O.useState([]),[i,o]=O.useState([]),[l,d]=O.useState(!0),[f,h]=O.useState(""),[p,g]=O.useState(null),[x,y]=O.useState(null),[E,N]=O.useState(null);O.useEffect(()=>{T(),D()},[]);async function T(){try{const j=await fetch("/api/registry/categories");if(j.ok){const U=await j.json();n(U.categories)}}catch{}}async function D(){d(!0);try{const j=new URLSearchParams;f&&j.set("q",f),p&&j.set("category",p),j.set("limit","50");const U=await fetch(`/api/registry/squads?${j}`);if(U.ok){const B=await U.json();o(B.items)}}catch{N("Failed to load squads")}finally{d(!1)}}async function A(j){if(!t){alert("Please login to install squads");return}if(window.confirm(`Install "${j.name}"?
|
|
1150
|
+
}`},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1206,columnNumber:9},this),v.jsxDEV(bs,{id:"api",children:"API Reference"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1216,columnNumber:9},this),v.jsxDEV(gt,{children:["Todas as rotas (exceto ",v.jsxDEV(kn,{children:"/health"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1217,columnNumber:35},this)," e ",v.jsxDEV(kn,{children:"/api/webhooks/*"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1217,columnNumber:62},this),") requerem autenticação JWT via cookie."]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1217,columnNumber:9},this),v.jsxDEV(dn,{id:"api-auth",children:"Autenticação"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1219,columnNumber:9},this),v.jsxDEV(xs,{headers:["Método","Rota","Descrição"],rows:[["POST","/api/auth/login","Login — retorna JWT no cookie"],["POST","/api/auth/logout","Logout — limpa o cookie"],["GET","/api/auth/me","Dados do usuário autenticado"]]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1220,columnNumber:9},this),v.jsxDEV(dn,{id:"api-system",children:"Sistema"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1229,columnNumber:9},this),v.jsxDEV(xs,{headers:["Método","Rota","Descrição"],rows:[["GET","/api/system/info","Info do servidor (porta, URL, versão, engine) — sem auth"],["GET","/api/system/models","Lista modelos disponíveis (OpenCode ou Claude Code)"],["PATCH","/api/system/engine","Troca engine (claude-code | opencode | auto) — requer auth"],["GET","/api/system/version","Verifica atualização disponível"],["POST","/api/system/restart","Reinicia o servidor"]]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1230,columnNumber:9},this),v.jsxDEV(dn,{id:"api-squads",children:"Squads"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1241,columnNumber:9},this),v.jsxDEV(xs,{headers:["Método","Rota","Descrição"],rows:[["GET","/api/squads","Lista todas as squads"],["GET","/api/squads/:code","Detalhes de uma squad"],["GET","/api/squads/:code/state","Estado atual do pipeline"]]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1242,columnNumber:9},this),v.jsxDEV(dn,{id:"api-kanban",children:"Kanban"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1251,columnNumber:9},this),v.jsxDEV(xs,{headers:["Método","Rota","Descrição"],rows:[["GET","/api/kanban/tasks","Todas as tarefas (todos as squads)"],["GET","/api/kanban/:squad/tasks","Tarefas de uma squad"],["POST","/api/kanban/:squad/tasks","Criar tarefa manual"],["PATCH","/api/kanban/:squad/tasks/:id","Atualizar status/resultado"],["DELETE","/api/kanban/:squad/tasks/:id","Remover tarefa"]]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1252,columnNumber:9},this),v.jsxDEV(dn,{id:"api-scheduler",children:"Scheduler"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1263,columnNumber:9},this),v.jsxDEV(xs,{headers:["Método","Rota","Descrição"],rows:[["GET","/api/scheduler/jobs","Lista todos os jobs agendados"],["POST","/api/scheduler/jobs/:squad/enable","Ativar agendamento"],["POST","/api/scheduler/jobs/:squad/disable","Desativar agendamento"],["POST","/api/scheduler/jobs/:squad/run","Executar job manualmente"]]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1264,columnNumber:9},this),v.jsxDEV(dn,{id:"api-dashboard",children:"Dashboard"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1274,columnNumber:9},this),v.jsxDEV(xs,{headers:["Método","Rota","Descrição"],rows:[["GET","/api/dashboard/stats","Todos os dados do painel de operações"],["POST","/api/dashboard/sessions/:id/kill","Encerrar pipeline em execução"]]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1275,columnNumber:9},this),v.jsxDEV(dn,{id:"api-webhook",children:"Webhooks"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1283,columnNumber:9},this),v.jsxDEV(xs,{headers:["Método","Rota","Descrição"],rows:[["POST","/api/webhooks/:squad","Disparar squad via webhook externo"]]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1284,columnNumber:9},this),v.jsxDEV(bs,{id:"releases",children:"Releases"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1292,columnNumber:9},this),v.jsxDEV(ca,{version:"0.18.0",date:"2026-03-19",type:"feat",items:["OpenCode Integration: MCP Server, OpenCode Agents e engine abstrato","AgentEngine interface: unifica Claude Code Bridge e OpenCode Bridge","Factory de engines: seleção automática via AGENT_ENGINE (auto | claude-code | opencode)","MCP Server standalone em src/mcp/expxagents-mcp.ts (5 tools)","3 OpenCode Agents: squad-designer, squad-operator, skills-engine","REST API /api/chat/send e /api/chat/stop para integração MCP","AGENTS.md para discovery de agentes no OpenCode",".opencode/agents/ com definições de agentes customizados","compatibility: opencode no frontmatter SKILL.md"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1294,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.14",date:"2026-03-19",type:"fix",items:["Fix: modo foco agora oculta corretamente o header, sidebar e status bar via data-layout attributes","Fix: queries SQLite do dashboard agora usam localtime para correta exibição por fuso horário",'Fix: gráfico "Ritmo por Hora" exibe dados no horário local do servidor (não UTC)']},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1309,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.13",date:"2026-03-19",type:"fix",items:['Fix: botão "Todos" restaurado no Kanban — disponível mas não pré-selecionado por padrão']},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1318,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.12",date:"2026-03-19",type:"feat",items:["Botão ⛶ Foco em Kanban e Dashboard — oculta toda a navegação para modo tela cheia",'Kanban: "Todos" não é mais selecionado por padrão ao entrar na página']},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1325,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.11",date:"2026-03-19",type:"feat",items:["Pipeline cards no dashboard agora mostram barra de progresso (N/total etapas)","Chips de agentes por sessão com status: trabalhando (âmbar), concluído (verde), falha (vermelho), aguardando (cinza)","Novo endpoint GET /api/dashboard/stats inclui sessionAgents por atividade em execução"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1333,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.10",date:"2026-03-19",type:"feat",items:["Modal de pipeline: clique em qualquer card de pipeline ativo para ver detalhes","Opção de encerrar pipeline com confirmação em 2 etapas","Kill registry conecta bridge de chat e bridge do scheduler"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1342,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.9",date:"2026-03-18",type:"fix",items:['Dashboard: labels corretos — "Falhas" (não "Em Atraso"), "Squads Rodando", "Pipelines Ativos"',"Ranking de squads corrigido para ordenar por score (done/total) em vez de count absoluto","Kanban task info dentro de cada card de pipeline ativo"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1351,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.7",date:"2026-03-18",type:"feat",items:["Painel de Operações completo: KPIs, métricas (Regularidade/Qualidade/Eficiência), gráficos de ritmo","Performance por Squad, Top Performers, Top Regularidade, Top Eficiência","Sessões ativas em tempo real com timer de execução"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1360,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.6",date:"2026-03-18",type:"fix",items:["CLI reorganize: substituído spawn do claude por chamadas diretas à API Anthropic (fix do hang)","Classificação em batches de 10 com fallback heurístico baseado em keywords"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1369,columnNumber:9},this),v.jsxDEV(ca,{version:"0.17.0",date:"2026-03-17",type:"feat",items:["Hierarquia de squads: Setor → Grupo → Sessão → Squad com descoberta recursiva","Comando reorganize para migrar squads existentes para a hierarquia","CLI list agrupa squads pela hierarquia","run/stop usam findSquadDir() para localizar squads em qualquer nível"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1377,columnNumber:9},this),v.jsxDEV(ca,{version:"0.16.2",date:"2026-03-14",type:"feat",items:["Sincronização do painel de detalhes do kanban com updates em tempo real","Exibição de duração e output nas tarefas","Step-by-step kanban transitions via watcher events"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1387,columnNumber:9},this),v.jsxDEV(ca,{version:"0.16.0",date:"2026-03-12",type:"feat",items:["Integração pipeline → kanban: tasks criadas automaticamente por step","Webhook deduplicação e spend control por squad","Session journal para rastreamento histórico","Avatar e nomes humanos para agentes"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1396,columnNumber:9},this),v.jsxDEV(ca,{version:"0.15.0",date:"2026-03-05",type:"feat",items:["A2UI: agentes podem atualizar o dashboard escrevendo ui.json","Anthropic runner, OpenAI runner e factory de providers","POST /api/webhooks/:squad para triggers externos sem JWT","--tunnel flag no comando server (localtunnel)"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1406,columnNumber:9},this),v.jsxDEV(ca,{version:"0.14.0",date:"2026-02-28",type:"feat",items:["Scheduler integrado com node-cron por squad","View Scheduler no dashboard","Email engine com AWS SES, leads, campanhas e SNS webhook"]},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1416,columnNumber:9},this),v.jsxDEV("div",{style:{height:60}},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:1425,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:305,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/DocsView.tsx",lineNumber:252,columnNumber:5},this)}function J6(){const{isAuthenticated:t}=ou(),[e,n]=O.useState([]),[i,o]=O.useState([]),[l,d]=O.useState(!0),[f,h]=O.useState(""),[p,g]=O.useState(null),[x,y]=O.useState(null),[E,N]=O.useState(null);O.useEffect(()=>{T(),D()},[]);async function T(){try{const j=await fetch("/api/registry/categories");if(j.ok){const U=await j.json();n(U.categories)}}catch{}}async function D(){d(!0);try{const j=new URLSearchParams;f&&j.set("q",f),p&&j.set("category",p),j.set("limit","50");const U=await fetch(`/api/registry/squads?${j}`);if(U.ok){const B=await U.json();o(B.squads||[])}}catch{N("Failed to load squads")}finally{d(!1)}}async function A(j){if(!t){alert("Please login to install squads");return}if(window.confirm(`Install "${j.name}"?
|
|
1151
1151
|
|
|
1152
|
-
This will create the squad in your local squads directory.`)){y(j.id);try{const B=await fetch(`/api/registry/squads/${j.
|
|
1152
|
+
This will create the squad in your local squads directory.`)){y(j.id);try{const B=await fetch(`/api/registry/squads/${encodeURIComponent(j.fullName)}/install`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include"});if(B.ok){const P=await B.json();alert(`✅ Squad installed to:
|
|
1153
1153
|
${P.installedTo}
|
|
1154
1154
|
|
|
1155
|
-
Refresh the page to see it in your squads list.`)}else{const P=await B.json();alert(`Failed to install: ${P.error}`)}}catch{alert("Failed to install squad")}finally{y(null)}}}function M(j){j.preventDefault(),D()}return v.jsxDEV("div",{style:{padding:"var(--sp-6)",maxWidth:1200,margin:"0 auto"},children:[v.jsxDEV("div",{style:{marginBottom:"var(--sp-6)"},children:[v.jsxDEV("h1",{style:{fontFamily:"var(--font-display)",fontSize:"1.5rem",fontWeight:700,marginBottom:"var(--sp-2)"},children:"🏪 Squad Marketplace"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:118,columnNumber:9},this),v.jsxDEV("p",{style:{color:"var(--text-muted)",fontSize:"0.9rem"},children:"Discover, share, and install AI agent squads from the community."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:126,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:117,columnNumber:7},this),v.jsxDEV("form",{onSubmit:M,style:{display:"flex",gap:"var(--sp-3)",marginBottom:"var(--sp-4)"},children:[v.jsxDEV("input",{type:"text",placeholder:"Search squads...",value:f,onChange:j=>h(j.target.value),style:{flex:1,padding:"8px 12px",borderRadius:6,border:"1px solid var(--border-subtle)",background:"var(--surface-2)",color:"var(--text-primary)",fontSize:"0.9rem"}},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:137,columnNumber:9},this),v.jsxDEV("button",{type:"submit",style:{padding:"8px 16px",borderRadius:6,border:"none",background:"var(--accent)",color:"var(--text-inverse)",cursor:"pointer",fontWeight:600},children:"Search"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:152,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:132,columnNumber:7},this),v.jsxDEV("div",{style:{display:"flex",gap:"var(--sp-2)",marginBottom:"var(--sp-4)",flexWrap:"wrap"},children:[v.jsxDEV("button",{onClick:()=>{g(null),D()},style:{padding:"6px 12px",borderRadius:20,border:p===null?"2px solid var(--accent)":"1px solid var(--border-subtle)",background:p===null?"var(--accent-dim)":"transparent",color:p===null?"var(--accent)":"var(--text-secondary)",cursor:"pointer",fontSize:"0.8rem",fontWeight:p===null?600:400},children:"All"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:175,columnNumber:9},this),e.map(j=>v.jsxDEV("button",{onClick:()=>{g(j.id),D()},style:{padding:"6px 12px",borderRadius:20,border:p===j.id?"2px solid var(--accent)":"1px solid var(--border-subtle)",background:p===j.id?"var(--accent-dim)":"transparent",color:p===j.id?"var(--accent)":"var(--text-secondary)",cursor:"pointer",fontSize:"0.8rem",fontWeight:p===j.id?600:400},children:[j.icon," ",j.name]},j.id,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:191,columnNumber:11},this))]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:169,columnNumber:7},this),l?v.jsxDEV("div",{style:{textAlign:"center",padding:40,color:"var(--text-muted)"},children:"Loading squads..."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:212,columnNumber:9},this):i.length===0?v.jsxDEV("div",{style:{textAlign:"center",padding:60,color:"var(--text-muted)",border:"2px dashed var(--border-subtle)",borderRadius:12},children:[v.jsxDEV("div",{style:{fontSize:"3rem",marginBottom:"var(--sp-3)"},children:"📦"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:223,columnNumber:11},this),v.jsxDEV("p",{style:{fontSize:"1rem",marginBottom:"var(--sp-2)"},children:"No squads found"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:224,columnNumber:11},this),v.jsxDEV("p",{style:{fontSize:"0.85rem"},children:"Be the first to publish a squad to the marketplace!"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:225,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:216,columnNumber:9},this):v.jsxDEV("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gap:"var(--sp-4)"},children:i.map(j=>v.jsxDEV(lle,{squad:j,onInstall:()=>A(j),installing:x===j.id},j.id,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:236,columnNumber:13},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:230,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:111,columnNumber:5},this)}function lle({squad:t,onInstall:e,installing:n}){return v.jsxDEV("div",{style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderRadius:12,padding:"var(--sp-4)",display:"flex",flexDirection:"column",gap:"var(--sp-3)"},children:[v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)"},children:[v.jsxDEV("div",{style:{width:40,height:40,borderRadius:8,background:"var(--accent-dim)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.2rem"},children:ule(t.icon)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:270,columnNumber:9},this),v.jsxDEV("div",{children:[v.jsxDEV("h3",{style:{fontWeight:600,fontSize:"0.95rem",marginBottom:2},children:t.name},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:283,columnNumber:11},this),v.jsxDEV("code",{style:{fontSize:"0.7rem",color:"var(--text-muted)",background:"var(--surface-3)",padding:"2px 6px",borderRadius:4},children:t.code},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:286,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:282,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:269,columnNumber:7},this),v.jsxDEV("p",{style:{fontSize:"0.85rem",color:"var(--text-secondary)",lineHeight:1.5,flex:1,overflow:"hidden",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical"},children:t.description},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:299,columnNumber:7},this),t.tags.length>0&&v.jsxDEV("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:t.tags.slice(0,3).map(i=>v.jsxDEV("span",{style:{fontSize:"0.65rem",padding:"2px 6px",borderRadius:4,background:"var(--surface-3)",color:"var(--text-muted)"},children:i},i,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:316,columnNumber:13},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:314,columnNumber:9},this),v.jsxDEV("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.75rem",color:"var(--text-muted)",paddingTop:"var(--sp-2)",borderTop:"1px solid var(--border-subtle)"},children:[v.jsxDEV("span",{children:["📥 ",t.downloads]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:341,columnNumber:9},this),v.jsxDEV("span",{children:["⭐ ",t.rating.toFixed(1)," (",t.ratingCount,")"]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:342,columnNumber:9},this),v.jsxDEV("span",{style:{textTransform:"capitalize"},children:t.category},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:343,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:333,columnNumber:7},this),v.jsxDEV("button",{onClick:e,disabled:n,style:{padding:"8px 16px",borderRadius:6,border:"none",background:n?"var(--surface-3)":"var(--accent)",color:n?"var(--text-muted)":"var(--text-inverse)",cursor:n?"not-allowed":"pointer",fontWeight:600,fontSize:"0.85rem"},children:n?"Installing...":"Install Squad"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:347,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:259,columnNumber:5},this)}function ule(t){const e={rocket:"🚀",folder:"📁",code:"💻",chat:"💬",search:"🔍",chart:"📊",users:"👥",tools:"🔧",default:"📦"};return e[t]??e.default}const cle=Object.freeze(Object.defineProperty({__proto__:null,MarketplaceView:J6},Symbol.toStringTag,{value:"Module"})),dle={display:"flex",gap:"var(--sp-1)",padding:"var(--sp-2) var(--sp-3)",borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-1)"};function fle(t){return{padding:"6px 16px",border:"none",borderBottom:t?"2px solid var(--accent)":"2px solid transparent",background:"none",color:t?"var(--accent)":"var(--text-secondary)",fontFamily:"var(--font-display)",fontSize:"0.82rem",fontWeight:t?600:400,cursor:"pointer",transition:"all var(--duration-fast) var(--ease-out)"}}const fd={background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-sm)",padding:"var(--sp-3)"},Qg={background:"var(--surface-0)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-xs)",padding:"6px 10px",color:"var(--text-primary)",fontFamily:"var(--font-mono)",fontSize:"0.8rem",outline:"none",width:"100%"},CD={padding:"6px 14px",background:"var(--accent)",color:"var(--text-inverse)",border:"none",borderRadius:"var(--radius-xs)",fontFamily:"var(--font-display)",fontSize:"0.8rem",fontWeight:600,cursor:"pointer",whiteSpace:"nowrap"},hle={...CD,background:"var(--status-error)",fontSize:"0.7rem",padding:"3px 8px"},bc={fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:4};function mle(){const[t,e]=O.useState(""),[n,i]=O.useState("auto"),[o,l]=O.useState(""),[d,f]=O.useState([]),[h,p]=O.useState(null),[g,x]=O.useState(!1),[y,E]=O.useState(""),N=O.useCallback(async()=>{try{const D=await fetch("/api/knowledge/stats",{credentials:"include"});if(D.ok){const A=await D.json();p(A)}}catch{}},[]);O.useEffect(()=>{N()},[N]);const T=async()=>{if(t.trim()){x(!0),E("");try{const D=new URLSearchParams({q:t,mode:n,limit:"10"});o.trim()&&D.set("squad",o.trim());const A=await fetch(`/api/knowledge/query?${D}`,{credentials:"include"});if(!A.ok)throw new Error(`Search failed: ${A.status}`);const M=await A.json();f(M.results||M)}catch(D){E(D.message||"Search failed"),f([])}finally{x(!1)}}};return v.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-3)",height:"100%"},children:[v.jsxDEV("div",{style:fd,children:v.jsxDEV("div",{style:{display:"flex",gap:"var(--sp-2)",alignItems:"flex-end",flexWrap:"wrap"},children:[v.jsxDEV("div",{style:{flex:1,minWidth:200},children:[v.jsxDEV("div",{style:bc,children:"Search Query"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:166,columnNumber:13},this),v.jsxDEV("input",{style:Qg,value:t,onChange:D=>e(D.target.value),placeholder:"Search knowledge base...",onKeyDown:D=>D.key==="Enter"&&T()},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:167,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:165,columnNumber:11},this),v.jsxDEV("div",{style:{minWidth:100},children:[v.jsxDEV("div",{style:bc,children:"Mode"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:176,columnNumber:13},this),v.jsxDEV("select",{style:{...Qg,width:"auto",minWidth:100},value:n,onChange:D=>i(D.target.value),children:[v.jsxDEV("option",{value:"auto",children:"Auto"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:182,columnNumber:15},this),v.jsxDEV("option",{value:"search",children:"Search"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:183,columnNumber:15},this),v.jsxDEV("option",{value:"graph",children:"Graph"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:184,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:177,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:175,columnNumber:11},this),v.jsxDEV("div",{style:{minWidth:120},children:[v.jsxDEV("div",{style:bc,children:"Squad (optional)"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:188,columnNumber:13},this),v.jsxDEV("input",{style:Qg,value:o,onChange:D=>l(D.target.value),placeholder:"filter by squad"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:189,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:187,columnNumber:11},this),v.jsxDEV("button",{style:CD,onClick:T,disabled:g,children:g?"Searching...":"Search"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:196,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:164,columnNumber:9},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:163,columnNumber:7},this),h&&v.jsxDEV("div",{style:{display:"flex",gap:"var(--sp-2)",flexWrap:"wrap"},children:[["Documents",h.documents],["Chunks",h.chunks],["Entities",h.entities],["Relations",h.relations]].map(([D,A])=>v.jsxDEV("div",{style:{...fd,flex:"1 1 120px",textAlign:"center",padding:"var(--sp-2)"},children:[v.jsxDEV("div",{style:{fontFamily:"var(--font-mono)",fontSize:"1.2rem",fontWeight:700,color:"var(--accent)"},children:A??0},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:217,columnNumber:15},this),v.jsxDEV("div",{style:bc,children:D},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:223,columnNumber:15},this)]},D,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:211,columnNumber:13},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:204,columnNumber:9},this),y&&v.jsxDEV("div",{style:{...fd,borderColor:"var(--status-error)",color:"var(--status-error)",fontSize:"0.8rem"},children:y},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:231,columnNumber:9},this),v.jsxDEV("div",{style:{flex:1,overflow:"auto",display:"flex",flexDirection:"column",gap:"var(--sp-2)"},children:[d.length===0&&!g&&!y&&v.jsxDEV("div",{style:{textAlign:"center",padding:"var(--sp-4)",color:"var(--text-muted)",fontSize:"0.85rem"},children:"Enter a query to search the knowledge base."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:244,columnNumber:11},this),d.map((D,A)=>{var M;return v.jsxDEV("div",{style:fd,children:[v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",marginBottom:"var(--sp-1)"},children:[v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",fontWeight:700,background:"var(--accent)",color:"var(--text-inverse)",padding:"2px 6px",borderRadius:"var(--radius-xs)",minWidth:38,textAlign:"center"},children:typeof D.score=="number"?D.score.toFixed(2):"—"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:256,columnNumber:15},this),v.jsxDEV("span",{style:{fontWeight:600,fontSize:"0.85rem",color:"var(--text-primary)"},children:D.document_title||"Untitled"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:269,columnNumber:15},this),D.source_type&&v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)",background:"var(--surface-3)",padding:"1px 5px",borderRadius:"var(--radius-xs)"},children:D.source_type},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:277,columnNumber:17},this),D.squad_name&&v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)"},children:["squad:",D.squad_name]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:289,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:255,columnNumber:13},this),v.jsxDEV("div",{style:{fontSize:"0.8rem",color:"var(--text-secondary)",lineHeight:1.5},children:((M=D.content)==null?void 0:M.length)>200?D.content.slice(0,200)+"...":D.content},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:298,columnNumber:13},this)]},A,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:254,columnNumber:11},this)})]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:242,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:161,columnNumber:5},this)}function ple(){const[t,e]=O.useState(""),[n,i]=O.useState(""),[o,l]=O.useState(""),[d,f]=O.useState([]),[h,p]=O.useState(!1),[g,x]=O.useState(""),[y,E]=O.useState(""),N=O.useCallback(async()=>{try{const A=await fetch("/api/knowledge/documents",{credentials:"include"});if(A.ok){const M=await A.json();f(M.documents||M)}}catch{}},[]);O.useEffect(()=>{N()},[N]);const T=async()=>{if(o.trim()){p(!0),x(""),E("");try{const A={content:o};t.trim()&&(A.title=t.trim()),n.trim()&&(A.squad_name=n.trim());const M=await fetch("/api/knowledge/ingest-text",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)});if(!M.ok)throw new Error(`Ingest failed: ${M.status}`);E("Content ingested successfully."),e(""),l(""),i(""),N()}catch(A){x(A.message||"Ingest failed")}finally{p(!1)}}},D=async A=>{if(confirm("Delete this document?"))try{const M=await fetch(`/api/knowledge/documents/${A}`,{method:"DELETE",credentials:"include"});if(!M.ok)throw new Error(`Delete failed: ${M.status}`);N()}catch(M){x(M.message||"Delete failed")}};return v.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-3)",height:"100%"},children:[v.jsxDEV("div",{style:fd,children:[v.jsxDEV("div",{style:{display:"flex",gap:"var(--sp-2)",marginBottom:"var(--sp-2)"},children:[v.jsxDEV("div",{style:{flex:1},children:[v.jsxDEV("div",{style:bc,children:"Title"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:387,columnNumber:13},this),v.jsxDEV("input",{style:Qg,value:t,onChange:A=>e(A.target.value),placeholder:"Document title"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:388,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:386,columnNumber:11},this),v.jsxDEV("div",{style:{flex:1},children:[v.jsxDEV("div",{style:bc,children:"Squad (optional)"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:396,columnNumber:13},this),v.jsxDEV("input",{style:Qg,value:n,onChange:A=>i(A.target.value),placeholder:"squad name"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:397,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:395,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:385,columnNumber:9},this),v.jsxDEV("div",{style:bc,children:"Content"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:405,columnNumber:9},this),v.jsxDEV("textarea",{style:{...Qg,minHeight:100,resize:"vertical",fontFamily:"var(--font-mono)"},value:o,onChange:A=>l(A.target.value),placeholder:"Paste content to ingest..."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:406,columnNumber:9},this),v.jsxDEV("div",{style:{marginTop:"var(--sp-2)",display:"flex",gap:"var(--sp-2)",alignItems:"center"},children:[v.jsxDEV("button",{style:CD,onClick:T,disabled:h,children:h?"Ingesting...":"Ingest"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:418,columnNumber:11},this),y&&v.jsxDEV("span",{style:{fontSize:"0.8rem",color:"var(--status-active)"},children:y},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:421,columnNumber:23},this),g&&v.jsxDEV("span",{style:{fontSize:"0.8rem",color:"var(--status-error)"},children:g},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:422,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:417,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:384,columnNumber:7},this),v.jsxDEV("div",{style:{...fd,flex:1,overflow:"auto",padding:0},children:[v.jsxDEV("div",{style:{padding:"var(--sp-2) var(--sp-3)",borderBottom:"1px solid var(--border-subtle)"},children:v.jsxDEV("span",{style:bc,children:["Documents (",d.length,")"]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:432,columnNumber:11},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:428,columnNumber:9},this),v.jsxDEV("div",{style:{overflow:"auto"},children:v.jsxDEV("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"0.8rem"},children:[v.jsxDEV("thead",{children:v.jsxDEV("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:["ID","Title","Source","Extraction","Ingested",""].map(A=>v.jsxDEV("th",{style:{textAlign:"left",padding:"6px var(--sp-2)",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",fontWeight:500},children:A},A,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:439,columnNumber:19},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:437,columnNumber:15},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:436,columnNumber:13},this),v.jsxDEV("tbody",{children:[d.length===0&&v.jsxDEV("tr",{children:v.jsxDEV("td",{colSpan:6,style:{padding:"var(--sp-3)",textAlign:"center",color:"var(--text-muted)"},children:"No documents ingested yet."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:455,columnNumber:19},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:454,columnNumber:17},this),d.map(A=>{var M;return v.jsxDEV("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[v.jsxDEV("td",{style:{padding:"6px var(--sp-2)",fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)"},children:[(M=A.id)==null?void 0:M.slice(0,8),"..."]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:466,columnNumber:19},this),v.jsxDEV("td",{style:{padding:"6px var(--sp-2)",color:"var(--text-primary)"},children:A.title||"Untitled"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:474,columnNumber:19},this),v.jsxDEV("td",{style:{padding:"6px var(--sp-2)",fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-secondary)"},children:A.source_type},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:477,columnNumber:19},this),v.jsxDEV("td",{style:{padding:"6px var(--sp-2)",fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:A.extraction_status==="done"?"var(--status-active)":"var(--status-warning)"},children:A.extraction_status},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:485,columnNumber:19},this),v.jsxDEV("td",{style:{padding:"6px var(--sp-2)",fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)"},children:A.ingested_at?new Date(A.ingested_at).toLocaleString():"—"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:493,columnNumber:19},this),v.jsxDEV("td",{style:{padding:"6px var(--sp-2)"},children:v.jsxDEV("button",{style:hle,onClick:()=>D(A.id),children:"Delete"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:502,columnNumber:21},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:501,columnNumber:19},this)]},A.id,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:465,columnNumber:17},this)})]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:452,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:435,columnNumber:11},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:434,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:427,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:382,columnNumber:5},this)}function gle(){const[t,e]=O.useState(""),[n,i]=O.useState([]),[o,l]=O.useState(null),[d,f]=O.useState([]),[h,p]=O.useState(!1),[g,x]=O.useState(!1),[y,E]=O.useState(""),N=O.useCallback(async()=>{p(!0),E("");try{const D=new URLSearchParams({limit:"50"});t.trim()&&D.set("type",t.trim());const A=await fetch(`/api/knowledge/entities?${D}`,{credentials:"include"});if(!A.ok)throw new Error(`Failed to load entities: ${A.status}`);const M=await A.json();i(M.entities||M)}catch(D){E(D.message||"Failed to load entities"),i([])}finally{p(!1)}},[t]);O.useEffect(()=>{N()},[N]);const T=async D=>{l(D),x(!0),f([]);try{const A=await fetch(`/api/knowledge/entities/${D.id}/relations`,{credentials:"include"});if(!A.ok)throw new Error(`Failed to load relations: ${A.status}`);const M=await A.json();f(M.relations||M)}catch(A){E(A.message||"Failed to load relations")}finally{x(!1)}};return v.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-3)",height:"100%"},children:[v.jsxDEV("div",{style:{...fd,display:"flex",gap:"var(--sp-2)",alignItems:"flex-end"},children:[v.jsxDEV("div",{style:{minWidth:160},children:[v.jsxDEV("div",{style:bc,children:"Entity Type Filter"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:570,columnNumber:11},this),v.jsxDEV("input",{style:Qg,value:t,onChange:D=>e(D.target.value),placeholder:"e.g. person, concept"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:571,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:569,columnNumber:9},this),v.jsxDEV("button",{style:CD,onClick:N,disabled:h,children:h?"Loading...":"Filter"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:578,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:568,columnNumber:7},this),y&&v.jsxDEV("div",{style:{...fd,borderColor:"var(--status-error)",color:"var(--status-error)",fontSize:"0.8rem"},children:y},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:584,columnNumber:9},this),v.jsxDEV("div",{style:{flex:1,overflow:"auto",display:"flex",flexDirection:"column",gap:0},children:v.jsxDEV("div",{style:fd,children:[v.jsxDEV("div",{style:{...bc,marginBottom:"var(--sp-2)"},children:["Entities (",n.length,")"]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:597,columnNumber:11},this),n.length===0&&!h&&v.jsxDEV("div",{style:{color:"var(--text-muted)",fontSize:"0.85rem",textAlign:"center",padding:"var(--sp-3)"},children:"No entities found."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:601,columnNumber:13},this),v.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-1)"},children:n.map(D=>v.jsxDEV("div",{onClick:()=>T(D),style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"6px var(--sp-2)",borderRadius:"var(--radius-xs)",cursor:"pointer",background:(o==null?void 0:o.id)===D.id?"var(--accent-glow)":"transparent",border:(o==null?void 0:o.id)===D.id?"1px solid var(--accent)":"1px solid transparent",transition:"all var(--duration-fast) var(--ease-out)"},children:[v.jsxDEV("span",{style:{fontWeight:600,fontSize:"0.85rem",color:(o==null?void 0:o.id)===D.id?"var(--accent)":"var(--text-primary)",flex:1},children:D.name},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:622,columnNumber:17},this),v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",background:"var(--surface-3)",padding:"1px 6px",borderRadius:"var(--radius-xs)"},children:D.type},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:630,columnNumber:17},this),v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)",minWidth:30,textAlign:"right"},children:D.mention_count},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:640,columnNumber:17},this)]},D.id,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:607,columnNumber:15},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:605,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:596,columnNumber:9},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:595,columnNumber:7},this),o&&v.jsxDEV("div",{style:fd,children:[v.jsxDEV("div",{style:{...bc,marginBottom:"var(--sp-2)"},children:['Relations for "',o.name,'"',g&&v.jsxDEV("span",{style:{marginLeft:8,color:"var(--text-muted)"},children:"loading..."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:660,columnNumber:34},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:658,columnNumber:11},this),d.length===0&&!g&&v.jsxDEV("div",{style:{color:"var(--text-muted)",fontSize:"0.8rem"},children:"No relations found."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:663,columnNumber:13},this),v.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-1)"},children:d.map((D,A)=>v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"4px var(--sp-2)",fontSize:"0.8rem",borderBottom:"1px solid var(--border-subtle)"},children:[v.jsxDEV("span",{style:{color:"var(--accent)",fontWeight:600},children:D.source_name},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:677,columnNumber:17},this),v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)",background:"var(--surface-3)",padding:"1px 6px",borderRadius:"var(--radius-xs)"},children:D.relation_type},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:678,columnNumber:17},this),v.jsxDEV("span",{style:{color:"var(--text-primary)",fontWeight:600},children:D.target_name},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:688,columnNumber:17},this),v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",marginLeft:"auto"},children:["w:",typeof D.weight=="number"?D.weight.toFixed(2):"—"]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:689,columnNumber:17},this)]},D.id||A,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:669,columnNumber:15},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:667,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:657,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:566,columnNumber:5},this)}function ble(){const[t,e]=O.useState("explorer");return v.jsxDEV("div",{style:{height:"100%",display:"flex",flexDirection:"column",background:"var(--surface-1)",color:"var(--text-primary)"},children:[v.jsxDEV("div",{style:dle,children:[["explorer","Explorer"],["ingest","Ingest"],["graph","Graph"]].map(([n,i])=>v.jsxDEV("button",{style:fle(t===n),onClick:()=>e(n),children:i},n,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:726,columnNumber:11},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:720,columnNumber:7},this),v.jsxDEV("div",{style:{flex:1,overflow:"auto",padding:"var(--sp-3)"},children:[t==="explorer"&&v.jsxDEV(mle,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:742,columnNumber:32},this),t==="ingest"&&v.jsxDEV(ple,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:743,columnNumber:30},this),t==="graph"&&v.jsxDEV(gle,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:744,columnNumber:29},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:737,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:712,columnNumber:5},this)}const xle=localStorage.getItem("expx-theme")||"dark";document.documentElement.setAttribute("data-theme",xle);const yle=O.lazy(()=>Gf(()=>import("./JarvisView-Bn7dwIiz.js"),[]).then(t=>({default:t.JarvisView})));$8.createRoot(document.getElementById("root")).render(v.jsxDEV(O.StrictMode,{children:v.jsxDEV(bL,{children:v.jsxDEV($B,{children:[v.jsxDEV(ys,{path:"/login",element:v.jsxDEV(u7,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:32,columnNumber:39},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:32,columnNumber:9},void 0),v.jsxDEV(ys,{path:"/",element:v.jsxDEV(a7,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:33,columnNumber:34},void 0),children:[v.jsxDEV(ys,{index:!0,element:v.jsxDEV(GB,{to:"/office",replace:!0},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:34,columnNumber:33},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:34,columnNumber:11},void 0),v.jsxDEV(ys,{path:"office",element:v.jsxDEV(OG,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:35,columnNumber:41},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:35,columnNumber:11},void 0),v.jsxDEV(ys,{path:"chat",element:v.jsxDEV(pee,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:36,columnNumber:39},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:36,columnNumber:11},void 0),v.jsxDEV(ys,{path:"kanban",element:v.jsxDEV(yee,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:37,columnNumber:41},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:37,columnNumber:11},void 0),v.jsxDEV(ys,{path:"settings",element:v.jsxDEV(Ree,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:38,columnNumber:43},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:38,columnNumber:11},void 0),v.jsxDEV(ys,{path:"scheduler",element:v.jsxDEV(Vee,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:39,columnNumber:44},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:39,columnNumber:11},void 0),v.jsxDEV(ys,{path:"email",element:v.jsxDEV(zee,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:40,columnNumber:40},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:40,columnNumber:11},void 0),v.jsxDEV(ys,{path:"orgchart",element:v.jsxDEV(Qae,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:41,columnNumber:43},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:41,columnNumber:11},void 0),v.jsxDEV(ys,{path:"graph",element:v.jsxDEV(tle,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:42,columnNumber:40},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:42,columnNumber:11},void 0),v.jsxDEV(ys,{path:"files",element:v.jsxDEV(nle,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:43,columnNumber:40},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:43,columnNumber:11},void 0),v.jsxDEV(ys,{path:"dashboard",element:v.jsxDEV(sle,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:44,columnNumber:44},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:44,columnNumber:11},void 0),v.jsxDEV(ys,{path:"docs",element:v.jsxDEV(ale,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:45,columnNumber:39},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:45,columnNumber:11},void 0),v.jsxDEV(ys,{path:"knowledge",element:v.jsxDEV(ble,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:46,columnNumber:44},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:46,columnNumber:11},void 0),v.jsxDEV(ys,{path:"marketplace",element:v.jsxDEV(J6,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:47,columnNumber:46},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:47,columnNumber:11},void 0),v.jsxDEV(ys,{path:"jarvis",element:v.jsxDEV(O.Suspense,{fallback:null,children:v.jsxDEV(yle,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:48,columnNumber:67},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:48,columnNumber:41},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:48,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:33,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:31,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:30,columnNumber:5},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:29,columnNumber:3},void 0));export{nH as $,G5 as A,B1 as B,es as C,ll as D,pd as E,Kf as F,ha as G,y9 as H,ej as I,ZL as J,r_ as K,ZV as L,Sn as M,vN as N,ZR as O,ao as P,H5 as Q,$T as R,_9 as S,ur as T,jN as U,cu as V,U5 as W,sR as X,W9 as Y,Z9 as Z,sH as _,Ele as a,sD as a0,sb as a1,T7 as a2,n_ as a3,JR as a4,lH as a5,pa as a6,u5 as a7,uu as a8,rD as a9,UV as aa,nv as ab,Hq as ac,oI as ad,OV as ae,bC as af,zV as ag,lI as ah,ev as ai,_i as aj,f5 as ak,dq as al,Y5 as am,Bn as an,t_ as ao,pi as ap,d9 as aq,o9 as ar,k9 as as,N9 as at,Q9 as au,J9 as av,oH as aw,iH as ax,aH as ay,oC as b,ou as c,Us as d,HI as e,fa as f,jI as g,gi as h,pr as i,v as j,yN as k,hn as l,d5 as m,SH as n,oD as o,pH as p,aD as q,O as r,G3 as s,E5 as t,TN as u,Zr as v,Ho as w,qy as x,q7 as y,Ps as z};
|
|
1155
|
+
Refresh the page to see it in your squads list.`)}else{const P=await B.json();alert(`Failed to install: ${P.error}`)}}catch{alert("Failed to install squad")}finally{y(null)}}}function M(j){j.preventDefault(),D()}return v.jsxDEV("div",{style:{padding:"var(--sp-6)",maxWidth:1200,margin:"0 auto"},children:[v.jsxDEV("div",{style:{marginBottom:"var(--sp-6)"},children:[v.jsxDEV("h1",{style:{fontFamily:"var(--font-display)",fontSize:"1.5rem",fontWeight:700,marginBottom:"var(--sp-2)"},children:"🏪 Squad Marketplace"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:121,columnNumber:9},this),v.jsxDEV("p",{style:{color:"var(--text-muted)",fontSize:"0.9rem"},children:"Discover, share, and install AI agent squads from the community."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:129,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:120,columnNumber:7},this),v.jsxDEV("form",{onSubmit:M,style:{display:"flex",gap:"var(--sp-3)",marginBottom:"var(--sp-4)"},children:[v.jsxDEV("input",{type:"text",placeholder:"Search squads...",value:f,onChange:j=>h(j.target.value),style:{flex:1,padding:"8px 12px",borderRadius:6,border:"1px solid var(--border-subtle)",background:"var(--surface-2)",color:"var(--text-primary)",fontSize:"0.9rem"}},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:140,columnNumber:9},this),v.jsxDEV("button",{type:"submit",style:{padding:"8px 16px",borderRadius:6,border:"none",background:"var(--accent)",color:"var(--text-inverse)",cursor:"pointer",fontWeight:600},children:"Search"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:155,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:135,columnNumber:7},this),v.jsxDEV("div",{style:{display:"flex",gap:"var(--sp-2)",marginBottom:"var(--sp-4)",flexWrap:"wrap"},children:[v.jsxDEV("button",{onClick:()=>{g(null),D()},style:{padding:"6px 12px",borderRadius:20,border:p===null?"2px solid var(--accent)":"1px solid var(--border-subtle)",background:p===null?"var(--accent-dim)":"transparent",color:p===null?"var(--accent)":"var(--text-secondary)",cursor:"pointer",fontSize:"0.8rem",fontWeight:p===null?600:400},children:"All"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:178,columnNumber:9},this),e.map(j=>v.jsxDEV("button",{onClick:()=>{g(j.id),D()},style:{padding:"6px 12px",borderRadius:20,border:p===j.id?"2px solid var(--accent)":"1px solid var(--border-subtle)",background:p===j.id?"var(--accent-dim)":"transparent",color:p===j.id?"var(--accent)":"var(--text-secondary)",cursor:"pointer",fontSize:"0.8rem",fontWeight:p===j.id?600:400},children:[j.icon," ",j.name]},j.id,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:194,columnNumber:11},this))]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:172,columnNumber:7},this),l?v.jsxDEV("div",{style:{textAlign:"center",padding:40,color:"var(--text-muted)"},children:"Loading squads..."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:215,columnNumber:9},this):i.length===0?v.jsxDEV("div",{style:{textAlign:"center",padding:60,color:"var(--text-muted)",border:"2px dashed var(--border-subtle)",borderRadius:12},children:[v.jsxDEV("div",{style:{fontSize:"3rem",marginBottom:"var(--sp-3)"},children:"📦"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:226,columnNumber:11},this),v.jsxDEV("p",{style:{fontSize:"1rem",marginBottom:"var(--sp-2)"},children:"No squads found"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:227,columnNumber:11},this),v.jsxDEV("p",{style:{fontSize:"0.85rem"},children:"Be the first to publish a squad to the marketplace!"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:228,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:219,columnNumber:9},this):v.jsxDEV("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gap:"var(--sp-4)"},children:i.map(j=>v.jsxDEV(lle,{squad:j,onInstall:()=>A(j),installing:x===j.id},j.id,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:239,columnNumber:13},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:233,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:114,columnNumber:5},this)}function lle({squad:t,onInstall:e,installing:n}){return v.jsxDEV("div",{style:{background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderRadius:12,padding:"var(--sp-4)",display:"flex",flexDirection:"column",gap:"var(--sp-3)"},children:[v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-3)"},children:[v.jsxDEV("div",{style:{width:40,height:40,borderRadius:8,background:"var(--accent-dim)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.2rem"},children:ule(t.icon||"default")},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:273,columnNumber:9},this),v.jsxDEV("div",{children:[v.jsxDEV("h3",{style:{fontWeight:600,fontSize:"0.95rem",marginBottom:2},children:t.name},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:286,columnNumber:11},this),v.jsxDEV("code",{style:{fontSize:"0.7rem",color:"var(--text-muted)",background:"var(--surface-3)",padding:"2px 6px",borderRadius:4},children:t.fullName},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:289,columnNumber:11},this),t.latestVersion&&v.jsxDEV("span",{style:{fontSize:"0.65rem",padding:"2px 6px",borderRadius:4,background:"var(--accent-dim)",color:"var(--accent)",marginLeft:4},children:["v",t.latestVersion]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:299,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:285,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:272,columnNumber:7},this),v.jsxDEV("p",{style:{fontSize:"0.85rem",color:"var(--text-secondary)",lineHeight:1.5,flex:1,overflow:"hidden",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical"},children:t.description},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:314,columnNumber:7},this),t.tags.length>0&&v.jsxDEV("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:t.tags.slice(0,3).map(i=>v.jsxDEV("span",{style:{fontSize:"0.65rem",padding:"2px 6px",borderRadius:4,background:"var(--surface-3)",color:"var(--text-muted)"},children:i},i,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:331,columnNumber:13},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:329,columnNumber:9},this),v.jsxDEV("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"0.75rem",color:"var(--text-muted)",paddingTop:"var(--sp-2)",borderTop:"1px solid var(--border-subtle)"},children:[v.jsxDEV("span",{children:["📥 ",t.downloads]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:356,columnNumber:9},this),v.jsxDEV("span",{children:["⭐ ",t.rating.toFixed(1)," (",t.ratingCount,")"]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:357,columnNumber:9},this),v.jsxDEV("span",{children:["@",t.scope]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:358,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:348,columnNumber:7},this),v.jsxDEV("button",{onClick:e,disabled:n,style:{padding:"8px 16px",borderRadius:6,border:"none",background:n?"var(--surface-3)":"var(--accent)",color:n?"var(--text-muted)":"var(--text-inverse)",cursor:n?"not-allowed":"pointer",fontWeight:600,fontSize:"0.85rem"},children:n?"Installing...":"Install Squad"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:362,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/MarketplaceView.tsx",lineNumber:262,columnNumber:5},this)}function ule(t){const e={rocket:"🚀",folder:"📁",code:"💻",chat:"💬",search:"🔍",chart:"📊",users:"👥",tools:"🔧",default:"📦"};return e[t]??e.default}const cle=Object.freeze(Object.defineProperty({__proto__:null,MarketplaceView:J6},Symbol.toStringTag,{value:"Module"})),dle={display:"flex",gap:"var(--sp-1)",padding:"var(--sp-2) var(--sp-3)",borderBottom:"1px solid var(--border-subtle)",background:"var(--surface-1)"};function fle(t){return{padding:"6px 16px",border:"none",borderBottom:t?"2px solid var(--accent)":"2px solid transparent",background:"none",color:t?"var(--accent)":"var(--text-secondary)",fontFamily:"var(--font-display)",fontSize:"0.82rem",fontWeight:t?600:400,cursor:"pointer",transition:"all var(--duration-fast) var(--ease-out)"}}const fd={background:"var(--surface-2)",border:"1px solid var(--border-subtle)",borderRadius:"var(--radius-sm)",padding:"var(--sp-3)"},Qg={background:"var(--surface-0)",border:"1px solid var(--border-default)",borderRadius:"var(--radius-xs)",padding:"6px 10px",color:"var(--text-primary)",fontFamily:"var(--font-mono)",fontSize:"0.8rem",outline:"none",width:"100%"},CD={padding:"6px 14px",background:"var(--accent)",color:"var(--text-inverse)",border:"none",borderRadius:"var(--radius-xs)",fontFamily:"var(--font-display)",fontSize:"0.8rem",fontWeight:600,cursor:"pointer",whiteSpace:"nowrap"},hle={...CD,background:"var(--status-error)",fontSize:"0.7rem",padding:"3px 8px"},bc={fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:4};function mle(){const[t,e]=O.useState(""),[n,i]=O.useState("auto"),[o,l]=O.useState(""),[d,f]=O.useState([]),[h,p]=O.useState(null),[g,x]=O.useState(!1),[y,E]=O.useState(""),N=O.useCallback(async()=>{try{const D=await fetch("/api/knowledge/stats",{credentials:"include"});if(D.ok){const A=await D.json();p(A)}}catch{}},[]);O.useEffect(()=>{N()},[N]);const T=async()=>{if(t.trim()){x(!0),E("");try{const D=new URLSearchParams({q:t,mode:n,limit:"10"});o.trim()&&D.set("squad",o.trim());const A=await fetch(`/api/knowledge/query?${D}`,{credentials:"include"});if(!A.ok)throw new Error(`Search failed: ${A.status}`);const M=await A.json();f(M.results||M)}catch(D){E(D.message||"Search failed"),f([])}finally{x(!1)}}};return v.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-3)",height:"100%"},children:[v.jsxDEV("div",{style:fd,children:v.jsxDEV("div",{style:{display:"flex",gap:"var(--sp-2)",alignItems:"flex-end",flexWrap:"wrap"},children:[v.jsxDEV("div",{style:{flex:1,minWidth:200},children:[v.jsxDEV("div",{style:bc,children:"Search Query"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:166,columnNumber:13},this),v.jsxDEV("input",{style:Qg,value:t,onChange:D=>e(D.target.value),placeholder:"Search knowledge base...",onKeyDown:D=>D.key==="Enter"&&T()},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:167,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:165,columnNumber:11},this),v.jsxDEV("div",{style:{minWidth:100},children:[v.jsxDEV("div",{style:bc,children:"Mode"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:176,columnNumber:13},this),v.jsxDEV("select",{style:{...Qg,width:"auto",minWidth:100},value:n,onChange:D=>i(D.target.value),children:[v.jsxDEV("option",{value:"auto",children:"Auto"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:182,columnNumber:15},this),v.jsxDEV("option",{value:"search",children:"Search"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:183,columnNumber:15},this),v.jsxDEV("option",{value:"graph",children:"Graph"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:184,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:177,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:175,columnNumber:11},this),v.jsxDEV("div",{style:{minWidth:120},children:[v.jsxDEV("div",{style:bc,children:"Squad (optional)"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:188,columnNumber:13},this),v.jsxDEV("input",{style:Qg,value:o,onChange:D=>l(D.target.value),placeholder:"filter by squad"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:189,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:187,columnNumber:11},this),v.jsxDEV("button",{style:CD,onClick:T,disabled:g,children:g?"Searching...":"Search"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:196,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:164,columnNumber:9},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:163,columnNumber:7},this),h&&v.jsxDEV("div",{style:{display:"flex",gap:"var(--sp-2)",flexWrap:"wrap"},children:[["Documents",h.documents],["Chunks",h.chunks],["Entities",h.entities],["Relations",h.relations]].map(([D,A])=>v.jsxDEV("div",{style:{...fd,flex:"1 1 120px",textAlign:"center",padding:"var(--sp-2)"},children:[v.jsxDEV("div",{style:{fontFamily:"var(--font-mono)",fontSize:"1.2rem",fontWeight:700,color:"var(--accent)"},children:A??0},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:217,columnNumber:15},this),v.jsxDEV("div",{style:bc,children:D},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:223,columnNumber:15},this)]},D,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:211,columnNumber:13},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:204,columnNumber:9},this),y&&v.jsxDEV("div",{style:{...fd,borderColor:"var(--status-error)",color:"var(--status-error)",fontSize:"0.8rem"},children:y},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:231,columnNumber:9},this),v.jsxDEV("div",{style:{flex:1,overflow:"auto",display:"flex",flexDirection:"column",gap:"var(--sp-2)"},children:[d.length===0&&!g&&!y&&v.jsxDEV("div",{style:{textAlign:"center",padding:"var(--sp-4)",color:"var(--text-muted)",fontSize:"0.85rem"},children:"Enter a query to search the knowledge base."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:244,columnNumber:11},this),d.map((D,A)=>{var M;return v.jsxDEV("div",{style:fd,children:[v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",marginBottom:"var(--sp-1)"},children:[v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",fontWeight:700,background:"var(--accent)",color:"var(--text-inverse)",padding:"2px 6px",borderRadius:"var(--radius-xs)",minWidth:38,textAlign:"center"},children:typeof D.score=="number"?D.score.toFixed(2):"—"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:256,columnNumber:15},this),v.jsxDEV("span",{style:{fontWeight:600,fontSize:"0.85rem",color:"var(--text-primary)"},children:D.document_title||"Untitled"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:269,columnNumber:15},this),D.source_type&&v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)",background:"var(--surface-3)",padding:"1px 5px",borderRadius:"var(--radius-xs)"},children:D.source_type},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:277,columnNumber:17},this),D.squad_name&&v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.6rem",color:"var(--text-muted)"},children:["squad:",D.squad_name]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:289,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:255,columnNumber:13},this),v.jsxDEV("div",{style:{fontSize:"0.8rem",color:"var(--text-secondary)",lineHeight:1.5},children:((M=D.content)==null?void 0:M.length)>200?D.content.slice(0,200)+"...":D.content},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:298,columnNumber:13},this)]},A,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:254,columnNumber:11},this)})]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:242,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:161,columnNumber:5},this)}function ple(){const[t,e]=O.useState(""),[n,i]=O.useState(""),[o,l]=O.useState(""),[d,f]=O.useState([]),[h,p]=O.useState(!1),[g,x]=O.useState(""),[y,E]=O.useState(""),N=O.useCallback(async()=>{try{const A=await fetch("/api/knowledge/documents",{credentials:"include"});if(A.ok){const M=await A.json();f(M.documents||M)}}catch{}},[]);O.useEffect(()=>{N()},[N]);const T=async()=>{if(o.trim()){p(!0),x(""),E("");try{const A={content:o};t.trim()&&(A.title=t.trim()),n.trim()&&(A.squad_name=n.trim());const M=await fetch("/api/knowledge/ingest-text",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)});if(!M.ok)throw new Error(`Ingest failed: ${M.status}`);E("Content ingested successfully."),e(""),l(""),i(""),N()}catch(A){x(A.message||"Ingest failed")}finally{p(!1)}}},D=async A=>{if(confirm("Delete this document?"))try{const M=await fetch(`/api/knowledge/documents/${A}`,{method:"DELETE",credentials:"include"});if(!M.ok)throw new Error(`Delete failed: ${M.status}`);N()}catch(M){x(M.message||"Delete failed")}};return v.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-3)",height:"100%"},children:[v.jsxDEV("div",{style:fd,children:[v.jsxDEV("div",{style:{display:"flex",gap:"var(--sp-2)",marginBottom:"var(--sp-2)"},children:[v.jsxDEV("div",{style:{flex:1},children:[v.jsxDEV("div",{style:bc,children:"Title"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:387,columnNumber:13},this),v.jsxDEV("input",{style:Qg,value:t,onChange:A=>e(A.target.value),placeholder:"Document title"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:388,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:386,columnNumber:11},this),v.jsxDEV("div",{style:{flex:1},children:[v.jsxDEV("div",{style:bc,children:"Squad (optional)"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:396,columnNumber:13},this),v.jsxDEV("input",{style:Qg,value:n,onChange:A=>i(A.target.value),placeholder:"squad name"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:397,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:395,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:385,columnNumber:9},this),v.jsxDEV("div",{style:bc,children:"Content"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:405,columnNumber:9},this),v.jsxDEV("textarea",{style:{...Qg,minHeight:100,resize:"vertical",fontFamily:"var(--font-mono)"},value:o,onChange:A=>l(A.target.value),placeholder:"Paste content to ingest..."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:406,columnNumber:9},this),v.jsxDEV("div",{style:{marginTop:"var(--sp-2)",display:"flex",gap:"var(--sp-2)",alignItems:"center"},children:[v.jsxDEV("button",{style:CD,onClick:T,disabled:h,children:h?"Ingesting...":"Ingest"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:418,columnNumber:11},this),y&&v.jsxDEV("span",{style:{fontSize:"0.8rem",color:"var(--status-active)"},children:y},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:421,columnNumber:23},this),g&&v.jsxDEV("span",{style:{fontSize:"0.8rem",color:"var(--status-error)"},children:g},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:422,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:417,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:384,columnNumber:7},this),v.jsxDEV("div",{style:{...fd,flex:1,overflow:"auto",padding:0},children:[v.jsxDEV("div",{style:{padding:"var(--sp-2) var(--sp-3)",borderBottom:"1px solid var(--border-subtle)"},children:v.jsxDEV("span",{style:bc,children:["Documents (",d.length,")"]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:432,columnNumber:11},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:428,columnNumber:9},this),v.jsxDEV("div",{style:{overflow:"auto"},children:v.jsxDEV("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"0.8rem"},children:[v.jsxDEV("thead",{children:v.jsxDEV("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:["ID","Title","Source","Extraction","Ingested",""].map(A=>v.jsxDEV("th",{style:{textAlign:"left",padding:"6px var(--sp-2)",fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.08em",fontWeight:500},children:A},A,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:439,columnNumber:19},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:437,columnNumber:15},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:436,columnNumber:13},this),v.jsxDEV("tbody",{children:[d.length===0&&v.jsxDEV("tr",{children:v.jsxDEV("td",{colSpan:6,style:{padding:"var(--sp-3)",textAlign:"center",color:"var(--text-muted)"},children:"No documents ingested yet."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:455,columnNumber:19},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:454,columnNumber:17},this),d.map(A=>{var M;return v.jsxDEV("tr",{style:{borderBottom:"1px solid var(--border-subtle)"},children:[v.jsxDEV("td",{style:{padding:"6px var(--sp-2)",fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)"},children:[(M=A.id)==null?void 0:M.slice(0,8),"..."]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:466,columnNumber:19},this),v.jsxDEV("td",{style:{padding:"6px var(--sp-2)",color:"var(--text-primary)"},children:A.title||"Untitled"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:474,columnNumber:19},this),v.jsxDEV("td",{style:{padding:"6px var(--sp-2)",fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-secondary)"},children:A.source_type},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:477,columnNumber:19},this),v.jsxDEV("td",{style:{padding:"6px var(--sp-2)",fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:A.extraction_status==="done"?"var(--status-active)":"var(--status-warning)"},children:A.extraction_status},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:485,columnNumber:19},this),v.jsxDEV("td",{style:{padding:"6px var(--sp-2)",fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)"},children:A.ingested_at?new Date(A.ingested_at).toLocaleString():"—"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:493,columnNumber:19},this),v.jsxDEV("td",{style:{padding:"6px var(--sp-2)"},children:v.jsxDEV("button",{style:hle,onClick:()=>D(A.id),children:"Delete"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:502,columnNumber:21},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:501,columnNumber:19},this)]},A.id,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:465,columnNumber:17},this)})]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:452,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:435,columnNumber:11},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:434,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:427,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:382,columnNumber:5},this)}function gle(){const[t,e]=O.useState(""),[n,i]=O.useState([]),[o,l]=O.useState(null),[d,f]=O.useState([]),[h,p]=O.useState(!1),[g,x]=O.useState(!1),[y,E]=O.useState(""),N=O.useCallback(async()=>{p(!0),E("");try{const D=new URLSearchParams({limit:"50"});t.trim()&&D.set("type",t.trim());const A=await fetch(`/api/knowledge/entities?${D}`,{credentials:"include"});if(!A.ok)throw new Error(`Failed to load entities: ${A.status}`);const M=await A.json();i(M.entities||M)}catch(D){E(D.message||"Failed to load entities"),i([])}finally{p(!1)}},[t]);O.useEffect(()=>{N()},[N]);const T=async D=>{l(D),x(!0),f([]);try{const A=await fetch(`/api/knowledge/entities/${D.id}/relations`,{credentials:"include"});if(!A.ok)throw new Error(`Failed to load relations: ${A.status}`);const M=await A.json();f(M.relations||M)}catch(A){E(A.message||"Failed to load relations")}finally{x(!1)}};return v.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-3)",height:"100%"},children:[v.jsxDEV("div",{style:{...fd,display:"flex",gap:"var(--sp-2)",alignItems:"flex-end"},children:[v.jsxDEV("div",{style:{minWidth:160},children:[v.jsxDEV("div",{style:bc,children:"Entity Type Filter"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:570,columnNumber:11},this),v.jsxDEV("input",{style:Qg,value:t,onChange:D=>e(D.target.value),placeholder:"e.g. person, concept"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:571,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:569,columnNumber:9},this),v.jsxDEV("button",{style:CD,onClick:N,disabled:h,children:h?"Loading...":"Filter"},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:578,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:568,columnNumber:7},this),y&&v.jsxDEV("div",{style:{...fd,borderColor:"var(--status-error)",color:"var(--status-error)",fontSize:"0.8rem"},children:y},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:584,columnNumber:9},this),v.jsxDEV("div",{style:{flex:1,overflow:"auto",display:"flex",flexDirection:"column",gap:0},children:v.jsxDEV("div",{style:fd,children:[v.jsxDEV("div",{style:{...bc,marginBottom:"var(--sp-2)"},children:["Entities (",n.length,")"]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:597,columnNumber:11},this),n.length===0&&!h&&v.jsxDEV("div",{style:{color:"var(--text-muted)",fontSize:"0.85rem",textAlign:"center",padding:"var(--sp-3)"},children:"No entities found."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:601,columnNumber:13},this),v.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-1)"},children:n.map(D=>v.jsxDEV("div",{onClick:()=>T(D),style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"6px var(--sp-2)",borderRadius:"var(--radius-xs)",cursor:"pointer",background:(o==null?void 0:o.id)===D.id?"var(--accent-glow)":"transparent",border:(o==null?void 0:o.id)===D.id?"1px solid var(--accent)":"1px solid transparent",transition:"all var(--duration-fast) var(--ease-out)"},children:[v.jsxDEV("span",{style:{fontWeight:600,fontSize:"0.85rem",color:(o==null?void 0:o.id)===D.id?"var(--accent)":"var(--text-primary)",flex:1},children:D.name},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:622,columnNumber:17},this),v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",background:"var(--surface-3)",padding:"1px 6px",borderRadius:"var(--radius-xs)"},children:D.type},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:630,columnNumber:17},this),v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)",minWidth:30,textAlign:"right"},children:D.mention_count},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:640,columnNumber:17},this)]},D.id,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:607,columnNumber:15},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:605,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:596,columnNumber:9},this)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:595,columnNumber:7},this),o&&v.jsxDEV("div",{style:fd,children:[v.jsxDEV("div",{style:{...bc,marginBottom:"var(--sp-2)"},children:['Relations for "',o.name,'"',g&&v.jsxDEV("span",{style:{marginLeft:8,color:"var(--text-muted)"},children:"loading..."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:660,columnNumber:34},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:658,columnNumber:11},this),d.length===0&&!g&&v.jsxDEV("div",{style:{color:"var(--text-muted)",fontSize:"0.8rem"},children:"No relations found."},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:663,columnNumber:13},this),v.jsxDEV("div",{style:{display:"flex",flexDirection:"column",gap:"var(--sp-1)"},children:d.map((D,A)=>v.jsxDEV("div",{style:{display:"flex",alignItems:"center",gap:"var(--sp-2)",padding:"4px var(--sp-2)",fontSize:"0.8rem",borderBottom:"1px solid var(--border-subtle)"},children:[v.jsxDEV("span",{style:{color:"var(--accent)",fontWeight:600},children:D.source_name},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:677,columnNumber:17},this),v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.7rem",color:"var(--text-muted)",background:"var(--surface-3)",padding:"1px 6px",borderRadius:"var(--radius-xs)"},children:D.relation_type},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:678,columnNumber:17},this),v.jsxDEV("span",{style:{color:"var(--text-primary)",fontWeight:600},children:D.target_name},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:688,columnNumber:17},this),v.jsxDEV("span",{style:{fontFamily:"var(--font-mono)",fontSize:"0.65rem",color:"var(--text-muted)",marginLeft:"auto"},children:["w:",typeof D.weight=="number"?D.weight.toFixed(2):"—"]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:689,columnNumber:17},this)]},D.id||A,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:669,columnNumber:15},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:667,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:657,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:566,columnNumber:5},this)}function ble(){const[t,e]=O.useState("explorer");return v.jsxDEV("div",{style:{height:"100%",display:"flex",flexDirection:"column",background:"var(--surface-1)",color:"var(--text-primary)"},children:[v.jsxDEV("div",{style:dle,children:[["explorer","Explorer"],["ingest","Ingest"],["graph","Graph"]].map(([n,i])=>v.jsxDEV("button",{style:fle(t===n),onClick:()=>e(n),children:i},n,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:726,columnNumber:11},this))},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:720,columnNumber:7},this),v.jsxDEV("div",{style:{flex:1,overflow:"auto",padding:"var(--sp-3)"},children:[t==="explorer"&&v.jsxDEV(mle,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:742,columnNumber:32},this),t==="ingest"&&v.jsxDEV(ple,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:743,columnNumber:30},this),t==="graph"&&v.jsxDEV(gle,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:744,columnNumber:29},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:737,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/views/KnowledgeView.tsx",lineNumber:712,columnNumber:5},this)}const xle=localStorage.getItem("expx-theme")||"dark";document.documentElement.setAttribute("data-theme",xle);const yle=O.lazy(()=>Gf(()=>import("./JarvisView-DY_DfOO_.js"),[]).then(t=>({default:t.JarvisView})));$8.createRoot(document.getElementById("root")).render(v.jsxDEV(O.StrictMode,{children:v.jsxDEV(bL,{children:v.jsxDEV($B,{children:[v.jsxDEV(ys,{path:"/login",element:v.jsxDEV(u7,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:32,columnNumber:39},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:32,columnNumber:9},void 0),v.jsxDEV(ys,{path:"/",element:v.jsxDEV(a7,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:33,columnNumber:34},void 0),children:[v.jsxDEV(ys,{index:!0,element:v.jsxDEV(GB,{to:"/office",replace:!0},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:34,columnNumber:33},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:34,columnNumber:11},void 0),v.jsxDEV(ys,{path:"office",element:v.jsxDEV(OG,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:35,columnNumber:41},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:35,columnNumber:11},void 0),v.jsxDEV(ys,{path:"chat",element:v.jsxDEV(pee,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:36,columnNumber:39},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:36,columnNumber:11},void 0),v.jsxDEV(ys,{path:"kanban",element:v.jsxDEV(yee,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:37,columnNumber:41},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:37,columnNumber:11},void 0),v.jsxDEV(ys,{path:"settings",element:v.jsxDEV(Ree,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:38,columnNumber:43},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:38,columnNumber:11},void 0),v.jsxDEV(ys,{path:"scheduler",element:v.jsxDEV(Vee,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:39,columnNumber:44},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:39,columnNumber:11},void 0),v.jsxDEV(ys,{path:"email",element:v.jsxDEV(zee,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:40,columnNumber:40},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:40,columnNumber:11},void 0),v.jsxDEV(ys,{path:"orgchart",element:v.jsxDEV(Qae,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:41,columnNumber:43},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:41,columnNumber:11},void 0),v.jsxDEV(ys,{path:"graph",element:v.jsxDEV(tle,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:42,columnNumber:40},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:42,columnNumber:11},void 0),v.jsxDEV(ys,{path:"files",element:v.jsxDEV(nle,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:43,columnNumber:40},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:43,columnNumber:11},void 0),v.jsxDEV(ys,{path:"dashboard",element:v.jsxDEV(sle,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:44,columnNumber:44},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:44,columnNumber:11},void 0),v.jsxDEV(ys,{path:"docs",element:v.jsxDEV(ale,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:45,columnNumber:39},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:45,columnNumber:11},void 0),v.jsxDEV(ys,{path:"knowledge",element:v.jsxDEV(ble,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:46,columnNumber:44},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:46,columnNumber:11},void 0),v.jsxDEV(ys,{path:"marketplace",element:v.jsxDEV(J6,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:47,columnNumber:46},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:47,columnNumber:11},void 0),v.jsxDEV(ys,{path:"jarvis",element:v.jsxDEV(O.Suspense,{fallback:null,children:v.jsxDEV(yle,{},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:48,columnNumber:67},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:48,columnNumber:41},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:48,columnNumber:11},void 0)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:33,columnNumber:9},void 0)]},void 0,!0,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:31,columnNumber:7},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:30,columnNumber:5},void 0)},void 0,!1,{fileName:"/Users/thuliobittencourt/Documents/Projetos/ExpxAgents_2/dashboard/src/main.tsx",lineNumber:29,columnNumber:3},void 0));export{nH as $,G5 as A,B1 as B,es as C,ll as D,pd as E,Kf as F,ha as G,y9 as H,ej as I,ZL as J,r_ as K,ZV as L,Sn as M,vN as N,ZR as O,ao as P,H5 as Q,$T as R,_9 as S,ur as T,jN as U,cu as V,U5 as W,sR as X,W9 as Y,Z9 as Z,sH as _,Ele as a,sD as a0,sb as a1,T7 as a2,n_ as a3,JR as a4,lH as a5,pa as a6,u5 as a7,uu as a8,rD as a9,UV as aa,nv as ab,Hq as ac,oI as ad,OV as ae,bC as af,zV as ag,lI as ah,ev as ai,_i as aj,f5 as ak,dq as al,Y5 as am,Bn as an,t_ as ao,pi as ap,d9 as aq,o9 as ar,k9 as as,N9 as at,Q9 as au,J9 as av,oH as aw,iH as ax,aH as ay,oC as b,ou as c,Us as d,HI as e,fa as f,jI as g,gi as h,pr as i,v as j,yN as k,hn as l,d5 as m,SH as n,oD as o,pH as p,aD as q,O as r,G3 as s,E5 as t,TN as u,Zr as v,Ho as w,qy as x,q7 as y,Ps as z};
|