1(function() { 2 try { 3 var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}; 4 e.SENTRY_RELEASE = { id: "b96dc26" }; 5 var n = new e.Error().stack; 6 n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "3aa3ef5a-801f-4e75-849a-de854e22c947", e._sentryDebugIdIdentifier = "sentry-dbid-3aa3ef5a-801f-4e75-849a-de854e22c947"); 7 } catch (e) {} 8})(); 9import { n as __esmMin } from "./rolldown-runtime-sLwMD6dS.js"; 10import { i as require_compiler_runtime, t as require_jsx_runtime } from "./jsx-runtime-CHSMGLHp.js"; 11import { t as require_react } from "./react-CrLPhuc5.js"; 12import { r as init_button, t as Button } from "./button-DOiPZHfy.js"; 13import { a as init_dist, s as usePage } from "./dist-ZlUHm0R7.js"; 14import { n as useFlashMessages, t as init_useFlashMessages } from "./useFlashMessages-CaMVzoCv.js"; 15import { n as init_OnboardingLayout, t as OnboardingLayout } from "./OnboardingLayout-BnUCTf-h.js"; 16import { i as init_AccountSetup, n as init_OnboardingHeader, r as AccountSetupHeading, t as OnboardingHeader } from "./OnboardingHeader-C7IoGNdr.js"; 17import { n as init_i18n, r as t } from "./i18n-D_KmXEqY.js"; 18import { n as ContinueSubmit, r as init_ContinueButton } from "./ContinueButton-D6lk9eQx.js"; 19import { n as init_OptionGroup, t as OptionGroup } from "./OptionGroup-CjRWDlM4.js"; 20import { n as useOnboardingSubmit, t as init_useOnboardingSubmit } from "./useOnboardingSubmit-C4r1z2d6.js"; 21//#region app/frontend/pages/Onboarding/TeamSelection.tsx 22/** 23* /onboarding/team_selection â the Inertia port of `Onboarding::TeamSelectionComponent`. 24* 25* The teams offered here are the ones the controller already decided the user may 26* join (same domain, `invite_by_domain`), so the page only carries the choice back: 27* `team` is either a team id or the literal `create-team` sentinel the legacy form 28* posted, which the controller still branches on. 29*/ 30function TeamSelection() { 31 const $ = (0, import_compiler_runtime.c)(38); 32 const { props } = usePage(); 33 const { proposedTeams, createTeamOption, userFirstName, submitPath, skipPath, emailAddress, logoutPath, flash } = props; 34 let t0; 35 if ($[0] === Symbol.for("react.memo_cache_sentinel")) { 36 t0 = []; 37 $[0] = t0; 38 } else t0 = $[0]; 39 const [selected, setSelected] = (0, import_react.useState)(t0); 40 const { submitting, submit: submitVisit } = useOnboardingSubmit(); 41 useFlashMessages(flash); 42 let t1; 43 if ($[1] !== selected[0] || $[2] !== selected.length || $[3] !== submitPath || $[4] !== submitVisit || $[5] !== submitting) { 44 t1 = (event) => { 45 event.preventDefault(); 46 if (selected.length === 0 || submitting) return; 47 submitVisit("put", submitPath, { team: selected[0] }); 48 }; 49 $[1] = selected[0]; 50 $[2] = selected.length; 51 $[3] = submitPath; 52 $[4] = submitVisit; 53 $[5] = submitting; 54 $[6] = t1; 55 } else t1 = $[6]; 56 const submit = t1; 57 let t2; 58 if ($[7] !== emailAddress || $[8] !== logoutPath) { 59 t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OnboardingHeader, { 60 emailAddress, 61 logoutPath 62 }); 63 $[7] = emailAddress; 64 $[8] = logoutPath; 65 $[9] = t2; 66 } else t2 = $[9]; 67 let t3; 68 if ($[10] !== userFirstName) { 69 t3 = t("devise.registrations.new.team_selection.pretitle", { first_name: userFirstName }); 70 $[10] = userFirstName; 71 $[11] = t3; 72 } else t3 = $[11]; 73 let t4; 74 let t5; 75 if ($[12] === Symbol.for("react.memo_cache_sentinel")) { 76 t4 = t("devise.registrations.new.team_selection.title"); 77 t5 = t("devise.registrations.new.team_selection.description"); 78 $[12] = t4; 79 $[13] = t5; 80 } else { 81 t4 = $[12]; 82 t5 = $[13]; 83 } 84 let t6; 85 if ($[14] !== t3) { 86 t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AccountSetupHeading, { 87 pretitle: t3, 88 title: t4, 89 description: t5 90 }); 91 $[14] = t3; 92 $[15] = t6; 93 } else t6 = $[15]; 94 let t7; 95 if ($[16] !== createTeamOption || $[17] !== proposedTeams) { 96 t7 = [...proposedTeams, createTeamOption]; 97 $[16] = createTeamOption; 98 $[17] = proposedTeams; 99 $[18] = t7; 100 } else t7 = $[18]; 101 let t8; 102 if ($[19] !== selected || $[20] !== t7) { 103 t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OptionGroup, { 104 name: "team", 105 options: t7, 106 selected, 107 onChange: setSelected 108 }); 109 $[19] = selected; 110 $[20] = t7; 111 $[21] = t8; 112 } else t8 = $[21]; 113 const t9 = selected.length === 0 || submitting; 114 let t10; 115 if ($[22] !== t9) { 116 t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ContinueSubmit, { disabled: t9 }); 117 $[22] = t9; 118 $[23] = t10; 119 } else t10 = $[23]; 120 let t11; 121 if ($[24] === Symbol.for("react.memo_cache_sentinel")) { 122 t11 = t("devise.registrations.new.team_selection.skip"); 123 $[24] = t11; 124 } else t11 = $[24]; 125 let t12; 126 if ($[25] !== skipPath) { 127 t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, { 128 asChild: true, 129 variant: "ghost", 130 fullWidth: true, 131 children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { 132 href: skipPath, 133 children: t11 134 }) 135 }); 136 $[25] = skipPath; 137 $[26] = t12; 138 } else t12 = $[26]; 139 let t13; 140 if ($[27] !== t10 || $[28] !== t12) { 141 t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 142 className: "account-setup__actions", 143 children: [t10, t12] 144 }); 145 $[27] = t10; 146 $[28] = t12; 147 $[29] = t13; 148 } else t13 = $[29]; 149 let t14; 150 if ($[30] !== submit || $[31] !== t13 || $[32] !== t6 || $[33] !== t8) { 151 t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { 152 className: "account-setup", 153 children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", { 154 onSubmit: submit, 155 children: [ 156 t6, 157 t8, 158 t13 159 ] 160 }) 161 }); 162 $[30] = submit; 163 $[31] = t13; 164 $[32] = t6; 165 $[33] = t8; 166 $[34] = t14; 167 } else t14 = $[34]; 168 let t15; 169 if ($[35] !== t14 || $[36] !== t2) { 170 t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t2, t14] }); 171 $[35] = t14; 172 $[36] = t2; 173 $[37] = t15; 174 } else t15 = $[37]; 175 return t15; 176} 177var import_compiler_runtime, import_react, import_jsx_runtime; 178function init_TeamSelection() { 179 return (init_TeamSelection = __esmMin((() => { 180 import_compiler_runtime = require_compiler_runtime(); 181 import_react = require_react(); 182 init_dist(); 183 init_OnboardingLayout(); 184 init_AccountSetup(); 185 init_ContinueButton(); 186 init_OnboardingHeader(); 187 init_OptionGroup(); 188 init_i18n(); 189 init_useOnboardingSubmit(); 190 init_useFlashMessages(); 191 init_button(); 192 import_jsx_runtime = require_jsx_runtime(); 193 TeamSelection.layout = (page) => (0, import_react.createElement)(OnboardingLayout, null, page); 194 })))(); 195} 196//#endregion 197init_TeamSelection(); 198export { TeamSelection as default };
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.