hyperbook 0.113.1 → 0.113.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/asset-manifest.json +9 -9
  2. package/dist/assets/directive-bitflow/{EditorElement-zyz99U6n.js → EditorElement-BNwEKIvk.js} +258 -258
  3. package/dist/assets/directive-bitflow/{ReportElements-BnX14NtV.js → ReportElements-CAvHx5xm.js} +2 -2
  4. package/dist/assets/directive-bitflow/{bitLoaders-DIGwTcpd.js → bitLoaders-7qanePQL.js} +1138 -1073
  5. package/dist/assets/directive-bitflow/{dom-uYx_3K1r.js → dom-B6NPWBb1.js} +1558 -1551
  6. package/dist/assets/directive-bitflow/editor.js +3 -3
  7. package/dist/assets/directive-bitflow/flow.js +4 -4
  8. package/dist/assets/directive-bitflow/{index-BseSaQlX.js → index-4JaKZ7WT.js} +2 -2
  9. package/dist/assets/directive-bitflow/{index-e_8twLaN.js → index-6CQr_atd.js} +120 -120
  10. package/dist/assets/directive-bitflow/{index-COndsSPW.js → index-B9iG-a48.js} +9 -9
  11. package/dist/assets/directive-bitflow/{index-C5czXkRd.js → index-BFYoOtcY.js} +36 -36
  12. package/dist/assets/directive-bitflow/{index-YPMWh-1B.js → index-BI6aFdIS.js} +21 -21
  13. package/dist/assets/directive-bitflow/{index-D7m-hJZ9.js → index-Bf078mfo.js} +69 -69
  14. package/dist/assets/directive-bitflow/{index-Bf_FQRbK.js → index-BinE5Wvd.js} +19 -19
  15. package/dist/assets/directive-bitflow/{index-CFcRAa3F.js → index-BoX5-jkC.js} +31 -31
  16. package/dist/assets/directive-bitflow/{index-NyNuXp4C.js → index-BqRsXShM.js} +34 -34
  17. package/dist/assets/directive-bitflow/{index-Fr7yl4Vn.js → index-BxihQ8Oo.js} +21 -21
  18. package/dist/assets/directive-bitflow/{index-B3jMTk1o.js → index-C5YguHZU.js} +101 -101
  19. package/dist/assets/directive-bitflow/{index-XxGfBwJe.js → index-C8zwSmE6.js} +27 -27
  20. package/dist/assets/directive-bitflow/{index-BLcJNyog.js → index-C9JSBTNc.js} +91 -91
  21. package/dist/assets/directive-bitflow/{index-CjscG0z6.js → index-CCMI6UK4.js} +75 -75
  22. package/dist/assets/directive-bitflow/{index-CK1UMcfT.js → index-CGDt8H6s.js} +24 -24
  23. package/dist/assets/directive-bitflow/{index-xapm2BQE.js → index-Ca1v0pjV.js} +102 -92
  24. package/dist/assets/directive-bitflow/{index-IQHOi2fr.js → index-CaYn3Gmh.js} +31 -31
  25. package/dist/assets/directive-bitflow/{index-BpG316Ls.js → index-CbQue0If.js} +67 -67
  26. package/dist/assets/directive-bitflow/{index-CzdZQibq.js → index-CjH3h0OO.js} +79 -79
  27. package/dist/assets/directive-bitflow/{index-B7Z6Q-PQ.js → index-CkO3QfOS.js} +8 -8
  28. package/dist/assets/directive-bitflow/{index-BIJ7VfD2.js → index-Cz4i5rfe.js} +39 -39
  29. package/dist/assets/directive-bitflow/{index-8jTO-NJA.js → index-D0NtgeiX.js} +85 -85
  30. package/dist/assets/directive-bitflow/{index-DtsDy2By.js → index-D1C_1SPY.js} +14 -14
  31. package/dist/assets/directive-bitflow/{index-BdBBCZSy.js → index-D45u7EVR.js} +227 -194
  32. package/dist/assets/directive-bitflow/{index-cnRM_JDB.js → index-D9Ox4YpM.js} +33 -33
  33. package/dist/assets/directive-bitflow/{index-Bqf-kixT.js → index-DJ1w2Xcm.js} +46 -46
  34. package/dist/assets/directive-bitflow/{index-BQ5h4nDN.js → index-DUqW2fmV.js} +94 -94
  35. package/dist/assets/directive-bitflow/{index-ChgzyMHe.js → index-Deedj9EF.js} +25 -25
  36. package/dist/assets/directive-bitflow/{index-CZyaFdD2.js → index-Dg6nnY_v.js} +68 -68
  37. package/dist/assets/directive-bitflow/{index-kRpwcprB.js → index-DgxEzomz.js} +2 -2
  38. package/dist/assets/directive-bitflow/{index-D5yZNeIg.js → index-Dl0-ZAT5.js} +52 -52
  39. package/dist/assets/directive-bitflow/{index-DnVYIuen.js → index-Do6dmZyj.js} +42 -42
  40. package/dist/assets/directive-bitflow/{index-DjWNEPDL.js → index-DqnGC-DU.js} +31 -31
  41. package/dist/assets/directive-bitflow/{index-ivI25bnR.js → index-DwXXeSwk.js} +73 -73
  42. package/dist/assets/directive-bitflow/{index-Bf_NXJjq.js → index-b6qwcTj9.js} +15 -15
  43. package/dist/assets/directive-bitflow/{index-Fq7njn6_.js → index-d105UFQI.js} +58 -58
  44. package/dist/assets/directive-bitflow/{index-CW9iev-_.js → index-jijMWQB6.js} +8 -8
  45. package/dist/assets/directive-bitflow/{index-C_ZTSeqv.js → index-kxO5_U9Y.js} +24 -24
  46. package/dist/assets/directive-bitflow/{index-DoKlIgCD.js → index-p5AOgOal.js} +35 -35
  47. package/dist/assets/directive-bitflow/{index-CvCZVgKv.js → index-q2APknM6.js} +46 -46
  48. package/dist/assets/directive-bitflow/{index-eN2S_MLj.js → index-zVkWgm5I.js} +70 -70
  49. package/dist/assets/directive-bitflow/index.js +6 -6
  50. package/dist/assets/directive-bitflow/katex-DSLAjWZH-CHGN3Pr6.js +11314 -0
  51. package/dist/assets/directive-bitflow/katex-Dv-tcU2S-Dv-tcU2S.js +4 -0
  52. package/dist/assets/directive-bitflow/report.js +1 -1
  53. package/dist/assets/directive-bitflow/{shareableReport-ArQU1XjG.js → shareableReport-mdyEMdsJ.js} +6 -6
  54. package/dist/index.js +1 -1
  55. package/package.json +2 -2
@@ -1,5 +1,5 @@
1
- import { s as ln, a as S, j as c, B as Nt, w as ot, b as F, G as sn, X as cn, J as un, Y as dn, o as Ge, l as pn, m as fn, O as hn, $ as mn, p as bn, q as go, N as gn, T as wn, I as kn, u as xn, M as vn, A as yn, Q as Or, S as Sn, Z as An, v as Hr, D as Tn, _ as Nn, C as qt, W as Ln, U as Rn, z as En, F as zn, V as Cn, R as jn, H as _n, t as In, K as Dn } from "./dom-uYx_3K1r.js";
2
- const Pn = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--bitflow-color-primary-dark: light-dark(#004c45, #7cbfb2);--bitflow-color-primary-light: light-dark(#b5e3d8, #214640);--bitflow-color-on-primary: light-dark(#ffffff, #1e1e1e);--bitflow-color-neutral-900: light-dark(#242428, #f5f5f5);--bitflow-color-neutral-700: light-dark(#3c3c3c, #d6d6d6);--bitflow-color-neutral-400: light-dark(#a4a4a4, #7a7a7a);--bitflow-color-neutral-200: light-dark(#d6d6d6, #464646);--bitflow-color-neutral-100: light-dark(#f5f5f5, #353535);--bitflow-color-black: #000000;--bitflow-color-white: #ffffff;--bitflow-color-correct: light-dark(#017460, #57a396);--bitflow-color-correct-surface: light-dark(#e6f2ef, #18312d);--bitflow-color-wrong: light-dark(#a3282d, #c67a7d);--bitflow-color-wrong-surface: light-dark(#f8eaea, #3b2021);--bitflow-color-warning: light-dark(#8a6100, #af9452);--bitflow-color-warning-surface: light-dark(#fbf2df, #362d17);--bitflow-color-info: light-dark(#1f5673, #7496a8);--bitflow-color-info-surface: light-dark(#e8f0f4, #1e2a31);--bitflow-color-unknown: var(--bitflow-color-neutral-400);--bitflow-color-manual: light-dark(#5a4b8a, #958cb4);--bitflow-color-manual-surface: light-dark(#eeebf6, #2b2836);--bitflow-color-background: light-dark(#f5f5f5, #1e1e1e);--bitflow-color-surface: light-dark(#ffffff, #2c2c2c);--bitflow-color-border: var(--bitflow-color-neutral-200);--bitflow-color-text: var(--bitflow-color-neutral-900);--bitflow-color-text-muted: var(--bitflow-color-neutral-700);--bitflow-font-family: inherit;--bitflow-font-family-mono: "Ubuntu Mono", Menlo, Consolas, monospace;--bitflow-font-size-small: 14px;--bitflow-font-size-standard: 16px;--bitflow-font-size-large: 20px;--bitflow-font-size-xlarge: 24px;--bitflow-font-weight-standard: 400;--bitflow-font-weight-medium: 500;--bitflow-font-weight-bold: 700;--bitflow-line-height-standard: 1.5;--bitflow-line-height-tight: 1.25;--bitflow-space-xxsmall: 4px;--bitflow-space-xsmall: 8px;--bitflow-space-small: 16px;--bitflow-space-medium: 24px;--bitflow-space-large: 32px;--bitflow-space-xlarge: 48px;--bitflow-radius-small: 4px;--bitflow-radius-standard: 8px;--bitflow-radius-large: 12px;--bitflow-radius-full: 9999px;--bitflow-border-width: 2px;--bitflow-shadow-standard: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);--bitflow-shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);--bitflow-shadow-outline: 0 0 0 3px color-mix(in srgb, var(--bitflow-color-primary) 40%, transparent);--bitflow-motion-scale: 1;--bitflow-duration-fast: calc(.12s * var(--bitflow-motion-scale));--bitflow-duration-standard: calc(.2s * var(--bitflow-motion-scale))}@media(prefers-reduced-motion:reduce){:root,:host{--bitflow-motion-scale: 0}}.bitflow-root{font-family:var(--bitflow-font-family);font-size:var(--bitflow-font-size-standard);line-height:var(--bitflow-line-height-standard);color:var(--bitflow-color-text)}.bitflow-root,.bitflow-root *,.bitflow-root *:before,.bitflow-root *:after{box-sizing:border-box}.bitflow-stack{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-stack-small{gap:var(--bitflow-space-xsmall)}.bitflow-stack-large{gap:var(--bitflow-space-medium)}.bitflow-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-row-end{justify-content:flex-end}.bitflow-row-between{justify-content:space-between}.bitflow-grid{display:grid;gap:var(--bitflow-space-small);grid-template-columns:repeat(auto-fit,minmax(var(--bitflow-grid-min, 220px),1fr))}.bitflow-content{max-width:var(--bitflow-max-width-content, none);margin-inline:auto;width:100%}.bitflow-heading{font-family:var(--bitflow-font-family);font-weight:var(--bitflow-font-weight-bold);line-height:var(--bitflow-line-height-tight);margin:0}h1.bitflow-heading{font-size:var(--bitflow-font-size-xlarge)}h2.bitflow-heading{font-size:var(--bitflow-font-size-large)}h3.bitflow-heading,h4.bitflow-heading,h5.bitflow-heading,h6.bitflow-heading{font-size:var(--bitflow-font-size-standard)}.bitflow-text{margin:0}.bitflow-text-muted{color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.bitflow-card{background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);box-shadow:var(--bitflow-shadow-standard);padding:var(--bitflow-space-medium)}.bitflow-alert{display:flex;gap:var(--bitflow-space-xsmall);align-items:flex-start;padding:var(--bitflow-space-small);border-radius:var(--bitflow-radius-standard);border-left:4px solid var(--bitflow-alert-accent, var(--bitflow-color-info));background:var(--bitflow-alert-surface, var(--bitflow-color-info-surface));color:var(--bitflow-color-text)}.bitflow-alert[hidden]{display:none}.bitflow-alert-success{--bitflow-alert-accent: var(--bitflow-color-correct);--bitflow-alert-surface: var(--bitflow-color-correct-surface)}.bitflow-alert-error{--bitflow-alert-accent: var(--bitflow-color-wrong);--bitflow-alert-surface: var(--bitflow-color-wrong-surface)}.bitflow-alert-warning{--bitflow-alert-accent: var(--bitflow-color-warning);--bitflow-alert-surface: var(--bitflow-color-warning-surface)}.bitflow-alert-info{--bitflow-alert-accent: var(--bitflow-color-info);--bitflow-alert-surface: var(--bitflow-color-info-surface)}.bitflow-button{font:inherit;font-weight:var(--bitflow-font-weight-medium);display:inline-flex;align-items:center;justify-content:center;gap:var(--bitflow-space-xxsmall);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);min-height:44px;border:var(--bitflow-border-width) solid transparent;border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-primary);color:var(--bitflow-color-on-primary);cursor:pointer;transition:background-color var(--bitflow-duration-fast) ease-out}.bitflow-button:hover:not(:disabled){background:var(--bitflow-color-primary-dark)}.bitflow-button:disabled{opacity:.5;cursor:not-allowed}.bitflow-button-secondary{background:transparent;color:var(--bitflow-color-primary-dark);border-color:var(--bitflow-color-border)}.bitflow-button-secondary:hover:not(:disabled){background:var(--bitflow-color-neutral-100)}.bitflow-button-quiet{background:transparent;color:var(--bitflow-color-text-muted);border-color:transparent}.bitflow-button-quiet:hover:not(:disabled){background:var(--bitflow-color-neutral-100);color:var(--bitflow-color-text)}.bitflow-input,.bitflow-select,.bitflow-textarea{font:inherit;width:100%;padding:var(--bitflow-space-xsmall);min-height:44px;color:var(--bitflow-color-text);background:var(--bitflow-color-surface);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-textarea{min-height:6em;resize:vertical}.bitflow-input:hover,.bitflow-select:hover,.bitflow-textarea:hover{border-color:var(--bitflow-color-neutral-400)}.bitflow-input[aria-invalid=true],.bitflow-select[aria-invalid=true],.bitflow-textarea[aria-invalid=true]{border-color:var(--bitflow-color-wrong)}.bitflow-root :focus-visible{outline:none;box-shadow:var(--bitflow-shadow-outline);border-radius:var(--bitflow-radius-small)}.bitflow-option{display:flex;align-items:center;gap:var(--bitflow-space-xsmall);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface);cursor:pointer;transition:border-color var(--bitflow-duration-fast) ease-out}.bitflow-option:hover{border-color:var(--bitflow-color-neutral-400)}.bitflow-option:has(:checked){border-color:var(--bitflow-color-primary);background:var(--bitflow-color-correct-surface)}.bitflow-option:has(:disabled){cursor:default;opacity:.75}.bitflow-option input{margin:0;width:1.15em;height:1.15em;flex-shrink:0;accent-color:var(--bitflow-color-primary)}.bitflow-field{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall)}.bitflow-label{font-weight:var(--bitflow-font-weight-medium)}.bitflow-hint{color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-field-error{color:var(--bitflow-color-wrong);font-size:var(--bitflow-font-size-small)}.bitflow-state{display:inline-flex;align-items:center;gap:var(--bitflow-space-xxsmall);padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border-radius:var(--bitflow-radius-full);font-size:var(--bitflow-font-size-small);font-weight:var(--bitflow-font-weight-medium);background:var(--bitflow-state-surface, var(--bitflow-color-neutral-100));color:var(--bitflow-state-color, var(--bitflow-color-text-muted))}.bitflow-state-correct{--bitflow-state-color: var(--bitflow-color-correct);--bitflow-state-surface: var(--bitflow-color-correct-surface)}.bitflow-state-wrong{--bitflow-state-color: var(--bitflow-color-wrong);--bitflow-state-surface: var(--bitflow-color-wrong-surface)}.bitflow-state-manual{--bitflow-state-color: var(--bitflow-color-manual);--bitflow-state-surface: var(--bitflow-color-manual-surface)}.bitflow-state-unknown{--bitflow-state-color: var(--bitflow-color-text-muted);--bitflow-state-surface: var(--bitflow-color-neutral-100)}.bitflow-bit{max-width:var(--bitflow-max-width-content, none);width:100%}.bitflow-prose>:first-child{margin-top:0}.bitflow-prose>:last-child{margin-bottom:0}.bitflow-prose p,.bitflow-prose ul,.bitflow-prose ol,.bitflow-prose blockquote{margin-block:0 var(--bitflow-space-xsmall)}.bitflow-prose code{font-family:var(--bitflow-font-family-mono);background:var(--bitflow-color-neutral-100);border-radius:var(--bitflow-radius-small);padding:0 var(--bitflow-space-xxsmall)}.bitflow-prose pre{background:var(--bitflow-color-neutral-100);border-radius:var(--bitflow-radius-standard);padding:var(--bitflow-space-small);overflow-x:auto}.bitflow-prose pre code{background:none;padding:0}.bitflow-prose img{max-width:100%;height:auto;border-radius:var(--bitflow-radius-small)}.bitflow-prose blockquote{border-left:4px solid var(--bitflow-color-border);padding-left:var(--bitflow-space-small);color:var(--bitflow-color-text-muted)}.bitflow-prose a{color:var(--bitflow-color-primary-dark)}.bitflow-disclosure{border-top:1px solid var(--bitflow-color-border);padding-top:var(--bitflow-space-small)}.bitflow-disclosure-summary{cursor:pointer;display:flex;align-items:center;gap:var(--bitflow-space-xsmall);min-height:44px;font-weight:var(--bitflow-font-weight-medium);color:var(--bitflow-color-text-muted);margin-bottom:var(--bitflow-space-xsmall)}.bitflow-disclosure-summary::marker,.bitflow-disclosure-summary::-webkit-details-marker{content:"";display:none}.bitflow-disclosure-summary:before{content:"";flex:none;width:.4em;height:.4em;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(-45deg);transform-origin:center;transition:transform var(--bitflow-duration-fast)}.bitflow-disclosure[open]>.bitflow-disclosure-summary:before{transform:rotate(45deg)}.bitflow-disclosure[open] .bitflow-disclosure-summary{color:var(--bitflow-color-text)}.bitflow-image-row{display:flex;gap:var(--bitflow-space-small);align-items:flex-start}.bitflow-image-preview{width:96px;height:96px;object-fit:contain;background:var(--bitflow-color-neutral-100);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-image-preview-empty{flex:none}.bitflow-image-field .bitflow-input[type=file]{padding:var(--bitflow-space-xxsmall)}.bitflow-disclosure-aside{margin-inline-start:auto;padding-inline-start:var(--bitflow-space-xsmall);font-size:var(--bitflow-font-size-small);font-weight:400;color:var(--bitflow-color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:55%}.bitflow-boxeditor{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall)}.bitflow-boxeditor-area{position:relative;width:100%;overflow:hidden;cursor:crosshair;-webkit-user-select:none;user-select:none;touch-action:none;border-radius:var(--bitflow-radius-standard)}.bitflow-boxeditor-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.bitflow-boxeditor-noimage{background:var(--bitflow-color-neutral-100)}.bitflow-boxeditor-box{position:absolute;cursor:move;background:color-mix(in srgb,var(--bitflow-color-neutral-100) 45%,transparent);border:var(--bitflow-border-width) dashed var(--bitflow-color-neutral-400)}.bitflow-boxeditor-box-selected{border-style:solid;box-shadow:0 0 0 2px var(--bitflow-color-primary)}.bitflow-boxeditor-label{display:block;padding:2px 4px;overflow:hidden;font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text-muted);text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.bitflow-boxeditor-resize{position:absolute;right:-6px;bottom:-6px;width:14px;height:14px;cursor:nwse-resize;background:var(--bitflow-color-primary);border-radius:50%}.bitflow-boxeditor-drawing{position:absolute;pointer-events:none;background:color-mix(in srgb,var(--bitflow-color-primary) 18%,transparent);border:var(--bitflow-border-width) dashed var(--bitflow-color-primary)}', de = {
1
+ import { s as vo, a as y, j as c, W as Lt, k as it, b as F, q as bi, J as mi, G as gi, X as wi, o as Ge, m as ki, p as xi, O as vi, $ as yi, u as Si, v as yo, N as Ai, T as Ti, S as Ni, w as Li, M as Ri, A as Ei, Q as Fr, I as zi, Z as Ci, x as Br, D as ji, C as _i, _ as Ut, z as Ii, U as $i, B as Di, R as Pi, V as Oi, H as Hi, K as Fi, t as Bi, L as Mi } from "./dom-B6NPWBb1.js";
2
+ const qi = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--bitflow-color-primary-dark: light-dark(#004c45, #7cbfb2);--bitflow-color-primary-light: light-dark(#b5e3d8, #214640);--bitflow-color-on-primary: light-dark(#ffffff, #1e1e1e);--bitflow-color-neutral-900: light-dark(#242428, #f5f5f5);--bitflow-color-neutral-700: light-dark(#3c3c3c, #d6d6d6);--bitflow-color-neutral-400: light-dark(#a4a4a4, #7a7a7a);--bitflow-color-neutral-200: light-dark(#d6d6d6, #464646);--bitflow-color-neutral-100: light-dark(#f5f5f5, #353535);--bitflow-color-black: #000000;--bitflow-color-white: #ffffff;--bitflow-color-correct: light-dark(#017460, #57a396);--bitflow-color-correct-surface: light-dark(#e6f2ef, #18312d);--bitflow-color-wrong: light-dark(#a3282d, #c67a7d);--bitflow-color-wrong-surface: light-dark(#f8eaea, #3b2021);--bitflow-color-warning: light-dark(#8a6100, #af9452);--bitflow-color-warning-surface: light-dark(#fbf2df, #362d17);--bitflow-color-info: light-dark(#1f5673, #7496a8);--bitflow-color-info-surface: light-dark(#e8f0f4, #1e2a31);--bitflow-color-unknown: var(--bitflow-color-neutral-400);--bitflow-color-manual: light-dark(#5a4b8a, #958cb4);--bitflow-color-manual-surface: light-dark(#eeebf6, #2b2836);--bitflow-color-background: light-dark(#f5f5f5, #1e1e1e);--bitflow-color-surface: light-dark(#ffffff, #2c2c2c);--bitflow-color-border: var(--bitflow-color-neutral-200);--bitflow-color-text: var(--bitflow-color-neutral-900);--bitflow-color-text-muted: var(--bitflow-color-neutral-700);--bitflow-font-family: inherit;--bitflow-font-family-mono: "Ubuntu Mono", Menlo, Consolas, monospace;--bitflow-font-size-small: 14px;--bitflow-font-size-standard: 16px;--bitflow-font-size-large: 20px;--bitflow-font-size-xlarge: 24px;--bitflow-font-weight-standard: 400;--bitflow-font-weight-medium: 500;--bitflow-font-weight-bold: 700;--bitflow-line-height-standard: 1.5;--bitflow-line-height-tight: 1.25;--bitflow-space-xxsmall: 4px;--bitflow-space-xsmall: 8px;--bitflow-space-small: 16px;--bitflow-space-medium: 24px;--bitflow-space-large: 32px;--bitflow-space-xlarge: 48px;--bitflow-radius-small: 4px;--bitflow-radius-standard: 8px;--bitflow-radius-large: 12px;--bitflow-radius-full: 9999px;--bitflow-border-width: 2px;--bitflow-shadow-standard: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px 0 rgba(0, 0, 0, .06);--bitflow-shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);--bitflow-shadow-outline: 0 0 0 3px color-mix(in srgb, var(--bitflow-color-primary) 40%, transparent);--bitflow-motion-scale: 1;--bitflow-duration-fast: calc(.12s * var(--bitflow-motion-scale));--bitflow-duration-standard: calc(.2s * var(--bitflow-motion-scale))}@media(prefers-reduced-motion:reduce){:root,:host{--bitflow-motion-scale: 0}}.bitflow-root{font-family:var(--bitflow-font-family);font-size:var(--bitflow-font-size-standard);line-height:var(--bitflow-line-height-standard);color:var(--bitflow-color-text)}.bitflow-root,.bitflow-root *,.bitflow-root *:before,.bitflow-root *:after{box-sizing:border-box}.bitflow-stack{display:flex;flex-direction:column;gap:var(--bitflow-space-small)}.bitflow-stack-small{gap:var(--bitflow-space-xsmall)}.bitflow-stack-large{gap:var(--bitflow-space-medium)}.bitflow-row{display:flex;flex-wrap:wrap;align-items:center;gap:var(--bitflow-space-xsmall)}.bitflow-row-end{justify-content:flex-end}.bitflow-row-between{justify-content:space-between}.bitflow-grid{display:grid;gap:var(--bitflow-space-small);grid-template-columns:repeat(auto-fit,minmax(var(--bitflow-grid-min, 220px),1fr))}.bitflow-content{max-width:var(--bitflow-max-width-content, none);margin-inline:auto;width:100%}.bitflow-heading{font-family:var(--bitflow-font-family);font-weight:var(--bitflow-font-weight-bold);line-height:var(--bitflow-line-height-tight);margin:0}h1.bitflow-heading{font-size:var(--bitflow-font-size-xlarge)}h2.bitflow-heading{font-size:var(--bitflow-font-size-large)}h3.bitflow-heading,h4.bitflow-heading,h5.bitflow-heading,h6.bitflow-heading{font-size:var(--bitflow-font-size-standard)}.bitflow-text{margin:0}.bitflow-text-muted{color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.bitflow-card{background:var(--bitflow-color-surface);border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);box-shadow:var(--bitflow-shadow-standard);padding:var(--bitflow-space-medium)}.bitflow-alert{display:flex;gap:var(--bitflow-space-xsmall);align-items:flex-start;padding:var(--bitflow-space-small);border-radius:var(--bitflow-radius-standard);border-left:4px solid var(--bitflow-alert-accent, var(--bitflow-color-info));background:var(--bitflow-alert-surface, var(--bitflow-color-info-surface));color:var(--bitflow-color-text)}.bitflow-alert[hidden]{display:none}.bitflow-alert-success{--bitflow-alert-accent: var(--bitflow-color-correct);--bitflow-alert-surface: var(--bitflow-color-correct-surface)}.bitflow-alert-error{--bitflow-alert-accent: var(--bitflow-color-wrong);--bitflow-alert-surface: var(--bitflow-color-wrong-surface)}.bitflow-alert-warning{--bitflow-alert-accent: var(--bitflow-color-warning);--bitflow-alert-surface: var(--bitflow-color-warning-surface)}.bitflow-alert-info{--bitflow-alert-accent: var(--bitflow-color-info);--bitflow-alert-surface: var(--bitflow-color-info-surface)}.bitflow-button{font:inherit;font-weight:var(--bitflow-font-weight-medium);display:inline-flex;align-items:center;justify-content:center;gap:var(--bitflow-space-xxsmall);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);min-height:44px;border:var(--bitflow-border-width) solid transparent;border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-primary);color:var(--bitflow-color-on-primary);cursor:pointer;transition:background-color var(--bitflow-duration-fast) ease-out}.bitflow-button:hover:not(:disabled){background:var(--bitflow-color-primary-dark)}.bitflow-button:disabled{opacity:.5;cursor:not-allowed}.bitflow-button-secondary{background:transparent;color:var(--bitflow-color-primary-dark);border-color:var(--bitflow-color-border)}.bitflow-button-secondary:hover:not(:disabled){background:var(--bitflow-color-neutral-100)}.bitflow-button-quiet{background:transparent;color:var(--bitflow-color-text-muted);border-color:transparent}.bitflow-button-quiet:hover:not(:disabled){background:var(--bitflow-color-neutral-100);color:var(--bitflow-color-text)}.bitflow-input,.bitflow-select,.bitflow-textarea{font:inherit;width:100%;padding:var(--bitflow-space-xsmall);min-height:44px;color:var(--bitflow-color-text);background:var(--bitflow-color-surface);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-textarea{min-height:6em;resize:vertical}.bitflow-input:hover,.bitflow-select:hover,.bitflow-textarea:hover{border-color:var(--bitflow-color-neutral-400)}.bitflow-input[aria-invalid=true],.bitflow-select[aria-invalid=true],.bitflow-textarea[aria-invalid=true]{border-color:var(--bitflow-color-wrong)}.bitflow-root :focus-visible{outline:none;box-shadow:var(--bitflow-shadow-outline);border-radius:var(--bitflow-radius-small)}.bitflow-option{display:flex;align-items:center;gap:var(--bitflow-space-xsmall);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface);cursor:pointer;transition:border-color var(--bitflow-duration-fast) ease-out}.bitflow-option:hover{border-color:var(--bitflow-color-neutral-400)}.bitflow-option:has(:checked){border-color:var(--bitflow-color-primary);background:var(--bitflow-color-correct-surface)}.bitflow-option:has(:disabled){cursor:default;opacity:.75}.bitflow-option input{margin:0;width:1.15em;height:1.15em;flex-shrink:0;accent-color:var(--bitflow-color-primary)}.bitflow-field{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall)}.bitflow-label{font-weight:var(--bitflow-font-weight-medium)}fieldset.bitflow-field{border:0;margin:0;padding:0;min-width:0}fieldset.bitflow-field>legend{padding:0;margin-bottom:var(--bitflow-space-xxsmall)}:is(h1,h2,h3,h4,h5,h6).bitflow-label{font-size:inherit;line-height:var(--bitflow-line-height-tight)}.bitflow-hint{color:var(--bitflow-color-text-muted);font-size:var(--bitflow-font-size-small)}.bitflow-field-error{color:var(--bitflow-color-wrong);font-size:var(--bitflow-font-size-small)}:where(.bitflow-text,.bitflow-text-muted,.bitflow-hint,.bitflow-label,.bitflow-field-error,.bitflow-alert){margin:0}.bitflow-state{display:inline-flex;align-items:center;gap:var(--bitflow-space-xxsmall);padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border-radius:var(--bitflow-radius-full);font-size:var(--bitflow-font-size-small);font-weight:var(--bitflow-font-weight-medium);background:var(--bitflow-state-surface, var(--bitflow-color-neutral-100));color:var(--bitflow-state-color, var(--bitflow-color-text-muted))}.bitflow-state-correct{--bitflow-state-color: var(--bitflow-color-correct);--bitflow-state-surface: var(--bitflow-color-correct-surface)}.bitflow-state-wrong{--bitflow-state-color: var(--bitflow-color-wrong);--bitflow-state-surface: var(--bitflow-color-wrong-surface)}.bitflow-state-manual{--bitflow-state-color: var(--bitflow-color-manual);--bitflow-state-surface: var(--bitflow-color-manual-surface)}.bitflow-state-unknown{--bitflow-state-color: var(--bitflow-color-text-muted);--bitflow-state-surface: var(--bitflow-color-neutral-100)}.bitflow-bit{max-width:var(--bitflow-max-width-content, none);width:100%}.bitflow-prose>:first-child{margin-top:0}.bitflow-prose>:last-child{margin-bottom:0}.bitflow-prose p,.bitflow-prose ul,.bitflow-prose ol,.bitflow-prose blockquote{margin-block:0 var(--bitflow-space-xsmall)}.bitflow-prose code{font-family:var(--bitflow-font-family-mono);background:var(--bitflow-color-neutral-100);border-radius:var(--bitflow-radius-small);padding:0 var(--bitflow-space-xxsmall)}.bitflow-prose pre{background:var(--bitflow-color-neutral-100);border-radius:var(--bitflow-radius-standard);padding:var(--bitflow-space-small);overflow-x:auto}.bitflow-prose pre code{background:none;padding:0}.bitflow-prose img{max-width:100%;height:auto;border-radius:var(--bitflow-radius-small)}.bitflow-prose blockquote{border-left:4px solid var(--bitflow-color-border);padding-left:var(--bitflow-space-small);color:var(--bitflow-color-text-muted)}.bitflow-prose a{color:var(--bitflow-color-primary-dark)}.bitflow-prose :is(h1,h2,h3,h4,h5,h6){margin-block:var(--bitflow-space-small) var(--bitflow-space-xsmall);line-height:var(--bitflow-line-height-tight)}.bitflow-prose h1{font-size:var(--bitflow-font-size-xlarge)}.bitflow-prose h2{font-size:var(--bitflow-font-size-large)}.bitflow-prose :is(h3,h4,h5,h6){font-size:var(--bitflow-font-size-standard)}.bitflow-prose hr{border:0;border-top:1px solid var(--bitflow-color-border);margin-block:var(--bitflow-space-small)}.bitflow-prose table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;margin-block:0 var(--bitflow-space-xsmall);font-variant-numeric:tabular-nums}.bitflow-prose th,.bitflow-prose td{padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border:1px solid var(--bitflow-color-border);text-align:start}.bitflow-prose th{background:var(--bitflow-color-neutral-100);font-weight:var(--bitflow-font-weight-medium)}.bitflow-prose ul,.bitflow-prose ol{padding-inline-start:1.5em}.bitflow-prose .katex{font-size:1.1em}.bitflow-prose .katex-display{margin:var(--bitflow-space-xsmall) 0;padding-block:var(--bitflow-space-xxsmall);overflow-x:auto;overflow-y:hidden}.bitflow-math-pending{font-family:var(--bitflow-font-family-mono);color:var(--bitflow-color-text-muted)}.bitflow-math-display.bitflow-math-pending{display:block;margin:var(--bitflow-space-xsmall) 0}.bitflow-disclosure{border-top:1px solid var(--bitflow-color-border);padding-top:var(--bitflow-space-small)}.bitflow-disclosure-summary{cursor:pointer;display:flex;align-items:center;gap:var(--bitflow-space-xsmall);min-height:44px;font-weight:var(--bitflow-font-weight-medium);color:var(--bitflow-color-text-muted);margin-bottom:var(--bitflow-space-xsmall)}.bitflow-disclosure-summary::marker,.bitflow-disclosure-summary::-webkit-details-marker{content:"";display:none}.bitflow-disclosure-summary:before{content:"";flex:none;width:.4em;height:.4em;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(-45deg);transform-origin:center;transition:transform var(--bitflow-duration-fast)}.bitflow-disclosure[open]>.bitflow-disclosure-summary:before{transform:rotate(45deg)}.bitflow-disclosure[open] .bitflow-disclosure-summary{color:var(--bitflow-color-text)}.bitflow-image-row{display:flex;gap:var(--bitflow-space-small);align-items:flex-start}.bitflow-image-preview{width:96px;height:96px;object-fit:contain;background:var(--bitflow-color-neutral-100);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard)}.bitflow-image-preview-empty{flex:none}.bitflow-image-field .bitflow-input[type=file]{padding:var(--bitflow-space-xxsmall)}.bitflow-disclosure-aside{margin-inline-start:auto;padding-inline-start:var(--bitflow-space-xsmall);font-size:var(--bitflow-font-size-small);font-weight:400;color:var(--bitflow-color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:55%}.bitflow-boxeditor{display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall)}.bitflow-boxeditor-area{position:relative;width:100%;overflow:hidden;cursor:crosshair;-webkit-user-select:none;user-select:none;touch-action:none;border-radius:var(--bitflow-radius-standard)}.bitflow-boxeditor-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.bitflow-boxeditor-noimage{background:var(--bitflow-color-neutral-100)}.bitflow-boxeditor-box{position:absolute;cursor:move;background:color-mix(in srgb,var(--bitflow-color-neutral-100) 45%,transparent);border:var(--bitflow-border-width) dashed var(--bitflow-color-neutral-400)}.bitflow-boxeditor-box-selected{border-style:solid;box-shadow:0 0 0 2px var(--bitflow-color-primary)}.bitflow-boxeditor-label{display:block;padding:2px 4px;overflow:hidden;font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text-muted);text-overflow:ellipsis;white-space:nowrap;pointer-events:none}.bitflow-boxeditor-resize{position:absolute;right:-6px;bottom:-6px;width:14px;height:14px;cursor:nwse-resize;background:var(--bitflow-color-primary);border-radius:50%}.bitflow-boxeditor-drawing{position:absolute;pointer-events:none;background:color-mix(in srgb,var(--bitflow-color-primary) 18%,transparent);border:var(--bitflow-border-width) dashed var(--bitflow-color-primary)}', de = {
3
3
  en: {
4
4
  imageLabel: "Picture",
5
5
  imageHint: "Stored inside the assessment, so it travels with the file. It is scaled down and re-encoded when you choose it.",
@@ -304,30 +304,30 @@ const Pn = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--
304
304
  allowSkipYes: "İzin veriliyor",
305
305
  allowSkipNo: "İzin verilmiyor"
306
306
  }
307
- }, wo = ({
307
+ }, So = ({
308
308
  result: t,
309
309
  locale: e,
310
310
  tries: r
311
311
  }) => {
312
- const o = Nt(e), n = F(de, $n(t.state), o);
312
+ const o = Lt(e), i = F(de, Ui(t.state), o);
313
313
  return /* @__PURE__ */ c.jsxs("div", { className: "bitflow-stack-small bitflow-stack", role: "status", children: [
314
314
  /* @__PURE__ */ c.jsxs("div", { className: "bitflow-row", children: [
315
315
  /* @__PURE__ */ c.jsxs("span", { className: `bitflow-state bitflow-state-${t.state}`, children: [
316
- /* @__PURE__ */ c.jsx(On, { state: t.state }),
317
- n
316
+ /* @__PURE__ */ c.jsx(Wi, { state: t.state }),
317
+ i
318
318
  ] }),
319
319
  r !== void 0 && r > 1 && /* @__PURE__ */ c.jsx("span", { className: "bitflow-text-muted", children: F(de, "tries", o, { count: r }) })
320
320
  ] }),
321
- t.feedback?.map((i, l) => /* @__PURE__ */ c.jsx(
321
+ t.feedback?.map((n, l) => /* @__PURE__ */ c.jsx(
322
322
  "div",
323
323
  {
324
- className: `bitflow-alert bitflow-alert-${i.severity}`,
325
- children: i.message
324
+ className: `bitflow-alert bitflow-alert-${n.severity}`,
325
+ children: n.message
326
326
  },
327
327
  l
328
328
  ))
329
329
  ] });
330
- }, $n = (t) => t, On = ({ state: t }) => /* @__PURE__ */ c.jsxs(
330
+ }, Ui = (t) => t, Wi = ({ state: t }) => /* @__PURE__ */ c.jsxs(
331
331
  "svg",
332
332
  {
333
333
  width: "16",
@@ -352,20 +352,20 @@ const Pn = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--
352
352
  ] })
353
353
  ]
354
354
  }
355
- ), ko = ({
355
+ ), Ao = ({
356
356
  type: t,
357
357
  data: e,
358
358
  answer: r,
359
359
  result: o,
360
- readonly: n,
361
- locale: i,
360
+ readonly: i,
361
+ locale: n,
362
362
  onAnswerChange: l,
363
363
  attempt: s,
364
364
  flow: u
365
365
  }) => {
366
- const p = Nt(i), m = ot(t);
367
- if (!m || !m.Task) return /* @__PURE__ */ c.jsx(Fn, { type: t, locale: p });
368
- const f = m.schema.safeParse(e);
366
+ const p = Lt(n), b = it(t);
367
+ if (!b || !b.Task) return /* @__PURE__ */ c.jsx(Yi, { type: t, locale: p });
368
+ const f = b.schema.safeParse(e);
369
369
  if (!f.success)
370
370
  return /* @__PURE__ */ c.jsx("div", { className: "bitflow-alert bitflow-alert-error", role: "alert", children: /* @__PURE__ */ c.jsxs("div", { children: [
371
371
  /* @__PURE__ */ c.jsx("strong", { children: F(de, "invalidData", p) }),
@@ -375,22 +375,22 @@ const Pn = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--
375
375
  x.message
376
376
  ] }, w)) })
377
377
  ] }) });
