@feelflow/ffid-sdk 2.6.0 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -619,7 +619,7 @@ function createMembersMethods(deps) {
619
619
  }
620
620
 
621
621
  // src/client/version-check.ts
622
- var SDK_VERSION = "2.6.0";
622
+ var SDK_VERSION = "2.8.0";
623
623
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
624
624
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
625
625
  function sdkHeaders() {
@@ -1563,6 +1563,168 @@ function createContractWizardMethods(deps) {
1563
1563
  };
1564
1564
  }
1565
1565
 
1566
+ // src/newsletter/ffid-newsletter-client.ts
1567
+ var EXT_SUBSCRIBE_ENDPOINT2 = "/api/v1/ext/newsletter/subscribe";
1568
+ var CONFIRM_ENDPOINT = "/api/newsletter/confirm";
1569
+ var UNSUBSCRIBE_ENDPOINT = "/api/newsletter/unsubscribe";
1570
+ function trimOrEmpty(s) {
1571
+ return typeof s === "string" ? s.trim() : "";
1572
+ }
1573
+ async function postPublic(url, init, opts) {
1574
+ let response;
1575
+ try {
1576
+ response = await fetch(url, init);
1577
+ } catch (err) {
1578
+ return {
1579
+ error: opts.createError(
1580
+ "NETWORK_ERROR",
1581
+ err instanceof Error ? err.message : "\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F"
1582
+ )
1583
+ };
1584
+ }
1585
+ if (!response.ok) {
1586
+ try {
1587
+ const body = await response.json();
1588
+ if (body?.error?.code || body?.error?.message) {
1589
+ return {
1590
+ error: opts.createError(
1591
+ body.error.code ?? "UNKNOWN_ERROR",
1592
+ body.error.message ?? `${opts.fallbackMessage} (status: ${response.status})`
1593
+ )
1594
+ };
1595
+ }
1596
+ } catch {
1597
+ }
1598
+ return {
1599
+ error: opts.createError(
1600
+ "NETWORK_ERROR",
1601
+ `${opts.fallbackMessage} (status: ${response.status})`
1602
+ )
1603
+ };
1604
+ }
1605
+ return { data: opts.success };
1606
+ }
1607
+ function createNewsletterMethods(deps) {
1608
+ const { fetchWithAuth, baseUrl, createError } = deps;
1609
+ async function subscribe(params) {
1610
+ const email = trimOrEmpty(params.email);
1611
+ const source = trimOrEmpty(params.source);
1612
+ if (!email) {
1613
+ return { error: createError("VALIDATION_ERROR", "email \u306F\u5FC5\u9808\u3067\u3059") };
1614
+ }
1615
+ if (!source) {
1616
+ return { error: createError("VALIDATION_ERROR", "source \u306F\u5FC5\u9808\u3067\u3059") };
1617
+ }
1618
+ if (!Array.isArray(params.types) || params.types.length === 0) {
1619
+ return {
1620
+ error: createError(
1621
+ "VALIDATION_ERROR",
1622
+ "types \u306B\u306F1\u3064\u4EE5\u4E0A\u306E newsletter \u7A2E\u5225\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044"
1623
+ )
1624
+ };
1625
+ }
1626
+ return fetchWithAuth(
1627
+ EXT_SUBSCRIBE_ENDPOINT2,
1628
+ {
1629
+ method: "POST",
1630
+ body: JSON.stringify({
1631
+ email,
1632
+ types: params.types,
1633
+ source,
1634
+ locale: params.locale
1635
+ })
1636
+ }
1637
+ );
1638
+ }
1639
+ async function confirm(params) {
1640
+ const token = trimOrEmpty(params.token);
1641
+ if (!token) {
1642
+ return { error: createError("VALIDATION_ERROR", "token \u306F\u5FC5\u9808\u3067\u3059") };
1643
+ }
1644
+ return postPublic(
1645
+ `${baseUrl}${CONFIRM_ENDPOINT}`,
1646
+ {
1647
+ method: "POST",
1648
+ headers: { "Content-Type": "application/json" },
1649
+ body: JSON.stringify({ token })
1650
+ },
1651
+ {
1652
+ success: { ok: true },
1653
+ createError,
1654
+ fallbackMessage: "\u78BA\u8A8D\u30EA\u30AF\u30A8\u30B9\u30C8\u304C\u5931\u6557\u3057\u307E\u3057\u305F"
1655
+ }
1656
+ );
1657
+ }
1658
+ async function unsubscribe(params) {
1659
+ const token = trimOrEmpty(params.token);
1660
+ if (!token) {
1661
+ return { error: createError("VALIDATION_ERROR", "token \u306F\u5FC5\u9808\u3067\u3059") };
1662
+ }
1663
+ const url = new URL(`${baseUrl}${UNSUBSCRIBE_ENDPOINT}`);
1664
+ url.searchParams.set("token", token);
1665
+ return postPublic(
1666
+ url.toString(),
1667
+ { method: "POST" },
1668
+ {
1669
+ success: { ok: true },
1670
+ createError,
1671
+ fallbackMessage: "\u89E3\u9664\u30EA\u30AF\u30A8\u30B9\u30C8\u304C\u5931\u6557\u3057\u307E\u3057\u305F"
1672
+ }
1673
+ );
1674
+ }
1675
+ return { subscribe, confirm, unsubscribe };
1676
+ }
1677
+
1678
+ // src/inquiry/ffid-inquiry-client.ts
1679
+ var EXT_INQUIRY_ENDPOINT = "/api/v1/ext/inquiry";
1680
+ function trimOrEmpty2(s) {
1681
+ return typeof s === "string" ? s.trim() : "";
1682
+ }
1683
+ function createInquiryMethods(deps) {
1684
+ const { fetchWithAuth, createError } = deps;
1685
+ async function create(params) {
1686
+ const email = trimOrEmpty2(params.email);
1687
+ const name = trimOrEmpty2(params.name);
1688
+ const message = trimOrEmpty2(params.message);
1689
+ const termsVersion = trimOrEmpty2(params.termsVersion);
1690
+ const privacyVersion = trimOrEmpty2(params.privacyVersion);
1691
+ if (!email) return { error: createError("VALIDATION_ERROR", "email \u306F\u5FC5\u9808\u3067\u3059") };
1692
+ if (!name) return { error: createError("VALIDATION_ERROR", "name \u306F\u5FC5\u9808\u3067\u3059") };
1693
+ if (!message) return { error: createError("VALIDATION_ERROR", "message \u306F\u5FC5\u9808\u3067\u3059") };
1694
+ if (!termsVersion) {
1695
+ return { error: createError("VALIDATION_ERROR", "termsVersion \u306F\u5FC5\u9808\u3067\u3059") };
1696
+ }
1697
+ if (!privacyVersion) {
1698
+ return { error: createError("VALIDATION_ERROR", "privacyVersion \u306F\u5FC5\u9808\u3067\u3059") };
1699
+ }
1700
+ const inquiryFollowupOptIn = params.inquiryFollowupOptIn === true;
1701
+ const generalNewsletterOptIn = params.generalNewsletterOptIn === true;
1702
+ return fetchWithAuth(EXT_INQUIRY_ENDPOINT, {
1703
+ method: "POST",
1704
+ body: JSON.stringify({
1705
+ email,
1706
+ name,
1707
+ message,
1708
+ category: params.category,
1709
+ company: params.company,
1710
+ phone: params.phone,
1711
+ locale: params.locale,
1712
+ termsVersion,
1713
+ privacyVersion,
1714
+ // The ext endpoint still accepts the legacy single-flag field, but
1715
+ // the SDK always submits the 2-layer model. `newsletterOptIn` is
1716
+ // passed as the union of the two new flags only to satisfy the
1717
+ // current schema's required bool — the server preferentially
1718
+ // reads `inquiryFollowupOptIn` / `generalNewsletterOptIn`.
1719
+ newsletterOptIn: inquiryFollowupOptIn || generalNewsletterOptIn,
1720
+ inquiryFollowupOptIn,
1721
+ generalNewsletterOptIn
1722
+ })
1723
+ });
1724
+ }
1725
+ return { create };
1726
+ }
1727
+
1566
1728
  // src/client/ffid-client.ts
