autoglm-gui 1.2.1__py3-none-any.whl → 1.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. AutoGLM_GUI/adb_plus/__init__.py +6 -6
  2. AutoGLM_GUI/api/__init__.py +54 -16
  3. AutoGLM_GUI/api/agents.py +163 -209
  4. AutoGLM_GUI/api/dual_model.py +310 -0
  5. AutoGLM_GUI/api/mcp.py +134 -0
  6. AutoGLM_GUI/api/metrics.py +36 -0
  7. AutoGLM_GUI/config_manager.py +110 -6
  8. AutoGLM_GUI/dual_model/__init__.py +53 -0
  9. AutoGLM_GUI/dual_model/decision_model.py +664 -0
  10. AutoGLM_GUI/dual_model/dual_agent.py +917 -0
  11. AutoGLM_GUI/dual_model/protocols.py +354 -0
  12. AutoGLM_GUI/dual_model/vision_model.py +442 -0
  13. AutoGLM_GUI/exceptions.py +75 -3
  14. AutoGLM_GUI/metrics.py +283 -0
  15. AutoGLM_GUI/phone_agent_manager.py +264 -14
  16. AutoGLM_GUI/prompts.py +97 -0
  17. AutoGLM_GUI/schemas.py +40 -9
  18. AutoGLM_GUI/static/assets/{about-BtBH1xKN.js → about-Cj6QXqMf.js} +1 -1
  19. AutoGLM_GUI/static/assets/chat-BJeomZgh.js +124 -0
  20. AutoGLM_GUI/static/assets/dialog-CxJlnjzH.js +45 -0
  21. AutoGLM_GUI/static/assets/{index-B_AaKuOT.js → index-C_B-Arvf.js} +1 -1
  22. AutoGLM_GUI/static/assets/index-CxJQuE4y.js +12 -0
  23. AutoGLM_GUI/static/assets/index-Z0uYCPOO.css +1 -0
  24. AutoGLM_GUI/static/assets/{workflows-xX_QH-wI.js → workflows-BTiGCNI0.js} +1 -1
  25. AutoGLM_GUI/static/index.html +2 -2
  26. {autoglm_gui-1.2.1.dist-info → autoglm_gui-1.3.1.dist-info}/METADATA +90 -5
  27. {autoglm_gui-1.2.1.dist-info → autoglm_gui-1.3.1.dist-info}/RECORD +30 -20
  28. AutoGLM_GUI/static/assets/chat-DPzFNNGu.js +0 -124
  29. AutoGLM_GUI/static/assets/dialog-Dwuk2Hgl.js +0 -45
  30. AutoGLM_GUI/static/assets/index-BjYIY--m.css +0 -1
  31. AutoGLM_GUI/static/assets/index-CvQkCi2d.js +0 -11
  32. {autoglm_gui-1.2.1.dist-info → autoglm_gui-1.3.1.dist-info}/WHEEL +0 -0
  33. {autoglm_gui-1.2.1.dist-info → autoglm_gui-1.3.1.dist-info}/entry_points.txt +0 -0
  34. {autoglm_gui-1.2.1.dist-info → autoglm_gui-1.3.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,45 @@
1
+ import{c as K,j as l,p as C,r as i,a7 as rt,n as de,g as G,P as j,m as nt,f as at,i as Z,o as oe,J as ot,k as _,h as it,K as st,a8 as ct}from"./index-CxJQuE4y.js";const lt=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Fr=K("loader-circle",lt);const ut=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Lr=K("plus",ut);const dt=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Wr=K("trash-2",dt);const ft=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],vt=K("x",ft);function Br({className:e,type:t,...r}){return l.jsx("input",{type:t,"data-slot":"input",className:C("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}const mt=i.forwardRef(({className:e,...t},r)=>l.jsx("textarea",{className:C("flex min-h-[40px] w-full rounded-full border border-slate-200 bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-slate-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1d9bf0] focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-100 dark:ring-offset-slate-950 dark:placeholder:text-slate-400 dark:focus-visible:ring-[#1d9bf0] resize-none",e),ref:r,...t}));mt.displayName="Textarea";const pt=i.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:C("rounded-2xl border border-slate-200 bg-white text-slate-950 shadow-sm dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",e),...t}));pt.displayName="Card";const gt=i.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:C("flex flex-col space-y-1.5 p-6",e),...t}));gt.displayName="CardHeader";const ht=i.forwardRef(({className:e,...t},r)=>l.jsx("h3",{ref:r,className:C("text-xl font-semibold leading-none tracking-tight",e),...t}));ht.displayName="CardTitle";const yt=i.forwardRef(({className:e,...t},r)=>l.jsx("p",{ref:r,className:C("text-sm text-slate-500 dark:text-slate-400",e),...t}));yt.displayName="CardDescription";const bt=i.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:C("p-6 pt-0",e),...t}));bt.displayName="CardContent";const xt=i.forwardRef(({className:e,...t},r)=>l.jsx("div",{ref:r,className:C("flex items-center p-6 pt-0",e),...t}));xt.displayName="CardFooter";var wt="Label",Ee=i.forwardRef((e,t)=>l.jsx(rt.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));Ee.displayName=wt;var Ce=Ee;const Et=i.forwardRef(({className:e,...t},r)=>l.jsx(Ce,{ref:r,className:C("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-slate-900 dark:text-slate-100",e),...t}));Et.displayName=Ce.displayName;var q="focusScope.autoFocusOnMount",Q="focusScope.autoFocusOnUnmount",fe={bubbles:!1,cancelable:!0},Ct="FocusScope",Se=i.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...u}=e,[s,y]=i.useState(null),g=de(a),m=de(o),f=i.useRef(null),p=G(t,c=>y(c)),h=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(n){let c=function(x){if(h.paused||!s)return;const w=x.target;s.contains(w)?f.current=w:T(f.current,{select:!0})},d=function(x){if(h.paused||!s)return;const w=x.relatedTarget;w!==null&&(s.contains(w)||T(f.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const E of x)E.removedNodes.length>0&&T(s)};document.addEventListener("focusin",c),document.addEventListener("focusout",d);const b=new MutationObserver(v);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",d),b.disconnect()}}},[n,s,h.paused]),i.useEffect(()=>{if(s){me.add(h);const c=document.activeElement;if(!s.contains(c)){const v=new CustomEvent(q,fe);s.addEventListener(q,g),s.dispatchEvent(v),v.defaultPrevented||(St(Tt(Ne(s)),{select:!0}),document.activeElement===c&&T(s))}return()=>{s.removeEventListener(q,g),setTimeout(()=>{const v=new CustomEvent(Q,fe);s.addEventListener(Q,m),s.dispatchEvent(v),v.defaultPrevented||T(c??document.body,{select:!0}),s.removeEventListener(Q,m),me.remove(h)},0)}}},[s,g,m,h]);const S=i.useCallback(c=>{if(!r&&!n||h.paused)return;const d=c.key==="Tab"&&!c.altKey&&!c.ctrlKey&&!c.metaKey,v=document.activeElement;if(d&&v){const b=c.currentTarget,[x,w]=Nt(b);x&&w?!c.shiftKey&&v===w?(c.preventDefault(),r&&T(x,{select:!0})):c.shiftKey&&v===x&&(c.preventDefault(),r&&T(w,{select:!0})):v===b&&c.preventDefault()}},[r,n,h.paused]);return l.jsx(j.div,{tabIndex:-1,...u,ref:p,onKeyDown:S})});Se.displayName=Ct;function St(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(T(n,{select:t}),document.activeElement!==r)return}function Nt(e){const t=Ne(e),r=ve(t,e),n=ve(t.reverse(),e);return[r,n]}function Ne(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function ve(e,t){for(const r of e)if(!Rt(r,{upTo:t}))return r}function Rt(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Dt(e){return e instanceof HTMLInputElement&&"select"in e}function T(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Dt(e)&&t&&e.select()}}var me=kt();function kt(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=pe(e,t),e.unshift(t)},remove(t){e=pe(e,t),e[0]?.resume()}}}function pe(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Tt(e){return e.filter(t=>t.tagName!=="A")}var J=0;function Pt(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ge()),document.body.insertAdjacentElement("beforeend",e[1]??ge()),J++,()=>{J===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),J--}},[])}function ge(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var R=function(){return R=Object.assign||function(t){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},R.apply(this,arguments)};function Re(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function Mt(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,o;n<a;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var H="right-scroll-bar-position",U="width-before-scroll-bar",At="with-scroll-bars-hidden",Ot="--removed-body-scroll-bar-size";function ee(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function It(e,t){var r=i.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=t,r.facade}var jt=typeof window<"u"?i.useLayoutEffect:i.useEffect,he=new WeakMap;function _t(e,t){var r=It(null,function(n){return e.forEach(function(a){return ee(a,n)})});return jt(function(){var n=he.get(r);if(n){var a=new Set(n),o=new Set(e),u=r.current;a.forEach(function(s){o.has(s)||ee(s,null)}),o.forEach(function(s){a.has(s)||ee(s,u)})}he.set(r,e)},[e]),r}function Ft(e){return e}function Lt(e,t){t===void 0&&(t=Ft);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var u=t(o,n);return r.push(u),function(){r=r.filter(function(s){return s!==u})}},assignSyncMedium:function(o){for(n=!0;r.length;){var u=r;r=[],u.forEach(o)}r={push:function(s){return o(s)},filter:function(){return r}}},assignMedium:function(o){n=!0;var u=[];if(r.length){var s=r;r=[],s.forEach(o),u=r}var y=function(){var m=u;u=[],m.forEach(o)},g=function(){return Promise.resolve().then(y)};g(),r={push:function(m){u.push(m),g()},filter:function(m){return u=u.filter(m),r}}}};return a}function Wt(e){e===void 0&&(e={});var t=Lt(null);return t.options=R({async:!0,ssr:!1},e),t}var De=function(e){var t=e.sideCar,r=Re(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return i.createElement(n,R({},r))};De.isSideCarExport=!0;function Bt(e,t){return e.useMedium(t),De}var ke=Wt(),te=function(){},z=i.forwardRef(function(e,t){var r=i.useRef(null),n=i.useState({onScrollCapture:te,onWheelCapture:te,onTouchMoveCapture:te}),a=n[0],o=n[1],u=e.forwardProps,s=e.children,y=e.className,g=e.removeScrollBar,m=e.enabled,f=e.shards,p=e.sideCar,h=e.noRelative,S=e.noIsolation,c=e.inert,d=e.allowPinchZoom,v=e.as,b=v===void 0?"div":v,x=e.gapMode,w=Re(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,D=_t([r,t]),k=R(R({},w),a);return i.createElement(i.Fragment,null,m&&i.createElement(E,{sideCar:ke,removeScrollBar:g,shards:f,noRelative:h,noIsolation:S,inert:c,setCallbacks:o,allowPinchZoom:!!d,lockRef:r,gapMode:x}),u?i.cloneElement(i.Children.only(s),R(R({},k),{ref:D})):i.createElement(b,R({},k,{className:y,ref:D}),s))});z.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};z.classNames={fullWidth:U,zeroRight:H};var $t=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ht(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$t();return t&&e.setAttribute("nonce",t),e}function Ut(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Vt(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Kt=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Ht())&&(Ut(t,r),Vt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Gt=function(){var e=Kt();return function(t,r){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Te=function(){var e=Gt(),t=function(r){var n=r.styles,a=r.dynamic;return e(n,a),null};return t},zt={left:0,top:0,right:0,gap:0},re=function(e){return parseInt(e||"",10)||0},Xt=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[re(r),re(n),re(a)]},Yt=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zt;var t=Xt(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Zt=Te(),I="data-scroll-locked",qt=function(e,t,r,n){var a=e.left,o=e.top,u=e.right,s=e.gap;return r===void 0&&(r="margin"),`
2
+ .`.concat(At,` {
3
+ overflow: hidden `).concat(n,`;
4
+ padding-right: `).concat(s,"px ").concat(n,`;
5
+ }
6
+ body[`).concat(I,`] {
7
+ overflow: hidden `).concat(n,`;
8
+ overscroll-behavior: contain;
9
+ `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
10
+ padding-left: `.concat(a,`px;
11
+ padding-top: `).concat(o,`px;
12
+ padding-right: `).concat(u,`px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: `).concat(s,"px ").concat(n,`;
16
+ `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
17
+ }
18
+
19
+ .`).concat(H,` {
20
+ right: `).concat(s,"px ").concat(n,`;
21
+ }
22
+
23
+ .`).concat(U,` {
24
+ margin-right: `).concat(s,"px ").concat(n,`;
25
+ }
26
+
27
+ .`).concat(H," .").concat(H,` {
28
+ right: 0 `).concat(n,`;
29
+ }
30
+
31
+ .`).concat(U," .").concat(U,` {
32
+ margin-right: 0 `).concat(n,`;
33
+ }
34
+
35
+ body[`).concat(I,`] {
36
+ `).concat(Ot,": ").concat(s,`px;
37
+ }
38
+ `)},ye=function(){var e=parseInt(document.body.getAttribute(I)||"0",10);return isFinite(e)?e:0},Qt=function(){i.useEffect(function(){return document.body.setAttribute(I,(ye()+1).toString()),function(){var e=ye()-1;e<=0?document.body.removeAttribute(I):document.body.setAttribute(I,e.toString())}},[])},Jt=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,a=n===void 0?"margin":n;Qt();var o=i.useMemo(function(){return Yt(a)},[a]);return i.createElement(Zt,{styles:qt(o,!t,a,r?"":"!important")})},ae=!1;if(typeof window<"u")try{var L=Object.defineProperty({},"passive",{get:function(){return ae=!0,!0}});window.addEventListener("test",L,L),window.removeEventListener("test",L,L)}catch{ae=!1}var M=ae?{passive:!1}:!1,er=function(e){return e.tagName==="TEXTAREA"},Pe=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!er(e)&&r[t]==="visible")},tr=function(e){return Pe(e,"overflowY")},rr=function(e){return Pe(e,"overflowX")},be=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var a=Me(e,n);if(a){var o=Ae(e,n),u=o[1],s=o[2];if(u>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},nr=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},ar=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Me=function(e,t){return e==="v"?tr(t):rr(t)},Ae=function(e,t){return e==="v"?nr(t):ar(t)},or=function(e,t){return e==="h"&&t==="rtl"?-1:1},ir=function(e,t,r,n,a){var o=or(e,window.getComputedStyle(t).direction),u=o*n,s=r.target,y=t.contains(s),g=!1,m=u>0,f=0,p=0;do{if(!s)break;var h=Ae(e,s),S=h[0],c=h[1],d=h[2],v=c-d-o*S;(S||v)&&Me(e,s)&&(f+=v,p+=S);var b=s.parentNode;s=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!y&&s!==document.body||y&&(t.contains(s)||t===s));return(m&&Math.abs(f)<1||!m&&Math.abs(p)<1)&&(g=!0),g},W=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},xe=function(e){return[e.deltaX,e.deltaY]},we=function(e){return e&&"current"in e?e.current:e},sr=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cr=function(e){return`
39
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
40
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
+ `)},lr=0,A=[];function ur(e){var t=i.useRef([]),r=i.useRef([0,0]),n=i.useRef(),a=i.useState(lr++)[0],o=i.useState(Te)[0],u=i.useRef(e);i.useEffect(function(){u.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var c=Mt([e.lockRef.current],(e.shards||[]).map(we),!0).filter(Boolean);return c.forEach(function(d){return d.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),c.forEach(function(d){return d.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var s=i.useCallback(function(c,d){if("touches"in c&&c.touches.length===2||c.type==="wheel"&&c.ctrlKey)return!u.current.allowPinchZoom;var v=W(c),b=r.current,x="deltaX"in c?c.deltaX:b[0]-v[0],w="deltaY"in c?c.deltaY:b[1]-v[1],E,D=c.target,k=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in c&&k==="h"&&D.type==="range")return!1;var le=window.getSelection(),Y=le&&le.anchorNode,tt=Y?Y===D||Y.contains(D):!1;if(tt)return!1;var F=be(k,D);if(!F)return!0;if(F?E=k:(E=k==="v"?"h":"v",F=be(k,D)),!F)return!1;if(!n.current&&"changedTouches"in c&&(x||w)&&(n.current=E),!E)return!0;var ue=n.current||E;return ir(ue,d,c,ue==="h"?x:w)},[]),y=i.useCallback(function(c){var d=c;if(!(!A.length||A[A.length-1]!==o)){var v="deltaY"in d?xe(d):W(d),b=t.current.filter(function(E){return E.name===d.type&&(E.target===d.target||d.target===E.shadowParent)&&sr(E.delta,v)})[0];if(b&&b.should){d.cancelable&&d.preventDefault();return}if(!b){var x=(u.current.shards||[]).map(we).filter(Boolean).filter(function(E){return E.contains(d.target)}),w=x.length>0?s(d,x[0]):!u.current.noIsolation;w&&d.cancelable&&d.preventDefault()}}},[]),g=i.useCallback(function(c,d,v,b){var x={name:c,delta:d,target:v,should:b,shadowParent:dr(v)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(w){return w!==x})},1)},[]),m=i.useCallback(function(c){r.current=W(c),n.current=void 0},[]),f=i.useCallback(function(c){g(c.type,xe(c),c.target,s(c,e.lockRef.current))},[]),p=i.useCallback(function(c){g(c.type,W(c),c.target,s(c,e.lockRef.current))},[]);i.useEffect(function(){return A.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",y,M),document.addEventListener("touchmove",y,M),document.addEventListener("touchstart",m,M),function(){A=A.filter(function(c){return c!==o}),document.removeEventListener("wheel",y,M),document.removeEventListener("touchmove",y,M),document.removeEventListener("touchstart",m,M)}},[]);var h=e.removeScrollBar,S=e.inert;return i.createElement(i.Fragment,null,S?i.createElement(o,{styles:cr(a)}):null,h?i.createElement(Jt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function dr(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fr=Bt(ke,ur);var Oe=i.forwardRef(function(e,t){return i.createElement(z,R({},e,{ref:t,sideCar:fr}))});Oe.classNames=z.classNames;var vr=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},O=new WeakMap,B=new WeakMap,$={},ne=0,Ie=function(e){return e&&(e.host||Ie(e.parentNode))},mr=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Ie(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},pr=function(e,t,r,n){var a=mr(t,Array.isArray(e)?e:[e]);$[r]||($[r]=new WeakMap);var o=$[r],u=[],s=new Set,y=new Set(a),g=function(f){!f||s.has(f)||(s.add(f),g(f.parentNode))};a.forEach(g);var m=function(f){!f||y.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))m(p);else try{var h=p.getAttribute(n),S=h!==null&&h!=="false",c=(O.get(p)||0)+1,d=(o.get(p)||0)+1;O.set(p,c),o.set(p,d),u.push(p),c===1&&S&&B.set(p,!0),d===1&&p.setAttribute(r,"true"),S||p.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return m(t),s.clear(),ne++,function(){u.forEach(function(f){var p=O.get(f)-1,h=o.get(f)-1;O.set(f,p),o.set(f,h),p||(B.has(f)||f.removeAttribute(n),B.delete(f)),h||f.removeAttribute(r)}),ne--,ne||(O=new WeakMap,O=new WeakMap,B=new WeakMap,$={})}},gr=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=vr(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),pr(n,a,r,"aria-hidden")):function(){return null}},X="Dialog",[je]=at(X),[hr,N]=je(X),_e=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:o,modal:u=!0}=e,s=i.useRef(null),y=i.useRef(null),[g,m]=nt({prop:n,defaultProp:a??!1,onChange:o,caller:X});return l.jsx(hr,{scope:t,triggerRef:s,contentRef:y,contentId:Z(),titleId:Z(),descriptionId:Z(),open:g,onOpenChange:m,onOpenToggle:i.useCallback(()=>m(f=>!f),[m]),modal:u,children:r})};_e.displayName=X;var Fe="DialogTrigger",yr=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=N(Fe,r),o=G(t,a.triggerRef);return l.jsx(j.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":ce(a.open),...n,ref:o,onClick:_(e.onClick,a.onOpenToggle)})});yr.displayName=Fe;var ie="DialogPortal",[br,Le]=je(ie,{forceMount:void 0}),We=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,o=N(ie,t);return l.jsx(br,{scope:t,forceMount:r,children:i.Children.map(n,u=>l.jsx(oe,{present:r||o.open,children:l.jsx(ot,{asChild:!0,container:a,children:u})}))})};We.displayName=ie;var V="DialogOverlay",Be=i.forwardRef((e,t)=>{const r=Le(V,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=N(V,e.__scopeDialog);return o.modal?l.jsx(oe,{present:n||o.open,children:l.jsx(wr,{...a,ref:t})}):null});Be.displayName=V;var xr=it("DialogOverlay.RemoveScroll"),wr=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=N(V,r);return l.jsx(Oe,{as:xr,allowPinchZoom:!0,shards:[a.contentRef],children:l.jsx(j.div,{"data-state":ce(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),P="DialogContent",$e=i.forwardRef((e,t)=>{const r=Le(P,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,o=N(P,e.__scopeDialog);return l.jsx(oe,{present:n||o.open,children:o.modal?l.jsx(Er,{...a,ref:t}):l.jsx(Cr,{...a,ref:t})})});$e.displayName=P;var Er=i.forwardRef((e,t)=>{const r=N(P,e.__scopeDialog),n=i.useRef(null),a=G(t,r.contentRef,n);return i.useEffect(()=>{const o=n.current;if(o)return gr(o)},[]),l.jsx(He,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:_(e.onCloseAutoFocus,o=>{o.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:_(e.onPointerDownOutside,o=>{const u=o.detail.originalEvent,s=u.button===0&&u.ctrlKey===!0;(u.button===2||s)&&o.preventDefault()}),onFocusOutside:_(e.onFocusOutside,o=>o.preventDefault())})}),Cr=i.forwardRef((e,t)=>{const r=N(P,e.__scopeDialog),n=i.useRef(!1),a=i.useRef(!1);return l.jsx(He,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(n.current||r.triggerRef.current?.focus(),o.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const u=o.target;r.triggerRef.current?.contains(u)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&a.current&&o.preventDefault()}})}),He=i.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:o,...u}=e,s=N(P,r),y=i.useRef(null),g=G(t,y);return Pt(),l.jsxs(l.Fragment,{children:[l.jsx(Se,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:o,children:l.jsx(st,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ce(s.open),...u,ref:g,onDismiss:()=>s.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(Sr,{titleId:s.titleId}),l.jsx(Rr,{contentRef:y,descriptionId:s.descriptionId})]})]})}),se="DialogTitle",Ue=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=N(se,r);return l.jsx(j.h2,{id:a.titleId,...n,ref:t})});Ue.displayName=se;var Ve="DialogDescription",Ke=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=N(Ve,r);return l.jsx(j.p,{id:a.descriptionId,...n,ref:t})});Ke.displayName=Ve;var Ge="DialogClose",ze=i.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=N(Ge,r);return l.jsx(j.button,{type:"button",...n,ref:t,onClick:_(e.onClick,()=>a.onOpenChange(!1))})});ze.displayName=Ge;function ce(e){return e?"open":"closed"}var Xe="DialogTitleWarning",[$r,Ye]=ct(Xe,{contentName:P,titleName:se,docsSlug:"dialog"}),Sr=({titleId:e})=>{const t=Ye(Xe),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
+
43
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
+
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Nr="DialogDescriptionWarning",Rr=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ye(Nr).contentName}}.`;return i.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Dr=_e,kr=We,Ze=Be,qe=$e,Qe=Ue,Je=Ke,Tr=ze;const Hr=Dr,Pr=kr,et=i.forwardRef(({className:e,...t},r)=>l.jsx(Ze,{ref:r,className:C("fixed inset-0 z-50 bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));et.displayName=Ze.displayName;const Mr=i.forwardRef(({className:e,children:t,...r},n)=>l.jsxs(Pr,{children:[l.jsx(et,{}),l.jsxs(qe,{ref:n,className:C("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg max-h-[90vh] translate-x-[-50%] translate-y-[-50%] gap-4 border border-slate-200 bg-white p-6 shadow-lg duration-200 overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-2xl dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",e),...r,children:[t,l.jsxs(Tr,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-[#1d9bf0] focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-slate-100 data-[state=open]:text-slate-500 dark:ring-offset-slate-950 dark:focus:ring-[#1d9bf0] dark:data-[state=open]:bg-slate-800 dark:data-[state=open]:text-slate-400",children:[l.jsx(vt,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Mr.displayName=qe.displayName;const Ar=({className:e,...t})=>l.jsx("div",{className:C("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ar.displayName="DialogHeader";const Or=({className:e,...t})=>l.jsx("div",{className:C("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Or.displayName="DialogFooter";const Ir=i.forwardRef(({className:e,...t},r)=>l.jsx(Qe,{ref:r,className:C("text-lg font-semibold leading-none tracking-tight",e),...t}));Ir.displayName=Qe.displayName;const jr=i.forwardRef(({className:e,...t},r)=>l.jsx(Je,{ref:r,className:C("text-sm text-slate-500 dark:text-slate-400",e),...t}));jr.displayName=Je.displayName;export{pt as C,Hr as D,Se as F,Br as I,Fr as L,Lr as P,Oe as R,Wr as T,gt as a,ht as b,bt as c,Mr as d,Ar as e,Ir as f,Et as g,mt as h,Or as i,jr as j,gr as k,Pt as u};
@@ -1 +1 @@
1
- import{a1 as o,r as s,j as t}from"./index-CvQkCi2d.js";function n(){const e=o();return s.useEffect(()=>{e({to:"/chat"})},[e]),t.jsx("div",{className:"p-2",children:t.jsx("h3",{children:"Welcome Home!"})})}export{n as component};
1
+ import{a9 as o,r as s,j as t}from"./index-CxJQuE4y.js";function n(){const e=o();return s.useEffect(()=>{e({to:"/chat"})},[e]),t.jsx("div",{className:"p-2",children:t.jsx("h3",{children:"Welcome Home!"})})}export{n as component};