378
- const b = m.Task;
378
+ const m = b.Task;
379
379
  return /* @__PURE__ */ c.jsx(
380
- b,
380
+ m,
381
381
  {
382
382
  data: f.data,
383
383
  answer: r,
384
384
  result: o,
385
- readonly: n,
385
+ readonly: i,
386
386
  locale: p,
387
- onAnswerChange: l ?? Hn,
387
+ onAnswerChange: l ?? Gi,
388
388
  attempt: s,
389
389
  flow: u
390
390
  }
391
391
  );
392
- }, Hn = () => {
393
- }, Fn = ({ type: t, locale: e }) => /* @__PURE__ */ c.jsx("div", { className: "bitflow-alert bitflow-alert-warning", role: "alert", children: /* @__PURE__ */ c.jsxs("div", { children: [
392
+ }, Gi = () => {
393
+ }, Yi = ({ type: t, locale: e }) => /* @__PURE__ */ c.jsx("div", { className: "bitflow-alert bitflow-alert-warning", role: "alert", children: /* @__PURE__ */ c.jsxs("div", { children: [
394
394
  /* @__PURE__ */ c.jsx("strong", { children: F(de, "unknownBit", e) }),
395
395
  /* @__PURE__ */ c.jsx("p", { className: "bitflow-text-muted", children: F(de, "unknownBitHelp", e, { type: t }) })
396
396
  ] }) }), nt = ({
@@ -399,33 +399,33 @@ const Pn = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--
399
399
  error: r,
400
400
  children: o
401
401
  }) => {
402
- const n = S.useId(), i = e ? `${n}-hint` : void 0, l = r ? `${n}-error` : void 0, s = [i, l].filter(Boolean).join(" ") || void 0;
402
+ const i = y.useId(), n = e ? `${i}-hint` : void 0, l = r ? `${i}-error` : void 0, s = [n, l].filter(Boolean).join(" ") || void 0;
403
403
  return /* @__PURE__ */ c.jsxs("div", { className: "bitflow-field", children: [
404
- /* @__PURE__ */ c.jsx("label", { className: "bitflow-label", htmlFor: n, children: t }),
405
- e && /* @__PURE__ */ c.jsx("span", { className: "bitflow-hint", id: i, children: e }),
404
+ /* @__PURE__ */ c.jsx("label", { className: "bitflow-label", htmlFor: i, children: t }),
405
+ e && /* @__PURE__ */ c.jsx("span", { className: "bitflow-hint", id: n, children: e }),
406
406
  o({
407
- id: n,
407
+ id: i,
408
408
  "aria-describedby": s,
409
409
  "aria-invalid": r ? !0 : void 0
410
410
  }),
411
411
  r && /* @__PURE__ */ c.jsx("span", { className: "bitflow-field-error", id: l, role: "alert", children: r })
412
412
  ] });
413
- }, ol = ({
413
+ }, ml = ({
414
414
  value: t,
415
415
  placeholder: e,
416
416
  onChange: r,
417
417
  ...o
418
- }) => /* @__PURE__ */ c.jsx(nt, { ...o, children: (n) => /* @__PURE__ */ c.jsx(
418
+ }) => /* @__PURE__ */ c.jsx(nt, { ...o, children: (i) => /* @__PURE__ */ c.jsx(
419
419
  "input",
420
420
  {
421
- ...n,
421
+ ...i,
422
422
  type: "text",
423
423
  className: "bitflow-input",
424
424
  value: t,
425
425
  placeholder: e,
426
- onChange: (i) => r(i.target.value)
426
+ onChange: (n) => r(n.target.value)
427
427
  }
428
- ) }), Bn = ({
428
+ ) }), Vi = ({
429
429
  value: t,
430
430
  onChange: e,
431
431
  ...r
@@ -438,44 +438,44 @@ const Pn = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--
438
438
  min: 0,
439
439
  step: 10,
440
440
  value: t ?? "",
441
- onChange: (n) => {
442
- const i = Number(n.target.value);
441
+ onChange: (i) => {
442
+ const n = Number(i.target.value);
443
443
  e(
444
- n.target.value === "" || !Number.isFinite(i) || i <= 0 ? void 0 : Math.round(i)
444
+ i.target.value === "" || !Number.isFinite(n) || n <= 0 ? void 0 : Math.round(n)
445
445
  );
446
446
  }
447
447
  }
448
- ) }), nl = ({
448
+ ) }), gl = ({
449
449
  value: t,
450
450
  placeholder: e,
451
451
  rows: r = 4,
452
452
  onChange: o,
453
- ...n
454
- }) => /* @__PURE__ */ c.jsx(nt, { ...n, children: (i) => /* @__PURE__ */ c.jsx(
453
+ ...i
454
+ }) => /* @__PURE__ */ c.jsx(nt, { ...i, children: (n) => /* @__PURE__ */ c.jsx(
455
455
  "textarea",
456
456
  {
457
- ...i,
457
+ ...n,
458
458
  className: "bitflow-textarea",
459
459
  rows: r,
460
460
  value: t,
461
461
  placeholder: e,
462
462
  onChange: (l) => o(l.target.value)
463
463
  }
464
- ) }), Fr = ({
464
+ ) }), Mr = ({
465
465
  value: t,
466
466
  options: e,
467
467
  onChange: r,
468
468
  ...o
469
- }) => /* @__PURE__ */ c.jsx(nt, { ...o, children: (n) => /* @__PURE__ */ c.jsx(
469
+ }) => /* @__PURE__ */ c.jsx(nt, { ...o, children: (i) => /* @__PURE__ */ c.jsx(
470
470
  "select",
471
471
  {
472
- ...n,
472
+ ...i,
473
473
  className: "bitflow-select",
474
474
  value: t,
475
- onChange: (i) => r(i.target.value),
476
- children: e.map((i) => /* @__PURE__ */ c.jsx("option", { value: i.value, children: i.label }, i.value))
475
+ onChange: (n) => r(n.target.value),
476
+ children: e.map((n) => /* @__PURE__ */ c.jsx("option", { value: n.value, children: n.label }, n.value))
477
477
  }
478
- ) }), Br = ({
478
+ ) }), qr = ({
479
479
  label: t,
480
480
  hint: e,
481
481
  checked: r,
@@ -486,7 +486,7 @@ const Pn = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--
486
486
  {
487
487
  type: "checkbox",
488
488
  checked: r,
489
- onChange: (n) => o(n.target.checked)
489
+ onChange: (i) => o(i.target.checked)
490
490
  }
491
491
  ),
492
492
  /* @__PURE__ */ c.jsxs("span", { children: [
@@ -496,15 +496,15 @@ const Pn = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--
496
496
  e
497
497
  ] })
498
498
  ] })
499
- ] }), il = ({
499
+ ] }), wl = ({
500
500
  summary: t,
501
501
  aside: e,
502
502
  children: r,
503
503
  defaultOpen: o = !1,
504
- open: n,
505
- onOpenChange: i
504
+ open: i,
505
+ onOpenChange: n
506
506
  }) => {
507
- const [l, s] = S.useState(o), u = n ?? l;
507
+ const [l, s] = y.useState(o), u = i ?? l;
508
508
  return /* @__PURE__ */ c.jsxs(
509
509
  "details",
510
510
  {
@@ -512,8 +512,8 @@ const Pn = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--
512
512
  open: u,
513
513
  onToggle: (p) => {
514
514
  if (p.target !== p.currentTarget) return;
515
- const m = p.currentTarget.open;
516
- m !== u && (s(m), i?.(m));
515
+ const b = p.currentTarget.open;
516
+ b !== u && (s(b), n?.(b));
517
517
  },
518
518
  children: [
519
519
  /* @__PURE__ */ c.jsxs("summary", { className: "bitflow-disclosure-summary", children: [
@@ -524,32 +524,32 @@ const Pn = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--
524
524
  ]
525
525
  }
526
526
  );
527
- }, al = (t) => {
528
- const e = S.useRef(new Set(t)), [r, o] = S.useState({});
529
- S.useEffect(() => {
530
- const i = t.filter((l) => !e.current.has(l));
531
- e.current = new Set(t), i.length !== 0 && o((l) => ({
527
+ }, kl = (t) => {
528
+ const e = y.useRef(new Set(t)), [r, o] = y.useState({});
529
+ y.useEffect(() => {
530
+ const n = t.filter((l) => !e.current.has(l));
531
+ e.current = new Set(t), n.length !== 0 && o((l) => ({
532
532
  ...l,
533
- ...Object.fromEntries(i.map((s) => [s, !0]))
533
+ ...Object.fromEntries(n.map((s) => [s, !0]))
534
534
  }));
535
535
  });
536
- const n = (i, l) => o((s) => ({ ...s, [i]: l }));
536
+ const i = (n, l) => o((s) => ({ ...s, [n]: l }));
537
537
  return {
538
- props: (i) => ({
539
- open: r[i] ?? !1,
540
- onOpenChange: (l) => n(i, l)
538
+ props: (n) => ({
539
+ open: r[n] ?? !1,
540
+ onOpenChange: (l) => i(n, l)
541
541
  }),
542
- open: (i) => n(i, !0)
542
+ open: (n) => i(n, !0)
543
543
  };
544
- }, ll = (t, e) => t?.find((r) => r.path === e || r.path.startsWith(`${e}.`))?.message, sl = (t, e) => t?.find((r) => r.path === e)?.message, cl = ({
544
+ }, xl = (t, e) => t?.find((r) => r.path === e || r.path.startsWith(`${e}.`))?.message, vl = (t, e) => t?.find((r) => r.path === e)?.message, yl = ({
545
545
  evaluation: t,
546
546
  locale: e,
547
547
  onChange: r
548
548
  }) => {
549
- const o = (i) => F(de, i, e), n = (i) => r({ ...t, ...i });
549
+ const o = (n) => F(de, n, e), i = (n) => r({ ...t, ...n });
550
550
  return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
551
551
  /* @__PURE__ */ c.jsx(
552
- Fr,
552
+ Mr,
553
553
  {
554
554
  label: o("modeLabel"),
555
555
  value: t.mode,
@@ -557,30 +557,30 @@ const Pn = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--
557
557
  { value: "auto", label: o("modeAuto") },
558
558
  { value: "skip", label: o("modeSkip") }
559
559
  ],
560
- onChange: (i) => n({ mode: i })
560
+ onChange: (n) => i({ mode: n })
561
561
  }
562
562
  ),
563
563
  t.mode === "auto" && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
564
564
  /* @__PURE__ */ c.jsx(
565
- Br,
565
+ qr,
566
566
  {
567
567
  label: o("retryLabel"),
568
568
  checked: t.enableRetry,
569
- onChange: (i) => n({ enableRetry: i })
569
+ onChange: (n) => i({ enableRetry: n })
570
570
  }
571
571
  ),
572
572
  /* @__PURE__ */ c.jsx(
573
- Br,
573
+ qr,
574
574
  {
575
575
  label: o("showFeedbackLabel"),
576
576
  checked: t.showFeedback,
577
- onChange: (i) => n({ showFeedback: i })
577
+ onChange: (n) => i({ showFeedback: n })
578
578
  }
579
579
  ),
580
- /* @__PURE__ */ c.jsx(nt, { label: o("weightLabel"), hint: o("weightHint"), children: (i) => /* @__PURE__ */ c.jsx(
580
+ /* @__PURE__ */ c.jsx(nt, { label: o("weightLabel"), hint: o("weightHint"), children: (n) => /* @__PURE__ */ c.jsx(
581
581
  "input",
582
582
  {
583
- ...i,
583
+ ...n,
584
584
  type: "number",
585
585
  className: "bitflow-input",
586
586
  min: 0,
@@ -588,7 +588,7 @@ const Pn = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--
588
588
  value: t.weight ?? 1,
589
589
  onChange: (l) => {
590
590
  const s = Number(l.target.value);
591
- n({
591
+ i({
592
592
  weight: l.target.value === "" || !Number.isFinite(s) ? 1 : Math.max(0, s)
593
593
  });
594
594
  }
@@ -596,16 +596,16 @@ const Pn = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--
596
596
  ) })
597
597
  ] }),
598
598
  /* @__PURE__ */ c.jsx(
599
- Bn,
599
+ Vi,
600
600
  {
601
601
  label: o("timeLimitLabel"),
602
602
  hint: o("timeLimitHint"),
603
603
  value: t.timeLimit,
604
- onChange: (i) => n({ timeLimit: i })
604
+ onChange: (n) => i({ timeLimit: n })
605
605
  }
606
606
  ),
607
607
  /* @__PURE__ */ c.jsx(
608
- Fr,
608
+ Mr,
609
609
  {
610
610
  label: o("allowSkipLabel"),
611
611
  hint: o("allowSkipHint"),
@@ -615,16 +615,16 @@ const Pn = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--
615
615
  { value: "yes", label: o("allowSkipYes") },
616
616
  { value: "no", label: o("allowSkipNo") }
617
617
  ],
618
- onChange: (i) => n({
619
- allowSkip: i === "flow" ? void 0 : i === "yes"
618
+ onChange: (n) => i({
619
+ allowSkip: n === "flow" ? void 0 : n === "yes"
620
620
  })
621
621
  }
622
622
  )
623
623
  ] });
624
- }, Mn = {
624
+ }, Qi = {
625
625
  stringify: (t) => t ? "true" : "false",
626
626
  parse: (t) => /^[ty1-9]/i.test(t)
627
- }, qn = {
627
+ }, Zi = {
628
628
  stringify: (t) => t.name,
629
629
  parse: (t, e, r) => {
630
630
  const o = (() => {
@@ -635,57 +635,57 @@ const Pn = ':root,:host{--bitflow-color-primary: light-dark(#017460, #57a396);--
635
635
  })();
636
636
  return typeof o == "function" ? o.bind(r) : void 0;
637
637
  }
638
- }, Un = {
638
+ }, Xi = {
639
639
  stringify: (t) => JSON.stringify(t),
640
640
  parse: (t) => JSON.parse(t)
641
641
  };
642
- function Wn(t) {
642
+ function Ki(t) {
643
643
  return t.replace(
644
644
  /([a-z0-9])([A-Z])/g,
645
645
  (e, r, o) => `${r}-${o.toLowerCase()}`
646
646
  );
647
647
  }
648
- function Gn(t) {
648
+ function Ji(t) {
649
649
  return t.replace(/[-:]([a-z])/g, (e, r) => `${r.toUpperCase()}`);
650
650
  }
651
- const Mr = /* @__PURE__ */ Symbol.for("r2wc.bound"), Yn = {
651
+ const Ur = /* @__PURE__ */ Symbol.for("r2wc.bound"), en = {
652
652
  parse: (t, e, r) => {
653
- const o = Gn(e), n = r;
654
- if (typeof n < "u" && o in n && typeof n[o] < "u") {
655
- let i = n[o];
656
- return Mr in n[o] || (i = i.bind(n), Object.defineProperty(i, Mr, { value: !0 })), i;
653
+ const o = Ji(e), i = r;
654
+ if (typeof i < "u" && o in i && typeof i[o] < "u") {
655
+ let n = i[o];
656
+ return Ur in i[o] || (n = n.bind(i), Object.defineProperty(n, Ur, { value: !0 })), n;
657
657
  } else
658
658
  return;
659
659
  }
660
- }, Vn = {
660
+ }, tn = {
661
661
  stringify: (t) => `${t}`,
662
662
  parse: (t) => parseFloat(t)
663
- }, Qn = {
663
+ }, rn = {
664
664
  stringify: (t) => t,
665
665
  parse: (t) => t
666
- }, Ut = {
667
- string: Qn,
668
- number: Vn,
669
- boolean: Mn,
670
- function: qn,
671
- method: Yn,
672
- json: Un
673
- }, kt = /* @__PURE__ */ Symbol.for("r2wc.render"), xt = /* @__PURE__ */ Symbol.for("r2wc.connected"), ze = /* @__PURE__ */ Symbol.for("r2wc.context"), ce = /* @__PURE__ */ Symbol.for("r2wc.props");
674
- function Zn(t, e, r) {
666
+ }, Wt = {
667
+ string: rn,
668
+ number: tn,
669
+ boolean: Qi,
670
+ function: Zi,
671
+ method: en,
672
+ json: Xi
673
+ }, xt = /* @__PURE__ */ Symbol.for("r2wc.render"), vt = /* @__PURE__ */ Symbol.for("r2wc.connected"), ze = /* @__PURE__ */ Symbol.for("r2wc.context"), ce = /* @__PURE__ */ Symbol.for("r2wc.props");
674
+ function on(t, e, r) {
675
675
  e.props || (e.props = t.propTypes ? Object.keys(t.propTypes) : []), e.events || (e.events = []);
676
- const o = Array.isArray(e.props) ? e.props.slice() : Object.keys(e.props), n = Array.isArray(e.events) ? e.events.slice() : Object.keys(e.events), i = {}, l = {}, s = {}, u = {};
677
- for (const m of o) {
678
- i[m] = Array.isArray(e.props) ? "string" : e.props[m];
679
- const f = Wn(m);
680
- s[m] = f, u[f] = m;
681
- }
682
- for (const m of n)
683
- l[m] = Array.isArray(e.events) ? {} : e.events[m];
676
+ const o = Array.isArray(e.props) ? e.props.slice() : Object.keys(e.props), i = Array.isArray(e.events) ? e.events.slice() : Object.keys(e.events), n = {}, l = {}, s = {}, u = {};
677
+ for (const b of o) {
678
+ n[b] = Array.isArray(e.props) ? "string" : e.props[b];
679
+ const f = Ki(b);
680
+ s[b] = f, u[f] = b;
681
+ }
682
+ for (const b of i)
683
+ l[b] = Array.isArray(e.events) ? {} : e.events[b];
684
684
  class p extends HTMLElement {
685
685
  static get observedAttributes() {
686
686
  return Object.keys(u);
687
687
  }
688
- [xt] = !0;
688
+ [vt] = !0;
689
689
  [ze];
690
690
  [ce] = {};
691
691
  container;
@@ -694,83 +694,83 @@ function Zn(t, e, r) {
694
694
  mode: e.shadow
695
695
  }) : this.container = this, this[ce].container = this.container;
696
696
  for (const f of o) {
697
- const b = s[f], x = this.getAttribute(b), w = i[f], N = w ? Ut[w] : null;
698
- N?.parse && (x || w === "method") && (this[ce][f] = N.parse(x, b, this));
697
+ const m = s[f], x = this.getAttribute(m), w = n[f], N = w ? Wt[w] : null;
698
+ N?.parse && (x || w === "method") && (this[ce][f] = N.parse(x, m, this));
699
699
  }
700
- for (const f of n)
701
- this[ce][f] = (b) => {
700
+ for (const f of i)
701
+ this[ce][f] = (m) => {
702
702
  const x = f.replace(/^on/, "").toLowerCase();
703
703
  this.dispatchEvent(
704
- new CustomEvent(x, { detail: b, ...l[f] })
704
+ new CustomEvent(x, { detail: m, ...l[f] })
705
705
  );
706
706
  };
707
707
  }
708
708
  connectedCallback() {
709
- this[xt] = !0, this[kt]();
709
+ this[vt] = !0, this[xt]();
710
710
  }
711
711
  disconnectedCallback() {
712
- this[xt] = !1, this[ze] && r.unmount(this[ze]), delete this[ze];
712
+ this[vt] = !1, this[ze] && r.unmount(this[ze]), delete this[ze];
713
713
  }
714
- attributeChangedCallback(f, b, x) {
715
- const w = u[f], N = i[w], _ = N ? Ut[N] : null;
716
- w in i && _?.parse && (x || N === "method") && (this[ce][w] = _.parse(x, f, this), this[kt]());
714
+ attributeChangedCallback(f, m, x) {
715
+ const w = u[f], N = n[w], j = N ? Wt[N] : null;
716
+ w in n && j?.parse && (x || N === "method") && (this[ce][w] = j.parse(x, f, this), this[xt]());
717
717
  }
718
- [kt]() {
719
- this[xt] && (this[ze] ? r.update(this[ze], this[ce]) : this[ze] = r.mount(
718
+ [xt]() {
719
+ this[vt] && (this[ze] ? r.update(this[ze], this[ce]) : this[ze] = r.mount(
720
720
  this.container,
721
721
  t,
722
722
  this[ce]
723
723
  ));
724
724
  }
725
725
  }
726
- for (const m of o) {
727
- const f = s[m], b = i[m];
728
- Object.defineProperty(p.prototype, m, {
726
+ for (const b of o) {
727
+ const f = s[b], m = n[b];
728
+ Object.defineProperty(p.prototype, b, {
729
729
  enumerable: !0,
730
730
  configurable: !0,
731
731
  get() {
732
- return this[ce][m];
732
+ return this[ce][b];
733
733
  },
734
734
  set(x) {
735
- this[ce][m] = x;
736
- const w = b ? Ut[b] : null;
735
+ this[ce][b] = x;
736
+ const w = m ? Wt[m] : null;
737
737
  if (w?.stringify) {
738
738
  const N = w.stringify(x, f, this);
739
739
  this.getAttribute(f) !== N && (N == null ? this.removeAttribute(f) : this.setAttribute(f, N));
740
740
  } else
741
- m in i && w?.parse && (x || b === "method") && (this[ce][m] = w.parse(x, f, this)), this[kt]();
741
+ b in n && w?.parse && (x || m === "method") && (this[ce][b] = w.parse(x, f, this)), this[xt]();
742
742
  }
743
743
  });
744
744
  }
745
745
  return p;
746
746
  }
747
- function Xn(t, e, r) {
748
- const o = pn.createRoot(t), n = Ge.createElement(e, r);
749
- return o.render(n), {
747
+ function nn(t, e, r) {
748
+ const o = ki.createRoot(t), i = Ge.createElement(e, r);
749
+ return o.render(i), {
750
750
  root: o,
751
751
  ReactComponent: e
752
752
  };
753
753
  }
754
- function Kn({ root: t, ReactComponent: e }, r) {
754
+ function an({ root: t, ReactComponent: e }, r) {
755
755
  const o = Ge.createElement(e, r);
756
756
  t.render(o);
757
757
  }
758
- function Jn({ root: t }) {
758
+ function ln({ root: t }) {
759
759
  t.unmount();
760
760
  }
761
- function ei(t, e = {}) {
762
- return Zn(t, e, { mount: Xn, update: Kn, unmount: Jn });
761
+ function sn(t, e = {}) {
762
+ return on(t, e, { mount: nn, update: an, unmount: ln });
763
763
  }
764
- const Wt = (t, e, r) => {
764
+ const Gt = (t, e, r) => {
765
765
  t?.dispatchEvent(
766
766
  new CustomEvent(e, { detail: r, bubbles: !0, composed: !0 })
767
767
  );
768
- }, ul = (t, e = `bitflow-${t}`) => {
768
+ }, Sl = (t, e = `bitflow-${t}`) => {
769
769
  if (typeof customElements > "u" || customElements.get(e)) return;
770
- const r = (o) => /* @__PURE__ */ c.jsx(ti, { ...o, type: t });
770
+ const r = (o) => /* @__PURE__ */ c.jsx(cn, { ...o, type: t });
771
771
  customElements.define(
772
772
  e,
773
- ei(r, {
773
+ sn(r, {
774
774
  props: {
775
775
  data: "json",
776
776
  answer: "json",
@@ -783,36 +783,36 @@ const Wt = (t, e, r) => {
783
783
  }
784
784
  })
785
785
  );
786
- }, ti = ({
786
+ }, cn = ({
787
787
  container: t,
788
788
  type: e,
789
789
  data: r,
790
790
  answer: o,
791
- result: n,
792
- readonly: i,
791
+ result: i,
792
+ readonly: n,
793
793
  locale: l,
794
794
  attempt: s,
795
795
  flow: u,
796
796
  controls: p = !0
797
797
  }) => {
798
- const m = Nt(l), f = ot(e), [b, x] = S.useState(o), [w, N] = S.useState(n), [_, H] = S.useState(0);
799
- S.useEffect(() => x(o), [o]), S.useEffect(() => N(n), [n]);
800
- const X = S.useCallback(
798
+ const b = Lt(l), f = it(e), [m, x] = y.useState(o), [w, N] = y.useState(i), [j, H] = y.useState(0);
799
+ y.useEffect(() => x(o), [o]), y.useEffect(() => N(i), [i]);
800
+ const X = y.useCallback(
801
801
  (z) => {
802
- x(z), Wt(t, "bitflow-answerchange", { answer: z });
802
+ x(z), Gt(t, "bitflow-answerchange", { answer: z });
803
803
  },
804
804
  [t]
805
- ), W = S.useRef(!1), E = S.useCallback(async () => {
805
+ ), W = y.useRef(!1), E = y.useCallback(async () => {
806
806
  if (!(!f?.evaluate || W.current)) {
807
807
  W.current = !0;
808
808
  try {
809
- const z = await f.evaluate({ data: r, answer: b });
810
- N(z), H((J) => J + 1), Wt(t, "bitflow-evaluated", { answer: b, result: z });
809
+ const z = await f.evaluate({ data: r, answer: m });
810
+ N(z), H((J) => J + 1), Gt(t, "bitflow-evaluated", { answer: m, result: z });
811
811
  } catch (z) {
812
- Wt(
812
+ Gt(
813
813
  t,
814
814
  "bitflow-error",
815
- fn(
815
+ xi(
816
816
  "EVALUATION_FAILED",
817
817
  `Evaluating ${e} failed: ${z instanceof Error ? z.message : String(z)}`
818
818
  )
@@ -821,144 +821,144 @@ const Wt = (t, e, r) => {
821
821
  W.current = !1;
822
822
  }
823
823
  }
824
- }, [b, f, t, r, e]), k = S.useCallback(() => N(void 0), []), v = p && !i && f?.kind === "task" && !!f.evaluate, A = w !== void 0;
824
+ }, [m, f, t, r, e]), k = y.useCallback(() => N(void 0), []), v = p && !n && f?.kind === "task" && !!f.evaluate, A = w !== void 0;
825
825
  return /* @__PURE__ */ c.jsxs("div", { className: "bitflow-root bitflow-stack bitflow-bit", children: [
826
826
  /* @__PURE__ */ c.jsx(
827
- ko,
827
+ Ao,
828
828
  {
829
829
  type: e,
830
830
  data: r,
831
- answer: b,
831
+ answer: m,
832
832
  result: w,
833
- readonly: i || A,
834
- locale: m,
833
+ readonly: n || A,
834
+ locale: b,
835
835
  onAnswerChange: X,
836
836
  attempt: s,
837
837
  flow: u
838
838
  }
839
839
  ),
840
- w && /* @__PURE__ */ c.jsx(wo, { result: w, locale: m, tries: _ }),
840
+ w && /* @__PURE__ */ c.jsx(So, { result: w, locale: b, tries: j }),
841
841
  v && /* @__PURE__ */ c.jsxs("div", { className: "bitflow-row bitflow-row-end", children: [
842
- A && w.allowRetry !== !1 ? /* @__PURE__ */ c.jsx("button", { type: "button", className: "bitflow-button", onClick: k, children: F(de, "retry", m) }) : null,
843
- !A && /* @__PURE__ */ c.jsx("button", { type: "button", className: "bitflow-button", onClick: E, children: F(de, "check", m) })
842
+ A && w.allowRetry !== !1 ? /* @__PURE__ */ c.jsx("button", { type: "button", className: "bitflow-button", onClick: k, children: F(de, "retry", b) }) : null,
843
+ !A && /* @__PURE__ */ c.jsx("button", { type: "button", className: "bitflow-button", onClick: E, children: F(de, "check", b) })
844
844
  ] })
845
845
  ] });
846
846
  };
847
- function qr(t, e) {
847
+ function Wr(t, e) {
848
848
  (e == null || e > t.length) && (e = t.length);
849
849
  for (var r = 0, o = Array(e); r < e; r++) o[r] = t[r];
850
850
  return o;
851
851
  }
852
- function ri(t) {
852
+ function un(t) {
853
853
  if (Array.isArray(t)) return t;
854
854
  }
855
- function oi(t, e) {
855
+ function dn(t, e) {
856
856
  var r = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
857
857
  if (r != null) {
858
- var o, n, i, l, s = [], u = !0, p = !1;
858
+ var o, i, n, l, s = [], u = !0, p = !1;
859
859
  try {
860
- if (i = (r = r.call(t)).next, e !== 0) for (; !(u = (o = i.call(r)).done) && (s.push(o.value), s.length !== e); u = !0) ;
861
- } catch (m) {
862
- p = !0, n = m;
860
+ if (n = (r = r.call(t)).next, e !== 0) for (; !(u = (o = n.call(r)).done) && (s.push(o.value), s.length !== e); u = !0) ;
861
+ } catch (b) {
862
+ p = !0, i = b;
863
863
  } finally {
864
864
  try {
865
865
  if (!u && r.return != null && (l = r.return(), Object(l) !== l)) return;
866
866
  } finally {
867
- if (p) throw n;
867
+ if (p) throw i;
868
868
  }
869
869
  }
870
870
  return s;
871
871
  }
872
872
  }
873
- function ni() {
873
+ function pn() {
874
874
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
875
875
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
876
876
  }
877
- function ii(t, e) {
878
- return ri(t) || oi(t, e) || ai(t, e) || ni();
877
+ function fn(t, e) {
878
+ return un(t) || dn(t, e) || hn(t, e) || pn();
879
879
  }
880
- function ai(t, e) {
880
+ function hn(t, e) {
881
881
  if (t) {
882
- if (typeof t == "string") return qr(t, e);
882
+ if (typeof t == "string") return Wr(t, e);
883
883
  var r = {}.toString.call(t).slice(8, -1);
884
- return r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set" ? Array.from(t) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? qr(t, e) : void 0;
884
+ return r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set" ? Array.from(t) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? Wr(t, e) : void 0;
885
885
  }
886
886
  }
887
- const xo = Object.entries, Ur = Object.setPrototypeOf, li = Object.isFrozen, si = Object.getPrototypeOf, ci = Object.getOwnPropertyDescriptor;
888
- let G = Object.freeze, Y = Object.seal, We = Object.create, vo = typeof Reflect < "u" && Reflect, Jt = vo.apply, er = vo.construct;
887
+ const To = Object.entries, Gr = Object.setPrototypeOf, bn = Object.isFrozen, mn = Object.getPrototypeOf, gn = Object.getOwnPropertyDescriptor;
888
+ let G = Object.freeze, Y = Object.seal, We = Object.create, No = typeof Reflect < "u" && Reflect, er = No.apply, tr = No.construct;
889
889
  G || (G = function(t) {
890
890
  return t;
891
891
  });
892
892
  Y || (Y = function(t) {
893
893
  return t;
894
894
  });
895
- Jt || (Jt = function(t, e) {
896
- for (var r = arguments.length, o = new Array(r > 2 ? r - 2 : 0), n = 2; n < r; n++)
897
- o[n - 2] = arguments[n];
895
+ er || (er = function(t, e) {
896
+ for (var r = arguments.length, o = new Array(r > 2 ? r - 2 : 0), i = 2; i < r; i++)
897
+ o[i - 2] = arguments[i];
898
898
  return t.apply(e, o);
899
899
  });
900
- er || (er = function(t) {
900
+ tr || (tr = function(t) {
901
901
  for (var e = arguments.length, r = new Array(e > 1 ? e - 1 : 0), o = 1; o < e; o++)
902
902
  r[o - 1] = arguments[o];
903
903
  return new t(...r);
904
904
  });
905
- const Fe = B(Array.prototype.forEach), ui = B(Array.prototype.lastIndexOf), Wr = B(Array.prototype.pop), Be = B(Array.prototype.push), di = B(Array.prototype.splice), Se = Array.isArray, tt = B(String.prototype.toLowerCase), Gt = B(String.prototype.toString), Gr = B(String.prototype.match), Ke = B(String.prototype.replace), Yr = B(String.prototype.indexOf), pi = B(String.prototype.trim), fi = B(Number.prototype.toString), hi = B(Boolean.prototype.toString), Vr = typeof BigInt > "u" ? null : B(BigInt.prototype.toString), Qr = typeof Symbol > "u" ? null : B(Symbol.prototype.toString), U = B(Object.prototype.hasOwnProperty), Je = B(Object.prototype.toString), q = B(RegExp.prototype.test), Ce = mi(TypeError);
905
+ const Fe = B(Array.prototype.forEach), wn = B(Array.prototype.lastIndexOf), Yr = B(Array.prototype.pop), Be = B(Array.prototype.push), kn = B(Array.prototype.splice), Se = Array.isArray, tt = B(String.prototype.toLowerCase), Yt = B(String.prototype.toString), Vr = B(String.prototype.match), Ke = B(String.prototype.replace), Qr = B(String.prototype.indexOf), xn = B(String.prototype.trim), vn = B(Number.prototype.toString), yn = B(Boolean.prototype.toString), Zr = typeof BigInt > "u" ? null : B(BigInt.prototype.toString), Xr = typeof Symbol > "u" ? null : B(Symbol.prototype.toString), U = B(Object.prototype.hasOwnProperty), Je = B(Object.prototype.toString), q = B(RegExp.prototype.test), Ce = Sn(TypeError);
906
906
  function B(t) {
907
907
  return function(e) {
908
908
  e instanceof RegExp && (e.lastIndex = 0);
909
- for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
910
- o[n - 1] = arguments[n];
911
- return Jt(t, e, o);
909
+ for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
910
+ o[i - 1] = arguments[i];
911
+ return er(t, e, o);
912
912
  };
913
913
  }
914
- function mi(t) {
914
+ function Sn(t) {
915
915
  return function() {
916
916
  for (var e = arguments.length, r = new Array(e), o = 0; o < e; o++)
917
917
  r[o] = arguments[o];
918
- return er(t, r);
918
+ return tr(t, r);
919
919
  };
920
920
  }
921
921
  function C(t, e) {
922
922
  let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : tt;
923
- if (Ur && Ur(t, null), !Se(e))
923
+ if (Gr && Gr(t, null), !Se(e))
924
924
  return t;
925
925
  let o = e.length;
926
926
  for (; o--; ) {
927
- let n = e[o];
928
- if (typeof n == "string") {
929
- const i = r(n);
930
- i !== n && (li(e) || (e[o] = i), n = i);
927
+ let i = e[o];
928
+ if (typeof i == "string") {
929
+ const n = r(i);
930
+ n !== i && (bn(e) || (e[o] = n), i = n);
931
931
  }
932
- t[n] = !0;
932
+ t[i] = !0;
933
933
  }
934
934
  return t;
935
935
  }
936
- function bi(t) {
936
+ function An(t) {
937
937
  for (let e = 0; e < t.length; e++)
938
938
  U(t, e) || (t[e] = null);
939
939
  return t;
940
940
  }
941
941
  function Q(t) {
942
942
  const e = We(null);
943
- for (const o of xo(t)) {
944
- var r = ii(o, 2);
945
- const n = r[0], i = r[1];
946
- U(t, n) && (Se(i) ? e[n] = bi(i) : i && typeof i == "object" && i.constructor === Object ? e[n] = Q(i) : e[n] = i);
943
+ for (const o of To(t)) {
944
+ var r = fn(o, 2);
945
+ const i = r[0], n = r[1];
946
+ U(t, i) && (Se(n) ? e[i] = An(n) : n && typeof n == "object" && n.constructor === Object ? e[i] = Q(n) : e[i] = n);
947
947
  }
948
948
  return e;
949
949
  }
950
- function gi(t) {
950
+ function Tn(t) {
951
951
  switch (typeof t) {
952
952
  case "string":
953
953
  return t;
954
954
  case "number":
955
- return fi(t);
955
+ return vn(t);
956
956
  case "boolean":
957
- return hi(t);
957
+ return yn(t);
958
958
  case "bigint":
959
- return Vr ? Vr(t) : "0";
959
+ return Zr ? Zr(t) : "0";
960
960
  case "symbol":
961
- return Qr ? Qr(t) : "Symbol()";
961
+ return Xr ? Xr(t) : "Symbol()";
962
962
  case "undefined":
963
963
  return Je(t);
964
964
  case "function":
@@ -978,34 +978,34 @@ function gi(t) {
978
978
  }
979
979
  function re(t, e) {
980
980
  for (; t !== null; ) {
981
- const o = ci(t, e);
981
+ const o = gn(t, e);
982
982
  if (o) {
983
983
  if (o.get)
984
984
  return B(o.get);
985
985
  if (typeof o.value == "function")
986
986
  return B(o.value);
987
987
  }
988
- t = si(t);
988
+ t = mn(t);
989
989
  }
990
990
  function r() {
991
991
  return null;
992
992
  }
993
993
  return r;
994
994
  }
995
- function wi(t) {
995
+ function Nn(t) {
996
996
  try {
997
997
  return q(t, ""), !0;
998
998
  } catch {
999
999
  return !1;
1000
1000
  }
1001
1001
  }
1002
- const Zr = G(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Yt = G(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Vt = G(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), ki = G(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Qt = G(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), xi = G(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Xr = G(["#text"]), Kr = G(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), Zt = G(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dominant-baseline", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-orientation", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Jr = G(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), vt = G(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), vi = Y(/{{[\w\W]*|^[\w\W]*}}/g), yi = Y(/<%[\w\W]*|^[\w\W]*%>/g), Si = Y(/\${[\w\W]*/g), Ai = Y(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ti = Y(/^aria-[\-\w]+$/), eo = Y(
1002
+ const Kr = G(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Vt = G(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Qt = G(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Ln = G(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Zt = G(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Rn = G(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Jr = G(["#text"]), eo = G(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), Xt = G(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dominant-baseline", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-orientation", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), to = G(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), yt = G(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), En = Y(/{{[\w\W]*|^[\w\W]*}}/g), zn = Y(/<%[\w\W]*|^[\w\W]*%>/g), Cn = Y(/\${[\w\W]*/g), jn = Y(/^data-[\-\w.\u00B7-\uFFFF]+$/), _n = Y(/^aria-[\-\w]+$/), ro = Y(
1003
1003
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
1004
1004
  // eslint-disable-line no-useless-escape
1005
- ), Ni = Y(/^(?:\w+script|data):/i), Li = Y(
1005
+ ), In = Y(/^(?:\w+script|data):/i), $n = Y(
1006
1006
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
1007
1007
  // eslint-disable-line no-control-regex
1008
- ), Ri = Y(/^html$/i), Ei = Y(/^[a-z][.\w]*(-[.\w]+)+$/i), to = Y(/<[/\w!]/g), ro = Y(/<[/\w]/g), zi = Y(/<\/no(script|embed|frames)/i), Ci = Y(/\/>/i), ee = {
1008
+ ), Dn = Y(/^html$/i), Pn = Y(/^[a-z][.\w]*(-[.\w]+)+$/i), oo = Y(/<[/\w!]/g), io = Y(/<[/\w]/g), On = Y(/<\/no(script|embed|frames)/i), Hn = Y(/\/>/i), ee = {
1009
1009
  element: 1,
1010
1010
  attribute: 2,
1011
1011
  text: 3,
@@ -1021,28 +1021,28 @@ const Zr = G(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
1021
1021
  documentFragment: 11,
1022
1022
  notation: 12
1023
1023
  // Deprecated
1024
- }, ji = function() {
1024
+ }, Fn = function() {
1025
1025
  return typeof window > "u" ? null : window;
1026
- }, _i = function(t, e) {
1026
+ }, Bn = function(t, e) {
1027
1027
  if (typeof t != "object" || typeof t.createPolicy != "function")
1028
1028
  return null;
1029
1029
  let r = null;
1030
1030
  const o = "data-tt-policy-suffix";
1031
1031
  e && e.hasAttribute(o) && (r = e.getAttribute(o));
1032
- const n = "dompurify" + (r ? "#" + r : "");
1032
+ const i = "dompurify" + (r ? "#" + r : "");
1033
1033
  try {
1034
- return t.createPolicy(n, {
1035
- createHTML(i) {
1036
- return i;
1034
+ return t.createPolicy(i, {
1035
+ createHTML(n) {
1036
+ return n;
1037
1037
  },
1038
- createScriptURL(i) {
1039
- return i;
1038
+ createScriptURL(n) {
1039
+ return n;
1040
1040
  }
1041
1041
  });
1042
1042
  } catch {
1043
- return console.warn("TrustedTypes policy " + n + " could not be created."), null;
1043
+ return console.warn("TrustedTypes policy " + i + " could not be created."), null;
1044
1044
  }
1045
- }, oo = function() {
1045
+ }, no = function() {
1046
1046
  return {
1047
1047
  afterSanitizeAttributes: [],
1048
1048
  afterSanitizeElements: [],
@@ -1057,18 +1057,18 @@ const Zr = G(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
1057
1057
  }, ve = function(t, e, r, o) {
1058
1058
  return U(t, e) && Se(t[e]) ? C(o.base ? Q(o.base) : {}, t[e], o.transform) : r;
1059
1059
  };
1060
- function yo() {
1061
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ji();
1062
- const e = (a) => yo(a);
1060
+ function Lo() {
1061
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Fn();
1062
+ const e = (a) => Lo(a);
1063
1063
  if (e.version = "3.4.13", e.removed = [], !t || !t.document || t.document.nodeType !== ee.document || !t.Element)
1064
1064
  return e.isSupported = !1, e;
1065
1065
  let r = t.document;
1066
- const o = r, n = o.currentScript;
1066
+ const o = r, i = o.currentScript;
1067
1067
  t.DocumentFragment;
1068
- const i = t.HTMLTemplateElement, l = t.Node, s = t.Element, u = t.NodeFilter;
1068
+ const n = t.HTMLTemplateElement, l = t.Node, s = t.Element, u = t.NodeFilter;
1069
1069
  t.NamedNodeMap === void 0 && (t.NamedNodeMap || t.MozNamedAttrMap), t.HTMLFormElement;
1070
- const m = t.DOMParser, f = t.trustedTypes, b = s.prototype, x = re(b, "cloneNode"), w = re(b, "remove"), N = re(b, "nextSibling"), _ = re(b, "childNodes"), H = re(b, "parentNode"), X = re(b, "shadowRoot"), W = re(b, "attributes"), E = l && l.prototype ? re(l.prototype, "nodeType") : null, k = l && l.prototype ? re(l.prototype, "nodeName") : null, v = l && l.prototype ? re(l.prototype, "ownerDocument") : null;
1071
- if (typeof i == "function") {
1070
+ const b = t.DOMParser, f = t.trustedTypes, m = s.prototype, x = re(m, "cloneNode"), w = re(m, "remove"), N = re(m, "nextSibling"), j = re(m, "childNodes"), H = re(m, "parentNode"), X = re(m, "shadowRoot"), W = re(m, "attributes"), E = l && l.prototype ? re(l.prototype, "nodeType") : null, k = l && l.prototype ? re(l.prototype, "nodeName") : null, v = l && l.prototype ? re(l.prototype, "ownerDocument") : null;
1071
+ if (typeof n == "function") {
1072
1072
  const a = r.createElement("template");
1073
1073
  a.content && a.content.ownerDocument && (r = a.content.ownerDocument);
1074
1074
  }
@@ -1083,7 +1083,7 @@ function yo() {
1083
1083
  } finally {
1084
1084
  Te--;
1085
1085
  }
1086
- }, lt = function(a) {
1086
+ }, st = function(a) {
1087
1087
  Ne(), Te++;
1088
1088
  try {
1089
1089
  return A.createScriptURL(a);
@@ -1091,15 +1091,15 @@ function yo() {
1091
1091
  Te--;
1092
1092
  }
1093
1093
  }, M = function() {
1094
- return Ae || (J = _i(f, n), Ae = !0), J;
1095
- }, me = r, be = me.implementation, fr = me.createNodeIterator, Io = me.createDocumentFragment, Do = me.getElementsByTagName, Po = o.importNode;
1096
- let I = oo();
1097
- e.isSupported = typeof xo == "function" && typeof H == "function" && be && be.createHTMLDocument !== void 0;
1098
- const $o = vi, Oo = yi, Ho = Si, Fo = Ai, Bo = Ti, Mo = Ni, hr = Li, qo = Ei;
1099
- let mr = eo, D = null;
1100
- const Rt = C({}, [...Zr, ...Yt, ...Vt, ...Qt, ...Xr]);
1101
- let P = null;
1102
- const Et = C({}, [...Kr, ...Zt, ...Jr, ...vt]);
1094
+ return Ae || (J = Bn(f, i), Ae = !0), J;
1095
+ }, be = r, me = be.implementation, br = be.createNodeIterator, qo = be.createDocumentFragment, Uo = be.getElementsByTagName, Wo = o.importNode;
1096
+ let I = no();
1097
+ e.isSupported = typeof To == "function" && typeof H == "function" && me && me.createHTMLDocument !== void 0;
1098
+ const Go = En, Yo = zn, Vo = Cn, Qo = jn, Zo = _n, Xo = In, mr = $n, Ko = Pn;
1099
+ let gr = ro, $ = null;
1100
+ const Et = C({}, [...Kr, ...Vt, ...Qt, ...Zt, ...Jr]);
1101
+ let D = null;
1102
+ const zt = C({}, [...eo, ...Xt, ...to, ...yt]);
1103
1103
  let O = Object.seal(We(null, {
1104
1104
  tagNameCheck: {
1105
1105
  writable: !0,
@@ -1119,7 +1119,7 @@ function yo() {
1119
1119
  enumerable: !0,
1120
1120
  value: !1
1121
1121
  }
1122
- })), Ve = null, br = null;
1122
+ })), Ve = null, wr = null;
1123
1123
  const ge = Object.seal(We(null, {
1124
1124
  tagCheck: {
1125
1125
  writable: !0,
@@ -1134,10 +1134,10 @@ function yo() {
1134
1134
  value: null
1135
1135
  }
1136
1136
  }));
1137
- let gr = !0, zt = !0, wr = !1, kr = !0, we = !1, ke = !0, Le = !1, Ct = !1, st = null, ct = null, jt = !1, De = !1, ut = !1, dt = !1, xr = !0, vr = !1;
1138
- const yr = "user-content-";
1139
- let _t = !0, pt = !1, Pe = {}, ie = null;
1140
- const It = C({}, [
1137
+ let kr = !0, Ct = !0, xr = !1, vr = !0, we = !1, ke = !0, Le = !1, jt = !1, ct = null, ut = null, _t = !1, $e = !1, dt = !1, pt = !1, yr = !0, Sr = !1;
1138
+ const Ar = "user-content-";
1139
+ let It = !0, ft = !1, De = {}, ne = null;
1140
+ const $t = C({}, [
1141
1141
  "annotation-xml",
1142
1142
  "audio",
1143
1143
  "colgroup",
@@ -1174,47 +1174,47 @@ function yo() {
1174
1174
  "video",
1175
1175
  "xmp"
1176
1176
  ]);
1177
- let Sr = null;
1178
- const Ar = C({}, ["audio", "video", "img", "source", "image", "track"]);
1177
+ let Tr = null;
1178
+ const Nr = C({}, ["audio", "video", "img", "source", "image", "track"]);
1179
1179
  let Dt = null;
1180
- const Tr = C({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ft = "http://www.w3.org/1998/Math/MathML", ht = "http://www.w3.org/2000/svg", ae = "http://www.w3.org/1999/xhtml";
1181
- let $e = ae, Pt = !1, $t = null;
1182
- const Uo = C({}, [ft, ht, ae], Gt), Nr = G(["mi", "mo", "mn", "ms", "mtext"]);
1183
- let Ot = C({}, Nr);
1184
- const Lr = G(["annotation-xml"]);
1185
- let Ht = C({}, Lr);
1186
- const Wo = C({}, ["title", "style", "font", "a", "script"]);
1180
+ const Lr = C({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ht = "http://www.w3.org/1998/Math/MathML", bt = "http://www.w3.org/2000/svg", ae = "http://www.w3.org/1999/xhtml";
1181
+ let Pe = ae, Pt = !1, Ot = null;
1182
+ const Jo = C({}, [ht, bt, ae], Yt), Rr = G(["mi", "mo", "mn", "ms", "mtext"]);
1183
+ let Ht = C({}, Rr);
1184
+ const Er = G(["annotation-xml"]);
1185
+ let Ft = C({}, Er);
1186
+ const ei = C({}, ["title", "style", "font", "a", "script"]);
1187
1187
  let Qe = null;
1188
- const Go = ["application/xhtml+xml", "text/html"], Yo = "text/html";
1189
- let $ = null, Oe = null;
1190
- const Vo = r.createElement("form"), Rr = function(a) {
1188
+ const ti = ["application/xhtml+xml", "text/html"], ri = "text/html";
1189
+ let P = null, Oe = null;
1190
+ const oi = r.createElement("form"), zr = function(a) {
1191
1191
  return a instanceof RegExp || a instanceof Function;
1192
- }, Ft = function() {
1192
+ }, Bt = function() {
1193
1193
  let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1194
1194
  if (Oe && Oe === a)
1195
1195
  return;
1196
1196
  (!a || typeof a != "object") && (a = {}), a = Q(a), Qe = // eslint-disable-next-line unicorn/prefer-includes
1197
- Go.indexOf(a.PARSER_MEDIA_TYPE) === -1 ? Yo : a.PARSER_MEDIA_TYPE, $ = Qe === "application/xhtml+xml" ? Gt : tt, D = ve(a, "ALLOWED_TAGS", Rt, {
1198
- transform: $
1199
- }), P = ve(a, "ALLOWED_ATTR", Et, {
1200
- transform: $
1201
- }), $t = ve(a, "ALLOWED_NAMESPACES", Uo, {
1202
- transform: Gt
1203
- }), Dt = ve(a, "ADD_URI_SAFE_ATTR", Tr, {
1204
- transform: $,
1205
- base: Tr
1206
- }), Sr = ve(a, "ADD_DATA_URI_TAGS", Ar, {
1207
- transform: $,
1208
- base: Ar
1209
- }), ie = ve(a, "FORBID_CONTENTS", It, {
1210
- transform: $
1197
+ ti.indexOf(a.PARSER_MEDIA_TYPE) === -1 ? ri : a.PARSER_MEDIA_TYPE, P = Qe === "application/xhtml+xml" ? Yt : tt, $ = ve(a, "ALLOWED_TAGS", Et, {
1198
+ transform: P
1199
+ }), D = ve(a, "ALLOWED_ATTR", zt, {
1200
+ transform: P
1201
+ }), Ot = ve(a, "ALLOWED_NAMESPACES", Jo, {
1202
+ transform: Yt
1203
+ }), Dt = ve(a, "ADD_URI_SAFE_ATTR", Lr, {
1204
+ transform: P,
1205
+ base: Lr
1206
+ }), Tr = ve(a, "ADD_DATA_URI_TAGS", Nr, {
1207
+ transform: P,
1208
+ base: Nr
1209
+ }), ne = ve(a, "FORBID_CONTENTS", $t, {
1210
+ transform: P
1211
1211
  }), Ve = ve(a, "FORBID_TAGS", Q({}), {
1212
- transform: $
1213
- }), br = ve(a, "FORBID_ATTR", Q({}), {
1214
- transform: $
1215
- }), Pe = U(a, "USE_PROFILES") ? a.USE_PROFILES && typeof a.USE_PROFILES == "object" ? Q(a.USE_PROFILES) : a.USE_PROFILES : !1, gr = a.ALLOW_ARIA_ATTR !== !1, zt = a.ALLOW_DATA_ATTR !== !1, wr = a.ALLOW_UNKNOWN_PROTOCOLS || !1, kr = a.ALLOW_SELF_CLOSE_IN_ATTR !== !1, we = a.SAFE_FOR_TEMPLATES || !1, ke = a.SAFE_FOR_XML !== !1, Le = a.WHOLE_DOCUMENT || !1, De = a.RETURN_DOM || !1, ut = a.RETURN_DOM_FRAGMENT || !1, dt = a.RETURN_TRUSTED_TYPE || !1, jt = a.FORCE_BODY || !1, xr = a.SANITIZE_DOM !== !1, vr = a.SANITIZE_NAMED_PROPS || !1, _t = a.KEEP_CONTENT !== !1, pt = a.IN_PLACE || !1, mr = wi(a.ALLOWED_URI_REGEXP) ? a.ALLOWED_URI_REGEXP : eo, $e = typeof a.NAMESPACE == "string" ? a.NAMESPACE : ae, Ot = U(a, "MATHML_TEXT_INTEGRATION_POINTS") && a.MATHML_TEXT_INTEGRATION_POINTS && typeof a.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Q(a.MATHML_TEXT_INTEGRATION_POINTS) : C({}, Nr), Ht = U(a, "HTML_INTEGRATION_POINTS") && a.HTML_INTEGRATION_POINTS && typeof a.HTML_INTEGRATION_POINTS == "object" ? Q(a.HTML_INTEGRATION_POINTS) : C({}, Lr);
1212
+ transform: P
1213
+ }), wr = ve(a, "FORBID_ATTR", Q({}), {
1214
+ transform: P
1215
+ }), De = U(a, "USE_PROFILES") ? a.USE_PROFILES && typeof a.USE_PROFILES == "object" ? Q(a.USE_PROFILES) : a.USE_PROFILES : !1, kr = a.ALLOW_ARIA_ATTR !== !1, Ct = a.ALLOW_DATA_ATTR !== !1, xr = a.ALLOW_UNKNOWN_PROTOCOLS || !1, vr = a.ALLOW_SELF_CLOSE_IN_ATTR !== !1, we = a.SAFE_FOR_TEMPLATES || !1, ke = a.SAFE_FOR_XML !== !1, Le = a.WHOLE_DOCUMENT || !1, $e = a.RETURN_DOM || !1, dt = a.RETURN_DOM_FRAGMENT || !1, pt = a.RETURN_TRUSTED_TYPE || !1, _t = a.FORCE_BODY || !1, yr = a.SANITIZE_DOM !== !1, Sr = a.SANITIZE_NAMED_PROPS || !1, It = a.KEEP_CONTENT !== !1, ft = a.IN_PLACE || !1, gr = Nn(a.ALLOWED_URI_REGEXP) ? a.ALLOWED_URI_REGEXP : ro, Pe = typeof a.NAMESPACE == "string" ? a.NAMESPACE : ae, Ht = U(a, "MATHML_TEXT_INTEGRATION_POINTS") && a.MATHML_TEXT_INTEGRATION_POINTS && typeof a.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Q(a.MATHML_TEXT_INTEGRATION_POINTS) : C({}, Rr), Ft = U(a, "HTML_INTEGRATION_POINTS") && a.HTML_INTEGRATION_POINTS && typeof a.HTML_INTEGRATION_POINTS == "object" ? Q(a.HTML_INTEGRATION_POINTS) : C({}, Er);
1216
1216
  const d = U(a, "CUSTOM_ELEMENT_HANDLING") && a.CUSTOM_ELEMENT_HANDLING && typeof a.CUSTOM_ELEMENT_HANDLING == "object" ? Q(a.CUSTOM_ELEMENT_HANDLING) : We(null);
1217
- if (O = We(null), U(d, "tagNameCheck") && Rr(d.tagNameCheck) && (O.tagNameCheck = d.tagNameCheck), U(d, "attributeNameCheck") && Rr(d.attributeNameCheck) && (O.attributeNameCheck = d.attributeNameCheck), U(d, "allowCustomizedBuiltInElements") && typeof d.allowCustomizedBuiltInElements == "boolean" && (O.allowCustomizedBuiltInElements = d.allowCustomizedBuiltInElements), Y(O), we && (zt = !1), ut && (De = !0), Pe && (D = C({}, Xr), P = We(null), Pe.html === !0 && (C(D, Zr), C(P, Kr)), Pe.svg === !0 && (C(D, Yt), C(P, Zt), C(P, vt)), Pe.svgFilters === !0 && (C(D, Vt), C(P, Zt), C(P, vt)), Pe.mathMl === !0 && (C(D, Qt), C(P, Jr), C(P, vt))), ge.tagCheck = null, ge.attributeCheck = null, U(a, "ADD_TAGS") && (typeof a.ADD_TAGS == "function" ? ge.tagCheck = a.ADD_TAGS : Se(a.ADD_TAGS) && (D === Rt && (D = Q(D)), C(D, a.ADD_TAGS, $))), U(a, "ADD_ATTR") && (typeof a.ADD_ATTR == "function" ? ge.attributeCheck = a.ADD_ATTR : Se(a.ADD_ATTR) && (P === Et && (P = Q(P)), C(P, a.ADD_ATTR, $))), U(a, "ADD_URI_SAFE_ATTR") && Se(a.ADD_URI_SAFE_ATTR) && C(Dt, a.ADD_URI_SAFE_ATTR, $), U(a, "FORBID_CONTENTS") && Se(a.FORBID_CONTENTS) && (ie === It && (ie = Q(ie)), C(ie, a.FORBID_CONTENTS, $)), U(a, "ADD_FORBID_CONTENTS") && Se(a.ADD_FORBID_CONTENTS) && (ie === It && (ie = Q(ie)), C(ie, a.ADD_FORBID_CONTENTS, $)), _t && (D["#text"] = !0), Le && C(D, ["html", "head", "body"]), D.table && (C(D, ["tbody"]), delete Ve.tbody), a.TRUSTED_TYPES_POLICY) {
1217
+ if (O = We(null), U(d, "tagNameCheck") && zr(d.tagNameCheck) && (O.tagNameCheck = d.tagNameCheck), U(d, "attributeNameCheck") && zr(d.attributeNameCheck) && (O.attributeNameCheck = d.attributeNameCheck), U(d, "allowCustomizedBuiltInElements") && typeof d.allowCustomizedBuiltInElements == "boolean" && (O.allowCustomizedBuiltInElements = d.allowCustomizedBuiltInElements), Y(O), we && (Ct = !1), dt && ($e = !0), De && ($ = C({}, Jr), D = We(null), De.html === !0 && (C($, Kr), C(D, eo)), De.svg === !0 && (C($, Vt), C(D, Xt), C(D, yt)), De.svgFilters === !0 && (C($, Qt), C(D, Xt), C(D, yt)), De.mathMl === !0 && (C($, Zt), C(D, to), C(D, yt))), ge.tagCheck = null, ge.attributeCheck = null, U(a, "ADD_TAGS") && (typeof a.ADD_TAGS == "function" ? ge.tagCheck = a.ADD_TAGS : Se(a.ADD_TAGS) && ($ === Et && ($ = Q($)), C($, a.ADD_TAGS, P))), U(a, "ADD_ATTR") && (typeof a.ADD_ATTR == "function" ? ge.attributeCheck = a.ADD_ATTR : Se(a.ADD_ATTR) && (D === zt && (D = Q(D)), C(D, a.ADD_ATTR, P))), U(a, "ADD_URI_SAFE_ATTR") && Se(a.ADD_URI_SAFE_ATTR) && C(Dt, a.ADD_URI_SAFE_ATTR, P), U(a, "FORBID_CONTENTS") && Se(a.FORBID_CONTENTS) && (ne === $t && (ne = Q(ne)), C(ne, a.FORBID_CONTENTS, P)), U(a, "ADD_FORBID_CONTENTS") && Se(a.ADD_FORBID_CONTENTS) && (ne === $t && (ne = Q(ne)), C(ne, a.ADD_FORBID_CONTENTS, P)), It && ($["#text"] = !0), Le && C($, ["html", "head", "body"]), $.table && (C($, ["tbody"]), delete Ve.tbody), a.TRUSTED_TYPES_POLICY) {
1218
1218
  if (typeof a.TRUSTED_TYPES_POLICY.createHTML != "function")
1219
1219
  throw Ce('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
1220
1220
  if (typeof a.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -1228,20 +1228,20 @@ function yo() {
1228
1228
  }
1229
1229
  } else a.TRUSTED_TYPES_POLICY === null ? (A = void 0, z = "") : (A === void 0 && (A = M()), A && typeof z == "string" && (z = fe("")));
1230
1230
  G && G(a), Oe = a;
1231
- }, Er = C({}, [...Yt, ...Vt, ...ki]), zr = C({}, [...Qt, ...xi]), Qo = function(a, d, h) {
1232
- return d.namespaceURI === ae ? a === "svg" : d.namespaceURI === ft ? a === "svg" && (h === "annotation-xml" || Ot[h]) : !!Er[a];
1233
- }, Zo = function(a, d, h) {
1234
- return d.namespaceURI === ae ? a === "math" : d.namespaceURI === ht ? a === "math" && Ht[h] : !!zr[a];
1235
- }, Xo = function(a, d, h) {
1236
- return d.namespaceURI === ht && !Ht[h] || d.namespaceURI === ft && !Ot[h] ? !1 : !zr[a] && (Wo[a] || !Er[a]);
1237
- }, Ko = function(a) {
1231
+ }, Cr = C({}, [...Vt, ...Qt, ...Ln]), jr = C({}, [...Zt, ...Rn]), ii = function(a, d, h) {
1232
+ return d.namespaceURI === ae ? a === "svg" : d.namespaceURI === ht ? a === "svg" && (h === "annotation-xml" || Ht[h]) : !!Cr[a];
1233
+ }, ni = function(a, d, h) {
1234
+ return d.namespaceURI === ae ? a === "math" : d.namespaceURI === bt ? a === "math" && Ft[h] : !!jr[a];
1235
+ }, ai = function(a, d, h) {
1236
+ return d.namespaceURI === bt && !Ft[h] || d.namespaceURI === ht && !Ht[h] ? !1 : !jr[a] && (ei[a] || !Cr[a]);
1237
+ }, li = function(a) {
1238
1238
  let d = H(a);
1239
1239
  (!d || !d.tagName) && (d = {
1240
- namespaceURI: $e,
1240
+ namespaceURI: Pe,
1241
1241
  tagName: "template"
1242
1242
  });
1243
1243
  const h = tt(a.tagName), g = tt(d.tagName);
1244
- return $t[a.namespaceURI] ? a.namespaceURI === ht ? Qo(h, d, g) : a.namespaceURI === ft ? Zo(h, d, g) : a.namespaceURI === ae ? Xo(h, d, g) : !!(Qe === "application/xhtml+xml" && $t[a.namespaceURI]) : !1;
1244
+ return Ot[a.namespaceURI] ? a.namespaceURI === bt ? ii(h, d, g) : a.namespaceURI === ht ? ni(h, d, g) : a.namespaceURI === ae ? ai(h, d, g) : !!(Qe === "application/xhtml+xml" && Ot[a.namespaceURI]) : !1;
1245
1245
  }, Re = function(a) {
1246
1246
  Be(e.removed, {
1247
1247
  element: a
@@ -1254,14 +1254,14 @@ function yo() {
1254
1254
  }
1255
1255
  }, mt = function(a) {
1256
1256
  Ze(a);
1257
- const d = _(a);
1257
+ const d = j(a);
1258
1258
  if (d) {
1259
1259
  const g = [];
1260
- Fe(d, (y) => {
1261
- Be(g, y);
1262
- }), Fe(g, (y) => {
1260
+ Fe(d, (S) => {
1261
+ Be(g, S);
1262
+ }), Fe(g, (S) => {
1263
1263
  try {
1264
- w(y);
1264
+ w(S);
1265
1265
  } catch {
1266
1266
  }
1267
1267
  });
@@ -1269,7 +1269,7 @@ function yo() {
1269
1269
  const h = W(a);
1270
1270
  if (h)
1271
1271
  for (let g = h.length - 1; g >= 0; --g) {
1272
- const y = h[g], L = y && y.name;
1272
+ const S = h[g], L = S && S.name;
1273
1273
  if (typeof L == "string")
1274
1274
  try {
1275
1275
  a.removeAttribute(L);
@@ -1289,7 +1289,7 @@ function yo() {
1289
1289
  });
1290
1290
  }
1291
1291
  if (d.removeAttribute(a), a === "is")
1292
- if (De || ut)
1292
+ if ($e || dt)
1293
1293
  try {
1294
1294
  Re(d);
1295
1295
  } catch {
@@ -1299,14 +1299,14 @@ function yo() {
1299
1299
  d.setAttribute(a, "");
1300
1300
  } catch {
1301
1301
  }
1302
- }, Jo = function(a) {
1302
+ }, si = function(a) {
1303
1303
  const d = W(a);
1304
1304
  if (d)
1305
1305
  for (let h = d.length - 1; h >= 0; --h) {
1306
- const g = d[h], y = g && g.name;
1307
- if (!(typeof y != "string" || P[$(y)]))
1306
+ const g = d[h], S = g && g.name;
1307
+ if (!(typeof S != "string" || D[P(S)]))
1308
1308
  try {
1309
- a.removeAttribute(y);
1309
+ a.removeAttribute(S);
1310
1310
  } catch {
1311
1311
  }
1312
1312
  }
@@ -1314,19 +1314,19 @@ function yo() {
1314
1314
  const d = [a];
1315
1315
  for (; d.length > 0; ) {
1316
1316
  const h = d.pop();
1317
- (E ? E(h) : h.nodeType) === ee.element && Jo(h);
1318
- const g = _(h);
1317
+ (E ? E(h) : h.nodeType) === ee.element && si(h);
1318
+ const g = j(h);
1319
1319
  if (g)
1320
- for (let y = g.length - 1; y >= 0; --y)
1321
- d.push(g[y]);
1320
+ for (let S = g.length - 1; S >= 0; --S)
1321
+ d.push(g[S]);
1322
1322
  }
1323
- }, en = function(a) {
1323
+ }, ci = function(a) {
1324
1324
  if (!ke)
1325
1325
  return;
1326
1326
  const d = [a];
1327
1327
  for (; d.length > 0; ) {
1328
1328
  const h = d.pop(), g = E ? E(h) : h.nodeType;
1329
- if (g === ee.processingInstruction || g === ee.comment && q(ro, h.data)) {
1329
+ if (g === ee.processingInstruction || g === ee.comment && q(io, h.data)) {
1330
1330
  try {
1331
1331
  w(h);
1332
1332
  } catch {
@@ -1334,72 +1334,72 @@ function yo() {
1334
1334
  continue;
1335
1335
  }
1336
1336
  if (g === ee.element) {
1337
- const L = h, R = $(k ? k(h) : h.nodeName);
1337
+ const L = h, R = P(k ? k(h) : h.nodeName);
1338
1338
  try {
1339
1339
  L.hasAttribute && L.hasAttribute("patchsrc") && L.removeAttribute("patchsrc"), L.hasAttribute && L.hasAttribute("for") && R !== "label" && R !== "output" && L.removeAttribute("for");
1340
1340
  } catch {
1341
1341
  }
1342
1342
  }
1343
- const y = _(h);
1344
- if (y)
1345
- for (let L = y.length - 1; L >= 0; --L)
1346
- d.push(y[L]);
1343
+ const S = j(h);
1344
+ if (S)
1345
+ for (let L = S.length - 1; L >= 0; --L)
1346
+ d.push(S[L]);
1347
1347
  }
1348
- }, Cr = function(a) {
1348
+ }, _r = function(a) {
1349
1349
  let d = null, h = null;
1350
- if (jt)
1350
+ if (_t)
1351
1351
  a = "<remove></remove>" + a;
1352
1352
  else {
1353
- const L = Gr(a, /^[\r\n\t ]+/);
1353
+ const L = Vr(a, /^[\r\n\t ]+/);
1354
1354
  h = L && L[0];
1355
1355
  }
1356
- Qe === "application/xhtml+xml" && $e === ae && (a = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + a + "</body></html>");
1356
+ Qe === "application/xhtml+xml" && Pe === ae && (a = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + a + "</body></html>");
1357
1357
  const g = A ? fe(a) : a;
1358
- if ($e === ae)
1358
+ if (Pe === ae)
1359
1359
  try {
1360
- d = new m().parseFromString(g, Qe);
1360
+ d = new b().parseFromString(g, Qe);
1361
1361
  } catch {
1362
1362
  }
1363
1363
  if (!d || !d.documentElement) {
1364
- d = be.createDocument($e, "template", null);
1364
+ d = me.createDocument(Pe, "template", null);
1365
1365
  try {
1366
1366
  d.documentElement.innerHTML = Pt ? z : g;
1367
1367
  } catch {
1368
1368
  }
1369
1369
  }
1370
- const y = d.body || d.documentElement;
1371
- return a && h && y.insertBefore(r.createTextNode(h), y.childNodes[0] || null), $e === ae ? Do.call(d, Le ? "html" : "body")[0] : Le ? d.documentElement : y;
1372
- }, jr = function(a) {
1370
+ const S = d.body || d.documentElement;
1371
+ return a && h && S.insertBefore(r.createTextNode(h), S.childNodes[0] || null), Pe === ae ? Uo.call(d, Le ? "html" : "body")[0] : Le ? d.documentElement : S;
1372
+ }, Ir = function(a) {
1373
1373
  const d = v ? v(a) : a.ownerDocument;
1374
- return fr.call(
1374
+ return br.call(
1375
1375
  d || a,
1376
1376
  a,
1377
1377
  // eslint-disable-next-line no-bitwise
1378
1378
  u.SHOW_ELEMENT | u.SHOW_COMMENT | u.SHOW_TEXT | u.SHOW_PROCESSING_INSTRUCTION | u.SHOW_CDATA_SECTION,
1379
1379
  null
1380
1380
  );
1381
- }, bt = function(a) {
1382
- return a = Ke(a, $o, " "), a = Ke(a, Oo, " "), a = Ke(a, Ho, " "), a;
1383
- }, Bt = function(a) {
1381
+ }, gt = function(a) {
1382
+ return a = Ke(a, Go, " "), a = Ke(a, Yo, " "), a = Ke(a, Vo, " "), a;
1383
+ }, Mt = function(a) {
1384
1384
  var d;
1385
1385
  a.normalize();
1386
- const h = v ? v(a) : a.ownerDocument, g = fr.call(
1386
+ const h = v ? v(a) : a.ownerDocument, g = br.call(
1387
1387
  h || a,
1388
1388
  a,
1389
1389
  // eslint-disable-next-line no-bitwise
1390
1390
  u.SHOW_TEXT | u.SHOW_COMMENT | u.SHOW_CDATA_SECTION | u.SHOW_PROCESSING_INSTRUCTION,
1391
1391
  null
1392
1392
  );
1393
- let y = g.nextNode();
1394
- for (; y; )
1395
- y.data = bt(y.data), y = g.nextNode();
1393
+ let S = g.nextNode();
1394
+ for (; S; )
1395
+ S.data = gt(S.data), S = g.nextNode();
1396
1396
  const L = (d = a.querySelectorAll) === null || d === void 0 ? void 0 : d.call(a, "template");
1397
1397
  L && Fe(L, (R) => {
1398
- He(R.content) && Bt(R.content);
1398
+ He(R.content) && Mt(R.content);
1399
1399
  });
1400
- }, gt = function(a) {
1400
+ }, wt = function(a) {
1401
1401
  const d = k ? k(a) : null;
1402
- return typeof d != "string" || $(d) !== "form" ? !1 : typeof a.nodeName != "string" || typeof a.textContent != "string" || typeof a.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
1402
+ return typeof d != "string" || P(d) !== "form" ? !1 : typeof a.nodeName != "string" || typeof a.textContent != "string" || typeof a.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
1403
1403
  // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
1404
1404
  // makes the direct read diverge from the cached read; a clean form
1405
1405
  // (same-realm OR foreign-realm) has both reads pointing at the same
@@ -1422,7 +1422,7 @@ function yo() {
1422
1422
  // select, etc.) regardless of whether the named child happens to
1423
1423
  // carry a numeric .length, which a typeof-based probe would miss
1424
1424
  // (e.g. HTMLSelectElement.length is a defined unsigned-long).
1425
- a.childNodes !== _(a);
1425
+ a.childNodes !== j(a);
1426
1426
  }, He = function(a) {
1427
1427
  if (!E || typeof a != "object" || a === null)
1428
1428
  return !1;
@@ -1445,108 +1445,108 @@ function yo() {
1445
1445
  g.call(e, d, h, Oe);
1446
1446
  });
1447
1447
  }
1448
- const tn = function(a, d) {
1449
- return !!(ke && a.hasChildNodes() && !Xe(a.firstElementChild) && q(to, a.textContent) && q(to, a.innerHTML) || ke && a.namespaceURI === ae && d === "style" && Xe(a.firstElementChild) || a.nodeType === ee.processingInstruction || ke && a.nodeType === ee.comment && q(ro, a.data));
1450
- }, rn = function(a, d, h) {
1451
- if (!Ve[d] && Pr(d) && (O.tagNameCheck instanceof RegExp && q(O.tagNameCheck, d) || O.tagNameCheck instanceof Function && O.tagNameCheck(d)))
1448
+ const ui = function(a, d) {
1449
+ return !!(ke && a.hasChildNodes() && !Xe(a.firstElementChild) && q(oo, a.textContent) && q(oo, a.innerHTML) || ke && a.namespaceURI === ae && d === "style" && Xe(a.firstElementChild) || a.nodeType === ee.processingInstruction || ke && a.nodeType === ee.comment && q(io, a.data));
1450
+ }, di = function(a, d, h) {
1451
+ if (!Ve[d] && Or(d) && (O.tagNameCheck instanceof RegExp && q(O.tagNameCheck, d) || O.tagNameCheck instanceof Function && O.tagNameCheck(d)))
1452
1452
  return !1;
1453
- if (_t && !ie[d]) {
1454
- const g = H(a), y = _(a);
1455
- if (y && g) {
1456
- const L = y.length;
1453
+ if (It && !ne[d]) {
1454
+ const g = H(a), S = j(a);
1455
+ if (S && g) {
1456
+ const L = S.length;
1457
1457
  for (let R = L - 1; R >= 0; --R) {
1458
- const se = a === h ? x(y[R], !0) : y[R];
1458
+ const se = a === h ? x(S[R], !0) : S[R];
1459
1459
  g.insertBefore(se, N(a));
1460
1460
  }
1461
1461
  }
1462
1462
  }
1463
1463
  return Re(a), !0;
1464
- }, _r = function(a, d, h, g) {
1464
+ }, $r = function(a, d, h, g) {
1465
1465
  return a.length === 0 ? d : d === h || d === g ? Q(d) : d;
1466
- }, Ir = function(a, d) {
1466
+ }, Dr = function(a, d) {
1467
1467
  if (le(I.beforeSanitizeElements, a, null), a !== d && H(a) === null)
1468
- return pt && Ze(a), !0;
1469
- if (gt(a))
1468
+ return ft && Ze(a), !0;
1469
+ if (wt(a))
1470
1470
  return Re(a), !0;
1471
- const h = $(k ? k(a) : a.nodeName);
1472
- if (D = _r(I.uponSanitizeElement, D, Rt, st), le(I.uponSanitizeElement, a, {
1471
+ const h = P(k ? k(a) : a.nodeName);
1472
+ if ($ = $r(I.uponSanitizeElement, $, Et, ct), le(I.uponSanitizeElement, a, {
1473
1473
  tagName: h,
1474
- allowedTags: D
1474
+ allowedTags: $
1475
1475
  }), a !== d && H(a) === null)
1476
- return pt && Ze(a), !0;
1477
- if (tn(a, h))
1476
+ return ft && Ze(a), !0;
1477
+ if (ui(a, h))
1478
1478
  return Re(a), !0;
1479
- if (Ve[h] || !(ge.tagCheck instanceof Function && ge.tagCheck(h)) && !D[h]) {
1480
- const g = rn(a, h, d);
1479
+ if (Ve[h] || !(ge.tagCheck instanceof Function && ge.tagCheck(h)) && !$[h]) {
1480
+ const g = di(a, h, d);
1481
1481
  return g === !1 && le(I.afterSanitizeElements, a, null), g;
1482
1482
  }
1483
- if ((E ? E(a) : a.nodeType) === ee.element && !Ko(a) || (h === "noscript" || h === "noembed" || h === "noframes") && q(zi, a.innerHTML))
1483
+ if ((E ? E(a) : a.nodeType) === ee.element && !li(a) || (h === "noscript" || h === "noembed" || h === "noframes") && q(On, a.innerHTML))
1484
1484
  return Re(a), !0;
1485
1485
  if (we && a.nodeType === ee.text) {
1486
- const g = bt(a.textContent);
1486
+ const g = gt(a.textContent);
1487
1487
  a.textContent !== g && (Be(e.removed, {
1488
1488
  element: a.cloneNode()
1489
1489
  }), a.textContent = g);
1490
1490
  }
1491
1491
  return le(I.afterSanitizeElements, a, null), !1;
1492
- }, Dr = function(a, d, h) {
1493
- if (br[d] || ke && d === "patchsrc" || ke && d === "for" && a !== "label" && a !== "output" || xr && (d === "id" || d === "name") && (h in r || h in Vo))
1492
+ }, Pr = function(a, d, h) {
1493
+ if (wr[d] || ke && d === "patchsrc" || ke && d === "for" && a !== "label" && a !== "output" || yr && (d === "id" || d === "name") && (h in r || h in oi))
1494
1494
  return !1;
1495
- const g = P[d] || ge.attributeCheck instanceof Function && ge.attributeCheck(d, a);
1496
- if (!(zt && q(Fo, d)) && !(gr && q(Bo, d))) {
1495
+ const g = D[d] || ge.attributeCheck instanceof Function && ge.attributeCheck(d, a);
1496
+ if (!(Ct && q(Qo, d)) && !(kr && q(Zo, d))) {
1497
1497
  if (g) {
1498
- if (!Dt[d] && !q(mr, Ke(h, hr, "")) && !((d === "src" || d === "xlink:href" || d === "href") && a !== "script" && Yr(h, "data:") === 0 && Sr[a]) && !(wr && !q(Mo, Ke(h, hr, ""))) && h)
1498
+ if (!Dt[d] && !q(gr, Ke(h, mr, "")) && !((d === "src" || d === "xlink:href" || d === "href") && a !== "script" && Qr(h, "data:") === 0 && Tr[a]) && !(xr && !q(Xo, Ke(h, mr, ""))) && h)
1499
1499
  return !1;
1500
1500
  } else if (
1501
1501
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1502
1502
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1503
1503
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1504
- !(Pr(a) && (O.tagNameCheck instanceof RegExp && q(O.tagNameCheck, a) || O.tagNameCheck instanceof Function && O.tagNameCheck(a)) && (O.attributeNameCheck instanceof RegExp && q(O.attributeNameCheck, d) || O.attributeNameCheck instanceof Function && O.attributeNameCheck(d, a)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1504
+ !(Or(a) && (O.tagNameCheck instanceof RegExp && q(O.tagNameCheck, a) || O.tagNameCheck instanceof Function && O.tagNameCheck(a)) && (O.attributeNameCheck instanceof RegExp && q(O.attributeNameCheck, d) || O.attributeNameCheck instanceof Function && O.attributeNameCheck(d, a)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1505
1505
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1506
1506
  d === "is" && O.allowCustomizedBuiltInElements && (O.tagNameCheck instanceof RegExp && q(O.tagNameCheck, h) || O.tagNameCheck instanceof Function && O.tagNameCheck(h)))
1507
1507
  ) return !1;
1508
1508
  }
1509
1509
  return !0;
1510
- }, on = C({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), Pr = function(a) {
1511
- return !on[tt(a)] && q(qo, a);
1512
- }, nn = function(a, d, h, g) {
1510
+ }, pi = C({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), Or = function(a) {
1511
+ return !pi[tt(a)] && q(Ko, a);
1512
+ }, fi = function(a, d, h, g) {
1513
1513
  if (A && typeof f == "object" && typeof f.getAttributeType == "function" && !h)
1514
1514
  switch (f.getAttributeType(a, d)) {
1515
1515
  case "TrustedHTML":
1516
1516
  return fe(g);
1517
1517
  case "TrustedScriptURL":
1518
- return lt(g);
1518
+ return st(g);
1519
1519
  }
1520
1520
  return g;
1521
- }, an = function(a, d, h, g) {
1521
+ }, hi = function(a, d, h, g) {
1522
1522
  try {
1523
- h ? a.setAttributeNS(h, d, g) : a.setAttribute(d, g), gt(a) ? Re(a) : Wr(e.removed);
1523
+ h ? a.setAttributeNS(h, d, g) : a.setAttribute(d, g), wt(a) ? Re(a) : Yr(e.removed);
1524
1524
  } catch {
1525
1525
  Ee(d, a);
1526
1526
  }
1527
- }, $r = function(a) {
1527
+ }, Hr = function(a) {
1528
1528
  le(I.beforeSanitizeAttributes, a, null);
1529
1529
  const d = a.attributes;
1530
- if (!d || gt(a))
1530
+ if (!d || wt(a))
1531
1531
  return;
1532
- P = _r(I.uponSanitizeAttribute, P, Et, ct);
1532
+ D = $r(I.uponSanitizeAttribute, D, zt, ut);
1533
1533
  const h = {
1534
1534
  attrName: "",
1535
1535
  attrValue: "",
1536
1536
  keepAttr: !0,
1537
- allowedAttributes: P,
1537
+ allowedAttributes: D,
1538
1538
  forceKeepAttr: void 0
1539
1539
  };
1540
1540
  let g = d.length;
1541
- const y = $(a.nodeName);
1541
+ const S = P(a.nodeName);
1542
1542
  for (; g--; ) {
1543
- const L = d[g], R = L.name, se = L.namespaceURI, xe = L.value, V = $(R), te = xe;
1544
- let K = R === "value" ? te : pi(te);
1545
- if (h.attrName = V, h.attrValue = K, h.keepAttr = !0, h.forceKeepAttr = void 0, le(I.uponSanitizeAttribute, a, h), K = h.attrValue, vr && (V === "id" || V === "name") && Yr(K, yr) !== 0 && (Ee(R, a), K = yr + K), ke && q(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, K)) {
1543
+ const L = d[g], R = L.name, se = L.namespaceURI, xe = L.value, V = P(R), te = xe;
1544
+ let K = R === "value" ? te : xn(te);
1545
+ if (h.attrName = V, h.attrValue = K, h.keepAttr = !0, h.forceKeepAttr = void 0, le(I.uponSanitizeAttribute, a, h), K = h.attrValue, Sr && (V === "id" || V === "name") && Qr(K, Ar) !== 0 && (Ee(R, a), K = Ar + K), ke && q(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, K)) {
1546
1546
  Ee(R, a);
1547
1547
  continue;
1548
1548
  }
1549
- if (V === "attributename" && Gr(K, "href")) {
1549
+ if (V === "attributename" && Vr(K, "href")) {
1550
1550
  Ee(R, a);
1551
1551
  continue;
1552
1552
  }
@@ -1555,28 +1555,28 @@ function yo() {
1555
1555
  Ee(R, a);
1556
1556
  continue;
1557
1557
  }
1558
- if (!kr && q(Ci, K)) {
1558
+ if (!vr && q(Hn, K)) {
1559
1559
  Ee(R, a);
1560
1560
  continue;
1561
1561
  }
1562
- if (we && (K = bt(K)), !Dr(y, V, K)) {
1562
+ if (we && (K = gt(K)), !Pr(S, V, K)) {
1563
1563
  Ee(R, a);
1564
1564
  continue;
1565
1565
  }
1566
- K = nn(y, V, se, K), K !== te && an(a, R, se, K);
1566
+ K = fi(S, V, se, K), K !== te && hi(a, R, se, K);
1567
1567
  }
1568
1568
  }
1569
1569
  le(I.afterSanitizeAttributes, a, null);
1570
- }, wt = function(a) {
1570
+ }, kt = function(a) {
1571
1571
  let d = null;
1572
- const h = jr(a);
1572
+ const h = Ir(a);
1573
1573
  for (le(I.beforeSanitizeShadowDOM, a, null); d = h.nextNode(); )
1574
- if (le(I.uponSanitizeShadowNode, d, null), Ir(d, a), $r(d), He(d.content) && wt(d.content), (E ? E(d) : d.nodeType) === ee.element) {
1574
+ if (le(I.uponSanitizeShadowNode, d, null), Dr(d, a), Hr(d), He(d.content) && kt(d.content), (E ? E(d) : d.nodeType) === ee.element) {
1575
1575
  const g = X(d);
1576
- He(g) && (Mt(g), wt(g));
1576
+ He(g) && (qt(g), kt(g));
1577
1577
  }
1578
1578
  le(I.afterSanitizeShadowDOM, a, null);
1579
- }, Mt = function(a) {
1579
+ }, qt = function(a) {
1580
1580
  const d = [{
1581
1581
  node: a,
1582
1582
  shadow: null
@@ -1584,19 +1584,19 @@ function yo() {
1584
1584
  for (; d.length > 0; ) {
1585
1585
  const h = d.pop();
1586
1586
  if (h.shadow) {
1587
- wt(h.shadow);
1587
+ kt(h.shadow);
1588
1588
  continue;
1589
1589
  }
1590
- const g = h.node, y = (E ? E(g) : g.nodeType) === ee.element, L = _(g);
1590
+ const g = h.node, S = (E ? E(g) : g.nodeType) === ee.element, L = j(g);
1591
1591
  if (L)
1592
1592
  for (let R = L.length - 1; R >= 0; --R)
1593
1593
  d.push({
1594
1594
  node: L[R],
1595
1595
  shadow: null
1596
1596
  });
1597
- if (y) {
1597
+ if (S) {
1598
1598
  const R = k ? k(g) : null;
1599
- if (typeof R == "string" && $(R) === "template") {
1599
+ if (typeof R == "string" && P(R) === "template") {
1600
1600
  const se = g.content;
1601
1601
  He(se) && d.push({
1602
1602
  node: se,
@@ -1604,7 +1604,7 @@ function yo() {
1604
1604
  });
1605
1605
  }
1606
1606
  }
1607
- if (y) {
1607
+ if (S) {
1608
1608
  const R = X(g);
1609
1609
  He(R) && d.push({
1610
1610
  node: null,
@@ -1617,43 +1617,43 @@ function yo() {
1617
1617
  }
1618
1618
  };
1619
1619
  return e.sanitize = function(a) {
1620
- let d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = null, g = null, y = null, L = null;
1621
- if (Pt = !a, Pt && (a = "<!-->"), typeof a != "string" && !Xe(a) && (a = gi(a), typeof a != "string"))
1620
+ let d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = null, g = null, S = null, L = null;
1621
+ if (Pt = !a, Pt && (a = "<!-->"), typeof a != "string" && !Xe(a) && (a = Tn(a), typeof a != "string"))
1622
1622
  throw Ce("dirty is not a string, aborting");
1623
1623
  if (!e.isSupported)
1624
1624
  return a;
1625
- Ct ? (D = st, P = ct) : Ft(d), (I.uponSanitizeElement.length > 0 || I.uponSanitizeAttribute.length > 0) && (D = Q(D)), I.uponSanitizeAttribute.length > 0 && (P = Q(P)), e.removed = [];
1626
- const R = pt && typeof a != "string" && Xe(a);
1625
+ jt ? ($ = ct, D = ut) : Bt(d), (I.uponSanitizeElement.length > 0 || I.uponSanitizeAttribute.length > 0) && ($ = Q($)), I.uponSanitizeAttribute.length > 0 && (D = Q(D)), e.removed = [];
1626
+ const R = ft && typeof a != "string" && Xe(a);
1627
1627
  if (R) {
1628
- en(a);
1628
+ ci(a);
1629
1629
  const V = k ? k(a) : a.nodeName;
1630
1630
  if (typeof V == "string") {
1631
- const te = $(V);
1632
- if (!D[te] || Ve[te])
1631
+ const te = P(V);
1632
+ if (!$[te] || Ve[te])
1633
1633
  throw mt(a), Ce("root node is forbidden and cannot be sanitized in-place");
1634
1634
  }
1635
- if (gt(a))
1635
+ if (wt(a))
1636
1636
  throw mt(a), Ce("root node is clobbered and cannot be sanitized in-place");
1637
1637
  try {
1638
- Mt(a);
1638
+ qt(a);
1639
1639
  } catch (te) {
1640
1640
  throw mt(a), te;
1641
1641
  }
1642
1642
  } else if (Xe(a))
1643
- h = Cr("<!---->"), g = h.ownerDocument.importNode(a, !0), g.nodeType === ee.element && g.nodeName === "BODY" || g.nodeName === "HTML" ? h = g : h.appendChild(g), Mt(g);
1643
+ h = _r("<!---->"), g = h.ownerDocument.importNode(a, !0), g.nodeType === ee.element && g.nodeName === "BODY" || g.nodeName === "HTML" ? h = g : h.appendChild(g), qt(g);
1644
1644
  else {
1645
- if (!De && !we && !Le && // eslint-disable-next-line unicorn/prefer-includes
1645
+ if (!$e && !we && !Le && // eslint-disable-next-line unicorn/prefer-includes
1646
1646
  a.indexOf("<") === -1)
1647
- return A && dt ? fe(a) : a;
1648
- if (h = Cr(a), !h)
1649
- return De ? null : dt ? z : "";
1647
+ return A && pt ? fe(a) : a;
1648
+ if (h = _r(a), !h)
1649
+ return $e ? null : pt ? z : "";
1650
1650
  }
1651
- h && jt && Re(h.firstChild);
1651
+ h && _t && Re(h.firstChild);
1652
1652
  const se = R ? a : h;
1653
1653
  try {
1654
- const V = jr(se);
1655
- for (; y = V.nextNode(); )
1656
- Ir(y, se), $r(y), He(y.content) && wt(y.content);
1654
+ const V = Ir(se);
1655
+ for (; S = V.nextNode(); )
1656
+ Dr(S, se), Hr(S), He(S.content) && kt(S.content);
1657
1657
  } catch (V) {
1658
1658
  throw R && (mt(a), Fe(e.removed, (te) => {
1659
1659
  te.element && Ze(te.element);
@@ -1662,81 +1662,81 @@ function yo() {
1662
1662
  if (R)
1663
1663
  return Fe(e.removed, (V) => {
1664
1664
  V.element && Ze(V.element);
1665
- }), we && Bt(a), a;
1666
- if (De) {
1667
- if (we && Bt(h), ut)
1668
- for (L = Io.call(h.ownerDocument); h.firstChild; )
1665
+ }), we && Mt(a), a;
1666
+ if ($e) {
1667
+ if (we && Mt(h), dt)
1668
+ for (L = qo.call(h.ownerDocument); h.firstChild; )
1669
1669
  L.appendChild(h.firstChild);
1670
1670
  else
1671
1671
  L = h;
1672
- return (P.shadowroot || P.shadowrootmode) && (L = Po.call(o, L, !0)), L;
1672
+ return (D.shadowroot || D.shadowrootmode) && (L = Wo.call(o, L, !0)), L;
1673
1673
  }
1674
1674
  let xe = Le ? h.outerHTML : h.innerHTML;
1675
- return Le && D["!doctype"] && h.ownerDocument && h.ownerDocument.doctype && h.ownerDocument.doctype.name && q(Ri, h.ownerDocument.doctype.name) && (xe = "<!DOCTYPE " + h.ownerDocument.doctype.name + `>
1676
- ` + xe), we && (xe = bt(xe)), A && dt ? fe(xe) : xe;
1675
+ return Le && $["!doctype"] && h.ownerDocument && h.ownerDocument.doctype && h.ownerDocument.doctype.name && q(Dn, h.ownerDocument.doctype.name) && (xe = "<!DOCTYPE " + h.ownerDocument.doctype.name + `>
1676
+ ` + xe), we && (xe = gt(xe)), A && pt ? fe(xe) : xe;
1677
1677
  }, e.setConfig = function() {
1678
1678
  let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1679
- Ft(a), Ct = !0, st = D, ct = P;
1679
+ Bt(a), jt = !0, ct = $, ut = D;
1680
1680
  }, e.clearConfig = function() {
1681
- Oe = null, Ct = !1, st = null, ct = null, A = J, z = "";
1681
+ Oe = null, jt = !1, ct = null, ut = null, A = J, z = "";
1682
1682
  }, e.isValidAttribute = function(a, d, h) {
1683
- Oe || Ft({});
1684
- const g = $(a), y = $(d);
1685
- return Dr(g, y, h);
1683
+ Oe || Bt({});
1684
+ const g = P(a), S = P(d);
1685
+ return Pr(g, S, h);
1686
1686
  }, e.addHook = function(a, d) {
1687
1687
  typeof d == "function" && U(I, a) && Be(I[a], d);
1688
1688
  }, e.removeHook = function(a, d) {
1689
1689
  if (U(I, a)) {
1690
1690
  if (d !== void 0) {
1691
- const h = ui(I[a], d);
1692
- return h === -1 ? void 0 : di(I[a], h, 1)[0];
1691
+ const h = wn(I[a], d);
1692
+ return h === -1 ? void 0 : kn(I[a], h, 1)[0];
1693
1693
  }
1694
- return Wr(I[a]);
1694
+ return Yr(I[a]);
1695
1695
  }
1696
1696
  }, e.removeHooks = function(a) {
1697
1697
  U(I, a) && (I[a] = []);
1698
1698
  }, e.removeAllHooks = function() {
1699
- I = oo();
1699
+ I = no();
1700
1700
  }, e;
1701
1701
  }
1702
- var Ii = yo();
1703
- function ir() {
1702
+ var Mn = Lo();
1703
+ function lr() {
1704
1704
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
1705
1705
  }
1706
- var Ie = ir();
1707
- function So(t) {
1706
+ var Ie = lr();
1707
+ function Ro(t) {
1708
1708
  Ie = t;
1709
1709
  }
1710
1710
  var je = { exec: () => null };
1711
1711
  function Me(t) {
1712
1712
  let e = [];
1713
1713
  return (r) => {
1714
- let o = Math.max(0, Math.min(3, r - 1)), n = e[o];
1715
- return n || (n = t(o), e[o] = n), n;
1714
+ let o = Math.max(0, Math.min(3, r - 1)), i = e[o];
1715
+ return i || (i = t(o), e[o] = i), i;
1716
1716
  };
1717
1717
  }
1718
1718
  function T(t, e = "") {
1719
- let r = typeof t == "string" ? t : t.source, o = { replace: (n, i) => {
1720
- let l = typeof i == "string" ? i : i.source;
1721
- return l = l.replace(Z.caret, "$1"), r = r.replace(n, l), o;
1719
+ let r = typeof t == "string" ? t : t.source, o = { replace: (i, n) => {
1720
+ let l = typeof n == "string" ? n : n.source;
1721
+ return l = l.replace(Z.caret, "$1"), r = r.replace(i, l), o;
1722
1722
  }, getRegex: () => new RegExp(r, e) };
1723
1723
  return o;
1724
1724
  }
1725
- var Di = ((t = "") => {
1725
+ var qn = ((t = "") => {
1726
1726
  try {
1727
1727
  return !!new RegExp("(?<=1)(?<!1)" + t);
1728
1728
  } catch {
1729
1729
  return !1;
1730
1730
  }
1731
- })(), Z = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: Me((t) => new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: Me((t) => new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: Me((t) => new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)), headingBeginRegex: Me((t) => new RegExp(`^ {0,${t}}#`)), htmlBeginRegex: Me((t) => new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: Me((t) => new RegExp(`^ {0,${t}}>`)) }, Pi = /^(?:[ \t]*(?:\n|$))+/, $i = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Oi = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, it = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Hi = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ar = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Ao = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, To = T(Ao).replace(/bull/g, ar).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Fi = T(Ao).replace(/bull/g, ar).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), lr = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Bi = /^[^\n]+/, sr = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Mi = T(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", sr).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), qi = T(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, ar).getRegex(), Lt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", cr = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ui = T("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", cr).replace("tag", Lt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), No = (t) => T(lr).replace("hr", it).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", t).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Lt).getRegex(), Wi = No(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Gi = No(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Yi = T(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Gi).getRegex(), ur = { blockquote: Yi, code: $i, def: Mi, fences: Oi, heading: Hi, hr: it, html: Ui, lheading: To, list: qi, newline: Pi, paragraph: Wi, table: je, text: Bi }, no = T("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", it).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Lt).getRegex(), Vi = { ...ur, lheading: Fi, table: no, paragraph: T(lr).replace("hr", it).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", no).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Lt).getRegex() }, Qi = { ...ur, html: T(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", cr).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: je, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: T(lr).replace("hr", it).replace("heading", ` *#{1,6} *[^
1732
- ]`).replace("lheading", To).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Zi = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Xi = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Lo = /^( {2,}|\\)\n(?!\s*$)/, Ki = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, he = /[\p{P}\p{S}]/u, Ye = /[\s\p{P}\p{S}]/u, at = /[^\s\p{P}\p{S}]/u, Ji = T(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Ye).getRegex(), ea = /[\p{Pi}\p{Ps}"']/u, Ro = /(?!~)[\p{P}\p{S}]/u, ta = /(?!~)[\s\p{P}\p{S}]/u, ra = /(?:[^\s\p{P}\p{S}]|~)/u, oa = T(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Di ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Eo = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, na = T(Eo, "u").replace(/punct/g, he).getRegex(), ia = T(Eo, "u").replace(/punct/g, Ro).getRegex(), aa = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, la = T(aa, "u").replace(/openQuote/g, ea).replace(/punct/g, he).getRegex(), zo = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", sa = T(zo, "gu").replace(/notPunctSpace/g, at).replace(/punctSpace/g, Ye).replace(/punct/g, he).getRegex(), ca = T(zo, "gu").replace(/notPunctSpace/g, ra).replace(/punctSpace/g, ta).replace(/punct/g, Ro).getRegex(), ua = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", da = T(ua, "gu").replace(/notPunctSpace/g, at).replace(/punctSpace/g, Ye).replace(/punct/g, he).getRegex(), pa = T("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, at).replace(/punctSpace/g, Ye).replace(/punct/g, he).getRegex(), fa = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", ha = T(fa, "gu").replace(/notPunctSpace/g, at).replace(/punctSpace/g, Ye).replace(/punct/g, he).getRegex(), ma = T(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, he).getRegex(), ba = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", ga = T(ba, "gu").replace(/notPunctSpace/g, at).replace(/punctSpace/g, Ye).replace(/punct/g, he).getRegex(), wa = T(/\\(punct)/, "gu").replace(/punct/g, he).getRegex(), ka = T(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), xa = T(cr).replace("(?:-->|$)", "-->").getRegex(), va = T("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", xa).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), St = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, ya = T(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", St).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Co = T(/^!?\[(label)\]\[(ref)\]/).replace("label", St).replace("ref", sr).getRegex(), jo = T(/^!?\[(ref)\](?:\[\])?/).replace("ref", sr).getRegex(), Sa = T("reflink|nolink(?!\\()", "g").replace("reflink", Co).replace("nolink", jo).getRegex(), io = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, dr = { _backpedal: je, anyPunctuation: wa, autolink: ka, blockSkip: oa, br: Lo, code: Xi, del: je, delLDelim: je, delRDelim: je, emStrongLDelim: na, emStrongRDelimAst: sa, emStrongRDelimUnd: pa, escape: Zi, link: ya, nolink: jo, punctuation: Ji, reflink: Co, reflinkSearch: Sa, tag: va, text: Ki, url: je }, Aa = { ...dr, emStrongLDelim: la, emStrongRDelimAst: da, emStrongRDelimUnd: ha, link: T(/^!?\[(label)\]\((.*?)\)/).replace("label", St).getRegex(), reflink: T(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", St).getRegex() }, tr = { ...dr, emStrongRDelimAst: ca, emStrongLDelim: ia, delLDelim: ma, delRDelim: ga, url: T(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", io).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: T(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", io).getRegex() }, Ta = { ...tr, br: T(Lo).replace("{2,}", "*").getRegex(), text: T(tr.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, yt = { normal: ur, gfm: Vi, pedantic: Qi }, et = { normal: dr, gfm: tr, breaks: Ta, pedantic: Aa }, Na = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ao = (t) => Na[t];
1731
+ })(), Z = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: Me((t) => new RegExp(`^ {0,${t}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: Me((t) => new RegExp(`^ {0,${t}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: Me((t) => new RegExp(`^ {0,${t}}(?:\`\`\`|~~~)`)), headingBeginRegex: Me((t) => new RegExp(`^ {0,${t}}#`)), htmlBeginRegex: Me((t) => new RegExp(`^ {0,${t}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: Me((t) => new RegExp(`^ {0,${t}}>`)) }, Un = /^(?:[ \t]*(?:\n|$))+/, Wn = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Gn = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, at = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Yn = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, sr = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Eo = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, zo = T(Eo).replace(/bull/g, sr).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Vn = T(Eo).replace(/bull/g, sr).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), cr = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Qn = /^[^\n]+/, ur = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Zn = T(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ur).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Xn = T(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, sr).getRegex(), Rt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", dr = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Kn = T("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", dr).replace("tag", Rt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Co = (t) => T(cr).replace("hr", at).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", t).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Rt).getRegex(), Jn = Co(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), ea = Co(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), ta = T(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ea).getRegex(), pr = { blockquote: ta, code: Wn, def: Zn, fences: Gn, heading: Yn, hr: at, html: Kn, lheading: zo, list: Xn, newline: Un, paragraph: Jn, table: je, text: Qn }, ao = T("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", at).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Rt).getRegex(), ra = { ...pr, lheading: Vn, table: ao, paragraph: T(cr).replace("hr", at).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ao).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Rt).getRegex() }, oa = { ...pr, html: T(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", dr).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: je, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: T(cr).replace("hr", at).replace("heading", ` *#{1,6} *[^
1732
+ ]`).replace("lheading", zo).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, ia = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, na = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, jo = /^( {2,}|\\)\n(?!\s*$)/, aa = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, he = /[\p{P}\p{S}]/u, Ye = /[\s\p{P}\p{S}]/u, lt = /[^\s\p{P}\p{S}]/u, la = T(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Ye).getRegex(), sa = /[\p{Pi}\p{Ps}"']/u, _o = /(?!~)[\p{P}\p{S}]/u, ca = /(?!~)[\s\p{P}\p{S}]/u, ua = /(?:[^\s\p{P}\p{S}]|~)/u, da = T(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", qn ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Io = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, pa = T(Io, "u").replace(/punct/g, he).getRegex(), fa = T(Io, "u").replace(/punct/g, _o).getRegex(), ha = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, ba = T(ha, "u").replace(/openQuote/g, sa).replace(/punct/g, he).getRegex(), $o = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", ma = T($o, "gu").replace(/notPunctSpace/g, lt).replace(/punctSpace/g, Ye).replace(/punct/g, he).getRegex(), ga = T($o, "gu").replace(/notPunctSpace/g, ua).replace(/punctSpace/g, ca).replace(/punct/g, _o).getRegex(), wa = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", ka = T(wa, "gu").replace(/notPunctSpace/g, lt).replace(/punctSpace/g, Ye).replace(/punct/g, he).getRegex(), xa = T("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, lt).replace(/punctSpace/g, Ye).replace(/punct/g, he).getRegex(), va = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", ya = T(va, "gu").replace(/notPunctSpace/g, lt).replace(/punctSpace/g, Ye).replace(/punct/g, he).getRegex(), Sa = T(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, he).getRegex(), Aa = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Ta = T(Aa, "gu").replace(/notPunctSpace/g, lt).replace(/punctSpace/g, Ye).replace(/punct/g, he).getRegex(), Na = T(/\\(punct)/, "gu").replace(/punct/g, he).getRegex(), La = T(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Ra = T(dr).replace("(?:-->|$)", "-->").getRegex(), Ea = T("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ra).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), At = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, za = T(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", At).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Do = T(/^!?\[(label)\]\[(ref)\]/).replace("label", At).replace("ref", ur).getRegex(), Po = T(/^!?\[(ref)\](?:\[\])?/).replace("ref", ur).getRegex(), Ca = T("reflink|nolink(?!\\()", "g").replace("reflink", Do).replace("nolink", Po).getRegex(), lo = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, fr = { _backpedal: je, anyPunctuation: Na, autolink: La, blockSkip: da, br: jo, code: na, del: je, delLDelim: je, delRDelim: je, emStrongLDelim: pa, emStrongRDelimAst: ma, emStrongRDelimUnd: xa, escape: ia, link: za, nolink: Po, punctuation: la, reflink: Do, reflinkSearch: Ca, tag: Ea, text: aa, url: je }, ja = { ...fr, emStrongLDelim: ba, emStrongRDelimAst: ka, emStrongRDelimUnd: ya, link: T(/^!?\[(label)\]\((.*?)\)/).replace("label", At).getRegex(), reflink: T(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", At).getRegex() }, rr = { ...fr, emStrongRDelimAst: ga, emStrongLDelim: fa, delLDelim: Sa, delRDelim: Ta, url: T(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", lo).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: T(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", lo).getRegex() }, _a = { ...rr, br: T(jo).replace("{2,}", "*").getRegex(), text: T(rr.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, St = { normal: pr, gfm: ra, pedantic: oa }, et = { normal: fr, gfm: rr, breaks: _a, pedantic: ja }, Ia = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, so = (t) => Ia[t];
1733
1733
  function ue(t, e) {
1734
1734
  if (e) {
1735
- if (Z.escapeTest.test(t)) return t.replace(Z.escapeReplace, ao);
1736
- } else if (Z.escapeTestNoEncode.test(t)) return t.replace(Z.escapeReplaceNoEncode, ao);
1735
+ if (Z.escapeTest.test(t)) return t.replace(Z.escapeReplace, so);
1736
+ } else if (Z.escapeTestNoEncode.test(t)) return t.replace(Z.escapeReplaceNoEncode, so);
1737
1737
  return t;
1738
1738
  }
1739
- function lo(t) {
1739
+ function co(t) {
1740
1740
  try {
1741
1741
  t = encodeURI(t).replace(Z.percentDecode, "%");
1742
1742
  } catch {
@@ -1744,33 +1744,33 @@ function lo(t) {
1744
1744
  }
1745
1745
  return t;
1746
1746
  }
1747
- function so(t, e) {
1748
- let r = t.replace(Z.findPipe, (i, l, s) => {
1747
+ function uo(t, e) {
1748
+ let r = t.replace(Z.findPipe, (n, l, s) => {
1749
1749
  let u = !1, p = l;
1750
1750
  for (; --p >= 0 && s[p] === "\\"; ) u = !u;
1751
1751
  return u ? "|" : " |";
1752
- }), o = r.split(Z.splitPipe), n = 0;
1752
+ }), o = r.split(Z.splitPipe), i = 0;
1753
1753
  if (o[0].trim() || o.shift(), o.length > 0 && !o.at(-1)?.trim() && o.pop(), e) if (o.length > e) o.splice(e);
1754
1754
  else for (; o.length < e; ) o.push("");
1755
- for (; n < o.length; n++) o[n] = o[n].trim().replace(Z.slashPipe, "|");
1755
+ for (; i < o.length; i++) o[i] = o[i].trim().replace(Z.slashPipe, "|");
1756
1756
  return o;
1757
1757
  }
1758
1758
  function ye(t, e, r) {
1759
1759
  let o = t.length;
1760
1760
  if (o === 0) return "";
1761
- let n = 0;
1762
- for (; n < o && t.charAt(o - n - 1) === e; )
1763
- n++;
1764
- return t.slice(0, o - n);
1761
+ let i = 0;
1762
+ for (; i < o && t.charAt(o - i - 1) === e; )
1763
+ i++;
1764
+ return t.slice(0, o - i);
1765
1765
  }
1766
- function co(t) {
1766
+ function po(t) {
1767
1767
  let e = t.split(`
1768
1768
  `), r = e.length - 1;
1769
1769
  for (; r >= 0 && Z.blankLine.test(e[r]); ) r--;
1770
1770
  return e.length - r <= 2 ? t : e.slice(0, r + 1).join(`
1771
1771
  `);
1772
1772
  }
1773
- function La(t, e) {
1773
+ function $a(t, e) {
1774
1774
  if (t.indexOf(e[1]) === -1) return -1;
1775
1775
  let r = 0;
1776
1776
  for (let o = 0; o < t.length; o++) if (t[o] === "\\") o++;
@@ -1778,34 +1778,34 @@ function La(t, e) {
1778
1778
  else if (t[o] === e[1] && (r--, r < 0)) return o;
1779
1779
  return r > 0 ? -2 : -1;
1780
1780
  }
1781
- function Ra(t, e = 0) {
1781
+ function Da(t, e = 0) {
1782
1782
  let r = e, o = "";
1783
- for (let n of t) if (n === " ") {
1784
- let i = 4 - r % 4;
1785
- o += " ".repeat(i), r += i;
1786
- } else o += n, r++;
1783
+ for (let i of t) if (i === " ") {
1784
+ let n = 4 - r % 4;
1785
+ o += " ".repeat(n), r += n;
1786
+ } else o += i, r++;
1787
1787
  return o;
1788
1788
  }
1789
- function uo(t, e, r, o, n) {
1790
- let i = e.href, l = e.title || null, s = t[1].replace(n.other.outputLinkReplace, "$1");
1789
+ function fo(t, e, r, o, i) {
1790
+ let n = e.href, l = e.title || null, s = t[1].replace(i.other.outputLinkReplace, "$1");
1791
1791
  o.state.inLink = !0;
1792
- let u = { type: t[0].charAt(0) === "!" ? "image" : "link", raw: r, href: i, title: l, text: s, tokens: o.inlineTokens(s) };
1792
+ let u = { type: t[0].charAt(0) === "!" ? "image" : "link", raw: r, href: n, title: l, text: s, tokens: o.inlineTokens(s) };
1793
1793
  return o.state.inLink = !1, u;
1794
1794
  }
1795
- function Ea(t, e, r) {
1795
+ function Pa(t, e, r) {
1796
1796
  let o = t.match(r.other.indentCodeCompensation);
1797
1797
  if (o === null) return e;
1798
- let n = o[1];
1798
+ let i = o[1];
1799
1799
  return e.split(`
1800
- `).map((i) => {
1801
- let l = i.match(r.other.beginningSpace);
1802
- if (l === null) return i;
1800
+ `).map((n) => {
1801
+ let l = n.match(r.other.beginningSpace);
1802
+ if (l === null) return n;
1803
1803
  let [s] = l;
1804
- return s.length >= n.length ? i.slice(n.length) : i;
1804
+ return s.length >= i.length ? n.slice(i.length) : n;
1805
1805
  }).join(`
1806
1806
  `);
1807
1807
  }
1808
- var At = class {
1808
+ var Tt = class {
1809
1809
  options;
1810
1810
  rules;
1811
1811
  lexer;
@@ -1819,14 +1819,14 @@ var At = class {
1819
1819
  code(t) {
1820
1820
  let e = this.rules.block.code.exec(t);
1821
1821
  if (e) {
1822
- let r = this.options.pedantic ? e[0] : co(e[0]), o = r.replace(this.rules.other.codeRemoveIndent, "");
1822
+ let r = this.options.pedantic ? e[0] : po(e[0]), o = r.replace(this.rules.other.codeRemoveIndent, "");
1823
1823
  return { type: "code", raw: r, codeBlockStyle: "indented", text: o };
1824
1824
  }
1825
1825
  }
1826
1826
  fences(t) {
1827
1827
  let e = this.rules.block.fences.exec(t);
1828
1828
  if (e) {
1829
- let r = e[0], o = Ea(r, e[3] || "", this.rules);
1829
+ let r = e[0], o = Pa(r, e[3] || "", this.rules);
1830
1830
  return { type: "code", raw: r, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: o };
1831
1831
  }
1832
1832
  }
@@ -1852,7 +1852,7 @@ var At = class {
1852
1852
  if (e) {
1853
1853
  let r = ye(e[0], `
1854
1854
  `).split(`
1855
- `), o = "", n = "", i = [];
1855
+ `), o = "", i = "", n = [];
1856
1856
  for (; r.length > 0; ) {
1857
1857
  let l = !1, s = [], u;
1858
1858
  for (u = 0; u < r.length; u++) if (this.rules.other.blockquoteStart.test(r[u])) s.push(r[u]), l = !0;
@@ -1860,72 +1860,72 @@ var At = class {
1860
1860
  else break;
1861
1861
  r = r.slice(u);
1862
1862
  let p = s.join(`
1863
- `), m = p.replace(this.rules.other.blockquoteSetextReplace, `
1863
+ `), b = p.replace(this.rules.other.blockquoteSetextReplace, `
1864
1864
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
1865
1865
  o = o ? `${o}
1866
- ${p}` : p, n = n ? `${n}
1867
- ${m}` : m;
1866
+ ${p}` : p, i = i ? `${i}
1867
+ ${b}` : b;
1868
1868
  let f = this.lexer.state.top;
1869
- if (this.lexer.state.top = !0, this.lexer.blockTokens(m, i, !0), this.lexer.state.top = f, r.length === 0) break;
1870
- let b = i.at(-1);
1871
- if (b?.type === "code") break;
1872
- if (b?.type === "blockquote") {
1873
- let x = b, w = r.join(`
1869
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(b, n, !0), this.lexer.state.top = f, r.length === 0) break;
1870
+ let m = n.at(-1);
1871
+ if (m?.type === "code") break;
1872
+ if (m?.type === "blockquote") {
1873
+ let x = m, w = r.join(`
1874
1874
  `), N = x.raw + `
1875
- ` + w.replace(this.rules.other.blockquoteSetextReplace2, ""), _ = this.blockquote(N);
1876
- i[i.length - 1] = _, o = `${o}
1877
- ${w}`, n = n.substring(0, n.length - x.text.length) + _.text;
1875
+ ` + w.replace(this.rules.other.blockquoteSetextReplace2, ""), j = this.blockquote(N);
1876
+ n[n.length - 1] = j, o = `${o}
1877
+ ${w}`, i = i.substring(0, i.length - x.text.length) + j.text;
1878
1878
  break;
1879
- } else if (b?.type === "list") {
1880
- let x = b, w = x.raw + `
1879
+ } else if (m?.type === "list") {
1880
+ let x = m, w = x.raw + `
1881
1881
  ` + r.join(`
1882
1882
  `), N = this.list(w);
1883
- i[i.length - 1] = N, o = o.substring(0, o.length - b.raw.length) + N.raw, n = n.substring(0, n.length - x.raw.length) + N.raw, r = w.substring(i.at(-1).raw.length).split(`
1883
+ n[n.length - 1] = N, o = o.substring(0, o.length - m.raw.length) + N.raw, i = i.substring(0, i.length - x.raw.length) + N.raw, r = w.substring(n.at(-1).raw.length).split(`
1884
1884
  `);
1885
1885
  continue;
1886
1886
  }
1887
1887
  }
1888
- return { type: "blockquote", raw: o, tokens: i, text: n };
1888
+ return { type: "blockquote", raw: o, tokens: n, text: i };
1889
1889
  }
1890
1890
  }
1891
1891
  list(t) {
1892
1892
  let e = this.rules.block.list.exec(t);
1893
1893
  if (e) {
1894
- let r = e[1].trim(), o = r.length > 1, n = { type: "list", raw: "", ordered: o, start: o ? +r.slice(0, -1) : "", loose: !1, items: [] };
1894
+ let r = e[1].trim(), o = r.length > 1, i = { type: "list", raw: "", ordered: o, start: o ? +r.slice(0, -1) : "", loose: !1, items: [] };
1895
1895
  r = o ? `\\d{1,9}\\${r.slice(-1)}` : `\\${r}`, this.options.pedantic && (r = o ? r : "[*+-]");
1896
- let i = this.rules.other.listItemRegex(r), l = !1;
1896
+ let n = this.rules.other.listItemRegex(r), l = !1;
1897
1897
  for (; t; ) {
1898
- let u = !1, p = "", m = "";
1899
- if (!(e = i.exec(t)) || this.rules.block.hr.test(t)) break;
1898
+ let u = !1, p = "", b = "";
1899
+ if (!(e = n.exec(t)) || this.rules.block.hr.test(t)) break;
1900
1900
  p = e[0], t = t.substring(p.length);
1901
- let f = Ra(e[2].split(`
1902
- `, 1)[0], e[1].length), b = t.split(`
1901
+ let f = Da(e[2].split(`
1902
+ `, 1)[0], e[1].length), m = t.split(`
1903
1903
  `, 1)[0], x = !f.trim(), w = 0;
1904
- if (this.options.pedantic ? (w = 2, m = f.trimStart()) : x ? w = e[1].length + 1 : (w = f.search(this.rules.other.nonSpaceChar), w = w > 4 ? 1 : w, m = f.slice(w), w += e[1].length), x && this.rules.other.blankLine.test(b) && (p += b + `
1905
- `, t = t.substring(b.length + 1), u = !0), !u) {
1906
- let N = this.rules.other.nextBulletRegex(w), _ = this.rules.other.hrRegex(w), H = this.rules.other.fencesBeginRegex(w), X = this.rules.other.headingBeginRegex(w), W = this.rules.other.htmlBeginRegex(w), E = this.rules.other.blockquoteBeginRegex(w);
1904
+ if (this.options.pedantic ? (w = 2, b = f.trimStart()) : x ? w = e[1].length + 1 : (w = f.search(this.rules.other.nonSpaceChar), w = w > 4 ? 1 : w, b = f.slice(w), w += e[1].length), x && this.rules.other.blankLine.test(m) && (p += m + `
1905
+ `, t = t.substring(m.length + 1), u = !0), !u) {
1906
+ let N = this.rules.other.nextBulletRegex(w), j = this.rules.other.hrRegex(w), H = this.rules.other.fencesBeginRegex(w), X = this.rules.other.headingBeginRegex(w), W = this.rules.other.htmlBeginRegex(w), E = this.rules.other.blockquoteBeginRegex(w);
1907
1907
  for (; t; ) {
1908
1908
  let k = t.split(`
1909
1909
  `, 1)[0], v;
1910
- if (b = k, this.options.pedantic ? (b = b.replace(this.rules.other.listReplaceNesting, " "), v = b) : v = b.replace(this.rules.other.tabCharGlobal, " "), H.test(b) || X.test(b) || W.test(b) || E.test(b) || N.test(b) || _.test(b)) break;
1911
- if (v.search(this.rules.other.nonSpaceChar) >= w || !b.trim()) m += `
1910
+ if (m = k, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), v = m) : v = m.replace(this.rules.other.tabCharGlobal, " "), H.test(m) || X.test(m) || W.test(m) || E.test(m) || N.test(m) || j.test(m)) break;
1911
+ if (v.search(this.rules.other.nonSpaceChar) >= w || !m.trim()) b += `
1912
1912
  ` + v.slice(w);
1913
1913
  else {
1914
- if (x || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || H.test(f) || X.test(f) || _.test(f)) break;
1915
- m += `
1916
- ` + b;
1914
+ if (x || f.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || H.test(f) || X.test(f) || j.test(f)) break;
1915
+ b += `
1916
+ ` + m;
1917
1917
  }
1918
- x = !b.trim(), p += k + `
1918
+ x = !m.trim(), p += k + `
1919
1919
  `, t = t.substring(k.length + 1), f = v.slice(w);
1920
1920
  }
1921
1921
  }
1922
- n.loose || (l ? n.loose = !0 : this.rules.other.doubleBlankLine.test(p) && (l = !0)), n.items.push({ type: "list_item", raw: p, task: !!this.options.gfm && this.rules.other.listIsTask.test(m), loose: !1, text: m, tokens: [] }), n.raw += p;
1922
+ i.loose || (l ? i.loose = !0 : this.rules.other.doubleBlankLine.test(p) && (l = !0)), i.items.push({ type: "list_item", raw: p, task: !!this.options.gfm && this.rules.other.listIsTask.test(b), loose: !1, text: b, tokens: [] }), i.raw += p;
1923
1923
  }
1924
- let s = n.items.at(-1);
1924
+ let s = i.items.at(-1);
1925
1925
  if (s) s.raw = s.raw.trimEnd(), s.text = s.text.trimEnd();
1926
1926
  else return;
1927
- n.raw = n.raw.trimEnd();
1928
- for (let u of n.items) {
1927
+ i.raw = i.raw.trimEnd();
1928
+ for (let u of i.items) {
1929
1929
  this.lexer.state.top = !1, u.tokens = this.lexer.blockTokens(u.text, []);
1930
1930
  let p = u.tokens[0];
1931
1931
  if (u.task && (p?.type === "text" || p?.type === "paragraph")) {
@@ -1934,50 +1934,50 @@ ${w}`, n = n.substring(0, n.length - x.text.length) + _.text;
1934
1934
  this.lexer.inlineQueue[f].src = this.lexer.inlineQueue[f].src.replace(this.rules.other.listReplaceTask, "");
1935
1935
  break;
1936
1936
  }
1937
- let m = this.rules.other.listTaskCheckbox.exec(u.raw);
1938
- if (m) {
1939
- let f = { type: "checkbox", raw: m[0] + " ", checked: m[0] !== "[ ]" };
1940
- u.checked = f.checked, n.loose ? u.tokens[0] && ["paragraph", "text"].includes(u.tokens[0].type) && "tokens" in u.tokens[0] && u.tokens[0].tokens ? (u.tokens[0].raw = f.raw + u.tokens[0].raw, u.tokens[0].text = f.raw + u.tokens[0].text, u.tokens[0].tokens.unshift(f)) : u.tokens.unshift({ type: "paragraph", raw: f.raw, text: f.raw, tokens: [f] }) : u.tokens.unshift(f);
1937
+ let b = this.rules.other.listTaskCheckbox.exec(u.raw);
1938
+ if (b) {
1939
+ let f = { type: "checkbox", raw: b[0] + " ", checked: b[0] !== "[ ]" };
1940
+ u.checked = f.checked, i.loose ? u.tokens[0] && ["paragraph", "text"].includes(u.tokens[0].type) && "tokens" in u.tokens[0] && u.tokens[0].tokens ? (u.tokens[0].raw = f.raw + u.tokens[0].raw, u.tokens[0].text = f.raw + u.tokens[0].text, u.tokens[0].tokens.unshift(f)) : u.tokens.unshift({ type: "paragraph", raw: f.raw, text: f.raw, tokens: [f] }) : u.tokens.unshift(f);
1941
1941
  }
1942
1942
  } else u.task && (u.task = !1);
1943
- if (!n.loose) {
1944
- let m = u.tokens.filter((b) => b.type === "space"), f = m.length > 0 && m.some((b) => this.rules.other.anyLine.test(b.raw));
1945
- n.loose = f;
1943
+ if (!i.loose) {
1944
+ let b = u.tokens.filter((m) => m.type === "space"), f = b.length > 0 && b.some((m) => this.rules.other.anyLine.test(m.raw));
1945
+ i.loose = f;
1946
1946
  }
1947
1947
  }
1948
- if (n.loose) for (let u of n.items) {
1948
+ if (i.loose) for (let u of i.items) {
1949
1949
  u.loose = !0;
1950
1950
  for (let p of u.tokens) p.type === "text" && (p.type = "paragraph");
1951
1951
  }
1952
- return n;
1952
+ return i;
1953
1953
  }
1954
1954
  }
1955
1955
  html(t) {
1956
1956
  let e = this.rules.block.html.exec(t);
1957
1957
  if (e) {
1958
- let r = co(e[0]);
1958
+ let r = po(e[0]);
1959
1959
  return { type: "html", block: !0, raw: r, pre: e[1] === "pre" || e[1] === "script" || e[1] === "style", text: r };
1960
1960
  }
1961
1961
  }
1962
1962
  def(t) {
1963
1963
  let e = this.rules.block.def.exec(t);
1964
1964
  if (e) {
1965
- let r = e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), o = e[2] ? e[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", n = e[3] ? e[3].substring(1, e[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : e[3];
1965
+ let r = e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), o = e[2] ? e[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", i = e[3] ? e[3].substring(1, e[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : e[3];
1966
1966
  return { type: "def", tag: r, raw: ye(e[0], `
1967
- `), href: o, title: n };
1967
+ `), href: o, title: i };
1968
1968
  }
1969
1969
  }
1970
1970
  table(t) {
1971
1971
  let e = this.rules.block.table.exec(t);
1972
1972
  if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
1973
- let r = so(e[1]), o = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), n = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
1974
- `) : [], i = { type: "table", raw: ye(e[0], `
1973
+ let r = uo(e[1]), o = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
1974
+ `) : [], n = { type: "table", raw: ye(e[0], `
1975
1975
  `), header: [], align: [], rows: [] };
1976
1976
  if (r.length === o.length) {
1977
- for (let l of o) this.rules.other.tableAlignRight.test(l) ? i.align.push("right") : this.rules.other.tableAlignCenter.test(l) ? i.align.push("center") : this.rules.other.tableAlignLeft.test(l) ? i.align.push("left") : i.align.push(null);
1978
- for (let l = 0; l < r.length; l++) i.header.push({ text: r[l], tokens: this.lexer.inline(r[l]), header: !0, align: i.align[l] });
1979
- for (let l of n) i.rows.push(so(l, i.header.length).map((s, u) => ({ text: s, tokens: this.lexer.inline(s), header: !1, align: i.align[u] })));
1980
- return i;
1977
+ for (let l of o) this.rules.other.tableAlignRight.test(l) ? n.align.push("right") : this.rules.other.tableAlignCenter.test(l) ? n.align.push("center") : this.rules.other.tableAlignLeft.test(l) ? n.align.push("left") : n.align.push(null);
1978
+ for (let l = 0; l < r.length; l++) n.header.push({ text: r[l], tokens: this.lexer.inline(r[l]), header: !0, align: n.align[l] });
1979
+ for (let l of i) n.rows.push(uo(l, n.header.length).map((s, u) => ({ text: s, tokens: this.lexer.inline(s), header: !1, align: n.align[u] })));
1980
+ return n;
1981
1981
  }
1982
1982
  }
1983
1983
  lheading(t) {
@@ -2014,55 +2014,55 @@ ${w}`, n = n.substring(0, n.length - x.text.length) + _.text;
2014
2014
  let r = e[2].trim();
2015
2015
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(r)) {
2016
2016
  if (!this.rules.other.endAngleBracket.test(r)) return;
2017
- let i = ye(r.slice(0, -1), "\\");
2018
- if ((r.length - i.length) % 2 === 0) return;
2017
+ let n = ye(r.slice(0, -1), "\\");
2018
+ if ((r.length - n.length) % 2 === 0) return;
2019
2019
  } else {
2020
- let i = La(e[2], "()");
2021
- if (i === -2) return;
2022
- if (i > -1) {
2023
- let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + i;
2024
- e[2] = e[2].substring(0, i), e[0] = e[0].substring(0, l).trim(), e[3] = "";
2020
+ let n = $a(e[2], "()");
2021
+ if (n === -2) return;
2022
+ if (n > -1) {
2023
+ let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + n;
2024
+ e[2] = e[2].substring(0, n), e[0] = e[0].substring(0, l).trim(), e[3] = "";
2025
2025
  }
2026
2026
  }
2027
- let o = e[2], n = "";
2027
+ let o = e[2], i = "";
2028
2028
  if (this.options.pedantic) {
2029
- let i = this.rules.other.pedanticHrefTitle.exec(o);
2030
- i && (o = i[1], n = i[3]);
2031
- } else n = e[3] ? e[3].slice(1, -1) : "";
2032
- return o = o.trim(), this.rules.other.startAngleBracket.test(o) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? o = o.slice(1) : o = o.slice(1, -1)), uo(e, { href: o && o.replace(this.rules.inline.anyPunctuation, "$1"), title: n && n.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
2029
+ let n = this.rules.other.pedanticHrefTitle.exec(o);
2030
+ n && (o = n[1], i = n[3]);
2031
+ } else i = e[3] ? e[3].slice(1, -1) : "";
2032
+ return o = o.trim(), this.rules.other.startAngleBracket.test(o) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(r) ? o = o.slice(1) : o = o.slice(1, -1)), fo(e, { href: o && o.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
2033
2033
  }
2034
2034
  }
2035
2035
  reflink(t, e) {
2036
2036
  let r;
2037
2037
  if ((r = this.rules.inline.reflink.exec(t)) || (r = this.rules.inline.nolink.exec(t))) {
2038
- let o = (r[2] || r[1]).replace(this.rules.other.multipleSpaceGlobal, " "), n = e[o.toLowerCase()];
2039
- if (!n) {
2040
- let i = r[0].charAt(0);
2041
- return { type: "text", raw: i, text: i };
2038
+ let o = (r[2] || r[1]).replace(this.rules.other.multipleSpaceGlobal, " "), i = e[o.toLowerCase()];
2039
+ if (!i) {
2040
+ let n = r[0].charAt(0);
2041
+ return { type: "text", raw: n, text: n };
2042
2042
  }
2043
- return uo(r, n, r[0], this.lexer, this.rules);
2043
+ return fo(r, i, r[0], this.lexer, this.rules);
2044
2044
  }
2045
2045
  }
2046
2046
  emStrong(t, e, r = "") {
2047
2047
  let o = this.rules.inline.emStrongLDelim.exec(t);
2048
2048
  if (!(!o || !o[1] && !o[2] && !o[3] && !o[4] || o[4] && r.match(this.rules.other.unicodeAlphaNumeric)) && (!(o[1] || o[3]) || !r || this.rules.inline.punctuation.exec(r))) {
2049
- let n = [...o[0]].length - 1, i, l, s = n, u = 0, p = o[0][0], m = r === p, f = p === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
2050
- for (f.lastIndex = 0, e = e.slice(-1 * t.length + n); (o = f.exec(e)) !== null; ) {
2051
- if (i = o[1] || o[2] || o[3] || o[4] || o[5] || o[6], !i) continue;
2052
- if (l = [...i].length, o[3] || o[4]) {
2049
+ let i = [...o[0]].length - 1, n, l, s = i, u = 0, p = o[0][0], b = r === p, f = p === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
2050
+ for (f.lastIndex = 0, e = e.slice(-1 * t.length + i); (o = f.exec(e)) !== null; ) {
2051
+ if (n = o[1] || o[2] || o[3] || o[4] || o[5] || o[6], !n) continue;
2052
+ if (l = [...n].length, o[3] || o[4]) {
2053
2053
  s += l;
2054
2054
  continue;
2055
2055
  } else if (o[5] || o[6]) {
2056
- if (n % 3 && !((n + l) % 3)) {
2056
+ if (i % 3 && !((i + l) % 3)) {
2057
2057
  u += l;
2058
2058
  continue;
2059
2059
  }
2060
- if (m) break;
2060
+ if (b) break;
2061
2061
  }
2062
2062
  if (s -= l, s > 0) continue;
2063
2063
  l = Math.min(l, l + s + u);
2064
- let b = [...o[0]][0].length, x = t.slice(0, n + o.index + b + l);
2065
- if (Math.min(n, l) % 2) {
2064
+ let m = [...o[0]][0].length, x = t.slice(0, i + o.index + m + l);
2065
+ if (Math.min(i, l) % 2) {
2066
2066
  let N = x.slice(1, -1);
2067
2067
  return { type: "em", raw: x, text: N, tokens: this.lexer.inlineTokens(N) };
2068
2068
  }
@@ -2074,8 +2074,8 @@ ${w}`, n = n.substring(0, n.length - x.text.length) + _.text;
2074
2074
  codespan(t) {
2075
2075
  let e = this.rules.inline.code.exec(t);
2076
2076
  if (e) {
2077
- let r = e[2].replace(this.rules.other.newLineCharGlobal, " "), o = this.rules.other.nonSpaceChar.test(r), n = this.rules.other.startingSpaceChar.test(r) && this.rules.other.endingSpaceChar.test(r);
2078
- return o && n && (r = r.substring(1, r.length - 1)), { type: "codespan", raw: e[0], text: r };
2077
+ let r = e[2].replace(this.rules.other.newLineCharGlobal, " "), o = this.rules.other.nonSpaceChar.test(r), i = this.rules.other.startingSpaceChar.test(r) && this.rules.other.endingSpaceChar.test(r);
2078
+ return o && i && (r = r.substring(1, r.length - 1)), { type: "codespan", raw: e[0], text: r };
2079
2079
  }
2080
2080
  }
2081
2081
  br(t) {
@@ -2085,17 +2085,17 @@ ${w}`, n = n.substring(0, n.length - x.text.length) + _.text;
2085
2085
  del(t, e, r = "") {
2086
2086
  let o = this.rules.inline.delLDelim.exec(t);
2087
2087
  if (o && (!o[1] || !r || this.rules.inline.punctuation.exec(r))) {
2088
- let n = [...o[0]].length - 1, i, l, s = n, u = this.rules.inline.delRDelim;
2089
- for (u.lastIndex = 0, e = e.slice(-1 * t.length + n); (o = u.exec(e)) !== null; ) {
2090
- if (i = o[1] || o[2] || o[3] || o[4] || o[5] || o[6], !i || (l = [...i].length, l !== n)) continue;
2088
+ let i = [...o[0]].length - 1, n, l, s = i, u = this.rules.inline.delRDelim;
2089
+ for (u.lastIndex = 0, e = e.slice(-1 * t.length + i); (o = u.exec(e)) !== null; ) {
2090
+ if (n = o[1] || o[2] || o[3] || o[4] || o[5] || o[6], !n || (l = [...n].length, l !== i)) continue;
2091
2091
  if (o[3] || o[4]) {
2092
2092
  s += l;
2093
2093
  continue;
2094
2094
  }
2095
2095
  if (s -= l, s > 0) continue;
2096
2096
  l = Math.min(l, l + s);
2097
- let p = [...o[0]][0].length, m = t.slice(0, n + o.index + p + l), f = m.slice(n, -n);
2098
- return { type: "del", raw: m, text: f, tokens: this.lexer.inlineTokens(f) };
2097
+ let p = [...o[0]][0].length, b = t.slice(0, i + o.index + p + l), f = b.slice(i, -i);
2098
+ return { type: "del", raw: b, text: f, tokens: this.lexer.inlineTokens(f) };
2099
2099
  }
2100
2100
  }
2101
2101
  }
@@ -2112,10 +2112,10 @@ ${w}`, n = n.substring(0, n.length - x.text.length) + _.text;
2112
2112
  let r, o;
2113
2113
  if (e[2] === "@") r = e[0], o = "mailto:" + r;
2114
2114
  else {
2115
- let n;
2115
+ let i;
2116
2116
  do
2117
- n = e[0], e[0] = this.rules.inline._backpedal.exec(e[0])?.[0] ?? "";
2118
- while (n !== e[0]);
2117
+ i = e[0], e[0] = this.rules.inline._backpedal.exec(e[0])?.[0] ?? "";
2118
+ while (i !== e[0]);
2119
2119
  r = e[0], e[1] === "www." ? o = "http://" + e[0] : o = e[0];
2120
2120
  }
2121
2121
  return { type: "link", raw: e[0], text: r, href: o, tokens: [{ type: "text", raw: r, text: r }] };
@@ -2128,25 +2128,25 @@ ${w}`, n = n.substring(0, n.length - x.text.length) + _.text;
2128
2128
  return { type: "text", raw: e[0], text: e[0], escaped: r };
2129
2129
  }
2130
2130
  }
2131
- }, oe = class rr {
2131
+ }, oe = class or {
2132
2132
  tokens;
2133
2133
  options;
2134
2134
  state;
2135
2135
  inlineQueue;
2136
2136
  tokenizer;
2137
2137
  constructor(e) {
2138
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || Ie, this.options.tokenizer = this.options.tokenizer || new At(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
2139
- let r = { other: Z, block: yt.normal, inline: et.normal };
2140
- this.options.pedantic ? (r.block = yt.pedantic, r.inline = et.pedantic) : this.options.gfm && (r.block = yt.gfm, this.options.breaks ? r.inline = et.breaks : r.inline = et.gfm), this.tokenizer.rules = r;
2138
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || Ie, this.options.tokenizer = this.options.tokenizer || new Tt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
2139
+ let r = { other: Z, block: St.normal, inline: et.normal };
2140
+ this.options.pedantic ? (r.block = St.pedantic, r.inline = et.pedantic) : this.options.gfm && (r.block = St.gfm, this.options.breaks ? r.inline = et.breaks : r.inline = et.gfm), this.tokenizer.rules = r;
2141
2141
  }
2142
2142
  static get rules() {
2143
- return { block: yt, inline: et };
2143
+ return { block: St, inline: et };
2144
2144
  }
2145
2145
  static lex(e, r) {
2146
- return new rr(r).lex(e);
2146
+ return new or(r).lex(e);
2147
2147
  }
2148
2148
  static lexInline(e, r) {
2149
- return new rr(r).inlineTokens(e);
2149
+ return new or(r).inlineTokens(e);
2150
2150
  }
2151
2151
  lex(e) {
2152
2152
  e = e.replace(Z.carriageReturn, `
@@ -2159,94 +2159,94 @@ ${w}`, n = n.substring(0, n.length - x.text.length) + _.text;
2159
2159
  }
2160
2160
  blockTokens(e, r = [], o = !1) {
2161
2161
  this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(Z.tabCharGlobal, " ").replace(Z.spaceLine, ""));
2162
- let n = 1 / 0;
2162
+ let i = 1 / 0;
2163
2163
  for (; e; ) {
2164
- if (e.length < n) n = e.length;
2164
+ if (e.length < i) i = e.length;
2165
2165
  else {
2166
2166
  this.infiniteLoopError(e.charCodeAt(0));
2167
2167
  break;
2168
2168
  }
2169
- let i;
2170
- if (this.options.extensions?.block?.some((s) => (i = s.call({ lexer: this }, e, r)) ? (e = e.substring(i.raw.length), r.push(i), !0) : !1)) continue;
2171
- if (i = this.tokenizer.space(e)) {
2172
- e = e.substring(i.raw.length);
2169
+ let n;
2170
+ if (this.options.extensions?.block?.some((s) => (n = s.call({ lexer: this }, e, r)) ? (e = e.substring(n.raw.length), r.push(n), !0) : !1)) continue;
2171
+ if (n = this.tokenizer.space(e)) {
2172
+ e = e.substring(n.raw.length);
2173
2173
  let s = r.at(-1);
2174
- i.raw.length === 1 && s !== void 0 ? s.raw += `
2175
- ` : r.push(i);
2174
+ n.raw.length === 1 && s !== void 0 ? s.raw += `
2175
+ ` : r.push(n);
2176
2176
  continue;
2177
2177
  }
2178
- if (i = this.tokenizer.code(e)) {
2179
- e = e.substring(i.raw.length);
2178
+ if (n = this.tokenizer.code(e)) {
2179
+ e = e.substring(n.raw.length);
2180
2180
  let s = r.at(-1);
2181
2181
  s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
2182
2182
  `) ? "" : `
2183
- `) + i.raw, s.text += `
2184
- ` + i.text, this.inlineQueue.at(-1).src = s.text) : r.push(i);
2183
+ `) + n.raw, s.text += `
2184
+ ` + n.text, this.inlineQueue.at(-1).src = s.text) : r.push(n);
2185
2185
  continue;
2186
2186
  }
2187
- if (i = this.tokenizer.fences(e)) {
2188
- e = e.substring(i.raw.length), r.push(i);
2187
+ if (n = this.tokenizer.fences(e)) {
2188
+ e = e.substring(n.raw.length), r.push(n);
2189
2189
  continue;
2190
2190
  }
2191
- if (i = this.tokenizer.heading(e)) {
2192
- e = e.substring(i.raw.length), r.push(i);
2191
+ if (n = this.tokenizer.heading(e)) {
2192
+ e = e.substring(n.raw.length), r.push(n);
2193
2193
  continue;
2194
2194
  }
2195
- if (i = this.tokenizer.hr(e)) {
2196
- e = e.substring(i.raw.length), r.push(i);
2195
+ if (n = this.tokenizer.hr(e)) {
2196
+ e = e.substring(n.raw.length), r.push(n);
2197
2197
  continue;
2198
2198
  }
2199
- if (i = this.tokenizer.blockquote(e)) {
2200
- e = e.substring(i.raw.length), r.push(i);
2199
+ if (n = this.tokenizer.blockquote(e)) {
2200
+ e = e.substring(n.raw.length), r.push(n);
2201
2201
  continue;
2202
2202
  }
2203
- if (i = this.tokenizer.list(e)) {
2204
- e = e.substring(i.raw.length), r.push(i);
2203
+ if (n = this.tokenizer.list(e)) {
2204
+ e = e.substring(n.raw.length), r.push(n);
2205
2205
  continue;
2206
2206
  }
2207
- if (i = this.tokenizer.html(e)) {
2208
- e = e.substring(i.raw.length), r.push(i);
2207
+ if (n = this.tokenizer.html(e)) {
2208
+ e = e.substring(n.raw.length), r.push(n);
2209
2209
  continue;
2210
2210
  }
2211
- if (i = this.tokenizer.def(e)) {
2212
- e = e.substring(i.raw.length);
2211
+ if (n = this.tokenizer.def(e)) {
2212
+ e = e.substring(n.raw.length);
2213
2213
  let s = r.at(-1);
2214
2214
  s?.type === "paragraph" || s?.type === "text" ? (s.raw += (s.raw.endsWith(`
2215
2215
  `) ? "" : `
2216
- `) + i.raw, s.text += `
2217
- ` + i.raw, this.inlineQueue.at(-1).src = s.text) : this.tokens.links[i.tag] || (this.tokens.links[i.tag] = { href: i.href, title: i.title }, r.push(i));
2216
+ `) + n.raw, s.text += `
2217
+ ` + n.raw, this.inlineQueue.at(-1).src = s.text) : this.tokens.links[n.tag] || (this.tokens.links[n.tag] = { href: n.href, title: n.title }, r.push(n));
2218
2218
  continue;
2219
2219
  }
2220
- if (i = this.tokenizer.table(e)) {
2221
- e = e.substring(i.raw.length), r.push(i);
2220
+ if (n = this.tokenizer.table(e)) {
2221
+ e = e.substring(n.raw.length), r.push(n);
2222
2222
  continue;
2223
2223
  }
2224
- if (i = this.tokenizer.lheading(e)) {
2225
- e = e.substring(i.raw.length), r.push(i);
2224
+ if (n = this.tokenizer.lheading(e)) {
2225
+ e = e.substring(n.raw.length), r.push(n);
2226
2226
  continue;
2227
2227
  }
2228
2228
  let l = e;
2229
2229
  if (this.options.extensions?.startBlock) {
2230
2230
  let s = 1 / 0, u = e.slice(1), p;
2231
- this.options.extensions.startBlock.forEach((m) => {
2232
- p = m.call({ lexer: this }, u), typeof p == "number" && p >= 0 && (s = Math.min(s, p));
2231
+ this.options.extensions.startBlock.forEach((b) => {
2232
+ p = b.call({ lexer: this }, u), typeof p == "number" && p >= 0 && (s = Math.min(s, p));
2233
2233
  }), s < 1 / 0 && s >= 0 && (l = e.substring(0, s + 1));
2234
2234
  }
2235
- if (this.state.top && (i = this.tokenizer.paragraph(l))) {
2235
+ if (this.state.top && (n = this.tokenizer.paragraph(l))) {
2236
2236
  let s = r.at(-1);
2237
2237
  o && s?.type === "paragraph" ? (s.raw += (s.raw.endsWith(`
2238
2238
  `) ? "" : `
2239
- `) + i.raw, s.text += `
2240
- ` + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : r.push(i), o = l.length !== e.length, e = e.substring(i.raw.length);
2239
+ `) + n.raw, s.text += `
2240
+ ` + n.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : r.push(n), o = l.length !== e.length, e = e.substring(n.raw.length);
2241
2241
  continue;
2242
2242
  }
2243
- if (i = this.tokenizer.text(e)) {
2244
- e = e.substring(i.raw.length);
2243
+ if (n = this.tokenizer.text(e)) {
2244
+ e = e.substring(n.raw.length);
2245
2245
  let s = r.at(-1);
2246
2246
  s?.type === "text" ? (s.raw += (s.raw.endsWith(`
2247
2247
  `) ? "" : `
2248
- `) + i.raw, s.text += `
2249
- ` + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : r.push(i);
2248
+ `) + n.raw, s.text += `
2249
+ ` + n.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s.text) : r.push(n);
2250
2250
  continue;
2251
2251
  }
2252
2252
  if (e) {
@@ -2267,17 +2267,17 @@ ${w}`, n = n.substring(0, n.length - x.text.length) + _.text;
2267
2267
  s.length > 0 && (o = o.replace(this.tokenizer.rules.inline.reflinkSearch, (u) => s.includes(u.slice(u.lastIndexOf("[") + 1, -1)) ? "[" + "a".repeat(u.length - 2) + "]" : u));
2268
2268
  }
2269
2269
  o = o.replace(this.tokenizer.rules.inline.anyPunctuation, "++"), o = o.replace(this.tokenizer.rules.inline.blockSkip, (s, u, p) => {
2270
- let m = p ? p.length : 0;
2271
- return s.slice(0, m) + "[" + "a".repeat(s.length - m - 2) + "]";
2270
+ let b = p ? p.length : 0;
2271
+ return s.slice(0, b) + "[" + "a".repeat(s.length - b - 2) + "]";
2272
2272
  }), o = this.options.hooks?.emStrongMask?.call({ lexer: this }, o) ?? o;
2273
- let n = !1, i = "", l = 1 / 0;
2273
+ let i = !1, n = "", l = 1 / 0;
2274
2274
  for (; e; ) {
2275
2275
  if (e.length < l) l = e.length;
2276
2276
  else {
2277
2277
  this.infiniteLoopError(e.charCodeAt(0));
2278
2278
  break;
2279
2279
  }
2280
- n || (i = ""), n = !1;
2280
+ i || (n = ""), i = !1;
2281
2281
  let s;
2282
2282
  if (this.options.extensions?.inline?.some((p) => (s = p.call({ lexer: this }, e, r)) ? (e = e.substring(s.raw.length), r.push(s), !0) : !1)) continue;
2283
2283
  if (s = this.tokenizer.escape(e)) {
@@ -2298,7 +2298,7 @@ ${w}`, n = n.substring(0, n.length - x.text.length) + _.text;
2298
2298
  s.type === "text" && p?.type === "text" ? (p.raw += s.raw, p.text += s.text) : r.push(s);
2299
2299
  continue;
2300
2300
  }
2301
- if (s = this.tokenizer.emStrong(e, o, i)) {
2301
+ if (s = this.tokenizer.emStrong(e, o, n)) {
2302
2302
  e = e.substring(s.raw.length), r.push(s);
2303
2303
  continue;
2304
2304
  }
@@ -2310,7 +2310,7 @@ ${w}`, n = n.substring(0, n.length - x.text.length) + _.text;
2310
2310
  e = e.substring(s.raw.length), r.push(s);
2311
2311
  continue;
2312
2312
  }
2313
- if (s = this.tokenizer.del(e, o, i)) {
2313
+ if (s = this.tokenizer.del(e, o, n)) {
2314
2314
  e = e.substring(s.raw.length), r.push(s);
2315
2315
  continue;
2316
2316
  }
@@ -2324,13 +2324,13 @@ ${w}`, n = n.substring(0, n.length - x.text.length) + _.text;
2324
2324
  }
2325
2325
  let u = e;
2326
2326
  if (this.options.extensions?.startInline) {
2327
- let p = 1 / 0, m = e.slice(1), f;
2328
- this.options.extensions.startInline.forEach((b) => {
2329
- f = b.call({ lexer: this }, m), typeof f == "number" && f >= 0 && (p = Math.min(p, f));
2327
+ let p = 1 / 0, b = e.slice(1), f;
2328
+ this.options.extensions.startInline.forEach((m) => {
2329
+ f = m.call({ lexer: this }, b), typeof f == "number" && f >= 0 && (p = Math.min(p, f));
2330
2330
  }), p < 1 / 0 && p >= 0 && (u = e.substring(0, p + 1));
2331
2331
  }
2332
2332
  if (s = this.tokenizer.inlineText(u)) {
2333
- e = e.substring(s.raw.length), s.raw.slice(-1) !== "_" && (i = s.raw.slice(-1)), n = !0;
2333
+ e = e.substring(s.raw.length), s.raw.slice(-1) !== "_" && (n = s.raw.slice(-1)), i = !0;
2334
2334
  let p = r.at(-1);
2335
2335
  p?.type === "text" ? (p.raw += s.raw, p.text += s.text) : r.push(s);
2336
2336
  continue;
@@ -2347,7 +2347,7 @@ ${w}`, n = n.substring(0, n.length - x.text.length) + _.text;
2347
2347
  if (this.options.silent) console.error(r);
2348
2348
  else throw new Error(r);
2349
2349
  }
2350
- }, Tt = class {
2350
+ }, Nt = class {
2351
2351
  options;
2352
2352
  parser;
2353
2353
  constructor(t) {
@@ -2357,10 +2357,10 @@ ${w}`, n = n.substring(0, n.length - x.text.length) + _.text;
2357
2357
  return "";
2358
2358
  }
2359
2359
  code({ text: t, lang: e, escaped: r }) {
2360
- let o = (e || "").match(Z.notSpaceStart)?.[0], n = t.replace(Z.endingNewline, "") + `
2360
+ let o = (e || "").match(Z.notSpaceStart)?.[0], i = t.replace(Z.endingNewline, "") + `
2361
2361
  `;
2362
- return o ? '<pre><code class="language-' + ue(o) + '">' + (r ? n : ue(n, !0)) + `</code></pre>
2363
- ` : "<pre><code>" + (r ? n : ue(n, !0)) + `</code></pre>
2362
+ return o ? '<pre><code class="language-' + ue(o) + '">' + (r ? i : ue(i, !0)) + `</code></pre>
2363
+ ` : "<pre><code>" + (r ? i : ue(i, !0)) + `</code></pre>
2364
2364
  `;
2365
2365
  }
2366
2366
  blockquote({ tokens: t }) {
@@ -2388,9 +2388,9 @@ ${this.parser.parse(t)}</blockquote>
2388
2388
  let s = t.items[l];
2389
2389
  o += this.listitem(s);
2390
2390
  }
2391
- let n = e ? "ol" : "ul", i = e && r !== 1 ? ' start="' + r + '"' : "";
2392
- return "<" + n + i + `>
2393
- ` + o + "</" + n + `>
2391
+ let i = e ? "ol" : "ul", n = e && r !== 1 ? ' start="' + r + '"' : "";
2392
+ return "<" + i + n + `>
2393
+ ` + o + "</" + i + `>
2394
2394
  `;
2395
2395
  }
2396
2396
  listitem(t) {
@@ -2406,13 +2406,13 @@ ${this.parser.parse(t)}</blockquote>
2406
2406
  }
2407
2407
  table(t) {
2408
2408
  let e = "", r = "";
2409
- for (let n = 0; n < t.header.length; n++) r += this.tablecell(t.header[n]);
2409
+ for (let i = 0; i < t.header.length; i++) r += this.tablecell(t.header[i]);
2410
2410
  e += this.tablerow({ text: r });
2411
2411
  let o = "";
2412
- for (let n = 0; n < t.rows.length; n++) {
2413
- let i = t.rows[n];
2412
+ for (let i = 0; i < t.rows.length; i++) {
2413
+ let n = t.rows[i];
2414
2414
  r = "";
2415
- for (let l = 0; l < i.length; l++) r += this.tablecell(i[l]);
2415
+ for (let l = 0; l < n.length; l++) r += this.tablecell(n[l]);
2416
2416
  o += this.tablerow({ text: r });
2417
2417
  }
2418
2418
  return o && (o = `<tbody>${o}</tbody>`), `<table>
@@ -2447,24 +2447,24 @@ ${t}</tr>
2447
2447
  return `<del>${this.parser.parseInline(t)}</del>`;
2448
2448
  }
2449
2449
  link({ href: t, title: e, tokens: r }) {
2450
- let o = this.parser.parseInline(r), n = lo(t);
2451
- if (n === null) return o;
2452
- t = n;
2453
- let i = '<a href="' + t + '"';
2454
- return e && (i += ' title="' + ue(e) + '"'), i += ">" + o + "</a>", i;
2450
+ let o = this.parser.parseInline(r), i = co(t);
2451
+ if (i === null) return o;
2452
+ t = i;
2453
+ let n = '<a href="' + t + '"';
2454
+ return e && (n += ' title="' + ue(e) + '"'), n += ">" + o + "</a>", n;
2455
2455
  }
2456
2456
  image({ href: t, title: e, text: r, tokens: o }) {
2457
2457
  o && (r = this.parser.parseInline(o, this.parser.textRenderer));
2458
- let n = lo(t);
2459
- if (n === null) return ue(r);
2460
- t = n;
2461
- let i = `<img src="${t}" alt="${ue(r)}"`;
2462
- return e && (i += ` title="${ue(e)}"`), i += ">", i;
2458
+ let i = co(t);
2459
+ if (i === null) return ue(r);
2460
+ t = i;
2461
+ let n = `<img src="${t}" alt="${ue(r)}"`;
2462
+ return e && (n += ` title="${ue(e)}"`), n += ">", n;
2463
2463
  }
2464
2464
  text(t) {
2465
2465
  return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : ue(t.text);
2466
2466
  }
2467
- }, pr = class {
2467
+ }, hr = class {
2468
2468
  strong({ text: t }) {
2469
2469
  return t;
2470
2470
  }
@@ -2495,83 +2495,83 @@ ${t}</tr>
2495
2495
  checkbox({ raw: t }) {
2496
2496
  return t;
2497
2497
  }
2498
- }, ne = class or {
2498
+ }, ie = class ir {
2499
2499
  options;
2500
2500
  renderer;
2501
2501
  textRenderer;
2502
2502
  constructor(e) {
2503
- this.options = e || Ie, this.options.renderer = this.options.renderer || new Tt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new pr();
2503
+ this.options = e || Ie, this.options.renderer = this.options.renderer || new Nt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new hr();
2504
2504
  }
2505
2505
  static parse(e, r) {
2506
- return new or(r).parse(e);
2506
+ return new ir(r).parse(e);
2507
2507
  }
2508
2508
  static parseInline(e, r) {
2509
- return new or(r).parseInline(e);
2509
+ return new ir(r).parseInline(e);
2510
2510
  }
2511
2511
  parse(e) {
2512
2512
  this.renderer.parser = this;
2513
2513
  let r = "";
2514
2514
  for (let o = 0; o < e.length; o++) {
2515
- let n = e[o];
2516
- if (this.options.extensions?.renderers?.[n.type]) {
2517
- let l = n, s = this.options.extensions.renderers[l.type].call({ parser: this }, l);
2515
+ let i = e[o];
2516
+ if (this.options.extensions?.renderers?.[i.type]) {
2517
+ let l = i, s = this.options.extensions.renderers[l.type].call({ parser: this }, l);
2518
2518
  if (s !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "checkbox", "html", "def", "paragraph", "text"].includes(l.type)) {
2519
2519
  r += s || "";
2520
2520
  continue;
2521
2521
  }
2522
2522
  }
2523
- let i = n;
2524
- switch (i.type) {
2523
+ let n = i;
2524
+ switch (n.type) {
2525
2525
  case "space": {
2526
- r += this.renderer.space(i);
2526
+ r += this.renderer.space(n);
2527
2527
  break;
2528
2528
  }
2529
2529
  case "hr": {
2530
- r += this.renderer.hr(i);
2530
+ r += this.renderer.hr(n);
2531
2531
  break;
2532
2532
  }
2533
2533
  case "heading": {
2534
- r += this.renderer.heading(i);
2534
+ r += this.renderer.heading(n);
2535
2535
  break;
2536
2536
  }
2537
2537
  case "code": {
2538
- r += this.renderer.code(i);
2538
+ r += this.renderer.code(n);
2539
2539
  break;
2540
2540
  }
2541
2541
  case "table": {
2542
- r += this.renderer.table(i);
2542
+ r += this.renderer.table(n);
2543
2543
  break;
2544
2544
  }
2545
2545
  case "blockquote": {
2546
- r += this.renderer.blockquote(i);
2546
+ r += this.renderer.blockquote(n);
2547
2547
  break;
2548
2548
  }
2549
2549
  case "list": {
2550
- r += this.renderer.list(i);
2550
+ r += this.renderer.list(n);
2551
2551
  break;
2552
2552
  }
2553
2553
  case "checkbox": {
2554
- r += this.renderer.checkbox(i);
2554
+ r += this.renderer.checkbox(n);
2555
2555
  break;
2556
2556
  }
2557
2557
  case "html": {
2558
- r += this.renderer.html(i);
2558
+ r += this.renderer.html(n);
2559
2559
  break;
2560
2560
  }
2561
2561
  case "def": {
2562
- r += this.renderer.def(i);
2562
+ r += this.renderer.def(n);
2563
2563
  break;
2564
2564
  }
2565
2565
  case "paragraph": {
2566
- r += this.renderer.paragraph(i);
2566
+ r += this.renderer.paragraph(n);
2567
2567
  break;
2568
2568
  }
2569
2569
  case "text": {
2570
- r += this.renderer.text(i);
2570
+ r += this.renderer.text(n);
2571
2571
  break;
2572
2572
  }
2573
2573
  default: {
2574
- let l = 'Token with "' + i.type + '" type was not found.';
2574
+ let l = 'Token with "' + n.type + '" type was not found.';
2575
2575
  if (this.options.silent) return console.error(l), "";
2576
2576
  throw new Error(l);
2577
2577
  }
@@ -2582,16 +2582,16 @@ ${t}</tr>
2582
2582
  parseInline(e, r = this.renderer) {
2583
2583
  this.renderer.parser = this;
2584
2584
  let o = "";
2585
- for (let n = 0; n < e.length; n++) {
2586
- let i = e[n];
2587
- if (this.options.extensions?.renderers?.[i.type]) {
2588
- let s = this.options.extensions.renderers[i.type].call({ parser: this }, i);
2589
- if (s !== !1 || !["escape", "html", "link", "image", "checkbox", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
2585
+ for (let i = 0; i < e.length; i++) {
2586
+ let n = e[i];
2587
+ if (this.options.extensions?.renderers?.[n.type]) {
2588
+ let s = this.options.extensions.renderers[n.type].call({ parser: this }, n);
2589
+ if (s !== !1 || !["escape", "html", "link", "image", "checkbox", "strong", "em", "codespan", "br", "del", "text"].includes(n.type)) {
2590
2590
  o += s || "";
2591
2591
  continue;
2592
2592
  }
2593
2593
  }
2594
- let l = i;
2594
+ let l = n;
2595
2595
  switch (l.type) {
2596
2596
  case "escape": {
2597
2597
  o += r.text(l);
@@ -2670,18 +2670,18 @@ ${t}</tr>
2670
2670
  return t ? oe.lex : oe.lexInline;
2671
2671
  }
2672
2672
  provideParser(t = this.block) {
2673
- return t ? ne.parse : ne.parseInline;
2673
+ return t ? ie.parse : ie.parseInline;
2674
2674
  }
2675
- }, za = class {
2676
- defaults = ir();
2675
+ }, Oo = class {
2676
+ defaults = lr();
2677
2677
  options = this.setOptions;
2678
2678
  parse = this.parseMarkdown(!0);
2679
2679
  parseInline = this.parseMarkdown(!1);
2680
- Parser = ne;
2681
- Renderer = Tt;
2682
- TextRenderer = pr;
2680
+ Parser = ie;
2681
+ Renderer = Nt;
2682
+ TextRenderer = hr;
2683
2683
  Lexer = oe;
2684
- Tokenizer = At;
2684
+ Tokenizer = Tt;
2685
2685
  Hooks = rt;
2686
2686
  constructor(...t) {
2687
2687
  this.use(...t);
@@ -2690,22 +2690,22 @@ ${t}</tr>
2690
2690
  let r = [];
2691
2691
  for (let o of t) switch (r = r.concat(e.call(this, o)), o.type) {
2692
2692
  case "table": {
2693
- let n = o;
2694
- for (let i of n.header) r = r.concat(this.walkTokens(i.tokens, e));
2695
- for (let i of n.rows) for (let l of i) r = r.concat(this.walkTokens(l.tokens, e));
2693
+ let i = o;
2694
+ for (let n of i.header) r = r.concat(this.walkTokens(n.tokens, e));
2695
+ for (let n of i.rows) for (let l of n) r = r.concat(this.walkTokens(l.tokens, e));
2696
2696
  break;
2697
2697
  }
2698
2698
  case "list": {
2699
- let n = o;
2700
- r = r.concat(this.walkTokens(n.items, e));
2699
+ let i = o;
2700
+ r = r.concat(this.walkTokens(i.items, e));
2701
2701
  break;
2702
2702
  }
2703
2703
  default: {
2704
- let n = o;
2705
- this.defaults.extensions?.childTokens?.[n.type] ? this.defaults.extensions.childTokens[n.type].forEach((i) => {
2706
- let l = n[i].flat(1 / 0);
2704
+ let i = o;
2705
+ this.defaults.extensions?.childTokens?.[i.type] ? this.defaults.extensions.childTokens[i.type].forEach((n) => {
2706
+ let l = i[n].flat(1 / 0);
2707
2707
  r = r.concat(this.walkTokens(l, e));
2708
- }) : n.tokens && (r = r.concat(this.walkTokens(n.tokens, e)));
2708
+ }) : i.tokens && (r = r.concat(this.walkTokens(i.tokens, e)));
2709
2709
  }
2710
2710
  }
2711
2711
  return r;
@@ -2714,76 +2714,76 @@ ${t}</tr>
2714
2714
  let e = this.defaults.extensions || { renderers: {}, childTokens: {} };
2715
2715
  return t.forEach((r) => {
2716
2716
  let o = { ...r };
2717
- if (o.async = this.defaults.async || o.async || !1, r.extensions && (r.extensions.forEach((n) => {
2718
- if (!n.name) throw new Error("extension name required");
2719
- if ("renderer" in n) {
2720
- let i = e.renderers[n.name];
2721
- i ? e.renderers[n.name] = function(...l) {
2722
- let s = n.renderer.apply(this, l);
2723
- return s === !1 && (s = i.apply(this, l)), s;
2724
- } : e.renderers[n.name] = n.renderer;
2717
+ if (o.async = this.defaults.async || o.async || !1, r.extensions && (r.extensions.forEach((i) => {
2718
+ if (!i.name) throw new Error("extension name required");
2719
+ if ("renderer" in i) {
2720
+ let n = e.renderers[i.name];
2721
+ n ? e.renderers[i.name] = function(...l) {
2722
+ let s = i.renderer.apply(this, l);
2723
+ return s === !1 && (s = n.apply(this, l)), s;
2724
+ } : e.renderers[i.name] = i.renderer;
2725
2725
  }
2726
- if ("tokenizer" in n) {
2727
- if (!n.level || n.level !== "block" && n.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
2728
- let i = e[n.level];
2729
- i ? i.unshift(n.tokenizer) : e[n.level] = [n.tokenizer], n.start && (n.level === "block" ? e.startBlock ? e.startBlock.push(n.start) : e.startBlock = [n.start] : n.level === "inline" && (e.startInline ? e.startInline.push(n.start) : e.startInline = [n.start]));
2726
+ if ("tokenizer" in i) {
2727
+ if (!i.level || i.level !== "block" && i.level !== "inline") throw new Error("extension level must be 'block' or 'inline'");
2728
+ let n = e[i.level];
2729
+ n ? n.unshift(i.tokenizer) : e[i.level] = [i.tokenizer], i.start && (i.level === "block" ? e.startBlock ? e.startBlock.push(i.start) : e.startBlock = [i.start] : i.level === "inline" && (e.startInline ? e.startInline.push(i.start) : e.startInline = [i.start]));
2730
2730
  }
2731
- "childTokens" in n && n.childTokens && (e.childTokens[n.name] = n.childTokens);
2731
+ "childTokens" in i && i.childTokens && (e.childTokens[i.name] = i.childTokens);
2732
2732
  }), o.extensions = e), r.renderer) {
2733
- let n = this.defaults.renderer || new Tt(this.defaults);
2734
- for (let i in r.renderer) {
2735
- if (!(i in n)) throw new Error(`renderer '${i}' does not exist`);
2736
- if (["options", "parser"].includes(i)) continue;
2737
- let l = i, s = r.renderer[l], u = n[l];
2738
- n[l] = (...p) => {
2739
- let m = s.apply(n, p);
2740
- return m === !1 && (m = u.apply(n, p)), m || "";
2733
+ let i = this.defaults.renderer || new Nt(this.defaults);
2734
+ for (let n in r.renderer) {
2735
+ if (!(n in i)) throw new Error(`renderer '${n}' does not exist`);
2736
+ if (["options", "parser"].includes(n)) continue;
2737
+ let l = n, s = r.renderer[l], u = i[l];
2738
+ i[l] = (...p) => {
2739
+ let b = s.apply(i, p);
2740
+ return b === !1 && (b = u.apply(i, p)), b || "";
2741
2741
  };
2742
2742
  }
2743
- o.renderer = n;
2743
+ o.renderer = i;
2744
2744
  }
2745
2745
  if (r.tokenizer) {
2746
- let n = this.defaults.tokenizer || new At(this.defaults);
2747
- for (let i in r.tokenizer) {
2748
- if (!(i in n)) throw new Error(`tokenizer '${i}' does not exist`);
2749
- if (["options", "rules", "lexer"].includes(i)) continue;
2750
- let l = i, s = r.tokenizer[l], u = n[l];
2751
- n[l] = (...p) => {
2752
- let m = s.apply(n, p);
2753
- return m === !1 && (m = u.apply(n, p)), m;
2746
+ let i = this.defaults.tokenizer || new Tt(this.defaults);
2747
+ for (let n in r.tokenizer) {
2748
+ if (!(n in i)) throw new Error(`tokenizer '${n}' does not exist`);
2749
+ if (["options", "rules", "lexer"].includes(n)) continue;
2750
+ let l = n, s = r.tokenizer[l], u = i[l];
2751
+ i[l] = (...p) => {
2752
+ let b = s.apply(i, p);
2753
+ return b === !1 && (b = u.apply(i, p)), b;
2754
2754
  };
2755
2755
  }
2756
- o.tokenizer = n;
2756
+ o.tokenizer = i;
2757
2757
  }
2758
2758
  if (r.hooks) {
2759
- let n = this.defaults.hooks || new rt();
2760
- for (let i in r.hooks) {
2761
- if (!(i in n)) throw new Error(`hook '${i}' does not exist`);
2762
- if (["options", "block"].includes(i)) continue;
2763
- let l = i, s = r.hooks[l], u = n[l];
2764
- rt.passThroughHooks.has(i) ? n[l] = (p) => {
2765
- if (this.defaults.async && rt.passThroughHooksRespectAsync.has(i)) return (async () => {
2766
- let f = await s.call(n, p);
2767
- return u.call(n, f);
2759
+ let i = this.defaults.hooks || new rt();
2760
+ for (let n in r.hooks) {
2761
+ if (!(n in i)) throw new Error(`hook '${n}' does not exist`);
2762
+ if (["options", "block"].includes(n)) continue;
2763
+ let l = n, s = r.hooks[l], u = i[l];
2764
+ rt.passThroughHooks.has(n) ? i[l] = (p) => {
2765
+ if (this.defaults.async && rt.passThroughHooksRespectAsync.has(n)) return (async () => {
2766
+ let f = await s.call(i, p);
2767
+ return u.call(i, f);
2768
2768
  })();
2769
- let m = s.call(n, p);
2770
- return u.call(n, m);
2771
- } : n[l] = (...p) => {
2769
+ let b = s.call(i, p);
2770
+ return u.call(i, b);
2771
+ } : i[l] = (...p) => {
2772
2772
  if (this.defaults.async) return (async () => {
2773
- let f = await s.apply(n, p);
2774
- return f === !1 && (f = await u.apply(n, p)), f;
2773
+ let f = await s.apply(i, p);
2774
+ return f === !1 && (f = await u.apply(i, p)), f;
2775
2775
  })();
2776
- let m = s.apply(n, p);
2777
- return m === !1 && (m = u.apply(n, p)), m;
2776
+ let b = s.apply(i, p);
2777
+ return b === !1 && (b = u.apply(i, p)), b;
2778
2778
  };
2779
2779
  }
2780
- o.hooks = n;
2780
+ o.hooks = i;
2781
2781
  }
2782
2782
  if (r.walkTokens) {
2783
- let n = this.defaults.walkTokens, i = r.walkTokens;
2783
+ let i = this.defaults.walkTokens, n = r.walkTokens;
2784
2784
  o.walkTokens = function(l) {
2785
2785
  let s = [];
2786
- return s.push(i.call(this, l)), n && (s = s.concat(n.call(this, l))), s;
2786
+ return s.push(n.call(this, l)), i && (s = s.concat(i.call(this, l))), s;
2787
2787
  };
2788
2788
  }
2789
2789
  this.defaults = { ...this.defaults, ...o };
@@ -2796,28 +2796,28 @@ ${t}</tr>
2796
2796
  return oe.lex(t, e ?? this.defaults);
2797
2797
  }
2798
2798
  parser(t, e) {
2799
- return ne.parse(t, e ?? this.defaults);
2799
+ return ie.parse(t, e ?? this.defaults);
2800
2800
  }
2801
2801
  parseMarkdown(t) {
2802
2802
  return (e, r) => {
2803
- let o = { ...r }, n = { ...this.defaults, ...o }, i = this.onError(!!n.silent, !!n.async);
2804
- if (this.defaults.async === !0 && o.async === !1) return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
2805
- if (typeof e > "u" || e === null) return i(new Error("marked(): input parameter is undefined or null"));
2806
- if (typeof e != "string") return i(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
2807
- if (n.hooks && (n.hooks.options = n, n.hooks.block = t), n.async) return (async () => {
2808
- let l = n.hooks ? await n.hooks.preprocess(e) : e, s = await (n.hooks ? await n.hooks.provideLexer(t) : t ? oe.lex : oe.lexInline)(l, n), u = n.hooks ? await n.hooks.processAllTokens(s) : s;
2809
- n.walkTokens && await Promise.all(this.walkTokens(u, n.walkTokens));
2810
- let p = await (n.hooks ? await n.hooks.provideParser(t) : t ? ne.parse : ne.parseInline)(u, n);
2811
- return n.hooks ? await n.hooks.postprocess(p) : p;
2812
- })().catch(i);
2803
+ let o = { ...r }, i = { ...this.defaults, ...o }, n = this.onError(!!i.silent, !!i.async);
2804
+ if (this.defaults.async === !0 && o.async === !1) return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
2805
+ if (typeof e > "u" || e === null) return n(new Error("marked(): input parameter is undefined or null"));
2806
+ if (typeof e != "string") return n(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
2807
+ if (i.hooks && (i.hooks.options = i, i.hooks.block = t), i.async) return (async () => {
2808
+ let l = i.hooks ? await i.hooks.preprocess(e) : e, s = await (i.hooks ? await i.hooks.provideLexer(t) : t ? oe.lex : oe.lexInline)(l, i), u = i.hooks ? await i.hooks.processAllTokens(s) : s;
2809
+ i.walkTokens && await Promise.all(this.walkTokens(u, i.walkTokens));
2810
+ let p = await (i.hooks ? await i.hooks.provideParser(t) : t ? ie.parse : ie.parseInline)(u, i);
2811
+ return i.hooks ? await i.hooks.postprocess(p) : p;
2812
+ })().catch(n);
2813
2813
  try {
2814
- n.hooks && (e = n.hooks.preprocess(e));
2815
- let l = (n.hooks ? n.hooks.provideLexer(t) : t ? oe.lex : oe.lexInline)(e, n);
2816
- n.hooks && (l = n.hooks.processAllTokens(l)), n.walkTokens && this.walkTokens(l, n.walkTokens);
2817
- let s = (n.hooks ? n.hooks.provideParser(t) : t ? ne.parse : ne.parseInline)(l, n);
2818
- return n.hooks && (s = n.hooks.postprocess(s)), s;
2814
+ i.hooks && (e = i.hooks.preprocess(e));
2815
+ let l = (i.hooks ? i.hooks.provideLexer(t) : t ? oe.lex : oe.lexInline)(e, i);
2816
+ i.hooks && (l = i.hooks.processAllTokens(l)), i.walkTokens && this.walkTokens(l, i.walkTokens);
2817
+ let s = (i.hooks ? i.hooks.provideParser(t) : t ? ie.parse : ie.parseInline)(l, i);
2818
+ return i.hooks && (s = i.hooks.postprocess(s)), s;
2819
2819
  } catch (l) {
2820
- return i(l);
2820
+ return n(l);
2821
2821
  }
2822
2822
  };
2823
2823
  }
@@ -2832,86 +2832,151 @@ Please report this to https://github.com/markedjs/marked.`, t) {
2832
2832
  throw r;
2833
2833
  };
2834
2834
  }
2835
- }, _e = new za();
2836
- function j(t, e) {
2835
+ }, _e = new Oo();
2836
+ function _(t, e) {
2837
2837
  return _e.parse(t, e);
2838
2838
  }
2839
- j.options = j.setOptions = function(t) {
2840
- return _e.setOptions(t), j.defaults = _e.defaults, So(j.defaults), j;
2839
+ _.options = _.setOptions = function(t) {
2840
+ return _e.setOptions(t), _.defaults = _e.defaults, Ro(_.defaults), _;
2841
2841
  };
2842
- j.getDefaults = ir;
2843
- j.defaults = Ie;
2844
- function Ca(...t) {
2845
- return _e.use(...t), j.defaults = _e.defaults, So(j.defaults), j;
2842
+ _.getDefaults = lr;
2843
+ _.defaults = Ie;
2844
+ function Oa(...t) {
2845
+ return _e.use(...t), _.defaults = _e.defaults, Ro(_.defaults), _;
2846
2846
  }
2847
- j.use = Ca;
2848
- j.walkTokens = function(t, e) {
2847
+ _.use = Oa;
2848
+ _.walkTokens = function(t, e) {
2849
2849
  return _e.walkTokens(t, e);
2850
2850
  };
2851
- j.parseInline = _e.parseInline;
2852
- j.Parser = ne;
2853
- j.parser = ne.parse;
2854
- j.Renderer = Tt;
2855
- j.TextRenderer = pr;
2856
- j.Lexer = oe;
2857
- j.lexer = oe.lex;
2858
- j.Tokenizer = At;
2859
- j.Hooks = rt;
2860
- j.parse = j;
2861
- j.options;
2862
- j.setOptions;
2863
- j.walkTokens;
2864
- j.parseInline;
2865
- ne.parse;
2851
+ _.parseInline = _e.parseInline;
2852
+ _.Parser = ie;
2853
+ _.parser = ie.parse;
2854
+ _.Renderer = Nt;
2855
+ _.TextRenderer = hr;
2856
+ _.Lexer = oe;
2857
+ _.lexer = oe.lex;
2858
+ _.Tokenizer = Tt;
2859
+ _.Hooks = rt;
2860
+ _.parse = _;
2861
+ _.options;
2862
+ _.setOptions;
2863
+ _.walkTokens;
2864
+ _.parseInline;
2865
+ ie.parse;
2866
2866
  oe.lex;
2867
- const ja = ({
2867
+ let ho, Ho;
2868
+ const Ha = (t) => !!t && /\$[^$\s]|\$\$/.test(t), Fa = () => Ho, Ba = () => (ho ??= (async () => {
2869
+ try {
2870
+ const [{ default: t }, { default: e }] = await Promise.all([
2871
+ import("./katex-DSLAjWZH-CHGN3Pr6.js"),
2872
+ import("./katex-Dv-tcU2S-Dv-tcU2S.js")
2873
+ ]);
2874
+ return vo("bitflow-styles-katex", e), Ho = t, t;
2875
+ } catch {
2876
+ return;
2877
+ }
2878
+ })(), ho), Ma = ({
2868
2879
  markdown: t,
2869
2880
  className: e
2870
2881
  }) => {
2871
- const r = S.useMemo(() => _a(t), [t]);
2872
- return r ? /* @__PURE__ */ c.jsx(
2882
+ const r = qa(t), o = y.useMemo(() => Ga(t, r), [t, r]);
2883
+ return o ? /* @__PURE__ */ c.jsx(
2873
2884
  "div",
2874
2885
  {
2875
2886
  className: e ? `bitflow-prose ${e}` : "bitflow-prose",
2876
- dangerouslySetInnerHTML: { __html: r }
2887
+ dangerouslySetInnerHTML: { __html: o }
2877
2888
  }
2878
2889
  ) : null;
2879
- }, _a = (t) => {
2880
- if (!t) return "";
2881
- const e = j.parse(t, { async: !1, gfm: !0, breaks: !0 });
2882
- return Ii.sanitize(e, {
2890
+ }, qa = (t) => {
2891
+ const e = Ha(t), [r, o] = y.useState(() => e ? Fa() : void 0);
2892
+ return y.useEffect(() => {
2893
+ if (!e || r) return;
2894
+ let i = !0;
2895
+ return Ba().then((n) => {
2896
+ i && n && o(n);
2897
+ }), () => {
2898
+ i = !1;
2899
+ };
2900
+ }, [e, r]), e ? r : void 0;
2901
+ }, ot = "data-bitflow-tex", nr = "data-bitflow-display", bo = (t) => t.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;"), Fo = (t, e) => e ? `<div class="bitflow-math bitflow-math-display" ${ot}="${bo(t)}" ${nr}=""></div>` : `<span class="bitflow-math" ${ot}="${bo(t)}"></span>`, Ua = {
2902
+ name: "blockMath",
2903
+ level: "block",
2904
+ start: (t) => t.match(/^ {0,3}\$\$/m)?.index,
2905
+ tokenizer(t) {
2906
+ const e = /^ {0,3}\$\$([\s\S]+?)\$\$[ \t]*(?:\n+|$)/.exec(t);
2907
+ if (e)
2908
+ return { type: "blockMath", raw: e[0], text: e[1].trim() };
2909
+ },
2910
+ renderer: (t) => Fo(t.text, !0) + `
2911
+ `
2912
+ }, Wa = {
2913
+ name: "inlineMath",
2914
+ level: "inline",
2915
+ start: (t) => {
2916
+ const e = t.indexOf("$");
2917
+ return e >= 0 ? e : void 0;
2918
+ },
2919
+ tokenizer(t) {
2920
+ const e = /^\$\$(?!\$)([\s\S]+?)\$\$/.exec(t);
2921
+ if (e)
2922
+ return { type: "inlineMath", raw: e[0], text: e[1].trim(), display: !0 };
2923
+ const r = /^\$(?![\s$])((?:\\.|[^\\$])*?[^\s\\])\$(?!\d)/.exec(t);
2924
+ if (r)
2925
+ return { type: "inlineMath", raw: r[0], text: r[1], display: !1 };
2926
+ },
2927
+ renderer: (t) => Fo(t.text, !!t.display)
2928
+ }, Bo = new Oo({ async: !1, gfm: !0, breaks: !0 });
2929
+ Bo.use({ extensions: [Ua, Wa] });
2930
+ const Ga = (t, e) => {
2931
+ if (!t || typeof document > "u") return "";
2932
+ const r = Bo.parse(t), o = Mn.sanitize(r, {
2883
2933
  // `javascript:` and `data:` URLs are the ones that execute; everything a
2884
2934
  // teacher legitimately links to is covered here.
2885
2935
  ALLOWED_URI_REGEXP: /^(?:(?:https?|mailto|tel|ftp):|[^a-z]|[a-z+.-]+(?:[^a-z+.\-:]|$))/i,
2886
2936
  // Belt and braces: DOMPurify strips these anyway, and being explicit means
2887
2937
  // a future config change cannot quietly let them back in.
2888
2938
  FORBID_TAGS: ["style", "form", "input", "button", "iframe", "object", "embed"],
2889
- FORBID_ATTR: ["style", "formaction", "srcdoc"]
2939
+ FORBID_ATTR: ["style", "formaction", "srcdoc"],
2940
+ RETURN_DOM_FRAGMENT: !0
2890
2941
  });
2891
- }, Ia = (t, e) => {
2892
- const r = S.useRef(t), o = S.useRef(e);
2893
- r.current = t, o.current = e, S.useEffect(() => {
2894
- const n = (l) => r.current(l), i = (l) => o.current(l);
2895
- return window.addEventListener("pointermove", n), window.addEventListener("pointerup", i), window.addEventListener("pointercancel", i), () => {
2896
- window.removeEventListener("pointermove", n), window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i);
2942
+ for (const n of o.querySelectorAll(`[${ot}]`)) {
2943
+ const l = n.getAttribute(ot) ?? "", s = n.hasAttribute(nr);
2944
+ n.removeAttribute(ot), n.removeAttribute(nr), e ? n.innerHTML = e.renderToString(l, {
2945
+ displayMode: s,
2946
+ throwOnError: !1,
2947
+ // Never: `\href`, `\url` and `\htmlClass` and friends are what `trust`
2948
+ // would unlock, and author TeX is as untrusted as author HTML.
2949
+ trust: !1,
2950
+ strict: "ignore",
2951
+ output: "htmlAndMathml"
2952
+ }) : (n.classList.add("bitflow-math-pending"), n.textContent = s ? `$$${l}$$` : `$${l}$`);
2953
+ }
2954
+ const i = document.createElement("div");
2955
+ return i.append(o), i.innerHTML;
2956
+ }, Ya = (t, e) => {
2957
+ const r = y.useRef(t), o = y.useRef(e);
2958
+ r.current = t, o.current = e, y.useEffect(() => {
2959
+ const i = (l) => r.current(l), n = (l) => o.current(l);
2960
+ return window.addEventListener("pointermove", i), window.addEventListener("pointerup", n), window.addEventListener("pointercancel", n), () => {
2961
+ window.removeEventListener("pointermove", i), window.removeEventListener("pointerup", n), window.removeEventListener("pointercancel", n);
2897
2962
  };
2898
2963
  }, []);
2899
- }, dl = ({
2964
+ }, Al = ({
2900
2965
  items: t,
2901
2966
  background: e,
2902
2967
  aspectRatio: r,
2903
2968
  selectedId: o,
2904
- hint: n,
2905
- minSize: i = 0.02,
2969
+ hint: i,
2970
+ minSize: n = 0.02,
2906
2971
  drawable: l = !0,
2907
2972
  onSelect: s,
2908
2973
  onDraw: u,
2909
2974
  onChange: p
2910
2975
  }) => {
2911
- const m = S.useRef(null), f = S.useRef(null), [, b] = S.useReducer((k) => k + 1, 0), x = (k) => {
2912
- f.current = k, b();
2913
- }, w = S.useCallback((k, v) => {
2914
- const A = m.current?.getBoundingClientRect();
2976
+ const b = y.useRef(null), f = y.useRef(null), [, m] = y.useReducer((k) => k + 1, 0), x = (k) => {
2977
+ f.current = k, m();
2978
+ }, w = y.useCallback((k, v) => {
2979
+ const A = b.current?.getBoundingClientRect();
2915
2980
  return !A || A.width === 0 || A.height === 0 ? null : {
2916
2981
  x: qe((k - A.left) / A.width),
2917
2982
  y: qe((v - A.top) / A.height)
@@ -2921,11 +2986,11 @@ const ja = ({
2921
2986
  y: Math.min(k.y, v.y),
2922
2987
  width: Math.abs(v.x - k.x),
2923
2988
  height: Math.abs(v.y - k.y)
2924
- }), _ = (k) => t.find((v) => v.id === k)?.box, H = (k) => {
2989
+ }), j = (k) => t.find((v) => v.id === k)?.box, H = (k) => {
2925
2990
  const v = f.current;
2926
2991
  return v && v.kind !== "draw" && v.id === k.id ? v.box : k.box;
2927
2992
  };
2928
- Ia((k) => {
2993
+ Ya((k) => {
2929
2994
  const v = f.current;
2930
2995
  if (!v) return;
2931
2996
  const A = w(k.clientX, k.clientY);
@@ -2934,7 +2999,7 @@ const ja = ({
2934
2999
  x({ ...v, to: A });
2935
3000
  return;
2936
3001
  }
2937
- const z = _(v.id);
3002
+ const z = j(v.id);
2938
3003
  if (!z) return;
2939
3004
  const J = A.x - v.start.x, Ae = A.y - v.start.y;
2940
3005
  x({
@@ -2947,8 +3012,8 @@ const ja = ({
2947
3012
  y: qe(z.y + Ae, 1 - z.height)
2948
3013
  } : {
2949
3014
  ...z,
2950
- width: qe(z.width + J, 1 - z.x, i),
2951
- height: qe(z.height + Ae, 1 - z.y, i)
3015
+ width: qe(z.width + J, 1 - z.x, n),
3016
+ height: qe(z.height + Ae, 1 - z.y, n)
2952
3017
  }
2953
3018
  });
2954
3019
  }, () => {
@@ -2956,7 +3021,7 @@ const ja = ({
2956
3021
  if (x(null), !!k) {
2957
3022
  if (k.kind === "draw") {
2958
3023
  const v = N(k.from, k.to);
2959
- if (v.width < i || v.height < i) return;
3024
+ if (v.width < n || v.height < n) return;
2960
3025
  u?.(v);
2961
3026
  return;
2962
3027
  }
@@ -2969,7 +3034,7 @@ const ja = ({
2969
3034
  v && x({ kind: "draw", from: v, to: v });
2970
3035
  }, W = (k, v, A) => {
2971
3036
  k.stopPropagation();
2972
- const z = w(k.clientX, k.clientY), J = _(v);
3037
+ const z = w(k.clientX, k.clientY), J = j(v);
2973
3038
  !z || !J || (s?.(v), x({ kind: A, id: v, start: z, box: J }));
2974
3039
  }, E = (k, v) => ({
2975
3040
  left: `${k.x * 100}%`,
@@ -2979,12 +3044,12 @@ const ja = ({
2979
3044
  borderRadius: v ? "50%" : void 0
2980
3045
  });
2981
3046
  return /* @__PURE__ */ c.jsxs("div", { className: "bitflow-boxeditor", children: [
2982
- n && /* @__PURE__ */ c.jsx("p", { className: "bitflow-hint", children: n }),
3047
+ i && /* @__PURE__ */ c.jsx("p", { className: "bitflow-hint", children: i }),
2983
3048
  /* @__PURE__ */ c.jsxs(
2984
3049
  "div",
2985
3050
  {
2986
3051
  className: "bitflow-boxeditor-area",
2987
- ref: m,
3052
+ ref: b,
2988
3053
  style: { aspectRatio: r },
2989
3054
  onPointerDown: X,
2990
3055
  onDragStart: (k) => k.preventDefault(),
@@ -3032,28 +3097,28 @@ const ja = ({
3032
3097
  }
3033
3098
  )
3034
3099
  ] });
3035
- }, qe = (t, e = 1, r = 0) => Math.min(e, Math.max(r, Number.isFinite(t) ? t : r)), Da = 1600, Pa = 0.82, $a = async (t, { maxEdge: e = Da, quality: r = Pa } = {}) => {
3100
+ }, qe = (t, e = 1, r = 0) => Math.min(e, Math.max(r, Number.isFinite(t) ? t : r)), Va = 1600, Qa = 0.82, Za = async (t, { maxEdge: e = Va, quality: r = Qa } = {}) => {
3036
3101
  if (!t.type.startsWith("image/"))
3037
3102
  throw new Error("That file is not a picture.");
3038
- if (t.type === "image/svg+xml") return await Xt(t);
3039
- const o = await Ha(t), n = dn(o.width, o.height, e), i = document.createElement("canvas");
3040
- i.width = n.width, i.height = n.height;
3041
- const l = i.getContext("2d");
3103
+ if (t.type === "image/svg+xml") return await Kt(t);
3104
+ const o = await Ka(t), i = wi(o.width, o.height, e), n = document.createElement("canvas");
3105
+ n.width = i.width, n.height = i.height;
3106
+ const l = n.getContext("2d");
3042
3107
  if (!l)
3043
- return await Xt(t);
3044
- l.drawImage(o, 0, 0, n.width, n.height);
3045
- const s = Oa(l, n) ? "image/png" : "image/jpeg", u = i.toDataURL(s, r);
3046
- if (n.width === o.width && n.height === o.height) {
3047
- const p = await Xt(t);
3108
+ return await Kt(t);
3109
+ l.drawImage(o, 0, 0, i.width, i.height);
3110
+ const s = Xa(l, i) ? "image/png" : "image/jpeg", u = n.toDataURL(s, r);
3111
+ if (i.width === o.width && i.height === o.height) {
3112
+ const p = await Kt(t);
3048
3113
  return p.length <= u.length ? p : u;
3049
3114
  }
3050
3115
  return u;
3051
- }, Oa = (t, e) => {
3116
+ }, Xa = (t, e) => {
3052
3117
  const { data: r } = t.getImageData(0, 0, e.width, e.height);
3053
3118
  for (let o = 3; o < r.length; o += 4)
3054
3119
  if (r[o] < 255) return !0;
3055
3120
  return !1;
3056
- }, Ha = async (t) => {
3121
+ }, Ka = async (t) => {
3057
3122
  if (typeof createImageBitmap == "function")
3058
3123
  try {
3059
3124
  return await createImageBitmap(t);
@@ -3062,45 +3127,45 @@ const ja = ({
3062
3127
  const e = URL.createObjectURL(t);
3063
3128
  try {
3064
3129
  return await new Promise((r, o) => {
3065
- const n = new Image();
3066
- n.onload = () => r(n), n.onerror = () => o(new Error("The file could not be read as an image.")), n.src = e;
3130
+ const i = new Image();
3131
+ i.onload = () => r(i), i.onerror = () => o(new Error("The file could not be read as an image.")), i.src = e;
3067
3132
  });
3068
3133
  } finally {
3069
3134
  URL.revokeObjectURL(e);
3070
3135
  }
3071
- }, Xt = (t) => new Promise((e, r) => {
3136
+ }, Kt = (t) => new Promise((e, r) => {
3072
3137
  const o = new FileReader();
3073
3138
  o.onload = () => e(String(o.result)), o.onerror = () => r(new Error("The file could not be read.")), o.readAsDataURL(t);
3074
- }), pl = ({
3139
+ }), Tl = ({
3075
3140
  value: t,
3076
3141
  onChange: e,
3077
3142
  locale: r,
3078
3143
  label: o,
3079
- hint: n,
3080
- altLabel: i,
3144
+ hint: i,
3145
+ altLabel: n,
3081
3146
  altHint: l,
3082
3147
  error: s,
3083
3148
  altError: u,
3084
3149
  /** Set false where the picture is decoration rather than content. */
3085
3150
  altRequired: p = !0,
3086
- options: m
3151
+ options: b
3087
3152
  }) => {
3088
- const f = (E, k) => F(de, E, r, k), b = S.useId(), x = S.useRef(null), [w, N] = S.useState(!1), [_, H] = S.useState(null), X = async (E) => {
3153
+ const f = (E, k) => F(de, E, r, k), m = y.useId(), x = y.useRef(null), [w, N] = y.useState(!1), [j, H] = y.useState(null), X = async (E) => {
3089
3154
  if (E) {
3090
3155
  N(!0), H(null);
3091
3156
  try {
3092
- const k = await $a(E, m);
3093
- e({ src: k, alt: t.alt || Fa(E.name) });
3157
+ const k = await Za(E, b);
3158
+ e({ src: k, alt: t.alt || Ja(E.name) });
3094
3159
  } catch {
3095
3160
  H(f("imageFailed"));
3096
3161
  } finally {
3097
3162
  N(!1), x.current && (x.current.value = "");
3098
3163
  }
3099
3164
  }
3100
- }, W = t.src !== "" && !sn(t.src);
3165
+ }, W = t.src !== "" && !bi(t.src);
3101
3166
  return /* @__PURE__ */ c.jsxs("div", { className: "bitflow-field bitflow-image-field", children: [
3102
- /* @__PURE__ */ c.jsx("span", { className: "bitflow-label", id: `${b}-label`, children: o ?? f("imageLabel") }),
3103
- /* @__PURE__ */ c.jsx("span", { className: "bitflow-hint", id: `${b}-hint`, children: n ?? f("imageHint") }),
3167
+ /* @__PURE__ */ c.jsx("span", { className: "bitflow-label", id: `${m}-label`, children: o ?? f("imageLabel") }),
3168
+ /* @__PURE__ */ c.jsx("span", { className: "bitflow-hint", id: `${m}-hint`, children: i ?? f("imageHint") }),
3104
3169
  /* @__PURE__ */ c.jsxs("div", { className: "bitflow-image-row", children: [
3105
3170
  t.src ? /* @__PURE__ */ c.jsx("img", { className: "bitflow-image-preview", src: t.src, alt: "" }) : /* @__PURE__ */ c.jsx("div", { className: "bitflow-image-preview bitflow-image-preview-empty" }),
3106
3171
  /* @__PURE__ */ c.jsxs("div", { className: "bitflow-stack-small bitflow-stack", children: [
@@ -3108,12 +3173,12 @@ const ja = ({
3108
3173
  "input",
3109
3174
  {
3110
3175
  ref: x,
3111
- id: b,
3176
+ id: m,
3112
3177
  type: "file",
3113
3178
  className: "bitflow-input",
3114
3179
  accept: "image/*",
3115
- "aria-describedby": `${b}-hint`,
3116
- "aria-labelledby": `${b}-label`,
3180
+ "aria-describedby": `${m}-hint`,
3181
+ "aria-labelledby": `${m}-label`,
3117
3182
  disabled: w,
3118
3183
  onChange: (E) => {
3119
3184
  X(E.target.files?.[0]);
@@ -3121,7 +3186,7 @@ const ja = ({
3121
3186
  }
3122
3187
  ),
3123
3188
  w && /* @__PURE__ */ c.jsx("span", { className: "bitflow-hint", children: f("imageWorking") }),
3124
- t.src !== "" && !w && /* @__PURE__ */ c.jsx("span", { className: "bitflow-hint", children: f("imageSize", { size: cn(un(t.src)) }) }),
3189
+ t.src !== "" && !w && /* @__PURE__ */ c.jsx("span", { className: "bitflow-hint", children: f("imageSize", { size: mi(gi(t.src)) }) }),
3125
3190
  t.src !== "" && /* @__PURE__ */ c.jsx(
3126
3191
  "button",
3127
3192
  {
@@ -3133,11 +3198,11 @@ const ja = ({
3133
3198
  )
3134
3199
  ] })
3135
3200
  ] }),
3136
- _ && /* @__PURE__ */ c.jsx("span", { className: "bitflow-field-error", role: "alert", children: _ }),
3201
+ j && /* @__PURE__ */ c.jsx("span", { className: "bitflow-field-error", role: "alert", children: j }),
3137
3202
  s && /* @__PURE__ */ c.jsx("span", { className: "bitflow-field-error", role: "alert", children: s }),
3138
3203
  W && /* @__PURE__ */ c.jsx("span", { className: "bitflow-hint", children: f("imageLinked") }),
3139
3204
  p && /* @__PURE__ */ c.jsxs("label", { className: "bitflow-field", children: [
3140
- /* @__PURE__ */ c.jsx("span", { className: "bitflow-label", children: i ?? f("imageAltLabel") }),
3205
+ /* @__PURE__ */ c.jsx("span", { className: "bitflow-label", children: n ?? f("imageAltLabel") }),
3141
3206
  /* @__PURE__ */ c.jsx("span", { className: "bitflow-hint", children: l ?? f("imageAltHint") }),
3142
3207
  /* @__PURE__ */ c.jsx(
3143
3208
  "textarea",
@@ -3151,51 +3216,51 @@ const ja = ({
3151
3216
  u && /* @__PURE__ */ c.jsx("span", { className: "bitflow-field-error", role: "alert", children: u })
3152
3217
  ] })
3153
3218
  ] });
3154
- }, Fa = (t) => t.replace(/\.[^.]+$/, "").replace(/[-_]+/g, " ").trim(), Ue = 48, po = 14, Ba = (t) => {
3219
+ }, Ja = (t) => t.replace(/\.[^.]+$/, "").replace(/[-_]+/g, " ").trim(), Ue = 48, mo = 14, el = (t) => {
3155
3220
  const e = [];
3156
3221
  for (let r = t?.parentElement; r; r = r.parentElement) {
3157
3222
  const { overflowY: o } = getComputedStyle(r);
3158
3223
  (o === "auto" || o === "scroll") && r.scrollHeight > r.clientHeight && e.push(r);
3159
3224
  }
3160
3225
  return e.push(null), e;
3161
- }, Ma = (t, e, r) => t < e + Ue ? -po * Math.min(1, (e + Ue - t) / Ue) : t > r - Ue ? po * Math.min(1, (t - (r - Ue)) / Ue) : 0, fl = (t) => {
3162
- const e = S.useRef(t);
3163
- S.useEffect(() => {
3226
+ }, tl = (t, e, r) => t < e + Ue ? -mo * Math.min(1, (e + Ue - t) / Ue) : t > r - Ue ? mo * Math.min(1, (t - (r - Ue)) / Ue) : 0, Nl = (t) => {
3227
+ const e = y.useRef(t);
3228
+ y.useEffect(() => {
3164
3229
  e.current = t;
3165
3230
  });
3166
- const r = S.useRef(null), o = S.useRef(null), n = () => {
3231
+ const r = y.useRef(null), o = y.useRef(null), i = () => {
3167
3232
  o.current = null;
3168
3233
  const s = r.current;
3169
3234
  if (s)
3170
- for (const u of Ba(s.element)) {
3171
- const p = u ? u.getBoundingClientRect().top : 0, m = u ? u.getBoundingClientRect().bottom : window.innerHeight, f = Ma(s.y, p, m);
3235
+ for (const u of el(s.element)) {
3236
+ const p = u ? u.getBoundingClientRect().top : 0, b = u ? u.getBoundingClientRect().bottom : window.innerHeight, f = tl(s.y, p, b);
3172
3237
  if (f === 0) continue;
3173
- const b = u ? u.scrollTop : window.scrollY;
3174
- if (u ? u.scrollTop = b + f : window.scrollBy(0, f), (u ? u.scrollTop : window.scrollY) !== b) {
3175
- e.current(), o.current = requestAnimationFrame(n);
3238
+ const m = u ? u.scrollTop : window.scrollY;
3239
+ if (u ? u.scrollTop = m + f : window.scrollBy(0, f), (u ? u.scrollTop : window.scrollY) !== m) {
3240
+ e.current(), o.current = requestAnimationFrame(i);
3176
3241
  return;
3177
3242
  }
3178
3243
  }
3179
- }, i = () => {
3244
+ }, n = () => {
3180
3245
  r.current = null, o.current !== null && cancelAnimationFrame(o.current), o.current = null;
3181
3246
  }, l = (s, u, p) => {
3182
- r.current = { element: s, y: p }, o.current === null && typeof requestAnimationFrame == "function" && (o.current = requestAnimationFrame(n));
3247
+ r.current = { element: s, y: p }, o.current === null && typeof requestAnimationFrame == "function" && (o.current = requestAnimationFrame(i));
3183
3248
  };
3184
- return S.useEffect(() => i, []), { follow: l, stop: i };
3249
+ return y.useEffect(() => n, []), { follow: l, stop: n };
3185
3250
  };
3186
- ln("bitflow-styles-base", Pn);
3187
- const hl = 'bitflow-flow{display:flex;flex-direction:column}bitflow-flow>.bitflow-shell{flex:1 1 auto;min-height:0}.bitflow-shell{display:flex;flex-direction:column;min-height:100%;max-height:100%;overflow-y:auto;background:var(--bitflow-color-background)}.bitflow-shell-content{display:flex;flex-direction:column;gap:var(--bitflow-space-medium);padding:var(--bitflow-space-medium) var(--bitflow-space-small);flex:1 1 auto;min-height:0;overflow-y:auto}.bitflow-shell-content>*{flex-shrink:0}.bitflow-shell-controls{flex:none;display:flex;justify-content:space-between;align-items:center;gap:var(--bitflow-space-small);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);padding-inline-end:calc(var(--bitflow-space-small) + var(--bitflow-controls-inset-end, 0px));border-top:1px solid var(--bitflow-color-neutral-400)}.bitflow-hold-reason{margin:0;padding-inline:var(--bitflow-space-small);font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text-muted);min-height:1.5em}.bitflow-progress{width:100%}.bitflow-root .bitflow-shell-content:focus{outline:none;box-shadow:none}@media print{.bitflow-shell,.bitflow-shell-content{max-height:none;overflow:visible}.bitflow-shell-controls,.bitflow-progress{display:none}}.bitflow-section-label{margin:0;padding:var(--bitflow-space-xsmall) var(--bitflow-space-small) 0;font-size:var(--bitflow-font-size-small);font-weight:var(--bitflow-font-weight-medium);color:var(--bitflow-color-text-muted)}.bitflow-section-stimulus{padding:var(--bitflow-space-small);border-inline-start:var(--bitflow-border-width) solid var(--bitflow-color-primary-light);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface);max-height:var(--bitflow-stimulus-max-height, 40vh);overflow-y:auto}.bitflow-steps{display:flex;flex-direction:column;gap:var(--bitflow-space-xsmall);border-top:1px solid var(--bitflow-color-border);padding-top:var(--bitflow-space-small)}.bitflow-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:var(--bitflow-space-xxsmall)}.bitflow-step{min-width:44px;min-height:44px;padding:var(--bitflow-space-xxsmall);font:inherit;font-variant-numeric:tabular-nums;color:var(--bitflow-color-text);background:var(--bitflow-color-surface);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);cursor:pointer}.bitflow-step:hover:not(:disabled){border-color:var(--bitflow-color-primary)}.bitflow-step-answered{background:var(--bitflow-color-correct-surface);border-color:var(--bitflow-color-primary-light)}.bitflow-step-outstanding{border-style:dashed;border-color:var(--bitflow-color-neutral-400)}.bitflow-step-current{border-color:var(--bitflow-color-primary);font-weight:var(--bitflow-font-weight-bold);opacity:1;cursor:default}.bitflow-shell-steps{padding-inline:var(--bitflow-space-small);padding-bottom:var(--bitflow-space-small)}.bitflow-countdown{display:flex;justify-content:flex-end;gap:var(--bitflow-space-xxsmall);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small) 0;font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text-muted)}.bitflow-countdown-value{font-variant-numeric:tabular-nums;font-weight:var(--bitflow-font-weight-medium)}.bitflow-countdown-urgent{color:var(--bitflow-color-wrong)}.bitflow-progress-bar{appearance:none;display:block;width:100%;height:5px;border:0;background:var(--bitflow-color-neutral-200);color:var(--bitflow-color-primary)}.bitflow-progress-bar::-webkit-progress-bar{background:var(--bitflow-color-neutral-200)}.bitflow-progress-bar::-webkit-progress-value{background:var(--bitflow-color-primary);transition:width var(--bitflow-duration-standard) ease-out}.bitflow-progress-bar::-moz-progress-bar{background:var(--bitflow-color-primary)}.bitflow-confidence{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--bitflow-space-xsmall)}.bitflow-confidence-levels{display:flex;gap:var(--bitflow-space-xsmall)}.bitflow-confidence-level{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:var(--bitflow-radius-full);border:var(--bitflow-border-width) solid var(--bitflow-color-border);background:var(--bitflow-color-surface);cursor:pointer;font-weight:var(--bitflow-font-weight-medium)}.bitflow-confidence-level:has(:checked){border-color:var(--bitflow-color-primary);background:var(--bitflow-color-primary-light)}.bitflow-confidence-level:has(:focus-visible){box-shadow:var(--bitflow-shadow-outline)}.bitflow-editor{display:grid;grid-template-columns:minmax(0,1fr) auto var(--bitflow-inspector-width, 400px);grid-template-rows:auto minmax(0,1fr);height:100%;min-height:420px;background:var(--bitflow-color-background)}.bitflow-editor-previewing{grid-template-columns:minmax(0,1fr)}.bitflow-editor-resizer{width:9px;margin-inline:-4px;cursor:col-resize;background:none;border:0;touch-action:none;z-index:1}.bitflow-editor-resizer:before{display:block;width:1px;height:100%;margin-inline:auto;content:"";background:var(--bitflow-color-border)}.bitflow-editor-resizer:hover:before,.bitflow-editor-resizer:focus-visible:before{width:3px;background:var(--bitflow-color-primary)}.bitflow-editor-toolbar{grid-column:1 / -1;display:flex;align-items:center;gap:var(--bitflow-space-xsmall);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);border-bottom:1px solid var(--bitflow-color-border);background:var(--bitflow-color-surface);flex-wrap:wrap}.bitflow-editor-canvas{min-width:0;min-height:0;position:relative}.bitflow-editor-sidebar{background:var(--bitflow-color-surface);padding:var(--bitflow-space-small);overflow-y:auto;display:flex;flex-direction:column;gap:var(--bitflow-space-medium)}@media(max-width:900px){.bitflow-editor{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(240px,1fr) auto}.bitflow-editor-resizer{display:none}.bitflow-editor-sidebar{border-left:0;border-top:1px solid var(--bitflow-color-border);max-height:50vh}}.bitflow-palette{display:flex;flex-wrap:wrap;gap:var(--bitflow-space-xxsmall)}.bitflow-palette-item{font:inherit;font-size:var(--bitflow-font-size-small);padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface);cursor:pointer}.bitflow-palette-item:hover{border-color:var(--bitflow-color-primary)}.bitflow-preview{position:absolute;inset:0;background:var(--bitflow-color-background);overflow-y:auto;z-index:5}.bitflow-editor .react-flow__node{border-radius:var(--bitflow-radius-standard);font-family:var(--bitflow-font-family);font-size:var(--bitflow-font-size-standard)}.bitflow-editor .react-flow__node.selected{box-shadow:var(--bitflow-shadow-outline)}.bitflow-editor .react-flow__handle{width:12px;height:12px;background-color:var(--bitflow-color-neutral-100);border:2px solid var(--bitflow-color-neutral-900);border-radius:var(--bitflow-radius-small)}.bitflow-editor .react-flow__handle-left{left:-10px}.bitflow-editor .react-flow__handle-right{right:-10px}.bitflow-editor .react-flow__edge-path,.bitflow-editor .react-flow__connection-path{stroke-width:4}.bitflow-editor .react-flow__edge.selected .react-flow__edge-path{stroke:var(--bitflow-color-neutral-900)}.bitflow-editor .react-flow__edge-text{font-size:var(--bitflow-font-size-large);font-weight:var(--bitflow-font-weight-bold);stroke:#fff;stroke-width:1.2}.bitflow-editor .react-flow__edge-textbg{fill:transparent}.bitflow-editor .react-flow__minimap{border:2px solid var(--bitflow-color-neutral-400);border-radius:var(--bitflow-radius-small);box-shadow:var(--bitflow-shadow-standard)}.bitflow-node{min-width:160px;max-width:240px;padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface);box-shadow:var(--bitflow-shadow-standard)}.bitflow-node-start{border-color:var(--bitflow-color-primary)}.bitflow-node-end{border-color:var(--bitflow-color-neutral-900)}.bitflow-node-invalid{border-color:var(--bitflow-color-wrong)}.bitflow-node-kind{font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text-muted)}.bitflow-node-title{font-weight:var(--bitflow-font-weight-medium);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bitflow-inspector-preview{border:1px dashed var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);padding:var(--bitflow-space-small);background:var(--bitflow-color-neutral-100)}.bitflow-problems{margin:0;padding-left:var(--bitflow-space-small);display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall)}.bitflow-problem-link{padding:0;font:inherit;color:inherit;text-align:left;background:none;border:0;text-decoration:underline;cursor:pointer}.bitflow-rules{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--bitflow-space-xsmall);counter-reset:bitflow-rule}.bitflow-rule{border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);padding:var(--bitflow-space-xsmall);background:var(--bitflow-color-neutral-100);display:flex;flex-direction:column;gap:var(--bitflow-space-xsmall)}.bitflow-condition-advanced{font-family:var(--bitflow-font-family-mono);font-size:var(--bitflow-font-size-small);background:var(--bitflow-color-neutral-100);border-radius:var(--bitflow-radius-small);padding:var(--bitflow-space-xsmall);overflow-x:auto}', fo = (t) => {
3251
+ vo("bitflow-styles-base", qi);
3252
+ const Ll = 'bitflow-flow{display:flex;flex-direction:column}bitflow-flow>.bitflow-shell{flex:1 1 auto;min-height:0}.bitflow-shell{display:flex;flex-direction:column;min-height:100%;max-height:100%;overflow-y:auto;background:var(--bitflow-color-background)}.bitflow-shell-content{display:flex;flex-direction:column;gap:var(--bitflow-space-medium);padding:var(--bitflow-space-medium) var(--bitflow-space-small);flex:1 1 auto;min-height:0;overflow-y:auto}.bitflow-shell-content>*{flex-shrink:0}.bitflow-shell-controls{flex:none;display:flex;justify-content:space-between;align-items:center;gap:var(--bitflow-space-small);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);padding-inline-end:calc(var(--bitflow-space-small) + var(--bitflow-controls-inset-end, 0px));border-top:1px solid var(--bitflow-color-neutral-400)}.bitflow-hold-reason{margin:0;padding-inline:var(--bitflow-space-small);font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text-muted);min-height:1.5em}.bitflow-progress{width:100%}.bitflow-root .bitflow-shell-content:focus{outline:none;box-shadow:none}@media print{.bitflow-shell,.bitflow-shell-content{max-height:none;overflow:visible}.bitflow-shell-controls,.bitflow-progress{display:none}}.bitflow-section-label{margin:0;padding:var(--bitflow-space-xsmall) var(--bitflow-space-small) 0;font-size:var(--bitflow-font-size-small);font-weight:var(--bitflow-font-weight-medium);color:var(--bitflow-color-text-muted)}.bitflow-section-stimulus{padding:var(--bitflow-space-small);border-inline-start:var(--bitflow-border-width) solid var(--bitflow-color-primary-light);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface);max-height:var(--bitflow-stimulus-max-height, 40vh);overflow-y:auto}.bitflow-steps{display:flex;flex-direction:column;gap:var(--bitflow-space-xsmall);border-top:1px solid var(--bitflow-color-border);padding-top:var(--bitflow-space-small)}.bitflow-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:var(--bitflow-space-xxsmall)}.bitflow-step{min-width:44px;min-height:44px;padding:var(--bitflow-space-xxsmall);font:inherit;font-variant-numeric:tabular-nums;color:var(--bitflow-color-text);background:var(--bitflow-color-surface);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);cursor:pointer}.bitflow-step:hover:not(:disabled){border-color:var(--bitflow-color-primary)}.bitflow-step-answered{background:var(--bitflow-color-correct-surface);border-color:var(--bitflow-color-primary-light)}.bitflow-step-outstanding{border-style:dashed;border-color:var(--bitflow-color-neutral-400)}.bitflow-step-current{border-color:var(--bitflow-color-primary);font-weight:var(--bitflow-font-weight-bold);opacity:1;cursor:default}.bitflow-shell-steps{padding-inline:var(--bitflow-space-small);padding-bottom:var(--bitflow-space-small)}.bitflow-countdown{display:flex;justify-content:flex-end;gap:var(--bitflow-space-xxsmall);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small) 0;font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text-muted)}.bitflow-countdown-value{font-variant-numeric:tabular-nums;font-weight:var(--bitflow-font-weight-medium)}.bitflow-countdown-urgent{color:var(--bitflow-color-wrong)}.bitflow-progress-bar{appearance:none;display:block;width:100%;height:5px;border:0;background:var(--bitflow-color-neutral-200);color:var(--bitflow-color-primary)}.bitflow-progress-bar::-webkit-progress-bar{background:var(--bitflow-color-neutral-200)}.bitflow-progress-bar::-webkit-progress-value{background:var(--bitflow-color-primary);transition:width var(--bitflow-duration-standard) ease-out}.bitflow-progress-bar::-moz-progress-bar{background:var(--bitflow-color-primary)}.bitflow-confidence{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--bitflow-space-xsmall)}.bitflow-confidence-levels{display:flex;gap:var(--bitflow-space-xsmall)}.bitflow-confidence-level{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:var(--bitflow-radius-full);border:var(--bitflow-border-width) solid var(--bitflow-color-border);background:var(--bitflow-color-surface);cursor:pointer;font-weight:var(--bitflow-font-weight-medium)}.bitflow-confidence-level:has(:checked){border-color:var(--bitflow-color-primary);background:var(--bitflow-color-primary-light)}.bitflow-confidence-level:has(:focus-visible){box-shadow:var(--bitflow-shadow-outline)}.bitflow-editor{display:grid;grid-template-columns:minmax(0,1fr) auto var(--bitflow-inspector-width, 400px);grid-template-rows:auto minmax(0,1fr);height:100%;min-height:420px;background:var(--bitflow-color-background)}.bitflow-editor-previewing{grid-template-columns:minmax(0,1fr)}.bitflow-editor-resizer{width:9px;margin-inline:-4px;cursor:col-resize;background:none;border:0;touch-action:none;z-index:1}.bitflow-editor-resizer:before{display:block;width:1px;height:100%;margin-inline:auto;content:"";background:var(--bitflow-color-border)}.bitflow-editor-resizer:hover:before,.bitflow-editor-resizer:focus-visible:before{width:3px;background:var(--bitflow-color-primary)}.bitflow-editor-toolbar{grid-column:1 / -1;display:flex;align-items:center;gap:var(--bitflow-space-xsmall);padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);border-bottom:1px solid var(--bitflow-color-border);background:var(--bitflow-color-surface);flex-wrap:wrap}.bitflow-editor-canvas{min-width:0;min-height:0;position:relative}.bitflow-editor-sidebar{background:var(--bitflow-color-surface);padding:var(--bitflow-space-small);overflow-y:auto;display:flex;flex-direction:column;gap:var(--bitflow-space-medium)}@media(max-width:900px){.bitflow-editor{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(240px,1fr) auto}.bitflow-editor-resizer{display:none}.bitflow-editor-sidebar{border-left:0;border-top:1px solid var(--bitflow-color-border);max-height:50vh}}.bitflow-palette{display:flex;flex-wrap:wrap;gap:var(--bitflow-space-xxsmall)}.bitflow-palette-item{font:inherit;font-size:var(--bitflow-font-size-small);padding:var(--bitflow-space-xxsmall) var(--bitflow-space-xsmall);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface);cursor:pointer}.bitflow-palette-item:hover{border-color:var(--bitflow-color-primary)}.bitflow-preview{position:absolute;inset:0;background:var(--bitflow-color-background);overflow-y:auto;z-index:5}.bitflow-editor .react-flow__node{border-radius:var(--bitflow-radius-standard);font-family:var(--bitflow-font-family);font-size:var(--bitflow-font-size-standard)}.bitflow-editor .react-flow__node.selected{box-shadow:var(--bitflow-shadow-outline)}.bitflow-editor .react-flow__handle{width:12px;height:12px;background-color:var(--bitflow-color-neutral-100);border:2px solid var(--bitflow-color-neutral-900);border-radius:var(--bitflow-radius-small)}.bitflow-editor .react-flow__handle-left{left:-10px}.bitflow-editor .react-flow__handle-right{right:-10px}.bitflow-editor .react-flow__edge-path,.bitflow-editor .react-flow__connection-path{stroke-width:4}.bitflow-editor .react-flow__edge.selected .react-flow__edge-path{stroke:var(--bitflow-color-neutral-900)}.bitflow-editor .react-flow__edge-text{font-size:var(--bitflow-font-size-large);font-weight:var(--bitflow-font-weight-bold);stroke:#fff;stroke-width:1.2}.bitflow-editor .react-flow__edge-textbg{fill:transparent}.bitflow-editor .react-flow__minimap{border:2px solid var(--bitflow-color-neutral-400);border-radius:var(--bitflow-radius-small);box-shadow:var(--bitflow-shadow-standard)}.bitflow-node{min-width:160px;max-width:240px;padding:var(--bitflow-space-xsmall) var(--bitflow-space-small);border:var(--bitflow-border-width) solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);background:var(--bitflow-color-surface);box-shadow:var(--bitflow-shadow-standard)}.bitflow-node-start{border-color:var(--bitflow-color-primary)}.bitflow-node-end{border-color:var(--bitflow-color-neutral-900)}.bitflow-node-invalid{border-color:var(--bitflow-color-wrong)}.bitflow-node-kind{font-size:var(--bitflow-font-size-small);color:var(--bitflow-color-text-muted)}.bitflow-node-title{font-weight:var(--bitflow-font-weight-medium);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bitflow-inspector-preview{border:1px dashed var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);padding:var(--bitflow-space-small);background:var(--bitflow-color-neutral-100)}.bitflow-problems{margin:0;padding-left:var(--bitflow-space-small);display:flex;flex-direction:column;gap:var(--bitflow-space-xxsmall)}.bitflow-problem-link{padding:0;font:inherit;color:inherit;text-align:left;background:none;border:0;text-decoration:underline;cursor:pointer}.bitflow-rules{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--bitflow-space-xsmall);counter-reset:bitflow-rule}.bitflow-rule{border:1px solid var(--bitflow-color-border);border-radius:var(--bitflow-radius-standard);padding:var(--bitflow-space-xsmall);background:var(--bitflow-color-neutral-100);display:flex;flex-direction:column;gap:var(--bitflow-space-xsmall)}.bitflow-condition-advanced{font-family:var(--bitflow-font-family-mono);font-size:var(--bitflow-font-size-small);background:var(--bitflow-color-neutral-100);border-radius:var(--bitflow-radius-small);padding:var(--bitflow-space-xsmall);overflow-x:auto}', go = (t) => {
3188
3253
  let e;
3189
3254
  const r = /* @__PURE__ */ new Set(), o = (s, u) => {
3190
3255
  const p = typeof s == "function" ? s(e) : s;
3191
3256
  if (!Object.is(p, e)) {
3192
- const m = e;
3193
- e = u ?? (typeof p != "object" || p === null) ? p : Object.assign({}, e, p), r.forEach((f) => f(e, m));
3257
+ const b = e;
3258
+ e = u ?? (typeof p != "object" || p === null) ? p : Object.assign({}, e, p), r.forEach((f) => f(e, b));
3194
3259
  }
3195
- }, n = () => e, i = { setState: o, getState: n, getInitialState: () => l, subscribe: (s) => (r.add(s), () => r.delete(s)) }, l = e = t(o, n, i);
3196
- return i;
3197
- }, qa = ((t) => t ? fo(t) : fo), Ua = (t) => t;
3198
- function Wa(t, e = Ua) {
3260
+ }, i = () => e, n = { setState: o, getState: i, getInitialState: () => l, subscribe: (s) => (r.add(s), () => r.delete(s)) }, l = e = t(o, i, n);
3261
+ return n;
3262
+ }, rl = ((t) => t ? go(t) : go), ol = (t) => t;
3263
+ function il(t, e = ol) {
3199
3264
  const r = Ge.useSyncExternalStore(
3200
3265
  t.subscribe,
3201
3266
  Ge.useCallback(() => e(t.getState()), [t, e]),
@@ -3203,16 +3268,16 @@ function Wa(t, e = Ua) {
3203
3268
  );
3204
3269
  return Ge.useDebugValue(r), r;
3205
3270
  }
3206
- const ho = (t) => {
3271
+ const wo = (t) => {
3207
3272
  for (const e of ["title", "instruction", "text", "markdown", "prompt", "name"]) {
3208
3273
  const r = t[e];
3209
3274
  if (typeof r == "string" && r.trim())
3210
- return mo(r);
3275
+ return ko(r);
3211
3276
  }
3212
3277
  for (const e of Object.values(t))
3213
- if (typeof e == "string" && e.trim()) return mo(e);
3278
+ if (typeof e == "string" && e.trim()) return ko(e);
3214
3279
  return "";
3215
- }, mo = (t) => {
3280
+ }, ko = (t) => {
3216
3281
  const e = t.trim().split(`
3217
3282
  `)[0];
3218
3283
  return e.length > 60 ? `${e.slice(0, 57)}…` : e;
@@ -3433,23 +3498,23 @@ const ho = (t) => {
3433
3498
  stepNotAnswered: "Henüz yanıtlanmadı",
3434
3499
  waitingForHost: "Öğretmenin bir sonraki adımı açmasını bekliyorsun."
3435
3500
  }
3436
- }, bo = ({
3501
+ }, xo = ({
3437
3502
  remaining: t,
3438
3503
  label: e,
3439
3504
  locale: r,
3440
3505
  onExpire: o
3441
3506
  }) => {
3442
- const [n, i] = S.useState(() => t()), l = S.useRef(!1), s = S.useRef(o);
3443
- s.current = o, S.useEffect(() => {
3444
- const m = () => {
3445
- const b = t();
3446
- i(b), b <= 0 && !l.current && (l.current = !0, s.current());
3507
+ const [i, n] = y.useState(() => t()), l = y.useRef(!1), s = y.useRef(o);
3508
+ s.current = o, y.useEffect(() => {
3509
+ const b = () => {
3510
+ const m = t();
3511
+ n(m), m <= 0 && !l.current && (l.current = !0, s.current());
3447
3512
  };
3448
- m();
3449
- const f = setInterval(m, 1e3);
3513
+ b();
3514
+ const f = setInterval(b, 1e3);
3450
3515
  return () => clearInterval(f);
3451
3516
  }, [t]);
3452
- const u = Math.max(0, Math.ceil(n / 1e3)), p = u <= 30;
3517
+ const u = Math.max(0, Math.ceil(i / 1e3)), p = u <= 30;
3453
3518
  return /* @__PURE__ */ c.jsxs(
3454
3519
  "div",
3455
3520
  {
@@ -3463,20 +3528,20 @@ const ho = (t) => {
3463
3528
  className: "bitflow-countdown-value",
3464
3529
  role: p ? "status" : void 0,
3465
3530
  "aria-live": p ? "polite" : "off",
3466
- children: Or(u * 1e3)
3531
+ children: Fr(u * 1e3)
3467
3532
  }
3468
3533
  ),
3469
3534
  /* @__PURE__ */ c.jsx("span", { className: "bitflow-visually-hidden", children: F(pe, "timeLeft", r, {
3470
- duration: Or(u * 1e3)
3535
+ duration: Fr(u * 1e3)
3471
3536
  }) })
3472
3537
  ]
3473
3538
  }
3474
3539
  );
3475
- }, Ga = (t = {}) => qa((e, r) => {
3476
- const o = (i) => {
3477
- e({ error: i }), t.onError?.(i);
3478
- }, n = (i, l) => {
3479
- e(l ? { attempt: i, draft: l.value } : { attempt: i }), t.onStateChange?.(i), i.status === "completed" && t.onComplete?.(i);
3540
+ }, nl = (t = {}) => rl((e, r) => {
3541
+ const o = (n) => {
3542
+ e({ error: n }), t.onError?.(n);
3543
+ }, i = (n, l) => {
3544
+ e(l ? { attempt: n, draft: l.value } : { attempt: n }), t.onStateChange?.(n), n.status === "completed" && t.onComplete?.(n);
3480
3545
  };
3481
3546
  return {
3482
3547
  doc: null,
@@ -3484,13 +3549,13 @@ const ho = (t) => {
3484
3549
  draft: void 0,
3485
3550
  busy: !1,
3486
3551
  error: null,
3487
- loadFlow: (i) => {
3488
- const l = In(i);
3552
+ loadFlow: (n) => {
3553
+ const l = Bi(n);
3489
3554
  if (!l.ok) {
3490
3555
  o(l.error);
3491
3556
  return;
3492
3557
  }
3493
- const s = Hr(l.value);
3558
+ const s = Br(l.value);
3494
3559
  if (!s.ok) {
3495
3560
  o(s.error);
3496
3561
  return;
@@ -3502,7 +3567,7 @@ const ho = (t) => {
3502
3567
  error: null
3503
3568
  });
3504
3569
  },
3505
- loadAttempt: (i) => {
3570
+ loadAttempt: (n) => {
3506
3571
  const { doc: l } = r();
3507
3572
  if (!l) {
3508
3573
  o({
@@ -3511,7 +3576,7 @@ const ho = (t) => {
3511
3576
  });
3512
3577
  return;
3513
3578
  }
3514
- const s = _n(l, i);
3579
+ const s = Fi(l, n);
3515
3580
  if (!s.ok) {
3516
3581
  o(s.error);
3517
3582
  return;
@@ -3524,13 +3589,13 @@ const ho = (t) => {
3524
3589
  },
3525
3590
  // Presentation-only until it is committed, so this deliberately does not
3526
3591
  // publish a state change.
3527
- setDraft: (i) => e({ draft: i }),
3592
+ setDraft: (n) => e({ draft: n }),
3528
3593
  check: async () => {
3529
- const { doc: i, attempt: l, draft: s, busy: u } = r();
3530
- if (!i || !l || u) return;
3594
+ const { doc: n, attempt: l, draft: s, busy: u } = r();
3595
+ if (!n || !l || u) return;
3531
3596
  e({ busy: !0 });
3532
- const p = await jn(
3533
- i,
3597
+ const p = await Hi(
3598
+ n,
3534
3599
  l,
3535
3600
  l.currentNodeId,
3536
3601
  s
@@ -3539,81 +3604,81 @@ const ho = (t) => {
3539
3604
  o(p.error);
3540
3605
  return;
3541
3606
  }
3542
- n(p.value);
3607
+ i(p.value);
3543
3608
  },
3544
3609
  retry: () => {
3545
- const { attempt: i } = r();
3546
- i && n(Cn(i, i.currentNodeId));
3610
+ const { attempt: n } = r();
3611
+ n && i(Oi(n, n.currentNodeId));
3547
3612
  },
3548
3613
  skip: () => {
3549
- const { attempt: i } = r();
3550
- i && n(zn(i, i.currentNodeId));
3614
+ const { attempt: n } = r();
3615
+ n && i(Pi(n, n.currentNodeId));
3551
3616
  },
3552
3617
  next: () => {
3553
- const { doc: i, attempt: l, draft: s } = r();
3554
- if (!i || !l) return;
3555
- const u = s === void 0 ? l : qt(l, l.currentNodeId, s), p = En(i, u);
3556
- n(p, { value: p.answers[p.currentNodeId] });
3618
+ const { doc: n, attempt: l, draft: s } = r();
3619
+ if (!n || !l) return;
3620
+ const u = s === void 0 ? l : Ut(l, l.currentNodeId, s), p = Di(n, u);
3621
+ i(p, { value: p.answers[p.currentNodeId] });
3557
3622
  },
3558
3623
  previous: () => {
3559
- const { doc: i, attempt: l, draft: s } = r();
3560
- if (!i || !l) return;
3561
- const u = s === void 0 ? l : qt(l, l.currentNodeId, s), p = Rn(i, u);
3562
- n(p, { value: p.answers[p.currentNodeId] });
3624
+ const { doc: n, attempt: l, draft: s } = r();
3625
+ if (!n || !l) return;
3626
+ const u = s === void 0 ? l : Ut(l, l.currentNodeId, s), p = $i(n, u);
3627
+ i(p, { value: p.answers[p.currentNodeId] });
3563
3628
  },
3564
- goTo: (i) => {
3629
+ goTo: (n) => {
3565
3630
  const { doc: l, attempt: s, draft: u } = r();
3566
3631
  if (!l || !s) return;
3567
- const p = u === void 0 ? s : qt(s, s.currentNodeId, u), m = Ln(l, p, i);
3568
- n(m, { value: m.answers[m.currentNodeId] });
3632
+ const p = u === void 0 ? s : Ut(s, s.currentNodeId, u), b = Ii(l, p, n);
3633
+ i(b, { value: b.answers[b.currentNodeId] });
3569
3634
  },
3570
- setConfidence: (i) => {
3635
+ setConfidence: (n) => {
3571
3636
  const { attempt: l } = r();
3572
- l && n(Nn(l, l.currentNodeId, i));
3637
+ l && i(_i(l, l.currentNodeId, n));
3573
3638
  },
3574
- setReasoning: (i) => {
3639
+ setReasoning: (n) => {
3575
3640
  const { attempt: l } = r();
3576
- l && n(Tn(l, l.currentNodeId, i));
3641
+ l && i(ji(l, l.currentNodeId, n));
3577
3642
  },
3578
3643
  reset: () => {
3579
- const { doc: i } = r();
3580
- if (!i) return;
3581
- const l = Hr(i);
3644
+ const { doc: n } = r();
3645
+ if (!n) return;
3646
+ const l = Br(n);
3582
3647
  if (!l.ok) {
3583
3648
  o(l.error);
3584
3649
  return;
3585
3650
  }
3586
- n(l.value, { value: void 0 });
3651
+ i(l.value, { value: void 0 });
3587
3652
  },
3588
3653
  finish: () => {
3589
- const { attempt: i } = r();
3590
- if (!i || i.status !== "inProgress") return;
3654
+ const { attempt: n } = r();
3655
+ if (!n || n.status !== "inProgress") return;
3591
3656
  const l = /* @__PURE__ */ new Date();
3592
- n({
3593
- ...i,
3657
+ i({
3658
+ ...n,
3594
3659
  status: "completed",
3595
3660
  completedAt: l.toISOString(),
3596
3661
  updatedAt: l.toISOString()
3597
3662
  });
3598
3663
  },
3599
3664
  save: () => {
3600
- const { attempt: i } = r();
3601
- return i && t.onSave?.(i), i;
3665
+ const { attempt: n } = r();
3666
+ return n && t.onSave?.(n), n;
3602
3667
  },
3603
3668
  currentNode: () => {
3604
- const { doc: i, attempt: l } = r();
3605
- return !i || !l ? null : go(i, l.currentNodeId) ?? null;
3669
+ const { doc: n, attempt: l } = r();
3670
+ return !n || !l ? null : yo(n, l.currentNodeId) ?? null;
3606
3671
  },
3607
3672
  canGoBack: () => {
3608
- const { doc: i, attempt: l } = r();
3609
- return !!(i && l && An(i, l));
3673
+ const { doc: n, attempt: l } = r();
3674
+ return !!(n && l && Ci(n, l));
3610
3675
  },
3611
- canJumpTo: (i) => {
3676
+ canJumpTo: (n) => {
3612
3677
  const { doc: l, attempt: s } = r();
3613
- return !!(l && s && Sn(l, s, i));
3678
+ return !!(l && s && zi(l, s, n));
3614
3679
  }
3615
3680
  };
3616
- }), Ya = (t) => !!(t && ot(t.type)?.kind === "task"), Va = ({
3681
+ }), al = (t) => !!(t && it(t.type)?.kind === "task"), ll = ({
3617
3682
  visited: t,
3618
3683
  total: e,
3619
3684
  locale: r
@@ -3631,20 +3696,20 @@ const ho = (t) => {
3631
3696
  visited: t,
3632
3697
  total: Math.max(e, t)
3633
3698
  }) })
3634
- ] }), Kt = [1, 2, 3, 4, 5], Qa = ({
3699
+ ] }), Jt = [1, 2, 3, 4, 5], sl = ({
3635
3700
  value: t,
3636
3701
  locale: e,
3637
3702
  disabled: r,
3638
3703
  onChange: o
3639
3704
  }) => /* @__PURE__ */ c.jsxs("fieldset", { className: "bitflow-confidence", children: [
3640
3705
  /* @__PURE__ */ c.jsx("legend", { className: "bitflow-label", children: F(pe, "confidenceLegend", e) }),
3641
- /* @__PURE__ */ c.jsx("div", { className: "bitflow-confidence-levels", children: Kt.map((n) => {
3642
- const i = F(pe, `confidence${n}`, e);
3706
+ /* @__PURE__ */ c.jsx("div", { className: "bitflow-confidence-levels", children: Jt.map((i) => {
3707
+ const n = F(pe, `confidence${i}`, e);
3643
3708
  return /* @__PURE__ */ c.jsxs(
3644
3709
  "label",
3645
3710
  {
3646
- className: `bitflow-confidence-level bitflow-confidence-level-${n}`,
3647
- title: i,
3711
+ className: `bitflow-confidence-level bitflow-confidence-level-${i}`,
3712
+ title: n,
3648
3713
  children: [
3649
3714
  /* @__PURE__ */ c.jsx(
3650
3715
  "input",
@@ -3652,19 +3717,19 @@ const ho = (t) => {
3652
3717
  type: "radio",
3653
3718
  name: "bitflow-confidence",
3654
3719
  className: "bitflow-visually-hidden",
3655
- checked: t === n / Kt.length,
3720
+ checked: t === i / Jt.length,
3656
3721
  disabled: r,
3657
- onChange: () => o(n / Kt.length)
3722
+ onChange: () => o(i / Jt.length)
3658
3723
  }
3659
3724
  ),
3660
- /* @__PURE__ */ c.jsx("span", { "aria-hidden": "true", children: n }),
3661
- /* @__PURE__ */ c.jsx("span", { className: "bitflow-visually-hidden", children: i })
3725
+ /* @__PURE__ */ c.jsx("span", { "aria-hidden": "true", children: i }),
3726
+ /* @__PURE__ */ c.jsx("span", { className: "bitflow-visually-hidden", children: n })
3662
3727
  ]
3663
3728
  },
3664
- n
3729
+ i
3665
3730
  );
3666
3731
  }) })
3667
- ] }), Za = ({
3732
+ ] }), cl = ({
3668
3733
  value: t,
3669
3734
  locale: e,
3670
3735
  disabled: r,
@@ -3680,53 +3745,53 @@ const ho = (t) => {
3680
3745
  rows: 3,
3681
3746
  value: t ?? "",
3682
3747
  disabled: r,
3683
- onChange: (n) => o(n.target.value)
3748
+ onChange: (i) => o(i.target.value)
3684
3749
  }
3685
3750
  )
3686
- ] }), Xa = ({
3751
+ ] }), ul = ({
3687
3752
  steps: t,
3688
3753
  locale: e,
3689
3754
  onGoTo: r
3690
3755
  }) => {
3691
- const o = (n) => F(pe, n, e);
3756
+ const o = (i) => F(pe, i, e);
3692
3757
  return /* @__PURE__ */ c.jsxs("nav", { className: "bitflow-steps", "aria-label": o("stepsLabel"), children: [
3693
3758
  /* @__PURE__ */ c.jsx("p", { className: "bitflow-hint", children: o("stepsHint") }),
3694
- /* @__PURE__ */ c.jsx("ol", { className: "bitflow-steps-list", children: t.map((n) => {
3695
- const i = n.current ? o("stepHere") : n.outstanding ? o("stepNotAnswered") : n.answered ? o("stepAnswered") : "";
3759
+ /* @__PURE__ */ c.jsx("ol", { className: "bitflow-steps-list", children: t.map((i) => {
3760
+ const n = i.current ? o("stepHere") : i.outstanding ? o("stepNotAnswered") : i.answered ? o("stepAnswered") : "";
3696
3761
  return /* @__PURE__ */ c.jsx("li", { children: /* @__PURE__ */ c.jsxs(
3697
3762
  "button",
3698
3763
  {
3699
3764
  type: "button",
3700
3765
  className: [
3701
3766
  "bitflow-step",
3702
- n.current ? "bitflow-step-current" : "",
3703
- n.outstanding ? "bitflow-step-outstanding" : "",
3704
- n.answered ? "bitflow-step-answered" : ""
3767
+ i.current ? "bitflow-step-current" : "",
3768
+ i.outstanding ? "bitflow-step-outstanding" : "",
3769
+ i.answered ? "bitflow-step-answered" : ""
3705
3770
  ].filter(Boolean).join(" "),
3706
- "aria-current": n.current ? "step" : void 0,
3707
- disabled: n.current,
3708
- onClick: () => r(n.nodeId),
3771
+ "aria-current": i.current ? "step" : void 0,
3772
+ disabled: i.current,
3773
+ onClick: () => r(i.nodeId),
3709
3774
  children: [
3710
- /* @__PURE__ */ c.jsx("span", { "aria-hidden": "true", children: n.position }),
3711
- /* @__PURE__ */ c.jsx("span", { className: "bitflow-visually-hidden", children: [String(n.position), n.title, i].filter(Boolean).join(". ") })
3775
+ /* @__PURE__ */ c.jsx("span", { "aria-hidden": "true", children: i.position }),
3776
+ /* @__PURE__ */ c.jsx("span", { className: "bitflow-visually-hidden", children: [String(i.position), i.title, n].filter(Boolean).join(". ") })
3712
3777
  ]
3713
3778
  }
3714
- ) }, n.nodeId);
3779
+ ) }, i.nodeId);
3715
3780
  }) })
3716
3781
  ] });
3717
- }, nr = ({
3782
+ }, ar = ({
3718
3783
  progress: t,
3719
3784
  children: e,
3720
3785
  controls: r,
3721
3786
  steps: o,
3722
- contentRef: n,
3723
- announcement: i
3787
+ contentRef: i,
3788
+ announcement: n
3724
3789
  }) => /* @__PURE__ */ c.jsxs("div", { className: "bitflow-root bitflow-shell", children: [
3725
3790
  t,
3726
3791
  /* @__PURE__ */ c.jsx(
3727
3792
  "div",
3728
3793
  {
3729
- ref: n,
3794
+ ref: i,
3730
3795
  tabIndex: -1,
3731
3796
  className: "bitflow-shell-content bitflow-content",
3732
3797
  children: e
@@ -3734,95 +3799,95 @@ const ho = (t) => {
3734
3799
  ),
3735
3800
  r && /* @__PURE__ */ c.jsx("div", { className: "bitflow-shell-controls bitflow-content", children: r }),
3736
3801
  o && /* @__PURE__ */ c.jsx("div", { className: "bitflow-shell-steps bitflow-content", children: o }),
3737
- /* @__PURE__ */ c.jsx("div", { className: "bitflow-visually-hidden", role: "status", children: i })
3738
- ] }), ml = ({
3802
+ /* @__PURE__ */ c.jsx("div", { className: "bitflow-visually-hidden", role: "status", children: n })
3803
+ ] }), Rl = ({
3739
3804
  flow: t,
3740
3805
  attempt: e,
3741
3806
  locale: r,
3742
3807
  readonly: o,
3743
- lockedNodeIds: n,
3744
- onStateChange: i,
3808
+ lockedNodeIds: i,
3809
+ onStateChange: n,
3745
3810
  onSave: l,
3746
3811
  onComplete: s,
3747
3812
  onError: u,
3748
3813
  ref: p
3749
3814
  }) => {
3750
- const m = S.useRef({ onStateChange: i, onSave: l, onComplete: s, onError: u });
3751
- m.current = { onStateChange: i, onSave: l, onComplete: s, onError: u };
3752
- const f = S.useMemo(
3753
- () => Ga({
3754
- onStateChange: (w) => m.current.onStateChange?.(w),
3755
- onSave: (w) => m.current.onSave?.(w),
3756
- onComplete: (w) => m.current.onComplete?.(w),
3757
- onError: (w) => m.current.onError?.(w)
3815
+ const b = y.useRef({ onStateChange: n, onSave: l, onComplete: s, onError: u });
3816
+ b.current = { onStateChange: n, onSave: l, onComplete: s, onError: u };
3817
+ const f = y.useMemo(
3818
+ () => nl({
3819
+ onStateChange: (w) => b.current.onStateChange?.(w),
3820
+ onSave: (w) => b.current.onSave?.(w),
3821
+ onComplete: (w) => b.current.onComplete?.(w),
3822
+ onError: (w) => b.current.onError?.(w)
3758
3823
  }),
3759
3824
  []
3760
- ), b = Wa(f), x = Nt(r);
3761
- return S.useEffect(() => {
3825
+ ), m = il(f), x = Lt(r);
3826
+ return y.useEffect(() => {
3762
3827
  t !== void 0 && f.getState().loadFlow(t);
3763
- }, [t, f]), S.useEffect(() => {
3828
+ }, [t, f]), y.useEffect(() => {
3764
3829
  e !== void 0 && f.getState().loadAttempt(e);
3765
- }, [e, f]), S.useImperativeHandle(
3830
+ }, [e, f]), y.useImperativeHandle(
3766
3831
  p,
3767
3832
  () => ({
3768
3833
  save: () => f.getState().save(),
3769
3834
  reset: () => f.getState().reset()
3770
3835
  }),
3771
3836
  [f]
3772
- ), !b.doc || !b.attempt ? /* @__PURE__ */ c.jsx(nr, { children: /* @__PURE__ */ c.jsx("p", { className: "bitflow-text-muted", children: F(pe, b.error ? "noFlow" : "loading", x) }) }) : /* @__PURE__ */ c.jsx(
3773
- Ka,
3837
+ ), !m.doc || !m.attempt ? /* @__PURE__ */ c.jsx(ar, { children: /* @__PURE__ */ c.jsx("p", { className: "bitflow-text-muted", children: F(pe, m.error ? "noFlow" : "loading", x) }) }) : /* @__PURE__ */ c.jsx(
3838
+ dl,
3774
3839
  {
3775
- state: b,
3840
+ state: m,
3776
3841
  locale: x,
3777
3842
  readonly: o,
3778
- lockedNodeIds: n,
3779
- doc: b.doc,
3780
- attempt: b.attempt
3843
+ lockedNodeIds: i,
3844
+ doc: m.doc,
3845
+ attempt: m.attempt
3781
3846
  }
3782
3847
  );
3783
- }, Ka = ({
3848
+ }, dl = ({
3784
3849
  state: t,
3785
3850
  doc: e,
3786
3851
  attempt: r,
3787
3852
  locale: o,
3788
- readonly: n,
3789
- lockedNodeIds: i
3853
+ readonly: i,
3854
+ lockedNodeIds: n
3790
3855
  }) => {
3791
- const l = t.currentNode(), s = r.results[r.currentNodeId], u = l ? ot(l.type) : void 0, p = Ya(l), m = s !== void 0, f = hn(e, r), b = n || u?.kind !== "end" && (m || r.status !== "inProgress"), x = S.useCallback(
3792
- (M, me) => F(pe, M, o, me),
3856
+ const l = t.currentNode(), s = r.results[r.currentNodeId], u = l ? it(l.type) : void 0, p = al(l), b = s !== void 0, f = vi(e, r), m = i || u?.kind !== "end" && (b || r.status !== "inProgress"), x = y.useCallback(
3857
+ (M, be) => F(pe, M, o, be),
3793
3858
  [o]
3794
- ), w = S.useCallback(
3859
+ ), w = y.useCallback(
3795
3860
  (M) => F(de, M, o),
3796
3861
  [o]
3797
- ), N = S.useRef(null), _ = S.useRef(null);
3798
- if (S.useEffect(() => {
3862
+ ), N = y.useRef(null), j = y.useRef(null);
3863
+ if (y.useEffect(() => {
3799
3864
  const M = r.currentNodeId;
3800
- if (_.current === M) return;
3801
- const me = _.current === null;
3802
- if (_.current = M, me) return;
3803
- const be = N.current;
3804
- be && (be.scrollTop = 0, be.closest(".bitflow-shell")?.scrollTo?.(0, 0), be.focus());
3865
+ if (j.current === M) return;
3866
+ const be = j.current === null;
3867
+ if (j.current = M, be) return;
3868
+ const me = N.current;
3869
+ me && (me.scrollTop = 0, me.closest(".bitflow-shell")?.scrollTo?.(0, 0), me.focus());
3805
3870
  }, [r.currentNodeId]), !l)
3806
- return /* @__PURE__ */ c.jsx(nr, { children: /* @__PURE__ */ c.jsx("p", { className: "bitflow-text-muted", children: x("noFlow") }) });
3807
- const H = mn(r), X = r.status === "completed", W = e.meta.timeLimit ? e.meta.timeLimit * 1e3 : null, E = bn(go(e, r.currentNodeId)), k = r.status === "inProgress" && !n, v = m && s?.allowRetry === !0 && !n, A = i?.includes(r.currentNodeId) ?? !1, z = !X && (!p || m) && !n, J = gn(l, t.draft), Ae = p && !m && !n && !!u?.evaluate, Te = p && !m && !n && wn(e, l) && !A, Ne = kn(e, l), fe = e.meta.navigation === "free" && !n, lt = fe ? xn(e, r).map((M) => ({
3871
+ return /* @__PURE__ */ c.jsx(ar, { children: /* @__PURE__ */ c.jsx("p", { className: "bitflow-text-muted", children: x("noFlow") }) });
3872
+ const H = yi(r), X = r.status === "completed", W = e.meta.timeLimit ? e.meta.timeLimit * 1e3 : null, E = Si(yo(e, r.currentNodeId)), k = r.status === "inProgress" && !i, v = b && s?.allowRetry === !0 && !i, A = n?.includes(r.currentNodeId) ?? !1, z = !X && (!p || b) && !i, J = Ai(l, t.draft), Ae = p && !b && !i && !!u?.evaluate, Te = p && !b && !i && Ti(e, l) && !A, Ne = Ni(e, l), fe = e.meta.navigation === "free" && !i, st = fe ? Li(e, r).map((M) => ({
3808
3873
  nodeId: M.nodeId,
3809
3874
  position: M.position,
3810
3875
  current: M.current,
3811
3876
  answered: M.answered,
3812
3877
  outstanding: M.outstanding,
3813
- title: ho(M.node.data) || ot(M.node.type)?.info(o).name || M.node.type
3878
+ title: wo(M.node.data) || it(M.node.type)?.info(o).name || M.node.type
3814
3879
  })) : [];
3815
3880
  return /* @__PURE__ */ c.jsxs(
3816
- nr,
3881
+ ar,
3817
3882
  {
3818
3883
  contentRef: N,
3819
3884
  announcement: x("stepAnnouncement", {
3820
3885
  visited: f.visited,
3821
- title: ho(l.data) || u?.info(o).name || ""
3886
+ title: wo(l.data) || u?.info(o).name || ""
3822
3887
  }),
3823
3888
  progress: /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
3824
3889
  /* @__PURE__ */ c.jsx(
3825
- Va,
3890
+ ll,
3826
3891
  {
3827
3892
  visited: f.visited,
3828
3893
  total: Number.isFinite(f.remaining) ? f.visited + f.remaining : f.visited,
@@ -3831,18 +3896,18 @@ const ho = (t) => {
3831
3896
  ),
3832
3897
  Ne?.label && /* @__PURE__ */ c.jsx("p", { className: "bitflow-section-label", children: Ne.label }),
3833
3898
  k && W !== null && /* @__PURE__ */ c.jsx(
3834
- bo,
3899
+ xo,
3835
3900
  {
3836
- remaining: () => W - vn(r),
3901
+ remaining: () => W - Ri(r),
3837
3902
  label: x("timeLeftWhole"),
3838
3903
  locale: o,
3839
3904
  onExpire: t.finish
3840
3905
  }
3841
3906
  ),
3842
- k && E !== null && !m && /* @__PURE__ */ c.jsx(
3843
- bo,
3907
+ k && E !== null && !b && /* @__PURE__ */ c.jsx(
3908
+ xo,
3844
3909
  {
3845
- remaining: () => E - yn(r, r.currentNodeId),
3910
+ remaining: () => E - Ei(r, r.currentNodeId),
3846
3911
  label: x("timeLeftTask"),
3847
3912
  locale: o,
3848
3913
  onExpire: () => {
@@ -3854,7 +3919,7 @@ const ho = (t) => {
3854
3919
  ] }),
3855
3920
  controls: /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
3856
3921
  A && /* @__PURE__ */ c.jsx("p", { className: "bitflow-hold-reason", role: "status", children: x("waitingForHost") }),
3857
- /* @__PURE__ */ c.jsx("div", { className: "bitflow-row", children: t.canGoBack() && !n && /* @__PURE__ */ c.jsx(
3922
+ /* @__PURE__ */ c.jsx("div", { className: "bitflow-row", children: t.canGoBack() && !i && /* @__PURE__ */ c.jsx(
3858
3923
  "button",
3859
3924
  {
3860
3925
  type: "button",
@@ -3915,17 +3980,17 @@ const ho = (t) => {
3915
3980
  )
3916
3981
  ] })
3917
3982
  ] }),
3918
- steps: fe && lt.length > 0 ? /* @__PURE__ */ c.jsx(Xa, { steps: lt, locale: o, onGoTo: t.goTo }) : void 0,
3983
+ steps: fe && st.length > 0 ? /* @__PURE__ */ c.jsx(ul, { steps: st, locale: o, onGoTo: t.goTo }) : void 0,
3919
3984
  children: [
3920
- Ne?.markdown && /* @__PURE__ */ c.jsx("div", { className: "bitflow-section-stimulus", children: /* @__PURE__ */ c.jsx(ja, { markdown: Ne.markdown }) }),
3985
+ Ne?.markdown && /* @__PURE__ */ c.jsx("div", { className: "bitflow-section-stimulus", children: /* @__PURE__ */ c.jsx(Ma, { markdown: Ne.markdown }) }),
3921
3986
  /* @__PURE__ */ c.jsx(
3922
- ko,
3987
+ Ao,
3923
3988
  {
3924
3989
  type: l.type,
3925
3990
  data: l.data,
3926
3991
  answer: t.draft,
3927
3992
  result: s,
3928
- readonly: b,
3993
+ readonly: m,
3929
3994
  locale: o,
3930
3995
  onAnswerChange: t.setDraft,
3931
3996
  attempt: r,
@@ -3933,97 +3998,97 @@ const ho = (t) => {
3933
3998
  }
3934
3999
  ),
3935
4000
  s && /* @__PURE__ */ c.jsx(
3936
- wo,
4001
+ So,
3937
4002
  {
3938
4003
  result: s,
3939
4004
  locale: o,
3940
4005
  tries: r.tries[l.id]
3941
4006
  }
3942
4007
  ),
3943
- p && m && e.meta.askConfidence && /* @__PURE__ */ c.jsx(
3944
- Qa,
4008
+ p && b && e.meta.askConfidence && /* @__PURE__ */ c.jsx(
4009
+ sl,
3945
4010
  {
3946
4011
  value: r.confidence?.[l.id]?.level,
3947
4012
  locale: o,
3948
- disabled: n,
4013
+ disabled: i,
3949
4014
  onChange: (M) => t.setConfidence({ level: M })
3950
4015
  }
3951
4016
  ),
3952
- p && m && e.meta.askReasoning && /* @__PURE__ */ c.jsx(
3953
- Za,
4017
+ p && b && e.meta.askReasoning && /* @__PURE__ */ c.jsx(
4018
+ cl,
3954
4019
  {
3955
4020
  value: r.reasoning?.[l.id],
3956
4021
  locale: o,
3957
- disabled: n,
4022
+ disabled: i,
3958
4023
  onChange: t.setReasoning
3959
4024
  }
3960
4025
  ),
3961
4026
  X && /* @__PURE__ */ c.jsx("div", { className: "bitflow-alert bitflow-alert-success", children: /* @__PURE__ */ c.jsxs("div", { children: [
3962
4027
  /* @__PURE__ */ c.jsx("strong", { children: x("completed") }),
3963
- H.possible > 0 && /* @__PURE__ */ c.jsx("p", { className: "bitflow-text-muted", children: x("score", { earned: Ja(H.earned), possible: H.possible }) })
4028
+ H.possible > 0 && /* @__PURE__ */ c.jsx("p", { className: "bitflow-text-muted", children: x("score", { earned: pl(H.earned), possible: H.possible }) })
3964
4029
  ] }) }),
3965
4030
  t.error && /* @__PURE__ */ c.jsx("div", { className: "bitflow-alert bitflow-alert-error", role: "alert", children: t.error.message })
3966
4031
  ]
3967
4032
  }
3968
4033
  );
3969
- }, Ja = (t) => Math.round(t * 100) / 100, _o = {
3970
- "start-simple": () => import("./index-CW9iev-_.js"),
3971
- "start-consent": () => import("./index-COndsSPW.js"),
3972
- "start-identify": () => import("./index-XxGfBwJe.js"),
3973
- "end-tries": () => import("./index-YPMWh-1B.js"),
3974
- "end-handoff": () => import("./index-DtsDy2By.js"),
3975
- "end-certificate": () => import("./index-Bf_NXJjq.js"),
3976
- "end-download": () => import("./index-B7Z6Q-PQ.js"),
3977
- "title-simple": () => import("./index-BseSaQlX.js"),
3978
- "input-markdown": () => import("./index-kRpwcprB.js"),
3979
- "task-choice": () => import("./index-cnRM_JDB.js"),
3980
- "task-yes-no": () => import("./index-Bf_FQRbK.js"),
3981
- "task-input": () => import("./index-IQHOi2fr.js"),
3982
- "task-numeric": () => import("./index-DjWNEPDL.js"),
3983
- "task-math": () => import("./index-xapm2BQE.js"),
3984
- "task-fill-in-the-blank": () => import("./index-CK1UMcfT.js"),
3985
- "task-highlighting": () => import("./index-CFcRAa3F.js"),
3986
- "task-drag-drop": () => import("./index-eN2S_MLj.js"),
3987
- "task-find-hotspots": () => import("./index-Bqf-kixT.js"),
3988
- "task-ordering": () => import("./index-DoKlIgCD.js"),
3989
- "task-matching": () => import("./index-CzdZQibq.js"),
3990
- "task-parsons": () => import("./index-CvCZVgKv.js"),
3991
- "task-crossword": () => import("./index-BLcJNyog.js"),
3992
- "task-word-search": () => import("./index-D7m-hJZ9.js"),
3993
- "task-mouse-accuracy": () => import("./index-C5czXkRd.js"),
3994
- "task-keyboard-speed": () => import("./index-Fr7yl4Vn.js"),
3995
- "task-code-trace": () => import("./index-NyNuXp4C.js"),
3996
- "task-graph-path": () => import("./index-8jTO-NJA.js"),
3997
- "task-number-representation": () => import("./index-C_ZTSeqv.js"),
3998
- "task-free-text": () => import("./index-ChgzyMHe.js"),
3999
- "task-boolean-logic": () => import("./index-DnVYIuen.js"),
4000
- "task-image-annotation": () => import("./index-D5yZNeIg.js"),
4001
- "task-array-steps": () => import("./index-CjscG0z6.js"),
4002
- "task-binary-tree": () => import("./index-BpG316Ls.js"),
4003
- "task-pixel-grid": () => import("./index-BdBBCZSy.js"),
4004
- "task-table": () => import("./index-BQ5h4nDN.js"),
4005
- "task-point-plot": () => import("./index-ivI25bnR.js"),
4006
- "task-call-stack": () => import("./index-BIJ7VfD2.js"),
4007
- "task-cardinality": () => import("./index-Fq7njn6_.js"),
4008
- "task-number-line": () => import("./index-B3jMTk1o.js"),
4009
- "task-function-plot": () => import("./index-CZyaFdD2.js")
4010
- }, el = Object.keys(_o), tl = async (t) => {
4034
+ }, pl = (t) => Math.round(t * 100) / 100, Mo = {
4035
+ "start-simple": () => import("./index-jijMWQB6.js"),
4036
+ "start-consent": () => import("./index-B9iG-a48.js"),
4037
+ "start-identify": () => import("./index-C8zwSmE6.js"),
4038
+ "end-tries": () => import("./index-BI6aFdIS.js"),
4039
+ "end-handoff": () => import("./index-D1C_1SPY.js"),
4040
+ "end-certificate": () => import("./index-b6qwcTj9.js"),
4041
+ "end-download": () => import("./index-CkO3QfOS.js"),
4042
+ "title-simple": () => import("./index-4JaKZ7WT.js"),
4043
+ "input-markdown": () => import("./index-DgxEzomz.js"),
4044
+ "task-choice": () => import("./index-D9Ox4YpM.js"),
4045
+ "task-yes-no": () => import("./index-BinE5Wvd.js"),
4046
+ "task-input": () => import("./index-CaYn3Gmh.js"),
4047
+ "task-numeric": () => import("./index-DqnGC-DU.js"),
4048
+ "task-math": () => import("./index-Ca1v0pjV.js"),
4049
+ "task-fill-in-the-blank": () => import("./index-CGDt8H6s.js"),
4050
+ "task-highlighting": () => import("./index-BoX5-jkC.js"),
4051
+ "task-drag-drop": () => import("./index-zVkWgm5I.js"),
4052
+ "task-find-hotspots": () => import("./index-DJ1w2Xcm.js"),
4053
+ "task-ordering": () => import("./index-p5AOgOal.js"),
4054
+ "task-matching": () => import("./index-CjH3h0OO.js"),
4055
+ "task-parsons": () => import("./index-q2APknM6.js"),
4056
+ "task-crossword": () => import("./index-C9JSBTNc.js"),
4057
+ "task-word-search": () => import("./index-Bf078mfo.js"),
4058
+ "task-mouse-accuracy": () => import("./index-BFYoOtcY.js"),
4059
+ "task-keyboard-speed": () => import("./index-BxihQ8Oo.js"),
4060
+ "task-code-trace": () => import("./index-BqRsXShM.js"),
4061
+ "task-graph-path": () => import("./index-D0NtgeiX.js"),
4062
+ "task-number-representation": () => import("./index-kxO5_U9Y.js"),
4063
+ "task-free-text": () => import("./index-Deedj9EF.js"),
4064
+ "task-boolean-logic": () => import("./index-Do6dmZyj.js"),
4065
+ "task-image-annotation": () => import("./index-Dl0-ZAT5.js"),
4066
+ "task-array-steps": () => import("./index-CCMI6UK4.js"),
4067
+ "task-binary-tree": () => import("./index-CbQue0If.js"),
4068
+ "task-pixel-grid": () => import("./index-D45u7EVR.js"),
4069
+ "task-table": () => import("./index-DUqW2fmV.js"),
4070
+ "task-point-plot": () => import("./index-DwXXeSwk.js"),
4071
+ "task-call-stack": () => import("./index-Cz4i5rfe.js"),
4072
+ "task-cardinality": () => import("./index-d105UFQI.js"),
4073
+ "task-number-line": () => import("./index-C5YguHZU.js"),
4074
+ "task-function-plot": () => import("./index-Dg6nnY_v.js")
4075
+ }, fl = Object.keys(Mo), hl = async (t) => {
4011
4076
  const e = [], r = [];
4012
4077
  for (const o of new Set(t)) {
4013
- if (Dn(o)) continue;
4014
- const n = _o[o];
4015
- if (!n) {
4078
+ if (Mi(o)) continue;
4079
+ const i = Mo[o];
4080
+ if (!i) {
4016
4081
  e.push(o);
4017
4082
  continue;
4018
4083
  }
4019
4084
  r.push(
4020
- n().catch(() => {
4085
+ i().catch(() => {
4021
4086
  e.push(o);
4022
4087
  })
4023
4088
  );
4024
4089
  }
4025
4090
  return await Promise.all(r), e;
4026
- }, bl = () => tl(el), gl = (t) => {
4091
+ }, El = () => hl(fl), zl = (t) => {
4027
4092
  const e = t?.nodes;
4028
4093
  return Array.isArray(e) ? [
4029
4094
  ...new Set(
@@ -4032,33 +4097,33 @@ const ho = (t) => {
4032
4097
  ] : [];
4033
4098
  };
4034
4099
  export {
4035
- ll as A,
4036
- pl as D,
4037
- cl as E,
4038
- ho as G,
4039
- qa as I,
4040
- el as K,
4041
- ja as L,
4042
- Br as M,
4043
- dl as N,
4044
- hl as O,
4045
- Fr as P,
4046
- ul as R,
4047
- al as S,
4048
- Wa as T,
4049
- sl as _,
4050
- gl as a,
4051
- _o as b,
4052
- tl as c,
4053
- ml as d,
4054
- il as e,
4055
- ko as f,
4056
- fl as g,
4057
- bl as l,
4058
- Bn as m,
4059
- On as p,
4060
- Ia as s,
4061
- nt as t,
4062
- nl as v,
4063
- ol as y
4100
+ kl as $,
4101
+ yl as B,
4102
+ ml as C,
4103
+ qr as F,
4104
+ wo as G,
4105
+ Sl as H,
4106
+ rl as I,
4107
+ fl as K,
4108
+ Mr as M,
4109
+ Ll as O,
4110
+ wl as P,
4111
+ il as T,
4112
+ Ma as U,
4113
+ zl as a,
4114
+ Mo as b,
4115
+ hl as c,
4116
+ Rl as d,
4117
+ gl as e,
4118
+ Vi as f,
4119
+ xl as g,
4120
+ Tl as h,
4121
+ vl as i,
4122
+ Al as j,
4123
+ Wi as k,
4124
+ El as l,
4125
+ Nl as q,
4126
+ nt as r,
4127
+ Ao as x,
4128
+ Ya as y
4064
4129
  };