1567
1729
  var UNAUTHORIZED_STATUS2 = 401;
1568
1730
  var SDK_LOG_PREFIX = "[FFID SDK]";
@@ -1838,6 +2000,15 @@ function createFFIDClient(config) {
1838
2000
  createError,
1839
2001
  errorCodes: FFID_ERROR_CODES
1840
2002
  });
2003
+ const newsletter = createNewsletterMethods({
2004
+ fetchWithAuth,
2005
+ baseUrl,
2006
+ createError
2007
+ });
2008
+ const inquiry = createInquiryMethods({
2009
+ fetchWithAuth,
2010
+ createError
2011
+ });
1841
2012
  const verifyAccessToken = createVerifyAccessToken({
1842
2013
  authMode,
1843
2014
  baseUrl,
@@ -1892,6 +2063,10 @@ function createFFIDClient(config) {
1892
2063
  confirmPasswordReset,
1893
2064
  sendOtp,
1894
2065
  verifyOtp,
2066
+ /** Newsletter methods (subscribe / confirm / unsubscribe) */
2067
+ newsletter,
2068
+ /** Inquiry methods (create) */
2069
+ inquiry,
1895
2070
  /** Token store (token mode only) */
1896
2071
  tokenStore,
1897
2072
  /** Resolved auth mode */
@@ -3236,4 +3411,359 @@ function FFIDAnnouncementList({
3236
3411
  );
3237
3412
  }
3238
3413
 
3239
- export { DEFAULT_API_BASE_URL, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useFFIDContext, useSubscription, withSubscription };
3414
+ // src/inquiry/types.ts
3415
+ var FFID_INQUIRY_CATEGORIES = [
3416
+ "general",
3417
+ "sales",
3418
+ "support",
3419
+ "partnership",
3420
+ "press",
3421
+ "other"
3422
+ ];
3423
+ var DEFAULT_CATEGORY_LABELS_JA = {
3424
+ general: "\u4E00\u822C\u7684\u306A\u304A\u554F\u3044\u5408\u308F\u305B",
3425
+ sales: "\u3054\u5C0E\u5165\u30FB\u304A\u898B\u7A4D\u3082\u308A",
3426
+ support: "\u30B5\u30DD\u30FC\u30C8",
3427
+ partnership: "\u30D1\u30FC\u30C8\u30CA\u30FC\u30B7\u30C3\u30D7",
3428
+ press: "\u53D6\u6750\u30FB\u30D7\u30EC\u30B9",
3429
+ other: "\u305D\u306E\u4ED6"
3430
+ };
3431
+ function defaultCategories() {
3432
+ return FFID_INQUIRY_CATEGORIES.map((value) => ({
3433
+ value,
3434
+ label: DEFAULT_CATEGORY_LABELS_JA[value]
3435
+ }));
3436
+ }
3437
+ var labelStyle = {
3438
+ display: "block",
3439
+ fontSize: FONT_SIZE_SM,
3440
+ fontWeight: 500,
3441
+ marginBottom: SPACING_SM
3442
+ };
3443
+ var inputStyle = {
3444
+ width: "100%",
3445
+ padding: `${SPACING_SM}px ${SPACING_MD}px`,
3446
+ fontSize: FONT_SIZE_SM,
3447
+ border: BORDER_DEFAULT,
3448
+ borderRadius: BORDER_RADIUS_SM,
3449
+ background: COLOR_BG_WHITE,
3450
+ boxSizing: "border-box"
3451
+ };
3452
+ var readOnlyStyle = {
3453
+ ...inputStyle,
3454
+ background: "#f9fafb",
3455
+ color: COLOR_TEXT_MUTED,
3456
+ cursor: "not-allowed"
3457
+ };
3458
+ var fieldsetStyle = {
3459
+ marginBottom: SPACING_LG
3460
+ };
3461
+ var errorTextStyle = {
3462
+ fontSize: FONT_SIZE_XS,
3463
+ color: COLOR_DANGER,
3464
+ marginTop: SPACING_XS
3465
+ };
3466
+ var submitButtonStyle = {
3467
+ padding: `${SPACING_MD}px ${SPACING_LG}px`,
3468
+ fontSize: FONT_SIZE_SM,
3469
+ fontWeight: 600,
3470
+ color: COLOR_BG_WHITE,
3471
+ background: COLOR_PRIMARY,
3472
+ border: "none",
3473
+ borderRadius: BORDER_RADIUS_MD,
3474
+ cursor: "pointer"
3475
+ };
3476
+ function FFIDInquiryForm({
3477
+ mode,
3478
+ prefill,
3479
+ organizations = [],
3480
+ preselectedOrganizationId,
3481
+ categories,
3482
+ termsVersion,
3483
+ privacyVersion,
3484
+ termsHref,
3485
+ privacyHref,
3486
+ turnstileToken = null,
3487
+ turnstileSlot,
3488
+ onSubmit,
3489
+ locale = "ja",
3490
+ className
3491
+ }) {
3492
+ const isAuth = mode === "authenticated";
3493
+ const categoryOptions = useMemo(
3494
+ () => categories ?? defaultCategories(),
3495
+ [categories]
3496
+ );
3497
+ const initialOrgId = useMemo(() => {
3498
+ if (!isAuth) return null;
3499
+ if (preselectedOrganizationId !== void 0) return preselectedOrganizationId;
3500
+ if (organizations.length === 1) return organizations[0].id;
3501
+ return null;
3502
+ }, [isAuth, organizations, preselectedOrganizationId]);
3503
+ const [name, setName] = useState(prefill?.name ?? "");
3504
+ const [email, setEmail] = useState(prefill?.email ?? "");
3505
+ const [company, setCompany] = useState("");
3506
+ const [phone, setPhone] = useState("");
3507
+ const [category, setCategory] = useState(categoryOptions[0]?.value ?? "general");
3508
+ const [message, setMessage] = useState("");
3509
+ const [organizationId, setOrganizationId] = useState(initialOrgId);
3510
+ const [inquiryFollowup, setInquiryFollowup] = useState(false);
3511
+ const [general, setGeneral] = useState(false);
3512
+ const [agreedLegal, setAgreedLegal] = useState(false);
3513
+ const [submitting, setSubmitting] = useState(false);
3514
+ const [formError, setFormError] = useState(null);
3515
+ const [successMessage, setSuccessMessage] = useState(null);
3516
+ async function handleSubmit(e) {
3517
+ e.preventDefault();
3518
+ setFormError(null);
3519
+ if (!agreedLegal) {
3520
+ setFormError("\u5229\u7528\u898F\u7D04\u3068\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3521
+ return;
3522
+ }
3523
+ if (!message.trim()) {
3524
+ setFormError("\u304A\u554F\u3044\u5408\u308F\u305B\u5185\u5BB9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002");
3525
+ return;
3526
+ }
3527
+ if (!isAuth) {
3528
+ if (!name.trim() || !email.trim()) {
3529
+ setFormError("\u304A\u540D\u524D\u3068\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002");
3530
+ return;
3531
+ }
3532
+ }
3533
+ setSubmitting(true);
3534
+ try {
3535
+ const result = await onSubmit({
3536
+ name: name.trim(),
3537
+ email: email.trim(),
3538
+ company: company.trim() || null,
3539
+ phone: phone.trim() || null,
3540
+ category,
3541
+ message: message.trim(),
3542
+ organizationId,
3543
+ inquiryFollowupOptIn: inquiryFollowup,
3544
+ generalNewsletterOptIn: general,
3545
+ termsVersion,
3546
+ privacyVersion,
3547
+ turnstileToken: turnstileToken ?? null,
3548
+ locale
3549
+ });
3550
+ if (result.ok) {
3551
+ setSuccessMessage(
3552
+ result.message ?? (result.requiresDoubleOptIn ? "\u304A\u554F\u3044\u5408\u308F\u305B\u3092\u53D7\u3051\u4ED8\u3051\u307E\u3057\u305F\u3002\u30E1\u30EB\u30DE\u30AC\u306E\u8CFC\u8AAD\u78BA\u8A8D\u30E1\u30FC\u30EB\u3092\u9001\u4FE1\u3057\u307E\u3057\u305F\u306E\u3067\u3054\u78BA\u8A8D\u304F\u3060\u3055\u3044\u3002" : "\u304A\u554F\u3044\u5408\u308F\u305B\u3092\u53D7\u3051\u4ED8\u3051\u307E\u3057\u305F\u3002\u62C5\u5F53\u8005\u3088\u308A\u3054\u9023\u7D61\u3044\u305F\u3057\u307E\u3059\u3002")
3553
+ );
3554
+ setMessage("");
3555
+ } else {
3556
+ setFormError(result.message);
3557
+ }
3558
+ } catch (err) {
3559
+ setFormError(
3560
+ err instanceof Error ? err.message : "\u9001\u4FE1\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6642\u9593\u3092\u304A\u3044\u3066\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002"
3561
+ );
3562
+ } finally {
3563
+ setSubmitting(false);
3564
+ }
3565
+ }
3566
+ if (successMessage) {
3567
+ return /* @__PURE__ */ jsx(
3568
+ "div",
3569
+ {
3570
+ role: "status",
3571
+ className,
3572
+ style: {
3573
+ padding: SPACING_LG,
3574
+ border: BORDER_DEFAULT,
3575
+ borderRadius: BORDER_RADIUS_MD,
3576
+ background: "#f0fdf4",
3577
+ color: "#166534",
3578
+ fontSize: FONT_SIZE_SM
3579
+ },
3580
+ children: successMessage
3581
+ }
3582
+ );
3583
+ }
3584
+ const showOrgBlock = isAuth && organizations.length >= 1;
3585
+ return /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className, noValidate: true, children: [
3586
+ showOrgBlock && /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3587
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-org", children: "\u554F\u3044\u5408\u308F\u305B\u308B\u7ACB\u5834" }),
3588
+ /* @__PURE__ */ jsxs(
3589
+ "select",
3590
+ {
3591
+ id: "ffid-inquiry-org",
3592
+ style: inputStyle,
3593
+ value: organizationId ?? "",
3594
+ onChange: (e) => setOrganizationId(e.target.value || null),
3595
+ children: [
3596
+ /* @__PURE__ */ jsx("option", { value: "", children: "\u500B\u4EBA\u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B" }),
3597
+ organizations.map((org) => /* @__PURE__ */ jsxs("option", { value: org.id, children: [
3598
+ org.name,
3599
+ " \u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B"
3600
+ ] }, org.id))
3601
+ ]
3602
+ }
3603
+ )
3604
+ ] }),
3605
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3606
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-name", children: "\u304A\u540D\u524D" }),
3607
+ /* @__PURE__ */ jsx(
3608
+ "input",
3609
+ {
3610
+ id: "ffid-inquiry-name",
3611
+ style: isAuth ? readOnlyStyle : inputStyle,
3612
+ type: "text",
3613
+ value: name,
3614
+ onChange: (e) => setName(e.target.value),
3615
+ readOnly: isAuth,
3616
+ required: true
3617
+ }
3618
+ )
3619
+ ] }),
3620
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3621
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-email", children: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9" }),
3622
+ /* @__PURE__ */ jsx(
3623
+ "input",
3624
+ {
3625
+ id: "ffid-inquiry-email",
3626
+ style: isAuth ? readOnlyStyle : inputStyle,
3627
+ type: "email",
3628
+ value: email,
3629
+ onChange: (e) => setEmail(e.target.value),
3630
+ readOnly: isAuth,
3631
+ required: true
3632
+ }
3633
+ )
3634
+ ] }),
3635
+ !isAuth && /* @__PURE__ */ jsxs(Fragment, { children: [
3636
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3637
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-company", children: "\u4F1A\u793E\u540D (\u4EFB\u610F)" }),
3638
+ /* @__PURE__ */ jsx(
3639
+ "input",
3640
+ {
3641
+ id: "ffid-inquiry-company",
3642
+ style: inputStyle,
3643
+ type: "text",
3644
+ value: company,
3645
+ onChange: (e) => setCompany(e.target.value)
3646
+ }
3647
+ )
3648
+ ] }),
3649
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3650
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-phone", children: "\u96FB\u8A71\u756A\u53F7 (\u4EFB\u610F)" }),
3651
+ /* @__PURE__ */ jsx(
3652
+ "input",
3653
+ {
3654
+ id: "ffid-inquiry-phone",
3655
+ style: inputStyle,
3656
+ type: "tel",
3657
+ value: phone,
3658
+ onChange: (e) => setPhone(e.target.value)
3659
+ }
3660
+ )
3661
+ ] })
3662
+ ] }),
3663
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3664
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-category", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u7A2E\u5225" }),
3665
+ /* @__PURE__ */ jsx(
3666
+ "select",
3667
+ {
3668
+ id: "ffid-inquiry-category",
3669
+ style: inputStyle,
3670
+ value: category,
3671
+ onChange: (e) => setCategory(e.target.value),
3672
+ children: categoryOptions.map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, children: opt.label }, opt.value))
3673
+ }
3674
+ )
3675
+ ] }),
3676
+ /* @__PURE__ */ jsxs("div", { style: fieldsetStyle, children: [
3677
+ /* @__PURE__ */ jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-message", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u5185\u5BB9" }),
3678
+ /* @__PURE__ */ jsx(
3679
+ "textarea",
3680
+ {
3681
+ id: "ffid-inquiry-message",
3682
+ style: { ...inputStyle, minHeight: 180, resize: "vertical" },
3683
+ value: message,
3684
+ onChange: (e) => setMessage(e.target.value),
3685
+ required: true,
3686
+ maxLength: 1e4
3687
+ }
3688
+ )
3689
+ ] }),
3690
+ /* @__PURE__ */ jsxs("fieldset", { style: { ...fieldsetStyle, border: "none", padding: 0 }, children: [
3691
+ /* @__PURE__ */ jsx("legend", { style: { ...labelStyle, marginBottom: SPACING_SM }, children: "\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u8CFC\u8AAD (\u4EFB\u610F)" }),
3692
+ /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM, marginBottom: SPACING_SM }, children: [
3693
+ /* @__PURE__ */ jsx(
3694
+ "input",
3695
+ {
3696
+ type: "checkbox",
3697
+ checked: inquiryFollowup,
3698
+ onChange: (e) => setInquiryFollowup(e.target.checked)
3699
+ }
3700
+ ),
3701
+ /* @__PURE__ */ jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u304A\u554F\u3044\u5408\u308F\u305B\u306B\u95A2\u9023\u3059\u308B\u6848\u5185\u3092\u53D7\u3051\u53D6\u308B" })
3702
+ ] }),
3703
+ /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM }, children: [
3704
+ /* @__PURE__ */ jsx(
3705
+ "input",
3706
+ {
3707
+ type: "checkbox",
3708
+ checked: general,
3709
+ onChange: (e) => setGeneral(e.target.checked)
3710
+ }
3711
+ ),
3712
+ /* @__PURE__ */ jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u5B9A\u671F\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u3092\u53D7\u3051\u53D6\u308B" })
3713
+ ] })
3714
+ ] }),
3715
+ /* @__PURE__ */ jsx("div", { style: fieldsetStyle, children: /* @__PURE__ */ jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3716
+ /* @__PURE__ */ jsx(
3717
+ "input",
3718
+ {
3719
+ type: "checkbox",
3720
+ checked: agreedLegal,
3721
+ onChange: (e) => setAgreedLegal(e.target.checked),
3722
+ required: true
3723
+ }
3724
+ ),
3725
+ /* @__PURE__ */ jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3726
+ termsHref ? /* @__PURE__ */ jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3727
+ "\u5229\u7528\u898F\u7D04 (v",
3728
+ termsVersion,
3729
+ ")"
3730
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3731
+ "\u5229\u7528\u898F\u7D04 (v",
3732
+ termsVersion,
3733
+ ")"
3734
+ ] }),
3735
+ " ",
3736
+ "\u3068",
3737
+ " ",
3738
+ privacyHref ? /* @__PURE__ */ jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3739
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3740
+ privacyVersion,
3741
+ ")"
3742
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
3743
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3744
+ privacyVersion,
3745
+ ")"
3746
+ ] }),
3747
+ " ",
3748
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3749
+ ] })
3750
+ ] }) }),
3751
+ !isAuth && turnstileSlot && /* @__PURE__ */ jsx("div", { style: fieldsetStyle, children: turnstileSlot }),
3752
+ formError && /* @__PURE__ */ jsx("p", { role: "alert", style: { ...errorTextStyle, marginBottom: SPACING_MD }, children: formError }),
3753
+ /* @__PURE__ */ jsx(
3754
+ "button",
3755
+ {
3756
+ type: "submit",
3757
+ style: {
3758
+ ...submitButtonStyle,
3759
+ opacity: submitting ? 0.6 : 1,
3760
+ cursor: submitting ? "not-allowed" : "pointer"
3761
+ },
3762
+ disabled: submitting,
3763
+ children: submitting ? "\u9001\u4FE1\u4E2D..." : "\u9001\u4FE1\u3059\u308B"
3764
+ }
3765
+ )
3766
+ ] });
3767
+ }
3768
+
3769
+ export { DEFAULT_API_BASE_URL, FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDProvider, FFIDSubscriptionBadge, FFIDUserMenu, FFID_ANNOUNCEMENTS_ERROR_CODES, FFID_INQUIRY_CATEGORIES, createFFIDAnnouncementsClient, createFFIDClient, createTokenStore, generateCodeChallenge, generateCodeVerifier, retrieveCodeVerifier, storeCodeVerifier, useFFID, useFFIDAnnouncements, useFFIDContext, useSubscription, withSubscription };
@@ -1,30 +1,34 @@
1
1
  'use strict';
