pediatric-ai-scribe-v3/public/app/assets/Calculators-hFcuewWL.js
Daniel c157c709c8 feat: React auth screen + SPA now serves every route (vanilla retired)
The final big piece of "everything in React + Tailwind". Login,
register, forgot-password, reset-password, and email-verification all
render from the React bundle now. The root path / serves the SPA,
vanilla index.html + public/js/* are no longer served by the server.

BACKEND — src/routes/auth.ts
  New GET /api/auth/public-config (public — no auth required) returns
  { registrationEnabled, turnstileSiteKey, oidcEnabled,
    disableLocalAuth, ssoButtonLabel }.
  Single round-trip the React auth screen needs on mount. Reuses
  existing DB settings; no new tables.

BACKEND — server.ts
  • / and /index.html now send public/app/index.html (React SPA),
    not public/index.html (vanilla).
  • /auth, /reset-password, /verify-email explicitly route to the SPA
    so the email links land on the React router.
  • /app/*splat preserved as an alias so old bookmarks keep working.
  • SPA fallback added after express.static so hard-refresh on
    /encounter / /bedside / /settings etc. serves the React index
    instead of 404ing. API paths and static-file extensions still
    fall through to their existing handlers.
  • The dead app.get('/') duplicate that also pointed at the vanilla
    index is removed.

CLIENT — React auth flow
  client/src/pages/Auth.tsx (new)
    Login / register / forgot sub-forms with a single useQuery on
    ['public-config'] driving Turnstile + SSO button visibility.
    Login flow handles all three vanilla-equivalent responses
    (token / requires2FA / needsVerification). 2FA field reveals
    inline when the server asks for it; resend-verification link
    appears when needsVerification fires. SSO button renders
    whenever oidcEnabled is true, even if local auth is disabled
    (disableLocalAuth hides the login/register/forgot forms
    entirely). HIPAA notice + APK download link preserved.

  client/src/pages/ResetPassword.tsx (new)
    Reads ?token=xxx from the URL, POSTs /api/auth/reset-password.
    Confirm-password match, 8+ char validation, server
    passwordWarning (pwned password) surfaces as an amber info box.
    Redirects to /auth 2.5 s after success.

  client/src/components/Turnstile.tsx (new)
    Loads the challenges.cloudflare.com/turnstile script once,
    renders a widget per form, calls onToken(token) on success and
    onToken('') on error / expiry. If siteKey is null/empty (e2e
    container with TURNSTILE_SITE_KEY="") renders nothing and
    auto-reports empty — matches the vanilla no-key-no-widget
    behaviour.

  client/src/components/AuthGuard.tsx (new)
    useQuery(['auth-me']) with retry: false. On 401/error redirects
    to /auth?next=<current-url> so the deep link survives sign-in.
    Used as a parent route in App.tsx wrapping every private page.

  client/src/components/Layout.tsx
    "← back to legacy app" link replaced with "Sign out" — calls
    POST /api/auth/logout then window.location = /auth.

  client/src/App.tsx
    BrowserRouter no longer has basename (was "/app"). Public
    routes: /auth, /reset-password. Everything else lives under
    <AuthGuard> → <Layout>. Lazy-loaded Auth + ResetPassword join
    the existing heavy-route code-split.

  client/vite.config.ts
    base stays "/app/" so hashed asset URLs resolve to
    /app/assets/... (served unchanged by express.static).

shared/types.ts + client/src/shared/types.ts — additive:
  PublicConfigOk { registrationEnabled, turnstileSiteKey,
    oidcEnabled, disableLocalAuth, ssoButtonLabel }.

Bundle — Auth chunk splits out at 10.87 kB / 3.35 kB gz, lazy-loaded
only on the sign-in path; initial bundle unchanged at 343.97 kB /
106.59 kB gz.

Backend tsc + client tsc + vite build + 136/136 vitest all green.
2026-04-24 02:45:21 +02:00

1 line
No EOL
114 KiB
JavaScript

import{i as e,n as t,t as n}from"./jsx-runtime-ByY1xr43.js";import{a as r,n as i,o as a,r as o,s,t as c}from"./fenton-Dvwmge1q.js";var l=e(t(),1),u={p95:{6:6,12:7.2,18:8.5,24:9.6,30:11.2,36:12.8,42:13.8,48:14.8,54:15.6,60:16.2,66:16.8,72:17.4,84:18,96:18.4,108:18.8,120:19},p75:{6:4.5,12:5.5,18:6.6,24:7.8,30:9.2,36:10.6,42:11.6,48:12.6,54:13.4,60:14,66:14.6,72:15,84:15.4,96:15.6,108:15.8,120:16},p40:{6:3,12:4,18:5,24:6.2,30:7.2,36:8.4,42:9.2,48:10,54:10.6,60:11.2,66:11.8,72:12.2,84:12.6,96:12.8,108:13,120:13.2}},d={12:8.5,13:8.7,14:8.9,15:9,16:9.2,17:9.4,18:9.6,19:9.8,20:9.9,21:10.1,22:10.3,23:10.4,24:10.6,25:10.8,26:10.9,27:11.1,28:11.3,29:11.4,30:11.6,31:11.7,32:11.9,33:12,34:12.2,35:12.3,36:12.5,37:12.6,38:12.8,39:12.9,40:13.1,41:13.2,42:13.4,43:13.5,44:13.6,45:13.8,46:13.9,47:14,48:14.2,49:14.3,50:14.4,51:14.5,52:14.7,53:14.8,54:14.9,55:15,56:15.1,57:15.3,58:15.4,59:15.5,60:15.6,61:15.7,62:15.8,63:15.9,64:16,65:16.1,66:16.2,67:16.3,68:16.4,69:16.5,70:16.6,71:16.7,72:16.8,73:16.9,74:17,75:17.1,76:17.2,77:17.3,78:17.4,79:17.5,80:17.5,81:17.6,82:17.7,83:17.8,84:17.8,85:17.9,86:18,87:18.1,88:18.1,89:18.2,90:18.3,91:18.3,92:18.4,93:18.5,94:18.5,95:18.6,96:18.6},f={12:9,13:9.2,14:9.4,15:9.6,16:9.8,17:9.9,18:10.1,19:10.3,20:10.5,21:10.6,22:10.8,23:11,24:11.2,25:11.3,26:11.5,27:11.7,28:11.8,29:12,30:12.1,31:12.3,32:12.5,33:12.6,34:12.8,35:12.9,36:13.1,37:13.2,38:13.4,39:13.5,40:13.7,41:13.8,42:13.9,43:14.1,44:14.2,45:14.4,46:14.5,47:14.6,48:14.8,49:14.9,50:15,51:15.1,52:15.3,53:15.4,54:15.5,55:15.6,56:15.8,57:15.9,58:16,59:16.1,60:16.2,61:16.3,62:16.5,63:16.6,64:16.7,65:16.8,66:16.9,67:17,68:17.1,69:17.2,70:17.3,71:17.4,72:17.5,73:17.6,74:17.7,75:17.8,76:17.9,77:17.9,78:18,79:18.1,80:18.2,81:18.3,82:18.4,83:18.4,84:18.5,85:18.6,86:18.7,87:18.8,88:18.8,89:18.9,90:19,91:19,92:19.1,93:19.2,94:19.2,95:19.3,96:19.3},p={12:9.6,13:9.8,14:9.9,15:10.1,16:10.3,17:10.5,18:10.7,19:10.8,20:11,21:11.2,22:11.4,23:11.5,24:11.7,25:11.9,26:12.1,27:12.2,28:12.4,29:12.5,30:12.7,31:12.9,32:13,33:13.2,34:13.3,35:13.5,36:13.6,37:13.8,38:13.9,39:14.1,40:14.2,41:14.4,42:14.5,43:14.7,44:14.8,45:15,46:15.1,47:15.2,48:15.4,49:15.5,50:15.6,51:15.8,52:15.9,53:16,54:16.1,55:16.3,56:16.4,57:16.5,58:16.6,59:16.7,60:16.9,61:17,62:17.1,63:17.2,64:17.3,65:17.4,66:17.5,67:17.6,68:17.7,69:17.8,70:17.9,71:18,72:18.1,73:18.2,74:18.3,75:18.4,76:18.5,77:18.6,78:18.7,79:18.8,80:18.9,81:19,82:19,83:19.1,84:19.2,85:19.3,86:19.4,87:19.4,88:19.5,89:19.6,90:19.7,91:19.7,92:19.8,93:19.9,94:19.9,95:20,96:20},m={12:10.1,13:10.3,14:10.5,15:10.7,16:10.8,17:11,18:11.2,19:11.4,20:11.6,21:11.7,22:11.9,23:12.1,24:12.3,25:12.4,26:12.6,27:12.8,28:12.9,29:13.1,30:13.3,31:13.4,32:13.6,33:13.8,34:13.9,35:14.1,36:14.2,37:14.4,38:14.5,39:14.7,40:14.8,41:15,42:15.1,43:15.3,44:15.4,45:15.6,46:15.7,47:15.8,48:16,49:16.1,50:16.2,51:16.4,52:16.5,53:16.6,54:16.8,55:16.9,56:17,57:17.1,58:17.3,59:17.4,60:17.5,61:17.6,62:17.7,63:17.8,64:17.9,65:18.1,66:18.2,67:18.3,68:18.4,69:18.5,70:18.6,71:18.7,72:18.8,73:18.9,74:19,75:19.1,76:19.2,77:19.3,78:19.4,79:19.5,80:19.5,81:19.6,82:19.7,83:19.8,84:19.9,85:20,86:20,87:20.1,88:20.2,89:20.3,90:20.3,91:20.4,92:20.5,93:20.6,94:20.6,95:20.7,96:20.7},h={12:10.6,13:10.8,14:11,15:11.2,16:11.4,17:11.6,18:11.8,19:11.9,20:12.1,21:12.3,22:12.5,23:12.7,24:12.8,25:13,26:13.2,27:13.3,28:13.5,29:13.7,30:13.8,31:14,32:14.2,33:14.3,34:14.5,35:14.7,36:14.8,37:15,38:15.1,39:15.3,40:15.4,41:15.6,42:15.7,43:15.9,44:16,45:16.2,46:16.3,47:16.4,48:16.6,49:16.7,50:16.8,51:17,52:17.1,53:17.2,54:17.4,55:17.5,56:17.6,57:17.8,58:17.9,59:18,60:18.1,61:18.2,62:18.4,63:18.5,64:18.6,65:18.7,66:18.8,67:18.9,68:19,69:19.1,70:19.2,71:19.3,72:19.5,73:19.6,74:19.7,75:19.7,76:19.8,77:19.9,78:20,79:20.1,80:20.2,81:20.3,82:20.4,83:20.5,84:20.6,85:20.6,86:20.7,87:20.8,88:20.9,89:21,90:21,91:21.1,92:21.2,93:21.3,94:21.3,95:21.4,96:21.5},g={12:11.2,13:11.3,14:11.5,15:11.7,16:11.9,17:12.1,18:12.3,19:12.5,20:12.7,21:12.8,22:13,23:13.2,24:13.4,25:13.6,26:13.7,27:13.9,28:14.1,29:14.2,30:14.4,31:14.6,32:14.7,33:14.9,34:15.1,35:15.2,36:15.4,37:15.6,38:15.7,39:15.9,40:16,41:16.2,42:16.3,43:16.5,44:16.6,45:16.8,46:16.9,47:17.1,48:17.2,49:17.4,50:17.5,51:17.6,52:17.8,53:17.9,54:18.1,55:18.2,56:18.3,57:18.5,58:18.6,59:18.7,60:18.9,61:19,62:19.1,63:19.3,64:19.4,65:19.5,66:19.6,67:19.7,68:19.9,69:20,70:20.1,71:20.2,72:20.3,73:20.4,74:20.5,75:20.6,76:20.7,77:20.8,78:20.9,79:21,80:21.1,81:21.2,82:21.3,83:21.4,84:21.5,85:21.5,86:21.6,87:21.7,88:21.8,89:21.9,90:21.9,91:22,92:22.1,93:22.2,94:22.2,95:22.3,96:22.3},_={12:6.9,13:7.1,14:7.2,15:7.4,16:7.6,17:7.7,18:7.9,19:8.1,20:8.2,21:8.4,22:8.6,23:8.7,24:8.9,25:9,26:9.2,27:9.3,28:9.5,29:9.6,30:9.8,31:9.9,32:10.1,33:10.2,34:10.3,35:10.5,36:10.6,37:10.8,38:10.9,39:11,40:11.2,41:11.3,42:11.4,43:11.5,44:11.7,45:11.8,46:11.9,47:12,48:12.2,49:12.3,50:12.4,51:12.5,52:12.6,53:12.7,54:12.8,55:13,56:13.1,57:13.2,58:13.3,59:13.4,60:13.5,61:13.6,62:13.7,63:13.8,64:13.9,65:14,66:14.1,67:14.2,68:14.2,69:14.3,70:14.4,71:14.5,72:14.6,73:14.7,74:14.8,75:14.8,76:14.9,77:15,78:15.1,79:15.1,80:15.2,81:15.3,82:15.3,83:15.4,84:15.5,85:15.5,86:15.6,87:15.7,88:15.7,89:15.8,90:15.8,91:15.9,92:15.9,93:16,94:16.1,95:16.1,96:16.1},v={12:7.4,13:7.6,14:7.8,15:8,16:8.1,17:8.3,18:8.5,19:8.6,20:8.8,21:9,22:9.1,23:9.3,24:9.4,25:9.6,26:9.8,27:9.9,28:10.1,29:10.2,30:10.4,31:10.5,32:10.7,33:10.8,34:11,35:11.1,36:11.2,37:11.4,38:11.5,39:11.7,40:11.8,41:11.9,42:12.1,43:12.2,44:12.3,45:12.5,46:12.6,47:12.7,48:12.8,49:13,50:13.1,51:13.2,52:13.3,53:13.4,54:13.5,55:13.7,56:13.8,57:13.9,58:14,59:14.1,60:14.2,61:14.3,62:14.4,63:14.5,64:14.6,65:14.7,66:14.8,67:14.9,68:15,69:15.1,70:15.2,71:15.3,72:15.4,73:15.4,74:15.5,75:15.6,76:15.7,77:15.8,78:15.8,79:15.9,80:16,81:16.1,82:16.1,83:16.2,84:16.3,85:16.4,86:16.4,87:16.5,88:16.6,89:16.6,90:16.7,91:16.7,92:16.8,93:16.8,94:16.9,95:17,96:17},y={12:8,13:8.1,14:8.3,15:8.5,16:8.7,17:8.9,18:9,19:9.2,20:9.4,21:9.5,22:9.7,23:9.9,24:10,25:10.2,26:10.4,27:10.5,28:10.7,29:10.8,30:11,31:11.1,32:11.3,33:11.4,34:11.6,35:11.7,36:11.9,37:12,38:12.2,39:12.3,40:12.4,41:12.6,42:12.7,43:12.9,44:13,45:13.1,46:13.2,47:13.4,48:13.5,49:13.6,50:13.8,51:13.9,52:14,53:14.1,54:14.2,55:14.4,56:14.5,57:14.6,58:14.7,59:14.8,60:14.9,61:15,62:15.1,63:15.2,64:15.3,65:15.4,66:15.5,67:15.6,68:15.7,69:15.8,70:15.9,71:16,72:16.1,73:16.2,74:16.3,75:16.4,76:16.5,77:16.6,78:16.6,79:16.7,80:16.8,81:16.9,82:17,83:17,84:17.1,85:17.2,86:17.2,87:17.3,88:17.4,89:17.4,90:17.5,91:17.6,92:17.6,93:17.7,94:17.8,95:17.8,96:17.9},b={12:8.5,13:8.6,14:8.8,15:9,16:9.2,17:9.4,18:9.5,19:9.7,20:9.9,21:10,22:10.2,23:10.4,24:10.5,25:10.7,26:10.8,27:11,28:11.2,29:11.3,30:11.5,31:11.6,32:11.8,33:11.9,34:12.1,35:12.2,36:12.4,37:12.5,38:12.7,39:12.8,40:12.9,41:13.1,42:13.2,43:13.3,44:13.5,45:13.6,46:13.7,47:13.9,48:14,49:14.1,50:14.2,51:14.4,52:14.5,53:14.6,54:14.7,55:14.8,56:14.9,57:15.1,58:15.2,59:15.3,60:15.4,61:15.5,62:15.6,63:15.7,64:15.8,65:15.9,66:16,67:16.1,68:16.2,69:16.3,70:16.4,71:16.5,72:16.6,73:16.6,74:16.7,75:16.8,76:16.9,77:17,78:17.1,79:17.1,80:17.2,81:17.3,82:17.4,83:17.4,84:17.5,85:17.6,86:17.6,87:17.7,88:17.8,89:17.8,90:17.9,91:18,92:18,93:18.1,94:18.1,95:18.2,96:18.2},x={12:16.4,13:16.5,14:16.6,15:16.8,16:16.9,17:17,18:17.2,19:17.3,20:17.4,21:17.5,22:17.7,23:17.8,24:17.9,25:18,26:18.2,27:18.3,28:18.4,29:18.5,30:18.7,31:18.8,32:18.9,33:19,34:19.1,35:19.2,36:19.4,37:19.5,38:19.6,39:19.7,40:19.8,41:19.9,42:20,43:20.1,44:20.2,45:20.3,46:20.5,47:20.6,48:20.7,49:20.8,50:20.9,51:21,52:21.1,53:21.2,54:21.3,55:21.4,56:21.5,57:21.6,58:21.7,59:21.7,60:21.8,61:21.9,62:22,63:22.1,64:22.2,65:22.3,66:22.4,67:22.5,68:22.6,69:22.6,70:22.7,71:22.8,72:22.9,73:23,74:23.1,75:23.1,76:23.2,77:23.3,78:23.4,79:23.4,80:23.5,81:23.6,82:23.7,83:23.7,84:23.8,85:23.9,86:23.9,87:24,88:24.1,89:24.1,90:24.2,91:24.3,92:24.3,93:24.4,94:24.4,95:24.5,96:24.5},S={12:17.5,13:17.7,14:17.8,15:17.9,16:18.1,17:18.2,18:18.3,19:18.5,20:18.6,21:18.7,22:18.9,23:19,24:19.1,25:19.2,26:19.4,27:19.5,28:19.6,29:19.7,30:19.9,31:20,32:20.1,33:20.2,34:20.4,35:20.5,36:20.6,37:20.7,38:20.8,39:20.9,40:21,41:21.2,42:21.3,43:21.4,44:21.5,45:21.6,46:21.7,47:21.8,48:21.9,49:22,50:22.1,51:22.2,52:22.3,53:22.4,54:22.5,55:22.6,56:22.7,57:22.8,58:22.9,59:23,60:23.1,61:23.2,62:23.2,63:23.3,64:23.4,65:23.5,66:23.6,67:23.7,68:23.8,69:23.8,70:23.9,71:24,72:24.1,73:24.1,74:24.2,75:24.3,76:24.4,77:24.4,78:24.5,79:24.6,80:24.6,81:24.7,82:24.8,83:24.8,84:24.9,85:25,86:25,87:25.1,88:25.2,89:25.2,90:25.3,91:25.3,92:25.4,93:25.4,94:25.5,95:25.5,96:25.5},C={12:18.7,13:18.8,14:18.9,15:19.1,16:19.2,17:19.4,18:19.5,19:19.6,20:19.8,21:19.9,22:20.1,23:20.2,24:20.3,25:20.5,26:20.6,27:20.7,28:20.8,29:21,30:21.1,31:21.2,32:21.3,33:21.5,34:21.6,35:21.7,36:21.8,37:21.9,38:22.1,39:22.2,40:22.3,41:22.4,42:22.5,43:22.6,44:22.7,45:22.8,46:22.9,47:23,48:23.1,49:23.2,50:23.3,51:23.4,52:23.5,53:23.6,54:23.7,55:23.8,56:23.9,57:24,58:24.1,59:24.2,60:24.3,61:24.4,62:24.5,63:24.5,64:24.6,65:24.7,66:24.8,67:24.9,68:24.9,69:25,70:25.1,71:25.2,72:25.2,73:25.3,74:25.4,75:25.5,76:25.5,77:25.6,78:25.7,79:25.7,80:25.8,81:25.8,82:25.9,83:26,84:26,85:26.1,86:26.1,87:26.2,88:26.2,89:26.3,90:26.3,91:26.4,92:26.4,93:26.5,94:26.5,95:26.5,96:26.6},w={12:19.7,13:19.9,14:20,15:20.1,16:20.3,17:20.4,18:20.6,19:20.7,20:20.8,21:21,22:21.1,23:21.2,24:21.4,25:21.5,26:21.6,27:21.7,28:21.9,29:22,30:22.1,31:22.2,32:22.3,33:22.4,34:22.6,35:22.7,36:22.8,37:22.9,38:23,39:23.1,40:23.2,41:23.3,42:23.4,43:23.5,44:23.6,45:23.7,46:23.8,47:23.9,48:24,49:24.1,50:24.2,51:24.3,52:24.4,53:24.5,54:24.6,55:24.7,56:24.7,57:24.8,58:24.9,59:25,60:25.1,61:25.2,62:25.2,63:25.3,64:25.4,65:25.5,66:25.5,67:25.6,68:25.7,69:25.7,70:25.8,71:25.9,72:25.9,73:26,74:26,75:26.1,76:26.2,77:26.2,78:26.3,79:26.3,80:26.4,81:26.4,82:26.5,83:26.5,84:26.6,85:26.6,86:26.7,87:26.7,88:26.7,89:26.8,90:26.8,91:26.9,92:26.9,93:26.9,94:27,95:27,96:27},T={12:14.6,13:14.8,14:14.9,15:15,16:15.1,17:15.3,18:15.4,19:15.5,20:15.6,21:15.8,22:15.9,23:16,24:16.1,25:16.2,26:16.3,27:16.4,28:16.5,29:16.6,30:16.8,31:16.9,32:17,33:17.1,34:17.2,35:17.3,36:17.4,37:17.5,38:17.6,39:17.7,40:17.7,41:17.8,42:17.9,43:18,44:18.1,45:18.2,46:18.3,47:18.4,48:18.5,49:18.5,50:18.6,51:18.7,52:18.8,53:18.9,54:18.9,55:19,56:19.1,57:19.2,58:19.2,59:19.3,60:19.4,61:19.4,62:19.5,63:19.6,64:19.6,65:19.7,66:19.8,67:19.8,68:19.9,69:19.9,70:20,71:20.1,72:20.1,73:20.2,74:20.2,75:20.3,76:20.3,77:20.4,78:20.4,79:20.5,80:20.5,81:20.6,82:20.6,83:20.6,84:20.7,85:20.7,86:20.8,87:20.8,88:20.8,89:20.9,90:20.9,91:20.9,92:21,93:21,94:21,95:21.1,96:21.1},ee={12:15.2,13:15.3,14:15.4,15:15.6,16:15.7,17:15.8,18:15.9,19:16.1,20:16.2,21:16.3,22:16.4,23:16.5,24:16.6,25:16.8,26:16.9,27:17,28:17.1,29:17.2,30:17.3,31:17.4,32:17.5,33:17.6,34:17.7,35:17.8,36:17.9,37:18,38:18.1,39:18.2,40:18.3,41:18.4,42:18.5,43:18.6,44:18.7,45:18.8,46:18.9,47:19,48:19.1,49:19.2,50:19.2,51:19.3,52:19.4,53:19.5,54:19.6,55:19.7,56:19.7,57:19.8,58:19.9,59:20,60:20.1,61:20.1,62:20.2,63:20.3,64:20.3,65:20.4,66:20.5,67:20.6,68:20.6,69:20.7,70:20.8,71:20.8,72:20.9,73:20.9,74:21,75:21.1,76:21.1,77:21.2,78:21.2,79:21.3,80:21.4,81:21.4,82:21.5,83:21.5,84:21.6,85:21.6,86:21.7,87:21.7,88:21.8,89:21.8,90:21.9,91:21.9,92:22,93:22,94:22,95:22.1,96:22.1},te={12:15.7,13:15.9,14:16,15:16.1,16:16.2,17:16.4,18:16.5,19:16.6,20:16.7,21:16.8,22:17,23:17.1,24:17.2,25:17.3,26:17.4,27:17.5,28:17.7,29:17.8,30:17.9,31:18,32:18.1,33:18.2,34:18.3,35:18.4,36:18.5,37:18.6,38:18.7,39:18.8,40:18.9,41:19,42:19.1,43:19.2,44:19.3,45:19.4,46:19.5,47:19.6,48:19.7,49:19.8,50:19.9,51:20,52:20.1,53:20.1,54:20.2,55:20.3,56:20.4,57:20.5,58:20.6,59:20.7,60:20.7,61:20.8,62:20.9,63:21,64:21.1,65:21.1,66:21.2,67:21.3,68:21.4,69:21.4,70:21.5,71:21.6,72:21.7,73:21.7,74:21.8,75:21.9,76:21.9,77:22,78:22.1,79:22.1,80:22.2,81:22.3,82:22.3,83:22.4,84:22.5,85:22.5,86:22.6,87:22.6,88:22.7,89:22.8,90:22.8,91:22.9,92:22.9,93:23,94:23,95:23.1,96:23.1},ne={12:16.3,13:16.4,14:16.5,15:16.6,16:16.7,17:16.9,18:17,19:17.1,20:17.2,21:17.3,22:17.4,23:17.6,24:17.7,25:17.8,26:17.9,27:18,28:18.1,29:18.2,30:18.3,31:18.4,32:18.5,33:18.7,34:18.8,35:18.9,36:19,37:19.1,38:19.2,39:19.3,40:19.4,41:19.5,42:19.6,43:19.7,44:19.8,45:19.9,46:19.9,47:20,48:20.1,49:20.2,50:20.3,51:20.4,52:20.5,53:20.6,54:20.7,55:20.8,56:20.8,57:20.9,58:21,59:21.1,60:21.2,61:21.3,62:21.3,63:21.4,64:21.5,65:21.6,66:21.7,67:21.7,68:21.8,69:21.9,70:22,71:22,72:22.1,73:22.2,74:22.2,75:22.3,76:22.4,77:22.5,78:22.5,79:22.6,80:22.7,81:22.7,82:22.8,83:22.8,84:22.9,85:23,86:23,87:23.1,88:23.1,89:23.2,90:23.3,91:23.3,92:23.4,93:23.4,94:23.5,95:23.5,96:23.5};function E(e,t){let n=Object.keys(e).map(Number).sort((e,t)=>e-t);if(t<=n[0])return e[n[0]];if(t>=n[n.length-1])return e[n[n.length-1]];for(let r=0;r<n.length-1;r++)if(t>=n[r]&&t<=n[r+1]){let i=(t-n[r])/(n[r+1]-n[r]);return e[n[r]]+i*(e[n[r+1]]-e[n[r]])}return e[n[0]]}function re(e,t){let n=E(u.p95,e),r=E(u.p75,e),i=E(u.p40,e),a;return a=t>=n?`High-Risk`:t>=r?`High-Intermediate`:t>=i?`Low-Intermediate`:`Low-Risk`,{p95:n,p75:r,p40:i,zone:a}}function ie(e,t){return t===`medium`?e===35?_:e===36?v:e===37?y:b:e===35?d:e===36?f:e===37?p:e===38?m:e===39?h:g}function ae(e,t){return t===`medium`?e===35?T:e===36?ee:e===37?te:ne:e===35?x:e===36?S:e===37?C:w}function D(e,t,n,r){let i=E(ie(e,r),t),a=E(ae(e,r),t),o;return o=n>=a?`Above Exchange`:n>=i?`Above Phototherapy`:`Below Phototherapy`,{photoThreshold:i,exchangeThreshold:a,status:o}}var O={male:{24:{L:-1.982374,M:16.5478,S:.080127},30:{L:-1.642107,M:16.2497,S:.075499},36:{L:-1.419991,M:16.0003,S:.072634},42:{L:-1.438165,M:15.7941,S:.071495},48:{L:-1.714869,M:15.6282,S:.071889},54:{L:-2.155348,M:15.5026,S:.073491},60:{L:-2.615166,M:15.4191,S:.075992},66:{L:-2.981797,M:15.3795,S:.079211},72:{L:-3.211705,M:15.3835,S:.083048},78:{L:-3.314769,M:15.429,S:.0874},84:{L:-3.323189,M:15.5129,S:.092131},90:{L:-3.270455,M:15.6317,S:.097082},96:{L:-3.183058,M:15.7823,S:.102091},102:{L:-3.079383,M:15.9617,S:.107013},108:{L:-2.971148,M:16.1671,S:.111721},114:{L:-2.865311,M:16.3961,S:.116113},120:{L:-2.765648,M:16.6461,S:.120112},126:{L:-2.673903,M:16.9151,S:.123664},132:{L:-2.59056,M:17.2009,S:.126735},138:{L:-2.51532,M:17.5014,S:.129309},144:{L:-2.447426,M:17.8146,S:.131389},150:{L:-2.385858,M:18.1387,S:.132991},156:{L:-2.329457,M:18.4718,S:.134141},162:{L:-2.277017,M:18.812,S:.13488},168:{L:-2.227362,M:19.1576,S:.135251},174:{L:-2.179426,M:19.5067,S:.135309},180:{L:-2.132345,M:19.8577,S:.13511},186:{L:-2.085574,M:20.2086,S:.134718},192:{L:-2.039015,M:20.5576,S:.134198},198:{L:-1.99315,M:20.9029,S:.13362},204:{L:-1.949135,M:21.2425,S:.133057},210:{L:-1.908831,M:21.5742,S:.132585},216:{L:-1.87467,M:21.8959,S:.132286},222:{L:-1.849323,M:22.2054,S:.132249},228:{L:-1.835138,M:22.5007,S:.132566},234:{L:-1.833401,M:22.7799,S:.133339},240:{L:-1.843581,M:23.0414,S:.134675}},female:{24:{L:-1.024497,M:16.388,S:.085026},30:{L:-1.534542,M:16.0059,S:.080932},36:{L:-2.096829,M:15.6992,S:.078605},42:{L:-2.618733,M:15.4647,S:.077904},48:{L:-3.018522,M:15.2985,S:.078713},54:{L:-3.2593,M:15.1961,S:.080904},60:{L:-3.350078,M:15.1519,S:.0843},66:{L:-3.325522,M:15.1606,S:.08868},72:{L:-3.225607,M:15.2169,S:.093803},78:{L:-3.084291,M:15.3161,S:.099427},84:{L:-2.926187,M:15.4536,S:.105325},90:{L:-2.76731,M:15.6252,S:.111295},96:{L:-2.617192,M:15.827,S:.117159},102:{L:-2.480952,M:16.0552,S:.122771},108:{L:-2.360921,M:16.3061,S:.128014},114:{L:-2.257782,M:16.5763,S:.132797},120:{L:-2.171296,M:16.8623,S:.137057},126:{L:-2.100749,M:17.161,S:.140754},132:{L:-2.045235,M:17.4691,S:.143868},138:{L:-2.003802,M:17.7836,S:.146399},144:{L:-1.975521,M:18.1015,S:.148361},150:{L:-1.95952,M:18.42,S:.149783},156:{L:-1.954978,M:18.7364,S:.150705},162:{L:-1.9611,M:19.0481,S:.151176},168:{L:-1.977074,M:19.3526,S:.151256},174:{L:-2.002014,M:19.6475,S:.15101},180:{L:-2.034893,M:19.9306,S:.150512},186:{L:-2.07446,M:20.1998,S:.149843},192:{L:-2.119157,M:20.4533,S:.14909},198:{L:-2.167045,M:20.6891,S:.148349},204:{L:-2.215738,M:20.9058,S:.147723},210:{L:-2.262382,M:21.1016,S:.147323},216:{L:-2.303688,M:21.2753,S:.147269},222:{L:-2.336038,M:21.4255,S:.147689},228:{L:-2.355678,M:21.5508,S:.148724},234:{L:-2.35898,M:21.6501,S:.150521},240:{L:-2.342797,M:21.7219,S:.153241}}};function k(e){let t=e<0?-1:1,n=Math.abs(e)/Math.sqrt(2),r=1/(1+.3275911*n);return .5*(1+t*(1-((((1.061405429*r+-1.453152027)*r+1.421413741)*r+-.284496736)*r+.254829592)*r*Math.exp(-n*n)))}function oe(e,t,n,r){let i;i=Math.abs(t)<.001?Math.log(e/n)/r:((e/n)**+t-1)/(t*r);let a=k(i);return{z:i,percentile:Math.round(a*1e4)/100}}function se(e,t,n){let r=1.645,i=Math.abs(n.L)<.001?n.M*Math.exp(n.S*r):n.M*(1+n.L*n.S*r)**(1/n.L),a=t/i*100;return e>=95?a>=140?{label:`Class 3 Severe Obesity`,color:`#7f1d1d`,bg:`#fecaca`,pctOf95:a,bmi95:i}:a>=120?{label:`Class 2 Severe Obesity`,color:`#dc2626`,bg:`#fee2e2`,pctOf95:a,bmi95:i}:{label:`Obese (Class 1)`,color:`#ef4444`,bg:`#fee2e2`,pctOf95:a,bmi95:i}:e>=85?{label:`Overweight`,color:`#f97316`,bg:`#ffedd5`,pctOf95:a,bmi95:i}:e>=5?{label:`Healthy Weight`,color:`#10b981`,bg:`#d1fae5`,pctOf95:a,bmi95:i}:{label:`Underweight`,color:`#f59e0b`,bg:`#fef3c7`,pctOf95:a,bmi95:i}}function ce(e,t,n,r){let i=e/(t/100)**2,a=Math.max(24,Math.min(240,n)),s=o(O[r],a),{z:c,percentile:l}=oe(i,s.L,s.M,s.S),u=se(l,i,s);return{bmi:i,z:c,percentile:l,L:s.L,M:s.M,S:s.S,classification:u}}var le=[1.07244896,1.051272912,1.041951175,1.012592236,.970541909,.921129988,.868221392,.81454413,.761957977,.711660228,.664323379,.620285102,.57955631,.54198094,.511429832,.482799937,.455521041,.429150288,.403351725,.377878239,.352555862,.327270297,.301955463,.276583851,.251158446,.225705996,.20027145,.174913356,.149700081,.12470671,.100012514,.075698881,.051847635,.02853967,.005853853,-.016133871,-.037351181,-.057729947,-.077206672,-.09572283,-.113225128,-.129665689,-.145002179,-.159197885,-.172221748,-.184048358,-.194660215,-.204030559,-.212174408,-.219069129,-.224722166,-.229140412,-.232335686,-.234324563,-.235128195,-.234772114,-.233286033,-.230703633,-.227062344,-.222403111,-.216770161,-.210210748,-.202774891,-.194515104,-.185486099,-.175744476,-.165348396,-.15435722,-.142831123,-.130830669,-.118416354,-.105648092,-.092584657,-.079283065,-.065797888,-.0521805,-.03847825,-.024733545,-.010982868,.002744306,.016426655,.030052231,.043619747,.05713988,.070636605,.08414848,.097729873,.111452039,.125404005,.13969316,.154445482,.169805275,.185934346,.203010488,.2212252,.240780542,.261885086,.284748919,.309577733,.336566048,.365889711,.397699038,.432104409,.46917993,.508943272,.551354277,.596307363,.643626542,.693062173,.744289752,.79691098,.85045728,.904395871,.958138449,1.011054559,1.062474568,1.111727029,1.158135105,1.201050821,1.239852328,1.274006058,1.303044695,1.326605954,1.344443447,1.356437773,1.362602695,1.363085725,1.358162799,1.348227142,1.333772923,1.315374704,1.293664024,1.269304678,1.242968236,1.21531127,1.186955477,1.158471522,1.130367088,1.103079209,1.076970655,1.052329922,1.029374161,1.008254396,.989062282,.971837799,.95657215,.94324228,.931767062,.922058291,.914012643,.907516917,.902452436,.898698641,.896143482,.894659668,.89413892,.894475371,.895569834,.897330209,.899671635,.902516442,.905793969,.909440266,.913397733,.91761471,.922045055,.926647697,.931386217,.93622842,.941145943,.94611388,.95111043,.956116576,.961115792,.966093766,.971038162,.975938391,.980785418,.985571579,.99029042,.994936555,.999505539,1.003993753,1.0083983,1.012716921,1.016947912,1.021090055,1.025142554,1.029104983,1.032977233,1.036759475,1.040452117,1.044055774,1.047571238,1.050999451,1.054341482,1.057598512,1.060771808,1.063862715,1.066872639,1.069803036,1.072655401,1.075431258,1.078132156,1.080759655,1.083315329,1.085800751,1.088217496,1.090567133,1.092851222,1.095071313,1.097228939,1.099325619,1.101362852,1.103342119,1.105264876,1.107132561,1.108046193],ue=[84.97555512,85.3973169,86.29026318,87.15714182,87.9960184,88.8055115,89.58476689,90.33341722,91.0515436,91.7396352,92.39854429,93.02945392,93.63382278,94.21335709,94.79643239,95.37391918,95.94692677,96.51644912,97.08337211,97.6484807,98.21246579,98.77593069,99.33939735,99.9033122,100.4680516,101.033927,101.6011898,102.1700358,102.7406094,103.3130077,103.8872839,104.4634511,105.0414853,105.6213287,106.2028921,106.7860583,107.3706841,107.9566031,108.5436278,109.1315521,109.7201531,110.3091934,110.8984228,111.4875806,112.0763967,112.6645943,113.2518902,113.8380006,114.4226317,115.0054978,115.5863089,116.1647782,116.7406221,117.3135622,117.8833259,118.4496481,119.0122722,119.5709513,120.1254495,120.6755427,121.22102,121.7616844,122.2973542,122.827864,123.3530652,123.8728276,124.38704,124.8956114,125.398472,125.895574,126.3868929,126.8724284,127.3522056,127.8262759,128.2947187,128.757642,129.2151839,129.6675143,130.1148354,130.5573839,130.995432,131.4292887,131.8593015,132.2858574,132.7093845,133.1303527,133.5492749,133.9667073,134.3832499,134.7995463,135.2162826,135.634186,136.0540223,136.4765925,136.9027281,137.3332846,137.7691339,138.2111552,138.6602228,139.1171933,139.5828898,140.0580848,140.5434787,141.0396832,141.5471945,142.0663731,142.59742,143.1403553,143.6949981,144.2609497,144.8375809,145.4240246,146.0191748,146.621692,147.2300177,147.8423918,148.4568879,149.0714413,149.6838943,150.2920328,150.8936469,151.4865636,152.0686985,152.6380955,153.1929631,153.7317031,154.2529332,154.755501,155.2384904,155.7012216,156.1432438,156.564323,156.9644258,157.3436995,157.7024507,158.0411233,158.3602756,158.6605588,158.9426964,159.2074654,159.455679,159.688172,159.9057871,160.1093647,160.299733,160.4776996,160.6440526,160.7995428,160.9448916,161.0807857,161.2078755,161.3267744,161.4380593,161.5422726,161.639917,161.7314645,161.8173534,161.8979913,161.9737558,162.0449969,162.1120386,162.17518,162.2346979,162.2908474,162.343864,162.3939652,162.4413513,162.4862071,162.5287029,162.5689958,162.6072309,162.6435418,162.6780519,162.7108751,162.7421168,162.7718741,162.8002371,162.8272889,162.8531067,162.8777619,162.9013208,162.9238449,162.9453912,162.9660131,162.9857599,163.0046776,163.0228094,163.0401953,163.0568727,163.0728768,163.0882404,163.1029943,163.1171673,163.1307866,163.1438776,163.1564644,163.1685697,163.1802146,163.1914194,163.202203,163.2125835,163.2225779,163.2322024,163.2414722,163.2504019,163.2590052,163.2672954,163.2752848,163.2829854,163.2904086,163.297565,163.304465,163.3111185,163.3175349,163.3237231,163.3296918,163.3354491,163.338251],de=[.040791394,.040859727,.041142161,.041349399,.041500428,.041610508,.041691761,.04175368,.041803562,.041846882,.041887626,.041928568,.041971514,.042017509,.042104522,.042199507,.042300333,.042405225,.042512706,.042621565,.042730809,.042839638,.042947412,.043053626,.043157889,.043259907,.043359463,.043456406,.043550638,.043642107,.043730791,.043816701,.043899867,.043980337,.044058171,.04413344,.044206218,.044276588,.044344632,.044410436,.044474084,.044535662,.044595254,.044652942,.044708809,.044762936,.044815402,.044866288,.044915672,.044963636,.045010259,.045055624,.045099817,.045142924,.045185036,.045226249,.045266662,.045306383,.045345524,.045384203,.045422551,.045460702,.045498803,.045537012,.045575495,.045614432,.045654016,.04569445,.045735953,.045778759,.045823114,.04586928,.045917535,.045968169,.04602149,.046077818,.046137487,.046200842,.04626824,.046340046,.046416629,.046498361,.046585611,.046678741,.046778099,.04688401,.046996769,.047116633,.047243801,.047378413,.047520521,.047670085,.047826946,.04799081,.048161228,.04833757,.048519011,.048704503,.048892759,.049082239,.049271137,.049457371,.049638596,.049812203,.049975355,.050125012,.050257992,.050371024,.050460835,.050524236,.050558224,.050560083,.050527494,.050458634,.050352269,.050207825,.050025434,.049805967,.049551023,.049262895,.048944504,.048599314,.048231224,.047844442,.047443362,.04703243,.046616026,.046198356,.04578335,.045374597,.044975281,.044588148,.044215488,.043859135,.04352048,.043200497,.042899776,.042618565,.042356812,.042114211,.041890247,.04168424,.041495379,.041322765,.041165437,.041022401,.040892651,.040775193,.040669052,.040573288,.040487005,.040409354,.040339537,.040276811,.040220488,.040169932,.040124562,.040083845,.040047295,.040014473,.03998498,.039958458,.039934584,.039913066,.039893644,.039876087,.039860185,.039845754,.039832629,.039820663,.039809725,.0397997,.039790485,.039781991,.039774136,.03976685,.03976007,.039753741,.039747815,.039742249,.039737004,.039732048,.039727352,.03972289,.03971864,.039714581,.039710697,.039706971,.039703391,.039699945,.039696623,.039693415,.039690313,.039687311,.039684402,.039681581,.039678842,.039676182,.039673596,.039671082,.039668635,.039666254,.039663936,.039661679,.039659481,.039657339,.039655252,.039653218,.039651237,.039649306,.039647424,.039645591,.039643804,.039642063,.039640367,.039638715,.039637105,.039636316],A=[.941523967,1.00720807,.837251351,.681492975,.538779654,.407697153,.286762453,.174489485,.069444521,-.029720564,-.124251789,-.215288396,-.30385434,-.390918369,-.254801167,-.125654535,-.00316735,.11291221,.222754969,.326530126,.42436156,.516353108,.602595306,.683170764,.758158406,.827636736,.891686306,.95039153,1.003830006,1.05213569,1.0953669,1.133652119,1.167104213,1.195845353,1.220004233,1.239715856,1.255121285,1.266367398,1.273606657,1.276996893,1.276701119,1.272887366,1.265728536,1.255402281,1.242090871,1.225981067,1.207263978,1.186140222,1.162796198,1.137442868,1.110286487,1.081536236,1.05140374,1.020102497,.987847213,.954853043,.921334742,.887505723,.85357703,.819756239,.786246296,.753244292,.720940222,.689515708,.659142731,.629997853,.602203984,.575908038,.55123134,.528279901,.507143576,.487895344,.470590753,.455267507,.441945241,.430625458,.421291648,.413909588,.408427813,.404778262,.402877077,.402625561,.40391127,.406609232,.410583274,.415687443,.421767514,.428662551,.436206531,.44423,.45256176,.461030578,.469466904,.477704608,.48558272,.492947182,.499652617,.505564115,.510559047,.514528903,.517381177,.519041285,.519454524,.518588072,.516433004,.513006312,.508352901,.502547502,.495696454,.487939275,.479449924,.470437652,.461147305,.451858946,.442886661,.434576385,.427302633,.421464027,.417477538,.415771438,.416777012,.420919142,.428606007,.440218167,.456097443,.476536014,.501766234,.531951655,.567179725,.607456565,.652704121,.702759868,.757379106,.816239713,.878947416,.945053486,1.014046108,1.085383319,1.158487278,1.232768816,1.307628899,1.382473225,1.456720479,1.529810247,1.601219573,1.670433444,1.736995571,1.800483802,1.860518777,1.916765525,1.968934444,2.016781776,2.060109658,2.098765817,2.132642948,2.16167779,2.185849904,2.205180153,2.219728869,2.2295937,2.234907144,2.235833767,2.232567138,2.2253265,2.214353232,2.199905902,2.182262864,2.161704969,2.138524662,2.113023423,2.085490286,2.0562195,2.025496648,1.993598182,1.960789092,1.927320937,1.89343024,1.859337259,1.825245107,1.791339209,1.757787065,1.724738292,1.692324905,1.660661815,1.629847495,1.599964788,1.571081817,1.543252982,1.516519998,1.490912963,1.466451429,1.44314546,1.420996665,1.399999187,1.380140651,1.361403047,1.343763564,1.327195355,1.311668242,1.297149359,1.283603728,1.270994782,1.25928483,1.248435461,1.23840791,1.229163362,1.220663228,1.212869374,1.20574431,1.199251356,1.19335477,1.188019859,1.183213059,1.178901998,1.175055543,1.171643828,1.16863827,1.167279219],j=[86.45220101,86.86160934,87.65247282,88.42326434,89.17549228,89.91040853,90.62907762,91.33242379,92.02127167,92.69637946,93.35846546,94.00822923,94.64636981,95.27359106,95.91474929,96.54734328,97.17191309,97.78897727,98.3990283,99.00254338,99.599977,100.191764,100.7783198,101.3600411,101.9373058,102.5104735,103.0798852,103.645864,104.208713,104.7687256,105.3261638,105.8812823,106.4343146,106.9854769,107.534968,108.0829695,108.6296457,109.1751441,109.7195954,110.2631136,110.8057967,111.3477265,111.8889694,112.4295761,112.9695827,113.5090108,114.0478678,114.5861486,115.1238315,115.6608862,116.1972691,116.732925,117.2677879,117.8017819,118.3348215,118.8668123,119.397652,119.9272309,120.455433,120.9821362,121.5072136,122.0305342,122.5519634,123.0713645,123.588599,124.1035312,124.6160161,125.1259182,125.6331012,126.1374319,126.6387804,127.1370217,127.6320362,128.1237104,128.6119383,129.096622,129.5776723,130.0550101,130.5285669,130.9982857,131.4641218,131.9260439,132.3840348,132.838092,133.2882291,133.7344759,134.1768801,134.6155076,135.0504433,135.4817925,135.9096813,136.3342577,136.7556923,137.1741794,137.5899378,138.0032114,138.4142703,138.8234114,139.2309592,139.6372663,140.042714,140.4477127,140.8527022,141.2581515,141.6645592,142.072452,142.4823852,142.8949403,143.3107241,143.7303663,144.1545167,144.5838414,145.0190192,145.4607359,145.9096784,146.3665278,146.8319513,147.3065929,147.7910635,148.2859294,148.7917006,149.3088178,149.8376391,150.3784267,150.9313331,151.4963887,152.0734897,152.6623878,153.2626819,153.8738124,154.495058,155.1255365,155.7642086,156.4098858,157.0612415,157.7168289,158.3750929,159.034399,159.6930501,160.3493168,161.0014586,161.6477515,162.2865119,162.9161202,163.535045,164.1418486,164.7352199,165.3139755,165.8770715,166.4236087,166.9528354,167.4641466,167.9570814,168.4313175,168.8866644,169.3230548,169.7405351,170.139255,170.5194567,170.881464,171.2256717,171.5525345,171.8625576,172.1562865,172.4342983,172.6971935,172.9455898,173.180112,173.4013896,173.6100518,173.8067179,173.9919998,174.1664951,174.3307855,174.4854344,174.6309856,174.7679617,174.8968634,175.0181691,175.1323345,175.2397926,175.340954,175.4362071,175.5259191,175.6104358,175.690083,175.7651671,175.8359757,175.9027788,175.9658293,176.0253641,176.081605,176.1347593,176.1850208,176.2325707,176.2775781,176.3202008,176.3605864,176.3988725,176.4351874,176.469651,176.5023751,176.533464,176.5630153,176.5911197,176.6178621,176.6433219,176.6675729,176.6906844,176.712721,176.733743,176.753807,176.7729657,176.7912687,176.8087622,176.8254895,176.8414914,176.8492322],fe=[.040321528,.040395626,.040577525,.040723122,.040833194,.040909059,.040952433,.04096533,.040949976,.040908737,.040844062,.040758431,.040654312,.04053412,.040572876,.04061691,.040666414,.040721467,.040782045,.040848042,.040919281,.040995524,.041076485,.041161838,.041251224,.041344257,.041440534,.041539635,.041641136,.041744602,.041849607,.041955723,.042062532,.042169628,.042276619,.042383129,.042488804,.042593311,.042696342,.042797615,.042896877,.042993904,.043088503,.043180513,.043269806,.043356287,.043439893,.043520597,.043598407,.043673359,.043745523,.043815003,.043881929,.043946461,.044008785,.044069112,.044127675,.044184725,.044240532,.044295379,.044349559,.044403374,.04445713,.044511135,.044565693,.044621104,.044677662,.044735646,.044795322,.044856941,.04492073,.044986899,.045055632,.045127088,.045201399,.045278671,.045358979,.045442372,.045528869,.045618459,.045711105,.045806742,.045905281,.046006604,.046110573,.046217028,.04632579,.046436662,.04654943,.046663871,.046779748,.046896817,.047014827,.047133525,.047252654,.047371961,.047491194,.047610108,.047728463,.04784603,.047962592,.048077942,.048191889,.048304259,.048414893,.048523648,.048630402,.04873505,.048837504,.048937694,.049035564,.049131073,.049224189,.049314887,.049403145,.049488934,.049572216,.049652935,.049731004,.0498063,.04987865,.049947823,.050013518,.050075353,.050132858,.050185471,.050232532,.050273285,.050306885,.050332406,.05034886,.050355216,.050350423,.050333444,.050303283,.050259018,.050199837,.050125062,.05003418,.049926861,.049802977,.04966261,.049506051,.049333801,.049146553,.04894519,.048730749,.048504404,.048267442,.04802123,.047767192,.047506783,.047241456,.04697265,.046701759,.046430122,.046159004,.045889585,.045622955,.045360101,.045101913,.044849174,.044602566,.044362674,.044129985,.043904897,.043687723,.043478698,.043277987,.043085685,.042901835,.042726424,.042559396,.042400652,.042250063,.042107465,.041972676,.041845488,.041725679,.041613015,.041507249,.041408129,.041315398,.041228796,.04114806,.041072931,.04100315,.040938463,.040878617,.040823368,.040772475,.040725706,.040682834,.04064364,.040607913,.040575448,.040546051,.040519532,.040495713,.040474421,.040455493,.040438773,.040424111,.040411366,.040400405,.040391101,.040383334,.04037699,.040371962,.040368149,.040365456,.040363795,.04036308,.040363233,.040364179,.04036585,.04036818,.040369574],pe=[[-7.4855,-1.2252,1.2643,-6.8797,20.4744,.7114,-.0066,-.0667,.3564,-.0012,.5278,-.6927,.1388],[8.4462,-.9598,.9046,-5.1098,15.1548,.5919,-.0029,-.065,.2495,-.003,.4421,-.5724,.0997],[26.6223,-1.1479,1.2134,-8.4665,28.0408,.475,1e-4,-.0643,.2062,-.023,.5561,-.7467,.185],[31.8947,-.867,1.1693,-8.2932,26.0849,.4251,-2e-4,-.0535,.1718,-.008,.3954,-.5402,.1473],[30.9472,-1.1288,1.5926,-11.7371,34.5934,.4578,-.0019,-.0341,.1144,-.0167,.6897,-1.0025,.3867],[23.152,-1.1368,1.751,-13.8556,41.2104,.527,-.0048,-.0149,.0623,.0062,.4347,-.6509,.2798],[19.3036,-.923,1.6566,-14.2294,42.9522,.5494,-.0062,-.0051,.0555,.0242,.1295,-.1986,.0876],[20.0191,-1.0378,1.6928,-13.6476,40.8615,.5596,-.0071,.0146,-.03,.0135,.1632,-.2423,.1013],[21.6515,-.9745,1.5964,-13.0096,38.8309,.5462,-.0063,.0087,-.0183,.0093,.2644,-.3848,.1477],[22.6952,-.8665,1.4799,-11.8203,34.2277,.537,-.0066,.0176,-.0648,.0046,.3226,-.4689,.1811],[23.1615,-.8132,1.4422,-11.8893,34.8542,.5329,-.0063,.013,-.0367,.008,.34,-.5072,.2171],[27.9,-.8288,1.4257,-11.5803,33.7393,.4995,-.0049,.0013,.0117,-.0014,.4954,-.7333,.3051],[34.8678,-.801,1.429,-11.2835,32.3656,.4469,-.0037,-.0037,.0274,-4e-4,.3936,-.5873,.251],[37.7557,-.9638,1.5603,-11.545,31.5671,.4392,-.0035,.0024,-.0164,-.0087,.395,-.575,.2238],[39.9509,-1.0185,1.6189,-11.6485,31.009,.4284,-.0032,.0051,-.0452,-.0101,.3516,-.5073,.1906],[40.8576,-.9313,1.5386,-11.5031,31.8413,.418,-.0029,.0019,-.0291,-.0081,.3507,-.5094,.1968],[42.1455,-.9104,1.5356,-11.4411,31.5567,.4098,-.0029,.0038,-.0368,-.006,.2848,-.4155,.1642],[44.0009,-1.0103,1.6565,-11.8711,31.8672,.4038,-.0026,7e-4,-.0172,-.0017,.1877,-.2802,.1211],[42.9483,-.9479,1.6532,-12.4439,34.3937,.4097,-.0029,.0023,-.0231,-3e-4,.1892,-.2761,.1077],[43.4489,-.9355,1.5751,-11.4463,30.9525,.4076,-.0027,0,-.0199,.0013,.1619,-.2376,.0949],[42.0432,-.9668,1.5892,-11.2769,29.6658,.4235,-.003,9e-4,-.0194,.0051,.1181,-.1781,.0784],[43.3921,-.9251,1.5125,-10.669,27.8566,.4122,-.0025,-8e-4,-.0269,-3e-4,.178,-.2571,.0962],[43.1823,-.9153,1.5502,-11.2058,29.7148,.4154,-.0028,.0025,-.0386,.0053,.0679,-.0977,.0352],[43.5111,-.8427,1.4724,-10.8634,29.5168,.4107,-.0027,.0019,-.0416,-.0023,.1644,-.2282,.0711],[44.8115,-.9195,1.5496,-10.7815,27.8384,.4087,-.003,.012,-.0908,-.0063,.1451,-.1957,.053],[45.1153,-.8419,1.4685,-10.4821,27.7389,.404,-.003,.0148,-.1094,-.0047,.1524,-.2131,.0715],[45.0184,-.9109,1.4637,-9.8769,25.3956,.4124,-.0031,.0163,-.1196,-.0095,.2128,-.3015,.1084],[46.8396,-.9336,1.4913,-10.0409,25.5791,.4004,-.0025,.0087,-.0854,-.0083,.207,-.2945,.1065],[46.3627,-1.0691,1.6403,-10.8997,27.3749,.4156,-.003,.0128,-.0892,-.006,.1891,-.2783,.1168],[46.056,-1.0253,1.6174,-10.8914,27.6133,.4169,-.0032,.0134,-.0831,-.0015,.1168,-.1751,.0794],[45.8707,-1.0687,1.6929,-11.5282,29.3823,.4234,-.0035,.0189,-.1052,-.002,.0549,-.0766,.0279],[46.225,-1.0493,1.6305,-11.0002,28.295,.4212,-.0032,.015,-.0892,.001,.0192,-.0279,.014],[49.7043,-1.1168,1.6687,-10.6909,26.5418,.4005,-.0027,.0175,-.1166,-.0029,-.0064,.0124,-.0056],[52.501,-1.2283,1.7174,-10.288,24.6009,.39,-.0025,.0229,-.1413,-.0055,-.0773,.1151,-.0428],[52.638,-1.2668,1.7982,-10.7251,24.8323,.393,-.0027,.0233,-.1352,-.0037,-.1218,.1797,-.0678],[52.9451,-1.2987,1.8214,-10.8739,25.4383,.3952,-.0028,.0249,-.1365,-.0026,-.1753,.2588,-.1002],[51.6977,-1.2275,1.7723,-10.6355,24.5465,.4024,-.0032,.0273,-.1377,.0023,-.2334,.3428,-.1327],[51.5803,-1.1856,1.7323,-10.549,24.7169,.4027,-.0033,.029,-.1504,.004,-.2752,.4081,-.1658],[52.5542,-1.1951,1.7357,-10.3953,23.5706,.3978,-.0032,.0312,-.1661,5e-4,-.2249,.34,-.1482],[54.7146,-1.2604,1.8028,-10.773,24.4075,.3869,-.0029,.0332,-.1862,-.002,-.2181,.3306,-.1449],[56.735,-1.199,1.8011,-11.3328,26.8609,.3684,-.0025,.0319,-.1874,2e-4,-.2443,.3686,-.1611],[57.7385,-1.2515,1.8588,-11.3519,25.8098,.3657,-.0024,.0287,-.1704,-9e-4,-.2306,.3502,-.1567],[57.7098,-1.257,1.9037,-11.8077,27.0173,.3677,-.0024,.0271,-.1572,-.0012,-.1965,.298,-.1324],[58.0736,-1.2363,1.9353,-12.317,28.6066,.3643,-.0024,.0253,-.1507,.002,-.178,.2641,-.1092],[62.0223,-1.2128,1.9237,-12.157,27.903,.3343,-.0016,.0242,-.1555,-4e-4,-.21,.315,-.136],[62.1221,-1.1404,1.8555,-11.839,27.3698,.3308,-.0017,.026,-.1685,-.0024,-.1452,.2208,-.0993],[62.7962,-1.113,1.8421,-11.7266,26.7715,.3253,-.0016,.0282,-.1884,-.0019,-.1808,.2766,-.1276],[61.7073,-1.2183,1.9323,-12.0462,26.8742,.3435,-.0022,.0321,-.2009,-.0018,-.1943,.2958,-.1342],[61.7636,-1.1885,1.9597,-12.4946,27.9124,.342,-.0022,.0308,-.1956,.003,-.234,.3493,-.149],[63.7493,-1.2055,1.96,-12.5069,28.0089,.3283,-.0012,.0195,-.1595,-.002,-.1708,.2634,-.1258],[62.2586,-1.077,1.8646,-12.2702,27.8184,.3328,-.0012,.0137,-.1292,-.0024,-.0705,.1151,-.0646],[64.2911,-1.0805,1.8431,-11.8647,26.3816,.3191,-7e-4,.0088,-.1057,-.007,-.0325,.0621,-.0471],[68.9778,-1.2187,1.888,-11.2553,23.9127,.294,3e-4,.0053,-.0991,-.0123,-.0668,.1121,-.0648],[70.4806,-1.165,1.8218,-10.7395,22.4622,.2801,9e-4,1e-4,-.0853,-.0136,-.0702,.1225,-.0781],[70.6109,-1.1182,1.8262,-11.2854,24.8046,.2768,.001,-7e-4,-.084,-.01,-.1092,.1806,-.1041],[69.8975,-1.1611,1.8731,-11.7046,26.3452,.287,7e-4,.0018,-.0954,-.0067,-.1524,.2386,-.1185],[69.191,-1.1401,1.9015,-12.217,27.9129,.2928,3e-4,.0055,-.111,-.0035,-.2103,.3262,-.1586],[69.9619,-1.1195,1.8816,-11.9235,26.817,.2873,5e-4,.0046,-.1118,-.0053,-.1918,.3015,-.1525],[68.3161,-1.0128,1.7759,-11.6001,26.6764,.2951,3e-4,.0028,-.1008,-.0022,-.2321,.3639,-.1831],[68.0555,-.9162,1.6469,-10.7107,24.2868,.2927,6e-4,-.0014,-.0813,-4e-4,-.236,.3707,-.1882],[65.6124,-.7989,1.5036,-9.8072,21.9786,.3055,4e-4,-.0054,-.0567,-.0017,-.1403,.2328,-.1369],[65.1636,-.7707,1.457,-9.5828,21.8374,.3086,5e-4,-.0086,-.0391,-.0024,-.0941,.1647,-.109],[66.6766,-.913,1.5894,-9.8498,21.1477,.3073,8e-4,-.0116,-.029,-.0052,-.0645,.1189,-.0865],[65.4537,-.895,1.5329,-9.3616,19.7235,.3178,7e-4,-.0136,-.0176,-.0044,-.0173,.0444,-.0479],[64.8596,-.9404,1.6229,-9.8355,19.8054,.3274,2e-4,-.0077,-.0396,-.006,.0077,.0094,-.0359],[64.7808,-.935,1.5826,-9.392,18.2771,.3302,2e-4,-.0082,-.0324,-.009,.0629,-.0712,-.0032],[65.5762,-.9693,1.558,-8.833,16.6679,.3289,3e-4,-.009,-.0304,-.0092,.0526,-.0599,-.0011],[64.0451,-1.1203,1.7205,-9.4755,16.9051,.3537,-7e-4,.0019,-.0701,-.0041,-.1202,.1997,-.1156],[66.825,-1.1964,1.8333,-10.0226,17.9273,.3397,-6e-4,.0056,-.0822,-.0081,-.1245,.2047,-.1138],[65.6846,-1.2525,1.9018,-10.459,18.6882,.3537,-9e-4,.0036,-.066,-.0057,-.113,.1831,-.0985],[65.3052,-1.2617,1.9135,-10.5223,18.771,.3604,-.0013,.0085,-.0848,-.0046,-.1438,.2265,-.112],[64.899,-1.2245,1.8584,-10.1192,17.7416,.3641,-.0016,.0138,-.1073,-.0048,-.1372,.2161,-.1063],[65.3578,-1.2248,1.8289,-9.7674,16.8046,.3627,-.0014,.0124,-.1066,-.0057,-.1576,.2502,-.1263],[64.5514,-1.1783,1.7442,-9.4075,16.9106,.3687,-.0013,.0091,-.0924,-.0076,-.0787,.1365,-.0847],[66.0885,-1.1878,1.7936,-9.5264,16.3425,.3605,-.0016,.0179,-.1274,-.0072,-.185,.2994,-.1608],[67.302,-1.1912,1.725,-8.4639,12.8607,.3551,-.0016,.0212,-.1358,-.0076,-.2055,.3238,-.1601],[69.6151,-1.1726,1.7606,-8.9219,14.4437,.3387,-.0015,.026,-.1521,-.0094,-.1704,.2659,-.1257],[70.5901,-1.2426,1.8162,-8.921,13.7988,.3388,-.0016,.0283,-.1619,-.016,-.066,.1157,-.069],[74.0399,-1.3696,1.9736,-9.9705,16.4081,.322,-.001,.0261,-.1607,-.0211,.054,-.068,.017],[78.1837,-1.4118,1.9659,-9.2285,13.6521,.2962,-4e-4,.0279,-.176,-.0236,.0265,-.035,.0171],[77.8733,-1.5496,2.1217,-10.0164,15.085,.3117,-.0013,.041,-.234,-.0167,-.141,.2059,-.0717],[78.6258,-1.5819,2.1292,-10.2662,16.5876,.311,-.0011,.0374,-.2191,-.0181,-.0881,.1294,-.044],[78.1114,-1.6551,2.2258,-11.1197,18.7127,.3231,-.0016,.0421,-.2369,-.0174,-.0626,.0903,-.0264],[79.7562,-1.6836,2.2862,-11.9207,21.9312,.3146,-.0013,.038,-.2147,-.0164,-.0397,.0537,-.0083],[81.1825,-1.7413,2.3012,-11.7683,21.4169,.3106,-.0011,.0381,-.2099,-.0197,.0394,-.07,.0551],[82.4317,-1.7326,2.3369,-11.7377,20.8323,.3043,-.0014,.0468,-.2545,-.0145,-.1069,.1451,-.0329],[83.4279,-1.7479,2.3341,-12.1336,23.8773,.3009,-9e-4,.0394,-.2205,-.0159,-.0384,.039,.0189],[87.5318,-1.8801,2.4042,-11.8201,21.5,.2804,0,.0344,-.215,-.0208,-.0131,.0053,.0276],[91.5471,-1.9424,2.5247,-12.4507,21.7964,.2576,5e-4,.0374,-.2444,-.0294,-.0119,.0227,-.01],[92.4497,-1.8508,2.5523,-13.6421,26.226,.2495,0,.0494,-.305,-.0184,-.1813,.2673,-.1041],[92.8328,-1.7523,2.5128,-13.17,23.6191,.2436,5e-4,.0322,-.2188,-.0162,-.1657,.2435,-.0938],[100.346,-1.9852,2.7015,-12.334,16.8429,.2061,.0016,.0236,-.1616,-.0093,-.4796,.6954,-.2616],[106.8231,-1.8617,2.4704,-10.3756,11.994,.1537,.0038,.0071,-.1169,-.0192,-.4992,.7439,-.3113],[111.3953,-1.9833,2.5967,-11.4122,16.0199,.1324,.0046,.0068,-.1417,-.0242,-.6418,.9712,-.431],[117.6411,-2.0964,2.6981,-11.2572,13.4182,.0991,.0053,.0132,-.1836,-.0338,-.4799,.719,-.3037],[121.3735,-2.3828,2.9534,-12.2263,14.8292,.0974,.0055,.0085,-.1487,-.0205,-.6271,.9041,-.3313],[115.9126,-2.5317,3.2788,-15.2093,22.0287,.1601,.0028,.0231,-.181,6e-4,-.7258,1.0194,-.3341],[125.5877,-1.6743,2.6055,-13.4481,23.2621,.0405,.006,-9e-4,-.0707,.0296,-1.1873,1.6794,-.5743],[135.675,-1.8473,2.0605,-8.0487,16.9201,-.0112,.0136,-.0896,.1678,-.0337,.3359,-.5938,.4196]],me=[[36.3363,-.4513,-.2328,28.8499,-129.833,-.0182,7e-4,.0464,-.2691,-.0622,-.2979,.6276,-.5522],[30.6534,-1.0645,-.5369,30.836,-125.69,.1058,.0021,.039,-.2859,-.0568,-.8988,1.5116,-.9035],[46.6521,-.8427,-.8134,29.0051,-109.524,-.0091,.0049,.0484,-.379,-.0684,-.6066,1.0179,-.5945],[34.7995,-1.0943,-.5132,24.8976,-93.9462,.1143,6e-4,.0856,-.4757,-.03,-.9349,1.424,-.6362],[15.9095,-.3518,-.6484,19.5391,-72.0796,.2253,-.0045,.1041,-.5073,.007,-1.3455,2.0777,-.9953],[12.8878,-.0974,-1.0427,20.0319,-66.1203,.2379,-.002,.0402,-.2008,-.0112,-.4679,.7618,-.4226],[3.2759,-.1741,-.7763,16.2511,-53.8662,.3223,-.0044,.0485,-.2089,-.0061,-.2448,.4092,-.2385],[12.846,-.0649,-.8792,16.2183,-50.693,.2474,-.0022,.0311,-.123,-.0255,.239,-.3265,.1012],[12.8668,.1716,-1.0619,16.2814,-49.2028,.2361,-.002,.0293,-.1263,-.0322,.5303,-.7561,.2762],[9.112,.1408,-1.0811,16.1015,-48.0962,.2737,-.0032,.0416,-.1676,-.0278,.5837,-.8523,.3437],[11.7225,-.2667,-.674,14.1978,-45.5872,.284,-.0034,.0505,-.203,-.0368,.5673,-.8255,.3314],[19.5753,-.4609,-.4453,12.7133,-41.9359,.2384,-.002,.0503,-.2232,-.0503,.7475,-1.0987,.4581],[21.1297,-.7489,-.2784,12.1653,-40.6521,.2491,-.0015,.0462,-.2201,-.0415,.5736,-.8537,.3742],[17.5087,-.5589,-.5804,13.6135,-42.3595,.2699,-.0017,.0438,-.2286,-.0325,.5451,-.8138,.3581],[19.125,-.6931,-.358,11.3984,-35.5973,.2679,-9e-4,.0341,-.1992,-.0272,.3386,-.5034,.2204],[12.3312,-.7307,-.2314,9.1993,-27.9046,.3246,-.002,.0272,-.1474,-.0218,.4218,-.6267,.2695],[8.7933,-.5755,-.2574,8.5358,-26.1118,.3473,-.0031,.0313,-.1447,-.0249,.4514,-.6549,.2572],[6.8234,-.7262,-.0687,7.7821,-26.4927,.3781,-.0044,.0462,-.203,-.0214,.2612,-.3714,.1375],[6.5708,-.6226,-.1738,8.0763,-26.5849,.3759,-.0041,.0378,-.1688,-.0223,.3339,-.475,.1725],[12.4952,-.781,.0532,6.8239,-24.2698,.3431,-.0032,.0368,-.1732,-.0262,.1513,-.1909,.0331],[16.8254,-.4175,-.2206,7.4894,-23.9702,.2885,-.0021,.0295,-.1608,-.0154,-.0241,.0763,-.095],[17.8811,-.4367,-.1266,7.0389,-24.15,.2868,-.0028,.0392,-.1928,-.0081,-.278,.4577,-.2641],[16.5734,-.2666,-.2542,7.0108,-22.3832,.2899,-.0032,.0387,-.1806,-.0041,-.2653,.436,-.2519],[19.9011,-.2317,-.3427,7.6601,-23.4789,.2636,-.002,.0303,-.1519,-.0146,-.0788,.162,-.1394],[21.7218,-.2625,-.2345,6.6903,-20.9185,.2553,-.0023,.0347,-.1547,-.023,.0302,.0052,-.0801],[21.9955,-.4947,-.0505,6.3827,-21.7936,.2719,-.0028,.0392,-.1593,-.0334,.1394,-.1536,-.0152],[25.2014,-.5716,.0877,5.7268,-21.1119,.2566,-.0032,.0512,-.2028,-.0358,.0855,-.0747,-.0456],[24.9355,-.6578,.231,4.6551,-18.8514,.2671,-.0039,.0592,-.2224,-.0268,-.0489,.114,-.1096],[23.5259,-.5069,.1119,4.7744,-18.0734,.2698,-.004,.0557,-.2087,-.0263,.0265,.0098,-.0803],[22.6538,-.3685,-.0683,5.5225,-18.8175,.2682,-.0033,.0439,-.1629,-.0299,.2232,-.2808,.039],[25.1343,-.4732,.0854,3.9605,-13.912,.2571,-.0028,.0398,-.1488,-.038,.4146,-.5644,.1571],[26.0776,-.4748,.0973,4.2405,-15.6978,.2526,-.0028,.0409,-.1485,-.0398,.4214,-.5758,.1652],[27.7828,-.4017,.07,4.258,-15.4754,.2367,-.0027,.0432,-.1635,-.035,.3149,-.4222,.1074],[33.321,-.5491,.2782,3.9722,-17.4641,.2081,-.0028,.0559,-.2079,-.0453,.3091,-.4165,.114],[34.8309,-.6942,.426,3.3318,-16.8497,.2081,-.003,.0647,-.2508,-.0416,.1445,-.1779,.0236],[37.5926,-.6443,.3677,3.4067,-16.42,.1823,-.0015,.0474,-.1947,-.0411,.2234,-.2936,.0668],[39.4412,-.5625,.2263,4.2984,-18.3087,.1635,-3e-4,.0348,-.1585,-.0452,.3142,-.4246,.1158],[40.6765,-.6234,.3141,3.8208,-17.9457,.1599,-2e-4,.0372,-.1782,-.041,.1452,-.1684,-.0017],[38.5263,-.6294,.3817,3.0897,-16.2418,.1784,-7e-4,.0354,-.1608,-.0439,.2718,-.3597,.0853],[38.8799,-.7551,.4856,2.734,-15.7989,.186,-8e-4,.037,-.1615,-.0449,.292,-.3993,.1186],[41.2743,-.9011,.6699,2.2512,-16.8137,.1795,-9e-4,.042,-.1746,-.0484,.2216,-.293,.0726],[42.2558,-1.0062,.7158,2.6789,-19.1943,.1817,-9e-4,.0441,-.1858,-.0468,.0978,-.112,.002],[40.2612,-.9872,.7444,1.7973,-16.1566,.1974,-.0012,.0445,-.1857,-.0476,.1203,-.1402,.0055],[43.6457,-1.0069,.734,1.9082,-15.776,.1751,-5e-4,.0411,-.1774,-.054,.2098,-.2758,.0684],[37.4261,-1.0061,.8119,.7582,-12.6239,.2262,-.0023,.0517,-.2087,-.0439,.0866,-.0919,-.0122],[39.6219,-1.2657,1.1924,-1.7105,-7.6258,.228,-.0027,.0582,-.2341,-.047,-.0208,.0811,-.1069],[40.843,-1.2324,1.2238,-1.9885,-7.0689,.2204,-.0032,.0673,-.2749,-.0429,-.1374,.2503,-.1721],[43.5592,-1.2444,1.2281,-1.7233,-8.2869,.2012,-.0024,.0607,-.2564,-.0432,-.1732,.3033,-.1943],[44.6015,-1.2557,1.2143,-1.1069,-11.0077,.197,-.0025,.062,-.2557,-.0368,-.2817,.4521,-.2374],[43.431,-1.4836,1.4844,-2.8301,-7.691,.2221,-.0031,.0664,-.2718,-.0343,-.3518,.5529,-.2744],[40.2503,-1.5293,1.5113,-3.3498,-5.9574,.2524,-.0038,.0674,-.2644,-.0307,-.3766,.5899,-.2912],[38.7912,-1.4248,1.4482,-3.6476,-4.2826,.2581,-.0037,.0597,-.2243,-.033,-.308,.4967,-.266],[43.1602,-1.3762,1.3057,-2.4967,-6.1669,.2217,-.0018,.0357,-.1265,-.0409,-.031,.0745,-.0711],[44.7535,-1.2714,1.1636,-1.6742,-7.0124,.2031,-6e-4,.0171,-.0429,-.0436,.1573,-.2169,.0706],[44.9528,-1.1354,1.0103,-.6896,-9.5126,.1953,-5e-4,.0153,-.0298,-.0404,.1044,-.1372,.0343],[39.8113,-.9011,.8911,-1.1437,-6.6547,.2237,-.002,.0227,-.0406,-.0358,.093,-.1099,.0051],[37.8989,-1.0051,1.0055,-1.5428,-6.9588,.2482,-.0029,.031,-.0735,-.0328,-.0609,.1319,-.119],[35.1924,-.8104,.8253,-.5962,-9.35,.2601,-.0037,.0368,-.0925,-.0269,-.1549,.2764,-.1888],[35.6873,-.7372,.8448,-1.3541,-6.8503,.254,-.0041,.0431,-.1168,-.023,-.2589,.4332,-.2593],[32.6133,-.5491,.7277,-1.3961,-5.5317,.2691,-.0053,.0532,-.1439,-.0153,-.3595,.5813,-.3205],[34.8437,-.4711,.6905,-1.4542,-4.7991,.2492,-.0052,.0579,-.1655,-.0189,-.3396,.557,-.3175],[35.5381,-.4317,.6593,-1.2682,-5.2622,.2433,-.0053,.063,-.1896,-.0217,-.3173,.5302,-.316],[36.1777,-.4466,.641,-.9947,-5.8087,.2409,-.0052,.0631,-.1933,-.022,-.1927,.3323,-.2121],[41.2921,-.4612,.5856,-.5033,-6.0372,.2021,-.0034,.0497,-.1573,-.0331,.0525,-.035,-.0513],[43.0646,-.3308,.3256,1.3124,-9.9318,.1798,-.0016,.0281,-.0904,-.0459,.3232,-.4202,.0842],[44.3551,-.1948,.1835,1.9859,-10.8501,.1628,-.0011,.0241,-.0832,-.0524,.5032,-.684,.19],[41.152,.0212,-.0243,2.9817,-12.3905,.1771,-.0019,.0273,-.0838,-.047,.5514,-.7673,.2434],[40.7747,.1804,-.1901,4.1333,-15.4608,.1742,-.0025,.0343,-.0976,-.0441,.5815,-.8266,.2933],[42.6723,.2057,-.2093,4.492,-16.8094,.1599,-.0024,.0353,-.0956,-.0449,.6759,-.9819,.3834],[44.4726,.1842,-.1287,4.2111,-17.151,.1485,-.0024,.0365,-.0871,-.036,.5025,-.7363,.2978],[44.4307,.0412,.0455,3.5578,-17.0706,.1602,-.0031,.0461,-.1195,-.0272,.2636,-.3881,.1611],[46.146,-.1944,.3303,2.0667,-14.4506,.1634,-.0032,.0504,-.1357,-.0212,.0591,-.0927,.0497],[48.5522,-.2845,.4266,2.1896,-16.3502,.1537,-.0035,.0626,-.1955,-.0152,-.2111,.308,-.1179],[47.5272,-.3843,.5027,1.5489,-14.8051,.1683,-.0032,.0566,-.179,-.0162,-.1752,.2648,-.1172],[42.3688,-.2544,.359,1.5821,-13.3586,.2003,-.0031,.0394,-.1,-.023,.1762,-.2505,.0889],[40.419,-.1244,.2024,2.2651,-13.8723,.2085,-.0028,.0242,-.027,-.0263,.4803,-.717,.3102],[41.2786,-.4001,.5512,.3246,-9.9661,.2234,-.0037,.0333,-.0397,-.0258,.411,-.6274,.2957],[44.5475,-.4095,.5884,.3313,-11.0779,.202,-.0036,.0417,-.0815,-.024,.2501,-.3889,.1968],[48.1433,-.5054,.6845,.6598,-14.3615,.1854,-.0038,.0599,-.1887,-.0266,.0236,-.0355,.0216],[36.6027,-.2846,.4948,.5126,-11.9027,.2648,-.0058,.0611,-.1823,-.0318,.3126,-.4516,.177],[32.668,-.2953,.5385,-.5236,-7.6933,.2977,-.0064,.0584,-.1674,-.0333,.4917,-.7205,.2953],[34.2675,-.3725,.6712,-1.4456,-4.71,.2927,-.0065,.0568,-.1384,-.0262,.4807,-.7367,.354],[34.5736,-.5184,.8798,-2.5558,-3.2479,.3039,-.0074,.0666,-.1528,-.013,.1827,-.311,.2009],[38.2705,-.8498,1.178,-3.1281,-5.8888,.2993,-.0068,.0702,-.2122,-.0147,-.202,.2993,-.1195],[27.2619,-.709,1.1524,-4.729,.3025,.3797,-.0092,.0796,-.2446,-.0222,.1254,-.163,.0363],[30.6429,-.6031,1.1239,-5.8827,7.3287,.3476,-.0081,.0684,-.2186,-.027,.4252,-.6274,.2628],[38.2584,-.5815,1.057,-5.5212,7.7327,.2884,-.0057,.0424,-.1141,-.0255,.4732,-.7143,.3218],[34.2063,-.6992,1.3687,-7.5293,9.9367,.33,-.0072,.0412,-.0552,-.0037,.0265,-.062,.0645],[28.3761,-.5032,1.1656,-6.5035,7.3478,.3702,-.009,.0557,-.0992,.0012,-.2162,.3295,-.1511],[31.5473,-.191,.8482,-4.995,5.5448,.333,-.0093,.0772,-.2338,-.0012,-.3665,.5893,-.3214],[28.0599,-.1241,.7701,-4.7329,5.1931,.3597,-.0102,.0796,-.2161,-.0098,.0298,-.0073,-.0557],[23.6587,.3036,.2722,-3.1305,5.7577,.3693,-.0097,.0627,-.1368,-.0164,.4595,-.6438,.21],[30.6936,.0131,.6061,-3.5047,1.8377,.3406,-.0098,.0776,-.195,-.0166,.1956,-.2534,.0492],[36.2121,-.1094,.7833,-3.9736,.5351,.3083,-.0089,.0774,-.1975,-.0148,.091,-.0977,-.0189],[42.9427,-.2087,1.2659,-7.7504,8.427,.2634,-.0082,.0706,-.1836,.0138,-.4419,.6751,-.3217],[35.6163,-.3308,1.3791,-8.3941,8.0466,.3365,-.0098,.0787,-.2043,-5e-4,-.1455,.2492,-.1613],[52.6206,.342,.8903,-5.8391,3.6866,.1778,-.0082,.0886,-.2524,.0117,-.5949,.9156,-.4441],[73.797,-.1315,1.1805,-3.1333,-12.7158,.0592,-.0043,.0809,-.2789,-.052,.1674,-.2079,.0315],[106.9205,-.8638,1.9387,-5.949,-7.0235,-.131,.0011,.064,-.2761,-.1211,.5938,-.7577,.1352]],he=[[-15.1614,.1585,.7927,-16.2445,64.9588,.7016,-.0159,.0803,-.1501,.0109,.1002,-.1603,.0565],[7.1181,.1808,.1658,-8.1838,41.4072,.5512,-.0095,.054,-.1228,.0057,.0042,.0299,-.0661],[16.6833,-.0164,.2766,-6.0204,29.5897,.5,-.0072,.037,-.0808,-.0092,.0673,-.0993,.0246],[4.2312,.3344,.0389,-4.8857,26.2991,.583,-.0104,.0473,-.0885,9e-4,.0958,-.155,.0586],[7.5365,-.0042,.4065,-5.8405,25.1459,.5865,-.0109,.0523,-.0938,.001,.0934,-.1598,.0738],[9.1488,-.3319,.8441,-9.4288,35.3411,.6019,-.0121,.0661,-.1243,-.0028,.105,-.187,.0975],[8.942,-.0756,.7374,-10.0163,38.7888,.5921,-.0126,.0712,-.1373,.013,.076,-.1417,.0814],[7.6195,.0671,.6085,-8.8982,34.0775,.5961,-.0127,.0706,-.1365,.0147,.0961,-.1812,.1062],[4.7191,.0248,.8039,-10.5118,37.6146,.6241,-.014,.074,-.1321,.0285,.0747,-.1503,.0994],[-3.7807,.2569,.5926,-10.5763,40.4022,.6754,-.0144,.0649,-.1065,.0265,.1273,-.2395,.1377],[-4.3588,.5128,.4441,-11.0057,43.9366,.6643,-.0141,.0598,-.0914,.0297,.1526,-.2899,.1703],[.9793,.277,.5168,-10.2491,40.6962,.6426,-.0127,.0539,-.0858,.0133,.1639,-.2987,.1604],[4.1744,.2919,.5211,-10.2719,41.0334,.6197,-.0121,.0528,-.0869,.0122,.1661,-.3033,.1633],[6.8468,.1938,.5369,-9.8873,39.859,.6088,-.0115,.0517,-.0889,.0046,.1768,-.321,.1715],[11.1461,.2378,.3678,-8.151,35.8557,.5761,-.01,.044,-.0795,-7e-4,.1778,-.321,.1698],[12.4221,.276,.2488,-6.8316,31.9031,.5662,-.0092,.0391,-.073,-.0089,.2003,-.3583,.1859],[10.6386,.5028,.0451,-6.0581,30.8189,.5675,-.0093,.0395,-.0789,-.0048,.1885,-.3309,.1625],[11.895,.4259,.0403,-5.1913,27.4155,.5654,-.0088,.0351,-.0686,-.0151,.216,-.3783,.1854],[15.6199,.2947,.1255,-4.8706,25.2474,.5485,-.0083,.0349,-.0709,-.0153,.1958,-.3402,.1631],[19.1961,.2043,.1214,-4.058,22.8341,.5297,-.0074,.031,-.0656,-.025,.2093,-.3615,.171],[24.9014,.1164,.1324,-3.0351,18.7307,.4951,-.0063,.0283,-.0649,-.0265,.1862,-.3184,.1463],[27.7411,-2e-4,.251,-3.251,17.9354,.4835,-.0062,.0313,-.073,-.026,.1667,-.2835,.1289],[26.5408,-.0132,.3133,-3.6487,17.7499,.4961,-.0068,.0361,-.0837,-.0188,.1384,-.2306,.0976],[24.9608,.0679,.2933,-3.7963,17.8167,.5066,-.0077,.043,-.0991,-.0102,.1136,-.1873,.0762],[30.7628,-.0404,.3473,-3.514,16.9902,.4711,-.0065,.0402,-.0991,-.0135,.1043,-.172,.0705],[32.9166,-.0712,.3957,-3.9,17.9467,.4584,-.0062,.0397,-.0994,-.0111,.0905,-.1473,.0576],[35.8384,-.154,.4647,-4.0996,18.2022,.4447,-.0061,.0445,-.1155,-.0116,.0725,-.1148,.0406],[35.8936,-.2601,.5885,-4.4079,17.6393,.4551,-.0069,.0522,-.1317,-.0062,.042,-.0594,.0107],[35.6599,-.2948,.6396,-4.5403,17.3049,.4616,-.0074,.0559,-.1397,-.0065,.0482,-.0732,.0217],[34.2326,-.3816,.7322,-4.795,17.0262,.4801,-.0079,.0573,-.1393,-.0049,.0527,-.0851,.0332],[38.436,-.518,.8471,-5.2375,18.6249,.4592,-.0074,.0594,-.1493,-.0109,.0578,-.0961,.042],[37.4759,-.3108,.6669,-4.487,17.3228,.4543,-.0072,.0558,-.1401,-.0071,.0668,-.1148,.0546],[38.2626,-.2565,.595,-3.8813,15.733,.4471,-.0072,.0565,-.1436,-.0047,.058,-.0993,.0468],[40.1654,-.373,.7286,-4.669,17.4341,.4421,-.0071,.0576,-.1469,-5e-4,.0365,-.0612,.0272],[42.9794,-.5548,.8878,-5.2907,18.8227,.4348,-.0069,.0595,-.1514,-.0022,.033,-.0585,.0309],[45.6449,-.6118,.8823,-5.0487,18.8985,.4196,-.0061,.0555,-.1462,-.0051,.0381,-.069,.0387],[46.6551,-.5689,.866,-5.0611,19.3856,.41,-.0059,.0537,-.1435,-.0027,.039,-.0728,.0431],[47.5003,-.5697,.8793,-5.203,19.8144,.4057,-.0059,.0563,-.1527,-.0019,.0291,-.0538,.0314],[45.403,-.5065,.8608,-5.5153,21.0092,.4195,-.0064,.0585,-.1569,.0032,.0197,-.0361,.0204],[44.8971,-.395,.8017,-5.6222,21.9379,.4168,-.0064,.0554,-.147,.0027,.0376,-.069,.0382],[47.5247,-.4291,.8436,-5.8317,22.6883,.3999,-.0058,.0527,-.1421,.0015,.0382,-.0702,.0389],[46.463,-.3679,.8717,-6.4206,23.9766,.4049,-.006,.0518,-.1372,.0093,.0233,-.0445,.0258],[43.9842,-.1919,.792,-6.7209,25.4109,.4126,-.0063,.0508,-.1325,.0119,.037,-.0693,.0383],[43.2939,-.2722,.8627,-7.0319,25.6372,.4253,-.0066,.052,-.1346,.0151,.022,-.0414,.0222],[44.9267,-.3058,.9029,-7.1291,25.4723,.4173,-.0066,.054,-.1396,.0166,.008,-.0161,.0087],[45.3659,-.1577,.7596,-6.3854,23.8924,.4047,-.006,.0477,-.1258,.015,.0245,-.0444,.0212],[45.5821,-.0245,.5923,-5.4731,22.294,.3963,-.0056,.046,-.1251,.0164,.0239,-.0431,.0201],[47.1433,-.0461,.591,-5.2852,21.7529,.3877,-.0053,.0449,-.1222,.0153,.0223,-.0412,.0208],[51.495,-.1432,.644,-5.3385,21.775,.3619,-.0042,.0417,-.1223,.0089,.0218,-.0369,.0143],[49.2507,-.0452,.5634,-5.0092,21.3118,.3735,-.0044,.0403,-.1176,.0104,.0345,-.0607,.0278],[48.723,-.0088,.5464,-5.0086,21.4246,.3773,-.0046,.0403,-.114,.0144,.0211,-.0365,.0147],[46.2919,.137,.4328,-4.7097,21.0581,.387,-.0047,.0368,-.1041,.0171,.0335,-.0595,.027],[47.5969,.1489,.3829,-4.2807,20.076,.3772,-.0039,.0315,-.0941,.0134,.0397,-.0681,.0283],[48.5103,.1248,.3886,-4.0219,19.1219,.3741,-.0039,.0318,-.0943,.0115,.0417,-.0714,.03],[47.0617,.2003,.3427,-3.9935,19.2648,.3815,-.0041,.0313,-.0915,.0121,.0505,-.0878,.0394],[47.9002,.1572,.3732,-3.8154,17.8605,.3802,-.0041,.032,-.0944,.0113,.0408,-.067,.024],[49.115,.0782,.4887,-4.5668,19.8764,.3783,-.0042,.0339,-.0974,.0137,.0304,-.0508,.019],[49.9451,.1037,.4323,-3.9989,18.2108,.3716,-.0039,.0318,-.0942,.0126,.0354,-.0602,.0246],[50.1287,.2012,.3324,-3.2058,15.608,.3664,-.0039,.0327,-.0981,.0177,.0133,-.0189,1e-4],[49.51,.1993,.3903,-3.8043,17.1157,.3729,-.0042,.0344,-.1008,.0221,.0041,-.0038,-.0061],[47.0301,.2961,.3665,-3.9702,17.4284,.3864,-.0047,.0328,-.0906,.0207,.0246,-.0408,.0138],[46.9571,.2268,.4324,-4.3249,18.4933,.3932,-.0048,.0332,-.0914,.0225,.0162,-.0255,.0051],[45.7187,.319,.3143,-3.5355,16.3535,.3986,-.0048,.0327,-.0905,.0195,.039,-.0672,.0285],[46.6338,.3294,.3122,-3.6994,16.9404,.3928,-.0047,.0327,-.0892,.02,.0422,-.0754,.036],[46.796,.2184,.4173,-4.2913,18.3125,.4005,-.0048,.0316,-.0843,.0138,.0632,-.1146,.0591],[45.6059,.2609,.3536,-3.7119,16.4744,.409,-.005,.0313,-.0814,.0161,.0671,-.1239,.0669],[46.2843,.1969,.384,-3.6001,15.9912,.4103,-.005,.0321,-.0828,.0153,.0735,-.139,.08],[42.7066,.3391,.2772,-3.5789,16.5957,.4304,-.0057,.0333,-.0798,.0158,.0981,-.1852,.1067],[42.8015,.3061,.3293,-3.7417,16.4765,.4348,-.0061,.0357,-.0812,.0203,.0909,-.1775,.1098],[44.6588,.3589,.2756,-3.1211,14.5181,.4196,-.0059,.0374,-.0881,.0175,.0943,-.1832,.1126],[45.4978,.2369,.3198,-2.8753,12.9699,.4238,-.0058,.0377,-.09,.0126,.0997,-.1911,.1148],[44.3791,.247,.2747,-2.2776,10.7861,.4342,-.0061,.0387,-.0918,.0106,.1113,-.2121,.1265],[44.5213,.3308,.2335,-2.5761,12.6357,.4295,-.006,.0393,-.0953,.015,.1005,-.192,.1141],[43.3339,.3496,.2289,-2.6952,12.6151,.4397,-.0064,.0411,-.0987,.0118,.1138,-.2135,.1223],[45.7745,.2806,.323,-3.0124,12.5836,.4279,-.0062,.0429,-.1061,.0132,.0996,-.1888,.1104],[46.2858,.2501,.3239,-2.6897,11.1237,.4274,-.0059,.0399,-.1008,.0086,.1214,-.2293,.1336],[47.1461,.0565,.3804,-1.9028,7.5777,.4368,-.0058,.0399,-.1016,-.0042,.1495,-.2777,.1579],[49.8411,-.0213,.4353,-2.2574,9.0572,.4224,-.0051,.0374,-.0989,-.0067,.1499,-.2787,.1591],[54.41,-.2754,.6713,-3.3139,10.8614,.4065,-.0045,.0392,-.1059,-.0134,.1536,-.2881,.1687],[59.0571,-.3916,.714,-3.2563,11.6335,.3792,-.0031,.0313,-.0925,-.0235,.1848,-.3462,.2023],[61.5501,-.4923,.8257,-3.7049,12.2735,.3688,-.0028,.0301,-.0892,-.0258,.1974,-.3735,.2231],[62.0991,-.5602,.8523,-3.3702,9.855,.371,-.0025,.0277,-.085,-.0253,.1895,-.3572,.2113],[63.7402,-.7486,1.0333,-4.0639,10.5288,.3743,-.0026,.0296,-.0853,-.0264,.1907,-.3647,.2234],[63.1912,-.7684,1.0572,-4.1343,10.1666,.3825,-.0028,.0301,-.0846,-.0226,.1752,-.3347,.204],[65.29,-.9003,1.2109,-4.7056,10.0344,.3789,-.0031,.0353,-.0982,-.0171,.1415,-.2745,.173],[69.7586,-.9059,1.1421,-3.8514,8.3464,.3466,-.0015,.0272,-.0852,-.0254,.1633,-.3147,.1963],[68.7204,-.7413,1.161,-4.8929,11.4709,.347,-.0023,.0323,-.0945,-.0166,.1384,-.2677,.1676],[70.0709,-.7105,1.1845,-4.9763,11.0263,.3366,-.0017,.0271,-.0857,-.0132,.1197,-.2317,.1451],[71.2247,-.6095,1.0475,-4.2244,9.2028,.3239,-8e-4,.022,-.0796,-.0212,.1383,-.2581,.1496],[71.0728,-.5897,.954,-3.2255,5.828,.3275,-5e-4,.0181,-.0707,-.02,.1457,-.2721,.1573],[70.0217,-.3531,.6571,-1.1748,.806,.3265,-6e-4,.0201,-.0785,-.0091,.1053,-.1976,.115],[70.5203,-.3866,.7711,-1.2734,-1.0004,.3319,-.0017,.0287,-.092,.009,.0424,-.0915,.0678],[76.3547,-.7212,.9341,-1.3303,-1.6526,.314,-2e-4,.0247,-.0938,-.0122,.0896,-.174,.1101],[90.6025,-1.3557,1.1746,.1551,-7.729,.2521,.0034,.0132,-.0881,-.0357,.0885,-.1674,.1033],[102.6662,-1.2263,.8589,3.2534,-15.7885,.1576,.0072,-.0076,-.0516,-.0325,.0706,-.1432,.1009],[102.9154,-1.5899,1.4523,-.5061,-7.5933,.1871,.0055,.002,-.0596,-.0411,.1113,-.2264,.1604],[125.2207,-3.3398,2.9466,-5.4863,-1.908,.1438,.0076,.0111,-.0959,-.1006,.1222,-.2249,.1376],[125.8697,-3.2997,3.1051,-7.3155,3.4281,.1505,.0067,.0193,-.1148,-.0879,.0819,-.1569,.1076],[99.6314,-2.8535,3.065,-6.4997,-4.9829,.3473,-.001,.0499,-.1346,-.0354,-.0379,.0681,-.0284]],ge=[[-13.567,-1.1325,-1.7078,28.8607,-81.1719,.4118,3e-4,-.0263,.0507,-.0087,-.1202,.2977,-.2691],[-43.7777,1.9512,-3.8763,28.8717,-57.6407,.4741,-.0029,-.0496,.1518,-.0191,.1992,-.2879,.0508],[-35.5221,1.6542,-3.2001,22.4882,-41.299,.4425,-.0025,-.0428,.1269,-.0674,.3133,-.465,.1062],[-25.9772,2.0924,-3.8188,24.4956,-38.8551,.3556,3e-4,-.0543,.1499,-.0796,.4423,-.7299,.2906],[-16.9931,2.2497,-3.7873,23.1323,-35.1791,.2916,6e-4,-.0481,.1416,-.0641,.3962,-.6572,.2638],[-19.6683,2.3137,-3.7117,22.8638,-35.7152,.3203,-.0015,-.0388,.1406,-.0689,.4499,-.7699,.3469],[-33.2858,2.7679,-4.0941,22.3138,-27.6548,.3986,-.0021,-.0592,.2053,-.0938,.6243,-1.0803,.5056],[-42.522,3.0229,-4.2155,22.1584,-27.6854,.4632,-.0051,-.0392,.1567,-.0631,.512,-.8671,.3759],[-34.2517,2.7721,-3.6109,17.4453,-15.4161,.4233,-.0055,-.0269,.1286,-.0371,.366,-.6077,.2427],[-42.4833,3.1554,-3.8233,16.9605,-12.0012,.466,-.0072,-.0191,.1105,-.0294,.3572,-.5855,.2225],[-54.4375,3.0764,-3.5785,15.2542,-9.8518,.569,-.0112,-.0014,.0879,-.034,.4004,-.6627,.2631],[-38.5925,2.3768,-3.1326,15.4931,-14.1216,.5015,-.0094,.0059,.0528,-.0475,.355,-.5818,.2245],[-40.8119,2.5241,-3.3547,16.1453,-12.993,.5119,-.0092,.0039,.0554,-.0504,.3968,-.6637,.2771],[-46.3014,2.6717,-3.5156,16.4588,-11.9729,.5495,-.0106,.0106,.0468,-.0493,.4299,-.7314,.3246],[-47.6314,2.9586,-3.758,16.7192,-10.3567,.5434,-.0102,.0067,.0518,-.0595,.4837,-.8241,.3686],[-41.6665,2.9392,-3.8754,17.5857,-10.8233,.4983,-.0073,-.0149,.0964,-.0817,.5737,-.987,.4563],[-45.7369,2.9396,-3.8633,17.231,-10.561,.5321,-.008,-.0146,.1016,-.0765,.5824,-1.0084,.4748],[-51.929,2.9378,-3.7832,15.9238,-7.0752,.586,-.0101,-.0013,.0747,-.0647,.5498,-.9515,.4469],[-45.8559,3.0516,-3.9216,17.0729,-10.1336,.5356,-.0086,-.0063,.0786,-.0616,.5196,-.8956,.415],[-39.5605,2.8551,-3.5847,14.9465,-5.3128,.5025,-.0082,-.003,.0687,-.0683,.5134,-.8848,.4109],[-33.7657,2.9223,-3.533,14.1257,-2.6863,.4575,-.0075,-.0012,.0596,-.0664,.4876,-.8388,.3872],[-32.281,2.6018,-3.2278,12.8399,-.8793,.472,-.0081,.0063,.0419,-.062,.4496,-.7751,.3605],[-31.5797,2.3929,-2.9101,11.2038,1.5782,.4845,-.0091,.0143,.0265,-.0586,.4152,-.712,.3258],[-32.2816,2.6349,-3.0487,11.5875,.5188,.4779,-.0097,.0203,.0104,-.044,.3694,-.6297,.2818],[-25.44,2.7183,-3.2535,13.5284,-4.0414,.421,-.007,.0038,.0396,-.0469,.3676,-.6261,.2792],[-22.8873,2.5652,-3.2543,13.672,-3.1603,.4141,-.0056,-.0066,.0583,-.0566,.3787,-.6382,.2747],[-20.7911,2.6849,-3.4699,14.9131,-5.2628,.3921,-.0042,-.015,.0686,-.0663,.3974,-.6642,.2789],[-18.557,2.4292,-3.0989,12.2737,1.0228,.3937,-.0045,-.0121,.0655,-.073,.4005,-.667,.277],[-17.5306,2.5085,-3.1093,11.7413,3.3022,.3838,-.0047,-.009,.0598,-.0637,.3744,-.6243,.2595],[-14.3488,2.3673,-3.0068,11.4653,3.7471,.3712,-.004,-.0129,.0679,-.0681,.3759,-.6244,.2561],[-16.6395,2.3516,-2.9622,11.2382,3.1551,.3924,-.0047,-.0114,.0678,-.0675,.3777,-.6258,.2543],[-10.6475,2.2971,-2.8656,10.1755,7.4446,.3509,-.0034,-.0169,.0752,-.0763,.3958,-.6548,.2643],[-10.0847,2.4662,-2.9361,10.2311,6.9534,.3368,-.0033,-.0182,.08,-.073,.3922,-.6484,.2607],[-9.646,2.4037,-2.8587,10.171,5.6614,.3398,-.0036,-.0141,.0709,-.0667,.3688,-.6116,.2487],[-5.5,2.2058,-2.7946,11.4006,-.0691,.3246,-.003,-.0129,.0635,-.0713,.3492,-.5757,.231],[-3.1184,2.0845,-2.7566,11.9122,-2.7527,.3161,-.0025,-.0137,.0596,-.0779,.347,-.5661,.2186],[-1.8889,1.938,-2.5612,10.5284,.4557,.3178,-.0027,-.01,.0505,-.0868,.3703,-.6072,.2401],[1.3652,1.8159,-2.5509,11.3987,-2.5982,.3031,-.002,-.0117,.0496,-.095,.3856,-.6354,.2568],[4.1129,1.8155,-2.5332,11.0415,-.7368,.2849,-.0018,-.0081,.038,-.0883,.364,-.6035,.2493],[1.4862,1.9999,-2.7504,12.2222,-3.4789,.295,-.0018,-.0113,.0461,-.0881,.3736,-.6168,.2503],[-2.474,2.0859,-2.8319,12.5224,-3.8212,.3229,-.0028,-.0094,.0487,-.086,.392,-.6551,.2772],[-.415,1.9078,-2.6838,12.7489,-6.852,.3217,-.0029,-.0082,.0472,-.0801,.3635,-.6077,.2576],[-.0497,1.8113,-2.6253,12.8018,-7.7129,.3277,-.0029,-.0071,.0414,-.0794,.3497,-.5807,.2402],[-1.5833,1.7827,-2.6894,13.4925,-9.1732,.3439,-.003,-.0061,.0371,-.0845,.3665,-.6098,.2548],[1.209,1.7298,-2.6076,12.8518,-6.9268,.3277,-.0027,-.0052,.0323,-.087,.3703,-.6203,.2656],[1.2834,1.6318,-2.5106,12.1368,-4.9164,.335,-.0025,-.0086,.0415,-.0924,.386,-.6467,.2773],[-.4438,1.6936,-2.4801,11.7414,-4.8147,.3463,-.0031,-.0075,.0435,-.0895,.3834,-.6422,.2749],[-.2325,1.613,-2.4272,12.1673,-8.1046,.3529,-.0033,-.0065,.0434,-.0851,.3606,-.6019,.2545],[-2.1989,1.6982,-2.4926,12.7697,-10.7769,.3643,-.0037,-.0061,.0459,-.0859,.3821,-.6441,.2821],[-.8411,1.6919,-2.4301,12.0592,-8.667,.3572,-.004,-5e-4,.0305,-.0865,.3748,-.6317,.2776],[.1678,1.6387,-2.3829,11.423,-6.0839,.3552,-.0038,-4e-4,.0275,-.0933,.3894,-.6552,.2867],[.8079,1.7778,-2.4652,11.0582,-4.0097,.3404,-.0029,-.0096,.0477,-.0928,.4036,-.6792,.2963],[-1.1219,1.8103,-2.4361,10.7708,-4.1791,.3561,-.0036,-.0078,.0484,-.0819,.3736,-.6278,.2717],[-4.8133,1.8058,-2.331,9.8828,-2.9487,.3871,-.0049,-.0019,.0409,-.0736,.3513,-.5879,.2503],[-8.1979,2.0298,-2.494,10.6089,-5.3076,.4011,-.0058,.0028,.0321,-.0692,.3504,-.5851,.247],[-6.752,2.0613,-2.4814,10.131,-3.6573,.3884,-.0055,2e-4,.0371,-.0753,.3769,-.6294,.2655],[-3.566,1.8329,-2.2802,9.0883,-.4962,.3807,-.005,-7e-4,.0371,-.081,.3819,-.6401,.2738],[1.0387,1.7975,-2.2844,9.2486,-.6268,.3494,-.0037,-.0064,.0437,-.0821,.3621,-.6004,.2472],[1.6962,1.5592,-2.1909,9.9497,-4.5187,.3625,-.0033,-.0098,.0505,-.0904,.364,-.5976,.2383],[1.7174,1.6924,-2.3499,11.1189,-8.075,.3556,-.0029,-.0144,.0602,-.0871,.3514,-.5716,.2195],[-1.1808,1.896,-2.4788,11.4555,-8.5302,.3668,-.0036,-.0124,.0586,-.0775,.3326,-.5377,.2006],[-1.9286,1.8974,-2.4107,10.6569,-6.2357,.3747,-.0042,-.0079,.0509,-.0731,.3224,-.5217,.1951],[-.6762,1.6316,-2.0498,8.2301,-.4293,.3859,-.0052,.0017,.0314,-.0748,.3067,-.4907,.1753],[.0177,1.3931,-1.7224,6.2104,3.67,.398,-.006,.0074,.0231,-.0781,.3064,-.4907,.1763],[1.8242,1.4415,-1.8531,7.4867,.3209,.381,-.0045,-.0055,.0517,-.0808,.3148,-.504,.181],[3.3864,1.5296,-1.8957,8.1805,-2.714,.3667,-.0046,-.0044,.0516,-.0669,.2582,-.4028,.1272],[1.4518,1.5557,-2.0588,9.891,-7.5275,.3836,-.0047,-.0045,.0515,-.0676,.2556,-.3964,.1218],[-.2228,1.7851,-2.3148,11.3445,-10.9345,.3835,-.0048,-.0063,.0572,-.0663,.2738,-.4312,.1425],[-1.2686,1.848,-2.3626,11.0795,-8.9995,.3885,-.0049,-.0053,.0531,-.0765,.3143,-.5003,.1745],[-1.1771,1.9498,-2.33,9.7844,-3.6954,.382,-.0052,-.0022,.0473,-.0778,.3354,-.5421,.202],[-1.5905,1.9246,-2.2012,8.7588,-1.7051,.39,-.0063,.0071,.0279,-.0723,.315,-.5067,.1847],[1.3907,1.7403,-1.9434,6.9646,2.6064,.3789,-.006,.0072,.0262,-.0787,.3279,-.5282,.1939],[5.7059,1.724,-1.9265,7.7741,-2.061,.3493,-.0054,.0068,.0244,-.0694,.282,-.4467,.1515],[12.6597,1.3459,-1.7148,8.837,-8.9553,.3265,-.0048,.0144,-.0045,-.065,.1958,-.2892,.0669],[14.3993,1.3957,-1.9442,11.1527,-15.7051,.3118,-.0037,.0089,-4e-4,-.0745,.2201,-.3286,.0822],[17.6818,1.388,-1.9866,11.7883,-17.7697,.2899,-.0031,.0095,-.0089,-.0708,.1938,-.2807,.056],[11.917,1.6817,-2.3045,13.3873,-21.1645,.3206,-.0046,.0186,-.0278,-.0691,.2114,-.3145,.0776],[9.2777,1.6967,-2.2055,11.4045,-13.2029,.3418,-.0056,.0253,-.0412,-.0758,.2487,-.3832,.1165],[5.8584,1.6874,-2.0515,9.5688,-8.1664,.3719,-.0073,.0382,-.0675,-.0715,.2508,-.3923,.1289],[9.3245,1.5374,-1.8954,9.7989,-11.7858,.3581,-.0073,.0413,-.0754,-.063,.2057,-.3147,.0928],[16.2286,1.2597,-1.7964,11.1013,-18.2966,.3267,-.0058,.0385,-.0835,-.0656,.1577,-.2201,.0326],[15.2268,1.0841,-1.7857,12.168,-22.5467,.3504,-.0059,.0373,-.0777,-.0718,.1751,-.253,.0528],[10.4724,1.4733,-2.2295,13.8392,-23.1801,.3634,-.0056,.0276,-.0497,-.0848,.2636,-.4153,.1436],[5.2365,1.5165,-2.1802,12.4214,-17.9441,.4039,-.0071,.0317,-.0486,-.0919,.3179,-.5147,.1988],[10.1259,1.4465,-1.9666,11.6878,-19.1724,.3722,-.0063,.0273,-.0379,-.0743,.2451,-.3873,.1349],[8.7996,1.6042,-2.2123,13.8638,-26.1613,.3767,-.006,.0209,-.0216,-.0624,.2044,-.3117,.0907],[7.3808,1.9753,-2.5467,14.6551,-24.7762,.366,-.0058,.0184,-.0173,-.0685,.2633,-.4213,.1535],[8.2409,1.8093,-1.8703,8.5537,-10.4574,.3742,-.008,.033,-.0361,-.0481,.1904,-.2951,.0924],[16.3443,1.4613,-1.5844,8.5531,-13.7014,.3376,-.0067,.028,-.0305,-.0421,.1473,-.2208,.0564],[13.6814,1.7899,-2.0949,11.8906,-20.3017,.3408,-.0062,.0239,-.0268,-.0499,.1898,-.2958,.0953],[-2.2305,2.0458,-2.0636,8.7608,-9.0684,.4491,-.0095,.0277,-.0118,-.0522,.2641,-.4295,.1659],[7.1024,1.4245,-1.2884,5.4006,-5.1633,.4266,-.0107,.0507,-.0701,-.0223,.0801,-.0982,-.0105],[22.5224,1.2411,-1.1587,5.4827,-6.229,.3231,-.008,.0497,-.0852,-.035,.0837,-.1047,-.0066],[7.1688,2.0574,-2.1429,8.7073,-6.973,.3913,-.0079,.0285,-.027,-.0746,.3209,-.5246,.2072],[10.9219,1.7121,-1.5447,6.0756,-5.588,.3914,-.0095,.0458,-.0634,-.034,.1515,-.2269,.0567],[.0292,1.3826,-1.5163,7.1831,-10.5716,.5124,-.0137,.0821,-.1555,-.0443,.1613,-.2416,.0645],[-7.4708,1.924,-1.6304,5.8484,-7.4136,.5394,-.0152,.0752,-.1166,-.0193,.205,-.3492,.1599],[17.4158,1.6902,-1.3304,3.6898,3.0431,.3737,-.0096,.0478,-.0772,-.0183,.131,-.2054,.0662],[-2.725,3.8134,-2.3052,3.5243,8.0191,.4042,-.0133,.0238,.0586,.0627,.0422,-.052,-.018]];function M(e){let t=e<0?-1:1,n=Math.abs(e)/Math.sqrt(2),r=1/(1+.3275911*n);return .5*(1+t*(1-((((1.061405429*r+-1.453152027)*r+1.421413741)*r+-.284496736)*r+.254829592)*r*Math.exp(-n*n)))}function N(e,t,n){let r=Math.max(0,Math.min(217,Math.round(e*12)-24)),i,a,o;t===`female`?(i=le[r],a=ue[r],o=de[r]):(i=A[r],a=j[r],o=fe[r]);let s=((n/a)**+i-1)/(i*o);return{z:s,percentile:M(s)*100}}function P(e,t,n,r,i){let a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b;t===`female`?(a=106.7,o=140.7,s=154,c=160.5,l=168.9,u=5,d=10.7,f=13.16,p=14.51,m=17.33,h=6.701,g=16.438,_=46.8,v=84.46,y=203.608,b=(e-10)*(n-147)):(a=107.8,o=140,s=154.5,c=166.4,l=179.1,u=5.06,d=10.79,f=13.22,p=14.51,m=17.3,h=-15,g=8.9,_=50.375,v=112.684,y=250.04,b=(e-10)*(n-150));let x=n,S=e,C=Math.max(0,x-a),w=Math.max(0,x-c),T=Math.max(0,x-l),ee=C**3-w**3*(l-a)/(l-c)+T**3*(c-a)/(l-c),te=Math.max(0,x-o)**3-w**3*(l-o)/(l-c)+T**3*(c-o)/(l-c),ne=Math.max(0,x-s)**3-w**3*(l-s)/(l-c)+T**3*(c-s)/(l-c),E=ee/100,re=te/100,ie=ne/100,ae=Math.max(0,S-u),D=Math.max(0,S-p),O=Math.max(0,S-m),k=ae**3-D**3*(m-u)/(m-p)+O**3*(p-u)/(m-p),oe=Math.max(0,S-d)**3-D**3*(m-d)/(m-p)+O**3*(p-d)/(m-p),se=Math.max(0,S-f)**3-D**3*(m-f)/(m-p)+O**3*(p-f)/(m-p),ce=k/100,le=oe/100,ue=se/100,de=Math.max(0,b-h),A=Math.max(0,b-v),j=Math.max(0,b-y),fe=de**3-A**3*(y-h)/(y-v)+j**3*(v-h)/(y-v),M=Math.max(0,b-g)**3-A**3*(y-g)/(y-v)+j**3*(v-g)/(y-v),N=Math.max(0,b-_)**3-A**3*(y-_)/(y-v)+j**3*(v-_)/(y-v),P=fe/1e4,F=M/1e4,I=N/1e4,L;L=t===`female`?r===`sys`?pe:me:r===`sys`?he:ge;let R=Array(99);for(let e=0;e<99;e++)R[e]=L[e][0]+L[e][5]*x+L[e][6]*E+L[e][7]*re+L[e][8]*ie+L[e][1]*S+L[e][2]*ce+L[e][3]*le+L[e][4]*ue+L[e][9]*b+L[e][10]*P+L[e][11]*F+L[e][12]*I;let z=1/0,B=50;for(let e=0;e<99;e++){let t=Math.abs(i-R[e]);t<z&&(z=t,B=e+1)}return{percentile:B,predicted:R}}function F(e,t,n,r,i){let a,o;e>=13?(a=r>=140?`stage2`:r>=130?`stage1`:r>=120?`elevated`:`normal`,o=i>=90?`stage2`:i>=80?`stage1`:`normal`):(a=t>=107||r>=140?`stage2`:t>=95||r>=130?`stage1`:t>=90||r>=120?`elevated`:`normal`,o=n>=107||i>=90?`stage2`:n>=95||i>=80?`stage1`:n>=90?`elevated`:`normal`);let s={normal:0,elevated:1,stage1:2,stage2:3},c=s[a]>=s[o]?a:o;return{sysClass:a,diaClass:o,classification:c}}function I(e,t,n,r,i){let a=N(e,t,n),o=P(e,t,n,`sys`,r),s=P(e,t,n,`dia`,i),c=F(e,o.percentile,s.percentile,r,i);return{sysPercentile:o.percentile,diaPercentile:s.percentile,heightPercentile:a.percentile,sysClass:c.sysClass,diaClass:c.diaClass,classification:c.classification}}var L=n(),R=`rounded-lg border border-border bg-card p-5 space-y-3`,z=`w-full rounded-md border border-input bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-ring`,B=`block text-xs font-medium text-muted-foreground`,_e=`rounded-md bg-primary text-primary-foreground px-4 py-2 text-sm font-medium`,ve=`rounded-md border border-border bg-background px-4 py-2 text-sm font-medium hover:bg-muted`,ye=`rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:bg-red-950/30 dark:text-red-200`,V={normal:{label:`Normal`,color:`#10b981`,bg:`#d1fae5`},elevated:{label:`Elevated`,color:`#f59e0b`,bg:`#fef3c7`},stage1:{label:`Stage 1 Hypertension`,color:`#f97316`,bg:`#ffedd5`},stage2:{label:`Stage 2 Hypertension`,color:`#ef4444`,bg:`#fee2e2`}};function be(){let[e,t]=(0,l.useState)(``),[n,r]=(0,l.useState)(`female`),[i,a]=(0,l.useState)(``),[o,s]=(0,l.useState)(``),[c,u]=(0,l.useState)(``),[d,f]=(0,l.useState)(``),[p,m]=(0,l.useState)(null);function h(){let t=Number.parseFloat(e),r=Number.parseFloat(i),a=Number.parseFloat(o),s=Number.parseFloat(c);if(!Number.isFinite(t)||!Number.isFinite(r)||!Number.isFinite(a)||!Number.isFinite(s)){f(`Fill in all fields.`),m(null);return}if(t<1||t>17){f(`Age must be 1-17 years.`),m(null);return}if(r<50||r>200){f(`Height must be 50-200 cm.`),m(null);return}f(``),m(I(t,n,r,a,s))}let g=p?V[p.classification]:null;return(0,L.jsxs)(`section`,{className:R,"data-testid":`calc-panel-bp`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`BP Percentile (AAP 2017)`}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:B,children:`Age (years)`}),(0,L.jsx)(`input`,{type:`number`,min:`1`,max:`17`,step:`0.1`,className:z,value:e,onChange:e=>t(e.target.value),"data-testid":`bp-age`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:B,children:`Sex`}),(0,L.jsxs)(`select`,{className:z,value:n,onChange:e=>r(e.target.value),"data-testid":`bp-sex`,children:[(0,L.jsx)(`option`,{value:`female`,children:`Female`}),(0,L.jsx)(`option`,{value:`male`,children:`Male`})]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:B,children:`Height (cm)`}),(0,L.jsx)(`input`,{type:`number`,min:`50`,max:`200`,step:`0.1`,className:z,value:i,onChange:e=>a(e.target.value),"data-testid":`bp-height`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:B,children:`SBP (mmHg)`}),(0,L.jsx)(`input`,{type:`number`,min:`50`,max:`220`,step:`1`,className:z,value:o,onChange:e=>s(e.target.value),"data-testid":`bp-sbp`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:B,children:`DBP (mmHg)`}),(0,L.jsx)(`input`,{type:`number`,min:`30`,max:`150`,step:`1`,className:z,value:c,onChange:e=>u(e.target.value),"data-testid":`bp-dbp`})]})]}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:h,className:_e,"data-testid":`calc-bp-calculate`,children:`Calculate`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>{t(``),a(``),s(``),u(``),m(null),f(``)},className:ve,children:`Clear`})]}),d&&(0,L.jsx)(`div`,{className:ye,children:d}),p&&g&&(0,L.jsxs)(`div`,{className:`rounded-lg p-4 space-y-2`,style:{background:g.bg,borderLeft:`4px solid ${g.color}`},"data-testid":`calc-bp-result`,children:[(0,L.jsx)(`div`,{className:`text-base font-bold`,style:{color:g.color},children:g.label}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-3 text-sm`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`Systolic`}),(0,L.jsxs)(`div`,{className:`font-semibold`,children:[p.sysPercentile,`th %ile`]}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:V[p.sysClass].label})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`Diastolic`}),(0,L.jsxs)(`div`,{className:`font-semibold`,children:[p.diaPercentile,`th %ile`]}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:V[p.diaClass].label})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`Height`}),(0,L.jsxs)(`div`,{className:`font-semibold`,children:[p.heightPercentile.toFixed(0),`th %ile`]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`Overall`}),(0,L.jsx)(`div`,{className:`font-semibold`,children:g.label})]})]})]}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground italic`,children:`Flynn JT et al. Clinical Practice Guideline for Screening and Management of High Blood Pressure in Children and Adolescents. Pediatrics 2017;140(3):e20171904.`})]})}function xe(){let[e,t]=(0,l.useState)(``),[n,r]=(0,l.useState)(``),[i,a]=(0,l.useState)(`male`),[o,s]=(0,l.useState)(``),[c,u]=(0,l.useState)(``),[d,f]=(0,l.useState)(``),[p,m]=(0,l.useState)(null);function h(){let t=(Number.parseFloat(e)||0)+(Number.parseInt(n,10)||0)/12,r=Number.parseFloat(o),a=Number.parseFloat(c);if(!t||!Number.isFinite(r)||r<=0||!Number.isFinite(a)||a<=0){f(`Fill in all fields.`),m(null);return}if(t<2||t>20){f(`Age must be 2-20 years.`),m(null);return}f(``),m(ce(r,a,Math.round(t*12),i))}return(0,L.jsxs)(`section`,{className:R,"data-testid":`calc-panel-bmi`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`BMI Percentile (CDC 2000)`}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 sm:col-span-1`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:B,children:`Age (yr)`}),(0,L.jsx)(`input`,{type:`number`,min:`2`,max:`20`,step:`0.1`,className:z,value:e,onChange:e=>t(e.target.value),"data-testid":`bmi-age-yr`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:B,children:`Months`}),(0,L.jsx)(`input`,{type:`number`,min:`0`,max:`11`,className:z,value:n,onChange:e=>r(e.target.value),"data-testid":`bmi-age-mo`})]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:B,children:`Sex`}),(0,L.jsxs)(`select`,{className:z,value:i,onChange:e=>a(e.target.value),"data-testid":`bmi-sex`,children:[(0,L.jsx)(`option`,{value:`male`,children:`Male`}),(0,L.jsx)(`option`,{value:`female`,children:`Female`})]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`label`,{className:B,children:`Weight (kg)`}),(0,L.jsx)(`input`,{type:`number`,min:`1`,max:`200`,step:`0.1`,className:z,value:o,onChange:e=>s(e.target.value),"data-testid":`bmi-weight`})]}),(0,L.jsxs)(`div`,{className:`sm:col-span-1`,children:[(0,L.jsx)(`label`,{className:B,children:`Height (cm)`}),(0,L.jsx)(`input`,{type:`number`,min:`50`,max:`220`,step:`0.1`,className:z,value:c,onChange:e=>u(e.target.value),"data-testid":`bmi-height`})]})]}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:h,className:_e,"data-testid":`calc-bmi-calculate`,children:`Calculate`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>{t(``),r(``),s(``),u(``),m(null),f(``)},className:ve,children:`Clear`})]}),d&&(0,L.jsx)(`div`,{className:ye,children:d}),p&&(0,L.jsxs)(`div`,{className:`rounded-lg p-4 space-y-2`,style:{background:p.classification.bg,borderLeft:`4px solid ${p.classification.color}`},"data-testid":`calc-bmi-result`,children:[(0,L.jsx)(`div`,{className:`text-base font-bold`,style:{color:p.classification.color},children:p.classification.label}),(0,L.jsxs)(`div`,{className:`text-sm`,children:[`BMI `,p.bmi.toFixed(1),` kg/m² — `,p.percentile,`th percentile`]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-3 text-sm`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`BMI`}),(0,L.jsx)(`div`,{className:`font-semibold`,children:p.bmi.toFixed(1)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`Percentile`}),(0,L.jsxs)(`div`,{className:`font-semibold`,children:[p.percentile,`th`]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`Z-Score`}),(0,L.jsx)(`div`,{className:`font-semibold`,children:p.z.toFixed(2)})]}),p.percentile>=85&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`% of 95th`}),(0,L.jsxs)(`div`,{className:`font-semibold`,children:[p.classification.pctOf95.toFixed(0),`%`]})]})]})]}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground italic`,children:`CDC 2000 LMS tables · Kuczmarski et al. Vital Health Stat 11. 2002;(246).`})]})}var Se={premie:{label:`Premie`,hr:{awake:`120-170`,sleeping:`100-150`},rr:`40-70`,sbp:`55-75`,dbp:`35-45`,temp:`36.5-37.5`,weight:`0.5-2.5 kg`,spo2:`88-95% (target)`,notes:[`HR and RR are highly variable and depend on gestational age`,`BP increases with gestational age and postnatal age`,`Target SpO2 88-95% to reduce retinopathy of prematurity risk`,`Temperature instability is common — use servo-controlled warmers`,`Bradycardia (<100 bpm) and apnea are common in premature infants`]},"0-3mo":{label:`0-3 Months`,hr:{awake:`100-150`,sleeping:`85-135`},rr:`35-55`,sbp:`65-85`,dbp:`45-55`,temp:`36.5-37.5`,weight:`2.5-6 kg`,spo2:`>95%`,notes:[`HR normally increases with crying (up to 180-190 bpm) — this is physiologic`,`Periodic breathing (pauses <10 sec) is normal in neonates`,`Acrocyanosis (blue hands/feet) is normal; central cyanosis is not`,`BP is best measured in the right arm (pre-ductal) in neonates`,`Normal weight loss of 5-7% in first 3-5 days; regain by 10-14 days`]},"3-6mo":{label:`3-6 Months`,hr:{awake:`90-120`,sleeping:`75-110`},rr:`30-45`,sbp:`70-90`,dbp:`50-65`,temp:`36.5-37.5`,weight:`5-8 kg`,spo2:`>95%`,notes:[`Expected weight gain: 20-30 g/day (150-200 g/week)`,`HR gradually decreases as vagal tone matures`,`RR >60 at rest may indicate lower respiratory tract disease`,`BP should be measured with appropriate cuff size (width 40% of arm circumference)`]},"6-12mo":{label:`6-12 Months`,hr:{awake:`80-120`,sleeping:`70-110`},rr:`25-40`,sbp:`80-100`,dbp:`55-65`,temp:`36.0-37.5`,weight:`8-10 kg`,spo2:`>95%`,notes:[`Expected weight: triple birth weight by 12 months (~10 kg average)`,`Weight gain slows to ~10-15 g/day`,`Sinus arrhythmia (HR varies with breathing) is normal`,`Febrile tachycardia: HR increases ~10 bpm per 1 degree C above 37`]},"1-3yr":{label:`1-3 Years`,hr:{awake:`70-110`,sleeping:`60-100`},rr:`20-30`,sbp:`90-105`,dbp:`55-70`,temp:`36.0-37.5`,weight:`10-15 kg`,spo2:`>95%`,notes:[`Expected weight gain: ~200-250 g/month (2-2.5 kg/year)`,`Tachycardia: HR >110 at rest warrants evaluation`,`Tachypnea: RR >30 at rest may indicate respiratory distress`,`BP screening begins at age 3 per AAP 2017 guidelines`,`Estimated weight: 2 x (age in years) + 8`]},"3-6yr":{label:`3-6 Years`,hr:{awake:`65-110`,sleeping:`55-100`},rr:`20-25`,sbp:`95-110`,dbp:`60-75`,temp:`36.0-37.5`,weight:`14-20 kg`,spo2:`>95%`,notes:[`Annual BP screening recommended from age 3`,`Normal BP <90th percentile for age, sex, and height`,`Elevated BP: 90th to <95th percentile (or 120/80 if lower)`,`Estimated weight: 2 x (age in years) + 8`,`ETT size (uncuffed): (age/4) + 4`]},"6-12yr":{label:`6-12 Years`,hr:{awake:`60-95`,sleeping:`50-85`},rr:`14-22`,sbp:`100-120`,dbp:`60-75`,temp:`36.0-37.5`,weight:`20-40 kg`,spo2:`>95%`,notes:[`Resting HR >95 or <60 warrants evaluation`,`BP should be measured at every clinical encounter`,`Stage 1 HTN: >=95th percentile on 3 separate occasions`,`Estimated weight: 3 x (age in years) + 7`,`ETT size (cuffed): (age/4) + 3.5`]},">12yr":{label:`>12 Years`,hr:{awake:`55-85`,sleeping:`45-75`},rr:`12-18`,sbp:`110-135`,dbp:`65-85`,temp:`36.0-37.5`,weight:`40-80 kg`,spo2:`>95%`,notes:[`Vital signs approach adult values`,`From age 13: use adult BP thresholds (AAP 2017)`,`Normal: <120/<80 mmHg; Elevated: 120-129/<80 mmHg`,`Stage 1 HTN: 130-139/80-89 mmHg; Stage 2 HTN: >=140/>=90 mmHg`,`Orthostatic vitals: measure lying, sitting, standing if dizzy`,`Athletic bradycardia (HR 45-60) may be normal in trained adolescents`]}},Ce=[`premie`,`0-3mo`,`3-6mo`,`6-12mo`,`1-3yr`,`3-6yr`,`6-12yr`,`>12yr`];function we(){let[e,t]=(0,l.useState)(`1-3yr`),n=Se[e];return(0,L.jsxs)(`section`,{className:R,"data-testid":`calc-panel-vitals`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Vital Signs by Age`}),(0,L.jsxs)(`div`,{className:`max-w-xs`,children:[(0,L.jsx)(`label`,{className:B,children:`Age group`}),(0,L.jsx)(`select`,{className:z,value:e,onChange:e=>t(e.target.value),"data-testid":`vitals-age-select`,children:Ce.map(e=>(0,L.jsx)(`option`,{value:e,children:Se[e].label},e))})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-4 gap-3 text-sm`,"data-testid":`vitals-result`,children:[(0,L.jsxs)(`div`,{className:`rounded-md bg-muted/40 p-3`,children:[(0,L.jsx)(`div`,{className:`text-xs uppercase text-muted-foreground`,children:`Heart rate (awake)`}),(0,L.jsxs)(`div`,{className:`font-semibold`,children:[n.hr.awake,` bpm`]})]}),(0,L.jsxs)(`div`,{className:`rounded-md bg-muted/40 p-3`,children:[(0,L.jsx)(`div`,{className:`text-xs uppercase text-muted-foreground`,children:`Heart rate (sleep)`}),(0,L.jsxs)(`div`,{className:`font-semibold`,children:[n.hr.sleeping,` bpm`]})]}),(0,L.jsxs)(`div`,{className:`rounded-md bg-muted/40 p-3`,children:[(0,L.jsx)(`div`,{className:`text-xs uppercase text-muted-foreground`,children:`Respiratory rate`}),(0,L.jsxs)(`div`,{className:`font-semibold`,children:[n.rr,` /min`]})]}),(0,L.jsxs)(`div`,{className:`rounded-md bg-muted/40 p-3`,children:[(0,L.jsx)(`div`,{className:`text-xs uppercase text-muted-foreground`,children:`SpO₂`}),(0,L.jsx)(`div`,{className:`font-semibold`,children:n.spo2})]}),(0,L.jsxs)(`div`,{className:`rounded-md bg-muted/40 p-3`,children:[(0,L.jsx)(`div`,{className:`text-xs uppercase text-muted-foreground`,children:`SBP`}),(0,L.jsxs)(`div`,{className:`font-semibold`,children:[n.sbp,` mmHg`]})]}),(0,L.jsxs)(`div`,{className:`rounded-md bg-muted/40 p-3`,children:[(0,L.jsx)(`div`,{className:`text-xs uppercase text-muted-foreground`,children:`DBP`}),(0,L.jsxs)(`div`,{className:`font-semibold`,children:[n.dbp,` mmHg`]})]}),(0,L.jsxs)(`div`,{className:`rounded-md bg-muted/40 p-3`,children:[(0,L.jsx)(`div`,{className:`text-xs uppercase text-muted-foreground`,children:`Temperature`}),(0,L.jsxs)(`div`,{className:`font-semibold`,children:[n.temp,` °C`]})]}),(0,L.jsxs)(`div`,{className:`rounded-md bg-muted/40 p-3`,children:[(0,L.jsx)(`div`,{className:`text-xs uppercase text-muted-foreground`,children:`Weight`}),(0,L.jsx)(`div`,{className:`font-semibold`,children:n.weight})]})]}),(0,L.jsxs)(`div`,{className:`rounded-md bg-blue-50 dark:bg-blue-950/30 p-3 text-xs`,children:[(0,L.jsx)(`div`,{className:`font-semibold mb-1`,children:`Clinical notes`}),(0,L.jsx)(`ul`,{className:`list-disc pl-5 space-y-0.5`,children:n.notes.map((e,t)=>(0,L.jsx)(`li`,{children:e},t))})]}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground italic`,children:`Harriet Lane Handbook 23rd ed · PALS · AAP 2017 BP guidelines.`})]})}var Te=[{name:`Adenosine`,indication:`SVT`,category:`cardiac`,route:`IV/IO rapid bolus`,calc:e=>{let t=+(e*.1).toFixed(2),n=+(e*.2).toFixed(2),r=+(e*.3).toFixed(2);return{dose:`${t} mg (0.1 mg/kg)`,extra:`May repeat: ${Math.min(n,12)} mg (0.2 mg/kg), then ${Math.min(r,12)} mg (0.3 mg/kg)`,max:`Max first dose 6 mg, max subsequent 12 mg`}}},{name:`Amiodarone`,indication:`VT / VF`,category:`cardiac`,route:`IV/IO`,calc:e=>{let t=+(e*5).toFixed(1);return{dose:`${Math.min(t,300)} mg (5 mg/kg)`,extra:`No pulse: push undiluted. Pulse: over 20-60 min. Subsequent max 150 mg.`,max:`Max first 300 mg, max total 15 mg/kg/24hr or 2200 mg`}}},{name:`Atropine`,indication:`Bradycardia`,category:`cardiac`,route:`IV/IO/IM`,calc:e=>{let t=+(e*.02).toFixed(3),n=`${(e*.04).toFixed(3)}-${(e*.06).toFixed(3)}`;return{dose:`${Math.min(t,.5)} mg (0.02 mg/kg)`,extra:`ETT dose: ${n} mg (0.04-0.06 mg/kg)`,max:`Max single 0.5 mg, max total 1 mg`}}},{name:`Calcium Chloride 10%`,indication:`Hypocalcemia / Hyperkalemia`,category:`metabolic`,route:`IV/IO`,calc:e=>{let t=+(e*20).toFixed(0);return{dose:`${Math.min(t,1e3)} mg (20 mg/kg)`,extra:`Give slowly. Central line preferred.`,max:`Max 1 g (1000 mg)`}}},{name:`Calcium Gluconate 10%`,indication:`Hypocalcemia / Hyperkalemia`,category:`metabolic`,route:`IV/IO`,calc:e=>{let t=+(e*60).toFixed(0);return{dose:`${Math.min(t,3e3)} mg (60 mg/kg)`,extra:`Give slowly over 10-20 min with cardiac monitoring.`,max:`Max 3 g (3000 mg)`}}},{name:`Dextrose`,indication:`Hypoglycemia`,category:`metabolic`,route:`IV`,calc:e=>{let t=`${+(e*.5).toFixed(1)}-${+(e*1).toFixed(1)}`,n=``;return n=e<5?`D10W: ${(e*5).toFixed(1)}-${(e*10).toFixed(1)} mL (5-10 mL/kg)`:e<45?`D25W: ${(e*2).toFixed(1)}-${(e*4).toFixed(1)} mL (2-4 mL/kg)`:`D50W: ${(e*1).toFixed(1)}-${(e*2).toFixed(1)} mL (1-2 mL/kg)`,{dose:`${t} g (0.5-1 g/kg)`,extra:n,max:`Max 25 g`}}},{name:`Epinephrine`,indication:`Pulseless arrest / Anaphylaxis`,category:`cardiac`,route:`IV/IO/IM/ETT`,calc:e=>{let t=+(e*.01).toFixed(3),n=+(e*.1).toFixed(2),r=+(e*.1).toFixed(2),i=+(e*.01).toFixed(3);return{dose:`${Math.min(t,1)} mg IV/IO (0.01 mg/kg of 0.1 mg/mL = ${Math.min(n,10)} mL) q3-5 min`,extra:`ETT: ${Math.min(r,2.5)} mg (0.1 mg/kg of 1 mg/mL). Anaphylaxis IM: ${Math.min(i,.5)} mg (0.01 mg/kg)`,max:`Max IV 1 mg, max ETT 2.5 mg, max IM 0.5 mg`}}},{name:`Hydrocortisone`,indication:`Adrenal crisis`,category:`metabolic`,route:`IV/IM/IO`,calc:e=>{let t=+(e*2).toFixed(1);return{dose:`${Math.min(t,100)} mg (2 mg/kg)`,extra:`Stress dosing for adrenal insufficiency.`,max:`Max 100 mg`}}},{name:`Insulin (Regular)`,indication:`Hyperkalemia`,category:`metabolic`,route:`IV`,calc:e=>{let t=+(e*.1).toFixed(2),n=+(e*.5).toFixed(1);return{dose:`${Math.min(t,5)} units (0.1 units/kg)`,extra:`Give with ${n} g/kg dextrose (0.5 g/kg). Monitor glucose closely.`,max:`Max 5 units`}}},{name:`Lidocaine`,indication:`Antiarrhythmic`,category:`cardiac`,route:`IV/IO`,calc:e=>{let t=+(e*1).toFixed(1),n=`${(e*2).toFixed(1)}-${(e*3).toFixed(1)}`;return{dose:`${Math.min(t,100)} mg (1 mg/kg)`,extra:`ETT: ${n} mg (2-3 mg/kg). May repeat q5 min.`,max:`Max 100 mg/dose, max total 3 mg/kg`}}},{name:`Magnesium Sulfate`,indication:`Torsades de Pointes`,category:`cardiac`,route:`IV/IO`,calc:e=>{let t=+(e*50).toFixed(0);return{dose:`${Math.min(t,2e3)} mg (50 mg/kg)`,extra:`Give over 10-20 min (faster if pulseless).`,max:`Max 2 g (2000 mg)`}}},{name:`Naloxone`,indication:`Opioid overdose`,category:`reversal`,route:`IV/IO/IM/IN/ETT`,calc:e=>{let t=`${+(e*.001).toFixed(4)}-${+(e*.005).toFixed(4)}`,n=+(e*.1).toFixed(3);return{dose:`Partial: ${t} mg (0.001-0.005 mg/kg)`,extra:`Full reversal: ${Math.min(n,2)} mg (0.1 mg/kg)`,max:`Max partial first dose 0.1 mg, max full 2 mg`}}},{name:`Sodium Bicarbonate`,indication:`Metabolic acidosis`,category:`metabolic`,route:`IV/IO`,calc:e=>{let t=+(e*1).toFixed(1);return{dose:`${Math.min(t,50)} mEq (1 mEq/kg)`,extra:e<10?`Dilute to 0.5 mEq/mL (use 4.2% solution) for neonates/small infants.`:`Use 8.4% solution (1 mEq/mL).`,max:`Max 50 mEq`}}}],H={cardiac:`#ef4444`,metabolic:`#3b82f6`,reversal:`#10b981`},Ee={cardiac:`Cardiac`,metabolic:`Metabolic`,reversal:`Reversal`};function De(){let[e,t]=(0,l.useState)(``),n=Number.parseFloat(e);return(0,L.jsxs)(`section`,{className:R,"data-testid":`calc-panel-resus`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Resus Medications`}),(0,L.jsxs)(`div`,{className:`max-w-xs`,children:[(0,L.jsx)(`label`,{className:B,children:`Weight (kg)`}),(0,L.jsx)(`input`,{type:`number`,min:`0.5`,max:`100`,step:`0.1`,className:z,value:e,onChange:e=>t(e.target.value),"data-testid":`resus-weight`})]}),Number.isFinite(n)&&n>0?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`text-sm font-semibold`,children:[`Doses for `,n,` kg patient`]}),(0,L.jsx)(`div`,{className:`flex gap-3 flex-wrap text-xs`,children:[`cardiac`,`metabolic`,`reversal`].map(e=>(0,L.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,L.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full`,style:{background:H[e]}}),Ee[e]]},e))}),(0,L.jsx)(`div`,{className:`grid gap-3 grid-cols-1 md:grid-cols-2 lg:grid-cols-3`,"data-testid":`resus-result`,children:Te.map(e=>{let t=e.calc(n),r=H[e.category];return(0,L.jsxs)(`div`,{className:`rounded-lg border bg-card overflow-hidden`,style:{borderColor:r+`55`},children:[(0,L.jsxs)(`div`,{className:`px-3 py-2 border-b`,style:{background:r+`10`,borderColor:r+`22`},children:[(0,L.jsx)(`div`,{className:`text-sm font-bold`,style:{color:r},children:e.name}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.indication})]}),(0,L.jsxs)(`div`,{className:`p-3 text-sm space-y-1`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`strong`,{children:`Dose:`}),` `,t.dose]}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:t.extra}),(0,L.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[(0,L.jsx)(`strong`,{children:`Max:`}),` `,t.max]}),(0,L.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[(0,L.jsx)(`strong`,{children:`Route:`}),` `,e.route]})]})]},e.name)})}),(0,L.jsxs)(`div`,{className:`rounded-md bg-amber-50 dark:bg-amber-950/30 p-3 text-xs text-amber-900 dark:text-amber-100`,children:[(0,L.jsx)(`strong`,{children:`Disclaimer:`}),` Always verify doses against institutional protocols and current guidelines.`]})]}):(0,L.jsx)(`p`,{className:`text-xs text-destructive`,children:`Enter weight (kg) to see doses.`})]})}var Oe={premie:{label:`Premie (1-3 kg)`,bvm:`Infant`,nasal:`12 Fr`,oral:`Infant`,blade:`Miller 0`,ett:`2.5-3.0`,lma:`1`,glidescope:`1`,iv:`22-24 ga`,cvl:`3 Fr`,ngt:`5 Fr`,chest:`10-12 Fr`,foley:`6 Fr`},newborn:{label:`Newborn (2-4 kg)`,bvm:`Infant`,nasal:`14-16 Fr`,oral:`Small 50 mm`,blade:`Miller 0`,ett:`3.0-3.5`,lma:`1`,glidescope:`1`,iv:`22-24 ga`,cvl:`3-4 Fr`,ngt:`5-8 Fr`,chest:`10-12 Fr`,foley:`6 Fr`},"6mo":{label:`6 months (6-8 kg)`,bvm:`Infant`,nasal:`14-16 Fr`,oral:`Small 60 mm`,blade:`Miller 1`,ett:`3.5`,lma:`1.5`,glidescope:`2`,iv:`20-24 ga`,cvl:`4 Fr`,ngt:`8 Fr`,chest:`12-18 Fr`,foley:`8 Fr`},"1yr":{label:`1 year (10 kg)`,bvm:`Small child`,nasal:`14-18 Fr`,oral:`Small 60 mm`,blade:`Miller 1 / MAC 2`,ett:`4.0`,lma:`2`,glidescope:`2`,iv:`20-24 ga`,cvl:`4-5 Fr`,ngt:`10 Fr`,chest:`16-20 Fr`,foley:`8 Fr`},"2-3yr":{label:`2-3 years (12-16 kg)`,bvm:`Small child`,nasal:`14-18 Fr`,oral:`Small 70 mm`,blade:`Miller 1 / MAC 2`,ett:`4.0-4.5`,lma:`2`,glidescope:`2`,iv:`18-22 ga`,cvl:`4-5 Fr`,ngt:`10-12 Fr`,chest:`16-24 Fr`,foley:`8 Fr`},"4-6yr":{label:`4-6 years (20-25 kg)`,bvm:`Child`,nasal:`16-20 Fr`,oral:`Small 70-80 mm`,blade:`Miller 2 / MAC 2`,ett:`4.5-5.0`,lma:`2.5`,glidescope:`3`,iv:`18-22 ga`,cvl:`5 Fr`,ngt:`12-14 Fr`,chest:`20-28 Fr`,foley:`8 Fr`},"7-10yr":{label:`7-10 years (25-35 kg)`,bvm:`Child / Small adult`,nasal:`18-22 Fr`,oral:`Medium 80-90 mm`,blade:`Miller 2 / MAC 2`,ett:`5.5-6.0`,lma:`2.5-3`,glidescope:`3`,iv:`18-22 ga`,cvl:`5 Fr`,ngt:`12-14 Fr`,chest:`20-32 Fr`,foley:`8 Fr`},"11-15yr":{label:`11-15 years (40-50 kg)`,bvm:`Adult`,nasal:`22-36 Fr`,oral:`Medium 90 mm`,blade:`Miller 2 / MAC 3`,ett:`6.0-6.5`,lma:`3`,glidescope:`3 or 4`,iv:`18-20 ga`,cvl:`7 Fr`,ngt:`14-18 Fr`,chest:`28-38 Fr`,foley:`10 Fr`},"16yr":{label:`16+ years (>50 kg)`,bvm:`Adult`,nasal:`22-36 Fr`,oral:`Medium 90 mm`,blade:`Miller 2 / MAC 3`,ett:`7.0-8.0`,lma:`4`,glidescope:`3 or 4`,iv:`18-20 ga`,cvl:`7 Fr`,ngt:`14-18 Fr`,chest:`28-42 Fr`,foley:`12 Fr`}},ke=[`premie`,`newborn`,`6mo`,`1yr`,`2-3yr`,`4-6yr`,`7-10yr`,`11-15yr`,`16yr`];function Ae(){let[e,t]=(0,l.useState)(`1yr`),n=Oe[e],r=[[`BVM`,n.bvm],[`Nasopharyngeal`,n.nasal],[`Oropharyngeal`,n.oral],[`Laryngoscope`,n.blade],[`ETT`,n.ett],[`LMA`,n.lma],[`Glidescope`,n.glidescope],[`IV`,n.iv],[`Central line`,n.cvl],[`NG tube`,n.ngt],[`Chest tube`,n.chest],[`Foley`,n.foley]];return(0,L.jsxs)(`section`,{className:R,"data-testid":`calc-panel-equipment`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Equipment Sizing`}),(0,L.jsxs)(`div`,{className:`max-w-xs`,children:[(0,L.jsx)(`label`,{className:B,children:`Age / weight band`}),(0,L.jsx)(`select`,{className:z,value:e,onChange:e=>t(e.target.value),"data-testid":`equip-age-select`,children:ke.map(e=>(0,L.jsx)(`option`,{value:e,children:Oe[e].label},e))})]}),(0,L.jsx)(`div`,{className:`grid grid-cols-2 md:grid-cols-3 gap-3 text-sm`,"data-testid":`equip-result`,children:r.map(([e,t])=>(0,L.jsxs)(`div`,{className:`rounded-md bg-muted/40 p-3`,children:[(0,L.jsx)(`div`,{className:`text-xs uppercase text-muted-foreground`,children:e}),(0,L.jsx)(`div`,{className:`font-semibold`,children:t})]},e))}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground italic`,children:`Harriet Lane Handbook · PALS · Broselow cross-reference.`})]})}var U=`rounded-lg border border-border bg-card p-5 space-y-3`,W=`rounded-md bg-primary text-primary-foreground px-4 py-2 text-sm font-medium`,G=`rounded-md border border-border bg-background px-4 py-2 text-sm font-medium hover:bg-muted`,K=`space-y-1`,q=`block text-xs font-medium text-muted-foreground`,J=`w-full rounded-md border border-input bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-ring`,Y=`rounded-lg border border-border bg-muted/40 p-4`,X=`rounded-md border border-red-200 bg-red-50 p-3 text-sm text-red-700 dark:bg-red-950/30 dark:text-red-200`,Z=[{id:`bp`,label:`BP Percentile`,summary:`AAP 2017 age/height/sex-adjusted BP percentiles (Rosner quantile splines).`,source:`AAP 2017 (Flynn) — Rosner splines`,ported:!0},{id:`bmi`,label:`BMI Percentile`,summary:`BMI-for-age (CDC 2000 z-score tables).`,source:`CDC 2000 LMS`,ported:!0},{id:`growth`,label:`Growth Charts`,summary:`Fenton 2013 preterm weight-for-GA with Z-score + percentile + SGA/AGA/LGA classification.`,source:`Fenton 2013 LMS`,ported:!0},{id:`bili`,label:`Bilirubin`,summary:`AAP 2022 phototherapy + exchange thresholds and Bhutani nomogram risk zones.`,source:`AAP 2022 (Kemper) + Bhutani 1999`,ported:!0},{id:`vitals`,label:`Vital Signs`,summary:`Normal HR / RR / BP ranges by age.`,source:`Harriet Lane + PALS + AHA`,ported:!0},{id:`bsa`,label:`Body Surface Area`,summary:`Mosteller body surface area formula.`,source:`Mosteller 1987`,ported:!0},{id:`dose`,label:`Weight-Based Dosing`,summary:`Generic mg/kg dosing with optional max-dose cap and concentration conversion.`,source:`Legacy calculator formula`,ported:!0},{id:`resus`,label:`Resus Meds`,summary:`Code-cart dosing (epinephrine, amiodarone, atropine, etc.).`,source:`PALS`,ported:!0},{id:`gcs`,label:`GCS`,summary:`Child/adult and infant Glasgow Coma Scale variants.`,source:`Teasdale + pediatric modification`,ported:!0},{id:`equipment`,label:`Equipment`,summary:`ETT size, blade, NG, Foley, suction by age/weight.`,source:`PALS + Broselow cross-reference`,ported:!0}];function je(e){if(!e.trim())return null;let t=Number(e);return Number.isFinite(t)?t:null}function Q({id:e,labelText:t,value:n,onChange:r,min:i,max:a,step:o=`0.1`,placeholder:s}){return(0,L.jsxs)(`div`,{className:K,children:[(0,L.jsx)(`label`,{htmlFor:e,className:q,children:t}),(0,L.jsx)(`input`,{id:e,type:`number`,min:i,max:a,step:o,value:n,onChange:e=>r(e.target.value),placeholder:s,className:J})]})}function Me(){let[e,t]=(0,l.useState)(``),[n,r]=(0,l.useState)(``),[i,o]=(0,l.useState)(null),[s,c]=(0,l.useState)(``);function u(){let t=a(Number(e),Number(n));if(t==null){c(`Enter a valid weight and height.`),o(null);return}c(``),o(t)}function d(){t(``),r(``),o(null),c(``)}return(0,L.jsxs)(`section`,{className:U,"data-testid":`calc-panel-bsa`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Body Surface Area`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Mosteller formula: BSA (m2) = sqrt(height(cm) x weight(kg) / 3600).`}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,L.jsx)(Q,{id:`react-bsa-weight`,labelText:`Weight (kg)`,value:e,onChange:t,min:`1`,max:`200`,placeholder:`20`}),(0,L.jsx)(Q,{id:`react-bsa-height`,labelText:`Height (cm)`,value:n,onChange:r,min:`30`,max:`220`,placeholder:`110`})]}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:u,className:W,"data-testid":`calc-bsa-calculate`,children:`Calculate`}),(0,L.jsx)(`button`,{type:`button`,onClick:d,className:G,children:`Clear`})]}),s?(0,L.jsx)(`div`,{className:X,children:s}):null,i==null?null:(0,L.jsxs)(`div`,{className:Y,"data-testid":`calc-bsa-result`,children:[(0,L.jsx)(`div`,{className:`text-xs uppercase tracking-wide text-muted-foreground`,children:`Mosteller BSA`}),(0,L.jsxs)(`div`,{className:`text-2xl font-semibold`,children:[i.toFixed(3),``]}),(0,L.jsxs)(`div`,{className:`text-sm text-muted-foreground`,children:[e,` kg, `,n,` cm`]})]})]})}function Ne(){let[e,t]=(0,l.useState)(``),[n,r]=(0,l.useState)(``),[i,a]=(0,l.useState)(`1`),[o,c]=(0,l.useState)(``),[u,d]=(0,l.useState)(``),[f,p]=(0,l.useState)(null),[m,h]=(0,l.useState)(``);function g(){let t=s({weightKg:Number(e),dosePerKg:Number(n),frequencyPerDay:Number(i),maxSingleDoseMg:je(o),concentrationMgPerMl:je(u)});if(t==null){h(`Enter a valid weight, mg/kg dose, and frequency.`),p(null);return}h(``),p(t)}function _(){t(``),r(``),a(`1`),c(``),d(``),p(null),h(``)}return(0,L.jsxs)(`section`,{className:U,"data-testid":`calc-panel-dose`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Weight-Based Dosing`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Generic mg/kg calculator. Always verify medication-specific dosing against formulary and local policy.`}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:[(0,L.jsx)(Q,{id:`react-dose-weight`,labelText:`Patient Weight (kg)`,value:e,onChange:t,min:`1`,max:`200`,placeholder:`15`}),(0,L.jsx)(Q,{id:`react-dose-per-kg`,labelText:`Dose (mg/kg)`,value:n,onChange:r,min:`0.01`,step:`0.01`,placeholder:`10`}),(0,L.jsxs)(`div`,{className:K,children:[(0,L.jsx)(`label`,{htmlFor:`react-dose-frequency`,className:q,children:`Frequency`}),(0,L.jsxs)(`select`,{id:`react-dose-frequency`,value:i,onChange:e=>a(e.target.value),className:J,children:[(0,L.jsx)(`option`,{value:`1`,children:`Once daily`}),(0,L.jsx)(`option`,{value:`2`,children:`Twice daily (BID)`}),(0,L.jsx)(`option`,{value:`3`,children:`Three times daily (TID)`}),(0,L.jsx)(`option`,{value:`4`,children:`Four times daily (QID)`}),(0,L.jsx)(`option`,{value:`6`,children:`Every 4 hours (Q4H)`})]})]}),(0,L.jsx)(Q,{id:`react-dose-max`,labelText:`Max single dose (mg, optional)`,value:o,onChange:c,min:`0`,step:`1`,placeholder:`500`}),(0,L.jsx)(Q,{id:`react-dose-concentration`,labelText:`Concentration (mg/mL, optional)`,value:u,onChange:d,min:`0`,placeholder:`40`})]}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:g,className:W,"data-testid":`calc-dose-calculate`,children:`Calculate`}),(0,L.jsx)(`button`,{type:`button`,onClick:_,className:G,children:`Clear`})]}),m?(0,L.jsx)(`div`,{className:X,children:m}):null,f==null?null:(0,L.jsx)(`div`,{className:Y,"data-testid":`calc-dose-result`,children:(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs uppercase tracking-wide text-muted-foreground`,children:`Single Dose`}),(0,L.jsxs)(`div`,{className:`text-xl font-semibold`,children:[f.singleDoseMg.toFixed(1),` mg`]}),f.capped?(0,L.jsx)(`div`,{className:`text-xs text-red-600`,children:`Capped at max dose`}):null]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs uppercase tracking-wide text-muted-foreground`,children:`Daily Total`}),(0,L.jsxs)(`div`,{className:`text-xl font-semibold`,children:[f.dailyDoseMg.toFixed(1),` mg/day`]}),(0,L.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[`x `,f.frequencyPerDay,`/day`]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs uppercase tracking-wide text-muted-foreground`,children:`Volume`}),(0,L.jsx)(`div`,{className:`text-xl font-semibold`,children:f.volumeMl==null?`n/a`:`${f.volumeMl.toFixed(1)} mL`}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`per dose`})]})]})})]})}var Pe={child:{eye:[[`4`,`4 - Spontaneous`],[`3`,`3 - To speech`],[`2`,`2 - To pain`],[`1`,`1 - None`]],verbal:[[`5`,`5 - Oriented`],[`4`,`4 - Confused`],[`3`,`3 - Inappropriate words`],[`2`,`2 - Incomprehensible sounds`],[`1`,`1 - None`]],motor:[[`6`,`6 - Obeys commands`],[`5`,`5 - Localizes pain`],[`4`,`4 - Withdraws to pain`],[`3`,`3 - Abnormal flexion`],[`2`,`2 - Abnormal extension`],[`1`,`1 - None`]]},infant:{eye:[[`4`,`4 - Spontaneous`],[`3`,`3 - To speech/sound`],[`2`,`2 - To painful stimuli`],[`1`,`1 - None`]],verbal:[[`5`,`5 - Coos/babbles`],[`4`,`4 - Irritable cry`],[`3`,`3 - Cries to pain`],[`2`,`2 - Moans to pain`],[`1`,`1 - None`]],motor:[[`6`,`6 - Normal spontaneous movement`],[`5`,`5 - Withdraws to touch`],[`4`,`4 - Withdraws to pain`],[`3`,`3 - Abnormal flexion`],[`2`,`2 - Abnormal extension`],[`1`,`1 - None`]]}};function $({id:e,labelText:t,value:n,options:r,onChange:i}){return(0,L.jsxs)(`div`,{className:K,children:[(0,L.jsx)(`label`,{htmlFor:e,className:q,children:t}),(0,L.jsx)(`select`,{id:e,value:n,onChange:e=>i(e.target.value),className:J,children:r.map(([e,t])=>(0,L.jsx)(`option`,{value:e,children:t},e))})]})}function Fe(){let[e,t]=(0,l.useState)(`child`),[n,i]=(0,l.useState)(`4`),[a,o]=(0,l.useState)(`5`),[s,c]=(0,l.useState)(`6`),u=r(Number(n),Number(a),Number(s)),d=Pe[e];function f(e){t(e),i(`4`),o(`5`),c(`6`)}return(0,L.jsxs)(`section`,{className:U,"data-testid":`calc-panel-gcs`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Glasgow Coma Scale`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Select responses to calculate child/adult or infant-modified GCS. Total score 3-15.`}),(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:()=>f(`child`),className:`px-3 py-1.5 rounded-full text-xs font-medium border `+(e===`child`?`bg-primary text-primary-foreground border-primary`:`bg-muted border-border`),children:`Child / Adult`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>f(`infant`),className:`px-3 py-1.5 rounded-full text-xs font-medium border `+(e===`infant`?`bg-primary text-primary-foreground border-primary`:`bg-muted border-border`),children:`Infant`})]}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,L.jsx)($,{id:`react-gcs-eye`,labelText:`Eye Opening`,value:n,options:d.eye,onChange:i}),(0,L.jsx)($,{id:`react-gcs-verbal`,labelText:`Verbal Response`,value:a,options:d.verbal,onChange:o}),(0,L.jsx)($,{id:`react-gcs-motor`,labelText:`Motor Response`,value:s,options:d.motor,onChange:c})]}),u==null?null:(0,L.jsxs)(`div`,{className:Y,"data-testid":`calc-gcs-result`,children:[(0,L.jsx)(`div`,{className:`text-xs uppercase tracking-wide text-muted-foreground`,children:e===`infant`?`Infant-modified GCS`:`Child / adult GCS`}),(0,L.jsxs)(`div`,{className:`text-3xl font-semibold`,children:[`GCS: `,u.total,`/15`]}),(0,L.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:u.severity}),(0,L.jsx)(`div`,{className:`mt-2 text-xs text-muted-foreground`,children:`Interpretation: 13-15 Mild, 9-12 Moderate, 3-8 Severe/Coma.`})]})]})}function Ie({pill:e}){return(0,L.jsxs)(`section`,{className:U,"data-testid":`calc-panel-`+e.id,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:e.label}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.summary}),(0,L.jsxs)(`div`,{className:`rounded-md border border-amber-300 bg-amber-50 dark:bg-amber-950/30 p-3 text-sm space-y-2`,children:[(0,L.jsxs)(`p`,{className:`text-amber-900 dark:text-amber-100`,children:[(0,L.jsx)(`strong`,{children:`Source of truth:`}),` `,e.source,`.`]}),(0,L.jsx)(`p`,{className:`text-amber-900 dark:text-amber-100`,children:`This calculator runs in the legacy viewer. A React port is gated on capturing test vectors from the vanilla implementation so the numerical output can be verified byte-for-byte — the migration checkpoint specifically flags this class of data as the one an LLM is most likely to silently simplify.`})]}),(0,L.jsx)(`a`,{href:`/#calculators`,className:W+` inline-block`,children:`Open in legacy viewer`})]})}function Le(){let[e,t]=(0,l.useState)(`aap`),[n,r]=(0,l.useState)(`38`),[i,a]=(0,l.useState)(``),[o,s]=(0,l.useState)(``),[c,u]=(0,l.useState)(`low`),[d,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(null),[h,g]=(0,l.useState)(``);function _(){let t=Number(i),r=Number(o);if(!Number.isFinite(t)||!Number.isFinite(r)||t<=0||r<=0){g(`Enter hours of life and TSB (mg/dL).`),f(null),m(null);return}if(g(``),e===`aap`){let e=Number(n);if(!Number.isFinite(e)||e<35){g(`AAP 2022 thresholds apply to GA ≥35 weeks.`),f(null);return}f(D(e,t,r,c)),m(null)}else m(re(t,r)),f(null)}let v=d?d.status===`Above Exchange`?`text-red-800 bg-red-100`:d.status===`Above Phototherapy`?`text-red-700 bg-red-50`:`text-green-700 bg-green-50`:``,y=p?p.zone===`High-Risk`?`text-red-800 bg-red-100`:p.zone===`High-Intermediate`?`text-orange-700 bg-orange-50`:p.zone===`Low-Intermediate`?`text-amber-700 bg-amber-50`:`text-green-700 bg-green-50`:``;return(0,L.jsxs)(`section`,{className:U,"data-testid":`calc-panel-bili`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Bilirubin`}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(`button`,{type:`button`,onClick:()=>t(`aap`),className:`px-3 py-1 rounded text-xs font-medium `+(e===`aap`?`bg-primary text-primary-foreground`:`bg-muted`),"data-testid":`bili-mode-aap`,children:`AAP 2022 Phototherapy`}),(0,L.jsx)(`button`,{type:`button`,onClick:()=>t(`bhutani`),className:`px-3 py-1 rounded text-xs font-medium `+(e===`bhutani`?`bg-primary text-primary-foreground`:`bg-muted`),"data-testid":`bili-mode-bhutani`,children:`Bhutani Nomogram`})]}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[e===`aap`&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:K,children:[(0,L.jsx)(`label`,{htmlFor:`bili-ga`,className:q,children:`GA (weeks)`}),(0,L.jsx)(`select`,{id:`bili-ga`,className:J,value:n,onChange:e=>r(e.target.value),children:[35,36,37,38,39,40].map(e=>(0,L.jsxs)(`option`,{value:e,children:[e,e===40?`+`:``]},e))})]}),(0,L.jsxs)(`div`,{className:K,children:[(0,L.jsx)(`label`,{htmlFor:`bili-risk`,className:q,children:`Neurotoxicity risk`}),(0,L.jsxs)(`select`,{id:`bili-risk`,className:J,value:c,onChange:e=>u(e.target.value),children:[(0,L.jsx)(`option`,{value:`low`,children:`No risk factors`}),(0,L.jsx)(`option`,{value:`medium`,children:`With risk factors`})]})]})]}),(0,L.jsx)(Q,{id:`bili-hours`,labelText:`Age (hours)`,value:i,onChange:a,min:`0`,max:`336`,placeholder:`48`}),(0,L.jsx)(Q,{id:`bili-tsb`,labelText:`TSB (mg/dL)`,value:o,onChange:s,min:`0`,max:`50`,placeholder:`15`})]}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(`button`,{type:`button`,className:W,onClick:_,"data-testid":`calc-bili-calculate`,children:`Calculate`}),(0,L.jsx)(`button`,{type:`button`,className:G,onClick:()=>{a(``),s(``),f(null),m(null),g(``)},children:`Clear`})]}),h&&(0,L.jsx)(`div`,{className:X,children:h}),d&&(0,L.jsxs)(`div`,{className:Y+` space-y-2`,"data-testid":`calc-bili-aap-result`,children:[(0,L.jsx)(`div`,{className:`inline-block px-2 py-1 rounded text-sm font-bold `+v,children:d.status}),(0,L.jsxs)(`div`,{className:`text-sm`,children:[`TSB `,o,` mg/dL at `,i,` hours of life (GA `,n,`w `,c===`medium`?`with`:`without`,` risk factors)`]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 text-sm`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`Phototherapy`}),(0,L.jsxs)(`div`,{className:`font-semibold`,children:[d.photoThreshold.toFixed(1),` mg/dL`]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`Exchange`}),(0,L.jsxs)(`div`,{className:`font-semibold text-red-800`,children:[d.exchangeThreshold.toFixed(1),` mg/dL`]})]})]}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground italic`,children:`AAP 2022 CPG (Kemper et al.). Always use clinical judgment.`})]}),p&&(0,L.jsxs)(`div`,{className:Y+` space-y-2`,"data-testid":`calc-bili-bhutani-result`,children:[(0,L.jsxs)(`div`,{className:`inline-block px-2 py-1 rounded text-sm font-bold `+y,children:[p.zone,` Zone`]}),(0,L.jsxs)(`div`,{className:`text-sm`,children:[`TSB `,o,` mg/dL at `,i,` hours of life`]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-3 gap-3 text-sm`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`40th %ile`}),(0,L.jsx)(`div`,{className:`font-semibold`,children:p.p40.toFixed(1)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`75th %ile`}),(0,L.jsx)(`div`,{className:`font-semibold`,children:p.p75.toFixed(1)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`95th %ile`}),(0,L.jsx)(`div`,{className:`font-semibold`,children:p.p95.toFixed(1)})]})]}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground italic`,children:`Bhutani 1999 hour-specific risk nomogram for infants ≥35 weeks GA.`})]})]})}function Re(){let[e,t]=(0,l.useState)(`male`),[n,r]=(0,l.useState)(``),[a,o]=(0,l.useState)(``),[s,u]=(0,l.useState)(null),[d,f]=(0,l.useState)(``);function p(){let t=Number(n),r=Number(a);if(!Number.isFinite(t)||!Number.isFinite(r)||t<22||t>50||r<=0){f(`Enter GA (22-50 weeks) and weight (grams).`),u(null);return}f(``),u(i(t,r,e))}let m=s?c(s.percentile):null,h=m===`SGA`?`text-orange-700 bg-orange-50`:m===`LGA`?`text-amber-700 bg-amber-50`:`text-green-700 bg-green-50`;return(0,L.jsxs)(`section`,{className:U,"data-testid":`calc-panel-growth`,children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Fenton 2013 Preterm Growth`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Weight-for-gestational-age Z-score + percentile + SGA/AGA/LGA classification.`}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[(0,L.jsxs)(`div`,{className:K,children:[(0,L.jsx)(`label`,{htmlFor:`fenton-sex`,className:q,children:`Sex`}),(0,L.jsxs)(`select`,{id:`fenton-sex`,className:J,value:e,onChange:e=>t(e.target.value),children:[(0,L.jsx)(`option`,{value:`male`,children:`Male`}),(0,L.jsx)(`option`,{value:`female`,children:`Female`})]})]}),(0,L.jsx)(Q,{id:`fenton-ga`,labelText:`GA (weeks)`,value:n,onChange:r,min:`22`,max:`50`,step:`0.1`,placeholder:`32`}),(0,L.jsx)(Q,{id:`fenton-weight`,labelText:`Weight (g)`,value:a,onChange:o,min:`200`,max:`7000`,step:`10`,placeholder:`1500`})]}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(`button`,{type:`button`,className:W,onClick:p,"data-testid":`calc-fenton-calculate`,children:`Calculate`}),(0,L.jsx)(`button`,{type:`button`,className:G,onClick:()=>{r(``),o(``),u(null),f(``)},children:`Clear`})]}),d&&(0,L.jsx)(`div`,{className:X,children:d}),s&&m&&(0,L.jsxs)(`div`,{className:Y+` space-y-2`,"data-testid":`calc-fenton-result`,children:[(0,L.jsx)(`div`,{className:`inline-block px-2 py-1 rounded text-sm font-bold `+h,children:m}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-3 text-sm`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`Percentile`}),(0,L.jsxs)(`div`,{className:`font-semibold`,children:[s.percentile.toFixed(1),`%`]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`Z-score`}),(0,L.jsx)(`div`,{className:`font-semibold`,children:s.z.toFixed(2)})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`Median (M)`}),(0,L.jsxs)(`div`,{className:`font-semibold`,children:[Math.round(s.M),` g`]})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`text-xs uppercase text-muted-foreground`,children:`L / S`}),(0,L.jsxs)(`div`,{className:`font-mono text-xs`,children:[s.L.toFixed(3),` / `,s.S.toFixed(3)]})]})]}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground italic`,children:`Fenton TR, Kim JH. Systematic review — revised Fenton growth chart for preterm infants. BMC Pediatr 2013;13:59.`})]})]})}function ze({pill:e}){return e.id===`bsa`?(0,L.jsx)(Me,{}):e.id===`dose`?(0,L.jsx)(Ne,{}):e.id===`gcs`?(0,L.jsx)(Fe,{}):e.id===`bili`?(0,L.jsx)(Le,{}):e.id===`growth`?(0,L.jsx)(Re,{}):e.id===`bmi`?(0,L.jsx)(xe,{}):e.id===`vitals`?(0,L.jsx)(we,{}):e.id===`resus`?(0,L.jsx)(De,{}):e.id===`equipment`?(0,L.jsx)(Ae,{}):e.id===`bp`?(0,L.jsx)(be,{}):(0,L.jsx)(Ie,{pill:e})}function Be(){let[e,t]=(0,l.useState)(Z[0].id),n=Z.find(t=>t.id===e)??Z[0];return(0,L.jsxs)(`div`,{className:`max-w-5xl mx-auto p-6 space-y-4`,children:[(0,L.jsxs)(`header`,{children:[(0,L.jsx)(`h1`,{className:`text-2xl font-semibold`,children:`Calculators`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Pediatric calculators — BP percentiles, bilirubin thresholds, growth, dosing, equipment sizing. Simple pure-formula calculators run in React now; high-risk table-driven calculators remain legacy-gated until vectors are captured.`})]}),(0,L.jsx)(`div`,{className:`flex flex-wrap gap-2`,"data-testid":`calc-subnav`,children:Z.map(n=>(0,L.jsxs)(`button`,{type:`button`,onClick:()=>t(n.id),className:`px-3 py-1.5 rounded-full text-xs font-medium border transition-colors `+(e===n.id?`bg-primary text-primary-foreground border-primary`:`bg-muted hover:bg-muted/80 border-border`),"data-testid":`calc-pill-`+n.id,children:[n.label,n.ported?(0,L.jsx)(`span`,{className:`ml-1 text-[10px] opacity-80`,children:`React`}):null]},n.id))}),(0,L.jsx)(ze,{pill:n})]})}export{Be as default};