(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,659635,e=>{"use strict";var t,r=e.i(16043),n=e.i(997932),i=e.i(389475),o=e.i(815922),s=e.i(533124),l=e.i(788968),a=e.i(113739),u=e.i(132887),c=e.i(957854),d=e.i(811673),f=e.i(93836),m=e.i(393298),p=e.i(700788),h=e.i(141436),x=e.i(967090),g=e.i(621441),v=e.i(76129),b=e.i(581065);function y(e,t){return e-t}function w(e,t,r,n,i,o){let s=(0,l.f)(e,r,n);if(!i)return s;let a=o.slice();return a[t]=(0,l.f)(s,o[t-1]??-1/0,o[t+1]??1/0),a.sort(y)}function j(e,t,r){if(!Array.isArray(e))return!0;let n=t*r;for(let t=0;t=n))return!1;return!0}var N=e.i(825086);let S=()=>null,k={activeThumbIndex:S,max:S,min:S,minStepsBetweenValues:S,step:S,values:S,...N.s};var _=e.i(107397);let C=r.createContext(void 0);function B(){let e=r.useContext(C);if(void 0===e)throw Error((0,_.f)(62));return e}var A=e.i(111407),E=e.i(24220),E=E,z=e.i(356919),T=e.i(659350);let R=r.forwardRef(function(e,t){let{"aria-labelledby":N,className:S,defaultValue:_,disabled:B=!1,id:R,format:M,largeStep:q=10,locale:I,render:L,max:V=100,min:P=0,minStepsBetweenValues:F=0,form:D,name:O,onValueChange:$,onValueCommitted:W,orientation:U="horizontal",step:K=1,thumbCollisionBehavior:G="push",thumbAlignment:Y="center",value:H,style:J,...X}=e,Z=(0,d.f)(R),Q=(0,b.u)(Z),ee=(0,o.f)($),et=(0,o.f)(W),{clearErrors:er}=(0,g.f)(),{state:en,disabled:ei,name:eo,setTouched:es,setDirty:el,validityData:ea,validation:eu}=(0,h.f)(),{labelId:ec}=(0,v.f)(),[ed,ef]=r.useState(),em=N??(0,b.$)(ec,ed),ep=ei||B,eh=eo??O,[ex,eg]=(0,i.f)({controlled:H,default:_??P,name:"Slider"}),ev=r.useRef(null),eb=r.useRef(null),ey=r.useRef([]),ew=r.useRef(null),ej=r.useRef(-1),eN=r.useRef(null),eS=r.useRef(A.f.none),[ek,e_]=r.useState(-1),[eC,eB]=r.useState(-1),[eA,eE]=r.useState(!1),[ez,eT]=r.useState(()=>new Map),[eR,eM]=r.useState([void 0,void 0]),eq=(0,o.f)(e=>{e_(e),-1!==e&&eB(e)}),eI=(0,o.f)(e=>{e&&(eb.current=e)}),eL=Array.isArray(ex),eV=r.useMemo(()=>eL?ex.map(e=>(0,l.f)(e,P,V)).sort(y):[(0,l.f)(ex,P,V)],[V,P,eL,ex]),eP=eL?eV:eV[0];(0,x.f)(eu.inputRef,Z,eP,void 0,!ep,O),(0,c.f)(eP,()=>{er(eh),eu.change(eP);let e=ea.initialValue;el(Array.isArray(eP)&&Array.isArray(e)?!(0,a.f)(eP,e):eP!==e)});let eF=(0,o.f)((e,t)=>{var r,n;if(Number.isNaN(e)||(r=e)===(n=ex)||Array.isArray(r)&&Array.isArray(n)&&(0,a.f)(r,n))return!1;let i=t.event,o=new i.constructor(i.type,i);return Object.defineProperty(o,"target",{writable:!0,value:{value:e,name:eh}}),t.event=o,ee(e,t),!t.isCanceled&&(eS.current=t.reason,eg(e),!0)}),eD=(0,o.f)((e,t,r)=>{let n=w(e,t,P,V,eL,eV);if(j(n,K,F)){let e="key"in r?z.f.keyboard:E.inputChange,i=eF(n,(0,u.j)(e,r.nativeEvent,void 0,{activeThumbIndex:t}));es(!0),i&&et(n,(0,u.U)(e,r.nativeEvent))}});(0,s.f)(()=>{if(!ep)return;let e=(0,m.T)((0,n.f)(ev.current));(0,m.I)(ev.current,e)&&e.blur(),-1!==ek&&eq(-1)},[ek,ep,eq]);let eO=r.useMemo(()=>({...en,activeThumbIndex:ek,disabled:ep,dragging:eA,orientation:U,max:V,min:P,minStepsBetweenValues:F,step:K,values:eV}),[en,ek,ep,eA,V,P,F,U,K,eV]),e$=r.useMemo(()=>({active:ek,controlRef:eb,disabled:ep,dragging:eA,validation:eu,format:M,handleInputChange:eD,indicatorPosition:eR,inset:"center"!==Y,isArrayValue:eL,labelId:em,rootLabelId:Q,largeStep:q,lastUsedThumbIndex:eC,lastChangeReasonRef:eS,form:D,locale:I,max:V,min:P,minStepsBetweenValues:F,name:eh,onValueCommitted:et,orientation:U,pressedThumbCenterOffsetRef:ew,pressedThumbIndexRef:ej,pressedValuesRef:eN,registerFieldControlRef:eI,renderBeforeHydration:"edge"===Y,setActive:eq,setDragging:eE,setIndicatorPosition:eM,setLabelId:ef,setValue:eF,state:eO,step:K,thumbCollisionBehavior:G,thumbMap:ez,thumbRefs:ey,values:eV}),[ek,em,Q,ep,eA,eu,M,eD,eR,q,eC,D,I,V,P,F,eh,et,U,eL,eI,eq,eF,eO,K,G,Y,ez,eV]),eW=(0,f.a)("div",e,{state:eO,ref:[t,ev],props:[{"aria-labelledby":em,id:Z,role:"group"},X,e=>eu.getValidationProps(ep,e)],stateAttributesMapping:k});return(0,T.jsx)(C.Provider,{value:e$,children:(0,T.jsx)(p.f,{elementsRef:ey,onMapChange:eT,children:eW})})});var M=e.i(807257),q=e.i(976987),I=e.i(223732),L=e.i(792343),V=e.i(195845),P=E,F=E,D=e.i(269098);function O(e,t){let r=e.getBoundingClientRect();return t?(r.top+r.bottom)/2:(r.left+r.right)/2}function $(e){if(0===e)return 0;if(1>Math.abs(e)){let t=e.toExponential().split("e-"),r=t[0].split(".")[1];return(r?r.length:0)+parseInt(t[1],10)}let t=e.toString().split(".")[1];return t?t.length:0}function W(e,t,r){return Number((Math.round((e-r)/t)*t+r).toFixed(Math.max($(t),$(r))))}function U(e,t,r,n,i,o,s,a){let u=e.slice(),c=o*s,d=u.length-1,f=a??e;u[t]=(0,l.f)(r,n+t*c,i-(d-t)*c);for(let e=t+1;e<=d;e+=1){let t=u[e-1]+c,r=i-(d-e)*c,n=f[e],o=Math.max(u[e],t);n=0;e-=1){let t=u[e+1]-c,r=n+e*c,i=f[e],o=Math.min(u[e],t);i>o&&(o=Math.min(i,t)),u[e]=(0,l.f)(o,r,t)}for(let e=0;e<=d;e+=1)u[e]=Number(u[e].toFixed(12));return u}function K(e,t){if(null!=t.current&&e.changedTouches){for(let r=0;r1,Q="vertical"===N,ee=r.useRef(null),et=r.useRef(null),er=(0,o.f)(e=>{e&&null==et.current&&(et.current=(0,I.f)(e).getComputedStyle(e))}),en=r.useRef(null),ei=r.useRef(0),eo=r.useRef(0),es=r.useRef(null),el=r.useRef(!1),ea=(0,V.f)(J);function eu(e){return e?.querySelector('input[type="range"]')}function ec(e){_.current=e,H.current[e]||(S.current=null)}function ed(){_.current=-1,S.current=null}function ef(e){return!!(0,M.m)(e)&&H.current.some(t=>!!(0,M.m)(t)&&!!(0,m.I)(t,e)&&eu(t)?.disabled===!0)}function em(e){let t=ee.current,r=_.current;if(!t||r<0||r>=J.length)return r>=J.length&&(es.current=null),null;let{width:n,height:i,bottom:o,left:s,right:a}=t.getBoundingClientRect(),u=function(e,t){if(!e)return{start:0,end:0};function r(e){let t=null!=e?parseFloat(e):0;return Number.isNaN(t)?0:t}let n=t?"Top":"InlineStart",i=t?"Bottom":"InlineEnd";return{start:r(e[`border${n}Width`])+r(e[`padding${n}`]),end:r(e[`border${i}Width`])+r(e[`padding${i}`])}}(et.current,Q),c=eo.current,d=(Q?i:n)-u.start-u.end-2*c,f=S.current??0,m=e.x-f,p=e.y-f,h=Q?o-p-u.end:("rtl"===X?a-m:m-s)-u.start,g=(v-b)*(0,l.f)((h-c)/d,0,1)+b;return(g=W(g,G,b),g=(0,l.f)(g,b,v),Z)?function(e,t,r,n,i,o,s,a,u,c){let d=r??t,f=n??t;if(!(d.length>1))return{value:o,thumbIndex:0,didSwap:!1};let m=u*c;if("push"===e)return{value:U(d,i,o,s,a,u,c),thumbIndex:i,didSwap:!1};let p=d.slice(),h=p[i-1],x=p[i+1],g=null!=h?h+m:s,v=null!=x?x-m:a,b=Number((0,l.f)(o,g,v).toFixed(12));if(p[i]=b,"swap"!==e)return{value:p,thumbIndex:i,didSwap:!1};{let e=d[i],t=o>e,r=o=x-1e-7,g=r&&null!=h&&o<=h+1e-7;if(!n&&!g)return{value:p,thumbIndex:i,didSwap:!1};let v=n?i+1:i-1,y=p.map((e,t)=>{if(t===i)return b;let r=f[t];return null!=r?r:d[t]}),w=o;w=n?Math.max(o,p[v]):Math.min(o,p[v]);let j=U(p,v,w,s,a,u,c,y),N=n?v-1:v+1,S=j[N-1],k=j[N+1],_=null!=S?S+m:s;_=Math.max(_,s+N*m);let C=null!=k?k-m:a;C=Math.min(C,a-(j.length-1-N)*m);let B=(0,l.f)(b,_,C);return j[N]=Number(B.toFixed(12)),{value:j,thumbIndex:v,didSwap:!0}}}(Y,J,ea.current,C.current,r,g,b,v,G,y):{value:x?[g]:g,thumbIndex:r,didSwap:!1}}function ep(e){C.current=Z?J.slice():null,es.current=null,ea.current=J;let t=_.current,r=t;if(t>-1&&t0&&J[e-1]===v;)e-=1;r=e}}else{let t,n=Q?"y":"x";r=-1;for(let i=0;i-1&&r!==t&&ec(r),h){let e=H.current[r];(0,M.m)(e)&&(eo.current=e.getBoundingClientRect()[Q?"height":"width"]/2)}}function eh(e){let t=eu(H.current?.[e]);t&&t.focus({preventScroll:!0,focusVisible:!1})}function ex(e,t,r){let n=R(e.value,(0,u.j)(t,r,void 0,{activeThumbIndex:e.thumbIndex}));return n&&(es.current=e.value,ea.current=Array.isArray(e.value)?e.value:[e.value],e.didSwap&&(ec(e.thumbIndex),eh(e.thumbIndex))),n}let eg=(0,o.f)(e=>{let t=K(e,en);if(null==t)return;if(ei.current+=1,"pointermove"===e.type&&0===e.buttons)return void ev(e);let r=em(t);null!=r&&j(r.value,G,y)&&(!p&&ei.current>2&&T(!0),ex(r,P.drag,e))}),ev=(0,o.f)(e=>{if(null==K(e,en))return;z(-1),T(!1),S.current=null;let t=es.current;if(Array.isArray(t)&&t.length!==J.length&&(es.current=null),null!=es.current){let t=g.current;w(es.current,(0,u.U)(t,e))}"pointerType"in e&&ee.current?.hasPointerCapture(e.pointerId)&&ee.current?.releasePointerCapture(e.pointerId),_.current=-1,ew()}),eb=(0,o.f)(e=>{null==en.current&&ev(e)}),ey=(0,o.f)(e=>{let t=el.current;if(el.current=!1,d)return;if(ef((0,m.Z)(e)))return void ed();let r=e.changedTouches[0];if(null==r)return;if(en.current=r.identifier,!t){let t={x:r.clientX,y:r.clientY};ep(t);let n=em(t);if(null==n)return;eh(n.thumbIndex),ex(n,F.trackPress,e),ei.current=0}let i=(0,n.f)(ee.current);i.addEventListener("touchmove",eg,{passive:!0}),i.addEventListener("touchend",ev,{passive:!0}),i.addEventListener("touchcancel",ev,{passive:!0})}),ew=(0,o.f)(()=>{let e=(0,n.f)(ee.current);e.removeEventListener("pointermove",eg),e.removeEventListener("pointerup",ev),e.removeEventListener("pointercancel",eb),e.removeEventListener("touchmove",eg),e.removeEventListener("touchend",ev),e.removeEventListener("touchcancel",ev),en.current=null,C.current=null,es.current=null,el.current=!1}),ej=(0,L.z)();return r.useEffect(()=>{let e=ee.current;if(!e)return()=>ew();let t=(0,q.f)(e,"touchstart",ey,{passive:!0});return()=>{t(),ej.cancel(),ew()}},[ew,ey,ee,ej]),r.useEffect(()=>{d&&ew()},[d,ew]),(0,f.a)("div",e,{state:$,ref:[t,A,ee,er],props:[{"data-base-ui-slider-control":E?"":void 0,onPointerDown(e){var t;el.current=!1;let r=ee.current,i=(0,m.Z)(e.nativeEvent);if(!r||d||e.defaultPrevented||!(0,M.m)(i)||0!==e.button)return;if(ef(i))return void ed();let o={x:e.clientX,y:e.clientY};ep(o);let s=em(o);if(null==s)return;(0,m.I)(H.current[s.thumbIndex],(0,m.T)((0,n.f)(r)))?e.preventDefault():ej.request(()=>{eh(s.thumbIndex)}),T(!0),null==S.current&&ex(s,F.trackPress,e.nativeEvent),e.nativeEvent.pointerId&&r.setPointerCapture(e.nativeEvent.pointerId),ei.current=0,el.current="touch"===(t=e.pointerType)||"pen"===t;let l=(0,n.f)(r);l.addEventListener("pointermove",eg,{passive:!0}),l.addEventListener("pointerup",ev,{once:!0}),l.addEventListener("pointercancel",eb,{once:!0})}},c],stateAttributesMapping:k})}),Y=r.forwardRef(function(e,t){let{render:r,className:n,style:i,...o}=e,{state:s}=B();return(0,f.a)("div",e,{state:s,ref:t,props:[{style:{position:"relative"}},o],stateAttributesMapping:k})});var H=e.i(82153),J=e.i(367898),X=e.i(150649),Z=e.i(869057),Q=e.i(195618),ee=e.i(668641),et=e.i(966980),er=e.i(597233),en=e.i(485997),ei=e.i(856465),eo=e.i(176322),es=e.i(227012),el=e.i(461430);let ea=new Set([...er.J,er.v,er.I]),eu=r.forwardRef(function(e,n){let i,a,u,{render:c,children:p,className:x,"aria-describedby":g,"aria-label":v,"aria-labelledby":b,"aria-valuetext":y,disabled:j=!1,getAriaLabel:N,getAriaValueText:S,id:_,index:C,inputRef:A,onBlur:E,onFocus:z,onKeyDown:R,tabIndex:M,style:q,...L}=e,V=(0,d.f)(_),{active:P,lastUsedThumbIndex:F,controlRef:U,disabled:K,validation:G,format:Y,handleInputChange:eu,inset:ec,isArrayValue:ed,labelId:ef,largeStep:em,locale:ep,max:eh,min:ex,minStepsBetweenValues:eg,form:ev,name:eb,orientation:ey,pressedThumbCenterOffsetRef:ew,pressedThumbIndexRef:ej,renderBeforeHydration:eN,setActive:eS,setIndicatorPosition:ek,state:e_,step:eC,thumbRefs:eB,values:eA}=B(),eE=(0,D.f)(),ez=j||K,eT=eA.length>1,eR="vertical"===ey,eM="rtl"===eE,{setTouched:eq,validationMode:eI}=(0,h.f)(),eL=r.useRef(null),eV=r.useRef(null),eP=(0,eo.f)(ez,eV),eF=r.useRef(!1),eD=(0,o.f)(e=>{eF.current||z?.(e)}),eO=(0,o.f)(e=>{eF.current||E?.(e)}),e$=(0,d.f)(),eW=(0,el.f)(),eU=eT?e$:eW,eK=r.useMemo(()=>({inputId:eU}),[eU]),{ref:eG,index:eY}=(0,en.f)({metadata:eK}),eH=eT?C??eY:0,eJ=eH===eA.length-1,eX=eA[eH],eZ=(0,et.f)(eX,ex,eh),[eQ,e0]=r.useState(),e1=(0,ee.f)(),e2=F>=0&&F{let e=U.current,t=eL.current;if(!e||!t)return;let r=t.getBoundingClientRect(),n=e.getBoundingClientRect(),i=eR?"height":"width",o=n[i]-r[i],s=(r[i]/2+o*eZ/100)/n[i]*100,l=Number.isFinite(s)?s:void 0;e0(l),0===eH?ek(e=>[l,e[1]]):eJ&&ek(e=>[e[0],l])});(0,s.f)(()=>{ec&&queueMicrotask(e3)},[e3,ec]),(0,s.f)(()=>{ec&&e3()},[e3,ec,eZ]),(0,s.f)(()=>{if(!ec)return;let e=U.current,t=eL.current;if(!e||!t)return;let r=(0,I.f)(e).ResizeObserver;if("function"!=typeof r)return;let n=new r(e3);return n.observe(e),n.observe(t),()=>{n.disconnect()}},[U,e3,ec]);let e5=eR?"bottom":"insetInlineStart",e6=eR?"left":"top";eT?P===eH?i=2:e2===eH&&(i=1):P===eH&&(i=1),a=ec||Number.isFinite(eZ)?{position:"absolute",[e5]:ec?"var(--position)":`${eZ}%`,[e6]:"50%",translate:`${(eR||!eM?-1:1)*50}% ${(eR?1:-1)*50}%`,zIndex:i,...ec&&{"--position":`${eQ??0}%`,visibility:eN&&e1||void 0===eQ?"hidden":void 0}}:J.p,eR&&(u=eM?"vertical-rl":"vertical-lr");let e4="function"==typeof N?N(eH):v,e7=(0,Q.w)({"aria-label":e4,"aria-labelledby":b??(null==e4?ef:void 0),"aria-describedby":g,"aria-orientation":ey,"aria-valuenow":eX,"aria-valuetext":"function"==typeof S?S((0,Z.f)(eX,ep,Y),eX,eH):y??function(e,t,r,n){if(!(t<0))return 2===e.length?`${(0,Z.f)(e[t],n,r)} ${0===t?"start":"end"} range`:r?(0,Z.f)(e[t],n,r):void 0}(eA,eH,Y,ep),disabled:ez,form:ev,id:eU,max:eh,min:ex,name:eb,onChange(e){eu(e.currentTarget.valueAsNumber,eH,e)},onFocus(e){let t=eF.current;eF.current=!1,eS(eH),eP(!0),t&&e.stopPropagation()},onBlur(e){eF.current?e.stopPropagation():(eS(-1),eB.current.some(t=>(0,m.I)(t,e.relatedTarget))||(eq(!0),eP(!1),"onBlur"===eI&&G.commit(w(eX,eH,ex,eh,ed,eA))))},onKeyDown(e){var t;let r;if(e.defaultPrevented||!ea.has(e.key))return;er.J.has(e.key)&&e.stopPropagation();let n=null,i=0,o=e.shiftKey?em:eC,s=W(eX,eC,ex);switch(e.key){case er.V:i=1;break;case er.q:i=eM?-1:1;break;case er.e:i=-1;break;case er.b:i=eM?1:-1;break;case er.v:o=em,i=1;break;case er.I:o=em,i=-1;break;case er.C:n=eT&&Number.isFinite(eA[eH+1])?eA[eH+1]-eC*eg:eh;break;case er.Z:n=eT&&Number.isFinite(eA[eH-1])?eA[eH-1]+eC*eg:ex}if(0!==i&&(r=Number((s+(t=o)*i).toFixed(Math.max($(s),$(t),$(ex)))),n=(0,l.f)(r,ex,eh)),null!==n){let t=e.currentTarget;(0,es.F)(t)||(eF.current=!0,t.blur(),t.focus({preventScroll:!0,focusVisible:!0})),eu(n,eH,e),e.preventDefault()}},step:eC,style:{...J.p,width:"100%",height:"100%",writingMode:u},tabIndex:M,type:"range",value:eX??""},e=>G.getValidationProps(ez,e),{onFocus:eD,onBlur:eO,onKeyDown:R}),e9=(0,H.A)(eV,G.inputRef,A);return(0,f.a)("div",e,{state:e_,ref:[n,eG,eL],props:[{"data-index":eH,children:(0,T.jsxs)(r.Fragment,{children:[p,(0,T.jsx)("input",{ref:e9,...e7,suppressHydrationWarning:!0}),ec&&eJ&&eN&&(t||(t=(0,T.jsx)(ei.f,{script:X.f})))]}),id:V,onPointerDown(e){if(ez)return;ej.current=eH;let t=O(e.currentTarget,eR);ew.current=(eR?e.clientY:e.clientX)-t},style:a,suppressHydrationWarning:eN||void 0},L],stateAttributesMapping:k})}),ec=r.forwardRef(function(e,t){var r,n,i;let o,s,l,{render:a,className:u,style:c,...d}=e,{indicatorPosition:m,inset:p,max:h,min:x,orientation:g,renderBeforeHydration:v,state:b,values:y}=B(),w=(0,ee.f)(),j=y.length>1,N=(r="vertical"===g,n=p?m[0]:(0,et.f)(y[0],x,h),i=p?m[1]:(0,et.f)(y[y.length-1],x,h),o={visibility:p&&v&&w||p&&(void 0===n||j&&void 0===i)?"hidden":void 0,position:r?"absolute":"relative",[r?"width":"height"]:"inherit"},s=`${n??0}%`,l=`${(i??0)-(n??0)}%`,p&&(o["--start-position"]=s,s="var(--start-position)",j&&(o["--relative-size"]=l,l="var(--relative-size)")),o[r?"bottom":"insetInlineStart"]=j?s:0,o[r?"height":"width"]=j?l:s,o);return(0,f.a)("div",e,{state:b,ref:t,props:[{"data-base-ui-slider-indicator":v?"":void 0,style:N,suppressHydrationWarning:v||void 0},d],stateAttributesMapping:k})});e.s(["Control",0,G,"Indicator",0,ec,"Root",0,R,"Thumb",0,eu,"Track",0,Y],659635)},89427,e=>{"use strict";var t=e.i(659635);e.s(["f",0,t])},940815,e=>{"use strict";var t=e.i(659635);e.s(["f",0,t])},789073,e=>{"use strict";var t=e.i(659635);e.s(["f",0,t])},678541,e=>{"use strict";var t=e.i(659635);e.s(["f",0,t])},790316,e=>{"use strict";var t=e.i(659635);e.s(["f",0,t])},609303,e=>{"use strict";var t=e.i(16043);let r=t.forwardRef(function({title:e,titleId:r,...n},i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":r},n),e?t.createElement("title",{id:r},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))});e.s(["f",0,r],609303)},338749,e=>{"use strict";var t=e.i(16043);let r=t.forwardRef(function({title:e,titleId:r,...n},i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":r},n),e?t.createElement("title",{id:r},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"}))});e.s(["f",0,r],338749)},657288,e=>{"use strict";var t=e.i(16043);let r=t.forwardRef(function({title:e,titleId:r,...n},i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":r},n),e?t.createElement("title",{id:r},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))});e.s(["f",0,r],657288)},795647,e=>{"use strict";var t=e.i(16043);let r=t.forwardRef(function({title:e,titleId:r,...n},i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":r},n),e?t.createElement("title",{id:r},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))});e.s(["f",0,r],795647)},279496,e=>{"use strict";var t=e.i(16043);let r=t.forwardRef(function({title:e,titleId:r,...n},i){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:i,"aria-labelledby":r},n),e?t.createElement("title",{id:r},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))});e.s(["f",0,r],279496)},49505,e=>{"use strict";var t=e.i(651681);let r={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};r.node;let n=(0,t.f)(r);e.s(["f",0,n],49505)},82045,e=>{"use strict";var t=e.i(659350),r=e.i(663456),n=e.i(874511),i=e.i(6045),o=e.i(653706),s=e.i(509849),l=e.i(161892),a=e.i(899575),u=e.i(823471);let c=e.i(533739).f;e.s(["Backdrop",()=>i.f,"Close",()=>o.f,"Description",()=>s.f,"Popup",()=>l.f,"Portal",()=>a.f,"Root",0,function(e){return(0,n.f)("alert-dialog",e)},"Title",()=>u.f,"Trigger",0,c],359661);var d=e.i(359661),d=d,f=d,m=d,p=d,h=d,x=d,g=d,v=e.i(136562),b=e.i(801127),y=e.i(857162),w=e.i(80676),j=e.i(374696),N=e.i(261499);let S=d.Root,k=f.Portal;function _(e){let n,i,o,s,l,a=(0,r.c)(10);return a[0]!==e?({className:n,ref:o,...i}=e,a[0]=e,a[1]=n,a[2]=i,a[3]=o):(n=a[1],i=a[2],o=a[3]),a[4]!==n?(s=(0,v.f)("fixed inset-0 z-alert bg-black/50",N.u,n),a[4]=n,a[5]=s):s=a[5],a[6]!==i||a[7]!==o||a[8]!==s?(l=(0,t.jsx)(m.Backdrop,{className:s,"data-slot":"alert-dialog-overlay",...i,forceRender:!0,ref:o}),a[6]=i,a[7]=o,a[8]=s,a[9]=l):l=a[9],l}e.s(["m",0,S,"s",0,function(e){let n,i,o,s,l,a,u=(0,r.c)(12);u[0]!==e?({className:n,ref:o,variant:s,...i}=e,u[0]=e,u[1]=n,u[2]=i,u[3]=o,u[4]=s):(n=u[1],i=u[2],o=u[3],s=u[4]);let c=void 0===s?"default":s;return u[5]!==n||u[6]!==c?(l=(0,v.f)((0,b.i)({size:"sm",variant:c}),n),u[5]=n,u[6]=c,u[7]=l):l=u[7],u[8]!==i||u[9]!==o||u[10]!==l?(a=(0,t.jsx)(g.Close,{ref:o,className:l,...i}),u[8]=i,u[9]=o,u[10]=l,u[11]=a):a=u[11],a},"D",0,function(e){let n,i,o,s,l,a=(0,r.c)(10);return a[0]!==e?({className:n,ref:o,...i}=e,a[0]=e,a[1]=n,a[2]=i,a[3]=o):(n=a[1],i=a[2],o=a[3]),a[4]!==n?(s=(0,v.f)((0,b.i)({variant:"outline",size:"sm"}),"mt-2 sm:mt-0",n),a[4]=n,a[5]=s):s=a[5],a[6]!==i||a[7]!==o||a[8]!==s?(l=(0,t.jsx)(g.Close,{ref:o,className:s,...i}),a[6]=i,a[7]=o,a[8]=s,a[9]=l):l=a[9],l},"B",0,function(e){let n,i,o,s,l,a,u,c,d,f,m=(0,r.c)(20);return m[0]!==e?({className:i,overlayClassName:o,children:n,ref:l,...s}=e,m[0]=e,m[1]=n,m[2]=i,m[3]=o,m[4]=s,m[5]=l):(n=m[1],i=m[2],o=m[3],s=m[4],l=m[5]),m[6]!==o?(a=(0,t.jsx)(_,{className:o}),m[6]=o,m[7]=a):a=m[7],m[8]!==i?(u=(0,v.f)("fixed left-[50%] top-[50%] z-alert grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 p-6",w.b,N.Q,i),m[8]=i,m[9]=u):u=m[9],m[10]!==n?(c=(0,t.jsx)(j.l,{layer:"alert",children:n}),m[10]=n,m[11]=c):c=m[11],m[12]!==s||m[13]!==l||m[14]!==u||m[15]!==c?(d=(0,t.jsx)(p.Popup,{ref:l,className:u,...s,children:c}),m[12]=s,m[13]=l,m[14]=u,m[15]=c,m[16]=d):d=m[16],m[17]!==a||m[18]!==d?(f=(0,t.jsx)(k,{keepMounted:!0,children:(0,t.jsxs)(y.ContainedContextProvider,{value:!1,children:[a,d]})}),m[17]=a,m[18]=d,m[19]=f):f=m[19],f},"I",0,function(e){let n,i,o,s,l,a=(0,r.c)(10);return a[0]!==e?({className:n,ref:o,...i}=e,a[0]=e,a[1]=n,a[2]=i,a[3]=o):(n=a[1],i=a[2],o=a[3]),a[4]!==n?(s=(0,v.f)("text-body text-muted-foreground",n),a[4]=n,a[5]=s):s=a[5],a[6]!==i||a[7]!==o||a[8]!==s?(l=(0,t.jsx)(x.Description,{ref:o,className:s,...i}),a[6]=i,a[7]=o,a[8]=s,a[9]=l):l=a[9],l},"_",0,function(e){let n,i,o,s,l=(0,r.c)(8);return l[0]!==e?({className:n,...i}=e,l[0]=e,l[1]=n,l[2]=i):(n=l[1],i=l[2]),l[3]!==n?(o=(0,v.f)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",n),l[3]=n,l[4]=o):o=l[4],l[5]!==i||l[6]!==o?(s=(0,t.jsx)("div",{className:o,...i}),l[5]=i,l[6]=o,l[7]=s):s=l[7],s},"O",0,function(e){let n,i,o,s,l=(0,r.c)(8);return l[0]!==e?({className:n,...i}=e,l[0]=e,l[1]=n,l[2]=i):(n=l[1],i=l[2]),l[3]!==n?(o=(0,v.f)("flex flex-col gap-y-2 text-center sm:text-left",n),l[3]=n,l[4]=o):o=l[4],l[5]!==i||l[6]!==o?(s=(0,t.jsx)("div",{className:o,...i}),l[5]=i,l[6]=o,l[7]=s):s=l[7],s},"g",0,function(e){let n,i,o,s,l,a=(0,r.c)(10);return a[0]!==e?({className:n,ref:o,...i}=e,a[0]=e,a[1]=n,a[2]=i,a[3]=o):(n=a[1],i=a[2],o=a[3]),a[4]!==n?(s=(0,v.f)("text-base font-semibold",n),a[4]=n,a[5]=s):s=a[5],a[6]!==i||a[7]!==o||a[8]!==s?(l=(0,t.jsx)(h.Title,{ref:o,className:s,...i}),a[6]=i,a[7]=o,a[8]=s,a[9]=l):l=a[9],l}],82045)},261124,e=>{"use strict";var t=e.i(659350),r=e.i(663456),n=e.i(207298),i=e.i(288265),o=e.i(498449),s=e.i(612927),l=e.i(136562),a=e.i(139697);let u=(0,n.f)("inline-flex items-center gap-1.5",{variants:{variant:{muted:"rounded-md bg-muted px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-card-hover",outline:"rounded-md border border-border bg-selected-bg px-2.5 py-1 text-xs font-medium text-foreground"},size:{md:"",sm:"text-overline"}},defaultVariants:{variant:"muted",size:"md"}});function c(e){let n,i,o,s,a,c,d=(0,r.c)(12);return d[0]!==e?({className:n,variant:s,size:o,...i}=e,d[0]=e,d[1]=n,d[2]=i,d[3]=o,d[4]=s):(n=d[1],i=d[2],o=d[3],s=d[4]),d[5]!==n||d[6]!==o||d[7]!==s?(a=(0,l.f)(u({variant:s,size:o}),n),d[5]=n,d[6]=o,d[7]=s,d[8]=a):a=d[8],d[9]!==i||d[10]!==a?(c=(0,t.jsx)("div",{className:a,...i}),d[9]=i,d[10]=a,d[11]=c):c=d[11],c}let d="inline-flex items-center gap-1 rounded-md border border-dashed border-border px-2.5 py-1 text-xs font-medium text-muted-foreground transition-colors focus-visible:outline-none focus-visible:border-focus-border focus-visible:shadow-focus",f="cursor-pointer hover:border-border hover:text-foreground",m=(0,l.f)(d,f,"h-auto w-auto justify-start bg-transparent shadow-none","hover:bg-transparent active:bg-transparent [&_svg]:size-3");function p(e){let n,i,s=(0,r.c)(3),{label:l}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)(o.f,{className:"size-3"}),s[0]=n):n=s[0],s[1]!==l?(i=(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[n,l]}),s[1]=l,s[2]=i):i=s[2],i}e.s(["h",0,m,"k",0,function(e){let n,i,o,s,a,u,c=(0,r.c)(14);c[0]!==e?({className:n,label:i,...o}=e,c[0]=e,c[1]=n,c[2]=i,c[3]=o):(n=c[1],i=c[2],o=c[3]);let m=o.disabled?"cursor-not-allowed opacity-50":f;return c[4]!==n||c[5]!==m?(s=(0,l.f)(d,m,n),c[4]=n,c[5]=m,c[6]=s):s=c[6],c[7]!==i?(a=(0,t.jsx)(p,{label:i}),c[7]=i,c[8]=a):a=c[8],c[9]!==i||c[10]!==o||c[11]!==s||c[12]!==a?(u=(0,t.jsx)("button",{type:"button","aria-label":i,className:s,...o,children:a}),c[9]=i,c[10]=o,c[11]=s,c[12]=a,c[13]=u):u=c[13],u},"I",0,p,"p",0,c,"X",0,function(e){let n,o,u,d,f,m,p,h,x,g,v,b,y=(0,r.c)(24);y[0]!==e?({children:n,className:o,onRemove:u,removeDisabled:m,removeLabel:f,...d}=e,y[0]=e,y[1]=n,y[2]=o,y[3]=u,y[4]=d,y[5]=f,y[6]=m):(n=y[1],o=y[2],u=y[3],d=y[4],f=y[5],m=y[6]);let w=void 0!==m&&m,j=(0,i.f)();return y[7]!==o?(p=(0,l.f)("group relative pr-7",o),y[7]=o,y[8]=p):p=y[8],y[9]!==j||y[10]!==f?(h=f??j("Remove"),y[9]=j,y[10]=f,y[11]=h):h=y[11],y[12]!==u?(x=e=>{e.stopPropagation(),u()},y[12]=u,y[13]=x):x=y[13],y[14]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsx)(s.X,{className:"size-3"}),y[14]=g):g=y[14],y[15]!==w||y[16]!==h||y[17]!==x?(v=(0,t.jsx)(a.Button,{"aria-label":h,shape:"sm",className:"absolute right-1 top-1/2 -translate-y-1/2 opacity-60 group-hover:opacity-100",disabled:w,size:"icon-3xs",type:"button",variant:"ghost",onClick:x,children:g}),y[15]=w,y[16]=h,y[17]=x,y[18]=v):v=y[18],y[19]!==n||y[20]!==d||y[21]!==p||y[22]!==v?(b=(0,t.jsxs)(c,{className:p,...d,children:[n,v]}),y[19]=n,y[20]=d,y[21]=p,y[22]=v,y[23]=b):b=y[23],b}])},647402,e=>{"use strict";var t=e.i(659350),r=e.i(663456),n=e.i(136562);let i=(0,e.i(207298).f)("inline-block size-[0.215em] shrink-0 rounded-full bg-current align-middle",{variants:{tone:{inherit:"",faint:"text-faint"}},defaultVariants:{tone:"inherit"}});e.s(["f",0,function(e){let o,s,l=(0,r.c)(6),{className:a,tone:u,"data-testid":c}=e;return l[0]!==a||l[1]!==u?(o=(0,n.f)(i({tone:u}),a),l[0]=a,l[1]=u,l[2]=o):o=l[2],l[3]!==c||l[4]!==o?(s=(0,t.jsx)("span",{"aria-hidden":"true",className:o,"data-testid":c}),l[3]=c,l[4]=o,l[5]=s):s=l[5],s}],647402)},317780,e=>{"use strict";var t=e.i(659350),r=e.i(663456),n=e.i(940815),i=e.i(790316),o=e.i(789073),s=e.i(89427),l=e.i(678541),a=e.i(207298),u=e.i(288265),c=e.i(16043),d=e.i(136562),f=e.i(797521);let m=(0,a.f)("absolute rounded-full data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full",{variants:{colorMode:{default:"bg-primary",gradient:"bg-(--indicator-color)"}},defaultVariants:{colorMode:"default"}}),p=(0,a.f)("block size-4 cursor-pointer rounded-full border-2 border-background shadow-lg transition-colors focus-visible:outline-hidden focus-visible:border-focus-border focus-visible:shadow-focus disabled:pointer-events-none disabled:opacity-50",{variants:{colorMode:{default:"bg-primary",gradient:"bg-current text-(--indicator-color)"}},defaultVariants:{colorMode:"default"}}),h=(0,a.f)("min-w-8 text-center text-xs font-normal tabular-nums",{variants:{colorMode:{default:"",gradient:"text-(--indicator-color)"}},defaultVariants:{colorMode:"default"}});function x(e,t){if(t){e.id=t;return}e.removeAttribute("id")}e.s(["f",0,function(e){var a,g,v,b;let y,w,j,N,S,k,_,C,B,A,E,z,T,R,M,q,I,L,V,P,F,D,O,$,W,U,K,G,Y,H=(0,r.c)(49);H[0]!==e?({"aria-label":y,"aria-labelledby":w,className:j,defaultValue:N,id:k,min:E,max:z,colorMode:T,fill:R,getThumbAriaValueText:S,onValueChange:_,ref:C,showValue:M,style:A,value:q,...B}=e,H[0]=e,H[1]=y,H[2]=w,H[3]=j,H[4]=N,H[5]=S,H[6]=k,H[7]=_,H[8]=C,H[9]=B,H[10]=A,H[11]=E,H[12]=z,H[13]=T,H[14]=R,H[15]=M,H[16]=q):(y=H[1],w=H[2],j=H[3],N=H[4],S=H[5],k=H[6],_=H[7],C=H[8],B=H[9],A=H[10],E=H[11],z=H[12],T=H[13],R=H[14],M=H[15],q=H[16]);let J=void 0===E?0:E,X=void 0===z?100:z,Z=void 0===T?"default":T,Q=void 0===R?"start":R,ee=void 0!==M&&M,et=(0,u.f)(),er=(0,f.f)();H[17]!==N||H[18]!==J?(I=()=>N??J,H[17]=N,H[18]=J,H[19]=I):I=H[19];let[en,ei]=(0,c.useState)(I),eo=Array.isArray(a=function({value:e,uncontrolledValue:t,min:r}){return e??t??r}({value:q,uncontrolledValue:en,min:J}))?a:[Number(a)],es=(g=eo,v=J,0===g.length?v:Math.max(...g)),el=X-J,ea=el>0?Math.max(0,Math.min(1,(es-J)/el)):0,eu=(0,c.useRef)(null);H[20]!==_?(L=(e,t)=>{ei(e),_?.(e,t)},H[20]=_,H[21]=L):L=H[21];let ec=L;H[22]!==k||H[23]!==C?(V=e=>{eu.current=e,e&&x(e,k),function(e,t){if(e){if("function"==typeof e)return e(t);e.current=t}}(C,e)},H[22]=k,H[23]=C,H[24]=V):V=H[24];let ed=V;H[25]!==k?(F=()=>{eu.current&&x(eu.current,k)},P=[k],H[25]=k,H[26]=P,H[27]=F):(P=H[26],F=H[27]),(0,c.useEffect)(F,P);let ef="end"===Q&&"default"===Z;e:{if("gradient"===Z){let e;H[28]!==ea?(e=function(e){if(e<=.5){let t=2*e,r=Math.round(0+229*t),n=Math.round(191+-31*t),i=Math.round(111+-111*t);return`rgb(${r}, ${n}, ${i})`}let t=(e-.5)*2,r=Math.round(229+26*t),n=Math.round(160+-115*t),i=Math.round(0+85*t);return`rgb(${r}, ${n}, ${i})`}(ea),H[28]=ea,H[29]=e):e=H[29],D=e;break e}D=void 0}let em=D;H[30]!==j?(O=(0,d.f)("flex items-center gap-3",j),H[30]=j,H[31]=O):O=H[31];let ep=ef?"bg-primary":"bg-muted";return H[32]!==ep?($=(0,d.f)("relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-2 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-2",ep),H[32]=ep,H[33]=$):$=H[33],H[34]!==Z||H[35]!==ef?(W=(0,d.f)(m({colorMode:Z}),ef&&"default"===Z&&"bg-background"),H[34]=Z,H[35]=ef,H[36]=W):W=H[36],H[37]!==Z||H[38]!==em?(U="gradient"===Z?{"--indicator-color":em}:void 0,H[37]=Z,H[38]=em,H[39]=U):U=H[39],H[40]!==ef?(K=ef&&(0,t.jsx)("span",{className:"absolute inset-0 bg-muted"}),H[40]=ef,H[41]=K):K=H[41],H[42]!==W||H[43]!==U||H[44]!==K?(G=(0,t.jsx)(n.f.Indicator,{className:W,"data-allow-inline-style":!0,style:U,children:K}),H[42]=W,H[43]=U,H[44]=K,H[45]=G):G=H[45],H[46]!==$||H[47]!==G?(Y=(0,t.jsx)(i.f.Track,{className:$,children:G}),H[46]=$,H[47]=G,H[48]=Y):Y=H[48],(0,t.jsxs)("div",{className:O,style:A,children:[(0,t.jsx)(o.f.Root,{"aria-label":"string"==typeof y?y:void 0,"aria-labelledby":w,value:q,defaultValue:N,min:J,max:X,onValueChange:ec,className:"relative flex w-full touch-none select-none items-center data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",...B,children:(0,t.jsxs)(s.f.Control,{className:"relative flex w-full cursor-pointer items-center data-[orientation=horizontal]:h-8 data-[orientation=vertical]:h-full data-[orientation=vertical]:w-8 data-[orientation=vertical]:justify-center",children:[Y,eo.map((e,r)=>(0,t.jsx)(l.f.Thumb,{"aria-label":function(e,{ariaLabel:t,index:r,thumbCount:n}){return Array.isArray(t)?t[r]:"string"==typeof t?n<=1?t:0===r?e("{ariaLabel} minimum",{ariaLabel:t}):1===r?e("{ariaLabel} maximum",{ariaLabel:t}):e("{ariaLabel} thumb {thumbNumber}",{ariaLabel:t,thumbNumber:r+1}):void 0}(et,{ariaLabel:y,index:r,thumbCount:eo.length}),"aria-labelledby":w,getAriaValueText:S?()=>S(r):void 0,index:r,inputRef:0===r?ed:void 0,className:p({colorMode:Z}),"data-allow-inline-style":!0,style:"gradient"===Z?{"--indicator-color":em}:void 0},r))]})}),ee&&(0,t.jsx)("span",{className:h({colorMode:Z}),"data-allow-inline-style":!0,style:"gradient"===Z?{"--indicator-color":em}:void 0,children:(b=eo,(0,er.list)(b.map(e=>e.toString())))})]})}])},554395,e=>{"use strict";var t=e.i(659350),r=e.i(663456),n=e.i(207298),i=e.i(136562),o=e.i(102187);let s=(0,n.f)((0,i.f)("flex w-full","text-body pointer-coarse:text-base","placeholder:text-muted-foreground/50","focus-visible:outline-hidden focus-visible:ring-0","disabled:cursor-not-allowed disabled:opacity-50"),{variants:{variant:{default:(0,i.f)("min-h-20 px-3 py-2","rounded-md border border-input bg-input-bg","focus-visible:border-focus-border focus-visible:shadow-focus"),embedded:"overflow-y-auto px-3 py-2.5"}},defaultVariants:{variant:"default"}}),l=s();e.s(["g",0,l,"o",0,function(e){let n,l,a,u,c,d,f,m,p=(0,r.c)(16);return p[0]!==e?({className:n,inputClassName:a,variant:d,font:l,ref:c,...u}=e,p[0]=e,p[1]=n,p[2]=l,p[3]=a,p[4]=u,p[5]=c,p[6]=d):(n=p[1],l=p[2],a=p[3],u=p[4],c=p[5],d=p[6]),p[7]!==n||p[8]!==l||p[9]!==a||p[10]!==d?(f=(0,i.f)(s({variant:d}),(0,o.f)({font:l}),a,n),p[7]=n,p[8]=l,p[9]=a,p[10]=d,p[11]=f):f=p[11],p[12]!==u||p[13]!==c||p[14]!==f?(m=(0,t.jsx)("textarea",{className:f,ref:c,...u}),p[12]=u,p[13]=c,p[14]=f,p[15]=m):m=p[15],m}])},689024,e=>{"use strict";var t=e.i(663456),r=e.i(16043);e.s(["f",0,function(e,n,i){let o,s,l,a,u,c,d,f=(0,t.c)(15);f[0]!==i?(o=void 0===i?{}:i,f[0]=i,f[1]=o):o=f[1];let m=o,{shouldGuardUrl:p}=m,h=m.isSpaGuardActive??e;f[2]!==p?(s=e=>p?.(e)??!0,f[2]=p,f[3]=s):s=f[3];let x=(0,r.useEffectEvent)(s);f[4]!==n?(l=()=>window.confirm(n),f[4]=n,f[5]=l):l=f[5];let g=(0,r.useEffectEvent)(l),v=(0,r.useRef)(!1);f[6]!==e?(a=()=>{if(!e)return;let t=e=>{v.current||e.preventDefault()};return window.addEventListener("beforeunload",t),()=>{window.removeEventListener("beforeunload",t)}},u=[e],f[6]=e,f[7]=a,f[8]=u):(a=f[7],u=f[8]),(0,r.useEffect)(a,u),f[9]!==g||f[10]!==h||f[11]!==x?(c=()=>{if(!h)return;let e=!1,t=()=>{g()?(e=!0,window.removeEventListener("popstate",t),window.history.back()):window.history.pushState(null,"",window.location.href)},r=window.location.href;window.history.pushState(null,"",r),window.addEventListener("popstate",t);let n=window.history.pushState.bind(window.history),i=window.history.replaceState.bind(window.history),o=null,s=e=>new URL(e.toString(),window.location.origin).href!==window.location.href&&x(new URL(e.toString(),window.location.origin)),l=e=>(t,r,n)=>{(e=>!e||(null!==o&&new URL(e.toString(),window.location.origin).href===o?(o=null,!0):!s(e)||g()))(n)&&e(t,r,n)};window.history.pushState=l(n),window.history.replaceState=l(i);let a=e=>{if(e.defaultPrevented||0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||!(e.target instanceof Element))return;let t=e.target.closest("a[href]");if(!(t instanceof HTMLAnchorElement)||""!==t.target&&"_self"!==t.target||t.hasAttribute("download"))return;let r=new URL(t.href,window.location.origin);if(r.origin===window.location.origin&&(r.pathname!==window.location.pathname||r.search!==window.location.search)&&s(r)){if(!g()){e.preventDefault(),e.stopImmediatePropagation();return}o=r.href,v.current=!0,window.setTimeout(()=>{v.current=!1},1e3)}};return document.addEventListener("click",a,!0),()=>{window.removeEventListener("popstate",t),document.removeEventListener("click",a,!0),window.history.pushState=n,window.history.replaceState=i,e||window.location.href!==r||window.history.back()}},f[9]=g,f[10]=h,f[11]=x,f[12]=c):c=f[12],f[13]!==h?(d=[h],f[13]=h,f[14]=d):d=f[14],(0,r.useEffect)(c,d)}])},234281,e=>{"use strict";var t=e.i(663456);e.i(16043);var r=e.i(801103),n=e.i(797521),i=e.i(304903);function o(e,o){let s,l=(0,t.c)(5),a=(0,n.f)(),u=(0,i.P)(e),c=(0,r.m)();return l[0]!==a||l[1]!==c||l[2]!==o||l[3]!==u?(s=e=>void 0===c?a.dateTime(e,{timeZone:u,preset:"full"}):a.relativeTime(e,{timeZone:u,nowMs:c,preset:o}),l[0]=a,l[1]=c,l[2]=o,l[3]=u,l[4]=s):s=l[4],s}e.s(["n",0,o,"D",0,function(e,r){let n,i=(0,t.c)(3),s=o(void 0,r);return i[0]!==s||i[1]!==e?(n=s(e),i[0]=s,i[1]=e,i[2]=n):n=i[2],n}])},219027,324202,e=>{"use strict";e.s(["f",0,function(e){return"messages"in e&&Array.isArray(e.messages)&&e.messages.length>0}],219027);var t=e.i(368174);e.s(["f",0,function(e){return(0,t.f)(e)&&Array.isArray(e.content)}],324202)},262571,e=>{"use strict";var t=e.i(659350),r=e.i(663456),n=e.i(572677),i=e.i(134611),o=e.i(810632),s=e.i(510433),l=e.i(136562),a=e.i(553214),u=e.i(139697),c=e.i(236614),d=e.i(761821),f=e.i(790870);e.i(707060);var m=e.i(196991),p=e.i(288265),h=e.i(16043),x=e.i(318875);e.i(406201);var g=e.i(967605),v=e.i(205059),b=e.i(674896),y=e.i(689024),w=e.i(426431);function j(e){return!(0,b.V)(e.pathname)}function N(e){return Object.values(e.runLifecycles).some(S)}function S(e){return"streaming"===e.phase||"synthesizing"===e.phase||e.isAnalyzing}function k(e){return e.error}function _(e){return e.synthesizerSlug}function C(e){return e.isAnalyzing}function B(e){return e.phase}var A=e.i(88689),E=e.i(250141),z=e.i(925204),T=e.i(411349),R=e.i(895394),M=e.i(539313);let q=h.forwardRef(function({title:e,titleId:t,...r},n){return h.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?h.createElement("title",{id:t},e):null,h.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 13.5V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m12-3V3.75m0 9.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 3.75V16.5m-6-9V3.75m0 3.75a1.5 1.5 0 0 1 0 3m0-3a1.5 1.5 0 0 0 0 3m0 9.75V10.5"}))});var I=e.i(215891);let L=h.forwardRef(function({title:e,titleId:t,...r},n){return h.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?h.createElement("title",{id:t},e):null,h.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0 1 20.25 6v12A2.25 2.25 0 0 1 18 20.25H6A2.25 2.25 0 0 1 3.75 18V6A2.25 2.25 0 0 1 6 3.75h1.5m9 0h-9"}))});var V=e.i(303125),P=e.i(485741),F=e.i(214051),D=e.i(563867),O=e.i(338749),$=e.i(895183),W=e.i(279496),U=e.i(708638),K=e.i(346754),G=e.i(233452),Y=e.i(261124),H=e.i(732571),J=e.i(181870),X=e.i(475615),Z=e.i(624112),Q=e.i(326e3),ee=e.i(317780),et=e.i(554395),er=e.i(751155),en=e.i(948235),ei=e.i(45999),eo=e.i(510164),es=e.i(326282),el=e.i(368386),ea=e.i(138598),eu=e.i(284343),ec=e.i(272719),ed=e.i(497214),ef=e.i(647204),em=e.i(882844),ep=e.i(635157),eh=e.i(834336),ex=e.i(960421),eg=e.i(19773),ev=e.i(888887),eb=e.i(123215),ey=e.i(797677),ew=e.i(903121),ej=e.i(679728),eN=e.i(757062),eS=e.i(139659),ek=e.i(80676),e_=e.i(262646),eC=e.i(797521),eB=e.i(387086),eA=e.i(919035),eE=e.i(153746),ez=e.i(34246),eT=e.i(67089),eR=e.i(549692),eM=e.i(983739),eq=e.i(120765);let eI=ep.z.object({id:ep.z.string(),question:ep.z.string(),type:ep.z.literal("text"),placeholder:ep.z.string()}),eL=ep.z.object({id:ep.z.string(),question:ep.z.string(),type:ep.z.literal("select"),options:ep.z.array(ep.z.string()).min(2)}),eV=ep.z.object({id:ep.z.string(),question:ep.z.string(),type:ep.z.literal("multi_select"),options:ep.z.array(ep.z.string()).min(2)}),eP=ep.z.discriminatedUnion("type",[eI,eL,eV]),eF=ep.z.array(eP).min(2).max(4);function eD(e){return{model:"google/gemini-3-flash-preview-20251217",input:[{type:"message",role:"user",content:e}],stream:!0,provider:{sort:eM.f.Throughput}}}async function eO(e){let t="";for await(let r of(0,eq.f)(e)){if((0,ef.V)(r))break;let e=r.data;if("response.output_text.delta"===e.type&&(t+=e.delta??""),"response.output_text.done"===e.type){t=(e.text??t).trim();break}}return t.trim()}function e$(e){let t=/^```(?:json)?\s*\n?([\s\S]*?)\n?\s*```$/.exec(e.trim());return t?.[1]?.trim()??e.trim()}let eW=`You are a prompt improvement assistant. The user has written a draft prompt that they plan to send to multiple AI models for comparison. Your job is to identify what's missing — constraints, priorities, context, edge cases, what they've already tried — and generate 2-4 targeted clarifying questions. Each question MUST use the best-fit input type: - "text": open-ended answer (use when the answer is freeform, e.g. context, constraints, what they tried). Include a "placeholder" string hinting at the expected answer. - "select": pick exactly one option (use when there's a clear set of mutually exclusive choices, e.g. audience level, output format). Include an "options" array of 2-5 short choices. - "multi_select": pick one or more options (use when multiple choices can apply, e.g. priorities, concerns, requirements). Include an "options" array of 2-6 short choices. Rules: - Each question should surface a specific gap in the prompt - Keep questions short and direct (one sentence) - Give each question a unique lowercase id (e.g. "constraints", "context", "audience", "format") - Do NOT ask generic questions — tailor them to the specific prompt content - Use "select" or "multi_select" whenever the reasonable answers form a finite set — prefer structured input over free text - Return ONLY a raw JSON array, no markdown fences, no explanation Return format (2-4 items): [ {"id": "string", "question": "string", "type": "text", "placeholder": "string"}, {"id": "string", "question": "string", "type": "select", "options": ["A", "B", "C"]}, {"id": "string", "question": "string", "type": "multi_select", "options": ["X", "Y", "Z"]} ] User's draft prompt: `,eU=`You are a prompt improvement assistant. The user has written a draft prompt and already answered some clarifying questions. Based on their answers, generate 2-4 NEW follow-up questions that dig deeper into the specifics revealed by their answers. Each question MUST use the best-fit input type: - "text": open-ended answer (use when the answer is freeform). Include a "placeholder" string hinting at the expected answer. - "select": pick exactly one option (use when there's a clear set of mutually exclusive choices). Include an "options" array of 2-5 short choices. - "multi_select": pick one or more options (use when multiple choices can apply). Include an "options" array of 2-6 short choices. Rules: - Do NOT repeat or rephrase questions that were already asked - Each follow-up should build on what the user already revealed — go deeper, not wider - Keep questions short and direct (one sentence) - Give each question a unique lowercase id that doesn't clash with previous ids - Use "select" or "multi_select" whenever the reasonable answers form a finite set - Return ONLY a raw JSON array, no markdown fences, no explanation Return format (2-4 items): [ {"id": "string", "question": "string", "type": "text", "placeholder": "string"}, {"id": "string", "question": "string", "type": "select", "options": ["A", "B", "C"]}, {"id": "string", "question": "string", "type": "multi_select", "options": ["X", "Y", "Z"]} ] `,eK=`You are a prompt improvement assistant. The user wrote a draft prompt and then answered some clarifying questions. Your job is to rewrite their original prompt incorporating the new information naturally. Rules: - Preserve the user's voice, intent, and tone - Weave in the clarifying answers as additional context or constraints - Do NOT add information the user didn't provide - Do NOT mention that clarifying questions were asked - Keep the prompt concise — don't pad it with filler - Return ONLY the improved prompt text, nothing else Original prompt: `;function eG(e,t){return(0,eR.O)({rawError:Error(t),location:e})}async function eY(e,t){let r=t??new AbortController,n=await (0,ez.f)({params:eD(eW+e),abortController:r});if((0,ef.V)(n))return(0,eT.L)("Failed to fetch clarifying questions",{error:n.error}),(0,eR.O)({rawError:n.error,location:"prompt-improve:fetch-questions"});if(!n.data.body)return(0,eT.L)("Empty response body for clarifying questions"),eG("prompt-improve:fetch-questions","Empty response from model");let i=e$(await eO(n.data.body)),o=(0,ef.$)(()=>JSON.parse(i));if((0,ef.V)(o))return(0,eT.L)("Failed to parse clarifying questions JSON",{content:i.slice(0,200)}),eG("prompt-improve:parse-questions","Failed to parse model response");let s=(0,em.C)(eF,o.data);return(0,ef.V)(s)?((0,eT.L)("Clarifying questions failed schema validation",{error:s.error}),eG("prompt-improve:validate-questions","Invalid response format from model")):(0,ef.N)(s.data)}async function eH({originalPrompt:e,previousQA:t,abortController:r}){let n=t.map(e=>`Q: ${e.question} A: ${e.answer}`).join("\n\n"),i=`${eU}User's draft prompt: ${e} Previous clarifying questions and answers: ${n}`,o=r??new AbortController,s=await (0,ez.f)({params:eD(i),abortController:o});if((0,ef.V)(s))return(0,eT.L)("Failed to fetch follow-up questions",{error:s.error}),(0,eR.O)({rawError:s.error,location:"prompt-improve:fetch-followups"});if(!s.data.body)return(0,eT.L)("Empty response body for follow-up questions"),eG("prompt-improve:fetch-followups","Empty response from model");let l=e$(await eO(s.data.body)),a=(0,ef.$)(()=>JSON.parse(l));if((0,ef.V)(a))return(0,eT.L)("Failed to parse follow-up questions JSON",{content:l.slice(0,200)}),eG("prompt-improve:parse-followups","Failed to parse model response");let u=(0,em.C)(eF,a.data);return(0,ef.V)(u)?((0,eT.L)("Follow-up questions failed schema validation",{error:u.error}),eG("prompt-improve:validate-followups","Invalid response format from model")):(0,ef.N)(u.data)}async function eJ({originalPrompt:e,answeredQuestions:t,abortController:r}){let n=t.map(e=>`Q: ${e.question} A: ${e.answer}`).join("\n\n"),i=`${eK}${e} Clarifying questions and answers: ${n}`,o=r??new AbortController,s=await (0,ez.f)({params:eD(i),abortController:o});if((0,ef.V)(s))return(0,eT.L)("Failed to fetch improved prompt",{error:s.error}),(0,eR.O)({rawError:s.error,location:"prompt-improve:fetch-rewrite"});if(!s.data.body)return(0,eT.L)("Empty response body for improved prompt"),eG("prompt-improve:fetch-rewrite","Empty response from model");let l=await eO(s.data.body);return l?(0,ef.N)(l):eG("prompt-improve:rewrite-content","Model returned empty content")}let eX={kind:"loading"};function eZ(e,t){switch(t.type){case"questions_requested":return"loading"===e.kind?e:eX;case"questions_loaded":return"loading"===e.kind?{kind:"questions"}:e;case"questions_failed":return"loading"===e.kind?{kind:"error"}:e;case"round_confirmed":return"questions"===e.kind?{kind:"confirmed"}:e;case"followups_requested":return"confirmed"===e.kind?{kind:"loading_followups"}:e;case"followups_loaded":return"loading_followups"===e.kind?{kind:"questions"}:e;case"followups_failed":return"loading_followups"===e.kind?{kind:"confirmed"}:e;case"improve_requested":return"confirmed"===e.kind?{kind:"improving"}:e;case"improve_failed":return"improving"===e.kind?{kind:"confirmed"}:e;default:return t}}let eQ={text:{},select:{},multiSelect:{}};function e0(e,t){switch(e.type){case"text":return t.text[e.id]?.trim()||null;case"select":return t.select[e.id]||null;case"multi_select":{let r=t.multiSelect[e.id];if(!r||0===r.size)return null;return[...r].join(", ")}}}function e1(e,t){let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r}function e2({questions:e,answers:t,skippedIds:r}){return e.filter(e=>!r.has(e.id)).map(e=>{let r=e0(e,t);return r?{question:e.question,answer:r}:null}).filter(e=>null!==e)}function e3(e){let n,i,o,s,a,c=(0,r.c)(16),{label:d,isSelected:f,isMulti:m,onClick:p}=e,h=f?"bg-primary/10 text-primary border-primary/30 hover:bg-primary/10 hover:text-primary":"hover:border-foreground/30 hover:bg-muted/30 hover:text-foreground font-normal";c[0]!==h?(n=(0,l.f)("px-3.5",h),c[0]=h,c[1]=n):n=c[1];let x=m?"rounded-xs":"rounded-full",g=f?"bg-primary border-primary text-primary-foreground":"border-muted-foreground/30 bg-background";return c[2]!==x||c[3]!==g?(i=(0,l.f)("flex h-4 w-4 shrink-0 items-center justify-center border transition-colors",x,g),c[2]=x,c[3]=g,c[4]=i):i=c[4],c[5]!==m||c[6]!==f?(o=f&&(m?(0,t.jsx)(V.f,{className:"h-3 w-3 stroke-3"}):(0,t.jsx)("div",{className:"h-1.5 w-1.5 rounded-full bg-current"})),c[5]=m,c[6]=f,c[7]=o):o=c[7],c[8]!==i||c[9]!==o?(s=(0,t.jsx)("div",{className:i,children:o}),c[8]=i,c[9]=o,c[10]=s):s=c[10],c[11]!==d||c[12]!==p||c[13]!==n||c[14]!==s?(a=(0,t.jsxs)(u.Button,{variant:"outline",glyph:"xs",onClick:p,className:n,children:[s,d]}),c[11]=d,c[12]=p,c[13]=n,c[14]=s,c[15]=a):a=c[15],a}function e5(e){let n,i,o,s,l,a=(0,r.c)(12),{question:u,answer:c,index:d}=e,f=d+1;return a[0]!==f?(n=(0,t.jsx)("span",{className:"mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground text-xs font-semibold",children:f}),a[0]=f,a[1]=n):n=a[1],a[2]!==u?(i=(0,t.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:u}),a[2]=u,a[3]=i):i=a[3],a[4]!==c?(o=(0,t.jsx)("p",{className:"text-sm text-foreground/70 mt-1",children:c}),a[4]=c,a[5]=o):o=a[5],a[6]!==i||a[7]!==o?(s=(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[i,o]}),a[6]=i,a[7]=o,a[8]=s):s=a[8],a[9]!==n||a[10]!==s?(l=(0,t.jsxs)("div",{className:"flex items-start gap-4 opacity-60",children:[n,s]}),a[9]=n,a[10]=s,a[11]=l):l=a[11],l}function e6(e){let n,i,o,s,a,u,c,d,f,p,h,x,g,v=(0,r.c)(46),{question:b,index:y,answers:w,isSkipped:j,onUpdateText:N,onSelectOption:S,onToggleMulti:k,onToggleSkip:_}=e,C=j&&"opacity-40";v[0]!==C?(n=(0,l.f)("transition-opacity duration-200",C),v[0]=C,v[1]=n):n=v[1];let B=j?"bg-muted text-muted-foreground line-through":"bg-foreground text-background";v[2]!==B?(i=(0,l.f)("mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-xs font-semibold",B),v[2]=B,v[3]=i):i=v[3];let A=y+1;v[4]!==i||v[5]!==A?(o=(0,t.jsx)("span",{className:i,children:A}),v[4]=i,v[5]=A,v[6]=o):o=v[6];let E=j?"muted":"foreground",z=`improve-q-${b.id}`;v[7]!==j||v[8]!==b.type?(s="multi_select"===b.type&&!j&&(0,t.jsx)("span",{className:"ml-2 text-xs font-normal text-muted-foreground",children:(0,t.jsx)(m.T,{children:"(pick any)"})}),v[7]=j,v[8]=b.type,v[9]=s):s=v[9],v[10]!==b.question||v[11]!==E||v[12]!==z||v[13]!==s?(a=(0,t.jsxs)(X.f,{weight:"medium",leading:"snug",tone:E,htmlFor:z,children:[b.question,s]}),v[10]=b.question,v[11]=E,v[12]=z,v[13]=s,v[14]=a):a=v[14],v[15]!==w||v[16]!==j||v[17]!==S||v[18]!==k||v[19]!==N||v[20]!==b.id||v[21]!==b.options||v[22]!==b.placeholder||v[23]!==b.type?(u=!j&&(0,t.jsxs)("div",{className:"mt-3.5",children:["text"===b.type&&(0,t.jsx)(J.f,{id:`improve-q-${b.id}`,type:"text",value:w.text[b.id]??"",onChange:e=>N(b.id,e.target.value),placeholder:b.placeholder}),"select"===b.type&&(0,t.jsx)("div",{className:"flex flex-col gap-2",children:b.options.map(e=>(0,t.jsx)(e3,{label:e,isSelected:w.select[b.id]===e,isMulti:!1,onClick:()=>S(b.id,e)},e))}),"multi_select"===b.type&&(0,t.jsx)("div",{className:"flex flex-col gap-2",children:b.options.map(e=>(0,t.jsx)(e3,{label:e,isSelected:w.multiSelect[b.id]?.has(e)??!1,isMulti:!0,onClick:()=>k(b.id,e)},e))})]}),v[15]=w,v[16]=j,v[17]=S,v[18]=k,v[19]=N,v[20]=b.id,v[21]=b.options,v[22]=b.placeholder,v[23]=b.type,v[24]=u):u=v[24],v[25]!==_||v[26]!==b.id?(c=()=>_(b.id),v[25]=_,v[26]=b.id,v[27]=c):c=v[27];let T=j?"text-primary hover:text-primary/80 font-medium":"text-muted-foreground/60 hover:text-muted-foreground";return v[28]!==T?(d=(0,l.f)("mt-3 text-xs transition-colors",T),v[28]=T,v[29]=d):d=v[29],v[30]!==j?(f=j?(0,t.jsx)(m.T,{children:"Undo skip"}):(0,t.jsx)(m.T,{children:"Not relevant, skip"}),v[30]=j,v[31]=f):f=v[31],v[32]!==c||v[33]!==d||v[34]!==f?(p=(0,t.jsx)("button",{type:"button",onClick:c,className:d,children:f}),v[32]=c,v[33]=d,v[34]=f,v[35]=p):p=v[35],v[36]!==a||v[37]!==u||v[38]!==p?(h=(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[a,u,p]}),v[36]=a,v[37]=u,v[38]=p,v[39]=h):h=v[39],v[40]!==h||v[41]!==o?(x=(0,t.jsxs)("div",{className:"flex items-start gap-4",children:[o,h]}),v[40]=h,v[41]=o,v[42]=x):x=v[42],v[43]!==x||v[44]!==n?(g=(0,t.jsx)("div",{className:n,children:x}),v[43]=x,v[44]=n,v[45]=g):g=v[45],g}let e4=(0,eB.b)("Failed to generate questions. Please try again.");function e7(e){let i,o,s,l,a,c,d,f,x,g,v,b,y,w,j,N,S,k,_,C,B,A,E,z,T,R,M=(0,r.c)(95),{isOpen:q,setIsOpen:I,prompt:L,setPrompt:P}=e,F=(0,eC.f)(),D=(0,p.f)(),O=(0,eA.f)(),[W,U]=(0,h.useReducer)(eZ,eX),K=W.kind;M[0]===Symbol.for("react.memo_cache_sentinel")?(i=[],M[0]=i):i=M[0];let[G,Y]=(0,h.useState)(i),[H,J]=(0,h.useState)(eQ);M[1]===Symbol.for("react.memo_cache_sentinel")?(o=new Set,M[1]=o):o=M[1];let[X,Z]=(0,h.useState)(o);M[2]===Symbol.for("react.memo_cache_sentinel")?(s=[],M[2]=s):s=M[2];let[Q,ee]=(0,h.useState)(s),et=(0,h.useRef)(null),er=(0,h.useRef)(L),en=(0,h.useRef)(null);M[3]!==Q?(l=Q.flatMap(te),M[3]=Q,M[4]=l):l=M[4];let ei=l,eo=Q.reduce(e8,0);M[5]===Symbol.for("react.memo_cache_sentinel")?(a=async()=>{U({type:"questions_requested"}),ee([]);let e=new AbortController;et.current=e;let t=await eY(er.current,e);e.signal.aborted||((0,ef.C)(t)?(Y(t.data),J(eQ),Z(new Set),U({type:"questions_loaded"})):U({type:"questions_failed"}))},M[5]=a):a=M[5];let es=a;M[6]!==q||M[7]!==L?(c=()=>(q&&(er.current=L,es()),()=>{et.current?.abort()}),M[6]=q,M[7]=L,M[8]=c):c=M[8],M[9]!==q?(d=[q,es],M[9]=q,M[10]=d):d=M[10],(0,h.useEffect)(c,d),M[11]!==I?(f=()=>{et.current?.abort(),I(!1)},M[11]=I,M[12]=f):f=M[12];let el=f;M[13]===Symbol.for("react.memo_cache_sentinel")?(x=(e,t)=>{J(r=>({...r,text:{...r.text,[e]:t}}))},M[13]=x):x=M[13];let ea=x;M[14]===Symbol.for("react.memo_cache_sentinel")?(g=(e,t)=>{J(r=>({...r,select:{...r.select,[e]:r.select[e]===t?"":t}}))},M[14]=g):g=M[14];let eu=g;M[15]===Symbol.for("react.memo_cache_sentinel")?(v=(e,t)=>{J(r=>({...r,multiSelect:{...r.multiSelect,[e]:e1(r.multiSelect[e],t)}}))},M[15]=v):v=M[15];let ec=v;M[16]===Symbol.for("react.memo_cache_sentinel")?(b=e=>{Z(t=>e1(t,e))},M[16]=b):b=M[16];let ed=b;if(M[17]!==ei||M[18]!==H||M[19]!==Q||M[20]!==F||M[21]!==D||M[22]!==el||M[23]!==q||M[24]!==O||M[25]!==K||M[26]!==G||M[27]!==I||M[28]!==P||M[29]!==X||M[30]!==eo){let e,r,i,o,s,l,a,c,d=e2({questions:G,answers:H,skippedIds:X});M[42]!==H||M[43]!==G||M[44]!==X?(e=function({questions:e,answers:t,skippedIds:r}){return e.some(e=>!r.has(e.id)&&null!==e0(e,t))}({questions:G,answers:H,skippedIds:X}),M[42]=H,M[43]=G,M[44]=X,M[45]=e):e=M[45];let f=e,p="confirmed"===K&&(d.length>0||ei.length>0)||ei.length>0;M[46]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{U({type:"round_confirmed"})},M[46]=r):r=M[46];let h=r;M[47]!==ei||M[48]!==H||M[49]!==G||M[50]!==X?(i=async()=>{let e=e2({questions:G,answers:H,skippedIds:X}),t=[...ei,...e];if(0===t.length)return;ee(t=>[...t,{questions:G,resolvedAnswers:e}]),U({type:"followups_requested"});let r=new AbortController;et.current=r;let n=await eH({originalPrompt:er.current,previousQA:t,abortController:r});r.signal.aborted||((0,ef.C)(n)?(Y(n.data),J(eQ),Z(new Set),U({type:"followups_loaded"}),requestAnimationFrame(()=>{en.current?.scrollIntoView({behavior:"smooth",block:"nearest"})})):U({type:"followups_failed"}))},M[47]=ei,M[48]=H,M[49]=G,M[50]=X,M[51]=i):i=M[51];let x=i;M[52]!==ei||M[53]!==H||M[54]!==G||M[55]!==I||M[56]!==P||M[57]!==X?(o=async()=>{let e=[...ei,...e2({questions:G,answers:H,skippedIds:X})];if(0===e.length)return;U({type:"improve_requested"});let t=new AbortController;et.current=t;let r=await eJ({originalPrompt:er.current,answeredQuestions:e,abortController:t});if(!t.signal.aborted){if((0,ef.V)(r))return void U({type:"improve_failed"});(0,ej.V)(ej.G.ImprovePromptApply,{promptLength:r.data.length}),P(r.data),I(!1)}},M[52]=ei,M[53]=H,M[54]=G,M[55]=I,M[56]=P,M[57]=X,M[58]=o):o=M[58];let g=o,v="loading_followups"===K,b="questions"===K,z="confirmed"===K;M[59]!==Q.length||M[60]!==D||M[61]!==z?(s=function(e,{isConfirmed:t,completedRoundCount:r}){return e(t?"Answers locked in. Dig deeper or apply now.":r>0?"Digging deeper based on your answers.":"Answer what’s useful, skip what isn’t.")}(D,{isConfirmed:z,completedRoundCount:Q.length}),M[59]=Q.length,M[60]=D,M[61]=z,M[62]=s):s=M[62];let T=s;w=ek.N,A=q,E=el,y=ek.d,j="ph-no-capture max-w-160 p-0",N="hidden",S=!1,M[63]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-lg bg-foreground",children:(0,t.jsx)($.f,{className:"h-4 w-4 text-background"})}),M[63]=l):l=M[63],M[64]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1.5",children:[l,(0,t.jsx)("h3",{className:"text-lg font-semibold text-foreground",children:(0,t.jsx)(m.T,{children:"Improve your prompt"})})]}),M[64]=a):a=M[64],M[65]!==b||M[66]!==z||M[67]!==v||M[68]!==T?(c=(b||z||v)&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-1 ml-11",children:T}),M[65]=b,M[66]=z,M[67]=v,M[68]=T,M[69]=c):c=M[69],M[70]!==c?(k=(0,t.jsxs)("div",{className:"px-6 pt-6 pb-4",children:[a,c]}),M[70]=c,M[71]=k):k=M[71],M[72]!==K?(_="loading"===K&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3 py-12 px-6",children:[(0,t.jsx)(e_.f,{decorative:!0,className:"h-5 w-5"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:(0,t.jsx)(m.T,{children:"Analyzing your prompt..."})})]}),M[72]=K,M[73]=_):_=M[73],M[74]!==el||M[75]!==O||M[76]!==K?(C="error"===K&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 py-12 px-6",children:[(0,t.jsx)("p",{className:"text-sm text-destructive",children:O(e4)}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(u.Button,{variant:"outline",size:"sm",onClick:es,children:[(0,t.jsx)(n.f,{className:"h-3.5 w-3.5"}),(0,t.jsx)(m.T,{children:"Retry"})]}),(0,t.jsx)(u.Button,{variant:"ghost",size:"sm",onClick:el,children:(0,t.jsx)(m.T,{children:"Cancel"})})]})]}),M[74]=el,M[75]=O,M[76]=K,M[77]=C):C=M[77],B=(b||z||v)&&(0,t.jsxs)("form",{className:"contents",onSubmit:e=>{e.preventDefault(),b&&f&&h()},children:[(0,t.jsx)("div",{className:"border-t"}),(0,t.jsxs)("div",{className:"flex flex-col gap-8 px-6 py-6 max-h-[60vh] overflow-y-auto",children:[Q.flatMap((e,r)=>e.resolvedAnswers.map((e,n)=>{let i=Q.slice(0,r).reduce(e9,0)+n;return(0,t.jsx)(e5,{question:e.question,answer:e.answer,index:i},`prev-${r}-${n}`)})),Q.length>0&&G.length>0&&!v&&!z&&(0,t.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground pt-2",children:[(0,t.jsx)("div",{className:"flex-1 border-t"}),(0,t.jsx)("span",{className:"shrink-0",children:(0,t.jsx)(m.T,{children:"Follow-up questions"})}),(0,t.jsx)("div",{className:"flex-1 border-t"})]}),v&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3 py-6",children:[(0,t.jsx)(e_.f,{decorative:!0,className:"h-5 w-5"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:(0,t.jsx)(m.T,{children:"Generating follow-up questions..."})})]}),z&&d.map((e,r)=>(0,t.jsx)(e5,{question:e.question,answer:e.answer,index:eo+r},`confirmed-${r}`)),b&&G.map((e,r)=>(0,t.jsx)(e6,{question:e,index:eo+r,answers:H,isSkipped:X.has(e.id),onUpdateText:ea,onSelectOption:eu,onToggleMulti:ec,onToggleSkip:ed},e.id)),(0,t.jsx)("div",{ref:en})]}),(0,t.jsxs)("div",{className:"border-t px-6 py-4 flex items-center justify-between bg-muted/10",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:b&&X.size>0&&(0,t.jsxs)(m.T,{children:[(0,t.jsx)(eE.d,{children:F.number(X.size,{preset:"integer"})})," skipped"]})}),(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)(u.Button,{type:"button",variant:"ghost",size:"sm",onClick:el,children:(0,t.jsx)(m.T,{children:"Cancel"})}),b&&(0,t.jsxs)(u.Button,{type:"submit",size:"sm",className:"px-6",disabled:!f,children:[(0,t.jsx)(V.f,{className:"h-4 w-4"}),(0,t.jsx)(m.T,{children:"Confirm"})]}),z&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(u.Button,{type:"button",variant:"outline",size:"sm",onClick:x,children:[(0,t.jsx)(eS.f,{className:"h-4 w-4"}),(0,t.jsx)(m.T,{children:"Dig deeper"})]}),(0,t.jsxs)(u.Button,{type:"button",size:"sm",className:"px-6",disabled:!p,onClick:g,children:[(0,t.jsx)($.f,{className:"h-4 w-4"}),(0,t.jsx)(m.T,{children:"Apply"})]})]})]})]})]}),M[17]=ei,M[18]=H,M[19]=Q,M[20]=F,M[21]=D,M[22]=el,M[23]=q,M[24]=O,M[25]=K,M[26]=G,M[27]=I,M[28]=P,M[29]=X,M[30]=eo,M[31]=y,M[32]=w,M[33]=j,M[34]=N,M[35]=S,M[36]=k,M[37]=_,M[38]=C,M[39]=B,M[40]=A,M[41]=E}else y=M[31],w=M[32],j=M[33],N=M[34],S=M[35],k=M[36],_=M[37],C=M[38],B=M[39],A=M[40],E=M[41];return M[78]!==K?(z="improving"===K&&(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3 py-12 px-6",children:[(0,t.jsx)(e_.f,{decorative:!0,className:"h-5 w-5"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:(0,t.jsx)(m.T,{children:"Rewriting your prompt..."})})]}),M[78]=K,M[79]=z):z=M[79],M[80]!==y||M[81]!==j||M[82]!==N||M[83]!==S||M[84]!==k||M[85]!==_||M[86]!==C||M[87]!==B||M[88]!==z?(T=(0,t.jsxs)(y,{className:j,"data-dd-privacy":N,showCloseButton:S,children:[k,_,C,B,z]}),M[80]=y,M[81]=j,M[82]=N,M[83]=S,M[84]=k,M[85]=_,M[86]=C,M[87]=B,M[88]=z,M[89]=T):T=M[89],M[90]!==w||M[91]!==A||M[92]!==E||M[93]!==T?(R=(0,t.jsx)(w,{open:A,onOpenChange:E,children:T}),M[90]=w,M[91]=A,M[92]=E,M[93]=T,M[94]=R):R=M[94],R}function e9(e,t){return e+t.resolvedAnswers.length}function e8(e,t){return e+t.resolvedAnswers.length}function te(e){return e.resolvedAnswers}let tt=ep.z.object({state:ep.z.object({modelSlugs:ep.z.array(ep.z.string()).min(1)})});function tr(e){let n,i,o,s=(0,r.c)(9),{canSubmit:l,isAttachmentLoading:a,isStreaming:c,onRun:d,onSignupIntent:f}=e,m=(0,p.f)(),h=!l||a||c;return s[0]!==m?(n=m("Run Fusion"),s[0]=m,s[1]=n):n=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(I.f,{className:"h-4 w-4"}),s[2]=i):i=s[2],s[3]!==c||s[4]!==d||s[5]!==f||s[6]!==h||s[7]!==n?(o=(0,t.jsx)(u.Button,{onClick:d,onPointerEnter:f,onPointerDown:f,onTouchStart:f,onFocus:f,disabled:h,isLoading:c,size:"icon-sm",className:"transition-[color,background-color,border-color,opacity]","aria-label":n,children:i}),s[3]=c,s[4]=d,s[5]=f,s[6]=h,s[7]=n,s[8]=o):o=s[8],o}function tn(){let e,n=(0,r.c)(1);return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(h.Suspense,{fallback:null,children:(0,t.jsx)(ti,{})}),n[0]=e):e=n[0],e}function ti(){let e,n,o,s,a,c,x,g,v,b,y,j,N,S,k,_,C,B,E,z,T,R,M,I,ei,ep,eS,ek,e_,eC,eB,eA,eE,ez,eT,eR,eM,eq,eI,eL,eV,eP,eF,eD,eO,e$,eW,eU,eK,eG,eY,eH,eJ,eX,eZ,eQ,e0,e1,e2,e3,e5,e6,e4,e9,e8,te,tn,ti,tL,tV,tP,tF,tD,tO,t$,tW,tU,tK,tG,tY,tH,tJ,tX,tZ,tQ,t0,t1,t2,t3,t5,t6,t4,t7,t9,t8,re,rt,rr,rn,ri,ro,rs,rl,ra,ru,rc,rd,rf,rm,rp,rh,rx=(0,r.c)(315),rg=(0,p.f)(),rv=(0,h.useId)(),rb=(0,w.B)(tI),ry=(0,w.B)(tq),rw=(0,w.B)(tM),rj=(0,w.B)(tR),rN=(0,w.B)(tT),rS=(0,w.B)(tz),rk=(0,w.B)(tE),r_=(0,w.B)(tA),rC=(0,w.B)(tB),rB=(0,w.B)(tC),rA=(0,w.B)(t_),rE=(0,w.B)(tk),rz=(0,w.B)(tS),rT=(0,w.B)(tN),rR=(0,w.B)(tj),rM=(0,w.B)(tw),rq=(0,w.B)(ty),rI=(0,w.B)(tb),rL=(0,w.B)(tv),rV=(0,w.B)(tg),rP=(0,w.B)(tx),rF=(0,w.B)(th),rD=(0,es.E)(),rO=(0,h.useRef)(null),{isDragging:r$,isValid:rW}=(0,el.f)(rO),rU=(0,h.useRef)(rF),rK=(0,h.useRef)(!1);rx[0]!==rD||rx[1]!==rF?(e=()=>{rF!==rU.current&&(rU.current=rF,rD.reset(),rK.current=!1)},n=[rF,rD],rx[0]=rD,rx[1]=rF,rx[2]=e,rx[3]=n):(e=rx[2],n=rx[3]),(0,h.useEffect)(e,n),rx[4]!==rD.list||rx[5]!==rP?(o=()=>{rP(rD.list.map(tp).filter(tm))},s=[rD.list,rP],rx[4]=rD.list,rx[5]=rP,rx[6]=o,rx[7]=s):(o=rx[6],s=rx[7]),(0,h.useEffect)(o,s);let rG=(0,d.S)(),rY=rG?.getModelInfoByVariantSlug,rH=rG?.getModelInfoByVariantPermaslug;rx[8]===Symbol.for("react.memo_cache_sentinel")?(a={models:eg.d,prompt:eg.d},rx[8]=a):a=rx[8];let[rJ]=(0,eg.i)(a),{models:rX,prompt:rZ}=rJ,rQ=(0,ec.f)(tf),r0=(0,K.f)(rQ),r1=(0,eb.f)(),[r2,r3]=(0,h.useState)(!1),[r5,r6]=(0,h.useState)(""),[r4,r7]=(0,h.useState)(!1),r9=(0,h.useRef)(!1),r8=(0,h.useRef)(!1);rx[9]!==rb||rx[10]!==rZ||rx[11]!==rN?(c=()=>{rZ&&"idle"===rb&&!r9.current&&(r9.current=!0,rN(rZ))},x=[rZ,rb,rN],rx[9]=rb,rx[10]=rZ,rx[11]=rN,rx[12]=c,rx[13]=x):(c=rx[12],x=rx[13]),(0,h.useEffect)(c,x);let ne=(0,w.B)(td),nt=(0,A.f)();rx[14]!==nt||rx[15]!==ne?(g=()=>nt?(0,eN.k)(ne):Promise.resolve([]),v=[ne,nt],rx[14]=nt,rx[15]=ne,rx[16]=g,rx[17]=v):(g=rx[16],v=rx[17]),rx[18]===Symbol.for("react.memo_cache_sentinel")?(b=[],rx[18]=b):b=rx[18],rx[19]!==g||rx[20]!==v?(y={querier:g,deps:v,defaultValue:b},rx[19]=g,rx[20]=v,rx[21]=y):y=rx[21];let nr=(0,eN._)(y),nn="idle"===rb,ni="streaming"===rb,no=rD.loadingKeys.size>0;rx[22]!==no||rx[23]!==nt||rx[24]!==ry||rx[25]!==rj.length?(j=nt&&!!ry.trim()&&rj.length>=2&&!no,rx[22]=no,rx[23]=nt,rx[24]=ry,rx[25]=rj.length,rx[26]=j):j=rx[26];let ns=j;rx[27]!==rB||rx[28]!==no||rx[29]!==rQ||rx[30]!==r1?(N=()=>{if(!no){if(!rQ)return void r1({forceRedirectUrl:"/fusion",signInForceRedirectUrl:"/fusion"});rB()}},rx[27]=rB,rx[28]=no,rx[29]=rQ,rx[30]=r1,rx[31]=N):N=rx[31];let nl=N;rx[32]!==rD?(S=async e=>{if(!e.clipboardData)return;let t=[...e.clipboardData.items].some(tc),r=[...e.clipboardData.items].some(tu);t&&!r&&await rD.handleFiles((0,eo.O)(e))},rx[32]=rD,rx[33]=S):S=rx[33];let na=S;rx[34]!==rH||rx[35]!==rY?(k=(e,t)=>rY&&rH?(0,ed.k)(e.map(e=>t?rH(e)??rY(e):rY(e)??rH(e))):[],rx[34]=rH,rx[35]=rY,rx[36]=k):k=rx[36];let nu=k;rx[37]!==nu||rx[38]!==rk||rx[39]!==nr?(_=e=>{if("number"==typeof e){let t=nr.find(t=>t.id===e);t&&rk(e,nu(t.modelSlugs,!1))}else{let t=f.p.find(t=>t.id===e);t&&rk(e,nu(t.permaslugs,!0))}},rx[37]=nu,rx[38]=rk,rx[39]=nr,rx[40]=_):_=rx[40];let nc=_;rx[41]!==rk?(C=()=>{rk("custom",[])},rx[41]=rk,rx[42]=C):C=rx[42];let nd=C;rx[43]!==rH||rx[44]!==rY||rx[45]!==rX||rx[46]!==rb||rx[47]!==nu||rx[48]!==rk||rx[49]!==rj?(B=()=>{if(!rX||"idle"!==rb||r8.current||!rY||!rH)return;let e=rX.split(",").map(ta).filter(Boolean);if(0===e.length){r8.current=!0;return}let t=nu(e,!1);if(0===t.length)return;r8.current=!0;let r=new Set(rj.map(tl)),n=t.filter(e=>!r.has((0,i.i)(e)));n.length>0&&rk("custom",[...rj,...n].slice(0,4))},E=[rX,rb,rY,rH,nu,rk,rj],rx[43]=rH,rx[44]=rY,rx[45]=rX,rx[46]=rb,rx[47]=nu,rx[48]=rk,rx[49]=rj,rx[50]=B,rx[51]=E):(B=rx[50],E=rx[51]),(0,h.useEffect)(B,E),rx[52]!==nt||rx[53]!==r5||rx[54]!==rA?(z=async()=>{nt&&r5.trim()&&(await rA(r5),r3(!1),r6(""))},rx[52]=nt,rx[53]=r5,rx[54]=rA,rx[55]=z):z=rx[55];let nf=z;if(rx[56]!==rY||rx[57]!==nc||rx[58]!==nu||rx[59]!==rw||rx[60]!==rj.length||rx[61]!==rS?(T=()=>{if(!rK.current){if(rj.length>0){rK.current=!0;return}if(rY&&!r8.current){if("custom"===rw){let e=function(e){let t=localStorage.getItem("openrouter:mixture-settings");if(!t)return[];let r=(0,ef.$)(()=>JSON.parse(t));if((0,ef.V)(r))return[];let n=(0,em.C)(tt,r.data);return(0,ef.V)(n)?[]:e(n.data.state.modelSlugs,!1)}(nu);if(e.length>0){rS(e),rK.current=!0;return}}nc("custom"===rw?f.j:rw)}}},R=[rY,nc,nu,rS,rj.length,rw],rx[56]=rY,rx[57]=nc,rx[58]=nu,rx[59]=rw,rx[60]=rj.length,rx[61]=rS,rx[62]=T,rx[63]=R):(T=rx[62],R=rx[63]),(0,h.useEffect)(T,R),rx[64]===Symbol.for("react.memo_cache_sentinel")?(M=(0,t.jsx)(m.T,{children:"Model Fusion"}),rx[64]=M):M=rx[64],rx[65]===Symbol.for("react.memo_cache_sentinel")?(I=(0,t.jsxs)("div",{className:"text-3xl font-bold tracking-tight inline-flex items-center gap-2 justify-center",children:[M,(0,t.jsx)(G.Badge,{variant:"promo",size:"md",children:(0,t.jsx)(m.T,{children:"beta"})})]}),rx[65]=I):I=rx[65],rx[66]===Symbol.for("react.memo_cache_sentinel")?(ei=(0,t.jsxs)("div",{className:"text-center mb-6 md:absolute md:bottom-full md:left-0 md:right-0 md:mb-0 px-4",children:[I,(0,t.jsx)("p",{className:"text-muted-foreground mt-2",children:(0,t.jsx)(m.T,{children:"Run multiple models side-by-side, run an analysis, and fuse into the best result."})})]}),rx[66]=ei):ei=rx[66],rx[67]!==nc||rx[68]!==rw?(ep=f.p.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>nc(e.id),className:(0,l.f)("inline-flex items-center px-3 py-1.5 rounded-full text-xs font-medium transition-colors border",rw===e.id?"bg-foreground text-background border-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50 border-transparent bg-muted/30"),children:e.label},e.id)),rx[67]=nc,rx[68]=rw,rx[69]=ep):ep=rx[69],rx[70]!==rE||rx[71]!==nc||rx[72]!==rw||rx[73]!==nr){let e;rx[75]!==rE||rx[76]!==nc||rx[77]!==rw?(e=e=>(0,t.jsxs)("div",{className:(0,l.f)("group inline-flex items-center gap-1 rounded-full text-xs font-medium transition-colors border pl-3 pr-1.5 py-1.5",rw===e.id?"bg-foreground text-background border-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50 border-transparent bg-muted/30"),children:[(0,t.jsx)("button",{type:"button",onClick:()=>nc(e.id),className:"mr-1",children:e.label}),(0,t.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),rE(e.id)},className:(0,l.f)("rounded-full p-0.5 opacity-0 group-hover:opacity-100 transition-opacity",rw===e.id?"hover:bg-background/20":"hover:bg-muted-foreground/20"),children:(0,t.jsx)(W.f,{className:"h-3 w-3"})})]},e.id),rx[75]=rE,rx[76]=nc,rx[77]=rw,rx[78]=e):e=rx[78],eS=nr.map(e),rx[70]=rE,rx[71]=nc,rx[72]=rw,rx[73]=nr,rx[74]=eS}else eS=rx[74];let nm="custom"===rw?"bg-foreground text-background border-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/50 border-transparent bg-muted/30";if(rx[79]!==nm?(ek=(0,l.f)("inline-flex items-center px-3 py-1.5 rounded-full text-xs font-medium transition-colors border",nm),rx[79]=nm,rx[80]=ek):ek=rx[80],rx[81]===Symbol.for("react.memo_cache_sentinel")?(e_=(0,t.jsx)(m.T,{children:"Custom"}),rx[81]=e_):e_=rx[81],rx[82]!==nd||rx[83]!==ek?(eC=(0,t.jsx)("button",{type:"button",onClick:nd,className:ek,children:e_}),rx[82]=nd,rx[83]=ek,rx[84]=eC):eC=rx[84],rx[85]!==rg||rx[86]!==nf||rx[87]!==r2||rx[88]!==r5||rx[89]!==rw||rx[90]!==rj.length?(eB="custom"===rw&&rj.length>=2&&(0,t.jsx)("div",{className:"flex items-center gap-2 ml-2 border-l pl-2",children:r2?(0,t.jsxs)("div",{className:"flex items-center gap-1 animate-in fade-in slide-in-from-right-2 duration-200",children:[(0,t.jsx)(J.f,{size:"sm",type:"text",value:r5,onChange:e=>r6(e.target.value),placeholder:rg("Group name"),className:"w-32 rounded-sm px-2",autoFocus:!0,onKeyDown:e=>{"Enter"===e.key&&nf(),"Escape"===e.key&&r3(!1)}}),(0,t.jsx)(u.Button,{size:"icon-sm",variant:"ghost",onClick:nf,disabled:!r5.trim(),children:(0,t.jsx)(V.f,{className:"h-4 w-4"})}),(0,t.jsx)(u.Button,{size:"icon-sm",variant:"ghost",onClick:()=>r3(!1),children:(0,t.jsx)(W.f,{className:"h-4 w-4"})})]}):(0,t.jsxs)(u.Button,{size:"sm",variant:"ghost",tone:"muted",onClick:()=>r3(!0),children:[(0,t.jsx)(L,{className:"h-3.5 w-3.5 mr-1.5"}),(0,t.jsx)(m.T,{children:"Save Group"})]})}),rx[85]=rg,rx[86]=nf,rx[87]=r2,rx[88]=r5,rx[89]=rw,rx[90]=rj.length,rx[91]=eB):eB=rx[91],rx[92]!==ep||rx[93]!==eS||rx[94]!==eC||rx[95]!==eB?(eA=(0,t.jsxs)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1",children:[ep,eS,eC,eB]}),rx[92]=ep,rx[93]=eS,rx[94]=eC,rx[95]=eB,rx[96]=eA):eA=rx[96],rx[97]===Symbol.for("react.memo_cache_sentinel")?(eE=(0,t.jsx)(m.T,{children:"Models"}),rx[97]=eE):eE=rx[97],rx[98]!==rg?(ez=rg("These models each answer your prompt side-by-side"),rx[98]=rg,rx[99]=ez):ez=rx[99],rx[100]===Symbol.for("react.memo_cache_sentinel")?(eT=(0,t.jsx)("span",{className:"inline-flex",children:(0,t.jsx)(D.f,{className:"h-3 w-3 cursor-help text-muted-foreground hover:text-foreground"})}),rx[100]=eT):eT=rx[100],rx[101]!==ez?(eR=(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-xs text-muted-foreground",children:[eE,(0,t.jsx)(er.Tooltip,{content:ez,children:eT})]}),rx[101]=ez,rx[102]=eR):eR=rx[102],rx[103]!==rg||rx[104]!==rC||rx[105]!==rj){let e;rx[107]!==rg||rx[108]!==rC?(e=e=>{let r=(0,i.i)(e);return(0,t.jsx)(Y.X,{variant:"outline",className:"bg-muted/50",onRemove:()=>rC(r),removeLabel:rg("Remove model"),children:e.short_name},r)},rx[107]=rg,rx[108]=rC,rx[109]=e):e=rx[109],eM=rj.map(e),rx[103]=rg,rx[104]=rC,rx[105]=rj,rx[106]=eM}else eM=rx[106];rx[110]!==rg||rx[111]!==rj||rx[112]!==r_?(eq=rj.length<4&&(0,t.jsx)(ev.ModelSelect,{selectedModelSlugs:rj.map(ts),onDone:r_,closeOnSelect:!1,isDialog:!0,title:rg("Add Source Model"),description:rg("Choose models to run side-by-side"),showGuardrailsWarning:!0,hideUnavailableByDefault:!0,children:(0,t.jsx)(Y.k,{label:rg("Add Model")})}),rx[110]=rg,rx[111]=rj,rx[112]=r_,rx[113]=eq):eq=rx[113],rx[114]!==eR||rx[115]!==eM||rx[116]!==eq?(eI=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 min-h-7",children:[eR,eM,eq]}),rx[114]=eR,rx[115]=eM,rx[116]=eq,rx[117]=eI):eI=rx[117],rx[118]===Symbol.for("react.memo_cache_sentinel")?(eL=(0,t.jsx)(m.T,{children:"Synthesizer"}),rx[118]=eL):eL=rx[118],rx[119]!==rg?(eV=rg("This model analyzes all panel responses, then writes the final answer"),rx[119]=rg,rx[120]=eV):eV=rx[120],rx[121]===Symbol.for("react.memo_cache_sentinel")?(eP=(0,t.jsx)("span",{className:"inline-flex",children:(0,t.jsx)(D.f,{className:"h-3 w-3 cursor-help text-muted-foreground hover:text-foreground"})}),rx[121]=eP):eP=rx[121],rx[122]!==eV?(eF=(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-xs text-muted-foreground",children:[eL,(0,t.jsx)(er.Tooltip,{content:eV,children:eP})]}),rx[122]=eV,rx[123]=eF):eF=rx[123],rx[124]!==rY||rx[125]!==rL?(eD=rL?rY?.(rL)??null:null,rx[124]=rY,rx[125]=rL,rx[126]=eD):eD=rx[126],rx[127]!==rV?(eO=e=>rV((0,i.i)(e)),rx[127]=rV,rx[128]=eO):eO=rx[128],rx[129]!==rg?(e$=rg("Select Fusion Model"),rx[129]=rg,rx[130]=e$):e$=rx[130],rx[131]!==rg?(eW=rg("Choose a model to analyze and synthesize the responses"),rx[131]=rg,rx[132]=eW):eW=rx[132],rx[133]!==rY||rx[134]!==rg||rx[135]!==rL?(eU=rL?rY?.(rL)?.short_name??rg("Select model"):rg("Select model"),rx[133]=rY,rx[134]=rg,rx[135]=rL,rx[136]=eU):eU=rx[136],rx[137]!==eU?(eK=(0,t.jsx)(u.Button,{type:"button",variant:"outline",size:"sm",className:"border-dashed px-2.5",children:eU}),rx[137]=eU,rx[138]=eK):eK=rx[138],rx[139]!==eD||rx[140]!==eO||rx[141]!==e$||rx[142]!==eW||rx[143]!==eK?(eG=(0,t.jsx)(ev.ModelSelect,{selected:eD,onDone:eO,isDialog:!0,title:e$,description:eW,showGuardrailsWarning:!0,hideUnavailableByDefault:!0,children:eK}),rx[139]=eD,rx[140]=eO,rx[141]=e$,rx[142]=eW,rx[143]=eK,rx[144]=eG):eG=rx[144],rx[145]!==rg||rx[146]!==rV||rx[147]!==rL?(eY=rL&&rL!==f.b&&(0,t.jsx)(u.Button,{type:"button",variant:"ghost-muted",size:"icon-sm",glyph:"xs",onClick:()=>rV(f.b),title:rg("Reset to default (Claude Opus)"),children:(0,t.jsx)(W.f,{className:"h-3 w-3"})}),rx[145]=rg,rx[146]=rV,rx[147]=rL,rx[148]=eY):eY=rx[148],rx[149]!==eF||rx[150]!==eG||rx[151]!==eY?(eH=(0,t.jsxs)("div",{className:"flex items-center gap-2 min-h-7",children:[eF,eG,eY]}),rx[149]=eF,rx[150]=eG,rx[151]=eY,rx[152]=eH):eH=rx[152],rx[153]!==eA||rx[154]!==eI||rx[155]!==eH?(eJ=(0,t.jsxs)("div",{className:"flex flex-col gap-3 px-4 py-3 border-b bg-background",children:[eA,eI,eH]}),rx[153]=eA,rx[154]=eI,rx[155]=eH,rx[156]=eJ):eJ=rx[156];let np=0===rD.list.length&&!r$;rx[157]===Symbol.for("react.memo_cache_sentinel")?(eX=(0,l.f)("bg-accent/80 flex w-full shadow-inner","p-2"),rx[157]=eX):eX=rx[157];let nh=rD.list.length,nx=!r$;rx[158]!==rD||rx[159]!==rW?(eZ=async e=>{rW&&await rD.handleFiles((0,eo.Q)(e))},rx[158]=rD,rx[159]=rW,rx[160]=eZ):eZ=rx[160],rx[161]!==rW||rx[162]!==eZ?(eQ=(0,t.jsx)(ew.f,{isValid:rW,onDrop:eZ}),rx[161]=rW,rx[162]=eZ,rx[163]=eQ):eQ=rx[163],rx[164]!==nx||rx[165]!==eQ?(e0=(0,t.jsx)(H.f,{hidden:nx,children:eQ}),rx[164]=nx,rx[165]=eQ,rx[166]=e0):e0=rx[166],rx[167]!==rD?(e1=rD.list.map((e,r)=>(0,t.jsx)(eu.f,{attachment:e,onDismiss:()=>rD.remove(e),isLoading:rD.loadingKeys.has((0,ea.i)(e))},`fusion-attachment-${r}`)),rx[167]=rD,rx[168]=e1):e1=rx[168],rx[169]!==e1?(e2=(0,t.jsx)("div",{className:"flex gap-2",children:e1}),rx[169]=e1,rx[170]=e2):e2=rx[170],rx[171]!==rD.list.length||rx[172]!==e0||rx[173]!==e2?(e3=(0,t.jsxs)(ey.f,{className:"rounded-lg",itemCount:nh,orientation:"horizontal",children:[e0,e2]}),rx[171]=rD.list.length,rx[172]=e0,rx[173]=e2,rx[174]=e3):e3=rx[174],rx[175]!==np||rx[176]!==e3?(e5=(0,t.jsx)(H.f,{hidden:np,inClassName:"h-36 slide-in-from-bottom-12",outClassName:"h-0 slide-out-to-bottom-12",className:eX,children:e3}),rx[175]=np,rx[176]=e3,rx[177]=e5):e5=rx[177],rx[178]!==rN?(e6=e=>rN(e.target.value),rx[178]=rN,rx[179]=e6):e6=rx[179],rx[180]!==ns||rx[181]!==nl||rx[182]!==r0||rx[183]!==ni?(e4=e=>{r0(),"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&ns&&!ni&&(e.preventDefault(),nl())},rx[180]=ns,rx[181]=nl,rx[182]=r0,rx[183]=ni,rx[184]=e4):e4=rx[184],rx[185]!==rg?(e9=rg("Ask anything..."),rx[185]=rg,rx[186]=e9):e9=rx[186],rx[187]!==na||rx[188]!==r0||rx[189]!==ry||rx[190]!==e6||rx[191]!==e4||rx[192]!==e9?(e8=(0,t.jsx)(et.o,{value:ry,onChange:e6,onPaste:na,onPointerDown:r0,onKeyDown:e4,placeholder:e9,className:"ph-no-capture min-h-40 text-base border-0 shadow-none rounded-none resize-none p-4 leading-relaxed flex-1 bg-muted/40 focus:bg-muted/50 transition-colors","data-dd-privacy":"hidden",inputClassName:"max-h-[40vh] overflow-y-auto",autoFocus:!0}),rx[187]=na,rx[188]=r0,rx[189]=ry,rx[190]=e6,rx[191]=e4,rx[192]=e9,rx[193]=e8):e8=rx[193],rx[194]!==rg||rx[195]!==rR?(te=rR?rg("Disable Web Search"):rg("Enable Web Search"),rx[194]=rg,rx[195]=rR,rx[196]=te):te=rx[196];let ng=rR?"ghost":"ghost-muted";rx[197]!==rR||rx[198]!==rM?(tn=()=>rM(!rR),rx[197]=rR,rx[198]=rM,rx[199]=tn):tn=rx[199];let nv=rR&&"text-primary bg-primary/14 hover:bg-primary/20";rx[200]!==nv?(ti=(0,l.f)("duration-200",nv),rx[200]=nv,rx[201]=ti):ti=rx[201],rx[202]!==rg||rx[203]!==rR?(tL=rR?rg("Disable Web Search"):rg("Enable Web Search"),rx[202]=rg,rx[203]=rR,rx[204]=tL):tL=rx[204],rx[205]===Symbol.for("react.memo_cache_sentinel")?(tV=(0,t.jsx)(F.f,{className:"h-4 w-4"}),rx[205]=tV):tV=rx[205],rx[206]!==ng||rx[207]!==tn||rx[208]!==ti||rx[209]!==tL?(tP=(0,t.jsx)(u.Button,{variant:ng,size:"icon-sm",onClick:tn,className:ti,"aria-label":tL,children:tV}),rx[206]=ng,rx[207]=tn,rx[208]=ti,rx[209]=tL,rx[210]=tP):tP=rx[210],rx[211]!==te||rx[212]!==tP?(tF=(0,t.jsx)(er.Tooltip,{content:te,children:tP}),rx[211]=te,rx[212]=tP,rx[213]=tF):tF=rx[213],rx[214]!==rD.limit||rx[215]!==rD.list.length||rx[216]!==rg?(tD=rD.list.length>=rD.limit?rg("Maximum {limit} attachments added. Actual limit varies based on model and provider.",{limit:rD.limit}):rg("Limit: {limit} attachments per message. Actual limit varies based on model and provider.",{limit:rD.limit}),rx[214]=rD.limit,rx[215]=rD.list.length,rx[216]=rg,rx[217]=tD):tD=rx[217];let nb=rD.list.length>=rD.limit;rx[218]!==rD?(tO=async()=>{(0,ej.V)(ej.G.AddAttachment),await rD.handleFiles((0,eo.z)())},rx[218]=rD,rx[219]=tO):tO=rx[219],rx[220]!==rg?(t$=rg("Add attachment"),rx[220]=rg,rx[221]=t$):t$=rx[221],rx[222]===Symbol.for("react.memo_cache_sentinel")?(tW=(0,t.jsx)(U.f,{className:"h-4 w-4"}),rx[222]=tW):tW=rx[222],rx[223]!==nb||rx[224]!==tO||rx[225]!==t$?(tU=(0,t.jsx)("span",{className:"inline-flex",children:(0,t.jsx)(u.Button,{variant:"ghost-muted",size:"icon-sm",disabled:nb,onClick:tO,"aria-label":t$,children:tW})}),rx[223]=nb,rx[224]=tO,rx[225]=t$,rx[226]=tU):tU=rx[226],rx[227]!==tD||rx[228]!==tU?(tK=(0,t.jsx)(er.Tooltip,{width:"sm",content:tD,children:tU}),rx[227]=tD,rx[228]=tU,rx[229]=tK):tK=rx[229],rx[230]!==rg?(tG=rg("Refine your prompt"),rx[230]=rg,rx[231]=tG):tG=rx[231],rx[232]!==nn||rx[233]!==r4||rx[234]!==ry?(tY=!ry.trim()||!nn||r4,rx[232]=nn,rx[233]=r4,rx[234]=ry,rx[235]=tY):tY=rx[235],rx[236]!==ry.length?(tH=()=>{(0,ej.V)(ej.G.ImprovePrompt,{promptLength:ry.length}),r7(!0)},rx[236]=ry.length,rx[237]=tH):tH=rx[237],rx[238]!==rg?(tJ=rg("Refine your prompt"),rx[238]=rg,rx[239]=tJ):tJ=rx[239],rx[240]===Symbol.for("react.memo_cache_sentinel")?(tX=(0,t.jsx)($.f,{className:"h-4 w-4"}),rx[240]=tX):tX=rx[240],rx[241]!==tY||rx[242]!==tH||rx[243]!==tJ?(tZ=(0,t.jsx)(u.Button,{variant:"ghost-muted",size:"icon-sm",disabled:tY,onClick:tH,"aria-label":tJ,children:tX}),rx[241]=tY,rx[242]=tH,rx[243]=tJ,rx[244]=tZ):tZ=rx[244],rx[245]!==tG||rx[246]!==tZ?(tQ=(0,t.jsx)(er.Tooltip,{content:tG,children:tZ}),rx[245]=tG,rx[246]=tZ,rx[247]=tQ):tQ=rx[247],rx[248]!==rg?(t0=rg("Fusion options"),rx[248]=rg,rx[249]=t0):t0=rx[249],rx[250]===Symbol.for("react.memo_cache_sentinel")?(t1=(0,t.jsx)(P.f,{className:"h-4 w-4"}),rx[250]=t1):t1=rx[250],rx[251]!==t0?(t2=(0,t.jsx)(Z.J,{render:(0,t.jsx)(u.Button,{type:"button",variant:"ghost",tone:"muted",size:"icon-sm","aria-label":t0,className:"hover:bg-muted/50",children:t1})}),rx[251]=t0,rx[252]=t2):t2=rx[252],rx[253]===Symbol.for("react.memo_cache_sentinel")?(t3=(0,t.jsx)(O.f,{className:"h-3.5 w-3.5"}),t5=(0,t.jsx)(m.T,{children:"Reasoning Effort"}),rx[253]=t3,rx[254]=t5):(t3=rx[253],t5=rx[254]),rx[255]!==rv?(t6=(0,t.jsxs)(X.f,{variant:"field",htmlFor:rv,className:"flex items-center gap-1.5",children:[t3,t5]}),rx[255]=rv,rx[256]=t6):t6=rx[256];let ny=rz??ex.n.High;rx[257]!==rT?(t4=e=>{let t=(0,em.C)(eh.P,e);(0,ef.C)(t)&&rT(t.data)},rx[257]=rT,rx[258]=t4):t4=rx[258],rx[259]!==rg?(t7=rg("Reasoning Effort"),rx[259]=rg,rx[260]=t7):t7=rx[260],rx[261]!==rg?(t9=rg("Select effort"),rx[261]=rg,rx[262]=t9):t9=rx[262],rx[263]!==t9?(t8=(0,t.jsx)(Q.SelectValue,{placeholder:t9}),rx[263]=t9,rx[264]=t8):t8=rx[264],rx[265]!==rv||rx[266]!==t7||rx[267]!==t8?(re=(0,t.jsx)(Q.SelectTrigger,{id:rv,"aria-label":t7,children:t8}),rx[265]=rv,rx[266]=t7,rx[267]=t8,rx[268]=re):re=rx[268],rx[269]===Symbol.for("react.memo_cache_sentinel")?(rt=(0,t.jsx)(Q.SelectContent,{children:Object.entries(ex.n).map(to)}),rx[269]=rt):rt=rx[269],rx[270]!==t4||rx[271]!==re||rx[272]!==ny?(rr=(0,t.jsxs)(Q.Select,{size:"compact",value:ny,onValueChange:t4,children:[re,rt]}),rx[270]=t4,rx[271]=re,rx[272]=ny,rx[273]=rr):rr=rx[273],rx[274]!==rr||rx[275]!==t6?(rn=(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[t6,rr]}),rx[274]=rr,rx[275]=t6,rx[276]=rn):rn=rx[276],rx[277]===Symbol.for("react.memo_cache_sentinel")?(ri=(0,t.jsxs)(X.f,{variant:"field",htmlFor:"input-temperature",className:"flex items-center gap-1.5",children:[(0,t.jsx)(q,{className:"h-3.5 w-3.5"}),(0,t.jsx)(m.T,{children:"Temperature"})]}),rx[277]=ri):ri=rx[277];let nw=rq??1;return rx[278]!==rI?(ro=e=>{rI(1e-9>Math.abs(e-1)?null:e)},rx[278]=rI,rx[279]=ro):ro=rx[279],rx[280]!==nw||rx[281]!==ro?(rs=(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[ri,(0,t.jsx)(ee.f,{id:"input-temperature",value:nw,min:0,max:2,step:.1,showValue:!0,className:"w-full",onValueChange:ro})]}),rx[280]=nw,rx[281]=ro,rx[282]=rs):rs=rx[282],rx[283]!==rn||rx[284]!==rs?(rl=(0,t.jsx)(Z.T,{side:"top",align:"start",className:"w-64 p-3",children:(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[rn,rs]})}),rx[283]=rn,rx[284]=rs,rx[285]=rl):rl=rx[285],rx[286]!==rl||rx[287]!==t2?(ra=(0,t.jsxs)(Z.V,{children:[t2,rl]}),rx[286]=rl,rx[287]=t2,rx[288]=ra):ra=rx[288],rx[289]===Symbol.for("react.memo_cache_sentinel")?(ru=(0,t.jsx)("div",{className:"flex-1"}),rx[289]=ru):ru=rx[289],rx[290]!==ns||rx[291]!==nl||rx[292]!==r0||rx[293]!==no||rx[294]!==ni?(rc=(0,t.jsx)(tr,{canSubmit:ns,isAttachmentLoading:no,isStreaming:ni,onRun:nl,onSignupIntent:r0}),rx[290]=ns,rx[291]=nl,rx[292]=r0,rx[293]=no,rx[294]=ni,rx[295]=rc):rc=rx[295],rx[296]!==ra||rx[297]!==rc||rx[298]!==tF||rx[299]!==tK||rx[300]!==tQ?(rd=(0,t.jsxs)("div",{className:"px-4 py-3 flex items-center gap-2 border-t bg-background",children:[tF,tK,tQ,ra,ru,rc]}),rx[296]=ra,rx[297]=rc,rx[298]=tF,rx[299]=tK,rx[300]=tQ,rx[301]=rd):rd=rx[301],rx[302]!==rd||rx[303]!==eJ||rx[304]!==e5||rx[305]!==e8?(rf=(0,t.jsxs)("div",{ref:rO,className:"rounded-xl border bg-background overflow-hidden flex flex-col transition duration-200 focus-within:border-focus-border focus-within:shadow-focus",children:[eJ,e5,e8,rd]}),rx[302]=rd,rx[303]=eJ,rx[304]=e5,rx[305]=e8,rx[306]=rf):rf=rx[306],rx[307]===Symbol.for("react.memo_cache_sentinel")?(rm=(0,t.jsx)(en.f,{}),rx[307]=rm):rm=rx[307],rx[308]!==r4||rx[309]!==ry||rx[310]!==rN?(rp=(0,t.jsx)(e7,{isOpen:r4,setIsOpen:r7,prompt:ry,setPrompt:rN}),rx[308]=r4,rx[309]=ry,rx[310]=rN,rx[311]=rp):rp=rx[311],rx[312]!==rf||rx[313]!==rp?(rh=(0,t.jsxs)("div",{className:"w-full max-w-3xl mx-auto px-4 py-8 relative",children:[ei,rf,rm,rp]}),rx[312]=rf,rx[313]=rp,rx[314]=rh):rh=rx[314],rh}function to(e){let[r,n]=e;return(0,t.jsx)(Q.SelectItem,{value:n,children:r},n)}function ts(e){return(0,i.i)(e)}function tl(e){return(0,i.i)(e)}function ta(e){return e.trim()}function tu(e){return"string"===e.kind&&"text/plain"===e.type}function tc(e){return"file"===e.kind}function td(e){return e.workspacePartitionId}function tf(e){return e.isSignedIn}function tm(e){return null!==e}function tp(e){return(0,ei.f)(e)}function th(e){return e.resetGeneration}function tx(e){return e.setAttachmentContentParts}function tg(e){return e.setSynthesizerSlug}function tv(e){return e.synthesizerSlug}function tb(e){return e.setTemperature}function ty(e){return e.temperature}function tw(e){return e.setWebSearchEnabled}function tj(e){return e.isWebSearchEnabled}function tN(e){return e.setReasoningEffort}function tS(e){return e.reasoningEffort}function tk(e){return e.deleteUserModelSet}function t_(e){return e.saveModelSet}function tC(e){return e.compare}function tB(e){return e.removeModel}function tA(e){return e.toggleCustomModel}function tE(e){return e.selectModelSet}function tz(e){return e.setSelectedModels}function tT(e){return e.setPrompt}function tR(e){return e.selectedModels}function tM(e){return e.selectedModelSet}function tq(e){return e.prompt}function tI(e){return e.phase}var tL=e.i(894686),tV=e.i(547670),tP=e.i(1423),tF=e.i(359980);function tD(){let e,n,i,o,s,l,a,u,c,d,f,p,h=(0,r.c)(29),x=(0,eC.f)(),g=(0,w.B)(tW),v=g.length;h[0]!==g?(e=g.map(t$),h[0]=g,h[1]=e):e=h[1];let b=e,y=(0,w.B)(tO);h[2]!==y||h[3]!==b?(n=e=>{let t=(0,z.A)(e,y);return b.filter(e=>t[e]?.isLoading===!1).length},h[2]=y,h[3]=b,h[4]=n):n=h[4];let j=(0,z.H)(n);if(j===v||0===v)return null;let N=v-j;return h[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)("span",{className:"font-medium text-foreground",children:(0,t.jsx)(m.T,{children:"Generating responses..."})}),h[5]=i):i=h[5],h[6]!==j||h[7]!==v?(o=(0,t.jsxs)("div",{className:"flex items-center justify-between text-sm mb-2",children:[i,(0,t.jsxs)("span",{className:"text-xs text-muted-foreground tabular-nums",children:[j," / ",v]})]}),s=(0,t.jsx)(tP.f,{value:j,max:v,track:"muted",className:"h-1.5"}),h[6]=j,h[7]=v,h[8]=o,h[9]=s):(o=h[8],s=h[9]),h[10]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(e_.f,{decorative:!0,className:"size-3"}),h[10]=l):l=h[10],h[11]!==x||h[12]!==N?(a=x.number(N,{preset:"integer"}),h[11]=x,h[12]=N,h[13]=a):a=h[13],h[14]!==a?(u=(0,t.jsxs)(t.Fragment,{children:["Waiting for ",(0,t.jsx)(eE.d,{children:a})," ","model..."]}),h[14]=a,h[15]=u):u=h[15],h[16]!==x||h[17]!==N?(c=x.number(N,{preset:"integer"}),h[16]=x,h[17]=N,h[18]=c):c=h[18],h[19]!==c?(d=(0,t.jsxs)(t.Fragment,{children:["Waiting for ",(0,t.jsx)(eE.d,{children:c})," ","models..."]}),h[19]=c,h[20]=d):d=h[20],h[21]!==N||h[22]!==u||h[23]!==d?(f=(0,t.jsxs)("p",{className:"mt-2 flex items-center gap-1.5 text-xs text-muted-foreground",children:[l,(0,t.jsx)(m.T,{children:(0,t.jsx)(tF.f,{n:N,one:u,other:d})})]}),h[21]=N,h[22]=u,h[23]=d,h[24]=f):f=h[24],h[25]!==f||h[26]!==o||h[27]!==s?(p=(0,t.jsxs)("div",{className:"sticky top-0 z-10 bg-background py-3 border-b mb-6",children:[o,s,f]}),h[25]=f,h[26]=o,h[27]=s,h[28]=p):p=h[28],p}function tO(e){return e.currentRunDbId}function t$(e){return(0,i.i)(e)}function tW(e){return e.selectedModels}var tU=e.i(816443),tK=e.i(565043),tG=e.i(791092),tY=e.i(397847),tH=e.i(665996),tJ=e.i(596807),tX=e.i(665898);function tZ(){let e,n,i,o=(0,r.c)(7),s=(0,p.f)(),l=(0,w.B)(t0);o[0]!==l?(e=l.map(tQ),o[0]=l,o[1]=e):e=o[1];let a=e;return o[2]!==s?(n=s("Sources"),o[2]=s,o[3]=n):n=o[3],o[4]!==n||o[5]!==a?(i=(0,t.jsx)(tH.$,{tabs:a,label:n,progress:"1/3"}),o[4]=n,o[5]=a,o[6]=i):i=o[6],i}function tQ(e){return{key:(0,i.i)(e),name:e.short_name,author:e.author}}function t0(e){return e.selectedModels}function t1(){let e,n,i,o,s,l=(0,r.c)(9),a=(0,p.f)(),u=(0,w.B)(t3),c=(0,w.B)(t2);l[0]!==c?(e=e=>null!==(0,z.P)(e,c),l[0]=c,l[1]=e):e=l[1];let d=(0,z.H)(e);return u||d?(l[2]!==a?(n=a("Analysis"),l[2]=a,l[3]=n):n=l[3],l[4]!==n?(i=(0,t.jsx)(tG.f,{label:n,progress:"2/3"}),l[4]=n,l[5]=i):i=l[5],l[6]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(T.C,{})}),l[6]=o):o=l[6],l[7]!==i?(s=(0,t.jsxs)("div",{children:[i,o]}),l[7]=i,l[8]=s):s=l[8],s):null}function t2(e){return e.currentRunDbId}function t3(e){return e.isAnalyzing}function t5(){let e,i,s,l,c,f,p,v,b=(0,r.c)(27),y=(0,w.B)(rr),j=(0,w.B)(rt),N=(0,w.B)(re),S=(0,w.B)(t8),k=(0,w.B)(t9),_=(0,w.B)(t7),C=j===tX.D,[B,A]=(0,h.useState)(!1),{availableTextModels:E}=(0,d.S)();b[0]!==y?(e=()=>{"streaming"===y&&A(!1)},i=[y],b[0]=y,b[1]=e,b[2]=i):(e=b[1],i=b[2]),(0,h.useEffect)(e,i),b[3]!==E?(s=E??[],b[3]=E,b[4]=s):s=b[4],b[5]!==s?(l=s.filter(t4).slice(0,3),b[5]=s,b[6]=l):l=b[6];let z=l;b[7]!==N||b[8]!==z||b[9]!==_?(c=()=>{z.length>=2&&(_("custom",z),N())},b[7]=N,b[8]=z,b[9]=_,b[10]=c):c=b[10];let T=c,R=(0,w.B)(t6);return j?(b[11]!==z||b[12]!==T||b[13]!==B||b[14]!==C?(f=C&&(0,t.jsx)(x.f,{open:!B,onOpenChange:e=>{e||A(!0)},onContinueWithFreeModels:z.length>=2?T:void 0}),b[11]=z,b[12]=T,b[13]=B,b[14]=C,b[15]=f):f=b[15],b[16]!==N||b[17]!==R||b[18]!==j||b[19]!==B||b[20]!==C||b[21]!==S||b[22]!==k?(p=(!C||B)&&(0,t.jsx)(a.M,{variant:"negative",children:(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:j}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:j===o.F?(0,t.jsx)(u.Button,{variant:"outline",size:"sm",render:(0,t.jsx)(g.Link,{href:"/workspaces",children:(0,t.jsx)(m.T,{children:"Go to workspaces"})})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(u.Button,{variant:"outline",size:"sm",onClick:null===R?()=>void N():()=>void S(),children:[(0,t.jsx)(n.f,{className:"h-4 w-4"}),(0,t.jsx)(m.T,{children:"Try again"})]}),(0,t.jsx)(u.Button,{variant:"ghost",size:"sm",onClick:k,children:(0,t.jsx)(m.T,{children:"Try with different models"})})]})})]})}),b[16]=N,b[17]=R,b[18]=j,b[19]=B,b[20]=C,b[21]=S,b[22]=k,b[23]=p):p=b[23],b[24]!==f||b[25]!==p?(v=(0,t.jsxs)(t.Fragment,{children:[f,p]}),b[24]=f,b[25]=p,b[26]=v):v=b[26],v):null}function t6(e){return e.currentRunDbId}function t4(e){return e.endpoint?.is_free||e.slug.endsWith(":free")}function t7(e){return e.selectModelSet}function t9(e){return e.tryAnother}function t8(e){return e.rerun}function re(e){return e.compare}function rt(e){return e.error}function rr(e){return e.phase}function rn(){let e,n,i,o=(0,r.c)(10),s=(0,w.B)(rc),l=(0,w.B)(ru),a=(0,w.B)(ra),u=(0,w.B)(rl),c=(0,w.B)(rs),d=(0,w.B)(ro),m=(0,w.B)(ri);o[0]!==l?(e=f.p.find(e=>e.id===l),o[0]=l,o[1]=e):e=o[1];let p=e,h=p?p.label:"Custom";o[2]!==a?(n={kind:"live",startTime:a},o[2]=a,o[3]=n):n=o[3];let x=(0,tJ.f)(n),g="streaming"===c||"synthesizing"===c||d?m:void 0;return o[4]!==u||o[5]!==h||o[6]!==s||o[7]!==g||o[8]!==x?(i=(0,t.jsx)(tU.f,{prompt:s,modelSetLabel:h,timestamp:x,defaultCollapsed:!0,isWebSearchEnabled:u,onStop:g}),o[4]=u,o[5]=h,o[6]=s,o[7]=g,o[8]=x,o[9]=i):i=o[9],i}function ri(e){return e.stopRun}function ro(e){return e.isAnalyzing}function rs(e){return e.phase}function rl(e){return e.isWebSearchEnabled}function ra(e){return e.startTime}function ru(e){return e.selectedModelSet}function rc(e){return e.prompt}function rd(){let e,n,i,o,s,l,a,u,c=(0,r.c)(14),d=(0,p.f)(),f=(0,w.B)(rf);if("idle"===f){let e;return c[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"flex-1 flex flex-col justify-center",children:(0,t.jsx)(tn,{})}),c[0]=e):e=c[0],e}let m="synthesizing"===f||"complete"===f;return c[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(rn,{}),c[1]=e):e=c[1],c[2]!==f?(n="streaming"===f&&(0,t.jsx)(tD,{}),c[2]=f,c[3]=n):n=c[3],c[4]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(tZ,{}),o=(0,t.jsx)(t1,{}),c[4]=i,c[5]=o):(i=c[4],o=c[5]),c[6]!==d||c[7]!==m?(s=m&&(0,t.jsxs)("div",{children:[(0,t.jsx)(tG.f,{label:d("Result"),progress:"3/3"}),(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(tY.f,{})})]}),c[6]=d,c[7]=m,c[8]=s):s=c[8],c[9]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)(t5,{}),a=(0,t.jsx)(tV.f,{}),c[9]=l,c[10]=a):(l=c[9],a=c[10]),c[11]!==n||c[12]!==s?(u=(0,t.jsxs)("div",{className:"w-full max-w-3xl mx-auto px-4 pt-8 pb-12 flex flex-col gap-y-6",children:[e,n,i,o,s,l,a]}),c[11]=n,c[12]=s,c[13]=u):u=c[13],u}function rf(e){return e.phase}e.s(["FusionPage",0,function(){let e,n,i,o,a,u,d,f,m,p,h,x,g,b,S,z=(0,r.c)(11);f=(0,r.c)(2),m=(0,w.B)(B),p=(0,w.B)(C),h=(0,w.B)(_),x=(0,w.B)(k),g="streaming"===m||"all-complete"===m&&(p||!!h&&!x)||"synthesizing"===m,b=(0,w.B)(N),S=g||b,f[0]!==g?(d={shouldGuardUrl:j,isSpaGuardActive:g},f[0]=g,f[1]=d):d=f[1],(0,y.f)(S,"Your fusion runs are still in progress. If you leave now, they will be interrupted. Are you sure?",d),(0,E.f)();let T=(0,v.f)(),q=(0,c.f)(s.J.Fusion),I=(0,A.f)();if(z[0]!==q||z[1]!==I||z[2]!==T?(e={noWorkspaceGate:T,fusionCapabilityGate:q,isPartitionCurrent:I},n=(0,M.B)(e),z[0]=q,z[1]=I,z[2]=T,z[3]=e,z[4]=n):(e=z[3],n=z[4]),!n){let r;return z[5]!==e?(r=(0,t.jsx)(M.A,{surface:"fusion",...e}),z[5]=e,z[6]=r):r=z[6],r}return z[7]===Symbol.for("react.memo_cache_sentinel")?(i=(0,l.f)("fixed inset-x-0 bottom-0 top-[calc(var(--navbar-top,0px)+var(--navbar-height))] flex flex-col md:flex-row","w-full text-foreground","overflow-hidden","bg-background","border-t border-border"),o=(0,t.jsx)(tK.PageRunHistorySidebar,{}),a=(0,t.jsxs)("div",{className:(0,l.f)("flex flex-1 flex-col min-w-0","min-h-0 h-full overflow-y-auto"),children:[(0,t.jsx)(tL.f,{}),(0,t.jsx)(rd,{})]}),z[7]=i,z[8]=o,z[9]=a):(i=z[7],o=z[8],a=z[9]),z[10]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsxs)("div",{id:tH.y,"data-workspace-surface-shell":"",className:i,children:[o,a,(0,t.jsx)("div",{className:"fixed bottom-4 right-4 z-20 hidden sm:block",children:(0,t.jsx)(R.f,{})})]}),z[10]=u):u=z[10],u}],262571)},227327,e=>{"use strict";var t=e.i(195759),r=e.i(471316);e.s(["f",0,e=>Object.fromEntries(e.variantSlugs.map(t=>[t,e.getModelInfoByVariantSlug(t)]).filter(([e,t])=>null!==t).map(([e,n])=>{let i,o=void 0===(i=(0,t._)(e))?void 0:t.P[i],s=(0,r.f)({model:e,modelInfo:n,...o&&{providerSort:o},reasoning:{enabled:n?.endpoint?.supports_reasoning??!1}});return[s.id,s]}))])},978567,e=>{"use strict";var t=e.i(586906),r=e.i(559505),n=e.i(295654),i=e.i(826735),o=e.i(847893);function s(e){return e.filter(e=>"text"===e.type).map(e=>e.text).join("")}e.s(["f",0,function(e,l){let a={},u={},c=function(e){for(let t of e)if(t.role===r.f.System||t.role===r.f.Developer){if("string"==typeof t.content)return t.content;if(Array.isArray(t.content))return s(t.content)||null}return null}(e),d=0;for(let c of e){var f;if(c.role===r.f.Tool)continue;let e=(f=d,new Date(Date.now()-1e6+1e3*f)),m=(0,t.L)(t.I.Message);if(c.role===r.f.System||c.role===r.f.Developer){let{items:t}=function(e,t){if(!t)return{items:[]};let n="string"==typeof t?t:s(t);return n?{items:[(0,i.f)({messageId:e,data:{type:"message",role:r.f.System,content:[{type:"input_text",text:n}]}})]}:{items:[]}}(m,c.content);if(0===t.length)continue;let l=t.map(e=>({id:e.id,type:e.data.type})),f=(0,o.q)({id:m,characterId:n.m.id,items:l,createdAt:e,updatedAt:e});for(let e of(a[m]=f,t))u[e.id]=e;d++;continue}if(c.role===r.f.User){let{items:t}=function(e,t){if(!t)return{items:[]};if("string"==typeof t)return{items:[(0,i.f)({messageId:e,data:{type:"message",role:r.f.User,content:[{type:"input_text",text:t}]}})]};let n=[];for(let e of t)switch(e.type){case"text":n.push({type:"input_text",text:e.text});break;case"image_url":e.image_url?.url&&n.push({type:"input_image",image_url:e.image_url.url,detail:e.image_url.detail??"auto"})}return 0===n.length?{items:[]}:{items:[(0,i.f)({messageId:e,data:{type:"message",role:r.f.User,content:n}})]}}(m,c.content),s=t.map(e=>({id:e.id,type:e.data.type})),l=(0,o.O)({id:m,characterId:n.d.id,items:s,createdAt:e,updatedAt:e});for(let e of(a[m]=l,t))u[e.id]=e;d++;continue}if(c.role===r.f.Assistant){let n=[],{items:f}=function(e,t){if(!t)return{items:[]};if("string"==typeof t)return{items:[(0,i.f)({messageId:e,data:{type:"message",role:r.f.Assistant,content:[{type:"output_text",text:t}]}})]};let n=s(t);return n?{items:[(0,i.f)({messageId:e,data:{type:"message",role:r.f.Assistant,content:[{type:"output_text",text:n}]}})]}:{items:[]}}(m,c.content);if(n.push(...f),"tool_calls"in c&&Array.isArray(c.tool_calls)){let{items:e}=function(e,r){return{items:r.map(r=>{let n,o;return(0,i.f)({messageId:e,data:{type:"function_call",name:(n=r.function,n?.name??"unknown"),arguments:(o=r.function,o?.arguments??""),call_id:r.id?.toString()??(0,t.L)(t.I.Item)}})})}}(m,c.tool_calls);n.push(...e)}if(0===n.length)continue;let p=n.map(e=>({id:e.id,type:e.data.type})),h=(0,o.h)({id:m,characterId:l,items:p,isGenerating:!1,createdAt:e,updatedAt:e});for(let e of(a[m]=h,n))u[e.id]=e;d++}}return{messages:a,items:u,systemPrompt:c}}])},447131,e=>{"use strict";var t=e.i(659350),r=e.i(663456),n=e.i(136562),i=e.i(139697),o=e.i(751155),s=e.i(126324),l=e.i(231171),a=e.i(199168);e.s(["f",0,function(e){let u,c,d=(0,r.c)(30),{gate:f,blockedTriggerClassName:m,variant:p,size:h,density:x,className:g,render:v,onClick:b,"aria-label":y,children:w}=e,j=(0,a.M)();d[0]!==g?(u=(0,n.f)(g,"pointer-events-none opacity-50"),d[0]=g,d[1]=u):u=d[1],d[2]!==w||d[3]!==x||d[4]!==h||d[5]!==u||d[6]!==p?(c=(0,t.jsx)(i.Button,{variant:p,size:h,density:x,className:u,"aria-disabled":"true",tabIndex:-1,children:w}),d[2]=w,d[3]=x,d[4]=h,d[5]=u,d[6]=p,d[7]=c):c=d[7];let N=c;switch(f){case l.L.Allowed:{let e;return d[8]!==y||d[9]!==w||d[10]!==g||d[11]!==x||d[12]!==b||d[13]!==v||d[14]!==h||d[15]!==p?(e=(0,t.jsx)(i.Button,{variant:p,size:h,density:x,className:g,render:v,onClick:b,"aria-label":y,children:w}),d[8]=y,d[9]=w,d[10]=g,d[11]=x,d[12]=b,d[13]=v,d[14]=h,d[15]=p,d[16]=e):e=d[16],e}case l.L.Loading:return N;case l.L.Blocked:{let e,r,n,i,l;return d[17]!==j?(e=j(s.f),d[17]=j,d[18]=e):e=d[18],d[19]!==j?(r=j(s.f),d[19]=j,d[20]=r):r=d[20],d[21]!==r?(n=(0,t.jsx)("span",{className:"sr-only",children:r}),d[21]=r,d[22]=n):n=d[22],d[23]!==m||d[24]!==N||d[25]!==n?(i=(0,t.jsxs)(o.TooltipNonInteractiveTrigger,{className:m,children:[N,n]}),d[23]=m,d[24]=N,d[25]=n,d[26]=i):i=d[26],d[27]!==e||d[28]!==i?(l=(0,t.jsx)(o.Tooltip,{content:e,children:i}),d[27]=e,d[28]=i,d[29]=l):l=d[29],l}default:return f}}])},155771,e=>{"use strict";var t=e.i(663456),r=e.i(376885),n=e.i(128564),i=e.i(674896);e.s(["f",0,function(){let e,o,s=(0,t.c)(6),{isSignedIn:l}=(0,r.f)(),a=!0===l;s[0]!==a?(e={isEnabled:a},s[0]=a,s[1]=e):e=s[1];let{workspaces:u,activeWorkspaceId:c}=(0,n.Z)(e);if(s[2]!==c||s[3]!==l||s[4]!==u){let e=!0===l?u?.find(e=>e.id===c):void 0;o=void 0===e?`/${i.L.Chat}`:(0,i.$)(e.slug,i.L.Chat),s[2]=c,s[3]=l,s[4]=u,s[5]=o}else o=s[5];return o}])}]); //# sourceMappingURL=1opuedavk23z-.js.map