2
2
 
3
- var chunkZORI5YFR_cjs = require('../chunk-ZORI5YFR.cjs');
3
+ var chunkGB5OHEVY_cjs = require('../chunk-GB5OHEVY.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
8
8
  enumerable: true,
9
- get: function () { return chunkZORI5YFR_cjs.FFIDAnnouncementBadge; }
9
+ get: function () { return chunkGB5OHEVY_cjs.FFIDAnnouncementBadge; }
10
10
  });
11
11
  Object.defineProperty(exports, "FFIDAnnouncementList", {
12
12
  enumerable: true,
13
- get: function () { return chunkZORI5YFR_cjs.FFIDAnnouncementList; }
13
+ get: function () { return chunkGB5OHEVY_cjs.FFIDAnnouncementList; }
14
+ });
15
+ Object.defineProperty(exports, "FFIDInquiryForm", {
16
+ enumerable: true,
17
+ get: function () { return chunkGB5OHEVY_cjs.FFIDInquiryForm; }
14
18
  });
15
19
  Object.defineProperty(exports, "FFIDLoginButton", {
16
20
  enumerable: true,
17
- get: function () { return chunkZORI5YFR_cjs.FFIDLoginButton; }
21
+ get: function () { return chunkGB5OHEVY_cjs.FFIDLoginButton; }
18
22
  });
