PageSourceSearch

https://rokki.ai/_next/static/chunks/9832.19ae2f4c9e884651.js

js rokki.ai collected 2026-10-05 14:43:06 UTC 9,566 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="c66e420e-b871-4fc6-bd31-383f8fdc86a5",e._sentryDebugIdIdentifier="sentry-dbid-c66e420e-b871-4fc6-bd31-383f8fdc86a5")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7451,9832],{11110:(e,t,r)=>{r.d(t,{$:()=>o});var n=r(79639),l=r(40927),a=r(75644),s=r(37845);let i=(0,a.F)("inline-flex items-center justify-center gap-2 font-sans font-medium transition-colors duration-micro focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-1 focus-visible:ring-offset-bg-0 disabled:opacity-50 disabled:cursor-not-allowed",{variants:{variant:{default:"bg-bg-3 hover:bg-bg-4 text-text-0 border border-border",ghost:"hover:bg-bg-2 text-text-1 border border-transparent",destructive:"bg-danger-subtle hover:bg-danger/30 text-danger border border-transparent",accent:"bg-accent hover:bg-accent-hover active:bg-accent-active text-bg-0 border border-transparent font-semibold"},size:{sm:"h-6 px-2 text-xs rounded-sm",md:"h-8 px-3 text-sm rounded",lg:"h-10 px-4 text-base rounded"}},defaultVariants:{variant:"default",size:"md"}}),o=(0,l.forwardRef)((e,t)=>{let{className:r,variant:l,size:a,loading:o,disabled:d,children:c,...u}=e;return(0,n.jsxs)("button",{ref:t,className:(0,s.cn)(i({variant:l,size:a}),r),disabled:d||o,...u,children:[o?(0,n.jsxs)("svg",{className:"h-3 w-3 animate-spin",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",fill:"none",opacity:"0.25"}),(0,n.jsx)("path",{fill:"currentColor",d:"M4 12a8 8 0 018-8v2a6 6 0 00-6 6H4z"})]}):null,c]})});o.displayName="Button"},29832:(e,t,r)=>{r.r(t),r.d(t,{CreateProjectDialog:()=>u});var n=r(79639),l=r(40927),a=r(80680),s=r(79437),i=r(11110),o=r(83598),d=r(45010),c=r(94253);function u(e){var t,r;let{open:u,onClose:b,orgs:f,preferredSlug:x}=e,m=(0,a.useRouter)(),[p,g]=(0,l.useState)(null!=(r=null==(t=f[0])?void 0:t.id)?r:""),[h,v]=(0,l.useState)(""),[j,y]=(0,l.useState)(""),[N,w]=(0,l.useState)(!1),[k,C]=(0,l.useState)(""),[S,E]=(0,l.useState)(!1);async function D(e){var t,r,n,l;if(e.preventDefault(),E(!0),!h.trim())return;w(!0),C("");let a=await fetch("/api/v1/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({space_id:p,name:h.trim(),description:j.trim()||void 0})}),s=await a.json();if(!a.ok||!s.data){C(null!=(n=null==(r=s.errors)||null==(t=r[0])?void 0:t.message)?n:"Failed to create terminal"),w(!1);return}b(),m.push("/p/".concat(null!=(l=s.data.slug)?l:s.data.ticker))}return(0,l.useEffect)(()=>{if(!u){v(""),y(""),C(""),E(!1);return}if(x){let e=f.find(e=>e.slug===x);e&&g(e.id)}},[u,x,f]),(0,n.jsx)(s.l,{open:u,onClose:b,title:"New terminal",children:(0,n.jsxs)("form",{onSubmit:D,className:"space-y-3",noValidate:!0,children:[(0,n.jsx)(d.j,{message:k}),f.length>1?(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)("label",{htmlFor:"create-terminal-space",className:"text-xs font-medium text-text-1",children:"Space"}),(0,n.jsx)("select",{id:"create-terminal-space",value:p,onChange:e=>g(e.target.value),className:"h-9 rounded border border-border bg-bg-2 px-3 text-sm text-text-0 focus:border-border-focus focus:outline-none",children:f.map(e=>(0,n.jsx)("option",{value:e.id,children:e.name},e.id))})]}):null,(0,n.jsx)(o.p,{name:"name",label:"Name",placeholder:"e.g. 123 Brickell, Acme Acquisition, Our Home…",autoFocus:!0,required:!0,value:h,onChange:e=>v(e.target.value),error:!h.trim()&&S?"Required":void 0}),(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsxs)("label",{htmlFor:"create-terminal-description",className:"text-xs font-medium text-text-1",children:["Description ",(0,n.jsx)("span",{className:"text-text-3",children:"(optional)"})]}),(0,n.jsx)("textarea",{id:"create-terminal-description",value:j,onChange:e=>y(e.target.value),rows:2,placeholder:"What is this space for?",className:"rounded border border-border bg-bg-2 px-3 py-2 text-sm text-text-0 placeholder:text-text-3 focus:border-border-focus focus:outline-none"}),(0,n.jsx)(c.o,{children:"Optional — describe the goal or scope."})]}),(0,n.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,n.jsx)(i.$,{type:"button",variant:"ghost",onClick:b,children:"Cancel"}),(0,n.jsx)(i.$,{type:"submit",variant:"accent",loading:N,children:"Create"})]})]})})}},45010:(e,t,r)=>{r.d(t,{j:()=>i});var n=r(79639),l=r(4434),a=r(20311),s=r(37845);function i(e){let{message:t,onDismiss:r,className:i}=e;return t?(0,n.jsxs)("div",{role:"alert",className:(0,s.cn)("flex items-start gap-2 rounded-sm border border-danger/40 bg-danger-subtle px-3 py-2 text-xs text-danger",i),children:[(0,n.jsx)(l.A,{className:"mt-0.5 h-3.5 w-3.5 flex-shrink-0","aria-hidden":"true"}),(0,n.jsx)("p",{className:"flex-1 leading-tight",children:t}),r?(0,n.jsx)("button",{type:"button",onClick:r,"aria-label":"Dismiss",className:"-mr-1 rounded-sm p-0.5 text-danger/70 hover:bg-danger/10 hover:text-danger focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",children:(0,n.jsx)(a.A,{className:"h-3 w-3"})}):null]}):null}},75644:(e,t,r)=>{r.d(t,{F:()=>s});var n=r(61482);let l=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,a=n.$,s=(e,t)=>r=>{var n;if((null==t?void 0:t.variants)==null)return a(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:s,defaultVariants:i}=t,o=Object.keys(s).map(e=>{let t=null==r?void 0:r[e],n=null==i?void 0:i[e];if(null===t)return null;let a=l(t)||l(n);return s[e][a]}),d=r&&Object.entries(r).reduce((e,t)=>
1{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return a(e,o,null==t||null==(n=t.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...l}=t;return Object.entries(l).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...d}[t]):({...i,...d})[t]===r})?[...e,r,n]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)}},79437:(e,t,r)=>{r.d(t,{l:()=>i});var n=r(79639),l=r(40927),a=r(20311),s=r(37845);function i(e){let{open:t,onClose:r,title:i,children:d,className:c}=e,u=(0,l.useRef)(null),b=(0,l.useRef)("dialog-title-".concat(Math.random().toString(36).slice(2,9)));return((0,l.useEffect)(()=>{if(!t)return;let e=document.activeElement instanceof HTMLElement?document.activeElement:null,r=setTimeout(()=>{var e;let t=u.current;if(!t||t.contains(document.activeElement))return;let r=null!=(e=function(e){var t;let r=e.querySelector("[data-autofocus]");if(r)return r;let n=o(e),l=n.find(e=>"Close"!==e.getAttribute("aria-label"));return null!=(t=null!=l?l:n[0])?t:null}(t))?e:t.querySelector("button[aria-label='Close']");null==r||r.focus()},0);return()=>{clearTimeout(r),null==e||e.focus({preventScroll:!0})}},[t]),(0,l.useEffect)(()=>{if(!t)return;let e=e=>{if("Escape"===e.key){e.preventDefault(),r();return}if("Tab"!==e.key)return;let t=u.current;if(!t)return;let n=o(t);if(0===n.length)return void e.preventDefault();let l=n[0],a=n[n.length-1],s=document.activeElement;e.shiftKey?s!==l&&t.contains(s)||(e.preventDefault(),a.focus()):s===a&&(e.preventDefault(),l.focus())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,r]),t)?(0,n.jsx)("div",{className:"fixed inset-0 z-[1050] flex items-start justify-center bg-bg-0/80 px-4 pt-24 backdrop-blur-sm",onClick:r,role:"dialog","aria-modal":"true","aria-labelledby":b.current,children:(0,n.jsxs)("div",{ref:u,className:(0,s.cn)("w-full max-w-md rounded-md border border-border bg-bg-1 shadow-lg",c),onClick:e=>e.stopPropagation(),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3",children:[(0,n.jsx)("h2",{id:b.current,className:"text-sm font-semibold text-text-0",children:i}),(0,n.jsx)("button",{type:"button",onClick:r,"aria-label":"Close",className:"rounded-sm p-1 text-text-2 hover:bg-bg-3 hover:text-text-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",children:(0,n.jsx)(a.A,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]}),(0,n.jsx)("div",{className:"p-4",children:d})]})}):null}function o(e){return Array.from(e.querySelectorAll("a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1']),[contenteditable='true']")).filter(e=>!e.hasAttribute("aria-hidden"))}},83598:(e,t,r)=>{r.d(t,{p:()=>s});var n=r(79639),l=r(40927),a=r(37845);let s=(0,l.forwardRef)((e,t)=>{let{className:r,label:l,hint:s,error:i,monospace:o,id:d,...c}=e,u=null!=d?d:c.name;return(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[l?(0,n.jsx)("label",{htmlFor:u,className:"text-xs font-medium text-text-1",children:l}):null,(0,n.jsx)("input",{ref:t,id:u,className:(0,a.cn)("h-9 rounded border bg-bg-2 px-3 text-sm text-text-0 placeholder:text-text-3","focus:border-border-focus focus:outline-none",i?"border-danger":"border-border",o&&"font-mono",r),...c}),i?(0,n.jsx)("span",{className:"text-xs text-danger",children:i}):s?(0,n.jsx)("span",{className:"text-xs text-text-2",children:s}):null]})});s.displayName="Input"},94253:(e,t,r)=>{r.d(t,{o:()=>a});var n=r(79639),l=r(37845);function a(e){let{children:t,tone:r="muted",className:a,id:s}=e;return(0,n.jsx)("span",{id:s,className:(0,l.cn)("text-[11px] leading-tight","danger"===r?"text-danger":"text-text-3",a),children:t})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.