@feelflow/ffid-sdk 2.7.0 → 2.9.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.
@@ -621,7 +621,7 @@ function createMembersMethods(deps) {
621
621
  }
622
622
 
623
623
  // src/client/version-check.ts
624
- var SDK_VERSION = "2.7.0";
624
+ var SDK_VERSION = "2.9.0";
625
625
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
626
626
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
627
627
  function sdkHeaders() {
@@ -1677,6 +1677,56 @@ function createNewsletterMethods(deps) {
1677
1677
  return { subscribe, confirm, unsubscribe };
1678
1678
  }
1679
1679
 
1680
+ // src/inquiry/ffid-inquiry-client.ts
1681
+ var EXT_INQUIRY_ENDPOINT = "/api/v1/ext/inquiry";
1682
+ function trimOrEmpty2(s) {
1683
+ return typeof s === "string" ? s.trim() : "";
1684
+ }
1685
+ function createInquiryMethods(deps) {
1686
+ const { fetchWithAuth, createError } = deps;
1687
+ async function create(params) {
1688
+ const email = trimOrEmpty2(params.email);
1689
+ const name = trimOrEmpty2(params.name);
1690
+ const message = trimOrEmpty2(params.message);
1691
+ const termsVersion = trimOrEmpty2(params.termsVersion);
1692
+ const privacyVersion = trimOrEmpty2(params.privacyVersion);
1693
+ if (!email) return { error: createError("VALIDATION_ERROR", "email \u306F\u5FC5\u9808\u3067\u3059") };
1694
+ if (!name) return { error: createError("VALIDATION_ERROR", "name \u306F\u5FC5\u9808\u3067\u3059") };
1695
+ if (!message) return { error: createError("VALIDATION_ERROR", "message \u306F\u5FC5\u9808\u3067\u3059") };
1696
+ if (!termsVersion) {
1697
+ return { error: createError("VALIDATION_ERROR", "termsVersion \u306F\u5FC5\u9808\u3067\u3059") };
1698
+ }
1699
+ if (!privacyVersion) {
1700
+ return { error: createError("VALIDATION_ERROR", "privacyVersion \u306F\u5FC5\u9808\u3067\u3059") };
1701
+ }
1702
+ const inquiryFollowupOptIn = params.inquiryFollowupOptIn === true;
1703
+ const generalNewsletterOptIn = params.generalNewsletterOptIn === true;
1704
+ return fetchWithAuth(EXT_INQUIRY_ENDPOINT, {
1705
+ method: "POST",
1706
+ body: JSON.stringify({
1707
+ email,
1708
+ name,
1709
+ message,
1710
+ category: params.category,
1711
+ company: params.company,
1712
+ phone: params.phone,
1713
+ locale: params.locale,
1714
+ termsVersion,
1715
+ privacyVersion,
1716
+ // The ext endpoint still accepts the legacy single-flag field, but
1717
+ // the SDK always submits the 2-layer model. `newsletterOptIn` is
1718
+ // passed as the union of the two new flags only to satisfy the
1719
+ // current schema's required bool — the server preferentially
1720
+ // reads `inquiryFollowupOptIn` / `generalNewsletterOptIn`.
1721
+ newsletterOptIn: inquiryFollowupOptIn || generalNewsletterOptIn,
1722
+ inquiryFollowupOptIn,
1723
+ generalNewsletterOptIn
1724
+ })
1725
+ });
1726
+ }
1727
+ return { create };
1728
+ }
1729
+
1680
1730
  // src/client/ffid-client.ts
1681
1731
  var UNAUTHORIZED_STATUS2 = 401;
1682
1732
  var SDK_LOG_PREFIX = "[FFID SDK]";
@@ -1957,6 +2007,10 @@ function createFFIDClient(config) {
1957
2007
  baseUrl,
1958
2008
  createError
1959
2009
  });
