1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[16456],{583(e,t,n){e.exports=n.p+"assets/media/3a28c1f0e0b742dbaacc.svg?url"},9320(e,t,n){n.r(t),n.d(t,{default:()=>N});var o=n(36870),a=n(44110),s=n(86326),r=n(82432),i=n(2997),l=n(81857),c=n(19943),u=n(94369),d=n(36940),h=n(58e3),p=n(60351),g=n(583),m=n(6138),w=n(42661),f=n(89741),j=n(8687),x=n(90983),C=n(53227),y=n(28787),b=n(27264),k=n(84853);let A="cursor-origin-claim-token",S="Connect your Cursor Origin installation",v=()=>{let e=(()=>{let e=new URLSearchParams(window.location.hash.substring(1)).get("token");if(e)return e;let t=(0,c.ji)(window.location.search),n=t&&(0,m.KW)(t);return n?new URLSearchParams(n).get("token")??"":""})();return e?((0,m.J2)(A,e),e):(0,m.Hd)(A)??""};function N(){let e=(0,p._)("project_corphish_ui"),[t,n]=(0,s.useState)(()=>e?v():"");return((0,s.useEffect)(()=>{if(!e)return;let t=v();n(e=>e||t);let o=(0,c.ji)(window.location.search);o&&(0,m.sc)(o),(window.location.hash||o)&&window.history.replaceState(null,"",window.location.pathname)},[e]),e)?t?(0,o.jsx)(L,{token:t}):(0,o.jsx)(y.A,{title:S,illustration:g,children:(0,o.jsx)(C.A,{error:(0,o.jsx)("span",{children:"This claim link is missing or was already used. You can connect Cursor Origin from the project import flow instead."})})}):(0,o.jsx)(k.default,{})}function L(e){let{token:t}=e,n=(0,l.gf)(),c=(0,x.wA)(),p=(0,r.d4)(e=>(0,i.N8)(e)),k=(0,r.d4)(e=>(0,i.PR)(e)),[v,N]=(0,s.useState)(""),L=v||k?.get("slug")||"",P=p.find(e=>e?.get("slug")===L)||k,_=p.size>1,{data:O,isLoading:R}=(0,h.C)(L),Y=!R&&!!O&&!O.canCreateSites,T=async()=>{await new f.A(n.token,n.root).claim({token:t,accountId:P.get("id")}),(0,m.X)(A),L!==k?.get("slug")&&(c((0,i.Rc)(L)),await c((0,i.yG)(L))),c((0,u.U0)(w.zG.cursor_origin,{})),j.N.replace("/start/repos")};return(0,o.jsxs)(y.A,{title:S,illustration:g,action:(0,o.jsx)(b.A,{saveLabel:"Connect to this team",savingLabel:"Connecting",onSave:T,disabled:!P||Y,renderError:e=>(0,o.jsx)(C.A,{className:"tw-mb-4",error:(0,o.jsxs)("span",{children:[(e=>{let{message:t,error:n}=e??{};return t||n||"The claim could not be completed."})(e)," The claim link may have expired; you can connect Cursor Origin from the project import flow instead."]})})}),children:[(0,o.jsx)("p",{children:"You installed the Netlify app on Cursor Origin. Choose the Netlify team that installation should belong to. You can then import and deploy its repositories."}),(0,o.jsx)("p",{children:"If you did not just install the app on Cursor, close this page instead of connecting."}),_&&(0,o.jsx)(d.A,{accounts:p,data:(0,a.fromJS)({account_slug:L}),onChange:e=>{let{target:{value:t}}=e;return N(t)}}),Y&&(0,o.jsx)(C.A,{className:"tw-mt-4",error:(0,o.jsxs)("span",{className:"tw-flex tw-flex-col tw-gap-2",children:[(0,o.jsx)("strong",{children:"You donât have permission to connect an installation to this team."}),_?"Please choose another team or contact your team owner for access.":"Please contact your team owner for access."]})})]})}}}]);
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.