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] = "cd75be98-4869-4865-ba5e-1f1b9ff8a7f2", e._sentryDebugIdIdentifier = "sentry-dbid-cd75be98-4869-4865-ba5e-1f1b9ff8a7f2"); 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, l as router, s as usePage, t as Head_default } from "./dist-ZlUHm0R7.js"; 14import { r as init_AppLayout, t as AppLayout } from "./AppLayout-KSwds5qH.js"; 15import { n as useFlashMessages, t as init_useFlashMessages } from "./useFlashMessages-CaMVzoCv.js"; 16import { n as useLegacyBodyClass, t as init_useLegacyBodyClass } from "./useLegacyBodyClass-D667Iu64.js"; 17import { n as t, t as init_i18n } from "./i18n-Dzd-QM5H.js"; 18//#region app/frontend/pages/CancellationReasons/Show.tsx 19function Show() { 20 const $ = (0, import_compiler_runtime.c)(24); 21 const { props } = usePage(); 22 const { offer, paths, csrf } = props; 23 useLegacyBodyClass("cancellation_reasons show"); 24 useFlashMessages(props.flash); 25 let t0; 26 if ($[0] === Symbol.for("react.memo_cache_sentinel")) { 27 t0 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Head_default, { title: t("cancellation_reasons.show.meta_title") }); 28 $[0] = t0; 29 } else t0 = $[0]; 30 let t1; 31 if ($[1] === Symbol.for("react.memo_cache_sentinel")) { 32 t1 = t("close"); 33 $[1] = t1; 34 } else t1 = $[1]; 35 let t2; 36 if ($[2] !== paths.destroy) { 37 t2 = () => router.delete(paths.destroy); 38 $[2] = paths.destroy; 39 $[3] = t2; 40 } else t2 = $[3]; 41 let t3; 42 if ($[4] === Symbol.for("react.memo_cache_sentinel")) { 43 t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { 44 className: "far fa-times", 45 "aria-hidden": "true" 46 }); 47 $[4] = t3; 48 } else t3 = $[4]; 49 let t4; 50 if ($[5] !== t2) { 51 t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { 52 type: "button", 53 className: "close-box float-end", 54 "aria-label": t1, 55 onClick: t2, 56 children: t3 57 }); 58 $[5] = t2; 59 $[6] = t4; 60 } else t4 = $[6]; 61 let t5; 62 if ($[7] !== offer?.kind || $[8] !== paths.cancelAnyway || $[9] !== paths.pauseOffer) { 63 t5 = offer?.kind === "pause" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PauseOffer, { 64 pauseOfferPath: paths.pauseOffer, 65 cancelPath: paths.cancelAnyway 66 }); 67 $[7] = offer?.kind; 68 $[8] = paths.cancelAnyway; 69 $[9] = paths.pauseOffer; 70 $[10] = t5; 71 } else t5 = $[10]; 72 let t6; 73 if ($[11] !== csrf || $[12] !== offer || $[13] !== paths.cancelAnyway || $[14] !== paths.claimDiscount) { 74 t6 = offer?.kind === "discount" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DiscountOffer, { 75 yearly: offer.yearly === true, 76 plan: offer.plan ?? "", 77 claimDiscountPath: paths.claimDiscount, 78 cancelPath: paths.cancelAnyway, 79 csrf 80 }); 81 $[11] = csrf; 82 $[12] = offer; 83 $[13] = paths.cancelAnyway; 84 $[14] = paths.claimDiscount; 85 $[15] = t6; 86 } else t6 = $[15]; 87 let t7; 88 if ($[16] !== offer || $[17] !== paths.cancelAnyway) { 89 t7 = offer?.kind === "ineligible" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IneligibleOffer, { 90 blocker: offer.blocker ?? "", 91 cancelPath: paths.cancelAnyway 92 }); 93 $[16] = offer; 94 $[17] = paths.cancelAnyway; 95 $[18] = t7; 96 } else t7 = $[18]; 97 let t8; 98 if ($[19] !== t4 || $[20] !== t5 || $[21] !== t6 || $[22] !== t7) { 99 t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [t0, /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 100 className: "board-box board-box--unboxed", 101 children: [ 102 t4, 103 t5, 104 t6, 105 t7 106 ] 107 })] }); 108 $[19] = t4; 109 $[20] = t5; 110 $[21] = t6; 111 $[22] = t7; 112 $[23] = t8; 113 } else t8 = $[23]; 114 return t8; 115} 116function OfferIcon(t0) { 117 const $ = (0, import_compiler_runtime.c)(2); 118 const { icon } = t0; 119 const t1 = `far fa-${icon} cancellation-offer-icon`; 120 let t2; 121 if ($[0] !== t1) { 122 t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { 123 className: t1, 124 "aria-hidden": "true" 125 }); 126 $[0] = t1; 127 $[1] = t2; 128 } else t2 = $[1]; 129 return t2; 130} 131function CancelAnyway(t0) { 132 const $ = (0, import_compiler_runtime.c)(3); 133 const { path, label } = t0; 134 if (!path) return null; 135 let t1; 136 if ($[0] !== label || $[1] !== path) { 137 t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { 138 className: "black", 139 children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { 140 href: path, 141 children: label 142 }) 143 }); 144 $[0] = label; 145 $[1] = path; 146 $[2] = t1; 147 } else t1 = $[2]; 148 return t1; 149} 150function PauseOffer(t0) { 151 const $ = (0, import_compiler_runtime.c)(14); 152 const { pauseOfferPath, cancelPath } = t0; 153 let t1; 154 let t2; 155 let t3; 156 if ($[0] === Symbol.for("react.memo_cache_sentinel")) { 157 t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OfferIcon, { icon: "pause-circle" }); 158 t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: t("cancellation_reasons.show.has_finished.offer.title") }); 159 t3 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { dangerouslySetInnerHTML: { __html: t("cancellation_reasons.show.has_finished.offer.description_html") } }); 160 $[0] = t1; 161 $[1] = t2; 162 $[2] = t3; 163 } else { 164 t1 = $[0]; 165 t2 = $[1]; 166 t3 = $[2]; 167 } 168 let t4; 169 if ($[3] === Symbol.for("react.memo_cache_sentinel")) { 170 t4 = t("cancellation_reasons.show.has_finished.offer.learn_more"); 171 $[3] = t4; 172 } else t4 = $[3]; 173 let t5; 174 if ($[4] !== pauseOfferPath) { 175 t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, { 176 asChild: true, 177 variant: "primary", 178 size: "lg", 179 children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { 180 href: pauseOfferPath, 181 children: t4 182 }) 183 }); 184 $[4] = pauseOfferPath; 185 $[5] = t5; 186 } else t5 = $[5]; 187 let t6; 188 let t7; 189 if ($[6] === Symbol.for("react.memo_cache_sentinel")) { 190 t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}); 191 t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}); 192 $[6] = t6; 193 $[7] = t7; 194 } else { 195 t6 = $[6]; 196 t7 = $[7]; 197 } 198 let t8; 199 if ($[8] === Symbol.for("react.memo_cache_sentinel")) { 200 t8 = t("cancellation_reasons.show.has_finished.offer.cancel"); 201 $[8] = t8; 202 } else t8 = $[8]; 203 let t9; 204 if ($[9] !== cancelPath) { 205 t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CancelAnyway, { 206 path: cancelPath, 207 label: t8 208 }); 209 $[9] = cancelPath; 210 $[10] = t9; 211 } else t9 = $[10]; 212 let t10; 213 if ($[11] !== t5 || $[12] !== t9) { 214 t10 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 215 className: "cancellation-offer", 216 children: [ 217 t1, 218 t2, 219 t3, 220 t5, 221 t6, 222 t7, 223 t9 224 ] 225 }); 226 $[11] = t5; 227 $[12] = t9; 228 $[13] = t10; 229 } else t10 = $[13]; 230 return t10; 231} 232function DiscountOffer(t0) { 233 const $ = (0, import_compiler_runtime.c)(35); 234 const { yearly, plan, claimDiscountPath, cancelPath, csrf } = t0; 235 const [claiming, setClaiming] = (0, import_react.useState)(false); 236 const titleKey = yearly ? "title_yearly" : "title"; 237 const descriptionKey = yearly ? "description_yearly_html" : "description_html"; 238 const ctaKey = yearly ? "claim_discount_yearly" : "claim_discount"; 239 let t1; 240 if ($[0] === Symbol.for("react.memo_cache_sentinel")) { 241 t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OfferIcon, { icon: "tags" }); 242 $[0] = t1; 243 } else t1 = $[0]; 244 const t2 = `cancellation_reasons.show.too_expensive.offer.${titleKey}`; 245 let t3; 246 if ($[1] !== t2) { 247 t3 = t(t2); 248 $[1] = t2; 249 $[2] = t3; 250 } else t3 = $[2]; 251 let t4; 252 if ($[3] !== t3) { 253 t4 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: t3 }); 254 $[3] = t3; 255 $[4] = t4; 256 } else t4 = $[4]; 257 const t5 = `cancellation_reasons.show.too_expensive.offer.${descriptionKey}`; 258 let t6; 259 if ($[5] !== plan || $[6] !== t5) { 260 t6 = t(t5, { plan }); 261 $[5] = plan; 262 $[6] = t5; 263 $[7] = t6; 264 } else t6 = $[7]; 265 let t7; 266 if ($[8] !== t6) { 267 t7 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { dangerouslySetInnerHTML: { __html: t6 } }); 268 $[8] = t6; 269 $[9] = t7; 270 } else t7 = $[9]; 271 let t8; 272 if ($[10] === Symbol.for("react.memo_cache_sentinel")) { 273 t8 = () => setClaiming(true); 274 $[10] = t8; 275 } else t8 = $[10]; 276 let t9; 277 if ($[11] !== csrf.param || $[12] !== csrf.token) { 278 t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { 279 type: "hidden", 280 name: csrf.param, 281 value: csrf.token 282 }); 283 $[11] = csrf.param; 284 $[12] = csrf.token; 285 $[13] = t9; 286 } else t9 = $[13]; 287 let t10; 288 if ($[14] !== claiming || $[15] !== ctaKey) { 289 t10 = claiming ? t("cancellation_reasons.show.too_expensive.offer.claiming") : t(`cancellation_reasons.show.too_expensive.offer.${ctaKey}`); 290 $[14] = claiming; 291 $[15] = ctaKey; 292 $[16] = t10; 293 } else t10 = $[16]; 294 let t11; 295 if ($[17] !== claiming || $[18] !== t10) { 296 t11 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Button, { 297 type: "submit", 298 variant: "primary", 299 size: "lg", 300 disabled: claiming, 301 children: t10 302 }); 303 $[17] = claiming; 304 $[18] = t10; 305 $[19] = t11; 306 } else t11 = $[19]; 307 let t12; 308 if ($[20] !== claimDiscountPath || $[21] !== t11 || $[22] !== t9) { 309 t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("form", { 310 action: claimDiscountPath, 311 method: "post", 312 onSubmit: t8, 313 children: [t9, t11] 314 }); 315 $[20] = claimDiscountPath; 316 $[21] = t11; 317 $[22] = t9; 318 $[23] = t12; 319 } else t12 = $[23]; 320 let t13; 321 if ($[24] === Symbol.for("react.memo_cache_sentinel")) { 322 t13 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}); 323 $[24] = t13; 324 } else t13 = $[24]; 325 let t14; 326 let t15; 327 if ($[25] === Symbol.for("react.memo_cache_sentinel")) { 328 t14 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { 329 className: "grey", 330 children: t("cancellation_reasons.show.too_expensive.offer.discount_redeemed_once_only") 331 }); 332 t15 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}); 333 $[25] = t14; 334 $[26] = t15; 335 } else { 336 t14 = $[25]; 337 t15 = $[26]; 338 } 339 let t16; 340 if ($[27] === Symbol.for("react.memo_cache_sentinel")) { 341 t16 = t("cancellation_reasons.show.too_expensive.offer.cancel"); 342 $[27] = t16; 343 } else t16 = $[27]; 344 let t17; 345 if ($[28] !== cancelPath) { 346 t17 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CancelAnyway, { 347 path: cancelPath, 348 label: t16 349 }); 350 $[28] = cancelPath; 351 $[29] = t17; 352 } else t17 = $[29]; 353 let t18; 354 if ($[30] !== t12 || $[31] !== t17 || $[32] !== t4 || $[33] !== t7) { 355 t18 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 356 className: "cancellation-offer", 357 children: [ 358 t1, 359 t4, 360 t7, 361 t12, 362 t13, 363 t14, 364 t15, 365 t17 366 ] 367 }); 368 $[30] = t12; 369 $[31] = t17; 370 $[32] = t4; 371 $[33] = t7; 372 $[34] = t18; 373 } else t18 = $[34]; 374 return t18; 375} 376function IneligibleOffer(t0) { 377 const $ = (0, import_compiler_runtime.c)(13); 378 const { blocker, cancelPath } = t0; 379 let t1; 380 let t2; 381 if ($[0] === Symbol.for("react.memo_cache_sentinel")) { 382 t1 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OfferIcon, { icon: "tags" }); 383 t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: t("cancellation_reasons.show.too_expensive.ineligible.title") }); 384 $[0] = t1; 385 $[1] = t2; 386 } else { 387 t1 = $[0]; 388 t2 = $[1]; 389 } 390 const t3 = `cancellation_reasons.show.too_expensive.ineligible.${blocker}`; 391 let t4; 392 if ($[2] !== t3) { 393 t4 = t(t3); 394 $[2] = t3; 395 $[3] = t4; 396 } else t4 = $[3]; 397 let t5; 398 if ($[4] !== t4) { 399 t5 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: t4 }); 400 $[4] = t4; 401 $[5] = t5; 402 } else t5 = $[5]; 403 let t6; 404 if ($[6] === Symbol.for("react.memo_cache_sentinel")) { 405 t6 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}); 406 $[6] = t6; 407 } else t6 = $[6]; 408 let t7; 409 if ($[7] === Symbol.for("react.memo_cache_sentinel")) { 410 t7 = t("cancellation_reasons.show.too_expensive.offer.cancel"); 411 $[7] = t7; 412 } else t7 = $[7]; 413 let t8; 414 if ($[8] !== cancelPath) { 415 t8 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CancelAnyway, { 416 path: cancelPath, 417 label: t7 418 }); 419 $[8] = cancelPath; 420 $[9] = t8; 421 } else t8 = $[9]; 422 let t9; 423 if ($[10] !== t5 || $[11] !== t8) { 424 t9 = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { 425 className: "cancellation-offer", 426 children: [ 427 t1, 428 t2, 429 t5, 430 t6, 431 t8 432 ] 433 }); 434 $[10] = t5; 435 $[11] = t8; 436 $[12] = t9; 437 } else t9 = $[12]; 438 return t9; 439} 440var import_compiler_runtime, import_react, import_jsx_runtime; 441function init_Show() { 442 return (init_Show = __esmMin((() => { 443 import_compiler_runtime = require_compiler_runtime(); 444 init_dist(); 445 import_react = require_react(); 446 init_AppLayout(); 447 init_button(); 448 init_useLegacyBodyClass(); 449 init_useFlashMessages(); 450 init_i18n(); 451 import_jsx_runtime = require_jsx_runtime(); 452 Show.layout = (page) => (0, import_react.createElement)(AppLayout, { rowLayout: true }, page); 453 })))(); 454} 455//#endregion 456init_Show(); 457export { Show 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.