2010
+ const inquiry = createInquiryMethods({
2011
+ fetchWithAuth,
2012
+ createError
2013
+ });
1960
2014
  const verifyAccessToken = createVerifyAccessToken({
1961
2015
  authMode,
1962
2016
  baseUrl,
@@ -2013,6 +2067,8 @@ function createFFIDClient(config) {
2013
2067
  verifyOtp,
2014
2068
  /** Newsletter methods (subscribe / confirm / unsubscribe) */
2015
2069
  newsletter,
2070
+ /** Inquiry methods (create) */
2071
+ inquiry,
2016
2072
  /** Token store (token mode only) */
2017
2073
  tokenStore,
2018
2074
  /** Resolved auth mode */
@@ -3357,15 +3413,530 @@ function FFIDAnnouncementList({
3357
3413
  );
3358
3414
  }
3359
3415
 
3416
+ // src/inquiry/types.ts
3417
+ var FFID_INQUIRY_CATEGORIES = [
3418
+ "general",
3419
+ "sales",
3420
+ "support",
3421
+ "partnership",
3422
+ "press",
3423
+ "other"
3424
+ ];
3425
+ var DEFAULT_CATEGORY_LABELS_JA = {
3426
+ general: "\u4E00\u822C\u7684\u306A\u304A\u554F\u3044\u5408\u308F\u305B",
3427
+ sales: "\u3054\u5C0E\u5165\u30FB\u304A\u898B\u7A4D\u3082\u308A",
3428
+ support: "\u30B5\u30DD\u30FC\u30C8",
3429
+ partnership: "\u30D1\u30FC\u30C8\u30CA\u30FC\u30B7\u30C3\u30D7",
3430
+ press: "\u53D6\u6750\u30FB\u30D7\u30EC\u30B9",
3431
+ other: "\u305D\u306E\u4ED6"
3432
+ };
3433
+ function defaultCategories() {
3434
+ return FFID_INQUIRY_CATEGORIES.map((value) => ({
3435
+ value,
3436
+ label: DEFAULT_CATEGORY_LABELS_JA[value]
3437
+ }));
3438
+ }
3439
+ function renderCategoryOptions(options) {
3440
+ const hasAnyGroup = options.some((o) => !!o.group);
3441
+ if (!hasAnyGroup) {
3442
+ return options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value, children: opt.label }, opt.value));
3443
+ }
3444
+ const ungrouped = options.filter((o) => !o.group);
3445
+ const groupKeys = [];
3446
+ const groupLabelByKey = /* @__PURE__ */ new Map();
3447
+ const itemsByKey = /* @__PURE__ */ new Map();
3448
+ for (const opt of options) {
3449
+ if (!opt.group) continue;
3450
+ if (!itemsByKey.has(opt.group)) {
3451
+ groupKeys.push(opt.group);
3452
+ itemsByKey.set(opt.group, []);
3453
+ groupLabelByKey.set(opt.group, opt.groupLabel ?? opt.group);
3454
+ }
3455
+ itemsByKey.get(opt.group).push(opt);
3456
+ }
3457
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3458
+ ungrouped.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value, children: opt.label }, opt.value)),
3459
+ groupKeys.map((key) => /* @__PURE__ */ jsxRuntime.jsx("optgroup", { label: groupLabelByKey.get(key) ?? key, children: itemsByKey.get(key).map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value, children: opt.label }, opt.value)) }, key))
3460
+ ] });
3461
+ }
3462
+ var labelStyle = {
3463
+ display: "block",
3464
+ fontSize: FONT_SIZE_SM,
3465
+ fontWeight: 500,
3466
+ marginBottom: SPACING_SM
3467
+ };
3468
+ var inputStyle = {
3469
+ width: "100%",
3470
+ padding: `${SPACING_SM}px ${SPACING_MD}px`,
3471
+ fontSize: FONT_SIZE_SM,
3472
+ border: BORDER_DEFAULT,
3473
+ borderRadius: BORDER_RADIUS_SM,
3474
+ background: COLOR_BG_WHITE,
3475
+ boxSizing: "border-box"
3476
+ };
3477
+ var readOnlyStyle = {
3478
+ ...inputStyle,
3479
+ background: "#f9fafb",
3480
+ color: COLOR_TEXT_MUTED,
3481
+ cursor: "not-allowed"
3482
+ };
3483
+ var fieldsetStyle = {
3484
+ marginBottom: SPACING_LG
3485
+ };
3486
+ var errorTextStyle = {
3487
+ fontSize: FONT_SIZE_XS,
3488
+ color: COLOR_DANGER,
3489
+ marginTop: SPACING_XS
3490
+ };
3491
+ var submitButtonStyle = {
3492
+ padding: `${SPACING_MD}px ${SPACING_LG}px`,
3493
+ fontSize: FONT_SIZE_SM,
3494
+ fontWeight: 600,
3495
+ color: COLOR_BG_WHITE,
3496
+ background: COLOR_PRIMARY,
3497
+ border: "none",
3498
+ borderRadius: BORDER_RADIUS_MD,
3499
+ cursor: "pointer"
3500
+ };
3501
+ var SUBMIT_BUTTON_OPACITY_PENDING = 0.6;
3502
+ function FFIDInquiryForm({
3503
+ mode,
3504
+ prefill,
3505
+ organizations = [],
3506
+ preselectedOrganizationId,
3507
+ categories,
3508
+ termsVersion,
3509
+ privacyVersion,
3510
+ termsHref,
3511
+ privacyHref,
3512
+ turnstileToken = null,
3513
+ turnstileSlot,
3514
+ onSubmit,
3515
+ onChange,
3516
+ separateLegalCheckboxes = false,
3517
+ locale = "ja",
3518
+ className
3519
+ }) {
3520
+ const isAuth = mode === "authenticated";
3521
+ const isNameReadOnly = isAuth && !!prefill?.name;
3522
+ const isEmailReadOnly = isAuth;
3523
+ const categoryOptions = react.useMemo(
3524
+ () => categories && categories.length > 0 ? categories : defaultCategories(),
3525
+ [categories]
3526
+ );
3527
+ const initialOrgId = react.useMemo(() => {
3528
+ if (!isAuth) return null;
3529
+ if (preselectedOrganizationId !== void 0) return preselectedOrganizationId;
3530
+ if (organizations.length === 1) return organizations[0].id;
3531
+ return null;
3532
+ }, [isAuth, organizations, preselectedOrganizationId]);
3533
+ const initialCategory = react.useMemo(() => {
3534
+ const fallback = categoryOptions[0]?.value ?? "general";
3535
+ const requested = prefill?.category;
3536
+ if (!requested) return fallback;
3537
+ return categoryOptions.some((opt) => opt.value === requested) ? requested : fallback;
3538
+ }, [categoryOptions, prefill?.category]);
3539
+ const [name, setName] = react.useState(prefill?.name ?? "");
3540
+ const [email, setEmail] = react.useState(prefill?.email ?? "");
3541
+ const [company, setCompany] = react.useState(isAuth ? "" : prefill?.company ?? "");
3542
+ const [phone, setPhone] = react.useState(isAuth ? "" : prefill?.phone ?? "");
3543
+ const [category, setCategory] = react.useState(initialCategory);
3544
+ const [message, setMessage] = react.useState(prefill?.message ?? "");
3545
+ const [organizationId, setOrganizationId] = react.useState(initialOrgId);
3546
+ const [inquiryFollowup, setInquiryFollowup] = react.useState(false);
3547
+ const [general, setGeneral] = react.useState(false);
3548
+ const [agreedLegal, setAgreedLegal] = react.useState(false);
3549
+ const [agreedTerms, setAgreedTerms] = react.useState(false);
3550
+ const [agreedPrivacy, setAgreedPrivacy] = react.useState(false);
3551
+ const [submitting, setSubmitting] = react.useState(false);
3552
+ const [formError, setFormError] = react.useState(null);
3553
+ const [successMessage, setSuccessMessage] = react.useState(null);
3554
+ const [hydrated, setHydrated] = react.useState(false);
3555
+ react.useEffect(() => {
3556
+ setHydrated(true);
3557
+ }, []);
3558
+ const onChangeRef = react.useRef(onChange);
3559
+ react.useEffect(() => {
3560
+ onChangeRef.current = onChange;
3561
+ }, [onChange]);
3562
+ react.useEffect(() => {
3563
+ onChangeRef.current?.({
3564
+ name: name.trim(),
3565
+ email: email.trim(),
3566
+ company: company.trim() || null,
3567
+ phone: phone.trim() || null,
3568
+ category,
3569
+ message: message.trim(),
3570
+ organizationId,
3571
+ inquiryFollowupOptIn: inquiryFollowup,
3572
+ generalNewsletterOptIn: general,
3573
+ termsVersion,
3574
+ privacyVersion,
3575
+ turnstileToken: turnstileToken ?? null,
3576
+ locale
3577
+ });
3578
+ }, [
3579
+ name,
3580
+ email,
3581
+ company,
3582
+ phone,
3583
+ category,
3584
+ message,
3585
+ organizationId,
3586
+ inquiryFollowup,
3587
+ general,
3588
+ termsVersion,
3589
+ privacyVersion,
3590
+ turnstileToken,
3591
+ locale
3592
+ ]);
3593
+ async function handleSubmit(e) {
3594
+ e.preventDefault();
3595
+ setFormError(null);
3596
+ if (separateLegalCheckboxes) {
3597
+ if (!agreedTerms && !agreedPrivacy) {
3598
+ 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");
3599
+ return;
3600
+ }
3601
+ if (!agreedTerms) {
3602
+ setFormError("\u5229\u7528\u898F\u7D04\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3603
+ return;
3604
+ }
3605
+ if (!agreedPrivacy) {
3606
+ setFormError("\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC\u3078\u306E\u540C\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002");
3607
+ return;
3608
+ }
3609
+ } else if (!agreedLegal) {
3610
+ 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");
3611
+ return;
3612
+ }
3613
+ if (!message.trim()) {
3614
+ setFormError("\u304A\u554F\u3044\u5408\u308F\u305B\u5185\u5BB9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002");
3615
+ return;
3616
+ }
3617
+ if (!isAuth) {
3618
+ if (!name.trim() || !email.trim()) {
3619
+ setFormError("\u304A\u540D\u524D\u3068\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002");
3620
+ return;
3621
+ }
3622
+ }
3623
+ setSubmitting(true);
3624
+ try {
3625
+ const result = await onSubmit({
3626
+ name: name.trim(),
3627
+ email: email.trim(),
3628
+ company: company.trim() || null,
3629
+ phone: phone.trim() || null,
3630
+ category,
3631
+ message: message.trim(),
3632
+ organizationId,
3633
+ inquiryFollowupOptIn: inquiryFollowup,
3634
+ generalNewsletterOptIn: general,
3635
+ termsVersion,
3636
+ privacyVersion,
3637
+ turnstileToken: turnstileToken ?? null,
3638
+ locale
3639
+ });
3640
+ if (result.ok) {
3641
+ setSuccessMessage(
3642
+ 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")
3643
+ );
3644
+ setMessage("");
3645
+ } else {
3646
+ setFormError(
3647
+ result.message ?? "\u9001\u4FE1\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u6642\u9593\u3092\u304A\u3044\u3066\u518D\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002"
3648
+ );
3649
+ }
3650
+ } catch (err) {
3651
+ console.error("[FFIDInquiryForm] onSubmit threw", err);
3652
+ setFormError("\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");
3653
+ } finally {
3654
+ setSubmitting(false);
3655
+ }
3656
+ }
3657
+ if (successMessage) {
3658
+ return /* @__PURE__ */ jsxRuntime.jsx(
3659
+ "div",
3660
+ {
3661
+ role: "status",
3662
+ className,
3663
+ style: {
3664
+ padding: SPACING_LG,
3665
+ border: BORDER_DEFAULT,
3666
+ borderRadius: BORDER_RADIUS_MD,
3667
+ background: "#f0fdf4",
3668
+ color: "#166534",
3669
+ fontSize: FONT_SIZE_SM
3670
+ },
3671
+ children: successMessage
3672
+ }
3673
+ );
3674
+ }
3675
+ const showOrgBlock = isAuth && organizations.length >= 1;
3676
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3677
+ "form",
3678
+ {
3679
+ onSubmit: handleSubmit,
3680
+ className,
3681
+ noValidate: true,
3682
+ "data-hydrated": hydrated ? "true" : void 0,
3683
+ children: [
3684
+ showOrgBlock && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3685
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-org", children: "\u554F\u3044\u5408\u308F\u305B\u308B\u7ACB\u5834" }),
3686
+ /* @__PURE__ */ jsxRuntime.jsxs(
3687
+ "select",
3688
+ {
3689
+ id: "ffid-inquiry-org",
3690
+ style: inputStyle,
3691
+ value: organizationId ?? "",
3692
+ onChange: (e) => setOrganizationId(e.target.value || null),
3693
+ children: [
3694
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: "\u500B\u4EBA\u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B" }),
3695
+ organizations.map((org) => /* @__PURE__ */ jsxRuntime.jsxs("option", { value: org.id, children: [
3696
+ org.name,
3697
+ " \u3068\u3057\u3066\u554F\u3044\u5408\u308F\u305B\u308B"
3698
+ ] }, org.id))
3699
+ ]
3700
+ }
3701
+ )
3702
+ ] }),
3703
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3704
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-name", children: "\u304A\u540D\u524D" }),
3705
+ /* @__PURE__ */ jsxRuntime.jsx(
3706
+ "input",
3707
+ {
3708
+ id: "ffid-inquiry-name",
3709
+ style: isNameReadOnly ? readOnlyStyle : inputStyle,
3710
+ type: "text",
3711
+ value: name,
3712
+ onChange: (e) => setName(e.target.value),
3713
+ readOnly: isNameReadOnly,
3714
+ required: true
3715
+ }
3716
+ )
3717
+ ] }),
3718
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3719
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-email", children: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9" }),
3720
+ /* @__PURE__ */ jsxRuntime.jsx(
3721
+ "input",
3722
+ {
3723
+ id: "ffid-inquiry-email",
3724
+ style: isEmailReadOnly ? readOnlyStyle : inputStyle,
3725
+ type: "email",
3726
+ value: email,
3727
+ onChange: (e) => setEmail(e.target.value),
3728
+ readOnly: isEmailReadOnly,
3729
+ required: true
3730
+ }
3731
+ )
3732
+ ] }),
3733
+ !isAuth && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3734
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3735
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-company", children: "\u4F1A\u793E\u540D (\u4EFB\u610F)" }),
3736
+ /* @__PURE__ */ jsxRuntime.jsx(
3737
+ "input",
3738
+ {
3739
+ id: "ffid-inquiry-company",
3740
+ style: inputStyle,
3741
+ type: "text",
3742
+ value: company,
3743
+ onChange: (e) => setCompany(e.target.value)
3744
+ }
3745
+ )
3746
+ ] }),
3747
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3748
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-phone", children: "\u96FB\u8A71\u756A\u53F7 (\u4EFB\u610F)" }),
3749
+ /* @__PURE__ */ jsxRuntime.jsx(
3750
+ "input",
3751
+ {
3752
+ id: "ffid-inquiry-phone",
3753
+ style: inputStyle,
3754
+ type: "tel",
3755
+ value: phone,
3756
+ onChange: (e) => setPhone(e.target.value)
3757
+ }
3758
+ )
3759
+ ] })
3760
+ ] }),
3761
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3762
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-category", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u7A2E\u5225" }),
3763
+ /* @__PURE__ */ jsxRuntime.jsx(
3764
+ "select",
3765
+ {
3766
+ id: "ffid-inquiry-category",
3767
+ style: inputStyle,
3768
+ value: category,
3769
+ onChange: (e) => setCategory(e.target.value),
3770
+ children: renderCategoryOptions(categoryOptions)
3771
+ }
3772
+ )
3773
+ ] }),
3774
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3775
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, htmlFor: "ffid-inquiry-message", children: "\u304A\u554F\u3044\u5408\u308F\u305B\u5185\u5BB9" }),
3776
+ /* @__PURE__ */ jsxRuntime.jsx(
3777
+ "textarea",
3778
+ {
3779
+ id: "ffid-inquiry-message",
3780
+ style: { ...inputStyle, minHeight: 180, resize: "vertical" },
3781
+ value: message,
3782
+ onChange: (e) => setMessage(e.target.value),
3783
+ required: true,
3784
+ maxLength: 1e4
3785
+ }
3786
+ )
3787
+ ] }),
3788
+ /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { style: { ...fieldsetStyle, border: "none", padding: 0 }, children: [
3789
+ /* @__PURE__ */ jsxRuntime.jsx("legend", { style: { ...labelStyle, marginBottom: SPACING_SM }, children: "\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u8CFC\u8AAD (\u4EFB\u610F)" }),
3790
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM, marginBottom: SPACING_SM }, children: [
3791
+ /* @__PURE__ */ jsxRuntime.jsx(
3792
+ "input",
3793
+ {
3794
+ type: "checkbox",
3795
+ checked: inquiryFollowup,
3796
+ onChange: (e) => setInquiryFollowup(e.target.checked)
3797
+ }
3798
+ ),
3799
+ /* @__PURE__ */ jsxRuntime.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" })
3800
+ ] }),
3801
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "flex", alignItems: "center", gap: SPACING_SM }, children: [
3802
+ /* @__PURE__ */ jsxRuntime.jsx(
3803
+ "input",
3804
+ {
3805
+ type: "checkbox",
3806
+ checked: general,
3807
+ onChange: (e) => setGeneral(e.target.checked)
3808
+ }
3809
+ ),
3810
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: FONT_SIZE_SM }, children: "\u5B9A\u671F\u30CB\u30E5\u30FC\u30B9\u30EC\u30BF\u30FC\u3092\u53D7\u3051\u53D6\u308B" })
3811
+ ] })
3812
+ ] }),
3813
+ separateLegalCheckboxes ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldsetStyle, children: [
3814
+ /* @__PURE__ */ jsxRuntime.jsxs(
3815
+ "label",
3816
+ {
3817
+ style: {
3818
+ display: "flex",
3819
+ alignItems: "flex-start",
3820
+ gap: SPACING_SM,
3821
+ marginBottom: SPACING_SM
3822
+ },
3823
+ children: [
3824
+ /* @__PURE__ */ jsxRuntime.jsx(
3825
+ "input",
3826
+ {
3827
+ type: "checkbox",
3828
+ checked: agreedTerms,
3829
+ onChange: (e) => setAgreedTerms(e.target.checked),
3830
+ required: true
3831
+ }
3832
+ ),
3833
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3834
+ termsHref ? /* @__PURE__ */ jsxRuntime.jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3835
+ "\u5229\u7528\u898F\u7D04 (v",
3836
+ termsVersion,
3837
+ ")"
3838
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3839
+ "\u5229\u7528\u898F\u7D04 (v",
3840
+ termsVersion,
3841
+ ")"
3842
+ ] }),
3843
+ " ",
3844
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3845
+ ] })
3846
+ ]
3847
+ }
3848
+ ),
3849
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3850
+ /* @__PURE__ */ jsxRuntime.jsx(
3851
+ "input",
3852
+ {
3853
+ type: "checkbox",
3854
+ checked: agreedPrivacy,
3855
+ onChange: (e) => setAgreedPrivacy(e.target.checked),
3856
+ required: true
3857
+ }
3858
+ ),
3859
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3860
+ privacyHref ? /* @__PURE__ */ jsxRuntime.jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3861
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3862
+ privacyVersion,
3863
+ ")"
3864
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3865
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3866
+ privacyVersion,
3867
+ ")"
3868
+ ] }),
3869
+ " ",
3870
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3871
+ ] })
3872
+ ] })
3873
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { style: fieldsetStyle, children: /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "flex", alignItems: "flex-start", gap: SPACING_SM }, children: [
3874
+ /* @__PURE__ */ jsxRuntime.jsx(
3875
+ "input",
3876
+ {
3877
+ type: "checkbox",
3878
+ checked: agreedLegal,
3879
+ onChange: (e) => setAgreedLegal(e.target.checked),
3880
+ required: true
3881
+ }
3882
+ ),
3883
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: FONT_SIZE_SM }, children: [
3884
+ termsHref ? /* @__PURE__ */ jsxRuntime.jsxs("a", { href: termsHref, target: "_blank", rel: "noopener noreferrer", children: [
3885
+ "\u5229\u7528\u898F\u7D04 (v",
3886
+ termsVersion,
3887
+ ")"
3888
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3889
+ "\u5229\u7528\u898F\u7D04 (v",
3890
+ termsVersion,
3891
+ ")"
3892
+ ] }),
3893
+ " ",
3894
+ "\u3068",
3895
+ " ",
3896
+ privacyHref ? /* @__PURE__ */ jsxRuntime.jsxs("a", { href: privacyHref, target: "_blank", rel: "noopener noreferrer", children: [
3897
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3898
+ privacyVersion,
3899
+ ")"
3900
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3901
+ "\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC (v",
3902
+ privacyVersion,
3903
+ ")"
3904
+ ] }),
3905
+ " ",
3906
+ "\u306B\u540C\u610F\u3057\u307E\u3059\u3002"
3907
+ ] })
3908
+ ] }) }),
3909
+ !isAuth && turnstileSlot && /* @__PURE__ */ jsxRuntime.jsx("div", { style: fieldsetStyle, children: turnstileSlot }),
3910
+ formError && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", style: { ...errorTextStyle, marginBottom: SPACING_MD }, children: formError }),
3911
+ /* @__PURE__ */ jsxRuntime.jsx(
3912
+ "button",
3913
+ {
3914
+ type: "submit",
3915
+ style: {
3916
+ ...submitButtonStyle,
3917
+ opacity: submitting ? SUBMIT_BUTTON_OPACITY_PENDING : 1,
3918
+ cursor: submitting ? "not-allowed" : "pointer"
3919
+ },
3920
+ disabled: submitting,
3921
+ children: submitting ? "\u9001\u4FE1\u4E2D..." : "\u9001\u4FE1\u3059\u308B"
3922
+ }
3923
+ )
3924
+ ]
3925
+ }
3926
+ );
3927
+ }
3928
+
3360
3929
  exports.DEFAULT_API_BASE_URL = DEFAULT_API_BASE_URL;
3361
3930
  exports.FFIDAnnouncementBadge = FFIDAnnouncementBadge;
3362
3931
  exports.FFIDAnnouncementList = FFIDAnnouncementList;
3932
+ exports.FFIDInquiryForm = FFIDInquiryForm;
3363
3933
  exports.FFIDLoginButton = FFIDLoginButton;
3364
3934
  exports.FFIDOrganizationSwitcher = FFIDOrganizationSwitcher;
3365
3935
  exports.FFIDProvider = FFIDProvider;
3366
3936
  exports.FFIDSubscriptionBadge = FFIDSubscriptionBadge;
3367
3937
  exports.FFIDUserMenu = FFIDUserMenu;
3368
3938
  exports.FFID_ANNOUNCEMENTS_ERROR_CODES = FFID_ANNOUNCEMENTS_ERROR_CODES;
3939
+ exports.FFID_INQUIRY_CATEGORIES = FFID_INQUIRY_CATEGORIES;
3369
3940
  exports.createFFIDAnnouncementsClient = createFFIDAnnouncementsClient;
3370
3941
  exports.createFFIDClient = createFFIDClient;
3371
3942
  exports.createTokenStore = createTokenStore;