mission-control/dist/_next/static/chunks/e855a97db51ad6c7.js

1 line
14 KiB
JavaScript

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,61336,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},85862,e=>{"use strict";var t=e.i(60731);e.i(61144);var r=t.createContext(void 0);function a(e){let a=t.useContext(r);return e||a||"ltr"}e.s(["useDirection",()=>a])},3642,e=>{"use strict";var t=e.i(61144),r=e.i(60731),a=e.i(72895),i=r.forwardRef((e,r)=>(0,t.jsx)(a.Primitive.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));i.displayName="Label",e.s(["Label",()=>i,"Root",()=>i],7679);var n=e.i(7679),n=n,s=e.i(11801);function o({className:e,...r}){return(0,t.jsx)(n.Root,{"data-slot":"label",className:(0,s.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}e.s(["Label",()=>o],3642)},5666,e=>{"use strict";var t=e.i(61144),r=e.i(75207),a=e.i(60731),i=e.i(48296),n=e.i(91175),s=e.i(60815),o=e.i(89633),l=new WeakMap;function u(e,t){var r,a;let i,n,s;if("at"in Array.prototype)return Array.prototype.at.call(e,t);let o=(r=e,a=t,i=r.length,(s=(n=d(a))>=0?n:i+n)<0||s>=i?-1:s);return -1===o?void 0:e[o]}function d(e){return e!=e||0===e?0:Math.trunc(e)}(class e extends Map{#e;constructor(e){super(e),this.#e=[...super.keys()],l.set(this,!0)}set(e,t){return l.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,r){let a,i=this.has(t),n=this.#e.length,s=d(e),o=s>=0?s:n+s,l=o<0||o>=n?-1:o;if(l===this.size||i&&l===this.size-1||-1===l)return this.set(t,r),this;let u=this.size+ +!i;s<0&&o++;let c=[...this.#e],f=!1;for(let e=o;e<u;e++)if(o===e){let n=c[e];c[e]===t&&(n=c[e+1]),i&&this.delete(t),a=this.get(n),this.set(t,r)}else{f||c[e-1]!==t||(f=!0);let r=c[f?e:e-1],i=a;a=this.get(r),this.delete(r),this.set(r,i)}return this}with(t,r,a){let i=new e(this);return i.insert(t,r,a),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let a=this.#e.indexOf(e);return -1===a?this:this.insert(a,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let a=this.#e.indexOf(e);return -1===a?this:this.insert(a+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=u(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=u(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return u(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let a=r+t;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let a=r+t;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(e,t){let r=0;for(let a of this){if(Reflect.apply(e,t,[a,r,this]))return a;r++}}findIndex(e,t){let r=0;for(let a of this){if(Reflect.apply(e,t,[a,r,this]))return r;r++}return -1}filter(t,r){let a=[],i=0;for(let e of this)Reflect.apply(t,r,[e,i,this])&&a.push(e),i++;return new e(a)}map(t,r){let a=[],i=0;for(let e of this)a.push([e[0],Reflect.apply(t,r,[e,i,this])]),i++;return new e(a)}reduce(...e){let[t,r]=e,a=0,i=r??this.at(0);for(let r of this)i=0===a&&1===e.length?r:Reflect.apply(t,this,[i,r,a,this]),a++;return i}reduceRight(...e){let[t,r]=e,a=r??this.at(-1);for(let r=this.size-1;r>=0;r--){let i=this.at(r);a=r===this.size-1&&1===e.length?i:Reflect.apply(t,this,[a,i,r,this])}return a}toSorted(t){return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),a=this.get(r);t.set(r,a)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let a=new e,i=this.size-1;if(void 0===t)return a;t<0&&(t+=this.size),void 0!==r&&r>0&&(i=r-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),r=this.get(t);a.set(t,r)}return a}every(e,t){let r=0;for(let a of this){if(!Reflect.apply(e,t,[a,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let a of this){if(Reflect.apply(e,t,[a,r,this]))return!0;r++}return!1}});var c=e.i(36452),f=e.i(72895),p=e.i(74375),h=e.i(40573),v=e.i(85862),b="rovingFocusGroup.onEntryFocus",g={bubbles:!1,cancelable:!0},m="RovingFocusGroup",[y,x,w]=function(e){let r=e+"CollectionProvider",[i,l]=(0,n.createContextScope)(r),[u,d]=i(r,{collectionRef:{current:null},itemMap:new Map}),c=e=>{let{scope:r,children:i}=e,n=a.default.useRef(null),s=a.default.useRef(new Map).current;return(0,t.jsx)(u,{scope:r,itemMap:s,collectionRef:n,children:i})};c.displayName=r;let f=e+"CollectionSlot",p=(0,o.createSlot)(f),h=a.default.forwardRef((e,r)=>{let{scope:a,children:i}=e,n=d(f,a),o=(0,s.useComposedRefs)(r,n.collectionRef);return(0,t.jsx)(p,{ref:o,children:i})});h.displayName=f;let v=e+"CollectionItemSlot",b="data-radix-collection-item",g=(0,o.createSlot)(v),m=a.default.forwardRef((e,r)=>{let{scope:i,children:n,...o}=e,l=a.default.useRef(null),u=(0,s.useComposedRefs)(r,l),c=d(v,i);return a.default.useEffect(()=>(c.itemMap.set(l,{ref:l,...o}),()=>void c.itemMap.delete(l))),(0,t.jsx)(g,{...{[b]:""},ref:u,children:n})});return m.displayName=v,[{Provider:c,Slot:h,ItemSlot:m},function(t){let r=d(e+"CollectionConsumer",t);return a.default.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${b}]`));return Array.from(r.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[r.collectionRef,r.itemMap])},l]}(m),[R,k]=(0,n.createContextScope)(m,[w]),[C,A]=R(m),T=a.forwardRef((e,r)=>(0,t.jsx)(y.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,t.jsx)(y.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,t.jsx)(j,{...e,ref:r})})}));T.displayName=m;var j=a.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:n,orientation:o,loop:l=!1,dir:u,currentTabStopId:d,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:y,onEntryFocus:w,preventScrollOnEntryFocus:R=!1,...k}=e,A=a.useRef(null),T=(0,s.useComposedRefs)(r,A),j=(0,v.useDirection)(u),[S,I]=(0,h.useControllableState)({prop:d,defaultProp:c??null,onChange:y,caller:m}),[z,E]=a.useState(!1),P=(0,p.useCallbackRef)(w),F=x(n),M=a.useRef(!1),[O,L]=a.useState(0);return a.useEffect(()=>{let e=A.current;if(e)return e.addEventListener(b,P),()=>e.removeEventListener(b,P)},[P]),(0,t.jsx)(C,{scope:n,orientation:o,dir:j,loop:l,currentTabStopId:S,onItemFocus:a.useCallback(e=>I(e),[I]),onItemShiftTab:a.useCallback(()=>E(!0),[]),onFocusableItemAdd:a.useCallback(()=>L(e=>e+1),[]),onFocusableItemRemove:a.useCallback(()=>L(e=>e-1),[]),children:(0,t.jsx)(f.Primitive.div,{tabIndex:z||0===O?-1:0,"data-orientation":o,...k,ref:T,style:{outline:"none",...e.style},onMouseDown:(0,i.composeEventHandlers)(e.onMouseDown,()=>{M.current=!0}),onFocus:(0,i.composeEventHandlers)(e.onFocus,e=>{let t=!M.current;if(e.target===e.currentTarget&&t&&!z){let t=new CustomEvent(b,g);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=F().filter(e=>e.focusable);D([e.find(e=>e.active),e.find(e=>e.id===S),...e].filter(Boolean).map(e=>e.ref.current),R)}}M.current=!1}),onBlur:(0,i.composeEventHandlers)(e.onBlur,()=>E(!1))})})}),S="RovingFocusGroupItem",I=a.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:n,focusable:s=!0,active:o=!1,tabStopId:l,children:u,...d}=e,p=(0,c.useId)(),h=l||p,v=A(S,n),b=v.currentTabStopId===h,g=x(n),{onFocusableItemAdd:m,onFocusableItemRemove:w,currentTabStopId:R}=v;return a.useEffect(()=>{if(s)return m(),()=>w()},[s,m,w]),(0,t.jsx)(y.ItemSlot,{scope:n,id:h,focusable:s,active:o,children:(0,t.jsx)(f.Primitive.span,{tabIndex:b?0:-1,"data-orientation":v.orientation,...d,ref:r,onMouseDown:(0,i.composeEventHandlers)(e.onMouseDown,e=>{s?v.onItemFocus(h):e.preventDefault()}),onFocus:(0,i.composeEventHandlers)(e.onFocus,()=>v.onItemFocus(h)),onKeyDown:(0,i.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void v.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var a;let i=(a=e.key,"rtl"!==r?a:"ArrowLeft"===a?"ArrowRight":"ArrowRight"===a?"ArrowLeft":a);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return z[i]}(e,v.orientation,v.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=g().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,a;"prev"===t&&i.reverse();let n=i.indexOf(e.currentTarget);i=v.loop?(r=i,a=n+1,r.map((e,t)=>r[(a+t)%r.length])):i.slice(n+1)}setTimeout(()=>D(i))}}),children:"function"==typeof u?u({isCurrentTabStop:b,hasTabStop:null!=R}):u})})});I.displayName=S;var z={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function D(e,t=!1){let r=document.activeElement;for(let a of e)if(a===r||(a.focus({preventScroll:t}),document.activeElement!==r))return}var E=e.i(21333),P="Tabs",[F,M]=(0,n.createContextScope)(P,[k]),O=k(),[L,N]=F(P),K=a.forwardRef((e,r)=>{let{__scopeTabs:a,value:i,onValueChange:n,defaultValue:s,orientation:o="horizontal",dir:l,activationMode:u="automatic",...d}=e,p=(0,v.useDirection)(l),[b,g]=(0,h.useControllableState)({prop:i,onChange:n,defaultProp:s??"",caller:P});return(0,t.jsx)(L,{scope:a,baseId:(0,c.useId)(),value:b,onValueChange:g,orientation:o,dir:p,activationMode:u,children:(0,t.jsx)(f.Primitive.div,{dir:p,"data-orientation":o,...d,ref:r})})});K.displayName=P;var H="TabsList",_=a.forwardRef((e,r)=>{let{__scopeTabs:a,loop:i=!0,...n}=e,s=N(H,a),o=O(a);return(0,t.jsx)(T,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:i,children:(0,t.jsx)(f.Primitive.div,{role:"tablist","aria-orientation":s.orientation,...n,ref:r})})});_.displayName=H;var B="TabsTrigger",V=a.forwardRef((e,r)=>{let{__scopeTabs:a,value:n,disabled:s=!1,...o}=e,l=N(B,a),u=O(a),d=$(l.baseId,n),c=q(l.baseId,n),p=n===l.value;return(0,t.jsx)(I,{asChild:!0,...u,focusable:!s,active:p,children:(0,t.jsx)(f.Primitive.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":c,"data-state":p?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:d,...o,ref:r,onMouseDown:(0,i.composeEventHandlers)(e.onMouseDown,e=>{s||0!==e.button||!1!==e.ctrlKey?e.preventDefault():l.onValueChange(n)}),onKeyDown:(0,i.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&l.onValueChange(n)}),onFocus:(0,i.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==l.activationMode;p||s||!e||l.onValueChange(n)})})})});V.displayName=B;var G="TabsContent",U=a.forwardRef((e,r)=>{let{__scopeTabs:i,value:n,forceMount:s,children:o,...l}=e,u=N(G,i),d=$(u.baseId,n),c=q(u.baseId,n),p=n===u.value,h=a.useRef(p);return a.useEffect(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(E.Presence,{present:s||p,children:({present:a})=>(0,t.jsx)(f.Primitive.div,{"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":d,hidden:!a,id:c,tabIndex:0,...l,ref:r,style:{...e.style,animationDuration:h.current?"0s":void 0},children:a&&o})})});function $(e,t){return`${e}-trigger-${t}`}function q(e,t){return`${e}-content-${t}`}U.displayName=G,e.s(["Content",()=>U,"List",()=>_,"Root",()=>K,"Tabs",()=>K,"TabsContent",()=>U,"TabsList",()=>_,"TabsTrigger",()=>V,"Trigger",()=>V,"createTabsScope",()=>M],89741);var W=e.i(89741),W=W,J=e.i(11801);function Q({className:e,orientation:r="horizontal",...a}){return(0,t.jsx)(W.Root,{"data-slot":"tabs","data-orientation":r,orientation:r,className:(0,J.cn)("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...a})}let X=(0,r.cva)("rounded-lg p-[3px] group-data-[orientation=horizontal]/tabs:h-9 data-[variant=line]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function Y({className:e,variant:r="default",...a}){return(0,t.jsx)(W.List,{"data-slot":"tabs-list","data-variant":r,className:(0,J.cn)(X({variant:r}),e),...a})}function Z({className:e,...r}){return(0,t.jsx)(W.Trigger,{"data-slot":"tabs-trigger",className:(0,J.cn)("focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground/60 hover:text-foreground dark:text-muted-foreground dark:hover:text-foreground relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background dark:data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 data-[state=active]:text-foreground","after:bg-foreground after:absolute after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...r})}function ee({className:e,...r}){return(0,t.jsx)(W.Content,{"data-slot":"tabs-content",className:(0,J.cn)("flex-1 outline-none",e),...r})}e.s(["Tabs",()=>Q,"TabsContent",()=>ee,"TabsList",()=>Y,"TabsTrigger",()=>Z,"tabsListVariants",()=>X],5666)}]);