(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,150649,668641,856465,e=>{"use strict";e.s(["f",0,""],150649);var t=e.i(16043),i=e.i(177147),n=e.i(531893);let r=()=>()=>{},s=()=>!0,l=()=>!1,o=(0,n.f)(18)?function(){return(0,i.useSyncExternalStore)(r,s,l)}:function(){let[e,i]=t.useState(!1);return t.useEffect(()=>{i(!0)},[]),e};function a(){return!o()}e.s(["f",0,a],668641);var u=e.i(365235),c=e.i(659350);e.s(["f",0,function(e){let{script:t}=e,{nonce:i}=(0,u.f)();return a()?(0,c.jsx)("script",{nonce:i,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0}):null}],856465)},775593,e=>{"use strict";var t=e.i(16043);let i=t.forwardRef(function({title:e,titleId:i,...n},r){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:r,"aria-labelledby":i},n),e?t.createElement("title",{id:i},e):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"}))});e.s(["f",0,i],775593)},575731,e=>{"use strict";var t=e.i(16043);let i=t.forwardRef(function({title:e,titleId:i,...n},r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":i},n),e?t.createElement("title",{id:i},e):null,t.createElement("path",{fillRule:"evenodd",d:"M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.006 5.404.434c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.434 2.082-5.005Z",clipRule:"evenodd"}))});e.s(["f",0,i],575731)},815193,346078,e=>{"use strict";let t,i;var n=e.i(16043),r=e.i(18728);function s(e,t,i){let n,r=i.initialDeps??[],s=!0;function l(){let l=e();return(l.length!==r.length||l.some((e,t)=>r[t]!==e))&&(r=l,n=t(...l),(null==i?void 0:i.onChange)&&!(s&&i.skipInitialOnChange)&&i.onChange(n),s=!1),n}return l.updateDeps=e=>{r=e},l}function l(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let o=(e,t)=>1.01>Math.abs(e-t),a=()=>{if(void 0!==t)return t;if("u"0},u={capture:!0,passive:!0};class c{constructor(e){this.host=e,this._touch=null,this.inMotion=()=>null!==this._touch&&"lateFling"!==this._touch.phase,this.dragging=()=>{var e;return(null==(e=this._touch)?void 0:e.phase)==="down"&&this._touch.moved},this.tail=()=>{var e;return(null==(e=this._touch)?void 0:e.phase)==="tail"?this._touch.moved?"fling":"tap":null},this.onScroll=({isScrolling:e,ownReadBack:t,moved:i,external:n})=>{var r,s,l;return e&&(null==(r=this._touch)?void 0:r.phase)==="tail"?this._openTail(this._touch.moved||!t,!1):(null==(s=this._touch)?void 0:s.phase)==="lateFling"&&(this.host.now()>this._touch.until?this._touch=null:n&&e&&i&&this._openTail(!0,!1)),!t&&!!e&&!!i&&(null==(l=this._touch)?void 0:l.phase)==="down"&&(this._touch.moved=!0,!0)},this.touchStart=()=>{this.end(),this._touch={phase:"down",moved:!1}},this.touchEnd=()=>{var e;let t=(null==(e=this._touch)?void 0:e.phase)==="down"&&this._touch.moved;this.end(),this._openTail(t,t)},this.end=()=>{var e;let t=this.host.getWindow();(null==(e=this._touch)?void 0:e.phase)==="tail"&&null!=t&&t.clearTimeout(this._touch.timerId),this._touch=null},this.listen=e=>{let t=()=>this.touchStart(),i=()=>this.touchEnd();return e.addEventListener("touchstart",t,u),e.addEventListener("touchend",i,u),e.addEventListener("touchcancel",i,u),()=>{e.removeEventListener("touchstart",t,u),e.removeEventListener("touchend",i,u),e.removeEventListener("touchcancel",i,u),this.end()}},this._openTail=(e,t)=>{let i=this.host.getWindow();if(!a()||null==i)return;this.end();let n={phase:"tail",moved:e,awaitingFling:t,timerId:i.setTimeout(()=>{this.host.tailStillMoving()?this._openTail(n.moved,n.awaitingFling):(this._touch=n.awaitingFling?{phase:"lateFling",until:this.host.now()+1e3}:null,this.host.onTailClosed())},150)};this._touch=n}}get touch(){return this._touch}}let d=e=>{let{clientWidth:t,clientHeight:i}=e;return{width:t,height:i}},h=e=>{let t=new Set;return{schedule:i=>{let n=e.requestAnimationFrame(()=>{t.delete(n),i()});t.add(n)},cancel:()=>{t.forEach(t=>e.cancelAnimationFrame(t)),t.clear()}}},f=e=>e,m=e=>{let t=e.overscan*Math.max(e.lanes??1,1),i=Math.max(e.startIndex-t,0),n=Math.min(e.endIndex+t,e.count-1)-i+1,r=Array(n);for(let e=0;e{let i=e.scrollElement;if(!i)return;let n=e.targetWindow;if(!n)return;let r=e=>{let{width:i,height:n}=e;t({width:Math.round(i),height:Math.round(n)})};if(r(d(i)),!n.ResizeObserver)return()=>{};let s=h(n),l=new n.ResizeObserver(()=>{let t=()=>{r(d(i))};e.options.useAnimationFrameWithResizeObserver?s.schedule(t):t()});return l.observe(i,{box:"content-box"}),()=>{l.unobserve(i),s.cancel()}},g={passive:!0},v=(e,t)=>{let i=e.scrollElement;if(!i)return;let n=()=>{t({width:i.innerWidth,height:i.innerHeight})};return n(),i.addEventListener("resize",n,g),()=>{i.removeEventListener("resize",n)}},y="u"{var n,r;let s,l=e.scrollElement;if(!l)return;let o=e.targetWindow;if(!o)return;let a=e.options.useScrollendEvent&&y,u=0,c=a?null:(n=()=>t(i(l),!1),r=e.options.isScrollingResetDelay,Object.assign(function(...e){o.clearTimeout(s),s=o.setTimeout(()=>n.apply(this,e),r)},{cancel:()=>{o.clearTimeout(s)}})),d=e=>()=>{u=i(l),null==c||c(),t(u,e)},h=d(!0),f=d(!1);return l.addEventListener("scroll",h,g),a&&l.addEventListener("scrollend",f,g),()=>{l.removeEventListener("scroll",h),a&&l.removeEventListener("scrollend",f),null==c||c.cancel()}},b=(e,t)=>x(e,t,t=>{let{horizontal:i,isRtl:n}=e.options;return i?t.scrollLeft*(n&&-1||1):t.scrollTop}),S=(e,t)=>x(e,t,t=>e.options.horizontal?t.scrollX:t.scrollY),w=(e,t,i)=>{if(i.options.useCachedMeasurements){let t=i.indexFromElement(e),n=i.options.getItemKey(t);return i.itemSizeCache.get(n)??i.options.estimateSize(t)}if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[i.options.horizontal?"inlineSize":"blockSize"])}if(!t){let t=i.indexFromElement(e),n=i.options.getItemKey(t),r=i.itemSizeCache.get(n);if(void 0!==r)return r}return e[i.options.horizontal?"offsetWidth":"offsetHeight"]},_=(e,{adjustments:t=0,behavior:i},n)=>{var r,s;null==(s=null==(r=n.scrollElement)?void 0:r.scrollTo)||s.call(r,{[n.options.horizontal?"left":"top"]:e+t,behavior:i})},k=(e,t)=>"smooth"===e?t?"smoothLanded":"smooth":"instant",M=e=>(null==e?void 0:e.phase)==="smooth"||(null==e?void 0:e.phase)==="smoothLanded";class C{constructor(e){let t,i,n,r;this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._iosGesture=new c({getWindow:()=>this.targetWindow,now:()=>this.now(),tailStillMoving:()=>{let e=this.scrollState;if((null==e?void 0:e.phase)!=="queued"||null!==this.pendingWrite)return!1;let t=this._readElementOffset();return!(null===t||null===this._lastElementOffset||1>Math.abs(t-this._lastElementOffset))&&(this._lastElementOffset=t,e.samples=[...e.samples??[],{t:this.now(),offset:t}],!0)},onTailClosed:()=>{let e=this.scrollState;(null==e?void 0:e.phase)==="queued"&&function(e){let t=e[e.length-1];if(void 0===t)return!1;let i=e.length-2;for(;i>=0&&t.t-e[i].t<40;)i--;if(i<0)return!1;let n=e[i];return Math.abs(t.offset-n.offset)/(t.t-n.t)>=.05}(e.samples??[])&&(this.scrollState=null),this._flushHoldIfReady(!0),this._writeAwaitingCommand()}}),this._lastElementOffset=null,this.pendingWrite=null,this._clampedAdjustment=null,this.elementsCache=new Map,this._resizeBatch=null,this.now=()=>{var e,t,i;return(null==(i=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:i.call(t))??Date.now()},this.observer=(t=null,i=null,n=()=>{if(t)return t;let e=this.targetWindow;if(!e||!e.ResizeObserver)return null;let n=i=h(e);return t=new e.ResizeObserver(e=>{let t=()=>{let t={sync:!1};this._resizeBatch=t;try{e.forEach(r)}finally{this._resizeBatch=null,t.notify&&(this.notify(t.sync),this._noteClampMax(),this._flushHoldIfReady(!0),this._retryClampedAdjustment())}};this.options.useAnimationFrameWithResizeObserver?n.schedule(t):t()})},r=e=>{let t=e.target,i=this.indexFromElement(t);if(!t.isConnected){for(let[e,i]of(this.observer.unobserve(t),this.elementsCache))if(i===t){this.elementsCache.delete(e);break}return}this.isIndexInRange(i)&&this.shouldMeasureDuringScroll(i)&&this.resizeItem(i,this.options.measureElement(t,e,this))},{disconnect:()=>{var e;null==(e=n())||e.disconnect(),null==i||i.cancel(),t=null,i=null},observe:e=>{var t;return null==(t=n())?void 0:t.observe(e,{box:"border-box"})},unobserve:e=>{var t;return null==(t=n())?void 0:t.unobserve(e)}}),this.range=null,this.setOptions=e=>{var t;let i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:f,rangeExtractor:m,onChange:()=>{},measureElement:w,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(let t in e){let n=e[t];void 0!==n&&(i[t]=n)}let n=this.options,r=null,s=null,l=!1;if(void 0!==n&&n.enabled&&i.enabled&&"end"===i.anchorTo&&null!==this.scrollElement){let e=n.count,o=i.count,a=this.getMeasurements(),u=(null==(t=this._singleLaneMeasurements)?void 0:t.items)??a,c=e=>{var t;return"object"==typeof(t=u[e])?t.key:t},d=e>0?c(0):null,h=e>0?c(e-1):null;if(o!==e||e>0&&o>0&&(i.getItemKey(0)!==d||i.getItemKey(o-1)!==h)){l=!0;let t=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??a[0]:null;t&&(r=[t.key,this.getScrollOffset()-t.start]);let u=!0===i.followOnAppend?"auto":i.followOnAppend||null;u&&o>0&&this.isAtEnd(n.scrollEndThreshold)&&(0===e||i.getItemKey(o-1)!==h)&&(o>e||function(e,t,i,n){if(0===t)return!1;let r=n(0),s=new Set,l=0;for(;l=t)return!1;for(let e=0;e{var t,i;null==(i=(t=this.options).onChange)||i.call(t,this,e)},this.maybeNotify=s(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{var e;this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,null==(e=this._momentumStop)||e.restore(),this._momentumStop=null,this.isScrolling=!1,this.scrollDirection=null,this._holdOffset=0,this._reportedOverscroll=!1,this._clampedAdjustment=null,this.pendingWrite=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{var i,n,r,s;let l=t?this._elementMaxScrollOffset():null,a=this._reportedOverscroll;this._reportedOverscroll=e<0||null!==l&&e>l+1;let u=e;this._lastElementOffset=u,e=this._toLayoutOffset(e);let c=this._classifyScrollEvent(e,t,l);if("spurious"===c)return;"readBack"===c?e=this.pendingWrite.target:"clampedReadBack"===c&&(null==(i=this.scrollState)?void 0:i.index)!=null&&ethis.getScrollStateTarget(this.scrollState)})&&(this.scrollState=null),this.pendingWrite=null,null!==this._clampedAdjustment&&Math.abs(e-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null);let d=this.getScrollOffset(),h=this.scrollDirection;this.scrollDirection=t?d===e?this.scrollDirection:de-t.t<=200),{t:e,offset:u}],(null!==h&&this.scrollDirection!==h||function(e){let t=e[e.length-1];if(void 0===t)return!1;let i=e.length-2;for(;i>=0&&t.t-e[i].t<40;)i--;if(i<0)return!1;let n=e[i],r=i-1;for(;r>=0&&n.t-e[r].t<40;)r--;if(r<0)return!1;let s=e[r],l=(t.offset-n.offset)/(t.t-n.t),o=(n.offset-s.offset)/(n.t-s.t);return l*o>=0&&Math.abs(l)>=2*Math.abs(o)&&Math.abs(l)-Math.abs(o)>=.8}(f.samples))&&(this.scrollState=null)}this._iosGesture.onScroll({isScrolling:t,ownReadBack:"readBack"===c,moved:e!==d,external:"external"===c&&(null==(n=this.scrollState)?void 0:n.phase)!=="smooth"&&(null==(r=this.scrollState)?void 0:r.phase)!=="smoothFinishing"})&&(null==(s=this.scrollState)?void 0:s.phase)==="queued"&&(this.scrollState=null),this._flushHoldIfReady(!0),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement&&this.unsubs.push(this._iosGesture.listen(this.scrollElement)),this._scrollToOffset(this.getScrollOffset())}this._noteClampMax();let i=this.pendingScrollAnchor;this.pendingScrollAnchor=null,i&&this.scrollElement&&this.options.enabled&&("anchor"===i.kind?this._canWriteScroll()?M(this.scrollState)&&!o(this.getScrollOffset()-i.delta,this.scrollState.lastTargetOffset)||(this._followOffsetTarget(i.delta),this._scrollToOffset(this.getScrollOffset())):(this._holdOffset+=i.delta,this._followOffsetTarget(i.delta),this.notify(!1)):this.scrollToEnd({behavior:i.behavior})),this._flushHoldIfReady(!1),this._retryClampedAdjustment()},this._classifyScrollEvent=(e,t,i)=>{var n;return function({offset:e,isScrolling:t,elementMax:i,holdOffset:n,scrollOffset:r,pendingWrite:s,clampedMaxAtWrite:l}){var o;return t&&null===s&&e===r?"spurious":null!==s&&1.5>Math.abs(e-s.target)?"readBack":null!==s&&!s.smooth&&null!==i&&s.target>i+n+.5&&1.5>Math.abs(e-(i+n))||null!==s&&!s.smooth&&(null==(o=s.lowMaxes)?void 0:o.some(t=>1.5>Math.abs(e-t)))?"clampedReadBack":null!==l&&1.5>Math.abs(e-l)?"clampedEcho":"external"}({offset:e,isScrolling:t,elementMax:i,holdOffset:this._holdOffset,scrollOffset:this.scrollOffset,pendingWrite:this.pendingWrite,clampedMaxAtWrite:(null==(n=this._clampedAdjustment)?void 0:n.maxAtWrite)??null})},this._retryClampedAdjustment=()=>{if(null===this._clampedAdjustment||!this.scrollElement||!this.options.enabled)return;let{target:e,maxAtWrite:t}=this._clampedAdjustment,i=this.getMaxScrollOffset();i>t+.5&&(this._clampedAdjustment=e>i+.5?{target:e,maxAtWrite:i}:null,this._scrollToOffset(e))},this._writeAwaitingCommand=()=>{let e=this.scrollState;if(null===e||"queued"!==e.phase)return;let{behavior:t}=e;this.getMeasurements();let i=this.getScrollStateTarget(e);e.lastTargetOffset=i,this._clampedAdjustment=null,e.phase=k(t,null!=e.index&&o(i,this.getScrollOffset())),this._scrollToOffset(i,{behavior:t}),this.scheduleScrollReconcile()},this._readElementOffset=()=>{let e=this.scrollElement;if(null==e)return null;let{horizontal:t,isRtl:i}=this.options;return"number"==typeof e.scrollTop?t?e.scrollLeft*(i&&-1||1):e.scrollTop:"number"==typeof e.scrollY?t?e.scrollX:e.scrollY:null},this._canWriteScroll=()=>!(a()&&this._iosGesture.inMotion())&&!this._reportedOverscroll,this._flushHoldIfReady=e=>{var t;if(0===this._holdOffset||!this.scrollElement||!this.options.enabled||!this._canWriteScroll()||(null==(t=this.scrollState)?void 0:t.phase)==="smooth")return;this._holdOffset=0,null!==this.scrollOffset&&this.scrollOffset<0&&(this.scrollOffset=0),this.notify(e);let i=this.getCommandWrittenOffset()??this.getScrollOffset();this._clampedAdjustment=this._clampedBy(i),this._scrollToOffset(i)},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=s(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,i,n,r,s,l,o)=>(void 0!==this.prevLanes&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:i,getItemKey:n,enabled:r,lanes:s,laneAssignmentMode:l,gap:o}),{key:!1}),this.isIndexInRange=e=>e>=0&&e[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:i,getItemKey:n,enabled:r,lanes:s,laneAssignmentMode:l,gap:o},a)=>{var u,c;let d=this.itemSizeCache;if(!r)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let h=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),1===s){let r,s,l=2*e,a=null==(u=this._singleLaneMeasurements)?void 0:u.flat;if(!a||a.length0&&e.set(a.subarray(0,2*h)),a=e}let f=0===h?Array(e):this._singleLaneMeasurements.items.slice();if(0===h)r=t+i;else{let e=h-1;r=a[2*e]+a[2*e+1]+o}for(let t=h;t=48&&i<=57){let i=+t;if(Number.isInteger(i)&&i>=0&&i1){let n=m[e=c],r=void 0!==n?f[n]:void 0;a=r?r.end+o:t+i}else if(g===s){let t=0,i=p[0],n=m[0];for(let e=1;ethis.options.debug}),this.calculateRange=s(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,i,n)=>0===e.length||0===t?(this.range=null,null):(this.range=function(e,t,i,n,r){let s=e.length-1;if(e.length<=n)return{startIndex:0,endIndex:s};if(1===n&&null!==r){let e=function(e,t,i){let n=0;for(;n<=t;){let r=(n+t)/2|0,s=e[2*r];if(si))return r;t=r-1}}return n>0?n-1:0}(r,s,i),n=e,l=i+t;for(;ne[t].start,i),o=l;if(1===n)for(;o1){let r=Array(n).fill(0);for(;oe=0&&a.some(e=>e>=i);){let t=e[l];a[t.lane]=t.start,l--}l=Math.max(0,l-l%n),o=Math.min(s,o+(n-1-o%n))}return{startIndex:l,endIndex:o}}(e,t,i,n,1===n&&null!==this._singleLaneMeasurements?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=s(()=>{let e=null,t=null,i=this.calculateRange();return i&&(e=i.startIndex,t=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t,this.options.lanes]},(e,t,i,n,r,s)=>null===n||null===r?[]:e({startIndex:n,endIndex:r,overscan:t,count:i,lanes:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,i=e.getAttribute(t);return i?parseInt(i,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!M(this.scrollState))return!0;let i=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==i&&this.range){let t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),n=Math.max(0,i-t),r=Math.min(this.options.count-1,i+t);return e>=n&&e<=r}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let i=this.options.getItemKey(t),n=this.elementsCache.get(i);n!==e&&(n&&this.observer.unobserve(n),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var i,n,r;let s,l,o;if(!this.isIndexInRange(e))return;(null==(i=this._resizeBatch)?void 0:i.sync)&&this.getMeasurements();let a=null==(n=this._singleLaneMeasurements)?void 0:n.flat;if(1===this.options.lanes&&null!=a)o=this.options.getItemKey(e),l=a[2*e],s=a[2*e+1];else{let t=this.measurementsCache[e];if(!t)return;o=t.key,l=t.start,s=t.size}let u=this.itemSizeCache.get(o)??s,c=t-u;if(0!==c){let i="end"===this.options.anchorTo&&!M(this.scrollState)&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,n=i?this._getLayoutTotalSize():0,a=this.getScrollOffset(),d=this.itemSizeCache.has(o)?l+u<=a&&"backward"!==this.scrollDirection:l[this.getVirtualIndexes(),this.getMeasurements(),this._holdOffset],(e,t,i)=>{let n=[];for(let r=0,s=e.length;rthis.options.debug}),this.getVirtualItemForOffset=e=>{var t;let i=this.getMeasurements();if(0===i.length)return;let n=null==(t=this._singleLaneMeasurements)?void 0:t.flat,r=1===this.options.lanes&&null!=n,s=j(0,i.length-1,r?e=>n[2*e]:e=>l(i[e]).start,e);return l(i[s])},this._noteClampMax=()=>{if(!this._awaitingCommandReadBack())return;let e=this._elementMaxScrollOffset();if(null===e)return;let t=this.pendingWrite,i=Math.max(e,0)+this._holdOffset;if(i>=t.target)return;let n=t.lowMaxes??(t.lowMaxes=[]);n[n.length-1]!==i&&n.push(i)},this.getMaxScrollOffset=()=>(this._elementMaxScrollOffset()??0)+this._holdOffset,this._toLayoutOffset=e=>{var t;let i=e+this._holdOffset;return(null==(t=this.pendingScrollAnchor)?void 0:t.kind)==="anchor"&&(i+=this.pendingScrollAnchor.delta),i},this._elementMaxScrollOffset=()=>{let e=this.scrollElement;if(null===e)return null;if("scrollHeight"in e)return this.options.horizontal?e.scrollWidth-e.clientWidth:e.scrollHeight-e.clientHeight;if("document"in e){let t=e.document.documentElement;return this.options.horizontal?t.scrollWidth-e.innerWidth:t.scrollHeight-e.innerHeight}return null},this._momentumStop=null,this._stopMomentum=e=>{let t=this.scrollElement,i=this.targetWindow;if(null===t||null===i)return;let n="document"in t?t.document.scrollingElement:t;if(!(null==n?void 0:n.style))return;if(this._momentumStop){this._momentumStop.done=e;return}let{style:r}=n,s=this.options.horizontal?"overflow-x":"overflow-y",l=r.getPropertyValue(s),o=r.getPropertyPriority(s);r.setProperty(s,"hidden","important");let a={restore:()=>"hidden"===r.getPropertyValue(s)&&"important"===r.getPropertyPriority(s)&&(r.setProperty(s,l,o),!0),done:e};this._momentumStop=a,i.requestAnimationFrame(()=>i.requestAnimationFrame(()=>{this._momentumStop===a&&(this._momentumStop=null,a.restore()&&a.done())}))},this._clampedBy=e=>{let t=this._elementMaxScrollOffset();if(null===t)return null;let i=t+this._holdOffset;return e>i+.5?{target:e,maxAtWrite:i}:null},this.getVirtualDistanceFromEnd=()=>Math.max(this._getLayoutTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,i=0)=>{if(!this.scrollElement)return 0;let n=this.getSize(),r=this.getScrollOffset();return"auto"===t&&(t=e>=r+n?"end":"start"),"center"===t?e+=(i-n)/2:"end"===t&&(e-=n),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let i=this.getSize(),n=this.getScrollOffset(),r=this.measurementsCache[e];if(!r)return;if("auto"===t)if(r.end>=n+i-this.options.scrollPaddingEnd)t="end";else{if(!(r.start<=n+this.options.scrollPaddingStart))return[n,t];t="start"}if("end"===t&&e===this.options.count-1){let e=this.getMaxScrollOffset();return[Math.max(Math.min(e-this.options.paddingEnd+this.options.scrollPaddingEnd,e),0),t]}let s="end"===t?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,t,r.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:i="auto"}={})=>{this._startScroll({index:null,align:t},this.getOffsetForAlignment(e,t),i,"absolute")},this.scrollToIndex=(e,{align:t="auto",behavior:i="auto"}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getOffsetForIndex(e,t);if(!n)return;let[r,s]=n;this._startScroll({index:e,align:s},r,i,"absolute")},this.scrollBy=(e,{behavior:t="auto"}={})=>{let i=this.getOffsetForAlignment((this.getCommandWrittenOffset()??this.getScrollOffset())+e,"start");this._startScroll({index:null,align:"start"},i,t,"relative")},this.scrollToEnd=({behavior:e="auto"}={})=>{this.options.count>0?this._startScroll({index:this.options.count-1,align:"end",toEnd:!0},Math.max(this.getMaxScrollOffset(),0),e,"absolute"):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.cancelScroll=()=>{null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null},this.getTotalSize=()=>Math.max(this._getLayoutTotalSize()-this._holdOffset,0),this._getLayoutTotalSize=()=>{var e,t;let i,n=this.getMeasurements();if(0===n.length)i=this.options.paddingStart;else if(1===this.options.lanes){let r=n.length-1,s=null==(e=this._singleLaneMeasurements)?void 0:e.flat;i=null!=s?s[2*r]+s[2*r+1]:(null==(t=n[r])?void 0:t.end)??0}else{let e=Array(this.options.lanes).fill(null),t=n.length-1;for(;t>=0&&e.some(e=>null===e);){let i=n[t];null===e[i.lane]&&(e[i.lane]=i.end),t--}i=Math.max(...e.filter(e=>null!==e))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(0===this.itemSizeCache.size)return e;for(let t of this.getMeasurements())t&&this.itemSizeCache.has(t.key)&&e.push({index:t.index,key:t.key,start:t.start,size:t.size,end:t.end,lane:t.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:i}={})=>{let n={target:e+(t??0),smooth:"smooth"===i};return this.pendingWrite=n,this.options.scrollToFn(e-this._holdOffset,{behavior:i,adjustments:t},this),n},this.getCommandWrittenOffset=()=>null===this.scrollState||null===this.pendingWrite||this.pendingWrite.smooth?null:this.pendingWrite.target,this._awaitingCommandReadBack=()=>{let e=this.getCommandWrittenOffset();return!(a()&&this._iosGesture.dragging())&&null!==e&&!o(e,this.getScrollOffset())},this._followOffsetTarget=e=>{null!==this.scrollState&&null==this.scrollState.index&&(this.scrollState.lastTargetOffset+=e)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}get scrollAdjustments(){return 0}applyScrollAdjustment(e,t){if(0===e)return!1;if(this._followOffsetTarget(e),!this._canWriteScroll())return this._holdOffset+=e,null!==this.scrollOffset&&(this.scrollOffset+=e),!0;{let i=this.getScrollOffset();this._clampedAdjustment=this._clampedBy(i+e);let n=this._scrollToOffset(i,{adjustments:e,behavior:t});return null!==this.scrollOffset&&(this.pendingWrite===n&&(this.scrollOffset+=e),this.scrollOffset<0&&(this.scrollOffset=0)),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}getScrollStateTarget(e){let t=e.toEnd?[Math.max(this.getMaxScrollOffset(),0)]:null!=e.index?this.getOffsetForIndex(e.index,e.align):void 0;return t?t[0]:e.lastTargetOffset}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}if("queued"===this.scrollState.phase)return void this.scheduleScrollReconcile();this.getMeasurements();let e=this.getScrollStateTarget(this.scrollState),t=null==this.scrollState.index?1:this.options.useAnimationFrameWithResizeObserver?3:2,i=e!==this.scrollState.lastTargetOffset;if(!i&&o(e,this.getScrollOffset())){if("smooth"===this.scrollState.phase?this.scrollState.phase="smoothLanded":"smoothFinishing"===this.scrollState.phase&&(this.scrollState.phase="instant"),this.scrollState.stableFrames++,this.scrollState.stableFrames>=t){this.getScrollOffset()!==e&&this._scrollToOffset(e,{behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,i){let t=this.getSize()||600,i=Math.abs(e-this.getScrollOffset()),n=M(this.scrollState)&&i>t;this.scrollState.lastTargetOffset=e,n?this.scrollState.phase="smooth":"smooth"===this.scrollState.phase?this.scrollState.phase="smoothFinishing":"smoothLanded"===this.scrollState.phase&&(this.scrollState.phase="instant"),this._scrollToOffset(e,{behavior:n?"smooth":"auto"})}this.scheduleScrollReconcile()}_startScroll(e,t,n,r){let s=this._iosGesture.tail();if("absolute"===r&&null!==s){if("fling"===s&&(void 0!==i?i:i=a()&&"u">typeof CSS&&"function"==typeof CSS.supports&&CSS.supports("overflow-anchor: auto"))){this._stopMomentum(()=>{let e=this.scrollState;(null==e?void 0:e.phase)!=="queued"||"fling"!==this._iosGesture.tail()||this._reportedOverscroll||(this._iosGesture.end(),this._flushHoldIfReady(!0),this._writeAwaitingCommand())}),this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,phase:"queued",behavior:n,samples:[]},this.scheduleScrollReconcile();return}this._iosGesture.end()}this.scrollState={...e,startedAt:this.now(),lastTargetOffset:t,stableFrames:0,behavior:n,phase:k(n,null!=e.index&&o(t,this.getScrollOffset()))},this._scrollToOffset(t,{behavior:n}),this.scheduleScrollReconcile()}}let j=(e,t,i,n)=>{for(;e<=t;){let r=(e+t)/2|0,s=i(r);if(sn))return r;t=r-1}}return e>0?e-1:0};e.s(["O",0,C,"l",0,m,"J",0,_,"A",0,b,"K",0,p,"i",0,S,"E",0,v,"j",0,_],346078);let A="u">typeof document?n.useLayoutEffect:n.useEffect;function E({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:i="transform",...s}){let l=n.useReducer(e=>e+1,0)[1],o=n.useRef({enabled:t,mode:i,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});o.current.enabled=t,o.current.mode=i;let a=n.useRef(!1),u=e=>{let t=o.current;if(!t.enabled||!t.container)return;let i=e.getTotalSize();if(i!==t.lastSize){t.lastSize=i;let n=e.options.horizontal?"width":"height";t.container.style[n]=`${i}px`}},c=(e,t,i)=>{let n=o.current,r=!!e.options.horizontal,s=t.start-e.options.scrollMargin;n.lastPositions.get(i)!==s&&(n.lastPositions.set(i,s),"transform"===n.mode?i.style.transform=r?`translate3d(${s}px, 0, 0)`:`translate3d(0, ${s}px, 0)`:i.style[r?"left":"top"]=`${s}px`)},d=e=>{let t=o.current;if(t.enabled&&t.container)for(let t of(u(e),e.getVirtualItems())){let i=e.elementsCache.get(t.key);i&&c(e,t,i)}},h={...s,onChange:(t,i)=>{var n;let u=o.current,c=!0;if(u.enabled){d(t);let e=t.range,i=u.prevRange;(c=!i||i.isScrolling!==t.isScrolling||i.startIndex!==(null==e?void 0:e.startIndex)||i.endIndex!==(null==e?void 0:e.endIndex))&&(u.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}c&&(e&&i&&!a.current?(0,r.flushSync)(l):l()),null==(n=s.onChange)||n.call(s,t,i)}},[f]=n.useState(()=>{let e=new C(h),t=e.measureElement;return e.measureElement=i=>{a.current=!0;try{t(i)}finally{a.current=!1}let n=o.current;if(null!==i&&n.enabled&&n.container){let t=e.measurementsCache[e.indexFromElement(i)];t&&c(e,t,i)}},Object.assign(e,{containerRef:t=>{let i=o.current;i.container=t,i.lastSize=null,null!==t&&d(e)}})});return f.setOptions(h),A(()=>f._didMount(),[]),A(()=>(u(f),f._willUpdate())),A(()=>{d(f)}),f}e.s(["s",0,function(e){return E({observeElementRect:p,observeElementOffset:b,scrollToFn:_,...e})},"V",0,function(e){return E({getScrollElement:()=>"u">typeof document?window:null,observeElementRect:v,observeElementOffset:S,scrollToFn:_,initialOffset:()=>"u">typeof document?window.scrollY:0,...e})}],815193)},637990,e=>{"use strict";function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===a(e)}function i(e){return null==e?"":function(e){if("string"==typeof e)return e;if("bigint"==typeof e)return e.toString();let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}function n(e){return"string"==typeof e}function r(e){return"number"==typeof e}function s(e){return"object"==typeof e}function l(e){return null!=e}function o(e){return!e.trim().length}function a(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let u="Invalid doc index: must be a non-negative integer within the bounds of the docs array",c=Object.prototype.hasOwnProperty;var d=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let i=h(e);this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function h(e){let i=null,r=null,s=null,l=1,o=null;if(n(e)||t(e))s=e,i=f(e),r=m(e);else{if(!c.call(e,"name"))throw Error("Missing name property in key");let t=e.name;if(s=t,c.call(e,"weight")&&void 0!==e.weight&&(l=e.weight)<=0){let e;throw Error((e=m(t),`Property 'weight' in key '${e}' must be a positive integer`))}i=f(t),r=m(t),o=e.getFn??null}return{path:i,id:r,weight:l,src:s,getFn:o}}function f(e){return t(e)?e:e.split(".")}function m(e){return t(e)?e.join("."):e}let p=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx{if(l(e))if(o[h]){var m,p;let g=e[o[h]];if(!l(g))return;if(h===o.length-1&&(n(g)||r(g)||!0===(m=g)||!1===m||s(p=m)&&null!==p&&"[object Boolean]"==a(m)||"bigint"==typeof g))u.push(void 0!==f?{v:i(g),i:f}:i(g));else if(t(g)){c=!0;for(let e=0,t=g.length;e=9&&l<=13||32===l||160===l?s=!1:s||(r++,s=!0)}if(0===r&&(r=1),i.has(r))return i.get(r);let o=Math.round(n/Math.pow(r,.5*e))/n;return i.set(r,o),o},clear(){i.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(n(this.docs[0]))for(let i=0;ie&&(this.records[t].i-=1)}removeAll(e){let t=new Set;for(let i of e)Number.isInteger(i)&&i>=0&&t.add(i);if(0===t.size)return;this.records=this.records.filter(e=>!t.has(e.i));let i=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,n=i.length;for(;t>>1;i[r]t),records:this.records}}};function v(e,t,{getFn:i=p.getFn,fieldNormWeight:n=p.fieldNormWeight}={}){let r=new g({getFn:i,fieldNormWeight:n});return r.setKeys(e.map(h)),r.setSources(t),r.create(),r}function y(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let i=1,n=e.length;ie.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(b,e=>x[e]):e=>e;var w=class{constructor(e,{location:t=p.location,threshold:i=p.threshold,distance:n=p.distance,includeMatches:r=p.includeMatches,findAllMatches:s=p.findAllMatches,minMatchCharLength:l=p.minMatchCharLength,isCaseSensitive:o=p.isCaseSensitive,ignoreDiacritics:a=p.ignoreDiacritics,ignoreLocation:u=p.ignoreLocation}={}){if(this.options={location:t,threshold:i,distance:n,includeMatches:r,findAllMatches:s,minMatchCharLength:l,isCaseSensitive:o,ignoreDiacritics:a,ignoreLocation:u},e=o?e:e.toLowerCase(),e=a?S(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let c=(e,t)=>{this.chunks.push({pattern:e,alphabet:function(e){let t={};for(let i=0,n=e.length;i32){let e=0,t=d%32,i=d-t;for(;e{let{isMatch:m,score:g,indices:v}=function(e,t,i,{location:n=p.location,distance:r=p.distance,threshold:s=p.threshold,findAllMatches:l=p.findAllMatches,minMatchCharLength:o=p.minMatchCharLength,includeMatches:a=p.includeMatches,ignoreLocation:u=p.ignoreLocation}={}){let c;if(t.length>32)throw Error("Pattern length exceeds max of 32.");let d=t.length,h=e.length,f=Math.max(0,Math.min(n,h)),m=s,g=f,v=(e,t)=>{let i=e/d;if(u)return i;let n=Math.abs(f-t);return r?i+n/r:n?1:i},y=o>1||a,x=y?Array(h):[];for(;(c=e.indexOf(t,g))>-1;)if(m=Math.min(v(0,c),m),g=c+d,y){let e=0;for(;e=s;n-=1){let r=n-1,l=i[e[r]];if(a[n]=(a[n+1]<<1|1)&l,t&&(a[n]|=(b[n+1]|b[n])<<1|1|b[n+1]),a[n]&k&&(S=v(t,r))<=m){if(m=S,g=r,w=t,g<=f)break;s=Math.max(1,2*f-g)}}if(v(t+1,f)>m)break;b=a}if(y&&g>=0){let t=Math.min(h-1,g+d-1+w);for(let n=g;n<=t;n+=1)i[e[n]]&&(x[n]=1)}let M={isMatch:g>=0,score:Math.max(.001,S)};if(y){let e=function(e=[],t=p.minMatchCharLength){let i=[],n=-1,r=-1,s=0;for(let l=e.length;s=t&&i.push([n,r]),n=-1)}return e[s-1]&&s-n>=t&&i.push([n,s-1]),i}(x,o);e.length?a&&(M.indices=e):M.isMatch=!1}return M}(e,t,i,{location:r+f,distance:s,threshold:l,findAllMatches:o,minMatchCharLength:a,includeMatches:n,ignoreLocation:u});m&&(h=!0),d+=g,m&&v&&c.push(...v)});let f={isMatch:h,score:h?d/this.chunks.length:1};return h&&n&&(f.indices=y(c)),f}};let _=new Set(["fuzzy","include"]),k=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){let i=t===e;return{isMatch:i,score:+!i,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let i,n=0,r=[],s=e.length;for(;(i=t.indexOf(e,n))>-1;)n=i+s,r.push([i,n-1]);let l=!!r.length;return{isMatch:l,score:+!l,indices:r}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){let i=t.startsWith(e);return{isMatch:i,score:+!i,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){let i=!t.startsWith(e);return{isMatch:i,score:+!i,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){let i=!t.endsWith(e);return{isMatch:i,score:+!i,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){let i=t.endsWith(e);return{isMatch:i,score:+!i,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){let i=-1===t.indexOf(e);return{isMatch:i,score:+!i,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let i=new w(e,{location:t.location??p.location,threshold:t.threshold??p.threshold,distance:t.distance??p.distance,includeMatches:t.includeMatches??p.includeMatches,findAllMatches:t.findAllMatches??p.findAllMatches,minMatchCharLength:t.minMatchCharLength??p.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??p.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??p.ignoreDiacritics,ignoreLocation:t.ignoreLocation??p.ignoreLocation});return{type:"fuzzy",search:e=>i.searchIn(e)}}}],M=k.length;function C(e,t){let i=e.match(t);return i?i[1]:null}var j=class{constructor(e,{isCaseSensitive:t=p.isCaseSensitive,ignoreDiacritics:i=p.ignoreDiacritics,includeMatches:n=p.includeMatches,minMatchCharLength:r=p.minMatchCharLength,ignoreLocation:s=p.ignoreLocation,findAllMatches:l=p.findAllMatches,location:o=p.location,threshold:a=p.threshold,distance:u=p.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:i,includeMatches:n,minMatchCharLength:r,findAllMatches:l,ignoreLocation:s,location:o,threshold:a,distance:u},e=t?e:e.toLowerCase(),e=i?S(e):e,this.pattern=e,this.query=function(e,t={}){return e.replace(/\\\|/g,"\0").split("|").map(e=>{let i=(function(e){let t=[],i=e.length,n=0;for(;n=i)break;let r=n;for(;r=i||" "===e[t]){r++;break}if("$"===e[t]&&(t+1>=i||" "===e[t+1])){r+=2;break}}r++}t.push(e.substring(n,r)),n=r}else{for(;re&&!!e.trim()),n=[];for(let e=0,r=i.length;e!!(e[F]||e.$or),N=e=>({[F]:Object.keys(e).map(t=>({[t]:e[t]}))});function I(e,i,{auto:r=!0}={}){let l=e=>{if(n(e)){let t={keyId:null,pattern:e};return r&&(t.searcher=O(e,i)),t}let o=Object.keys(e),a=!!e[z];if(!a&&o.length>1&&!D(e))return l(N(e));if(!t(e)&&s(e)&&!D(e)){let t=a?e[z]:o[0],s=a?e.$val:e[t];if(!n(s))throw Error(`Invalid value for key ${t}`);let l={keyId:m(t),pattern:s};return r&&(l.searcher=O(s,i)),l}let u={children:[],operator:o[0]};return o.forEach(i=>{let n=e[i];t(n)&&n.forEach(e=>{u.children.push(l(e))})}),u};return D(e)||(e=N(e)),l(e)}function T(e,{ignoreFieldNorm:t=p.ignoreFieldNorm}){let i=1;return e.forEach(({key:e,norm:n,score:r})=>{let s=e?e.weight:null;i*=Math.pow(0===r&&s?Number.EPSILON:r,(s||1)*(t?1:n))}),i}var P=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.sizethis.comparator(e,this.heap[0])&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){let t=this.heap;for(;e>0;){let i=e-1>>1;if(0>=this.comparator(t[e],t[i]))break;let n=t[e];t[e]=t[i],t[i]=n,e=i}}_sinkDown(e){let t=this.heap,i=t.length,n=e;do{let r=2*(e=n)+1,s=2*e+2;if(r0&&(n=r),s0&&(n=s),n!==e){let i=t[e];t[e]=t[n],t[n]=i}}while(n!==e)}};let R=/[\p{L}\p{M}\p{N}_]+/gu,B=new WeakSet;function L({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:i}={}){let n=function(e){if("function"==typeof e){let t=!1;return i=>{let n=e(i);if(!t&&(t=!0,!Array.isArray(n)||n.some(e=>"string"!=typeof e)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(n)?"array containing non-strings":typeof n}.`);return n}}if(e instanceof RegExp)return!e.global&&(B.has(e)||(B.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))),t=>t.match(e)||[];return e=>e.match(R)||[]}(i);return{tokenize:i=>(e||(i=i.toLowerCase()),t&&(i=S(i)),n(i))}}var $=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=L({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});let i=this.analyzer.tokenize(e),{df:n,fieldCount:r}=t._invertedIndex;for(let e of(this.termSearchers=[],this.idfWeights=[],i)){this.termSearchers.push(new w(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let i=n.get(e)||0,s=Math.log(1+(r-i+.5)/(i+.5));this.idfWeights.push(s)}this.combineAll="all"===t.tokenMatch,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],i=0,n=0,r=0,s=0,l=this.combineAll&&!this.useMask?new Set:null;for(let o=0;o0?1-i/n:0)};return this.options.includeMatches&&t.length&&(o.indices=y(t)),this.combineAll&&(this.useMask?o.matchedMask=s:o.matchedTerms=l,o.termCount=this.numTerms),o}};function W(e,t,i,n){let r=n.tokenize(t);if(!r.length)return;e.fieldCount++,e.docFieldCount.set(i,(e.docFieldCount.get(i)||0)+1);let s=new Set(r),l=e.docTermFieldHits.get(i);for(let t of(l||(l=new Map,e.docTermFieldHits.set(i,l)),s))l.set(t,(l.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function V(e,t,i,n){let{i:r,v:s,$:l}=t;if(void 0!==s)return void W(e,s,r,n);if(l)for(let t=0;te-t);for(let t of i)!function(e,t){let i=e.docFieldCount.get(t);if(void 0===i)return;e.fieldCount-=i,e.docFieldCount.delete(t);let n=e.docTermFieldHits.get(t);if(n){for(let[t,i]of n){let n=(e.df.get(t)||0)-i;n<=0?e.df.delete(t):e.df.set(t,n)}e.docTermFieldHits.delete(t)}}(e,t);let n=e=>{let t=0,n=i.length;for(;t>>1;i[r]r?n(t):t,i);e.docFieldCount=s;let l=new Map;for(let[t,i]of e.docTermFieldHits)l.set(t>r?n(t):t,i);e.docTermFieldHits=l}var q=class{constructor(e,t,i){this.options={...p,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new d(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,i),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=O(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof g))throw Error("Incorrect 'index' type");if(this._myIndex=t||v(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=L({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=function(e,t,i){let n={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(let r of e)V(n,r,t,i);return n}(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!l(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){var i;let e=L({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});i=this._invertedIndex,V(i,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){let t=[],i=[];for(let n=0,r=this._docs.length;n!e.has(i)),this._myIndex.removeAll(i),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(u);this._invertedIndex&&U(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){let i,{limit:s=-1}=t||{},{includeMatches:o,includeScore:a,shouldSort:u,sortFn:c,ignoreFieldNorm:d}=this.options;if(n(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return r(s)&&s>-1&&(e=e.slice(0,s)),e}let h=u&&r(s)&&s>0&&n(e),f=(e,t)=>c(e,t)||e.idx-t.idx;if(h){let t=new P(s,f);n(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:d}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:d}),i=t.extractSorted()}else!function(e,{ignoreFieldNorm:t=p.ignoreFieldNorm}){e.forEach(e=>{e.score=T(e.matches,{ignoreFieldNorm:t})})}(i=n(e)?n(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),{ignoreFieldNorm:d}),u&&i.sort(n(e)?f:c),r(s)&&s>-1&&(i=i.slice(0,s));return function(e,t,{includeMatches:i=p.includeMatches,includeScore:n=p.includeScore}={}){return e.map(e=>{let r,{idx:s}=e,o={item:t[s],refIndex:s};return i&&(r=[],e.matches.forEach(e=>{if(!l(e.indices)||!e.indices.length)return;let t={indices:e.indices,value:e.value};e.key&&(t.key=e.key.id),e.idx>-1&&(t.refIndex=e.idx),r.push(t)}),o.matches=r),n&&(o.score=e.score),o})}(i,this._docs,{includeMatches:o,includeScore:a})}_searchStringList(e,{heap:t,ignoreFieldNorm:i}={}){let n=this._getSearcher(e),r=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:s}=this._myIndex,o=t?null:[];return s.forEach(({v:e,i:s,n:a})=>{if(!l(e))return;let u=n.searchIn(e);if(u.isMatch){let n={score:u.score,value:e,norm:a,indices:u.indices};r&&(n.matchedMask=u.matchedMask,n.matchedTerms=u.matchedTerms,n.termCount=u.termCount);let l=[n];if(!r||this._coversAllTokens(l)){let n={item:e,idx:s,matches:l};t?(n.score=T(n.matches,{ignoreFieldNorm:i}),t.insert(n)):o.push(n)}}}),o}_searchLogical(e){let t=I(e,this.options),i=this._normalizedKeys(),n=(e,t,r)=>{if(!("children"in e)){let n,{keyId:s,searcher:l}=e;return(null===s?(n=[],i.forEach((e,i)=>{n.push(...this._findMatches({key:e,value:t[i],searcher:l}))})):n=this._findMatches({key:this._keyStore.get(s),value:this._myIndex.getValueForItemAtKeyId(t,s),searcher:l}),n&&n.length)?[{idx:r,item:t,matches:n}]:[]}let{children:s,operator:l}=e,o=[];for(let e=0,i=s.length;e{if(l(e)){let r=n(t,e,i);r.length&&(s.has(i)||(s.set(i,{idx:i,item:e,matches:[]}),o.push(s.get(i))),r.forEach(({matches:e})=>{s.get(i).matches.push(...e)}))}}),o}_searchObjectList(e,{heap:t,ignoreFieldNorm:i}={}){let n=this._getSearcher(e),r=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:s}=this._myIndex,o=this._normalizedKeys(),a=t?null:[];return s.forEach(({$:e,i:s})=>{if(!l(e))return;let u=[],c=!1,d=!1;if(o.forEach((t,i)=>{let r=this._findMatches({key:t,value:e[i],searcher:n});r.length?(u.push(...r),r[0].hasInverse&&(d=!0)):c=!0}),(!d||!c)&&u.length&&(!r||this._coversAllTokens(u))){let n={idx:s,item:e,matches:u};t?(n.score=T(n.matches,{ignoreFieldNorm:i}),t.insert(n)):a.push(n)}}),a}_findMatches({key:e,value:i,searcher:n}){if(!l(i))return[];let r=[];if(t(i))i.forEach(({v:t,i:i,n:s})=>{if(!l(t))return;let o=n.searchIn(t);if(o.isMatch){let n={score:o.score,key:e,value:t,idx:i,norm:s,indices:o.indices,hasInverse:o.hasInverse};void 0!==o.termCount&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),r.push(n)}});else{let{v:t,n:s}=i,l=n.searchIn(t);if(l.isMatch){let i={score:l.score,key:e,value:t,norm:s,indices:l.indices,hasInverse:l.hasInverse};void 0!==l.termCount&&(i.matchedMask=l.matchedMask,i.matchedTerms=l.matchedTerms,i.termCount=l.termCount),r.push(i)}}return r}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(void 0===t)return!0;if(t<=31){let i=0;for(let t=0;tE(e))},e.s(["f",0,q])},61885,45924,e=>{"use strict";var t=e.i(651681);let i={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],45924),e.s(["f",0,n],61885)},773151,e=>{"use strict";var t=e.i(651681);let i={name:"arrow-up-down",size:24,node:[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],773151)},1971,e=>{"use strict";var t=e.i(651681);let i={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};i.node;let n=(0,t.f)(i);e.s(["f",0,n])},88084,e=>{"use strict";var t=e.i(1971);e.s(["f",()=>t.f])},444227,e=>{"use strict";var t=e.i(651681);let i={name:"hash",size:24,node:[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],444227)},663993,943878,e=>{"use strict";var t=e.i(651681);let i={name:"square-arrow-out-up-right",size:24,node:[["path",{d:"M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6",key:"y09zxi"}],["path",{d:"m21 3-9 9",key:"mpx6sq"}],["path",{d:"M15 3h6v6",key:"1q9fwt"}]],aliases:["arrow-up-right-from-square"]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],943878),e.s(["f",0,n],663993)},601083,e=>{"use strict";var t=e.i(16043);function i(e,i,n,r){var s=this,l=(0,t.useRef)(null),o=(0,t.useRef)(0),a=(0,t.useRef)(0),u=(0,t.useRef)(null),c=(0,t.useRef)([]),d=(0,t.useRef)(),h=(0,t.useRef)(),f=(0,t.useRef)(e),m=(0,t.useRef)(!0),p=(0,t.useRef)(),g=(0,t.useRef)();f.current=e;var v="u">typeof window,y=!i&&0!==i&&v;if("function"!=typeof e)throw TypeError("Expected a function");i=+i||0;var x=!!(n=n||{}).leading,b=!("trailing"in n)||!!n.trailing,S=!!n.flushOnExit&&b,w="maxWait"in n,_="debounceOnServer"in n&&!!n.debounceOnServer,k=w?Math.max(+n.maxWait||0,i):null,M=(0,t.useMemo)(function(){var e=function(e){var t=c.current,i=d.current;return c.current=d.current=null,o.current=e,a.current=a.current||e,h.current=f.current.apply(i,t)},t=function(e,t){y&&cancelAnimationFrame(u.current),u.current=y?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!m.current)return!1;var t=e-l.current;return!l.current||t>=i||t<0||w&&e-o.current>=k},M=function(t){return u.current=null,b&&c.current?e(t):(c.current=d.current=null,h.current)},C=function e(){var r=Date.now();if(x&&a.current===o.current&&j(),n(r))return M(r);if(m.current){var s=i-(r-l.current);t(e,w?Math.min(s,k-(r-o.current)):s)}},j=function(){r&&r({})},A=function(){if(v||_){var r,a=Date.now(),f=n(a);if(c.current=[].slice.call(arguments),d.current=s,l.current=a,S&&!p.current&&(p.current=function(){var e;"hidden"===(null==(e=globalThis.document)?void 0:e.visibilityState)&&g.current.flush()},null==(r=globalThis.document)||null==r.addEventListener||r.addEventListener("visibilitychange",p.current)),f){if(!u.current&&m.current)return o.current=l.current,t(C,i),x?e(l.current):h.current;if(w)return t(C,i),e(l.current)}return u.current||t(C,i),h.current}};return A.cancel=function(){var e=u.current;e&&(y?cancelAnimationFrame(u.current):clearTimeout(u.current)),o.current=0,c.current=l.current=d.current=u.current=null,e&&r&&r({})},A.isPending=function(){return!!u.current},A.flush=function(){return u.current?M(Date.now()):h.current},A},[x,w,i,k,b,S,y,v,_,r]);return g.current=M,(0,t.useEffect)(function(){return m.current=!0,function(){var e;S&&g.current.flush(),p.current&&(null==(e=globalThis.document)||null==e.removeEventListener||e.removeEventListener("visibilitychange",p.current),p.current=null),m.current=!1}},[S]),M}function n(e,t){return e===t}e.s(["k",0,function(e,r,s){var l=s&&s.equalityFn||n,o=(0,t.useRef)(e),a=(0,t.useState)({})[1],u=i((0,t.useCallback)(function(e){o.current=e,a({})},[a]),r,s,a),c=(0,t.useRef)(e);return l(c.current,e)||(u(e),c.current=e),[o.current,u]},"s",0,i])},706792,e=>{"use strict";var t=e.i(140691);let i={Token:"token",Unit:"unit",Schedule:"schedule"};i.Token,i.Token,i.Unit,i.Token,i.Token,i.Token,i.Token,i.Token,i.Token,i.Token,i.Token,i.Token,i.Unit;let n=["Image Input","Input Image"],r=["Image Output","Output Image"];e.s(["H",0,i,"T",0,function(e){let t=e.filter(e=>e.kind===i.Token),s=t.find(e=>"Input Price"===e.sku_label),l=t.find(e=>"Output Price"===e.sku_label),o=t.find(e=>{var t;return t=e.sku_label,r.includes(t)}),a=t.find(e=>{var t;return t=e.sku_label,n.includes(t)})??s;return a&&o?{media:"image",inputItem:a,outputItem:o}:s&&l?{media:"text",inputItem:s,outputItem:l}:void 0},"U",0,function(e){let n=e.filter(e=>e.kind===i.Unit&&!0!==e.isServerTool),r=n[0];if(!r)return;let s=void 0!==r.tiers&&r.tiers.length>1,l=s||n.length>1;if(s){let e=(0,t.I)(1/0),i=r.price;for(let n of r.tiers){let r=(0,t.I)(n.price);r.gt(0)&&r.lt(e)&&(e=r,i=n.price)}return{price:i,displayMultiplier:r.displayMultiplier,unitLabel:r.unitLabel,hasDetails:l}}return{price:r.price,displayMultiplier:r.displayMultiplier,unitLabel:r.unitLabel,hasDetails:l}}])},399907,e=>{"use strict";var t=e.i(659350),i=e.i(663456),n=e.i(147832),r=e.i(199168);function s(e){return(0,t.jsx)("li",{className:"mt-0.5 first:mt-0",children:n.N[e]},e)}e.s(["f",0,function(e){let n,l,o,a,u,c=(0,i.c)(12),{heading:d,reasons:h}=e,f=(0,r.o)();return c[0]!==f||c[1]!==d?(n=d??f("Unavailable because:"),c[0]=f,c[1]=d,c[2]=n):n=c[2],c[3]!==n?(l=(0,t.jsx)("div",{className:"font-medium mb-1",children:n}),c[3]=n,c[4]=l):l=c[4],c[5]!==h?(o=h.map(s),c[5]=h,c[6]=o):o=c[6],c[7]!==o?(a=(0,t.jsx)("ul",{className:"list-disc list-inside",children:o}),c[7]=o,c[8]=a):a=c[8],c[9]!==l||c[10]!==a?(u=(0,t.jsxs)(t.Fragment,{children:[l,a]}),c[9]=l,c[10]=a,c[11]=u):u=c[11],u}])},640947,e=>{"use strict";var t=e.i(659350),i=e.i(663456),n=e.i(136562),r=e.i(829622),s=e.i(987457);e.s(["f",0,e=>{let l,o,a,u,c=(0,i.c)(26),{providerName:d,providerIcon:h,className:f,frame:m}=e;c[0]!==h.url.length||c[1]!==d?(l=0===h.url.length?(0,t.jsx)("span",{"aria-hidden":!0,className:"flex size-full items-center justify-center rounded-sm bg-muted text-sm font-medium text-muted-foreground",children:d.trim().charAt(0).toUpperCase()}):null,c[0]=h.url.length,c[1]=d,c[2]=l):l=c[2];let p=l;if(void 0!==m&&m){let e,i,l;return c[3]!==f?(e=(0,n.f)("size-8",f),c[3]=f,c[4]=e):e=c[4],c[5]!==p||c[6]!==h.className||c[7]!==h.darkUrl||c[8]!==h.url||c[9]!==d?(i=p??(0,t.jsx)(r.RemoteFavicon,{className:(0,n.f)("size-full",h.className),faviconFor:d,imgSrc:h.url,imgSrcDark:h.darkUrl,size:256}),c[5]=p,c[6]=h.className,c[7]=h.darkUrl,c[8]=h.url,c[9]=d,c[10]=i):i=c[10],c[11]!==e||c[12]!==i?(l=(0,t.jsx)(s.f,{className:e,children:i}),c[11]=e,c[12]=i,c[13]=l):l=c[13],l}let g=null===p&&"bg-muted/40 p-1 shadow-inner";return c[14]!==f||c[15]!==g?(o=(0,n.f)("flex items-center justify-center","h-8 w-8 rounded-lg",g,f),c[14]=f,c[15]=g,c[16]=o):o=c[16],c[17]!==p||c[18]!==h.className||c[19]!==h.darkUrl||c[20]!==h.url||c[21]!==d?(a=p??(0,t.jsx)(r.RemoteFavicon,{className:(0,n.f)("overflow-hidden rounded-sm",h.className),faviconFor:d,imgSrc:h.url,imgSrcDark:h.darkUrl,size:256}),c[17]=p,c[18]=h.className,c[19]=h.darkUrl,c[20]=h.url,c[21]=d,c[22]=a):a=c[22],c[23]!==o||c[24]!==a?(u=(0,t.jsx)("div",{className:o,children:a}),c[23]=o,c[24]=a,c[25]=u):u=c[25],u}])},656521,e=>{"use strict";var t=e.i(659350),i=e.i(663456),n=e.i(207298),r=e.i(61885),s=e.i(773151),l=e.i(136562),o=e.i(609623),a=e.i(261499);(0,n.f)("",{variants:{variant:{default:"px-4 py-2.5",action:"w-10 px-3 py-2.5"},align:{left:"text-left",right:"text-right"}},defaultVariants:{variant:"default"}}),(0,n.f)((0,l.f)("group/sort inline-flex max-w-full select-none items-center gap-1","text-inherit transition-colors hover:text-slate-12"),{variants:{align:{left:"",right:"flex-row-reverse"}},defaultVariants:{align:"left"}});let u=28/24;e.s(["z",0,function(e){let n,c,d,h,f,m=(0,i.c)(10),{direction:p,firstDirection:g}=e,v=!1!==p;m[0]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsx)(s.f,{"aria-hidden":"true",className:(0,l.f)("or-table__sort-icon or-table__sort-icon--muted","opacity-0 transition-opacity duration-fast ease-smooth-out motion-reduce:transition-none","group-hover/sort:opacity-100 group-focus-visible/sort:opacity-100")}),m[0]=n):n=m[0];let y=!1===p&&"delay-(--duration-fast) motion-reduce:transition-transform motion-reduce:duration-0",x="asc"===(!1===p?void 0===g?"asc":g:p)&&"-scale-y-100";return m[1]!==y||m[2]!==x?(c=(0,l.f)("flex",a.a,y,x),m[1]=y,m[2]=x,m[3]=c):c=m[3],m[4]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(r.f,{"aria-hidden":"true",className:"or-table__sort-icon",strokeWidth:u}),m[4]=d):d=m[4],m[5]!==c?(h=(0,t.jsx)("span",{className:c,children:d}),m[5]=c,m[6]=h):h=m[6],m[7]!==v||m[8]!==h?(f=(0,t.jsx)(o.f,{active:v,from:n,to:h}),m[7]=v,m[8]=h,m[9]=f):f=m[9],f},"w",0,function(e,t="asc"){return!1===e?t:e===t&&("asc"===t?"desc":"asc")}])},771743,e=>{"use strict";var t,i=e.i(659350),n=e.i(663456),r=e.i(16043),s=e.i(389475),l=e.i(533124),o=e.i(815922),a=e.i(93836),u=e.i(700788),c=e.i(107397);let d=r.createContext(void 0);function h(){let e=r.useContext(d);if(void 0===e)throw Error((0,c.f)(64));return e}let f={tabActivationDirection:e=>({"data-activation-direction":e})};var m=e.i(132887),p=e.i(24220),p=p,g=p,v=e.i(907621);let y=r.forwardRef(function(e,t){let{className:n,defaultValue:c=0,onValueChange:h,orientation:y="horizontal",render:S,value:w,style:_,...k}=e,M=void 0!==e.defaultValue,C=r.useRef([]),[j,A]=r.useState(()=>new Map),[E,O]=(0,s.f)({controlled:w,default:c,name:"Tabs",state:"value"}),F=void 0!==w,[z,D]=r.useState(()=>new Map),N=r.useRef(void 0),I=r.useCallback(e=>x(z,e),[z]),[T,P]=r.useState(()=>({previousValue:E,tabActivationDirection:"none"})),{previousValue:R,tabActivationDirection:B}=T,L=B,$=!1;R!==E&&(L=b(R,E,y,z),$=null!=R&&null!=E&&null==I(E));let W=$?R:E,V=R!==W||B!==L;(0,l.f)(()=>{V&&P({previousValue:W,tabActivationDirection:L})},[W,V,L]);let U=(0,o.f)((e,t)=>{t.activationDirection=b(E,e,y,z),h?.(e,t),t.isCanceled||O(()=>e)}),q=(0,o.f)((e,t)=>{h?.(e,(0,m.j)(t,void 0,void 0,{activationDirection:"none"}))}),H=(0,o.f)((e,t)=>(A(i=>{let n=new Map(i);return n.set(e,t),n}),()=>{A(i=>{if(i.get(e)!==t)return i;let n=new Map(i);return n.delete(e),n})})),G=r.useCallback(e=>j.get(e),[j]),K=r.useCallback(e=>{for(let t of z.values())if(e===t.value)return t.id},[z]),J=r.useMemo(()=>({getTabElementBySelectedValue:I,getTabIdByPanelValue:K,getTabPanelIdByValue:G,onValueChange:U,orientation:y,registerMountedTabPanel:H,setTabMap:D,tabActivationDirection:L,value:E}),[I,K,G,U,y,H,D,L,E]),Z=r.useMemo(()=>{for(let e of z.values())if(e.value===E)return e},[z,E]),Q=r.useMemo(()=>{for(let e of z.values())if(!e.disabled)return e.value},[z]),Y=r.useRef(!M),X=r.useRef(c),ee=r.useRef(M),et=r.useRef(!1);(0,l.f)(()=>{if(F)return;function e(e,t){O(()=>e),P({previousValue:e,tabActivationDirection:"none"}),q(e,t),Y.current=!1}if(0===z.size){et.current&&null!==E&&!N.current?.isConnected&&e(null,g.missing);return}et.current=!0,N.current=z.keys().next().value;let t=Z?.disabled,i=null==Z&&null!==E;if(t||E!==X.current||(ee.current=!1),ee.current&&t&&E===X.current)return;let n=Y.current;if(t||i){let i=Q??null;if(E===i){Y.current=!1;return}let r=g.missing;n?r=p.initial:t&&(r=v.f.disabled),e(i,r);return}n&&null!=Z&&(q(E,p.initial),Y.current=!1)},[Q,F,q,Z,O,z,E]);let ei={orientation:y,tabActivationDirection:L},en=(0,a.a)("div",e,{state:ei,ref:t,props:k,stateAttributesMapping:f});return(0,i.jsx)(d.Provider,{value:J,children:(0,i.jsx)(u.f,{elementsRef:C,children:en})})});function x(e,t){for(let[i,n]of e.entries())if(t===n.value)return i;return null}function b(e,t,i,n){if(null==e||null==t)return"none";let[r,s,l]="horizontal"===i?["left","left","right"]:["top","up","down"],o=x(n,e),a=x(n,t);if(null==o||null==a)return o!==a&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?t>e?l:s:"none";let u=o.getBoundingClientRect()[r],c=a.getBoundingClientRect()[r];return cu?l:"none"}var S=e.i(997932),w=e.i(811673),_=e.i(225421),k=e.i(509208),M=e.i(5573),C=e.i(57140);let j=r.createContext(void 0);function A(){let e=r.useContext(j);if(void 0===e)throw Error((0,c.f)(65));return e}var E=e.i(111407),O=e.i(393298);let F=r.forwardRef(function(e,t){let{className:i,disabled:n=!1,render:s,value:u,id:c,nativeButton:d=!0,style:p,...g}=e,{value:v,getTabPanelIdByValue:y,onValueChange:x,orientation:b,tabActivationDirection:j}=h(),{activateOnFocus:F,registerTabResizeObserverElement:z,tabsListElement:D}=A(),{highlightedIndex:N,onHighlightedIndexChange:I}=(0,C.o)(),T=(0,w.f)(c),P=r.useMemo(()=>({disabled:n,id:T,value:u}),[n,T,u]),{compositeProps:R,compositeRef:B,index:L}=(0,M.f)({metadata:P}),$=u===v,W=r.useRef(!1),V=r.useRef(null),U=(0,o.f)(e=>{V.current?.(),V.current=e?z(e):null});(0,l.f)(()=>{if(W.current){W.current=!1;return}if($&&L>-1&&N!==L){if(null!=D){let e=(0,O.T)((0,S.f)(D));if(e&&(0,O.I)(D,e))return}n||I(L)}},[$,L,N,I,n,D]);let{getButtonProps:q,buttonRef:H}=(0,_.f)({disabled:n,native:d,focusableWhenDisabled:!0}),G=y(u),K=r.useRef(!1),J=r.useRef(!1);function Z(e){x(u,(0,m.j)(E.f.none,e.nativeEvent,void 0,{activationDirection:"none"}))}return(0,a.a)("button",e,{state:{disabled:n,active:$,orientation:b,tabActivationDirection:j},ref:[t,H,B,U],props:[R,{role:"tab","aria-controls":G,"aria-selected":$,id:T,onClick:function(e){$||n||Z(e)},onFocus:function(e){$||n||F&&(!K.current||J.current)&&Z(e)},onPointerDown:function(e){if($||n)return;K.current=!0,J.current=0===e.button;let t=(0,S.f)(e.currentTarget);function i(){K.current=!1,J.current=!1,t.removeEventListener("pointerup",i),t.removeEventListener("pointercancel",i)}t.addEventListener("pointerup",i),t.addEventListener("pointercancel",i)},[k.f]:$?"":void 0,onKeyDownCapture(){W.current=!0}},g,q],stateAttributesMapping:f})});var z=e.i(807257),D=e.i(445036),N=e.i(223732),I=e.i(150649),T=e.i(856465),P=e.i(365041),R=e.i(726628);let B={...f,activeTabPosition:()=>null,activeTabSize:()=>null},L=r.forwardRef(function(e,n){let{className:s,render:l,renderBeforeHydration:o=!1,style:u,...c}=e,{getTabElementBySelectedValue:d,orientation:f,tabActivationDirection:m,value:p}=h(),{tabsListElement:g,registerIndicatorUpdateListener:v}=A(),y=(0,D.f)();r.useEffect(()=>v(y),[v,y]);let x=0,b=0,S=0,w=0,_=0,k=0,M=!1;if(null!=p&&null!=g){let e=d(p);if(null!=e){M=!0;let{width:t,height:i}=(0,P.f)(e),{width:n,height:r}=(0,P.f)(g),s=e.getBoundingClientRect(),l=g.getBoundingClientRect(),o=n>0?l.width/n:1,a=r>0?l.height/r:1,u=function(e,t){let i=$(e),n=$(t),r=i.left-n.left-t.clientLeft,s=i.top-n.top-t.clientTop,l=(0,z.J)(e);for(;(0,z.E)(l)&&l!==t&&!(0,z.Z)(l);)r-=l.scrollLeft,s-=l.scrollTop,l=(0,z.J)(l);return{left:r,top:s}}(e,g);x=u.left,S=u.top;let c=(s.left-l.left)/o+g.scrollLeft-g.clientLeft,d=(s.top-l.top)/a+g.scrollTop-g.clientTop,h=function(e){let t=(0,N.f)(e).getComputedStyle(e),{x:i,y:n}=(0,R.f)(e,t),r=i,s=n,{translate:l}=t;if(l&&"none"!==l){let t=l.split(" ");r+=W(t[0],e.offsetWidth),s+=W(t[1],e.offsetHeight)}return{x:r,y:s}}(e);2>=Math.abs(c-h.x-x)&&2>=Math.abs(d-h.y-S)&&(x=c,S=d),_=t,k=i,b=g.scrollWidth-x-_,w=g.scrollHeight-S-k}}let C=M?{left:x,right:b,top:S,bottom:w}:null,j=M?{width:_,height:k}:null,E=M?{"--active-tab-left":`${x}px`,"--active-tab-right":`${b}px`,"--active-tab-top":`${S}px`,"--active-tab-bottom":`${w}px`,"--active-tab-width":`${_}px`,"--active-tab-height":`${k}px`}:void 0,O=M&&_>0&&k>0,F=(0,a.a)("span",e,{state:{orientation:f,activeTabPosition:C,activeTabSize:j,tabActivationDirection:m},ref:n,props:[{role:"presentation",style:E,hidden:!O},c,{suppressHydrationWarning:!0}],stateAttributesMapping:B});return null==p?null:(0,i.jsxs)(r.Fragment,{children:[F,o&&(t||(t=(0,i.jsx)(T.f,{script:I.f})))]})});function $(e){let t=0,i=0,n=e;for(;null!=n;){t+=n.offsetLeft,i+=n.offsetTop;let e=n.offsetParent;null!=e&&(t+=e.clientLeft,i+=e.clientTop),n=e}return{left:t,top:i}}function W(e,t){if(!e)return 0;let i=parseFloat(e);return Number.isFinite(i)?e.endsWith("%")?i/100*t:i:0}var V=e.i(245966),U=e.i(240070),q=e.i(692933),H=e.i(288646),G=e.i(485997),K=e.i(691739),J=e.i(773183);K.f.startingStyle,J.f.endingStyle;let Z={...f,...U.f},Q=r.forwardRef(function(e,t){let{className:i,value:n,render:s,keepMounted:o=!1,style:u,...c}=e,{value:d,getTabIdByPanelValue:f,orientation:m,tabActivationDirection:p,registerMountedTabPanel:g}=h(),v=(0,w.f)(),{ref:y,index:x}=(0,G.f)(),b=n===d,{mounted:S,transitionStatus:_,setMounted:k}=(0,H.f)(b),M=!S,C=f(n),j=r.useRef(null),A=(0,a.a)("div",e,{state:{hidden:M,orientation:m,tabActivationDirection:p,transitionStatus:_},ref:[t,y,j],props:[{"aria-labelledby":C,hidden:M,id:v,role:"tabpanel",tabIndex:b?0:-1,inert:(0,V.f)(!b),"data-index":x},c],stateAttributesMapping:Z});return((0,q.f)({open:b,ref:j,onComplete(){b||k(!1)}}),(0,l.f)(()=>{if(null!=v&&(!M||o))return g(n,v)},[M,o,n,v,g]),o||S)?A:null});var Y=e.i(115370),X=e.i(587135);let ee=r.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:s,loopFocus:a=!0,render:u,style:c,...d}=e,{orientation:m,setTabMap:p,tabActivationDirection:g}=h(),[v,y]=r.useState(0),[x,b]=r.useState(null),S=r.useRef(new Set),w=r.useRef(new Set),_=r.useRef(null);(0,l.f)(()=>{if("u"{S.current.forEach(e=>{e()})});return _.current=e,x&&e.observe(x),w.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),_.current=null}},[x]);let k=(0,o.f)(e=>(S.current.add(e),()=>{S.current.delete(e)})),M=(0,o.f)(e=>(w.current.add(e),_.current?.observe(e),()=>{w.current.delete(e),_.current?.unobserve(e)})),C=r.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:k,registerTabResizeObserverElement:M,tabsListElement:x}),[n,k,M,x]);return(0,i.jsx)(j.Provider,{value:C,children:(0,i.jsx)(X.f,{render:u,className:s,style:c,state:{orientation:m,tabActivationDirection:g},refs:[t,b],props:[{"aria-orientation":"vertical"===m?"vertical":void 0,role:"tablist"},d],stateAttributesMapping:f,highlightedIndex:v,enableHomeAndEndKeys:!0,loopFocus:a,orientation:m,onHighlightedIndexChange:y,onMapChange:p,disabledIndices:Y.v})})});e.s(["Indicator",0,L,"List",0,ee,"Panel",0,Q,"Root",0,y,"Tab",0,F],308864);var et=e.i(308864),et=et,ei=et,en=et,er=et,es=et,el=e.i(207298),eo=e.i(136562);let ea=(0,el.f)("relative inline-flex items-center justify-center text-muted-foreground",{variants:{variant:{primary:"h-10 max-md:h-8 rounded-md border border-border bg-muted p-0.5",secondary:"border-b border-border bg-background"}},defaultVariants:{variant:"primary"}}),eu=(0,el.f)((0,eo.f)("pointer-events-none absolute left-0 w-(--active-tab-width) translate-x-(--active-tab-left)","transition-[translate,width] duration-fast ease-in-out-strong motion-reduce:transition-none"),{variants:{variant:{primary:"top-(--active-tab-top) h-(--active-tab-height) rounded-sm bg-background shadow-sm",secondary:"bottom-0 h-0.5 bg-primary"}},defaultVariants:{variant:"primary"}}),ec=(0,el.f)((0,eo.f)("inline-flex items-center justify-center whitespace-nowrap","text-xs font-medium cursor-pointer","ring-offset-background transition-colors duration-quick ease-smooth-out","focus-visible:outline-none focus-visible:border-focus-border focus-visible:shadow-focus","disabled:pointer-events-none disabled:opacity-50"),{variants:{variant:{primary:(0,eo.f)("relative w-full rounded-sm px-3 py-1.5 max-md:py-0.5","hover:text-accent-foreground","data-[active]:bg-background data-[active]:text-accent-foreground data-[active]:shadow-sm","[[data-tabs-indicator]:not([hidden])~&]:data-[active]:bg-transparent","[[data-tabs-indicator]:not([hidden])~&]:data-[active]:shadow-none"),secondary:(0,eo.f)("relative w-fit px-3 py-1.5","text-muted-foreground hover:text-foreground","after:pointer-events-none after:absolute after:inset-x-0 after:bottom-0 after:h-0.5","after:bg-transparent after:transition-colors after:duration-200","data-[active]:text-primary","data-[active]:after:bg-primary","[[data-tabs-indicator]:not([hidden])~&]:data-[active]:after:bg-transparent")},size:{default:"",sm:"gap-1.5 rounded-sm px-2.5 py-1 hover:text-accent-foreground"}},defaultVariants:{variant:"primary",size:"default"}}),ed=(0,r.createContext)("primary"),eh=(0,r.createContext)("default"),ef=(0,r.createContext)(!1);e.s(["i",0,function(e){let t,r,s,l,o,a=(0,n.c)(10);a[0]!==e?({variant:s,children:t,...r}=e,a[0]=e,a[1]=t,a[2]=r,a[3]=s):(t=a[1],r=a[2],s=a[3]);let u=void 0===s?"primary":s;return a[4]!==t||a[5]!==r?(l=(0,i.jsx)(et.Root,{...r,children:t}),a[4]=t,a[5]=r,a[6]=l):l=a[6],a[7]!==l||a[8]!==u?(o=(0,i.jsx)(ed,{value:u,children:l}),a[7]=l,a[8]=u,a[9]=o):o=a[9],o},"S",0,function(e){let t,r,s,l,o,a=(0,n.c)(10);return a[0]!==e?({className:t,ref:s,...r}=e,a[0]=e,a[1]=t,a[2]=r,a[3]=s):(t=a[1],r=a[2],s=a[3]),a[4]!==t?(l=(0,eo.f)("mt-2 ring-offset-background","focus-visible:outline-none focus-visible:border-focus-border focus-visible:shadow-focus",t),a[4]=t,a[5]=l):l=a[5],a[6]!==r||a[7]!==s||a[8]!==l?(o=(0,i.jsx)(es.Panel,{ref:s,className:l,...r}),a[6]=r,a[7]=s,a[8]=l,a[9]=o):o=a[9],o},"U",0,function(e){let t,s,l,o,a,u,c,d,h,f,m,p,g=(0,n.c)(27);g[0]!==e?({className:s,children:t,ref:o,size:a,shouldWrap:u,...l}=e,g[0]=e,g[1]=t,g[2]=s,g[3]=l,g[4]=o,g[5]=a,g[6]=u):(t=g[1],s=g[2],l=g[3],o=g[4],a=g[5],u=g[6]);let v=void 0===a?"default":a,y=void 0!==u&&u,x=(0,r.use)(ed);return g[7]!==s||g[8]!==y||g[9]!==x?(c=(0,eo.f)(ea({variant:x}),y&&"h-auto max-md:h-auto flex-wrap",s),g[7]=s,g[8]=y,g[9]=x,g[10]=c):c=g[10],g[11]!==x?(d=(0,eo.f)(eu({variant:x})),g[11]=x,g[12]=d):d=g[12],g[13]!==d?(h=(0,i.jsx)(ei.Indicator,{"data-tabs-indicator":"",className:d}),g[13]=d,g[14]=h):h=g[14],g[15]!==t||g[16]!==y?(f=(0,i.jsx)(ef,{value:y,children:t}),g[15]=t,g[16]=y,g[17]=f):f=g[17],g[18]!==v||g[19]!==f?(m=(0,i.jsx)(eh,{value:v,children:f}),g[18]=v,g[19]=f,g[20]=m):m=g[20],g[21]!==l||g[22]!==o||g[23]!==c||g[24]!==h||g[25]!==m?(p=(0,i.jsxs)(en.List,{ref:o,className:c,...l,children:[h,m]}),g[21]=l,g[22]=o,g[23]=c,g[24]=h,g[25]=m,g[26]=p):p=g[26],p},"k",0,function(e){let t,s,l,o,a,u=(0,n.c)(13);u[0]!==e?({className:t,ref:l,...s}=e,u[0]=e,u[1]=t,u[2]=s,u[3]=l):(t=u[1],s=u[2],l=u[3]);let c=(0,r.use)(ed),d=(0,r.use)(eh),h=(0,r.use)(ef);return u[4]!==t||u[5]!==h||u[6]!==d||u[7]!==c?(o=(0,eo.f)(ec({variant:c,size:d}),h&&"w-auto",t),u[4]=t,u[5]=h,u[6]=d,u[7]=c,u[8]=o):o=u[8],u[9]!==s||u[10]!==l||u[11]!==o?(a=(0,i.jsx)(er.Tab,{ref:l,className:o,...s}),u[9]=s,u[10]=l,u[11]=o,u[12]=a):a=u[12],a}],771743)},332610,e=>{"use strict";var t=e.i(663456),i=e.i(16043);let n={kind:"closed"};function r(e,t){return"open"===e.kind&&e.overlay===t}function s(e,t){switch(t.type){case"opened":return r(e,t.overlay)?e:{kind:"open",overlay:t.overlay};case"closed":return r(e,t.overlay)?n:e;default:return t}}e.s(["f",0,function(){let e,l,o,a,u,c=(0,t.c)(8),[d,h]=(0,i.useReducer)(s,n);c[0]===Symbol.for("react.memo_cache_sentinel")?(e=e=>h({type:"opened",overlay:e}),c[0]=e):e=c[0];let f=e;c[1]===Symbol.for("react.memo_cache_sentinel")?(l=e=>h({type:"closed",overlay:e}),c[1]=l):l=c[1];let m=l;c[2]===Symbol.for("react.memo_cache_sentinel")?(o=(e,t)=>h({type:t?"opened":"closed",overlay:e}),c[2]=o):o=c[2];let p=o;c[3]!==d?(a=e=>r(d,e),c[3]=d,c[4]=a):a=c[4];let g=a;return c[5]!==g||c[6]!==d?(u={state:d,isOpen:g,open:f,close:m,setOpen:p},c[5]=g,c[6]=d,c[7]=u):u=c[7],u}],332610)},592176,e=>{"use strict";var t=e.i(663456),i=e.i(927099),n=e.i(618115),r=e.i(56222);e.i(16043);var s=e.i(702596),l=e.i(505884);let o={Eligible:"eligible",Partial:"partial",Ineligible:"ineligible",Unknown:"unknown"},a={Eligible:"eligible",Ineligible:"ineligible",Unknown:"unknown"};e.s(["J",0,o,"P",0,a,"R",0,function(e,u,c){let d,h,f,m,p,g,v,y,x,b,S,w,_,k,M=(0,t.c)(52),C=c?.includeGuardrails??!0,j=c?.guardrailLayer,A=c?.editedPolicyId,E=u??null,O=(0,r.d)();M[0]!==A||M[1]!==e||M[2]!==j||M[3]!==C||M[4]!==E?(d=(0,l.Y)({entityId:e,includeGuardrails:!0,isEnabled:C,workspaceId:E,guardrailLayer:j,editedPolicyId:A}),M[0]=A,M[1]=e,M[2]=j,M[3]=C,M[4]=E,M[5]=d):d=M[5];let F=(0,n.f)(d),z=!C||F.isError;M[6]!==e||M[7]!==z?(h=(0,l.Y)({entityId:e,includeGuardrails:!1,isEnabled:z,workspaceId:null}),M[6]=e,M[7]=z,M[8]=h):h=M[8];let D=(0,n.f)(h),N=C?F.data??D.data:D.data,I=C?F.data?.eligibility:D.data?.eligibility;e:{let e;if(!I){f=null;break e}if(M[9]!==I){e=new Map;let{models:t}=I;for(let i of t.fullyEligible)e.set(i.permaslug,o.Eligible);for(let i of t.partiallyEligible)e.set(i.permaslug,o.Partial);for(let i of t.ineligible)e.set(i.permaslug,o.Ineligible);M[9]=I,M[10]=e}else e=M[10];f=e}let T=f;M[11]!==T?(m=e=>T?.get(e)??o.Unknown,M[11]=T,M[12]=m):m=M[12];let P=m;M[13]!==P?(p=e=>{let t=P(e);return t===o.Eligible||t===o.Partial},M[13]=P,M[14]=p):p=M[14];let R=p;t:{let e;if(!I){g=null;break t}if(M[15]!==I.models.ineligible){for(let t of(e=new Map,I.models.ineligible))e.set(t.permaslug,t.reasons??[]);M[15]=I.models.ineligible,M[16]=e}else e=M[16];g=e}let B=g;M[17]!==B?(v=e=>B?.get(e)??[],M[17]=B,M[18]=v):v=M[18];let L=v;M[19]!==I?(y=e=>{if(!I)return a.Unknown;let{providers:t}=I;return t.eligible.includes(e)?a.Eligible:t.ineligible.some(t=>t.slug===e)?a.Ineligible:a.Unknown},M[19]=I,M[20]=y):y=M[20];let $=y;M[21]!==I?(x=e=>{if(!I)return[];let{providers:t}=I,i=t.ineligible.find(t=>t.slug===e);return i?.reasons??[]},M[21]=I,M[22]=x):x=M[22];let W=x;M[23]!==I?(b=(e,t)=>{if(!I)return[];let n=I.models.partiallyEligible.find(t=>t.permaslug===e)??I.models.ineligible.find(t=>t.permaslug===e);if(!n)return[];let r=(0,i.u)(t);return n.ineligibleProviders.find(e=>e.slug===r)?.reasons??[]},M[23]=I,M[24]=b):b=M[24];let V=b;M[25]!==A||M[26]!==e||M[27]!==j||M[28]!==C||M[29]!==E||M[30]!==O?(S=()=>{let t=[O.resetQueries({exact:!0,queryKey:l.g.detail(e,{includeGuardrails:!1,workspaceId:null})})];return C&&t.push(O.resetQueries({exact:!0,queryKey:l.g.detail(e,{includeGuardrails:!0,workspaceId:E,guardrailLayer:j,editedPolicyId:A})})),Promise.all(t)},M[25]=A,M[26]=e,M[27]=j,M[28]=C,M[29]=E,M[30]=O,M[31]=S):S=M[31];let U=S;M[32]!==N?(w=void 0===N?null:{allowedProviders:N.allowedProviders,ignoredProviders:N.ignoredProviders,allowedModelAuthors:N.allowedModelAuthors,blockedModelAuthors:N.blockedModelAuthors},M[32]=N,M[33]=w):w=M[33];let q=w,H=D.isLoading||C&&F.isLoading;M[34]!==D.error||M[35]!==F||M[36]!==C?(_=(0,s.i)(D.error)??(C?(0,s.i)(F.error):null),M[34]=D.error,M[35]=F,M[36]=C,M[37]=_):_=M[37];let G=_,K=I??null,J=C?F.data?.byokOnlyProviders??null:null,Z=C?F.data?.disabledServiceTiers??null:null;return M[38]!==J||M[39]!==Z||M[40]!==K||M[41]!==V||M[42]!==P||M[43]!==L||M[44]!==$||M[45]!==W||M[46]!==R||M[47]!==q||M[48]!==G||M[49]!==H||M[50]!==U?(k={providerPreferences:q,providerPreferencesLoading:H,providerPreferencesError:G,refetchProviderPreferences:U,eligibility:K,byokOnlyProviders:J,disabledServiceTiers:Z,getModelEligibilityStatus:P,isModelEligible:R,getModelIneligibilityReasons:L,getProviderEligibilityStatus:$,getProviderIneligibilityReasons:W,getEndpointIneligibilityReasons:V},M[38]=J,M[39]=Z,M[40]=K,M[41]=V,M[42]=P,M[43]=L,M[44]=$,M[45]=W,M[46]=R,M[47]=q,M[48]=G,M[49]=H,M[50]=U,M[51]=k):k=M[51],k}],592176)},887604,e=>{"use strict";var t=e.i(663456),i=e.i(16043);e.s(["f",0,function(e,n){let r,s,l=(0,t.c)(5);l[0]!==n||l[1]!==e?(r=()=>n(e),l[0]=n,l[1]=e,l[2]=r):r=l[2];let[o,a]=(0,i.useState)(r),[u,c]=(0,i.useState)(e);return Object.is(u,e)||(c(e),a(n(e))),l[3]!==o?(s=[o,a],l[3]=o,l[4]=s):s=l[4],s}])},808125,e=>{"use strict";var t=e.i(667417),i=e.i(387086);let n={[t.D.Text]:(0,i.b)("Text"),[t.D.Image]:(0,i.b)("Image"),[t.D.File]:(0,i.b)("File"),[t.D.Audio]:(0,i.b)("Audio"),[t.D.Video]:(0,i.b)("Video")},r={[t.j.Text]:(0,i.b)("Text"),[t.j.Image]:(0,i.b)("Image"),[t.j.Embeddings]:(0,i.b)("Embeddings"),[t.j.Audio]:(0,i.b)("Audio"),[t.j.Video]:(0,i.b)("Video"),[t.j.Rerank]:(0,i.b)("Rerank"),[t.j.Decisions]:(0,i.b)("Decisions"),[t.j.TTS]:(0,i.b)("Speech"),[t.j.Transcription]:(0,i.b)("Transcription")};e.s(["Z",0,n,"L",0,r])},503741,e=>{"use strict";var t=e.i(989487),i=e.i(960773);e.s(["m",0,"v3","D",0,{Playground:"model_page_playground",SidePanelSeed:"model_page_sidepanel_seed",PlaygroundSection:"model_page_playground_section"},"O",0,function(e){let n=Object.fromEntries(Object.entries(e).map(([e,i])=>[(0,t.h)(e),i]));i.j.capture("playground_v3:fetch_responses",n)}])},157063,e=>{"use strict";var t=e.i(663456),i=e.i(16043);e.s(["f",0,(e,n,r)=>{let s,l,o,a=(0,t.c)(7);a[0]!==r?(s=void 0===r?{attributes:!0,characterData:!0,childList:!0,subtree:!0}:r,a[0]=r,a[1]=s):s=a[1];let u=s;a[2]!==n||a[3]!==u||a[4]!==e?(l=()=>{if(!e.current)return;let t=new MutationObserver(n);return t.observe(e.current,u),()=>t.disconnect()},o=[e,n,u],a[2]=n,a[3]=u,a[4]=e,a[5]=l,a[6]=o):(l=a[5],o=a[6]),(0,i.useEffect)(l,o)}])},505884,e=>{"use strict";var t=e.i(173465),i=e.i(613497),n=e.i(819750);let r=(0,e.i(524287).f)("provider-preferences",{detail:(e,t)=>void 0===t?[e]:[e,t]}),s={all:r.all,prefix:r.prefix,detailPrefix:e=>r.detail(e),detail:(e,{guardrailLayer:t,editedPolicyId:i,...n})=>r.detail(e,{...n,...void 0===t?{}:{guardrailLayer:t},...void 0===i?{}:{editedPolicyId:i}})};e.s(["g",0,s,"Y",0,function({entityId:e,includeGuardrails:r,isEnabled:l=!0,workspaceId:o,guardrailLayer:a,editedPolicyId:u}){return(0,t.f)({enabled:l,queryKey:s.detail(e,{includeGuardrails:r,workspaceId:o,guardrailLayer:a,editedPolicyId:u}),queryFn:null!==e?({signal:e})=>(0,n.f)("/api/frontend/v1/private/provider-preferences",{searchParams:r?{include_guardrails:"true",includeGuardrails:"true",workspace_id:o??void 0,guardrail_layer:a,edited_policy_id:u}:void 0,signal:e}):i.V})}])},993242,32462,e=>{"use strict";var t=e.i(663456),i=e.i(340800),n=e.i(134611),r=e.i(497214),s=e.i(56222),l=e.i(463686),o=e.i(701499),a=e.i(16043),u=e.i(601083),c=e.i(791969),d=e.i(467863),h=e.i(960773),f=e.i(138257),m=e.i(865071),p=e.i(448457);let g=/\d+\.\d+|[\w]+(?:\.[\w]+)*/g,v=/^\d+\.\d+$/;function y(e){let t=e.toLowerCase(),i=e=>(e.match(g)||[]).flatMap(e=>v.test(e)?e:e.split(".").filter(Boolean)),n=i(t),s=t.includes("-")?i(t.replaceAll("-","")):[];return(0,r.H)([...n,...s])}e.s(["f",0,y],32462);var x=e.i(761821);let{BaseContext:b,Provider:S}=(0,o.f)(()=>{let e,o,g,v,y,b,S,j,A,E,O,F,z,D,N=(0,t.c)(44),I=(0,f.useLocale)(),T=(0,l.useRouter)(),P=(0,m.J)(),R=(0,l.usePathname)(),B=(0,s.d)(),{availableTextModels:L,isReady:$,getAllProviders:W}=(0,x.S)(),[V,U]=(0,a.useState)(""),[q]=(0,u.k)(V,200),[H,G]=(0,a.useState)(!1),K=(0,h.Q)();N[0]!==$||N[1]!==B?(e=()=>{$||(B.prefetchQuery((0,d.o)()),B.prefetchQuery((0,p.H)()))},o=[$,B],N[0]=$,N[1]=B,N[2]=e,N[3]=o):(e=N[2],o=N[3]),(0,a.useEffect)(e,o),N[4]!==q||N[5]!==K?(g=()=>{q.trim()&&K.capture("nav_search",{search_term:q})},v=[q,K],N[4]=q,N[5]=K,N[6]=g,N[7]=v):(g=N[6],v=N[7]),(0,a.useEffect)(g,v),N[8]===Symbol.for("react.memo_cache_sentinel")?(y=()=>{G(!1)},N[8]=y):y=N[8],N[9]!==R?(b=[R],N[9]=R,N[10]=b):b=N[10],(0,a.useEffect)(y,b);e:{let e;if(!L.length){let e;N[11]===Symbol.for("react.memo_cache_sentinel")?(e=[],N[11]=e):e=N[11],S=e;break e}if(N[12]!==L||N[13]!==I){let t=L.toSorted(w).map(_);e=(0,r.i)(t,e=>{let t=new Date(e.created_at);return(0,i.C)(t,{locale:I,timeZone:"UTC",preset:"month-year"})??"—"}).map(k),N[12]=L,N[13]=I,N[14]=e}else e=N[14];S=e}let J=S;t:{let e;if(!q.trim()){j=J;break t}if(N[15]!==q||N[16]!==J){let t=q.toLowerCase();e=J.map(e=>{let[i,n]=e;return[i,n.filter(e=>e.name.toLowerCase().includes(t))]}).filter(M).map(C),N[15]=q,N[16]=J,N[17]=e}else e=N[17];j=e}let Z=j;N[18]!==W?(A=W(),N[18]=W,N[19]=A):A=N[19];let Q=A;i:{let e;if(!q.trim()){let e;N[20]===Symbol.for("react.memo_cache_sentinel")?(e=[],N[20]=e):e=N[20],E=e;break i}if(N[21]!==Q||N[22]!==q){let t=q.toLowerCase();e=Q.filter(e=>{let i=e.displayName.toLowerCase().includes(t),n=e.slug.toLowerCase().includes(t);return i||n}).slice(0,3),N[21]=Q,N[22]=q,N[23]=e}else e=N[23];E=e}let Y=E;N[24]!==P||N[25]!==T?(O=e=>{G(!1),U(""),T.push((0,c.F)(P(`/${(0,n.i)(e)}`)))},N[24]=P,N[25]=T,N[26]=O):O=N[26];let X=O;N[27]!==P||N[28]!==T?(F=e=>{G(!1),U(""),T.push((0,c.F)(P(`/provider/${e.slug}`)))},N[27]=P,N[28]=T,N[29]=F):F=N[29];let ee=F;N[30]!==P||N[31]!==T?(z=e=>{G(!1),U(""),T.push((0,c.F)(P(`/models?q=${encodeURIComponent(e.toLowerCase())}`)))},N[30]=P,N[31]=T,N[32]=z):z=N[32];let et=z,ei=!$;return N[33]!==Q||N[34]!==Z||N[35]!==Y||N[36]!==et||N[37]!==X||N[38]!==ee||N[39]!==H||N[40]!==J||N[41]!==V||N[42]!==ei?(D={isOpen:H,isLoading:ei,setIsOpen:G,searchValue:V,setSearchValue:U,modelGroupByCreatedAtEntries:J,filteredModelGroupByCreatedAtEntries:Z,filteredProviders:Y,allProviders:Q,handleSelectModel:X,handleSelectProvider:ee,handleSearchAll:et},N[33]=Q,N[34]=Z,N[35]=Y,N[36]=et,N[37]=X,N[38]=ee,N[39]=H,N[40]=J,N[41]=V,N[42]=ei,N[43]=D):D=N[43],D});function w(e,t){return new Date(t.created_at).getTime()-new Date(e.created_at).getTime()}function _(e){return{...e,searchKeywords:y(e.name)}}function k(e){let{key:t,values:i}=e;return[t,i]}function M(e){let[,t]=e;return t&&t.length>0}function C(e){let[t,i]=e;return[t,i]}e.s(["r",0,S,"N",0,()=>{let e=(0,a.useContext)(b);if(!e)throw Error("useNavSearch must be used within a NavSearchProvider.");return e}],993242)},932061,e=>{"use strict";var t=e.i(339814),i=e.i(385190);e.s(["f",0,function(e,n){return(0,t.o)(e,n,{locale:i.L})}])},989487,e=>{"use strict";let t=/(?<=[\p{Ll}\d])(?=\p{Lu})|(?<=\p{Lu})(?=\p{Lu}\p{Ll})/u,i=/(?<=[\p{Ll}\d])(?=\p{Lu})|(?<=\p{Lu})(?=\p{Lu}\p{Ll})|(?<=\d)(?=\p{Ll})|(?<=\p{L})(?=\d)/u;function n(e,{style:r,options:s={}}){let l=0,o=e.length;for(;ll&&s.suffixCharacters?.includes(e.charAt(o-1));)o--;let a=(s.split??(e=>(function(e,n){let r=e.match(/[\p{L}\d]+/giu);if(null===r)return[];let s=n?i:t;if(1===r.length)return r[0].split(s);let l=[];for(let e of r)for(let t of e.split(s))l.push(t);return l})(e,s.separateNumbers)))(e.slice(l,o)),u=s.locale,c=s.locale,d=!1===u?e=>e.toLowerCase():e=>e.toLocaleLowerCase(u),h=!1===c?e=>e.toUpperCase():e=>e.toLocaleUpperCase(c),f="camel"===r||"pascal"===r,m=(e,t)=>{let i=e[0];return(f&&!s.mergeAmbiguousCharacters&&t>0&&/^[0-9]$/.test(i)?"_":"")+h(i)+d(e.slice(1))},p=m;"lower"===r&&(p=d),"camel"===r&&(p=(e,t)=>0===t?d(e):m(e,t)),"sentence"===r&&(p=(e,t)=>0===t?m(e,t):d(e));let g=a.map(p);return e.slice(0,l)+g.join(s.delimiter??(f?"":" "))+e.slice(o)}e.s(["j",0,function(e,t){return n(e,{style:"capital",options:t})},"O",0,function(e,t){return n(e,{style:"lower",options:{delimiter:"-",...t}})},"F",0,function(e,t){return n(e,{style:"sentence",options:t})},"h",0,function(e,t){return n(e,{style:"lower",options:{delimiter:"_",...t}})}])},147832,e=>{"use strict";var t,i=((t={}).ProviderNotAllowedByGuardrail="provider-not-allowed-by-guardrail",t.ProviderNotAllowedByAccount="provider-not-allowed-by-account",t.ProviderIgnoredByAccount="provider-ignored-by-account",t.ProviderIgnoredByGuardrail="provider-ignored-by-guardrail",t.ModelIgnoredByGuardrail="model-ignored-by-guardrail",t.ModelAuthorNotAllowedByAccount="model-author-not-allowed-by-account",t.ModelAuthorBlockedByAccount="model-author-blocked-by-account",t.DataRegionNotAllowedByGuardrail="data-region-not-allowed-by-guardrail",t.ZdrViolationByAccount="zdr-violation-by-account",t.ZdrViolationByGuardrail="zdr-violation-by-guardrail",t.FreeModelTrainingViolationByAccount="free-model-training-violation-by-account",t.FreeModelTrainingViolationByGuardrail="free-model-training-violation-by-guardrail",t.PaidModelTrainingViolationByAccount="paid-model-training-violation-by-account",t.PaidModelTrainingViolationByGuardrail="paid-model-training-violation-by-guardrail",t.FreeModelPublicationViolationByAccount="free-model-publication-violation-by-account",t.FreeModelPublicationViolationByGuardrail="free-model-publication-violation-by-guardrail",t.ProviderRequiresWorkspaceKey="provider-requires-workspace-key",t.ByokOnlyRequiresOwnKey="byok-only-requires-own-key",t.ServiceTierDisabledByWorkspace="service-tier-disabled-by-workspace",t);let n={PrivacySettings:"privacy-settings",GuardrailSettings:"guardrail-settings",ByokSettings:"byok-settings",RoutingSettings:"routing-settings"},r={"provider-not-allowed-by-guardrail":n.GuardrailSettings,"provider-not-allowed-by-account":n.PrivacySettings,"provider-ignored-by-account":n.PrivacySettings,"provider-ignored-by-guardrail":n.GuardrailSettings,"model-ignored-by-guardrail":n.GuardrailSettings,"model-author-not-allowed-by-account":n.PrivacySettings,"model-author-blocked-by-account":n.PrivacySettings,"data-region-not-allowed-by-guardrail":n.GuardrailSettings,"zdr-violation-by-account":n.PrivacySettings,"zdr-violation-by-guardrail":n.GuardrailSettings,"free-model-training-violation-by-account":n.PrivacySettings,"free-model-training-violation-by-guardrail":n.GuardrailSettings,"paid-model-training-violation-by-account":n.PrivacySettings,"paid-model-training-violation-by-guardrail":n.GuardrailSettings,"free-model-publication-violation-by-account":n.PrivacySettings,"free-model-publication-violation-by-guardrail":n.GuardrailSettings,"provider-requires-workspace-key":n.ByokSettings,"byok-only-requires-own-key":n.ByokSettings,"service-tier-disabled-by-workspace":n.RoutingSettings};e.s(["l",0,r,"N",0,{"provider-not-allowed-by-guardrail":"Provider not allowed by guardrail","provider-not-allowed-by-account":"Provider not allowed by account","provider-ignored-by-account":"Provider ignored by account","provider-ignored-by-guardrail":"Provider blocked by guardrail","model-ignored-by-guardrail":"Model blocked by guardrail","model-author-not-allowed-by-account":"Model author not allowed by account","model-author-blocked-by-account":"Model author blocked by account","data-region-not-allowed-by-guardrail":"Provider region outside the data regions allowed by guardrail","zdr-violation-by-account":"ZDR violation (account settings)","zdr-violation-by-guardrail":"ZDR violation (guardrail)","free-model-training-violation-by-account":"Free model training violation (account settings)","free-model-training-violation-by-guardrail":"Free model training violation (guardrail)","paid-model-training-violation-by-account":"Paid model training violation (account settings)","paid-model-training-violation-by-guardrail":"Paid model training violation (guardrail)","free-model-publication-violation-by-account":"Free model publication violation (account settings)","free-model-publication-violation-by-guardrail":"Free model publication violation (guardrail)","provider-requires-workspace-key":"Your workspace's key for this provider never uses shared capacity and doesn't apply to this model","byok-only-requires-own-key":"BYOK-only routing is on and none of your provider keys can serve this model","service-tier-disabled-by-workspace":"Service tier not allowed by your workspace's Allowed Service Tiers setting"},"m",()=>i,"M",0,n])},393182,e=>{"use strict";let t={Auto:"openrouter/auto",JevRouter:"typesafe/jev-router",AutoBeta:"openrouter/auto-beta",AutoCode:"openrouter/auto-code",BodyBuilder:"openrouter/bodybuilder",Free:"openrouter/free",ParetoCode:"openrouter/pareto-code",Fusion:"openrouter/fusion",FusionFlash:"openrouter/fusion-flash",Phaser:"openrouter/phaser",Switchyard:"nvidia/switchyard"};t.JevRouter,t.AutoCode,e.s(["f",0,t])},35485,e=>{"use strict";var t=e.i(659350),i=e.i(134611),n=e.i(136562),r=e.i(233452),s=e.i(536397),l=e.i(80676),o=e.i(640947),a=e.i(332610),u=e.i(592176),c=e.i(887604),d=e.i(138257),h=e.i(272719),f=e.i(301206),m=e.i(346078),p=e.i(815193);e.i(707060);var g=e.i(288265),v=e.i(924125),y=e.i(16043),x=e.i(657011),b=e.i(25683),S=e.i(437042),w=e.i(716184),_=e.i(576670),k=e.i(563041),M=e.i(35300),C=e.i(118384),j=e.i(911146),A=e.i(537248),E=e.i(829837),O=e.i(928166),F=e.i(663456),z=e.i(771743),D=e.i(199168),N=e.i(196991);let I="px-0 py-2 text-body leading-snug";function T(e){let i,n,r,s,l,o,a=(0,F.c)(14),{groups:u,value:c,onValueChange:d}=e,h=(0,D.o)();return a[0]!==d?(i=e=>{"string"==typeof e&&d(e)},a[0]=d,a[1]=i):i=a[1],a[2]!==h?(n=h("Browse models"),a[2]=h,a[3]=n):n=a[3],a[4]===Symbol.for("react.memo_cache_sentinel")?(r=(0,t.jsx)(z.k,{value:b.e,className:I,children:(0,t.jsx)(N.T,{children:"All"})}),a[4]=r):r=a[4],a[5]!==u?(s=u.map(P),a[5]=u,a[6]=s):s=a[6],a[7]!==n||a[8]!==s?(l=(0,t.jsxs)(z.U,{"aria-label":n,activateOnFocus:!0,className:"flex w-full justify-start gap-5 px-4",children:[r,s]}),a[7]=n,a[8]=s,a[9]=l):l=a[9],a[10]!==i||a[11]!==l||a[12]!==c?(o=(0,t.jsx)(z.i,{variant:"secondary",value:c,onValueChange:i,onKeyDown:R,children:l}),a[10]=i,a[11]=l,a[12]=c,a[13]=o):o=a[13],o}function P(e){return(0,t.jsx)(z.k,{value:e.key,className:I,children:e.label},e.key)}function R(e){e.target instanceof HTMLElement&&e.target.closest('[role="tablist"]')&&e.stopPropagation()}let B=[];e.s(["f",0,function({groupEntries:e,variant:F,collapsibleFilters:z=!1,externalQuery:D,onExternalQueryChange:N,filtersExpanded:I,onFiltersExpandedChange:P,onVisibleCountChange:R,onVisibleProviderCountChange:L,onActiveFilterCountChange:$,scrollResetKey:W,selectedModelInfo:V,selectedModelSlugs:U,disabledModelSlugs:q,onDone:H,onPinnedDone:G,onPeek:K,providers:J,onProviderSelect:Z,pages:Q,onPageSelect:Y,docsSearch:X,onDocSelect:ee,quickPickGroups:et,listClassName:ei,listHeader:en,showModelHoverCard:er=!1,title:es,description:el,showGuardrailsWarning:eo=!1,hideUnavailableByDefault:ea=!1,disableSelectForUnavailable:eu=!1,workspaceId:ec,includeGuardrails:ed,guardrailLayer:eh,editedPolicyId:ef,listId:em}){let{isDialog:ep,autoFocusSearch:eg,showSortAndView:ev,hideSearch:ey,flatSearchResults:ex,hideFilters:eb,headlessCommand:eS,useTransientPrefs:ew,modelSuggestionsAsPills:e_,showModelCopyButton:ek}=(0,S.f)(F),eM=(0,g.f)(),eC=(0,d.useLocale)(),ej=(0,y.useRef)(null),eA=(0,h.f)(e=>e.pinnedModelSlugs),eE=(0,h.f)(e=>e.toggleModelPin),eO=(0,O.f)(e=>e.clearHoveredModel),eF=(0,h.f)(e=>e.entity?.clerk_user_id??null),ez=(0,u.R)(eF,ec,{includeGuardrails:ed,guardrailLayer:eh,editedPolicyId:ef}),{getModelEligibilityStatus:eD}=ez,{getModelIneligibilityReasons:eN}=ez;(0,y.useEffect)(()=>{if(!eg||(0,f.f)())return;let e=requestAnimationFrame(()=>{ej.current?.focus({preventScroll:!0})});return()=>cancelAnimationFrame(e)},[eg]);let{selectedInputModalities:eI,setInputModalities:eT,selectedOutputModalities:eP,setOutputModalities:eR,selectedAuthors:eB,setAuthors:eL,showFreeOnly:e$,setShowFreeOnly:eW,sort:eV,setSort:eU,groupBy:eq,setGroupBy:eH,displayMode:eG,setDisplayMode:eK,isPinnedPanelExpanded:eJ,setPinnedPanelExpanded:eZ,storeFiltersExpanded:eQ,setStoreFiltersExpanded:eY}=(0,_.I)({useTransientPrefs:ew,showSortAndView:ev}),[eX,e0]=(0,c.f)(ea,e=>e),e1=(0,a.f)(),[e2,e3]=(0,y.useState)(""),{filtersExpanded:e4,setFiltersExpanded:e5,allowOverflowVisible:e6}=(0,_.o)({externalFiltersExpanded:I,onFiltersExpandedChange:P,useTransientPrefs:ew,storeFiltersExpanded:eQ,setStoreFiltersExpanded:eY}),e7=function({selectedInputModalities:e,selectedOutputModalities:t,selectedAuthors:i,showFreeOnly:n,hideUnavailable:r,hideUnavailableByDefault:s}){return e.length+t.length+i.length+ +!!n+ +(r!==s)}({selectedInputModalities:eI,selectedOutputModalities:eP,selectedAuthors:eB,showFreeOnly:e$,hideUnavailable:eX,hideUnavailableByDefault:ea});(0,y.useEffect)(()=>{$?.(e7)},[e7,$]);let e8=function({hideUnavailable:e,selectedAuthors:t,selectedInputModalities:i,selectedOutputModalities:n,showFreeOnly:r,showGuardrailsWarning:s}){return i.length>0||n.length>0||t.length>0||r||e&&s}({hideUnavailable:eX,selectedAuthors:eB,selectedInputModalities:eI,selectedOutputModalities:eP,showFreeOnly:e$,showGuardrailsWarning:eo}),e9=(0,y.useMemo)(()=>eI.toSorted().join("\0"),[eI]),te=(0,y.useMemo)(()=>eP.toSorted().join("\0"),[eP]),tt=(0,y.useMemo)(()=>eB.toSorted().join("\0"),[eB]),ti=(0,y.useMemo)(()=>(0,x.a)(eC,e),[e,eC]),tn=(0,y.useMemo)(()=>new Set(e.flatMap(([,e])=>e.flatMap(e=>e.output_modalities))),[e]),tr=(0,y.useMemo)(()=>{let e=e2.trim().toLowerCase();return e?ti.filter(t=>t.label.toLowerCase().includes(e)):ti},[ti,e2]),ts=(0,y.useMemo)(()=>(function({getModelEligibilityStatus:e,groupEntries:t,hideUnavailable:n,selectedAuthors:r,selectedInputModalities:s,selectedOutputModalities:l,shouldFilterModels:o,showFreeOnly:a,showGuardrailsWarning:c}){return o?t.map(([t,o])=>[t,o.filter(t=>!(s.some(e=>!t.input_modalities.includes(e))||l.some(e=>!t.output_modalities.includes(e)))&&(!a||!!(0,A.f)(t))&&(!(r.length>0)||!!r.includes(t.author))&&(!n||!c||e((0,i.Q)(t))!==u.J.Ineligible))]).filter(([,e])=>e.length>0):t})({getModelEligibilityStatus:eD,groupEntries:e,hideUnavailable:eX,selectedAuthors:eB,selectedInputModalities:eI,selectedOutputModalities:eP,shouldFilterModels:e8,showFreeOnly:e$,showGuardrailsWarning:eo}),[e,e8,e9,te,tt,e$,eX,eo,eD]),tl=(0,y.useMemo)(()=>ep?(0,x.Z)(eC,{groupEntries:ts,groupBy:eq,sort:eV}):ts,[ts,eq,ep,eV,eC]),to=(0,E.a)(tl),ta=(0,E.b)(to),{query:tu,setQuery:tc}=(0,_.K)(D,N),td=(0,y.useDeferredValue)(tu),th=!!td.trim(),tf=(0,y.useMemo)(()=>th?ta.search(td):null,[th,ta,td]),tm=tf?.length??to.length;(0,y.useEffect)(()=>{R?.(tm)},[tm,R]);let tp=(0,y.useMemo)(()=>new Set(eA),[eA]),tg=(0,y.useMemo)(()=>{if(th)return[];let e=new Map(to.map(({model:e})=>[(0,i.i)(e),e]));return eA.flatMap(t=>{let i=e.get(t);return i?[i]:[]})},[to,eA,th]),tv="function"==typeof en?void 0:et,ty=void 0!==tv,{tabGroups:tx,activeTabGroup:tb,selectTab:tS}=(0,b.i)({flat:to,isSearching:th,pinnedModels:tg,quickPickGroups:tv}),tw=ty?B:tg,t_=(0,y.useRef)(null),[tk,tM]=(0,y.useState)(0);(0,y.useEffect)(()=>{let e=t_.current;if(!e)return void tM(0);tM(e.offsetHeight);let t=new ResizeObserver(()=>{tM(e.offsetHeight)});return t.observe(e),()=>t.disconnect()},[tw.length>0,eJ,th,!!en]);let tC=(0,y.useDeferredValue)(J),tj=(0,y.useDeferredValue)(Q),tA=(0,y.useDeferredValue)(X),tE=tC?.length??0;(0,y.useEffect)(()=>{L?.(tE)},[tE,L]);let tO=(0,y.useMemo)(()=>tb?(0,b.$)(tb):function({displayGroupEntries:e,flat:t,flatSearchResults:n,filtered:r,filteredPages:s,filteredProviders:l,docsSearch:o,quickPickGroups:a,isSearching:u}){let c=(0,x.$)({flat:t,filtered:r,groupEntries:e}),d=l&&l.length>0?[{type:"group",key:"g:providers",group:"Providers"},...l.map(e=>({type:"provider",key:`p:${e.slug}`,provider:e}))]:[],h=u&&s&&s.length>0?[{type:"group",key:"g:pages",group:"Navigation"},...s.map(e=>({type:"page",key:`page:${e.href}`,page:e}))]:[],f=u&&n&&c.length>0?[{type:"group",key:"g:models",group:"Models"},...c]:c;return u?[...h,...d,...f,...o?.status==="success"&&o.results.length>0?[{type:"group",key:"g:docs",group:"Documentation"},...o.results.map(e=>({type:"doc",key:`doc:${e.href}`,doc:e}))]:[]]:[...function(e,t){if(!e)return[];let n=new Set(t.map(({model:e})=>(0,i.i)(e)));return e.flatMap(({key:e,label:t,models:r})=>{let s=r.filter(e=>n.has((0,i.i)(e)));return 0===s.length?[]:[{type:"group",key:`g:${e}`,group:t},...s.map(n=>({type:"model",key:`${e}:${(0,i.i)(n)}`,group:t,model:n}))]})}(a,t),...f,...d]}({displayGroupEntries:tl,flat:to,flatSearchResults:ex,filtered:tf,filteredPages:tj,filteredProviders:tC,docsSearch:tA,quickPickGroups:ty?void 0:et,isSearching:th}),[tb,ty,to,tf,tl,tC,tj,tA,et,th,ex]),tF=(0,y.useRef)(null),tz=(0,y.useCallback)(e=>(0,j.f)({row:tO[e],isDialog:ep,onPeek:K,displayMode:eG}),[eG,tO,ep,K]),tD=(0,y.useMemo)(()=>tO.flatMap((e,t)=>"group"===e.type?[t]:[]),[tO]),tN=(0,y.useRef)(null),tI=(0,y.useRef)(null),tT=(0,y.useCallback)(e=>{let t=tD.toReversed().find(t=>e.startIndex>=t);tN.current=t??null;let i=(0,m.l)(e),n=tI.current,r=[...void 0===t?[]:[t],...null===n||n>=e.count?[]:[n]];return 0===r.length?i:[...new Set([...r,...i])].toSorted((e,t)=>e-t)},[tD]),tP=(0,p.s)({count:tO.length,getScrollElement:()=>tF.current,estimateSize:tz,overscan:8,rangeExtractor:tT,scrollMargin:tk});(0,y.useEffect)(()=>{tP.measure()},[eG,tP]),(0,_.q)({listRef:tF,query:tu,searchQuery:td});let tR=V?(0,i.i)(V):null;(0,y.useEffect)(()=>{let e=requestAnimationFrame(()=>{tF.current&&(tF.current.scrollTop=0)});return()=>cancelAnimationFrame(e)},[th,td,e8,W,tb?.key]),(0,y.useEffect)(()=>{if(!ep||!K)return;if(V)return void K(V);let e=tw[0];if(e)return void K(e);let t=tO.find(e=>"model"===e.type);t&&"model"===t.type?K(t.model):eO()},[eO,ep,K,tw,tO,V]);let tB=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.q,{rows:tO,virtualizer:tP,query:td,activeRowIndexRef:tI}),ep&&K&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.F,{className:"sr-only",children:es||eM("Search models")}),(0,t.jsx)(l.C,{className:"sr-only",children:el||eM("Find models by name or author")})]}),!ey&&(0,t.jsx)(C.f,{activeFilterCount:e7,autoFocusSearch:eg,collapsibleFilters:z,displayMode:eG,filtersExpanded:e4,groupBy:eq,hideFilters:eb,inputRef:ej,isDialog:ep,query:tu,setDisplayMode:eK,setFiltersExpanded:e5,setGroupBy:eH,setQuery:tc,setSort:eU,setSortPopoverOpen:e=>e1.setOpen("sort",e),setViewPopoverOpen:e=>e1.setOpen("view",e),showSortAndView:ev,sort:eV,sortPopoverOpen:e1.isOpen("sort"),viewPopoverOpen:e1.isOpen("view"),visibleModelCount:tb?.models.length??tm}),!eb&&(0,t.jsx)(w.f,{allowOverflowVisible:e6,authorPopoverOpen:e1.isOpen("author"),authorQuery:e2,availableOutputModalities:tn,collapsibleFilters:z,filteredAuthorOptions:tr,filtersExpanded:e4,hideUnavailable:eX,isDialog:ep,selectedAuthors:eB,selectedInputModalities:eI,selectedOutputModalities:eP,setAuthorPopoverOpen:e=>e1.setOpen("author",e),setAuthorQuery:e3,setAuthors:eL,setHideUnavailable:e0,setInputModalities:eT,setInputPopoverOpen:e=>e1.setOpen("input",e),setOutputModalities:eR,setOutputPopoverOpen:e=>e1.setOpen("output",e),setShowFreeOnly:eW,showFreeOnly:e$,showGuardrailsWarning:eo,inputPopoverOpen:e1.isOpen("input"),outputPopoverOpen:e1.isOpen("output"),toggleAuthor:e=>{eL(eB.includes(e)?eB.filter(t=>t!==e):[...eB,e])},toggleInputModality:e=>{eT(eI.includes(e)?eI.filter(t=>t!==e):[...eI,e])},toggleOutputModality:e=>{eR(eP.includes(e)?eP.filter(t=>t!==e):[...eP,e])}}),tx.length>0&&(0,t.jsx)(T,{groups:tx,value:tb?.key??b.e,onValueChange:tS}),(0,t.jsx)(k.f,{disableSelectForUnavailable:eu,disabledModelSlugs:q,displayMode:eG,getModelEligibilityStatus:eD,isDialog:ep,isPinnedPanelExpanded:eJ,isSearching:th,docsSearch:tA,onDocSelect:ee,listClassName:ei,listHeader:en,modelSuggestionsAsPills:e_,listId:em,onDone:H,onPinnedDone:G,onPeek:K,pinnedModels:tw,renderers:{renderModelRow:(e,i)=>(0,t.jsx)(M.c,{model:e,itemValue:i,displayMode:eG,disabledModelSlugs:q,disableSelectForUnavailable:eu,getModelEligibilityStatus:eD,getModelIneligibilityReasons:eN,isDialog:!!ep,onDone:H,onPeek:K,pinnedSlugSet:tp,selectedModelSlugs:U??[],selectedSlug:tR,showGuardrailsWarning:eo,toggleModelPin:eE,showModelCopyButton:ek,showModelHoverCard:er}),renderPageRow:(e,i)=>(0,t.jsxs)(s.J,{value:i,keywords:[e.name,...e.keywords],className:(0,n.f)(ep&&"h-10","group"),disabled:void 0!==e.disabledReason||!0===e.isPending,onSelect:()=>Y?.(e),children:[(0,t.jsx)(v.f,{className:"mr-2 size-4 shrink-0 text-muted-foreground"}),void 0!==e.parentName&&(0,t.jsxs)("span",{className:"mr-1 shrink-0 text-muted-foreground",children:[e.parentName," ›"]}),(0,t.jsx)("span",{className:"shrink-0",title:e.name,children:e.name}),void 0!==e.workspaceName&&(0,t.jsx)(r.Badge,{size:"sm",variant:"secondary",className:"ph-no-capture ml-2 min-w-0 max-w-24 sm:max-w-40","data-dd-privacy":"hidden",title:e.workspaceName,children:(0,t.jsx)("span",{className:"truncate",children:e.workspaceName})}),(0,t.jsx)("span",{className:"ml-auto min-w-0 truncate pl-2 text-xs text-muted-foreground",children:e.disabledReason??e.href})]}),renderProviderRow:(e,i)=>(0,t.jsxs)(s.J,{value:i,keywords:[e.displayName,e.slug],className:(0,n.f)(ep&&"h-10","group"),onSelect:()=>Z?.(e),children:[(0,t.jsx)(o.f,{frame:!0,providerName:e.name,providerIcon:e.icon,className:"mr-2 size-4 shrink-0"}),(0,t.jsx)("span",{className:"truncate",title:e.displayName,children:e.displayName})]})},rows:tO,selectedModelSlugs:U,selectedSlug:tR,setPinnedPanelExpanded:eZ,setSort:eU,showGuardrailsWarning:eo,sort:eV,toggleModelPin:eE,virtualizer:{activeStickyIndexRef:tN,listRef:tF,pinnedScrollMargin:tk,pinnedSectionRef:t_,rowVirtualizer:tP}})]});return eS?tB:(0,t.jsx)(s.s,{shouldFilter:!1,defaultValue:K?void 0:"__model-select-no-selection__",className:(0,n.f)(ep&&"relative min-h-0 rounded-none",ey&&"overflow-visible"),children:tB})}],35485)},657011,281143,733205,e=>{"use strict";var t=e.i(782143),i=e.i(339814),n=e.i(134611),r=e.i(932061),s=e.i(140691);e.i(707060);var l=e.i(387086),o=e.i(313939),a=e.i(766074);function u(e,t){return[t,...e.filter(e=>e!==t)].slice(0,5)}e.s(["i",0,u,"z",0,function(e,t){let i=new Map(t.flatMap(([,e])=>e.map(e=>[(0,n.i)(e),e])));return e.flatMap(e=>{let t=i.get(e);return t?[t]:[]})}],281143);let c={Newest:"newest",Name:"name",PriceAscending:"price_asc",PriceDescending:"price_desc",ContextAscending:"context_asc",ContextDescending:"context_desc"},d={Date:"date",Provider:"provider",None:"none"},h={Detailed:"detailed",Simple:"simple"},f={sort:c.Newest,groupBy:d.Date,displayMode:h.Simple,inputModalities:[],outputModalities:[],authors:[],showFreeOnly:!1,isPinnedPanelExpanded:!0,filtersExpanded:!1,recentModelSlugs:[]},m=(0,o.f)()((0,a.V)(e=>({...f,setSort:t=>e({sort:t}),setGroupBy:t=>e({groupBy:t}),setDisplayMode:t=>e({displayMode:t}),setInputModalities:t=>e({inputModalities:t}),setOutputModalities:t=>e({outputModalities:t}),setAuthors:t=>e({authors:t}),setShowFreeOnly:t=>e({showFreeOnly:t}),setPinnedPanelExpanded:t=>e({isPinnedPanelExpanded:t}),setFiltersExpanded:t=>e({filtersExpanded:t}),recordRecentModel:t=>e(e=>({recentModelSlugs:u(e.recentModelSlugs,t)})),clearFilters:()=>e({inputModalities:[],outputModalities:[],authors:[],showFreeOnly:!1,filtersExpanded:!1})}),{name:"openrouter:model-select-prefs",version:1,storage:(0,a.j)(()=>localStorage),partialize:e=>({sort:e.sort,groupBy:e.groupBy,displayMode:e.displayMode,isPinnedPanelExpanded:e.isPinnedPanelExpanded,recentModelSlugs:e.recentModelSlugs})}));e.s(["s",0,f,"E",0,h,"x",0,d,"$",0,c,"S",0,m],733205);var p=e.i(690387);let g=[{value:c.Newest,label:(0,l.b)("Newest first")},{value:c.Name,label:(0,l.b)("Name A-Z")},{value:c.ContextAscending,label:(0,l.b)("Context low-high")},{value:c.ContextDescending,label:(0,l.b)("Context high-low")},{value:c.PriceAscending,label:(0,l.b)("Price low-high")},{value:c.PriceDescending,label:(0,l.b)("Price high-low")}],v=[{value:d.Date,label:(0,l.b)("Date")},{value:d.Provider,label:(0,l.b)("Provider")},{value:d.None,label:(0,l.b)("None")}],y=[{value:h.Detailed,label:(0,l.b)("Detailed")},{value:h.Simple,label:(0,l.b)("Simple")}],x={"g:models":{href:"/models",aria:(0,l.b)("Browse all models")},"g:providers":{href:"/providers",aria:(0,l.b)("Browse all providers")}};function b(e){return e.author_display_name??e.author}function S(e){let t=e.endpoint?.pricing.prompt;return void 0===t?1/0:(0,s.I)(t).toNumber()}function w(e,t,n){switch(n){case c.Newest:return t.toSorted((e,t)=>new Date(t.created_at).getTime()-new Date(e.created_at).getTime());case c.Name:return t.toSorted((t,n)=>(0,i.o)(t.short_name,n.short_name,{locale:e}));case c.PriceAscending:return t.toSorted((e,t)=>S(e)-S(t));case c.PriceDescending:return t.toSorted((e,t)=>S(t)-S(e));case c.ContextAscending:return t.toSorted((e,t)=>e.context_length-t.context_length);case c.ContextDescending:return t.toSorted((e,t)=>t.context_length-e.context_length);default:return t}}function _(e){return e.flatMap(([,e])=>e)}e.s(["H",0,y,"k",0,v,"F",0,x,"h",0,g,"a",0,function(e,t){let n=new Map;for(let e of _(t))n.has(e.author)||n.set(e.author,b(e));return Array.from(n.entries()).map(([e,t])=>({key:e,label:t})).toSorted((t,n)=>(0,i.o)(t.label,n.label,{locale:e}))},"Z",0,function(e,{groupEntries:t,groupBy:i,sort:n}){switch(i){case d.Date:return t.map(([t,i])=>[t,w(e,i,n)]);case d.Provider:return function(e){let t=new Map;for(let i of e){let e=b(i),n=t.get(e);if(n){n.push(i);continue}t.set(e,[i])}return Array.from(t.entries()).toSorted(([e],[t])=>(0,r.f)(e,t))}(w(e,_(t),n));case d.None:return[["",w(e,_(t),n)]];default:return t}},"$",0,function({flat:e,filtered:t,groupEntries:i,excludeSlugs:r}){if(t&&t.length>0)return t.map(({item:e,score:t})=>({type:"model",key:`m:${(0,n.i)(e.model)}`,group:e.group,model:e.model,score:t}));if(t)return[];let s=i.map(([e])=>e),l=new Map;for(let{group:t,model:i}of e)r?.has((0,n.i)(i))||(l.has(t)||l.set(t,[]),l.get(t).push(i));let o=[];for(let e of s){let t=l.get(e);if(t&&0!==t.length)for(let i of(e&&o.push({type:"group",key:`g:${e}`,group:e}),t))o.push({type:"model",key:`m:${(0,n.i)(i)}`,group:e,model:i})}return o},"G",0,function(e,t){let i=t.endpoint?.display_pricing??[];if((0,p.h)(t.endpoint,i))return"Free";let n=(0,p.u)(e,t.endpoint,i);return n?.kind==="custom"?n.label:n?.kind==="standard-tokens"?`${n.inputPrice} / ${n.outputPrice}`:"—"},"u",0,function(e,i){return(0,t.f)(i,{locale:e,preset:"model-select-context"})??"—"},"K",0,function(e){return e===c.ContextAscending?c.ContextDescending:e===c.ContextDescending?c.Newest:c.ContextAscending},"i",0,function(e){return e===c.PriceAscending?c.PriceDescending:e===c.PriceDescending?c.Newest:c.PriceAscending},"j",0,function(e,t){return e.find(e=>e.value===t)?.label??t},"J",0,function({model:e,selectedSlug:t,selectedModelSlugs:i}){let r=(0,n.i)(e);return t===r||!!i&&(i.includes(r)||i.includes((0,n.Q)(e)))},"y",0,function({groupEntries:e,extraModels:t,groupName:i="Local"}){if(!t||0===t.length)return e;let r=new Set(t.map(n.i));return[[i,t],...e.map(([e,t])=>[e,t.filter(e=>!r.has((0,n.i)(e)))]).filter(([,e])=>e.length>0)]}],657011)},563041,118384,911146,537248,e=>{"use strict";var t=e.i(659350),i=e.i(136562),n=e.i(536397),r=e.i(592176);e.i(707060);var s=e.i(196991),l=e.i(657011),o=e.i(35300),a=e.i(733205),u=e.i(617705),c=e.i(663456),d=e.i(134611),h=e.i(261499),f=e.i(138257),m=e.i(797521),p=e.i(288265),g=e.i(153746),v=e.i(354896),y=e.i(16043),x=e.i(700050),b=e.i(193384),S=e.i(105312);function w(e){let s,o,u,h,f,m,p,g,v,y,w=(0,c.c)(41),{model:_,locale:k,displayMode:M,isPillLayout:C,showModelCopyButton:j,isDialog:A,isLastItem:E,onDone:O,onPeek:F,selectedModelSlugs:z,selectedSlug:D,showGuardrailsWarning:N,toggleModelPin:I,getModelEligibilityStatus:T,disabledModelSlugs:P,disableSelectForUnavailable:R}=e,B=void 0!==j&&j;w[0]!==_?(s=(0,d.i)(_),w[0]=_,w[1]=s):s=w[1];let L=s;w[2]!==_||w[3]!==z||w[4]!==D?(o=(0,l.J)({model:_,selectedSlug:D,selectedModelSlugs:z?[...z]:void 0}),w[2]=_,w[3]=z,w[4]=D,w[5]=o):o=w[5];let $=o;if(w[6]!==R||w[7]!==P||w[8]!==M||w[9]!==T||w[10]!==A||w[11]!==E||w[12]!==C||w[13]!==_||w[14]!==O||w[15]!==F||w[16]!==N){let{isDisabled:e,isDimmed:t}=function({model:e,showGuardrailsWarning:t,getModelEligibilityStatus:i,disabledModelSlugs:n,disableSelectForUnavailable:s}){let l=(t?i((0,d.Q)(e)):r.J.Unknown)===r.J.Ineligible,o=n?.includes((0,d.i)(e))??!1;return{isDisabled:s&&l||o,isDimmed:l||o}}({model:_,showGuardrailsWarning:N,getModelEligibilityStatus:T,disabledModelSlugs:P,disableSelectForUnavailable:R});f=e,({isDetailedDialog:h,hasPeek:u}=function({isPillLayout:e,isDialog:t,displayMode:i,onPeek:n}){return{isDetailedDialog:!e&&!!t&&i===a.E.Detailed,hasPeek:!!t&&!!n}}({isPillLayout:C,isDialog:A,displayMode:M,onPeek:F})),p=C?"":void 0,m=(0,i.f)(function({isPillLayout:e,isDetailedDialog:t,hasPeek:n,isLastItem:r}){return(0,i.f)("group flex items-center",e?(0,i.f)(S.Y,"relative h-9 gap-2 px-3 py-0"):(0,i.f)("rounded-none",t?"h-10 pr-4":"h-9",!r&&"border-b border-border/40",n?"pl-4":"pl-2"))}({isPillLayout:C,isDetailedDialog:h,hasPeek:u,isLastItem:E}),t&&"opacity-50"),g=function({model:e,isDisabled:t,hasPeek:i,onDone:n,onPeek:r}){return{handleSelect(){t||((0,x.Y)({model:(0,d.i)(e)}),n?.(e))},handleMouseEnter(){i&&r?.(e)}}}({model:_,isDisabled:f,hasPeek:u,onDone:O,onPeek:F}),w[6]=R,w[7]=P,w[8]=M,w[9]=T,w[10]=A,w[11]=E,w[12]=C,w[13]=_,w[14]=O,w[15]=F,w[16]=N,w[17]=u,w[18]=h,w[19]=f,w[20]=m,w[21]=p,w[22]=g}else u=w[17],h=w[18],f=w[19],m=w[20],p=w[21],g=w[22];let{handleSelect:W,handleMouseEnter:V}=g,U=`pinned:${L}`;return w[23]!==u||w[24]!==h||w[25]!==C||w[26]!==$||w[27]!==k||w[28]!==_||w[29]!==B||w[30]!==I?(v=(0,t.jsx)(b.f,{model:_,locale:k,isPillLayout:C,showModelCopyButton:B,isDetailedDialog:h,hasPeek:u,isSelected:$,toggleModelPin:I}),w[23]=u,w[24]=h,w[25]=C,w[26]=$,w[27]=k,w[28]=_,w[29]=B,w[30]=I,w[31]=v):v=w[31],w[32]!==V||w[33]!==W||w[34]!==f||w[35]!==m||w[36]!==_.searchKeywords||w[37]!==p||w[38]!==U||w[39]!==v?(y=(0,t.jsx)(n.J,{value:U,"data-search-chip":p,keywords:_.searchKeywords,disabled:f,onSelect:W,onMouseEnter:V,className:m,children:v}),w[32]=V,w[33]=W,w[34]=f,w[35]=m,w[36]=_.searchKeywords,w[37]=p,w[38]=U,w[39]=v,w[40]=y):y=w[40],y}function _(e){let r,l,o,u,x,b=(0,c.c)(44),{displayMode:S,isPillLayout:_,hideHeading:k,isDialog:M,models:C,onDone:j,onPeek:A,selectedModelSlugs:E,selectedSlug:O,showGuardrailsWarning:F,toggleModelPin:z,getModelEligibilityStatus:D,isPinnedPanelExpanded:N,setPinnedPanelExpanded:I,disabledModelSlugs:T,disableSelectForUnavailable:P}=e,R=void 0!==_&&_,B=void 0!==k&&k,L=(0,f.useLocale)(),$=(0,p.f)(),W=(0,m.f)(),V=(0,y.useId)();b[0]!==B||b[1]!==R||b[2]!==C?(r={models:C,isPillLayout:R,hideHeading:B},b[0]=B,b[1]=R,b[2]=C,b[3]=r):r=b[3];let{canExpandPreview:U,isShowingAllPinned:q,shouldUsePills:H,visibleModels:G,panelClassName:K,togglePreview:J}=function(e){let t,i,n,r=(0,c.c)(13),{models:s,isPillLayout:l,hideHeading:o}=e,[a,u]=(0,y.useState)(!1),d=l&&o,h=d&&s.length>6,f=h&&a,m=l&&!f;r[0]!==d||r[1]!==f||r[2]!==s?(t=d&&!f?s.slice(0,6):s,r[0]=d,r[1]=f,r[2]=s,r[3]=t):t=r[3];let p=m?"flex flex-wrap gap-2 px-3":"flex flex-col border-b border-border/60";return r[4]!==f?(i=()=>u(!f),r[4]=f,r[5]=i):i=r[5],r[6]!==h||r[7]!==f||r[8]!==m||r[9]!==t||r[10]!==p||r[11]!==i?(n={canExpandPreview:h,isShowingAllPinned:f,shouldUsePills:m,visibleModels:t,panelClassName:p,togglePreview:i},r[6]=h,r[7]=f,r[8]=m,r[9]=t,r[10]=p,r[11]=i,r[12]=n):n=r[12],n}(r);return 0===C.length?null:(b[4]!==W||b[5]!==B||b[6]!==M||b[7]!==N||b[8]!==C.length||b[9]!==A||b[10]!==V||b[11]!==I?(l=!B&&(0,t.jsxs)("button",{type:"button",onClick:()=>I(!N),"aria-expanded":N,"aria-controls":V,className:(0,i.f)("flex w-full items-center gap-1","border-b border-border py-1.5","text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",M&&A?"px-4":"px-2"),children:[(0,t.jsx)(v.f,{className:(0,i.f)("size-3 shrink-0 transition-transform",N?"":"-rotate-90")}),(0,t.jsx)(s.T,{children:(0,t.jsxs)("span",{children:["Pinned (",(0,t.jsx)(g.d,{children:W.number(C.length,{preset:"integer"})}),")"]})})]}),b[4]=W,b[5]=B,b[6]=M,b[7]=N,b[8]=C.length,b[9]=A,b[10]=V,b[11]=I,b[12]=l):l=b[12],b[13]!==P||b[14]!==T||b[15]!==S||b[16]!==D||b[17]!==B||b[18]!==M||b[19]!==N||b[20]!==q||b[21]!==L||b[22]!==j||b[23]!==A||b[24]!==K||b[25]!==V||b[26]!==E||b[27]!==O||b[28]!==H||b[29]!==F||b[30]!==z||b[31]!==G?(o=(B||N)&&(0,t.jsx)("div",{id:V,className:K,children:G.map((e,i)=>(0,t.jsx)(w,{model:e,locale:L,displayMode:q?a.E.Simple:S,isPillLayout:H,showModelCopyButton:q,isDialog:M,isLastItem:i===G.length-1,onDone:j,onPeek:A,selectedModelSlugs:E,selectedSlug:O,showGuardrailsWarning:F,toggleModelPin:z,getModelEligibilityStatus:D,disabledModelSlugs:T,disableSelectForUnavailable:P},`pinned:${(0,d.i)(e)}`))}),b[13]=P,b[14]=T,b[15]=S,b[16]=D,b[17]=B,b[18]=M,b[19]=N,b[20]=q,b[21]=L,b[22]=j,b[23]=A,b[24]=K,b[25]=V,b[26]=E,b[27]=O,b[28]=H,b[29]=F,b[30]=z,b[31]=G,b[32]=o):o=b[32],b[33]!==U||b[34]!==$||b[35]!==q||b[36]!==C.length||b[37]!==V||b[38]!==J?(u=U&&(0,t.jsxs)(n.J,{value:q?"collapse-pinned":"expand-pinned","aria-controls":V,"aria-expanded":q,onSelect:J,layout:"slots",className:"mx-3 mt-2 font-normal text-muted-foreground",children:[(0,t.jsx)(v.f,{"aria-hidden":!0,className:(0,i.f)("size-3.5 shrink-0",h.a,q&&"-scale-y-100")}),q?$("Show fewer pinned"):$("View all pinned ({count})",{count:C.length})]},q?"collapse-pinned":"expand-pinned"),b[33]=U,b[34]=$,b[35]=q,b[36]=C.length,b[37]=V,b[38]=J,b[39]=u):u=b[39],b[40]!==l||b[41]!==o||b[42]!==u?(x=(0,t.jsxs)("div",{"data-pinned-models":!0,className:"bg-popover",children:[l,o,u]}),b[40]=l,b[41]=o,b[42]=u,b[43]=x):x=b[43],x)}var k=e.i(139697),M=e.i(387086),C=e.i(919035);let j={loading:(0,M.b)("Loading…"),noResults:(0,M.b)("No results found"),noDocs:(0,M.b)("No docs found"),unavailable:(0,M.b)("Docs search unavailable")};function A(e){let i,n,r,l,o,a=(0,c.c)(13),{state:u,hasResults:d}=e,h=(0,p.f)(),f=(0,C.f)();if(a[0]!==h||a[1]!==d||a[2]!==f||a[3]!==u){let e="loading"===u.status?j.loading:"error"===u.status?j.unavailable:d?"success"===u.status&&0===u.results.length?j.noDocs:null:j.noResults;i="status",n="polite",r="true",l=e&&(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-4 text-sm text-muted-foreground",children:[(0,t.jsx)("p",{children:f(e)}),"error"===u.status&&(0,t.jsx)(k.Button,{variant:"ghost",size:"sm",disabled:u.isRetrying,"aria-label":h("Retry docs search"),onClick:u.retry,onKeyDown:E,children:u.isRetrying?(0,t.jsx)(s.T,{children:"Retrying…"}):(0,t.jsx)(s.T,{children:"Retry"})})]}),a[0]=h,a[1]=d,a[2]=f,a[3]=u,a[4]=i,a[5]=n,a[6]=r,a[7]=l}else i=a[4],n=a[5],r=a[6],l=a[7];return a[8]!==i||a[9]!==n||a[10]!==r||a[11]!==l?(o=(0,t.jsx)("div",{role:i,"aria-live":n,"aria-atomic":r,children:l}),a[8]=i,a[9]=n,a[10]=r,a[11]=l,a[12]=o):o=a[12],o}function E(e){("Enter"===e.key||" "===e.key)&&e.stopPropagation()}let O={[a.$.ContextAscending]:"asc",[a.$.ContextDescending]:"desc"},F={[a.$.PriceAscending]:"asc",[a.$.PriceDescending]:"desc"};e.s(["f",0,function({disableSelectForUnavailable:e,disabledModelSlugs:r,displayMode:c,getModelEligibilityStatus:d,isDialog:h,isPinnedPanelExpanded:f,isSearching:m,docsSearch:p,onDocSelect:g,listClassName:v,listHeader:y,modelSuggestionsAsPills:x,listId:b,onDone:S,onPinnedDone:w,onPeek:k,pinnedModels:M,renderers:C,rows:j,selectedModelSlugs:E,selectedSlug:z,setPinnedPanelExpanded:D,setSort:N,showGuardrailsWarning:I,sort:T,toggleModelPin:P,virtualizer:R}){let B=(0,t.jsx)(_,{isPillLayout:x,hideHeading:"function"==typeof y,displayMode:c,isDialog:h,models:M,onDone:w??S,onPeek:k,selectedModelSlugs:E,selectedSlug:z,showGuardrailsWarning:I,toggleModelPin:P,getModelEligibilityStatus:d,isPinnedPanelExpanded:f,setPinnedPanelExpanded:D,disabledModelSlugs:r,disableSelectForUnavailable:e});return(0,t.jsxs)(t.Fragment,{children:[h&&k&&c===a.E.Detailed&&j.length>0&&(0,t.jsxs)("div",{className:(0,i.f)("grid grid-cols-[minmax(0,1fr)_4.5rem_7.5rem] items-center gap-2","border-b border-border px-4 py-1.5","text-xs font-semibold text-foreground/70"),children:[(0,t.jsx)(s.T,{children:(0,t.jsx)("span",{children:"Model"})}),(0,t.jsx)(u.f,{direction:O[T]??!1,label:(0,t.jsx)(s.T,{children:"Context"}),onClick:()=>N((0,l.K)(T))}),(0,t.jsx)(u.f,{className:"whitespace-nowrap",direction:F[T]??!1,label:(0,t.jsx)(s.T,{children:"Price (In / Out)"}),onClick:()=>N((0,l.i)(T))})]}),0!==j.length||0!==M.length||y||p?(0,t.jsxs)(n.X,{id:b,ref:R.listRef,className:(0,i.f)("relative -mt-px w-full overflow-auto md:mt-0",v),children:[(0,t.jsx)("div",{ref:R.pinnedSectionRef,children:"function"==typeof y?y(B,M.length):(0,t.jsxs)(t.Fragment,{children:[y,B]})}),(0,t.jsx)(o.y,{isDialog:h,onPeek:k,renderers:C,onDocSelect:g,rows:j,virtualizer:R}),p&&m&&(0,t.jsx)(A,{state:p,hasResults:j.length>0})]},`${m?"search":"browse"}-${c}`):(0,t.jsx)("div",{className:(0,i.f)(h&&"pointer-events-none absolute inset-0 flex items-center justify-center"),children:(0,t.jsx)(s.T,{children:(0,t.jsx)(n.e,{children:"No models found"})})})]})}],563041);var z=e.i(782143),D=e.i(624112),N=e.i(751155),I=e.i(301206),T=e.i(914359),P=e.i(359980),R=e.i(149423),B=e.i(914544),L=e.i(773151),$=e.i(612927),W=e.i(606320);function V(e){return!e}function U(e){return!e}e.s(["f",0,function(e){let r,o,a,u,d,h,m,v,y,x,b,S,w,_,M,j,A,E,O=(0,c.c)(84),{activeFilterCount:F,autoFocusSearch:q,collapsibleFilters:H,displayMode:G,filtersExpanded:K,groupBy:J,hideFilters:Z,inputRef:Q,isDialog:Y,query:X,setDisplayMode:ee,setFiltersExpanded:et,setGroupBy:ei,setQuery:en,setSort:er,setSortPopoverOpen:es,setViewPopoverOpen:el,showSortAndView:eo,sort:ea,sortPopoverOpen:eu,viewPopoverOpen:ec,visibleModelCount:ed}=e,eh=(0,f.useLocale)(),ef=(0,p.f)(),em=(0,C.f)();O[0]!==eh||O[1]!==ed?(r=(0,z.f)(ed,{locale:eh,preset:"integer"})??"—",O[0]=eh,O[1]=ed,O[2]=r):r=O[2];let ep=r;O[3]!==ef||O[4]!==em||O[5]!==ea?(o=ef("Sort: {label}",{label:em((0,l.j)(l.h,ea))}),O[3]=ef,O[4]=em,O[5]=ea,O[6]=o):o=O[6];let eg=o;O[7]!==K||O[8]!==ef?(a=ef((0,T.f)(K?"Hide filters":"Show filters")),O[7]=K,O[8]=ef,O[9]=a):a=O[9];let ev=a;O[10]!==K||O[11]!==ef?(u=ef((0,T.f)(K?"Hide filters":"Filters")),O[10]=K,O[11]=ef,O[12]=u):u=O[12];let ey=u,ex=Y&&"flex items-center gap-1.5 border-b border-border/40 pl-2 pr-3 py-2";O[13]!==ex?(d=(0,i.f)(ex),O[13]=ex,O[14]=d):d=O[14],O[15]!==q?(h=q&&!(0,I.f)(),O[15]=q,O[16]=h):h=O[16],O[17]!==ef?(m=ef("Search models"),O[17]=ef,O[18]=m):m=O[18];let eb=!Y&&H&&"text-xs h-8";O[19]!==eb?(v=(0,i.f)("text-sm",eb),O[19]=eb,O[20]=v):v=O[20];let eS=Y&&"min-w-0 flex-1 border-b-0 rounded-md border border-border/60 px-3";return O[21]!==eS?(y=(0,i.f)(eS),O[21]=eS,O[22]=y):y=O[22],O[23]!==ep?(x=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.d,{children:ep})," model"]}),b=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.d,{children:ep})," models"]}),O[23]=ep,O[24]=x,O[25]=b):(x=O[24],b=O[25]),O[26]!==x||O[27]!==b||O[28]!==ed?(S=(0,t.jsx)(s.T,{children:(0,t.jsx)("span",{className:"whitespace-nowrap text-xs tabular-nums text-muted-foreground",children:(0,t.jsx)(P.f,{n:ed,one:x,other:b})})}),O[26]=x,O[27]=b,O[28]=ed,O[29]=S):S=O[29],O[30]!==ef||O[31]!==Q||O[32]!==X.length||O[33]!==en?(w=X.length>0&&(0,t.jsx)(k.Button,{shape:"pill",variant:"ghost",size:"icon-3xs",glyph:"sm","aria-label":ef("Clear search"),onClick:()=>{en(""),Q.current?.focus()},className:"shrink-0 text-muted-foreground/70",children:(0,t.jsx)($.X,{className:"size-3.5"})}),O[30]=ef,O[31]=Q,O[32]=X.length,O[33]=en,O[34]=w):w=O[34],O[35]!==F||O[36]!==H||O[37]!==K||O[38]!==ev||O[39]!==ey||O[40]!==Z||O[41]!==Y||O[42]!==et?(_=!Y&&H&&!Z&&(0,t.jsxs)(k.Button,{variant:"ghost",tone:"subdued",size:"icon-2xs",glyph:"sm","aria-label":ev,"aria-expanded":K,"aria-controls":"model-select-filter-row",title:ey,onClick:()=>et(U),className:(0,i.f)("relative shrink-0",K&&"bg-muted text-foreground"),children:[(0,t.jsx)(R.f,{className:"size-3.5"}),F>0&&(0,t.jsx)("span",{"aria-hidden":!0,className:(0,i.f)("absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center","rounded-full border border-background bg-foreground px-1","text-2xs font-bold leading-none text-background"),children:F})]}),O[35]=F,O[36]=H,O[37]=K,O[38]=ev,O[39]=ey,O[40]=Z,O[41]=Y,O[42]=et,O[43]=_):_=O[43],O[44]!==S||O[45]!==w||O[46]!==_?(M=(0,t.jsxs)("div",{className:"ml-2 flex shrink-0 items-center gap-2",children:[S,w,_]}),O[44]=S,O[45]=w,O[46]=_,O[47]=M):M=O[47],O[48]!==Q||O[49]!==X||O[50]!==en||O[51]!==v||O[52]!==y||O[53]!==M||O[54]!==h||O[55]!==m?(j=(0,t.jsx)(n.H,{ref:Q,autoFocus:h,value:X,onValueChange:en,placeholder:m,size:"sm",className:v,wrapperClassName:y,rightSlot:M}),O[48]=Q,O[49]=X,O[50]=en,O[51]=v,O[52]=y,O[53]=M,O[54]=h,O[55]=m,O[56]=j):j=O[56],O[57]!==F||O[58]!==H||O[59]!==G||O[60]!==K||O[61]!==ev||O[62]!==ey||O[63]!==J||O[64]!==ef||O[65]!==Z||O[66]!==Y||O[67]!==em||O[68]!==ee||O[69]!==et||O[70]!==ei||O[71]!==er||O[72]!==es||O[73]!==el||O[74]!==eo||O[75]!==ea||O[76]!==eg||O[77]!==eu||O[78]!==ec?(A=Y&&(0,t.jsxs)(N.TooltipProvider,{children:[eo&&(0,t.jsx)(N.Tooltip,{content:ef("View"),children:(0,t.jsx)("span",{className:"inline-flex",children:(0,t.jsxs)(D.V,{open:ec,onOpenChange:el,children:[(0,t.jsx)(D.J,{render:(0,t.jsx)(k.Button,{variant:"ghost",tone:"subdued",size:"icon-xs","aria-label":ef("View"),children:(0,t.jsx)(B.f,{className:"size-3.5"})})}),(0,t.jsxs)(D.T,{className:"w-48 overflow-hidden p-0",align:"end",children:[(0,t.jsx)(s.T,{children:(0,t.jsx)("div",{className:"border-b border-border bg-muted/50 px-3 py-1.5 text-xs font-semibold text-foreground/70",children:"Display"})}),(0,t.jsx)("div",{className:"p-1",children:l.H.map(e=>(0,t.jsx)(W.B,{isSelected:G===e.value,onClick:()=>ee(e.value),children:em(e.label)},e.value))}),(0,t.jsx)(s.T,{children:(0,t.jsx)("div",{className:"border-y border-border bg-muted/50 px-3 py-1.5 text-xs font-semibold text-foreground/70",children:"Group by"})}),(0,t.jsx)("div",{className:"p-1",children:l.k.map(e=>(0,t.jsx)(W.B,{isSelected:J===e.value,onClick:()=>ei(e.value),children:em(e.label)},e.value))})]})]})})}),eo&&(0,t.jsx)(N.Tooltip,{content:eg,children:(0,t.jsx)("span",{className:"inline-flex",children:(0,t.jsxs)(D.V,{open:eu,onOpenChange:es,children:[(0,t.jsx)(D.J,{render:(0,t.jsx)(k.Button,{variant:"ghost",tone:"subdued",size:"icon-xs","aria-label":eg,children:(0,t.jsx)(L.f,{className:"size-3.5"})})}),(0,t.jsx)(D.T,{className:"w-48 p-2",align:"end",children:l.h.map(e=>(0,t.jsx)(W.B,{isSelected:ea===e.value,onClick:()=>er(e.value),children:em(e.label)},e.value))})]})})}),H&&!Z&&(0,t.jsx)(N.Tooltip,{content:ey,positionerClassName:"z-popover-tooltip",children:(0,t.jsx)("span",{className:"inline-flex",children:(0,t.jsxs)(k.Button,{variant:"ghost",tone:"subdued",size:"icon-xs",className:(0,i.f)("relative",K&&"text-foreground"),"aria-label":ev,"aria-expanded":K,"aria-controls":"model-select-filter-row",onClick:()=>et(V),children:[(0,t.jsx)(R.f,{className:"size-3.5"}),F>0&&(0,t.jsx)("span",{"aria-hidden":!0,className:(0,i.f)("absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center","rounded-full border border-background bg-foreground px-1","text-2xs font-bold leading-none text-background"),children:F})]})})})]}),O[57]=F,O[58]=H,O[59]=G,O[60]=K,O[61]=ev,O[62]=ey,O[63]=J,O[64]=ef,O[65]=Z,O[66]=Y,O[67]=em,O[68]=ee,O[69]=et,O[70]=ei,O[71]=er,O[72]=es,O[73]=el,O[74]=eo,O[75]=ea,O[76]=eg,O[77]=eu,O[78]=ec,O[79]=A):A=O[79],O[80]!==j||O[81]!==A||O[82]!==d?(E=(0,t.jsxs)("div",{className:d,children:[j,A]}),O[80]=j,O[81]=A,O[82]=d,O[83]=E):E=O[83],E}],118384),e.s(["f",0,function({row:e,isDialog:t,onPeek:i,displayMode:n}){return e?.type==="group"?32:e?.type==="doc"?56:t&&i?n===a.E.Detailed?40:36:40}],911146);var q=e.i(393182);e.s(["f",0,function(e){return e.permaslug===q.f.Free||e.endpoint?.is_free===!0}],537248)},829837,e=>{"use strict";var t=e.i(663456),i=e.i(134611);e.i(707060);var n=e.i(288265),r=e.i(16043),s=e.i(32462),l=e.i(657011),o=e.i(637990),a=e.i(930140);let u={1:.5,2:.375,3:.25,4:0};function c(e){let t=e.trim().toLowerCase().split(/[^\w.]+/).filter(Boolean),i=t.flatMap(e=>{if(/^\d+\.\d+$/.test(e))return[e];let t=e.match(/^([a-z]+)(\d+(?:\.\d+|[a-z]+))$/);return t?[e,t[1],t[2]]:[e]});return t.reduce((e,i,n)=>{let r=t[n+1];return r&&/^[a-z]+$/.test(i)&&/^\d+(?:\.\d+|[a-z]+)?$/.test(r)&&e.push(`${i}${r}`),e},i)}function d(e){if(/^\d+\.\d+$/.test(e))return[{tokens:[e],allowFuzzy:!0}];let t=e.match(/^([a-z]+)(\d+(?:\.\d+|[a-z]+)?)$/);return t?[{tokens:[e],allowFuzzy:!1},{tokens:[t[1],t[2]],allowFuzzy:!0}]:[{tokens:[e],allowFuzzy:!0}]}function h(e){return e.reduce((e,t)=>t0}function v(e){return e.recentModelSlugs}function y(e){let[t,n]=e;return n.map(e=>({group:t,identifier:(0,i.Q)(e),model:{...e,searchKeywords:e.searchKeywords??(0,s.f)(e.name)}}))}e.s(["Y",0,function(e){let i,n,r=(0,t.c)(9),{groupEntries:s,extraModels:o,extraModelsGroupName:a,filter:u}=e;r[0]!==o||r[1]!==a||r[2]!==s?(i=(0,l.y)({groupEntries:s,extraModels:o,groupName:a}),r[0]=o,r[1]=a,r[2]=s,r[3]=i):i=r[3];let c=i;e:{let e;if(!u){n=c;break e}if(r[4]!==u||r[5]!==c){let t;r[7]!==u?(t=e=>{let[t,i]=e;return[t,i.filter(u)]},r[7]=u,r[8]=t):t=r[8],e=c.map(t).filter(g),r[4]=u,r[5]=c,r[6]=e}else e=r[6];n=e}return n},"a",0,function(e){let i,n=(0,t.c)(2);return n[0]!==e?(i=e.flatMap(y),n[0]=e,n[1]=i):i=n[1],i},"b",0,function(e){let i,n=(0,t.c)(2);if(n[0]!==e){let t,r,s;t=e.map((e,t)=>{var i;let n;return{index:t,item:e,tokens:Array.from(new Set([...n=c((i=e).model.name),...[...i.model.searchKeywords.flatMap(c),...c(i.identifier)].filter(e=>!/^\d$/.test(e)||n.includes(e)),...c(i.model.author)].map(e=>e.toLowerCase())))}}),r=new Map(e.map((e,t)=>[e,t])),s=new o.f(e,{keys:[{name:"model.name",weight:.7},{name:"identifier",weight:.2},{name:"model.author",weight:.08},{name:"model.searchKeywords",weight:.02}],threshold:.55,distance:100,ignoreLocation:!0,minMatchCharLength:1,findAllMatches:!0,ignoreFieldNorm:!0,useExtendedSearch:!0,includeScore:!0,shouldSort:!1}),i={search(e){let i=e.trim().toLowerCase().split(/[^\w.]+/).filter(Boolean).map(d);if(0===i.length)return[];let n=new Set;for(let{item:e}of s.search(Array.from(new Set(i.flatMap(e=>e.flatMap(e=>e.tokens)))).join(" | "))){let t=r.get(e);void 0!==t&&n.add(t)}return t.filter(e=>n.has(e.index)).flatMap(e=>{let t=i.flatMap(t=>{var i,n;let r=(i=t,n=e.tokens,i.flatMap((e,t)=>{let i=e.tokens.map(t=>(function({queryToken:e,modelTokens:t,allowFuzzy:i}){let n=t.flatMap(t=>{let n=function({queryToken:e,modelToken:t,allowFuzzy:i}){var n;if(e===t||/^\d+$/.test(e)&&t.startsWith(`${e}.`))return 4;if(t.startsWith(e))return 3;if(e.length>=3&&t.includes(e))return 2;if(!i)return null;let r=(n=e.length)<=4?0:n<=7?1:2;return(0,a.f)({left:e,right:t,limit:r})<=r?1:null}({queryToken:e,modelToken:t,allowFuzzy:i});return null===n?[]:[n]});return n.length>0?n.reduce((e,t)=>t>e?t:e,1):null})({queryToken:t,modelTokens:n,allowFuzzy:e.allowFuzzy}));return i.every(e=>null!==e)?[{matchTier:h(i),formIndex:t}]:[]}).toSorted((e,t)=>t.matchTier-e.matchTier||e.formIndex-t.formIndex)[0]??null);return null===r?[]:[r]});if(t.length!==i.length)return[];let n=h(t.map(({matchTier:e})=>e));return[{index:e.index,item:e.item,matchTier:n,formPriority:t.reduce((e,{formIndex:t})=>e+t,0)}]}).toSorted((e,t)=>t.matchTier-e.matchTier||e.formPriority-t.formPriority||f(t.item.model.created_at)-f(e.item.model.created_at)||e.index-t.index).map(({item:e,matchTier:t})=>({item:e,score:u[t]}))}},n[0]=e,n[1]=i}else i=n[1];return i},"Q",0,function(e){let i,n,s=(0,t.c)(3),[l,o]=(0,r.useState)(null);return s[0]!==e?(i=()=>{let t=e.current;if(!t)return;let i=new ResizeObserver(e=>{let t=e[0];t&&o(t.contentRect.width)});return i.observe(t),()=>i.disconnect()},n=[e],s[0]=e,s[1]=i,s[2]=n):(i=s[1],n=s[2]),(0,r.useEffect)(i,n),l},"B",0,function(e){let i,r,s,l=(0,t.c)(8),o=(0,n.f)(),a=(0,m.S)(v);return l[0]!==o?(i=o("Recent"),l[0]=o,l[1]=i):i=l[1],l[2]!==e||l[3]!==a?(r=(0,p.z)(a,e),l[2]=e,l[3]=a,l[4]=r):r=l[4],l[5]!==i||l[6]!==r?(s=[{key:"recent",label:i,models:r}],l[5]=i,l[6]=r,l[7]=s):s=l[7],s}],829837)},928166,e=>{"use strict";let t=(0,e.i(313939).f)(e=>({hoveredModel:null,setHoveredModel:t=>e({hoveredModel:t}),clearHoveredModel:()=>e({hoveredModel:null})}));e.s(["f",0,t])},436533,25683,437042,606320,716184,576670,35300,617705,193384,e=>{"use strict";let t={Panel:"panel",Dialog:"dialog",Popover:"popover",SideDrawer:"side-drawer",CommandPalette:"command-palette"};e.s(["f",0,t],436533);var i=e.i(663456),n=e.i(134611);e.i(707060);var r=e.i(288265),s=e.i(16043);e.s(["e",0,"all","$",0,function(e){return e.models.map(t=>({type:"model",key:`${e.key}:${(0,n.i)(t)}`,group:e.label,model:t}))},"i",0,function(e){let t,l,o,a=(0,i.c)(14),{flat:u,isSearching:c,pinnedModels:d,quickPickGroups:h}=e,f=(0,r.f)(),[m,p]=(0,s.useState)("all");a[0]!==u||a[1]!==f||a[2]!==c||a[3]!==d||a[4]!==h?(t=h&&!c?function({flat:e,pinnedLabel:t,pinnedModels:i,quickPickGroups:r}){let s=new Set(e.map(({model:e})=>(0,n.i)(e)));return[{key:"pinned",label:t,models:i},...r].flatMap(e=>{let t=e.models.filter(e=>s.has((0,n.i)(e)));return t.length>0?[{...e,models:t}]:[]})}({flat:u,pinnedLabel:f("Pinned"),pinnedModels:d,quickPickGroups:h}):[],a[0]=u,a[1]=f,a[2]=c,a[3]=d,a[4]=h,a[5]=t):t=a[5];let g=t;if(a[6]!==m||a[7]!==g){let e;a[9]!==m?(e=e=>e.key===m,a[9]=m,a[10]=e):e=a[10],l=g.find(e),a[6]=m,a[7]=g,a[8]=l}else l=a[8];let v=l;return c||"all"===m||v||p("all"),a[11]!==v||a[12]!==g?(o={tabGroups:g,activeTabGroup:v,selectTab:p},a[11]=v,a[12]=g,a[13]=o):o=a[13],o}],25683);let l={isDialog:!1,autoFocusSearch:!0,showSortAndView:!0,hideSearch:!1,flatSearchResults:!1,hideFilters:!1,headlessCommand:!1,useTransientPrefs:!1,modelSuggestionsAsPills:!1,showModelCopyButton:!1},o={[t.Panel]:l,[t.Dialog]:{...l,isDialog:!0},[t.Popover]:{...l,isDialog:!0,showSortAndView:!1},[t.SideDrawer]:{...l,isDialog:!0,autoFocusSearch:!1,showSortAndView:!1},[t.CommandPalette]:{...l,isDialog:!0,showSortAndView:!1,hideSearch:!0,flatSearchResults:!0,hideFilters:!0,headlessCommand:!0,useTransientPrefs:!0,modelSuggestionsAsPills:!0,showModelCopyButton:!0}};e.s(["f",0,function(e){return o[e]}],437042);var a=e.i(659350);let u=s.forwardRef(function({title:e,titleId:t,...i},n){return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},i),e?s.createElement("title",{id:t},e):null,s.createElement("path",{fillRule:"evenodd",d:"M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"}))});var c=e.i(136562),d=e.i(139697),h=e.i(181870),f=e.i(624112),m=e.i(954217),p=e.i(751155),g=e.i(808125),v=e.i(667417),y=e.i(387086),x=e.i(196991),b=e.i(919035),S=e.i(354896),w=e.i(657011),_=e.i(612927);function k(e){let t,n,r,s,l,o,u,h=(0,i.c)(14);h[0]!==e?({isActive:s,dense:r,children:t,className:n,...l}=e,h[0]=e,h[1]=t,h[2]=n,h[3]=r,h[4]=s,h[5]=l):(t=h[1],n=h[2],r=h[3],s=h[4],l=h[5]);let f=s?"default":"outline",m=r&&"gap-0 px-1 min-[480px]:gap-1 min-[480px]:px-2";return h[6]!==n||h[7]!==m?(o=(0,c.f)("gap-1 px-2",m,n),h[6]=n,h[7]=m,h[8]=o):o=h[8],h[9]!==t||h[10]!==l||h[11]!==f||h[12]!==o?(u=(0,a.jsx)(d.Button,{variant:f,size:"sm",className:o,...l,children:t}),h[9]=t,h[10]=l,h[11]=f,h[12]=o,h[13]=u):u=h[13],u}function M(e){let t,n,r,s,l,o,u=(0,i.c)(11),{onClick:h,label:f,count:m}=e;return u[0]!==h?(t=e=>{e.stopPropagation(),h()},u[0]=h,u[1]=t):t=u[1],u[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,c.f)("absolute -right-2 -top-2 z-10 h-4 gap-1 px-1.5 [&_svg]:size-2.5","bg-foreground text-background hover:bg-foreground hover:text-background"),r=(0,a.jsx)("span",{"aria-hidden":!0,className:"absolute left-1/2 top-1/2 size-6 -translate-x-1/2 -translate-y-1/2"}),u[2]=n,u[3]=r):(n=u[2],r=u[3]),u[4]!==m?(s=(0,a.jsx)("span",{className:"text-overline font-semibold leading-none tabular-nums",children:m}),u[4]=m,u[5]=s):s=u[5],u[6]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(_.X,{className:"size-2.5"}),u[6]=l):l=u[6],u[7]!==f||u[8]!==t||u[9]!==s?(o=(0,a.jsxs)(d.Button,{shape:"pill",variant:"ghost",size:"sm",touchTarget:"none",onClick:t,"aria-label":f,className:n,children:[r,s,l]}),u[7]=f,u[8]=t,u[9]=s,u[10]=o):o=u[10],o}function C(e){let t,n,r,s,l=(0,i.c)(11),{isSelected:o,children:h,onClick:f}=e,m=o?"strong":"subdued";l[0]!==h?(t=(0,a.jsx)("span",{className:"truncate",children:h}),l[0]=h,l[1]=t):t=l[1];let p=o?"opacity-100 text-foreground":"opacity-0";return l[2]!==p?(n=(0,c.f)("size-3.5 shrink-0",p),l[2]=p,l[3]=n):n=l[3],l[4]!==n?(r=(0,a.jsx)(u,{className:n}),l[4]=n,l[5]=r):r=l[5],l[6]!==f||l[7]!==m||l[8]!==t||l[9]!==r?(s=(0,a.jsxs)(d.Button,{variant:"ghost",size:"sm",touchTarget:"none",density:"compact",weight:"regular",tone:m,className:"w-full justify-between",onClick:f,children:[t,r]}),l[6]=f,l[7]=m,l[8]=t,l[9]=r,l[10]=s):s=l[10],s}e.s(["O",0,M,"B",0,C,"I",0,k],606320);let j=(0,y.b)("No models here");e.s(["f",0,function(e){var t;let n,s,l,o,y,w,_,A,E,O,F,z,D,N,I,T,P,R,B,L,$,W,V,U,q,H=(0,i.c)(88),{allowOverflowVisible:G,authorPopoverOpen:K,authorQuery:J,availableOutputModalities:Z,collapsibleFilters:Q,filteredAuthorOptions:Y,filtersExpanded:X,hideUnavailable:ee,isDialog:et,selectedAuthors:ei,selectedInputModalities:en,selectedOutputModalities:er,setAuthorPopoverOpen:es,setAuthorQuery:el,setAuthors:eo,setHideUnavailable:ea,setInputModalities:eu,setInputPopoverOpen:ec,setOutputModalities:ed,setOutputPopoverOpen:eh,setShowFreeOnly:ef,showFreeOnly:em,showGuardrailsWarning:ep,inputPopoverOpen:eg,outputPopoverOpen:ev,toggleAuthor:ey,toggleInputModality:ex,toggleOutputModality:eb}=e,eS=(0,r.f)(),ew=(0,b.f)(),e_=!Q||X;H[0]!==e_?(t=e_,n=(0,c.f)("grid transition-[grid-template-rows] ease-smooth-out motion-reduce:transition-none",t?"grid-rows-[1fr] duration-fast":"grid-rows-[0fr] duration-quick"),H[0]=e_,H[1]=n):n=H[1],H[2]!==G||H[3]!==Q||H[4]!==et||H[5]!==e_?(s=function({allowOverflowVisible:e,collapsibleFilters:t,isDialog:i,isOpen:n}){return(0,c.f)("relative z-20 flex flex-wrap items-center gap-1.5 border-b bg-popover px-2 py-1.5","transition-[padding,opacity] ease-smooth-out motion-reduce:transition-opacity",n?"duration-fast motion-reduce:duration-quick":"duration-quick",i&&"items-center gap-1 pl-2 pr-2 py-1.5",i&&!t&&"flex-nowrap",!i&&t&&"flex-nowrap gap-1 px-1.5 [&_button]:px-1.5",!n&&"border-b-0 py-0 opacity-0",t&&!e?"overflow-hidden":"overflow-visible")}({allowOverflowVisible:G,collapsibleFilters:Q,isDialog:et,isOpen:e_}),H[2]=G,H[3]=Q,H[4]=et,H[5]=e_,H[6]=s):s=H[6];let ek=en.length>0;H[7]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(x.T,{children:"Input"}),o=(0,a.jsx)(S.f,{className:"size-3 opacity-60"}),H[7]=l,H[8]=o):(l=H[7],o=H[8]),H[9]!==Q||H[10]!==ek?(y=(0,a.jsx)(f.J,{render:(0,a.jsxs)(k,{isActive:ek,dense:Q,children:[l,o]})}),H[9]=Q,H[10]=ek,H[11]=y):y=H[11],H[12]!==ew||H[13]!==en||H[14]!==ex?(w=(0,a.jsx)(f.T,{className:"w-auto p-2",align:"start",children:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:Object.values(v.D).map(e=>(0,a.jsxs)(d.Button,{variant:"ghost",size:"sm",className:"justify-between",onClick:()=>ex(e),children:[(0,a.jsx)("span",{children:ew(g.Z[e])}),(0,a.jsx)(u,{className:(0,c.f)("size-3",en.includes(e)?"opacity-100 text-positive":"opacity-0")})]},e))})}),H[12]=ew,H[13]=en,H[14]=ex,H[15]=w):w=H[15],H[16]!==eg||H[17]!==ec||H[18]!==y||H[19]!==w?(_=(0,a.jsxs)(f.V,{open:eg,onOpenChange:ec,children:[y,w]}),H[16]=eg,H[17]=ec,H[18]=y,H[19]=w,H[20]=_):_=H[20],H[21]!==eS||H[22]!==en.length||H[23]!==eu?(A=en.length>0&&(0,a.jsx)(M,{onClick:()=>eu([]),label:eS("Clear input filter"),count:en.length}),H[21]=eS,H[22]=en.length,H[23]=eu,H[24]=A):A=H[24],H[25]!==_||H[26]!==A?(E=(0,a.jsxs)("div",{className:"relative flex items-center",children:[_,A]}),H[25]=_,H[26]=A,H[27]=E):E=H[27];let eM=er.length>0;return H[28]===Symbol.for("react.memo_cache_sentinel")?(O=(0,a.jsx)(x.T,{children:"Output"}),F=(0,a.jsx)(S.f,{className:"size-3 opacity-60"}),H[28]=O,H[29]=F):(O=H[28],F=H[29]),H[30]!==Q||H[31]!==eM?(z=(0,a.jsx)(f.J,{render:(0,a.jsxs)(k,{isActive:eM,dense:Q,children:[O,F]})}),H[30]=Q,H[31]=eM,H[32]=z):z=H[32],H[33]!==Z||H[34]!==ew||H[35]!==er||H[36]!==eb?(D=v.f.map(e=>{let t=er.includes(e),i=Z.has(e)||t;return(0,a.jsxs)(d.Button,{variant:"ghost",size:"sm",className:"justify-between",disabled:!i,title:i?void 0:ew(j),onClick:()=>eb(e),children:[(0,a.jsx)("span",{children:ew(g.L[e])}),(0,a.jsx)(u,{className:(0,c.f)("size-3",t?"opacity-100 text-positive":"opacity-0")})]},e)}),H[33]=Z,H[34]=ew,H[35]=er,H[36]=eb,H[37]=D):D=H[37],H[38]!==D?(N=(0,a.jsx)(f.T,{className:"w-auto p-2",align:"start",children:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:D})}),H[38]=D,H[39]=N):N=H[39],H[40]!==ev||H[41]!==eh||H[42]!==z||H[43]!==N?(I=(0,a.jsxs)(f.V,{open:ev,onOpenChange:eh,children:[z,N]}),H[40]=ev,H[41]=eh,H[42]=z,H[43]=N,H[44]=I):I=H[44],H[45]!==eS||H[46]!==er.length||H[47]!==ed?(T=er.length>0&&(0,a.jsx)(M,{onClick:()=>ed([]),label:eS("Clear output filter"),count:er.length}),H[45]=eS,H[46]=er.length,H[47]=ed,H[48]=T):T=H[48],H[49]!==I||H[50]!==T?(P=(0,a.jsxs)("div",{className:"relative flex items-center",children:[I,T]}),H[49]=I,H[50]=T,H[51]=P):P=H[51],H[52]!==K||H[53]!==J||H[54]!==Q||H[55]!==Y||H[56]!==eS||H[57]!==et||H[58]!==ei||H[59]!==es||H[60]!==el||H[61]!==eo||H[62]!==ey?(R=et&&(0,a.jsxs)("div",{className:"relative flex items-center",children:[(0,a.jsxs)(f.V,{open:K,onOpenChange:e=>{es(e),e||el("")},children:[(0,a.jsx)(f.J,{render:(0,a.jsxs)(k,{isActive:ei.length>0,dense:Q,children:[(0,a.jsx)(x.T,{children:"Provider"}),(0,a.jsx)(S.f,{className:"size-3 opacity-60"})]})}),(0,a.jsxs)(f.T,{className:"w-60 p-2",align:"start",children:[(0,a.jsx)(h.f,{value:J,onChange:e=>el(e.currentTarget.value),placeholder:eS("Search providers"),className:"mb-1"}),(0,a.jsx)("div",{className:"max-h-56 overflow-y-auto",children:Y.map(e=>(0,a.jsx)(C,{isSelected:ei.includes(e.key),onClick:()=>ey(e.key),children:e.label},e.key))})]})]}),ei.length>0&&(0,a.jsx)(M,{onClick:()=>eo([]),label:eS("Clear provider filter"),count:ei.length})]}),H[52]=K,H[53]=J,H[54]=Q,H[55]=Y,H[56]=eS,H[57]=et,H[58]=ei,H[59]=es,H[60]=el,H[61]=eo,H[62]=ey,H[63]=R):R=H[63],H[64]===Symbol.for("react.memo_cache_sentinel")?(B=(0,a.jsx)("div",{"aria-hidden":!0,className:"mx-1 hidden h-4 w-px shrink-0 bg-border min-[480px]:block"}),H[64]=B):B=H[64],H[65]!==ef||H[66]!==em?(L=()=>ef(!em),H[65]=ef,H[66]=em,H[67]=L):L=H[67],H[68]===Symbol.for("react.memo_cache_sentinel")?($=(0,a.jsx)(x.T,{children:"Free"}),H[68]=$):$=H[68],H[69]!==Q||H[70]!==em||H[71]!==L?(W=(0,a.jsx)(k,{isActive:em,dense:Q,onClick:L,children:$}),H[69]=Q,H[70]=em,H[71]=L,H[72]=W):W=H[72],H[73]!==Q||H[74]!==ee||H[75]!==ea||H[76]!==ep?(V=ep?(0,a.jsx)(p.TooltipProvider,{children:(0,a.jsx)(p.Tooltip,{content:(0,a.jsx)(x.T,{children:(0,a.jsxs)("span",{children:["Hide models your"," ",(0,a.jsx)(m.TextLink,{href:"/settings/privacy",className:"text-inherit",children:"privacy settings"})," ","or guardrails don't allow"]})}),children:(0,a.jsx)(k,{isActive:ee,dense:Q,onClick:()=>ea(!ee),children:(0,a.jsx)(x.T,{children:"Hide Unavailable"})})})}):(0,a.jsx)(k,{isActive:ee,dense:Q,onClick:()=>ea(!ee),children:(0,a.jsx)(x.T,{children:"Hide Unavailable"})}),H[73]=Q,H[74]=ee,H[75]=ea,H[76]=ep,H[77]=V):V=H[77],H[78]!==E||H[79]!==P||H[80]!==s||H[81]!==R||H[82]!==W||H[83]!==V?(U=(0,a.jsxs)("div",{className:s,children:[E,P,R,B,W,V]}),H[78]=E,H[79]=P,H[80]=s,H[81]=R,H[82]=W,H[83]=V,H[84]=U):U=H[84],H[85]!==n||H[86]!==U?(q=(0,a.jsx)("div",{id:"model-select-filter-row",className:n,children:U}),H[85]=n,H[86]=U,H[87]=q):q=H[87],q}],716184);var A=e.i(535072),E=e.i(733205);function O(e){return e.setFiltersExpanded}function F(e){return e.filtersExpanded}function z(e){return e.setPinnedPanelExpanded}function D(e){return e.isPinnedPanelExpanded}function N(e){return e.setDisplayMode}function I(e){return e.displayMode}function T(e){return e.setGroupBy}function P(e){return e.groupBy}function R(e){return e.setSort}function B(e){return e.sort}function L(e){return e.setShowFreeOnly}function $(e){return e.showFreeOnly}function W(e){return e.setAuthors}function V(e){return e.authors}function U(e){return e.setOutputModalities}function q(e){return e.outputModalities}function H(e){return e.setInputModalities}function G(e){return e.inputModalities}e.s(["o",0,function(e){let t,n,r=(0,i.c)(8),{externalFiltersExpanded:l,onFiltersExpandedChange:o,useTransientPrefs:a,storeFiltersExpanded:u,setStoreFiltersExpanded:c}=e,d=l??(a?E.s.filtersExpanded:u);r[0]!==d||r[1]!==o||r[2]!==c?(t=e=>{let t="function"==typeof e?e(d):e;o?o(t):c(t)},r[0]=d,r[1]=o,r[2]=c,r[3]=t):t=r[3];let h=t,f=function(e){let t,n,r=(0,i.c)(4),l=(0,A.o)("(prefers-reduced-motion: reduce)"),[o,a]=(0,s.useState)(e),[u,c]=(0,s.useState)(e),d=e&&l;return u!==e&&(c(e),a(d)),d&&!o&&a(!0),r[0]!==e||r[1]!==l?(t=()=>{if(!e||l)return;let t=setTimeout(()=>a(!0),250);return()=>clearTimeout(t)},n=[e,l],r[0]=e,r[1]=l,r[2]=t,r[3]=n):(t=r[2],n=r[3]),(0,s.useEffect)(t,n),e&&o}(d);return r[4]!==f||r[5]!==d||r[6]!==h?(n={filtersExpanded:d,setFiltersExpanded:h,allowOverflowVisible:f},r[4]=f,r[5]=d,r[6]=h,r[7]=n):n=r[7],n},"K",0,function(e,t){let n,r,l=(0,i.c)(6),[o,a]=(0,s.useState)(""),u=e??o,c=t??a;l[0]!==u?(n=u.trim(),l[0]=u,l[1]=n):n=l[1];let d=!!n;return l[2]!==d||l[3]!==u||l[4]!==c?(r={query:u,setQuery:c,isSearching:d},l[2]=d,l[3]=u,l[4]=c,l[5]=r):r=l[5],r},"I",0,function(e){let t,n=(0,i.c)(19),{useTransientPrefs:r,showSortAndView:l}=e,o=(0,E.S)(G),a=(0,E.S)(H),u=(0,E.S)(q),c=(0,E.S)(U),d=(0,E.S)(V),h=(0,E.S)(W),f=(0,E.S)($),m=(0,E.S)(L),p=(0,E.S)(B),g=(0,E.S)(R),v=(0,E.S)(P),y=(0,E.S)(T),x=(0,E.S)(I),b=(0,E.S)(N),S=(0,E.S)(D),w=(0,E.S)(z),_=(0,E.S)(F),k=(0,E.S)(O),M=r?E.s.inputModalities:o,C=r?E.s.outputModalities:u,j=r?E.s.authors:d,A=r?E.s.showFreeOnly:f,K=r||!l,J=K?E.s.sort:p,Z=K?E.s.groupBy:v,Q=K?E.s.displayMode:x,[Y,X]=(0,s.useState)(E.s.isPinnedPanelExpanded),ee=r?Y:S,et=r?X:w;return n[0]!==Q||n[1]!==Z||n[2]!==ee||n[3]!==j||n[4]!==M||n[5]!==C||n[6]!==h||n[7]!==b||n[8]!==y||n[9]!==a||n[10]!==c||n[11]!==et||n[12]!==m||n[13]!==g||n[14]!==k||n[15]!==A||n[16]!==J||n[17]!==_?(t={selectedInputModalities:M,setInputModalities:a,selectedOutputModalities:C,setOutputModalities:c,selectedAuthors:j,setAuthors:h,showFreeOnly:A,setShowFreeOnly:m,sort:J,setSort:g,groupBy:Z,setGroupBy:y,displayMode:Q,setDisplayMode:b,isPinnedPanelExpanded:ee,setPinnedPanelExpanded:et,storeFiltersExpanded:_,setStoreFiltersExpanded:k},n[0]=Q,n[1]=Z,n[2]=ee,n[3]=j,n[4]=M,n[5]=C,n[6]=h,n[7]=b,n[8]=y,n[9]=a,n[10]=c,n[11]=et,n[12]=m,n[13]=g,n[14]=k,n[15]=A,n[16]=J,n[17]=_,n[18]=t):t=n[18],t},"q",0,function(e){let t,n,r,l,o,a,u=(0,i.c)(13),{listRef:c,query:d,searchQuery:h}=e,f=d!==h,m=(0,s.useRef)(f),p=(0,s.useRef)(!1);u[0]!==f?(t=()=>{f&&(m.current=!0)},n=[f],u[0]=f,u[1]=t,u[2]=n):(t=u[1],n=u[2]),(0,s.useLayoutEffect)(t,n),u[3]!==c?(r=()=>{let e=e=>{let t=e.target;if("Enter"!==e.key||e.isComposing||229===e.keyCode||!m.current||!(t instanceof Element))return;let i=c.current?.closest("[cmdk-root]");t.hasAttribute("cmdk-input")&&i?.contains(t)&&(e.preventDefault(),p.current=!0)};return document.addEventListener("keydown",e,!0),()=>document.removeEventListener("keydown",e,!0)},l=[c],u[3]=c,u[4]=r,u[5]=l):(r=u[4],l=u[5]),(0,s.useEffect)(r,l),u[6]!==f||u[7]!==c?(o=()=>{let e=c.current;if(f||!m.current)return;if(!e){m.current=!1,p.current=!1;return}e.scrollTop=0;let t=requestAnimationFrame(()=>{m.current=!1,e.dispatchEvent(new KeyboardEvent("keydown",{key:"Home",bubbles:!0})),p.current&&(p.current=!1,e.querySelector('[cmdk-item=""]:not([aria-disabled="true"])')?.click())});return()=>cancelAnimationFrame(t)},u[6]=f,u[7]=c,u[8]=o):o=u[8],u[9]!==f||u[10]!==c||u[11]!==h?(a=[f,c,h],u[9]=f,u[10]=c,u[11]=h,u[12]=a):a=u[12],(0,s.useEffect)(o,a)}],576670);var K=e.i(512157),J=e.i(775593),Z=e.i(575731),Q=e.i(399907),Y=e.i(536397),X=e.i(380778),ee=e.i(799963),et=e.i(758427),ei=e.i(894868),en=e.i(328262),er=e.i(592176),es=e.i(914359),el=e.i(663993),eo=e.i(700050),ea=e.i(138257),eu=e.i(157063),ec=e.i(272719);function ed(e){let t,l,o,u,h,f,m,g,v,y,x,b,S,_,k,M,C,j,A,O,F,z,D,N=(0,i.c)(77),{model:I,isSelected:T,itemValue:P,isExternallyDisabled:R,onSelect:B,onPeek:L,displayMode:$,showGuardrailsWarning:W,disableSelectForUnavailable:V,getModelEligibilityStatus:U,getModelIneligibilityReasons:q}=e,H=void 0!==R&&R,G=void 0===$?E.E.Detailed:$,X=void 0!==W&&W,et=(0,r.f)(),en=(0,ea.useLocale)(),es=(0,s.useRef)(null),el=(0,ec.f)(ef);N[0]!==I?(t=(0,n.i)(I),N[0]=I,N[1]=t):t=N[1];let ed=t;N[2]!==ed?(l=e=>e.pinnedModelSlugs.includes(ed),N[2]=ed,N[3]=l):l=N[3];let em=(0,ec.f)(l);N[4]!==I||N[5]!==L?(o=e=>{e.some(eh)&&es.current?.firstElementChild?.getAttribute("aria-selected")==="true"&&L(I)},N[4]=I,N[5]=L,N[6]=o):o=N[6],(0,eu.f)(es,o),N[7]!==em||N[8]!==ed||N[9]!==el?(u=e=>{e.stopPropagation(),em?(0,eo.T)({model:ed,origin:"selector_row"}):(0,eo.z)({model:ed,origin:"selector_row"}),el(ed)},N[7]=em,N[8]=ed,N[9]=el,N[10]=u):u=N[10];let ep=u;N[11]!==U||N[12]!==q||N[13]!==I||N[14]!==X?(f=(0,n.Q)(I),m=(h=(X?U(f):er.J.Unknown)===er.J.Ineligible)?q(f):[],N[11]=U,N[12]=q,N[13]=I,N[14]=X,N[15]=h,N[16]=f,N[17]=m):(h=N[15],f=N[16],m=N[17]);let eg=m,ev=void 0!==V&&V&&h||H,ey=G===E.E.Detailed;N[18]!==ey||N[19]!==en||N[20]!==I?(g=ey?(0,w.G)(en,I):null,N[18]=ey,N[19]=en,N[20]=I,N[21]=g):g=N[21];let ex=g,eb=ey?"slots":"default",eS=ey?"grid-cols-[minmax(0,1fr)_4.5rem_7.5rem] h-10 pr-4":"grid-cols-1 h-9 py-1 pr-3",ew=(h||H)&&"opacity-50";return N[22]!==eS||N[23]!==ew?(v=(0,c.f)("group grid rounded-none border-b border-border/40 pl-4","aria-selected:text-foreground data-[selected=true]:bg-card-hover",eS,ew),N[22]=eS,N[23]=ew,N[24]=v):v=N[24],N[25]!==B||N[26]!==ev?(y=e=>{ev||B(e)},N[25]=B,N[26]=ev,N[27]=y):y=N[27],N[28]!==I||N[29]!==L?(x=()=>L(I),N[28]=I,N[29]=L,N[30]=x):x=N[30],N[31]!==I.author||N[32]!==I.author_icon_uri||N[33]!==f?(b=(0,a.jsx)(ei.f,{frame:!0,author:I.author,permaslug:f,iconUri:I.author_icon_uri,className:"size-4 shrink-0"}),N[31]=I.author,N[32]=I.author_icon_uri,N[33]=f,N[34]=b):b=N[34],N[35]!==I.short_name?(S=(0,a.jsx)("div",{className:"min-w-0",children:(0,a.jsx)("div",{className:"truncate text-xs font-medium text-foreground",children:I.short_name})}),N[35]=I.short_name,N[36]=S):S=N[36],N[37]!==T?(_=(0,a.jsx)("span",{className:"flex size-4 shrink-0 items-center justify-center",children:(0,a.jsx)(ee.h,{isSelected:T})}),N[37]=T,N[38]=_):_=N[38],N[39]!==et||N[40]!==eg||N[41]!==h?(k=h&&(0,a.jsx)(p.TooltipProvider,{children:(0,a.jsx)(p.Tooltip,{content:eg.length>0?(0,a.jsx)("div",{className:"text-xs",children:(0,a.jsx)(Q.f,{reasons:eg})}):et("This model is unavailable due to your privacy or guardrail settings"),className:"z-modal",children:(0,a.jsx)("span",{className:"shrink-0",children:(0,a.jsx)(K.f,{className:"size-4 text-warning"})})})}),N[39]=et,N[40]=eg,N[41]=h,N[42]=k):k=N[42],N[43]!==et||N[44]!==em?(M=et(em?"Unpin model":"Pin model"),N[43]=et,N[44]=em,N[45]=M):M=N[45],N[46]!==em?(C=em?(0,a.jsx)(Z.f,{className:"size-4 text-muted-foreground"}):(0,a.jsx)(J.f,{className:"size-4 text-muted-foreground transition-opacity opacity-50 md:opacity-0 md:group-hover:opacity-100"}),N[46]=em,N[47]=C):C=N[47],N[48]!==ep||N[49]!==M||N[50]!==C?(j=(0,a.jsx)(d.Button,{variant:"ghost",size:"icon-2xs",onClick:ep,"aria-label":M,children:C}),N[48]=ep,N[49]=M,N[50]=C,N[51]=j):j=N[51],N[52]!==_||N[53]!==k||N[54]!==j?(A=(0,a.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-1 self-center",children:[_,k,j]}),N[52]=_,N[53]=k,N[54]=j,N[55]=A):A=N[55],N[56]!==b||N[57]!==S||N[58]!==A?(O=(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[b,S,A]}),N[56]=b,N[57]=S,N[58]=A,N[59]=O):O=N[59],N[60]!==ey||N[61]!==en||N[62]!==I.context_length?(F=ey&&(0,a.jsx)("span",{className:"self-center justify-self-end text-xs tabular-nums text-muted-foreground",children:(0,w.u)(en,I.context_length)}),N[60]=ey,N[61]=en,N[62]=I.context_length,N[63]=F):F=N[63],N[64]!==ex?(z=null!==ex&&(0,a.jsx)("span",{title:ex,className:"block w-full self-center justify-self-end truncate text-right text-xs tabular-nums leading-snug text-muted-foreground",children:ex}),N[64]=ex,N[65]=z):z=N[65],N[66]!==T||N[67]!==P||N[68]!==ev||N[69]!==eb||N[70]!==v||N[71]!==y||N[72]!==x||N[73]!==O||N[74]!==F||N[75]!==z?(D=(0,a.jsx)("div",{ref:es,children:(0,a.jsxs)(Y.J,{value:P,"aria-checked":T,disabled:ev,layout:eb,className:v,onSelect:y,onMouseEnter:x,children:[O,F,z]})}),N[66]=T,N[67]=P,N[68]=ev,N[69]=eb,N[70]=v,N[71]=y,N[72]=x,N[73]=O,N[74]=F,N[75]=z,N[76]=D):D=N[76],D}function eh(e){return"attributes"===e.type&&"aria-selected"===e.attributeName}function ef(e){return e.toggleModelPin}var em=e.i(371244),ep=e.i(88084),eg=e.i(444227);function ev(e){let t,n,r,s,l,o,u,c,d=(0,i.c)(22),{doc:h,itemValue:f,onSelect:m}=e;d[0]!==h.href?(t=new URL(h.href),d[0]=h.href,d[1]=t):t=d[1];let p=t,g=h.title??p.pathname;d[2]!==h.breadcrumbs||d[3]!==h.title?(n=null!==h.title&&h.breadcrumbs.at(-1)!==h.title?[...h.breadcrumbs,h.title]:h.breadcrumbs,d[2]=h.breadcrumbs,d[3]=h.title,d[4]=n):n=d[4];let v=n,y=p.hash?eg.f:em.f;return d[5]!==h||d[6]!==m?(r=()=>m?.(h),d[5]=h,d[6]=m,d[7]=r):r=d[7],d[8]!==y?(s=(0,a.jsx)(y,{"aria-hidden":!0,className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),d[8]=y,d[9]=s):s=d[9],d[10]!==g?(l=(0,a.jsx)("span",{className:"truncate",title:g,children:g}),d[10]=g,d[11]=l):l=d[11],d[12]!==v?(o=v.length>0&&(0,a.jsx)("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden text-xs text-muted-foreground",title:v.join(" › "),children:v.map((e,t)=>(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[t>0&&(0,a.jsx)(ep.f,{"aria-hidden":!0,className:"size-3 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e})]},JSON.stringify(v.slice(0,t+1))))}),d[12]=v,d[13]=o):o=d[13],d[14]!==l||d[15]!==o?(u=(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[l,o]}),d[14]=l,d[15]=o,d[16]=u):u=d[16],d[17]!==f||d[18]!==r||d[19]!==s||d[20]!==u?(c=(0,a.jsxs)(Y.J,{value:f,layout:"slots",className:"group h-14 items-start",onSelect:r,children:[s,u]}),d[17]=f,d[18]=r,d[19]=s,d[20]=u,d[21]=c):c=d[21],c}var ey=e.i(939025);let ex=(0,e.i(429332).default)(()=>e.A(785048).then(e=>e.ModelSearchHoverCardContent),{loadableGenerated:{modules:[776154]},loading:()=>null});function eb(e){let t,n,r,l,o=(0,i.c)(8),{model:u,children:c}=e,d=(0,s.useRef)(null);return(0,A.o)("(hover: hover) and (pointer: fine)",!0)?(o[0]===Symbol.for("react.memo_cache_sentinel")?(t=e=>{d.current=e},o[0]=t):t=o[0],o[1]!==c?(n=(0,a.jsx)(ey.b,{render:c,ref:t,delay:250,tabIndex:-1}),o[1]=c,o[2]=n):n=o[2],o[3]!==u?(r=(0,a.jsx)(ex,{model:u,triggerRef:d}),o[3]=u,o[4]=r):r=o[4],o[5]!==n||o[6]!==r?(l=(0,a.jsxs)(ey.c,{children:[n,r]}),o[5]=n,o[6]=r,o[7]=l):l=o[7],l):c}function eS(e){return e.value}function ew(e){("Enter"===e.key||" "===e.key)&&e.stopPropagation()}function e_(e){return e.stopPropagation()}e.s(["q",0,function(e){let t,n,r,l,o=(0,i.c)(11),{rows:a,virtualizer:u,query:c,activeRowIndexRef:d}=e,h=(0,X.p)(eS),f=(0,s.useRef)(c),m=(0,s.useRef)(-1/0);return o[0]!==d||o[1]!==u?(t=()=>{let e=e=>{if(!(["ArrowDown","ArrowUp","Home","End"].includes(e.key)||e.ctrlKey&&["n","p","j","k"].includes(e.key)))return;let t=e.target instanceof Element?e.target.closest("[cmdk-root]"):null,i=u.scrollElement;if(!t||!i||!t.contains(i)||e.target instanceof Element&&e.target.closest('[role="tablist"]'))return;m.current=performance.now();let n=d.current,r=u.range;null===n||!r||n>=r.startIndex&&n<=r.endIndex||(e.preventDefault(),e.stopPropagation(),u.scrollToIndex(n,{align:"auto"}))};return document.addEventListener("keydown",e,{capture:!0}),()=>document.removeEventListener("keydown",e,{capture:!0})},n=[u,d],o[0]=d,o[1]=u,o[2]=t,o[3]=n):(t=o[2],n=o[3]),(0,s.useEffect)(t,n),o[4]!==d||o[5]!==h||o[6]!==c||o[7]!==a||o[8]!==u?(r=()=>{if(c!==f.current){f.current=c,d.current=null;return}if(!h){d.current=null;return}let e=a.findIndex(e=>"group"!==e.type&&e.key.toLowerCase()===h.toLowerCase());d.current=-1===e?null:e,-1===e||performance.now()-m.current>250||u.scrollToIndex(e,{align:"auto"})},l=[h,c,a,u,d],o[4]=d,o[5]=h,o[6]=c,o[7]=a,o[8]=u,o[9]=r,o[10]=l):(r=o[9],l=o[10]),(0,s.useEffect)(r,l),null},"c",0,function(e){let t,s,l,o,u,h,f,m,p,g,v,y,b,S,_,k,M,C,j,A,E,O,F,z=(0,i.c)(94),{model:D,itemValue:N,displayMode:I,disabledModelSlugs:T,disableSelectForUnavailable:P,getModelEligibilityStatus:R,getModelIneligibilityReasons:B,isDialog:L,onDone:$,onPeek:W,pinnedSlugSet:V,selectedModelSlugs:U,selectedSlug:q,showGuardrailsWarning:H,showModelCopyButton:G,showModelHoverCard:X,toggleModelPin:el}=e,ea=void 0!==G&&G,eu=void 0!==X&&X,ec=(0,r.f)();if(z[0]!==P||z[1]!==T||z[2]!==I||z[3]!==R||z[4]!==B||z[5]!==ec||z[6]!==L||z[7]!==N||z[8]!==D||z[9]!==$||z[10]!==W||z[11]!==V||z[12]!==U||z[13]!==q||z[14]!==H||z[15]!==ea||z[16]!==el){g=Symbol.for("react.early_return_sentinel");e:{let e,i,r,d,C=(0,n.i)(D);l=V.has(C),z[34]!==D||z[35]!==U||z[36]!==q?(e=(0,w.J)({model:D,selectedSlug:q,selectedModelSlugs:U?[...U]:void 0}),z[34]=D,z[35]=U,z[36]=q,z[37]=e):e=z[37];let j=e;z[38]!==R||z[39]!==B||z[40]!==D||z[41]!==H?(r=(0,n.Q)(D),d=(i=(H?R(r):er.J.Unknown)===er.J.Ineligible)?B(r):[],z[38]=R,z[39]=B,z[40]=D,z[41]=H,z[42]=i,z[43]=r,z[44]=d):(i=z[42],r=z[43],d=z[44]);let A=d,E=T?.includes(C)??!1,O=P&&i||E;if(s=e=>{e.stopPropagation(),l?(0,eo.T)({model:C,origin:"selector_row"}):(0,eo.z)({model:C,origin:"selector_row"}),el(C)},L&&W){let e;z[45]!==D||z[46]!==$?(e=()=>$?.(D),z[45]=D,z[46]=$,z[47]=e):e=z[47],g=(0,a.jsx)(ed,{model:D,isSelected:j,itemValue:N,isExternallyDisabled:E,onSelect:e,onPeek:W,displayMode:I,showGuardrailsWarning:H,disableSelectForUnavailable:P,getModelEligibilityStatus:R,getModelIneligibilityReasons:B});break e}t=Y.J,_=N,k=j,M=O,o=()=>{O||$?.(D)},u=D.searchKeywords,h=(0,c.f)("h-10 group",(i||E)&&"opacity-50"),z[48]!==L||z[49]!==D||z[50]!==W?(f=()=>{L&&W&&W(D)},z[48]=L,z[49]=D,z[50]=W,z[51]=f):f=z[51],z[52]!==D.author||z[53]!==D.author_icon_uri||z[54]!==r?(m=(0,a.jsx)(ei.f,{frame:!0,author:D.author,permaslug:r,iconUri:D.author_icon_uri,className:"mr-2 size-4 shrink-0"}),z[52]=D.author,z[53]=D.author_icon_uri,z[54]=r,z[55]=m):m=z[55],z[56]!==D.short_name?(p=(0,a.jsx)("span",{className:"truncate text-xs",title:D.short_name,children:D.short_name}),z[56]=D.short_name,z[57]=p):p=z[57],v="ml-auto flex shrink-0 items-center gap-1",z[58]!==j?(y=(0,a.jsx)("span",{className:"flex size-4 shrink-0 items-center justify-center",children:(0,a.jsx)(ee.h,{isSelected:j})}),z[58]=j,z[59]=y):y=z[59],z[60]!==A||z[61]!==i?(b=i&&(0,a.jsx)(en.InfoTooltip,{icon:(0,a.jsx)(K.f,{className:"size-4 text-warning"}),side:"right",align:"center",sideOffset:20,children:A.length>0?(0,a.jsx)(Q.f,{reasons:A}):(0,a.jsx)(x.T,{children:"This model is unavailable due to your privacy or guardrail settings"})}),z[60]=A,z[61]=i,z[62]=b):b=z[62],S=ea&&(0,a.jsx)(et.f,{text:C,hideCopyText:!0,variant:"ghost",size:"icon-2xs",glyphSize:"sm",tone:"subdued",className:"opacity-50 transition-opacity hover:opacity-100 lg:pointer-fine:opacity-0 lg:pointer-fine:group-hover:opacity-100 lg:pointer-fine:focus-visible:opacity-100","aria-label":ec("Copy model ID {modelSlug}",{modelSlug:C}),title:ec("Copy {modelSlug}",{modelSlug:C}),onClick:e_,onKeyDown:ew})}z[0]=P,z[1]=T,z[2]=I,z[3]=R,z[4]=B,z[5]=ec,z[6]=L,z[7]=N,z[8]=D,z[9]=$,z[10]=W,z[11]=V,z[12]=U,z[13]=q,z[14]=H,z[15]=ea,z[16]=el,z[17]=t,z[18]=s,z[19]=l,z[20]=o,z[21]=u,z[22]=h,z[23]=f,z[24]=m,z[25]=p,z[26]=g,z[27]=v,z[28]=y,z[29]=b,z[30]=S,z[31]=_,z[32]=k,z[33]=M}else t=z[17],s=z[18],l=z[19],o=z[20],u=z[21],h=z[22],f=z[23],m=z[24],p=z[25],g=z[26],v=z[27],y=z[28],b=z[29],S=z[30],_=z[31],k=z[32],M=z[33];if(g!==Symbol.for("react.early_return_sentinel"))return g;z[63]!==ec||z[64]!==l?(C=ec((0,es.f)(l?"Unpin model":"Pin model")),z[63]=ec,z[64]=l,z[65]=C):C=z[65],z[66]!==l?(j=l?(0,a.jsx)(Z.f,{className:"size-4 text-muted-foreground"}):(0,a.jsx)(J.f,{className:"size-4 text-muted-foreground transition-opacity opacity-50 md:opacity-0 md:group-hover:opacity-100"}),z[66]=l,z[67]=j):j=z[67],z[68]!==s||z[69]!==C||z[70]!==j?(A=(0,a.jsx)(d.Button,{variant:"ghost",size:"icon-2xs",onClick:s,"aria-label":C,children:j}),z[68]=s,z[69]=C,z[70]=j,z[71]=A):A=z[71],z[72]!==A||z[73]!==v||z[74]!==y||z[75]!==b||z[76]!==S?(E=(0,a.jsxs)("div",{className:v,children:[y,b,S,A]}),z[72]=A,z[73]=v,z[74]=y,z[75]=b,z[76]=S,z[77]=E):E=z[77],z[78]!==t||z[79]!==o||z[80]!==u||z[81]!==h||z[82]!==f||z[83]!==m||z[84]!==p||z[85]!==E||z[86]!==_||z[87]!==k||z[88]!==M?(O=(0,a.jsxs)(t,{value:_,"aria-checked":k,disabled:M,onSelect:o,keywords:u,className:h,onMouseEnter:f,children:[m,p,E]}),z[78]=t,z[79]=o,z[80]=u,z[81]=h,z[82]=f,z[83]=m,z[84]=p,z[85]=E,z[86]=_,z[87]=k,z[88]=M,z[89]=O):O=z[89];let eh=O;return z[90]!==D||z[91]!==eh||z[92]!==eu?(F=eu?(0,a.jsx)(eb,{model:D,children:eh}):eh,z[90]=D,z[91]=eh,z[92]=eu,z[93]=F):F=z[93],F},"y",0,function({isDialog:e,onPeek:t,onDocSelect:i,renderers:{renderModelRow:n,renderPageRow:r,renderProviderRow:s},rows:l,virtualizer:{activeStickyIndexRef:o,pinnedScrollMargin:u,rowVirtualizer:d}}){let h=(0,b.f)();return(0,a.jsx)("div",{className:"relative w-full h-(--virtual-total-height)","data-allow-inline-style":!0,style:{"--virtual-total-height":`${d.getTotalSize()}px`},children:d.getVirtualItems().map(d=>{let f=l[d.index];if(!f)return null;let p="group"===f.type&&o.current===d.index,g=p?"sticky top-0 left-0 z-10 w-full":"absolute top-0 left-0 w-full translate-y-(--row-offset)",v=p?void 0:{"--row-offset":`${d.start-u}px`};if("group"===f.type){let i=w.F[f.key];return(0,a.jsxs)("div",{"data-allow-inline-style":!0,style:v,"data-search-section-heading":!0,className:(0,c.f)(g,"flex items-center justify-between gap-2 py-1.5","border-b border-border bg-popover","text-xs font-medium text-muted-foreground",e&&t?"px-4":"px-2"),children:[(0,a.jsx)("span",{"aria-hidden":!0,children:f.group}),i&&(0,a.jsx)(m.TextLink,{href:i.href,target:"_blank",rel:"noopener noreferrer","aria-label":h(i.aria),className:"inline-flex items-center rounded-sm p-0.5 text-muted-foreground no-underline hover:text-foreground",children:(0,a.jsx)(el.f,{className:"size-3.5"})})]},f.key)}return"provider"===f.type?(0,a.jsx)("div",{"data-allow-inline-style":!0,style:v,className:g,children:s(f.provider,f.key)},f.key):"page"===f.type?(0,a.jsx)("div",{"data-allow-inline-style":!0,style:v,className:g,children:r(f.page,f.key)},f.key):"doc"===f.type?(0,a.jsx)("div",{"data-allow-inline-style":!0,style:v,className:g,children:(0,a.jsx)(ev,{doc:f.doc,itemValue:f.key,onSelect:i})},f.key):"model"!==f.type?null:(0,a.jsx)("div",{"data-allow-inline-style":!0,style:v,className:g,children:n(f.model,f.key)},f.key)})})}],35300);var ek=e.i(656521),eM=e.i(199168);function eC(e){("Enter"===e.key||" "===e.key)&&e.stopPropagation()}function ej(e){return e.stopPropagation()}function eA(e){let t,s,l,o,u,h,f=(0,i.c)(18),{model:m,isPillLayout:p,isDetailedDialog:g,hasPeek:v,toggleModelPin:y}=e,x=(0,r.f)();f[0]!==m?(t=(0,n.i)(m),f[0]=m,f[1]=t):t=f[1];let b=t,S=p?"pill":"default";return f[2]!==b||f[3]!==y?(s=e=>{e.stopPropagation(),(0,eo.T)({model:b,origin:"selector_pinned_panel"}),y(b)},f[2]=b,f[3]=y,f[4]=s):s=f[4],f[5]!==x||f[6]!==m.short_name?(l=x("Unpin {model}",{model:m.short_name}),f[5]=x,f[6]=m.short_name,f[7]=l):l=f[7],f[8]!==v||f[9]!==g||f[10]!==p?(o=(0,c.f)("shrink-0 transition-opacity",p?(0,c.f)("opacity-50 lg:pointer-fine:absolute lg:pointer-fine:right-1 lg:pointer-fine:top-1/2 lg:pointer-fine:-translate-y-1/2 lg:pointer-fine:bg-popover","lg:pointer-fine:pointer-events-none lg:pointer-fine:opacity-0 group-hover:pointer-events-auto group-hover:opacity-100","group-focus-within:pointer-events-auto group-focus-within:opacity-100"):(0,c.f)("ml-1 opacity-50 hover:opacity-100 md:opacity-0 md:group-hover:opacity-100",v&&!g?"mr-3":"mr-2")),f[8]=v,f[9]=g,f[10]=p,f[11]=o):o=f[11],f[12]===Symbol.for("react.memo_cache_sentinel")?(u=(0,a.jsx)(_.X,{className:"size-3.5"}),f[12]=u):u=f[12],f[13]!==S||f[14]!==s||f[15]!==l||f[16]!==o?(h=(0,a.jsx)(d.Button,{variant:"ghost",size:"icon-3xs",tone:"subdued",glyph:"sm",shape:S,onClick:s,"aria-label":l,className:o,children:u}),f[13]=S,f[14]=s,f[15]=l,f[16]=o,f[17]=h):h=f[17],h}function eE(e){let t,n,r,s,l,o=(0,i.c)(13),{model:u,locale:c}=e;o[0]!==c||o[1]!==u?(t=(0,w.G)(c,u),o[0]=c,o[1]=u,o[2]=t):t=o[2];let d=t;return o[3]!==c||o[4]!==u.context_length?(n=(0,w.u)(c,u.context_length),o[3]=c,o[4]=u.context_length,o[5]=n):n=o[5],o[6]!==n?(r=(0,a.jsx)("span",{className:"w-12 shrink-0 text-right text-xs tabular-nums text-muted-foreground",children:n}),o[6]=n,o[7]=r):r=o[7],o[8]!==d?(s=(0,a.jsx)("span",{title:d,className:"ml-2 w-30 shrink-0 truncate text-right text-xs tabular-nums leading-snug text-muted-foreground",children:d}),o[8]=d,o[9]=s):s=o[9],o[10]!==r||o[11]!==s?(l=(0,a.jsxs)(a.Fragment,{children:[r,s]}),o[10]=r,o[11]=s,o[12]=l):l=o[12],l}e.s(["f",0,function(e){let t,n,r,s,l,o=(0,i.c)(15),{className:u,direction:d,label:h,onClick:f}=e,m=(0,eM.o)();o[0]!==d||o[1]!==m?(t=function(e,t){switch(e){case"asc":return t("sorted ascending");case"desc":return t("sorted descending");case!1:return null;default:return e}}(d,m),o[0]=d,o[1]=m,o[2]=t):t=o[2];let p=t;return o[3]!==u?(n=(0,c.f)("group/sort flex items-center justify-end gap-1 text-right hover:text-foreground",u),o[3]=u,o[4]=n):n=o[4],o[5]!==d?(r=(0,a.jsx)(ek.z,{direction:d}),o[5]=d,o[6]=r):r=o[6],o[7]!==p?(s=p&&(0,a.jsx)("span",{className:"sr-only",children:p}),o[7]=p,o[8]=s):s=o[8],o[9]!==h||o[10]!==f||o[11]!==n||o[12]!==r||o[13]!==s?(l=(0,a.jsxs)("button",{type:"button",className:n,onClick:f,children:[r,h,s]}),o[9]=h,o[10]=f,o[11]=n,o[12]=r,o[13]=s,o[14]=l):l=o[14],l}],617705),e.s(["f",0,function(e){let t,s,l,o,d,h,f,m=(0,i.c)(42),{model:p,locale:g,isPillLayout:v,isDetailedDialog:y,hasPeek:x,isSelected:b,showModelCopyButton:S,toggleModelPin:w}=e,_=void 0!==S&&S,k=(0,r.f)();if(m[0]!==k||m[1]!==v||m[2]!==b||m[3]!==p||m[4]!==_){let e,i,r=(0,n.i)(p),d=!v,h=p.author;m[9]!==p?(e=(0,n.Q)(p),m[9]=p,m[10]=e):e=m[10];let f=v?"size-4 shrink-0":"mr-2 size-4 shrink-0";m[11]!==v||m[12]!==p.author||m[13]!==p.author_icon_uri||m[14]!==d||m[15]!==e||m[16]!==f?(t=(0,a.jsx)(ei.f,{frame:d,bare:v,author:h,permaslug:e,iconUri:p.author_icon_uri,className:f}),m[11]=v,m[12]=p.author,m[13]=p.author_icon_uri,m[14]=d,m[15]=e,m[16]=f,m[17]=t):t=m[17];let g=v?"font-normal":"font-medium";m[18]!==g?(i=(0,c.f)("min-w-0 flex-1 truncate text-sm leading-snug text-foreground",g),m[18]=g,m[19]=i):i=m[19],m[20]!==p.short_name||m[21]!==i?(s=(0,a.jsx)("span",{className:i,title:p.short_name,children:p.short_name}),m[20]=p.short_name,m[21]=i,m[22]=s):s=m[22],m[23]!==b?(l=b&&(0,a.jsx)(u,{className:"ml-1 size-4 shrink-0 text-muted-foreground"}),m[23]=b,m[24]=l):l=m[24],o=_&&(0,a.jsx)(et.f,{text:r,hideCopyText:!0,variant:"ghost",size:"icon-2xs",glyphSize:"sm",tone:"subdued",className:"opacity-50 transition-opacity hover:opacity-100 lg:pointer-fine:opacity-0 lg:pointer-fine:group-hover:opacity-100 lg:pointer-fine:focus-visible:opacity-100","aria-label":k("Copy model ID {modelSlug}",{modelSlug:r}),title:k("Copy {modelSlug}",{modelSlug:r}),onClick:ej,onKeyDown:eC}),m[0]=k,m[1]=v,m[2]=b,m[3]=p,m[4]=_,m[5]=t,m[6]=s,m[7]=l,m[8]=o}else t=m[5],s=m[6],l=m[7],o=m[8];return m[25]!==x||m[26]!==y||m[27]!==v||m[28]!==p||m[29]!==w?(d=(0,a.jsx)(eA,{model:p,isPillLayout:v,isDetailedDialog:y,hasPeek:x,toggleModelPin:w}),m[25]=x,m[26]=y,m[27]=v,m[28]=p,m[29]=w,m[30]=d):d=m[30],m[31]!==y||m[32]!==g||m[33]!==p?(h=y&&(0,a.jsx)(eE,{model:p,locale:g}),m[31]=y,m[32]=g,m[33]=p,m[34]=h):h=m[34],m[35]!==t||m[36]!==s||m[37]!==l||m[38]!==o||m[39]!==d||m[40]!==h?(f=(0,a.jsxs)(a.Fragment,{children:[t,s,l,o,d,h]}),m[35]=t,m[36]=s,m[37]=l,m[38]=o,m[39]=d,m[40]=h,m[41]=f):f=m[41],f}],193384)},690387,e=>{"use strict";var t=e.i(293747),i=e.i(706792),n=e.i(140691);let r="/M tokens",s=["prompt","completion","request","image","image_token","image_output","audio","audio_output","input_audio_cache","input_cache_read","input_cache_write","input_cache_write_1h","web_search","internal_reasoning"];function l(e){return e.length>0&&!e.some(e=>!(0,n.I)(e.price).isZero()||e.tiers?.some(e=>!(0,n.I)(e.price).isZero())===!0)}function o(e,r,s){if(0===r.length)return;let l=s?.keepTrailingZeroes?"model-price-fixed":"model-price",o=r.filter(e=>"token"===e.kind),c=(0,i.T)(r);if(c)return function({locale:e,preset:i},{media:r,inputItem:s,outputItem:l}){return{kind:"standard-tokens",media:r,inputPrice:(0,t.f)((0,n.I)(s.price).times(s.displayMultiplier),{locale:e,preset:i})??"—",inputUnit:u(s),outputPrice:(0,t.f)((0,n.I)(l.price).times(l.displayMultiplier),{locale:e,preset:i})??"—",outputUnit:u(l)}}({locale:e,preset:l},c);let d=(0,i.U)(r);if(!d){if(o[0]){let i=o[0],l=`${(0,t.f)((0,n.I)(i.price).times(i.displayMultiplier),{locale:e,preset:s?.keepTrailingZeroes?"model-price-fixed":"model-price"})??"—"}`,c=u(i);return{kind:"custom",label:a(l,c),priceOnly:l,unit:c,hasDetails:r.length>1}}return}let h=`${(0,t.f)((0,n.I)(d.price).times(d.displayMultiplier),{locale:e,preset:s?.keepTrailingZeroes?"model-price-fixed":"model-price"})??"—"}`,f=d.unitLabel;return{kind:"custom",label:d.hasDetails?`from ${a(h,f)}`:a(h,f),priceOnly:d.hasDetails?`from ${h}`:h,unit:f,hasDetails:d.hasDetails}}function a(e,t){var i;return`${e}${(i=t)?i.startsWith("/")?i:` ${i}`:""}`}function u(e){if("token"===e.kind){if(1e6===e.displayMultiplier)return r;if(1e3===e.displayMultiplier)return"/K tokens"}return e.unitLabel}e.s(["z",0,1e6,"u",0,function(e,i,s){return o(e,s)??function(e,i){if(i&&(0,n.I)(i.prompt).isFinite()&&(0,n.I)(i.completion).isFinite()&&!((0,n.I)(i.prompt).isZero()&&(0,n.I)(i.completion).isZero()))return{kind:"standard-tokens",media:"text",inputPrice:(0,t.f)((0,n.I)(i.prompt).times(1e6),{locale:e,preset:"model-price"})??"—",inputUnit:r,outputPrice:(0,t.f)((0,n.I)(i.completion).times(1e6),{locale:e,preset:"model-price"})??"—",outputUnit:r}}(e,i?.pricing)},"J",0,o,"w",0,u,"C",0,l,"h",0,function(e,t){var i;return e?.is_free===!0||(t.length>0?l(t):!!(i=e?.pricing)&&s.every(e=>{let t=i[e];return void 0===t||(0,n.I)(t).isZero()}))},"i",0,a])},105312,e=>{"use strict";var t=e.i(659350),i=e.i(663456),n=e.i(134611),r=e.i(136562),s=e.i(536397),l=e.i(894868);let o="h-9 max-w-full font-normal rounded-full border border-border bg-muted/50 px-3 py-0 aria-selected:border-accent-border aria-selected:bg-accent";e.s(["Y",0,o,"q",0,function(e){let a,u,c,d=(0,i.c)(13),{group:h,onSelectModel:f,hideHeading:m}=e,p=h.label,g=void 0!==m&&m&&"[&_[cmdk-group-heading]]:sr-only";if(d[0]!==g?(a=(0,r.f)("p-0 pb-2 [&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-2",g,"[&_[cmdk-group-items]]:flex [&_[cmdk-group-items]]:flex-wrap [&_[cmdk-group-items]]:gap-2 [&_[cmdk-group-items]]:px-3"),d[0]=g,d[1]=a):a=d[1],d[2]!==h.key||d[3]!==h.models||d[4]!==f){let e;d[6]!==h.key||d[7]!==f?(e=(e,i)=>(0,t.jsxs)(s.J,{value:`${h.key}:${(0,n.i)(e)}`,"data-search-chip":!0,onSelect:()=>f(e,i),layout:"slots",className:o,children:[(0,t.jsx)(l.f,{bare:!0,author:e.author,permaslug:(0,n.Q)(e),iconUri:e.author_icon_uri,className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:"truncate",title:e.short_name,children:e.short_name})]},(0,n.i)(e)),d[6]=h.key,d[7]=f,d[8]=e):e=d[8],u=h.models.map(e),d[2]=h.key,d[3]=h.models,d[4]=f,d[5]=u}else u=d[5];return d[9]!==h.label||d[10]!==a||d[11]!==u?(c=(0,t.jsx)(s.W,{heading:p,className:a,children:u}),d[9]=h.label,d[10]=a,d[11]=u,d[12]=c):c=d[12],c}])},700050,e=>{"use strict";var t=e.i(960773),i=e.i(503741),n=e.i(989487);function r(e,r){let s=`playground_${i.m}:${e}`,l=Object.fromEntries(Object.entries(r||{}).map(([e,t])=>[(0,n.h)(e),t]));t.j.capture(s,l)}e.s(["q",0,function(e){r("artifact_create",e)},"l",0,function(e){r("artifact_delete",e)},"J",0,function(e){r("artifact_version_create",e)},"s",0,function(e){r("aspect_ratio_select",e)},"X",0,function(e){r("character_duplicate",e)},"D",0,function(e){r("character_remove",e)},"E",0,function(e){r("character_restore",e)},"K",0,function(e){for(let t of e.modelSlugs)r("character_add",{model:t,source:e.source})},"u",0,function(e){r("citation_icons_expand",e)},"P",0,function(e){r("conversation_search_open",e)},"t",0,function(e){r("intern_turn",e)},"p",0,function(e){r("message_delete",e)},"L",0,function(e){r("message_send_init",e)},"z",0,function(e){r("model_pin",e)},"g",0,function(e){r("model_preset_click",e)},"T",0,function(e){r("model_unpin",e)},"Y",0,function(e){r("pinned_model_select",e)},"v",0,function(e){r("preset_apply",e)},"m",0,function(e){r("prompt_preset_click",e)},"r",0,function(){r("room_clear_characters")},"i",0,function(){r("room_clear_history")},"w",0,function(e){r("room_create",e)},"b",0,function(e){r("room_delete",e)},"U",0,function(e){r("room_delete_all",e)},"j",0,function(e){r("room_duplicate",e)},"e",0,function(){r("room_export_chat")},"V",0,function(){r("room_export_markdown")},"x",0,function(){r("room_import")},"Z",0,function(e){r("room_load_complete",e)},"F",0,function(e){r("room_load_failed",e)},"C",0,function(e){r("room_load_triggered",e)},"M",0,function(){r("room_share_models")},"a",0,function(e){r("room_summary_title_generated",e)},"n",0,function(e){r("room_update_title",e)},"G",0,function(e){r("tool_chip_expand",e)},"h",0,function(){r("tool_docs_click")},"_",0,function(e){r("tool_toggle",e)}])},930140,e=>{"use strict";e.s(["f",0,function({left:e,right:t,limit:i}){if(Math.abs(e.length-t.length)>i)return i+1;let n=Array.from({length:t.length+1},(e,t)=>t);for(let r=1;r<=e.length;r+=1){let s=[r];for(let i=1;i<=t.length;i+=1)s[i]=Math.min(s[i-1]+1,n[i]+1,n[i-1]+ +(e[r-1]!==t[i-1]));if(Math.min(...n=s)>i)return i+1}return n[t.length]}])}]); //# sourceMappingURL=1fvmqzadwdw-4.js.map