From 3f2ca50a44aba219cdc1543e3d888497462eaf89 Mon Sep 17 00:00:00 2001 From: puke Date: Tue, 11 Feb 2025 17:14:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9post-build=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/copilot_web/App-D3fkqP0i.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dist/copilot_web/App-D3fkqP0i.js b/dist/copilot_web/App-D3fkqP0i.js index 1057cf3..c706c65 100644 --- a/dist/copilot_web/App-D3fkqP0i.js +++ b/dist/copilot_web/App-D3fkqP0i.js @@ -1,2 +1,6 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/workflowChat-DE__rDPG.js","copilot_web/input.js","copilot_web/assets/input-D5oDpccX.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["copilot_web/workflowChat-DE__rDPG.js","copilot_web/input.js","copilot_web/assets/input-D5oDpccX.css"].map(path => { + const apiBase = window.comfyAPI?.api?.api?.api_base; + const prefix = apiBase ? `${apiBase.substring(1)}/` : ''; + return `${prefix}${path}`; + }))))=>i.map(i=>d[i]); import{r as t,j as s,R as p,_ as v}from"./input.js";const w=9999999,E=p.lazy(()=>v(()=>import("./workflowChat-DE__rDPG.js"),__vite__mapDeps([0,1,2])));function y(){const d=t.useRef(null),[f,a]=t.useState(!1),[r,c]=t.useState(),[o,u]=t.useState(!1),[i,m]=t.useState({x:0,y:0});t.useEffect(()=>{c({x:window.innerWidth-160,y:20})},[]);const h=e=>{e.preventDefault(),u(!0);const n=e.currentTarget.getBoundingClientRect();m({x:e.clientX-n.left,y:e.clientY-n.top})};return t.useEffect(()=>{const e=l=>{if(o){const x=Math.min(Math.max(0,l.clientX-i.x),window.innerWidth-100),g=Math.min(Math.max(0,l.clientY-i.y),window.innerHeight-40);c({x,y:g})}},n=()=>{u(!1)};return o&&(document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)),()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n)}},[o,i]),r?s.jsx("div",{ref:d,children:s.jsxs("div",{className:"fixed",style:{zIndex:w,left:r.x,top:r.y,cursor:o?"grabbing":"grab"},children:[s.jsx("button",{onMouseDown:h,onClick:()=>a(!0),className:"px-4 py-2 border border-gray-300 rounded-md bg-white text-black hover:bg-green-600 transition-colors select-none",children:"copilot"}),s.jsx(E,{onClose:()=>a(!1),visible:f})]})}):null}export{y as default};