19
23
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
20
24
  enumerable: true,
21
- get: function () { return chunkZORI5YFR_cjs.FFIDOrganizationSwitcher; }
25
+ get: function () { return chunkGB5OHEVY_cjs.FFIDOrganizationSwitcher; }
22
26
  });
23
27
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
24
28
  enumerable: true,
25
- get: function () { return chunkZORI5YFR_cjs.FFIDSubscriptionBadge; }
29
+ get: function () { return chunkGB5OHEVY_cjs.FFIDSubscriptionBadge; }
26
30
  });
27
31
  Object.defineProperty(exports, "FFIDUserMenu", {
28
32
  enumerable: true,
29
- get: function () { return chunkZORI5YFR_cjs.FFIDUserMenu; }
33
+ get: function () { return chunkGB5OHEVY_cjs.FFIDUserMenu; }
30
34
  });
@@ -1,3 +1,3 @@
1
- export { E as FFIDAnnouncementBadge, a0 as FFIDAnnouncementBadgeClassNames, a1 as FFIDAnnouncementBadgeProps, G as FFIDAnnouncementList, a2 as FFIDAnnouncementListClassNames, a3 as FFIDAnnouncementListProps, O as FFIDLoginButton, a4 as FFIDLoginButtonProps, U as FFIDOrganizationSwitcher, a5 as FFIDOrganizationSwitcherClassNames, a6 as FFIDOrganizationSwitcherProps, W as FFIDSubscriptionBadge, a7 as FFIDSubscriptionBadgeClassNames, a8 as FFIDSubscriptionBadgeProps, Y as FFIDUserMenu, a9 as FFIDUserMenuClassNames, aa as FFIDUserMenuProps } from '../index-p4dJw3qR.cjs';
1
+ export { E as FFIDAnnouncementBadge, a6 as FFIDAnnouncementBadgeClassNames, a7 as FFIDAnnouncementBadgeProps, G as FFIDAnnouncementList, a8 as FFIDAnnouncementListClassNames, a9 as FFIDAnnouncementListProps, N as FFIDInquiryForm, O as FFIDInquiryFormOrganization, P as FFIDInquiryFormPrefill, Q as FFIDInquiryFormProps, R as FFIDInquiryFormSubmitData, S as FFIDInquiryFormSubmitResult, U as FFIDLoginButton, aa as FFIDLoginButtonProps, _ as FFIDOrganizationSwitcher, ab as FFIDOrganizationSwitcherClassNames, ac as FFIDOrganizationSwitcherProps, a0 as FFIDSubscriptionBadge, ad as FFIDSubscriptionBadgeClassNames, ae as FFIDSubscriptionBadgeProps, a2 as FFIDUserMenu, af as FFIDUserMenuClassNames, ag as FFIDUserMenuProps } from '../index-BBAzyBFG.cjs';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1,3 +1,3 @@
1
- export { E as FFIDAnnouncementBadge, a0 as FFIDAnnouncementBadgeClassNames, a1 as FFIDAnnouncementBadgeProps, G as FFIDAnnouncementList, a2 as FFIDAnnouncementListClassNames, a3 as FFIDAnnouncementListProps, O as FFIDLoginButton, a4 as FFIDLoginButtonProps, U as FFIDOrganizationSwitcher, a5 as FFIDOrganizationSwitcherClassNames, a6 as FFIDOrganizationSwitcherProps, W as FFIDSubscriptionBadge, a7 as FFIDSubscriptionBadgeClassNames, a8 as FFIDSubscriptionBadgeProps, Y as FFIDUserMenu, a9 as FFIDUserMenuClassNames, aa as FFIDUserMenuProps } from '../index-p4dJw3qR.js';
1
+ export { E as FFIDAnnouncementBadge, a6 as FFIDAnnouncementBadgeClassNames, a7 as FFIDAnnouncementBadgeProps, G as FFIDAnnouncementList, a8 as FFIDAnnouncementListClassNames, a9 as FFIDAnnouncementListProps, N as FFIDInquiryForm, O as FFIDInquiryFormOrganization, P as FFIDInquiryFormPrefill, Q as FFIDInquiryFormProps, R as FFIDInquiryFormSubmitData, S as FFIDInquiryFormSubmitResult, U as FFIDLoginButton, aa as FFIDLoginButtonProps, _ as FFIDOrganizationSwitcher, ab as FFIDOrganizationSwitcherClassNames, ac as FFIDOrganizationSwitcherProps, a0 as FFIDSubscriptionBadge, ad as FFIDSubscriptionBadgeClassNames, ae as FFIDSubscriptionBadgeProps, a2 as FFIDUserMenu, af as FFIDUserMenuClassNames, ag as FFIDUserMenuProps } from '../index-BBAzyBFG.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
@@ -1 +1 @@
1
- export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-7FEWA2P2.js';
1
+ export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-SR4UAQ3C.js';